Commit d027dfdd by 李伟康

commit 提交

1 parent 95b439c9
...@@ -8,5 +8,21 @@ module.exports = { ...@@ -8,5 +8,21 @@ module.exports = {
projectName: "boutique", projectName: "boutique",
...data, ...data,
}); });
} },
/** 查当前4s商户下商户券 */
findCouponList(data) {
return http.post({
method: 'dj.api.smartCarLife.merchant.coupon.list',
projectName: "boutique",
...data,
});
},
/**查询用户是否领券 */
findCustomerReceivedStatus(data) {
return http.post({
method: 'dj.api.smartcarlife.customerCoupon.page',
projectName: "boutique",
...data,
});
},
} }
\ No newline at end of file \ No newline at end of file
import http from "../request/http"; import http from "../request/http";
import environment from "@/env";
module.exports = { module.exports = {
/**获取APP更新 */ /**获取APP更新 */
...@@ -94,11 +95,27 @@ module.exports = { ...@@ -94,11 +95,27 @@ module.exports = {
}); });
}, },
/** 接待统计 */ /** 接待统计 */
getReceptionStatistics (data) { getReceptionStatistics (data) {
return http.post({ return http.post({
method: "dj.api.smartcarlife.reception.customer.statistics", method: "dj.api.smartcarlife.reception.customer.statistics",
projectName: "boutique", projectName: "boutique",
...data, ...data,
}); });
}, },
/**创建小程序码 */
createQrcode (data) {
const envVersion = {
0: 'develop',
1: 'develop',
2: 'trial',
3: 'release',
4: 'trial'
}[environment.index]
data.projectName = "wechat"
return http.fetch("scrm.api.wechat.miniprogram.createQrcode", {
envVersion,
...data
}, true, 'scrm');
},
}; };
.sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 974rpx 920rpx;} .sprite-icon { background-image: url(@/assets/images/sprite.png);background-size: 1070rpx 876rpx;}
.icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -742rpx -794rpx;} .icon-arrow-right { width: 32rpx; height: 32rpx; background-position: -1032rpx -60rpx;}
.icon-back { width: 128rpx; height: 50rpx; background-position: -742rpx -734rpx;} .icon-back { width: 128rpx; height: 50rpx; background-position: -942rpx 0rpx;}
.icon-change-account { width: 32rpx; height: 32rpx; background-position: -784rpx -794rpx;} .icon-change-account { width: 32rpx; height: 32rpx; background-position: -1032rpx -102rpx;}
.icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;}
.icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -410rpx 0rpx;}
.icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -820rpx -610rpx;} .icon-face-error-active { width: 96rpx; height: 96rpx; background-position: -820rpx -610rpx;}
.icon-face-error { width: 96rpx; height: 96rpx; background-position: 0rpx -734rpx;} .icon-face-error { width: 96rpx; height: 96rpx; background-position: 0rpx -780rpx;}
.icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -106rpx -734rpx;} .icon-face-success-active { width: 96rpx; height: 96rpx; background-position: -106rpx -780rpx;}
.icon-face-success { width: 96rpx; height: 96rpx; background-position: -212rpx -734rpx;} .icon-face-success { width: 96rpx; height: 96rpx; background-position: -212rpx -780rpx;}
.icon-feedback { width: 32rpx; height: 32rpx; background-position: -826rpx -794rpx;} .icon-feedback { width: 32rpx; height: 32rpx; background-position: -1032rpx -150rpx;}
.icon-first-nav { width: 464rpx; height: 176rpx; background-position: 0rpx -410rpx;} .icon-home-active { width: 80rpx; height: 80rpx; background-position: -942rpx -60rpx;}
.icon-home-active { width: 80rpx; height: 80rpx; background-position: 0rpx -840rpx;} .icon-home { width: 80rpx; height: 80rpx; background-position: -942rpx -150rpx;}
.icon-home { width: 80rpx; height: 80rpx; background-position: -90rpx -840rpx;} .icon-icon-addr { width: 32rpx; height: 32rpx; background-position: -1032rpx -192rpx;}
.icon-icon-addr { width: 32rpx; height: 32rpx; background-position: -868rpx -794rpx;}
.icon-icon-avatar { width: 112rpx; height: 112rpx; background-position: -820rpx 0rpx;} .icon-icon-avatar { width: 112rpx; height: 112rpx; background-position: -820rpx 0rpx;}
.icon-icon-female { width: 32rpx; height: 32rpx; background-position: -730rpx -840rpx;} .icon-icon-female { width: 32rpx; height: 32rpx; background-position: -1032rpx -240rpx;}
.icon-icon-handshake { width: 72rpx; height: 72rpx; background-position: -360rpx -840rpx;} .icon-icon-handshake { width: 72rpx; height: 72rpx; background-position: -942rpx -420rpx;}
.icon-icon-male { width: 32rpx; height: 32rpx; background-position: -772rpx -840rpx;} .icon-icon-male { width: 32rpx; height: 32rpx; background-position: -1032rpx -282rpx;}
.icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -814rpx -840rpx;} .icon-icon-shop { width: 32rpx; height: 32rpx; background-position: -1032rpx -330rpx;}
.icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -644rpx -410rpx;} .icon-icon-upload { width: 128rpx; height: 128rpx; background-position: -644rpx -410rpx;}
.icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -856rpx -840rpx;} .icon-icon-weixin { width: 32rpx; height: 32rpx; background-position: -1032rpx -372rpx;}
.icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -898rpx -840rpx;} .icon-kf-0 { width: 32rpx; height: 32rpx; background-position: -1016rpx -576rpx;}
.icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -942rpx 0rpx;} .icon-kf-1 { width: 32rpx; height: 32rpx; background-position: -1012rpx -650rpx;}
.icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -942rpx -42rpx;} .icon-kf-2 { width: 32rpx; height: 32rpx; background-position: -1012rpx -720rpx;}
.icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -942rpx -84rpx;} .icon-kf-3 { width: 32rpx; height: 32rpx; background-position: -1012rpx -790rpx;}
.icon-logo { width: 160rpx; height: 160rpx; background-position: -474rpx -410rpx;} .icon-logo { width: 160rpx; height: 160rpx; background-position: -474rpx -410rpx;}
.icon-new-addr { width: 32rpx; height: 32rpx; background-position: -942rpx -126rpx;} .icon-new-addr { width: 32rpx; height: 32rpx; background-position: -820rpx -716rpx;}
.icon-new-avatar { width: 96rpx; height: 96rpx; background-position: -318rpx -734rpx;} .icon-new-avatar { width: 96rpx; height: 96rpx; background-position: -318rpx -780rpx;}
.icon-new-feedback { width: 64rpx; height: 64rpx; background-position: -442rpx -840rpx;} .icon-new-feedback { width: 64rpx; height: 64rpx; background-position: -942rpx -502rpx;}
.icon-new-home-active { width: 112rpx; height: 112rpx; background-position: -820rpx -122rpx;} .icon-new-home-active { width: 112rpx; height: 112rpx; background-position: -820rpx -122rpx;}
.icon-new-home { width: 112rpx; height: 112rpx; background-position: -820rpx -244rpx;} .icon-new-home { width: 112rpx; height: 112rpx; background-position: -820rpx -244rpx;}
.icon-new-record-active { width: 112rpx; height: 112rpx; background-position: -820rpx -366rpx;} .icon-new-record-active { width: 112rpx; height: 112rpx; background-position: -820rpx -366rpx;}
.icon-new-record { width: 112rpx; height: 112rpx; background-position: -820rpx -488rpx;} .icon-new-record { width: 112rpx; height: 112rpx; background-position: -820rpx -488rpx;}
.icon-new-setting { width: 64rpx; height: 64rpx; background-position: -516rpx -840rpx;} .icon-new-setting { width: 64rpx; height: 64rpx; background-position: -942rpx -576rpx;}
.icon-pen-active { width: 120rpx; height: 120rpx; background-position: -490rpx -596rpx;} .icon-pen-active { width: 120rpx; height: 120rpx; background-position: -490rpx -596rpx;}
.icon-pen { width: 120rpx; height: 120rpx; background-position: -620rpx -596rpx;} .icon-pen { width: 120rpx; height: 120rpx; background-position: -620rpx -596rpx;}
.icon-qw { width: 48rpx; height: 48rpx; background-position: -750rpx -666rpx;} .icon-qw { width: 48rpx; height: 48rpx; background-position: -1016rpx -502rpx;}
.icon-record-active { width: 80rpx; height: 80rpx; background-position: -180rpx -840rpx;} .icon-record-active { width: 80rpx; height: 80rpx; background-position: -942rpx -240rpx;}
.icon-record { width: 80rpx; height: 80rpx; background-position: -270rpx -840rpx;} .icon-record { width: 80rpx; height: 80rpx; background-position: -942rpx -330rpx;}
.icon-scene-0 { width: 96rpx; height: 96rpx; background-position: -424rpx -734rpx;} .icon-scene-0 { width: 96rpx; height: 96rpx; background-position: -424rpx -780rpx;}
.icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -530rpx -734rpx;} .icon-scene-1 { width: 96rpx; height: 96rpx; background-position: -530rpx -780rpx;}
.icon-search { width: 40rpx; height: 40rpx; background-position: -880rpx -734rpx;} .icon-search { width: 40rpx; height: 40rpx; background-position: -1024rpx -420rpx;}
.icon-setting { width: 32rpx; height: 32rpx; background-position: -862rpx -716rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: -636rpx -780rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -942rpx -650rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -942rpx -720rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -942rpx -790rpx;}
.icon-first-nav { width: 464rpx; height: 176rpx; background-position: 0rpx -410rpx;}
.icon-second-nav { width: 480rpx; height: 128rpx; background-position: 0rpx -596rpx;} .icon-second-nav { width: 480rpx; height: 128rpx; background-position: 0rpx -596rpx;}
.icon-setting { width: 32rpx; height: 32rpx; background-position: -942rpx -168rpx;}
.icon-store { width: 96rpx; height: 96rpx; background-position: -636rpx -734rpx;}
.icon-tool-file { width: 60rpx; height: 60rpx; background-position: -750rpx -596rpx;}
.icon-tool-finish { width: 60rpx; height: 60rpx; background-position: -590rpx -840rpx;}
.icon-tool-pay { width: 60rpx; height: 60rpx; background-position: -660rpx -840rpx;}
\ No newline at end of file \ No newline at end of file
.icon-customer-1 { width: 400rpx; height: 400rpx; background-position: 0rpx 0rpx;}
.icon-customer-2 { width: 400rpx; height: 400rpx; background-position: -410rpx 0rpx;}
.icon-aito { width: 320rpx; height: 36rpx; background-position: 0rpx -734rpx;}
.icon-qr-success { width: 96rpx; height: 96rpx; background-position: -742rpx -780rpx;}
\ No newline at end of file \ No newline at end of file
No preview for this file type

