From c7f171da70f6e7362eaa69ddcf0a65828bb7fa1b Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 25 六月 2025 09:34:09 +0800
Subject: [PATCH] 1.销售出库-表单修改
---
src/api/salesOutbound/index.js | 2 +-
src/views/salesOutbound/components/formDia.vue | 33 +++++++++++++++++++++------------
2 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/src/api/salesOutbound/index.js b/src/api/salesOutbound/index.js
index 61bae4f..9abdf3c 100644
--- a/src/api/salesOutbound/index.js
+++ b/src/api/salesOutbound/index.js
@@ -33,7 +33,7 @@
params: query
})
}
-// 鏌ヨ鐓ょ
+// 鍒犻櫎閿�鍞嚭搴�
export function delSalesRecord(query) {
return request({
url: '/salesRecord/delSalesRecord',
diff --git a/src/views/salesOutbound/components/formDia.vue b/src/views/salesOutbound/components/formDia.vue
index 8607196..8b24c5a 100644
--- a/src/views/salesOutbound/components/formDia.vue
+++ b/src/views/salesOutbound/components/formDia.vue
@@ -22,9 +22,9 @@
<el-select v-model="form.customerId" placeholder="璇烽�夋嫨瀹㈡埛">
<el-option
v-for="item in customerOptions"
- :key="item.id"
- :label="item.customerName"
- :value="item.id"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
/>
</el-select>
</el-form-item>
@@ -36,9 +36,9 @@
<el-select v-model="form.coalId" placeholder="璇烽�夋嫨鐓ょ" @change="setInfo">
<el-option
v-for="item in coalOptions"
- :key="item.id"
- :label="item.coal"
- :value="item.id"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
/>
</el-select>
</el-form-item>
@@ -124,6 +124,7 @@
import {reactive, ref} from "vue";
import {addOrEditSalesRecord, customerList, officialList} from "../../../api/salesOutbound/index.js";
import useUserStore from '@/store/modules/user'
+import {getCoalInfoList, getSupplyList} from "@/api/procureMent/index.js";
const { proxy } = getCurrentInstance()
const emit = defineEmits()
@@ -160,12 +161,20 @@
const openDialog = async (type, row) => {
dialogVisitable.value = true
form.value.saleDate = proxy.getCurrentDate()
- customerList().then((res) => {
- customerOptions.value = res.data
- })
- officialList().then((res) => {
- coalOptions.value = res.data
- })
+ const [supplyRes, coalRes] = await Promise.all([
+ customerList(),
+ getCoalInfoList(),
+ ]);
+ let supplyData = supplyRes.data;
+ let coalData = coalRes.data;
+ customerOptions.value = supplyData.map((item) => ({
+ value: item.id,
+ label: item.customerName,
+ }));
+ coalOptions.value = coalData.map((item) => ({
+ value: item.id,
+ label: item.coal,
+ }))
let res = await userStore.getInfo()
form.value.registrantId = res.user.userId
form.value.taxCoal = 13
--
Gitblit v1.9.3