Commit d3fb0471 by 岑成威

Merge branch 'hotfix_v5.8.3.2' of 192.168.3.233:glsx/gl_tape into hotfix_v5.8.3.2

2 parents f9ecc239 a4ee5825
......@@ -218,7 +218,6 @@ export default {
page: '/pages/common/serviceDetail/index',
eventCode: 'app_service_center',
sceneType: [1],
showOnActivityTab: true,
pageDirect: true,
noInterception: true
},
......
<template>
<view class="list-skeleton">
<view
v-for="groupIndex in groupCount"
:key="'skeleton-group-' + groupIndex"
class="list-skeleton__group"
>
<view class="list-skeleton__count">
<view class="list-skeleton__block list-skeleton__count-left"></view>
<view class="list-skeleton__block list-skeleton__count-right"></view>
</view>
<view
v-for="itemIndex in itemCount"
:key="'skeleton-item-' + groupIndex + '-' + itemIndex"
class="list-skeleton__item"
>
<view class="list-skeleton__block list-skeleton__avatar"></view>
<view class="list-skeleton__body">
<view class="list-skeleton__block list-skeleton__line list-skeleton__line--name"></view>
<view class="list-skeleton__block list-skeleton__line list-skeleton__line--meta"></view>
<view class="list-skeleton__block list-skeleton__line list-skeleton__line--group"></view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'ListSkeleton',
props: {
groupCount: {
type: Number,
default: 2
},
itemCount: {
type: Number,
default: 2
}
}
}
</script>
<style lang="scss" scoped>
$card-shadow-space: 4px;
$content-h-gap: 12px;
$item-side-margin: $content-h-gap - $card-shadow-space;
@keyframes list-skeleton-shimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
.list-skeleton {
&__group {
margin-bottom: 8px;
&:last-child {
margin-bottom: 0;
}
}
&__block {
border-radius: 4px;
background: linear-gradient(90deg, #F0F2F5 25%, #E4E8ED 50%, #F0F2F5 75%);
background-size: 200% 100%;
animation: list-skeleton-shimmer 1.4s ease-in-out infinite;
}
&__count {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 12px;
margin: 0 $item-side-margin 8px;
border-radius: 10px;
background: rgba(44, 102, 247, 0.03);
box-sizing: border-box;
min-height: 32px;
}
&__count-left {
width: 120px;
height: 14px;
}
&__count-right {
width: 56px;
height: 14px;
}
&__item {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 10px 12px;
margin: 0 $item-side-margin 8px;
background: #FFFFFF;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(44, 102, 247, 0.06);
box-sizing: border-box;
}
&__avatar {
width: 32px;
height: 32px;
border-radius: 50%;
flex-shrink: 0;
}
&__body {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 8px;
padding-top: 2px;
}
&__line {
height: 14px;
&--name {
width: 72%;
}
&--meta {
width: 55%;
}
&--group {
width: 40%;
}
}
}
</style>
......@@ -94,10 +94,15 @@
</view>
</view>
</view>
<view class="content-right box-class scene1-box-shadow">
<view class="common-title">服务中心</view>
<view class="content-box">
<MessageIndex class="message-box" ref="messageRef" />
<view class="content-right box-class scene1-box-shadow content-right-customer">
<view class="content-right-customer-inner">
<CustomerSide
:customerProfile="customerProfileList"
:loading="customerProfileLoading"
enable-header-gradient
:showHeaderIcon="false"
:headerGradient="customerHeaderGradient"
/>
</view>
</view>
</view>
......@@ -110,7 +115,10 @@
@entranceClick="entranceClick"
/>
<view class="line"></view>
<CustomerSide :customerProfile="customerProfileList" />
<CustomerSide
:customerProfile="customerProfileList"
:loading="customerProfileLoading"
/>
</view>
</view>
<!-- 挖掘潜客机会 -->
......@@ -386,7 +394,14 @@ export default {
}),
activityProductList: [],
prelearnData: {},
customerProfileList: []
customerProfileList: [],
customerProfileLoading: true,
customerHeaderGradient: Object.freeze({
afterGradient: 'linear-gradient(0deg, #94c2ff00 0%, #5294ff 100%)',
beforeGradient: 'linear-gradient(-44.4deg, #94c2ff00 0%, #5294ff 100%)',
afterOpacity: 0.15,
beforeOpacity: 0.6
})
}
},
beforeDestroy() {
......@@ -760,7 +775,8 @@ export default {
}
},
/**
* 查询当前进行中的营销活动商品列表
* @function 营销活动:
* @desc 查询当前进行中的营销活动商品列表
*/
async getActivityProductList() {
const { shopMerchantId: merchantId } = uni.$storage.get('userInfo') || {}
......@@ -783,22 +799,27 @@ export default {
},
/**
* 查询客户建档分页查询-月按天分组
* @function 客户档案:
* @desc 查询客户建档分页查询-月按天分组
*/
async getCustomerProfileGroupInfo() {
const { shopMerchantId: merchantId } = uni.$storage.get('userInfo') || {}
if (!merchantId) {
this.customerProfileList = []
this.customerProfileLoading = false
return
}
this.customerProfileLoading = true
try {
const res = await uni.$api.customerApi.getCustomerProfileGroupInfoAPI({ merchantId })
console.log('getCustomerProfileListInfo***')
console.log('getCustomerProfileGroupInfo***', res)
this.customerProfileList = Array.isArray(res) ? res : []
} catch (error) {
console.error('查询客户建档分组信息失败:', error)
this.customerProfileList = []
} finally {
this.customerProfileLoading = false
}
},
/**
......@@ -1404,6 +1425,35 @@ export default {
flex: 1;
min-height: 0;
// transform: translateY(toMinusRpx(32));
.content-left {
flex: 1 1 0;
min-width: 0;
width: auto;
}
.content-right-customer {
flex: 0 1 toRpx(720);
min-width: toRpx(320);
max-width: 40%;
width: auto;
height: calc(100% - 16px);
min-height: 0;
box-sizing: border-box;
padding: 0 0 16px;
display: flex;
flex-direction: column;
overflow: hidden;
.content-right-customer-inner {
margin-top: -10px;
}
&-inner {
flex: 1;
min-height: 0;
overflow: hidden;
}
}
.tab-container {
width: 100%;
height: 100%;
......
......@@ -420,6 +420,17 @@ export default {
this.pageParams.customerQr = ''
this.$refs.couponPopup.open()
this.customerType = customerType
if (customerInfo.inviteRecordId) {
this.customerInfo = customerInfo
this.pageParams.carInfo = {
carChildsBrandId: customerInfo.carChildsBrandId,
carChildsBrandName: customerInfo.carChildsBrandName,
carBrandId: customerInfo.carBrandId,
carBrand: customerInfo.carBrand,
id: customerInfo.carSeriesId,
name: customerInfo.carSeriesName
}
}
if (customerInfo.customerCouponId) {
try {
uni.showLoading({
......@@ -443,8 +454,6 @@ export default {
if (data) {
this.pageParams.customerCouponId = customerInfo.customerCouponId
this.pageParams.customerQr = data
if (customerInfo.inviteRecordId) this.customerInfo = customerInfo
} else throw '生成小程序码失败,请重试!'
} else throw message
......
......@@ -245,6 +245,7 @@ export default {
this.$refs.invitationCanvas.clearBoard()
},
openDetail (e) {
console.log('openDetail**e**', e);
this.couponPopupRef.open(0, {
...e,
phoneNumber: e.customerPhone,
......
......@@ -245,6 +245,11 @@ export default {
},
useMinPriceApproval() {
return shouldUseMinPriceApproval(this.orderObj.orderTypeCode)
},
// 轻改场景 + 新建工单:隐藏场景名称表单项(仅展示层)
hideSceneNameField() {
const { sceneType } = this.userInfo || {}
return sceneType == 1 && this.orderCreateType === 'createWithPay'
}
},
mounted() {
......@@ -266,6 +271,9 @@ export default {
} else {
item.hidden = item._originHidden
}
if (item.value === 'baseSceneCode' && this.hideSceneNameField) {
item.hidden = true
}
})
})
this.formList = list
......
......@@ -291,6 +291,11 @@ export default {
showPayTips () {
if (this.orderObj.payeeType == 0 && this.orderObj.selectPayType == 7) return true
else return false
},
// 轻改场景:隐藏场景名称表单项(仅展示层)
hideSceneNameField () {
const { sceneType } = this.userInfo || {}
return sceneType == 1
}
},
onload (options) {
......@@ -332,6 +337,9 @@ export default {
} else {
item.hidden = item._originHidden
}
if (item.value === 'baseSceneCode' && this.hideSceneNameField) {
item.hidden = true
}
})
})
this.formList = list
......
......@@ -50,6 +50,14 @@
</view>
</picker>
</template>
<template v-else-if="i.type == 'radio'">
<radio-group class="radio-group flex" @change="radioChange($event, i)">
<label class="radio-item flex" v-for="item in i.radioList" :key="item.value">
<radio style="transform: scale(0.7)" :value="item.value" :checked="customerInfo[i.key] == item.value" />
<view class="radio-name">{{ item.name }}</view>
</label>
</radio-group>
</template>
<template v-else>
<view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
......@@ -104,6 +112,14 @@
</view>
</picker>
</template>
<template v-else-if="i.type == 'radio'">
<radio-group class="radio-group flex" @change="radioChange($event, i)">
<label class="radio-item flex" v-for="item in i.radioList" :key="item.value">
<radio style="transform: scale(0.7)" :value="item.value" :checked="customerInfo[i.key] == item.value" />
<view class="radio-name">{{ item.name }}</view>
</label>
</radio-group>
</template>
<template v-else>
<view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
......@@ -207,6 +223,17 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/,
}
],
default_optionalForm = [{
label: '性别',
valueKey: 'customerSex',
key: 'customerSex',
type: 'radio',
current: '1',
radioList: [
{ value: '1', name: '男' },
{ value: '2', name: '女' }
]
},
{
label: '车架号',
valueKey: 'standNo',
key: 'standNo',
......@@ -288,6 +315,7 @@ export default {
this.customerInfo = {
customerName: '',
customerPhone: '',
customerSex: '1',
carTypeName: '',
carChildsBrandId: '',
carChildsBrandName: '',
......@@ -312,6 +340,9 @@ export default {
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
if (!this.customerInfo.customerSex) {
this.customerInfo.customerSex = '1'
}
if (!this.customerInfo.filingDate) {
this.customerInfo.filingDate = dayjs().format('YYYY-MM-DD')
}
......@@ -367,6 +398,9 @@ export default {
getDatePickerEnd (field) {
return field.dateUnlimited ? '2099-12-31' : this.endDate
},
radioChange (e, field) {
this.customerInfo[field.key] = e.detail.value
},
bindDateChange (e, valueKey) {
const value = e.detail.value
this.customerInfo[valueKey] = value
......@@ -503,6 +537,7 @@ export default {
baseSceneCode:'100101',
customerName:params.customerName,
customerPhone:params.customerPhone,
customerSex: params.customerSex,
carBrand:params.carBrand,
carBrandId:params.carBrandId,
carChildsBrandId: params.carTypeId,
......@@ -707,6 +742,19 @@ export default {
.error {
border: toRpx(2) solid #f24724 !important;
}
.radio-group {
width: toRpx(738);
height: toRpx(76);
align-items: center;
gap: toRpx(48);
}
.radio-item {
align-items: center;
}
.radio-name {
color: #333333;
font-size: toRpx(28);
}
}
.btns {
justify-content: center;
......
......@@ -77,6 +77,14 @@
</view>
</picker>
</template>
<template v-else-if="i.type == 'radio'">
<radio-group class="radio-group flex" @change="radioChange($event, i)">
<label class="radio-item flex" v-for="item in i.radioList" :key="item.value">
<radio style="transform: scale(0.7)" :value="item.value" :checked="customerInfo[i.key] == item.value" />
<view class="radio-name">{{ item.name }}</view>
</label>
</radio-group>
</template>
<template v-else>
<view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
......@@ -126,6 +134,14 @@
</view>
</picker>
</template>
<template v-else-if="i.type == 'radio'">
<radio-group class="radio-group flex" @change="radioChange($event, i)">
<label class="radio-item flex" v-for="item in i.radioList" :key="item.value">
<radio style="transform: scale(0.7)" :value="item.value" :checked="customerInfo[i.key] == item.value" />
<view class="radio-name">{{ item.name }}</view>
</label>
</radio-group>
</template>
<template v-else>
<view
:class="['select flex', { placeholderStyle: !customerInfo[i.valueKey] }]"
......@@ -282,8 +298,19 @@ const phoneRex = /^[1]([3-9])[0-9]{9}$/,
type: 'readonly',
required: true,
merchantNameKey: 'merchantName'
},{
label: '性别',
valueKey: 'customerSex',
key: 'customerSex',
type: 'radio',
current: '1',
radioList: [
{ value: '1', name: '男' },
{ value: '2', name: '女' }
]
}],
default_optionalForm = [{
default_optionalForm = [
{
label: '车架号',
valueKey: 'standNo',
key: 'standNo',
......@@ -512,6 +539,7 @@ export default {
const requestParams = {
id: this.customerInfo.id,
customerName: this.customerInfo.customerName,
customerSex: this.customerInfo.customerSex,
carBrand: this.customerInfo.carBrand,
carBrandId: this.customerInfo.carBrandId,
carChildsBrandName: this.customerInfo.carChildsBrandName,
......@@ -676,6 +704,7 @@ export default {
this.customerInfo = {
customerName: '',
customerPhone: '',
customerSex: '1',
carBrand: '',
carBrandId: '',
carSeriesName: '',
......@@ -709,6 +738,9 @@ export default {
if (res.inviteDate) res.inviteDate = dayjs(res.inviteDate).format("YYYY-MM-DD")
// 合并而非整对象替换,保留 initForm 中已声明的响应式字段(如 contact_name)
Object.assign(this.customerInfo, res)
if (!this.customerInfo.customerSex) {
this.customerInfo.customerSex = '1'
}
if (!this.customerInfo.createdDate) {
this.customerInfo.createdDate = dayjs().format('YYYY-MM-DD')
}
......@@ -855,6 +887,9 @@ export default {
this.syncInviteDateFromDelivery()
}
},
radioChange (e, field) {
this.customerInfo[field.key] = e.detail.value
},
inputBlur (e, val) {
const standNoVal = this.customerInfo.standNo
if (val.key === 'standNo' && standNoVal) {
......@@ -1180,6 +1215,19 @@ export default {
.error {
border: toRpx(2) solid #f24724 !important;
}
.radio-group {
width: toRpx(738);
height: toRpx(76);
align-items: center;
gap: toRpx(48);
}
.radio-item {
align-items: center;
}
.radio-name {
color: #333333;
font-size: toRpx(28);
}
.input--readonly {
color: #666666;
background: #f5f7fa;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!