From 5bdb2202cfeccf25f947689f07c80431000ad615 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期日, 07 九月 2025 19:04:27 +0800
Subject: [PATCH] 增加新编程序统计;固化程序统计

---
 src/views/flow/donelist.vue |   35 ++++++++++++++++++++++++++++++++++-
 1 files changed, 34 insertions(+), 1 deletions(-)

diff --git a/src/views/flow/donelist.vue b/src/views/flow/donelist.vue
index 314eb6e..ef9df3b 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>
@@ -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