| | |
| | | }); |
| | | }, |
| | | outbound() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | |
| | | const keys = this.selection.map((item) => item.id); |
| | | const requestParams = { |
| | | detailIds: keys, |
| | | outboundQuantity: 1, |
| | | operator: "", |
| | | orderNo: this.row.orderNo, |
| | | isBatch: this.isBatch, |
| | | }; |
| | | console.log(requestParams); |
| | | this.$refs.DirectOutbound.open(requestParams); |
| | | }, |
| | | outboundbatch() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | const keys = this.selection.map((item) => item.id); |
| | | const requestParams = { |
| | | detailIds: keys, |
| | | outboundQuantity: 1, |
| | | operator: "", |
| | | orderNo: this.row.orderNo, |
| | | isBatch: this.isBatch, |
| | | }; |
| | | console.log(requestParams); |
| | | this.$refs.DirectOutbound.open(requestParams); |
| | | }, |
| | | |
| | | outboundbatch() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | |
| | | const keys = this.selection.map((item) => item.id); |
| | | const requestParams = { |
| | | detailIds: keys, |
| | | outboundQuantity: |
| | | this.selection[0].orderQuantity - this.selection[0].lockQuantity, |
| | | operator: "", |
| | | orderNo: this.row.orderNo, |
| | | isBatch: this.isBatch, |
| | | }; |
| | | console.log(requestParams); |
| | | this.$refs.DirectOutbound.open(requestParams); |
| | | }, |
| | | const keys = this.selection.map((item) => item.id); |
| | | |
| | | // è®¡ç®ææé䏿ç»çå¯åºåºæ°éæ»å |
| | | let totalOutboundQuantity = 0; |
| | | this.selection.forEach(item => { |
| | | // ç±»å转æ¢+容éï¼é¿å
éæ°åå¼å¯¼è´è®¡ç®é误 |
| | | const orderQty = Number(item.orderQuantity) || 0; |
| | | const lockQty = Number(item.lockQuantity) || 0; |
| | | totalOutboundQuantity += (orderQty - lockQty); |
| | | }); |
| | | |
| | | const requestParams = { |
| | | detailIds: keys, |
| | | outboundQuantity: totalOutboundQuantity, |
| | | operator: "", |
| | | orderNo: this.row.orderNo, |
| | | isBatch: this.isBatch, |
| | | }; |
| | | console.log("åæ¹åºåºåæ°ï¼", requestParams); |
| | | this.$refs.DirectOutbound.open(requestParams); |
| | | }, |
| | | setCurrent(row) { |
| | | this.$refs.singleTable.setCurrentRow(row); |
| | | }, |