Commit e963b604 by Lin

修复(Employee, AddFiles, DetailFiles, PrelearnBridge):增强员工管理并优化数据管理

- 在 Employee 组件中新增 localEmployeeList,用于本地管理员工数据。
- 更新 AddFiles 中的员工选择逻辑,采用动态键,并改进显示值。
- 重构 DetailFiles 中的详细显示逻辑,以实现更佳的数据呈现效果。
- 修正 PrelearnBridge 中 merchantId 的使用方式,确保数据检索准确无误。
1 parent c699a62d
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
}, },
data () { data () {
return { return {
localEmployeeList: null
} }
}, },
watch: { watch: {
...@@ -55,15 +56,22 @@ export default { ...@@ -55,15 +56,22 @@ export default {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
selectedId () { selectedId () {
if (Array.isArray(this.list) || this.employeeType === 'seller') { if (Array.isArray(this.list)) {
return this.salesPropsUuid
}
// 优先使用父组件传入的选中值,避免多表单项共用弹框时与 vuex salesUuid 冲突
if (this.salesPropsUuid) {
return this.salesPropsUuid return this.salesPropsUuid
} }
return this.$store.state.user.customerInfo.salesUuid || this.salesPropsUuid return this.$store.state.user.customerInfo.salesUuid
}, },
displayList () { displayList () {
if (Array.isArray(this.list)) { if (Array.isArray(this.list)) {
return this.list return this.list
} }
if (Array.isArray(this.localEmployeeList)) {
return this.localEmployeeList
}
return this.$store.state.user.employeeList return this.$store.state.user.employeeList
} }
}, },
...@@ -74,15 +82,23 @@ export default { ...@@ -74,15 +82,23 @@ export default {
this.$refs.employeeBoxVisible.open() this.$refs.employeeBoxVisible.open()
if (Array.isArray(this.list)) return if (Array.isArray(this.list)) return
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo; { shopMerchantId, merchantId } = userInfo
/**获取销售人员 */ const fetchType = this.employeeType
uni.$api.commonApi this.localEmployeeList = []
.getEmployeeList({ const fetchList = fetchType === 'seller'
merchantId: shopMerchantId, ? uni.$api.popupApi.getEmployeeList({
merchantId,
sceneList: ''
})
: uni.$api.commonApi.getEmployeeList({
merchantId: shopMerchantId
}) })
.then((res) => { fetchList.then((res) => {
this.$store.dispatch("setEmployeeList", res); if (fetchType !== this.employeeType) return
uni.$storage.set("employeeList", res || []); const list = res || []
this.localEmployeeList = list
this.$store.dispatch("setEmployeeList", list)
uni.$storage.set("employeeList", list)
}) })
}, },
handleSelect (item) { handleSelect (item) {
......
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
<template v-else> <template v-else>
<view <view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]" :class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
@click="showPopup(i.popKey)" @click="showPopup(i)"
> >
<view class="value text-hide">{{ customerInfo[i.valueKey] || `请选择${i.label}` }}</view> <view class="value text-hide">{{ getFieldDisplayValue(i) || `请选择${i.label}` }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons> <uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view> </view>
</template> </template>
...@@ -99,9 +99,9 @@ ...@@ -99,9 +99,9 @@
<template v-else> <template v-else>
<view <view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]" :class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
@click="showPopup(i.popKey)" @click="showPopup(i)"
> >
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view> <view class="value text-hide">{{ getFieldDisplayValue(i) || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons> <uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view> </view>
</template> </template>
...@@ -114,7 +114,6 @@ ...@@ -114,7 +114,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="popup"> <view class="popup">
<car-brands <car-brands
ref="carBrandVisible" ref="carBrandVisible"
...@@ -131,17 +130,11 @@ ...@@ -131,17 +130,11 @@
></reception-sence> ></reception-sence>
<employee <employee
ref="residentSaleVisible" ref="residentSaleVisible"
title="流量来源" :title="employeePopupTitle"
:salesPropsUuid="customerInfo.userId" :employeeType="employeeSelectKey === 'sellerUserId' ? 'seller' : 'default'"
:salesPropsUuid="employeeSelectKey ? customerInfo[employeeSelectKey] : ''"
@select="handleSelect($event, 'residentSaleVisible')" @select="handleSelect($event, 'residentSaleVisible')"
/> />
<employee
ref="sellerVisible"
title="驻店零售"
employee-type="seller"
:salesPropsUuid="customerInfo.sellerUserId"
@select="handleSelect($event, 'sellerVisible')"
/>
</view> </view>
<uni-popup ref="successRef" type="message"> <uni-popup ref="successRef" type="message">
<uni-popup-message <uni-popup-message
...@@ -152,14 +145,12 @@ ...@@ -152,14 +145,12 @@
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
import CarBrands from '@/components/CarBrands.vue' import CarBrands from '@/components/CarBrands.vue'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import ReceptionSence from '@/components/HomeFrame/components/ReceptionCenter/ReceptionSence.vue' import ReceptionSence from '@/components/HomeFrame/components/ReceptionCenter/ReceptionSence.vue'
import Employee from '@/components/Employee.vue' import Employee from '@/components/Employee.vue'
import { validateVin, formatVinInput } from '@/utils/vinVaildate' import { validateVin, formatVinInput } from '@/utils/vinVaildate'
const phoneRex = /^[1]([3-9])[0-9]{9}$/, const phoneRex = /^[1]([3-9])[0-9]{9}$/,
default_customerForm = [{ default_customerForm = [{
label: '车主姓名', label: '车主姓名',
...@@ -197,11 +188,12 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/, ...@@ -197,11 +188,12 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/,
}, },
{ {
label: '流量来源', label: '流量来源',
valueKey: 'residentSaleName', valueKey: 'employeeName',
key: 'residentSaleId', key: 'userId',
type: 'select', type: 'select',
required: true, required: true,
popKey: 'residentSaleVisible' popKey: 'residentSaleVisible',
merchantNameKey: 'merchantName'
} }
// { // {
// label: '接待场景', // label: '接待场景',
...@@ -233,12 +225,11 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/, ...@@ -233,12 +225,11 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/,
type: 'date' type: 'date'
},{ },{
label: '驻店零售', label: '驻店零售',
valueKey: 'residentSaleName', valueKey: 'sellerName',
key: 'residentSaleId', key: 'sellerUserId',
type: 'select', type: 'select',
popKey: 'residentSaleVisible' popKey: 'residentSaleVisible'
}] }]
export default { export default {
name: 'AddFiles', name: 'AddFiles',
components: { CarBrands, ReceptionSence, Employee }, components: { CarBrands, ReceptionSence, Employee },
...@@ -266,6 +257,7 @@ export default { ...@@ -266,6 +257,7 @@ export default {
endDate: '', endDate: '',
validateState: true, validateState: true,
employeeSelectKey: '', employeeSelectKey: '',
employeePopupTitle: '驻店零售',
inviteDateTouched: false inviteDateTouched: false
} }
}, },
...@@ -293,6 +285,8 @@ export default { ...@@ -293,6 +285,8 @@ export default {
customerName: '', customerName: '',
customerPhone: '', customerPhone: '',
carTypeName: '', carTypeName: '',
carChildsBrandId: '',
carChildsBrandName: '',
receptionScene: '', receptionScene: '',
arrivalDate: '', arrivalDate: '',
receptionSceneName: '', receptionSceneName: '',
...@@ -325,8 +319,16 @@ export default { ...@@ -325,8 +319,16 @@ export default {
animationDuration: 100 animationDuration: 100
}) })
}, },
showPopup (e) { showPopup (item) {
this.$refs[e].open() this.employeeSelectKey = item.key
this.employeePopupTitle = item.label
this.$refs[item.popKey].open()
},
getFieldDisplayValue (field) {
const value = this.customerInfo[field.valueKey]
if (!value) return ''
const merchantName = field.merchantNameKey && this.customerInfo[field.merchantNameKey]
return merchantName ? `${merchantName}-${value}` : value
}, },
handleSelect (item, popkey) { handleSelect (item, popkey) {
this.$refs[popkey].close() this.$refs[popkey].close()
...@@ -335,14 +337,23 @@ export default { ...@@ -335,14 +337,23 @@ export default {
Object.assign(this.customerInfo, { Object.assign(this.customerInfo, {
carTypeName: item.name, carTypeName: item.name,
carTypeId: item.id, carTypeId: item.id,
carChildsBrandName: item.carChildsBrandName,
carChildsBrandId: item.carChildsBrandId,
carBrand: item.carChildsBrandName, carBrand: item.carChildsBrandName,
carBrandId: item.carChildsBrandId, carBrandId: item.carChildsBrandId,
oneCarBrand: item.carBrand, oneCarBrand: item.carBrand,
oneCarBrandId: item.carBrandId oneCarBrandId: item.carBrandId
}) })
} else if (popkey == 'residentSaleVisible') { } else if (popkey == 'residentSaleVisible') {
this.customerInfo.residentSaleName = item.staffName const field = this.customerForm.concat(this.optionalForm).find(e => e.key === this.employeeSelectKey)
this.customerInfo.residentSaleId = item.uuid if (field) {
if (field.merchantNameKey) {
const { shopMerchantName } = uni.$storage.get('userInfo') || {}
this.customerInfo[field.merchantNameKey] = item.merchantName || shopMerchantName || ''
}
this.customerInfo[field.valueKey] = item.staffName
this.customerInfo[field.key] = item.uuid
}
} else { } else {
this.customerInfo.receptionSceneName = item.receptionSceneName this.customerInfo.receptionSceneName = item.receptionSceneName
this.customerInfo.receptionScene = item.id this.customerInfo.receptionScene = item.id
...@@ -417,10 +428,12 @@ export default { ...@@ -417,10 +428,12 @@ export default {
carTypeId: customerInfo.carTypeId, carTypeId: customerInfo.carTypeId,
carBrand: customerInfo.carBrand, carBrand: customerInfo.carBrand,
carBrandId: customerInfo.carBrandId, carBrandId: customerInfo.carBrandId,
carChildsBrandId: customerInfo.carChildsBrandId,
carChildsBrandName: customerInfo.carChildsBrandName,
oneCarBrand: customerInfo.oneCarBrand, oneCarBrand: customerInfo.oneCarBrand,
oneCarBrandId: customerInfo.oneCarBrandId, oneCarBrandId: customerInfo.oneCarBrandId,
employeeName: uni.$storage.get('userInfo').name, employeeName: customerInfo.employeeName,
userId: uni.$storage.get('userInfo').uuid, userId: customerInfo.userId,
sellerMerchantId: uni.$storage.get('userInfo').merchantId sellerMerchantId: uni.$storage.get('userInfo').merchantId
}) })
uni.showLoading({ uni.showLoading({
...@@ -442,10 +455,13 @@ export default { ...@@ -442,10 +455,13 @@ export default {
customerPhone:params.customerPhone, customerPhone:params.customerPhone,
carBrand:params.carBrand, carBrand:params.carBrand,
carBrandId:params.carBrandId, carBrandId:params.carBrandId,
carChildsBrandId:'', carChildsBrandId: params.carChildsBrandId,
carChildsBrandName:'', carChildsBrandName: params.carChildsBrandName,
standNo:params.standNo,
carSeriesId:params.carTypeId, carSeriesId:params.carTypeId,
carSeriesName:params.carTypeName, carSeriesName:params.carTypeName,
employeeName:params.employeeName,
userId:params.userId,
deliveryDate: params.arrivalDate ? params.arrivalDate + ' 00:00:00' : params.arrivalDate, //交付日期 deliveryDate: params.arrivalDate ? params.arrivalDate + ' 00:00:00' : params.arrivalDate, //交付日期
inviteDate: params.inviteDate ? params.inviteDate + ' 00:00:00' : params.inviteDate, //到店日期 inviteDate: params.inviteDate ? params.inviteDate + ' 00:00:00' : params.inviteDate, //到店日期
createdDate: params.filingDate, //建档日期 createdDate: params.filingDate, //建档日期
...@@ -494,7 +510,6 @@ export default { ...@@ -494,7 +510,6 @@ export default {
} }
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.detail-box { .detail-box {
position: relative; position: relative;
...@@ -505,7 +520,6 @@ export default { ...@@ -505,7 +520,6 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: toRpx(160) toRpx(64) 0; padding: toRpx(160) toRpx(64) 0;
} }
.nav-bar { .nav-bar {
position: fixed; position: fixed;
width: 100%; width: 100%;
...@@ -514,7 +528,6 @@ export default { ...@@ -514,7 +528,6 @@ export default {
top: toRpx(48); top: toRpx(48);
z-index: 999; z-index: 999;
pointer-events: none; pointer-events: none;
.back { .back {
height: 100%; height: 100%;
aspect-ratio: 1/1; aspect-ratio: 1/1;
...@@ -523,7 +536,6 @@ export default { ...@@ -523,7 +536,6 @@ export default {
justify-content: center; justify-content: center;
pointer-events: auto; pointer-events: auto;
} }
.title { .title {
position: absolute; position: absolute;
top: 50%; top: 50%;
...@@ -534,11 +546,9 @@ export default { ...@@ -534,11 +546,9 @@ export default {
color: #1a1a1a; color: #1a1a1a;
} }
} }
.detail-content { .detail-content {
height: calc(100vh - #{toRpx(212)}); height: calc(100vh - #{toRpx(212)});
overflow-y: auto; overflow-y: auto;
.detail-panel { .detail-panel {
width: 100%; width: 100%;
min-height: 100%; min-height: 100%;
...@@ -550,7 +560,6 @@ export default { ...@@ -550,7 +560,6 @@ export default {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.form-header { .form-header {
width: 100%; width: 100%;
height: 28px; height: 28px;
...@@ -564,7 +573,6 @@ export default { ...@@ -564,7 +573,6 @@ export default {
} }
} }
} }
.form-box { .form-box {
flex-shrink: 0; flex-shrink: 0;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -578,18 +586,15 @@ export default { ...@@ -578,18 +586,15 @@ export default {
height: toRpx(80); height: toRpx(80);
font-size: toRpx(28); font-size: toRpx(28);
} }
.label { .label {
width: toRpx(192); width: toRpx(192);
color: #292d33; color: #292d33;
justify-content: center; justify-content: center;
.required { .required {
color: #f24724; color: #f24724;
font-size: toRpx(28); font-size: toRpx(28);
} }
} }
.input, .input,
.select { .select {
width: toRpx(738); width: toRpx(738);
...@@ -603,44 +608,36 @@ export default { ...@@ -603,44 +608,36 @@ export default {
line-height: toRpx(76); line-height: toRpx(76);
padding: 0 toRpx(32) !important; padding: 0 toRpx(32) !important;
font-size: toRpx(28); font-size: toRpx(28);
&::placeholder { &::placeholder {
color: #33333333; color: #33333333;
} }
.value { .value {
max-width: toRpx(598); max-width: toRpx(598);
} }
} }
.placeholderStyle { .placeholderStyle {
color: #33333333; color: #33333333;
} }
.arrow { .arrow {
color: #999 !important; color: #999 !important;
margin-left: auto; margin-left: auto;
flex-shrink: 0; flex-shrink: 0;
} }
.calendar-icon { .calendar-icon {
width: 16px; width: 16px;
height: 16px; height: 16px;
margin-left: auto; margin-left: auto;
flex-shrink: 0; flex-shrink: 0;
} }
.error { .error {
border: toRpx(2) solid #f24724 !important; border: toRpx(2) solid #f24724 !important;
} }
} }
.btns { .btns {
justify-content: center; justify-content: center;
gap: 0 toRpx(34); gap: 0 toRpx(34);
padding-bottom: toRpx(32); padding-bottom: toRpx(32);
flex-shrink: 0; flex-shrink: 0;
.btn { .btn {
width: toRpx(718); width: toRpx(718);
height: toRpx(80); height: toRpx(80);
...@@ -653,12 +650,10 @@ export default { ...@@ -653,12 +650,10 @@ export default {
font-size: toRpx(32); font-size: toRpx(32);
color: #ffffff; color: #ffffff;
} }
.cancel { .cancel {
background: #dae9ff; background: #dae9ff;
color: #2c66f7; color: #2c66f7;
} }
.disabled { .disabled {
background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%); background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%);
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<view class="user-tag"> <view class="user-tag">
<text class="user-tag-text">{{ customerSurname }}</text> <text class="user-tag-text">{{ customerSurname }}</text>
</view> </view>
<view class="user-name">{{ customerInfo.customerName || '-' }}</view> <view class="user-name">{{ displayInfo.customerName || '-' }}</view>
<view class="active-list flex"> <view class="active-list flex">
<view <view
v-for="(tag, index) in goodsSubOrderList" v-for="(tag, index) in goodsSubOrderList"
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
</view> </view>
</view> </view>
<view <view
v-if="getCustomerStatusLabel(customerInfo.customerStatus)" v-if="getCustomerStatusLabel(displayInfo.customerStatus)"
:class="['customer-item-status', getCustomerStatusClass(customerInfo.customerStatus)]" :class="['customer-item-status', getCustomerStatusClass(displayInfo.customerStatus)]"
> >
<text class="customer-item-status-text">{{ getCustomerStatusLabel(customerInfo.customerStatus) }}</text> <text class="customer-item-status-text">{{ getCustomerStatusLabel(displayInfo.customerStatus) }}</text>
</view> </view>
</view> </view>
</view> </view>
...@@ -41,7 +41,10 @@ ...@@ -41,7 +41,10 @@
<view class="label flex"> <view class="label flex">
<view class="required" v-if="i.required">*</view>{{ i.label }} <view class="required" v-if="i.required">*</view>{{ i.label }}
</view> </view>
<template v-if="i.type == 'input'"> <template v-if="i.type == 'readonly'">
<view class="input input--readonly text-hide">{{ customerInfo[i.valueKey] || '-' }}</view>
</template>
<template v-else-if="i.type == 'input'">
<input <input
:type="i.inputType" :type="i.inputType"
:maxlength="i.maxlength" :maxlength="i.maxlength"
...@@ -50,6 +53,7 @@ ...@@ -50,6 +53,7 @@
placeholder="请选择" placeholder="请选择"
placeholder-style="color:rgba(51, 51, 51, 0.2);" placeholder-style="color:rgba(51, 51, 51, 0.2);"
confirm-type="done" confirm-type="done"
@blur="inputBlur($event, i)"
/> />
</template> </template>
<template v-else-if="i.type == 'date'"> <template v-else-if="i.type == 'date'">
...@@ -70,7 +74,7 @@ ...@@ -70,7 +74,7 @@
<template v-else> <template v-else>
<view <view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]" :class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
@click="showPopup(i.popKey)" @click="showPopup(i)"
> >
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view> <view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons> <uni-icons class="arrow" type="right" :size="16"></uni-icons>
...@@ -94,6 +98,7 @@ ...@@ -94,6 +98,7 @@
placeholder="请选择" placeholder="请选择"
placeholder-style="color:rgba(51, 51, 51, 0.2);" placeholder-style="color:rgba(51, 51, 51, 0.2);"
confirm-type="done" confirm-type="done"
@blur="inputBlur($event, i)"
/> />
</template> </template>
<template v-else-if="i.type == 'date'"> <template v-else-if="i.type == 'date'">
...@@ -114,7 +119,7 @@ ...@@ -114,7 +119,7 @@
<template v-else> <template v-else>
<view <view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]" :class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
@click="showPopup(i.popKey)" @click="showPopup(i)"
> >
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view> <view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons> <uni-icons class="arrow" type="right" :size="16"></uni-icons>
...@@ -131,7 +136,11 @@ ...@@ -131,7 +136,11 @@
<view class="required" v-if="i.required">*</view>{{ i.label }} <view class="required" v-if="i.required">*</view>{{ i.label }}
</view> </view>
<template v-if="i.type == 'readonly'"> <template v-if="i.type == 'readonly'">
<view v-if="i.showSync" class="readonly-box flex">
<view class="input input--readonly text-hide">{{ customerInfo[i.valueKey] || '-' }}</view> <view class="input input--readonly text-hide">{{ customerInfo[i.valueKey] || '-' }}</view>
<view class="sync-btn" @click.stop="syncCustomerGroupInfo">同步</view>
</view>
<view v-else class="input input--readonly text-hide">{{ customerInfo[i.valueKey] || '-' }}</view>
</template> </template>
<template v-else-if="i.type == 'input'"> <template v-else-if="i.type == 'input'">
<view class="input-box flex"> <view class="input-box flex">
...@@ -150,7 +159,7 @@ ...@@ -150,7 +159,7 @@
<template v-else-if="i.type == 'select'"> <template v-else-if="i.type == 'select'">
<view <view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]" :class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
@click="showPopup(i.popKey)" @click="showPopup(i)"
> >
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view> <view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons> <uni-icons class="arrow" type="right" :size="16"></uni-icons>
...@@ -167,7 +176,6 @@ ...@@ -167,7 +176,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="popup"> <view class="popup">
<car-brands <car-brands
ref="carBrandVisible" ref="carBrandVisible"
...@@ -184,8 +192,9 @@ ...@@ -184,8 +192,9 @@
></reception-sence> ></reception-sence>
<employee <employee
ref="residentSaleVisible" ref="residentSaleVisible"
title="驻店零售" :title="employeePopupTitle"
:salesPropsUuid="customerInfo.userId" :employeeType="employeeSelectKey === 'advanceUserId' ? 'seller' : 'default'"
:salesPropsUuid="employeeSelectKey ? customerInfo[employeeSelectKey] : customerInfo.advanceUserId"
@select="handleSelect($event, 'residentSaleVisible')" @select="handleSelect($event, 'residentSaleVisible')"
/> />
<employee <employee
...@@ -194,7 +203,7 @@ ...@@ -194,7 +203,7 @@
:list="groupMemberList" :list="groupMemberList"
label-key="contact_name" label-key="contact_name"
value-key="contact_id" value-key="contact_id"
:salesPropsUuid="customerInfo.groupMemberId" :salesPropsUuid="customerInfo.contact_id"
@select="handleSelect($event, 'groupMemberVisible')" @select="handleSelect($event, 'groupMemberVisible')"
/> />
</view> </view>
...@@ -206,15 +215,14 @@ ...@@ -206,15 +215,14 @@
></uni-popup-message> ></uni-popup-message>
</uni-popup> </uni-popup>
</view> </view>
</template> </template>
<script type='text/ecmascript-6'>
<script type='text/ecmascript-6'> import CarBrands from '@/components/CarBrands.vue'
import CarBrands from '@/components/CarBrands.vue' import dayjs from 'dayjs'
import dayjs from 'dayjs' import ReceptionSence from '@/components/HomeFrame/components/ReceptionCenter/ReceptionSence.vue'
import ReceptionSence from '@/components/HomeFrame/components/ReceptionCenter/ReceptionSence.vue' import Employee from '@/components/Employee.vue'
import Employee from '@/components/Employee.vue' import { validateVin, formatVinInput } from '@/utils/vinVaildate'
const phoneRex = /^[1]([3-9])[0-9]{9}$/,
const phoneRex = /^[1]([3-9])[0-9]{9}$/,
default_customerForm = [{ default_customerForm = [{
label: '车主姓名', label: '车主姓名',
valueKey: 'customerName', valueKey: 'customerName',
...@@ -228,11 +236,8 @@ ...@@ -228,11 +236,8 @@
label: '手机号', label: '手机号',
valueKey: 'customerPhone', valueKey: 'customerPhone',
key: 'customerPhone', key: 'customerPhone',
type: 'input', type: 'readonly',
inputType: 'tel', required: true
required: true,
maxlength: 11,
error: false
}, },
{ {
label: '车型', label: '车型',
...@@ -249,21 +254,20 @@ ...@@ -249,21 +254,20 @@
required: true, required: true,
type: 'date' type: 'date'
}, },
// { // {
// label: '接待场景', // label: '接待场景',
// valueKey: 'receptionSceneName', // valueKey: 'receptionSceneName',
// key: 'receptionScene', // key: 'receptionScene',
// type: 'select', // type: 'select',
// required: true, // required: true,
// popKey: 'receptionSceneVisible' // popKey: 'receptionSceneVisible'
// }, // },
{ {
label: '流量来源', label: '流量来源',
valueKey: 'employeeName', valueKey: 'employeeName',
key: 'userId', key: 'userId',
type: 'select', type: 'readonly',
required: true, required: true
popKey: 'residentSaleVisible'
}], }],
default_optionalForm = [{ default_optionalForm = [{
label: '车架号', label: '车架号',
...@@ -275,14 +279,14 @@ ...@@ -275,14 +279,14 @@
}, },
{ {
label: '到店日期', label: '到店日期',
valueKey: 'createdDate', valueKey: 'inviteDate',
key: 'createdDate', key: 'inviteDate',
type: 'date' type: 'date'
}, },
{ {
label: '驻店零售', label: '驻店零售',
valueKey: 'employeeName', valueKey: 'advanceUserName',
key: 'userId', key: 'advanceUserId',
type: 'select', type: 'select',
popKey: 'residentSaleVisible' popKey: 'residentSaleVisible'
}, },
...@@ -292,36 +296,36 @@ ...@@ -292,36 +296,36 @@
key: 'createdDate', key: 'createdDate',
type: 'date' type: 'date'
}], }],
default_groupForm = [{ default_groupForm = [ {
label: '客户群', label: '客户群',
valueKey: 'qwGroupName', valueKey: 'qwGroupName',
key: 'qwGroupName', key: 'qwGroupName',
type: 'readonly' type: 'readonly',
showSync: true
}, },
{ {
label: '群成员关联', label: '群成员关联',
valueKey: 'groupMemberName', valueKey: 'contact_name',
key: 'groupMemberId', key: 'contact_id',
type: 'select', type: 'select',
popKey: 'groupMemberVisible' popKey: 'groupMemberVisible'
}, },
{ {
label: '备注', label: '备注',
valueKey: 'groupRemark', valueKey: 'remark',
key: 'groupRemark', key: 'remark',
type: 'input', type: 'input',
inputType: 'text', inputType: 'text',
maxlength: 200, maxlength: 200,
fullWidth: true, fullWidth: true,
showCount: true showCount: true
}] }]
export default {
export default {
name: 'DetailFiles', name: 'DetailFiles',
components: { CarBrands, ReceptionSence, Employee }, components: { CarBrands, ReceptionSence, Employee },
computed: { computed: {
customerSurname () { customerSurname () {
const name = this.customerInfo.customerName || '' const name = this.displayInfo.customerName || ''
return name ? name.charAt(0) : '' return name ? name.charAt(0) : ''
}, },
activityTagList () { activityTagList () {
...@@ -329,7 +333,7 @@ ...@@ -329,7 +333,7 @@
return [customerInfo.packageName, customerInfo.activityName].filter(Boolean) return [customerInfo.packageName, customerInfo.activityName].filter(Boolean)
}, },
goodsSubOrderList () { goodsSubOrderList () {
const list = this.customerInfo.goodsSubOrderDTOS const list = this.displayInfo.goodsSubOrderDTOS
if (!Array.isArray(list)) return [] if (!Array.isArray(list)) return []
return list.filter(item => item) return list.filter(item => item)
}, },
...@@ -361,9 +365,17 @@ ...@@ -361,9 +365,17 @@
optionalForm: [], optionalForm: [],
groupForm: [], groupForm: [],
customerInfo: {}, customerInfo: {},
displayInfo: {
customerName: '',
customerStatus: '',
goodsSubOrderDTOS: []
},
groupMemberList: [], groupMemberList: [],
startDate: '', startDate: '',
endDate: '' endDate: '',
validateState: true,
employeeSelectKey: 'advanceUserId',
employeePopupTitle: '驻店零售'
} }
}, },
onLoad (options) { onLoad (options) {
...@@ -406,32 +418,159 @@ ...@@ -406,32 +418,159 @@
} }
console.log('getCustomerGroupInfoAPI**customerForm*', this.customerForm) console.log('getCustomerGroupInfoAPI**customerForm*', this.customerForm)
}, },
async submitCustomerProfileAPI() { async submitCustomerProfileAPI(options = {}) {
// carModel:问界M7, const { fromReception = false } = options
// carModelId: 1149147, try {
// carBrand:AITO 问界, this.customerForm.forEach(e => {
// carBrandId:3454, e.error = false
// oneCarBrand:鸿蒙智行, })
// oneCarBrandId:2978 const { customerInfo, customerForm } = this
let requestParams = this.customerInfo customerForm.forEach(e => {
console.log('submitCustomerProfileAPI***', requestParams) if (e.required && !customerInfo[e.key]) throw e.key
const res = await uni.$api.customerApi.submitCustomerProfileAPI(requestParams) })
if (!phoneRex.test(customerInfo.customerPhone)) throw 'customerPhone'
} catch (error) {
const index = this.customerForm.findIndex(e => e.key == error)
if (index !== -1) {
this.customerForm[index].error = true
}
return false
}
const carVin = this.customerInfo.standNo
if (carVin) {
this.customerInfo.standNo = formatVinInput(carVin)
if (this.customerInfo.standNo.length !== 17) {
uni.showToast({
title: '请输入 17 位有效字符(支持大写 A-H/J-N/P-Z、0-9)',
icon: 'none'
})
return false
}
if (!this.validateState) {
uni.showToast({
title: '车架号校验不匹配,请核对后重新输入',
icon: 'none'
})
return false
}
}
const requestParams = {
id: this.customerInfo.id,
customerName: this.customerInfo.customerName,
carBrand: this.customerInfo.carBrand,
carBrandId: this.customerInfo.carBrandId,
carChildsBrandName: this.customerInfo.carChildsBrandName,
carChildsBrandId: this.customerInfo.carChildsBrandId,
carSeriesName: this.customerInfo.carSeriesName,
carSeriesId: this.customerInfo.carSeriesId,
deliveryDate: this.formatDateTime(this.customerInfo.deliveryDate),
createdDate: this.formatDateTime(this.customerInfo.createdDate),
inviteDate: this.formatDateTime(this.customerInfo.inviteDate),
merchantId: this.customerInfo.merchantId,
merchantName: this.customerInfo.merchantName,
userId: this.customerInfo.userId,
employeeName: this.customerInfo.employeeName,
remark: this.customerInfo.remark,
advanceUserId: this.customerInfo.advanceUserId,
advanceUserName: this.customerInfo.advanceUserName,
qwGroupId: this.customerInfo.qwGroupId,
qwGroupName: this.customerInfo.qwGroupName,
wxId: this.customerInfo.contact_id,
wxName: this.customerInfo.contact_name,
standNo:this.customerInfo.standNo,
}
console.log('submitCustomerProfileAPI***',requestParams)
uni.showLoading({
mask: true
})
const res = await uni.$api.customerApi.submitCustomerProfileAPI(requestParams),
_this = this
console.log('submitCustomerProfileAPI***', res) console.log('submitCustomerProfileAPI***', res)
if (res) {
this.syncDisplayInfo()
uni.$emit('refreshCustomerProfileGroupInfo')
if (fromReception) {
uni.hideLoading()
return true
}
if (res == '1') {
this.$refs.successRef.open()
setTimeout(() => {
uni.hideLoading()
this.backPage()
}, 1e3)
} else {
uni.showModal({
content: '存在与该手机号相同的接待记录,系统将自动归类到已接待',
showCancel: false,
confirmText: '确认',
confirmColor: '#347BFF',
success (res) {
if (res.confirm) {
_this.backPage()
}
}
})
uni.hideLoading()
}
return true
} else {
uni.hideLoading()
return false
}
}, },
async getCustomerGroupInfo() { async getCustomerGroupInfo(showToast = false) {
if (!this.customerInfo.customerName || !this.customerInfo.customerPhone) { if (!this.customerInfo.customerName || !this.customerInfo.customerPhone) {
return if (showToast) {
uni.showToast({
title: '请先填写客户姓名和手机号',
icon: 'none'
})
}
return false
} }
let customerGroupParam = this.customerInfo.customerName + this.customerInfo.customerPhone.slice(7,11) let customerGroupParam = this.customerInfo.customerName + this.customerInfo.customerPhone.slice(7,11)
console.log('g张三525235*', customerGroupParam) console.log('getCustomerGroupInfo*', customerGroupParam)
const data = await uni.$api.customerApi.getCustomerGroupInfoAPI({ const data = await uni.$api.customerApi.getCustomerGroupInfoAPI({
customerGroupParam: customerGroupParam customerGroupParam: customerGroupParam
}) })
console.log('getCustomerGroupInfoAPI**getCustomerGroupInfo*', data) console.log('getCustomerGroupInfoAPI**getCustomerGroupInfo*', data)
// http 层已在 code=0 时 resolve(data.data),此处 data 即为业务数据,无需再取 data.data // http 层已在 code=0 时 resolve(data.data),此处 data 即为业务数据,无需再取 data.data
const contactId = data.contact_id const contactId = data && data.contact_id
if (contactId) { if (contactId) {
this.customerInfo.qwGroupId = contactId
this.customerInfo.qwGroupName = data.contact_name || data.name || data.qwGroupName || ''
await this.getCustomerGroupMemberInfoAPI(contactId) await this.getCustomerGroupMemberInfoAPI(contactId)
return true
}
if (showToast) {
uni.showToast({
title: '未找到客户群',
icon: 'none'
})
}
return false
},
async syncCustomerGroupInfo() {
uni.showLoading({
mask: true,
title: '同步中...'
})
try {
const success = await this.getCustomerGroupInfo(true)
if (success) {
uni.showToast({
title: '同步成功',
icon: 'success'
})
}
} catch (error) {
uni.showToast({
title: '同步失败',
icon: 'none'
})
} finally {
uni.hideLoading()
} }
}, },
async getCustomerGroupMemberInfoAPI(contactId) { async getCustomerGroupMemberInfoAPI(contactId) {
...@@ -441,6 +580,13 @@ ...@@ -441,6 +580,13 @@
console.log('群成员getCustomerGroupMemberInfoAPI***', data) console.log('群成员getCustomerGroupMemberInfoAPI***', data)
this.groupMemberList = Array.isArray(data) ? data : [] this.groupMemberList = Array.isArray(data) ? data : []
}, },
syncDisplayInfo (info = this.customerInfo) {
this.displayInfo = {
customerName: info.customerName || '',
customerStatus: info.customerStatus,
goodsSubOrderDTOS: Array.isArray(info.goodsSubOrderDTOS) ? info.goodsSubOrderDTOS : []
}
},
getUpgradeStatusType (label) { getUpgradeStatusType (label) {
if (label === '已升级') return 'success' if (label === '已升级') return 'success'
if (label === '待跟进') return 'warning' if (label === '待跟进') return 'warning'
...@@ -455,6 +601,11 @@ ...@@ -455,6 +601,11 @@
this.customerForm = JSON.parse(JSON.stringify(default_customerForm)) this.customerForm = JSON.parse(JSON.stringify(default_customerForm))
this.optionalForm = JSON.parse(JSON.stringify(default_optionalForm)) this.optionalForm = JSON.parse(JSON.stringify(default_optionalForm))
this.groupForm = JSON.parse(JSON.stringify(default_groupForm)) this.groupForm = JSON.parse(JSON.stringify(default_groupForm))
this.displayInfo = {
customerName: '',
customerStatus: '',
goodsSubOrderDTOS: []
}
this.customerInfo = { this.customerInfo = {
customerName: '', customerName: '',
customerPhone: '', customerPhone: '',
...@@ -468,12 +619,15 @@ ...@@ -468,12 +619,15 @@
deliveryDate: '', deliveryDate: '',
receptionSceneName: '', receptionSceneName: '',
standNo: '', standNo: '',
inviteDate: '',
createdDate: '', createdDate: '',
employeeName: '', employeeName: '',
userId: '', userId: '',
advanceUserName: '',
advanceUserId: '',
qwGroupName: '', qwGroupName: '',
groupMemberName: '', contact_id: '',
groupMemberId: '', contact_name: '',
groupRemark: '' groupRemark: ''
} }
if (this.customerId) this.findVisitsInfo() if (this.customerId) this.findVisitsInfo()
...@@ -484,7 +638,16 @@ ...@@ -484,7 +638,16 @@
}) })
if (res.deliveryDate) res.deliveryDate = dayjs(res.deliveryDate).format("YYYY-MM-DD") if (res.deliveryDate) res.deliveryDate = dayjs(res.deliveryDate).format("YYYY-MM-DD")
if (res.createdDate) res.createdDate = dayjs(res.createdDate).format("YYYY-MM-DD") if (res.createdDate) res.createdDate = dayjs(res.createdDate).format("YYYY-MM-DD")
this.customerInfo = res if (res.inviteDate) res.inviteDate = dayjs(res.inviteDate).format("YYYY-MM-DD")
// 合并而非整对象替换,保留 initForm 中已声明的响应式字段(如 contact_name)
Object.assign(this.customerInfo, res)
if (!this.customerInfo.contact_id && res.wxId) {
this.customerInfo.contact_id = res.wxId
}
if (!this.customerInfo.contact_name && res.wxName) {
this.customerInfo.contact_name = res.wxName
}
this.syncDisplayInfo(this.customerInfo)
console.log('findVisitsInfo**customerInfo*', this.customerInfo) console.log('findVisitsInfo**customerInfo*', this.customerInfo)
await this.getCustomerGroupInfo() await this.getCustomerGroupInfo()
}, },
...@@ -495,10 +658,12 @@ ...@@ -495,10 +658,12 @@
animationDuration: 100 animationDuration: 100
}) })
}, },
startReception () { async startReception () {
const { sceneType, customerInfo } = this const { sceneType, customerInfo } = this
if (sceneType == 7) return // 二手车无接待功能 if (sceneType == 7) return // 二手车无接待功能
if (customerInfo.customerStatus == 2) return if (customerInfo.customerStatus == 2) return
const submitted = await this.submitCustomerProfileAPI({ fromReception: true })
if (!submitted) return
uni.navigateBack({ uni.navigateBack({
delta: 1, delta: 1,
animationType: 'pop-out', animationType: 'pop-out',
...@@ -508,8 +673,13 @@ ...@@ -508,8 +673,13 @@
} }
}) })
}, },
showPopup (e) { showPopup (item) {
this.$refs[e].open() const popKey = typeof item === 'string' ? item : item.popKey
if (popKey === 'residentSaleVisible' && typeof item === 'object') {
this.employeeSelectKey = item.key
this.employeePopupTitle = item.label
}
this.$refs[popKey].open()
}, },
handleSelect (item, popkey) { handleSelect (item, popkey) {
this.$refs[popkey].close() this.$refs[popkey].close()
...@@ -524,11 +694,14 @@ ...@@ -524,11 +694,14 @@
carSeriesId: item.carBrandId carSeriesId: item.carBrandId
}) })
} else if (popkey == 'residentSaleVisible') { } else if (popkey == 'residentSaleVisible') {
this.customerInfo.employeeName = item.staffName const field = this.optionalForm.find(e => e.key === this.employeeSelectKey)
this.customerInfo.userId = item.uuid if (field) {
this.customerInfo[field.valueKey] = item.staffName
this.customerInfo[field.key] = item.uuid
}
} else if (popkey == 'groupMemberVisible') { } else if (popkey == 'groupMemberVisible') {
this.customerInfo.groupMemberName = item.contact_name this.$set(this.customerInfo, 'contact_id', item.contact_id || item.id || '')
this.customerInfo.groupMemberId = item.contact_id this.$set(this.customerInfo, 'contact_name', item.contact_name || item.name || '')
} else { } else {
this.customerInfo.receptionSceneName = item.receptionSceneName this.customerInfo.receptionSceneName = item.receptionSceneName
this.customerInfo.receptionScene = item.id this.customerInfo.receptionScene = item.id
...@@ -537,6 +710,26 @@ ...@@ -537,6 +710,26 @@
bindDateChange (e, valueKey) { bindDateChange (e, valueKey) {
this.customerInfo[valueKey] = e.detail.value this.customerInfo[valueKey] = e.detail.value
}, },
inputBlur (e, val) {
const standNoVal = this.customerInfo.standNo
if (val.key === 'standNo' && standNoVal) {
this.customerInfo.standNo = formatVinInput(standNoVal)
validateVin(this.customerInfo.standNo)
.then(result => {
const { valid } = result.data
this.validateState = valid
})
.catch(() => {
this.validateState = false
})
} else if (val.key === 'standNo') {
this.validateState = true
}
},
formatDateTime (value) {
if (!value) return value
return dayjs(value).format('YYYY-MM-DD HH:mm:ss')
},
async submit () { async submit () {
this.submitCustomerProfileAPI() this.submitCustomerProfileAPI()
try { try {
...@@ -569,13 +762,13 @@ ...@@ -569,13 +762,13 @@
carChildsBrandName: customerInfo.carChildsBrandName, carChildsBrandName: customerInfo.carChildsBrandName,
carChildsBrandId: customerInfo.carChildsBrandId carChildsBrandId: customerInfo.carChildsBrandId
}) })
uni.showLoading({ uni.showLoading({
mask: true mask: true
}) })
const res = await uni.$api.customerApi[targetApi](params), const res = await uni.$api.customerApi[targetApi](params),
_this = this _this = this
if (res) { if (res) {
this.syncDisplayInfo()
uni.$emit('refreshCustomerProfileGroupInfo') uni.$emit('refreshCustomerProfileGroupInfo')
if (res == '1') { if (res == '1') {
this.$refs.successRef.open() this.$refs.successRef.open()
...@@ -607,11 +800,10 @@ ...@@ -607,11 +800,10 @@
} }
} }
} }
} }
</script> </script>
<style scoped lang="scss">
<style scoped lang="scss"> .detail-box {
.detail-box {
position: relative; position: relative;
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
...@@ -619,9 +811,8 @@ ...@@ -619,9 +811,8 @@
background-size: 100%; background-size: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: toRpx(160) toRpx(64) 0; padding: toRpx(160) toRpx(64) 0;
} }
.nav-bar {
.nav-bar {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: toRpx(96); height: toRpx(96);
...@@ -629,7 +820,6 @@ ...@@ -629,7 +820,6 @@
top: toRpx(48); top: toRpx(48);
z-index: 999; z-index: 999;
pointer-events: none; pointer-events: none;
.back { .back {
height: 100%; height: 100%;
aspect-ratio: 1/1; aspect-ratio: 1/1;
...@@ -638,7 +828,6 @@ ...@@ -638,7 +828,6 @@
justify-content: center; justify-content: center;
pointer-events: auto; pointer-events: auto;
} }
.title { .title {
position: absolute; position: absolute;
top: 50%; top: 50%;
...@@ -648,12 +837,10 @@ ...@@ -648,12 +837,10 @@
font-size: toRpx(32); font-size: toRpx(32);
color: #1a1a1a; color: #1a1a1a;
} }
} }
.detail-content {
.detail-content {
height: calc(100vh - #{toRpx(212)}); height: calc(100vh - #{toRpx(212)});
overflow-y: auto; overflow-y: auto;
.detail-panel { .detail-panel {
width: 100%; width: 100%;
min-height: 100%; min-height: 100%;
...@@ -665,7 +852,6 @@ ...@@ -665,7 +852,6 @@
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.detail-info { .detail-info {
position: relative; position: relative;
width: 100%; width: 100%;
...@@ -676,7 +862,6 @@ ...@@ -676,7 +862,6 @@
margin-bottom: 24px; margin-bottom: 24px;
flex-shrink: 0; flex-shrink: 0;
box-sizing: border-box; box-sizing: border-box;
.detail-info-bg { .detail-info-bg {
position: absolute; position: absolute;
inset: 0; inset: 0;
...@@ -685,7 +870,6 @@ ...@@ -685,7 +870,6 @@
backdrop-filter: blur(2px); backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
} }
.detail-info-body { .detail-info-body {
position: relative; position: relative;
z-index: 1; z-index: 1;
...@@ -695,57 +879,45 @@ ...@@ -695,57 +879,45 @@
padding: 0 18px; padding: 0 18px;
box-sizing: border-box; box-sizing: border-box;
} }
.detail-info-left { .detail-info-left {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
} }
.customer-item-status { .customer-item-status {
padding: 0 8px; padding: 0 8px;
border-radius: 4px; border-radius: 4px;
flex-shrink: 0; flex-shrink: 0;
&--warning { &--warning {
background: #FDECE9; background: #FDECE9;
.customer-item-status-text { .customer-item-status-text {
color: #F24724; color: #F24724;
} }
} }
&--success { &--success {
background: #EAF9F1; background: #EAF9F1;
.customer-item-status-text { .customer-item-status-text {
color: #35C376; color: #35C376;
} }
} }
&--failed { &--failed {
background: #F5F7FA; background: #F5F7FA;
.customer-item-status-text { .customer-item-status-text {
color: #999EA8; color: #999EA8;
} }
} }
&--refund { &--refund {
background: #FFF5E6; background: #FFF5E6;
.customer-item-status-text { .customer-item-status-text {
color: #F7A431; color: #F7A431;
} }
} }
} }
.customer-item-status-text { .customer-item-status-text {
font-size: 12px; font-size: 12px;
line-height: 22px; line-height: 22px;
} }
.user-tag { .user-tag {
width: 32px; width: 32px;
height: 32px; height: 32px;
...@@ -755,7 +927,6 @@ ...@@ -755,7 +927,6 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-shrink: 0; flex-shrink: 0;
.user-tag-text { .user-tag-text {
font-size: 14px; font-size: 14px;
line-height: 20px; line-height: 20px;
...@@ -763,7 +934,6 @@ ...@@ -763,7 +934,6 @@
color: #2c66f7; color: #2c66f7;
} }
} }
.user-name { .user-name {
font-size: 16px; font-size: 16px;
font-weight: 500; font-weight: 500;
...@@ -771,7 +941,6 @@ ...@@ -771,7 +941,6 @@
flex-shrink: 0; flex-shrink: 0;
white-space: nowrap; white-space: nowrap;
} }
.active-list { .active-list {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
...@@ -779,7 +948,6 @@ ...@@ -779,7 +948,6 @@
gap: 8px; gap: 8px;
overflow: hidden; overflow: hidden;
} }
.active-item { .active-item {
padding: 6px 12px; padding: 6px 12px;
border: 1px solid #dce1e6; border: 1px solid #dce1e6;
...@@ -792,7 +960,6 @@ ...@@ -792,7 +960,6 @@
box-sizing: border-box; box-sizing: border-box;
} }
} }
.form-header { .form-header {
width: 100%; width: 100%;
height: 28px; height: 28px;
...@@ -805,9 +972,8 @@ ...@@ -805,9 +972,8 @@
justify-content: center; justify-content: center;
} }
} }
} }
.form-box {
.form-box {
flex-shrink: 0; flex-shrink: 0;
flex-wrap: wrap; flex-wrap: wrap;
align-items: flex-start; align-items: flex-start;
...@@ -815,7 +981,6 @@ ...@@ -815,7 +981,6 @@
row-gap: 16px; row-gap: 16px;
padding: toRpx(32) toRpx(40); padding: toRpx(32) toRpx(40);
justify-content: space-between; justify-content: space-between;
&--no-top { &--no-top {
padding-top: 0; padding-top: 0;
} }
...@@ -824,18 +989,15 @@ ...@@ -824,18 +989,15 @@
height: toRpx(80); height: toRpx(80);
font-size: toRpx(28); font-size: toRpx(28);
} }
.label { .label {
width: toRpx(192); width: toRpx(192);
color: #292d33; color: #292d33;
justify-content: center; justify-content: center;
.required { .required {
color: #f24724; color: #f24724;
font-size: toRpx(28); font-size: toRpx(28);
} }
} }
.input, .input,
.select { .select {
width: toRpx(738); width: toRpx(738);
...@@ -849,38 +1011,53 @@ ...@@ -849,38 +1011,53 @@
line-height: toRpx(76); line-height: toRpx(76);
padding: 0 toRpx(32) !important; padding: 0 toRpx(32) !important;
font-size: toRpx(28); font-size: toRpx(28);
&::placeholder { &::placeholder {
color: #33333333; color: #33333333;
} }
.value { .value {
max-width: toRpx(598); max-width: toRpx(598);
} }
} }
.placeholderStyle { .placeholderStyle {
color: #33333333; color: #33333333;
} }
.arrow { .arrow {
color: #999 !important; color: #999 !important;
margin-left: auto; margin-left: auto;
flex-shrink: 0; flex-shrink: 0;
} }
.error { .error {
border: toRpx(2) solid #f24724 !important; border: toRpx(2) solid #f24724 !important;
} }
.input--readonly { .input--readonly {
color: #666666; color: #666666;
background: #f5f7fa; background: #f5f7fa;
} }
.readonly-box {
width: toRpx(738);
align-items: center;
gap: toRpx(16);
.input--readonly {
flex: 1;
width: 0;
}
.sync-btn {
flex-shrink: 0;
min-width: toRpx(112);
height: toRpx(76);
padding: 0 toRpx(24);
background: #dae9ff;
border-radius: toRpx(16);
color: #2c66f7;
font-size: toRpx(28);
font-weight: 500;
line-height: toRpx(76);
text-align: center;
box-sizing: border-box;
}
}
.form-item--full { .form-item--full {
width: 100%; width: 100%;
.input-box, .input-box,
.input, .input,
.select, .select,
...@@ -889,7 +1066,6 @@ ...@@ -889,7 +1066,6 @@
width: 0; width: 0;
} }
} }
.input-box { .input-box {
width: toRpx(738); width: toRpx(738);
height: toRpx(76); height: toRpx(76);
...@@ -898,7 +1074,6 @@ ...@@ -898,7 +1074,6 @@
box-sizing: border-box; box-sizing: border-box;
align-items: center; align-items: center;
padding-right: toRpx(24); padding-right: toRpx(24);
.input--count { .input--count {
flex: 1; flex: 1;
width: 0; width: 0;
...@@ -908,7 +1083,6 @@ ...@@ -908,7 +1083,6 @@
padding: 0 0 0 toRpx(32) !important; padding: 0 0 0 toRpx(32) !important;
line-height: toRpx(76); line-height: toRpx(76);
} }
.input-count { .input-count {
flex-shrink: 0; flex-shrink: 0;
font-size: toRpx(24); font-size: toRpx(24);
...@@ -917,14 +1091,12 @@ ...@@ -917,14 +1091,12 @@
white-space: nowrap; white-space: nowrap;
} }
} }
} }
.btns {
.btns {
justify-content: center; justify-content: center;
gap: 0 toRpx(34); gap: 0 toRpx(34);
padding-bottom: toRpx(32); padding-bottom: toRpx(32);
flex-shrink: 0; flex-shrink: 0;
.btn { .btn {
width: toRpx(718); width: toRpx(718);
height: toRpx(80); height: toRpx(80);
...@@ -937,14 +1109,12 @@ ...@@ -937,14 +1109,12 @@
font-size: toRpx(32); font-size: toRpx(32);
color: #ffffff; color: #ffffff;
} }
.cancel { .cancel {
background: #dae9ff; background: #dae9ff;
color: #2c66f7; color: #2c66f7;
} }
.disabled { .disabled {
background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%); background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%);
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
activityProductId: '', activityProductId: '',
staffUuid: uni.$storage.get('userInfo').uuid, 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').shopMerchantId ?? ''),
entrySource: 'home_popup', entrySource: 'home_popup',
skipCount: 0, skipCount: 0,
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!