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/processInfo.vue |  449 +++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 283 insertions(+), 166 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/processInfo.vue" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/processInfo.vue"
index 78e4f6c..49962fb 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/processInfo.vue"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WIDESEAWCS_Client/src/views/basicinfo/processInfo.vue"
@@ -19,328 +19,445 @@
 
 export default defineComponent({
   setup() {
+    // 宸ュ叿鍑芥暟锛氭牸寮忓寲鏁板瓧涓轰袱浣嶅皬鏁�
+    const formatTwoDecimal = (value) => {
+      if (value === "" || value === null || value === undefined) return "";
+      const num = parseFloat(value);
+      return isNaN(num) ? "" : num.toFixed(2);
+    };
+
+    // 琛ㄦ牸鍩虹閰嶇疆
     const table = ref({
       key: "id",
       footer: "Foots",
       cnName: "鍔犲伐淇℃伅",
       name: "processInfo",
-      url: "/processInfo/", 
-      sortName: "createDate", 
+      url: "/processInfo/",
+      sortName: "createDate",
+      sortOrder: "desc", // 鍒涘缓鏃堕棿榛樿鍊掑簭
     });
 
+    // 缂栬緫琛ㄥ崟瀛楁 - 涓ユ牸鍖归厤鍚庣Dt_ProcessInfo瀹炰綋
     const editFormFields = ref({
-      id: "",
-      palletCode: "", 
+      id: 0, // 涓婚敭榛樿鍊兼敼涓烘暟瀛�0
+      palletCode: "",
       productCode: "",
       productName: "",
-      componentQty: "",
-      torsioValue: "",
-      torsioValueStandard: "",
-      stiffnessValue: "",
-      stiffnessValueStandard: "",
-      testResult: "",
-      pressHeight: "",
+      productSn: "",
+      pressTightenOk: 0, // 鏀逛负鏁板瓧榛樿鍊�
+      pressTightenUnfinished: 0, // 鏀逛负鏁板瓧榛樿鍊�
+      productStatus: 0, // 鏂板锛氫骇鍝佺姸鎬佸瓧娈�
       screwTorque: "",
       screwAngle: "",
+      pressPressure: "",
+      productCheckHeight: "",
+      threadPositionHeight: "",
       height1: "",
       height2: "",
       height3: "",
     });
-    
+
+    // 浜у搧鐘舵�佷笅鎷夐�夐」锛堝尮閰嶅悗绔敞閲婏級
+    const productStatusOptions = [
+      { key: "0", value: "涓嶅悎鏍�" },
+      { key: "1", value: "鍚堟牸" },
+      { key: "2", value: "浜哄伐纭鍚堟牸" },
+    ];
+
+    // 甯冨皵鍨嬩笅鎷夐�夐」锛堥�氱敤锛�
+    const booleanOptions = [
+      { key: "0", value: "鍚�" },
+      { key: "1", value: "鏄�" },
+    ];
+
+    // 缂栬緫琛ㄥ崟閰嶇疆 - 淇瀛楁鍖归厤锛屼紭鍖栧竷灞�鍜屽懡鍚�
     const editFormOptions = ref([
+      // 鍩虹淇℃伅琛�
       [
         {
           title: "宸ヨ鏉跨紪鍙�",
           field: "palletCode",
           type: "input",
-          width: 200,
-          require: true
+          width: 180,
+          require: true,
+          placeholder: "璇疯緭鍏ュ伐瑁呮澘缂栧彿",
         },
         {
           title: "鎴愬搧缂栧彿",
           field: "productCode",
           type: "input",
-          width: 200,
-          require: true
+          width: 180,
+          require: true,
+          placeholder: "璇疯緭鍏ユ垚鍝佺紪鍙�",
         },
         {
           title: "鎴愬搧鍚嶇О",
           field: "productName",
           type: "input",
+          width: 180,
+          require: true,
+          placeholder: "璇疯緭鍏ユ垚鍝佸悕绉�",
+        },
+        {
+          title: "娴佹按鍙�",
+          field: "productSn",
+          type: "input",
           width: 200,
-          require: true
-        }
+          require: false,
+          placeholder: "璇疯緭鍏ヤ骇鍝佹祦姘村彿",
+        },
       ],
+      // 鍔犲伐鐘舵�佽 - 绉婚櫎涓嶅瓨鍦ㄧ殑checkUnfinished锛屾柊澧炰骇鍝佺姸鎬�
       [
         {
-          title: "闆朵欢鏁伴噺",
-          field: "componentQty",
-          type: "input",
-          width: 200,
-          require: true
+          title: "鍘嬭鎷х揣_鎷х揣OK",
+          field: "pressTightenOk",
+          type: "select",
+          width: 160,
+          align: "center",
+          defaultValue: 0,
+          data: booleanOptions,
         },
         {
-          title: "鎵姏鍊�",
-          field: "torsioValue",
-          type: "input",
-          width: 200,
-          require: false
+          title: "鍘嬭鎷х揣_鏈鍔犲伐鏈畬鎴�",
+          field: "pressTightenUnfinished",
+          type: "select",
+          width: 180,
+          align: "center",
+          defaultValue: 0,
+          data: booleanOptions,
         },
         {
-          title: "鎵姏鍊兼爣鍑�",
-          field: "torsioValueStandard",
+          title: "浜у搧鐘舵��",
+          field: "productStatus",
+          type: "select",
+          width: 160,
+          align: "center",
+          defaultValue: 0,
+          data: productStatusOptions,
+        },
+        {
+          title: "鍘嬭浣嶄笅鍘嬪帇鍔�",
+          field: "pressPressure",
           type: "input",
-          width: 200,
-          require: false
-        }
+          inputType: "number",
+          width: 180,
+          require: false,
+          attrs: { step: 0.01, min: 0 },
+          placeholder: "淇濈暀2浣嶅皬鏁�",
+          formatter: formatTwoDecimal,
+          onBlur: (e) => {
+            e.target.value = formatTwoDecimal(e.target.value);
+          },
+        },
       ],
+      // 鍘嬭妫�娴嬪弬鏁拌 - 浼樺寲鏍囬锛屽尮閰嶅悗绔敞閲�
       [
-        {
-          title: "鍒氬害鍊�",
-          field: "stiffnessValue",
-          type: "input",
-          width: 200,
-          require: false
-        },
-        {
-          title: "鍒氬害鍊兼爣鍑�",
-          field: "stiffnessValueStandard",
-          type: "input",
-          width: 200,
-          require: false
-        },
-        {
-          title: "娴嬭瘯缁撴灉",
-          field: "testResult",
-          type: "input",
-          width: 200,
-          require: false
-        }
-      ],
-      [
-        {
-          title: "鍘嬭浣嶄笅鍘嬫娴嬮珮搴�",
-          field: "pressHeight",
-          type: "input",
-          width: 200,
-          require: false
-        },
         {
           title: "鍘嬭浣嶆嫥绱ф娴嬫壄鍔�",
           field: "screwTorque",
           type: "input",
-          width: 200,
-          require: false
+          inputType: "number",
+          width: 180,
+          require: false,
+          attrs: { step: 0.01, min: 0 },
+          placeholder: "淇濈暀2浣嶅皬鏁�",
+          formatter: formatTwoDecimal,
+          onBlur: (e) => {
+            e.target.value = formatTwoDecimal(e.target.value);
+          },
         },
         {
           title: "鍘嬭浣嶆嫥绱ф娴嬭搴�",
           field: "screwAngle",
           type: "input",
-          width: 200,
-          require: false
-        }
+          inputType: "number",
+          width: 180,
+          require: false,
+          attrs: { step: 0.01, min: 0 },
+          placeholder: "淇濈暀2浣嶅皬鏁�",
+          formatter: formatTwoDecimal,
+          onBlur: (e) => {
+            e.target.value = formatTwoDecimal(e.target.value);
+          },
+        },
+        {
+          title: "浜у搧妫�娴嬮珮搴�",
+          field: "productCheckHeight",
+          type: "input",
+          inputType: "number",
+          width: 180,
+          require: false,
+          attrs: { step: 0.01, min: 0 },
+          placeholder: "淇濈暀2浣嶅皬鏁�",
+          formatter: formatTwoDecimal,
+          onBlur: (e) => {
+            e.target.value = formatTwoDecimal(e.target.value);
+          },
+        },
+        {
+          title: "铻虹汗浣嶇疆楂樺害",
+          field: "threadPositionHeight",
+          type: "input",
+          inputType: "number",
+          width: 180,
+          require: false,
+          attrs: { step: 0.01, min: 0 },
+          placeholder: "淇濈暀2浣嶅皬鏁�",
+          formatter: formatTwoDecimal,
+          onBlur: (e) => {
+            e.target.value = formatTwoDecimal(e.target.value);
+          },
+        },
       ],
+      // 鎷х揣浣嶆娴嬮珮搴﹁
       [
         {
           title: "鎷х揣浣嶆娴嬮珮搴�1",
           field: "height1",
           type: "input",
-          width: 200,
-          require: false
+          inputType: "number",
+          width: 180,
+          require: false,
+          attrs: { step: 0.01, min: 0 },
+          placeholder: "淇濈暀2浣嶅皬鏁�",
+          formatter: formatTwoDecimal,
+          onBlur: (e) => {
+            e.target.value = formatTwoDecimal(e.target.value);
+          },
         },
         {
           title: "鎷х揣浣嶆娴嬮珮搴�2",
           field: "height2",
           type: "input",
-          width: 200,
-          require: false
+          inputType: "number",
+          width: 180,
+          require: false,
+          attrs: { step: 0.01, min: 0 },
+          placeholder: "淇濈暀2浣嶅皬鏁�",
+          formatter: formatTwoDecimal,
+          onBlur: (e) => {
+            e.target.value = formatTwoDecimal(e.target.value);
+          },
         },
         {
           title: "鎷х揣浣嶆娴嬮珮搴�3",
           field: "height3",
           type: "input",
-          width: 200,
-          require: false
-        }
+          inputType: "number",
+          width: 180,
+          require: false,
+          attrs: { step: 0.01, min: 0 },
+          placeholder: "淇濈暀2浣嶅皬鏁�",
+          formatter: formatTwoDecimal,
+          onBlur: (e) => {
+            e.target.value = formatTwoDecimal(e.target.value);
+          },
+        },
       ],
-      [
-        {
-          title: "涓婚敭ID",
-          field: "id",
-          type: "input",
-          width: 100,
-          hidden: true,
-          readonly: true
-        }
-      ]
     ]);
 
