| | |
| | | :value="user.userId" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 工时 --> |
| | | <el-form-item label="工时" |
| | | v-if="currentReportRowData?.type == 0" |
| | | prop="workHour"> |
| | | <el-input v-model.number="reportForm.workHour" |
| | | type="number" |
| | | min="0" |
| | | style="width: 280px" |
| | | placeholder="请输入工时" /><span style="margin-left:10px" |
| | | class="param-unit">h</span> |
| | | </el-form-item> |
| | | <div v-if="params.length > 0" |
| | | class="param-grid" |
| | | v-loading="paramLoading"> |
| | |
| | | addProductMain, |
| | | downProductWorkOrder, |
| | | } from "@/api/productionManagement/workOrder.js"; |
| | | import { listMaterialPickingDetail } from "@/api/productionManagement/productionOrder.js"; |
| | | import { findProcessParamListOrder } from "@/api/productionManagement/productProcessRoute.js"; |
| | | import { getUserProfile, userListNoPageByTenantId } from "@/api/system/user.js"; |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | |
| | | productMainId: null, |
| | | productionOrderRoutingOperationId: "", |
| | | productionOrderId: "", |
| | | workHour: 0, |
| | | paramGroups: {}, |
| | | }); |
| | | |
| | |
| | | fileDialogVisible.value = true; |
| | | }; |
| | | |
| | | const showReportDialog = row => { |
| | | const showReportDialog = async row => { |
| | | if (row.productionOrderId) { |
| | | try { |
| | | const res = await listMaterialPickingDetail(row.productionOrderId); |
| | | const records = Array.isArray(res.data) |
| | | ? res.data |
| | | : res.data?.records || []; |
| | | if (res.code === 200 && records.length === 0) { |
| | | proxy.$modal.msgError("未领料无法报工"); |
| | | return; |
| | | } |
| | | } catch (error) { |
| | | console.error("查询领料详情失败:", error); |
| | | } |
| | | } |
| | | currentReportRowData.value = row; |
| | | reportForm.planQuantity = row.planQuantity; |
| | | reportForm.quantity = |
| | |
| | | reportForm.productionOrderRoutingOperationId = |
| | | row.productionOrderRoutingOperationId; |
| | | reportForm.productionOrderId = row.productionOrderId; |
| | | if (row.type == 0) { |
| | | reportForm.workHour = row.workHour || 0; |
| | | } else { |
| | | reportForm.workHour = 0; |
| | | } |
| | | nextTick(() => { |
| | | reportFormRef.value?.clearValidate(); |
| | | if (row.productionOrderRoutingOperationId && row.productionOrderId) { |
| | |
| | | productionOrderRoutingOperationId: |
| | | reportForm.productionOrderRoutingOperationId, |
| | | productionOrderId: reportForm.productionOrderId, |
| | | workHour: reportForm.workHour, |
| | | productionOperationParamList: productionOperationParamList, |
| | | }; |
| | | |