| | |
| | | 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, |