From f7f25f593a731ea71e307257f5cec3ba562dacda Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期四, 04 十二月 2025 11:10:39 +0800
Subject: [PATCH] fix: 杆领用,型号选择下拉框
---
src/pages/production/wire/report/wire.vue | 26 ++++++++++++++++++++++++--
src/api/product/twist.ts | 2 +-
src/api/product/wire.ts | 10 +++++++++-
3 files changed, 34 insertions(+), 4 deletions(-)
diff --git a/src/api/product/twist.ts b/src/api/product/twist.ts
index 631c980..ef914da 100644
--- a/src/api/product/twist.ts
+++ b/src/api/product/twist.ts
@@ -145,7 +145,7 @@
// 楠岃瘉鍙樻洿
verifyChanges(params: { projectId: number | string }) {
return request<BaseResult<any>>({
- url: "/app/verifyChanges",
+ url: "/wireOutput/verifyChanges",
method: "GET",
data: params,
});
diff --git a/src/api/product/wire.ts b/src/api/product/wire.ts
index 16774a9..fbb713d 100644
--- a/src/api/product/wire.ts
+++ b/src/api/product/wire.ts
@@ -76,11 +76,19 @@
// 楠岃瘉鍙樻洿
verifyChanges(params: { projectId: number | string }) {
return request<BaseResult<any>>({
- url: "/app/verifyChanges",
+ url: "/wireOutput/verifyChanges",
method: "GET",
data: params,
});
},
+
+ // 鏍规嵁鐖剁骇鐗╂枡缂栫爜鏌ヨ瑙勬牸鍨嬪彿鍒楄〃
+ getMaterialByParentCode(code: string) {
+ return request<BaseResult<any[]>>({
+ url: `/material/getMaterialByParentCode/${code}`,
+ method: "GET",
+ });
+ },
};
export default WireApi;
diff --git a/src/pages/production/wire/report/wire.vue b/src/pages/production/wire/report/wire.vue
index 15e8fd9..7814947 100644
--- a/src/pages/production/wire/report/wire.vue
+++ b/src/pages/production/wire/report/wire.vue
@@ -150,11 +150,12 @@
label-width="100px"
placeholder="璇疯緭鍏ラ鐢ㄦ潌鍙�"
/>
- <wd-input
+ <wd-picker
v-model="newParentData.poleModel"
label="鏉嗗瀷鍙�"
label-width="100px"
- placeholder="璇疯緭鍏ユ潌鍨嬪彿"
+ :columns="poleModelOptions"
+ placeholder="璇烽�夋嫨鏉嗗瀷鍙�"
/>
<wd-input
v-model="newParentData.polePackageNumber"
@@ -228,6 +229,10 @@
// 渚涘簲鍟嗛�夐」
const supplierOptions = ref<any[]>([]);
+// 瑙勬牸鍨嬪彿閫夐」
+const poleModelOptions = ref<any[]>([]);
+// 鐖剁骇鐗╂枡缂栫爜
+const materialCode = ref<string>("");
// 鐖剁骇寮规鐩稿叧
const parentDialogVisible = ref(false);
@@ -258,11 +263,28 @@
const { data } = await WireDetailApi.getWireDetailById({ id });
model.value = data.model;
oneLength.value = data.oneLength;
+ await loadPoleModelOptions();
} catch (error) {
console.error("鑾峰彇璇︽儏澶辫触:", error);
}
};
+// 鍔犺浇瑙勬牸鍨嬪彿鍒楄〃
+const loadPoleModelOptions = async () => {
+ try {
+ const { code, data } = await WireApi.getMaterialByParentCode("003001");
+ if (code == 200 && Array.isArray(data)) {
+ poleModelOptions.value = data.map((item: any) => ({
+ label: item.specificationModel || "",
+ value: item.specificationModel || "",
+ }));
+ }
+ } catch (error) {
+ console.error("鍔犺浇瑙勬牸鍨嬪彿鍒楄〃澶辫触:", error);
+ toast.error("鍔犺浇瑙勬牸鍨嬪彿鍒楄〃澶辫触");
+ }
+};
+
// 鍔犺浇渚涘簲鍟嗗瓧鍏�
const loadSupplierDict = async () => {
try {
--
Gitblit v1.9.3