Commit 565096a8 by Lin

feat(Employee, AddFiles, DetailFiles):增强员工管理与数据处理功能

- 更新 Employee 组件,新增 employeeType 和 sellerEmployeeList,以实现更完善的员工分类。
- 优化 AddFiles 组件,动态设置员工选择标题,并改进邀请日期的逻辑管理。
- 重构 DetailFiles,提升客户信息的显示效果,并确保数据处理的准确性。
1 parent 450b9d2d
......@@ -32,15 +32,15 @@ export default {
type: String,
default: 'uuid'
},
/** 转化人员(驻店零售)模式,与 OrderPopup 转化人员选择项一致 */
sellerUser: {
type: Boolean,
default: false
// default: 销售顾问;seller: 转化人员/驻店零售
employeeType: {
type: String,
default: 'default'
}
},
data () {
return {
localEmployeeList: null
sellerEmployeeList: []
}
},
watch: {
......@@ -56,21 +56,17 @@ export default {
return this.$store.state.user.historyStatus
},
selectedId () {
if (Array.isArray(this.list)) {
if (Array.isArray(this.list) || this.employeeType === 'seller') {
return this.salesPropsUuid
}
// 优先使用父组件传入的选中值,避免多表单项共用弹框时与 vuex salesUuid 冲突
if (this.salesPropsUuid) {
return this.salesPropsUuid
}
return this.$store.state.user.customerInfo.salesUuid
return this.$store.state.user.customerInfo.salesUuid || this.salesPropsUuid
},
displayList () {
if (Array.isArray(this.list)) {
return this.list
}
if (Array.isArray(this.localEmployeeList)) {
return this.localEmployeeList
if (this.employeeType === 'seller') {
return this.sellerEmployeeList
}
return this.$store.state.user.employeeList
}
......@@ -81,25 +77,29 @@ export default {
open () {
this.$refs.employeeBoxVisible.open()
if (Array.isArray(this.list)) return
const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId, merchantId } = userInfo
const fetchType = this.employeeType
this.localEmployeeList = []
const fetchList = fetchType === 'seller'
? uni.$api.popupApi.getEmployeeList({
merchantId,
sceneList: ''
const userInfo = uni.$storage.get("userInfo")
if (this.employeeType === 'seller') {
const { merchantId } = userInfo
uni.$api.popupApi
.getEmployeeList({
merchantId,
sceneList: ''
})
.then((res) => {
this.sellerEmployeeList = res || []
})
return
}
const { shopMerchantId } = userInfo
/**获取销售人员 */
uni.$api.commonApi
.getEmployeeList({
merchantId: shopMerchantId,
})
: uni.$api.commonApi.getEmployeeList({
merchantId: shopMerchantId
.then((res) => {
this.$store.dispatch("setEmployeeList", res);
uni.$storage.set("employeeList", res || []);
})
fetchList.then((res) => {
if (fetchType !== this.employeeType) return
const list = res || []
this.localEmployeeList = list
this.$store.dispatch("setEmployeeList", list)
uni.$storage.set("employeeList", list)
})
},
handleSelect (item) {
this.close();
......
......@@ -130,7 +130,7 @@
></reception-sence>
<employee
ref="residentSaleVisible"
:title="employeePopupTitle"
:title="employeeSelectKey === 'sellerUserId' ? '驻店零售' : '流量来源'"
:employeeType="employeeSelectKey === 'sellerUserId' ? 'seller' : 'default'"
:salesPropsUuid="employeeSelectKey ? customerInfo[employeeSelectKey] : ''"
@select="handleSelect($event, 'residentSaleVisible')"
......@@ -214,8 +214,8 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/,
},
{
label: '到店日期',
valueKey: 'arrivalDate',
key: 'arrivalDate',
valueKey: 'inviteDate',
key: 'inviteDate',
type: 'date'
},
{
......@@ -257,7 +257,6 @@ export default {
endDate: '',
validateState: true,
employeeSelectKey: '',
employeePopupTitle: '驻店零售',
inviteDateTouched: false
}
},
......@@ -296,8 +295,10 @@ export default {
merchantName: '',
sellerName: '',
sellerUserId: '',
inviteDate: '',
filingDate: ''
}
this.inviteDateTouched = false
if (this.customerId) this.findVisitsInfo()
},
async findVisitsInfo () {
......@@ -305,8 +306,10 @@ export default {
id: this.customerId
})
if (res.arrivalDate) res.arrivalDate = dayjs(res.arrivalDate).format("YYYY-MM-DD")
if (res.inviteDate) res.inviteDate = dayjs(res.inviteDate).format("YYYY-MM-DD")
if (res.filingDate) res.filingDate = dayjs(res.filingDate).format("YYYY-MM-DD")
this.customerInfo = res
this.inviteDateTouched = !!res.inviteDate
},
backPage () {
uni.navigateBack({
......@@ -317,7 +320,6 @@ export default {
},
showPopup (item) {
this.employeeSelectKey = item.key
this.employeePopupTitle = item.label
this.$refs[item.popKey].open()
},
getFieldDisplayValue (field) {
......@@ -356,7 +358,14 @@ export default {
}
},
bindDateChange (e, valueKey) {
this.customerInfo[valueKey] = e.detail.value
const value = e.detail.value
this.customerInfo[valueKey] = value
if (valueKey === 'arrivalDate' && !this.inviteDateTouched) {
this.customerInfo.inviteDate = value
}
if (valueKey === 'inviteDate') {
this.inviteDateTouched = true
}
},
inputBlur (e, val) {
const standNoVal = this.customerInfo.standNo
......@@ -434,6 +443,8 @@ export default {
merchantId:params.merchantId,
employeeName:params.employeeName,
sellerMerchantId:params.sellerMerchantId,
sellerUserId: params.sellerUserId,
sellerName: customerInfo.sellerName,
preliminaryOrders: [
{
sceneType:1,
......@@ -450,7 +461,7 @@ export default {
employeeName:params.employeeName,
userId:params.userId,
deliveryDate: params.arrivalDate ? params.arrivalDate + ' 00:00:00' : params.arrivalDate, //交付日期
inviteDate: params.filingDate ? params.filingDate + ' 00:00:00' : params.filingDate, //到店日期
inviteDate: params.inviteDate ? params.inviteDate + ' 00:00:00' : params.inviteDate, //到店日期
createdDate: params.filingDate, //建档日期
sellerUserld: params.sellerUserId,
sellerName: customerInfo.sellerName,
......
<template>
<view class="detail-box">
<view class="nav-bar">
<view class="back" @click="backPage">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="title">客户建档详情</view>
<view class="detail-box">
<view class="nav-bar">
<view class="back" @click="backPage">
<uni-icons type="left" :size="20" color="#000"></uni-icons>
</view>
<view class="detail-content">
<view class="detail-panel">
<view class="detail-info">
<view class="detail-info-bg"></view>
<view class="detail-info-body flex">
<view class="detail-info-left flex">
<view class="user-tag">
<text class="user-tag-text">{{ customerSurname }}</text>
</view>
<view class="user-name">{{ customerInfo.customerName || '-' }}</view>
<view class="active-list flex">
<view
v-for="(tag, index) in goodsSubOrderList"
:key="index"
class="active-item"
>
{{ tag.upgradeGoodsAlias || tag.upgradeGoodsName || tag.packageName }}
</view>
</view>
<view class="title">客户建档详情</view>
</view>
<view class="detail-content">
<view class="detail-panel">
<view class="detail-info">
<view class="detail-info-bg"></view>
<view class="detail-info-body flex">
<view class="detail-info-left flex">
<view class="user-tag">
<text class="user-tag-text">{{ customerSurname }}</text>
</view>
<view
v-if="getCustomerStatusLabel(customerInfo.customerStatus)"
:class="['customer-item-status', getCustomerStatusClass(customerInfo.customerStatus)]"
>
<text class="customer-item-status-text">{{ getCustomerStatusLabel(customerInfo.customerStatus) }}</text>
<view class="user-name">{{ displayInfo.customerName || '-' }}</view>
<view class="active-list flex">
<view
v-for="(tag, index) in goodsSubOrderList"
:key="index"
class="active-item"
>
{{ tag.upgradeGoodsAlias || tag.upgradeGoodsName || tag.packageName }}
</view>
</view>
</view>
</view>
<view class="form-header">基本信息</view>
<view class="form-box flex">
<template v-for="(i, index) in customerForm">
<view class="form-item flex" :key="index">
<view class="label flex">
<view class="required" v-if="i.required">*</view>{{ i.label }}
<view
v-if="getCustomerStatusLabel(displayInfo.customerStatus)"
:class="['customer-item-status', getCustomerStatusClass(displayInfo.customerStatus)]"
>
<text class="customer-item-status-text">{{ getCustomerStatusLabel(displayInfo.customerStatus) }}</text>
</view>
</view>
</view>
<view class="form-header">基本信息</view>
<view class="form-box flex">
<template v-for="(i, index) in customerForm">
<view class="form-item flex" :key="index">
<view class="label flex">
<view class="required" v-if="i.required">*</view>{{ i.label }}
</view>
<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
:type="i.inputType"
:maxlength="i.maxlength"
v-model="customerInfo[i.valueKey]"
:class="['input', { error: i.error }]"
placeholder="请选择"
placeholder-style="color:rgba(51, 51, 51, 0.2);"
confirm-type="done"
@blur="inputBlur($event, i)"
/>
</template>
<template v-else-if="i.type == 'date'">
<picker
mode="date"
fields="day"
:start="startDate"
:end="endDate"
@change="bindDateChange($event, i.valueKey)"
:value="customerInfo[i.valueKey]"
>
<view :class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]">
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
</picker>
</template>
<template v-else>
<view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
@click="showPopup(i.popKey)"
>
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
<template v-if="i.type == 'input'">
<input
:type="i.inputType"
:maxlength="i.maxlength"
v-model="customerInfo[i.valueKey]"
:class="['input', { error: i.error }]"
placeholder="请选择"
placeholder-style="color:rgba(51, 51, 51, 0.2);"
confirm-type="done"
/>
</template>
<template v-else-if="i.type == 'date'">
<picker
mode="date"
fields="day"
:start="startDate"
:end="endDate"
@change="bindDateChange($event, i.valueKey)"
:value="customerInfo[i.valueKey]"
>
<view :class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]">
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
</picker>
</template>
<template v-else>
<view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
@click="showPopup(i.popKey)"
>
</template>
</view>
</template>
</view>
<view class="form-box form-box--no-top flex">
<template v-for="(i, index) in optionalForm">
<view class="form-item flex" :key="index">
<view class="label flex">
<view class="required" v-if="i.required">*</view>{{ i.label }}
</view>
<template v-if="i.type == 'input'">
<input
:type="i.inputType"
:maxlength="i.maxlength"
v-model="customerInfo[i.valueKey]"
:class="['input', { error: i.error }]"
placeholder="请选择"
placeholder-style="color:rgba(51, 51, 51, 0.2);"
confirm-type="done"
@blur="inputBlur($event, i)"
/>
</template>
<template v-else-if="i.type == 'date'">
<picker
mode="date"
fields="day"
:start="startDate"
:end="endDate"
@change="bindDateChange($event, i.valueKey)"
:value="customerInfo[i.valueKey]"
>
<view :class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]">
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
</template>
</picker>
</template>
<template v-else>
<view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
@click="showPopup(i.popKey)"
>
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
</template>
</view>
</template>
</view>
<view class="form-header">客户群消息</view>
<view class="form-box flex">
<template v-for="(i, index) in groupForm">
<view :class="['form-item flex', { 'form-item--full': i.fullWidth }]" :key="index">
<view class="label flex">
<view class="required" v-if="i.required">*</view>{{ i.label }}
</view>
</template>
</view>
<view class="form-box form-box--no-top flex">
<template v-for="(i, index) in optionalForm">
<view class="form-item flex" :key="index">
<view class="label flex">
<view class="required" v-if="i.required">*</view>{{ i.label }}
<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="sync-btn" @click.stop="syncCustomerGroupInfo">同步</view>
</view>
<template v-if="i.type == 'input'">
<view v-else class="input input--readonly text-hide">{{ customerInfo[i.valueKey] || '-' }}</view>
</template>
<template v-else-if="i.type == 'input'">
<view class="input-box flex">
<input
:type="i.inputType"
:type="i.inputType || 'text'"
:maxlength="i.maxlength"
v-model="customerInfo[i.valueKey]"
:class="['input', { error: i.error }]"
placeholder="请选择"
class="input input--count"
placeholder="请输入"
placeholder-style="color:rgba(51, 51, 51, 0.2);"
confirm-type="done"
/>
</template>
<template v-else-if="i.type == 'date'">
<picker
mode="date"
fields="day"
:start="startDate"
:end="endDate"
@change="bindDateChange($event, i.valueKey)"
:value="customerInfo[i.valueKey]"
>
<view :class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]">
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
</picker>
</template>
<template v-else>
<view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
@click="showPopup(i.popKey)"
>
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
</template>
</view>
</template>
</view>
<view class="form-header">客户群消息</view>
<view class="form-box flex">
<template v-for="(i, index) in groupForm">
<view :class="['form-item flex', { 'form-item--full': i.fullWidth }]" :key="index">
<view class="label flex">
<view class="required" v-if="i.required">*</view>{{ i.label }}
<view v-if="i.showCount" class="input-count">{{ (customerInfo[i.valueKey] || '').length }}/{{ i.maxlength }}</view>
</view>
<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'">
<view class="input-box flex">
<input
:type="i.inputType || 'text'"
:maxlength="i.maxlength"
v-model="customerInfo[i.valueKey]"
class="input input--count"
placeholder="请输入"
placeholder-style="color:rgba(51, 51, 51, 0.2);"
confirm-type="done"
/>
<view v-if="i.showCount" class="input-count">{{ (customerInfo[i.valueKey] || '').length }}/{{ i.maxlength }}</view>
</view>
</template>
<template v-else-if="i.type == 'select'">
<view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
@click="showPopup(i.popKey)"
>
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
</template>
</view>
</template>
</view>
<view class="btns flex">
<view class="btn cancel" @click="submitCustomerProfileAPI">提交</view>
<template v-if="sceneType != 7">
<view :class="['btn', { disabled: customerInfo.customerStatus==2?true:false }]" @click="startReception">开始接待</view>
</template>
</view>
</template>
<template v-else-if="i.type == 'select'">
<view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
@click="showPopup(i.popKey)"
>
<view class="value text-hide">{{ customerInfo[i.valueKey] || '请选择' }}</view>
<uni-icons class="arrow" type="right" :size="16"></uni-icons>
</view>
</template>
</view>
</template>
</view>
<view class="btns flex">
<view class="btn cancel" @click="submitCustomerProfileAPI">提交</view>
<template v-if="sceneType != 7">
<view :class="['btn', { disabled: customerInfo.customerStatus==2?true:false }]" @click="startReception">开始接待</view>
</template>
</view>
</view>
<view class="popup">
<car-brands
ref="carBrandVisible"
@select="handleSelect($event, 'carBrandVisible')"
:echoData="customerInfo"
carBrandKey="carBrand"
carModelKey="carChildsBrandName"
customBoolean
/>
<reception-sence
ref="receptionSceneVisible"
@select="handleSelect($event, 'receptionSceneVisible')"
:customerInfo="customerInfo"
></reception-sence>
<employee
ref="residentSaleVisible"
title="驻店零售"
:salesPropsUuid="customerInfo.userId"
@select="handleSelect($event, 'residentSaleVisible')"
/>
<employee
ref="groupMemberVisible"
title="群成员关联"
:list="groupMemberList"
label-key="contact_name"
value-key="contact_id"
:salesPropsUuid="customerInfo.groupMemberId"
@select="handleSelect($event, 'groupMemberVisible')"
/>
</view>
<uni-popup ref="successRef" type="message">
<uni-popup-message
type="success"
message="数据保存成功"
:duration="1500"
></uni-popup-message>
</uni-popup>
</view>
</template>
<script type='text/ecmascript-6'>
import CarBrands from '@/components/CarBrands.vue'
import dayjs from 'dayjs'
import ReceptionSence from '@/components/HomeFrame/components/ReceptionCenter/ReceptionSence.vue'
import Employee from '@/components/Employee.vue'
const phoneRex = /^[1]([3-9])[0-9]{9}$/,
default_customerForm = [{
label: '车主姓名',
valueKey: 'customerName',
key: 'customerName',
type: 'input',
inputType: 'text',
required: true,
maxlength: 50
<view class="popup">
<car-brands
ref="carBrandVisible"
@select="handleSelect($event, 'carBrandVisible')"
:echoData="customerInfo"
carBrandKey="carBrand"
carModelKey="carChildsBrandName"
customBoolean
/>
<reception-sence
ref="receptionSceneVisible"
@select="handleSelect($event, 'receptionSceneVisible')"
:customerInfo="customerInfo"
></reception-sence>
<employee
ref="residentSaleVisible"
title="驻店零售"
employee-type="seller"
:salesPropsUuid="customerInfo.advanceUserId"
@select="handleSelect($event, 'residentSaleVisible')"
/>
<employee
ref="groupMemberVisible"
title="群成员关联"
:list="groupMemberList"
label-key="contact_name"
value-key="contact_id"
:salesPropsUuid="customerInfo.contact_id"
@select="handleSelect($event, 'groupMemberVisible')"
/>
</view>
<uni-popup ref="successRef" type="message">
<uni-popup-message
type="success"
message="数据保存成功"
:duration="1500"
></uni-popup-message>
</uni-popup>
</view>
</template>
<script type='text/ecmascript-6'>
import CarBrands from '@/components/CarBrands.vue'
import dayjs from 'dayjs'
import ReceptionSence from '@/components/HomeFrame/components/ReceptionCenter/ReceptionSence.vue'
import Employee from '@/components/Employee.vue'
import { validateVin, formatVinInput } from '@/utils/vinVaildate'
const phoneRex = /^[1]([3-9])[0-9]{9}$/,
default_customerForm = [{
label: '车主姓名',
valueKey: 'customerName',
key: 'customerName',
type: 'input',
inputType: 'text',
required: true,
maxlength: 50
},
{
label: '手机号',
valueKey: 'customerPhone',
key: 'customerPhone',
type: 'readonly',
required: true
},
{
label: '车型',
valueKey: 'carChildsBrandName',
key: 'carChildsBrandId',
type: 'select',
required: true,
popKey: 'carBrandVisible'
},
{
label: '交付日期',
valueKey: 'deliveryDate',
key: 'deliveryDate',
required: true,
type: 'date'
},
// {
// label: '接待场景',
// valueKey: 'receptionSceneName',
// key: 'receptionScene',
// type: 'select',
// required: true,
// popKey: 'receptionSceneVisible'
// },
{
label: '流量来源',
valueKey: 'employeeName',
key: 'userId',
type: 'readonly',
required: true
}],
default_optionalForm = [{
label: '车架号',
valueKey: 'standNo',
key: 'standNo',
type: 'input',
inputType: 'text',
maxlength: 17
},
{
label: '到店日期',
valueKey: 'inviteDate',
key: 'inviteDate',
type: 'date'
},
{
label: '驻店零售',
valueKey: 'advanceUserName',
key: 'advanceUserId',
type: 'select',
popKey: 'residentSaleVisible'
},
{
label: '建档日期',
valueKey: 'createdDate',
key: 'createdDate',
type: 'date'
}],
default_groupForm = [ {
label: '客户群',
valueKey: 'qwGroupName',
key: 'qwGroupName',
type: 'readonly',
showSync: true
},
{
label: '群成员关联',
valueKey: 'contact_name',
key: 'contact_id',
type: 'select',
popKey: 'groupMemberVisible'
},
{
label: '备注',
valueKey: 'remark',
key: 'remark',
type: 'input',
inputType: 'text',
maxlength: 200,
fullWidth: true,
showCount: true
}]
export default {
name: 'DetailFiles',
components: { CarBrands, ReceptionSence, Employee },
computed: {
customerSurname () {
const name = this.displayInfo.customerName || ''
return name ? name.charAt(0) : ''
},
activityTagList () {
const { customerInfo } = this
return [customerInfo.packageName, customerInfo.activityName].filter(Boolean)
},
{
label: '手机号',
valueKey: 'customerPhone',
key: 'customerPhone',
type: 'input',
inputType: 'tel',
required: true,
maxlength: 11,
error: false
goodsSubOrderList () {
const list = this.displayInfo.goodsSubOrderDTOS
if (!Array.isArray(list)) return []
return list.filter(item => item)
},
upgradeStatusInfo () {
const { customerInfo } = this
if (customerInfo.upgradeStatusName) {
return {
label: customerInfo.upgradeStatusName,
type: this.getUpgradeStatusType(customerInfo.upgradeStatusName)
}
}
const statusMap = {
1: { label: '待跟进', type: 'warning' },
2: { label: '不升级', type: 'default' },
4: { label: '已升级', type: 'success' }
}
const status = customerInfo.upgradeStatus ?? customerInfo.orderStatus
return statusMap[status] || null
},
{
label: '车型',
valueKey: 'carChildsBrandName',
key: 'carChildsBrandId',
type: 'select',
required: true,
popKey: 'carBrandVisible'
sceneType () {
const { sceneType } = uni.$storage.get('userInfo') || {}
return sceneType
}
},
data () {
return {
customerId: '',
customerForm: [],
optionalForm: [],
groupForm: [],
customerInfo: {},
displayInfo: {
customerName: '',
customerStatus: '',
goodsSubOrderDTOS: []
},
groupMemberList: [],
startDate: '',
endDate: '',
validateState: true
}
},
onLoad (options) {
this.customerId = options.customerId || ''
console.log('customerId**options*', this.customerId)
// this.getCustormDetail()
this.initForm()
},
mounted () {
this.startDate = dayjs(dayjs().subtract(7, 'day')).format("YYYY-MM-DD")
this.endDate = dayjs(dayjs().add(30, 'day')).format("YYYY-MM-DD")
},
methods: {
getCustomerStatusClass(status) {
const map = {
1: 'customer-item-status--warning',
2: 'customer-item-status--success',
3: 'customer-item-status--failed',
4: 'customer-item-status--refund'
}
return map[status] || ''
},
getCustomerStatusLabel(status) {
const map = {
1: '待跟进',
2: '已升级',
3: '战败',
4: '已退款'
}
return map[status] || ''
},
async getCustormDetail() {
console.log('getCustormDetailAPI***', this.customerId)
const res = await uni.$api.customerApi.customerProfileInfoAPI({
id: this.customerId
})
console.log('getCustormDetailAPI***', res)
if(res) {
this.customerForm = res
}
console.log('getCustomerGroupInfoAPI**customerForm*', this.customerForm)
},
{
label: '交付日期',
valueKey: 'deliveryDate',
key: 'deliveryDate',
required: true,
type: 'date'
async submitCustomerProfileAPI(options = {}) {
const { fromReception = false } = options
try {
this.customerForm.forEach(e => {
e.error = false
})
const { customerInfo, customerForm } = this
customerForm.forEach(e => {
if (e.required && !customerInfo[e.key]) throw e.key
})
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)
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
}
},
// {
// label: '接待场景',
// valueKey: 'receptionSceneName',
// key: 'receptionScene',
// type: 'select',
// required: true,
// popKey: 'receptionSceneVisible'
// },
{
label: '流量来源',
valueKey: 'employeeName',
key: 'userId',
type: 'select',
required: true,
popKey: 'residentSaleVisible'
}],
default_optionalForm = [{
label: '车架号',
valueKey: 'standNo',
key: 'standNo',
type: 'input',
inputType: 'text',
maxlength: 17
async getCustomerGroupInfo(showToast = false) {
if (!this.customerInfo.customerName || !this.customerInfo.customerPhone) {
if (showToast) {
uni.showToast({
title: '请先填写客户姓名和手机号',
icon: 'none'
})
}
return false
}
let customerGroupParam = this.customerInfo.customerName + this.customerInfo.customerPhone.slice(7,11)
console.log('getCustomerGroupInfo*', customerGroupParam)
const data = await uni.$api.customerApi.getCustomerGroupInfoAPI({
customerGroupParam: customerGroupParam
})
console.log('getCustomerGroupInfoAPI**getCustomerGroupInfo*', data)
// http 层已在 code=0 时 resolve(data.data),此处 data 即为业务数据,无需再取 data.data
const contactId = data && data.contact_id
if (contactId) {
this.customerInfo.qwGroupId = contactId
this.customerInfo.qwGroupName = data.contact_name || data.name || data.qwGroupName || ''
await this.getCustomerGroupMemberInfoAPI(contactId)
return true
}
if (showToast) {
uni.showToast({
title: '未找到客户群',
icon: 'none'
})
}
return false
},
{
label: '到店日期',
valueKey: 'createdDate',
key: 'createdDate',
type: 'date'
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()
}
},
{
label: '驻店零售',
valueKey: 'employeeName',
key: 'userId',
type: 'select',
popKey: 'residentSaleVisible'
async getCustomerGroupMemberInfoAPI(contactId) {
const data = await uni.$api.customerApi.getCustomerGroupMemberInfoAPI({
qwGroupId: contactId
})
console.log('群成员getCustomerGroupMemberInfoAPI***', data)
this.groupMemberList = Array.isArray(data) ? data : []
},
{
label: '建档日期',
valueKey: 'createdDate',
key: 'createdDate',
type: 'date'
}],
default_groupForm = [{
label: '客户群',
valueKey: 'qwGroupName',
key: 'qwGroupName',
type: 'readonly'
syncDisplayInfo (info = this.customerInfo) {
this.displayInfo = {
customerName: info.customerName || '',
customerStatus: info.customerStatus,
goodsSubOrderDTOS: Array.isArray(info.goodsSubOrderDTOS) ? info.goodsSubOrderDTOS : []
}
},
{
label: '群成员关联',
valueKey: 'groupMemberName',
key: 'groupMemberId',
type: 'select',
popKey: 'groupMemberVisible'
getUpgradeStatusType (label) {
if (label === '已升级') return 'success'
if (label === '待跟进') return 'warning'
if (label === '战败') return 'failed'
return 'default'
},
{
label: '备注',
valueKey: 'groupRemark',
key: 'groupRemark',
type: 'input',
inputType: 'text',
maxlength: 200,
fullWidth: true,
showCount: true
}]
export default {
name: 'DetailFiles',
components: { CarBrands, ReceptionSence, Employee },
computed: {
customerSurname () {
const name = this.customerInfo.customerName || ''
return name ? name.charAt(0) : ''
},
activityTagList () {
const { customerInfo } = this
return [customerInfo.packageName, customerInfo.activityName].filter(Boolean)
},
goodsSubOrderList () {
const list = this.customerInfo.goodsSubOrderDTOS
if (!Array.isArray(list)) return []
return list.filter(item => item)
},
upgradeStatusInfo () {
const { customerInfo } = this
if (customerInfo.upgradeStatusName) {
return {
label: customerInfo.upgradeStatusName,
type: this.getUpgradeStatusType(customerInfo.upgradeStatusName)
}
}
const statusMap = {
1: { label: '待跟进', type: 'warning' },
2: { label: '不升级', type: 'default' },
4: { label: '已升级', type: 'success' }
}
const status = customerInfo.upgradeStatus ?? customerInfo.orderStatus
return statusMap[status] || null
},
sceneType () {
const { sceneType } = uni.$storage.get('userInfo') || {}
return sceneType
initForm () {
const { sceneType } = uni.$storage.get("userInfo")
default_customerForm[0].maxlength = sceneType == 1 ? 20 : 50
this.$store.dispatch("clearCustomerInfo")
this.$store.dispatch("clearHistory")
this.customerForm = JSON.parse(JSON.stringify(default_customerForm))
this.optionalForm = JSON.parse(JSON.stringify(default_optionalForm))
this.groupForm = JSON.parse(JSON.stringify(default_groupForm))
this.displayInfo = {
customerName: '',
customerStatus: '',
goodsSubOrderDTOS: []
}
this.customerInfo = {
customerName: '',
customerPhone: '',
carBrand: '',
carBrandId: '',
carSeriesName: '',
carSeriesId: '',
carChildsBrandName: '',
carChildsBrandId: '',
receptionScene: '',
deliveryDate: '',
receptionSceneName: '',
standNo: '',
inviteDate: '',
createdDate: '',
employeeName: '',
userId: '',
advanceUserName: '',
advanceUserId: '',
qwGroupName: '',
contact_id: '',
contact_name: '',
groupRemark: ''
}
if (this.customerId) this.findVisitsInfo()
},
data () {
return {
customerId: '',
customerForm: [],
optionalForm: [],
groupForm: [],
customerInfo: {},
groupMemberList: [],
startDate: '',
endDate: ''
async findVisitsInfo () {
const res = await uni.$api.customerApi.customerProfileInfoAPI({
id: this.customerId
})
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.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)
await this.getCustomerGroupInfo()
},
backPage () {
uni.navigateBack({
delta: 1,
animationType: 'pop-out',
animationDuration: 100
})
},
onLoad (options) {
this.customerId = options.customerId || ''
console.log('customerId**options*', this.customerId)
// this.getCustormDetail()
this.initForm()
async startReception () {
const { sceneType, customerInfo } = this
if (sceneType == 7) return // 二手车无接待功能
if (customerInfo.customerStatus == 2) return
const submitted = await this.submitCustomerProfileAPI({ fromReception: true })
if (!submitted) return
uni.navigateBack({
delta: 1,
animationType: 'pop-out',
animationDuration: 100,
success: () => {
uni.$emit('startReceptionFromCustomerDetail')
}
})
},
mounted () {
this.startDate = dayjs(dayjs().subtract(7, 'day')).format("YYYY-MM-DD")
this.endDate = dayjs(dayjs().add(30, 'day')).format("YYYY-MM-DD")
showPopup (e) {
this.$refs[e].open()
},
methods: {
getCustomerStatusClass(status) {
const map = {
1: 'customer-item-status--warning',
2: 'customer-item-status--success',
3: 'customer-item-status--failed',
4: 'customer-item-status--refund'
handleSelect (item, popkey) {
this.$refs[popkey].close()
if (popkey == 'carBrandVisible') {
this.$refs.carBrandVisible.close()
Object.assign(this.customerInfo, {
carChildsBrandName: item.name,
carChildsBrandId: item.id,
carBrand: item.carChildsBrandName,
carBrandId: item.carChildsBrandId,
carSeriesName: item.carBrand,
carSeriesId: item.carBrandId
})
} else if (popkey == 'residentSaleVisible') {
this.customerInfo.advanceUserName = item.staffName
this.customerInfo.advanceUserId = item.uuid
} else if (popkey == 'groupMemberVisible') {
this.$set(this.customerInfo, 'contact_id', item.contact_id || item.id || '')
this.$set(this.customerInfo, 'contact_name', item.contact_name || item.name || '')
} else {
this.customerInfo.receptionSceneName = item.receptionSceneName
this.customerInfo.receptionScene = item.id
}
return map[status] || ''
},
getCustomerStatusLabel(status) {
const map = {
1: '待跟进',
2: '已升级',
3: '战败',
4: '已退款'
bindDateChange (e, valueKey) {
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
}
return map[status] || ''
},
async getCustormDetail() {
console.log('getCustormDetailAPI***', this.customerId)
const res = await uni.$api.customerApi.customerProfileInfoAPI({
id: this.customerId
formatDateTime (value) {
if (!value) return value
return dayjs(value).format('YYYY-MM-DD HH:mm:ss')
},
async submit () {
this.submitCustomerProfileAPI()
try {
this.customerForm.map(e => {
e.error = false
})
console.log('getCustormDetailAPI***', res)
if(res) {
this.customerForm = res
}
console.log('getCustomerGroupInfoAPI**customerForm*', this.customerForm)
},
async submitCustomerProfileAPI() {
// carModel:问界M7,
// carModelId: 1149147,
// carBrand:AITO 问界,
// carBrandId:3454,
// oneCarBrand:鸿蒙智行,
// oneCarBrandId:2978
let requestParams = this.customerInfo
console.log('submitCustomerProfileAPI***', requestParams)
const res = await uni.$api.customerApi.submitCustomerProfileAPI(requestParams)
console.log('submitCustomerProfileAPI***', res)
},
async getCustomerGroupInfo() {
if (!this.customerInfo.customerName || !this.customerInfo.customerPhone) {
return
}
let customerGroupParam = this.customerInfo.customerName + this.customerInfo.customerPhone.slice(7,11)
console.log('g张三525235*', customerGroupParam)
const data = await uni.$api.customerApi.getCustomerGroupInfoAPI({
customerGroupParam: customerGroupParam
let { customerInfo, customerForm, optionalForm, groupForm } = this,
{ shopMerchantId, sceneType } = uni.$storage.get("userInfo"),
targetApi = customerInfo.id ? 'submitCustomerProfileAPI' : 'submitCustomerProfileAPI',
params = {
merchantId: shopMerchantId,
bussinessScene: sceneType == 0 ? 1 : 2
}
if (!phoneRex.test(customerInfo.customerPhone)) throw 'customerPhone'
customerForm.map(e => {
params[e.key] = customerInfo[e.key]
})
console.log('getCustomerGroupInfoAPI**getCustomerGroupInfo*', data)
// http 层已在 code=0 时 resolve(data.data),此处 data 即为业务数据,无需再取 data.data
const contactId = data.contact_id
if (contactId) {
await this.getCustomerGroupMemberInfoAPI(contactId)
}
},
async getCustomerGroupMemberInfoAPI(contactId) {
const data = await uni.$api.customerApi.getCustomerGroupMemberInfoAPI({
qwGroupId: contactId
optionalForm.map(e => {
params[e.key] = customerInfo[e.key]
})
console.log('群成员getCustomerGroupMemberInfoAPI***', data)
this.groupMemberList = Array.isArray(data) ? data : []
},
getUpgradeStatusType (label) {
if (label === '已升级') return 'success'
if (label === '待跟进') return 'warning'
if (label === '战败') return 'failed'
return 'default'
},
initForm () {
const { sceneType } = uni.$storage.get("userInfo")
default_customerForm[0].maxlength = sceneType == 1 ? 20 : 50
this.$store.dispatch("clearCustomerInfo")
this.$store.dispatch("clearHistory")
this.customerForm = JSON.parse(JSON.stringify(default_customerForm))
this.optionalForm = JSON.parse(JSON.stringify(default_optionalForm))
this.groupForm = JSON.parse(JSON.stringify(default_groupForm))
this.customerInfo = {
customerName: '',
customerPhone: '',
carBrand: '',
carBrandId: '',
carSeriesName: '',
carSeriesId: '',
carChildsBrandName: '',
carChildsBrandId: '',
receptionScene: '',
deliveryDate: '',
receptionSceneName: '',
standNo: '',
createdDate: '',
employeeName: '',
userId: '',
qwGroupName: '',
groupMemberName: '',
groupMemberId: '',
groupRemark: ''
}
if (this.customerId) this.findVisitsInfo()
},
async findVisitsInfo () {
const res = await uni.$api.customerApi.customerProfileInfoAPI({
id: this.customerId
groupForm.map(e => {
params[e.key] = customerInfo[e.key]
})
if (res.deliveryDate) res.deliveryDate = dayjs(res.deliveryDate).format("YYYY-MM-DD")
if (res.createdDate) res.createdDate = dayjs(res.createdDate).format("YYYY-MM-DD")
this.customerInfo = res
console.log('findVisitsInfo**customerInfo*', this.customerInfo)
await this.getCustomerGroupInfo()
},
backPage () {
uni.navigateBack({
delta: 1,
animationType: 'pop-out',
animationDuration: 100
if (customerInfo.id) params.id = customerInfo.id
Object.assign(params, {
carBrand: customerInfo.carBrand,
carBrandId: customerInfo.carBrandId,
carSeriesName: customerInfo.carSeriesName,
carSeriesId: customerInfo.carSeriesId,
carChildsBrandName: customerInfo.carChildsBrandName,
carChildsBrandId: customerInfo.carChildsBrandId
})
},
startReception () {
const { sceneType, customerInfo } = this
if (sceneType == 7) return // 二手车无接待功能
if (customerInfo.customerStatus == 2) return
uni.navigateBack({
delta: 1,
animationType: 'pop-out',
animationDuration: 100,
success: () => {
uni.$emit('startReceptionFromCustomerDetail')
}
uni.showLoading({
mask: true
})
},
showPopup (e) {
this.$refs[e].open()
},
handleSelect (item, popkey) {
this.$refs[popkey].close()
if (popkey == 'carBrandVisible') {
this.$refs.carBrandVisible.close()
Object.assign(this.customerInfo, {
carChildsBrandName: item.name,
carChildsBrandId: item.id,
carBrand: item.carChildsBrandName,
carBrandId: item.carChildsBrandId,
carSeriesName: item.carBrand,
carSeriesId: item.carBrandId
})
} else if (popkey == 'residentSaleVisible') {
this.customerInfo.employeeName = item.staffName
this.customerInfo.userId = item.uuid
} else if (popkey == 'groupMemberVisible') {
this.customerInfo.groupMemberName = item.contact_name
this.customerInfo.groupMemberId = item.contact_id
} else {
this.customerInfo.receptionSceneName = item.receptionSceneName
this.customerInfo.receptionScene = item.id
}
},
bindDateChange (e, valueKey) {
this.customerInfo[valueKey] = e.detail.value
},
async submit () {
this.submitCustomerProfileAPI()
try {
this.customerForm.map(e => {
e.error = false
})
let { customerInfo, customerForm, optionalForm, groupForm } = this,
{ shopMerchantId, sceneType } = uni.$storage.get("userInfo"),
targetApi = customerInfo.id ? 'submitCustomerProfileAPI' : 'submitCustomerProfileAPI',
params = {
merchantId: shopMerchantId,
bussinessScene: sceneType == 0 ? 1 : 2
}
if (!phoneRex.test(customerInfo.customerPhone)) throw 'customerPhone'
customerForm.map(e => {
params[e.key] = customerInfo[e.key]
})
optionalForm.map(e => {
params[e.key] = customerInfo[e.key]
})
groupForm.map(e => {
params[e.key] = customerInfo[e.key]
})
if (customerInfo.id) params.id = customerInfo.id
Object.assign(params, {
carBrand: customerInfo.carBrand,
carBrandId: customerInfo.carBrandId,
carSeriesName: customerInfo.carSeriesName,
carSeriesId: customerInfo.carSeriesId,
carChildsBrandName: customerInfo.carChildsBrandName,
carChildsBrandId: customerInfo.carChildsBrandId
})
uni.showLoading({
mask: true
})
const res = await uni.$api.customerApi[targetApi](params),
_this = this
if (res) {
uni.$emit('refreshCustomerProfileGroupInfo')
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()
}
}
})
const res = await uni.$api.customerApi[targetApi](params),
_this = this
if (res) {
this.syncDisplayInfo()
uni.$emit('refreshCustomerProfileGroupInfo')
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()
}
} catch (error) {
let index = this.customerForm.findIndex(e => e.key == error)
this.customerForm[index].error = true
} else {
uni.hideLoading()
}
} catch (error) {
let index = this.customerForm.findIndex(e => e.key == error)
this.customerForm[index].error = true
uni.hideLoading()
}
}
}
</script>
<style scoped lang="scss">
.detail-box {
position: relative;
width: 100vw;
height: 100vh;
background-image: url('@/assets/images/common/page-bg.webp');
background-size: 100%;
box-sizing: border-box;
padding: toRpx(160) toRpx(64) 0;
}
</script>
<style scoped lang="scss">
.detail-box {
position: relative;
width: 100vw;
height: 100vh;
background-image: url('@/assets/images/common/page-bg.webp');
background-size: 100%;
box-sizing: border-box;
padding: toRpx(160) toRpx(64) 0;
}
.nav-bar {
position: fixed;
width: 100%;
height: toRpx(96);
left: 0;
top: toRpx(48);
z-index: 999;
pointer-events: none;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.nav-bar {
position: fixed;
width: 100%;
height: toRpx(96);
left: 0;
top: toRpx(48);
z-index: 999;
pointer-events: none;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
}
.title {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 700;
font-size: toRpx(32);
color: #1a1a1a;
}
.title {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 700;
font-size: toRpx(32);
color: #1a1a1a;
}
.detail-content {
height: calc(100vh - #{toRpx(212)});
overflow-y: auto;
.detail-panel {
}
.detail-content {
height: calc(100vh - #{toRpx(212)});
overflow-y: auto;
.detail-panel {
width: 100%;
min-height: 100%;
height: auto;
border-radius: toRpx(48);
background: #ffffff59;
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
padding: toRpx(32) toRpx(48);
box-sizing: border-box;
display: flex;
flex-direction: column;
.detail-info {
position: relative;
width: 100%;
min-height: 100%;
height: auto;
border-radius: toRpx(48);
background: #ffffff59;
box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
padding: toRpx(32) toRpx(48);
height: 64px;
border: 2px solid #ffffff;
border-radius: 16px;
overflow: hidden;
margin-bottom: 24px;
flex-shrink: 0;
box-sizing: border-box;
display: flex;
flex-direction: column;
.detail-info {
.detail-info-bg {
position: absolute;
inset: 0;
background: linear-gradient(90deg, rgba(44, 102, 247, 0.08) 0%, rgba(72, 166, 255, 0.12) 100%);
background-color: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px);
}
.detail-info-body {
position: relative;
width: 100%;
height: 64px;
border: 2px solid #ffffff;
border-radius: 16px;
overflow: hidden;
margin-bottom: 24px;
flex-shrink: 0;
z-index: 1;
height: 100%;
align-items: center;
justify-content: space-between;
padding: 0 18px;
box-sizing: border-box;
.detail-info-bg {
position: absolute;
inset: 0;
background: linear-gradient(90deg, rgba(44, 102, 247, 0.08) 0%, rgba(72, 166, 255, 0.12) 100%);
background-color: rgba(255, 255, 255, 0.2);
backdrop-filter: blur(2px);
-webkit-backdrop-filter: blur(2px);
}
.detail-info-body {
position: relative;
z-index: 1;
height: 100%;
align-items: center;
justify-content: space-between;
padding: 0 18px;
box-sizing: border-box;
}
.detail-info-left {
flex: 1;
min-width: 0;
align-items: center;
gap: 8px;
}
.customer-item-status {
padding: 0 8px;
border-radius: 4px;
flex-shrink: 0;
&--warning {
background: #FDECE9;
.customer-item-status-text {
color: #F24724;
}
}
&--success {
background: #EAF9F1;
.customer-item-status-text {
color: #35C376;
}
}
&--failed {
background: #F5F7FA;
.customer-item-status-text {
color: #999EA8;
}
}
&--refund {
background: #FFF5E6;
.customer-item-status-text {
color: #F7A431;
}
}
.detail-info-left {
flex: 1;
min-width: 0;
align-items: center;
gap: 8px;
}
.customer-item-status {
padding: 0 8px;
border-radius: 4px;
flex-shrink: 0;
&--warning {
background: #FDECE9;
.customer-item-status-text {
color: #F24724;
}
}
.customer-item-status-text {
font-size: 12px;
line-height: 22px;
}
.user-tag {
width: 32px;
height: 32px;
border-radius: 50%;
background: rgba(44, 102, 247, 0.1);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
.user-tag-text {
font-size: 14px;
line-height: 20px;
font-weight: 600;
color: #2c66f7;
&--success {
background: #EAF9F1;
.customer-item-status-text {
color: #35C376;
}
}
.user-name {
font-size: 16px;
font-weight: 500;
color: #1a1a2e;
flex-shrink: 0;
white-space: nowrap;
}
.active-list {
flex: 1;
min-width: 0;
align-items: center;
gap: 8px;
overflow: hidden;
&--failed {
background: #F5F7FA;
.customer-item-status-text {
color: #999EA8;
}
}
.active-item {
padding: 6px 12px;
border: 1px solid #dce1e6;
border-radius: 4px;
font-size: 13px;
line-height: normal;
color: #6c6f75;
white-space: nowrap;
flex-shrink: 0;
box-sizing: border-box;
&--refund {
background: #FFF5E6;
.customer-item-status-text {
color: #F7A431;
}
}
}
.form-header {
width: 100%;
height: 28px;
font-size: 13px;
color: #2c66f7;
border-radius: 4px;
background: rgba(44, 102, 247, 0.05);
.customer-item-status-text {
font-size: 12px;
line-height: 22px;
}
.user-tag {
width: 32px;
height: 32px;
border-radius: 50%;
background: rgba(44, 102, 247, 0.1);
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
.user-tag-text {
font-size: 14px;
line-height: 20px;
font-weight: 600;
color: #2c66f7;
}
}
.user-name {
font-size: 16px;
font-weight: 500;
color: #1a1a2e;
flex-shrink: 0;
white-space: nowrap;
}
.active-list {
flex: 1;
min-width: 0;
align-items: center;
gap: 8px;
overflow: hidden;
}
.active-item {
padding: 6px 12px;
border: 1px solid #dce1e6;
border-radius: 4px;
font-size: 13px;
line-height: normal;
color: #6c6f75;
white-space: nowrap;
flex-shrink: 0;
box-sizing: border-box;
}
}
}
.form-box {
flex-shrink: 0;
flex-wrap: wrap;
align-items: flex-start;
align-content: flex-start;
row-gap: 16px;
padding: toRpx(32) toRpx(40);
justify-content: space-between;
&--no-top {
padding-top: 0;
}
.form-item {
width: toRpx(934);
height: toRpx(80);
font-size: toRpx(28);
}
.label {
width: toRpx(192);
color: #292d33;
.form-header {
width: 100%;
height: 28px;
font-size: 13px;
color: #2c66f7;
border-radius: 4px;
background: rgba(44, 102, 247, 0.05);
display: flex;
align-items: center;
justify-content: center;
.required {
color: #f24724;
font-size: toRpx(28);
}
}
.input,
.select {
width: toRpx(738);
height: toRpx(76);
background: #ffffff;
border-radius: toRpx(16);
border: toRpx(2) solid transparent !important;
outline: none;
color: #333333;
box-sizing: border-box;
line-height: toRpx(76);
padding: 0 toRpx(32) !important;
}
}
.form-box {
flex-shrink: 0;
flex-wrap: wrap;
align-items: flex-start;
align-content: flex-start;
row-gap: 16px;
padding: toRpx(32) toRpx(40);
justify-content: space-between;
&--no-top {
padding-top: 0;
}
.form-item {
width: toRpx(934);
height: toRpx(80);
font-size: toRpx(28);
}
.label {
width: toRpx(192);
color: #292d33;
justify-content: center;
.required {
color: #f24724;
font-size: toRpx(28);
&::placeholder {
color: #33333333;
}
.value {
max-width: toRpx(598);
}
}
.placeholderStyle {
}
.input,
.select {
width: toRpx(738);
height: toRpx(76);
background: #ffffff;
border-radius: toRpx(16);
border: toRpx(2) solid transparent !important;
outline: none;
color: #333333;
box-sizing: border-box;
line-height: toRpx(76);
padding: 0 toRpx(32) !important;
font-size: toRpx(28);
&::placeholder {
color: #33333333;
}
.arrow {
color: #999 !important;
margin-left: auto;
flex-shrink: 0;
}
.error {
border: toRpx(2) solid #f24724 !important;
.value {
max-width: toRpx(598);
}
}
.placeholderStyle {
color: #33333333;
}
.arrow {
color: #999 !important;
margin-left: auto;
flex-shrink: 0;
}
.error {
border: toRpx(2) solid #f24724 !important;
}
.input--readonly {
color: #666666;
background: #f5f7fa;
}
.readonly-box {
width: toRpx(738);
align-items: center;
gap: toRpx(16);
.input--readonly {
color: #666666;
background: #f5f7fa;
}
.form-item--full {
width: 100%;
.input-box,
.input,
.select,
.input--readonly {
flex: 1;
width: 0;
}
flex: 1;
width: 0;
}
.input-box {
width: toRpx(738);
.sync-btn {
flex-shrink: 0;
min-width: toRpx(112);
height: toRpx(76);
background: #ffffff;
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;
align-items: center;
padding-right: toRpx(24);
.input--count {
flex: 1;
width: 0;
height: 100%;
background: transparent;
border: none !important;
padding: 0 0 0 toRpx(32) !important;
line-height: toRpx(76);
}
.input-count {
flex-shrink: 0;
font-size: toRpx(24);
color: #999999;
line-height: toRpx(76);
white-space: nowrap;
}
}
}
.btns {
justify-content: center;
gap: 0 toRpx(34);
padding-bottom: toRpx(32);
flex-shrink: 0;
.btn {
width: toRpx(718);
height: toRpx(80);
background-image: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
border-radius: toRpx(48);
display: flex;
justify-content: center;
align-items: center;
font-weight: 500;
font-size: toRpx(32);
color: #ffffff;
.form-item--full {
width: 100%;
.input-box,
.input,
.select,
.input--readonly {
flex: 1;
width: 0;
}
.cancel {
background: #dae9ff;
color: #2c66f7;
}
.input-box {
width: toRpx(738);
height: toRpx(76);
background: #ffffff;
border-radius: toRpx(16);
box-sizing: border-box;
align-items: center;
padding-right: toRpx(24);
.input--count {
flex: 1;
width: 0;
height: 100%;
background: transparent;
border: none !important;
padding: 0 0 0 toRpx(32) !important;
line-height: toRpx(76);
}
.disabled {
background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%);
.input-count {
flex-shrink: 0;
font-size: toRpx(24);
color: #999999;
line-height: toRpx(76);
white-space: nowrap;
}
}
</style>
}
.btns {
justify-content: center;
gap: 0 toRpx(34);
padding-bottom: toRpx(32);
flex-shrink: 0;
.btn {
width: toRpx(718);
height: toRpx(80);
background-image: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
border-radius: toRpx(48);
display: flex;
justify-content: center;
align-items: center;
font-weight: 500;
font-size: toRpx(32);
color: #ffffff;
}
.cancel {
background: #dae9ff;
color: #2c66f7;
}
.disabled {
background-image: linear-gradient(0deg, #2c66f799 0%, #48a6ff99 100%);
}
}
</style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!