917 KB | W: | H:

937 KB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
position="bottom" position="bottom"
:isFooter="false" :isFooter="false"
title="请选择车品牌" title="请选择车品牌"
@close="$emit('close')"
> >
<view class="select-box"> <view class="select-box">
<view <view
...@@ -48,9 +49,10 @@ export default { ...@@ -48,9 +49,10 @@ export default {
data () { data () {
return { return {
carlist: [], carlist: [],
selectItem: {}
} }
}, },
watch:{ watch: {
watchStatus: { watchStatus: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
...@@ -83,6 +85,13 @@ export default { ...@@ -83,6 +85,13 @@ export default {
const customerInfo = this.$store.state.user.customerInfo const customerInfo = this.$store.state.user.customerInfo
customerInfo.carBrand = e.name customerInfo.carBrand = e.name
this.$store.dispatch('setCustomerInfo', customerInfo) this.$store.dispatch('setCustomerInfo', customerInfo)
this.selectItem = {
carBrand: e.brandName,
carBrandId: e.brandId,
carChildsBrandName: e.name,
carChildsBrandId: e.id
}
console.log(e)
uni.$api.commonApi.getCarBrandsList({ uni.$api.commonApi.getCarBrandsList({
brandId: e.brandId, brandId: e.brandId,
childBrandId: e.id childBrandId: e.id
...@@ -94,7 +103,10 @@ export default { ...@@ -94,7 +103,10 @@ export default {
}, },
handleSelect (item) { handleSelect (item) {
this.$refs.carBoxVisible.close(); this.$refs.carBoxVisible.close();
this.$emit('select', item) this.$emit('select', {
...item,
...this.selectItem
})
}, },
close () { close () {
this.$refs?.carBoxVisible?.close(); this.$refs?.carBoxVisible?.close();
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
ref="employeeBoxVisible" ref="employeeBoxVisible"
position="bottom" position="bottom"
:isFooter="false" :isFooter="false"
title="请选择销售" :title="`请选择${title}`"
:maxHeight="1000" :maxHeight="1000"
@close="$emit('close')"
> >
<view class="select-box"> <view class="select-box">
<view <view
...@@ -23,11 +24,17 @@ ...@@ -23,11 +24,17 @@
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
export default { export default {
name: 'Employee', name: 'Employee',
props: {
title: {
type: String,
default: '销售'
}
},
data () { data () {
return { return {
} }
}, },
watch:{ watch: {
watchStatus: { watchStatus: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
...@@ -39,7 +46,7 @@ export default { ...@@ -39,7 +46,7 @@ export default {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
salesUuid(){ salesUuid () {
return this.$store.state.user.customerInfo.salesUuid return this.$store.state.user.customerInfo.salesUuid
}, },
employeeList () { employeeList () {
...@@ -49,14 +56,14 @@ export default { ...@@ -49,14 +56,14 @@ export default {
mounted () { mounted () {
}, },
methods: { methods: {
open(){ open () {
this.$refs.employeeBoxVisible.open() this.$refs.employeeBoxVisible.open()
}, },
handleSelect (item) { handleSelect (item) {
this.close(); this.close();
this.$emit('select', item) this.$emit('select', item)
}, },
close(){ close () {
this.$refs?.employeeBoxVisible?.close() this.$refs?.employeeBoxVisible?.close()
} }
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@cancel="cancel" @cancel="cancel"
@confirm="submit" @confirm="submit"
:cancelBtnText="`${step == 1? '取消' : '上一步'}`" :cancelBtnText="`${step == 1? '取消' : '上一步'}`"
:confirmBtnText="`${step == 1? '下一步' : '完成接待'}`" :confirmBtnText="`${sceneType == 0 ?step == 1? '下一步' : '完成接待': '完成接待'}`"
:title="`${step == 1? '客户信息完善' : '结果反馈'}`" :title="`${step == 1? '客户信息完善' : '结果反馈'}`"
:popupW="820" :popupW="820"
:maxHeight="820" :maxHeight="820"
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<view <view
class="pop-tips" class="pop-tips"
v-else v-else
>检测到“交车通知书”中未填写客户档案,请填写后再完成接待。</view> >检测到“{{sceneType == 0 ? '交车通知书':'精品加装服务说明页'}}”中未填写客户档案,请填写后再完成接待。</view>
</template> </template>
<view class="form"> <view class="form">
<template v-for="(i, index) in formObject"> <template v-for="(i, index) in formObject">
...@@ -106,6 +106,10 @@ export default { ...@@ -106,6 +106,10 @@ export default {
components: { Employee, CarBrands }, components: { Employee, CarBrands },
name: 'FinishStep', name: 'FinishStep',
props: { props: {
sceneType: {
type: Number,
default: 0
}
}, },
data () { data () {
return { return {
...@@ -218,20 +222,27 @@ export default { ...@@ -218,20 +222,27 @@ export default {
}, },
// 保存 // 保存
submit () { submit () {
let { receptionStatus } = this
if (this.step == 1) { if (this.step == 1) {
this.errorTip = true; this.errorTip = true;
if (this.check()) this.step = 2 if (this.check()) {
const { sceneType } = this
if (sceneType == 0) this.step = 2
else this.success(receptionStatus)
}
} else { } else {
let { receptionStatus } = this let { receptionStatus } = this
if (receptionStatus == -1) return uni.showToast({ if (receptionStatus == -1) return uni.showToast({
title: '请完善本次接待结果', title: '请完善本次接待结果',
icon: 'none' icon: 'none'
}) })
this.$refs.successRef.open(); this.success(receptionStatus)
this.setReceptionStatus(receptionStatus);
this.$emit('submit', receptionStatus)
} }
},
success (receptionStatus) {
this.$refs.successRef.open();
this.setReceptionStatus(receptionStatus);
this.$emit('submit', receptionStatus)
}, },
handleSelect (item, popkey) { handleSelect (item, popkey) {
this.$refs[popkey].close(); this.$refs[popkey].close();
...@@ -246,10 +257,11 @@ export default { ...@@ -246,10 +257,11 @@ export default {
}, },
open () { open () {
this.$store.dispatch('getCustomerInfo').then((customerInfo) => { this.$store.dispatch('getCustomerInfo').then((customerInfo) => {
let { sceneType } = this
this.errorTip = false this.errorTip = false
this.receptionStatus = -1 this.receptionStatus = sceneType == 0 ? -1 : 1 //精品默认1
this.formData = customerInfo this.formData = customerInfo
let step = Object.values(customerInfo).every((value) => !!value) ? 2 : 1 let step = sceneType == 0 ? Object.values(customerInfo).every((value) => !!value) ? 2 : 1 : 1
if (step == 2 && !this.check()) { if (step == 2 && !this.check()) {
this.errorTip = true this.errorTip = true
step = 1 step = 1
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<template> <template>
<view <view
class="container" class="container"
@click="$emit('handleTouchStart')" @click="handleTouchStart"
> >
<view :class="['home', { show: !id }]"> <view :class="['home', { show: !id }]">
<view class="bg"> <view class="bg">
...@@ -128,7 +128,6 @@ ...@@ -128,7 +128,6 @@
<!-- 未点击开始接待,弹窗 --> <!-- 未点击开始接待,弹窗 -->
<MessageBox <MessageBox
ref="previewRef" ref="previewRef"
@cancel="$emit('cancel')"
@confirm="$emit('preview')" @confirm="$emit('preview')"
:popupW="704" :popupW="704"
content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」" content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」"
...@@ -137,8 +136,8 @@ ...@@ -137,8 +136,8 @@
<!-- 停留弹框 --> <!-- 停留弹框 -->
<MessageBox <MessageBox
ref="tipBox" ref="tipBox"
@cancel="$emit('tipCancel')" @cancel="tipCancel"
@confirm="$emit('tipConfirm')" @confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?" content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否" cancelBtnText="否"
confirmBtnText="是" confirmBtnText="是"
...@@ -177,7 +176,9 @@ ...@@ -177,7 +176,9 @@
<script> <script>
import KfBox from "./components/KfBox"; import KfBox from "./components/KfBox";
import SettingBox from "./components/SettingBox"; import SettingBox from "./components/SettingBox";
import myClick from "@/mixin/click";
export default { export default {
mixins: [myClick],
components: { KfBox, SettingBox }, components: { KfBox, SettingBox },
props:{ props:{
id: [String, Number], id: [String, Number],
...@@ -236,7 +237,7 @@ export default { ...@@ -236,7 +237,7 @@ export default {
methods: { methods: {
changeIndex (index) { changeIndex (index) {
this.tabIndex = index; this.tabIndex = index;
this.$emit("changeIndex", index) this.$emit("changeTab", index)
}, },
}, },
}; };
......
...@@ -12,7 +12,7 @@ import upload from "@/utils/ossUploadFile/uploadFile.js"; ...@@ -12,7 +12,7 @@ import upload from "@/utils/ossUploadFile/uploadFile.js";
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,
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
reaction: 1, reaction: 1,
}; };
}, },
mounted() { mounted () {
this.initTime(); this.initTime();
// this.checkVoice(); // this.checkVoice();
}, },
...@@ -38,17 +38,17 @@ export default { ...@@ -38,17 +38,17 @@ export default {
]), ]),
...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: {
...@@ -61,29 +61,30 @@ export default { ...@@ -61,29 +61,30 @@ export default {
"setBooks", "setBooks",
]), ]),
//关闭提示 //关闭提示
tipCancel() { tipCancel () {
this.stopAudio(); this.stopAudio();
this.setReceptionStatus(0); this.setReceptionStatus(0);
this.setReasonType(1); this.setReasonType(1);
this.$refs.tipBox.close(); this.$refs.tipBox.close();
let { sceneType } = uni.$storage.get("userInfo");
uni.reLaunch({ uni.reLaunch({
url: "/pages/home/home", url: sceneType == 0 ? "/pages/home/home" : "/pages/boutique/index" ,
}); });
}, },
//结束提示 //结束提示
tipConfirm() { tipConfirm () {
this.times = 0; this.times = 0;
this.$refs.tipBox.close(); this.$refs.tipBox.close();
}, },
//检查缓存录音 //检查缓存录音
checkVoice() { checkVoice () {
const file = uni.$storage.get("storageFile"); const file = uni.$storage.get("storageFile");
if (file) this.uploadVoice(file); if (file) this.uploadVoice(file);
}, },
//保存录音记录及其他信息 //保存录音记录及其他信息
async uploadVoice(tempFilePath) { async uploadVoice (tempFilePath) {
try { try {
const { shopMerchantId, phone } = uni.$storage.get("userInfo"), const { shopMerchantId, phone,sceneType } = uni.$storage.get("userInfo"),
{ customerName, phoneNumber, salesUuid, carModel, staffName } = { customerName, phoneNumber, salesUuid, carModel, staffName } =
this.$store.state.user.customerInfo, this.$store.state.user.customerInfo,
receptionCustomerPaySourceList = this.booksList.map((item) => { receptionCustomerPaySourceList = this.booksList.map((item) => {
...@@ -107,6 +108,7 @@ export default { ...@@ -107,6 +108,7 @@ export default {
receptionEndTime: this.receptionEndTime, receptionEndTime: this.receptionEndTime,
receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径 receptionCustomerPaySourceList, //1.付款凭证文件路径 2.客户购车发票文件路径 3.客户延保合同文件路径
merchantId: shopMerchantId, merchantId: shopMerchantId,
bussinessType: sceneType == 0 ? 1 : 2 // sceneType 0延保 1精品。 bussinessType 1.延保 2.轻改
}; };
console.log( console.log(
customerName, customerName,
...@@ -130,7 +132,7 @@ export default { ...@@ -130,7 +132,7 @@ export default {
} }
}, },
//开始录音 //开始录音
async startAudio() { async startAudio () {
if (this.isStart) return; if (this.isStart) return;
this.setAudioStart(true); this.setAudioStart(true);
this.setAudioList([]); this.setAudioList([]);
...@@ -180,7 +182,7 @@ export default { ...@@ -180,7 +182,7 @@ export default {
recorderManager.stop(); recorderManager.stop();
}, 1500), }, 1500),
//监听点击事件 //监听点击事件
initTime() { initTime () {
if (!this.isStart) return; if (!this.isStart) return;
this.timer = setInterval(() => { this.timer = setInterval(() => {
this.times++; this.times++;
...@@ -194,12 +196,11 @@ export default { ...@@ -194,12 +196,11 @@ export default {
} }
}, 1000 * 10); }, 1000 * 10);
}, },
handleTouchStart() { handleTouchStart () {
console.log('handleTouchStart')
this.times = 0; this.times = 0;
}, },
}, },
beforeCreate() { beforeCreate () {
clearInterval(this.timer); clearInterval(this.timer);
this.timer = null; this.timer = null;
}, },
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
type="center" type="center"
:is-mask-click="false" :is-mask-click="false"
animation animation
class="customerPopup"
> >
<view class="box"> <view class="box">
<view class="title flex"> <view class="title flex">
...@@ -25,6 +26,7 @@ ...@@ -25,6 +26,7 @@
<view <view
class="item flex" class="item flex"
:key="index" :key="index"
@click="choose(index)"
> >
<view :class="['sprite-icon',i.icon]"></view> <view :class="['sprite-icon',i.icon]"></view>
<view class="item-title">{{i.title}}</view> <view class="item-title">{{i.title}}</view>
...@@ -63,12 +65,20 @@ export default { ...@@ -63,12 +65,20 @@ export default {
}, },
close () { close () {
this.$refs.customer.close(); this.$refs.customer.close();
this.$emit('cancel')
},
choose (index) {
this.$emit('choose', index)
this.$refs.customer.close();
} }
} }
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang='scss'>
.customerPopup {
z-index: 99 !important;
}
.box { .box {
width: 1920rpx; width: 1920rpx;
height: 1120rpx; height: 1120rpx;
...@@ -116,7 +126,7 @@ export default { ...@@ -116,7 +126,7 @@ export default {
position: absolute; position: absolute;
left: 0; left: 0;
width: 100%; width: 100%;
background: #EDF5FF; background: #edf5ff;
filter: blur(40rpx); filter: blur(40rpx);
} }
&::before { &::before {
...@@ -139,8 +149,9 @@ export default { ...@@ -139,8 +149,9 @@ export default {
text-align: center; text-align: center;
} }
&:first-child { &:first-child {
&::before,&::after { &::before,
background: #f7f5ff; &::after {
background: #f7f5ff;
} }
} }
} }
......
<template>
<uni-popup
ref="qr"
type="center"
:is-mask-click="false"
animation
class="qrPopup"
>
<view class="box">
<view
class="icon-close-box flex"
@click="$refs.qr.close()"
>
<uni-icons
class="icon-close"
type="closeempty"
:size="16"
color="#1A1A1A"
></uni-icons>
</view>
<view class="content flex">
<view class="title flex">请让客户扫码领取</view>
<template v-if="received">
<view class="received flex">
<view class="sprite-icon icon-qr-success"></view>
<view class="received-title">客户领券成功</view>
<view class="received-text">车主已领取该礼券,请前往客户邀约列表查看</view>
</view>
</template>
<template v-else>
<view class="qr-box">
<image :src="url" />
</view>
</template>
</view>
</view>
</uni-popup>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'QRBox',
props: {
url: {
type: String,
default: '',
},
received: Boolean
},
data () {
return {
}
},
mounted () {
},
methods: {
open () {
this.$refs.qr.open();
},
close () {
this.$refs.qr.close();
this.$emit('close')
},
}
}
</script>
<style scoped lang='scss'>
.qrPopup {
z-index: 99 !important;
}
.box {
width: 1040rpx;
height: 800rpx;
background: #ffffff;
border-radius: 48rpx;
position: relative;
.icon-close-box {
position: absolute;
padding: 48rpx;
top: 0;
right: 0;
}
.content {
flex-direction: column;
.title {
padding: 80rpx 0 48rpx;
font-weight: 500;
font-size: 32rpx;
color: #333333;
}
.qr-box {
width: 560rpx;
height: 560rpx;
background: #ffffff;
box-shadow: 0 0 24rpx 0 #0000001a;
border-radius: 32rpx;
padding: 40rpx;
box-sizing: border-box;
image {
width: 100%;
height: 100%;
vertical-align: top;
}
}
.received {
width: 560rpx;
height: 560rpx;
background: #f9f9f9;
border-radius: 32rpx;
flex-direction: column;
justify-content: center;
&-title {
font-weight: 500;
font-size: 28rpx;
color: #333333;
margin: 16rpx 0 48rpx;
}
&-text {
font-size: 28rpx;
color: #666666;
margin: 0 56rpx;
}
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
...@@ -14,9 +14,10 @@ ...@@ -14,9 +14,10 @@
> >
<uni-icons <uni-icons
type="left" type="left"
:size="32" :size="24"
></uni-icons> ></uni-icons>
</view> </view>
<view class="title">{{title}}</view>
</view> </view>
<template v-for="(item, index) in media"> <template v-for="(item, index) in media">
<view <view
...@@ -29,6 +30,9 @@ ...@@ -29,6 +30,9 @@
:ref="'media'+item.id" :ref="'media'+item.id"
:title="item.detailTitle || ''" :title="item.detailTitle || ''"
:madiaId="item.id" :madiaId="item.id"
:customerType="customerType"
@jumpPage="jumpPage"
:show="id == item.id"
/> />
<!-- <membranes :id="id"></membranes> --> <!-- <membranes :id="id"></membranes> -->
</view> </view>
...@@ -46,6 +50,7 @@ ...@@ -46,6 +50,7 @@
<finish-step <finish-step
ref="stepRef" ref="stepRef"
@submit="done" @submit="done"
:sceneType="1"
/> />
</view> </view>
</template> </template>
...@@ -56,12 +61,14 @@ import FinishStep from '@/components/FinishStep.vue'; ...@@ -56,12 +61,14 @@ import FinishStep from '@/components/FinishStep.vue';
import Membranes from "./membranes.vue"; import Membranes from "./membranes.vue";
import Reception from './components/Reception.vue' import Reception from './components/Reception.vue'
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import invitation from './invitation.vue';
export default { export default {
components: { components: {
ToolBox, ToolBox,
FinishStep, FinishStep,
Membranes, Membranes,
Reception Reception,
invitation
}, },
mixins: [myClick], mixins: [myClick],
props: { props: {
...@@ -70,7 +77,8 @@ export default { ...@@ -70,7 +77,8 @@ export default {
type: { type: {
type: String, type: String,
default: 'preview' default: 'preview'
} },
customerType: Number
}, },
data () { data () {
return { return {
...@@ -78,15 +86,22 @@ export default { ...@@ -78,15 +86,22 @@ export default {
}; };
}, },
computed: { computed: {
title () {
let { id } = this,
name = this.media.find(e => e.id == id)?.shortTitle || ''
return name
},
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
componentName () { componentName () {
let { id } = this, let { id } = this,
name = '' name = ''
if (id == 7) name = 'reception' if ([8, 10, 11].includes(id)) name = 'membranes'
else if ([8, 10, 11].includes(id)) name = 'membranes' else name = {
else '' 7: 'reception',
13: 'invitation'
}[id]
return name return name
} }
}, },
...@@ -103,8 +118,8 @@ export default { ...@@ -103,8 +118,8 @@ export default {
if (this.id == 1) this.$refs.media1[0].closeAllPopup() if (this.id == 1) this.$refs.media1[0].closeAllPopup()
this.$emit('update:id', e.id) this.$emit('update:id', e.id)
if (e.id == 2 || e.id == 4) { if (e.id == 2 || e.id == 4) {
console.log(this.$refs[`media${e.id}`][0].$refs) // console.log(this.$refs[`media${e.id}`][0].$refs)
this.$refs[`media${e.id}`][0].$refs.tabs.init() // this.$refs[`media${e.id}`][0].$refs.tabs.init()
} }
}, },
back () { back () {
...@@ -116,6 +131,9 @@ export default { ...@@ -116,6 +131,9 @@ export default {
this.$refs.stepRef.close() this.$refs.stepRef.close()
this.$emit('done', e) this.$emit('done', e)
}, },
jumpPage (id) {
this.$emit('update:id', Number(id))
},
pageonReachBottom () { pageonReachBottom () {
}, },
}, },
...@@ -139,6 +157,15 @@ export default { ...@@ -139,6 +157,15 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.title {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 500;
font-size: 32rpx;
color: #1a1a1a;
}
} }
.view { .view {
position: fixed; position: fixed;
...@@ -180,4 +207,7 @@ export default { ...@@ -180,4 +207,7 @@ export default {
left: 0; left: 0;
} }
} }
.tool-box{
top: 5%;
}
</style> </style>
<template> <template>
<home-frame <home-frame
@handleTouchStart="handleTouchStart"
@preview="preview" @preview="preview"
@start="$refs.customerTypeRef.open()" @start="start"
ref="home" ref="home"
:id="id" :id="id"
@openStep="openStep" @openStep="openStep"
@backHome="backHome" @backHome="backHome"
@changeTab="changeTab"
> >
<view <view
class="module-box" class="module-box"
...@@ -39,10 +39,15 @@ ...@@ -39,10 +39,15 @@
@back="back" @back="back"
@done="done" @done="done"
ref="detail" ref="detail"
:customerType="customerType"
/> />
</template> </template>
<template slot="content"> <template slot="content">
<customer-type ref="customerTypeRef" /> <customer-type
ref="customerTypeRef"
@choose="chooseCustomerType"
@cancel="stopAudio"
/>
</template> </template>
</home-frame> </home-frame>
</template> </template>
...@@ -65,7 +70,8 @@ export default { ...@@ -65,7 +70,8 @@ export default {
moduleKey: Date.now(), moduleKey: Date.now(),
chooseItem: {}, chooseItem: {},
id: '', id: '',
type: '' type: '',
customerType: 1
} }
}, },
mounted () { mounted () {
...@@ -78,7 +84,35 @@ export default { ...@@ -78,7 +84,35 @@ export default {
methods: { methods: {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
init () { init () {
this.customerType = 0
this.getSoure() this.getSoure()
const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo;
/**获取品牌车型 */
uni.$api.commonApi
.getMerchantCarBrandList([shopMerchantId])
.then(({ data }) => {
let list = data[0].carBrandList,
carBrandList = [];
list?.map((e) => {
e.childs.map((i) => {
i.brandId = e.id;
i.brandName = e.name
carBrandList.push(i);
});
});
this.$store.dispatch("setCarBrandsList", carBrandList);
});
/**获取交付人员 */
uni.$api.commonApi
.getEmployeeList({
merchantId: shopMerchantId,
sceneList: [1],
appQGFlag: 1
})
.then((res) => {
this.$store.dispatch("setEmployeeList", res);
});
}, },
// 查询素材 // 查询素材
async getSoure () { async getSoure () {
...@@ -123,7 +157,7 @@ export default { ...@@ -123,7 +157,7 @@ export default {
this.id = ""; this.id = "";
this.type = ""; this.type = "";
this.clearHistory(); this.clearHistory();
// this.init(); this.init();
}, },
async start () { async start () {
// const result = await this.$permision.requestAndroidPermission( // const result = await this.$permision.requestAndroidPermission(
...@@ -136,19 +170,40 @@ export default { ...@@ -136,19 +170,40 @@ export default {
// }); // });
// return; // return;
// } // }
this.clearHistory(); this.$refs.customerTypeRef.open()
this.startAudio(); this.startAudio();
this.id = this.moduleList[0].id },
jumpPage (id) {
this.clearHistory();
this.id = id ? id : this.moduleList[0].id
this.type = "edit" this.type = "edit"
}, },
clearHistory () { clearHistory () {
// this.$store.dispatch("clearCustomerInfo"); this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearHistory"); this.$store.dispatch("clearHistory");
}, },
openStep () { openStep () {
this.$refs.home.finishRef.close(); this.$refs.home.finishRef.close();
this.$refs.detail.open(); this.$refs.detail.open();
}, },
chooseCustomerType (index) {
const { moduleList } = this
this.customerType = index
if (index == 0) this.jumpPage(moduleList.at(-1).id)
else this.jumpPage()
},
done (e) {
this.$refs.home.finishRef.close();
this.stopAudio();
setTimeout(() => {
this.id = "";
this.type = "";
this.setReceptionStatus(e);
}, 1500);
},
changeTab (index) {
if (index == 0) this.init()
}
} }
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
> >
<uni-icons <uni-icons
type="left" type="left"
:size="18" :size="24"
></uni-icons> ></uni-icons>
</view> </view>
</view> </view>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</view> </view>
<view class="content"> <view class="content">
<view class="title">{{title}}</view> <view class="title">{{title}}</view>
<view class="form"> <view class="form" :key="watchStatus">
<template v-for="(i, index) in formObject"> <template v-for="(i, index) in formObject">
<view <view
class="form-item" class="form-item"
...@@ -119,7 +119,10 @@ export default { ...@@ -119,7 +119,10 @@ export default {
computed: { computed: {
watchCustomerInfo () { watchCustomerInfo () {
return this.$store.state.user.customerInfo return this.$store.state.user.customerInfo
} },
watchStatus () {
return this.$store.state.user.historyStatus
},
}, },
methods: { methods: {
inputCustomer () { inputCustomer () {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
> >
<uni-icons <uni-icons
type="left" type="left"
:size="32" :size="24"
></uni-icons> ></uni-icons>
</view> </view>
</view> </view>
......
...@@ -308,7 +308,6 @@ export default { ...@@ -308,7 +308,6 @@ export default {
done(e) { done(e) {
this.$refs.finish.close(); this.$refs.finish.close();
this.stopAudio(); this.stopAudio();
// uni.navigateBack();
setTimeout(() => { setTimeout(() => {
this.id = ""; this.id = "";
this.type = ""; this.type = "";
......
...@@ -2,38 +2,51 @@ ...@@ -2,38 +2,51 @@
* 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量 * 下方引入的为uView UI的集成样式文件,为scss预处理器,其中包含了一些"u-"开头的自定义变量
* uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用 * uView自定义的css类名和scss变量,均以"u-"开头,不会造成冲突,请放心使用
*/ */
@import './assets/css/sprite.scss'; @import './assets/css/sprite.scss';
@keyframes show-view{
0%{ @keyframes show-view {
0% {
opacity: 0; opacity: 0;
transform: translateX(100%); transform: translateX(100%);
} }
100%{
100% {
opacity: 1; opacity: 1;
transform: translateX(0); transform: translateX(0);
} }
} }
@keyframes show-view-left { @keyframes show-view-left {
0%{ 0% {
opacity: 0; opacity: 0;
transform: translateX(-100%); transform: translateX(-100%);
} }
100%{
100% {
opacity: 1; opacity: 1;
transform: translateX(0); transform: translateX(0);
} }
} }
@keyframes show-view-right { @keyframes show-view-right {
0%{ 0% {
opacity: 0; opacity: 0;
transform: translateX(100%); transform: translateX(100%);
} }
100%{
100% {
opacity: 1; opacity: 1;
transform: translateX(0); transform: translateX(0);
} }
} }
.flex{
.flex {
display: flex; display: flex;
align-items: center; align-items: center;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!