From 376bcaa483e26c36c90bebcce1d0b9be8e854d5e Mon Sep 17 00:00:00 2001
From: CD配唱片 <CD配唱片>
Date: 星期一, 28 四月 2025 12:59:45 +0800
Subject: [PATCH] 提交产能规划全table编辑
---
src/views/basicData/standardProcess/index.vue | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 51 insertions(+), 8 deletions(-)
diff --git a/src/views/basicData/standardProcess/index.vue b/src/views/basicData/standardProcess/index.vue
index 69b9544..6f58e01 100644
--- a/src/views/basicData/standardProcess/index.vue
+++ b/src/views/basicData/standardProcess/index.vue
@@ -48,12 +48,20 @@
/>
</el-form-item>
<el-form-item label="宸ュ巶" prop="plant">
- <el-input
- v-model="queryParams.plant"
- placeholder="璇疯緭鍏ュ伐鍘�"
+ <el-select
clearable
- @keyup.enter="handleQuery"
- />
+ v-model="queryParams.plant"
+ style="width: 200px;"
+ placeholder="璇疯緭鍏ラ�傜敤宸ュ巶"
+ >
+ <el-option
+ v-for="plant in plantList"
+ :key="plant.id"
+ :label="plant.plantName"
+ :value="plant.plantCode"
+ >
+ </el-option>
+ </el-select>
</el-form-item>
<el-form-item label="杞﹂棿" prop="workShop">
<el-input
@@ -266,7 +274,20 @@
/>
</el-form-item>
<el-form-item label="宸ュ巶" prop="plant">
- <el-input v-model="form.plant" placeholder="璇疯緭鍏ュ伐鍘�" />
+ <el-select
+ clearable
+ v-model="form.plant"
+ style="width: 100%"
+ placeholder="璇疯緭鍏ラ�傜敤宸ュ巶"
+ >
+ <el-option
+ v-for="plant in plantList"
+ :key="plant.id"
+ :label="plant.plantName"
+ :value="plant.plantCode"
+ >
+ </el-option>
+ </el-select>
</el-form-item>
<el-form-item label="杞﹂棿" prop="workShop">
<el-input v-model="form.workShop" placeholder="璇疯緭鍏ヨ溅闂�" />
@@ -299,6 +320,7 @@
addStandardProcess,
updateStandardProcess,
} from "@/api/basicData/standardProcess";
+import { listAll_plant } from "@/api/basicData/plant";
import HxlhTable from "@/components/HxlhTable/index.vue";
import { getToken } from "@/utils/auth.js";
import { ref } from "vue";
@@ -309,8 +331,9 @@
const page = ref({
total: 0,
current: 1,
- size: 10
+ size: 10,
});
+const plantList = ref([]);
const standardProcessList = ref([]);
const open = ref(false);
const loading = ref(true);
@@ -385,6 +408,15 @@
field: "plant",
width: 150,
align: "center",
+ formatter: ({ cellValue, row, column }) => {
+ if (cellValue) {
+ for (let i = 0; i < plantList.value.length; i++) {
+ if (cellValue === plantList.value[i].plantCode) {
+ return plantList.value[i].plantName;
+ }
+ }
+ }
+ },
},
{
title: "杞﹂棿",
@@ -395,6 +427,12 @@
{
title: "鏃ュ巻",
field: "workCalender",
+ width: 150,
+ align: "center",
+ },
+ {
+ title: "涓撲笟",
+ field: "major",
width: 150,
align: "center",
},
@@ -621,6 +659,11 @@
const handleFileUploadProgress = (event, file, fileList) => {
upload.isUploading = true;
};
-
+onMounted(async () => {
+ /** 鏌ヨ宸ュ巶鍒楄〃 */
+ const response = await listAll_plant({});
+ plantList.value = response.data;
+ loading.value = false;
+});
getList();
</script>
--
Gitblit v1.9.3