售后完善

This commit is contained in:
donqi 2022-09-26 23:52:16 +08:00
parent e0db5cb26d
commit b877f7417e
4 changed files with 402 additions and 300 deletions

View File

@ -610,5 +610,17 @@ export default {
data: params data: params
}) })
return res[1].data; return res[1].data;
}, },
async editAfterServiceRecord(params = {}) {
let res = await uni.request({
url: '/worker/record/edit',
method: 'POST',
data: params,
header: {
pageNum: params.pageNum,
pageSize: params.pageSize
}
})
return res[1].data;
}
} }

View File

@ -31,7 +31,7 @@
<view v-else-if="product.payMoney" class="flex justify-start align-center"> <view v-else-if="product.payMoney" class="flex justify-start align-center">
<text class="text-price text-red text-bold text-xl">{{product.payMoney}}</text> <text class="text-price text-red text-bold text-xl">{{product.payMoney}}</text>
</view> </view>
<view class="padding-xs"> <view class="padding-xs" v-if="product.deptGoodsCategoryName">
<view class='cu-tag light bg-blue'> <view class='cu-tag light bg-blue'>
<text v-if="product.parGoodsCategoryName"> <text v-if="product.parGoodsCategoryName">
{{product.parGoodsCategoryName}} {{product.parGoodsCategoryName}}

View File

@ -190,8 +190,9 @@
} }
} }
uni.showToast({ uni.showToast({
icon: 'error', title: '无法对同一个订单重复发起售后或退款',
duration: 1000 icon: 'none',
duration: 2000
}) })
} }
}, },

View File

