Commit b861e733 by 李伟康

Merge branch 'SAAS+V4.43.1' into 'SAAS+V4.44'

Saas+v4.43.1

See merge request !2
2 parents a37540eb c357829e
......@@ -22,6 +22,7 @@ const getMockData = async (immediate = false) => {
const data = await http.uni_request({ url: configUrl });
data.createTime = Date.now();
data.moduleList = await imgToBase64(data.moduleList, 'thumbnail')
data.default_moduleList = await imgToBase64(data.default_moduleList, 'thumbnail')
serverConfig.mockCache = data;
uni.$storage.set("mock_data", data);
return Promise.resolve(data);
......
......@@ -60,4 +60,25 @@ module.exports = {
data.projectName = 'boutique'
return http.fetch('dj.api.smartcarlife.logout', data);
},
/**
* 查询门店品牌 "渠道标识channelType 1.问界 2.比亚迪 3.其他"
*/
getMerchantBrand (data = {}) {
data.projectName = "boutique";
return http.post({
method: "dj.api.smartcarlife.recepiton.findMerchantBrand",
...data,
});
},
/**
* 查询门店保险权益
*/
getMerchantInsuranceList (data = {}) {
data.projectName = "boutique";
return http.post({
method: "dj.api.smartcarlife.recepiton.findMerchantItem",
...data,
});
},
};
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1029rpx 940rpx;}
.icon-addr { width: 32rpx; height: 32rpx; background-position: -957rpx -643rpx;}
.icon-aito { width: 320rpx; height: 36rpx; background-position: -479rpx -741rpx;}
.icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -957rpx -690rpx;}
.icon-avatar { width: 96rpx; height: 96rpx; background-position: -830rpx -508rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -777rpx -797rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -957rpx -737rpx;}
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1310rpx 1028rpx;}
.icon-addr { width: 32rpx; height: 32rpx; background-position: -1261rpx -557rpx;}
.icon-aito { width: 320rpx; height: 36rpx; background-position: -830rpx -617rpx;}
.icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1165rpx -617rpx;}
.icon-avatar { width: 96rpx; height: 96rpx; background-position: -381rpx -726rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -111rpx -853rpx;}
.icon-bao { width: 196rpx; height: 220rpx; background-position: -830rpx -382rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -1212rpx -617rpx;}
.icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;}
.icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -415rpx 0rpx;}
.icon-customer-detail { width: 40rpx; height: 40rpx; background-position: -957rpx -533rpx;}
.icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -830rpx -619rpx;}
.icon-face-error { width: 96rpx; height: 96rpx; background-position: 0rpx -797rpx;}
.icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -111rpx -797rpx;}
.icon-face-success { width: 96rpx; height: 96rpx; background-position: -222rpx -797rpx;}
.icon-feedback { width: 64rpx; height: 64rpx; background-position: -957rpx -87rpx;}
.icon-first-nav { width: 464rpx; height: 176rpx; background-position: 0rpx -606rpx;}
.icon-home-active { width: 112rpx; height: 112rpx; background-position: -830rpx 0rpx;}
.icon-home { width: 112rpx; height: 112rpx; background-position: -830rpx -127rpx;}
.icon-icon-arrow { width: 32rpx; height: 32rpx; background-position: -957rpx -784rpx;}
.icon-icon-close { width: 72rpx; height: 72rpx; background-position: -957rpx 0rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -957rpx -831rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -830rpx -730rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -877rpx -730rpx;}
.icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -670rpx -415rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -749rpx -606rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -749rpx -653rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: 0rpx -908rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -47rpx -908rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -94rpx -908rpx;}
.icon-logo { width: 160rpx; height: 160rpx; background-position: -495rpx -415rpx;}
.icon-pen-active { width: 120rpx; height: 120rpx; background-position: -479rpx -606rpx;}
.icon-pen { width: 120rpx; height: 120rpx; background-position: -614rpx -606rpx;}
.icon-qr-success { width: 96rpx; height: 96rpx; background-position: -333rpx -797rpx;}
.icon-qw { width: 48rpx; height: 48rpx; background-position: -957rpx -470rpx;}
.icon-record-active { width: 112rpx; height: 112rpx; background-position: -830rpx -254rpx;}
.icon-record { width: 112rpx; height: 112rpx; background-position: -830rpx -381rpx;}
.icon-scan { width: 32rpx; height: 32rpx; background-position: -141rpx -908rpx;}
.icon-scene-0 { width: 96rpx; height: 96rpx; background-position: -444rpx -797rpx;}
.icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -555rpx -797rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -957rpx -588rpx;}
.icon-second-nav { width: 480rpx; height: 176rpx; background-position: 0rpx -415rpx;}
.icon-setting { width: 64rpx; height: 64rpx; background-position: -957rpx -166rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: -666rpx -797rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -957rpx -245rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -957rpx -320rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -957rpx -395rpx;}
\ No newline at end of file
.icon-customer-detail { width: 40rpx; height: 40rpx; background-position: -1041rpx -557rpx;}
.icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -492rpx -726rpx;}
.icon-face-error { width: 96rpx; height: 96rpx; background-position: -603rpx -726rpx;}
.icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -714rpx -726rpx;}
.icon-face-success { width: 96rpx; height: 96rpx; background-position: -825rpx -726rpx;}
.icon-feedback { width: 64rpx; height: 64rpx; background-position: -1216rpx -469rpx;}
.icon-first-nav { width: 464rpx; height: 176rpx; background-position: -830rpx -191rpx;}
.icon-home-active { width: 112rpx; height: 112rpx; background-position: -638rpx -558rpx;}
.icon-home { width: 112rpx; height: 112rpx; background-position: 0rpx -726rpx;}
.icon-icon-arrow { width: 32rpx; height: 32rpx; background-position: -1259rpx -617rpx;}
.icon-icon-close { width: 72rpx; height: 72rpx; background-position: -1216rpx -382rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -830rpx -668rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -877rpx -668rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -924rpx -668rpx;}
.icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -503rpx -415rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -971rpx -668rpx;}
.icon-invisible { width: 40rpx; height: 40rpx; background-position: -1096rpx -557rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -1018rpx -668rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -1065rpx -668rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -1112rpx -668rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -1159rpx -668rpx;}
.icon-logo { width: 160rpx; height: 160rpx; background-position: -1041rpx -382rpx;}
.icon-no-insurance-data { width: 488rpx; height: 296rpx; background-position: 0rpx -415rpx;}
.icon-pen-active { width: 120rpx; height: 120rpx; background-position: -646rpx -415rpx;}
.icon-pen { width: 120rpx; height: 120rpx; background-position: -503rpx -558rpx;}
.icon-qr-success { width: 96rpx; height: 96rpx; background-position: -936rpx -726rpx;}
.icon-qw { width: 48rpx; height: 48rpx; background-position: -765rpx -558rpx;}
.icon-record-active { width: 112rpx; height: 112rpx; background-position: -127rpx -726rpx;}
.icon-record { width: 112rpx; height: 112rpx; background-position: -254rpx -726rpx;}
.icon-scan { width: 32rpx; height: 32rpx; background-position: -1206rpx -668rpx;}
.icon-scene-0 { width: 96rpx; height: 96rpx; background-position: -1047rpx -726rpx;}
.icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -1158rpx -726rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -1151rpx -557rpx;}
.icon-second-nav { width: 480rpx; height: 176rpx; background-position: -830rpx 0rpx;}
.icon-setting { width: 64rpx; height: 64rpx; background-position: 0rpx -964rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: 0rpx -853rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -79rpx -964rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -154rpx -964rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -229rpx -964rpx;}
.icon-total { width: 32rpx; height: 32rpx; background-position: -1253rpx -668rpx;}
.icon-visible { width: 40rpx; height: 40rpx; background-position: -1206rpx -557rpx;}
\ No newline at end of file
No preview for this file type

