From 76aee3bfa5a1e703fde16408d92b71c4fe2cdeb8 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期一, 08 九月 2025 20:28:22 +0800
Subject: [PATCH] 增加过程卡号显示

---
 src/views/flow/donelist.vue |   39 ++++++++++++++++++++++++++++++++++++---
 1 files changed, 36 insertions(+), 3 deletions(-)

diff --git a/src/views/flow/donelist.vue b/src/views/flow/donelist.vue
index 314eb6e..2cd3bb5 100644
--- a/src/views/flow/donelist.vue
+++ b/src/views/flow/donelist.vue
@@ -11,7 +11,8 @@
             @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" >
             <template #menu="scope">
                 <el-button type="primary" text size="default" @click.stop="handleView(scope.row, scope.index)">鏌ョ湅</el-button>
-                <el-button type="primary" :disabled="scope.row.processIsFinished==='true' || scope.row.flag.toLowerCase().indexOf('program')>-1" v-if="permission.withdraw_button" text size="default" @click.stop="handleWithdraw(scope.row, scope.index)">鎾ゅ洖</el-button>
+                <el-button type="primary" :disabled="scope.row.processIsFinished==='true' || (scope.row.currentTaskKeys.toLowerCase().indexOf('program')==-1 &&  scope.row.currentTaskKeys.toLowerCase().indexOf('useable')==-1)" v-if="permission.takeback_button" text size="default" @click.stop="handleTakeBack(scope.row, scope.index)">鍙栧洖</el-button>
+                <el-button type="primary" :disabled="scope.row.processIsFinished==='true' || scope.row.currentTaskKeys.toLowerCase().indexOf('program')>-1" v-if="permission.withdraw_button" text size="default" @click.stop="handleWithdraw(scope.row, scope.index)">鎾ゅ洖</el-button>
             </template>
             
         </avue-crud>
@@ -115,9 +116,9 @@
                     },
                     {
                         label: '杩囩▼鍗″彿',
-                        prop: 'empty',
+                        prop: '',
                         render: ({ row }) => {
-                            return h('p',{'class': 'margin0'}, row?.variables?.empty || '');
+                            return h('p',{'class': 'margin0'}, row?.variables?.processCard || '');
                         }
                     },
                     {
@@ -344,6 +345,38 @@
             });
             this.dialogVisible = true;
         },
+        handleTakeBack(row){
+            //缁勯暱鍙栧洖
+            this.$confirm('纭瑕佸彇鍥炲悧锛�', '', {
+                    confirmButtonText: this.$t('submitText'),
+                    cancelButtonText: this.$t('cancelText'),
+                    type: 'warning',
+                }).then(() => {
+                    axios({
+                        url: '/blade-mdm/flow/mgr/takeback',
+                        method: 'get',
+                        params: {processInstanceId: row.processInstanceId}
+                    }).then(res => {
+                        if(res.data.code !== 200) {
+                            this.$message.error(res.data.msg);
+                            return;
+                        }
+                        this.$message.success('鎿嶄綔鎴愬姛');
+                        
+                        todoChangeNotify();
+                        
+                        this.refreshChange();
+                    }).catch(err => {
+                        console.error(err);
+                        //done()
+                    });
+                    
+                }).catch(() => {
+                    console.log('>>>>>>')
+                    // this.$message.info('宸插彇娑堟搷浣�');
+                    //done();
+                });
+        },
         handleWithdraw(row) {
             //console.log(row,row.processInstanceId)
             this.$confirm('纭瑕佹挙鍥炲悧锛�', '', {

--
Gitblit v1.9.3