1、未约未排及搁置单查询主单加子单的混合单
2、监控单过滤掉全派给自己的主单 3、子单的售后情况不在除售后单栏外的其他状态栏展示 4、进入售后中,超时中的监控单都带一个“监”字
This commit is contained in:
parent
dbb4dd13a3
commit
630f68b135
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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" : {
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
</cu-custom>
|
||||
<view class="sticky-bar" :style="[{top: stickyTop + 'px'}]">
|
||||
<!-- 条件筛选栏 -->
|
||||
<view class="padding bg-white solid-bottom">
|
||||
<view class="flex justify-start align-center">
|
||||
<view class="padding-tb bg-white solid-bottom">
|
||||
<view class="flex justify-start align-center padding-lr">
|
||||
<text class="margin-right-xs inline-lable">全部</text>
|
||||
<!-- <my-uni-combox class="inline-combox margin-right-xs" :candidates="stateList" placeholder="请选择"
|
||||
v-model="formData.state"></my-uni-combox>
|
||||
|
|
@ -26,7 +26,8 @@
|
|||
placeholder="请选择品类"></input>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="flex justify-between align-center margin-top-xs">
|
||||
<view class="flex justify-between align-center margin-top-xs padding-left">
|
||||
<view class="flex justify-between align-center" style="flex-basis: 55%;">
|
||||
<input class="line-input radius-input margin-right-sm" v-model="formData.orderKeywords"
|
||||
placeholder="请输入订单关键字"></input>
|
||||
<view class="text-xl text-bold">
|
||||
|
|
@ -34,13 +35,21 @@
|
|||
<text class="cuIcon-refresh" @click="resetConditions"></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cu-list grid no-border col-2 padding-top-sm bg-white" style="flex-basis: 42%;">
|
||||
<view class="cu-item" :class="index==stateCur?'bg-main-color light cur':''" v-for="(item,index) in stateList" :key="index" :data-id="index" @tap="statusSelect" v-if="item.code > 103">
|
||||
<view class="margin-bottom-xs">{{item.name}}</view>
|
||||
<view v-if="item.code === 105">({{orderStatistics.monitoredOrderNum}})</view>
|
||||
<view v-else-if="item.code === 104">({{orderStatistics.shelvedOrderNum}})</view>
|
||||
<view v-else>(0)</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 状态分类tab -->
|
||||
<view class="cu-list grid no-border col-5 padding-top-sm bg-white">
|
||||
<view class="cu-item" :class="index==stateCur?'bg-main-color light cur':''" v-for="(item,index) in stateList" :key="index" :data-id="index" @tap="statusSelect">
|
||||
<view class="cu-item" :class="index==stateCur?'bg-main-color light cur':''" v-for="(item,index) in stateList" :key="index" :data-id="index" @tap="statusSelect" v-if="item.code <= 103">
|
||||
<view class="margin-bottom-xs">{{item.name}}</view>
|
||||
<view v-if="item.code === 0">({{orderStatistics.newOrderNum}})</view>
|
||||
<!-- <view v-else-if="item.code === 100">{{orderStatistics.}}</view> -->
|
||||
<view v-else-if="item.code === 101">({{orderStatistics.tomorrowOrderNum}})</view>
|
||||
<view v-else-if="item.code === 102">({{orderStatistics.todayOrderNum}})</view>
|
||||
<view v-else-if="item.code === 103">({{orderStatistics.overTimeOrderNum}})</view>
|
||||
|
|
@ -76,8 +85,8 @@
|
|||
<text v-else-if="item.code === 2">({{orderStatistics.waitServOrderNum}})</text>
|
||||
<text v-else-if="item.code === 3">({{orderStatistics.servingOrderNum}})</text>
|
||||
<text v-else-if="item.code === 4">({{orderStatistics.waitSureOrderNum}})</text>
|
||||
<text v-else-if="item.code === 5"></text>
|
||||
<text v-else-if="item.other === 0">{{orderStatistics.afterServiceNum}}</text>
|
||||
<text v-else-if="item.code === 5">({{orderStatistics.finishedOrderNum}})</text>
|
||||
<text v-else-if="item.other === 0">({{orderStatistics.afterListNum}})</text>
|
||||
<text v-else>(0)</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
|
@ -87,7 +96,8 @@
|
|||
<view class="flex justify-between">
|
||||
<view class="text-lg text-bold text-cut">{{order.goodsName}}</view>
|
||||
<!-- 不同状态订单使用不同角标 -->
|
||||
<view v-if="order.orderStatus === 0" class="right-tag padding-lr-sm padding-tb-xs bg-cyan">新</view>
|
||||
<view v-if="([2, 5].indexOf(stateCur) >= 0 || tabCur === 4) && order.orderDetailId == null" class="right-tag padding-lr-sm padding-tb-xs bg-orange">监</view>
|
||||
<view v-else-if="order.orderStatus === 0" class="right-tag padding-lr-sm padding-tb-xs bg-cyan">新</view>
|
||||
<view v-else-if="order.orderStatus === 1" class="right-tag padding-lr-sm padding-tb-xs bg-main-color">未</view>
|
||||
<view v-else-if="order.orderStatus === 2" class="right-tag padding-lr-sm padding-tb-xs bg-yellow">待</view>
|
||||
<view v-else-if="order.orderStatus === 3" class="right-tag padding-lr-sm padding-tb-xs bg-purple">服</view>
|
||||
|
|
@ -106,7 +116,7 @@
|
|||
<view v-else-if="order.orderStatus === 2" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未上门</view>
|
||||
<view v-else-if="order.orderStatus === 3" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未完单</view>
|
||||
</view>
|
||||
<view class="float-left" v-if="order.orderTimeoutRecords" v-for="(timeoutRecord, recordIndex) in order.orderTimeoutRecords">
|
||||
<view class="float-left" v-else-if="order.orderTimeoutRecords" v-for="(timeoutRecord, recordIndex) in order.orderTimeoutRecords">
|
||||
<view v-if="timeoutRecord.orderStatus === 0" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未接单</view>
|
||||
<view v-else-if="timeoutRecord.orderStatus === 1" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未预约</view>
|
||||
<view v-else-if="timeoutRecord.orderStatus === 2" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未上门</view>
|
||||
|
|
@ -206,7 +216,7 @@
|
|||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)">修改时间</button>
|
||||
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm">立即上门</button>
|
||||
</view> -->
|
||||
<view v-if="order.afterServiceRecordList && order.afterServiceRecordList.length" class="bg-white margin-top-sm">
|
||||
<view v-if="order.afterServiceRecordList && order.afterServiceRecordList.length && order.orderDetailId != null" class="bg-white margin-top-sm">
|
||||
<view v-for="(afterServiceRecord, afterServiceRecordIndex) in order.afterServiceRecordList">
|
||||
<view v-if="afterServiceRecord.createBy == 1" class="padding-tb solid-top">
|
||||
<view class='cu-tag bg-main-color radius light'>售后发起中</view>
|
||||
|
|
@ -339,8 +349,8 @@
|
|||
<text>备注:{{order.customerRemark}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view :class="tabCur !== 4 ? 'cu-tabbar-height' : ''"></view>
|
||||
<load-status-bar v-show="tabCur === 4 || tabCur === 5" ref="loadStatusBar" @loadMore="loadMasterOrderPage"></load-status-bar>
|
||||
<load-status-bar v-show="tabCur === 5 || (stateCur != null && stateList[stateCur].code === 105)" ref="loadStatusBar" @loadMore="loadMasterOrderPage"></load-status-bar>
|
||||
<view v-show="tabCur !== 5 && stateCur !== 0" class="cu-tabbar-height"></view>
|
||||
<!-- 模态框 -->
|
||||
<time-arrange :show="showTimeArrangeModal" :data="curOrder" :curDate="curDate" @showArrangeFailTime="showArrangeFailTime" @editServTime="editServTime"></time-arrange>
|
||||
<time-arrange-fail :show="showArrangeFailTimeModal" :data="curOrder"></time-arrange-fail>
|
||||
|
|
@ -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;
|
||||
}
|
||||
let date = new Date();
|
||||
if (this.stateCur === 1) {
|
||||
// 今日单
|
||||
params.pageSize = 999;
|
||||
// 分页
|
||||
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 != 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.stateCur === 2) {
|
||||
} else if (this.stateList[this.stateCur].code === 101) {
|
||||
// 明日单
|
||||
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"
|
||||
} 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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue