From 84076d95a74a44876e4ce29a3df52479f18a0c47 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 09 三月 2026 16:18:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_New' into dev_New

---
 src/views/salesManagement/returnOrder/index.vue |   28 ++++++++++++++++++++++------
 1 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/src/views/salesManagement/returnOrder/index.vue b/src/views/salesManagement/returnOrder/index.vue
index c4f23a1..a83dd24 100644
--- a/src/views/salesManagement/returnOrder/index.vue
+++ b/src/views/salesManagement/returnOrder/index.vue
@@ -80,7 +80,7 @@
 import { reactive, ref, toRefs, computed, getCurrentInstance, nextTick, onMounted } from "vue";
 import { ElMessageBox } from "element-plus";
 import FormDia from "./components/formDia.vue";
-import { returnManagementList, returnManagementDel } from "@/api/salesManagement/returnOrder.js";
+import { returnManagementList, returnManagementDel, returnManagementHandle } from "@/api/salesManagement/returnOrder.js";
 const { proxy } = getCurrentInstance();
 
 const formDia = ref();
@@ -95,12 +95,26 @@
     cancelButtonText: "鍙栨秷",
     type: "warning",
   }).then(() => {
-    returnManagementDel({ ids: String(row.id) }).then(() => {
+    returnManagementDel([row.id]).then(() => {
       proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
       getList();
     });
   });
 };
+
+const handleRowHandle = (row) => {
+  if (!row?.id) return;
+  ElMessageBox.confirm("鏄惁澶勭悊璇ラ��璐у崟锛熷鐞嗗悗灏嗘棤娉曚慨鏀�", "澶勭悊鎻愮ず", {
+    confirmButtonText: "纭",
+    cancelButtonText: "鍙栨秷",
+    type: "warning",
+  }).then(() => {
+    returnManagementHandle({ returnManagementId: String(row.id) }).then(() => {
+      proxy.$modal.msgSuccess("澶勭悊鎴愬姛");
+      getList();
+    });
+  });
+}
 
 const data = reactive({
   searchForm: {
@@ -141,10 +155,11 @@
     dataType: "action",
     align: "center",
     fixed: "right",
-    width: 140,
+    width: 160,
     operation: [
-      { name: "缂栬緫", type: "text", clickFun: (row) => openForm("edit", row) },
-      { name: "鍒犻櫎", type: "text", clickFun: (row) => handleRowDelete(row) },
+      { name: "缂栬緫", disabled: (row) => row.status !== 0, type: "text", clickFun: (row) => openForm("edit", row) },
+      { name: "澶勭悊", disabled: (row) => row.status !== 0, type: "text", clickFun: (row) => handleRowHandle(row) },
+      { name: "鍒犻櫎", disabled: (row) => row.status !== 0, type: "text", clickFun: (row) => handleRowDelete(row) },
     ],
   },
 ];
@@ -237,12 +252,13 @@
     return;
   }
   ids = selectedRows.value.map(i => i.id);
+  console.log(ids);
   ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "鍒犻櫎鎻愮ず", {
     confirmButtonText: "纭",
     cancelButtonText: "鍙栨秷",
     type: "warning",
   }).then(() => {
-    returnManagementDel({ ids: ids.join(",") }).then(() => {
+    returnManagementDel( ids ).then(() => {
       proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
       getList();
     });

--
Gitblit v1.9.3