Commit e07bdee4 by 李伟康

commit 修改延保

1 parent 4cb4b30b
......@@ -70,7 +70,7 @@ export default {
this.$refs.tipBox?.close();
let { sceneType } = uni.$storage.get("userInfo");
uni.reLaunch({
url: sceneType == 0 ? "/pages/home/home" : "/pages/boutique/index",
url: sceneType == 0 ? "/pages/equity/index" : "/pages/boutique/index",
});
},
//结束提示
......
......@@ -16,21 +16,21 @@
}
},
{
"path": "pages/home/home",
"path": "pages/equity/index",
"style": {
"navigationStyle": "custom",
"disableSwipeBack": true
}
},
{
"path": "pages/informationEntry/informationEntry",
"path": "pages/equity/informationEntry",
"style": {
"navigationBarTitleText": "信息录入",
"enablePullDownRefresh": false
}
},
{
"path": "pages/detail/detail",
"path": "pages/equity/detail/detail",
"style": {
"navigationStyle": "custom",
"onReachBottonDistance": 50,
......
......@@ -10,7 +10,11 @@
finishDoneText="下一步"
finishContene="当前操作是为强制退出接待,若完成客户接待请点击下一步。"
>
<view class="module-box" slot="module" :key="moduleKey">
<view
class="module-box"
slot="module"
:key="moduleKey"
>
<template v-for="(i, index) in moduleList">
<view
:key="index"
......@@ -18,7 +22,11 @@
:style="i.style"
@click="toDetail(i)"
>
<image class="item-img" :src="i.thumbnail" mode="scaleToFill" />
<image
class="item-img"
:src="i.thumbnail"
mode="scaleToFill"
/>
</view>
</template>
</view>
......@@ -36,7 +44,10 @@
/>
</template>
<template slot="content">
<customer-type ref="customerTypeRef" @choose="chooseCustomerType" />
<customer-type
ref="customerTypeRef"
@choose="chooseCustomerType"
/>
</template>
</home-frame>
</template>
......@@ -73,10 +84,6 @@ export default {
},
mounted () {
this.init()
this.moduleList.map((e, index) => {
e.icon = require(`@/assets/images/boutique/${index + 1}.png`)
})
this.moduleKey = Date.now()
},
methods: {
...mapMutations("audio", ["setReceptionStatus"]),
......@@ -128,7 +135,6 @@ export default {
})
this.moduleList = moduleList
console.log(moduleList)
// this.skeletonStatus = false
},
toDetail (item) {
this.chooseItem = item
......@@ -206,7 +212,7 @@ export default {
done (e) {
this.$refs.home.finishRef.close();
if (this.recording) this.$refs.home.stopAudio();
this.recording = false
this.recording = false
setTimeout(() => {
this.id = "";
this.type = "";
......
......@@ -100,7 +100,7 @@ export default {
uni.$storage.set('userInfo', userInfo)
let url = {
1: '/pages/boutique/index',
0: '/pages/home/home'
0: '/pages/equity/index'
}[userInfo.sceneType]
uni.reLaunch({
url
......
......@@ -18,7 +18,7 @@ export default {
if (res.code == 0) {
let url = {
1: '/pages/boutique/index',
0: '/pages/home/home'
0: '/pages/equity/index'
}[userInfo.sceneType]
uni.reLaunch({
url
......
<template>
<view class="layout">
<view class="bg">
<image src="../../../assets/images/media/bg-1.webp" />
<!-- <image src="../../../assets/images/media/bg-1.webp" /> -->
</view>
<view class="content">
<view class="title">{{title}}</view>
......
<template>
<view class="layout">
<view class="bg">
<image src="../../../assets/images/media/bg-6.webp" />
<!-- <image src="../../../assets/images/media/bg-6.webp" /> -->
</view>
<view class="content">
<view class="title">{{ title || "历史成交记录" }}</view>
......
<!--
* @Description:
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: huyue
* @LastEditTime: 2024-04-10 18:23:43
-->
<template>
<view
class="detail-box"
@dblclick="dbClick"
>
<view class="nav-bar">
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view>
</view>
<template v-for="(item, index) in media">
<view
:class="['view', { showView: id == item.id }]"
:key="index"
>
<component
:is="item.id == 1 || item.id == 6 ? 'media_' + item.id : 'media-component'"
:views="item.receptionSourceDetailList || []"
:penSwitch="penSwitch"
:show="id == 6"
:ref="'media'+item.id"
:title="item.detailTitle || ''"
:mediaBg="item.top_bg"
:madiaId="item.id"
:background="item.background"
:defaultIndex="item.id == 4 ? 1 : 0"
:canvasStyle="item.id == 2 ? 'padding-top:12rpx' : ''"
/>
</view>
</template>
<template v-if="type != 'preview'">
<tool-box
ref="toolRef"
:data="media"
:type="type"
@choose="choose"
@finish="open"
:id="id"
@toPay="toPay"
:showPayBtn="showPayBtn"
/>
<view
class="pen-box"
@click="drawStatus = !drawStatus"
>
<view :class="['sprite-icon', `${!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]"> </view>
</view>
</template>
<pay-pop
ref="pay"
></pay-pop>
<finish-step
ref="stepRef"
@submit="done"
/>
</view>
</template>
<script>
import ToolBox from "@/components/ToolBox.vue";
import Media_1 from "./components/Media_1.vue";
import MediaComponent from "./components/MediaComponent.vue";
import Media_6 from "./components/Media_6.vue";
import payPop from "./components/payPop.vue";
import FinishStep from '@/components/FinishStep.vue';
import { mapMutations } from "vuex";
export default {
components: {
ToolBox,
Media_1,
MediaComponent,
Media_6,
payPop,
FinishStep
},
props: {
id: [String, Number],
media: Array,
type: {
type: String,
default: 'preview'
}
},
data () {
return {
drawStatus: false,
showPayBtn: false
};
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
penSwitch () {
return this.type != 'preview' && this.drawStatus
},
watchPayInfo () {
return this.$store.state.user.paymentType
},
},
watch: {
watchStatus: {
immediate: true,
handler (newval) {
if (newval) this.drawStatus = false
}
},
watchPayInfo: {
immediate: true,
handler (newval) {
this.showPayBtn = newval.length ? true : false
}
}
},
mounted () {
},
methods: {
...mapMutations("audio", ["setReceptionStatus"]),
open () {
this.$refs.stepRef.open()
},
/**切换素材 */
choose (e) {
if (this.id == 1) this.$refs.media1[0].closeAllPopup()
this.$emit('update:id', e.id)
if (e.id == 2 || e.id == 4) {
console.log(this.$refs[`media${e.id}`][0].$refs)
this.$refs[`media${e.id}`][0].$refs.tabs.init()
}
},
back () {
this.$refs?.toolRef?.hide()
this.$emit('back')
},
done (e) {
this.$refs.toolRef.hide()
this.$refs.stepRef.close()
this.$emit('done', e)
},
pageonReachBottom () {
if (this.id == 6) this.$refs.media6[0].getQuotationList(false, true);
},
toPay () {
this.$refs.pay.show()
},
dbClick () {
if (this.type != 'preview') this.drawStatus = !this.drawStatus
}
},
};
</script>
<style scoped lang="scss">
.detail-box {
position: relative;
}
.nav-bar {
position: fixed;
width: 100%;
height: 96rpx;
left: 0;
top: 48rpx;
z-index: 9;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
}
}
.view {
position: fixed;
width: 100%;
height: 100%;
z-index: -1;
top: 0;
left: 0;
visibility: hidden;
// display: none;
}
.showView {
position: absolute;
z-index: 1;
visibility: visible;
// display: block;
animation: show-content-left 0.15s forwards;
}
.pen-box {
position: fixed;
right: 40rpx;
top: 5%;
width: 120rpx;
height: 120rpx;
z-index: 10;
box-shadow: 0 4px 12px 0 #00000033;
border-radius: 16rpx;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
@keyframes show-content-left {
0% {
left: 100%;
}
100% {
left: 0;
}
}
</style>
<!--
* @Description:
* @Author: huyue
* @Date: 2024-04-08 11:30:30
* @LastEditors: huyue
* @LastEditTime: 2024-04-10 18:23:43
-->
<template>
<view
class="detail-box"
@dblclick="dbClick"
>
<view class="nav-bar">
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view>
</view>
<template v-for="(item, index) in media">
<view
:class="['view', { showView: id == item.id }]"
:key="index"
>
<component
:is="item.id == 1 || item.id == 6 ? 'media_' + item.id : 'media-component'"
:views="item.receptionSourceDetailList || []"
:penSwitch="penSwitch"
:show="id == 6"
:ref="'media'+item.id"
:title="item.detailTitle || ''"
:mediaBg="item.top_bg"
:madiaId="item.id"
:background="item.background"
:defaultIndex="item.id == 4 ? 1 : 0"
:canvasStyle="item.id == 2 ? 'padding-top:12rpx' : ''"
/>
</view>
</template>
<template v-if="type != 'preview'">
<tool-box
ref="toolRef"
:data="media"
:type="type"
@choose="choose"
@finish="open"
:id="id"
@toPay="toPay"
:showPayBtn="showPayBtn"
/>
<view
class="pen-box"
@click="drawStatus = !drawStatus"
>
<view :class="['sprite-icon', `${!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]"> </view>
</view>
</template>
<pay-pop
ref="pay"
></pay-pop>
<finish-step
ref="stepRef"
@submit="done"
/>
</view>
</template>
<script>
import ToolBox from "@/components/ToolBox.vue";
import Media_1 from "./components/Media_1.vue";
import MediaComponent from "./components/MediaComponent.vue";
import Media_6 from "./components/Media_6.vue";
import payPop from "./components/payPop.vue";
import FinishStep from '@/components/FinishStep.vue';
import { mapMutations } from "vuex";
export default {
components: {
ToolBox,
Media_1,
MediaComponent,
Media_6,
payPop,
FinishStep
},
props: {
id: [String, Number],
media: Array,
type: {
type: String,
default: 'preview'
}
},
data () {
return {
drawStatus: false,
showPayBtn: false
};
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
penSwitch () {
return this.type != 'preview' && this.drawStatus
},
watchPayInfo () {
return this.$store.state.user.paymentType
},
},
watch: {
watchStatus: {
immediate: true,
handler (newval) {
if (newval) this.drawStatus = false
}
},
watchPayInfo: {
immediate: true,
handler (newval) {
this.showPayBtn = newval.length ? true : false
}
}
},
mounted () {
},
methods: {
...mapMutations("audio", ["setReceptionStatus"]),
open () {
this.$refs.stepRef.open()
},
/**切换素材 */
choose (e) {
if (this.id == 1) this.$refs.media1[0].closeAllPopup()
this.$emit('update:id', e.id)
if (e.id == 2 || e.id == 4) {
console.log(this.$refs[`media${e.id}`][0].$refs)
this.$refs[`media${e.id}`][0].$refs.tabs.init()
}
},
back () {
this.$refs?.toolRef?.hide()
this.$emit('back')
},
done (e) {
this.$refs.toolRef.hide()
this.$refs.stepRef.close()
this.$emit('done', e)
},
pageonReachBottom () {
if (this.id == 6) this.$refs.media6[0].getQuotationList(false, true);
},
toPay () {
this.$refs.pay.show()
},
dbClick () {
if (this.type != 'preview') this.drawStatus = !this.drawStatus
}
},
};
</script>
<style scoped lang="scss">
.detail-box {
position: relative;
}
.nav-bar {
position: fixed;
width: 100%;
height: 96rpx;
left: 0;
top: 48rpx;
z-index: 9;
.back {
height: 100%;
aspect-ratio: 1/1;
display: flex;
align-items: center;
justify-content: center;
}
}
.view {
position: fixed;
width: 100%;
height: 100%;
z-index: -1;
top: 0;
left: 0;
visibility: hidden;
// display: none;
}
.showView {
position: absolute;
z-index: 1;
visibility: visible;
// display: block;
animation: show-content-left 0.15s forwards;
}
.pen-box {
position: fixed;
right: 40rpx;
top: 5%;
width: 120rpx;
height: 120rpx;
z-index: 10;
box-shadow: 0 4px 12px 0 #00000033;
border-radius: 16rpx;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
@keyframes show-content-left {
0% {
left: 100%;
}
100% {
left: 0;
}
}
</style>
<template>
<home-frame
@preview="preview"
@start="start"
ref="home"
:id="id"
@openStep="openStep"
@backHome="backHome"
@changeTab="changeTab"
>
<view
class="module-box"
slot="module"
>
<template v-for="(i, index) in moduleList">
<view
:key="index"
:class="['item', i.class]"
:style="i.style"
@click="toDetail(i)"
>
<image
class="item-img"
:src="i.thumbnail"
mode="scaleToFill"
/>
</view>
</template>
</view>
<template slot="detail">
<detail
:id.sync="id"
:media="moduleList"
:type.sync="type"
@back="back"
@done="done"
ref="detail"
/>
</template>
<template slot="content">
<novice-guide
@nextStep="nextStep"
@back="back"
/>
</template>
</home-frame>
</template>
<script>
import detail from "./detail/detail";
import { mapMutations } from "vuex";
import NoviceGuide from "@/components/NoviceGuide.vue";
import HomeFrame from '@/components/HomeFrame/index.vue'
export default {
components: { HomeFrame, detail, NoviceGuide },
data () {
return {
moduleList: [],
id: "",
type: "",
chooseItem: {},
tabIndex: 0,
recording: false,
};
},
onBackPress (options) {
if (options.from === "backbutton") {
// 物理返回按钮触发
// 阻止默认行为,即不执行页面返回
this.back();
return true;
}
// 其他情况允许正常返回
return false;
},
onShow () {
this.init();
},
async onReachBottom () {
const { tabIndex } = this;
if (tabIndex == 0) this.$refs.detail?.pageonReachBottom();
},
methods: {
...mapMutations("audio", ["setReceptionStatus"]),
init () {
this.getSoure();
this.findPayInfo();
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;
carBrandList.push(i);
});
});
this.$store.dispatch("setCarBrandsList", carBrandList);
});
/**获取销售人员 */
uni.$api.commonApi
.getEmployeeList({
merchantId: shopMerchantId,
})
.then((res) => {
this.$store.dispatch("setEmployeeList", res);
});
},
// 查询素材
async getSoure () {
let moduleList = await uni.$api.commonApi.findSoureList();
//
moduleList.map((e, index) => {
if (index == 3) e.class = 'vertical'
else if (index == 2) e.class = 'square'
else {
e.class = 'landscape'
e.style = {
0: 'width:974rpx;',
1: 'width:652rpx;',
4: 'width: 1282rpx;height: 272rpx;',
5: 'width: 1282rpx;height: 272rpx;',
6: 'display:none;'
}[index]
}
});
console.log(moduleList)
this.moduleList = moduleList;
},
async start () {
const result = await this.$permision.requestAndroidPermission(
"android.permission.RECORD_AUDIO"
);
if (result !== 1) {
uni.showToast({
title: "为了记录语音通话,请打开录音权限",
icon: "none",
});
return;
}
this.clearHistory();
this.$refs.home.startAudio();
this.id = this.moduleList[0].id;
this.type = "edit";
this.recording = true;
},
toDetail (item) {
this.chooseItem = item;
this.$refs.home.previewRef.open();
},
cancel () {
this.$refs.home.previewRef.close();
},
preview () {
let { id } = this.chooseItem;
this.type = "preview";
this.id = id;
this.cancel()
},
// 完成接待
done (e) {
this.$refs.home.finishRef.close();
if (this.recording) this.$refs.home.stopAudio();
this.recording = false;
setTimeout(() => {
this.id = "";
this.type = "";
this.setReceptionStatus(e);
}, 1500);
},
back () {
if (!this.id) return uni.navigateBack();
if (this.type != "preview") return this.$refs.home.finishRef.open();
this.backHome();
},
backHome () {
if (this.recording) this.$refs.home.stopAudio(true);
this.$refs.home.finishRef.close();
this.id = "";
this.type = "";
this.clearHistory();
this.init();
this.recording = false;
},
nextStep () {
let { id } = this.moduleList[0];
this.type = "preview";
this.id = id;
},
clearHistory () {
this.$store.dispatch("clearCustomerInfo");
this.$store.dispatch("clearHistory");
},
openStep () {
this.$refs.home.finishRef.close();
this.$refs.detail.open();
},
// 查询门店支付配置
async findPayInfo () {
const { shopMerchantId } = uni.$storage.get("userInfo");
const data = await uni.$api.commonApi.findPayInfo({
merchantId: shopMerchantId,
});
let paymentType = [];
data.find((item) => {
if (item.paymentType == 1)
paymentType.push({
name: "扫码支付",
type: 1,
title: "付款二维码",
...item,
});
if (item.paymentType == 2)
paymentType.push({
name: "对公账户",
type: 2,
title: "付款方式",
...item,
});
});
this.$store.dispatch("setPaymentType", paymentType);
},
changeTab (index) {
this.tabIndex = index;
if (index == 0) this.init();
},
},
};
</script>
<style scoped lang="scss">
.module-box {
padding-top: 44rpx;
.item {
float: left;
border-radius: 48rpx;
overflow: hidden;
&-img {
width: 100%;
height: 100%;
vertical-align: top;
}
}
.landscape {
height: 312rpx;
}
.square {
width: 318rpx;
height: 312rpx;
}
.vertical {
width: 712rpx;
height: 624rpx;
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!