Commit 647dca8d by liimin

Merge branch 'feature/rework' of http://192.168.3.233:8090/monorepo/venus into feature/rework

2 parents f389b14d 9443e949
......@@ -33,7 +33,8 @@
<view
class="form-item"
>
<view :class="['label', { required: i.required == true}]">
<view class="label flex">
<view v-if="i.required == true" class="required">*</view>
{{ i.label }}
</view>
<view :class="['value', { error: showError(i.key) && i.required == true }, { disabled: customerType == 0 || i.disabled == true }]">
......@@ -51,7 +52,7 @@
</template>
<template v-else>
<view
:class="['select', `${(formData as UTSJSONObject)[i.key] != '' ? '' : 'placeholder'}`]"
:class="['select', {'placeholder': (formData as UTSJSONObject)[i.key] == ''}]"
@click="showPopup(i)"
:key="selectKey"
>
......@@ -290,7 +291,9 @@
(formRef.value as ComponentPublicInstance).$callMethod('close')
}
}, { immediate: true })
watch(errorTip, () => {
console.log('errorTip', errorTip.value)
})
function showError(key: string): boolean {
const value = formData.value
let flag = (value as UTSJSONObject)[key] == ''
......@@ -300,7 +303,6 @@
flag = phoneRex.test(phoneValue) == false
}
}
console.log(errorTip.value , flag)
return errorTip.value && flag
}
......@@ -358,7 +360,7 @@
if (successRef.value != null) {
(successRef.value as ComponentPublicInstance).$callMethod('open')
}
emit('submit')
emit('submit',receptionStatus.value)
}
// 保存
function submit(): void {
......@@ -393,10 +395,9 @@
const customerInfo = dispatch('getCustomerInfo') as IUTSObject
const value = formData.value as UTSJSONObject
if (popkey == "employeeBoxVisible") {
(value as UTSJSONObject).salesUuid = item['uuid'] as string
(value as UTSJSONObject).staffName = item['staffName'] as string
dispatch("setCustomerInfo", { ...customerInfo, ...value })
(value as UTSJSONObject).staffName = item['staffName'] as string
dispatch("setCustomerInfo", { ...customerInfo, salesUuid: item['uuid'] as string, staffName: item['staffName'] as string })
} else {
if (carBrandListVisible.value != null) {
(carBrandListVisible.value as ComponentPublicInstance).$callMethod('close')
......@@ -421,7 +422,7 @@
for (let i = 0; i < keys.length; i++) {
const key = keys[i]
const value = customerInfo[key] as string | null
if (value == null || value === '') {
if (value == null || value == '') {
stepValue = 1
break
}
......@@ -507,10 +508,8 @@
.form {
display: flex;
flex-wrap: wrap;
gap: 24rpx 0;
padding-top: 30rpx;
flex-direction: column;
&-item {
width: 100%;
display: flex;
......@@ -518,7 +517,7 @@
color: #6c6c70;
font-size: 30rpx;
box-sizing: border-box;
margin: 0 auto;
margin: 0 auto 24rpx;
flex-direction: row;
.label {
position: relative;
......@@ -526,18 +525,8 @@
flex-shrink: 0;
width: 144rpx;
font-size: 30rpx;
&.required {
padding-left: 20rpx;
&::before {
content: '*';
color: #ff0000;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
.required{
color: #ff0000;
}
}
......@@ -574,7 +563,7 @@
.select {
display: flex;
align-items: center;
justify-content: space-between;
.arrow {
margin-left: auto;
}
......@@ -582,7 +571,7 @@
.placeholder {
font-size: 30rpx;
color: #c9c9c9;
color: #c9c9c9 !important;
}
}
......
......@@ -185,39 +185,39 @@ const brandCascaderValue = ref<Array<string | number>>([])
// 汽车品牌车型模拟数据(级联:品牌 -> 车型)
const brandCascaderOptions: UnCascaderOption[] = [
{
text: 'AITO 问界',
value: 'aito',
children: [
{ text: '问界 M9', value: 'aito-m9' },
{ text: '问界 M8', value: 'aito-m8' },
{ text: '问界 M7', value: 'aito-m7' },
{ text: '问界 M5', value: 'aito-m5' },
{ text: '问界 S9', value: 'aito-s9' }
]
},
{
text: '比亚迪',
value: 'byd',
children: [
{ text: '汉', value: 'byd-han' },
{ text: '唐', value: 'byd-tang' },
{ text: '宋', value: 'byd-song' },
{ text: '秦', value: 'byd-qin' },
{ text: '海豹', value: 'byd-haibao' },
{ text: '海豚', value: 'byd-haitun' }
]
},
{
text: '一汽-大众奥迪',
value: 'audi',
children: [
{ text: '奥迪 A7L', value: 'audi-a7l' },
{ text: '奥迪 Q5 e-tron', value: 'audi-q5-etron' },
{ text: '奥迪 Q6', value: 'audi-q6' },
{ text: '奥迪 A5L Sportback', value: 'audi-a5l' }
]
}
// {
// text: 'AITO 问界',
// value: 'aito',
// children: [
// { text: '问界 M9', value: 'aito-m9' },
// { text: '问界 M8', value: 'aito-m8' },
// { text: '问界 M7', value: 'aito-m7' },
// { text: '问界 M5', value: 'aito-m5' },
// { text: '问界 S9', value: 'aito-s9' }
// ]
// },
// {
// text: '比亚迪',
// value: 'byd',
// children: [
// { text: '汉', value: 'byd-han' },
// { text: '唐', value: 'byd-tang' },
// { text: '宋', value: 'byd-song' },
// { text: '秦', value: 'byd-qin' },
// { text: '海豹', value: 'byd-haibao' },
// { text: '海豚', value: 'byd-haitun' }
// ]
// },
// {
// text: '一汽-大众奥迪',
// value: 'audi',
// children: [
// { text: '奥迪 A7L', value: 'audi-a7l' },
// { text: '奥迪 Q5 e-tron', value: 'audi-q5-etron' },
// { text: '奥迪 Q6', value: 'audi-q6' },
// { text: '奥迪 A5L Sportback', value: 'audi-a5l' }
// ]
// }
]
// 接待场景选择器
......
......@@ -164,7 +164,7 @@
import { state , dispatch} from "@/store/index.uts"
import { getSoureData } from '@/api/system-api.uts'
import { findPayInfo as findPayInfoApi } from '@/api/common-api.uts'
import { recordService, BusinessDataType } from '@/services/recorder/index.uts'
type BackPressEvent = {
from: string
}
......@@ -396,6 +396,7 @@ const currentCarInfo = computed(() => {
paymentTypeList.value = paymentType
}
onLoad((options) => {
recordService.startAudio()
dispatch('setCustomerInfo', {})
moduleList.value = [
{
......@@ -488,7 +489,6 @@ const currentCarInfo = computed(() => {
dispatch('clearReceptionTrack')
}
function backHome():void{
clearHistory()
uni.navigateBack()
}
function back(): void {
......@@ -505,7 +505,7 @@ const currentCarInfo = computed(() => {
backHome()
}
function done() {
function done(val: string) {
showPayPage.value = false
if (toolRef.value != null) {
(toolRef.value as ComponentPublicInstance).$callMethod('hide')
......@@ -513,6 +513,15 @@ const currentCarInfo = computed(() => {
if (stepRef.value != null) {
(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()
// receptionTrackLeave()
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!