Commit ace522a7 by 李伟康

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

- 在接待中心首页添加业务类型选择组件
- 根据用户类型(问界/鸿蒙)显示不同业务类型选项
- 选择业务类型后重新获取商户绩效数据
- 优化接待详情页跳转链接,添加品牌类型参数
1 parent 94104b1b
......@@ -122,7 +122,8 @@ export default {
border-radius: toRpx(48);
flex-direction: column;
box-sizing: border-box;
padding-top: toRpx(92);
// padding-top: toRpx(92);
justify-content: center;
position: relative;
overflow: hidden;
.tag {
......
......@@ -20,6 +20,12 @@
{{timeProgress }}%
</view>
</view>
<view class="select-box">
<select-component
:selectList="performanceTypeList"
@chooseType="changePerformance"
/>
</view>
</view>
<template v-if="showPageFlag">
<view class="customer-box box">
......@@ -116,7 +122,9 @@ import RecordList from './RecordList.vue'
import saveRecord from './saveRecord.vue'
import CustomerFile from './CustomerFile.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 {
components: {
CustomerFlow,
......@@ -126,7 +134,8 @@ export default {
saveRecord,
CustomerFile,
CustomerInfo,
TypeTabComponent
TypeTabComponent,
SelectComponent
},
name: '',
......@@ -171,6 +180,22 @@ export default {
computed: {
showPageFlag () {
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 () {
......@@ -206,16 +231,24 @@ export default {
this.customerId = id
this.showInfo = true
},
async getMerchantPerformance () {
const { shopMerchantId, sceneType } = uni.$storage.get("userInfo"),
res = await uni.$api.receptionApi.getMerchantPerformance({
merchantIdList: shopMerchantId,
sceneType,
startDate: dayjs().startOf('month').format('YYYY-MM-DD'),
endDate: dayjs().endOf('month').format('YYYY-MM-DD')
})
this.pageData = res
async getMerchantPerformance (bussinessType = 1, hmzxFlag) {
const { shopMerchantId, sceneType } = uni.$storage.get("userInfo")
let params = {
merchantIdList: shopMerchantId,
sceneType,
startDate: dayjs().startOf('month').format('YYYY-MM-DD'),
endDate: dayjs().endOf('month').format('YYYY-MM-DD'),
bussinessType
}
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>
......@@ -262,6 +295,7 @@ export default {
.left {
width: toRpx(656);
.common-title {
position: relative;
.sprite-icon {
margin-left: toRpx(16);
zoom: 1.5;
......@@ -290,6 +324,30 @@ export default {
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 {
border-radius: toRpx(32);
......
......@@ -24,7 +24,10 @@
<view class="phone">{{desensitizePhoneNumber(pageData.phoneNumber)}}</view>
</view>
<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>
<view class="tips flex">
......@@ -376,11 +379,12 @@ export default {
1: '问界',
2: '比亚迪',
3: '其他'
}[channelType]
}[channelType],
{ modelType } = this.pageData
let title = ''
if (item.sumScore > item.score) title = item.tagGroupName
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')}`
if (taskStatus) url += `&practice_status=${taskStatus}`
this.AIUrl = url
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!