From cec42fd188b00a2f8fe8f6902ccfc58381d2a481 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 04 十二月 2025 14:45:29 +0800
Subject: [PATCH] 1.润泰生物、安佑农牧-生产管控:生产派工需要新增派工产线及生产人
---
src/views/productionManagement/operationScheduling/components/formDia.vue | 35 +++++++++++++++++++++++++++++++----
1 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/src/views/productionManagement/operationScheduling/components/formDia.vue b/src/views/productionManagement/operationScheduling/components/formDia.vue
index b2f283d..542e4f5 100644
--- a/src/views/productionManagement/operationScheduling/components/formDia.vue
+++ b/src/views/productionManagement/operationScheduling/components/formDia.vue
@@ -21,7 +21,20 @@
</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">
@@ -47,7 +60,7 @@
/>
</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"
@@ -109,6 +122,7 @@
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'])
@@ -121,7 +135,10 @@
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) => {
@@ -130,10 +147,18 @@
userListNoPageByTenantId().then((res) => {
userList.value = res.data;
});
+ // 鏍规嵁閫変腑鏁版嵁鐨刾roductionLineId鏌ヨ宸ュ簭鍒楄〃
+ 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()];
}
@@ -173,12 +198,14 @@
proxy.$modal.msgError('鎺掍骇鏁伴噺鍚堣涓嶈兘瓒呰繃寰呮帓浜ф暟閲�');
return;
}
- // 3. 灏� receive 瀛楁娣诲姞鍒版瘡鏉℃暟鎹腑锛屽苟绉婚櫎 loss 瀛楁
+ // 3. 灏� receive銆乸roductionLineId銆乸roductionUserId 瀛楁娣诲姞鍒版瘡鏉℃暟鎹腑锛屽苟绉婚櫎 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) => {
--
Gitblit v1.9.3