| | |
| | | |
| | | const orderId = route.query.orderId |
| | | const productionId = route.query.productionId |
| | | const orderQuantity = route.query.quantity |
| | | |
| | | const orderOtherMoney = ref(null) |
| | | |
| | |
| | | }, |
| | | formConfig: { |
| | | data: { |
| | | shelfThickness: 2000, |
| | | shelfThickness: 800, |
| | | spacerThickness: 0, |
| | | inWeight: 4000, |
| | | inMaxQuantity: 1, |
| | | inMaxQuantity: 20, |
| | | inLenMin:400, |
| | | inLenMax:3500, |
| | | inShortMax:2500, |
| | |
| | | { required: true, message: t('delivery.pleaseEnterANumericalValueGreaterThanOrEqualTo0'),type:'number',pattern:/^[0-9]\d*$/ } |
| | | ], |
| | | inWeight: [ |
| | | { required: true, message: t('basicData.msg.greater0'),type:'number',pattern:/^[1-9]\d*$/ } |
| | | ], |
| | | inMaxQuantity: [ |
| | | { required: true, message: t('basicData.msg.greater0'),type:'number',pattern:/^[1-9]\d*$/ } |
| | | ] |
| | | }, |
| | |
| | | if (item.baiscQuantity === 0) { |
| | | $grid.remove(item) |
| | | } |
| | | $gridLeft.reloadData([...$gridLeft.getTableData().fullData]) |
| | | //delete item._X_ROW_KEY |
| | | } else { |
| | | item.quantity = checkedNum.value |
| | |
| | | checkedList.forEach((item) => { |
| | | item.processId = checkedListLeft[0].processId |
| | | item.landingSequence = checkedListLeft[0].landingSequence |
| | | item.quantity = checkedListLeft[0].baiscQuantity |
| | | item.quantity = item.baiscQuantity |
| | | item.computeGrossArea = (item.computeGrossArea - checkedListLeft[0].width * checkedListLeft[0].height * checkedListLeft[0].baiscQuantity / 1000000).toFixed(2) |
| | | |
| | | delete item._X_ROW_KEY |
| | | }) |
| | | $gridLeft.insertAt(checkedList) |
| | |
| | | gridLeftOptions.toolbarConfig.buttons[0].disabled=false |
| | | return; |
| | | } |
| | | |
| | | // 计算 $table 里 quantity 字段的总和 |
| | | let totalQuantity = selectRecords.reduce((sum, record) => sum + (Number(record.quantity) || 0), 0); |
| | | // 对比全局变量 orderQuantity |
| | | if (totalQuantity !== orderQuantity*1) { |
| | | ElMessage.warning(`所选数据的数量总和 (${totalQuantity}) 与订单数量 (${orderQuantity}) 不匹配,请检查后重试!`); |
| | | gridLeftOptions.toolbarConfig.buttons[0].disabled = false; |
| | | return; |
| | | } |
| | | // if (leftData.length!=selectRecords.length){ |
| | | // ElMessage.warning('请勾选所有数据进行保存') |
| | | // gridLeftOptions.toolbarConfig.buttons[0].disabled=false |