diff --git a/common/js/request.js b/common/js/request.js index 5d444f0..3550045 100644 --- a/common/js/request.js +++ b/common/js/request.js @@ -13,8 +13,8 @@ export default { }) let userInfo = _this.getCurUserInfo(); // request 触发前拼接 url - // args.url = 'https://www.opsoul.com:8881' + args.url; - args.url = 'http://127.0.0.1:80' + args.url; + args.url = 'https://www.opsoul.com:8881' + args.url; + // args.url = 'http://127.0.0.1:80' + args.url; // args.url = 'http://192.168.2.50:80' + args.url; if (!args.data) { @@ -448,6 +448,14 @@ export default { }) return res[1].data; }, + async qryMixAfterList(params = {}) { + let res = await uni.request({ + url: '/order/app/mix/after/list', + method: 'POST', + data: params + }) + return res[1].data; + }, async updateOrder(params = {}) { let res = await uni.request({ url: '/order/master/editOrderMaster', diff --git a/manifest.json b/manifest.json index 1ce1c75..fbe9b14 100644 --- a/manifest.json +++ b/manifest.json @@ -5,6 +5,10 @@ "versionName" : "1.0.0", "versionCode" : "100", "transformPx" : false, + "networkTimeout": { + "request": 600000, + "uploadFile": 600000 + }, "app-plus" : { /* 5+App特有相关 */ "usingComponents" : true, @@ -52,7 +56,8 @@ "appid" : "wx105ce607b514ff2a", "setting" : { "urlCheck" : false, - "minified" : true + "minified" : true, + "postcss" : true }, "usingComponents" : true, "permission" : { diff --git a/pages/order-manage/order-manage.vue b/pages/order-manage/order-manage.vue index e35a3b6..b140153 100644 --- a/pages/order-manage/order-manage.vue +++ b/pages/order-manage/order-manage.vue @@ -8,8 +8,8 @@ - - + + 全部 - + {{item.name}} ({{orderStatistics.newOrderNum}}) - ({{orderStatistics.tomorrowOrderNum}}) ({{orderStatistics.todayOrderNum}}) ({{orderStatistics.overTimeOrderNum}}) @@ -76,8 +85,8 @@ ({{orderStatistics.waitServOrderNum}}) ({{orderStatistics.servingOrderNum}}) ({{orderStatistics.waitSureOrderNum}}) - - {{orderStatistics.afterServiceNum}} + ({{orderStatistics.finishedOrderNum}}) + ({{orderStatistics.afterListNum}}) (0) @@ -87,7 +96,8 @@ {{order.goodsName}} - + + @@ -106,7 +116,7 @@ 超时未上门 超时未完单 - + 超时未接单 超时未预约 超时未上门 @@ -206,7 +216,7 @@ --> - + 售后发起中 @@ -339,8 +349,8 @@ 备注:{{order.customerRemark}} - - + + @@ -412,6 +422,12 @@ categoryList: [], categoryMultiIndex: [0, 0, 0], stateList: [{ + code: 105, + name: '监控单' + }, { + code: 104, + name: '搁置单' + }, { code: 103, name: '超时单' }, { @@ -529,37 +545,82 @@ this.loadOrderStatistics(); }, async loadMasterOrderPage(params = {}) { - params.pageSize = this.$globalData.initPageSize; - params.pageNum = this.pageNum; + // 公共条件 + params.shelveStatus = 0; params.goodsName = this.formData.orderKeywords; params.countryId = this.formData.area && this.formData.area.length > 2 ? this.formData.area[2].areaId : null; params.goodsCategoryId = this.formData.category && this.formData.category.length > 2 ? this.formData.category[2].goodsCategoryId : null; + // 状态 if (this.tabCur != null) { params.orderStatus = this.subStateList[this.tabCur].code; - } else if (this.stateCur != null) { + } else if (this.stateCur != null && (this.stateList[this.stateCur].code === 0 || this.stateList[this.stateCur].code === 100)) { params.orderStatus = this.stateList[this.stateCur].code; } + // 分页 + if ((this.stateCur != null && this.stateList[this.stateCur].code === 105) || this.tabCur === 5) { + params.pageSize = this.$globalData.initPageSize; + params.pageNum = this.pageNum; + } else { + params.pageSize = 10000; + params.pageNum = 1; + } + // 其他需要特别处理的条件 let date = new Date(); - if (this.stateCur === 1) { - // 今日单 - params.pageSize = 999; - params.pageNum = 1; - params.orderStatus = 2; - params.expectTimeStart = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00", - params.expectTimeEnd = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59" - } else if (this.stateCur === 2) { - // 明日单 - params.pageSize = 999; - params.pageNum = 1; - params.orderStatus = 2; - params.expectTimeStart = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 00:00:00", - params.expectTimeEnd = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 23:59:59" + if (this.stateCur != null) { + if (this.stateList[this.stateCur].code === 102) { + // 今日单 + params.orderStatus = 2; + params.expectTimeStart = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 00:00:00", + params.expectTimeEnd = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + " 23:59:59" + } else if (this.stateList[this.stateCur].code === 101) { + // 明日单 + params.orderStatus = 2; + params.expectTimeStart = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 00:00:00", + params.expectTimeEnd = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + (date.getDate() + 1) + " 23:59:59" + } else if (this.stateList[this.stateCur].code === 104) { + // 搁置单 + params.shelveStatus = 1; + } else if (this.stateList[this.stateCur].code === 105) { + // 监控单 + // params.orderStatuses = "2,3,4,5"; + params.filterOnlyServOrder = true; + } } try { let res = null; // 不同状态的单需要请求不同接口 - if (this.tabCur === 4 || this.tabCur === 5 || this.stateCur === 1 || this.stateCur === 2) { - // 已完成状态只查询子单,需要进行分页处理 + if (this.stateCur != null && [105].indexOf(this.stateList[this.stateCur].code) >= 0) { + // 只查询主单,需要进行分页处理 + this.$refs.loadStatusBar.showLoading(); + res = await this.$request.qryMasterOrderPage(params); + if (res && res.rows) { + let rowsLength = res.rows.length; + if (rowsLength > 0) { + this.orderList = this.orderList.concat(res.rows); + this.pageNum++; + if (rowsLength === params.pageSize) { + this.$refs.loadStatusBar.showLoadMore(); + return; + } + } + } + this.$refs.loadStatusBar.showLoadOver(); + } else if ((this.stateCur != null && [104, 103, 100, 0].indexOf(this.stateList[this.stateCur].code) >= 0) || [0, 4].indexOf(this.tabCur) >= 0) { + let funName = "qryMixOrderList"; + // 展示混合单,不做分页处理 + if (this.stateCur != null && this.stateList[this.stateCur].code === 103) { + // 超时单 + params.orderStatus = null; + params.isOverTime = true; + } else if (this.tabCur === 4) { + funName = "qryMixAfterList"; + } + res = await this.$request[funName](params); + if (res && res.data) { + this.orderList = res.data; + } + } else { + // 只查询子单,需要进行分页处理 this.$refs.loadStatusBar.showLoading(); let funName = "qryDetailOrderPage"; if (this.tabCur === 4) { @@ -578,17 +639,6 @@ } } this.$refs.loadStatusBar.showLoadOver(); - } else { - // 其他状态下的单需要展示主单及子单的混合列表,不做分页处理 - if (this.stateCur === 0) { - // 超时单 - params.orderStatus = null; - params.isOverTime = true; - } - res = await this.$request.qryMixOrderList(params); - if (res && res.data) { - this.orderList = res.data; - } } } catch (e) { console.error(e)