| | |
| | | // 报工 |
| | | const showReportModal1 = ref(false) |
| | | const reprotIds = ref([]) |
| | | const passCount = ref(0) |
| | | function openReportModal() { |
| | | // 有人员才可以报工 |
| | | if (!workers.value || workers.value.length == 0) { |
| | |
| | | modelTitle.value = '生产报工' |
| | | if (task?.value?.ShowCheck) { |
| | | getQualityInspection({ |
| | | procedureId: task.value?.Procedure.ID, |
| | | procedureId: task.value?.Procedure?.procedure.procedureId, |
| | | workOrderId: task.value?.Order.workOrderId |
| | | }).then((res: any) => { |
| | | console.log(res, '999999') |
| | | passAmount.value = res.data.passAmount |
| | | passCount.value = res.data.passAmount |
| | | reworkAmount.value = res.data.reworkAmount |
| | | scrappedAmount.value = res.data.scrappedAmount |
| | | reprotIds.value = res.data.ids || [] |
| | |
| | | if (workers.value[0].workerId) { |
| | | bulletinReport({ |
| | | workOrderProcedureID: Number(task.value?.Procedure.ID), |
| | | reportAmount: amount, |
| | | reportAmount: passCount.value, |
| | | workerID: workers.value[0].workerId, |
| | | workerName: workers.value[0].workerName, |
| | | ids: reprotIds.value |
| | |
| | | type: 'success', |
| | | duration: 2000 |
| | | }) |
| | | showReportModal.value = false |
| | | showReportModal1.value = false |
| | | } else { |
| | | ElMessage({ |
| | | message: '报工失败', |