Commit b4400548 by cen

Merge branch 'V4.56.0' of http://192.168.3.233:8090/glsx/gl_tape into V4.56.0

2 parents eefe7407 e2861af4
...@@ -115,6 +115,15 @@ module.exports = { ...@@ -115,6 +115,15 @@ module.exports = {
...data ...data
}) })
}, },
// 权益提单相关接口
// 查询店铺配置
getShopMerchantPointConfig(data) {
return http.post({
method: 'dj.api.smartcarlife.shopMerchantPointConfig.get',
projectName: 'boutique',
...data
})
},
/** 根据订单状态统计订单数*/ /** 根据订单状态统计订单数*/
statByStatus(data) { statByStatus(data) {
return http.post({ return http.post({
...@@ -123,6 +132,14 @@ module.exports = { ...@@ -123,6 +132,14 @@ module.exports = {
...data ...data
}) })
}, },
// 根据4s店商户好获取二级流浪方列表
getSubShopMerchantList(data) {
return http.post({
method: 'dj.api.smartcarlife.diversionMerchant.getDiversionMerchantRef',
projectName: 'boutique',
...data
})
},
/**搜索订单(含套餐) */ /**搜索订单(含套餐) */
getWorkPackageGoodsList(data) { getWorkPackageGoodsList(data) {
return http.post({ return http.post({
...@@ -131,6 +148,22 @@ module.exports = { ...@@ -131,6 +148,22 @@ module.exports = {
...data ...data
}) })
}, },
// 获取商户订单设置
getMerchantRecordingSettings(data) {
return http.post({
method: 'dj.api.smartcarlife.recordingSettings.getMerchantRecordingSettings',
projectName: 'boutique',
...data
})
},
// 获取园区店配置
getYqStoreConfig(data) {
return http.post({
method: 'dj.api.smarcarlife.yqMerchantConfig.detail',
projectName: 'boutique',
...data
})
},
/**补录订单数 */ /**补录订单数 */
waitinputorder(data) { waitinputorder(data) {
return http.post({ return http.post({
......
...@@ -32,4 +32,25 @@ module.exports = { ...@@ -32,4 +32,25 @@ module.exports = {
...data ...data
}) })
}, },
/***
* 获取门店礼券列表
*/
getMerchantCouponList (data) {
return http.post({
method: 'dj.api.smartCarLife.merchant.coupon.list',
projectName: 'boutique',
...data
})
},
/**
* 获取客户礼券列表
*/
getCustomerCouponList (data) {
return http.post({
method: 'dj.api.customer.coupon.list',
projectName: 'boutique',
...data
})
},
} }
\ No newline at end of file \ No newline at end of file
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
.icon-logo { width: calc(100vmin * (1173 / 768) * 0.06820119352088662); height: calc(100vmin * (1173 / 768) * 0.06820119352088662); .icon-logo { width: calc(100vmin * (1173 / 768) * 0.06820119352088662); height: calc(100vmin * (1173 / 768) * 0.06820119352088662);
background-position: calc(100vmin * (1173 / 768) * -0.5647911338448423) calc(100vmin * (1173 / 768) * -0.10017050298380221);} background-position: calc(100vmin * (1173 / 768) * -0.5647911338448423) calc(100vmin * (1173 / 768) * -0.10017050298380221);}
.icon-lssl-icon { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157); .icon-lssl-icon { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.08013640238704177) calc(100vmin * (1173 / 768) * -0.6530264279624893);} background-position: calc(100vmin * (1173 / 768) * -0.10017050298380221) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
.icon-mask-del { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331); .icon-mask-del { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331);
background-position: calc(100vmin * (1173 / 768) * -0.17902813299232737) calc(100vmin * (1173 / 768) * -0.5839727195225917);} background-position: calc(100vmin * (1173 / 768) * -0.17902813299232737) calc(100vmin * (1173 / 768) * -0.5839727195225917);}
.icon-mask-edit { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331); .icon-mask-edit { width: calc(100vmin * (1173 / 768) * 0.03410059676044331); height: calc(100vmin * (1173 / 768) * 0.03410059676044331);
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
.icon-role-2 { width: calc(100vmin * (1173 / 768) * 0.028985507246376812); height: calc(100vmin * (1173 / 768) * 0.028985507246376812); .icon-role-2 { width: calc(100vmin * (1173 / 768) * 0.028985507246376812); height: calc(100vmin * (1173 / 768) * 0.028985507246376812);
background-position: calc(100vmin * (1173 / 768) * -0.4134697357203751) calc(100vmin * (1173 / 768) * -0.5839727195225917);} background-position: calc(100vmin * (1173 / 768) * -0.4134697357203751) calc(100vmin * (1173 / 768) * -0.5839727195225917);}
.icon-rule { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157); .icon-rule { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.09846547314578005) calc(100vmin * (1173 / 768) * -0.6530264279624893);} background-position: calc(100vmin * (1173 / 768) * -0.1184995737425405) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
.icon-scan { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323); .icon-scan { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.5042625745950554) calc(100vmin * (1173 / 768) * -0.6312872975277067);} background-position: calc(100vmin * (1173 / 768) * -0.5042625745950554) calc(100vmin * (1173 / 768) * -0.6312872975277067);}
.icon-scene-0 { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197); .icon-scene-0 { width: calc(100vmin * (1173 / 768) * 0.04092071611253197); height: calc(100vmin * (1173 / 768) * 0.04092071611253197);
...@@ -292,7 +292,7 @@ ...@@ -292,7 +292,7 @@
.icon-study-active { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763); .icon-study-active { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * -0.41602728047740833) calc(100vmin * (1173 / 768) * -0.4825234441602728);} background-position: calc(100vmin * (1173 / 768) * -0.41602728047740833) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
.icon-study-tips { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157); .icon-study-tips { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.11679454390451834) calc(100vmin * (1173 / 768) * -0.6530264279624893);} background-position: calc(100vmin * (1173 / 768) * -0.13682864450127877) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
.icon-study { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763); .icon-study { width: calc(100vmin * (1173 / 768) * 0.0443307757885763); height: calc(100vmin * (1173 / 768) * 0.0443307757885763);
background-position: calc(100vmin * (1173 / 768) * -0.46675191815856776) calc(100vmin * (1173 / 768) * -0.4825234441602728);} background-position: calc(100vmin * (1173 / 768) * -0.46675191815856776) calc(100vmin * (1173 / 768) * -0.4825234441602728);}
.icon-submit { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655); .icon-submit { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
.icon-tag-checked { width: calc(100vmin * (1173 / 768) * 0.02557544757033248); height: calc(100vmin * (1173 / 768) * 0.013640238704177323); .icon-tag-checked { width: calc(100vmin * (1173 / 768) * 0.02557544757033248); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.6547314578005116) calc(100vmin * (1173 / 768) * -0.46462063086104005);} background-position: calc(100vmin * (1173 / 768) * -0.6547314578005116) calc(100vmin * (1173 / 768) * -0.46462063086104005);}
.icon-task-pass { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157); .icon-task-pass { width: calc(100vmin * (1173 / 768) * 0.011935208866155157); height: calc(100vmin * (1173 / 768) * 0.011935208866155157);
background-position: calc(100vmin * (1173 / 768) * -0.13512361466325662) calc(100vmin * (1173 / 768) * -0.6530264279624893);} background-position: calc(100vmin * (1173 / 768) * -0.15515771526001704) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
.icon-tdcj-icon { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655); .icon-tdcj-icon { width: calc(100vmin * (1173 / 768) * 0.017050298380221655); height: calc(100vmin * (1173 / 768) * 0.017050298380221655);
background-position: calc(100vmin * (1173 / 768) * -0.43861892583120204) calc(100vmin * (1173 / 768) * -0.4079283887468031);} background-position: calc(100vmin * (1173 / 768) * -0.43861892583120204) calc(100vmin * (1173 / 768) * -0.4079283887468031);}
.icon-time-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323); .icon-time-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
...@@ -341,3 +341,5 @@ ...@@ -341,3 +341,5 @@
background-position: calc(100vmin * (1173 / 768) * -0.021739130434782608) calc(100vmin * (1173 / 768) * -0.6312872975277067);} background-position: calc(100vmin * (1173 / 768) * -0.021739130434782608) calc(100vmin * (1173 / 768) * -0.6312872975277067);}
.icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323); .icon-zj-icon { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.06010230179028133) calc(100vmin * (1173 / 768) * -0.6530264279624893);} background-position: calc(100vmin * (1173 / 768) * -0.06010230179028133) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
.icon-blue-delete { width: calc(100vmin * (1173 / 768) * 0.013640238704177323); height: calc(100vmin * (1173 / 768) * 0.013640238704177323);
background-position: calc(100vmin * (1173 / 768) * -0.08013640238704177) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
\ No newline at end of file \ No newline at end of file

2.54 MB | W: | H:

2.54 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
<template> <template>
<view> <view>
<view v-for="(items, boxIdx) in formList" :key="boxIdx"> <view v-for="(items, boxIdx) in formList" :key="boxIdx">
<view class="cell-box"> <view class="cell-box">
<view v-for="(item, idx) in items" :key="idx" class="cell" @click="onCellClick(item)" :class="[ <view v-for="(item, idx) in items" :key="idx" class="cell-row">
<view class="cell" @click="onCellClick(item)" :class="[
item.noBorder ? '' : 'border', item.noBorder ? '' : 'border',
item.onlyLabel ? 'small-height' : '', item.onlyLabel ? 'small-height' : '',
item.class item.class
]"> ]">
<template v-if="!item.hidden">
<view :class="['cell-label', { 'only-label': item.onlyLabel }]"> <view :class="['cell-label', { 'only-label': item.onlyLabel }]">
<view v-if="item.labellIcon" :class="['sprite-icon', `icon-${item.labellIcon}`]"></view> <view v-if="item.labellIcon" :class="['sprite-icon', `icon-${item.labellIcon}`]"></view>
{{ item.label }} {{ item.label }}
...@@ -19,16 +20,22 @@ ...@@ -19,16 +20,22 @@
<view class="input-box"> <view class="input-box">
<input class="input-value" v-model="formData[item.value]" :placeholder="item.placeholder || '请输入'" <input class="input-value" v-model="formData[item.value]" :placeholder="item.placeholder || '请输入'"
:maxlength="item.maxlength || 500" /> :maxlength="item.maxlength || 500" />
<view v-if="item.valueIcon" :class="['sprite-icon', `icon-${item.valueIcon}`]" @click="onValueClick(item)"></view> <view v-if="item.valueIcon" :class="['sprite-icon', `icon-${item.valueIcon}`]"
@click="onValueClick(item)"></view>
</view> </view>
</template> </template>
<!-- 下拉选择 --> <!-- 下拉选择 -->
<template v-else-if="item.type === 'select'"> <template v-else-if="item.type === 'select'">
<view v-if="formData[item.value] && formData[item.value][item.key]" class="value"> <view class="value">
<template v-if="formData[item.value] && formData[item.value][item.key]">
<template v-if="item.showText && userInfo && userInfo[item.showText]">
{{ userInfo[item.showText] }}<text>|</text>
</template>
{{ formData[item.value][item.key] }} {{ formData[item.value][item.key] }}
</view> </template>
<view v-else class="placeholder value"> <template v-else>
请选择 <span class="placeholder">请选择</span>
</template>
<view class="sprite-icon icon-icon-select"></view> <view class="sprite-icon icon-icon-select"></view>
</view> </view>
</template> </template>
...@@ -49,6 +56,9 @@ ...@@ -49,6 +56,9 @@
:maxlength="item.maxlength"></textarea> :maxlength="item.maxlength"></textarea>
</template> </template>
</view> </view>
</template>
</view>
<slot v-if="item.addHtml" :name="item.addHtml"></slot>
</view> </view>
</view> </view>
</view> </view>
...@@ -62,7 +72,7 @@ export default { ...@@ -62,7 +72,7 @@ export default {
/** /**
* noBorder:默认false:有下边框,true:无下边框 * noBorder:默认false:有下边框,true:无下边框
* onlyLabel:判断是否只有label,默认false,主要是为了做样式区分 * onlyLabel:判断是否只有label,默认false,主要是为了做样式区分
* class:cell-row:不一行显示,主要用于文本域 * class:cell-break:不一行显示,主要用于文本域
* required:是否为必填项,添加星号 * required:是否为必填项,添加星号
* value: 绑定的字段名称 * value: 绑定的字段名称
* key:如果绑定的字段名称为对象,则需要传入需要显示在页面上的属性名 * key:如果绑定的字段名称为对象,则需要传入需要显示在页面上的属性名
...@@ -80,6 +90,14 @@ export default { ...@@ -80,6 +90,14 @@ export default {
default: () => ({}) default: () => ({})
} }
}, },
data() {
return {
userInfo: {}
}
},
mounted() {
this.userInfo = uni.$storage.get('userInfo') || {}
},
methods: { methods: {
onCellClick(item) { onCellClick(item) {
if (item.type === 'select') { if (item.type === 'select') {
...@@ -103,18 +121,20 @@ export default { ...@@ -103,18 +121,20 @@ export default {
overflow: hidden; overflow: hidden;
margin-bottom: toRpx(18); margin-bottom: toRpx(18);
} }
.cell-row {
padding-left: toRpx(32);
}
.cell { .cell {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0 toRpx(32); padding-right: toRpx(32);
height: toRpx(96); height: toRpx(96);
&.small-height { &.small-height {
height: toRpx(72); height: toRpx(72);
} }
&.cell-row { &.cell-break {
flex-direction: column; flex-direction: column;
align-items: normal; align-items: normal;
height: auto; height: auto;
...@@ -130,6 +150,7 @@ export default { ...@@ -130,6 +150,7 @@ export default {
font-size: toRpx(28); font-size: toRpx(28);
display: flex; display: flex;
align-items: center; align-items: center;
.sprite-icon { .sprite-icon {
margin-right: toRpx(8); margin-right: toRpx(8);
} }
...@@ -146,12 +167,12 @@ export default { ...@@ -146,12 +167,12 @@ export default {
} }
} }
.cell-row .cell-label { .cell-break .cell-label {
height: toRpx(96); height: toRpx(96);
line-height: toRpx(96); line-height: toRpx(96);
} }
.cell-row .cell-value { .cell-break .cell-value {
width: 100%; width: 100%;
margin-left: 0; margin-left: 0;
} }
...@@ -178,15 +199,18 @@ export default { ...@@ -178,15 +199,18 @@ export default {
align-items: center; align-items: center;
height: 100%; height: 100%;
} }
.input-box { .input-box {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
height: 100%; height: 100%;
.sprite-icon { .sprite-icon {
margin-left: toRpx(8); margin-left: toRpx(8);
} }
} }
.input-value { .input-value {
height: 100%; height: 100%;
text-align: right; text-align: right;
......
...@@ -124,6 +124,7 @@ export default { ...@@ -124,6 +124,7 @@ export default {
uni.$storage.rm("noSignInUuid"); uni.$storage.rm("noSignInUuid");
uni.$storage.rm("beisenToken"); uni.$storage.rm("beisenToken");
uni.$storage.rm("studyCenterPermission"); uni.$storage.rm("studyCenterPermission");
uni.$storage.rm("boutique_YQorderSetting")
setTimeout(() => { setTimeout(() => {
uni.hideLoading() uni.hideLoading()
uni.reLaunch({ uni.reLaunch({
......
...@@ -229,7 +229,6 @@ export default { ...@@ -229,7 +229,6 @@ export default {
mounted () { mounted () {
const userInfo = uni.$storage.get('userInfo') || {} const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo this.userInfo = userInfo
this.checkVersion()
permision.requestAndroidPermission('android.permission.RECORD_AUDIO') // 进入界面时检查权限 permision.requestAndroidPermission('android.permission.RECORD_AUDIO') // 进入界面时检查权限
}, },
provide () { provide () {
...@@ -397,6 +396,10 @@ export default { ...@@ -397,6 +396,10 @@ export default {
}) })
this.$emit('start') this.$emit('start')
}, },
async updateApp (requested = false) {
if (!requested) await uni.$api.systemApi.getMockData(true)
this.checkVersion()
},
async entranceClick (item) { async entranceClick (item) {
// if (item.name != 'DailyReport' && (await this.checkDailyReport() || await this.inspectionOfProhibitionBill())) return // if (item.name != 'DailyReport' && (await this.checkDailyReport() || await this.inspectionOfProhibitionBill())) return
uni.navigateTo({ uni.navigateTo({
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
scroll-y scroll-y
:scroll-into-view="letter" :scroll-into-view="letter"
> >
<template v-for="(i, index) in list"> <template v-for="(i, index) in (searchStatus ? searchList : list)">
<view <view
class="item-box" class="item-box"
:key="index" :key="index"
...@@ -18,27 +18,23 @@ ...@@ -18,27 +18,23 @@
:key="cindex" :key="cindex"
> >
<view class="brand-name">{{c.name}}</view> <view class="brand-name">{{c.name}}</view>
<template v-for="(j, jindex) in c.childs"> <view class="brand-list">
<template v-for="(j, jindex) in c.childs_list">
<view <view
class="brand-list"
:key="jindex" :key="jindex"
:class="[
{'sub-brand-name':j.isTitle},
{'item flex':!j.isTitle},
{active: currentId ? j.id == currentId : j.id == data.customer[params.idKey]}
]"
@click="choose(j,c)"
> >
<view class="sub-brand-name">{{j.name}}</view> <view class="sprite-icon icon-tag-checked" v-if="!j.isTitle"></view>
<view class="car-model-list"> {{j.name}}
<template v-for="(k, kindex) in j.childs">
<view
:class="['item flex',{
active: currentId ? k.id == currentId : k.id == data.customer[params.idKey]
}]"
:key="`${k.id}_${kindex}`"
@click="choose(k , c)"
>{{k.name}}</view>
</template>
</view>
</view> </view>
</template> </template>
</view> </view>
</view>
</template> </template>
</view> </view>
...@@ -67,29 +63,35 @@ export default { ...@@ -67,29 +63,35 @@ export default {
list: [], list: [],
currentId: '', currentId: '',
searchList: [], searchList: [],
letter: 'A' letter: 'A',
searchStatus: false,
} }
}, },
props: { props: {
params: Object, params: Object,
data: Object, data: Object,
apiData: Array
}, },
mounted () { mounted () {
}, },
methods: { methods: {
async getList () { async getList (searchValue) {
const { userInfo, apiData } = this const { userInfo, params } = this,
{ cacheData } = params
this.currentId = '' this.currentId = ''
if (apiData && apiData.length) { if (cacheData && cacheData.length) {
this.list = apiData this.initCarList(cacheData)
if (searchValue) this.handleSearch(searchValue)
return return
} }
const { shopMerchantId } = userInfo, const { shopMerchantId } = userInfo,
data = await uni.$api.popupApi.getMerchantCarBrandList({ data = await uni.$api.popupApi.getMerchantCarBrandList({
merchantId: shopMerchantId merchantId: shopMerchantId
}) })
if (data && data.length) this.initCarList(data) if (data && data.length) {
this.initCarList(data)
params.cacheData = data
this.$emit('update:params', params)
}
}, },
initCarList (carData) { initCarList (carData) {
let { params: { idKey }, data: { customer } } = this, let { params: { idKey }, data: { customer } } = this,
...@@ -104,7 +106,7 @@ export default { ...@@ -104,7 +106,7 @@ export default {
c.childs.map((s) => { c.childs.map((s) => {
s.carChildsBrandId = c.id; s.carChildsBrandId = c.id;
s.carChildsBrandName = c.name; s.carChildsBrandName = c.name;
if (customer[idKey]) { if (customer && customer[idKey]) {
if (s.id == customer[idKey]) { if (s.id == customer[idKey]) {
s.active = true; s.active = true;
this.letter = i.letter; this.letter = i.letter;
...@@ -129,14 +131,55 @@ export default { ...@@ -129,14 +131,55 @@ export default {
list, list,
} }
}) })
console.log(carModelList)
this.list = carModelList this.list = carModelList
this.$emit('update:apiData', carModelList)
}, },
handleSearch (searchValue) { handleSearch (searchValue) {
console.log(searchValue) if (!searchValue) {
this.searchStatus = false
this.letter = 'A'
} else {
searchValue = searchValue.toUpperCase()
let { list } = this,
carBrand = JSON.parse(JSON.stringify(list))
let arr = [];
carBrand.map(c => {
c.list.map(i => {
let childs_list = [],
i_name = i.name.toUpperCase()
i.childs_list.map((k) => {
let k_name = k.name.toUpperCase()
if (k_name.indexOf(searchValue) != -1) {
childs_list.push(k);
}
});
if (i_name.indexOf(searchValue) != -1 || childs_list.length > 0) {
i.childs_list = childs_list.length > 0 ? childs_list : i.childs_list;
arr.push(i);
}
})
})
let letterList = Array.from(new Set([...arr.map((e) => e.letter)]));
let searchList = letterList.map((l) => {
let _list = [];
arr.map((i) => {
if (l === i.letter) {
_list.push(i);
}
})
return {
letter: l,
list: _list,
}
})
this.searchList = searchList
this.searchStatus = true
}
}, },
choose (that, item) { choose (that, item) {
if (that.isTitle) return
let chooseItem = { let chooseItem = {
carBrandId: item.id, carBrandId: item.id,
carBrand: item.name, carBrand: item.name,
...@@ -186,22 +229,26 @@ export default { ...@@ -186,22 +229,26 @@ export default {
color: #333333; color: #333333;
font-size: 32rpx; font-size: 32rpx;
line-height: 44rpx; line-height: 44rpx;
margin-top: 16rpx; margin: 16rpx 0;
} }
.sub-brand-name { .sub-brand-name {
margin: 16rpx 0;
color: #888888; color: #888888;
font-size: 28rpx; font-size: 28rpx;
line-height: 40rpx; line-height: 40rpx;
width: 100%;
flex-shrink: 0;
} }
} }
} }
.car-model-list { .brand-list {
display: grid; // display: grid;
grid-template-columns: repeat(4, 1fr); // grid-template-columns: repeat(4, 1fr);
gap: 32rpx; gap: 32rpx;
display: flex;
// gap: 32rpx 0;
flex-wrap: wrap;
.item { .item {
width: calc((100% - 96rpx) / 4);
justify-content: center; justify-content: center;
height: 72rpx; height: 72rpx;
border-radius: 8rpx; border-radius: 8rpx;
......
<template>
<view class="coupon-box">
<template v-if="customerCouponList.length">
<view class="item-box">
<view class="coupon-title flex">客户拥有的券</view>
<view class="coupon-list">
<template v-for="(c,cindex) in customerCouponList">
<view
:key="cindex"
:class="[
'item flex',
{active: currentId ? c.customerCouponCode == currentId : c.customerCouponCode == data[params.idKey]},
]"
@click="choose(c,true)"
>
<view class="sprite-icon icon-tag-checked"></view>
{{c.couponName}}{{c.customerCouponCode}}
</view>
</template>
</view>
</view>
</template>
<template v-for="(i, index) in (searchStatus ? searchList : list)">
<view
class="item-box"
:key="index"
>
<view class="coupon-title flex">{{i.title}}</view>
<view class="coupon-list">
<template v-for="(c,cindex) in i.list">
<view
:key="cindex"
:class="[
'item flex',
{active: currentId ? c.merchantCouponCode == currentId : c.merchantCouponCode == data[params.idKey]},
{disabled:checkDisabled(c) }
]"
@click="choose(c)"
>
<view class="sprite-icon icon-tag-checked"></view>
{{c.couponName}}{{c.merchantCouponCode}}
</view>
</template>
</view>
</view>
</template>
</view>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'CouponList',
inject: ['userInfo'],
data () {
return {
list: [],
currentId: '',
searchList: [],
searchStatus: false,
customerCouponList: []
}
},
props: {
params: Object,
data: Object,
},
watch: {
'data.customer.customerPhone': {
handler (val) {
if (val) this.getCustomerCouponList(val)
},
deep: true,
immediate: true
}
},
mounted () {
},
methods: {
async getList (searchValue) {
const { userInfo, params } = this,
{ cacheData } = params
this.currentId = ''
if (cacheData && cacheData.length) {
this.initCouponList(cacheData)
if (searchValue) this.handleSearch(searchValue)
return
}
const { shopMerchantId, merchantId } = userInfo,
data = await uni.$api.popupApi.getMerchantCouponList({
merchantId: shopMerchantId,
yqMerchantId: merchantId,
orderByType: 9
})
if (data && data.length) {
this.initCouponList(data)
params.cacheData = data
this.$emit('update:params', params)
}
},
initCouponList (data) {
let couponTypeList = Array.from(new Set([...data.map((e) => e.couponInfo.couponType)])),
couponList = couponTypeList.map((e, index) => {
let list = [];
let title = "";
data.map((i) => {
i.merchantCouponCode = i.merchantCouponCode.split("-")[0];
if (i.couponInfo.couponType == e) {
list.push(i);
title = i.couponInfo.couponTypeName;
}
});
return {
title,
list,
};
})
this.list = couponList
},
async getCustomerCouponList (customerPhone) {
const phoneRex = /^[1]([3-9])[0-9]{9}$/,
{ userInfo, params: formParams, data: orderObj } = this,
params = {
customerPhone,
statusList: [0, 1],
usedFlag: "N",
}
if (phoneRex.test(customerPhone)) {
const data = await uni.$api.popupApi.getCustomerCouponList(params)
this.customerCouponList = data.filter((item) => {
return (
item.status != 1 ||
(item.status == 1 && item.customerCouponCode == orderObj[formParams.idKey])
);
})
}
},
handleSearch (searchValue) {
if (!searchValue) {
this.searchStatus = false
} else {
searchValue = searchValue.toUpperCase()
let { list } = this,
couponList = JSON.parse(JSON.stringify(list))
let arr = [];
couponList.map((i) => {
let list = [];
i.list.map((s) => {
let name = s.couponName.toUpperCase()
if (name.indexOf(searchValue) != -1) {
list.push(s);
}
});
let title = i.title.toUpperCase()
if (title.indexOf(searchValue) != -1 || list.length > 0) {
i.list = list.length > 0 ? list : i.list;
arr.push(i);
}
})
this.searchList = arr
this.searchStatus = true
}
},
choose (item, isCustomer = false) {
if (item.disabled) return
let customerCouponCode = isCustomer ? item.customerCouponCode : item.merchantCouponCode,
key = isCustomer ? 'customerCouponId' : 'merchantCouponId',
chooseItem = {
couponName: item.couponName,
merchantId: item.merchantId,
customerCouponCode,
[key]: item.id
}
this.currentId = customerCouponCode
this.$emit('choose', chooseItem)
},
checkDisabled (item) {
let disabled = false,
{ customerCouponList } = this
if (customerCouponList.length) {
disabled = customerCouponList.some(i => i.merchantCoupon.id == item.id)
}
item.disabled = disabled
return disabled
}
}
}
</script>
<style scoped lang='scss'>
.coupon-box {
position: relative;
height: 100%;
width: 100%;
.item-box {
margin-bottom: 32rpx;
.coupon-title {
color: #888888;
font-size: 28rpx;
height: 40rpx;
background: #f5f7fa;
padding-left: 48rpx;
margin-bottom: 16rpx;
}
}
.coupon-list {
// display: grid;
// grid-template-columns: repeat(4, 1fr);
gap: 32rpx;
display: flex;
// gap: 32rpx 0;
flex-wrap: wrap;
margin: 0 48rpx;
.item {
width: calc((100% - 96rpx) / 4);
justify-content: center;
min-height: 72rpx;
border-radius: 8rpx;
border: 2rpx solid #dce0e6;
box-sizing: border-box;
position: relative;
color: #333333;
font-size: 32rpx;
padding: 14rpx 16rpx;
word-break: break-all;
text-align: center;
.sprite-icon {
display: none;
position: absolute;
top: 0;
right: 0;
}
}
.disabled {
opacity: 0.5;
}
.active {
border-color: #2c66f7;
background: #ecf1ff;
color: #2c66f7;
.sprite-icon {
display: block;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -26,17 +26,16 @@ export default { ...@@ -26,17 +26,16 @@ export default {
props: { props: {
params: Object, params: Object,
data: Object, data: Object,
apiData: Array
}, },
mounted () { mounted () {
}, },
methods: { methods: {
async getList () { async getList () {
const { userInfo, apiData } = this, const { userInfo: { shopMerchantId }, params } = this,
{ shopMerchantId } = userInfo { cacheData } = params
this.currentId = '' this.currentId = ''
if (apiData && apiData.length) { if (cacheData && cacheData.length) {
this.list = apiData this.list = cacheData
return return
} }
const data = await uni.$api.popupApi.getDiversionMerchantRef({ const data = await uni.$api.popupApi.getDiversionMerchantRef({
...@@ -44,7 +43,8 @@ export default { ...@@ -44,7 +43,8 @@ export default {
}) })
if (data && data.length) { if (data && data.length) {
this.list = data this.list = data
this.$emit('update:apiData', data) params.cacheData = data
this.$emit('update:params', params)
} }
}, },
choose (i) { choose (i) {
......
...@@ -26,16 +26,17 @@ export default { ...@@ -26,16 +26,17 @@ export default {
props: { props: {
params: Object, params: Object,
data: Object, data: Object,
apiData: Array cacheData: Array
}, },
mounted () { mounted () {
}, },
methods: { methods: {
async getList (searchValue) { async getList (searchValue, search) {
const { userInfo, params, apiData } = this const { userInfo, params } = this,
{ cacheData } = params
this.currentId = '' this.currentId = ''
if (apiData && apiData.length) { if (!search && cacheData && cacheData.length) {
this.list = apiData this.list = cacheData
return return
} }
const { shopMerchantId, sceneType, merchantId } = userInfo, const { shopMerchantId, sceneType, merchantId } = userInfo,
...@@ -46,12 +47,13 @@ export default { ...@@ -46,12 +47,13 @@ export default {
}) })
if (data && data.length) { if (data && data.length) {
this.list = data this.list = data
if (!searchValue) this.$emit('update:apiData', data) params.cacheData = data
this.$emit('update:params', params)
} }
}, },
handleSearch (searchValue) { handleSearch (searchValue) {
this.list = [] this.list = []
this.getList(searchValue) this.getList(searchValue, true)
}, },
choose (i) { choose (i) {
this.currentId = i.uuid this.currentId = i.uuid
......
/** /**
* popupType
* 0:销售顾问/录单员 * 0:销售顾问/录单员
* 1:交付专员 * 1:交付专员
* 2:二级流量方 * 2:二级流量方
...@@ -37,13 +38,20 @@ const componentConfig = { ...@@ -37,13 +38,20 @@ const componentConfig = {
placeholder: '查找', placeholder: '查找',
idKey: 'carSeriesId' idKey: 'carSeriesId'
}, },
5: {
name: 'CouponList',
title: '选择礼券',
placeholder: '查找',
idKey: 'customerCouponCode'
}
} }
import EmployeeList from './components/EmployeeList.vue' import EmployeeList from './components/EmployeeList.vue'
import DiversionMerchant from './components/DiversionMerchant.vue' import DiversionMerchant from './components/DiversionMerchant.vue'
import CarModelList from './components/CarModelList.vue' import CarModelList from './components/CarModelList.vue'
import CouponList from './components/CouponList.vue'
export default { export default {
data(){ data () {
return { return {
componentConfig componentConfig
} }
...@@ -51,6 +59,7 @@ export default { ...@@ -51,6 +59,7 @@ export default {
components: { components: {
EmployeeList, EmployeeList,
DiversionMerchant, DiversionMerchant,
CarModelList CarModelList,
CouponList
}, },
} }
\ No newline at end of file \ No newline at end of file
...@@ -25,11 +25,20 @@ ...@@ -25,11 +25,20 @@
type="text" type="text"
:placeholder="componentObject.placeholder || '请输入'" :placeholder="componentObject.placeholder || '请输入'"
placeholder-class="placeholder" placeholder-class="placeholder"
v-model="searchValue" v-model="componentObject.searchValue"
confirm-type="search" confirm-type="search"
@confirm="handleSearch" @confirm="handleSearch"
> >
<view
class="clear flex"
@click="clear"
>
<uni-icons
type="closeempty"
size="16"
v-if="componentObject.searchValue"
></uni-icons>
</view>
</view> </view>
</template> </template>
<view :class="['popup-body',{ 'hide-search' :componentObject.hideSearch}]"> <view :class="['popup-body',{ 'hide-search' :componentObject.hideSearch}]">
...@@ -39,11 +48,10 @@ ...@@ -39,11 +48,10 @@
> >
<component <component
:is="componentObject.name" :is="componentObject.name"
:params="componentObject" :params.sync="componentObject"
:data="data" :data="data"
ref="componentRef" ref="componentRef"
@choose="chooseContent = $event" @choose="chooseContent = $event"
:apiData.sync="apiData"
></component> ></component>
</scroll-view> </scroll-view>
...@@ -92,6 +100,7 @@ export default { ...@@ -92,6 +100,7 @@ export default {
type: Object, type: Object,
default: () => ({}) default: () => ({})
}, },
externalData: null
}, },
provide () { provide () {
return { return {
...@@ -101,23 +110,26 @@ export default { ...@@ -101,23 +110,26 @@ export default {
data () { data () {
return { return {
position: 'bottom', position: 'bottom',
searchValue: '',
chooseContent: null, chooseContent: null,
apiData: null componentObject: null,
} }
}, },
watch: { watch: {
popupType: { popupType: {
handler (val) { handler (val) {
// console.log(val) this.componentObject = this.componentConfig[this.popupType]
}, },
deep: true,
immediate: true immediate: true
}, },
externalData: {
handler (val) {
if (val && this.componentObject) this.componentObject.cacheData = val
}, },
computed: { deep: true,
componentObject () { }
return this.componentConfig[this.popupType]
}, },
computed: {
title () { title () {
return this.componentConfig[this.popupType].title return this.componentConfig[this.popupType].title
}, },
...@@ -146,7 +158,7 @@ export default { ...@@ -146,7 +158,7 @@ export default {
initPopupData () { initPopupData () {
let componentRef = this.componentRef() let componentRef = this.componentRef()
if (!componentRef) setTimeout(this.initPopupData, .1e3) if (!componentRef) setTimeout(this.initPopupData, .1e3)
else componentRef.getList && componentRef.getList() else componentRef.getList && componentRef.getList(this.componentObject.searchValue)
}, },
handleSearch () { handleSearch () {
let componentRef = this.componentRef() let componentRef = this.componentRef()
...@@ -154,16 +166,22 @@ export default { ...@@ -154,16 +166,22 @@ export default {
title: '请稍后再试', title: '请稍后再试',
icon: 'none' icon: 'none'
}) })
else componentRef.handleSearch(this.searchValue) else componentRef.handleSearch(this.componentObject.searchValue)
}, },
confirm () { confirm () {
let { chooseContent } = this let { chooseContent, popupType } = this
if (chooseContent) { if (chooseContent) {
this.$emit('onConfirm', chooseContent) this.$emit('onConfirm', {
chooseContent,
popupType
})
this.$refs.popup.close() this.$refs.popup.close()
} }
},
clear () {
this.componentObject.searchValue = ''
this.handleSearch()
} }
} }
} }
</script> </script>
...@@ -195,6 +213,7 @@ export default { ...@@ -195,6 +213,7 @@ export default {
border-radius: 40rpx; border-radius: 40rpx;
background: #f5f7fa; background: #f5f7fa;
margin: 0 48rpx; margin: 0 48rpx;
position: relative;
.input { .input {
height: 100%; height: 100%;
width: 100%; width: 100%;
...@@ -212,13 +231,20 @@ export default { ...@@ -212,13 +231,20 @@ export default {
&::after { &::after {
display: block; display: block;
content: '\e654'; content: '\e654';
margin-left: 16rpx; margin-left: 8rpx;
height: 100%; height: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 36rpx; font-size: 36rpx;
} }
} }
.clear {
position: absolute;
right: 0;
top: 0;
height: 100%;
padding: 0 48rpx;
}
} }
.popup-body { .popup-body {
height: calc(100% - 392rpx); height: calc(100% - 392rpx);
......
...@@ -258,6 +258,7 @@ export default { ...@@ -258,6 +258,7 @@ export default {
let { blockX, ismove } = this let { blockX, ismove } = this
let pageX = e.changedTouches[0].pageX let pageX = e.changedTouches[0].pageX
let nums = ismove - pageX let nums = ismove - pageX
if(nums == 0) return
if (!(nums > 50 || blockX < -30) || !(nums < -50 || blockX > 30)) { if (!(nums > 50 || blockX < -30) || !(nums < -50 || blockX > 30)) {
this.viewX = -10 this.viewX = -10
setTimeout(() => { setTimeout(() => {
......
/* /*
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-26 10:03:54 * @Date: 2024-12-26 10:03:54
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn * @LastEditors: limin
* @LastEditTime: 2025-04-15 17:59:20 * @LastEditTime: 2025-08-12 10:32:25
* @FilePath: \gl_tape\mixin\record\recorder.js * @FilePath: \gl_tape\mixin\record\recorder.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -12,12 +12,12 @@ import utils from '@/utils/utils.js' ...@@ -12,12 +12,12 @@ import utils from '@/utils/utils.js'
import { storageApi } from '@/utils/cache' import { storageApi } from '@/utils/cache'
import permision from '@/js_sdk/wa-permission/permission.js' import permision from '@/js_sdk/wa-permission/permission.js'
export default { export default {
provide () { provide() {
return { return {
getRecorder: () => this.record getRecorder: () => this.record
} }
}, },
async mounted () { async mounted() {
this.audioManager = new AudioManager(this.onAudioStart, this.onAudioStop, this.onError) this.audioManager = new AudioManager(this.onAudioStart, this.onAudioStop, this.onError)
this.initDto() this.initDto()
this.record = new TempRecord(this.tempRecord, this.triggleTempNumber) this.record = new TempRecord(this.tempRecord, this.triggleTempNumber)
...@@ -35,23 +35,23 @@ export default { ...@@ -35,23 +35,23 @@ export default {
// deep: true // deep: true
// }, // },
customerKey: { customerKey: {
handler () { handler() {
this.handler(this.customerInfo, this.updateCustomerInfo) this.handler(this.customerInfo, this.updateCustomerInfo)
}, },
deep: true deep: true
}, },
booksList: { booksList: {
handler (val) { handler(val) {
this.handler(val, this.updateBookList) this.handler(val, this.updateBookList)
} }
}, },
receptionStatus: { receptionStatus: {
handler (val) { handler(val) {
this.handler(val, this.updateReceptionStatus) this.handler(val, this.updateReceptionStatus)
} }
}, },
receptionKey: { receptionKey: {
handler (val) { handler(val) {
this.handler(this.receptionTrack, this.updateMaterialPointList) this.handler(this.receptionTrack, this.updateMaterialPointList)
} }
} }
...@@ -64,28 +64,28 @@ export default { ...@@ -64,28 +64,28 @@ export default {
...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setPerRecordNumber']), ...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setPerRecordNumber']),
...mapMutations(['clearCustomerInfo']), ...mapMutations(['clearCustomerInfo']),
//开始录音 //开始录音
startAudio: utils.throttle(async function () { startAudio: utils.throttle(async function (isInitData = true) {
const isPermission = await this.checkBeforeStart() const isPermission = await this.checkBeforeStart()
if (!isPermission) return if (!isPermission) return
uni.$logger.local.info('〖接待管理Recorder〗 == 开始接待 ') uni.$logger.local.info('〖接待管理Recorder〗 == 开始接待 ')
this.initReception() isInitData && this.initReception()
this.initTime()
this.audioManager.start() this.audioManager.start()
}, 300), }, 300),
initReception () { initReception() {
this.setBooks([]) this.setBooks([])
this.clearCustomerInfo() this.clearCustomerInfo()
this.setReceptionStatus('') this.setReceptionStatus('')
this.initTime()
}, },
async onAudioStart () { async onAudioStart() {
if (this.audioManager.counter === 0) { if (this.audioManager.counter === 0) {
await this.record.add() await this.record.add()
} else { } else {
this.record.addAudio() this.record.addAudio()
} }
}, },
async onAudioStop () { async onAudioStop() {
if (this.audioManager.isRecording) { if (this.audioManager.isRecording) {
uni.$logger.local.info('〖接待管理Recorder〗 == 接待中,再次开启录音! ') uni.$logger.local.info('〖接待管理Recorder〗 == 接待中,再次开启录音! ')
this.audioManager.start() this.audioManager.start()
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
uni.$logger.local.info('〖接待管理Recorder〗 == 断开录音! ') uni.$logger.local.info('〖接待管理Recorder〗 == 断开录音! ')
} }
}, },
onAudioError (error) { onAudioError(error) {
const message = error.message const message = error.message
this.reportError(`录音异常: error: ${message}`, message) this.reportError(`录音异常: error: ${message}`, message)
}, },
...@@ -102,38 +102,40 @@ export default { ...@@ -102,38 +102,40 @@ export default {
* @params {boolean} status true 不保存记录/AUDIO_STATUS.ABNORMAL 只要断开录音 * @params {boolean} status true 不保存记录/AUDIO_STATUS.ABNORMAL 只要断开录音
* @returns {void} * @returns {void}
*/ */
async stopAudio (isNotSave = false) { async stopAudio(isNotSave = false) {
uni.$logger.local.info('〖接待管理Recorder〗 == 结束接待! ') uni.$logger.local.info('〖接待管理Recorder〗 == 结束接待! ')
this.stop() this.stop()
await this.saveAndClearRecord(isNotSave) await this.saveAndClearRecord(isNotSave)
}, },
async saveAndClearRecord (isNotSave = false) { async saveAndClearRecord(isNotSave = false) {
if (isNotSave) { if (isNotSave) {
uni.$logger.local.info('〖接待管理Recorder〗 == 不保存记录! ') uni.$logger.local.info('〖接待管理Recorder〗 == 不保存记录! ')
return this.record.clearLocalRecord() this.record.clearSavedFiles()
this.record.clearLocalRecord()
return
} }
this.record.setReceptionEndTime() //设置接待结束时间 this.record.setReceptionEndTime() //设置接待结束时间
//如果不需要保存记录 //如果不需要保存记录
await this.record.save() await this.record.save()
}, },
stop () { stop() {
this.endWatchClick() this.endWatchClick()
this.record.clearLoopTimer() this.record.clearLoopTimer()
if (this.audioManager.isRecording) { if (this.audioManager.isRecording) {
this.audioManager.stop() this.audioManager.stop()
} }
}, },
handler (params, fn) { handler(params, fn) {
if (this.audioManager.isRecording || this.record?.currentRecord?.endReasonType == 1) { if (this.audioManager.isRecording || this.record?.currentRecord?.endReasonType == 1) {
fn.call(this, params) fn.call(this, params)
} }
}, },
reset () { reset() {
this.audioManager = null this.audioManager = null
this.record = null this.record = null
this.tempRecord = null this.tempRecord = null
}, },
initDto () { initDto() {
const { shopMerchantId, phone, sceneType, uuid, name, merchantId, channelType, merchantName } = storageApi.getUserInfo() const { shopMerchantId, phone, sceneType, uuid, name, merchantId, channelType, merchantName } = storageApi.getUserInfo()
const { deviceId: appCode } = uni.getDeviceInfo() const { deviceId: appCode } = uni.getDeviceInfo()
const dto = new RecordDto({ const dto = new RecordDto({
...@@ -146,12 +148,12 @@ export default { ...@@ -146,12 +148,12 @@ export default {
merchantId: shopMerchantId, merchantId: shopMerchantId,
merchantName, merchantName,
bussinessType: sceneType == 0 ? 1 : 2, // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改 bussinessType: sceneType == 0 ? 1 : 2, // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
channelType: channelType || 1,//1问界 2 比亚迪 3 其他 channelType: channelType || 1 //1问界 2 比亚迪 3 其他
}) })
this.sceneType = sceneType this.sceneType = sceneType
this.tempRecord = dto this.tempRecord = dto
}, },
updateCustomerInfo (customerInfo = {}) { updateCustomerInfo(customerInfo = {}) {
const { customerName, phoneNumber, salesUuid, carModel, staffName: salesName, carBrand, carBrandId, oneCarBrand, oneCarBrandId } = customerInfo const { customerName, phoneNumber, salesUuid, carModel, staffName: salesName, carBrand, carBrandId, oneCarBrand, oneCarBrandId } = customerInfo
this.record.updatePreRecords({ this.record.updatePreRecords({
customerName, customerName,
...@@ -165,7 +167,7 @@ export default { ...@@ -165,7 +167,7 @@ export default {
oneCarBrandId oneCarBrandId
}) })
}, },
updateBookList (booksList) { updateBookList(booksList) {
const receptionCustomerPaySourceList = booksList.map(item => { const receptionCustomerPaySourceList = booksList.map(item => {
return { return {
id: item.id, id: item.id,
...@@ -175,7 +177,7 @@ export default { ...@@ -175,7 +177,7 @@ export default {
}) })
this.record.updatePreRecords({ receptionCustomerPaySourceList }) this.record.updatePreRecords({ receptionCustomerPaySourceList })
}, },
updateMaterialPointList (receptionTrack) { updateMaterialPointList(receptionTrack) {
const { merchantId, staffUuid, staffName } = this.tempRecord const { merchantId, staffUuid, staffName } = this.tempRecord
let receptionCustomerMaterialPointList = [] let receptionCustomerMaterialPointList = []
Object.keys(receptionTrack).map(key => { Object.keys(receptionTrack).map(key => {
...@@ -189,17 +191,17 @@ export default { ...@@ -189,17 +191,17 @@ export default {
}) })
this.record.updatePreRecords({ receptionCustomerMaterialPointList }) this.record.updatePreRecords({ receptionCustomerMaterialPointList })
}, },
updateReceptionStatus (status) { updateReceptionStatus(status) {
this.record.updatePreRecords({ receptionStatus: status }) this.record.updatePreRecords({ receptionStatus: status })
}, },
getRecorder () { getRecorder() {
return this.record return this.record
}, },
async triggleTempNumber () { async triggleTempNumber() {
const _records = await this.record.getRecords() const _records = await this.record.getRecords()
this.setPerRecordNumber(_records.length) this.setPerRecordNumber(_records.length)
}, },
async isPermission (hintText = '为了记录语音通话,请打开录音权限') { async isPermission(hintText = '为了记录语音通话,请打开录音权限') {
const result = await permision.requestAndroidPermission('android.permission.RECORD_AUDIO') const result = await permision.requestAndroidPermission('android.permission.RECORD_AUDIO')
await helpler.sleep(0) await helpler.sleep(0)
if (result !== 1) { if (result !== 1) {
...@@ -210,13 +212,13 @@ export default { ...@@ -210,13 +212,13 @@ export default {
} }
return result === 1 return result === 1
}, },
async checkBeforeStart () { async checkBeforeStart() {
const isPermission = await this.isPermission() const isPermission = await this.isPermission()
const isRecording = this.audioManager.isRecording const isRecording = this.audioManager.isRecording
return isPermission && !isRecording return isPermission && !isRecording
} }
}, },
beforeDestroy () { beforeDestroy() {
this.stop() this.stop()
this.reset() this.reset()
} }
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
? item.goodsList[0].goodsName ? item.goodsList[0].goodsName
: "-" : "-"
}}</view> }}</view>
X{{ item.goodsList.length }}件 x {{ item.goodsList.length }}件
<image <image
class="image-look" class="image-look"
src="../../assets/images/boutique/look.png" src="../../assets/images/boutique/look.png"
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
:key="ind" :key="ind"
> >
<view class="label">{{ k.label }}</view> <view class="label">{{ k.label }}</view>
<view :class="{ value: true, bold: k.isBold }">{{ <view :class="['value text-hide',{bold: k.isBold}]">{{
k.format k.format
? formatTime(item[k.key]) ? formatTime(item[k.key])
: item[k.key] || "-" : item[k.key] || "-"
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<image <image
class="image-pay" class="image-pay"
:src=" :src="
require(`@/assets/images/boutique/pay_${item.payType}.png`) require(`@/assets/images/boutique/pay_${item.payType > 5 ? 5 : item.payType}.png`)
" "
/> />
</view> </view>
...@@ -465,6 +465,7 @@ export default { ...@@ -465,6 +465,7 @@ export default {
color: #999ea8; color: #999ea8;
.label { .label {
width: toRpx(160); width: toRpx(160);
flex-shrink: 0;
} }
.value { .value {
margin-left: toRpx(20); margin-left: toRpx(20);
......
<template> <template>
<!-- @start="$refs.customerTypeRef.open()" -->
<home-frame <home-frame
@preview="preview" @preview="preview"
@start="$refs.customerTypeRef.open()" @start="$refs.test.open()"
ref="home" ref="home"
:id="id" :id="id"
@openStep="openStep" @openStep="openStep"
...@@ -101,7 +102,8 @@ export default { ...@@ -101,7 +102,8 @@ export default {
icon: 'icon-customer-2' icon: 'icon-customer-2'
} }
]), ]),
loadComplete:false loadComplete: false,
requested: false
} }
}, },
onBackPress (options) { onBackPress (options) {
...@@ -114,11 +116,13 @@ export default { ...@@ -114,11 +116,13 @@ export default {
// 其他情况允许正常返回 // 其他情况允许正常返回
return false; return false;
}, },
onLoad () { async onLoad () {
await uni.$api.systemApi.getMockData(true) //获取APP配置信息
this.init(); this.init();
uni.$api.systemApi.getMockData(true) this.requested = true
this.$refs.home.updateApp(true)
}, },
onShow () { async onShow () {
const userInfo = uni.$storage.get("userInfo") const userInfo = uni.$storage.get("userInfo")
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) { if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm("userInfo"); uni.$storage.rm("userInfo");
...@@ -128,6 +132,7 @@ export default { ...@@ -128,6 +132,7 @@ export default {
}); });
return; return;
} }
if (this.requested && !this.id) this.$refs.home.updateApp()
}, },
computed: { computed: {
}, },
...@@ -207,7 +212,6 @@ export default { ...@@ -207,7 +212,6 @@ export default {
this.$store.state.user.boutiqueMediaConfig = boutiqueMediaConfig this.$store.state.user.boutiqueMediaConfig = boutiqueMediaConfig
this.$store.state.user.boutiqueCarList = boutiqueCarList this.$store.state.user.boutiqueCarList = boutiqueCarList
}).catch(error => { }).catch(error => {
console.log(error)
uni.hideLoading() uni.hideLoading()
uni.showToast({ uni.showToast({
title: error, title: error,
...@@ -238,8 +242,6 @@ export default { ...@@ -238,8 +242,6 @@ export default {
this.id = id; this.id = id;
this.tabId = tabId this.tabId = tabId
this.currentCarId = this.carBannerList[this.currentIndex].carModelId this.currentCarId = this.carBannerList[this.currentIndex].carModelId
console.log(id)
}, },
back () { back () {
if (!this.id) return uni.navigateBack(); if (!this.id) return uni.navigateBack();
...@@ -265,13 +267,14 @@ export default { ...@@ -265,13 +267,14 @@ export default {
this.clearHistory(); this.clearHistory();
this.recording = false this.recording = false
this.$refs.home.$refs.leftBox.getMessageInfo() this.$refs.home.$refs.leftBox.getMessageInfo()
if (this.requested) this.$refs.home.updateApp()
}, },
async start (before = true) { async start (before = true) {
const isPermision = await this.$refs.home.isPermission() const isPermision = await this.$refs.home.isPermission()
if (!isPermision) return false if (!isPermision) return false
uni.$logger.local.info('〖接待管理Recorder〗 == 开始接待 ') uni.$logger.local.info('〖接待管理Recorder〗 == 开始接待 ')
if (before) this.clearHistory(); if (before) this.clearHistory();
this.$refs.home.audioManager.start() this.$refs.home.startAudio(false)
this.recording = true this.recording = true
return true return true
}, },
......
const FORM_LIST = [
[
{
label: '销售顾问',
value: 'userInfo',
type: 'select',
key: 'staffName',
required: true,
showText: 'shopMerchantName'
},
{
label: '交付专员',
value: 'deliveryUserInfo',
type: 'select',
required: true,
key: 'staffName',
hidden: true,
showText: 'shopMerchantName'
},
{
label: '二级流量方',
value: 'subShopMerchantInfo',
type: 'select',
required: true,
key: 'subMerchantName',
hidden: true
},
{
label: '转化人员',
value: 'sellerUserInfo',
type: 'select',
key: 'staffName',
required: true,
showText: 'merchantName'
},
],
[
{
label: '车主姓名',
value: 'customer',
maxlength: '16',
type: 'input',
required: true
},
{
label: '客户来源',
value: 'salesType',
type: 'radio',
current: '0',
radioList: [
{
value: '0',
name: '售前'
},
{
value: '1',
name: '售后'
}
],
required: true
},
{
label: '性别',
value: 'customerSex',
type: 'radio',
current: '1',
radioList: [
{
value: '1',
name: '男'
},
{
value: '2',
name: '女'
}
]
},
{
label: '手机号',
value: 'customerPhone',
maxlength: '11',
type: 'input',
required: true
},
{
label: '选择车型',
value: 'carBrand',
type: 'select',
key: 'carInfo',
},
{
label: '车架号',
value: 'standNo',
maxlength: '17',
type: 'input'
},
{
label: '车牌号',
value: 'plateNumber',
maxlength: '8',
type: 'input'
},
{
label: '是否体验',
value: 'experienceFlag',
type: 'radio',
current: 'Y',
radioList: [
{
value: 'Y',
name: '是'
},
{
value: 'N',
name: '否'
}
]
},
],
[
{
label: '精品礼券',
value: 'couponInfo',
type: 'select',
key: 'name',
required: true
},
{
label: '请选择产品',
onlyLabel: true,
required: true,
noBorder: true
},
{
label: '前档',
value: 'user',
type: 'select',
key: 'name',
labellIcon: 'front-gear',
addHtml: 'product'
},
{
label: '前侧窗玻璃',
value: 'user',
type: 'select',
key: 'name',
labellIcon: 'front-window',
addHtml: 'product'
},
{
label: '后侧窗玻璃',
value: 'user',
type: 'select',
key: 'name',
labellIcon: 'rear-gear',
addHtml: 'product'
},
{
label: '后档',
value: 'user',
type: 'select',
key: 'name',
labellIcon: 'rear-window',
addHtml: 'product'
},
{
label: '天窗',
value: 'user',
type: 'select',
key: 'name',
labellIcon: 'sun-roof',
addHtml: 'product'
},
{
label: '套餐',
value: 'couponInfo',
type: 'select',
key: 'name',
required: true,
addHtml: 'package'
},
{
label: '精品礼券',
value: 'couponInfo',
type: 'select',
key: 'name',
required: true,
addHtml: 'product'
},
{
label: '收款方式',
value: 'payeeType',
type: 'radio',
key: 'name',
current: '0',
radioList: [
{
value: '0',
name: '嘀加收款'
},
{
value: '1',
name: '4s店收款'
}
],
},
{
label: '支付方式',
value: 'selectPayType',
type: 'radio',
key: 'name',
current: '0',
radioList: [
{
value: '3',
name: 'POS机'
},
{
value: '6',
name: '对公转账'
},
{
value: '7',
name: '其他收款'
}
],
addHtml: 'otherPay'
},
],
[
{
label: '备注',
value: 'remark',
maxlength: '100',
type: 'textarea',
placeholder: '请输入 (100字以内)',
class: 'cell-break'
},
]
]
const payType = [
{
value: '1',
name: '微信支付'
},
{
value: '2',
name: '线下收款'
},
{
value: '3',
name: 'POS机'
},
{
value: '4',
name: '支付宝支付'
},
{
value: '5',
name: '嘀加收款'
},
{
value: '6',
name: '对公转账'
},
{
value: '7',
name: '其他收款'
}
]
const popupTypeEnum = {
0: 'userInfo',
1: 'deliveryUserInfo',
2: 'subShopMerchantInfo',
3: 'sellerUserInfo',
4: 'carBrand'
}
export {
FORM_LIST,
popupTypeEnum,
payType
}
\ No newline at end of file \ No newline at end of file
...@@ -53,7 +53,8 @@ export default { ...@@ -53,7 +53,8 @@ export default {
recording: false, recording: false,
aitoCarModelIds: [], aitoCarModelIds: [],
mediaId: '', mediaId: '',
loadComplete: false loadComplete: false,
requested: false
} }
}, },
computed: { computed: {
...@@ -82,14 +83,15 @@ export default { ...@@ -82,14 +83,15 @@ export default {
}, },
async onLoad () { async onLoad () {
const mockdata = await uni.$api.systemApi.getMockData(true) //获取APP配置信息 const mockdata = await uni.$api.systemApi.getMockData(true) //获取APP配置信息
if(this.channelType == 1 && mockdata.boutiqueDefaultCarBrandId) { if (this.channelType == 1 && mockdata.boutiqueDefaultCarBrandId) {
this.$store.state.user.boutiqueDefaultCarBrandId = mockdata.boutiqueDefaultCarBrandId //默认车辆品牌 this.$store.state.user.boutiqueDefaultCarBrandId = mockdata.boutiqueDefaultCarBrandId //默认车辆品牌
if(mockdata.defaultCarId) this.$store.state.user.defaultCarId = mockdata.defaultCarId //默认车系 if (mockdata.defaultCarId) this.$store.state.user.defaultCarId = mockdata.defaultCarId //默认车系
} }
this.get_Vehicle_Sales_Data() this.get_Vehicle_Sales_Data()
this.requested = true
this.$refs.home.updateApp(true)
}, },
onShow () { async onShow () {
const userInfo = uni.$storage.get('userInfo') const userInfo = uni.$storage.get('userInfo')
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) { if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm('userInfo') uni.$storage.rm('userInfo')
...@@ -105,6 +107,7 @@ export default { ...@@ -105,6 +107,7 @@ export default {
...mapMutations('audio', ['setReceptionStatus']), ...mapMutations('audio', ['setReceptionStatus']),
init () { init () {
this.findPayInfo() this.findPayInfo()
if (this.requested && !this.id) this.$refs.home.updateApp()
}, },
/**获取车型&销售数据 */ /**获取车型&销售数据 */
get_Vehicle_Sales_Data () { get_Vehicle_Sales_Data () {
......
...@@ -48,7 +48,8 @@ class Track { ...@@ -48,7 +48,8 @@ class Track {
const recordList = uni.getStorageSync('TRACK_LIST') || [] const recordList = uni.getStorageSync('TRACK_LIST') || []
if (recordList.length) { if (recordList.length) {
const res = await uni.$api.commonApi.recordInsert({ recordList }) const res = await uni.$api.commonApi.recordInsert({ recordList })
if (res) uni.setStorageSync('TRACK_LIST', []) if (res)
uni.setStorageSync('TRACK_LIST', [])
} }
} }
} }
......
...@@ -40,8 +40,8 @@ export const STORAGE_OBJECTKEY = { ...@@ -40,8 +40,8 @@ export const STORAGE_OBJECTKEY = {
leadPage: 'leadPage', leadPage: 'leadPage',
recordTrackList: 'recordTrackList', recordTrackList: 'recordTrackList',
beisenToken: 'beisenToken', beisenToken: 'beisenToken',
messagePopShownDate: 'messagePopShownDate',
noticeTopInfo: 'noticeTopInfo', noticeTopInfo: 'noticeTopInfo',
studyCenterPermission: 'studyCenterPermission', studyCenterPermission: 'studyCenterPermission',
caseInfo: 'caseInfo', caseInfo: 'caseInfo',
boutique_YQorderSetting: 'boutique_YQorderSetting'
} }
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: 1.0.0 * @version: 1.0.0
* @Author: limin * @Author: limin
* @Date: 2025-01-02 18:49:17 * @Date: 2025-01-02 18:49:17
* @LastEditors: 前端 qianduan01@didihu.com.cn * @LastEditors: limin
* @LastEditTime: 2025-04-11 15:59:20 * @LastEditTime: 2025-08-12 10:23:15
* @FilePath: \gl_tape\utils\recordManager\TempRecord.js * @FilePath: \gl_tape\utils\recordManager\TempRecord.js
*/ */
import utils from '../utils' import utils from '../utils'
...@@ -91,6 +91,17 @@ class TempRecord { ...@@ -91,6 +91,17 @@ class TempRecord {
record = null record = null
uni.$logger.local.info('〖接待记录Record〗 == 置空接待记录') uni.$logger.local.info('〖接待记录Record〗 == 置空接待记录')
} }
/**
* 清除已保存的录音文件
* @param {Object} options - 配置参数
* @param {Array} options.recordUrlList - 录音文件列表,默认为当前记录的recordUrlList
*/
clearSavedFiles({ recordUrlList = [] } = this.record) {
// 遍历录音文件列表并删除每个文件
recordUrlList.forEach(item => {
this.removeFile(item.file)
})
}
async __analysisUrlList(recordUrlList) { async __analysisUrlList(recordUrlList) {
if (!recordUrlList?.length) return [] if (!recordUrlList?.length) return []
try { try {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!