Commit 6cf2b444 by 李伟康

commit 提交

1 parent 4a145e97
...@@ -55,4 +55,14 @@ module.exports = { ...@@ -55,4 +55,14 @@ module.exports = {
...data, ...data,
}); });
}, },
/**轻改素材配置 */
getBoutiqueMaterialConfig (data) {
return http.post({
method: "dj.api.boutique.recepiton.material.merchant.detail",
projectName: "boutique",
...data,
});
},
}; };
...@@ -16,7 +16,7 @@ const UPLOAD_STATUS = { ...@@ -16,7 +16,7 @@ const UPLOAD_STATUS = {
import { mapMutations, mapState } from 'vuex' import { mapMutations, mapState } from 'vuex'
import utils from '@/utils/utils.js' import utils from '@/utils/utils.js'
export default { export default {
data() { data () {
return { return {
voicePath: '', voicePath: '',
timer: null, timer: null,
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
reaction: 1 reaction: 1
} }
}, },
mounted() { mounted () {
// 获取当前页面栈数组 // 获取当前页面栈数组
const pages = getCurrentPages() const pages = getCurrentPages()
const currentPage = pages[pages.length - 1] const currentPage = pages[pages.length - 1]
...@@ -38,23 +38,23 @@ export default { ...@@ -38,23 +38,23 @@ export default {
...mapState('audio', ['receptionStatus', 'booksList', 'audioInfo']), ...mapState('audio', ['receptionStatus', 'booksList', 'audioInfo']),
...mapState(['user.customerInfo']) ...mapState(['user.customerInfo'])
}, },
created() { created () {
console.log('created') console.log('created')
}, },
onHide() { onHide () {
console.log('隐藏') console.log('隐藏')
// recorderManager.stop(); // recorderManager.stop();
// recorderManager.start({ // recorderManager.start({
// duration: 10000, // duration: 10000,
// }); // });
}, },
onShow() { onShow () {
// console.log(utils.requestAndroidPermission()); // console.log(utils.requestAndroidPermission());
}, },
methods: { methods: {
...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setAudioInfo']), ...mapMutations('audio', ['setReceptionStatus', 'setBooks', 'setAudioInfo']),
// //关闭提示 // //关闭提示
tipCancel() { tipCancel () {
this.stopAudio() this.stopAudio()
this.setReceptionStatus(0) this.setReceptionStatus(0)
this.setAudioInfo({ endReasonType: 1 }) this.setAudioInfo({ endReasonType: 1 })
...@@ -67,11 +67,11 @@ export default { ...@@ -67,11 +67,11 @@ export default {
} }
}, },
//结束提示 //结束提示
tipConfirm() { tipConfirm () {
this.times = 0 this.times = 0
this.$refs.tipBox?.close() this.$refs.tipBox?.close()
}, },
closeAudio() { closeAudio () {
this.times = 0 this.times = 0
clearInterval(this.timer) clearInterval(this.timer)
this.timer = null this.timer = null
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
this.setReceptionStatus(0) this.setReceptionStatus(0)
this.setAudioInfo({ endReasonType: 1 }) this.setAudioInfo({ endReasonType: 1 })
}, },
getParams() { getParams () {
const { shopMerchantId, phone, sceneType, uuid, name, merchantId, channelType, merchantName } = uni.$storage.get('userInfo'), const { shopMerchantId, phone, sceneType, uuid, name, merchantId, channelType, merchantName } = uni.$storage.get('userInfo'),
{ customerName, phoneNumber, salesUuid, carModel, staffName } = this.$store.state.user.customerInfo, { customerName, phoneNumber, salesUuid, carModel, staffName } = this.$store.state.user.customerInfo,
receptionCustomerPaySourceList = this.booksList.map(item => { receptionCustomerPaySourceList = this.booksList.map(item => {
...@@ -92,7 +92,18 @@ export default { ...@@ -92,7 +92,18 @@ export default {
{ receptionStartTime, receptionEndTime, endReasonType } = this.audioInfo, { receptionStartTime, receptionEndTime, endReasonType } = this.audioInfo,
{ deviceId: appCode } = uni.getDeviceInfo(), { deviceId: appCode } = uni.getDeviceInfo(),
receptionTrack = this.$store.state.user.receptionTrack, receptionTrack = this.$store.state.user.receptionTrack,
params = { receptionCustomerMaterialPointList = []
Object.keys(receptionTrack).map(key => {
receptionCustomerMaterialPointList.push({
...receptionTrack[key],
merchantId: shopMerchantId,
businessScene: sceneType,
staffUuid:salesUuid,
staffName,
receptionDate: Date.now()
})
})
let params = {
staffUuid: uuid, staffUuid: uuid,
staffName: name, staffName: name,
serviceMerchantId: merchantId, serviceMerchantId: merchantId,
...@@ -111,9 +122,10 @@ export default { ...@@ -111,9 +122,10 @@ 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 其他
receptionCustomerMaterialPointList
} }
console.log(receptionTrack) console.log(params)
return params return params
}, },
/** /**
...@@ -121,7 +133,7 @@ export default { ...@@ -121,7 +133,7 @@ export default {
* @param {旧的文件路径} oldFilePath * @param {旧的文件路径} oldFilePath
* @param {新的文件名} newFileName * @param {新的文件名} newFileName
*/ */
RenameFile(oldFilePath, newFileName) { RenameFile (oldFilePath, newFileName) {
plus.io.resolveLocalFileSystemURL(oldFilePath, entry => { plus.io.resolveLocalFileSystemURL(oldFilePath, entry => {
entry.getParent(_oldFile => { entry.getParent(_oldFile => {
entry.moveTo(_oldFile, '/' + newFileName, newFilePath => { entry.moveTo(_oldFile, '/' + newFileName, newFilePath => {
...@@ -180,7 +192,7 @@ export default { ...@@ -180,7 +192,7 @@ export default {
this.handleSave(newFilePath) this.handleSave(newFilePath)
}) })
}, 300), }, 300),
handleSave(file) { handleSave (file) {
const audioList = [...this.audioInfo.audioList, file] const audioList = [...this.audioInfo.audioList, file]
if (file) { if (file) {
this.setAudioInfo({ audioList }) this.setAudioInfo({ audioList })
...@@ -192,7 +204,7 @@ export default { ...@@ -192,7 +204,7 @@ export default {
this.setAudioInfo({ endReasonType: 0, audioStatus: 'finish' }) this.setAudioInfo({ endReasonType: 0, audioStatus: 'finish' })
}, },
/**保存记录*/ /**保存记录*/
async saveRecord() { async saveRecord () {
const params = this.getParams() const params = this.getParams()
const unlock = await uni.$recordManager.lock() const unlock = await uni.$recordManager.lock()
const path = await utils.getFileSaveFolderOnClient() const path = await utils.getFileSaveFolderOnClient()
...@@ -258,7 +270,7 @@ export default { ...@@ -258,7 +270,7 @@ export default {
recorderManager.stop() recorderManager.stop()
}, 1500), }, 1500),
//监听点击事件 //监听点击事件
initTime() { initTime () {
if (this.audioInfo.audioStatus != 'start') return if (this.audioInfo.audioStatus != 'start') return
this.timer = setInterval(() => { this.timer = setInterval(() => {
// console.log(this.times); // console.log(this.times);
...@@ -270,11 +282,11 @@ export default { ...@@ -270,11 +282,11 @@ export default {
} }
}, 1000 * 10) }, 1000 * 10)
}, },
handleTouchStart() { handleTouchStart () {
this.times = 0 this.times = 0
} }
}, },
beforeCreate() { beforeCreate () {
clearInterval(this.timer) clearInterval(this.timer)
this.timer = null this.timer = null
} }
......
...@@ -12,9 +12,9 @@ export default { ...@@ -12,9 +12,9 @@ export default {
} else { } else {
value = { value = {
openCount: 1, openCount: 1,
name: item.title, materialName: item.detailTitle,
id: item.id, materialId: item.id,
stayTime: 0, stayDuration: 0,
entryTime: Date.now() entryTime: Date.now()
} }
} }
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
receptionTrackLeave () { receptionTrackLeave () {
let key = this.id, let key = this.id,
value = this.receptionTrack[key] value = this.receptionTrack[key]
value.stayTime += Number(((Date.now() - value.entryTime) / 1000).toFixed(2)) value.stayDuration += Number(Date.now() - value.entryTime)
this.$store.dispatch("setReceptionTrack", { key, value }) this.$store.dispatch("setReceptionTrack", { key, value })
} }
} }
......
...@@ -237,12 +237,12 @@ export default { ...@@ -237,12 +237,12 @@ export default {
watchStatus: { watchStatus: {
immediate: true, immediate: true,
handler(newval) { handler(newval) {
console.log('重新进入', this.pageParams) // console.log('重新进入', this.pageParams)
let item = this.couponList.find(e => e.couponType == 1), // let item = this.couponList.find(e => e.couponType == 1),
item2 = this.couponList.find(e => e.couponType == 18) // item2 = this.couponList.find(e => e.couponType == 18)
if (item) this.chooseCoupon(item) //默认填入类型为「太阳膜」类型 // if (item) this.chooseCoupon(item) //默认填入类型为「太阳膜」类型
else if (item2) this.chooseCoupon(item2) //次选填入「精品」类型 // else if (item2) this.chooseCoupon(item2) //次选填入「精品」类型
else this.chooseCoupon(this.couponList[0]) // 无此两种类型情况默认带入任意类型礼券 // else this.chooseCoupon(this.couponList[0]) // 无此两种类型情况默认带入任意类型礼券
} }
} }
}, },
...@@ -276,9 +276,6 @@ export default { ...@@ -276,9 +276,6 @@ export default {
}, },
mounted () { mounted () {
console.log(qrcode.createQrCodeImg('id=10086', {
size: 200
}))
}, },
methods: { methods: {
init () { init () {
......
<template> <template>
<view class="layout"> <view class="layout">
<view <view class="tab-box flex">
class="tab-box flex"
>
<template v-for="(item, index) in carList"> <template v-for="(item, index) in carList">
<view <view
:key="index" :key="index"
...@@ -54,7 +52,7 @@ ...@@ -54,7 +52,7 @@
<view <view
class="coupon-btn flex" class="coupon-btn flex"
v-if="!isPreview" v-if="!isPreview"
@click="$refs.couponPopup.open(customerType)" @click="couponPopupRef.open(customerType, customerInfo.customerCouponId)"
>{{couponText}}</view> >{{couponText}}</view>
</view> </view>
</view> </view>
...@@ -154,15 +152,18 @@ export default { ...@@ -154,15 +152,18 @@ export default {
couponText () { couponText () {
return this.customerType == 0 ? '查看客户券码' : '为客户发券' return this.customerType == 0 ? '查看客户券码' : '为客户发券'
}, },
change_disabled(){ change_disabled () {
return this.customerType == 0 || this.$refs.couponPopup.pageParams.QRURL return this.customerType == 0 || this.couponPopupRef.pageParams.QRURL
},
couponPopupRef () {
return this.$refs.couponPopup
} }
}, },
methods: { methods: {
changeCar (item) { changeCar (item) {
if(this.change_disabled) return if (this.change_disabled) return
this.currentCarString = item this.currentCarString = item
this.updateViewKey = Date.now() this.updateViewKey = Date.now()
}, },
...@@ -179,7 +180,14 @@ export default { ...@@ -179,7 +180,14 @@ export default {
this.currentImgUrl = e this.currentImgUrl = e
}, },
reception (e) { reception (e) {
this.clearCustomerReceivedTimer()
this.$emit('reception', e) this.$emit('reception', e)
},
clearCustomerReceivedTimer () {
if (this.couponPopupRef.pageParams.qrTimer) {
clearInterval(this.couponPopupRef.pageParams.qrTimer)
this.couponPopupRef.pageParams.qrTimer = null
}
} }
} }
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
color="#000" color="#000"
></uni-icons> ></uni-icons>
</view> </view>
<view class="title">{{ title }}</view> <view class="title" v-if="id != 1">{{ title }}</view>
</view> </view>
<template v-for="(item, index) in media"> <template v-for="(item, index) in media">
<view <view
...@@ -71,7 +71,7 @@ import { mapMutations } from "vuex"; ...@@ -71,7 +71,7 @@ import { mapMutations } from "vuex";
import invitation from "./invitation.vue"; import invitation from "./invitation.vue";
import Case from "./case.vue"; import Case from "./case.vue";
import history from "./history.vue"; import history from "./history.vue";
import {receptionTrackMixin} from '@/mixin/index.js' import { receptionTrackMixin } from '@/mixin/index.js'
export default { export default {
components: { components: {
ToolBox, ToolBox,
...@@ -165,7 +165,8 @@ export default { ...@@ -165,7 +165,8 @@ export default {
phoneNumber: item.customerPhone, phoneNumber: item.customerPhone,
salesUuid: item.userId, salesUuid: item.userId,
staffName: item.employeeName, staffName: item.employeeName,
receiveCouponDate: item.receiveCouponDate receiveCouponDate: item.receiveCouponDate,
customerCouponId: item.customerCouponId
} }
this.$emit('reception', customer) this.$emit('reception', customer)
}, },
......
...@@ -235,6 +235,11 @@ export default { ...@@ -235,6 +235,11 @@ export default {
this.$store.dispatch("setEmployeeList", res); this.$store.dispatch("setEmployeeList", res);
}); });
/**获取车型素材配置 */ /**获取车型素材配置 */
uni.$api.boutiqueApi.getBoutiqueMaterialConfig({
merchantId: shopMerchantId
}).then(res =>{
console.log(res,'===========')
})
let boutiqueMediaConfig = { let boutiqueMediaConfig = {
M5: [defaultConfig[0], defaultConfig[1], defaultConfig[2]], M5: [defaultConfig[0], defaultConfig[1], defaultConfig[2]],
M7: [defaultConfig[0], defaultConfig[1]], M7: [defaultConfig[0], defaultConfig[1]],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!