883 KB | W: | H:

1.09 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -40,6 +40,7 @@
:placeholder="i.placeholder"
:disabled="customerType == 0"
@input="inputCustomer"
placeholder-style="color:#c9c9c9;"
/>
</template>
<template v-else>
......@@ -147,7 +148,8 @@ export default {
customerType: {
type: Number,
default: 1
}
},
titleTips: String
},
data () {
return {
......@@ -217,8 +219,8 @@ export default {
return this.$store.state.user.historyStatus
},
tips () {
let { sceneType } = this,
text = '检测到“交车通知书”中未填写客户档案,请填写后再完成接待。'
let { sceneType, titleTips } = this,
text = titleTips || '检测到“交车通知书”中未填写客户档案,请填写后再完成接待。'
if (sceneType == 1) text = '请确认“精品加装服务说明页”中的客户信息,并点击完成接待结束客户接待。'
return text
}
......@@ -380,7 +382,7 @@ export default {
}
.required {
&::before {
content: "*";
content: '*';
color: #ff0000;
position: absolute;
left: -20rpx;
......
<template>
<view class="layout">
<wnCanvas
canvasId="c-5"
:drawStatus="penSwitch"
custom
@scale="$emit('scale',$event)"
>
<template slot="customContent">
<view class="title">
<view class="text">{{title}}</view>
</view>
<view class="content">
<view
class="form-box"
:key="watchStatus"
>
<view class="form">
<template v-for="(i, index) in formObject">
<view
:class="['form-item' ,{active:focusIndex == index}]"
:key="index"
>
<view class="form-item-box">
<template v-if="i.type == 'input'">
<input
:type="i.inputType"
:maxlength="i.maxlength"
v-model="customerInfo[i.key]"
class="input"
@input="inputCustomer"
:placeholder="i.placeholder"
@focus="focusIndex = index"
@blur="resetFocusIndex"
:data-key="i.key"
/>
<template v-if="i.unit">
<view class="unit">{{i.unit}}</view>
</template>
</template>
<template v-else>
<view
:class="['select flex',{placeholderStyle:!customerInfo[i.key]}]"
@click="showPopup(i.popKey,index)"
>
<view class="value text-hide">{{customerInfo[i.key] ||i.placeholder}}</view>
<uni-icons
class="arrow"
type="right"
:size="16"
></uni-icons>
</view>
</template>
</view>
</view>
</template>
</view>
</view>
</view>
<insurance-table
:isPreview="isPreview"
:show="show"
/>
</template>
</wnCanvas>
<car-brands
ref="carBrandListVisible"
@select="handleSelect($event,'carBrandListVisible')"
@close="resetFocusIndex"
/>
</view>
</template>
<script type="text/ecmascript-6">
import CarBrands from '@/components/CarBrands.vue'
import InsuranceTable from './components/InsuranceTable.vue'
export default {
components: { CarBrands, InsuranceTable },
props: {
penSwitch: Boolean,
show: Boolean,
title: String,
isPreview: Boolean
},
name: 'Reception',
data () {
return {
formObject: [
{
placeholder: '车主姓名',
key: 'customerName',
type: 'input',
inputType: 'text',
maxlength: 50,
},
{
placeholder: '车主电话',
key: 'phoneNumber',
type: 'input',
inputType: 'tel',
maxlength: 11,
},
{
placeholder: '车型',
key: 'carModel',
type: 'select',
popKey: 'carBrandListVisible',
},
{
placeholder: '新车开票价',
key: 'newCarFare',
type: 'input',
inputType: 'digit',
maxlength: 10,
unit: '元',
},
],
customerInfo: {},
focusIndex: -1,
insuranceList: []
}
},
watch: {
watchCustomerInfo: {
immediate: true,
handler (newval) {
if (newval) this.customerInfo = newval
}
},
},
computed: {
watchCustomerInfo () {
return this.$store.state.user.customerInfo
},
watchStatus () {
return this.$store.state.user.historyStatus
},
},
methods: {
inputCustomer () {
this.$store.dispatch('setCustomerInfo', this.customerInfo)
},
handleSelect (item, popkey) {
this.$refs[popkey].close()
if (popkey == 'employeeBoxVisible') {
this.customerInfo.salesUuid = item.uuid
this.customerInfo.staffName = item.staffName
} else {
this.$refs.carBrandListVisible.close()
this.customerInfo.carModel = item.name
}
this.resetFocusIndex()
this.$store.dispatch('setCustomerInfo', this.customerInfo)
},
showPopup (e, index) {
this.focusIndex = index
this.$refs[e].open()
},
closeAllPopup () {
this.$refs.carBrandListVisible.close()
this.resetFocusIndex()
},
resetFocusIndex (e) {
this.focusIndex = -1
if (e?.currentTarget && e?.target) {
const { key } = e.currentTarget.dataset
if (key == 'newCarFare') {
let value = Number(e.target.value) >= 9999999 ? 9999999 : e.target.value
// 判断是否为整数
if (!Number.isInteger(value)) value = String(value).replace(/(\d*\.?\d{0,2})\d*/, '$1')
this.customerInfo[key] = Number(value).toFixed(2) ? value >= 0 ? value : '' : ''
this.inputCustomer()
}
}
},
}
}
</script>
<style scoped lang="scss">
.layout {
position: relative;
width: 100vw;
height: 100vh;
background-image: url('@/assets/images/media/insurance-bg.webp');
background-size: 100%;
.title {
padding: 120rpx 0 48rpx 128rpx;
.text {
line-height: 80rpx;
font-weight: 500;
font-size: 56rpx;
color: #333333;
}
}
.content {
.form-box {
height: 80rpx;
padding: 0 128rpx;
.form {
display: flex;
gap: 0 28rpx;
height: 100%;
&-item {
width: 368rpx;
height: 100%;
position: relative;
&-box {
position: relative;
width: 100%;
height: 100%;
background: #ffffff;
border: 3rpx solid #a8c1ff;
border-radius: 16rpx;
box-sizing: border-box;
padding: 0 24rpx;
z-index: 2;
display: flex;
align-items: center;
.unit {
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 24rpx;
font-weight: 300;
font-size: 28rpx;
color: #292d33;
line-height: 36rpx;
}
}
.input,
.select {
width: 100%;
height: 60rpx;
border: none !important;
outline: none;
font-size: 28rpx;
color: #333333;
border-radius: 16rpx;
box-sizing: border-box;
padding: 0 !important;
display: flex;
align-items: center;
&::placeholder {
color: #999999;
}
}
.placeholderStyle {
color: #999999;
line-height: 80rpx;
}
.arrow {
color: #999 !important;
margin-left: auto;
flex-shrink: 0;
}
}
.active {
&::after {
position: absolute;
left: -2rpx;
top: -2rpx;
width: calc(100% + 4rpx);
height: calc(100% + 4rpx);
content: '';
background-image: linear-gradient(#2f6af7, #75bcff);
box-shadow: 0 0 0 8rpx #2c66f71a;
border-radius: 16rpx;
}
}
}
}
}
}
</style>
<template>
<uni-popup
ref="popup"
type="bottom"
>
<!-- :mask-click="false" -->
<view class="detail-box">
<view
class="close-box flex"
@click="close"
>
<uni-icons
type="clear"
:size="28"
color="#76787f"
></uni-icons>
</view>
<view class="sprite-icon icon-bao"></view>
<view class="title text-hide">
{{item.itemName}}
</view>
<view class="type">{{item.main}}</view>
<view class="content">
<rich-text :nodes="item.itemDesc"></rich-text>
</view>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
props: {
item: Object
},
data () {
return {
}
},
mounted () {
},
methods: {
open () {
this.$refs.popup.open("center");
},
close () {
this.$refs.popup.close()
}
}
}
</script>
<style scoped lang='scss'>
.detail-box {
position: relative;
width: 720rpx;
max-height: 640rpx;
border-radius: 40rpx;
padding: 48rpx 64rpx 88rpx;
box-sizing: border-box;
overflow: hidden;
&::before {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 240rpx;
background-image: linear-gradient(180deg, #e5edfe 0%, #ffffff 100%);
content: '';
z-index: -1;
}
&::after {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
content: '';
background-color: #fff;
z-index: -2;
}
.icon-bao {
position: absolute;
top: 48rpx;
right: 68rpx;
}
.close-box {
position: absolute;
width: 136rpx;
height: 136rpx;
top: 0;
right: 0;
justify-content: center;
z-index: 2;
}
.title {
font-weight: 500;
font-size: 40rpx;
color: #292d33;
line-height: 64rpx;
padding: 48rpx 0 24rpx;
}
.type {
background: #f2f2f2;
border-radius: 6rpx;
padding: 2rpx 16rpx;
font-size: 26rpx;
color: #666666;
line-height: 40rpx;
width: fit-content;
}
.content {
margin-top: 48rpx;
max-height: 276rpx;
font-size: 30rpx;
color: #292d33;
line-height: 48rpx;
overflow-y: auto;
}
}
</style>
\ No newline at end of file
const target = ["ip", "dev", "uat", "prod", "beta"];
const index = 2;
const index = 4;
/**
*
0本地
......@@ -51,7 +51,7 @@ const domain = {
const djDomain = {
ip: "http://192.168.2.59:8292",
// ip: 'http://192.168.2.80:8558',
dev: "https://dj.dev.glsx.com.cn",
dev: "http://dj.dev.glsx.com.cn",
beta: "https://dj.beta.glsx.com.cn", //预发布 appid: wx9f91c1ec493eb425
uat: "https://dj.test.glsx.com.cn", //测试 appid: wxe10067a63c1856ac
prod: "https://dj.glsx.com.cn",
......
......@@ -84,7 +84,7 @@ export default {
this.setAudioInfo({ endReasonType: 1 });
},
getParams() {
const { shopMerchantId, phone, sceneType,uuid,name,merchantId } = uni.$storage.get("userInfo"),
const { shopMerchantId, phone, sceneType,uuid,name,merchantId,channelType} = uni.$storage.get("userInfo"),
{ customerName, phoneNumber, salesUuid, carModel, staffName } =
this.$store.state.user.customerInfo,
receptionCustomerPaySourceList = this.booksList.map((item) => {
......@@ -113,6 +113,7 @@ export default {
receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径
merchantId: shopMerchantId,
bussinessType: sceneType == 0 ? 1 : 2, // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
channelType: channelType || 1, //1问界 2 比亚迪 3 其他
};
return params;
},
......
This diff could not be displayed because it is too large.
......@@ -4,6 +4,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"hammerjs": "^2.0.8",
"number-precision": "^1.6.0",
"prettier": "^3.3.2",
"webpack-spritesmith": "^1.1.0"
}
......
......@@ -228,6 +228,7 @@ export default {
this.id = "";
this.type = "";
this.setReceptionStatus(e);
this.$store.dispatch("clearHistory")
}, 1500);
},
changeTab (index) {
......
......@@ -35,8 +35,8 @@ export default {
actived: false
},
{
sceneName: '延保',
sceneDesc: '延保升级',
sceneName: '会员权益/升级',
sceneDesc: '权益、延保',
sceneType: 0,
actived: false
},
......@@ -72,48 +72,72 @@ export default {
},
// 选择场景
async selectScene ({ sceneType }, index) {
let { sceneList, openSceneArr, userInfo } = this
if (!openSceneArr.includes(sceneType) && !userInfo?.isSuper) return uni.showToast({
title: '暂未开通此场景',
icon: 'none'
})
sceneList.map(i => (i.actived = false))
sceneList[index].actived = true
this.sceneList = sceneList
userInfo.sceneType = sceneType
uni.showLoading({
mask: true
})
if (userInfo?.isSuper) this.jump(userInfo)
else {
try {
let { sceneList, openSceneArr, userInfo } = this
try {
if (!openSceneArr.includes(sceneType) && !userInfo?.isSuper) return uni.showToast({
title: '暂未开通此场景',
icon: 'none'
})
sceneList.map(i => (i.actived = false))
sceneList[index].actived = true
this.sceneList = sceneList
userInfo.sceneType = sceneType
uni.showLoading({
mask: true
})
if (userInfo?.isSuper) this.jump(userInfo)
else {
const data = await uni.$api.userApi.selectMerchantScene({
merchantId: userInfo.shopMerchantId,
merchantName: userInfo.shopMerchantName,
sceneType
})
if (data) this.jump(userInfo, data)
} catch (error) {
uni.hideLoading()
uni.showToast({
title: error,
icon: 'none'
})
else {
this.$sendSentry(`选择场景异常:merchantId:${userInfo.shopMerchantId},merchantName:${userInfo.shopMerchantName},sceneType:${sceneType},接口返回:${JSON.stringify(data || '')}`)
}
}
} catch (error) {
this.$sendSentry(`选择场景异常:merchantId:${userInfo.shopMerchantId},merchantName:${userInfo.shopMerchantName},sceneType:${sceneType},失败原因:${JSON.stringify(error)}`)
uni.hideLoading()
uni.showToast({
title: error,
icon: 'none'
})
console.log(error)
}
},
jump (userInfo, data) {
uni.hideLoading()
if (data) userInfo.loginRoleOnSelectMerchant = data?.loginRoleOnSelectMerchant
uni.$storage.set('userInfo', userInfo)
let url = {
1: '/pages/boutique/index',
0: '/pages/equity/index'
}[userInfo.sceneType]
uni.reLaunch({
url
})
async jump (userInfo, data) {
try {
uni.hideLoading()
if (data) userInfo.loginRoleOnSelectMerchant = data?.loginRoleOnSelectMerchant
let { shopMerchantId } = userInfo
//调接口获取门店主营品牌
uni.showLoading({
mask: true
})
const res = await uni.$api.userApi.getMerchantBrand({
merchantId: shopMerchantId
})
uni.hideLoading()
userInfo.channelType = res.channelType || 1 // 默认1 1问界 2 比亚迪 3 其他
// userInfo.channelType = 3
uni.$storage.set('userInfo', userInfo)
let url = {
1: '/pages/boutique/index',
0: '/pages/equity/index'
}[userInfo.sceneType]
uni.reLaunch({
url
})
} catch (error) {
this.$sendSentry(`选择场景后跳转异常:${error}`)
uni.hideLoading()
uni.showToast({
title: error,
icon: 'none'
})
}
}
}
}
......
......@@ -42,6 +42,7 @@
:ulList="item.ulList"
:screenList="item.screenList"
@onProductModel="productModelStatus = $event"
:isPreview="type == 'preview'"
/>
</view>
</template>
......@@ -70,6 +71,7 @@
<finish-step
ref="stepRef"
@submit="done"
:titleTips="finishTips"
/>
<informationEntry
:showPayPage.sync="showPayPage"
......@@ -88,6 +90,8 @@ import payPop from "./components/payPop.vue";
import FinishStep from '@/components/FinishStep.vue';
import { mapMutations } from "vuex";
import informationEntry from './components/informationEntry.vue'
import insurance from '@/components/Insurance/Insurance.vue'
export default {
components: {
ToolBox,
......@@ -98,7 +102,8 @@ export default {
Guarantee,
History,
ThreeGuarantees,
informationEntry
informationEntry,
insurance
},
props: {
id: [String, Number],
......@@ -135,6 +140,12 @@ export default {
name = this.media.find((e) => e.id == id)?.detailTitle || ""
return name;
},
finishTips(){
const {channelType} = uni.$storage.get("userInfo")
let text = ''
if(channelType != 1) text = '检测到“汽车保险告知书”中未填写客户档案,请填写后再完成接待。'
return text
}
},
watch: {
watchStatus: {
......
......@@ -83,6 +83,13 @@ export default {
recording: false,
};
},
computed: {
/**是否是问界 */
isAITO () {
const { channelType } = uni.$storage.get("userInfo")
return (channelType != 2 && channelType != 3)
}
},
onBackPress (options) {
if (options.from === "backbutton") {
// 物理返回按钮触发
......@@ -94,9 +101,14 @@ export default {
return false;
},
onLoad () {
const mock_data = uni.$storage.get("mock_data") || {};
this.moduleList = mock_data.moduleList || [];
this.toolList = mock_data.toolList || [];
const {
default_moduleList,
default_toolList,
moduleList,
toolList
} = uni.$storage.get("mock_data") || {}
this.moduleList = (this.isAITO ? moduleList : default_moduleList) || []
this.toolList = (this.isAITO ? toolList : default_toolList) || []
this.getSoure();
this.get_Vehicle_Sales_Data();
},
......@@ -151,57 +163,49 @@ export default {
this.$store.dispatch("setCarBrandsList", carBrandList);
uni.$storage.set("carBrandList", carBrandList);
if (carBrandList.length) {
carBrandList.map(async (item) => {
const carList = uni.getStorageSync(
`${item.id}_${item.brandId}_carlist`
);
if (!carList) {
const _res = await uni.$api.commonApi.getCarBrandsList({
brandId: item.brandId,
childBrandId: item.id,
});
if (_res)
uni.setStorageSync(
`${item.id}_${item.brandId}_carlist`,
_res
);
}
});
let index = 0
this.getCarBrandsList(carBrandList, index)
}
});
},
// 查询素材
async getSoure () {
let { moduleList, toolList } = await uni.$api.systemApi.getMockData(
let { moduleList, toolList, default_moduleList, default_toolList } = await uni.$api.systemApi.getMockData(
true
);
await moduleList.map(async (e) => {
if (e.receptionSourceDetailList)
e.receptionSourceDetailList = await uni.$api.systemApi.imgToBase64(
e.receptionSourceDetailList,
"detailUrl"
);
if (e.carTypeList)
e.carTypeList = await uni.$api.systemApi.imgToBase64(
e.carTypeList,
"url"
);
if (e.screenList)
e.screenList = await uni.$api.systemApi.imgToBase64(
e.screenList,
"url"
)
});
toolList = await uni.$api.systemApi.imgToBase64(
toolList,
"shortTitleUrl"
);
this.moduleList = moduleList;
this.toolList = toolList
if (this.isAITO) {
/**默认问界 */
await moduleList.map(async (e) => {
if (e.receptionSourceDetailList)
e.receptionSourceDetailList = await uni.$api.systemApi.imgToBase64(
e.receptionSourceDetailList,
"detailUrl"
);
if (e.carTypeList)
e.carTypeList = await uni.$api.systemApi.imgToBase64(
e.carTypeList,
"url"
);
if (e.screenList)
e.screenList = await uni.$api.systemApi.imgToBase64(
e.screenList,
"url"
)
});
toolList = await uni.$api.systemApi.imgToBase64(
toolList,
"shortTitleUrl"
);
} else default_toolList = await uni.$api.systemApi.imgToBase64(default_toolList, "shortTitleUrl");
this.moduleList = this.isAITO ? moduleList : default_moduleList
this.toolList = this.isAITO ? toolList : default_toolList
uni.$api.systemApi.updateMockData({
default_moduleList,
default_toolList,
moduleList,
toolList
}, ["moduleList", 'toolList']);
}, ["moduleList", 'toolList', 'default_moduleList', 'default_toolList']);
},
errorImg (index) {
this.moduleList[index].showAlt = true;
......@@ -309,6 +313,25 @@ export default {
this.tabIndex = index;
if (index == 0) this.init();
},
/**按序加载车型 */
async getCarBrandsList (carBrandList, index) {
const item = carBrandList[index]
const carList = uni.getStorageSync(
`${item.id}_${item.brandId}_carlist`
);
if (index < carBrandList.length - 1) {
index += 1
if (!carList) {
const list = await uni.$api.commonApi.getCarBrandsList({
brandId: item.brandId,
childBrandId: item.id,
});
if (list) uni.setStorageSync(`${item.id}_${item.brandId}_carlist`, list);
this.getCarBrandsList(carBrandList, ++index)
} else this.getCarBrandsList(carBrandList, ++index)
}
}
},
};
</script>
......
......@@ -17,6 +17,7 @@ export default {
phoneNumber: "",
salesUuid: "",
staffName: "",
newCarFare:''
},
historyStatus: Date.now(),
carBrands: [],
......@@ -41,6 +42,7 @@ export default {
phoneNumber: "",
salesUuid: "",
staffName: "",
newCarFare:''
};
uni.$storage.set("customerInfo", JSON.stringify(info));
state.customerInfo = JSON.parse(uni.$storage.get("customerInfo") || "{}");
......
......@@ -49,4 +49,13 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.text-two-line {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
/* 定义文本的行数 */
overflow: hidden;
text-overflow: ellipsis;
}
\ 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!