From 170d2e8357a759686a46a598669ddb4119fbdf38 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期五, 20 六月 2025 15:05:25 +0800
Subject: [PATCH] 修复采购管理下拉无数据 修改基础管理-供应商模块字段匹配问题
---
src/api/procureMent/index.js | 20 ++++++++++++++++++++
src/views/procureMent/components/ProductionDialog.vue | 12 +++++++-----
src/views/basicInformation/mould/supplier.vue | 2 +-
3 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/src/api/procureMent/index.js b/src/api/procureMent/index.js
index effbecf..5c56435 100644
--- a/src/api/procureMent/index.js
+++ b/src/api/procureMent/index.js
@@ -27,3 +27,23 @@
})
}
+// /supply/supplyList
+// 鏌ヨ渚涘簲鍟嗗垪琛�
+export function getSupplyList(query) {
+ return request({
+ url: '/supply/supplyList',
+ method: 'get',
+ params: query
+ })
+}
+
+// /coalInfo/coalInfoList
+// 鏌ヨ鐓ょ鍒楄〃
+export function getCoalInfoList(query) {
+ return request({
+ url: '/coalInfo/coalInfoList',
+ method: 'get',
+ params: query
+ })
+}
+
diff --git a/src/views/basicInformation/mould/supplier.vue b/src/views/basicInformation/mould/supplier.vue
index d40b4c7..15ac14d 100644
--- a/src/views/basicInformation/mould/supplier.vue
+++ b/src/views/basicInformation/mould/supplier.vue
@@ -3,7 +3,7 @@
<el-dialog v-model="dialogVisible" :title="title" width="600" :close-on-click-modal="false"
:before-close="handleClose">
<el-form ref="formRef" style="max-width: 400px; margin: 0 auto" :model="formData" :rules="rules" label-width="auto">
- <el-form-item label="瀹㈡埛鍚嶇О" prop="supplierName">
+ <el-form-item label="渚涘簲鍟嗗悕绉�" prop="supplierName">
<el-input v-model="formData.supplierName" placeholder="璇疯緭鍏ヤ緵璐у晢鍚嶇О" />
</el-form-item>
<el-form-item label="绾崇◣浜鸿瘑鍒彿" prop="taxpayerId">
diff --git a/src/views/procureMent/components/ProductionDialog.vue b/src/views/procureMent/components/ProductionDialog.vue
index 31a6243..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,
@@ -288,6 +289,7 @@
onMounted(async () => {
let res = await userStore.getInfo();
userInfo.value = res;
+ getDropdownData()
});
const rules = {
supplierName: [
--
Gitblit v1.9.3