Commit 33baa182 by 李伟康

fix(customer): 修复客户机会页面显示和状态处理问题

- 添加 qwGroupName 字段的显示条件控制,避免显示"客户群不存在"文本
- 新增 showItem 方法用于控制客户详情项的显示逻辑
- 调整订单状态样式类映射,将状态1改为error,状态4改为warning
- 添加 error 和 warning 状态的样式定义
- 修复 TaskItem 组件中暂不推送按钮的参数传递问题
- 更新默认视频封面图片地址
- 添加任务推送失败状态处理和相应样式
- 修复 Reception 组件中图标的 z-index 层级问题
1 parent 4aea790b
......@@ -9,7 +9,7 @@
</view>
<view class="customer-detail">
<template v-for="(item, index) in customerObject">
<view class="customer-item flex" :key="index">
<view class="customer-item flex" :key="index" v-if="showItem(item.key)">
<view class="item-title">{{ item.title }}</view>
<view class="item-content text-hide">
<template v-if="item.key == 'customerStatus'">
......@@ -102,6 +102,10 @@ export default {
},
mounted() { },
methods: {
showItem(key){
if(key != 'qwGroupName') return true
else return this.options.data[key]
},
orderStatus(status) {
return {
1: '待跟进',
......@@ -112,10 +116,10 @@ export default {
},
orderStatusClass(status) {
return {
1: 'failed',
1: 'error',
2: 'success',
3: 'failed',
4: 'failed',
4: 'warning',
}[status]
},
formatContent(key) {
......@@ -281,6 +285,15 @@ export default {
background-color: #F5F7FA;
color: #999EA8;
}
&.error {
background-color: #FDECE9;
color: #F24724;
}
&.warning {
background-color: #FFF5E6;
color: #FF9D0A;
}
}
}
......
......@@ -20,7 +20,7 @@
<text class="car-model text-hide" v-if="item.carSeriesName">{{ item.carSeriesName }}</text>
</view>
<view class="phone">{{ formatPhone(item.customerPhone) }}</view>
<view class="customer-group">{{ item.qwGroupName || '客户群不存在' }}</view>
<view class="customer-group" v-if="item.qwGroupName">{{ item.qwGroupName }}</view>
</view>
</view>
</view>
......@@ -124,11 +124,11 @@ export default {
},
orderStatusClass(status) {
return {
1: 'failed',
1: 'error',
2: 'success',
3: 'failed',
4: 'failed',
}[status]
4: 'warning',
}[status] || ''
},
orderHandleTime(time) {
return time ? dayjs(time).format('YYYY-MM-DD') : ''
......@@ -331,6 +331,16 @@ export default {
background-color: #F5F7FA;
color: #999EA8;
}
&.error {
background-color: #FDECE9;
color: #F24724;
}
&.warning {
background-color: #FFF5E6;
color: #FF9D0A;
}
}
.order-date {
......
......@@ -12,10 +12,10 @@
<view class="btn-box flex">
<template v-if="item.taskStatus == 0">
<view class="btn primary-btn" @click="confirmTask(1)">立即推送</view>
<view class="btn" @click="confirmTask()">暂不推送</view>
<view class="btn" @click="confirmTask(2)">暂不推送</view>
</template>
<template v-else>
<view :class="['status flex', { success: item.taskStatus == 1 }]">{{ taskStatus(item.taskStatus) }}</view>
<view :class="['status flex', taskStatusClass(item.taskStatus)]">{{ taskStatus(item.taskStatus) }}</view>
</template>
</view>
</view>
......@@ -76,7 +76,7 @@ export default {
data() {
return {
defaultPoster: 'https://img02.glsx.com.cn/weapp/resource/app-zyzs/common/default-video.webp'
defaultPoster: 'https://img02.glsx.com.cn/weapp/resource/app-tape/common/default-video.webp'
}
},
watch: {},
......@@ -127,9 +127,16 @@ export default {
return {
1: '已推送',
2: '暂不推送',
3: '推送失败'
}[status]
},
confirmTask(confirmStatus = 0) {
taskStatusClass(status) {
return {
1: 'success',
3: 'failed'
}[status] || ''
},
confirmTask(confirmStatus) {
this.$emit('confirmTask', {
confirmStatus,
item: this.item
......@@ -149,8 +156,8 @@ export default {
getImages(mediaIds) {
return mediaIds.split(',')
},
formatValue(value){
return value !== null && value !== '' && value !== undefined ? value : '-'
formatValue(value) {
return value !== null && value !== '' && value !== undefined ? value : '-'
}
}
}
......@@ -221,6 +228,10 @@ export default {
background-color: #EAF9F1;
color: #35C376;
}
&.failed {
background-color: #FDECE9;
color: #F24724;
}
}
}
......
......@@ -641,7 +641,7 @@ export default {
line-height: toRpx(44);
width: 100%;
height: 100%;
z-index: -1;
.icon {
width: 300rpx;
height: 236rpx;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!