From b52018589bf6c7ec1d51ce8ad000a7aa993b0ab5 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期一, 13 四月 2026 16:06:15 +0800
Subject: [PATCH] 优化组盘表获取成品编号、流水号、供方代码

---
 代码管理/WIDESEAWCS_Client/src/views/basicinfo/scanStation.vue |  246 +++++++++++++++++--------------------------------
 1 files changed, 85 insertions(+), 161 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/scanStation.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/scanStation.vue"
index 4cab5db..b777e7e 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/scanStation.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/scanStation.vue"
@@ -15,37 +15,34 @@
 
 <script>
 import extend from "@/extension/basicinfo/scanStation.js";
-import { ref, defineComponent } from "vue";
+import { ref, defineComponent, onMounted } from "vue";
+import axios from "axios";
 
 export default defineComponent({
   setup() {
+    // 鍏ㄥ眬涓嬫媺鏁版嵁婧愬彉閲� - 鎵�鏈変笅鎷夋鍏辩敤锛屼竴澶勮祴鍊硷紝涓夊澶嶇敤
+    const stationEndProductList = ref([]);
+
     const table = ref({
       key: "id",
       footer: "Foots",
       cnName: "鎵弿宸ヤ綅",
       name: "scanStation",
-      url: "/scanStation/", 
-      sortName: "createDate", 
+      url: "/scanStation/",
+      sortName: "createDate",
     });
 
+    // 銆愪慨鏀�1銆戞柊澧炵粍瑁呬汉鍛樸�侀浠�/鏈欢娴佹按鍙峰瓧娈碉紝绉婚櫎涓嶅瓨鍦ㄧ殑isScanned
     const editFormFields = ref({
       id: "",
-      stationCode: "", 
+      stationCode: "",
       stationName: "",
       stationEndProduct: "",
-      stationComponentQty: "",
-      stationComponent1: "",
-      stationComponent2: "",
-      stationComponent3: "",
-      stationComponent4: "",
-      stationComponent5: "",
-      stationComponent6: "",
-      stationComponent7: "",
-      stationComponent8: "",
-      stationComponent9: "",
-      stationComponent10: "",
+      assembleUser: "", // 缁勮浜哄憳
+      firstProductSn: "", // 棣栦欢娴佹按鍙�
+      lastProductSn: "", // 鏈欢娴佹按鍙�
     });
-    
+
     const editFormOptions = ref([
       [
         {
@@ -53,122 +50,76 @@
           field: "stationCode",
           type: "input",
           width: 200,
-          require: true
+          require: true,
         },
+      ],
+      [
         {
           title: "绔欏彴鍚嶇О",
           field: "stationName",
           type: "input",
           width: 200,
-          require: true
+          require: true,
         },
+      ],
+      [
         {
           title: "绔欏彴鎴愬搧",
           field: "stationEndProduct",
-          type: "input",
+          type: "select",
+          data: stationEndProductList, // 缁戝畾鍏ㄥ眬鎺ュ彛鏁版嵁
           width: 200,
-          require: false
-        }
+          require: false,
+        },
       ],
+      // 銆愪慨鏀�2銆戠Щ闄sScanned涓嬫媺妗嗭紝鏂板缁勮浜哄憳杈撳叆妗�
       [
         {
-          title: "闆朵欢鏁伴噺",
-          field: "stationComponentQty",
+          title: "缁勮浜哄憳",
+          field: "assembleUser",
           type: "input",
           width: 200,
-          require: true
+          require: false, // 鍚庣鍏佽涓虹┖锛屾晠璁句负闈炲繀濉�
         },
-        {
-          title: "闆朵欢1",
-          field: "stationComponent1",
-          type: "input",
-          width: 200,
-          require: false
-        },
-        {
-          title: "闆朵欢2",
-          field: "stationComponent2",
-          type: "input",
-          width: 200,
-          require: false
-        }
       ],
+      // 銆愭柊澧炪�戦浠舵祦姘村彿杈撳叆妗�
       [
         {
-          title: "闆朵欢3",
-          field: "stationComponent3",
+          title: "棣栦欢娴佹按鍙�",
+          field: "firstProductSn",
           type: "input",
-          width: 200,
-          require: false
+          width: 300, // 娴佹按鍙疯緝闀匡紝鍔犲杈撳叆妗�
+          require: false,
         },
-        {
-          title: "闆朵欢4",
-          field: "stationComponent4",
-          type: "input",
-          width: 200,
-          require: false
-        },
-        {
-          title: "闆朵欢5",
-          field: "stationComponent5",
-          type: "input",
-          width: 200,
-          require: false
-        }
       ],
+      // 銆愭柊澧炪�戞湯浠舵祦姘村彿杈撳叆妗�
       [
         {
-          title: "闆朵欢6",
-          field: "stationComponent6",
+          title: "鏈欢娴佹按鍙�",
+          field: "lastProductSn",
           type: "input",
-          width: 200,
-          require: false
+          width: 300,
+          require: false,
         },
-        {
-          title: "闆朵欢7",
-          field: "stationComponent7",
-          type: "input",
-          width: 200,
-          require: false
-        },
-        {
-          title: "闆朵欢8",
-          field: "stationComponent8",
-          type: "input",
-          width: 200,
-          require: false
-        }
       ],
       [
-        {
-          title: "闆朵欢9",
-          field: "stationComponent9",
-          type: "input",
-          width: 200,
-          require: false
-        },
-        {
-          title: "闆朵欢10",
-          field: "stationComponent10",
-          type: "input",
-          width: 200,
-          require: false
-        },
         {
           title: "涓婚敭ID",
           field: "id",
           type: "input",
           width: 100,
           hidden: true,
-          readonly: true
-        }
-      ]
+          readonly: true,
+        },
+      ],
     ]);
 