+    // 鎼滅储琛ㄥ崟瀛楁 - 鍖归厤鍚庣瀹炰綋锛岀Щ闄ゆ棤鍏冲瓧娈�
     const searchFormFields = ref({
       palletCode: "",
       productCode: "",
       productName: "",
-      creater: "",
+      productSn: "",
+      productStatus: "", // 鏂板锛氫骇鍝佺姸鎬佹悳绱�
       createDate: "",
     });
 
+    // 鎼滅储琛ㄥ崟閰嶇疆 - 浼樺寲甯冨眬锛屾柊澧炰骇鍝佺姸鎬佹悳绱�
     const searchFormOptions = ref([
       [
-        { title: "宸ヨ鏉跨紪鍙�", field: "palletCode", type: "like" },
-        { title: "鎴愬搧缂栧彿", field: "productCode", type: "like" },
-        { title: "鎴愬搧鍚嶇О", field: "productName", type: "like" },
+        { title: "宸ヨ鏉跨紪鍙�", field: "palletCode", type: "like", width: 180 },
+        { title: "鎴愬搧缂栧彿", field: "productCode", type: "like", width: 180 },
+        { title: "鎴愬搧鍚嶇О", field: "productName", type: "like", width: 180 },
+        { title: "娴佹按鍙�", field: "productSn", type: "like", width: 200 },
       ],
       [
-        { title: "鍒涘缓浜�", field: "creater", type: "like" },
-        { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
+        {
+          title: "浜у搧鐘舵��",
+          field: "productStatus",
+          type: "select",
+          width: 180,
+          data: productStatusOptions,
+        },
+        { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime", width: 380 },
       ],
     ]);
 
+    // 琛ㄦ牸鍒楅厤缃� - 淇瀛楁鍖归厤锛屾柊澧炰骇鍝佺姸鎬佸垪锛屼紭鍖栨爣棰�
     const columns = ref([
       {
         field: "id",
         title: "搴忓彿",
         type: "int",
-        width: 90,
+        width: 80,
         hidden: true,
-        readonly: true,
-        require: true,
-        align: "left",
+        align: "center",
       },
       {
         field: "palletCode",
         title: "宸ヨ鏉跨紪鍙�",
         type: "string",
-        width: 200,
+        width: 140,
         align: "left",
       },
       {
         field: "productCode",
         title: "鎴愬搧缂栧彿",
         type: "string",
-        width: 200,
+        width: 140,
         align: "left",
       },
       {
         field: "productName",
         title: "鎴愬搧鍚嶇О",
         type: "string",
-        width: 200,
+        width: 150,
         align: "left",
       },
       {
-        field: "componentQty",
-        title: "闆朵欢鏁伴噺",
-        type: "int",
-        width: 200,
+        field: "productSn",
+        title: "娴佹按鍙�",
+        type: "string",
+        width: 180,
         align: "left",
+        overflow: "ellipsis",
+      },
+      // 鐘舵�佸垪 - 绉婚櫎checkUnfinished锛屾柊澧炰骇鍝佺姸鎬�
+      {
+        field: "pressTightenOk",
+        title: "鎷х揣OK",
+        type: "select",
+        width: 100,
+        align: "center",
+        bind: {
+          key: "value",
+          data: booleanOptions,
+        },
       },
       {
-        field: "torsioValue",
-        title: "鎵姏鍊�",
-        type: "float",
-        width: 200,
-        align: "left",
+        field: "pressTightenUnfinished",
+        title: "鎷х揣鏈畬鎴�",
+        type: "select",
+        width: 120,
+        align: "center",
+        bind: {
+          key: "value",
+          data: booleanOptions,
+        },
       },
       {
-        field: "torsioValueStandard",
-        title: "鎵姏鍊兼爣鍑�",
-        type: "float",
-        width: 200,
-        align: "left",
+        field: "productStatus",
+        title: "浜у搧鐘舵��",
+        type: "select",
+        width: 120,
+        align: "center",
+        bind: {
+          key: "value",
+          data: productStatusOptions,
+        },
       },
+      // 鍘嬭妫�娴嬪弬鏁板垪 - 浼樺寲鏍囬锛岀粺涓�鏍煎紡鍖�
       {
-        field: "stiffnessValue",
-        title: "鍒氬害鍊�",
-        type: "float",
-        width: 200,
-        align: "left",
-      },
-      {
-        field: "stiffnessValueStandard",
-        title: "鍒氬害鍊兼爣鍑�",
-        type: "float",
-        width: 200,
-        align: "left",
-      },
-      {
-        field: "testResult",
-        title: "娴嬭瘯缁撴灉",
-        type: "int",
-        width: 200,
-        align: "left",
-      },
-      {
-        field: "pressHeight",
-        title: "鍘嬭浣嶄笅鍘嬫娴嬮珮搴�",
-        type: "float",
-        width: 200,
-        align: "left",
+        field: "pressPressure",
+        title: "鍘嬭浣嶄笅鍘嬪帇鍔�",
+        type: "decimal",
+        width: 120,
+        align: "center",
+        formatter: (row) => formatTwoDecimal(row.pressPressure),
       },
       {
         field: "screwTorque",
-        title: "鍘嬭浣嶆嫥绱ф娴嬫壄鍔�",
-        type: "float",
-        width: 200,
-        align: "left",
+        title: "鎷х揣妫�娴嬫壄鍔�",
+        type: "decimal",
+        width: 120,
+        align: "center",
+        formatter: (row) => formatTwoDecimal(row.screwTorque),
       },
       {
         field: "screwAngle",
-        title: "鍘嬭浣嶆嫥绱ф娴嬭搴�",
-        type: "float",
-        width: 200,
-        align: "left",
+        title: "鎷х揣妫�娴嬭搴�",
+        type: "decimal",
+        width: 120,
+        align: "center",
+        formatter: (row) => formatTwoDecimal(row.screwAngle),
+      },
+      // 浜у搧妫�娴嬮珮搴﹀垪
+      {
+        field: "productCheckHeight",
+        title: "浜у搧妫�娴嬮珮搴�",
+        type: "decimal",
+        width: 120,
+        align: "center",
+        formatter: (row) => formatTwoDecimal(row.productCheckHeight),
+      },
+      {
+        field: "threadPositionHeight",
+        title: "铻虹汗浣嶇疆楂樺害",
+        type: "decimal",
+        width: 120,
+        align: "center",
+        formatter: (row) => formatTwoDecimal(row.threadPositionHeight),
       },
       {
         field: "height1",
-        title: "鎷х揣浣嶆娴嬮珮搴�1",
-        type: "float",
-        width: 200,
-        align: "left",
+        title: "楂樺害1",
+        type: "decimal",
+        width: 100,
+        align: "center",
+        formatter: (row) => formatTwoDecimal(row.height1),
       },
       {
         field: "height2",
-        title: "鎷х揣浣嶆娴嬮珮搴�2",
-        type: "float",
-        width: 200,
-        align: "left",
+        title: "楂樺害2",
+        type: "decimal",
+        width: 100,
+        align: "center",
+        formatter: (row) => formatTwoDecimal(row.height2),
       },
       {
         field: "height3",
-        title: "鎷х揣浣嶆娴嬮珮搴�3",
-        type: "float",
-        width: 200,
-        align: "left",
+        title: "楂樺害3",
+        type: "decimal",
+        width: 100,
+        align: "center",
+        formatter: (row) => formatTwoDecimal(row.height3),
       },
+      // 鍏叡瀛楁
       {
         field: "creater",
         title: "鍒涘缓浜�",
         type: "string",
-        width: 90,
-        align: "left",
+        width: 80,
+        align: "center",
       },
       {
         field: "createDate",
         title: "鍒涘缓鏃堕棿",
         type: "datetime",
-        width: 150,
-        align: "left",
+        width: 160,
+        align: "center",
       },
       {
         field: "modifier",
         title: "淇敼浜�",
         type: "string",
-        width: 100,
-        align: "left",
+        width: 80,
+        align: "center",
       },
       {
         field: "modifyDate",
         title: "淇敼鏃堕棿",
         type: "datetime",
         width: 160,
-        align: "left",
+        align: "center",
       },
     ]);
 
+    // 鍔犲伐淇℃伅鏃犳槑缁�
     const detail = ref({
       cnName: "",
       table: "",
@@ -361,4 +478,4 @@
     };
   },
 });
-</script>
\ No newline at end of file
+</script>

--
Gitblit v1.9.3