From 9d75314e88f8aac494d57715e3231fe3540cb867 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期二, 23 九月 2025 03:03:03 +0800 Subject: [PATCH] 优化更新 --- 代码管理/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js | 56 +++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 39 insertions(+), 17 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js" index 4e7fe7d..12f6346 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSClient/src/extension/taskinfo/task.js" @@ -1,10 +1,10 @@ //姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜 - +import gridHeader from './extend/relocationTask.vue' let extension = { components: { //鏌ヨ鐣岄潰鎵╁睍缁勪欢 - gridHeader: '', + gridHeader: gridHeader, gridBody: '', gridFooter: '', //鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢 @@ -20,12 +20,19 @@ let TaskHandCancelBtn = this.buttons.find(x => x.value == 'TaskHandCancel'); if (TaskHandCancelBtn) { TaskHandCancelBtn.onClick = function () { + this.$confirm("鏄惁纭鍙栨秷浠诲姟","鎵嬪姩浠诲姟鍙栨秷璀﹀憡",{ + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + center: true, + }).then(() => { let rows = this.$refs.table.getSelected(); if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!"); if (rows.length > 1) return this.$error("璇烽�夋嫨涓�鏉℃暟鎹�!"); var param = rows[0].taskNum; + var warehouseId = rows[0].warehouseId; this.http - .post("api/Task/TaskCancel?taskNum="+param, "鏁版嵁澶勭悊涓�...") + .post("api/Task/TaskHandCancel?taskNum="+param+"&&warehouseId="+warehouseId, "鏁版嵁澶勭悊涓�...") .then((x) => { if (x.status) { this.$Message.success('浠诲姟鍙栨秷鎴愬姛.'); @@ -34,25 +41,40 @@ return this.$error(x.message); } }); + }); + } } let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCompleted'); if (TaskHandCompletedBtn) { TaskHandCompletedBtn.onClick = function () { - let rows = this.$refs.table.getSelected(); - if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!"); - if (rows.length > 1) return this.$error("璇烽�夋嫨涓�鏉℃暟鎹�!"); - var param = rows[0].taskNum; - this.http - .post("api/Task/TaskCompleted?taskNum="+param, "鏁版嵁澶勭悊涓�...") - .then((x) => { - if (x.status) { - this.$Message.success('浠诲姟鎵嬪姩瀹屾垚'); - this.refresh(); - } else { - return this.$error(x.message); - } - }); + this.$confirm("鏄惁纭瀹屾垚浠诲姟","鎵嬪姩浠诲姟瀹屾垚璀﹀憡",{ + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + center: true, + }).then(() => { + let rows = this.$refs.table.getSelected(); + if (rows.length == 0) return this.$error("璇烽�夋嫨鏁版嵁!"); + if (rows.length > 1) return this.$error("璇烽�夋嫨涓�鏉℃暟鎹�!"); + var param = rows[0].taskNum; + this.http + .post("api/Task/TaskCompleted?taskNum="+param, "鏁版嵁澶勭悊涓�...") + .then((x) => { + if (x.status) { + this.$Message.success('浠诲姟鎵嬪姩瀹屾垚'); + this.refresh(); + } else { + return this.$error(x.message); + } + }); + }); + } + } + let relocationBtn = this.buttons.find(x => x.value == 'Relocation'); + if (relocationBtn) { + relocationBtn.onClick = function () { + this.$refs.gridHeader.open(); } } }, -- Gitblit v1.9.3