+    // 銆愪慨鏀�3銆戞悳绱㈣〃鍗曠Щ闄sScanned锛屾柊澧炵粍瑁呬汉鍛橈紙娴佹按鍙蜂竴鑸笉鍋氭悳绱紝鏁呬笉鏂板锛�
     const searchFormFields = ref({
       stationCode: "",
       stationName: "",
       stationEndProduct: "",
+      assembleUser: "", // 鏂板缁勮浜哄憳鎼滅储
       creater: "",
       createDate: "",
     });
@@ -177,9 +128,16 @@
       [
         { title: "绔欏彴缂栧彿", field: "stationCode", type: "like" },
         { title: "绔欏彴鍚嶇О", field: "stationName", type: "like" },
-        { title: "绔欏彴鎴愬搧", field: "stationEndProduct", type: "like" },
+        {
+          title: "绔欏彴鎴愬搧",
+          field: "stationEndProduct",
+          type: "select-search",
+          data: stationEndProductList, // 缁戝畾鍏ㄥ眬鎺ュ彛鏁版嵁
+        },
+        { title: "缁勮浜哄憳", field: "assembleUser", type: "like" }, // 鏂板缁勮浜哄憳妯$硦鎼滅储
       ],
       [
+        // 銆愪慨鏀�4銆戠Щ闄ゆ悳绱㈡爮鐨刬sScanned涓嬫媺妗�
         { title: "鍒涘缓浜�", field: "creater", type: "like" },
         { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
       ],
@@ -213,85 +171,35 @@
       {
         field: "stationEndProduct",
         title: "绔欏彴鎴愬搧",
-        type: "string",
+        type: "select",
+        bind: {
+          key: "value",
+          data: stationEndProductList, // 缁戝畾鍏ㄥ眬鎺ュ彛鏁版嵁
+        },
+        link: true,
         width: 200,
         align: "left",
       },
+      // 銆愪慨鏀�5銆戠Щ闄よ〃鏍肩殑isScanned鍒楋紝鏂板浠ヤ笅涓夊垪
       {
-        field: "stationComponentQty",
-        title: "闆朵欢鏁伴噺",
-        type: "int",
-        width: 200,
+        field: "assembleUser",
+        title: "缁勮浜哄憳",
+        type: "string",
+        width: 150,
         align: "left",
       },
       {
-        field: "stationComponent1",
-        title: "闆朵欢1",
+        field: "firstProductSn",
+        title: "棣栦欢娴佹按鍙�",
         type: "string",
-        width: 200,
+        width: 220,
         align: "left",
       },
       {
-        field: "stationComponent2",
-        title: "闆朵欢2",
+        field: "lastProductSn",
+        title: "鏈欢娴佹按鍙�",
         type: "string",
-        width: 200,
-        align: "left",
-      },
-      {
-        field: "stationComponent3",
-        title: "闆朵欢3",
-        type: "string",
-        width: 200,
-        align: "left",
-      },
-      {
-        field: "stationComponent4",
-        title: "闆朵欢4",
-        type: "string",
-        width: 200,
-        align: "left",
-      },
-      {
-        field: "stationComponent5",
-        title: "闆朵欢5",
-        type: "string",
-        width: 200,
-        align: "left",
-      },
-      {
-        field: "stationComponent6",
-        title: "闆朵欢6",
-        type: "string",
-        width: 200,
-        align: "left",
-      },
-      {
-        field: "stationComponent7",
-        title: "闆朵欢7",
-        type: "string",
-        width: 200,
-        align: "left",
-      },
-      {
-        field: "stationComponent8",
-        title: "闆朵欢8",
-        type: "string",
-        width: 200,
-        align: "left",
-      },
-      {
-        field: "stationComponent9",
-        title: "闆朵欢9",
-        type: "string",
-        width: 200,
-        align: "left",
-      },
-      {
-        field: "stationComponent10",
-        title: "闆朵欢10",
-        type: "string",
-        width: 200,
+        width: 220,
         align: "left",
       },
       {
@@ -323,13 +231,29 @@
         align: "left",
       },
     ]);
-
     const detail = ref({
       cnName: "",
       table: "",
       columns: [],
       sortName: "",
       key: "",
+    });
+
+    // 銆愪繚鐣欏師鏈夐�昏緫銆戣幏鍙栫珯鍙版垚鍝佷笅鎷夋暟鎹�
+    const getStationEndProductData = async () => {
+      try {
+        const res = await axios.get("/api/formula/getEndProductList");
+        stationEndProductList.value = (res.data?.data || []).map(
+          (item) => item || { key: "", value: "", disabled: false }
+        );
+      } catch (error) {
+        stationEndProductList.value = [];
+        console.error("鑾峰彇绔欏彴鎴愬搧鏁版嵁澶辫触锛�", error);
+      }
+    };
+
+    onMounted(() => {
+      getStationEndProductData();
     });
 
     return {
@@ -344,4 +268,4 @@
     };
   },
 });
-</script>
\ No newline at end of file
+</script>

--
Gitblit v1.9.3