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/common/untils/request.js | 1 -
vue.config.js | 2 +-
src/views/other/login/index.vue | 4 +---
src/views/orderManageModule/orderManage/index.vue | 49 ++++++++++++++++++++++++++++++++-----------------
4 files changed, 34 insertions(+), 22 deletions(-)
diff --git a/src/common/untils/request.js b/src/common/untils/request.js
index 92567d0..eddca89 100644
--- a/src/common/untils/request.js
+++ b/src/common/untils/request.js
@@ -59,7 +59,6 @@
/* //杩斿洖鐘舵�佸垽鏂�(娣诲姞鍝嶅簲鎷︽埅鍣�) */
Axios.interceptors.response.use(
(res) => {
- console.log("99999", res)
/* //瀵瑰搷搴旀暟鎹仛浜涗簨 */
if (res.data.code === 200) {
return res.data ? res.data : {}
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() {
diff --git a/src/views/other/login/index.vue b/src/views/other/login/index.vue
index df4544e..dd4d2f1 100644
--- a/src/views/other/login/index.vue
+++ b/src/views/other/login/index.vue
@@ -154,16 +154,14 @@
captcha: this.formLogin.code,
captchaId: this.captchaId
}).then((res) => {
- console.log(res, "dddd")
if (res.code == 200) {
- console.log(res, "8888")
this.$message.success("鐧诲綍鎴愬姛")
localStorage.setItem("token", res.data.token)
localStorage.setItem("username", res.data.user.username)
localStorage.setItem("uuid", res.data.user.id)
setTimeout(() => {
this.$router.push({ path: "/orderManageModule/orderManage" })
- }, 2000)
+ }, 1000)
} else {
this.$message.warning(res.msg)
if (res.msg == "楠岃瘉鐮侀敊璇�") {
diff --git a/vue.config.js b/vue.config.js
index 5e19cbe..40cc61e 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -21,7 +21,7 @@
// changeOrigin: true
// },
"/api-outsourcing": {
- target: "http://192.168.20.120:8008",
+ target: "http://192.168.20.119:8009",
ws: true,
changeOrigin: true
},
--
Gitblit v1.8.0