| | |
| | | :value="user.userId" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="使用设备"> |
| | | <el-select v-model="reportForm.deviceId" |
| | | style="width: 300px" |
| | | placeholder="请选择使用设备" |
| | | clearable |
| | | filterable> |
| | | <el-option v-for="item in deviceOptions" |
| | | :key="item.id" |
| | | :label="item.deviceName" |
| | | :value="item.id" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 工时 --> |
| | | <el-form-item label="工时" |
| | | v-if="currentReportRowData?.type == 0" |
| | |
| | | import { listMaterialPickingDetail } from "@/api/productionManagement/productionOrder.js"; |
| | | import { findProcessParamListOrder } from "@/api/productionManagement/productProcessRoute.js"; |
| | | import { getUserProfile, userListNoPageByTenantId } from "@/api/system/user.js"; |
| | | import { getDeviceLedger } from "@/api/equipmentManagement/ledger.js"; |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | import QRCode from "qrcode"; |
| | | import { getCurrentInstance, reactive, toRefs } from "vue"; |
| | |
| | | const currentWorkOrderId = ref(null); |
| | | const reportFormRef = ref(null); |
| | | const userOptions = ref([]); |
| | | const deviceOptions = ref([]); |
| | | const reportForm = reactive({ |
| | | planQuantity: 0, |
| | | quantity: null, |
| | |
| | | reportWork: "", |
| | | productProcessRouteItemId: "", |
| | | userId: "", |
| | | deviceId: "", |
| | | productMainId: null, |
| | | productionOrderRoutingOperationId: "", |
| | | productionOrderId: "", |
| | |
| | | toQuantity(planQuantity - completeQuantity) |
| | | ); |
| | | reportForm.planQuantity = remainingQuantity; |
| | | reportForm.deviceId = ""; |
| | | reportForm.quantity = remainingQuantity; |
| | | reportForm.productProcessRouteItemId = row.productProcessRouteItemId; |
| | | reportForm.workOrderId = row.id; |
| | |
| | | scrapQty: isNaN(scrapQty) ? 0 : scrapQty, |
| | | userId: reportForm.userId, |
| | | userName: reportForm.userName, |
| | | deviceId: reportForm.deviceId || undefined, |
| | | productionOperationTaskId: reportForm.workOrderId, |
| | | productProcessRouteItemId: reportForm.productProcessRouteItemId, |
| | | reportWork: reportForm.reportWork, |
| | |
| | | userOptions.value = res.data; |
| | | } |
| | | }); |
| | | // 获取设备列表 |
| | | getDeviceLedger() |
| | | .then(res => { |
| | | deviceOptions.value = res.data || []; |
| | | }) |
| | | .catch(err => { |
| | | console.error("获取设备列表失败", err); |
| | | deviceOptions.value = []; |
| | | }); |
| | | }); |
| | | </script> |
| | | |