2022-06-06 22:09:43 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<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>
|
|
|
|
|
|
<!-- 任务进度跟踪 -->
|
|
|
|
|
|
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm">
|
|
|
|
|
|
<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">
|
|
|
|
|
|
<view class="flex align-center">
|
|
|
|
|
|
<text class="text-xl margin-right">{{servDetail.mainServOrder.servTitle}}</text>
|
|
|
|
|
|
<view class='cu-tag bg-purple radius light margin-right-sm'>服务中</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<view v-for="(item, index) in servDetail.mainServOrder.orderTag" class='cu-tag radius margin-right-sm'>
|
|
|
|
|
|
{{item}}</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<text class="cuIcon-location text-main-color margin-right-xs"></text>
|
|
|
|
|
|
<text>{{servDetail.mainServOrder.address}}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<text class="cuIcon-people text-main-color margin-right-xs"></text>
|
|
|
|
|
|
<text>{{servDetail.mainServOrder.person2Contact.name}}</text>
|
|
|
|
|
|
<text>{{servDetail.mainServOrder.person2Contact.phone}}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
|
|
|
|
|
<text>预约时间:{{servDetail.mainServOrder.bookTime}}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
|
|
|
|
|
<text>排单时间:{{servDetail.mainServOrder.boodTime}}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<text class="cuIcon-time text-main-color margin-right-xs"></text>
|
|
|
|
|
|
<text>上门时间:{{servDetail.mainServOrder.doorTime}}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<text class="cuIcon-moneybag text-main-color margin-right-xs"></text>
|
|
|
|
|
|
<text>任务金额:</text>
|
|
|
|
|
|
<text class="text-price">{{servDetail.mainServOrder.taskPrice}}</text>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-xs text-sm text-gray"
|
|
|
|
|
|
v-for="(item, index) in servDetail.mainServOrder.gratuityRecord">
|
|
|
|
|
|
追加费用:<text class="text-price">{{item.price}}</text>[{{item.type}}]
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 待服务列 -->
|
|
|
|
|
|
<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>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<product-picked :product="servDetail.product" :pickedList="servDetail.product.pickedList" :columnTitleArr="servingColumnHeaders" :showToServNum="true"></product-picked>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 完成记录 -->
|
|
|
|
|
|
<view class="bg-white margin-lr-sm padding-lr padding-bottom margin-top-sm" v-for="(item, index) in servDetail.finishRecord">
|
|
|
|
|
|
<view class="cu-bar solid-bottom">
|
|
|
|
|
|
<view class="action bar-first-action">
|
|
|
|
|
|
<text class="cuIcon-titles text-main-color"></text> 完成记录({{item.finishList.length}})
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class='cu-tag bg-purple radius light margin-right-sm'>{{item.finishTime}}</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="margin-top-sm">
|
|
|
|
|
|
<product-picked :pickedList="item.finishList" :columnTitleArr="servedColumnHeaders" :showToServNum="true"></product-picked>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 订单编码和时间 -->
|
|
|
|
|
|
<view class="bg-white margin-top-sm padding margin-lr-sm margin-bottom-with-bar">
|
|
|
|
|
|
<view>订单编码:{{servDetail.serialCode}}</view>
|
|
|
|
|
|
<view class="margin-top-xs">订单时间:{{servDetail.createTime}}</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<!-- 底部操作栏 -->
|
2022-06-06 22:09:43 +08:00
|
|
|
|
<view class="cu-bar bg-white tabbar border fixed-bottom-bar">
|
|
|
|
|
|
<view class="action" data-popup="orderManage" @click="togglePopup">
|
2022-04-23 23:13:29 +08:00
|
|
|
|
<view class="cuIcon-list"></view> 订单管理
|
|
|
|
|
|
</view>
|
2022-06-06 22:09:43 +08:00
|
|
|
|
<view class="action" data-modal="sendUrgentMsgModal" @click="showModal">
|
2022-04-23 23:13:29 +08:00
|
|
|
|
<view class="cuIcon-mail">
|
|
|
|
|
|
<view class="cu-tag badge" v-if="servDetail.talkMsgNum > 0">{{servDetail.talkMsgNum}}</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
发送急报
|
|
|
|
|
|
</view>
|
2022-06-06 22:09:43 +08:00
|
|
|
|
<!-- <view class="bg-main-color submit">立即上门</view> -->
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<uni-popup ref="orderManage" type="bottom" @change="changePopupState">
|
2022-06-08 18:04:55 +08:00
|
|
|
|
<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>
|
2022-06-06 22:09:43 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</uni-popup>
|
|
|
|
|
|
<!-- 模态框 -->
|
|
|
|
|
|
<urgent-msg :show="sendUrgentMsgModal" @hideModal="hideModal"></urgent-msg>
|
|
|
|
|
|
<confirm-modal ref="confirmModal" :content="'是否确定取消订单?'" @confirm="cancelOrder"></confirm-modal>
|
2022-04-23 23:13:29 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import productPicked from '@/components/goods-card/product-picked.vue';
|
2022-06-08 13:59:47 +08:00
|
|
|
|
import urgentMsg from '@/pages/my/components/modal/urgent-msg.vue';
|
2022-04-23 23:13:29 +08:00
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
components: {
|
2022-06-08 18:04:55 +08:00
|
|
|
|
productPicked,
|
|
|
|
|
|
urgentMsg
|
2022-04-23 23:13:29 +08:00
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
value: ['0'],
|
|
|
|
|
|
servDetail: {},
|
|
|
|
|
|
finishRecord4Show: [],
|
|
|
|
|
|
servingColumnHeaders: ['购买型号', '购买量', '待服务'],
|
2022-06-06 22:09:43 +08:00
|
|
|
|
servedColumnHeaders: ['购买型号', '购买量', '已服务'],
|
|
|
|
|
|
process: '',
|
|
|
|
|
|
ifShowPageMeta: false,
|
|
|
|
|
|
orderManageMenu: [{
|
|
|
|
|
|
name: '取消订单',
|
|
|
|
|
|
action: 'decideIfCancelOrder'
|
|
|
|
|
|
}],
|
|
|
|
|
|
sendUrgentMsgModal: false
|
2022-04-23 23:13:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad() {
|
2022-06-08 18:04:55 +08:00
|
|
|
|
this.loadData();
|
2022-04-23 23:13:29 +08:00
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
async loadData() {
|
|
|
|
|
|
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;
|
|
|
|
|
|
}
|
2022-06-06 22:09:43 +08:00
|
|
|
|
},
|
|
|
|
|
|
changePopupState(e) {
|
|
|
|
|
|
this.ifShowPageMeta = e.show;
|
|
|
|
|
|
},
|
|
|
|
|
|
togglePopup(e) {
|
|
|
|
|
|
if (this.ifShowPageMeta) {
|
|
|
|
|
|
this.$refs[e.currentTarget.dataset.popup].close();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
this.$refs[e.currentTarget.dataset.popup].open();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
showModal(e) {
|
|
|
|
|
|
this[e.currentTarget.dataset.modal] = true;
|
|
|
|
|
|
},
|
|
|
|
|
|
hideModal(e) {
|
|
|
|
|
|
this[e.currentTarget.dataset.modal] = false;
|
|
|
|
|
|
},
|
|
|
|
|
|
clickOrderManageMenu(e) {
|
|
|
|
|
|
this[e.currentTarget.dataset.action](e);
|
|
|
|
|
|
},
|
|
|
|
|
|
decideIfCancelOrder() {
|
|
|
|
|
|
this.$refs.confirmModal.showModal();
|
|
|
|
|
|
},
|
|
|
|
|
|
cancelOrder() {
|
|
|
|
|
|
console.log("取消订单")
|
2022-04-23 23:13:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.bar-first-action {
|
|
|
|
|
|
margin-left: unset !important;
|
|
|
|
|
|
font-size: 30rpx !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|