| | |
| | | methods: { |
| | | //ä¸é¢è¿äºæ¹æ³å¯ä»¥ä¿çä¹å¯ä»¥å é¤ |
| | | onInit() { |
| | | let TaskHandCancelBtn = this.buttons.find(x => x.value == 'TaskHandCancel'); |
| | | if (TaskHandCancelBtn) { |
| | | TaskHandCancelBtn.onClick = function () { |
| | | this.$message.success('èªå®ä¹æé®ç¹å»äºä»¶'); |
| | | } |
| | | } |
| | | let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCompleted'); |
| | | let TaskHandCompletedBtn = this.buttons.find(x => x.value == 'TaskHandCancel'); |
| | | if (TaskHandCompletedBtn) { |
| | | TaskHandCompletedBtn.onClick = function () { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | this.$confirm("æ¯å¦ç¡®å®è¦æå¨å®æï¼æå¨å®æå请å é¤WCSç³»ç»ä¸çä»»å¡ï¼", "æç¤º", { |
| | | if (rows.length > 1) return this.$error("åªè½éæ©ä¸æ¡æ°æ®!"); |
| | | this.$confirm("æ¯å¦ç¡®å®è¦æå¨å®æï¼ï¼ï¼", "æç¤º", { |
| | | // iconClass:"el-icon-success",//el-icon-removeèªå®ä¹å¾æ æ ·å¼ |
| | | confirmButtonText: "确认",//确认æé®æåæ´æ¢ |
| | | cancelButtonText: "åæ¶",//åæ¶æé®æåæ´æ¢ |
| | |
| | | }).then(() => { |
| | | var param = rows[0].taskNum; |
| | | this.http |
| | | .get("api/Task/TaskCompleted?taskNum=" + param, "æ°æ®å¤çä¸...") |
| | | .get("api/Task/TaskCompleted?taskNum=" + param+"&HowWorks=1", "æ°æ®å¤çä¸...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('任塿å¨å®ææå.'); |
| | |
| | | if (btnHandOutbound != null) { |
| | | btnHandOutbound.onClick = () => { |
| | | let rows = this.$refs.table.getSelected(); |
| | | if (rows.length == 0) { |
| | | return this.$error("è¯·éæ©æ°æ®!"); |
| | | } else { |
| | | |
| | | |
| | | this.$confirm("æ¯å¦ç¡®å®è¦åæ¶ä»»å¡ï¼åæ¶å请å é¤WCSç³»ç»ä¸çä»»å¡ï¼", "æç¤º", { |
| | | // iconClass:"el-icon-success",//el-icon-removeèªå®ä¹å¾æ æ ·å¼ |
| | | confirmButtonText: "确认",//确认æé®æåæ´æ¢ |
| | | cancelButtonText: "åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | // cancelBtn:"åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | showClose: true,//æ¯å¦æ¾ç¤ºå³ä¸è§å
³éæé® |
| | | type: "warning",//æç¤ºç±»å success:æå/info:ä¿¡æ¯/warning:è¦å/error:æ¥é |
| | | }).then(() => { |
| | | var ids = rows.map(x => { |
| | | return x.taskNum |
| | | }) |
| | | this.http |
| | | .get("api/Task/Cancelinventory?TaskNum=" + ids, "æ°æ®å¤çä¸...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('æå.'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | if (rows.length == 0) return this.$error("è¯·éæ©æ°æ®!"); |
| | | if (rows.length > 1) return this.$error("åªè½éæ©ä¸æ¡æ°æ®!"); |
| | | this.$confirm("æ¯å¦ç¡®å®è¦åæ¶ä»»å¡ï¼ï¼ï¼", "æç¤º", { |
| | | // iconClass:"el-icon-success",//el-icon-removeèªå®ä¹å¾æ æ ·å¼ |
| | | confirmButtonText: "确认",//确认æé®æåæ´æ¢ |
| | | cancelButtonText: "åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | // cancelBtn:"åæ¶",//åæ¶æé®æåæ´æ¢ |
| | | showClose: true,//æ¯å¦æ¾ç¤ºå³ä¸è§å
³éæé® |
| | | type: "warning",//æç¤ºç±»å success:æå/info:ä¿¡æ¯/warning:è¦å/error:æ¥é |
| | | }).then(() => { |
| | | var ids = rows.map(x => { |
| | | return x.taskNum |
| | | }) |
| | | this.http |
| | | .get("api/Task/Cancelinventory?TaskNum=" + ids, "æ°æ®å¤çä¸...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('æå.'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | } |
| | | }, |