From be484c84a25d1f6c769e7b5e958048d745942e55 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期二, 20 五月 2025 10:32:57 +0800 Subject: [PATCH] 优化出入库逻辑 --- 项目代码/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 49 insertions(+), 0 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js" index 8a02afb..a18304d 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WCS/WIDESEAWCS_Client/src/extension/taskinfo/task.js" @@ -17,6 +17,33 @@ methods: { //涓嬮潰杩欎簺鏂规硶鍙互淇濈暀涔熷彲浠ュ垹闄� onInit() { + + let params = { + Extra: null, + Delkeys: null + } + let ManualBtn = this.buttons.find(x => x.value == 'Manual'); + if (ManualBtn) { + ManualBtn.data = [ + { + name: '瀹屾垚', + icon: 'el-icon-check', + onClick: () => { + params.Extra = 1 + this.Manual(params, "瀹屾垚") + } + }, + { + name: '鍙栨秷', + icon: 'el-icon-delete', + onClick: () => { + params.Extra = 2 + this.Manual(params, "鍙栨秷") + } + } + ] + } + // this.$Notice.success({ title: this.detailOptions.cnName + ',鏌ヨ缁撴灉', desc: '杩斿洖鐨勫璞★細' + JSON.stringify(data) }); var previousButton = this.buttons.find((x) => x.value == "Previous"); @@ -43,6 +70,28 @@ } }); }, + Manual(params, Remark) { + let rows = this.$refs.table.getSelected(); + if (rows.length == 0) return this.$error("璇烽�夋嫨浠诲姟!"); + params.DelKeys = rows.map(x => { + return x[this.table.key]; + }); + if (!params.DelKeys || params.DelKeys.Length == 0) return this.$error("鏈幏鍙栧埌浠诲姟淇℃伅!"); + this.$confirm("鏄惁纭瑕�" + Remark + "浠诲姟锛�", "鎻愮ず", { + // iconClass:"el-icon-success",//el-icon-remove鑷畾涔夊浘鏍囨牱寮� + confirmButtonText: "纭",//纭鎸夐挳鏂囧瓧鏇存崲 + cancelButtonText: "鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲 + // cancelBtn:"鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲 + showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽� + type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊 + }).then(() => { + this.http.post("api/Task/ManualTask", params, "姝e湪" + Remark + "浠诲姟....").then(x => { + if (!x.status) return this.$error(x.message); + this.$success(Remark + "浠诲姟鎴愬姛!"); + this.refresh(); + }); + }) + }, onInited() { //妗嗘灦鍒濆鍖栭厤缃悗 //濡傛灉瑕侀厤缃槑缁嗚〃,鍦ㄦ鏂规硶鎿嶄綔 -- Gitblit v1.9.3