| | |
| | | ], |
| | | url: { |
| | | list: "/tms/outboundOrder/list", |
| | | outbound: "/tms/outboundOrder/outBound", |
| | | outbound: "/tms/outboundOrder/outBoundByApply", |
| | | delete: "/tms/outboundOrder/delete", |
| | | submit: "/tms/outboundOrder/submit", |
| | | deleteBatch: "/tms/outboundOrder/deleteBatch", |
| | |
| | | this.$message.warning("请选择明细后再出库!") |
| | | return |
| | | } |
| | | // 先验证所有选中项 |
| | | const validationErrors = []; |
| | | for (let i = 0; i < this.selectionRows.length; i++) { |
| | | const item = this.selectionRows[i]; |
| | | // 检查必填字段 |
| | | if (item.accuracyClass === '1') { // 只有在不禁用状态下才需要校验必填 |
| | | if (this.$refs.outboundDetailSelectList.isFieldEmpty(item.ratedLife)) { |
| | | validationErrors.push(`明细第${i+1}行:额定寿命为必填项`); |
| | | } |
| | | if (this.$refs.outboundDetailSelectList.isFieldEmpty(item.useLife)) { |
| | | validationErrors.push(`明细第${i+1}行:使用寿命为必填项`); |
| | | } |
| | | } |
| | | } |
| | | if (validationErrors.length > 0) { |
| | | this.$message.error(validationErrors.join(';')); |
| | | return; |
| | | } |
| | | const params = this.selectionRows.map((item) => { |
| | | return { |
| | | outBoundOrderId: this.selectedMainId, |
| | | outboundDetailId: item.id, |
| | | outboundQuantity: item.outboundQuantity |
| | | outboundQuantity: item.outboundQuantity, |
| | | ratedLife:item.ratedLife, |
| | | useLife:item.useLife |
| | | } |
| | | }) |
| | | postAction(this.url.outbound, params).then(res=>{ |
| | |
| | | } |
| | | this.onClearSelected() |
| | | this.queryParam.orderStatus = '3' |
| | | this.queryParam.outStatus = '1' |
| | | this.queryParam.outStatus = ['1','2'].join(',') |
| | | var params = this.getQueryParams();//查询条件 |
| | | this.loading = true; |
| | | getAction(this.url.list, params).then((res) => { |