@ -1,4 +1,4 @@
<template> <template>
<page-meta :page-style="'overflow:'+(ifShowPageMeta?'hidden':'visible')"></page-meta> <page-meta :page-style="'overflow:'+(ifShowPageMeta?'hidden':'visible')"></page-meta>
<view> <view>
<!-- 顶部操作条 --> <!-- 顶部操作条 -->
@ -30,45 +30,47 @@
</view> </view>
<!-- 服务单概况 --> <!-- 服务单概况 -->
<view class="bg-white margin-lr-sm margin-top-sm padding"> <view class="bg-white margin-lr-sm margin-top-sm padding">
<view class="flex align-center"> <view class="flex align-center">
<text class="text-xl margin-right">{{servDetail.goodsName}}</text> <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 === 3">服务中
<view class='cu-tag bg-purple radius light margin-right-sm' v-if="servDetail.orderStatus === 2">待上门</view> </view>
<view class='cu-tag bg-grey radius light margin-right-sm' v-if="servDetail.orderStatus === 6">已取消</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>
</view> </view>
<!-- <view class="margin-top-sm"> <!-- <view class="margin-top-sm">
<view v-for="(item, index) in servDetail.mainServOrder.orderTag" class='cu-tag radius margin-right-sm'> <view v-for="(item, index) in servDetail.mainServOrder.orderTag" class='cu-tag radius margin-right-sm'>
{{item}}</view> {{item}}</view>
</view> --> </view> -->
<view class="margin-top-sm"> <view class="margin-top-sm">
<text class="cuIcon-location text-main-color margin-right-xs"></text> <text class="cuIcon-location text-main-color margin-right-xs"></text>
<text>{{servDetail.address}}</text> <text>{{servDetail.address}}</text>
</view> </view>
<view class="margin-top-sm"> <view class="margin-top-sm">
<text class="cuIcon-people text-main-color margin-right-xs"></text> <text class="cuIcon-people text-main-color margin-right-xs"></text>
<text class="margin-right-sm">{{servDetail.workerName}}</text> <text class="margin-right-sm">{{servDetail.workerName}}</text>
<text>{{servDetail.workerPhone}}</text> <text>{{servDetail.workerPhone}}</text>
</view> </view>
<view class="margin-top-sm"> <view class="margin-top-sm">
<text class="cuIcon-time text-main-color margin-right-xs"></text> <text class="cuIcon-time text-main-color margin-right-xs"></text>
<text>预约时间{{servDetail.expectTimeStart + '~' + servDetail.expectTimeEnd}}</text> <text>预约时间{{servDetail.expectTimeStart + '~' + servDetail.expectTimeEnd}}</text>
</view> </view>
<!-- <view class="margin-top-sm"> <!-- <view class="margin-top-sm">
<text class="cuIcon-time text-main-color margin-right-xs"></text> <text class="cuIcon-time text-main-color margin-right-xs"></text>
<text>排单时间{{servDetail.mainServOrder.boodTime}}</text> <text>排单时间{{servDetail.mainServOrder.boodTime}}</text>
</view> --> </view> -->
<!-- <view class="margin-top-sm" v-if="servDetail.orderStatus === 3"> <!-- <view class="margin-top-sm" v-if="servDetail.orderStatus === 3">
<text class="cuIcon-time text-main-color margin-right-xs"></text> <text class="cuIcon-time text-main-color margin-right-xs"></text>
<text>上门时间{{servDetail.workBeginTime}}</text> <text>上门时间{{servDetail.workBeginTime}}</text>
</view> --> </view> -->
<view class="margin-top-sm"> <view class="margin-top-sm">
<text class="cuIcon-moneybag text-main-color margin-right-xs"></text> <text class="cuIcon-moneybag text-main-color margin-right-xs"></text>
<text>任务金额</text> <text>任务金额</text>
<text class="text-price">{{servDetail.payMoney}}</text> <text class="text-price">{{servDetail.payMoney}}</text>
</view> </view>
<view class="margin-top-sm" v-if="servDetail.customerRemark"> <view class="margin-top-sm" v-if="servDetail.customerRemark">
<text class="cuIcon-message text-main-color margin-right-xs"></text> <text class="cuIcon-message text-main-color margin-right-xs"></text>
<text>备注{{servDetail.customerRemark}}</text> <text>备注{{servDetail.customerRemark}}</text>
</view> </view>
<!-- <view class="margin-top-xs text-sm text-gray" <!-- <view class="margin-top-xs text-sm text-gray"
v-for="(item, index) in servDetail.mainServOrder.gratuityRecord"> v-for="(item, index) in servDetail.mainServOrder.gratuityRecord">
@ -76,292 +78,354 @@
</view> --> </view> -->
</view> </view>
<!-- 待服务列 --> <!-- 待服务列 -->
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm"> <view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
<view class="cu-bar solid-bottom"> <view class="cu-bar solid-bottom">
<view class="action bar-first-action"> <view class="action bar-first-action">
<text class="cuIcon-titles text-main-color"></text> 商品信息 <text class="cuIcon-titles text-main-color"></text> 商品信息
</view> </view>
</view>
<view class="margin-top-sm">
<simple-product-picked :product="servDetail" :pickedList="servDetail.standardList" :columnTitleArr="servingColumnHeaders" :valFieldArr="servingValFields"></simple-product-picked>
</view> </view>
</view> <view class="margin-top-sm">
<!-- 子单完成记录 --> <simple-product-picked :product="servDetail" :pickedList="servDetail.standardList"
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm" v-for="(item, index) in servDetail.orderStandardDetailList"> :columnTitleArr="servingColumnHeaders" :valFieldArr="servingValFields"></simple-product-picked>
<view class="cu-bar solid-bottom"> </view>
<view class="action bar-first-action"> </view>
<text class="cuIcon-titles text-main-color"></text> 施工记录 <!-- 子单完成记录 -->
<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">
<text class="cuIcon-titles text-main-color"></text> 施工记录
</view>
<view class='cu-tag bg-purple radius light margin-right-sm'>编码:{{item.orderDetailCode}}</view>
</view>
<view class="margin-top-sm">
<view>师傅{{item.workerName}}</view>
<view class="margin-top-sm">联系方式{{item.workerPhone}}</view>
<view class="margin-top-sm">预约时间{{item.expectTimeStart + '~' + item.expectTimeEnd}}</view>
<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="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 solid-top">
<view class='cu-tag bg-main-color radius light'>客户发起</view>
<view v-if="afterServiceRecord.operType === 1">
<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>
<view v-else-if="afterServiceRecord.operType === 2">
<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>
<view v-if="afterServiceRecord.updateBy == 2" class="padding-tb solid-top">
<view class='cu-tag bg-main-color radius light'>师傅反馈</view>
<view v-if="afterServiceRecord.operType === 1">
<view class="margin-top-xs">
<text>师傅反馈结果</text>
<text>{{afterServiceRecord.workerFeedbackResult === 1 ? '同意' : '拒绝'}}</text>
</view>
<view v-if="afterServiceRecord.workerFeedbackResult === 1">
<text>同意退款金额</text>
<text>{{afterServiceRecord.agreedRefund}}</text>
</view>
<view>
<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>
<text>{{afterServiceRecord.workerFeedbackResult === 1 ? '同意' : '拒绝'}}</text>
</view>
<view>
<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 class="flex justify-end align-end margin-tb-sm"
v-if="afterServiceRecord.updateBy && afterServiceRecord.customerFinalCheck == null">
<button class="cu-btn sm bg-yellow margin-right-sm"
@click="afterServiceFinalCheck(afterServiceRecord.id, 1)">同意</button>
<button class="cu-btn sm bg-yellow margin-right-sm"
@click="afterServiceFinalCheck(afterServiceRecord.id, 0)">不同意</button>
</view>
</view>
<view v-if="afterServiceRecord.customerFinalCheck != null" class="padding-tb solid-top">
<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>
</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">
<view class="cu-bar tabbar bg-white">
<view class="bg-white text-center" style="width: 100%; z-index: 99;">
<view v-if="servDetail.orderStatus < 2" class="padding solid-bottom" @click="decideIfCancelOrder">
取消订单
</view>
<view v-if="servDetail.orderStatus < 4" class="padding solid-bottom" @click="applyAfterService">
发起投诉
</view>
<view v-if="servDetail.orderStatus >= 4" class="padding solid-bottom" @click="applyAfterService">
发起售后/投诉
</view>
<view v-if="servDetail.orderStatus >= 2 || servDetail.orderStatus < 5" class="padding solid-bottom"
@click="applyForRefund">
退单退款
</view>
</view> </view>
<view class='cu-tag bg-purple radius light margin-right-sm'>编码:{{item.orderDetailCode}}</view> <view class="bg-white fixed-bottom-popup"></view>
</view> </view>
<view class="margin-top-sm"> </uni-popup>
<view>师傅{{item.workerName}}</view> <!-- 模态框 -->
<view class="margin-top-sm">联系方式{{item.workerPhone}}</view> <urgent-msg :show="sendUrgentMsgModal" @hideModal="hideModal"></urgent-msg>
<view class="margin-top-sm">预约时间{{item.expectTimeStart + '~' + item.expectTimeEnd}}</view>
<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="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" class="solid-top padding-tb">
<view v-if="afterServiceRecord.createBy == 1">
<view class='cu-tag bg-main-color radius light'>客户发起</view>
<view v-if="afterServiceRecord.operType === 1">
<view class="margin-top-sm">
<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 class="margin-top-sm">
<text>退款金额</text>
<text>{{afterServiceRecord.refund}}</text>
</view>
<view class="margin-top-sm">
<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">
<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="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 class="margin-top-sm">
<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">
<image :src="imgObj.imgUrl" @tap="viewImage($event, [imgObj.imgUrl])" :data-url="imgObj.imgUrl" mode="aspectFill"></image>
</view>
</view>
</view>
</view>
<view v-if="afterServiceRecord.updateBy == 2">
<view class='cu-tag bg-main-color radius light'>师傅反馈</view>
<view v-if="afterServiceRecord.operType === 1">
<view class="margin-top-sm">
<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 class="margin-top-sm">
<text>退款金额</text>
<text>{{afterServiceRecord.agreedRefund ? afterServiceRecord.agreedRefund : afterServiceRecord.refund}}</text>
</view>
<view class="margin-top-sm">
<text>退款原因</text>
<text>{{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">
<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="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.workerFeedbackReason}}</text>
</view>
<view class="margin-top-sm">
<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">
<image :src="imgObj.imgUrl" @tap="viewImage($event, [imgObj.imgUrl])" :data-url="imgObj.imgUrl" mode="aspectFill"></image>
</view>
</view>
</view>
</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 bg-white tabbar border fixed-bottom-bar">
<view class="action" data-popup="orderManage" @click="togglePopup" v-if="servDetail.orderStatus < 2">
<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">
<view class="cu-bar bg-white tabbar border fixed-bottom-bar">
<view class="bg-white text-center" style="width: 100%;">
<view v-for="(menu,index) in orderManageMenu" class="padding solid-bottom" :data-action="menu.action" @click="clickOrderManageMenu">
{{menu.name}}
</view>
</view>
</view>
</uni-popup>
<!-- 模态框 -->
<urgent-msg :show="sendUrgentMsgModal" @hideModal="hideModal"></urgent-msg>
<confirm-modal ref="confirmModal" :content="'是否确定取消订单?'" @confirm="cancelOrder"></confirm-modal> <confirm-modal ref="confirmModal" :content="'是否确定取消订单?'" @confirm="cancelOrder"></confirm-modal>
<apply-after-service ref="applyAfterService" :data="servDetail"
@confirmFeedback="loadData(servDetail.orderMasterId)" @cancel="blurCurOrder"></apply-after-service>
</view> </view>
</template> </template>
<script> <script>
import simpleProductPicked from '@/components/goods-card/simple-product-picked.vue'; import simpleProductPicked from '@/components/goods-card/simple-product-picked.vue';
import urgentMsg from '@/pages/my/components/modal/urgent-msg.vue'; import urgentMsg from '@/pages/my/components/modal/urgent-msg.vue';
import applyAfterService from '@/pages/my/components/modal/apply-after-service.vue';
export default { export default {
components: { components: {
simpleProductPicked, simpleProductPicked,
urgentMsg urgentMsg,
applyAfterService
}, },
data() { data() {
return { return {
value: ['0'], value: ['0'],
order: {}, order: {},
servDetail: {}, servDetail: {},
finishRecord4Show: [], finishRecord4Show: [],
servingColumnHeaders: ['购买型号', '购买量', '待服务'], servingColumnHeaders: ['购买型号', '购买量', '待服务'],
servedColumnHeaders: ['购买型号', '购买量', '已服务'], servedColumnHeaders: ['购买型号', '购买量', '已服务'],
servingValFields: ['standardName', 'standardNum', 'waitServerNum'], servingValFields: ['standardName', 'standardNum', 'waitServerNum'],
servedValFields: ['standardName', 'standardNum', 'serverNum'], servedValFields: ['standardName', 'standardNum', 'serverNum'],
process: '', process: '',
ifShowPageMeta: false, ifShowPageMeta: false,
orderManageMenu: [{
name: '取消订单',
action: 'decideIfCancelOrder'
}],
sendUrgentMsgModal: false sendUrgentMsgModal: false
} }
}, },
onLoad(options) { onLoad(options) {
if (options && options.order) { if (options && options.order) {
this.order = JSON.parse(decodeURIComponent(options.order)); this.order = JSON.parse(decodeURIComponent(options.order));
} }
this.loadData(this.order.orderMasterId); this.loadData(this.order.orderMasterId);
}, },
methods: { methods: {
async loadData(orderMasterId) { async loadData(orderMasterId) {
// this.servDetail = await this.$api.data('servDetail'); // this.servDetail = await this.$api.data('servDetail');
// this.finishList4Show = this.servDetail.finishRecord; // this.finishList4Show = this.servDetail.finishRecord;
// for (let i = 0; i < this.finishList4Show.length; i++) { // for (let i = 0; i < this.finishList4Show.length; i++) {
// let finishList = this.finishList4Show[i].finishList; // let finishList = this.finishList4Show[i].finishList;
// for (let j = 0; j < finishList.length; j++) { // for (let j = 0; j < finishList.length; j++) {
// finishList[j].secondColumnNum = finishList[j].servedNum; // finishList[j].secondColumnNum = finishList[j].servedNum;
// } // }
// this.finishList4Show[i].finishList = finishList; // this.finishList4Show[i].finishList = finishList;
// } // }
let servDetailRes = await this.$request.getOrderMasterDetail({ let servDetailRes = await this.$request.getOrderMasterDetail({
id: orderMasterId id: orderMasterId
}); });
this.servDetail = servDetailRes.data; this.servDetail = servDetailRes.data;
}, },
changePopupState(e) { changePopupState(e) {
this.ifShowPageMeta = e.show; this.ifShowPageMeta = e.show;
}, },
togglePopup(e) { togglePopup(e) {
let targetPopup = null; let targetPopup = null;
if (typeof e === 'string') { if (typeof e === 'string') {
targetPopup = e; targetPopup = e;
} else { } else {
targetPopup = e.currentTarget.dataset.popup; targetPopup = e.currentTarget.dataset.popup;
} }
if (this.ifShowPageMeta) { if (this.ifShowPageMeta) {
this.$refs[targetPopup].close(); this.$refs[targetPopup].close();
} else { } else {
this.$refs[targetPopup].open(); this.$refs[targetPopup].open();
} }
}, },
showModal(e) { showModal(e) {
this[e.currentTarget.dataset.modal] = true; this[e.currentTarget.dataset.modal] = true;
}, },
hideModal(e) { hideModal(e) {
this[e.currentTarget.dataset.modal] = false; this[e.currentTarget.dataset.modal] = false;
}, },
clickOrderManageMenu(e) { decideIfCancelOrder() {
this[e.currentTarget.dataset.action](e); this.$refs.confirmModal.showModal();
}, },
decideIfCancelOrder() { viewImage(e, imgList) {
this.$refs.confirmModal.showModal(); uni.previewImage({
}, urls: imgList,
viewImage(e, imgList) { current: e.currentTarget.dataset.url
uni.previewImage({ });
urls: imgList, },
current: e.currentTarget.dataset.url async cancelOrder(e) {
}); let res = await this.$request.cancelMasterOrder({
}, orderMasterId: this.servDetail.orderMasterId
async cancelOrder(e) { });
let res = await this.$request.cancelMasterOrder({ if (res && res.code === 0) {
orderMasterId: this.servDetail.orderMasterId this.togglePopup('orderManage');
}); this.loadData(this.servDetail.orderMasterId);
if (res && res.code === 0) { uni.showToast({
this.togglePopup('orderManage'); title: '取消成功',
this.loadData(this.servDetail.orderMasterId); icon: 'success',
uni.showToast({ duration: 2000
title: '取消成功', })
icon: 'success', } else {
duration: 2000 uni.showToast({
}) title: '取消失败',
} else { icon: 'error'
uni.showToast({ })
title: '取消失败', }
icon: 'error' },
}) async afterServiceFinalCheck(id, agreeStatus) {
} let res = await this.$request.editAfterServiceRecord({
id: id,
customerFinalCheck: agreeStatus
});
if (res && res.code === 0) {
uni.showToast({
icon: 'success',
duration: 1000
})
this.loadData(this.servDetail.orderMasterId);
return;
}
uni.showToast({
icon: 'error',
duration: 1000
})
},
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);
} }
} }
} }
@ -371,5 +435,30 @@
.bar-first-action { .bar-first-action {
margin-left: unset !important; margin-left: unset !important;
font-size: 30rpx !important; font-size: 30rpx !important;
}
.fixed-bottom-popup {
position: fixed !important;
width: 100% !important;
bottom: 0 !important;
margin-bottom: 0 !important;
z-index: 98;
padding-bottom: constant(safe-area-inset-bottom) !important;
padding-bottom: env(safe-area-inset-bottom) !important;
}
.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;
} }
</style> </style>