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 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

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