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 = {
...data
})
},
// 权益提单相关接口
// 查询店铺配置
getShopMerchantPointConfig(data) {
return http.post({
method: 'dj.api.smartcarlife.shopMerchantPointConfig.get',
projectName: 'boutique',
...data
})
},
/** 根据订单状态统计订单数*/
statByStatus(data) {
return http.post({
......@@ -123,6 +132,14 @@ module.exports = {
...data
})
},
// 根据4s店商户好获取二级流浪方列表
getSubShopMerchantList(data) {
return http.post({
method: 'dj.api.smartcarlife.diversionMerchant.getDiversionMerchantRef',
projectName: 'boutique',
...data
})
},
/**搜索订单(含套餐) */
getWorkPackageGoodsList(data) {
return http.post({
......@@ -131,6 +148,22 @@ module.exports = {
...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) {
return http.post({
......
......@@ -32,4 +32,25 @@ module.exports = {
...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
......@@ -154,7 +154,7 @@
.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);}
.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);
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);
......@@ -254,7 +254,7 @@
.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);}
.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);
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);
......@@ -292,7 +292,7 @@
.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);}
.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);
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);
......@@ -306,7 +306,7 @@
.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);}
.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);
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);
......@@ -340,4 +340,6 @@
.icon-yw-icon { width: calc(100vmin * (1173 / 768) * 0.015345268542199489); height: calc(100vmin * (1173 / 768) * 0.015345268542199489);
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);
background-position: calc(100vmin * (1173 / 768) * -0.06010230179028133) calc(100vmin * (1173 / 768) * -0.6530264279624893);}
\ No newline at end of file
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

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>
<view>
<view v-for="(items, boxIdx) in formList" :key="boxIdx">
<view class="cell-box">
<view v-for="(item, idx) in items" :key="idx" class="cell" @click="onCellClick(item)" :class="[
item.noBorder ? '' : 'border',
item.onlyLabel ? 'small-height' : '',
item.class
]">
<view :class="['cell-label', { 'only-label': item.onlyLabel }]">
<view v-if="item.labellIcon" :class="['sprite-icon', `icon-${item.labellIcon}`]"></view>
{{ item.label }}
<view v-if="item.required" class="required">*</view>
</view>
<view class="cell-value">
<!-- 输入框 -->
<template v-if="item.type === 'input'">
<view class="input-box">
<input class="input-value" v-model="formData[item.value]" :placeholder="item.placeholder || '请输入'"
:maxlength="item.maxlength || 500" />
<view v-if="item.valueIcon" :class="['sprite-icon', `icon-${item.valueIcon}`]" @click="onValueClick(item)"></view>
</view>
</template>
<!-- 下拉选择 -->
<template v-else-if="item.type === 'select'">
<view v-if="formData[item.value] && formData[item.value][item.key]" class="value">
{{ formData[item.value][item.key] }}
<view v-for="(item, idx) in items" :key="idx" class="cell-row">
<view class="cell" @click="onCellClick(item)" :class="[
item.noBorder ? '' : 'border',
item.onlyLabel ? 'small-height' : '',
item.class
]">
<template v-if="!item.hidden">
<view :class="['cell-label', { 'only-label': item.onlyLabel }]">
<view v-if="item.labellIcon" :class="['sprite-icon', `icon-${item.labellIcon}`]"></view>
{{ item.label }}
<view v-if="item.required" class="required">*</view>
</view>
<view v-else class="placeholder value">
请选择
<view class="sprite-icon icon-icon-select"></view>
<view class="cell-value">
<!-- 输入框 -->
<template v-if="item.type === 'input'">
<view class="input-box">
<input class="input-value" v-model="formData[item.value]" :placeholder="item.placeholder || '请输入'"
:maxlength="item.maxlength || 500" />
<view v-if="item.valueIcon" :class="['sprite-icon', `icon-${item.valueIcon}`]"
@click="onValueClick(item)"></view>
</view>
</template>
<!-- 下拉选择 -->
<template v-else-if="item.type === 'select'">
<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] }}
</template>
<template v-else>
<span class="placeholder">请选择</span>
</template>
<view class="sprite-icon icon-icon-select"></view>
</view>
</template>
<!-- 单选框 -->
<template v-else-if="item.type === 'radio'">
<radio-group class="radio-group value" @change="onRadioChange($event, item)">
<label class="uni-list-cell uni-list-cell-pd" v-for="radio in item.radioList"
:key="radio.value + item.value">
<radio style="transform:scale(0.7)" :value="radio.value" :checked="radio.value == item.current" />
<view class="radio-name">{{ radio.name }}</view>
</label>
</radio-group>
</template>
<!-- 多行文本 -->
<template v-else-if="item.type === 'textarea'">
<textarea class="textarea" v-model="formData[item.value]" :placeholder="item.placeholder || '请输入'"
placeholder-class="textarea-placeholder" confirm-type="done" auto-height
:maxlength="item.maxlength"></textarea>
</template>
</view>
</template>
<!-- 单选框 -->
<template v-else-if="item.type === 'radio'">
<radio-group class="radio-group value" @change="onRadioChange($event, item)">
<label class="uni-list-cell uni-list-cell-pd" v-for="radio in item.radioList"
:key="radio.value + item.value">
<radio style="transform:scale(0.7)" :value="radio.value" :checked="radio.value == item.current" />
<view class="radio-name">{{ radio.name }}</view>
</label>
</radio-group>
</template>
<!-- 多行文本 -->
<template v-else-if="item.type === 'textarea'">
<textarea class="textarea" v-model="formData[item.value]" :placeholder="item.placeholder || '请输入'"
placeholder-class="textarea-placeholder" confirm-type="done" auto-height
:maxlength="item.maxlength"></textarea>
</template>
</view>
<slot v-if="item.addHtml" :name="item.addHtml"></slot>
</view>
</view>
</view>
......@@ -62,7 +72,7 @@ export default {
/**
* noBorder:默认false:有下边框,true:无下边框
* onlyLabel:判断是否只有label,默认false,主要是为了做样式区分
* class:cell-row:不一行显示,主要用于文本域
* class:cell-break:不一行显示,主要用于文本域
* required:是否为必填项,添加星号
* value: 绑定的字段名称
* key:如果绑定的字段名称为对象,则需要传入需要显示在页面上的属性名
......@@ -80,6 +90,14 @@ export default {
default: () => ({})
}
},
data() {
return {
userInfo: {}
}
},
mounted() {
this.userInfo = uni.$storage.get('userInfo') || {}
},
methods: {
onCellClick(item) {
if (item.type === 'select') {
......@@ -103,18 +121,20 @@ export default {
overflow: hidden;
margin-bottom: toRpx(18);
}
.cell-row {
padding-left: toRpx(32);
}
.cell {
display: flex;
align-items: center;
padding: 0 toRpx(32);
padding-right: toRpx(32);
height: toRpx(96);
&.small-height {
height: toRpx(72);
}
&.cell-row {
&.cell-break {
flex-direction: column;
align-items: normal;
height: auto;
......@@ -130,6 +150,7 @@ export default {
font-size: toRpx(28);
display: flex;
align-items: center;
.sprite-icon {
margin-right: toRpx(8);
}
......@@ -146,12 +167,12 @@ export default {
}
}
.cell-row .cell-label {
.cell-break .cell-label {
height: toRpx(96);
line-height: toRpx(96);
}
.cell-row .cell-value {
.cell-break .cell-value {
width: 100%;
margin-left: 0;
}
......@@ -178,15 +199,18 @@ export default {
align-items: center;
height: 100%;
}
.input-box {
display: flex;
align-items: center;
justify-content: flex-end;
height: 100%;
.sprite-icon {
margin-left: toRpx(8);
}
}
.input-value {
height: 100%;
text-align: right;
......@@ -212,7 +236,7 @@ export default {
display: inline-block;
}
.textarea {
width: 100%;
......
......@@ -124,6 +124,7 @@ export default {
uni.$storage.rm("noSignInUuid");
uni.$storage.rm("beisenToken");
uni.$storage.rm("studyCenterPermission");
uni.$storage.rm("boutique_YQorderSetting")
setTimeout(() => {
uni.hideLoading()
uni.reLaunch({
......
......@@ -229,7 +229,6 @@ export default {
mounted () {
const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo
this.checkVersion()
permision.requestAndroidPermission('android.permission.RECORD_AUDIO') // 进入界面时检查权限
},
provide () {
......@@ -397,6 +396,10 @@ export default {
})
this.$emit('start')
},
async updateApp (requested = false) {
if (!requested) await uni.$api.systemApi.getMockData(true)
this.checkVersion()
},
async entranceClick (item) {
// if (item.name != 'DailyReport' && (await this.checkDailyReport() || await this.inspectionOfProhibitionBill())) return
uni.navigateTo({
......
......@@ -5,7 +5,7 @@
scroll-y
:scroll-into-view="letter"
>
<template v-for="(i, index) in list">
<template v-for="(i, index) in (searchStatus ? searchList : list)">
<view
class="item-box"
:key="index"
......@@ -18,26 +18,22 @@
:key="cindex"
>
<view class="brand-name">{{c.name}}</view>
<template v-for="(j, jindex) in c.childs">
<view
class="brand-list"
:key="jindex"
>
<view class="sub-brand-name">{{j.name}}</view>
<view class="car-model-list">
<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 class="brand-list">
<template v-for="(j, jindex) in c.childs_list">
<view
: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="sprite-icon icon-tag-checked" v-if="!j.isTitle"></view>
{{j.name}}
</view>
</view>
</template>
</template>
</view>
</view>
</template>
......@@ -67,29 +63,35 @@ export default {
list: [],
currentId: '',
searchList: [],
letter: 'A'
letter: 'A',
searchStatus: false,
}
},
props: {
params: Object,
data: Object,
apiData: Array
},
mounted () {
},
methods: {
async getList () {
const { userInfo, apiData } = this
async getList (searchValue) {
const { userInfo, params } = this,
{ cacheData } = params
this.currentId = ''
if (apiData && apiData.length) {
this.list = apiData
if (cacheData && cacheData.length) {
this.initCarList(cacheData)
if (searchValue) this.handleSearch(searchValue)
return
}
const { shopMerchantId } = userInfo,
data = await uni.$api.popupApi.getMerchantCarBrandList({
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) {
let { params: { idKey }, data: { customer } } = this,
......@@ -104,7 +106,7 @@ export default {
c.childs.map((s) => {
s.carChildsBrandId = c.id;
s.carChildsBrandName = c.name;
if (customer[idKey]) {
if (customer && customer[idKey]) {
if (s.id == customer[idKey]) {
s.active = true;
this.letter = i.letter;
......@@ -129,14 +131,55 @@ export default {
list,
}
})
console.log(carModelList)
this.list = carModelList
this.$emit('update:apiData', carModelList)
},
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) {
if (that.isTitle) return
let chooseItem = {
carBrandId: item.id,
carBrand: item.name,
......@@ -186,22 +229,26 @@ export default {
color: #333333;
font-size: 32rpx;
line-height: 44rpx;
margin-top: 16rpx;
margin: 16rpx 0;
}
.sub-brand-name {
margin: 16rpx 0;
color: #888888;
font-size: 28rpx;
line-height: 40rpx;
width: 100%;
flex-shrink: 0;
}
}
}
.car-model-list {
display: grid;
grid-template-columns: repeat(4, 1fr);
.brand-list {
// display: grid;
// grid-template-columns: repeat(4, 1fr);
gap: 32rpx;
display: flex;
// gap: 32rpx 0;
flex-wrap: wrap;
.item {
width: calc((100% - 96rpx) / 4);
justify-content: center;
height: 72rpx;
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
......@@ -26,17 +26,16 @@ export default {
props: {
params: Object,
data: Object,
apiData: Array
},
mounted () {
},
methods: {
async getList () {
const { userInfo, apiData } = this,
{ shopMerchantId } = userInfo
const { userInfo: { shopMerchantId }, params } = this,
{ cacheData } = params
this.currentId = ''
if (apiData && apiData.length) {
this.list = apiData
if (cacheData && cacheData.length) {
this.list = cacheData
return
}
const data = await uni.$api.popupApi.getDiversionMerchantRef({
......@@ -44,7 +43,8 @@ export default {
})
if (data && data.length) {
this.list = data
this.$emit('update:apiData', data)
params.cacheData = data
this.$emit('update:params', params)
}
},
choose (i) {
......
......@@ -26,16 +26,17 @@ export default {
props: {
params: Object,
data: Object,
apiData: Array
cacheData: Array
},
mounted () {
},
methods: {
async getList (searchValue) {
const { userInfo, params, apiData } = this
async getList (searchValue, search) {
const { userInfo, params } = this,
{ cacheData } = params
this.currentId = ''
if (apiData && apiData.length) {
this.list = apiData
if (!search && cacheData && cacheData.length) {
this.list = cacheData
return
}
const { shopMerchantId, sceneType, merchantId } = userInfo,
......@@ -46,12 +47,13 @@ export default {
})
if (data && data.length) {
this.list = data
if (!searchValue) this.$emit('update:apiData', data)
params.cacheData = data
this.$emit('update:params', params)
}
},
handleSearch (searchValue) {
this.list = []
this.getList(searchValue)
this.getList(searchValue, true)
},
choose (i) {
this.currentId = i.uuid
......
/**
* popupType
* 0:销售顾问/录单员
* 1:交付专员
* 2:二级流量方
......@@ -37,13 +38,20 @@ const componentConfig = {
placeholder: '查找',
idKey: 'carSeriesId'
},
5: {
name: 'CouponList',
title: '选择礼券',
placeholder: '查找',
idKey: 'customerCouponCode'
}
}
import EmployeeList from './components/EmployeeList.vue'
import DiversionMerchant from './components/DiversionMerchant.vue'
import CarModelList from './components/CarModelList.vue'
import CouponList from './components/CouponList.vue'
export default {
data(){
data () {
return {
componentConfig
}
......@@ -51,6 +59,7 @@ export default {
components: {
EmployeeList,
DiversionMerchant,
CarModelList
CarModelList,
CouponList
},
}
\ No newline at end of file
......@@ -25,11 +25,20 @@
type="text"
:placeholder="componentObject.placeholder || '请输入'"
placeholder-class="placeholder"
v-model="searchValue"
v-model="componentObject.searchValue"
confirm-type="search"
@confirm="handleSearch"
>
<view
class="clear flex"
@click="clear"
>
<uni-icons
type="closeempty"
size="16"
v-if="componentObject.searchValue"
></uni-icons>
</view>
</view>
</template>
<view :class="['popup-body',{ 'hide-search' :componentObject.hideSearch}]">
......@@ -39,11 +48,10 @@
>
<component
:is="componentObject.name"
:params="componentObject"
:params.sync="componentObject"
:data="data"
ref="componentRef"
@choose="chooseContent = $event"
:apiData.sync="apiData"
></component>
</scroll-view>
......@@ -92,6 +100,7 @@ export default {
type: Object,
default: () => ({})
},
externalData: null
},
provide () {
return {
......@@ -101,23 +110,26 @@ export default {
data () {
return {
position: 'bottom',
searchValue: '',
chooseContent: null,
apiData: null
componentObject: null,
}
},
watch: {
popupType: {
handler (val) {
// console.log(val)
this.componentObject = this.componentConfig[this.popupType]
},
deep: true,
immediate: true
},
externalData: {
handler (val) {
if (val && this.componentObject) this.componentObject.cacheData = val
},
deep: true,
}
},
computed: {
componentObject () {
return this.componentConfig[this.popupType]
},
title () {
return this.componentConfig[this.popupType].title
},
......@@ -146,7 +158,7 @@ export default {
initPopupData () {
let componentRef = this.componentRef()
if (!componentRef) setTimeout(this.initPopupData, .1e3)
else componentRef.getList && componentRef.getList()
else componentRef.getList && componentRef.getList(this.componentObject.searchValue)
},
handleSearch () {
let componentRef = this.componentRef()
......@@ -154,16 +166,22 @@ export default {
title: '请稍后再试',
icon: 'none'
})
else componentRef.handleSearch(this.searchValue)
else componentRef.handleSearch(this.componentObject.searchValue)
},
confirm () {
let { chooseContent } = this
let { chooseContent, popupType } = this
if (chooseContent) {
this.$emit('onConfirm', chooseContent)
this.$emit('onConfirm', {
chooseContent,
popupType
})
this.$refs.popup.close()
}
},
clear () {
this.componentObject.searchValue = ''
this.handleSearch()
}
}
}
</script>
......@@ -195,6 +213,7 @@ export default {
border-radius: 40rpx;
background: #f5f7fa;
margin: 0 48rpx;
position: relative;
.input {
height: 100%;
width: 100%;
......@@ -212,13 +231,20 @@ export default {
&::after {
display: block;
content: '\e654';
margin-left: 16rpx;
margin-left: 8rpx;
height: 100%;
display: flex;
align-items: center;
font-size: 36rpx;
}
}
.clear {
position: absolute;
right: 0;
top: 0;
height: 100%;
padding: 0 48rpx;
}
}
.popup-body {
height: calc(100% - 392rpx);
......
......@@ -258,6 +258,7 @@ export default {
let { blockX, ismove } = this
let pageX = e.changedTouches[0].pageX
let nums = ismove - pageX
if(nums == 0) return
if (!(nums > 50 || blockX < -30) || !(nums < -50 || blockX > 30)) {
this.viewX = -10
setTimeout(() => {
......
/*
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2024-12-26 10:03:54
* @LastEditors: yangming@didihu.com.cn yangming@didihu.com.cn
* @LastEditTime: 2025-04-15 17:59:20
* @LastEditors: limin
* @LastEditTime: 2025-08-12 10:32:25
* @FilePath: \gl_tape\mixin\record\recorder.js
* @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'
import { storageApi } from '@/utils/cache'
import permision from '@/js_sdk/wa-permission/permission.js'
export default {
provide () {
provide() {
return {
getRecorder: () => this.record
}
},
async mounted () {
async mounted() {
this.audioManager = new AudioManager(this.onAudioStart, this.onAudioStop, this.onError)
this.initDto()
this.record = new TempRecord(this.tempRecord, this.triggleTempNumber)
......@@ -35,23 +35,23 @@ export default {
// deep: true
// },
customerKey: {
handler () {
handler() {
this.handler(this.customerInfo, this.updateCustomerInfo)
},
deep: true
},
booksList: {
handler (val) {
handler(val) {
this.handler(val, this.updateBookList)
}
},
receptionStatus: {
handler (val) {
handler(val) {
this.handler(val, this.updateReceptionStatus)
}
},
receptionKey: {
handler (val) {
handler(val) {
this.handler(this.receptionTrack, this.updateMaterialPointList)
}
}
......@@ -64,28 +64,28 @@ export default {
...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setPerRecordNumber']),
...mapMutations(['clearCustomerInfo']),
//开始录音
startAudio: utils.throttle(async function () {
startAudio: utils.throttle(async function (isInitData = true) {
const isPermission = await this.checkBeforeStart()
if (!isPermission) return
uni.$logger.local.info('〖接待管理Recorder〗 == 开始接待 ')
this.initReception()
isInitData && this.initReception()
this.initTime()
this.audioManager.start()
}, 300),
initReception () {
initReception() {
this.setBooks([])
this.clearCustomerInfo()
this.setReceptionStatus('')
this.initTime()
},
async onAudioStart () {
async onAudioStart() {
if (this.audioManager.counter === 0) {
await this.record.add()
} else {
this.record.addAudio()
}
},
async onAudioStop () {
async onAudioStop() {
if (this.audioManager.isRecording) {
uni.$logger.local.info('〖接待管理Recorder〗 == 接待中,再次开启录音! ')
this.audioManager.start()
......@@ -93,7 +93,7 @@ export default {
uni.$logger.local.info('〖接待管理Recorder〗 == 断开录音! ')
}
},
onAudioError (error) {
onAudioError(error) {
const message = error.message
this.reportError(`录音异常: error: ${message}`, message)
},
......@@ -102,38 +102,40 @@ export default {
* @params {boolean} status true 不保存记录/AUDIO_STATUS.ABNORMAL 只要断开录音
* @returns {void}
*/
async stopAudio (isNotSave = false) {
async stopAudio(isNotSave = false) {
uni.$logger.local.info('〖接待管理Recorder〗 == 结束接待! ')
this.stop()
await this.saveAndClearRecord(isNotSave)
},
async saveAndClearRecord (isNotSave = false) {
async saveAndClearRecord(isNotSave = false) {
if (isNotSave) {
uni.$logger.local.info('〖接待管理Recorder〗 == 不保存记录! ')
return this.record.clearLocalRecord()
this.record.clearSavedFiles()
this.record.clearLocalRecord()
return
}
this.record.setReceptionEndTime() //设置接待结束时间
//如果不需要保存记录
await this.record.save()
},
stop () {
stop() {
this.endWatchClick()
this.record.clearLoopTimer()
if (this.audioManager.isRecording) {
this.audioManager.stop()
}
},
handler (params, fn) {
handler(params, fn) {
if (this.audioManager.isRecording || this.record?.currentRecord?.endReasonType == 1) {
fn.call(this, params)
}
},
reset () {
reset() {
this.audioManager = null
this.record = null
this.tempRecord = null
},
initDto () {
initDto() {
const { shopMerchantId, phone, sceneType, uuid, name, merchantId, channelType, merchantName } = storageApi.getUserInfo()
const { deviceId: appCode } = uni.getDeviceInfo()
const dto = new RecordDto({
......@@ -146,12 +148,12 @@ export default {
merchantId: shopMerchantId,
merchantName,
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.tempRecord = dto
},
updateCustomerInfo (customerInfo = {}) {
updateCustomerInfo(customerInfo = {}) {
const { customerName, phoneNumber, salesUuid, carModel, staffName: salesName, carBrand, carBrandId, oneCarBrand, oneCarBrandId } = customerInfo
this.record.updatePreRecords({
customerName,
......@@ -165,7 +167,7 @@ export default {
oneCarBrandId
})
},
updateBookList (booksList) {
updateBookList(booksList) {
const receptionCustomerPaySourceList = booksList.map(item => {
return {
id: item.id,
......@@ -175,7 +177,7 @@ export default {
})
this.record.updatePreRecords({ receptionCustomerPaySourceList })
},
updateMaterialPointList (receptionTrack) {
updateMaterialPointList(receptionTrack) {
const { merchantId, staffUuid, staffName } = this.tempRecord
let receptionCustomerMaterialPointList = []
Object.keys(receptionTrack).map(key => {
......@@ -189,17 +191,17 @@ export default {
})
this.record.updatePreRecords({ receptionCustomerMaterialPointList })
},
updateReceptionStatus (status) {
updateReceptionStatus(status) {
this.record.updatePreRecords({ receptionStatus: status })
},
getRecorder () {
getRecorder() {
return this.record
},
async triggleTempNumber () {
async triggleTempNumber() {
const _records = await this.record.getRecords()
this.setPerRecordNumber(_records.length)
},
async isPermission (hintText = '为了记录语音通话,请打开录音权限') {
async isPermission(hintText = '为了记录语音通话,请打开录音权限') {
const result = await permision.requestAndroidPermission('android.permission.RECORD_AUDIO')
await helpler.sleep(0)
if (result !== 1) {
......@@ -210,13 +212,13 @@ export default {
}
return result === 1
},
async checkBeforeStart () {
async checkBeforeStart() {
const isPermission = await this.isPermission()
const isRecording = this.audioManager.isRecording
return isPermission && !isRecording
}
},
beforeDestroy () {
beforeDestroy() {
this.stop()
this.reset()
}
......
<template>
<view
class="layout"
@click="hideSelect"
>
<view class="layout">
<view class="bg"></view>
<wnCanvas
:canvasId="`c-${madiaId}`"
......@@ -15,31 +12,6 @@
<view class="layout-content">
<view class="box">
<view class="select-box">
<view
class="select"
@click.stop="selectType"
>
{{selectIndex}}
<view class="sprite-icon icon-arrow-bottom"></view>
</view>
<view
class="pop-box"
v-show="isSelect"
>
<view
v-for="i in selectList"
:key="i.label"
class="type-item"
:class="i.value == selectIndex ? 'active' : ''"
@click="chooseType(i)"
>{{i.label}}</view>
<!-- <view class="type-item active">全部</view>
<view class="type-item">视频</view>
<view class="type-item">图片</view>
<view class="type-item">PDF</view> -->
</view>
</view>
<view class="input-box">
<input
type="text"
......@@ -51,7 +23,7 @@
/>
<view
class="input-tips"
v-if="!isSearch"
v-if="!isSearch && !name"
>搜索图片/视频名称<uni-icons
type="search"
class="icon"
......@@ -59,7 +31,7 @@
size="20"
></uni-icons></view>
<uni-icons
v-if="isSearch"
v-if="name"
type="closeempty"
class="close"
color="#999"
......@@ -67,48 +39,83 @@
size="20"
></uni-icons>
</view>
<scroll-view
class="record-box"
scroll-y
:scroll-top="scrollTop"
>
<view class="list">
<template v-if="list.length">
<template v-for="item in list">
<view class="content-box">
<scroll-view
class="scroll-box"
scroll-x
enable-flex
>
<view class="classif-box flex">
<template v-for="(i,index) in caseMaterials">
<view
class="item"
:key="item.id"
:class="['first-item classif-item flex',{'classif-active':carModelName == i.label}]"
:key="index"
@click="carModelName = i.label"
>
{{i.label}}
</view>
</template>
</view>
</scroll-view>
<scroll-view
class="scroll-box"
enable-flex
scroll-x
>
<view class="classif-box flex">
<template v-for="(i,index) in secondClassifList">
<view
:class="['second-item classif-item flex',{'classif-active second-ative':category == i}]"
:key="index"
@click="category = i"
>
{{i}}
</view>
</template>
</view>
</scroll-view>
<scroll-view
class="record-box"
scroll-y
>
<view class="list">
<template v-if="list.length">
<template v-for="item in list">
<view
class="item-autio"
@click="playVideo(item)"
class="item"
:key="item.id"
>
<image
:src="item.thumbnailUrl"
class="cover-box"
></image>
<image
v-if="item.materialFormat == 1"
src="../../assets/images/boutique/play.png"
class="play-box"
></image>
<view
class="item-autio"
@click="playVideo(item)"
>
<image
:src="item.thumbnailUrl"
class="cover-box"
></image>
<image
v-if="item.materialFormat == 1"
src="../../assets/images/boutique/play.png"
class="play-box"
></image>
</view>
<view class="item-desc">{{ item.name }}</view>
</view>
<view class="item-desc">{{ item.name }}</view>
</template>
</template>
<template v-else>
<view class="nothing flex">
<image
class="icon"
src="../../assets/images/home/nothing.webp"
/>
暂无数据
</view>
</template>
</template>
<template v-else>
<view class="nothing flex">
<image
class="icon"
src="../../assets/images/home/nothing.webp"
/>
暂无数据
</view>
</template>
</view>
</scroll-view>
</view>
<view class="list-bottom-mask"></view>
</scroll-view>
</view>
</view>
</view>
</template>
......@@ -149,22 +156,14 @@ export default {
return {
name: '',
list: [],
searchList: [],
popupShow: false,
isSearch: false,
videoSrc: '',
isSelect: false,
selectIndex: '全部',
selectList: [
{
label: '全部',
value: '全部'
},
],
scrollTop: 0,
startDate: '',
endDate: '',
userInfo: {}
userInfo: {},
carModelName: '',
category: '',
caseMaterials: []
}
},
props: {
......@@ -176,35 +175,47 @@ export default {
watchStatus () {
return this.$store.state.user.historyStatus
},
secondClassifList () {
let { caseMaterials, carModelName } = this,
item = {}
if (caseMaterials.length) item = caseMaterials.find(e => e.label == (!carModelName ? caseMaterials[0].label : carModelName))
return item?.cases || []
}
},
watch: {
watchStatus: {
show: {
handler (newValue) {
if (newValue) {
this.init()
this.getCaseTags()
} else this.handleLeavePage()
},
immediate: true
},
carModelName: {
handler (val) {
this.selectIndex = '全部'
// this.name = '';
// this.isSearch = false
// this.list = this.views
// this.init()
let { caseMaterials } = this
if (caseMaterials.length && val) {
this.category = this.secondClassifList[0]
}
},
immediate: true
},
show: {
handler (newValue) {
if (newValue) this.init()
if (!newValue) this.handleLeavePage()
category: {
handler (val) {
if (val) this.getCaseList()
},
immediate: true
}
},
},
mounted () {
mounted () {
const userInfo = uni.$storage.get("userInfo")
this.userInfo = userInfo
this.init()
this.getCategory()
},
methods: {
// 离开页面时上传埋点并清空缓存
async handleLeavePage() {
async handleLeavePage () {
try {
const caseInfo = uni.$storage.get("caseInfo")
if (caseInfo && caseInfo.length > 0) {
......@@ -219,7 +230,6 @@ export default {
// 埋点
async sendData (params) {
const { shopMerchantId, sceneType, uuid, name } = this.userInfo
const { startDate, endDate } = this
const default_params = {
merchantId: shopMerchantId,
businessScene: sceneType,
......@@ -252,10 +262,9 @@ export default {
},
// 上传埋点
async uploadData (caseInfo) {
// const caseInfo = uni.$storage.get("caseInfo")
if (caseInfo && caseInfo.length > 0) {
await uni.$api.boutiqueApi.caseVideoCenter({receptionCustomerMaterialPointList:caseInfo})
await uni.$api.boutiqueApi.caseVideoCenter({ receptionCustomerMaterialPointList: caseInfo })
}
},
playVideo (item) {
......@@ -269,67 +278,81 @@ export default {
},
focus () {
this.isSearch = true
},
init () {
this.name = '';
this.searchValue = ''
this.isSelect = false
setTimeout(() => {
this.isSearch = false
// this.list = this.views
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex)
}, 300);
},
handleClear () {
this.name = ''
this.searchValue = ''
this.isSearch = false
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex)
this.getCaseTags()
this.clearCanvas()
},
input (e) {
this.name = e.detail.value
if (this.name == '')
this.isSearch = false
// this.list = this.searchList.filter(i => i.name.includes(this.name))
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex, this.name)
let { value } = e.detail
this.isSearch = false
if (this.searchValue == value) return
this.searchValue = value
this.getCaseTags()
this.clearCanvas()
},
selectType () {
this.isSelect = !this.isSelect
},
hideSelect () {
this.isSelect = false
},
chooseType (val) {
this.selectIndex = val.value
this.isSelect = false
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex, this.name)
this.clearCanvas()
async getCaseList () {
try {
uni.showLoading({
mask: true
})
this.list = []
let { searchValue, carModelName, category } = this
const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo; // 44217687
const params = {
merchantId: shopMerchantId,
carModelName: carModelName,
category: category
}
if (searchValue) params.materialName = searchValue
const { list } = await uni.$api.boutiqueApi.getCaseList(params)
uni.hideLoading()
if (list && list.length) this.list = list
} catch (error) {
uni.hideLoading()
}
},
async getCaseList (category = '', name = '') {
async getCaseTags () {
this.carModelName = ''
this.category = ''
let { searchValue } = this
const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo; // 44217687
const params = { merchantId: shopMerchantId, category }
if (name) params.materialName = name
const res = await uni.$api.boutiqueApi.getCaseList(params)
this.list = res.list
this.searchList = res.list
this.scrollTop = 1
setTimeout(() => {
this.scrollTop = 0
}, 100);
},
async getCategory () {
const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo;
const res = await uni.$api.boutiqueApi.getCategory({ merchantId: shopMerchantId })
const _list = res.map(item => {
return {
label: item,
value: item
}
})
this.selectList = [...this.selectList, ..._list]
const params = { merchantId: shopMerchantId }
if (searchValue) params.materialName = searchValue
const { list } = await uni.$api.boutiqueApi.getCaseList(params)
if (list && list.length) {
let arr = Array.from(new Set([...list.map((e) => e.carModelName)])),
caseMaterials = []
arr.map((e, index) => {
caseMaterials.push({
label: e,
cases: []
})
let secondClassifList = new Array(arr.length).fill([])
list.map(i => {
if (e == i.carModelName) secondClassifList[index].push(i.category)
})
caseMaterials[index].cases = Array.from(new Set([...secondClassifList[index]]))
})
this.caseMaterials = caseMaterials
let [item] = list
this.carModelName = item.carModelName
this.category = item.category
} else {
this.caseMaterials = []
this.list = []
}
},
clearCanvas () {
this.$refs.caseCanvas.clearBoard()
......@@ -361,7 +384,7 @@ export default {
top: 0;
}
.box {
padding-top: toRpx(160);
padding-top: toRpx(168);
position: relative;
.select-box {
position: absolute;
......@@ -439,15 +462,57 @@ export default {
justify-content: center;
}
}
.content-box {
height: calc(100vh - #{toRpx(272)});
margin: toRpx(24) 44rpx 0;
border-radius: 48rpx 48rpx 0 0;
background: #ffffff;
backdrop-filter: blur(16rpx);
box-shadow: inset 0 0 16rpx 0 #ffffff;
padding-top: 24rpx;
box-sizing: border-box;
.scroll-box {
width: calc(100% - 88rpx);
margin: 16rpx 44rpx 0;
height: 80rpx;
.classif-box {
width: 100%;
gap: toRpx(24);
flex-wrap: nowrap;
}
}
.classif-item {
height: 80rpx;
padding: 0 32rpx;
color: #666666;
width: fit-content;
flex-shrink: 0;
}
.first-item {
font-size: 32rpx;
}
.classif-active {
color: #2d66f7;
font-weight: 500;
}
.second-item {
font-size: 28rpx;
border-radius: 16rpx;
background: #f2f2f2;
}
.second-ative {
background: #2d66f71a;
}
}
.record-box {
height: calc(100vh - #{toRpx(224)});
padding-top: toRpx(48);
margin-top: 40rpx;
height: calc(100% - #{toRpx(232)});
}
.list {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: toRpx(48) toRpx(50);
margin: 0 toRpx(64);
gap: toRpx(48) toRpx(38);
margin: 0 toRpx(44);
.item {
height: toRpx(536);
background: #ffffff;
......@@ -487,6 +552,10 @@ export default {
}
}
}
.list-bottom-mask {
height: 100rpx;
width: 100%;
}
}
}
.popup-box {
......
......@@ -58,7 +58,7 @@
? item.goodsList[0].goodsName
: "-"
}}</view>
X{{ item.goodsList.length }}件
x {{ item.goodsList.length }}件
<image
class="image-look"
src="../../assets/images/boutique/look.png"
......@@ -70,7 +70,7 @@
:key="ind"
>
<view class="label">{{ k.label }}</view>
<view :class="{ value: true, bold: k.isBold }">{{
<view :class="['value text-hide',{bold: k.isBold}]">{{
k.format
? formatTime(item[k.key])
: item[k.key] || "-"
......@@ -83,7 +83,7 @@
<image
class="image-pay"
:src="
require(`@/assets/images/boutique/pay_${item.payType}.png`)
require(`@/assets/images/boutique/pay_${item.payType > 5 ? 5 : item.payType}.png`)
"
/>
</view>
......@@ -465,6 +465,7 @@ export default {
color: #999ea8;
.label {
width: toRpx(160);
flex-shrink: 0;
}
.value {
margin-left: toRpx(20);
......
<template>
<!-- @start="$refs.customerTypeRef.open()" -->
<home-frame
@preview="preview"
@start="$refs.customerTypeRef.open()"
@start="$refs.test.open()"
ref="home"
:id="id"
@openStep="openStep"
......@@ -101,7 +102,8 @@ export default {
icon: 'icon-customer-2'
}
]),
loadComplete:false
loadComplete: false,
requested: false
}
},
onBackPress (options) {
......@@ -114,11 +116,13 @@ export default {
// 其他情况允许正常返回
return false;
},
onLoad () {
async onLoad () {
await uni.$api.systemApi.getMockData(true) //获取APP配置信息
this.init();
uni.$api.systemApi.getMockData(true)
this.requested = true
this.$refs.home.updateApp(true)
},
onShow () {
async onShow () {
const userInfo = uni.$storage.get("userInfo")
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm("userInfo");
......@@ -128,6 +132,7 @@ export default {
});
return;
}
if (this.requested && !this.id) this.$refs.home.updateApp()
},
computed: {
},
......@@ -207,7 +212,6 @@ export default {
this.$store.state.user.boutiqueMediaConfig = boutiqueMediaConfig
this.$store.state.user.boutiqueCarList = boutiqueCarList
}).catch(error => {
console.log(error)
uni.hideLoading()
uni.showToast({
title: error,
......@@ -238,8 +242,6 @@ export default {
this.id = id;
this.tabId = tabId
this.currentCarId = this.carBannerList[this.currentIndex].carModelId
console.log(id)
},
back () {
if (!this.id) return uni.navigateBack();
......@@ -265,13 +267,14 @@ export default {
this.clearHistory();
this.recording = false
this.$refs.home.$refs.leftBox.getMessageInfo()
if (this.requested) this.$refs.home.updateApp()
},
async start (before = true) {
const isPermision = await this.$refs.home.isPermission()
if (!isPermision) return false
uni.$logger.local.info('〖接待管理Recorder〗 == 开始接待 ')
if (before) this.clearHistory();
this.$refs.home.audioManager.start()
this.$refs.home.startAudio(false)
this.recording = true
return true
},
......
......@@ -4,319 +4,236 @@
<view class="box">
<scroll-view class="scroll-view" scroll-y="true">
<view class="box-content">
<GlCell :formList="formList" :formData="formData" @radioChange="radioChange" @handleValue="handleValue" @handleCell="handleCell"></GlCell>
<GlCell :formList="formList" :formData="orderObj" @radioChange="radioChange" @handleCell="handleCell">
<template slot="product">
<view class="shop-list">
<view class="shop-item">
<view class="sprite-icon icon-blue-delete"></view>
<view class="right">
<view class="shop-name">商品名称:小天窗-圣科隔热膜-前档膜-CGSS20最长商品名称名称有点长</view>
<view class="alias">商品别名:阿尔法 T5极狐非三电整车延保(新车2年6万公里)</view>
<view class="front-gear-box">
<view class="front-gear-input-box">
<view class="front-gear-label">前档玻璃</view>
<view class="front-gear-input">
<view class="unit">¥</view>
<input class="uni-input " type="digit" placeholder="请输入价格"
placeholder-style="font-size: 14px" />
</view>
</view>
<view class="control">
<view class="minus">-</view>
<input class="uni-input control-input" type="number" />
<view class="add">+</view>
</view>
</view>
</view>
</view>
</view>
</template>
<template slot="package">
<view class="package-list">
<view class="package-item">
<view class="header">
<view class="header-left">
<view class="sprite-icon icon-blue-delete"></view>
<view class="name">平步青云套餐</view>
</view>
<view class="price">¥6660.00</view>
</view>
<view class="goods-item">
<view class="goods-name">AITO汽车专享 M5中控屏钢化保护膜</view>
<view class="alias-name">商品别名:阿尔法 T5极狐非三电整车延保(新车2年6万公里)</view>
<view class="front-gear-box">
<view class="front-gear-input-box">
<view class="front-gear-label">前档玻璃</view>
<view class="front-gear-input">
<view class="unit">¥</view>
<input class="uni-input " type="digit" placeholder="请输入价格"
placeholder-style="font-size: 14px" />
</view>
</view>
<view class="control">
<view class="minus">-</view>
<input class="uni-input control-input" type="number" />
<view class="add">+</view>
</view>
</view>
</view>
<view class="goods-item">
<view class="goods-name">AITO汽车专享 M5中控屏钢化保护膜</view>
<view class="alias-name">商品别名:阿尔法 T5极狐非三电整车延保(新车2年6万公里)</view>
<view class="front-gear-box">
<view class="front-gear-input-box">
<view class="front-gear-label">前档玻璃</view>
<view class="front-gear-input">
<view class="unit">¥</view>
<input class="uni-input " type="digit" placeholder="请输入价格"
placeholder-style="font-size: 14px" />
</view>
</view>
<view class="control">
<view class="minus">-</view>
<input class="uni-input control-input" type="number" />
<view class="add">+</view>
</view>
</view>
</view>
</view>
</view>
</template>
<template slot="otherPay">
<view v-if="showPayTips" class="pay-tips">其他收款:当客户已向嘀加付款但无法使用流水补录时,新建工单应选择收款方为「嘀加收款」且支付方为「其他收款」。</view>
</template>
</GlCell>
</view>
<view @click="submit">直接下单</view>
</scroll-view>
</view>
<!-- 弹窗 -->
<order-popup ref="orderPopup" :data="popData" @onConfirm="onConfirm" :popupType="popupType" />
</view>
</template>
<script>
import OrderPopup from '@/components/OrderPopup/index.vue'
import GlCell from '../../../../components/Form/GlCell.vue';
import { FORM_LIST, popupTypeEnum } from '../contant'
export default {
name: 'CreateOrder',
components: {
GlCell
GlCell,
OrderPopup
},
data() {
return {
formData: {
carName: '',
phone: '',
user: '',
salesType: '1',
sexType: '1'
orderObj: {
userInfo: {},
deliveryUserInfo: {},
subShopMerchantInfo: {},
sellerUserInfo: {},
salesType: '0',
customerSex: '1',
experienceFlag: 'Y',
payeeType: 0,
selectPayType: '3',
carBrand: {}
},
formList: [
[
{
label: '销售顾问',
value: 'user',
type: 'select',
key: 'name',
required: true
},
{
label: '转化人员',
value: 'user',
type: 'select',
key: 'name',
required: true
},
],
[
{
label: '车主姓名1',
value: 'carName1',
maxlength: '10',
type: 'input',
required: true
},
{
label: '车主姓名1',
value: 'carName1',
maxlength: '10',
type: 'input',
required: true
},
{
label: '车架号',
value: 'carName1',
maxlength: '10',
type: 'input',
required: true,
valueIcon: 'icon-scanning'
},
{
label: '车牌号',
value: 'carName1',
maxlength: '10',
type: 'input',
valueIcon: 'icon-scanning'
},
{
label: '客户来源',
value: 'salesType',
type: 'radio',
current: '1',
radioList: [
{
value: '1',
name: '售前'
},
{
value: '2',
name: '售后'
}
]
},
{
label: '性别',
value: 'sexType',
type: 'radio',
current: '1',
radioList: [
{
value: '1',
name: '男'
},
{
value: '2',
name: '女'
}
]
},
{
label: '车主姓名1',
value: 'carName1',
maxlength: '10',
type: 'input',
required: true
},
{
label: '车主姓名1',
value: 'carName1',
maxlength: '10',
type: 'input',
required: true
},
],
[
{
label: '销售顾问',
value: 'user',
type: 'select',
key: 'name',
required: true
},
{
label: '请选择产品',
onlyLabel: true,
required: true,
noBorder: true
},
{
label: '前档',
value: 'user',
type: 'select',
key: 'name',
required: true,
labellIcon: 'front-gear'
},
{
label: '前侧窗玻璃',
value: 'user',
type: 'select',
key: 'name',
required: true,
labellIcon: 'front-window'
},
{
label: '销售顾问',
value: 'user',
type: 'select',
key: 'name',
required: true
},
{
label: '销售顾问',
value: 'user',
type: 'select',
key: 'name',
required: true
},
{
label: '销售顾问',
value: 'user',
type: 'select',
key: 'name',
required: true
},
],
[
{
label: '备注',
value: 'remark',
maxlength: '100',
type: 'textarea',
placeholder: '请输入 (100字以内)',
class: 'cell-row'
},
]
]
// fromList: [
// {
// label: '销售顾问',
// value: 'user',
// type: 'select',
// key: 'name',
// required: true
// },
// {
// label: '请选择产品',
// onlyLabel: true,
// required: true,
// noBorder: true
// },
// {
// label: '手机号',
// value: 'phone',
// maxlength: '11',
// type: 'input'
// },
// {
// label: '客户来源',
// value: 'salesType',
// type: 'radio',
// current: '1',
// radioList: [
// {
// value: '1',
// name: '售前'
// },
// {
// value: '2',
// name: '售后'
// }
// ]
// },
// {
// label: '性别',
// value: 'sexType',
// type: 'radio',
// current: '1',
// radioList: [
// {
// value: '1',
// name: '男'
// },
// {
// value: '2',
// name: '女'
// }
// ]
// },
// {
// label: '车牌号',
// value: 'carNumber',
// type: 'input',
// valueIcon: 'icon-scanning'
// },
// {
// label: '车主姓名1',
// value: 'carName1',
// maxlength: '10',
// type: 'input',
// required: true
// },
// {
// label: '车主姓名2',
// value: 'carName2',
// maxlength: '10',
// type: 'input',
// required: true
// },
// {
// label: '车主姓名3',
// value: 'carName3',
// maxlength: '10',
// type: 'input',
// required: true
// },
// {
// label: '车主姓名4',
// value: 'carName4',
// maxlength: '10',
// type: 'input',
// required: true
// },
// {
// label: '车主姓名5',
// value: 'carName5',
// maxlength: '10',
// type: 'input',
// required: true
// },
// {
// label: '车主姓名6',
// value: 'carName6',
// maxlength: '100',
// type: 'textarea',
// required: true,
// placeholder: '请输入 (100字以内)',
// class: 'cell-row'
// },
// ]
formList: FORM_LIST,
userInfo: {},
requiredList: [], // 录单设置的必填项
popData: {
customer: {}
},
popupType: 0,
popupTypeEnum,
}
},
computed: {
showPayTips() {
if (this.orderObj.payeeType == 0 && this.orderObj.selectPayType == 7) return true
else return false
}
},
mounted() {
console.log('mounted')
this.userInfo = uni.$storage.get('userInfo') || {}
this.initData()
},
methods: {
initData() {
const { userInfo } = this
this.getShopMerchantPointConfig(userInfo.shopMerchantId)
this.getSubShopMerchantList(userInfo.shopMerchantId)
this.getSetting()
// this.orderObj.userInfo = {
// id: 1,
// name: '测试'
// }
this.orderObj.sellerMerchant = {
sellerUserId: userInfo.uuid,
sellerName: userInfo.name
}
},
// 选择行事件
handleCell(val) {
console.log(val)
switch(val.value) {
case 'user':
setTimeout(() => {
this.formData.user ={
id: 1,
name: '波波的单店门店'
}
}, 1000)
break
default:
break
}
this.popupType = Object.keys(this.popupTypeEnum).find(key => this.popupTypeEnum[key] === val.value) * 1;
console.log(this.popupType)
this.$refs.orderPopup.open();
},
// 单选框change事件
radioChange(e, val) {
console.log(e, val)
this.formData[val.value] = e.detail.value
this.orderObj[val.value] = e.detail.value
},
handleValue(val) {
console.log(val)
uni.navigateTo({ url: '/pages/boutique/tool/ocr' })
onConfirm(val) {
console.log(val, 'onConfirm')
// 根据popupTypeEnum优化处理
const typeKey = this.popupTypeEnum[this.popupType];
if (typeKey) this.orderObj[typeKey] = val;
if (typeKey == 'carBrand') {
this.orderObj[typeKey].carInfo = `${val.carBrand}-${val.carChildsBrandName}-${val.carSeriesName}`
}
},
// 提交
submit() {
console.log(this.formData)
console.log(this.orderObj)
},
async getShopMerchantPointConfig(merchantId) {
const res = await uni.$api.boutiqueApi.getShopMerchantPointConfig({ merchantId })
if (res.pointsMultiRole == 'Y') {
// 找到formList中label为"交付专员"的对象,添加hidden: true
const deliveryCell = this.formList[0].find(item => item.label === '交付专员');
if (deliveryCell) {
deliveryCell.hidden = false;
}
}
},
// 判断二级流量方
async getSubShopMerchantList(merchantId) {
const res = await uni.$api.boutiqueApi.getSubShopMerchantList({ merchantId })
console.log(res, '流量方')
if (res && res.length) {
const cell = this.formList[0].find(item => item.label === '二级流量方');
if (cell) {
cell.hidden = false;
}
}
},
// 动态获取 车型 车架 车牌 是否必填
getYQorderInfo() {
return new Promise(async (resolve, reject) => {
const YQorderSetting = uni.$storage.get('boutique_YQorderSetting')
if (YQorderSetting) return resolve(YQorderSetting)
else {
const { userInfo } = this
let { merchantId, merchantName } = userInfo.subLoginUser
const res = await uni.$api.boutiqueApi.getMerchantRecordingSettings({ merchantId, merchantName })
console.log(res)
if (res) {
uni.$storage.set('boutique_YQorderSetting', res)
resolve(res)
}
}
})
},
// 获取车型、车架号、车牌号必填规则
async getSetting() {
const res = await this.getYQorderInfo()
console.log(res, '========')
const dictionaryObj = {
carTypeRequiredFlag: "carBrand",
standNoRequiredFlag: "standNo",
plateNumRequiredFlag: "plateNumber",
}
for (const key in dictionaryObj) {
const cell = this.formList[1].find(item => item.value === dictionaryObj[key]);
if (cell) cell.required = (res[key] == 'Y')
}
},
async getConfig() {
}
}
}
......@@ -326,13 +243,180 @@ export default {
.order {
height: 100%;
}
.box {
height: calc(100% - #{toRpx(120)});
.scroll-view {
height: 100%;
}
}
.box-content {
padding: 0 toRpx(48);
}
.shop-list {
padding: toRpx(12) toRpx(32) toRpx(12) 0;
.shop-item {
display: flex;
align-items: center;
background-color: #F5F7FA;
border-radius: toRpx(16);
margin-bottom: toRpx(16);
padding: toRpx(24);
.right {
flex: 1;
font-size: toRpx(28);
margin-left: toRpx(24);
.shop-name {
color: #FF781F;
}
.alias {
margin-top: toRpx(12);
font-size: toRpx(24);
color: #666;
}
}
}
}
.front-gear-box {
display: flex;
justify-content: space-between;
margin-top: toRpx(24);
.front-gear-input-box {
display: flex;
align-items: center;
.front-gear-label {
font-size: toRpx(24);
margin-right: toRpx(24);
color: #999999;
}
.front-gear-input {
position: relative;
display: flex;
border: toRpx(2) solid #EFF0F2;
background-color: #fff;
font-size: toRpx(28);
height: toRpx(70);
width: toRpx(250);
line-height: toRpx(70);
text-align: right;
.uni-input {
padding: 0 toRpx(32);
height: 100%;
}
.unit {
position: absolute;
top: 50%;
left: toRpx(32);
transform: translateY(-50%);
}
}
}
.control {
display: flex;
align-items: center;
.control-input {
width: toRpx(94);
height: toRpx(74);
background-color: #fff;
border: toRpx(2) solid #EFF0F2;
padding: 0 toRpx(10);
text-align: center;
}
.minus,
.add {
width: toRpx(80);
height: toRpx(74);
line-height: toRpx(70);
text-align: center;
background-color: #fff;
border-top: toRpx(2) solid #EFF0F2;
border-bottom: toRpx(2) solid #EFF0F2;
}
.minus {
border-radius: toRpx(12) 0 0 toRpx(12);
border-left: toRpx(2) solid #EFF0F2;
}
.add {
border-radius: 0 toRpx(12) toRpx(12) 0;
border-right: toRpx(2) solid #EFF0F2;
}
}
}
.package-list {
padding: toRpx(12) toRpx(32) toRpx(12) 0;
.package-item {
background-color: #F5F7FA;
border-radius: toRpx(16);
margin-bottom: toRpx(16);
.header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: toRpx(1.6) solid #dce1e6;
padding: toRpx(24);
&-left {
display: flex;
align-items: center;
font-size: toRpx(28);
.name {
margin-left: toRpx(26);
color: #999;
}
.price {
color: #666;
}
}
}
.goods-item {
padding: toRpx(24);
border-bottom: toRpx(1.6) solid #dce1e6;
&:last-child {
border-bottom: none;
}
.goods-name {
color: #FF781F;
font-size: toRpx(28);
}
.alias-name {
margin-top: toRpx(12);
font-size: toRpx(24);
color: #666;
}
}
}
}
.pay-tips {
padding: toRpx(24) toRpx(24) toRpx(24) 0;
font-size: toRpx(24);
color: #999;
}
</style>
\ No newline at end of file
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
......@@ -53,7 +53,8 @@ export default {
recording: false,
aitoCarModelIds: [],
mediaId: '',
loadComplete: false
loadComplete: false,
requested: false
}
},
computed: {
......@@ -82,14 +83,15 @@ export default {
},
async onLoad () {
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 //默认车辆品牌
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.requested = true
this.$refs.home.updateApp(true)
},
onShow () {
async onShow () {
const userInfo = uni.$storage.get('userInfo')
if (!userInfo.shopMerchantId || !userInfo.shopMerchantName) {
uni.$storage.rm('userInfo')
......@@ -105,6 +107,7 @@ export default {
...mapMutations('audio', ['setReceptionStatus']),
init () {
this.findPayInfo()
if (this.requested && !this.id) this.$refs.home.updateApp()
},
/**获取车型&销售数据 */
get_Vehicle_Sales_Data () {
......
......@@ -48,7 +48,8 @@ class Track {
const recordList = uni.getStorageSync('TRACK_LIST') || []
if (recordList.length) {
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 = {
leadPage: 'leadPage',
recordTrackList: 'recordTrackList',
beisenToken: 'beisenToken',
messagePopShownDate: 'messagePopShownDate',
noticeTopInfo: 'noticeTopInfo',
studyCenterPermission: 'studyCenterPermission',
caseInfo: 'caseInfo',
boutique_YQorderSetting: 'boutique_YQorderSetting'
}
......@@ -3,8 +3,8 @@
* @version: 1.0.0
* @Author: limin
* @Date: 2025-01-02 18:49:17
* @LastEditors: 前端 qianduan01@didihu.com.cn
* @LastEditTime: 2025-04-11 15:59:20
* @LastEditors: limin
* @LastEditTime: 2025-08-12 10:23:15
* @FilePath: \gl_tape\utils\recordManager\TempRecord.js
*/
import utils from '../utils'
......@@ -91,6 +91,17 @@ class TempRecord {
record = null
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) {
if (!recordUrlList?.length) return []
try {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!