From 0867327d337ea6e30d1363a776e276d7a32e1db8 Mon Sep 17 00:00:00 2001
From: gaoshp <291585735@qq.com>
Date: 星期日, 20 七月 2025 20:49:43 +0800
Subject: [PATCH] 流程查询

---
 src/views/tasks/dncreturnfiles.vue |   42 ++++++++++++++++++++++++++----------------
 1 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/src/views/tasks/dncreturnfiles.vue b/src/views/tasks/dncreturnfiles.vue
index f70e9dd..183d3ea 100644
--- a/src/views/tasks/dncreturnfiles.vue
+++ b/src/views/tasks/dncreturnfiles.vue
@@ -1,25 +1,24 @@
 <!--
  * @Date: 2025-06-18 09:17:09
  * @LastEditors: gaoshp
- * @LastEditTime: 2025-07-20 12:34:42
+ * @LastEditTime: 2025-07-20 20:29:18
  * @FilePath: /mdmweb/src/views/tasks/dncreturnfiles.vue
 -->
 <template>
     <basic-container>
         <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud"
             @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
-            @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @selection-change="selectionChange">
+            @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"
+            @selection-change="selectionChange">
             <template #menu-left>
                 <el-button type="primary" plain @click="exportWebSite">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button>
                 <el-button type="primary" plain @click="reassign">鎸傝浇杞﹀簥绋嬪簭搴�</el-button>
                 <el-button type="primary" plain @click="exportExcel">瀵煎嚭鍒癊XCEL</el-button>
             </template>
             <template #menu="scope">
-                <el-button type="primary" text size="default"
-                    @click.stop="handleAction(scope.row, scope.index, 1)">鎺ュ彈
+                <el-button type="primary" text size="default" @click.stop="handleAction(scope.row, scope.index, 1)">鎺ュ彈
                 </el-button>
-                <el-button type="danger" text size="default"
-                    @click.stop="handleAction(scope.row, scope.index, 0)">鎷掔粷
+                <el-button type="danger" text size="default" @click.stop="handleAction(scope.row, scope.index, 0)">鎷掔粷
                 </el-button>
             </template>
         </avue-crud>
@@ -94,7 +93,7 @@
                         label: '鏂囦欢鍥哄寲鐘舵��',
                         prop: 'isCured',
                         formatter: (val, value, label) => {
-                            return `${val==0?'鏈浐鍖�':"宸插浐鍖�"}`;
+                            return `${val == 0 ? '鏈浐鍖�' : "宸插浐鍖�"}`;
                         },
                     },
                     {
@@ -110,26 +109,37 @@
         }
     },
     methods: {
-        handleAction (row, index, flag) {
+        handleAction(row, index, flag) {
             // 澶勭悊鎺ュ彈鎴栨嫆缁濇搷浣�
             let ids = [row.id].toString();
-            if(flag) {
+            if (flag) {
                 accept({ ids }).then(() => {
                     this.$message.success(`鎿嶄綔鎴愬姛: ${row.name}`);
+                    this.$refs.crud.toggleSelection();
+                    this.onLoad(this.page);
                 }).catch(() => {
                     this.$message.error(`鎿嶄綔澶辫触: ${row.name}`);
                     this.$refs.crud.refreshChange();
                 });
             } else {
-                reject({ ids }).then(() => {
-                    this.$message.success(`鎿嶄綔鎴愬姛: ${row.name}`);
-                }).catch(() => {
-                    this.$message.error(`鎿嶄綔澶辫触: ${row.name}`);
-                    this.$refs.crud.refreshChange();
-                });
+                this.$confirm('纭畾鎷掔粷?', {
+                    confirmButtonText: '纭畾',
+                    cancelButtonText: '鍙栨秷',
+                    type: 'warning',
+                })
+                    .then(() => {
+                        reject({ ids }).then(() => {
+                            this.$message.success(`鎿嶄綔鎴愬姛: ${row.name}`);
+                        }).catch(() => {
+                            this.$message.error(`鎿嶄綔澶辫触: ${row.name}`);
+                            this.$refs.crud.toggleSelection();
+                            this.onLoad(this.page);
+                        });
+                    })
+
             }
         },
-        selectionChange (list) {
+        selectionChange(list) {
             this.selectedList = list;
         },
         exportWebSite() {

--
Gitblit v1.9.3