Commit fe90984a by 李伟康

feat(receptionDetail): 根据场景类型展示不同的接待结果和评分信息

新增 sceneType 判断逻辑,支持区分不同业务场景下的展示内容。
当 sceneType 为 1 时,直接显示评分;否则根据是否待定状态展示“待定”或原有逻辑。
同时增加订单完成状态文本计算属性和样式调整。
1 parent 5f19522d
...@@ -31,15 +31,35 @@ ...@@ -31,15 +31,35 @@
<view class="brand flex">{{pageData.carModel}}</view> <view class="brand flex">{{pageData.carModel}}</view>
</view> </view>
<view class="tips flex"> <view class="tips flex">
<view :class="['tips-text',{deal:pageData.orderFinishFlag}]"> <template v-if="sceneType == 1">
{{pageData.orderFinishFlag? '成交': '战败'}} <view :class="['tips-text',{deal:pageData.orderFinishFlag}]">
</view> {{pageData.orderFinishFlag? '成交': '战败'}}
<view </view>
class="score-box" <view
v-if="pageData.score != null" class="score-box"
> v-if="pageData.score != null"
{{formatReceptionScore(pageData)}} >
</view> {{pageData.score}}<view class="unit">分</view>
</view>
</template>
<template v-else>
<template v-if="pageData.indeterminate">
<view class="tips-text indeterminate">
待定
</view>
</template>
<template v-else>
<view :class="['tips-text',{deal:pageData.orderFinishFlag}]">
{{pageData.orderFinishFlag? '成交': '战败'}}
</view>
<view
class="score-box"
v-if="pageData.score != null"
>
{{formatReceptionScore(pageData)}}
</view>
</template>
</template>
</view> </view>
</view> </view>
...@@ -176,6 +196,7 @@ export default { ...@@ -176,6 +196,7 @@ export default {
this.getOpenerEventChannel().on('getData', function (data) { this.getOpenerEventChannel().on('getData', function (data) {
data.totalDuration = (data.receptionEndTime - data.receptionStartTime) / 1000 data.totalDuration = (data.receptionEndTime - data.receptionStartTime) / 1000
_this.pageData = data || {} _this.pageData = data || {}
if (!data.orderFinishFlag && dayjs(data.receptionEndTime).isSame(dayjs(), 'day')) data.indeterminate = true
if (data.batchId) _this.findCheckResultByBatchId(data.batchId) if (data.batchId) _this.findCheckResultByBatchId(data.batchId)
_this.setAudio(data.recordingUrl) _this.setAudio(data.recordingUrl)
}) })
...@@ -192,6 +213,10 @@ export default { ...@@ -192,6 +213,10 @@ export default {
// }, // },
qualityRef () { qualityRef () {
return this.$refs.qualityRef return this.$refs.qualityRef
},
sceneType () {
const { sceneType } = uni.$storage.get('userInfo')
return sceneType
} }
}, },
onBackPress (options) { onBackPress (options) {
...@@ -463,6 +488,9 @@ export default { ...@@ -463,6 +488,9 @@ export default {
if (score >= 60 && score < 85 && !orderFinishFlag) return 'B'; if (score >= 60 && score < 85 && !orderFinishFlag) return 'B';
if (score < 60 && !orderFinishFlag) return 'C'; if (score < 60 && !orderFinishFlag) return 'C';
return '-'; return '-';
},
orderFinishText ({ orderFinishFlag, receptionEndTime }) {
return orderFinishFlag ? '成交' : '战败'
} }
} }
} }
...@@ -551,10 +579,15 @@ export default { ...@@ -551,10 +579,15 @@ export default {
line-height: toRpx(40); line-height: toRpx(40);
.tips-text { .tips-text {
color: #f24724; color: #f24724;
font-size: toRpx(32);
} }
.deal { .deal {
color: #2cca74; color: #2cca74;
} }
.indeterminate {
color: #999ea8;
}
&-box { &-box {
opacity: 0.85; opacity: 0.85;
color: #2cca74; color: #2cca74;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!