From 2aa506566031eae9a53006119db0cea8c876e6c3 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期一, 01 四月 2024 11:42:23 +0800 Subject: [PATCH] 选择产品信息单位处理 --- src/views/orderManageModule/orderManage/index.vue | 53 ++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 36 insertions(+), 17 deletions(-) diff --git a/src/views/orderManageModule/orderManage/index.vue b/src/views/orderManageModule/orderManage/index.vue index 2997211..46950f2 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() { @@ -516,6 +531,10 @@ ? "鐢熶骇瀹屾垚" : val === 7 ? "鍙戣揣瀹屾垚" + : val == 8 + ? "鍏ュ簱瀹屾垚" + : val == 9 + ? "鍏抽棴" : "--" } } -- Gitblit v1.8.0