| | |
| | | placeholder="请输入报废数量" |
| | | @input="handleScrapQtyInput" /> |
| | | </el-form-item> |
| | | <el-form-item label="检品数量" |
| | | prop="inspectedQuantity"> |
| | | <el-input v-model.number="reportForm.inspectedQuantity" |
| | | type="number" |
| | | min="0" |
| | | step="1" |
| | | style="width: 300px" |
| | | placeholder="请输入检品数量" |
| | | @input="handleInspectedQuantity"/> |
| | | </el-form-item> |
| | | <el-form-item label="班组信息"> |
| | | <el-select v-model="reportForm.userId" |
| | | style="width: 300px" |
| | |
| | | totalInvestment: 0, |
| | | quantity: null, |
| | | scrapQty: null, |
| | | inspectedQuantity: null, |
| | | userName: "", |
| | | workOrderId: "", |
| | | reportWork: "", |
| | |
| | | } |
| | | reportForm.scrapQty = num; |
| | | }; |
| | | |
| | | const handleInspectedQuantity = value => { |
| | | if (value === "" || value === null || value === undefined) { |
| | | reportForm.inspectedQuantity = null; |
| | | return; |
| | | } |
| | | const num = Number(value); |
| | | if (isNaN(num)) { |
| | | return; |
| | | } |
| | | if (num < 0) { |
| | | reportForm.inspectedQuantity = null; |
| | | return; |
| | | } |
| | | if (!Number.isInteger(num)) { |
| | | reportForm.inspectedQuantity = Math.floor(num); |
| | | return; |
| | | } |
| | | reportForm.inspectedQuantity = num; |
| | | }; |
| | | const currentReportRowData = ref(null); |
| | | const page = reactive({ |
| | | current: 1, |
| | |
| | | reportForm.workOrderId = row.id; |
| | | reportForm.reportWork = row.reportWork; |
| | | reportForm.productMainId = row.productMainId; |
| | | reportForm.inspectedQuantity = row.inspectedQuantity; |
| | | reportForm.scrapQty = |
| | | row.scrapQty !== undefined && row.scrapQty !== null ? row.scrapQty : null; |
| | | nextTick(() => { |
| | |
| | | return; |
| | | } |
| | | |
| | | if (quantity > reportForm.planQuantity) { |
| | | ElMessageBox.alert("本次生产数量不能超过待生产数量", "提示", { |
| | | confirmButtonText: "确定", |
| | | }); |
| | | return; |
| | | } |
| | | // if (quantity > reportForm.planQuantity) { |
| | | // ElMessageBox.alert("本次生产数量不能超过待生产数量", "提示", { |
| | | // confirmButtonText: "确定", |
| | | // }); |
| | | // return; |
| | | // } |
| | | |
| | | const submitData = { |
| | | ...reportForm, |