| | |
| | | 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"; |
| | |
| | | ]; |
| | | |
| | | 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 || "--"; |
| | | } |
| | | }, |
| | |
| | | // 获取配置数据 |
| | | 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); |