Commit 2484c906 by Lin

feat: 优化

1 parent 2760ce9b
<template> <template>
<MessageBox ref="employeeBoxVisible" position="bottom" :isFooter="false" :title="`请选择${title}`" :maxHeight="1000" @close="$emit('close')"> <MessageBox ref="employeeBoxVisible" position="bottom" :isFooter="false" :title="`请选择${title}`" :maxHeight="1000" @close="$emit('close')">
<view class="select-box"> <view class="select-box">
<view class="select-item" :class="{ checked: salesUuid == item.uuid }" @click="handleSelect(item)" v-for="(item, index) in employeeList" :key="index"> <view class="select-item" :class="{ checked: selectedId == item[valueKey] }" @click="handleSelect(item)" v-for="(item, index) in displayList" :key="index">
{{ item.staffName }} {{ item[labelKey] }}
</view> </view>
</view> </view>
</MessageBox> </MessageBox>
...@@ -19,6 +19,18 @@ export default { ...@@ -19,6 +19,18 @@ export default {
salesPropsUuid: { salesPropsUuid: {
type: String, type: String,
default: '' default: ''
},
list: {
type: Array,
default: null
},
labelKey: {
type: String,
default: 'staffName'
},
valueKey: {
type: String,
default: 'uuid'
} }
}, },
data () { data () {
...@@ -37,10 +49,16 @@ export default { ...@@ -37,10 +49,16 @@ export default {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
salesUuid () { selectedId () {
if (Array.isArray(this.list)) {
return this.salesPropsUuid
}
return this.$store.state.user.customerInfo.salesUuid || this.salesPropsUuid return this.$store.state.user.customerInfo.salesUuid || this.salesPropsUuid
}, },
employeeList () { displayList () {
if (Array.isArray(this.list)) {
return this.list
}
return this.$store.state.user.employeeList return this.$store.state.user.employeeList
} }
}, },
...@@ -49,6 +67,7 @@ export default { ...@@ -49,6 +67,7 @@ export default {
methods: { methods: {
open () { open () {
this.$refs.employeeBoxVisible.open() this.$refs.employeeBoxVisible.open()
if (Array.isArray(this.list)) return
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo; { shopMerchantId } = userInfo;
/**获取销售人员 */ /**获取销售人员 */
......
...@@ -63,8 +63,7 @@ ...@@ -63,8 +63,7 @@
:styleV2="true" :styleV2="true"
/> />
<template v-if="sceneType != 7"> <template v-if="sceneType != 7">
<!-- <view class="reception-btn" @click="start"> --> <view class="reception-btn" @click="start">
<view class="reception-btn" @click="getCustomerProfileGroupInfo">
<image class="start-icon" :src="require('@/assets/images/common/icon-reception-start.png')" mode="aspectFit"></image> <image class="start-icon" :src="require('@/assets/images/common/icon-reception-start.png')" mode="aspectFit"></image>
<view class="start-text">开始接待</view> <view class="start-text">开始接待</view>
</view> </view>
...@@ -392,6 +391,8 @@ export default { ...@@ -392,6 +391,8 @@ export default {
uni.$logger.local.info('levelStudyPopup 移除监听') uni.$logger.local.info('levelStudyPopup 移除监听')
uni.$off('levelStudyPopup') uni.$off('levelStudyPopup')
uni.$off('pageBack') uni.$off('pageBack')
uni.$off('refreshCustomerProfileGroupInfo')
uni.$off('startReceptionFromCustomerDetail')
}, },
async mounted() { async mounted() {
console.log('sessionId**', uni.$storage.get('sessionId')) console.log('sessionId**', uni.$storage.get('sessionId'))
...@@ -491,6 +492,12 @@ export default { ...@@ -491,6 +492,12 @@ export default {
this.$refs.leftBox.getMessageInfo() this.$refs.leftBox.getMessageInfo()
this.$refs.messageRef.getMessageSummary() this.$refs.messageRef.getMessageSummary()
}) })
uni.$on('refreshCustomerProfileGroupInfo', () => {
this.getCustomerProfileGroupInfo()
})
uni.$on('startReceptionFromCustomerDetail', () => {
this.start()
})
/** /**
* 获取员工场景小分类 * 获取员工场景小分类
*/ */
...@@ -745,93 +752,6 @@ export default { ...@@ -745,93 +752,6 @@ export default {
console.log('**&&merchantId**', shopMerchantId) console.log('**&&merchantId**', shopMerchantId)
const res = await uni.$api.activityApi.getActivityProductListAPI({merchantId: shopMerchantId}) const res = await uni.$api.activityApi.getActivityProductListAPI({merchantId: shopMerchantId})
console.log('查询当前进行中的营销活动商品列表:', res) console.log('查询当前进行中的营销活动商品列表:', res)
// const res = [{
// "marketingStage": 0,
// "carSeriesList": [{
// "carSeriesId": -1,
// "carSeriesName": "通用",
// "productList": [{
// "productId": 11,
// "productType": 0,
// "tabName": "tttttttt",
// "tabDescription": "ttttttttttttttttttttt22222",
// "isMainPush": 1,
// "currentPrice": 1680,
// "discountPrice": 2334,
// "mainImageUrl": "https://jinrong-huidan-test.oss-cn-shenzhen.aliyuncs.com/png/1782268203073_9522/主图.png",
// "thumbImageUrl": "https://jinrong-huidan-test.oss-cn-shenzhen.aliyuncs.com/png/1782268229667_7133/小图.png",
// "detailImageUrl": "https://jinrong-huidan-test.oss-cn-shenzhen.aliyuncs.com/png/1782268222766_6445/详情图.png",
// "startTime": "06-01",
// "endTime": "06-30"
// },
// {
// "productId": 3,
// "productType": 1,
// "tabName": "tttttttt",
// "tabDescription": "ttttttttttttttttttttt22222",
// "isMainPush": 1,
// "currentPrice": 1680,
// "discountPrice": 2334,
// "mainImageUrl": "",
// "thumbImageUrl": "",
// "detailImageUrl": "",
// "startTime": "06-01",
// "endTime": "06-30"
// }
// ]
// }]
// },
// {
// "marketingStage": 1,
// "carSeriesList": [{
// "carSeriesId": 2001,
// "carSeriesName": "奔驰C级",
// "productList": [{
// "productId": 13,
// "productType": 0,
// "tabName": "tttttttt",
// "tabDescription": "ttttttttttttttttttttt22222",
// "isMainPush": 1,
// "currentPrice": 3000,
// "discountPrice": 60,
// "mainImageUrl": null,
// "thumbImageUrl": null,
// "detailImageUrl": null,
// "startTime": "06-01",
// "endTime": "07-31"
// },
// {
// "productId": 14,
// "productType": 0,
// "tabName": "tttttttt",
// "tabDescription": "ttttttttttttttttttttt22222",
// "isMainPush": 1,
// "currentPrice": 3000,
// "discountPrice": 60,
// "mainImageUrl": null,
// "thumbImageUrl": null,
// "detailImageUrl": null,
// "startTime": "06-01",
// "endTime": "07-31"
// },
// {
// "productId": 12,
// "productType": 0,
// "tabName": "tttttttt",
// "tabDescription": "套餐 MPG2026051713284619631",
// "isMainPush": 0,
// "currentPrice": 3000,
// "discountPrice": 60,
// "mainImageUrl": null,
// "thumbImageUrl": null,
// "detailImageUrl": null,
// "startTime": "06-01",
// "endTime": "07-31"
// }
// ]
// }]
// }
// ]
this.activityProductList = res this.activityProductList = res
// console.log('查询当前进行中的营销活动商品列表:', res) // console.log('查询当前进行中的营销活动商品列表:', res)
this.$store.state.boutique.boutiqueActivityData = res this.$store.state.boutique.boutiqueActivityData = res
...@@ -859,23 +779,6 @@ export default { ...@@ -859,23 +779,6 @@ export default {
async getPrelearnHome() { async getPrelearnHome() {
try { try {
const res = await uni.$api.commonApi.getPrelernHomePopupAPI() const res = await uni.$api.commonApi.getPrelernHomePopupAPI()
// const res = {
// "activityId": 31,
// "activityName": "618年中促活动A",
// "packages": [
// {
// "activityProductId": "16",
// "packageName": "tttttttt",
// "includes": ['原厂定制车衣','玻璃贴膜'],
// "learnStatus": "NOT_STUDY",
// "scriptReady": true
// }
// ],
// "remainingSkipCount": 0,
// "shouldPopup": false,
// "muteReason": null,
// "remainingActivityCount": null
// }
console.log('getPrelernHomePopupAPI res***', res); console.log('getPrelernHomePopupAPI res***', res);
if (!res) return if (!res) return
this.prelearnData = res this.prelearnData = res
......
...@@ -105,7 +105,7 @@ export default { ...@@ -105,7 +105,7 @@ export default {
return return
} }
const row = encodeURIComponent(JSON.stringify(res)) const row = encodeURIComponent(JSON.stringify(this.goodsInfo))
uni.navigateTo({ uni.navigateTo({
url: `/pages/common/prelearnBridge?row=${row}&entrySource=package_detail` url: `/pages/common/prelearnBridge?row=${row}&entrySource=package_detail`
}) })
......
...@@ -404,25 +404,6 @@ export default { ...@@ -404,25 +404,6 @@ export default {
mask: true mask: true
}) })
console.log('params**', params) console.log('params**', params)
// {
// "merchantId": 44211227,
// "bussinessScene": 2,
// "customerName": "linl",
// "customerPhone": "13588008885",
// "carTypeName": "问界M7",
// "arrivalDate": "2026-06-25",
// "residentSaleId": "997c9fbb64b046ac900d751d99d0273d",
// "standNo": "",
// "filingDate": "",
// "carTypeId": 1149147,
// "carBrand": "AITO 问界",
// "carBrandId": 3454,
// "oneCarBrand": "鸿蒙智行",
// "oneCarBrandId": 2978,
// "employeeName": "成威2号",
// "userId": "e77729f1a544442a8f43e587e1f6d20a",
// "sellerMerchantId": 44209880
// }
let requestParams = { let requestParams = {
userId:params.userId, userId:params.userId,
merchantId:params.merchantId, merchantId:params.merchantId,
...@@ -440,9 +421,9 @@ export default { ...@@ -440,9 +421,9 @@ export default {
carChildsBrandName:'', carChildsBrandName:'',
carSeriesId:params.carTypeId, carSeriesId:params.carTypeId,
carSeriesName:params.carTypeName, carSeriesName:params.carTypeName,
deliveryDate:'2026-06-25 00:00:00', //交付日期 deliveryDate: params.arrivalDate ? params.arrivalDate + ' 00:00:00' : params.arrivalDate, //交付日期
inviteDate:'2026-06-25 00:00:00', //到店日期 inviteDate: params.filingDate ? params.filingDate + ' 00:00:00' : params.filingDate, //到店日期
createdDate:'2026-06-25', //建档日期 createdDate: params.filingDate ? params.filingDate + ' 00:00:00' : params.filingDate, //建档日期
} }
] ]
} }
...@@ -451,6 +432,7 @@ export default { ...@@ -451,6 +432,7 @@ export default {
_this = this _this = this
console.log('submitCustomerProfileAPI res**', res) console.log('submitCustomerProfileAPI res**', res)
if (res) { if (res) {
uni.$emit('refreshCustomerProfileGroupInfo')
if (res == '1') { if (res == '1') {
this.$refs.successRef.open() this.$refs.successRef.open()
setTimeout(() => { setTimeout(() => {
......
...@@ -66,9 +66,9 @@ export default { ...@@ -66,9 +66,9 @@ export default {
}, },
goodsInfo: {}, goodsInfo: {},
prelearnContext: { prelearnContext: {
activityId: '31', activityId: '',
activityProductId: '16', activityProductId: '',
staffUuid: '849845165165164849489', staffUuid: uni.$storage.get('userInfo').uuid,
staffName: uni.$storage.get('userInfo').name, staffName: uni.$storage.get('userInfo').name,
merchantId: String(uni.$storage.get('userInfo').merchantId ?? ''), merchantId: String(uni.$storage.get('userInfo').merchantId ?? ''),
entrySource: 'home_popup', entrySource: 'home_popup',
...@@ -738,29 +738,7 @@ export default { ...@@ -738,29 +738,7 @@ export default {
async back() { async back() {
try { try {
const res = await uni.$api.commonApi.getPrelernHomePopupAPI() const res = await uni.$api.commonApi.getPrelernHomePopupAPI()
// const res = {
// "activityId": 31,
// "activityName": "618年中促活动A",
// "packages": [
// {
// "activityProductId": "16",
// "packageName": "tttttttt",
// "includes": ['原厂定制车衣','玻璃贴膜'],
// "learnStatus": "STUDIED",
// "scriptReady": true
// }
// ],
// "remainingSkipCount": 0,
// "shouldPopup": true,
// "muteReason": null,
// "remainingActivityCount": null
// }
console.log('[prelearnBridge] getPrelernHomePopupAPI res:', res) console.log('[prelearnBridge] getPrelernHomePopupAPI res:', res)
// if (!res) {
// this.navigateBack()
// return
// }
const packages = res.packages || [] const packages = res.packages || []
const allStudied = packages.length > 0 && packages.every( const allStudied = packages.length > 0 && packages.every(
(pkg) => pkg.learnStatus === 'STUDIED' (pkg) => pkg.learnStatus === 'STUDIED'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!