dingdong-mall/pages/my/serv-detail.vue

563 lines
23 KiB
Vue
Raw Normal View History

2022-09-26 23:52:16 +08:00
<template>
2022-06-06 22:09:43 +08:00
<page-meta :page-style="'overflow:'+(ifShowPageMeta?'hidden':'visible')"></page-meta>
2022-04-23 23:13:29 +08:00
<view>
<!-- 顶部操作条 -->
<cu-custom :bgColor="'bg-main-color'" :isBack="true">
<block slot="backText">返回</block>
<block slot="content">服务订单详情</block>
</cu-custom>
<!-- 任务进度跟踪 -->
2022-06-18 02:03:35 +08:00
<view v-if="servDetail.orderStatus === 3" class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
2022-04-23 23:13:29 +08:00
<uni-collapse v-model="value">
<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> 任务进度跟踪
</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>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<!-- 服务单概况 -->
<view class="bg-white margin-lr-sm margin-top-sm padding">
2022-09-26 23:52:16 +08:00
<view class="flex align-center">
<text class="text-xl margin-right">{{servDetail.goodsName}}</text>
<view class='cu-tag bg-purple radius light margin-right-sm' v-if="servDetail.orderStatus === 3">服务中
</view>
<view class='cu-tag bg-purple radius light margin-right-sm' v-if="servDetail.orderStatus === 2">待上门
</view>
<view class='cu-tag bg-grey radius light margin-right-sm' v-if="servDetail.orderStatus === 6">已取消</view>
2022-04-23 23:13:29 +08:00
</view>
2022-06-18 02:03:35 +08:00
<!-- <view class="margin-top-sm">
2022-04-23 23:13:29 +08:00
<view v-for="(item, index) in servDetail.mainServOrder.orderTag" class='cu-tag radius margin-right-sm'>
{{item}}</view>
2022-06-18 02:03:35 +08:00
</view> -->
2022-09-26 23:52:16 +08:00
<view class="margin-top-sm">
<text class="cuIcon-location text-main-color margin-right-xs"></text>
2023-03-18 23:58:52 +08:00
<text>{{servDetail.address}}</text>
<text class="margin-left-sm text-xl text-main-color" @click="showAddress2Choose"><text class="cuIcon-edit"></text></text>
2022-09-26 23:52:16 +08:00
</view>
<view class="margin-top-sm">
<text class="cuIcon-people text-main-color margin-right-xs"></text>
<text class="margin-right-sm">{{servDetail.workerName}}</text>
2023-03-18 23:58:52 +08:00
<text>{{servDetail.workerPhone}}</text>
<text class="margin-left-sm text-xl text-main-color" @click="makePhoneCall(servDetail.workerPhone)"><text class="cuIcon-phone"></text></text>
2022-09-26 23:52:16 +08:00
</view>
<view class="margin-top-sm">
<text class="cuIcon-time text-main-color margin-right-xs"></text>
2022-10-27 00:45:08 +08:00
<text v-if="servDetail.expectTimeEndFront">预约时间{{servDetail.expectTimeStartFront + '~' + servDetail.expectTimeEndFront}}</text>
<text v-else>预约时间{{servDetail.expectTimeStartFront}}</text>
2022-04-23 23:13:29 +08:00
</view>
2022-06-18 02:03:35 +08:00
<!-- <view class="margin-top-sm">
2022-04-23 23:13:29 +08:00
<text class="cuIcon-time text-main-color margin-right-xs"></text>
<text>排单时间{{servDetail.mainServOrder.boodTime}}</text>
2022-06-18 02:03:35 +08:00
</view> -->
2022-09-26 23:52:16 +08:00
<!-- <view class="margin-top-sm" v-if="servDetail.orderStatus === 3">
<text class="cuIcon-time text-main-color margin-right-xs"></text>
<text>上门时间{{servDetail.workBeginTime}}</text>
</view> -->
<view class="margin-top-sm">
<text class="cuIcon-moneybag text-main-color margin-right-xs"></text>
<text>订单金额</text>
2022-09-26 23:52:16 +08:00
<text class="text-price">{{servDetail.payMoney}}</text>
</view>
<view class="margin-top-sm" v-if="servDetail.customerRemark">
<text class="cuIcon-message text-main-color margin-right-xs"></text>
<text>备注{{servDetail.customerRemark}}</text>
2022-04-23 23:13:29 +08:00
</view>
2022-06-18 02:03:35 +08:00
<!-- <view class="margin-top-xs text-sm text-gray"
2022-04-23 23:13:29 +08:00
v-for="(item, index) in servDetail.mainServOrder.gratuityRecord">
追加费用<text class="text-price">{{item.price}}</text>[{{item.type}}]
2022-06-18 02:03:35 +08:00
</view> -->
2022-04-23 23:13:29 +08:00
</view>
<!-- 待服务列 -->
2022-09-26 23:52:16 +08:00
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
<view class="cu-bar solid-bottom">
<view class="action bar-first-action">
<text class="cuIcon-titles text-main-color"></text> 商品信息
</view>
2022-04-23 23:13:29 +08:00
</view>
2022-09-26 23:52:16 +08:00
<view class="margin-top-sm">
<simple-product-picked :product="servDetail" :pickedList="servDetail.standardList"
:columnTitleArr="servingColumnHeaders" :valFieldArr="servingValFields"></simple-product-picked>
</view>
</view>
<!-- 子单完成记录 -->
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm"
v-for="(item, index) in servDetail.orderStandardDetailList">
<view class="cu-bar solid-bottom">
<view class="action bar-first-action">
2022-10-06 03:06:21 +08:00
<text class="cuIcon-titles text-main-color"></text> 服务记录
</view>
<view class='cu-tag bg-gray radius light' v-if="item.orderStatus == 6">已取消</view>
2022-09-26 23:52:16 +08:00
<view class='cu-tag bg-purple radius light margin-right-sm'>编码:{{item.orderDetailCode}}</view>
</view>
<view class="margin-top-sm">
<view>师傅{{item.workerName}}</view>
2023-03-18 23:58:52 +08:00
<view class="margin-top-sm">联系方式{{item.workerPhone}}<text class="margin-left-sm text-xl text-main-color" @click="makePhoneCall(item.workerPhone)"><text class="cuIcon-phone"></text></text></view>
2022-10-30 15:36:30 +08:00
<view class="margin-top-sm" v-if="item.expectTimeEndFront">预约时间{{item.expectTimeStartFront + '~' + item.expectTimeEndFront}}</view>
<view class="margin-top-sm" v-else>预约时间{{item.expectTimeStartFront}}</view>
2022-09-26 23:52:16 +08:00
<view class="margin-top-sm" v-if="servDetail.orderStatus >= 3">上门时间{{item.workBeginTime}}</view>
<view class="margin-top-sm" v-if="servDetail.orderStatus >= 4">完成时间{{item.workFinishTime}}</view>
<simple-product-picked :pickedList="item.orderStandardList" :columnTitleArr="servedColumnHeaders"
:valFieldArr="servedValFields"></simple-product-picked>
</view>
<view v-if="item.financialChangeRecord && item.financialChangeRecord.length > 0" class="bg-white">
<view class="cu-bar solid-bottom">
<view class="action bar-first-action">
<text class="cuIcon-title text-main-color"></text> 加价记录
</view>
</view>
<view class="padding-tb-sm" v-for="(changeRecord, changeRecordIndex) in item.financialChangeRecord">
<view>
<text>加价金额</text>
<text>{{changeRecord.changeMoney}}</text>
</view>
<view>
<text>加价备注</text>
<text>{{changeRecord.remark}}</text>
</view>
</view>
2022-09-26 23:52:16 +08:00
</view>
<view v-if="servDetail.orderStatus > 3 && item.finishImgList && item.finishImgList.length" class="bg-white">
<view class="cu-bar solid-bottom">
<view class="action bar-first-action">
<text class="cuIcon-title text-main-color"></text> 完工图片
</view>
</view>
<view class="grid col-3 grid-square flex-sub margin-top-sm">
<view class="bg-img" v-for="(imgUrl, index) in item.finishImgList" :key="index">
<image :src="imgUrl" @tap="viewImage($event, [imgUrl])" :data-url="imgUrl" mode="aspectFill">
</image>
</view>
</view>
<view>
<text>备注{{item.remark}}</text>
</view>
</view>
<view v-if="item.afterServiceRecordList && item.afterServiceRecordList.length" class="bg-white">
<view class="cu-bar">
<view class="action bar-first-action">
<text class="cuIcon-title text-main-color"></text>
{{item.afterServiceRecordList[0].operType === 1 ? '退款记录' : '售后记录'}}
</view>
</view>
<view v-for="(afterServiceRecord, afterServiceRecordIndex) in item.afterServiceRecordList">
<view v-if="afterServiceRecord.createBy == 1" class="padding-tb-sm solid-top">
2022-10-06 23:42:02 +08:00
<view class='cu-tag bg-main-color radius light'>售后发起中</view>
2022-10-06 03:06:21 +08:00
<view v-if="afterServiceRecord.operType === 1">
<view class="text-gray text-sm margin-bottom-xs">退单退款已提交至商家其最大时限24小时内需完成操作</view>
2022-09-26 23:52:16 +08:00
<view class="flex justify-start align-end">
<text>退款申请</text>
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
:day="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).day"
:hour="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).hour"
:minute="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).min"
:second="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).seconds">
</uni-countdown>
</view>
<view>
<text>退款金额</text>
<text>{{afterServiceRecord.refund}}</text>
</view>
<view>
<text>退款原因</text>
<text>{{afterServiceRecord.customerReason}}</text>
</view>
<view class="grid col-3 grid-square flex-sub margin-top-sm">
<view class="bg-img" v-for="(imgObj, imgIndex) in afterServiceRecord.imgsList"
:key="imgIndex" v-if="imgObj.imgUploadBy === 1">
<image :src="imgObj.imgUrl" @tap="viewImage($event, [imgObj.imgUrl])"
:data-url="imgObj.imgUrl" mode="aspectFill"></image>
</view>
</view>
</view>
2022-10-06 03:06:21 +08:00
<view v-else-if="afterServiceRecord.operType === 2">
<view class="text-gray text-sm margin-bottom-xs">售后已提交至商家其最大时限24小时内需完成操作</view>
2022-09-26 23:52:16 +08:00
<view class="flex justify-start align-end">
<text>待处理售后</text>
<uni-countdown :show-colon="false" :backgroundColor="'#eee'"
:day="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).day"
:hour="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).hour"
:minute="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).min"
:second="$dateUtil.countDownDiff($dateUtil.addHours(afterServiceRecord.createTime, 24)).seconds">
</uni-countdown>
</view>
<view>
<text>售后原因</text>
<text>{{afterServiceRecord.customerReason}}</text>
</view>
<view>
<text>完成操作点击处理完成提交由客服回访</text>
</view>
<view class="grid col-3 grid-square flex-sub margin-top-sm">
<view class="bg-img" v-for="(imgObj, imgIndex) in afterServiceRecord.imgsList"
:key="imgIndex" v-if="imgObj.imgUploadBy === 1">
<image :src="imgObj.imgUrl" @tap="viewImage($event, [imgObj.imgUrl])"
:data-url="imgObj.imgUrl" mode="aspectFill"></image>
</view>
</view>
</view>
<view class="flex justify-end align-end margin-tb-sm">
<button class="cu-btn sm bg-yellow margin-left" v-show="afterServiceRecord.customerFinalCheck !== 1"
@click="cancelAfterService(afterServiceRecord.id)">撤销</button>
2022-09-26 23:52:16 +08:00
</view>
</view>
<view v-if="afterServiceRecord.updateBy == 2" class="padding-tb-sm solid-top">
2022-09-26 23:52:16 +08:00
<view class='cu-tag bg-main-color radius light'>师傅反馈</view>
<view v-if="afterServiceRecord.operType === 1">
<view class="margin-top-xs">
<text>师傅反馈结果</text>
2023-04-19 23:40:44 +08:00
<text v-if="afterServiceRecord.workerFeedbackResult === 0">拒绝</text>
<text v-else-if="afterServiceRecord.workerFeedbackResult === 1">同意</text>
<text v-else-if="afterServiceRecord.workerFeedbackResult === 2">重新上门</text>
2022-09-26 23:52:16 +08:00
</view>
<view v-if="afterServiceRecord.workerFeedbackResult === 1">
<text>同意退款金额</text>
2022-10-06 23:42:02 +08:00
<text>{{afterServiceRecord.agreedRefund ? afterServiceRecord.agreedRefund : afterServiceRecord.refund}}</text>
2022-09-26 23:52:16 +08:00
</view>
2023-04-19 23:40:44 +08:00
<view v-if="afterServiceRecord.workerFeedbackResult !== 2">
2022-09-26 23:52:16 +08:00
<text>师傅反馈</text>
<text v-if="afterServiceRecord.workerFeedbackReasonType === 1">客户原因</text>
<text v-else-if="afterServiceRecord.workerFeedbackReasonType === 2">师傅原因</text>
<text v-else>其他</text>
<text
v-if="afterServiceRecord.workerFeedbackReason">{{"" + afterServiceRecord.workerFeedbackReason}}</text>
</view>
<view class="grid col-3 grid-square flex-sub margin-top-sm">
<view class="bg-img" v-for="(imgObj, imgIndex) in afterServiceRecord.imgsList"
:key="imgIndex" v-if="imgObj.imgUploadBy === 2">
<image :src="imgObj.imgUrl" @tap="viewImage($event, [imgObj.imgUrl])"
:data-url="imgObj.imgUrl" mode="aspectFill"></image>
</view>
</view>
</view>
<view v-else-if="afterServiceRecord.operType === 2">
<view class="margin-top-xs">
<text>师傅反馈结果</text>
2023-04-19 23:40:44 +08:00
<text v-if="afterServiceRecord.workerFeedbackResult === 0">拒绝</text>
<text v-else-if="afterServiceRecord.workerFeedbackResult === 1">同意</text>
<text v-else-if="afterServiceRecord.workerFeedbackResult === 2">重新上门</text>
2022-09-26 23:52:16 +08:00
</view>
2023-04-19 23:40:44 +08:00
<view v-if="afterServiceRecord.workerFeedbackResult !== 2">
2022-09-26 23:52:16 +08:00
<text>师傅反馈</text>
<text v-if="afterServiceRecord.workerFeedbackReasonType === 1">客户原因</text>
<text v-else-if="afterServiceRecord.workerFeedbackReasonType === 2">师傅原因</text>
<text v-else>其他</text>
<text
v-if="afterServiceRecord.workerFeedbackReason">{{"" + afterServiceRecord.workerFeedbackReason}}</text>
</view>
<view class="grid col-3 grid-square flex-sub margin-top-sm">
<view class="bg-img" v-for="(imgObj, imgIndex) in afterServiceRecord.imgsList"
:key="imgIndex" v-if="imgObj.imgUploadBy === 2">
<image :src="imgObj.imgUrl" @tap="viewImage($event, [imgObj.imgUrl])"
:data-url="imgObj.imgUrl" mode="aspectFill"></image>
</view>
</view>
</view>
2022-10-06 03:06:21 +08:00
<view class="flex justify-end align-end margin-tb-sm">
2022-10-17 23:21:35 +08:00
<button class="cu-btn sm bg-yellow margin-right-sm" v-if="afterServiceRecord.customerFinalCheck != 1"
2022-09-26 23:52:16 +08:00
@click="afterServiceFinalCheck(afterServiceRecord.id, 1)">同意</button>
2022-10-06 23:42:02 +08:00
<button class="cu-btn sm bg-yellow margin-right-sm" v-if="afterServiceRecord.customerFinalCheck == null"
@click="afterServiceFinalCheck(afterServiceRecord.id, 0)">不同意</button>
2022-10-06 23:42:02 +08:00
<button class="cu-btn sm bg-yellow margin-right-sm" v-else-if="afterServiceRecord.customerFinalCheck == 0" disabled type="">已申请平台介入</button>
2022-09-26 23:52:16 +08:00
</view>
</view>
<view v-if="afterServiceRecord.customerFinalCheck != null" class="padding-tb-sm solid-top">
2022-09-26 23:52:16 +08:00
<view class='cu-tag bg-main-color radius light'>客户最终确认</view>
<view class="margin-top-xs">{{afterServiceRecord.customerFinalCheck === 1 ? '同意' : '不同意'}}
</view>
<view class="text-red" v-if="afterServiceRecord.customerFinalCheck === 0">订单已申请平台介入</view>
<view v-else-if="afterServiceRecord.customerFinalCheck === 1">
<view v-if="afterServiceRecord.originalRefund > 0">
<view>
<text>本单退款系统已发起原路退回</text>
<text class="text-red">{{afterServiceRecord.originalRefund}}</text>
<text>有其余部分的以双方沟通操作为准银行按工作日到帐节假日顺延到账</text>
</view>
<view>支付时间{{afterServiceRecord.refundApplyTime}}</view>
</view>
<view v-else-if="afterServiceRecord.originalRefund == 0 && servDetail.payStatus == 0">
<text>本单未支付实际退回0.00</text>
</view>
</view>
2022-09-26 23:52:16 +08:00
</view>
</view>
</view>
</view>
<!-- 订单编码和时间 -->
<view class="bg-white margin-top-sm padding margin-lr-sm margin-bottom-with-bar">
<view>订单编码{{servDetail.orderMasterCode}}</view>
<view class="margin-top-xs">订单时间{{servDetail.createTime}}</view>
</view>
<!-- 底部操作栏 -->
<view class="cu-bar tabbar margin-bottom-xl bg-white fixed-bottom-bar">
<view class="action" data-popup="orderManage" @click="togglePopup">
<view class="cuIcon-list"></view> 订单管理
</view>
<view class="action" data-modal="sendUrgentMsgModal" @click="showModal">
<view class="cuIcon-mail">
<view class="cu-tag badge" v-if="servDetail.talkMsgNum > 0">{{servDetail.talkMsgNum}}</view>
</view>
发送急报
</view>
<!-- <view class="bg-main-color submit">立即上门</view> -->
</view>
<uni-popup ref="orderManage" type="bottom" @change="changePopupState">
2022-10-06 03:06:21 +08:00
<view class="bg-white text-center tabbar" style="z-index: 99;">
<view v-if="servDetail.orderStatus < 2" class="padding solid-bottom" @click="decideIfCancelOrder" style="z-index: 99;">
取消订单
</view>
<view v-if="servDetail.orderStatus < 3" class="padding solid-bottom" @click="applyAfterService" style="z-index: 99;">
发起投诉
</view>
<view v-if="servDetail.orderStatus >= 3" class="padding solid-bottom" @click="applyAfterService" style="z-index: 99;">
发起投诉/售后
</view>
<view v-if="servDetail.orderStatus >= 2 || servDetail.orderStatus < 5" class="padding solid-bottom" style="z-index: 99;"
@click="applyForRefund">
退单退款
</view>
</view>
<view class="fixed-bottom-bar cu-bar bg-white" style="z-index: 98;"></view>
2022-09-26 23:52:16 +08:00
</uni-popup>
<!-- 模态框 -->
<urgent-msg :show="sendUrgentMsgModal" @hideModal="hideModal"></urgent-msg>
2022-06-06 22:09:43 +08:00
<confirm-modal ref="confirmModal" :content="'是否确定取消订单?'" @confirm="cancelOrder"></confirm-modal>
2022-09-26 23:52:16 +08:00
<apply-after-service ref="applyAfterService" :data="servDetail"
@confirmFeedback="loadData(servDetail.orderMasterId)" @cancel="blurCurOrder"></apply-after-service>
2022-04-23 23:13:29 +08:00
</view>
</template>
2022-09-26 23:52:16 +08:00
<script>
import simpleProductPicked from '@/components/goods-card/simple-product-picked.vue';
import urgentMsg from '@/pages/my/components/modal/urgent-msg.vue';
import applyAfterService from '@/pages/my/components/modal/apply-after-service.vue';
2022-04-23 23:13:29 +08:00
export default {
2022-09-26 23:52:16 +08:00
components: {
simpleProductPicked,
urgentMsg,
applyAfterService
2022-04-23 23:13:29 +08:00
},
data() {
return {
2022-09-26 23:52:16 +08:00
value: ['0'],
2022-06-18 02:03:35 +08:00
order: {},
2022-09-26 23:52:16 +08:00
servDetail: {},
finishRecord4Show: [],
servingColumnHeaders: ['购买型号', '购买量', '待服务'],
servedColumnHeaders: ['购买型号', '派单量', '已服务'],
2022-09-26 23:52:16 +08:00
servingValFields: ['standardName', 'standardNum', 'waitServerNum'],
servedValFields: ['standardName', 'standardNum', 'serverNum'],
process: '',
ifShowPageMeta: false,
2022-06-06 22:09:43 +08:00
sendUrgentMsgModal: false
2022-04-23 23:13:29 +08:00
}
},
2022-06-18 02:03:35 +08:00
onLoad(options) {
2022-09-26 23:52:16 +08:00
if (options && options.order) {
this.order = JSON.parse(decodeURIComponent(options.order));
}
2023-03-18 23:58:52 +08:00
this.loadData(this.order.orderMasterId);
this.bindEvent();
},
onUnload() {
this.offBindEvent();
2022-04-23 23:13:29 +08:00
},
2023-03-18 23:58:52 +08:00
methods: {
bindEvent() {
uni.$on(this.$globalFun.CHOOSE_ADDRESS, this.editAddress);
},
offBindEvent() {
uni.$off(this.$globalFun.CHOOSE_ADDRESS);
},
2022-06-18 02:03:35 +08:00
async loadData(orderMasterId) {
2022-09-26 23:52:16 +08:00
// this.servDetail = await this.$api.data('servDetail');
// this.finishList4Show = this.servDetail.finishRecord;
// for (let i = 0; i < this.finishList4Show.length; i++) {
// let finishList = this.finishList4Show[i].finishList;
// for (let j = 0; j < finishList.length; j++) {
// finishList[j].secondColumnNum = finishList[j].servedNum;
// }
// this.finishList4Show[i].finishList = finishList;
// }
let servDetailRes = await this.$request.getOrderMasterDetail({
id: orderMasterId
});
2022-06-18 02:03:35 +08:00
this.servDetail = servDetailRes.data;
2022-09-26 23:52:16 +08:00
},
changePopupState(e) {
this.ifShowPageMeta = e.show;
},
togglePopup(e) {
let targetPopup = null;
if (typeof e === 'string') {
targetPopup = e;
} else {
targetPopup = e.currentTarget.dataset.popup;
}
if (this.ifShowPageMeta) {
this.$refs[targetPopup].close();
} else {
this.$refs[targetPopup].open();
}
},
showModal(e) {
this[e.currentTarget.dataset.modal] = true;
},
hideModal(e) {
this[e.currentTarget.dataset.modal] = false;
},
decideIfCancelOrder() {
this.$refs.confirmModal.showModal();
},
viewImage(e, imgList) {
uni.previewImage({
urls: imgList,
current: e.currentTarget.dataset.url
});
},
async cancelOrder(e) {
let res = await this.$request.cancelMasterOrder({
orderMasterId: this.servDetail.orderMasterId
});
if (res && res.code === 0) {
this.togglePopup('orderManage');
this.loadData(this.servDetail.orderMasterId);
uni.showToast({
title: '取消成功',
icon: 'success',
duration: 2000
})
} else {
uni.showToast({
title: '取消失败',
icon: 'error'
})
}
},
async afterServiceFinalCheck(id, agreeStatus) {
let res = await this.$request.editAfterServiceRecord({
id: id,
customerFinalCheck: agreeStatus
});
2022-10-15 01:43:07 +08:00
if (res && res.code === 0) {
2022-10-06 03:06:21 +08:00
this.loadData(this.servDetail.orderMasterId);
2022-10-06 23:42:02 +08:00
if (agreeStatus == 1) {
uni.showToast({
icon: 'none',
2022-10-15 01:43:07 +08:00
duration: 3000,
2022-10-06 23:42:02 +08:00
title: '涉及退款部分将按付款原路退回,请留意'
})
}
2022-09-26 23:52:16 +08:00
return;
2022-10-15 01:43:07 +08:00
}
if (res && res.msg){
uni.showToast({
icon: 'none',
duration: 3000,
title: res.msg
})
} else {
uni.showToast({
icon: 'error',
duration: 1000
})
2022-09-26 23:52:16 +08:00
}
},
applyAfterService() {
this.showModalByRef('applyAfterService', this.servDetail, {
afterServiceType: 2,
toUpdateStatus: false
})
},
applyForRefund() {
this.showModalByRef('applyAfterService', this.servDetail, {
afterServiceType: 1,
toUpdateStatus: false
})
},
showModalByRef(refName, curOrder, params) {
this.$refs[refName].showModal(curOrder, params);
2022-10-06 03:06:21 +08:00
},
async cancelAfterService(id) {
let res = await this.$request.delAfterServiceRecord(id);
if (res && res.code === 0) {
this.loadData(this.servDetail.orderMasterId);
uni.showToast({
icon: 'success',
title: '撤销成功',
duration: 1000
})
} else {
uni.showToast({
icon: 'error',
title: '撤销失败',
duration: 1000
})
}
2023-03-18 23:58:52 +08:00
},
showAddress2Choose() {
uni.navigateTo({
url: '/pages/my/my-address?chooseMode=true'
})
},
editAddress(addressInfo) {
console.log(addressInfo)
// let res = await this.$request.updateOrder({
// id: order.orderMasterId,
// orderStatus: status
// });
// if (res && res.code === 0) {
// this.reload();
// if (ifRollback) {
// uni.showToast({
// title: '订单已回滚至服务中状态,请联系师傅',
// icon: 'none',
// duration: 3000
// })
// }
// }
2023-03-18 23:58:52 +08:00
},
makePhoneCall(phoneNum) {
uni.makePhoneCall({
phoneNumber: phoneNum
})
}
2022-04-23 23:13:29 +08:00
}
}
</script>
<style scoped>
.bar-first-action {
margin-left: unset !important;
font-size: 30rpx !important;
2022-09-26 23:52:16 +08:00
}
.cu-bar.tabbar .action {
font-size: 22rpx;
position: relative;
flex: 1;
text-align: center;
padding: 0;
display: block;
height: auto;
line-height: 1;
margin: 0;
background-color: inherit;
overflow: initial;
z-index: 99;
2022-04-23 23:13:29 +08:00
}
</style>