Commit ace522a7 by 李伟康

feat(ReceptionCenter): 添加业务类型选择功能

- 在接待中心首页添加业务类型选择组件
- 根据用户类型(问界/鸿蒙)显示不同业务类型选项
- 选择业务类型后重新获取商户绩效数据
- 优化接待详情页跳转链接,添加品牌类型参数
1 parent 94104b1b
...@@ -122,7 +122,8 @@ export default { ...@@ -122,7 +122,8 @@ export default {
border-radius: toRpx(48); border-radius: toRpx(48);
flex-direction: column; flex-direction: column;
box-sizing: border-box; box-sizing: border-box;
padding-top: toRpx(92); // padding-top: toRpx(92);
justify-content: center;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
.tag { .tag {
......
...@@ -20,6 +20,12 @@ ...@@ -20,6 +20,12 @@
{{timeProgress }}% {{timeProgress }}%
</view> </view>
</view> </view>
<view class="select-box">
<select-component
:selectList="performanceTypeList"
@chooseType="changePerformance"
/>
</view>
</view> </view>
<template v-if="showPageFlag"> <template v-if="showPageFlag">
<view class="customer-box box"> <view class="customer-box box">
...@@ -116,7 +122,9 @@ import RecordList from './RecordList.vue' ...@@ -116,7 +122,9 @@ import RecordList from './RecordList.vue'
import saveRecord from './saveRecord.vue' import saveRecord from './saveRecord.vue'
import CustomerFile from './CustomerFile.vue' import CustomerFile from './CustomerFile.vue'
import CustomerInfo from './CustomerInfo.vue' import CustomerInfo from './CustomerInfo.vue'
import TypeTabComponent from '../../../TypeTabComponent.vue' import TypeTabComponent from '@/components/TypeTabComponent.vue'
import SelectComponent from '@/components/SelectComponent.vue'
export default { export default {
components: { components: {
CustomerFlow, CustomerFlow,
...@@ -126,7 +134,8 @@ export default { ...@@ -126,7 +134,8 @@ export default {
saveRecord, saveRecord,
CustomerFile, CustomerFile,
CustomerInfo, CustomerInfo,
TypeTabComponent TypeTabComponent,
SelectComponent
}, },
name: '', name: '',
...@@ -171,6 +180,22 @@ export default { ...@@ -171,6 +180,22 @@ export default {
computed: { computed: {
showPageFlag () { showPageFlag () {
return Object.keys(this.pageData).length return Object.keys(this.pageData).length
},
isAito () {
const { channelType } = uni.$storage.get('userInfo')
return channelType == 1
},
performanceTypeList () {
let list = []
if (this.isAito) list = [
{ label: '问界', value: 1 },
{ label: '鸿蒙', value: 2 },
]
else list = [
{ label: '延保', value: 1 },
{ label: '权益', value: 3 },
]
return list
} }
}, },
mounted () { mounted () {
...@@ -206,16 +231,24 @@ export default { ...@@ -206,16 +231,24 @@ export default {
this.customerId = id this.customerId = id
this.showInfo = true this.showInfo = true
}, },
async getMerchantPerformance () { async getMerchantPerformance (bussinessType = 1, hmzxFlag) {
const { shopMerchantId, sceneType } = uni.$storage.get("userInfo"), const { shopMerchantId, sceneType } = uni.$storage.get("userInfo")
res = await uni.$api.receptionApi.getMerchantPerformance({ let params = {
merchantIdList: shopMerchantId, merchantIdList: shopMerchantId,
sceneType, sceneType,
startDate: dayjs().startOf('month').format('YYYY-MM-DD'), startDate: dayjs().startOf('month').format('YYYY-MM-DD'),
endDate: dayjs().endOf('month').format('YYYY-MM-DD') endDate: dayjs().endOf('month').format('YYYY-MM-DD'),
}) bussinessType
this.pageData = res }
if (hmzxFlag) params.hmzxFlag = hmzxFlag
if(this.isAito && !params.hmzxFlag) params.hmzxFlag = 1
this.pageData = await uni.$api.receptionApi.getMerchantPerformance(params) || {}
}, },
changePerformance ({ item }) {
this.pageData = {}
if (this.isAito) this.getMerchantPerformance(1, item.value)
else this.getMerchantPerformance(item.value)
}
} }
} }
</script> </script>
...@@ -262,6 +295,7 @@ export default { ...@@ -262,6 +295,7 @@ export default {
.left { .left {
width: toRpx(656); width: toRpx(656);
.common-title { .common-title {
position: relative;
.sprite-icon { .sprite-icon {
margin-left: toRpx(16); margin-left: toRpx(16);
zoom: 1.5; zoom: 1.5;
...@@ -290,6 +324,30 @@ export default { ...@@ -290,6 +324,30 @@ export default {
font-weight: 500; font-weight: 500;
} }
} }
.select-box {
position: absolute;
top: 36rpx;
right: 32rpx;
/deep/.select {
width: 148rpx;
height: 48rpx;
border-radius: 12rpx;
background: #ffffff59;
backdrop-filter: blur(16rpx);
box-shadow: inset 0 0 16rpx 0 #ffffff;
color: #333333;
font-size: 26rpx;
padding-left: 32rpx;
.icon-arrow-bottom {
zoom: 0.75;
}
}
/deep/.pop-box {
top: 64rpx;
color: #292d33;
font-size: 28rpx;
}
}
} }
.box { .box {
border-radius: toRpx(32); border-radius: toRpx(32);
......
...@@ -24,7 +24,10 @@ ...@@ -24,7 +24,10 @@
<view class="phone">{{desensitizePhoneNumber(pageData.phoneNumber)}}</view> <view class="phone">{{desensitizePhoneNumber(pageData.phoneNumber)}}</view>
</view> </view>
<view class="brand-box flex"> <view class="brand-box flex">
<view class="brand flex" v-if="pageData.carBrand">{{pageData.carBrand}}</view> <view
class="brand flex"
v-if="pageData.carBrand"
>{{pageData.carBrand}}</view>
<view class="brand flex">{{pageData.carModel}}</view> <view class="brand flex">{{pageData.carModel}}</view>
</view> </view>
<view class="tips flex"> <view class="tips flex">
...@@ -376,11 +379,12 @@ export default { ...@@ -376,11 +379,12 @@ export default {
1: '问界', 1: '问界',
2: '比亚迪', 2: '比亚迪',
3: '其他' 3: '其他'
}[channelType] }[channelType],
{ modelType } = this.pageData
let title = '' let title = ''
if (item.sumScore > item.score) title = item.tagGroupName if (item.sumScore > item.score) title = item.tagGroupName
let { agentUrl, domainName, checkDate, taskStatus } = data, let { agentUrl, domainName, checkDate, taskStatus } = data,
url = `${agentUrl}?no_header=1&businessType=${bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${domainName}&presuppositionProblem=${title}&brandType=1001` url = `${agentUrl}?no_header=1&businessType=${bussinessType}&phone=${phone}&brand=${brand}&one_id=${uuid}&platformType=1&domain=${domainName}&presuppositionProblem=${title}&brandType=${modelType || 1001}`
url += `&date=${dayjs().format('YYYY-MM-DD')}` url += `&date=${dayjs().format('YYYY-MM-DD')}`
if (taskStatus) url += `&practice_status=${taskStatus}` if (taskStatus) url += `&practice_status=${taskStatus}`
this.AIUrl = url this.AIUrl = url
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!