zxz 2 years ago
parent
commit
de7a3e3848

+ 26 - 4
src/views/contractManagement/collectionContract.vue

@@ -119,7 +119,7 @@
             " alt="" />
           <div v-if="
               (scope.row.approveStatus != '待决策人审核' &&
-                !scope.row.approveStatus)
+                !scope.row.approveStatus || scope.row.approveStatus == '发起人撤回')
             " style="display: inline-block">
             <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px"
               src="../../../public/img/bianji.png" @click="handleEdit(scope.row)" v-hasPermission="
@@ -144,6 +144,10 @@
             v-hasPermission="
                 `contractManagement.dsContract.dsContractInfo.list`
               " @click="handleRecord(scope.row)" alt="" />
+              <div v-if="scope.row.approveStatus && scope.row.approveStatus!='发起人撤回'" style="display: inline-block">
+                <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px" src="../../../public/img/chehui.png"
+                  @click="withdraw(scope.row)" v-hasPermission="`contractManagement.dsContract.dsContractInfo.edit`" alt="" />
+              </div>
         </template>
       </el-table-column>
     </el-table>
@@ -166,7 +170,8 @@
     billoperatehis,
     deletecontract,
     editInfo,
-    getstafffind
+    getstafffind,
+    sponsorWithdraw
   } from '@/model/contarct/index'
   import {
     downloadFile
@@ -214,7 +219,7 @@
         searchType: 1,
         searchTypeText: '未完成',
         searchKeyWord: '',
-        contractType: 3,
+        contractType: 1,
         goodsType: 1,
         startDate: null,
         endDate: null,
@@ -301,7 +306,7 @@
         },
         value1: '',
         value2: '',
-        createPersion: "",//创建人
+        createPersion: '',//创建人
         persionList: [],
       }
     },
@@ -314,6 +319,22 @@
       this.persionXiaLa()
     },
     methods: {
+      withdraw(row) {
+      this.$confirm(`撤回成功后,可再次提交,确定撤回该合同吗?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      }).then(() => {
+        sponsorWithdraw({
+          workflowId: row.workflowId,
+          businessKey: row.id,
+        }).toPromise()
+          .then((response) => {
+            this.$message.success('撤回成功')
+            this.getList()
+          })
+      })
+    },
       persionXiaLa() {
       getstafffind({
         roles: 'b96299bb5dcf461e916b72b64c6943b0'
@@ -386,6 +407,7 @@
             goodsType: this.goodsType,
             currentPage: this.currentPage,
             pageSize: this.pageSize,
+            agreementType: '代收合同',
             searchType: this.searchType,
             searchKeyWord: this.searchKeyWord,
             startDate: this.startDate,

+ 26 - 3
src/views/contractManagement/storageContract.vue

@@ -120,7 +120,7 @@
             " alt="" />
           <div v-if="
               (scope.row.approveStatus != '待决策人审核' &&
-                !scope.row.approveStatus)
+                !scope.row.approveStatus || scope.row.approveStatus == '发起人撤回')
             " style="display: inline-block">
             <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px"
               src="../../../public/img/bianji.png" @click="handleEdit(scope.row)" v-hasPermission="
@@ -145,6 +145,12 @@
             v-hasPermission="
                 `contractManagement.dcContract.dcContractInfo.list`
               " @click="handleRecord(scope.row)" alt="" />
+              <div v-if="scope.row.approveStatus && scope.row.approveStatus!='发起人撤回'" style="display: inline-block">
+              <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px" src="../../../public/img/chehui.png"
+                @click="withdraw(scope.row)" v-hasPermission="
+                            `contractManagement.dcContract.dcContractInfo.edit`
+                          " alt="" />
+            </div>
         </template>
       </el-table-column>
     </el-table>
@@ -167,7 +173,8 @@
     billoperatehis,
     deletecontract,
     editInfo,
-    getstafffind
+    getstafffind,
+    sponsorWithdraw
   } from '@/model/contarct/index'
   import {
     downloadFile
@@ -285,7 +292,7 @@
           ],
         },
         value2: '',
-        createPersion: "",//创建人
+        createPersion: '',//创建人
       persionList: [],
       }
     },
@@ -298,6 +305,22 @@
       this.persionXiaLa()
     },
     methods: {
+      withdraw(row) {
+      this.$confirm(`撤回成功后,可再次提交,确定撤回该合同吗?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      }).then(() => {
+        sponsorWithdraw({
+          workflowId: row.workflowId,
+          businessKey: row.id,
+        }).toPromise()
+          .then((response) => {
+            this.$message.success('撤回成功')
+            this.getList()
+          })
+      })
+    },
       persionXiaLa() {
       getstafffind({
         roles: 'b96299bb5dcf461e916b72b64c6943b0'