Commit be029d48 by 李伟康

fix(tape): 解决完成步骤中的数据传递和音频停止问题

- 移除 FinishStep 组件中的调试日志
- 在提交事件中传递接待状态值
- 优化客户信息更新逻辑,直接传入完整对象而不是合并
- 注释掉 FormAdd 组件中的汽车品牌级联选项
- 在权益详情页面的 done 方法中添加接待状态更新功能
- 移除 backHome 函数中的重复音频停止调用
- 为 done 函数添加参数以接收状态值并更新业务数据
1 parent ed3be0ec
...@@ -300,7 +300,6 @@ ...@@ -300,7 +300,6 @@
flag = phoneRex.test(phoneValue) == false flag = phoneRex.test(phoneValue) == false
} }
} }
console.log(errorTip.value , flag)
return errorTip.value && flag return errorTip.value && flag
} }
...@@ -358,7 +357,7 @@ ...@@ -358,7 +357,7 @@
if (successRef.value != null) { if (successRef.value != null) {
(successRef.value as ComponentPublicInstance).$callMethod('open') (successRef.value as ComponentPublicInstance).$callMethod('open')
} }
emit('submit') emit('submit',receptionStatus.value)
} }
// 保存 // 保存
function submit(): void { function submit(): void {
...@@ -393,10 +392,9 @@ ...@@ -393,10 +392,9 @@
const customerInfo = dispatch('getCustomerInfo') as IUTSObject const customerInfo = dispatch('getCustomerInfo') as IUTSObject
const value = formData.value as UTSJSONObject const value = formData.value as UTSJSONObject
if (popkey == "employeeBoxVisible") { if (popkey == "employeeBoxVisible") {
(value as UTSJSONObject).salesUuid = item['uuid'] as string (value as UTSJSONObject).salesUuid = item['uuid'] as string
(value as UTSJSONObject).staffName = item['staffName'] as string (value as UTSJSONObject).staffName = item['staffName'] as string
dispatch("setCustomerInfo", { ...customerInfo, ...value }) dispatch("setCustomerInfo", { ...customerInfo, salesUuid: item['uuid'] as string, staffName: item['staffName'] as string })
} else { } else {
if (carBrandListVisible.value != null) { if (carBrandListVisible.value != null) {
(carBrandListVisible.value as ComponentPublicInstance).$callMethod('close') (carBrandListVisible.value as ComponentPublicInstance).$callMethod('close')
......
...@@ -185,39 +185,39 @@ const brandCascaderValue = ref<Array<string | number>>([]) ...@@ -185,39 +185,39 @@ const brandCascaderValue = ref<Array<string | number>>([])
// 汽车品牌车型模拟数据(级联:品牌 -> 车型) // 汽车品牌车型模拟数据(级联:品牌 -> 车型)
const brandCascaderOptions: UnCascaderOption[] = [ const brandCascaderOptions: UnCascaderOption[] = [
{ // {
text: 'AITO 问界', // text: 'AITO 问界',
value: 'aito', // value: 'aito',
children: [ // children: [
{ text: '问界 M9', value: 'aito-m9' }, // { text: '问界 M9', value: 'aito-m9' },
{ text: '问界 M8', value: 'aito-m8' }, // { text: '问界 M8', value: 'aito-m8' },
{ text: '问界 M7', value: 'aito-m7' }, // { text: '问界 M7', value: 'aito-m7' },
{ text: '问界 M5', value: 'aito-m5' }, // { text: '问界 M5', value: 'aito-m5' },
{ text: '问界 S9', value: 'aito-s9' } // { text: '问界 S9', value: 'aito-s9' }
] // ]
}, // },
{ // {
text: '比亚迪', // text: '比亚迪',
value: 'byd', // value: 'byd',
children: [ // children: [
{ text: '汉', value: 'byd-han' }, // { text: '汉', value: 'byd-han' },
{ text: '唐', value: 'byd-tang' }, // { text: '唐', value: 'byd-tang' },
{ text: '宋', value: 'byd-song' }, // { text: '宋', value: 'byd-song' },
{ text: '秦', value: 'byd-qin' }, // { text: '秦', value: 'byd-qin' },
{ text: '海豹', value: 'byd-haibao' }, // { text: '海豹', value: 'byd-haibao' },
{ text: '海豚', value: 'byd-haitun' } // { text: '海豚', value: 'byd-haitun' }
] // ]
}, // },
{ // {
text: '一汽-大众奥迪', // text: '一汽-大众奥迪',
value: 'audi', // value: 'audi',
children: [ // children: [
{ text: '奥迪 A7L', value: 'audi-a7l' }, // { text: '奥迪 A7L', value: 'audi-a7l' },
{ text: '奥迪 Q5 e-tron', value: 'audi-q5-etron' }, // { text: '奥迪 Q5 e-tron', value: 'audi-q5-etron' },
{ text: '奥迪 Q6', value: 'audi-q6' }, // { text: '奥迪 Q6', value: 'audi-q6' },
{ text: '奥迪 A5L Sportback', value: 'audi-a5l' } // { text: '奥迪 A5L Sportback', value: 'audi-a5l' }
] // ]
} // }
] ]
// 接待场景选择器 // 接待场景选择器
......
...@@ -489,7 +489,6 @@ const currentCarInfo = computed(() => { ...@@ -489,7 +489,6 @@ const currentCarInfo = computed(() => {
dispatch('clearReceptionTrack') dispatch('clearReceptionTrack')
} }
function backHome():void{ function backHome():void{
recordService.stopAudio()
uni.navigateBack() uni.navigateBack()
} }
function back(): void { function back(): void {
...@@ -506,7 +505,7 @@ const currentCarInfo = computed(() => { ...@@ -506,7 +505,7 @@ const currentCarInfo = computed(() => {
backHome() backHome()
} }
function done() { function done(val: string) {
showPayPage.value = false showPayPage.value = false
if (toolRef.value != null) { if (toolRef.value != null) {
(toolRef.value as ComponentPublicInstance).$callMethod('hide') (toolRef.value as ComponentPublicInstance).$callMethod('hide')
...@@ -514,6 +513,15 @@ const currentCarInfo = computed(() => { ...@@ -514,6 +513,15 @@ const currentCarInfo = computed(() => {
if (stepRef.value != null) { if (stepRef.value != null) {
(stepRef.value as ComponentPublicInstance).$callMethod('close') (stepRef.value as ComponentPublicInstance).$callMethod('close')
} }
const customerInfo = state.user.customerInfo as UTSJSONObject
customerInfo.receptionStatus = val
console.log(JSON.stringify(customerInfo))
recordService.updateBusinessData(
'customer',
customerInfo
)
recordService.stopAudio()
uni.navigateBack() uni.navigateBack()
// receptionTrackLeave() // receptionTrackLeave()
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!