|
@@ -23,13 +23,13 @@
|
|
|
<view class="top">
|
|
|
<view class="type">
|
|
|
<view class="left">{{ detail.orderSmallTypeText ? detail.orderSmallTypeText.slice(0, 2) : '' }}</view>
|
|
|
- <view v-if="detail && detail.orderStatus !== 'DQD'" class="right" @tap="copyData()">复制</view>
|
|
|
+ <view v-if="detail && orderStatus_v !== 'DQD'" class="right" @tap="copyData()">复制</view>
|
|
|
</view>
|
|
|
<view class="user">{{ detail.userName }} {{ detail.userMobile }}</view>
|
|
|
<view class="address">
|
|
|
<view class="text">{{ detail.province }}{{ detail.city }}{{ detail.area }}{{ detail.street }}{{ detail.address || detail.gpsAddress }}
|
|
|
</view>
|
|
|
- <view v-if="detail && detail.orderStatus !== 'DQD'" class="ctrl" @tap.stop="
|
|
|
+ <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap.stop="
|
|
|
$openLocation({
|
|
|
lat: detail.lat,
|
|
|
lng: detail.lng,
|
|
@@ -38,7 +38,7 @@
|
|
|
"><text class="iconfont icon-daohang"></text>导航</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="bottom" v-if="detail && detail.orderStatus !== 'DQD'">
|
|
|
+ <view class="bottom" v-if="detail && orderStatus_v !== 'DQD'">
|
|
|
<view class="it" @tap="$callPhone(detail.userMobile)"><text class="iconfont icon-call"></text>联系电话1</view>
|
|
|
<view class="it" @tap="$callPhone(detail.userMobile)"><text class="iconfont icon-call"></text>联系电话2</view>
|
|
|
</view>
|
|
@@ -94,7 +94,7 @@
|
|
|
<view class="row">
|
|
|
<view class="label">订单编号</view>
|
|
|
<view class="value">{{ detail.saleOrderId }}</view>
|
|
|
- <view v-if="detail && detail.orderStatus !== 'DQD'" class="ctrl" @tap="$copy(detail.saleOrderId)">复制</view>
|
|
|
+ <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$copy(detail.saleOrderId)">复制</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="label">下单时间</view>
|
|
@@ -172,7 +172,7 @@
|
|
|
<view class="row">
|
|
|
<view class="label">订单编号</view>
|
|
|
<view class="value">{{ increDetail.id }}</view>
|
|
|
- <view v-if="detail && detail.orderStatus !== 'DQD'" class="ctrl" @tap="$copy(increDetail.id)">复制</view>
|
|
|
+ <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$copy(increDetail.id)">复制</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="label">下单时间</view>
|
|
@@ -196,7 +196,7 @@
|
|
|
<view class="row">
|
|
|
<view class="label">工单编号</view>
|
|
|
<view class="value">{{ detail.id }}</view>
|
|
|
- <view v-if="detail && detail.orderStatus !== 'DQD'" class="ctrl" @tap="$copy(detail.id)">复制</view>
|
|
|
+ <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$copy(detail.id)">复制</view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="label">下单时间</view>
|
|
@@ -209,12 +209,12 @@
|
|
|
<view class="row">
|
|
|
<view class="label">主工程师</view>
|
|
|
<view class="value">{{ detail.workerName }} {{ detail.workerMobile }}</view>
|
|
|
- <view v-if="detail && detail.orderStatus !== 'DQD'" class="ctrl" @tap="$callPhone(detail.workerMobile)"><text class="iconfont icon-call"></text></view>
|
|
|
+ <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$callPhone(detail.workerMobile)"><text class="iconfont icon-call"></text></view>
|
|
|
</view>
|
|
|
<view class="row" v-for="(item, index) in detail.pgOrderWorkers.filter(o => !o.isMaster)" :key="index">
|
|
|
<view class="label">辅工程师</view>
|
|
|
<view class="value">{{ item.workerName }} {{ item.workerMobile }}</view>
|
|
|
- <view v-if="detail && detail.orderStatus !== 'DQD'" class="ctrl" @tap="$callPhone(item.workerMobile)"><text class="iconfont icon-call"></text></view>
|
|
|
+ <view v-if="detail && orderStatus_v !== 'DQD'" class="ctrl" @tap="$callPhone(item.workerMobile)"><text class="iconfont icon-call"></text></view>
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="label">下单渠道</view>
|
|
@@ -250,7 +250,7 @@
|
|
|
<view class="feedback-container card">
|
|
|
<view class="common-title2">
|
|
|
<view class="title">过程反馈</view>
|
|
|
- <view v-if="detail && detail.orderStatus !== 'DQD'" class="right" @tap="toFeedbackList">查看全部<text class="iconfont icon-jinru"></text>
|
|
|
+ <view v-if="detail && orderStatus_v !== 'DQD'" class="right" @tap="toFeedbackList">查看全部<text class="iconfont icon-jinru"></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list" v-if="detail.lastOperator">
|
|
@@ -282,10 +282,10 @@
|
|
|
</view>
|
|
|
|
|
|
<!-- 完工信息 -->
|
|
|
- <view class="info-container card mt30" v-if="detail && (detail.orderStatus == 'YWG' || detail.orderStatus == 'YJS')">
|
|
|
+ <view class="info-container card mt30" v-if="detail && (orderStatus_v == 'YWG' || orderStatus_v == 'YJS')">
|
|
|
<view class="common-title2">
|
|
|
<view class="title">完工信息</view>
|
|
|
- <view v-if="detail && detail.orderStatus !== 'DQD'" class="right" @tap="toOverDetail">查看更多<text class="iconfont icon-jinru"></text></view>
|
|
|
+ <view v-if="detail && orderStatus_v !== 'DQD'" class="right" @tap="toOverDetail">查看更多<text class="iconfont icon-jinru"></text></view>
|
|
|
</view>
|
|
|
<view>
|
|
|
<view class="row">
|
|
@@ -413,7 +413,7 @@
|
|
|
<block v-if="item.settleNormType !== 'OTHER'">
|
|
|
<view class="common-title2">
|
|
|
<view class="title">服务费用{{ index + 1 }}</view>
|
|
|
- <view class="right">{{detail.orderStatus == 'YJS' ? '已结算' : '结算中'}}</view>
|
|
|
+ <view class="right">{{orderStatus_v == 'YJS' ? '已结算' : '结算中'}}</view>
|
|
|
</view>
|
|
|
<view>
|
|
|
<view class="row">
|
|
@@ -438,7 +438,7 @@
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="label">结算金额</view>
|
|
|
- <view class="value" v-if="detail.orderStatus == 'YJS'">¥{{ item.workerSettleAmount | priceFilter }}</view>
|
|
|
+ <view class="value" v-if="orderStatus_v == 'YJS'">¥{{ item.workerSettleAmount | priceFilter }}</view>
|
|
|
<view class="value" v-else>-</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -446,7 +446,7 @@
|
|
|
<block v-else>
|
|
|
<view class="common-title2">
|
|
|
<view class="title">其他费用</view>
|
|
|
- <view class="right">{{detail.orderStatus == 'YJS' ? '已结算' : '结算中'}}</view>
|
|
|
+ <view class="right">{{orderStatus_v == 'YJS' ? '已结算' : '结算中'}}</view>
|
|
|
</view>
|
|
|
<view>
|
|
|
<view class="row">
|
|
@@ -467,7 +467,7 @@
|
|
|
</view>
|
|
|
<view class="row">
|
|
|
<view class="label">结算金额</view>
|
|
|
- <view class="value" v-if="detail.orderStatus == 'YJS'">¥{{ item.workerSettleAmount | priceFilter }}</view>
|
|
|
+ <view class="value" v-if="orderStatus_v == 'YJS'">¥{{ item.workerSettleAmount | priceFilter }}</view>
|
|
|
<view class="value" v-else>-</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -485,22 +485,22 @@
|
|
|
<view class="bottom-container">
|
|
|
<view class="left" style="width:100%" v-if="detail">
|
|
|
<!-- 待抢单 -->
|
|
|
- <block v-if="detail.orderStatus == 'DQD'">
|
|
|
+ <block v-if="orderStatus_v == 'DQD'">
|
|
|
<u-button type="primary" text="抢单" @tap="qdOrder(detail)"></u-button>
|
|
|
</block>
|
|
|
</view>
|
|
|
<view class="right" v-if="detail">
|
|
|
<!-- 待接单 -->
|
|
|
- <block v-if="detail.orderStatus == 'DJD'">
|
|
|
- <u-button plain type="primary" text="配件申请" @tap="" v-if="detail.orderType != 'INSTALL'" @tap="toPartsApply()"></u-button>
|
|
|
+ <block v-if="orderStatus_v == 'DJD'">
|
|
|
+ <u-button plain type="primary" text="配件申请" v-if="detail.orderType != 'INSTALL'" @tap="toPartsApply()"></u-button>
|
|
|
<u-button plain type="primary" text="取消加急" @tap="actionUrgent(false)"
|
|
|
v-if="detail.pgOrderFlags && detail.pgOrderFlags.some((o) => o.tag == 'JIA_JI')"></u-button>
|
|
|
<u-button plain type="primary" text="加急" @tap="actionUrgent(true)" v-else></u-button>
|
|
|
<u-button type="primary" text="接单" @tap="actionReceive()"></u-button>
|
|
|
</block>
|
|
|
<!-- 服务中 -->
|
|
|
- <block v-if="detail.orderStatus == 'FWZ' || detail.orderStatus == 'YCD'">
|
|
|
- <u-button plain type="primary" text="配件申请" @tap="" v-if="detail.orderType != 'INSTALL'" @tap="toPartsApply()"></u-button>
|
|
|
+ <block v-if="orderStatus_v == 'FWZ' || orderStatus_v == 'YCD'">
|
|
|
+ <u-button plain type="primary" text="配件申请" v-if="detail.orderType != 'INSTALL'" @tap="toPartsApply()"></u-button>
|
|
|
<u-button plain type="primary" text="辅材收费" @tap="toCharge('M')"
|
|
|
v-if="detail.orderType == 'INSTALL'"></u-button>
|
|
|
<u-button plain type="primary" text="配件收费" @tap="toCharge('P')" v-else></u-button>
|
|
@@ -581,6 +581,43 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
|
|
|
+ computed:{
|
|
|
+ orderStatus_v(){
|
|
|
+ if (["DYY"].includes(this?.detail?.orderStatus)) {
|
|
|
+ // 待预约
|
|
|
+ return "DYY"
|
|
|
+ } else if (["DQD"].includes(this?.detail?.orderStatus)) {
|
|
|
+ // 待抢单
|
|
|
+ return "DQD"
|
|
|
+ } else if (["DSHPG", "CJ", "YPD", "DXSPD", "DZBPG", "DWDSPGP", "DXSSPGP", "DTJXSSPGP", "DZBSPGP", "DFZXPD", "DFZXSPGP", 'XSBH', "TJXSBH", "ZBBH", "FZXBH", "FL"].includes(this?.detail?.orderStatus)) {
|
|
|
+ // 待商户派工
|
|
|
+ return "DSHPG"
|
|
|
+ } else if (["DWDPG", "DWDPD", "WDBH"].includes(this?.detail?.orderStatus)) {
|
|
|
+ // 待网点派工
|
|
|
+ return "DWDPG"
|
|
|
+ } else if (["DJD", "DSM", "YZP"].includes(this?.detail?.orderStatus)) {
|
|
|
+ // 待接单
|
|
|
+ return "DJD"
|
|
|
+ } else if (["FWZ", "GCSZT", "BFWG"].includes(this?.detail?.orderStatus)) {
|
|
|
+ // 服务中
|
|
|
+ return "FWZ"
|
|
|
+ } else if (["YCD"].includes(this?.detail?.orderStatus)) {
|
|
|
+ // 异常单
|
|
|
+ return "YCD"
|
|
|
+ } else if (["YWG", "GCSZX", "WDWG", "YWGO"].includes(this?.detail?.orderStatus)) {
|
|
|
+ // 已完工待结算
|
|
|
+ return "YWG"
|
|
|
+ } else if (["YJS", "LRCD"].includes(this?.detail?.orderStatus)) {
|
|
|
+ // 已结算
|
|
|
+ return "YJS"
|
|
|
+ } else if (["YQX", "FWZT", "YCGB", "FWQX"].includes(this?.detail?.orderStatus)) {
|
|
|
+ // 已取消
|
|
|
+ return "YQX"
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
async onLoad({ id, behavior }) {
|
|
|
this.id = id;
|
|
|
this.behavior = behavior
|
|
@@ -634,7 +671,7 @@ export default {
|
|
|
orderBaseId: this.id,
|
|
|
}).then((res) => {
|
|
|
this.detail = res.data;
|
|
|
- if(this.behavior === "lqdd" && res.data.orderStatus !== "DQD" && res.data.workerId !== this.$store.state.user.userId){
|
|
|
+ if(this.behavior === "lqdd" && !["DQD"].includes(res.data.orderStatus) && res.data.workerId !== this.$store.state.user.userId){
|
|
|
this.$modal({
|
|
|
title: '提示',
|
|
|
content: '来晚啦,工单已经被抢走了~',
|
|
@@ -727,7 +764,7 @@ export default {
|
|
|
orderId: this.id,
|
|
|
}).then(res => {
|
|
|
this.settleList = res.data;
|
|
|
- if(this.settleList.length > 0 && this.detail.orderStatus == 'YJS') {
|
|
|
+ if(this.settleList.length > 0 && this.orderStatus_v == 'YJS') {
|
|
|
this.tabList[3].name = `员工结算(${this.settleList.reduce((total, obj) => total + obj.workerSettleAmount, 0)})`
|
|
|
}else {
|
|
|
this.tabList[3].name = `员工结算`
|