|
@@ -54,6 +54,18 @@
|
|
|
<view class="section-title">备注</view>
|
|
|
<textarea type="text" auto-height v-model="oldRemark" placeholder="请填写备注" :disabled="!opButton.CheckEdit"></textarea>
|
|
|
</view>
|
|
|
+ <!-- 签回附件模块 -->
|
|
|
+ <view class="section white-wrap" v-if="checkBackFilesRes.length>0">
|
|
|
+ <view class="section-title">签回附件</view>
|
|
|
+ <image
|
|
|
+ v-for="item in checkBackFilesRes"
|
|
|
+ :key="item.url"
|
|
|
+ :src="item.img"
|
|
|
+ mode="aspectFill"
|
|
|
+ style="width: 102rpx;height: 120rpx"
|
|
|
+ @click="handlepreViewFile(item)">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
<!-- 流程模块 -->
|
|
|
<view class="section white-wrap process-wrap">
|
|
|
<view class="title" style="font-size: 16px;font-weight: bold;">审批流程</view>
|
|
@@ -62,16 +74,19 @@
|
|
|
|
|
|
<!-- 审批/撤回申请 -->
|
|
|
<view class="fix-bottom-wrap" style="text-align: center;" v-if="opButton.Approval||opButton.Cancel">
|
|
|
- <div class="flex" style="justify-content: space-between;width:100%">
|
|
|
+ <view class="flex" style="justify-content: space-between;width:100%">
|
|
|
<van-button type="info" color="#3385FF" style="flex:1;" custom-class="btn-small" round @click="handleClickPass" v-if="opButton.Approval">通过</van-button>
|
|
|
<van-button type="info" color="#F55768" style="flex:1;" custom-class="btn-small" round @click="handleApprovalReject" v-if="opButton.Approval">驳回</van-button>
|
|
|
<van-button type="info" color="#F55768" style="flex:1;" :custom-class="opButton.Approval?'btn-small':'btn-big'" round @click="handleCancelApply" v-if="opButton.Cancel">撤回申请</van-button>
|
|
|
- </div>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<!-- 作废 -->
|
|
|
- <view class="fix-bottom-wrap" style="text-align: center;" v-if="opButton.Invalid">
|
|
|
- <view v-if="detail.ContractId>0" style="margin-bottom: 10rpx;" @click="checked=!checked"><radio value="同时作废合同" :checked="checked" color="#3385FF" style="transform:scale(0.8)"/>是否同时作废合同?</view>
|
|
|
- <van-button type="info" color="#F55768" custom-class="btn-big" round @click="handleSealInvalid">用印作废</van-button>
|
|
|
+ <view class="fix-bottom-wrap flex" style="text-align: center;align-items:flex-end" v-if="opButton.Invalid||opButton.UploadFile">
|
|
|
+ <view style="flex:1" v-if="opButton.Invalid">
|
|
|
+ <view v-if="detail.ContractId>0" style="margin-bottom: 10rpx;" @click="checked=!checked"><radio value="同时作废合同" :checked="checked" color="#3385FF" style="transform:scale(0.8)"/>是否同时作废合同?</view>
|
|
|
+ <van-button type="info" color="#F55768" :custom-class="opButton.UploadFile?'btn-small':'btn-big'" round @click="handleSealInvalid">用印作废</van-button>
|
|
|
+ </view>
|
|
|
+ <van-button v-if="opButton.UploadFile" style="flex:1" type="info" color="#3385FF" :custom-class="opButton.Invalid?'btn-small':'btn-big'" round @click="handleUploadCheckFile">{{checkBackFilesRes.length>0?'更新回签附件':'上传回签附件'}}</van-button>
|
|
|
</view>
|
|
|
<!-- 重新提交 -->
|
|
|
<view class="fix-bottom-wrap" style="text-align: center;" v-if="opButton.Edit">
|
|
@@ -133,6 +148,20 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</van-popup>
|
|
|
+
|
|
|
+ <!-- 上传回签附件弹窗确认弹窗 -->
|
|
|
+ <van-popup :show="showConfirmCheckBackfile" @close="showConfirmCheckBackfile=false" position="bottom" round>
|
|
|
+ <view class="uploadfile-wrap">
|
|
|
+ <view style="text-align: center;font-size: 16px;font-weight: bold;">上传回签附件</view>
|
|
|
+ <view class="contract-list" style="height: 30vh;">
|
|
|
+ <view class="contract-item" v-for="item in checkBackFiles" :key="item.url"
|
|
|
+ @click="handlepreViewFile(item)">
|
|
|
+ <image class="contract-img" mode="aspectFill" :src="item.img"></image>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <button style="width: 450rpx;" @click='handleConfirmCheckBackFile'>确定</button>
|
|
|
+ </view>
|
|
|
+ </van-popup>
|
|
|
|
|
|
<van-dialog id="van-dialog" />
|
|
|
</view>
|
|
@@ -147,7 +176,8 @@
|
|
|
apiInvalidSeal,
|
|
|
apiApprovalPassModify,
|
|
|
apiSealCancelApply,
|
|
|
- apiFlowDetail
|
|
|
+ apiFlowDetail,
|
|
|
+ apiSealCheckBackFiles
|
|
|
} from '@/api/approve/seal.js'
|
|
|
import steps from '../components/steps.vue'
|
|
|
import {preViewFile} from '../utils/util.js'
|
|
@@ -169,10 +199,32 @@
|
|
|
}else if(this.detail.Status==='已作废'){
|
|
|
return require('../static/cancel-icon.png')
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
+ //页面显示的回签附件
|
|
|
+ checkBackFilesRes(){
|
|
|
+ const reg = /\.(pdf)$/;
|
|
|
+ return this.detail&&this.detail.CheckBackFileUrl&&this.detail.CheckBackFileUrl.split("#").map((item) => {
|
|
|
+ if (reg.test(item)) {
|
|
|
+ return {
|
|
|
+ type: "pdf",
|
|
|
+ url: item,
|
|
|
+ img: require("@/pages-approve/static/pdf.png"),
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ type: "word",
|
|
|
+ url: item,
|
|
|
+ img: require("@/pages-approve/static/word.png"),
|
|
|
+ };
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ checkBackFiles:[],// 上传的签回附件文件
|
|
|
+ showConfirmCheckBackfile:false,//确认上传的签回附件弹窗
|
|
|
+
|
|
|
val:'',
|
|
|
ContractApprovalId:0,
|
|
|
ContractApprovalRecordId:0,
|
|
@@ -224,6 +276,57 @@
|
|
|
},1000)
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 上传(更新)签回附件
|
|
|
+ async handleUploadCheckFile(){
|
|
|
+ const res=await uploadFiles({type:'file'})
|
|
|
+ const reg = /\.(pdf)$/;
|
|
|
+ const reg2= /\.doc|\.docx$/
|
|
|
+ if(reg.test(res[0])){
|
|
|
+ this.checkBackFiles=[{
|
|
|
+ type:'pdf',
|
|
|
+ url:res[0],
|
|
|
+ img:require('../static/pdf.png')
|
|
|
+ }]
|
|
|
+ this.showConfirmCheckBackfile=true
|
|
|
+ }else if(reg2.test(res[0])){
|
|
|
+ this.checkBackFiles=[{
|
|
|
+ type:'word',
|
|
|
+ url:res[0],
|
|
|
+ img:require('../static/word.png')
|
|
|
+ }]
|
|
|
+ this.showConfirmCheckBackfile=true
|
|
|
+ }else{
|
|
|
+ uni.showToast({
|
|
|
+ title:'请上传pdf/word格式文件',
|
|
|
+ icon:"none"
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ //确认上传的签回附件
|
|
|
+ async handleConfirmCheckBackFile(){
|
|
|
+ let FileUrlarr=this.checkBackFiles.map(item=>item.url)
|
|
|
+ const res=await apiSealCheckBackFiles({
|
|
|
+ SealId:Number(this.detail.SealId),
|
|
|
+ FileUrl:FileUrlarr.join('#')
|
|
|
+ })
|
|
|
+ if(res.code===200){
|
|
|
+ uni.showToast({
|
|
|
+ title:'操作成功',
|
|
|
+ icon:'none'
|
|
|
+ })
|
|
|
+ // 如果是已审批上传回签附件则更新列表页
|
|
|
+ if(this.detail.Status==='已审批'){
|
|
|
+ this.handleUpdateList()
|
|
|
+ }
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.checkBackFiles=[]
|
|
|
+ this.showConfirmCheckBackfile=false
|
|
|
+ this.getDetail()
|
|
|
+ },500)
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
// 更新列表页
|
|
|
handleUpdateList(){
|
|
|
uni.$emit('sealApproveListUpdate',{
|
|
@@ -567,6 +670,36 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
+ .uploadfile-wrap{
|
|
|
+ width: 100%;
|
|
|
+ height: 50vh;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ padding: 32rpx;
|
|
|
+ button {
|
|
|
+ margin-left: auto;
|
|
|
+ margin-right: auto;
|
|
|
+ width: 260rpx;
|
|
|
+ height: 70rpx;
|
|
|
+ display: block;
|
|
|
+ border-radius: 28px;
|
|
|
+ border: none;
|
|
|
+ font-size: 15px;
|
|
|
+ color: #fff;
|
|
|
+ line-height: 70rpx;
|
|
|
+ background-color: #5890fb;
|
|
|
+ }
|
|
|
+ .contract-list {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+
|
|
|
+ .contract-img {
|
|
|
+ width: 102rpx;
|
|
|
+ height: 120rpx;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ margin-bottom: 20rpx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
.check-file-box{
|
|
|
width: 102rpx;
|
|
|
height: 120rpx;
|