Commit fe90984a by 李伟康

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

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