From ce829582be1a8b53a330d1409e09325414f59e43 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期五, 13 三月 2026 13:32:15 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_银川_中盛建材' into dev_银川_中盛建材

---
 src/views/productionPlan/summaryByProduct/index.vue |   78 +++++++++++++++++++++++++++++++++++---
 src/views/productionPlan/productionPlan/index.vue   |   36 ++++++++++++------
 2 files changed, 95 insertions(+), 19 deletions(-)

diff --git a/src/views/productionPlan/productionPlan/index.vue b/src/views/productionPlan/productionPlan/index.vue
index 88aedf3..b99e86f 100644
--- a/src/views/productionPlan/productionPlan/index.vue
+++ b/src/views/productionPlan/productionPlan/index.vue
@@ -359,6 +359,12 @@
 
   const tableColumn = ref([
     {
+      label: "鏁版嵁鏉ユ簮",
+      width: "100px",
+      prop: "dataSourceType",
+      formatData: cell => (cell == 1 ? "鍚屾" : "鎵嬪姩"),
+    },
+    {
       label: "鐢宠鍗曠紪鍙�",
       prop: "applyNo",
       width: "150px",
@@ -372,7 +378,7 @@
     {
       label: "浜у搧鍚嶇О",
       prop: "productName",
-      width: "100px",
+      width: "200px",
       dataType: "tag",
       formatType: params => {
         const typeMap = {
@@ -408,11 +414,25 @@
       formatData: cell => (cell ? `${cell}鏂筦 : ""),
     },
     {
+      label: "涓嬪彂鐘舵��",
+      prop: "status",
+      width: "150px",
+      className: "status-cell",
+      formatData: cell => {
+        const statusMap = {
+          0: "寰呬笅鍙�",
+          1: "閮ㄥ垎涓嬪彂",
+          2: "宸蹭笅鍙�",
+        };
+        return statusMap[cell] || "";
+      },
+    },
+    {
       label: "宸蹭笅鍙戞柟鏁�",
       prop: "assignedQuantity",
       width: "150px",
       className: "spec-cell",
-      formatData: cell => (cell ? `${cell}鏂筦 : ""),
+      formatData: cell => (cell ? `${cell}鏂筦 : 0),
     },
     {
       label: "闀�",
@@ -456,12 +476,7 @@
       label: "寮哄害",
       prop: "strength",
     },
-    {
-      label: "鏁版嵁鏉ユ簮",
-      width: "100px",
-      prop: "dataSourceType",
-      formatData: cell => (cell == 1 ? "鍚屾" : "鎵嬪姩"),
-    },
+
     {
       label: "澶囨敞 1",
       prop: "remarkOne",
@@ -484,6 +499,7 @@
           link: true,
           showHide: row => {
             return row.status == 0;
+            //status锛�0锛氬緟涓嬪彂锛�1锛氶儴鍒嗕笅鍙戯紝2锛氬凡涓嬪彂
           },
           clickFun: row => {
             handleEdit(row);
@@ -1214,7 +1230,6 @@
         color: #ffffff;
         border-bottom: none;
         padding: 16px 0;
-        font-size: 14px;
         letter-spacing: 0.5px;
       }
     }
@@ -1237,7 +1252,6 @@
           border-bottom: 1px solid #f0f0f0;
           padding: 14px 0;
           color: #303133;
-          font-size: 13px;
         }
       }
 
@@ -1256,7 +1270,6 @@
         font-weight: 600;
         color: #409eff;
         font-family: "Courier New", monospace;
-        font-size: 14px;
         text-shadow: 0 1px 2px rgba(64, 158, 255, 0.2);
       }
 
@@ -1281,7 +1294,6 @@
       // 鏃ユ湡瀛楁鏍峰紡
       .date-cell {
         color: #909399;
-        font-size: 12px;
         font-style: italic;
       }
 
diff --git a/src/views/productionPlan/summaryByProduct/index.vue b/src/views/productionPlan/summaryByProduct/index.vue
index 62b8010..97c5001 100644
--- a/src/views/productionPlan/summaryByProduct/index.vue
+++ b/src/views/productionPlan/summaryByProduct/index.vue
@@ -1,13 +1,33 @@
 <template>
   <div class="app-container">
+    <div class="search_form">
+      <div>
+        <span class="search_title ml10">鐗╂枡缂栫爜锛�</span>
+        <el-input v-model="searchForm.materialCode"
+                  style="width: 200px"
+                  placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�"
+                  clearable />
+        <span class="search_title ml10">浜у搧鍚嶇О锛�</span>
+        <el-input v-model="searchForm.productName"
+                  style="width: 200px"
+                  placeholder="璇疯緭鍏ヤ骇鍝佸悕绉�"
+                  clearable />
+        <el-button type="primary"
+                   @click="handleQuery"
+                   style="margin-left: 10px">鎼滅储</el-button>
+        <el-button @click="handleReset">閲嶇疆</el-button>
+      </div>
+    </div>
     <div class="table_list">
       <PIMTable rowKey="materialCode"
                 :column="tableColumn"
                 :tableData="tableData"
                 :page="page"
-                height="calc(100vh - 200px)"
+                height="calc(100vh - 280px)"
                 :tableLoading="tableLoading"
                 :isSelection="false"
+                :isShowSummary="true"
+                :summaryMethod="summaryMethod"
                 @pagination="pagination">
       </PIMTable>
     </div>
@@ -46,26 +66,31 @@
       label: "闀�",
       prop: "length",
       className: "dimension-cell",
+      formatData: cell => (cell ? `${cell}mm` : ""),
     },
     {
       label: "瀹�",
       prop: "width",
       className: "dimension-cell",
+      formatData: cell => (cell ? `${cell}mm` : ""),
     },
     {
       label: "楂�",
       prop: "height",
       className: "dimension-cell",
+      formatData: cell => (cell ? `${cell}mm` : ""),
     },
     {
       label: "鍧楁暟",
       prop: "quantity",
       className: "quantity-cell",
+      formatData: cell => (cell ? `${cell}鍧梎 : ""),
     },
     {
       label: "鏂规暟",
       prop: "volume",
       className: "volume-cell",
+      formatData: cell => (cell ? `${cell}鏂筦 : ""),
     },
   ]);
   const tableData = ref([]);
@@ -78,13 +103,21 @@
 
   // 鎼滅储琛ㄥ崟
   const searchForm = reactive({
+    materialCode: "",
     productName: "",
-    productSpec: "",
   });
 
   // 鏌ヨ鍒楄〃
   /** 鎼滅储鎸夐挳鎿嶄綔 */
   const handleQuery = () => {
+    page.current = 1;
+    getList();
+  };
+
+  /** 閲嶇疆鎸夐挳鎿嶄綔 */
+  const handleReset = () => {
+    searchForm.materialCode = "";
+    searchForm.productName = "";
     page.current = 1;
     getList();
   };
@@ -109,6 +142,31 @@
       .catch(() => {
         tableLoading.value = false;
       });
+  };
+
+  // 姹囨�绘柟娉�
+  const summaryMethod = ({ columns, data }) => {
+    const sums = [];
+    columns.forEach((column, index) => {
+      if (index === 0) {
+        sums[index] = "鎬昏";
+        return;
+      }
+      if (column.property === "quantity") {
+        const total = data.reduce((acc, item) => {
+          return acc + (Number(item.quantity) || 0);
+        }, 0);
+        sums[index] = `${total}鍧梎;
+      } else if (column.property === "volume") {
+        const total = data.reduce((acc, item) => {
+          return acc + (Number(item.volume) || 0);
+        }, 0);
+        sums[index] = `${total.toFixed(4)}鏂筦;
+      } else {
+        sums[index] = "";
+      }
+    });
+    return sums;
   };
 
   onMounted(() => {
@@ -137,6 +195,16 @@
     &:hover {
       box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.08);
     }
+
+    .search_title {
+      color: #606266;
+      font-size: 14px;
+      font-weight: 500;
+    }
+
+    .ml10 {
+      margin-left: 10px;
+    }
   }
 
   .table_list {
@@ -144,7 +212,7 @@
     border-radius: 6px;
     box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
     overflow: hidden;
-    height: calc(100vh - 150px);
+    height: calc(100vh - 230px);
   }
 
   :deep(.el-table) {
@@ -162,7 +230,6 @@
         color: #ffffff;
         border-bottom: none;
         padding: 16px 0;
-        font-size: 14px;
         letter-spacing: 0.5px;
       }
     }
@@ -185,7 +252,6 @@
           border-bottom: 1px solid #f0f0f0;
           padding: 14px 0;
           color: #303133;
-          font-size: 13px;
         }
       }
 
@@ -204,7 +270,6 @@
         font-weight: 600;
         color: #409eff;
         font-family: "Courier New", monospace;
-        font-size: 14px;
         text-shadow: 0 1px 2px rgba(64, 158, 255, 0.2);
       }
 
@@ -228,7 +293,6 @@
       // 鏃ユ湡瀛楁鏍峰紡
       .date-cell {
         color: #909399;
-        font-size: 12px;
         font-style: italic;
       }
     }

--
Gitblit v1.9.3