From c6d13e58d85fbaaceb49d4c24401b50143050173 Mon Sep 17 00:00:00 2001
From: zhang_12370 <z2864490065@outlook.com>
Date: 星期四, 26 六月 2025 18:01:24 +0800
Subject: [PATCH] 调整 基础管理煤种生产人 更改采购数计算逻辑 处理供应商数据回显问题

---
 src/views/production/components/ProductionDialog.vue |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/views/production/components/ProductionDialog.vue b/src/views/production/components/ProductionDialog.vue
index 955a1aa..c14ca96 100644
--- a/src/views/production/components/ProductionDialog.vue
+++ b/src/views/production/components/ProductionDialog.vue
@@ -165,6 +165,7 @@
   getCoalInfoList,
   deleteProductionInventory,
 } from "@/api/production/index.js";
+import { getSupplyList } from "@/api/procureMent/index.js"
 import {validateFormData, validateNumber, deepClone, createDefaultProductionRow} from "@/utils/production";
 import {useCoalData} from "./useCoalData";
 import useUserStore from "@/store/modules/user";
@@ -218,15 +219,13 @@
 ];
 
 const formalDatabaseColumns = ref([
-  {prop: "supplierName", label: "渚涘簲鍟嗗悕绉�", minwidth: 150
-  // ,formatter: (row) => {
-  //     console.log(row);
-  //     return supplierList.value[row.supplierId] || "--";
-  //   }
+  {prop: "supplierId", label: "渚涘簲鍟嗗悕绉�", minwidth: 150
+  ,formatter: (row) => {
+      return supplierList.value.find(supplier => supplier.id === row.supplierId)?.supplierName || "--";
+    }
   },
   {prop: "coalId", label: "鐓ょ", minwidth: 60,
     formatter: (row) => {
-      // return coalList.value[row.coalId].coal || "--";
       return coalList.value.find(coal => coal.id === row.coalId)?.coal || "--";
     }
   },
@@ -251,12 +250,13 @@
 // 鑾峰彇閰嶇疆鏁版嵁
 const handlData = async () => {
   innerVisible.value = true;
-  let getSupplier = await getOfficialAll();
+  let OfficialAll = await getOfficialAll();
+  let getSupplierList = await getSupplyList();
   let getCoalName = await getCoalInfoList();
   coalList.value = getCoalName.data || [];
-  supplierList.value = getSupplier.data || [];
-  if (getSupplier.code === 200) {
-    formalDatabaseData.value = getSupplier.data;
+  supplierList.value = getSupplierList.data || [];
+  if (OfficialAll.code === 200) {
+    formalDatabaseData.value = OfficialAll.data;
     const existingOfficialIds = tableData.value
         .map((item) => item.officialId)
         .filter((id) => id);

--
Gitblit v1.9.3