zhang_12370
5 天以前 c6d13e58d85fbaaceb49d4c24401b50143050173
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);