| | |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-table :data="scheduleRows" border style="width: 100%" v-loading="scheduleLoading"> |
| | | <el-table-column type="index" label="序号" width="70" align="center" /> |
| | | |
| | | <el-table-column type="index" label="序号" width="70" align="center" :index="indexMethod" /> |
| | | <el-table-column label="本次上机机台" min-width="220"> |
| | | <template #default="{ row }"> |
| | | <el-select |
| | |
| | | return; |
| | | } |
| | | |
| | | const rows = buildScheduleRowsFromRecords(records); |
| | | |
| | | const rows = records.map(record => mapMachineRecordToScheduleRow(record)); |
| | | scheduleRows.value = rows.length > 0 ? rows : [createScheduleRow({})]; |
| | | } catch (error) { |
| | | console.error("获取排产记录失败", error); |
| | |
| | | } |
| | | |
| | | return payload; |
| | | }; |
| | | |
| | | const indexMethod = (index) => { |
| | | return (schedulePage.current - 1) * schedulePage.size + index + 1; |
| | | }; |
| | | |
| | | const mapMachineRecordToScheduleRow = (record) => { |
| | |
| | | showReportDialog(row); |
| | | }, |
| | | // 用户当前id |
| | | disabled: row => row.completeQuantity === row.planQuantity || |
| | | disabled: row => row.completeQuantity !==0 || |
| | | !isCurrentUserInUserIds(row) |
| | | }, |
| | | { |
| | |
| | | } |
| | | openScheduleDialog(row); |
| | | }, |
| | | disabled: row => !row.canSchedule |
| | | disabled: row => !row.canSchedule || row.completeQuantity >= row.planQuantity |
| | | } |
| | | // { |
| | | // name:"审核", |
| | |
| | | } |
| | | const num = Number(value); |
| | | if (isNaN(num)) { |
| | | return; |
| | | } |
| | | // 如果超过待生产数量 |
| | | if (num > reportForm.planQuantity) { |
| | | proxy.$modal.msgWarning("本次生产数量不能大于待生产数量"); |
| | | reportForm.quantity = reportForm.planQuantity; |
| | | return; |
| | | } |
| | | // 如果小于1,清除 |
| | |
| | | }; |
| | | |
| | | const showReportDialog = row => { |
| | | |
| | | currentReportRowData.value = row; |
| | | reportForm.planQuantity = row.planQuantity - row.completeQuantity; |
| | | reportForm.quantity = row.quantity !== undefined && row.quantity !== null ? row.quantity : null; |
| | | reportForm.quantity = row.planQuantity !== undefined && row.planQuantity !== null ? row.planQuantity : null; |
| | | reportForm.productProcessRouteItemId = row.productProcessRouteItemId; |
| | | reportForm.workOrderId = row.id; |
| | | reportForm.reportWork = row.reportWork; |
| | | reportForm.productMainId = row.productMainId; |
| | | reportForm.planQuantity = row.planQuantity; |
| | | reportForm.startTime = ""; |
| | | reportForm.endTime = ""; |
| | | reportForm.replenishQty = 0; |