From ea2b5a4a2779a2a94c4846b110c5507a248ffeb5 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期三, 20 三月 2024 19:50:25 +0800
Subject: [PATCH] 销售明细发货添加确认完成,格式化列表状态展示

---
 src/views/sales/salesDetails/index.vue |   43 ++++++++++++++++++++++++++++---------------
 1 files changed, 28 insertions(+), 15 deletions(-)

diff --git a/src/views/sales/salesDetails/index.vue b/src/views/sales/salesDetails/index.vue
index 719169e..82b47e0 100644
--- a/src/views/sales/salesDetails/index.vue
+++ b/src/views/sales/salesDetails/index.vue
@@ -50,6 +50,9 @@
                   <template v-if="scope.row.status === 3||scope.row.status === 4">
                     <el-button @click.stop="shipmentsClick(scope.row)" type="text" size="small">鍙戣揣</el-button>
                   </template>
+                  <template v-if="scope.row.status === 3||scope.row.status === 4">
+                    <el-button @click.stop="confirmClick(scope.row)" type="text" size="small">纭瀹屾垚</el-button>
+                  </template>
                 </template>
               </el-table-column>
             </template>
@@ -176,7 +179,8 @@
   getProductOrderInfo,
   updateStatus,
   getProjectList,
-  sendSalesDetailsToOtherSystem
+  sendSalesDetailsToOtherSystem,
+  confirmOutputOver
 } from "@/api/sales/salesDetails"
 import pageMixin from "@/components/makepager/pager/mixin/pageMixin"
 import DetailSpecification from "@/views/sales/salesDetails/DetailSpecification"
@@ -241,7 +245,7 @@
       { label: "鎵胯繍鍟�", prop: "carrier" },
       { label: "杩愬崟鍙�", prop: "waybill" },
       { label: "鍒涘缓鏃堕棿", prop: "warehouse" },
-      { label: "鐘舵��", prop: "status" },
+      { label: "鐘舵��", prop: "status",isCallMethod: true,getCallMethod: this.getStatusFive },
     ]
     // 鍒堕�犱俊鎭�
     const makeColumn = [
@@ -318,57 +322,47 @@
       {
         label: "濮斿璁㈠崟",
         prop: "outsourcingId",
-        default: true
       },
       {
         label: "浜у搧缂栧彿",
         prop: "productId",
-        default: true
       },
       {
         label: "浜у搧鍚嶇О",
         prop: "productName",
-        default: true
       },
       {
         label: "浜у搧瑙勬牸",
         prop: "specs",
-        default: true
       },
       {
         label: "浜у搧鍗曚綅",
         prop: "unit",
-        default: true
       },
       {
         label: "濮斿鏁伴噺",
         prop: "amount",
-        default: true
       },
       {
         label: "瀹屾垚鏁伴噺",
         prop: "finishAmount",
-        default: true
       },
       {
         label: "璁㈠崟鐘舵��",
         prop: "status",
-        default: true
+        default: true, isCallMethod: true, getCallMethod: this.getStatus
       },
       {
         label: "濮斿渚涘簲鍟�",
         prop: "supplierName",
-        default: true
       },
       {
         label: "绛剧害鏃ユ湡",
         prop: "startTime",
-        default: true
       },
       {
         label: "浜や粯鏃ユ湡",
         prop: "endTime",
-        default: true
       },
     ]
     return {
@@ -736,6 +730,15 @@
       this.editShipmentsConfig.infomation.saleDetailNumber=row.number
       this.editShipmentsConfig.infomation.projectId=row.projectId
     },
+    // 纭鍙戣揣瀹屾垚
+    async confirmClick(row){
+      await confirmOutputOver({saleDetailNumber:row.number}).then((res)=>{
+        if(res&&res.code===200){
+          this.$message.success("纭鍙戣揣瀹屾垚")
+          this.getData()
+        }
+      })
+    },
     // 鍏抽棴
     closeClick(row) {
       console.log(row, "鍏抽棴")
@@ -850,7 +853,7 @@
     },
     // 鐘舵��
     getStatus(val) {
-      return val === 1 ? "寰呯‘璁�" : val === 2 ? "寰呭嚭搴�" : val === 3 ? "澶囪揣涓�" : val === 4 ? "寰呭嚭搴�" : val === 5 ? "鍑哄簱瀹屾垚" : val=== 6 ? "宸插叧闂�": "--"
+      return val === 1 ? "寰呯‘璁�" : val === 2 ? "寰呭垎瑙�" : val === 3 ? "澶囪揣涓�" : val === 4 ? "寰呭嚭搴�" : val === 5 ? "鍑哄簱瀹屾垚" : val=== 6 ? "宸插叧闂�": "--"
     },
     // top 琛岀偣鍑�
     tableRowClick(row) {
@@ -867,6 +870,9 @@
         this.getProductOrderInfo(this.selectRow.number)
       } else if (this.TabsIndex == 3) {
         // 閲囪喘淇℃伅
+        this.getProductOrderInfo(this.selectRow.number)
+      }else if(this.TabsIndex == 4){
+        // 濮斿淇℃伅
         this.getProductOrderInfo(this.selectRow.number)
       }
     },
@@ -927,7 +933,14 @@
           })
         }
       })
-    }
+    },
+    getStatusFive(val) {
+      if (val) {
+        return val==0?'灏辩华':'瀹屾垚'
+      } else {
+        return "--";
+      }
+    },
   }
 }
 </script>

--
Gitblit v1.8.0