| | |
| | | </el-table-column> |
| | | <el-table-column label="工序" prop="process" width="150"> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.process" placeholder="请输入工序" /> |
| | | <el-select |
| | | v-model="scope.row.process" |
| | | placeholder="选择工序" |
| | | style="width: 100%;" |
| | | filterable |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="process in processList" |
| | | :key="process.id" |
| | | :label="process.name" |
| | | :value="process.name" |
| | | /> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="单位" prop="unit" width="90"> |
| | |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="工时定额" width="200" prop="workHours"> |
| | | <el-table-column label="工资" width="200" prop="workHours"> |
| | | <template #default="scope"> |
| | | <el-input-number |
| | | v-model="scope.row.workHours" |
| | |
| | | v-model="scope.row.schedulingUserId" |
| | | placeholder="选择人员" |
| | | style="width: 100%;" |
| | | filterable |
| | | default-first-option |
| | | :reserve-keyword="false" |
| | | > |
| | | <el-option |
| | | v-for="user in userList" |
| | |
| | | import {ref, getCurrentInstance} from "vue"; |
| | | import {userListNoPageByTenantId} from "@/api/system/user.js"; |
| | | import {processScheduling} from "@/api/productionManagement/operationScheduling.js"; |
| | | import {laborConfListPage} from "@/api/lavorissce/issue.js"; |
| | | const { proxy } = getCurrentInstance() |
| | | const { work_step } = proxy.useDict("work_step") |
| | | const emit = defineEmits(['close']) |
| | |
| | | const specificationModelFromRow = ref(''); |
| | | const pendingNum = ref(0); |
| | | const userList = ref([]) |
| | | const processList = ref([]) |
| | | const receive = ref('') |
| | | const productionLineIdFromRow = ref(''); |
| | | const productionUserIdFromRow = ref(''); |
| | | |
| | | // 打开弹框 |
| | | const openDialog = (type, row) => { |
| | |
| | | userListNoPageByTenantId().then((res) => { |
| | | userList.value = res.data; |
| | | }); |
| | | // 根据选中数据的productionLineId查询工序列表 |
| | | if (row?.productionLineId) { |
| | | laborConfListPage({ id: row.productionLineId, current: -1, size: -1 }).then((res) => { |
| | | processList.value = res.data.records || []; |
| | | }); |
| | | } |
| | | pendingNum.value = row?.pendingNum ?? 0; |
| | | unitFromRow.value = row?.unit ?? ''; |
| | | idFromRow.value = row?.id ?? ''; |
| | | specificationModelFromRow.value = row?.specificationModel ?? ''; |
| | | productionLineIdFromRow.value = row?.productionLineId ?? ''; |
| | | productionUserIdFromRow.value = row?.productionUserId ?? ''; |
| | | tableData.value = [createRow()]; |
| | | } |
| | | |
| | |
| | | proxy.$modal.msgError('排产数量合计不能超过待排产数量'); |
| | | return; |
| | | } |
| | | // 3. 将 receive 字段添加到每条数据中,并移除 loss 字段 |
| | | // 3. 将 receive、productionLineId、productionUserId 字段添加到每条数据中,并移除 loss 字段 |
| | | const submitData = tableData.value.map(row => { |
| | | const { loss, ...rest } = row; |
| | | return { |
| | | ...rest, |
| | | receive: receive.value |
| | | receive: receive.value, |
| | | productionLineId: productionLineIdFromRow.value, |
| | | productionUserId: productionUserIdFromRow.value |
| | | }; |
| | | }); |
| | | processScheduling(submitData).then((res) => { |