|
@@ -30,21 +30,27 @@
|
|
|
<view :class="opButton.CheckEdit?'section-select-box':null" :style="{color:typeLength?'#333':'#999'}" @click="handleOperation('showType')">{{newSealType.length>0?newSealType.join(','):'请选择'}}</view>
|
|
|
</view>
|
|
|
<view class="section white-wrap" v-if="detail.ContractId>0">
|
|
|
- <view class="section-title require">合同附件</view>
|
|
|
+ <view class="section-title require">合同附件<span>(合同来源:系统合同)</span> </view>
|
|
|
<image
|
|
|
- :src="files.img"
|
|
|
+ :src="fileList[0].img"
|
|
|
mode="aspectFill"
|
|
|
style="width: 102rpx;height: 120rpx"
|
|
|
- @click="handlepreViewFile(files)">
|
|
|
+ @click="handlepreViewFile(fileList[0])">
|
|
|
</image>
|
|
|
</view>
|
|
|
<view class="section white-wrap" v-else>
|
|
|
- <view class="section-title require">合同附件</view>
|
|
|
+ <view class="section-title require">合同附件<span>(合同来源:上传附件)</span></view>
|
|
|
<!-- 合规可修改上传 -->
|
|
|
- <div class="check-file-box" :style="'background-image:url('+files.img+')'" v-if="files.url" @click="handlepreViewFile(files)">
|
|
|
- <image class="del-icon" src="../static/del-icon.png" @click.stop="handleDeleteCheckFile" v-if="opButton.CheckEdit"></image>
|
|
|
+ <!-- crm_8.7 支持上传多个附件 -->
|
|
|
+ <div class="check-file-contain">
|
|
|
+ <image @click="handleUpload" src="../static/upload-icon.png" mode="aspectFill"
|
|
|
+ style="width: 102rpx;height: 120rpx;margin: 0 16rpx 24rpx 16rpx;"></image>
|
|
|
+ <div class="check-file-box" :style="'background-image:url('+item.img+')'"
|
|
|
+ @click="handlepreViewFile(item)" v-for="(item,index) in fileList" :key="item.url">
|
|
|
+ <image class="del-icon" src="../static/del-icon.png" @click.stop="handleDeleteCheckFile(item)"></image>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <image v-else @click="handleUpload" src="../static/upload-icon.png" mode="aspectFill" style="width: 102rpx;height: 120rpx;"></image>
|
|
|
+
|
|
|
</view>
|
|
|
<view class="section white-wrap" v-if="detail.Status==='已驳回'">
|
|
|
<view class="section-title">驳回理由</view>
|
|
@@ -251,12 +257,13 @@
|
|
|
processData:null,
|
|
|
detail:{},
|
|
|
opButton:{},
|
|
|
- files:{
|
|
|
- type:'',
|
|
|
- img:'',
|
|
|
- url:''
|
|
|
- },//合同附件
|
|
|
-
|
|
|
+ // files:{
|
|
|
+ // type:'',
|
|
|
+ // img:'',
|
|
|
+ // url:''
|
|
|
+ // },//合同附件
|
|
|
+ // 上传的附件列表 需求更改,可上传多个附件 crm-8.7
|
|
|
+ fileList:[],
|
|
|
showPurpose:false,//显示用印用途选项
|
|
|
purposeArr: ["销售合同", "代付合同", "总对总协议", "渠道合同", "付款通知函", "招投标", "战略合作协议"],
|
|
|
|
|
@@ -434,37 +441,33 @@
|
|
|
},
|
|
|
|
|
|
// 合规删除合同附件
|
|
|
- handleDeleteCheckFile(){
|
|
|
- this.files={
|
|
|
- type:'',
|
|
|
- img:'',
|
|
|
- url:''
|
|
|
- }
|
|
|
+ handleDeleteCheckFile(file){
|
|
|
+ this.fileList = this.fileList.filter(item => item.url!= file.url)
|
|
|
},
|
|
|
|
|
|
//合规上传附件
|
|
|
async handleUpload(){
|
|
|
const res=await uploadFiles({type:'all'})
|
|
|
const reg = /\.(pdf)$/;
|
|
|
- const reg2= /\.doc|\.docx$/
|
|
|
- if(reg.test(res[0])){
|
|
|
- this.files={
|
|
|
- type:'pdf',
|
|
|
- url:res[0],
|
|
|
- img:require('../static/pdf.png')
|
|
|
- }
|
|
|
- }else if(reg2.test(res[0])){
|
|
|
- this.files={
|
|
|
- type:'word',
|
|
|
- url:res[0],
|
|
|
- img:require('../static/word.png')
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.files={
|
|
|
- type:'img',
|
|
|
- url:res[0],
|
|
|
- img:res[0]
|
|
|
- }
|
|
|
+ const reg2 = /\.doc|\.docx$/;
|
|
|
+ if (reg.test(res[0])) {
|
|
|
+ this.fileList.push({
|
|
|
+ type: "pdf",
|
|
|
+ url: res[0],
|
|
|
+ img: require("../static/pdf.png"),
|
|
|
+ });
|
|
|
+ } else if (reg2.test(res[0])) {
|
|
|
+ this.fileList.push({
|
|
|
+ type: "word",
|
|
|
+ url: res[0],
|
|
|
+ img: require("../static/word.png"),
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.fileList.push({
|
|
|
+ type: "img",
|
|
|
+ url: res[0],
|
|
|
+ img: res[0],
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -548,7 +551,7 @@
|
|
|
// const flag3=this.newSealType.join(',')===this.detail.SealType
|
|
|
const flag3=this.isArrEqual(this.newSealType,this.detail.SealType.split(','))
|
|
|
const flag4=this.newRemark===this.detail.Remark
|
|
|
- const flag5=this.files.url===this.detail.FileUrl
|
|
|
+ const flag5= JSON.stringify(this.fileList.map(file => file.url))===JSON.stringify(this.detail.FileUrls)
|
|
|
if(flag1&&flag2&&flag3&&flag4&&flag5){
|
|
|
this.handleApprovalPass()
|
|
|
}else{
|
|
@@ -591,7 +594,7 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if(!this.files.url){
|
|
|
+ if(!this.fileList || this.fileList.length==0){
|
|
|
uni.showToast({
|
|
|
title:'合同附件不能为空',
|
|
|
icon:"none"
|
|
@@ -604,7 +607,7 @@
|
|
|
SealId:Number(this.detail.SealId),
|
|
|
SealType:this.newSealType.join(','),
|
|
|
Use:this.newUse,
|
|
|
- FileUrl:this.files.url
|
|
|
+ FileUrls:this.fileList.map(file => file.url)
|
|
|
})
|
|
|
if(res.code===200){
|
|
|
this.$dialog.alert({
|
|
@@ -748,33 +751,37 @@
|
|
|
this.newRemark=res.data.SealDetail.Remark
|
|
|
this.processData=res.data.FlowNodeList
|
|
|
this.opButton=res.data.OpButton
|
|
|
- this.handleFile(res.data.SealDetail.FileUrl)
|
|
|
+ this.handleFile(res.data.SealDetail.FileUrls)
|
|
|
}
|
|
|
},
|
|
|
|
|
|
//处理文件
|
|
|
- handleFile(filesUrl){
|
|
|
+ handleFile(filesUrls){
|
|
|
+ // 清空 防止操作成功后再获取详情 数组叠加
|
|
|
+ this.fileList=[]
|
|
|
const reg = /\.(pdf)$/;
|
|
|
const reg2= /\.doc|\.docx$/
|
|
|
- if(reg.test(filesUrl)){
|
|
|
- this.files={
|
|
|
- type: "pdf",
|
|
|
- url: filesUrl,
|
|
|
- img: require("../static/pdf.png"),
|
|
|
- }
|
|
|
- }else if(reg2.test(filesUrl)){
|
|
|
- this.files={
|
|
|
- type: "word",
|
|
|
- url: filesUrl,
|
|
|
- img: require("../static/word.png"),
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.files={
|
|
|
- type: "img",
|
|
|
- url: filesUrl,
|
|
|
- img: filesUrl,
|
|
|
+ filesUrls.map(filesUrl=>{
|
|
|
+ if(reg.test(filesUrl)){
|
|
|
+ this.fileList.push({
|
|
|
+ type: "pdf",
|
|
|
+ url: filesUrl,
|
|
|
+ img: require("../static/pdf.png"),
|
|
|
+ })
|
|
|
+ }else if(reg2.test(filesUrl)){
|
|
|
+ this.fileList.push({
|
|
|
+ type: "word",
|
|
|
+ url: filesUrl,
|
|
|
+ img: require("../static/word.png"),
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.fileList.push({
|
|
|
+ type: "img",
|
|
|
+ url: filesUrl,
|
|
|
+ img: filesUrl,
|
|
|
+ })
|
|
|
}
|
|
|
- }
|
|
|
+ })
|
|
|
},
|
|
|
},
|
|
|
}
|
|
@@ -811,18 +818,23 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .check-file-box{
|
|
|
- width: 102rpx;
|
|
|
- height: 120rpx;
|
|
|
- background-size: cover;
|
|
|
- background-position: center;
|
|
|
- position: relative;
|
|
|
- .del-icon{
|
|
|
- position: absolute;
|
|
|
- width: 30rpx;
|
|
|
- height: 30rpx;
|
|
|
- top: -15rpx;
|
|
|
- right: -15rpx;
|
|
|
+ .check-file-contain{
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ .check-file-box{
|
|
|
+ width: 102rpx;
|
|
|
+ height: 120rpx;
|
|
|
+ background-size: cover;
|
|
|
+ background-position: center;
|
|
|
+ position: relative;
|
|
|
+ margin: 0 16rpx;
|
|
|
+ .del-icon{
|
|
|
+ position: absolute;
|
|
|
+ width: 30rpx;
|
|
|
+ height: 30rpx;
|
|
|
+ top: -15rpx;
|
|
|
+ right: -15rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.detail{
|
|
@@ -847,6 +859,14 @@
|
|
|
.section-title{
|
|
|
font-size: 16px;
|
|
|
margin-bottom: 20rpx;
|
|
|
+ span{
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-family: PingFang SC-Regular, PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #999999;
|
|
|
+ -webkit-background-clip: text;
|
|
|
+ background-clip: text;
|
|
|
+ }
|
|
|
}
|
|
|
.require::before{
|
|
|
content: '*';
|