From 2d3d006620bb15a2350c516f050058e5f84c7bf8 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期二, 21 五月 2024 17:03:44 +0800 Subject: [PATCH] 添加人工一键下料功能,人工一键切换托盘功能,优化任务等级 --- 代码管理/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js | 243 ++++++++++++++++++++++++++++++++++++------------ 1 files changed, 183 insertions(+), 60 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js" index 0f74fbf..100b577 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WMS_Client/src/extension/widesea_wms/system/dt_stationinfo.js" @@ -38,6 +38,69 @@ // x.icon='el-icon-document' // } // }); + let AddTaskBtn = this.buttons.find(r => r.name == "涓嬫枡浠诲姟"); + if(null!=AddTaskBtn){ + AddTaskBtn.onClick = function (){ + let rows = this.$refs.table.getSelected(); + if (rows.length == 0) return this.$error("璇烽�夋嫨涓嬫枡浣�!"); + let addkeys = rows.map(x => { + return x[this.table.key]; + }); + if (!addkeys || addkeys.Length == 0) return this.$error("鏈幏鍙栧埌涓嬫枡浣�!"); + this.$confirm("鏄惁纭瑕佹坊鍔犱笅鏂欎换鍔★紵","鎻愮ず",{ + // iconClass:"el-icon-success",//el-icon-remove鑷畾涔夊浘鏍囨牱寮� + confirmButtonText:"纭",//纭鎸夐挳鏂囧瓧鏇存崲 + cancelButtonText:"鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲 + // cancelBtn:"鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲 + showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽� + type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊 + }).then(()=>{ + let params = { + MainData: null, + DetailData: null, + DelKeys: addkeys + } + this.http.post("/api/dt_stationinfo/SendAGVTask", params, "姝e湪娣诲姞浠诲姟....").then(x => { + if (!x.status) return this.$error(x.message); + this.$success(x.message); + this.refresh(); + }); + }) + + } + } + + let TrayswitchingBtn = this.buttons.find(r => r.name == "鍒囨崲鎵樼洏"); + if(null!=TrayswitchingBtn){ + TrayswitchingBtn.onClick = function (){ + let rows = this.$refs.table.getSelected(); + if (rows.length == 0) return this.$error("璇烽�夋嫨涓嬫枡浣�!"); + let addkeys = rows.map(x => { + return x[this.table.key]; + }); + if (!addkeys || addkeys.Length == 0) return this.$error("鏈幏鍙栧埌涓嬫枡浣�!"); + this.$confirm("鏄惁纭鍒囨崲鎵樼洏锛�","鎻愮ず",{ + // iconClass:"el-icon-success",//el-icon-remove鑷畾涔夊浘鏍囨牱寮� + confirmButtonText:"纭",//纭鎸夐挳鏂囧瓧鏇存崲 + cancelButtonText:"鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲 + // cancelBtn:"鍙栨秷",//鍙栨秷鎸夐挳鏂囧瓧鏇存崲 + showClose: true,//鏄惁鏄剧ず鍙充笂瑙掑叧闂寜閽� + type: "warning",//鎻愮ず绫诲瀷 success:鎴愬姛/info:淇℃伅/warning:璀﹀憡/error:鎶ラ敊 + }).then(()=>{ + let params = { + MainData: null, + DetailData: null, + DelKeys: addkeys + } + this.http.post("/api/dt_stationinfo/Trayswitching", params, "姝e湪鍒囨崲....").then(x => { + if (!x.status) return this.$error(x.message); + this.$success(x.message); + this.refresh(); + }); + }) + + } + } //绀轰緥锛氳缃慨鏀规柊寤恒�佺紪杈戝脊鍑烘瀛楁鏍囩鐨勯暱搴� // this.boxOptions.labelWidth = 150; @@ -47,69 +110,129 @@ row.sort=true; } }) - this.buttons.splice(1, 0, { - name: "鍙栨秷绂佺敤", - icon: 'md-refresh', - type: 'primary', - onClick: function () { - let rows = this.$refs.table.getSelected(); - if (rows.length == 0) return this.$error("璇烽�夋嫨瑕佸彇娑堢鐢ㄧ殑鏁版嵁"); - this.$confirm('纭瑕佸彇娑堢鐢ㄥ悧?', '璀﹀憡', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning', - center: true - }).then(() => { - let data = []; - let parm = { - "data": data, - "type": "1" - } - rows.forEach(t => data.push(t.id)) - this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "鍙栨秷绂佺敤涓�...").then(x => { - if (x.status) { - this.$Message.success("鍙栨秷绂佺敤鎴愬姛!"); - this.refresh(); - } else { - this.$Message.error(x.message); - } - }) - }); - } - }) + let EnableBtn = this.buttons.find(r => r.name == "鍙栨秷绂佺敤"); + if(null!=EnableBtn){ + EnableBtn.onClick = function (){ + let rows = this.$refs.table.getSelected(); + if (rows.length == 0) return this.$error("璇烽�夋嫨瑕佸彇娑堢鐢ㄧ殑鏁版嵁"); - this.buttons.splice(1, 0, { - name: "绂佺敤", - icon: 'md-refresh', - type: 'danger', - onClick: function () { - let rows = this.$refs.table.getSelected(); - if (rows.length == 0) return this.$error("璇烽�夋嫨瑕佺鐢ㄧ殑鏁版嵁"); + this.$confirm('纭瑕佸彇娑堢鐢ㄥ悧?', '璀﹀憡', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning', + center: true + }).then(() => { + let data = []; + let parm = { + "data": data, + "type": "1" + } + rows.forEach(t => data.push(t.id)) + this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "鍙栨秷绂佺敤涓�...").then(x => { + if (x.status) { + this.$Message.success("鍙栨秷绂佺敤鎴愬姛!"); + this.refresh(); + } else { + this.$Message.error(x.message); + } + }) + }); + } + } - this.$confirm('纭瑕佺鐢ㄥ悧?', '璀﹀憡', { - confirmButtonText: '纭畾', - cancelButtonText: '鍙栨秷', - type: 'warning', - center: true - }).then(() => { - let data = []; - let parm = { - "data": data, - "type": "0" - } - rows.forEach(t => data.push(t.id)) - this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "閿佸畾涓�...").then(x => { - if (x.status) { - this.$Message.success("绂佺敤鎴愬姛锛�"); - this.refresh(); - } else { - this.$Message.error(x.message); - } - }) - }); - } - }) + // this.buttons.splice(1, 0, { + // name: "鍙栨秷绂佺敤", + // icon: 'md-refresh', + // type: 'primary', + // onClick: function () { + // let rows = this.$refs.table.getSelected(); + // if (rows.length == 0) return this.$error("璇烽�夋嫨瑕佸彇娑堢鐢ㄧ殑鏁版嵁"); + + // this.$confirm('纭瑕佸彇娑堢鐢ㄥ悧?', '璀﹀憡', { + // confirmButtonText: '纭畾', + // cancelButtonText: '鍙栨秷', + // type: 'warning', + // center: true + // }).then(() => { + // let data = []; + // let parm = { + // "data": data, + // "type": "1" + // } + // rows.forEach(t => data.push(t.id)) + // this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "鍙栨秷绂佺敤涓�...").then(x => { + // if (x.status) { + // this.$Message.success("鍙栨秷绂佺敤鎴愬姛!"); + // this.refresh(); + // } else { + // this.$Message.error(x.message); + // } + // }) + // }); + // } + // }) + let DisEnableBtn = this.buttons.find(r => r.name == "绂佺敤"); + if(null!=DisEnableBtn){ + DisEnableBtn.onClick = function (){ + let rows = this.$refs.table.getSelected(); + if (rows.length == 0) return this.$error("璇烽�夋嫨瑕佺鐢ㄧ殑鏁版嵁"); + + this.$confirm('纭瑕佺鐢ㄥ悧?', '璀﹀憡', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning', + center: true + }).then(() => { + let data = []; + let parm = { + "data": data, + "type": "0" + } + rows.forEach(t => data.push(t.id)) + this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "閿佸畾涓�...").then(x => { + if (x.status) { + this.$Message.success("绂佺敤鎴愬姛锛�"); + this.refresh(); + } else { + this.$Message.error(x.message); + } + }) + }); + } + } + + // this.buttons.splice(1, 0, { + // name: "绂佺敤", + // icon: 'md-refresh', + // type: 'danger', + // onClick: function () { + // let rows = this.$refs.table.getSelected(); + // if (rows.length == 0) return this.$error("璇烽�夋嫨瑕佺鐢ㄧ殑鏁版嵁"); + + // this.$confirm('纭瑕佺鐢ㄥ悧?', '璀﹀憡', { + // confirmButtonText: '纭畾', + // cancelButtonText: '鍙栨秷', + // type: 'warning', + // center: true + // }).then(() => { + // let data = []; + // let parm = { + // "data": data, + // "type": "0" + // } + // rows.forEach(t => data.push(t.id)) + // this.http.post("/api/dt_stationinfo/SetStationEnable", parm, "閿佸畾涓�...").then(x => { + // if (x.status) { + // this.$Message.success("绂佺敤鎴愬姛锛�"); + // this.refresh(); + // } else { + // this.$Message.error(x.message); + // } + // }) + // }); + // } + // }) // this.buttons.splice(1, 0, { // name: "绉诲簱", // icon: 'el-icon-document', -- Gitblit v1.9.3