fix: bug修复

This commit is contained in:
Mrxtyyp 2024-03-04 10:04:10 +08:00
parent 53a74cdc93
commit 813bd77675
22 changed files with 316 additions and 91 deletions

View File

@ -47,6 +47,7 @@ export default {
}
},
fail(err) {
console.log(err);
uni.hideLoading();
uni.showToast({
title: '请求失败',
@ -811,4 +812,23 @@ export default {
})
return res[1].data;
},
// 操作流程节点
async addOrderOperate(params = {}) {
let res = await uni.request({
url: '/order/operate/app/add',
method: 'POST',
data: params
})
return res[1].data;
},
// 获取操作流程节点列表
async getOrderOperate(params = {}) {
let res = await uni.request({
url: '/order/operate/app/list',
method: 'POST',
data: params
})
return res[1].data;
}
}

View File

@ -9,7 +9,7 @@
</view>
<view class="cu-bar bg-white solid-top">
<view class="action margin-0 flex-sub text-black" data-modal="showTakeCertifiedModal"
@tap="hideModal">以后绑定</view>
@tap="hideModal">{{text}}</view>
<view class="action margin-0 flex-sub text-main-color solid-left"
data-modal="showTakeCertifiedModal" @tap="hideModal" @click="goToBindBank">立即绑定</view>
</view>
@ -21,7 +21,13 @@
<script>
export default {
name: 'vertify-bank-bind',
emits: ['reload'],
emits: ['reload', 'stillAcceptOrder'],
props: {
text: {
type: String,
default: '以后绑定'
}
},
data() {
return {
isShow: false
@ -33,6 +39,9 @@
},
hideModal(e) {
this.isShow = false;
if(this.text == '仍然接单') {
this.$emit('stillAcceptOrder')
}
},
goToBindBank() {
uni.navigateTo({

View File

@ -9,7 +9,7 @@
</view>
<view class="cu-bar bg-white solid-top">
<view class="action margin-0 flex-sub text-black" data-modal="showTakeCertifiedModal"
@tap="hideModal">以后认证</view>
@tap="hideModal">{{text}}</view>
<view class="action margin-0 flex-sub text-main-color solid-left"
data-modal="showTakeCertifiedModal" @tap="hideModal" @click="goToCertify">立即认证</view>
</view>
@ -21,7 +21,13 @@
<script>
export default {
name: 'vertify-certify',
emits: ['reload'],
emits: ['reload', 'stillAcceptOrder'],
props: {
text: {
type: String,
default: '以后认证'
}
},
data() {
return {
isShow: false
@ -33,6 +39,9 @@
},
hideModal(e) {
this.isShow = false;
if(this.text == '仍然接单') {
this.$emit('stillAcceptOrder')
}
},
goToCertify() {
uni.navigateTo({

View File

@ -57,7 +57,7 @@
</view>
<!-- 任务单 -->
<view class="margin-lr-sm margin-bottom-lg">
<view v-for="(task, index) in tasks" class="padding bg-white margin-top-sm">
<view v-for="(task, index) in tasks" :key="index" class="padding bg-white margin-top-sm">
<view class="flex justify-between">
<view class="text-lg text-bold text-cut" style="width: 70%;">{{task.goodsName}}</view>
<view class="text-right">
@ -68,7 +68,14 @@
</view>
</view>
<view class="flex justify-start" v-if="task.tag">
<view v-for="(tagContent, index1) in task.tag" class='cu-tag margin-right-xs'>{{tagContent}}</view>
<view v-for="(tagContent, index1) in task.tag" :key="index1" class='cu-tag margin-right-xs'>{{tagContent}}</view>
</view>
<view>
<view v-if="task.payType === 1" class='cu-tag margin-right-xs radius line-main-color margin-top-xs'>到付单</view>
<view v-if="task.changeMoney || task.payStatus != 1" class='cu-tag margin-right-xs radius line-red margin-top-xs'>有待付款</view>
<view v-else class='cu-tag margin-right-xs radius line-red margin-top-xs'>款已付清</view>
<view v-if="task.consultMode === '01'" class='cu-tag margin-right-xs radius line-main-color margin-top-xs'>合约订单</view>
</view>
<view class="margin-top-sm">
<text class="text-main-color text-lg margin-right-xs"><text
@ -187,8 +194,8 @@
</view>
</view>
<!-- 账户及实名弹窗 -->
<vertify-bank-bind ref="vertifyBankBind"></vertify-bank-bind>
<vertify-certify ref="vertifyCertify"></vertify-certify>
<vertify-bank-bind ref="vertifyBankBind" text="仍然接单" @stillAcceptOrder="stillAccept"></vertify-bank-bind>
<vertify-certify ref="vertifyCertify" text="仍然接单" @stillAcceptOrder="stillAccept"></vertify-certify>
</view>
</template>
@ -313,6 +320,8 @@
this.certifyInfo = certifyInfoRes.data;
let res = true;
// this.$refs.vertifyCertify.showModal();
// res = false;
if (!this.bankCard || !this.bankCard.bankNum) {
this.$refs.vertifyBankBind.showModal();
res = false;
@ -678,6 +687,7 @@
})
},
async takeTask(e, task) {
this.curTask = task;
if (!this.hasNotice) {
let checkRes = await this.checkBankAndCertify();
this.hasNotice = true;
@ -698,6 +708,24 @@
}
this.showModal(e, task);
},
async stillAccept() {
// this.showModal({currentTarget:{dataset: {modal : 'showTakeSuccessModal'}}}, this.curTask);
// console.log('still order',{
// workerId: this.curUserInfo.workerId,
// id: this.curTask.orderMasterId,
// orderStatus: 1
// });
// return;
//
let res = await this.$request.updateOrder({
workerId: this.curUserInfo.workerId,
id: this.curTask.orderMasterId,
orderStatus: 1
});
if(res.code !== 0) return;
this.reloadMasterOrderPage();
this.showModal({currentTarget:{dataset: {modal : 'showTakeSuccessModal'}}}, this.curTask);
},
contactCustomer(e) {
// uni.makePhoneCall({
// phoneNumber: this.curTask.customerPhone

View File

@ -88,7 +88,7 @@
<script>
// import inviteMaster from '../area-proxy/modal/invite-master.vue'
// 18929577155 qq880920
export default {
components: {
// inviteMaster

View File

@ -32,7 +32,7 @@
</view>
</view>
<uni-collapse ref="collapse">
<uni-collapse-item ref="collapseItem" :showArrow="false" v-for="(billItem, index) in bill" :open="openStatusArr[index] === '0' ? true : false" >
<uni-collapse-item ref="collapseItem" :showArrow="false" v-for="(billItem, index) in bill" :key="index" :open="openStatusArr[index] === '0' ? true : false" >
<template v-slot:title>
<view class="padding bg-white" :data-index="index" @click="showStatement">
<view class="margin-bottom-xs">{{billItem.createTime}}</view>
@ -46,6 +46,7 @@
</template>
<view class="content">
<view v-for="(item, index1) in billItem.statement"
:key="index1"
class="bg-white padding flex justify-between align-center solid-bottom" @click="showDetail(bill[index].statement[index1])">
<view>
<view class="flex">

View File

@ -31,7 +31,7 @@
<view v-if="formData.specsList && formData.specsList.length > 0">
<checkbox-group class="padding-lr bg-white" @change="checkSpecs"
:class="isShowAllSpecs ? '' : 'certern-height'">
<view v-for="(item, index) in formData.specsList" class="padding-tb-sm">
<view v-for="(item, index) in formData.specsList" :key="index" class="padding-tb-sm">
<view class="flex">
<view class="flex-sub">
<checkbox style="transform:scale(1)" class="margin-right-xs"
@ -149,7 +149,7 @@
</view>
<view class="padding-lr bg-white">
<checkbox-group @change="checkDistirct" class="grid col-3">
<view v-for="(item, index) in formData.districtList" class="margin-tb-xs">
<view v-for="(item, index) in formData.districtList" :key="index" class="margin-tb-xs">
<checkbox style="transform:scale(1)" class="main-color margin-right-xs" :value="index"
:checked="item.checked"></checkbox>
<text>{{item.areaName}}</text>
@ -165,7 +165,7 @@
v-model="formData.areaDesc" maxlength="-1" placeholder="如XX区XX街道未覆盖或XX区仅服务XX街道"></textarea>
</view>
<!-- 多城市 -->
<view v-for="(item,index) in servArea" class="bg-white">
<view v-for="(item,index) in servArea" :key="index" class="bg-white">
<view class="solid-top">
<view @click="delServArea(index)">
<button class="cu-btn bg-red light">
@ -177,19 +177,19 @@
<view class="title">上架区域<text class="text-red">*</text></view>
<picker :mode="'multiSelector'" @change="multiRegionChange($event, index)"
@columnchange="multiRegionColChange($event, index)"
:value="servArea[index].regionMultiIndex" :range-key="'areaName'"
:range="servArea[index].regionList">
<input disabled class="line-input radius-input" v-if="servArea[index].region"
:value="servArea[index].region && servArea[index].region.length ? servArea[index].region[0].areaName + '-' + servArea[index].region[1].areaName : ''"
:value="item.regionMultiIndex" :range-key="'areaName'"
:range="item.regionList">
<input disabled class="line-input radius-input" v-if="item.region"
:value="item.region && item.region.length ? item.region[0].areaName + '-' + item.region[1].areaName : ''"
placeholder="请选择区域"></input>
</picker>
</view>
<view class="padding-lr bg-white">
<checkbox-group @change="multiAreaCheckDistirct($event, index)" class="grid col-3">
<view v-for="(item, index1) in servArea[index].districtList" class="margin-tb-xs">
<view v-for="(item1, index1) in item.districtList" :key="item1.id" class="margin-tb-xs">
<checkbox style="transform:scale(1)" class="main-color margin-right-xs" :value="index1"
:checked="item.checked"></checkbox>
<text>{{item.areaName}}</text>
:checked="item1.checked"></checkbox>
<text>{{item1.areaName}}</text>
</view>
</checkbox-group>
</view>

View File

@ -193,7 +193,8 @@
workerId: member.workerId,
totalPay: this.dispatchTotalPrice,
orderMasterId: this.curOrder.orderMasterId,
isAll: isAll
isAll: isAll,
workerName: member.workerName || member.name
}
this.$emit('assignWork', params);
} else {

View File

@ -21,7 +21,7 @@
<view class="margin-top-sm bg-white padding">
<!-- 服务指标 -->
<checkbox-group class="block" @change="changeServIndexChecked">
<view style="min-width: 50%;" class="flex justify-start align-center margin-top-sm float-left" v-for="(item, index) in servIndex">
<view style="min-width: 50%;" class="flex justify-start align-center margin-top-sm float-left" v-for="(item, index) in servIndex" :key="index">
<checkbox style="transform:scale(1)" class="main-color margin-right-xs" :value="item.code">
</checkbox>
<text class="text-sm">{{item.desc}}</text>
@ -152,6 +152,11 @@
}
return true;
},
//
async addOrderOperate(params = {}) {
let res = await this.$request.addOrderOperate(params);
return res;
},
async finishOrder() {
if (!this.validData()) {
return;
@ -169,10 +174,13 @@
title: '提交成功',
duration: 1500
})
setTimeout(() => {
uni.navigateTo({
url: '/pages/order-manage/order-manage?tabCur=3'
this.addOrderOperate({
orderId: this.order.orderDetailId,
orderType: '02',
content: '师傅完工'
})
setTimeout(() => {
uni.navigateBack()
}, 1500);
} else if (res && res.msg) {
uni.showToast({

View File

@ -23,7 +23,7 @@
<script>
export default {
name: 'acceptOrderNotice',
emits: ['confirmFeedback'],
emits: ['confirmFeedback', 'close'],
props: {
show: {
type: Boolean,
@ -31,7 +31,7 @@
},
data: {
type: Object,
default: {}
default: () => {}
}
},
data() {
@ -39,8 +39,8 @@
}
},
methods: {
hideModal(e) {
uni.$emit(this.$globalFun.HIDE_MODAL, e);
hideModal() {
this.$emit('close');
},
contactCustomer(e) {
this.hideModal(e);

View File

@ -79,7 +79,7 @@
methods: {
hideModal(e) {
this.resetData();
uni.$emit(this.$globalFun.HIDE_MODAL, e);
this.$emit('close', e);
},
resetData() {
// this.data = null;

View File

@ -71,7 +71,7 @@
},
methods: {
hideModal(e) {
uni.$emit(this.$globalFun.HIDE_MODAL, e);
this.$emit('close', e);
},
chooseImage(e) {
uni.chooseMedia({

View File

@ -79,7 +79,7 @@
<script>
export default {
name: 'edit-time-arrange',
emits: ['showArrangeFailTime', 'editServTime'],
emits: ['showArrangeFailTime', 'editServTime', 'close'],
props: {
show: {
type: Boolean,
@ -87,7 +87,7 @@
},
data: {
type: Object,
default: {}
default: () => {}
},
curDate: {
type: String,
@ -161,7 +161,7 @@
},
hideModal(e) {
this.resetData();
uni.$emit(this.$globalFun.HIDE_MODAL, e);
this.$emit('close', e);
},
cannotArrangeTime(e) {
this.resetData();

View File

@ -122,7 +122,7 @@
},
hideModal(e) {
this.resetData();
uni.$emit(this.$globalFun.HIDE_MODAL, e);
this.$emit('close', e);
},
async resetPriceChangedInfo() {
let res = await this.$request.getChangeOrderPrice(this.data);

View File

@ -122,7 +122,7 @@
},
hideModal(e) {
this.resetData();
uni.$emit(this.$globalFun.HIDE_MODAL, e);
this.$emit('close', e);
},
async resetPriceChangedInfo() {
let res = await this.$request.getChangeOrderPrice(this.data);

View File

@ -38,7 +38,7 @@
export default {
name: 'onDoorImmediately',
emits: ['confirmFeedback'],
emits: ['confirmFeedback', 'close'],
props: {
show: {
type: Boolean,
@ -46,7 +46,7 @@
},
data: {
type: Object,
default: {}
default: () => {}
}
},
components: {
@ -59,12 +59,17 @@
}
},
methods: {
hideModal(e) {
uni.$emit(this.$globalFun.HIDE_MODAL, e);
hideModal() {
this.$emit('close');
},
minChange(e) {
this.waitMin = this.minList[e.detail.value];
},
//
async addOrderOperate(params = {}) {
let res = await this.$request.addOrderOperate(params);
return res;
},
async workBegin(e) {
let order = this.data;
let curDate = new Date();
@ -82,6 +87,11 @@
icon: 'success',
duration: 1000
})
this.addOrderOperate({
orderId: order.orderDetailId,
orderType: '02',
content: '师傅上门'
})
this.hideModal(e);
this.$emit('confirmFeedback');
}

View File

@ -80,7 +80,7 @@
methods: {
hideModal(e) {
this.resetData();
uni.$emit(this.$globalFun.HIDE_MODAL, e);
this.$emit('close', e);
},
resetData() {
this.data = null;

View File

@ -0,0 +1,54 @@
<template>
<view>
<!-- 模态框 -->
<view class="cu-modal" :class="show?'show':''">
<view class="cu-dialog">
<view class="padding-xl" style="background-color: #ffffff;">
<view class="text-bold text-lg margin-bottom-sm">任务进度</view>
<view class="cu-timeline">
<view class="cu-item text-main-color" v-for="(item, index) in arr" :key="index">
<view class="content shadow-blur" style="text-align: left;padding: 15upx 20upx;">
<view><text style="color: black;">{{item.content}}</text></view>
<text style="color: #999999;font-size: 24upx;">{{item.createTime}}</text>
</view>
</view>
</view>
</view>
<view class="cu-bar bg-white solid-top">
<view class="action margin-0 flex-sub text-black solid-left" data-modal="taskProcessDetail"
@tap="hideModal">关闭</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'taskProcessDetail',
emits: ['confirmFeedback'],
props: {
show: {
type: Boolean,
default: false
},
arr: {
type: Object,
default: () => []
}
},
data() {
return {
}
},
methods: {
hideModal(e) {
this.$emit('close', e);
}
}
}
</script>
<style>
</style>

View File

@ -64,7 +64,7 @@
},
data: {
type: Object,
default: {}
default: () => {}
}
},
data() {
@ -76,7 +76,7 @@
},
methods: {
hideModal(e) {
uni.$emit(this.$globalFun.HIDE_MODAL, e);
this.$emit('close', e);
},
chooseImage(e) {
uni.chooseMedia({

View File

@ -61,7 +61,7 @@
<script>
export default {
name: 'time-arrange',
emits: ['showArrangeFailTime', 'editServTime'],
emits: ['showArrangeFailTime', 'editServTime', 'close'],
props: {
show: {
type: Boolean,
@ -139,7 +139,7 @@
},
hideModal(e) {
this.resetData();
uni.$emit(this.$globalFun.HIDE_MODAL, e);
this.$emit('close', e);
},
cannotArrangeTime(e) {
this.resetData();

View File

@ -1,6 +1,6 @@
<template>
<page-meta :page-style="'overflow:'+(ifShowPageMeta?'hidden':'visible')"></page-meta>
<view>
<page-meta :page-style="'overflow:'+(ifShowPageMeta?'hidden':'visible')"></page-meta>
<!-- 顶部操作条 -->
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
<block slot="backText">返回</block>
@ -93,7 +93,7 @@
</scroll-view>
</view>
<!-- tab content -->
<view class="padding bg-white margin-top-sm margin-lr-sm" v-for="(order, index) in orderList">
<view class="padding bg-white margin-top-sm margin-lr-sm" v-for="(order, index) in orderList" :key="index">
<view class="flex justify-between">
<view class="text-lg text-bold text-cut">{{order.goodsName}}</view>
<!-- 不同状态订单使用不同角标 -->
@ -113,6 +113,8 @@
<view v-if="order.payType === 1" class='cu-tag margin-right-xs radius line-main-color margin-top-xs'>到付单</view>
<view v-if="order.changeMoney || order.payStatus != 1" class='cu-tag margin-right-xs radius line-red margin-top-xs'>有待付款</view>
<view v-else class='cu-tag margin-right-xs radius line-red margin-top-xs'>款已付清</view>
<view v-if="task.consultMode === '01'" class='cu-tag margin-right-xs radius line-main-color margin-top-xs'>合约订单</view>
</view>
<view>
<view v-if="order.timeout == 1" class="float-left">
@ -130,7 +132,7 @@
<view v-else-if="timeoutRecord.orderStatus === 3" class='cu-tag margin-right-xs radius line-red margin-top-xs'>超时未完单</view>
</view> -->
</view>
<view class="float-left" v-for="(afterServiceRecord, afterServiceRecordIndex) in order.afterServiceRecordList">
<view class="float-left" v-for="(afterServiceRecord, afterServiceRecordIndex) in order.afterServiceRecordList" :key="afterServiceRecord.id">
<view v-if="afterServiceRecord.createBy && !afterServiceRecord.updateBy" class='cu-tag margin-right-xs radius line-red margin-top-xs'>售后发起中</view>
<view v-if="afterServiceRecord.workerFeedbackResult == 1 && afterServiceRecord.customerFinalCheck == null" class='cu-tag margin-right-xs radius line-main-color margin-top-xs'>售后已同意</view>
<view v-if="afterServiceRecord.workerFeedbackResult == 0 && afterServiceRecord.customerFinalCheck == null" class='cu-tag margin-right-xs radius line-red margin-top-xs'>售后已拒绝</view>
@ -228,7 +230,7 @@
</view>
<view v-if="order.orderStatus === 2">
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="showServOrderDetail(order)">查看</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order)">联系客户</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="makePhoneCall(order.customerPhone)">联系客户</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)" v-show="order.orderDetailId != null">修改时间</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showOnDoorNoticeModal" @tap="showModal($event, order)" v-show="order.orderDetailId != null">立即上门</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" v-if="order.orderDetailId != null" @click="rejectDetailOrder(order)">退单</button>
@ -241,7 +243,7 @@
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click = "changePrice($event, order)" data-ref="newServPriceOnline" data-modal="showNewServPriceOnlineModal" v-show="order.orderDetailId != null && order.clockInLocation && order.payType === 0">报价/完单</button>
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click = "changePrice($event, order)" data-ref="newServPriceOffline" data-modal="showNewServPriceOfflineModal" v-show="order.orderDetailId != null && order.payType === 1">报价/完单</button> -->
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click = "changePrice($event, order)" data-ref="newServPriceOnline" data-modal="showNewServPriceOnlineModal" v-show="order.orderDetailId != null && order.payType === 0">报价/完单</button> -->
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="makePhoneCall(order)">联系客户</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @click="makePhoneCall(order.customerPhone)">联系客户</button>
<button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showEditTimeArrangeModal" @tap="showModal($event, order)" v-show="order.orderDetailId != null">重新排期</button>
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" @tap="finishOrder(order)" v-if="order.payStatus === 1" v-show="order.orderDetailId != null">发起完单</button> -->
<!-- <button class="cu-btn bg-main-color margin-right-xs shadow-blur margin-top-sm" data-modal="showPayQrcodeModal" v-if="order.payStatus === 0" @tap="makePayQrcode($event, order)" v-show="order.orderDetailId != null">生成收款码</button> -->
@ -256,7 +258,7 @@
<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 && order.orderDetailId != null" class="bg-white margin-top-sm">
<view v-for="(afterServiceRecord, afterServiceRecordIndex) in order.afterServiceRecordList">
<view v-for="(afterServiceRecord, afterServiceRecordIndex) in order.afterServiceRecordList" :key="afterServiceRecord.id">
<view v-if="afterServiceRecord.createBy == 1" class="padding-tb solid-top">
<view class='cu-tag bg-main-color radius light'>售后发起中</view>
<view v-if="afterServiceRecord.operType === 1">
@ -420,18 +422,18 @@
<load-status-bar v-show="[5,6].indexOf(tabCur) >= 0 || (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>
<!-- 模态框 -->
<agree-after-sale v-if="agreeAfterSale" :show="agreeAfterSale" :data="curOrder" @confirmFeedback="reloadMasterOrderPage"></agree-after-sale>
<reject-after-sale v-if="rejectAfterSale" :show="rejectAfterSale" :data="curOrder" @confirmFeedback="reloadMasterOrderPage"></reject-after-sale>
<time-arrange v-if="showTimeArrangeModal" :show="showTimeArrangeModal" :data="curOrder" :curDate="curDate" @showArrangeFailTime="showArrangeFailTime" @editServTime="editServTime"></time-arrange>
<time-arrange-fail v-if="showArrangeFailTimeModal" :show="showArrangeFailTimeModal" :data="curOrder"></time-arrange-fail>
<new-serv-price-online v-if="showNewServPriceOnlineModal" ref="newServPriceOnline" :show="showNewServPriceOnlineModal" :data="curOrder" @finishOrder="finishOrder"></new-serv-price-online>
<new-serv-price-offline v-if="showNewServPriceOfflineModal" ref="newServPriceOffline" :show="showNewServPriceOfflineModal" :data="curOrder" @finishOrder="finishOrder"></new-serv-price-offline>
<agree-after-sale v-if="agreeAfterSale" :show="agreeAfterSale" :data="curOrder" @confirmFeedback="reloadMasterOrderPage" @close="agreeAfterSale = false"></agree-after-sale>
<reject-after-sale v-if="rejectAfterSale" :show="rejectAfterSale" :data="curOrder" @confirmFeedback="reloadMasterOrderPage" @close="rejectAfterSale = false"></reject-after-sale>
<time-arrange v-if="showTimeArrangeModal" :show="showTimeArrangeModal" :data="curOrder" :curDate="curDate" @showArrangeFailTime="showArrangeFailTime" @editServTime="editServTime" @close="showTimeArrangeModal = false"></time-arrange>
<time-arrange-fail v-if="showArrangeFailTimeModal" :show="showArrangeFailTimeModal" :data="curOrder" @close="showArrangeFailTimeModal = false"></time-arrange-fail>
<new-serv-price-online v-if="showNewServPriceOnlineModal" ref="newServPriceOnline" :show="showNewServPriceOnlineModal" :data="curOrder" @finishOrder="finishOrder" @close="showNewServPriceOnlineModal = false"></new-serv-price-online>
<new-serv-price-offline v-if="showNewServPriceOfflineModal" ref="newServPriceOffline" :show="showNewServPriceOfflineModal" :data="curOrder" @finishOrder="finishOrder" @close="showNewServPriceOfflineModal = false"></new-serv-price-offline>
<pay-qrcode v-if="showPayQrcodeModal" ref="payQrcode" :show="showPayQrcodeModal" :data="curOrder" @finishQrPay="finishQrPay"></pay-qrcode>
<edit-time-arrange v-if="showEditTimeArrangeModal" :show="showEditTimeArrangeModal" :data="curOrder" :curDate="curDate" @showArrangeFailTime="showArrangeFailTime" @editServTime="editServTime" :ifRollback2WS="true"></edit-time-arrange>
<urgent-msg v-if="sendUrgentMsgModal" :show="sendUrgentMsgModal" @hideModal="hideModal"></urgent-msg>
<edit-time-arrange v-if="showEditTimeArrangeModal" :show="showEditTimeArrangeModal" :data="curOrder" :curDate="curDate" @showArrangeFailTime="showArrangeFailTime" @editServTime="editServTime" :ifRollback2WS="true" @close="showEditTimeArrangeModal = false"></edit-time-arrange>
<urgent-msg v-if="sendUrgentMsgModal" :show="sendUrgentMsgModal" @hideModal="sendUrgentMsgModal = false"></urgent-msg>
<pic-modal ref="showPicModal" :imgList="picModalImgList"></pic-modal>
<on-door-immediately v-if="showOnDoorNoticeModal" :show="showOnDoorNoticeModal" :data="curOrder" @confirmFeedback="reloadMasterOrderPage"></on-door-immediately>
<accept-order-notice v-if="showAcceptOrderNoticeModal" :show="showAcceptOrderNoticeModal" :data="curOrder" @confirmFeedback="setCurTab(0)"></accept-order-notice>
<on-door-immediately v-if="showOnDoorNoticeModal" :show="showOnDoorNoticeModal" :data="curOrder" @close="showOnDoorNoticeModal = false" @confirmFeedback="reloadMasterOrderPage"></on-door-immediately>
<accept-order-notice v-if="showAcceptOrderNoticeModal" :show="showAcceptOrderNoticeModal" :data="curOrder" @close="showAcceptOrderNoticeModal = false" @confirmFeedback="setCurTab(0)"></accept-order-notice>
<confirm-modal ref="ledgerAccountRemark" :showCancel="false" :showConfirm="true">
<block slot="contentView">
<view class="text-left">
@ -593,6 +595,11 @@
this.loadData();
this.bindEvent();
},
onShow() {
if(this.orderList.length){
this.reloadMasterOrderPage();
}
},
onUnload() {
this.offBindEvent();
},
@ -978,6 +985,7 @@
this.$refs[refName].showModal();
},
hideModal(e) {
console.log(e);
this.curOrder = null;
this[e.currentTarget.dataset.modal] = false;
},
@ -1025,6 +1033,11 @@
}
if (finishFlag) {
this.reloadMasterOrderPage();
// this.addOrderOperate({
// orderId: id,
// orderType: reqFunName === 'updateOrder' ? '01' : '02',
// content: ''
// })
uni.showToast({
title: '预约时间成功',
icon: 'none',
@ -1037,6 +1050,11 @@
let res = await this.$request.updateDetailOrder(params);
return res;
},
//
async addOrderOperate(params = {}) {
let res = await this.$request.addOrderOperate(params);
return res;
},
// async ledgerAccountcountdownTimeup(order = {}, index) {
// let res = await this.$request.updateDetailOrder({
// id: order.orderDetailId,
@ -1082,9 +1100,11 @@
changePopupState(e) {
this.ifShowPageMeta = e.show;
},
makePhoneCall(order) {
makePhoneCall(tel) {
console.log('order.customerPhone==='+tel);
if(!tel) return
uni.makePhoneCall({
phoneNumber: order.customerPhone
phoneNumber: tel
})
},
async makePayQrcode(e, orderInfo) {
@ -1148,6 +1168,19 @@
if (res && res.code === 0) {
this.reloadMasterOrderPage();
this.showModal(e, order);
if(funName == 'updateMasterOrder') {
this.addOrderOperate({
orderId: id,
orderType: '01',
content: `师傅接单`
})
} else {
this.addOrderOperate({
orderId: id,
orderType: '02',
content: `师傅接单`
})
}
}
},
async noticeMsg(params = {}) {
@ -1217,6 +1250,15 @@
title: '派单成功',
icon: 'success'
})
if(params.workerName) {
this.addOrderOperate({
orderId: this.curOrder.orderDetailId == null ? this.curOrder.orderMasterId : this.curOrder.orderDetailId,
orderType: this.curOrder.orderDetailId == null ? '01' : '02',
content: `师傅派单给-${params.workerName}`
})
}
return true;
} else {
uni.showToast({
@ -1245,6 +1287,11 @@
orderMasterId: orderInfo.orderMasterId,
isAll: 1
}
this.addOrderOperate({
orderId: orderInfo.orderDetailId == null ? orderInfo.orderMasterId : orderInfo.orderDetailId,
orderType: orderInfo.orderDetailId == null ? '01' : '02',
content: '师傅接单'
})
return await this.assignWork(params);
},
async rejectMasterOrder(order) {
@ -1277,6 +1324,11 @@
title: '退单成功',
duration: 1000
})
this.addOrderOperate({
orderId: order.orderDetailId,
orderType: '02',
content: '师傅退单'
})
} else {
uni.showToast({
icon: 'none',
@ -1295,6 +1347,11 @@
title: '退单成功',
duration: 1000
})
this.addOrderOperate({
orderId: order.orderMasterId,
orderType: '01',
content: '师傅退单'
})
} else {
uni.showToast({
icon: 'none',
@ -1398,6 +1455,11 @@
icon: 'success',
duration: 1000
})
this.addOrderOperate({
orderId: order.orderDetailId,
orderType: '02',
content: '打卡到达'
})
}
},
async revisit() {

View File

@ -1,27 +1,30 @@
<template>
<page-meta :page-style="'overflow:'+(ifShowPageMeta?'hidden':'visible')"></page-meta>
<view>
<page-meta :page-style="'overflow:'+(ifShowPageMeta?'hidden':'visible')"></page-meta>
<!-- 顶部操作条 -->
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">服务订单详情</block>
</cu-custom>
<!-- 任务进度跟踪 -->
<view v-if="servDetail.orderStatus === 3" class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
<uni-collapse v-model="value">
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
<uni-collapse v-if="taskListArr.length">
<uni-collapse-item :open="true">
<template v-slot:title>
<view class="cu-bar">
<view class="action bar-first-action">
<text class="cuIcon-titles text-main-color"></text> 任务进度跟踪
<text class="cuIcon-titles text-main-color"></text> <text @click.stop="showTaskDetailMdl()">任务进度跟踪</text>
</view>
</view>
</template>
<view class="cu-timeline">
<view class="cu-item text-main-color" v-for="(item, index) in servDetail.taskTraceLine">
<view class="content shadow-blur" :class="index === 0 ? 'bg-main-color light' : 'bg-gray'">
<text class="margin-right">{{item.time}}</text>
<text>{{item.action}}</text>
<view class="cu-item text-main-color" key="cu-timeline">
<!-- :class="index === 0 ? 'bg-main-color light' : 'bg-gray'" -->
<view class="content shadow-blur bg-main-color light" >
<view>
<text>{{taskListArr[taskListArr.length-1].content}}</text>
</view>
<text>{{taskListArr[taskListArr.length-1].createTime}}</text>
</view>
</view>
</view>
@ -102,7 +105,7 @@
</text>
</view>
<view class="text-sm text-gray margin-left-lg" v-if="servDetail.orderDetailId != null && servDetail.financialChangeRecords != null"
v-for="(item, index) in servDetail.financialChangeRecords">
v-for="(item, index) in servDetail.financialChangeRecords" :key="index">
<text v-if="item.payStatus === 1">加减费用:<text class="text-price margin-top-xs">+{{item.changeMoney}}</text>[订单加价]</text>
</view>
</view>
@ -128,7 +131,7 @@
<text class="cuIcon-titles text-main-color"></text> 加价记录
</view>
</view>
<view class="padding-tb-sm" v-for="(changeRecord, changeRecordIndex) in servDetail.financialChangeRecords">
<view class="padding-tb-sm" v-for="(changeRecord, changeRecordIndex) in servDetail.financialChangeRecords" :key="changeRecordIndex">
<view>
<text>加价金额</text>
<text>{{changeRecord.changeMoney}}</text>
@ -161,7 +164,7 @@
<text class="cuIcon-titles text-main-color"></text> 售后记录
</view>
</view>
<view v-for="(afterServiceRecord, afterServiceRecordIndex) in servDetail.afterServiceRecordList">
<view v-for="(afterServiceRecord, afterServiceRecordIndex) in servDetail.afterServiceRecordList" :key="afterServiceRecordIndex">
<view v-if="afterServiceRecord.createBy == 1" class="padding-tb-sm solid-top">
<view class='cu-tag bg-main-color radius light'>售后发起中</view>
<view v-if="afterServiceRecord.operType === 1">
@ -317,7 +320,7 @@
</view>
</view>
<!-- 完成记录 主单详情展示 -->
<view v-if="servDetail.orderDetailId == null" class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm" v-for="(item, index) in servDetail.orderStandardDetailList">
<view v-if="servDetail.orderDetailId == null" class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm" v-for="(item, index) in servDetail.orderStandardDetailList" :key="index">
<view class="cu-bar solid-bottom">
<view class="action bar-first-action">
<text class="cuIcon-titles text-main-color"></text> 服务记录
@ -334,7 +337,7 @@
<!-- <view class='cu-tag bg-purple radius light margin-right-sm' v-if="item.orderStatus > 3">{{item.workFinishTime}}</view> -->
</view>
<view class="margin-top-sm">
<view class="float-left" v-for="(afterServiceRecord, afterServiceRecordIndex) in item.afterServiceRecordList">
<view class="float-left" v-for="(afterServiceRecord, afterServiceRecordIndex) in item.afterServiceRecordList" :key="afterServiceRecordIndex">
<view v-if="afterServiceRecord.createBy && !afterServiceRecord.updateBy" class='cu-tag margin-right-xs radius line-red margin-top-xs'>售后发起中</view>
<view v-if="afterServiceRecord.workerFeedbackResult == 1 && afterServiceRecord.customerFinalCheck == null" class='cu-tag margin-right-xs radius line-main-color margin-top-xs'>售后已同意</view>
<view v-if="afterServiceRecord.workerFeedbackResult == 0 && afterServiceRecord.customerFinalCheck == null" class='cu-tag margin-right-xs radius line-red margin-top-xs'>售后已拒绝</view>
@ -371,7 +374,7 @@
<text class="cuIcon-title text-main-color"></text> 加价记录
</view>
</view>
<view class="padding-tb-sm" v-for="(changeRecord, changeRecordIndex) in item.financialChangeRecord">
<view class="padding-tb-sm" v-for="(changeRecord, changeRecordIndex) in item.financialChangeRecord" :key="changeRecordIndex">
<view>
<text>加价金额</text>
<text>{{changeRecord.changeMoney}}</text>
@ -405,7 +408,7 @@
{{item.afterServiceRecordList[0].operType === 1 ? '退款记录' : '售后记录'}}
</view>
</view>
<view v-for="(afterServiceRecord, afterServiceRecordIndex) in item.afterServiceRecordList">
<view v-for="(afterServiceRecord, afterServiceRecordIndex) in item.afterServiceRecordList" :key="afterServiceRecordIndex">
<view v-if="afterServiceRecord.createBy == 1" class="padding-tb-sm solid-top">
<view class='cu-tag bg-main-color radius light'>售后发起中</view>
<view v-if="afterServiceRecord.operType === 1">
@ -593,7 +596,7 @@
</view> -->
<uni-popup ref="orderManage" type="bottom" @change="changePopupState">
<view class="bg-white text-center bottom-option-list-bar">
<view v-for="(menu,index) in orderManageMenu" class="padding solid-bottom" :data-action="menu.action" :data-modal="menu.modal" @click="clickOrderManageMenu">
<view v-for="(menu,index) in orderManageMenu" :key="index" class="padding solid-bottom" :data-action="menu.action" :data-modal="menu.modal" @click="clickOrderManageMenu">
{{menu.name}}
</view>
</view>
@ -602,7 +605,9 @@
</uni-popup>
<!-- 模态框 -->
<urgent-msg :show="sendUrgentMsgModal" @hideModal="hideModal"></urgent-msg>
<apply-extra-charge v-if="applyExtraChargeModal" :show="applyExtraChargeModal" :data="servDetail"></apply-extra-charge>
<apply-extra-charge v-if="applyExtraChargeModal" :show="applyExtraChargeModal" :data="servDetail" @close="applyExtraChargeModal = false"></apply-extra-charge>
<task-process-detail :show="taskProcessDetail" :arr="taskListArr" @hideModal="hideModal" @close="taskProcessDetail = false"></task-process-detail>
</view>
</template>
@ -610,12 +615,14 @@
import productPicked from '@/components/goods-card/product-picked.vue';
import urgentMsg from '@/pages/order-manage/modal/urgent-msg.vue';
import applyExtraCharge from '@/pages/order-manage/modal/apply-extra-charge.vue';
import taskProcessDetail from '@/pages/order-manage/modal/task_process_detail.vue'
export default {
components: {
productPicked,
urgentMsg,
applyExtraCharge
applyExtraCharge,
taskProcessDetail
},
data() {
return {
@ -653,7 +660,9 @@
],
sendUrgentMsgModal: false,
overtimeRecords: null,
applyExtraChargeModal: false
applyExtraChargeModal: false,
taskProcessDetail: false,
taskListArr: []
}
},
onLoad(options) {
@ -667,6 +676,11 @@
this.offBindEvent();
},
methods: {
//
async showTaskDetailMdl() {
this.taskProcessDetail = true
},
bindEvent() {
uni.$on(this.$globalFun.HIDE_MODAL, this.hideModal);
},
@ -689,6 +703,15 @@
id: orderId
});
this.servDetail = servDetailRes.data;
this.getProcessData()
},
async getProcessData() {
const isDetail = this.order.orderDetailId == null
const res = await this.$request.getOrderOperate({
orderId: isDetail ? this.order.orderMasterId : this.order.orderDetailId,
orderType: isDetail ? '01' : '02'
})
this.taskListArr = res.rows;
},
changePopupState(e) {
this.ifShowPageMeta = e.show;