From 170d2e8357a759686a46a598669ddb4119fbdf38 Mon Sep 17 00:00:00 2001 From: 张诺 <zhang_12370@163.com> Date: 星期五, 20 六月 2025 15:05:25 +0800 Subject: [PATCH] 修复采购管理下拉无数据 修改基础管理-供应商模块字段匹配问题 --- src/views/procureMent/components/ProductionDialog.vue | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/views/procureMent/components/ProductionDialog.vue b/src/views/procureMent/components/ProductionDialog.vue index 3360364..e420fbe 100644 --- a/src/views/procureMent/components/ProductionDialog.vue +++ b/src/views/procureMent/components/ProductionDialog.vue @@ -133,7 +133,7 @@ import { ref, defineProps, watch, onMounted, nextTick, computed } from "vue"; import { ElMessage } from "element-plus"; import useUserStore from "@/store/modules/user"; -import { addOrEditPR } from "@/api/procureMent"; +import { addOrEditPR,getSupplyList, getCoalInfoList } from "@/api/procureMent"; import { getSupply } from "@/api/basicInformation/supplier"; import { getCoalInfo } from "@/api/basicInformation/coal"; const props = defineProps({ @@ -161,11 +161,12 @@ const getDropdownData = async () => { try { const [supplyRes, coalRes] = await Promise.all([ - getSupply(), - getCoalInfo(), + getSupplyList(), + getCoalInfoList(), ]); - let supplyData = supplyRes.data.records; - let coalData = coalRes.data.records; + console.log(supplyRes, coalRes); + let supplyData = supplyRes.data; + let coalData = coalRes.data; supplyList.value = supplyData.map((item) => ({ value: item.id, label: item.supplierName, @@ -174,9 +175,8 @@ value: item.id, label: item.coal, })); - console.log(supplyList.value, coalList.value); } catch (error) { - console.error("鑾峰彇涓嬫媺鏁版嵁澶辫触:", error); + ElMessage.error("鑾峰彇涓嬫媺鏁版嵁澶辫触锛岃绋嶅悗閲嶈瘯"); } }; @@ -289,6 +289,7 @@ onMounted(async () => { let res = await userStore.getInfo(); userInfo.value = res; + getDropdownData() }); const rules = { supplierName: [ @@ -334,7 +335,6 @@ const formRef = ref(null); // 鎻愪氦琛ㄥ崟 const handleSubmit = async () => { - console.log("鎻愪氦琛ㄥ崟", form.value); if (!formRef.value) return; await formRef.value.validate(async (valid) => { if (valid) { -- Gitblit v1.9.3