From a3014a01e07619105d597d0c51cf195217b0806f Mon Sep 17 00:00:00 2001
From: wankeda <Administrator@DESKTOP-HAU3ST3>
Date: 星期二, 29 七月 2025 10:47:01 +0800
Subject: [PATCH] 1

---
 WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 50 insertions(+), 9 deletions(-)

diff --git a/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue b/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue
index f40e3f9..67f59b2 100644
--- a/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue
+++ b/WMS/WIDESEA_WMSClient/src/extension/outbound/extend/outOrderDetail.vue
@@ -14,13 +14,13 @@
               <span>宸查�変腑 {{ selection.length }} 椤�</span>
             </el-col>
             <el-col :span="8">
-              <el-link
+              <!-- <el-link
                 type="primary"
                 size="small"
                 style="float: right; height: 20px"
                 @click="lockstocks"
                 >閿佸畾搴撳瓨</el-link
-              >
+              > -->
               <el-link
                 type="primary"
                 size="small"
@@ -43,6 +43,8 @@
         <el-table
           ref="singleTable"
           :data="tableData"
+          :summary-method="getSummaries"
+          show-summary
           style="width: 100%; height: 100%"
           highlight-current-row
           @current-change="handleCurrentChange"
@@ -165,11 +167,17 @@
           width: 90,
         },
         {
+          prop: "unit",
+          title: "鍗曚綅",
+          type: "string",
+          width: 90,
+        },
+        {
           prop: "orderDetailStatus",
           title: "璁㈠崟鏄庣粏鐘舵��",
           type: "tag",
           width: 180,
-          bindKey:"orderDetailStatusEnum"
+          bindKey: "orderDetailStatusEnum",
         },
         {
           prop: "assignStock",
@@ -221,11 +229,11 @@
         Foots: "",
         total: 0,
         // 2020.08.29澧炲姞鑷畾涔夊垎椤垫潯澶у皬
-        sizes: [30, 60, 100, 120],
-        size: 30, // 榛樿鍒嗛〉澶у皬
+        sizes: [60, 100, 120],
+        size: 60, // 榛樿鍒嗛〉澶у皬
         Wheres: [],
         page: 1,
-        rows: 30,
+        rows: 60,
       },
       searchFormOptions: [
         [
@@ -265,6 +273,34 @@
       this.getDictionaryData();
       this.getData();
     },
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '鍚堣'
+          return
+        }
+        
+        // 浠呭鏁板�煎垪姹傚拰
+        // 浠呭鏌愪竴鍒楁眰鍜�
+        if (column.property === 'lockQuantity' || column.property === 'overOutQuantity' || column.property === 'orderQuantity') {
+          const values = data.map(item => Number(item[column.property]))
+        console.log(values);
+        if (!values.every(value => isNaN(value))) {
+          sums[index] = values.reduce((prev, curr) => {
+            return prev + (isNaN(curr) ? 0 : curr)
+          }, 0)
+        } else {
+          sums[index] = '-'
+        }
+        }
+        
+      })
+
+      return sums
+    },
     getData() {
       var wheres = [{ name: "orderId", value: this.row.id }];
       var param = {
@@ -284,6 +320,7 @@
       if (column.prop == "assignStock") {
         this.$refs.child.open(row);
       } else {
+        //鐐瑰嚮鎵撳紑鍑哄簱璇︽儏
         this.$refs.selectedStock.open(row);
       }
     },
@@ -308,9 +345,9 @@
         return this.$message.error("璇烽�夋嫨鍗曟嵁鏄庣粏");
       }
       var keys = this.selection.map((item) => item.id); // 鑾峰彇閫変腑琛岀殑id
-
+console.log(keys);
       this.http
-        .post("api/Task/GenerateOutboundTasks", keys, "鏁版嵁澶勭悊涓�")
+        .post("api/Task/WMSGenerateOutboundTask", keys, "鏁版嵁澶勭悊涓�")
         .then((x) => {
           if (!x.status) return this.$message.error(x.message);
           this.$message.success("鎿嶄綔鎴愬姛");
@@ -331,7 +368,8 @@
         if (
           row.orderDetailStatus !== 0 &&
           row.orderDetailStatus !== 60 &&
-          row.orderDetailStatus !== 70
+          row.orderDetailStatus !== 70 &&
+          row.orderDetailStatus !== 80
         ) {
           return true;
         } else {
@@ -375,6 +413,7 @@
         var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey);
         if (item) {
           var dicItem = item.data.find((x) => x.key == row[column.prop]);
+          console.log(dicItem);
           if (dicItem) {
             return dicItem.value;
           } else {
@@ -398,9 +437,11 @@
 .text-button:hover {
   background-color: #f0f9eb !important;
 }
+
 .el-table .warning-row {
   background: oldlace;
 }
+
 .box-table .el-table tbody tr:hover > td {
   background-color: #d8e0d4 !important;
   /* color: #ffffff; */

--
Gitblit v1.9.3