From a70881cad8fe749f41b06f221d10bb7491259256 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期一, 25 三月 2024 14:40:22 +0800
Subject: [PATCH] 发货完成状态接口联调、页面数据处理

---
 src/views/orderManageModule/orderManage/index.vue |   49 ++++++++++++++++++++++++++++++++-----------------
 1 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/src/views/orderManageModule/orderManage/index.vue b/src/views/orderManageModule/orderManage/index.vue
index 2997211..c9f67b5 100644
--- a/src/views/orderManageModule/orderManage/index.vue
+++ b/src/views/orderManageModule/orderManage/index.vue
@@ -261,13 +261,20 @@
       this.searchParam.pageSize = this.pagerOptions.pageSize
       let rsp = await outsourceOrderList(this.searchParam)
       let list = rsp
-      console.log(list)
       if (list && list.code == 200) {
         this.tableList.tableInfomation = list.data
         this.pagerOptions.totalCount = list.total
         if (list.total > 0) {
           this.selectRow = list.data[0]
-          this.getProductListMethod(list.data[0].id)
+          if (this.activeNameBottom == 1) {
+            this.getProductListMethod(this.selectRow.id)
+          } else if (this.activeNameBottom == 2) {
+            this.getMaterialApplyList(this.selectRow.number)
+          } else {
+            this.getDeliveryList(this.selectRow.id)
+          }
+        } else {
+          this.selectRow = {}
         }
         this.overview()
       }
@@ -275,7 +282,6 @@
     // 鑾峰彇浜у搧淇℃伅
     getProductListMethod(id) {
       outsourceOrderProductList({ outsourcingOrderId: id }).then((res) => {
-        console.log(res)
         if (res.code == 200) {
           this.bottomTwoTableList1.tableInfomation = res.data
         }
@@ -284,7 +290,6 @@
     // 鑾峰彇鐗╂枡鐢宠鍗�
     getMaterialApplyList(number) {
       getMaterialApplyList({ number: number }).then((res) => {
-        console.log(res)
         if (res.code == 200) {
           this.bottomTwoTableList2.tableInfomation = res.data
         }
@@ -325,12 +330,12 @@
         })
       })
     },
-    addCommonClick() {
-      alert("闇茶タ666")
-    },
     searchClick(val) {
       this.searchParam.keyword = val
       this.pagerOptions.currPage = 1
+      this.bottomTwoTableList1.tableInfomation = []
+      this.bottomTwoTableList2.tableInfomation = []
+      this.bottomTwoTableList3.tableInfomation = []
       this.getData()
     },
     tableRowClick(row, column, event) {
@@ -361,17 +366,25 @@
           confirmButtonText: "纭畾",
           cancelButtonText: "鍙栨秷",
           type: "warning"
-        }).then(() => {
-          this.changeOutsourceOrderStatus(row.number, 6, "鐢熶骇瀹屾垚鎴愬姛")
         })
+          .then(() => {
+            this.changeOutsourceOrderStatus(row.number, 6, "鐢熶骇瀹屾垚鎴愬姛")
+          })
+          .catch(() => {
+            this.$message.warning("宸插彇娑堢敓浜у畬鎴�")
+          })
       } else if (val == "鍙戣揣瀹屾垚") {
         this.$confirm("鏄惁纭鍏ㄩ儴鍙戣揣瀹屾垚?", "鎻愮ず", {
           confirmButtonText: "纭畾",
           cancelButtonText: "鍙栨秷",
           type: "warning"
-        }).then(() => {
-          this.changeOutsourceOrderStatus(row.number, 7, "鍏ㄩ儴鍙戣揣瀹屾垚鎴愬姛")
         })
+          .then(() => {
+            this.changeOutsourceOrderStatus(row.number, 7, "鍏ㄩ儴鍙戣揣瀹屾垚鎴愬姛")
+          })
+          .catch(() => {
+            this.$message.warning("宸插彇娑堝彂璐у畬鎴�")
+          })
       }
     },
     changeOutsourceOrderStatus(number, status, str) {
@@ -408,12 +421,14 @@
     },
     tabClickBottom(activeNameBottom) {
       this.activeNameBottom = activeNameBottom
-      if (activeNameBottom == 1) {
-        this.getProductListMethod(this.selectRow.id)
-      } else if (activeNameBottom == 2) {
-        this.getMaterialApplyList(this.selectRow.number)
-      } else {
-        this.getDeliveryList(this.selectRow.id)
+      if (Object.keys(this.selectRow).length > 0) {
+        if (activeNameBottom == 1) {
+          this.getProductListMethod(this.selectRow.id)
+        } else if (activeNameBottom == 2) {
+          this.getMaterialApplyList(this.selectRow.number)
+        } else {
+          this.getDeliveryList(this.selectRow.id)
+        }
       }
     },
     setTable() {

--
Gitblit v1.8.0