Commit e07bdee4 by 李伟康

commit 修改延保

1 parent 4cb4b30b
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
this.$refs.tipBox?.close(); this.$refs.tipBox?.close();
let { sceneType } = uni.$storage.get("userInfo"); let { sceneType } = uni.$storage.get("userInfo");
uni.reLaunch({ uni.reLaunch({
url: sceneType == 0 ? "/pages/home/home" : "/pages/boutique/index", url: sceneType == 0 ? "/pages/equity/index" : "/pages/boutique/index",
}); });
}, },
//结束提示 //结束提示
......
...@@ -16,21 +16,21 @@ ...@@ -16,21 +16,21 @@
} }
}, },
{ {
"path": "pages/home/home", "path": "pages/equity/index",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"disableSwipeBack": true "disableSwipeBack": true
} }
}, },
{ {
"path": "pages/informationEntry/informationEntry", "path": "pages/equity/informationEntry",
"style": { "style": {
"navigationBarTitleText": "信息录入", "navigationBarTitleText": "信息录入",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{ {
"path": "pages/detail/detail", "path": "pages/equity/detail/detail",
"style": { "style": {
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottonDistance": 50, "onReachBottonDistance": 50,
......
...@@ -10,7 +10,11 @@ ...@@ -10,7 +10,11 @@
finishDoneText="下一步" finishDoneText="下一步"
finishContene="当前操作是为强制退出接待,若完成客户接待请点击下一步。" finishContene="当前操作是为强制退出接待,若完成客户接待请点击下一步。"
> >
<view class="module-box" slot="module" :key="moduleKey"> <view
class="module-box"
slot="module"
:key="moduleKey"
>
<template v-for="(i, index) in moduleList"> <template v-for="(i, index) in moduleList">
<view <view
:key="index" :key="index"
...@@ -18,7 +22,11 @@ ...@@ -18,7 +22,11 @@
:style="i.style" :style="i.style"
@click="toDetail(i)" @click="toDetail(i)"
> >
<image class="item-img" :src="i.thumbnail" mode="scaleToFill" /> <image
class="item-img"
:src="i.thumbnail"
mode="scaleToFill"
/>
</view> </view>
</template> </template>
</view> </view>
...@@ -36,7 +44,10 @@ ...@@ -36,7 +44,10 @@
/> />
</template> </template>
<template slot="content"> <template slot="content">
<customer-type ref="customerTypeRef" @choose="chooseCustomerType" /> <customer-type
ref="customerTypeRef"
@choose="chooseCustomerType"
/>
</template> </template>
</home-frame> </home-frame>
</template> </template>
...@@ -73,10 +84,6 @@ export default { ...@@ -73,10 +84,6 @@ export default {
}, },
mounted () { mounted () {
this.init() this.init()
this.moduleList.map((e, index) => {
e.icon = require(`@/assets/images/boutique/${index + 1}.png`)
})
this.moduleKey = Date.now()
}, },
methods: { methods: {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
...@@ -128,7 +135,6 @@ export default { ...@@ -128,7 +135,6 @@ export default {
}) })
this.moduleList = moduleList this.moduleList = moduleList
console.log(moduleList) console.log(moduleList)
// this.skeletonStatus = false
}, },
toDetail (item) { toDetail (item) {
this.chooseItem = item this.chooseItem = item
...@@ -206,7 +212,7 @@ export default { ...@@ -206,7 +212,7 @@ export default {
done (e) { done (e) {
this.$refs.home.finishRef.close(); this.$refs.home.finishRef.close();
if (this.recording) this.$refs.home.stopAudio(); if (this.recording) this.$refs.home.stopAudio();
this.recording = false this.recording = false
setTimeout(() => { setTimeout(() => {
this.id = ""; this.id = "";
this.type = ""; this.type = "";
......
...@@ -100,7 +100,7 @@ export default { ...@@ -100,7 +100,7 @@ export default {
uni.$storage.set('userInfo', userInfo) uni.$storage.set('userInfo', userInfo)
let url = { let url = {
1: '/pages/boutique/index', 1: '/pages/boutique/index',
0: '/pages/home/home' 0: '/pages/equity/index'
}[userInfo.sceneType] }[userInfo.sceneType]
uni.reLaunch({ uni.reLaunch({
url url
......
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
if (res.code == 0) { if (res.code == 0) {
let url = { let url = {
1: '/pages/boutique/index', 1: '/pages/boutique/index',
0: '/pages/home/home' 0: '/pages/equity/index'
}[userInfo.sceneType] }[userInfo.sceneType]
uni.reLaunch({ uni.reLaunch({
url url
......
<template> <template>
<view class="layout"> <view class="layout">
<view class="bg"> <view class="bg">
<image src="../../../assets/images/media/bg-1.webp" /> <!-- <image src="../../../assets/images/media/bg-1.webp" /> -->
</view> </view>
<view class="content"> <view class="content">
<view class="title">{{title}}</view> <view class="title">{{title}}</view>
......
<template> <template>
<view class="layout"> <view class="layout">
<view class="bg"> <view class="bg">
<image src="../../../assets/images/media/bg-6.webp" /> <!-- <image src="../../../assets/images/media/bg-6.webp" /> -->
</view> </view>
<view class="content"> <view class="content">
<view class="title">{{ title || "历史成交记录" }}</view> <view class="title">{{ title || "历史成交记录" }}</view>
......
<!-- <!--
* @Description: * @Description:
* @Author: huyue * @Author: huyue
* @Date: 2024-04-08 11:30:30 * @Date: 2024-04-08 11:30:30
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-04-10 18:23:43 * @LastEditTime: 2024-04-10 18:23:43
--> -->
<template> <template>
<view <view
class="detail-box" class="detail-box"
@dblclick="dbClick" @dblclick="dbClick"
> >
<view class="nav-bar"> <view class="nav-bar">
<view <view
class="back" class="back"
@click="back" @click="back"
> >
<uni-icons <uni-icons
type="left" type="left"
:size="20" :size="20"
color="#000" color="#000"
></uni-icons> ></uni-icons>
</view> </view>
</view> </view>
<template v-for="(item, index) in media"> <template v-for="(item, index) in media">
<view <view
:class="['view', { showView: id == item.id }]" :class="['view', { showView: id == item.id }]"
:key="index" :key="index"
> >
<component <component
:is="item.id == 1 || item.id == 6 ? 'media_' + item.id : 'media-component'" :is="item.id == 1 || item.id == 6 ? 'media_' + item.id : 'media-component'"
:views="item.receptionSourceDetailList || []" :views="item.receptionSourceDetailList || []"
:penSwitch="penSwitch" :penSwitch="penSwitch"
:show="id == 6" :show="id == 6"
:ref="'media'+item.id" :ref="'media'+item.id"
:title="item.detailTitle || ''" :title="item.detailTitle || ''"
:mediaBg="item.top_bg" :mediaBg="item.top_bg"
:madiaId="item.id" :madiaId="item.id"
:background="item.background" :background="item.background"
:defaultIndex="item.id == 4 ? 1 : 0" :defaultIndex="item.id == 4 ? 1 : 0"
:canvasStyle="item.id == 2 ? 'padding-top:12rpx' : ''" :canvasStyle="item.id == 2 ? 'padding-top:12rpx' : ''"
/> />
</view> </view>
</template> </template>
<template v-if="type != 'preview'"> <template v-if="type != 'preview'">
<tool-box <tool-box
ref="toolRef" ref="toolRef"
:data="media" :data="media"
:type="type" :type="type"
@choose="choose" @choose="choose"
@finish="open" @finish="open"
:id="id" :id="id"
@toPay="toPay" @toPay="toPay"
:showPayBtn="showPayBtn" :showPayBtn="showPayBtn"
/> />
<view <view
class="pen-box" class="pen-box"
@click="drawStatus = !drawStatus" @click="drawStatus = !drawStatus"
> >
<view :class="['sprite-icon', `${!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]"> </view> <view :class="['sprite-icon', `${!drawStatus ? 'icon-pen' : 'icon-pen-active'}`]"> </view>
</view> </view>
</template> </template>
<pay-pop <pay-pop
ref="pay" ref="pay"
></pay-pop> ></pay-pop>
<finish-step <finish-step
ref="stepRef" ref="stepRef"
@submit="done" @submit="done"
/> />
</view> </view>
</template> </template>
<script> <script>
import ToolBox from "@/components/ToolBox.vue"; import ToolBox from "@/components/ToolBox.vue";
import Media_1 from "./components/Media_1.vue"; import Media_1 from "./components/Media_1.vue";
import MediaComponent from "./components/MediaComponent.vue"; import MediaComponent from "./components/MediaComponent.vue";
import Media_6 from "./components/Media_6.vue"; import Media_6 from "./components/Media_6.vue";
import payPop from "./components/payPop.vue"; import payPop from "./components/payPop.vue";
import FinishStep from '@/components/FinishStep.vue'; import FinishStep from '@/components/FinishStep.vue';
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
export default { export default {
components: { components: {
ToolBox, ToolBox,
Media_1, Media_1,
MediaComponent, MediaComponent,
Media_6, Media_6,
payPop, payPop,
FinishStep FinishStep
}, },
props: { props: {
id: [String, Number], id: [String, Number],
media: Array, media: Array,
type: { type: {
type: String, type: String,
default: 'preview' default: 'preview'
} }
}, },
data () { data () {
return { return {
drawStatus: false, drawStatus: false,
showPayBtn: false showPayBtn: false
}; };
}, },
computed: { computed: {
watchStatus () { watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
penSwitch () { penSwitch () {
return this.type != 'preview' && this.drawStatus return this.type != 'preview' && this.drawStatus
}, },
watchPayInfo () { watchPayInfo () {
return this.$store.state.user.paymentType return this.$store.state.user.paymentType
}, },
}, },
watch: { watch: {
watchStatus: { watchStatus: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
if (newval) this.drawStatus = false if (newval) this.drawStatus = false
} }
}, },
watchPayInfo: { watchPayInfo: {
immediate: true, immediate: true,
handler (newval) { handler (newval) {
this.showPayBtn = newval.length ? true : false this.showPayBtn = newval.length ? true : false
} }
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
...mapMutations("audio", ["setReceptionStatus"]), ...mapMutations("audio", ["setReceptionStatus"]),
open () { open () {
this.$refs.stepRef.open() this.$refs.stepRef.open()
}, },
/**切换素材 */ /**切换素材 */
choose (e) { choose (e) {
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 () {
this.$refs?.toolRef?.hide() this.$refs?.toolRef?.hide()
this.$emit('back') this.$emit('back')
}, },
done (e) { done (e) {
this.$refs.toolRef.hide() this.$refs.toolRef.hide()
this.$refs.stepRef.close() this.$refs.stepRef.close()
this.$emit('done', e) this.$emit('done', e)
}, },
pageonReachBottom () { pageonReachBottom () {
if (this.id == 6) this.$refs.media6[0].getQuotationList(false, true); if (this.id == 6) this.$refs.media6[0].getQuotationList(false, true);
}, },
toPay () { toPay () {
this.$refs.pay.show() this.$refs.pay.show()
}, },
dbClick () { dbClick () {
if (this.type != 'preview') this.drawStatus = !this.drawStatus if (this.type != 'preview') this.drawStatus = !this.drawStatus
} }
}, },
}; };
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.detail-box { .detail-box {
position: relative; position: relative;
} }
.nav-bar { .nav-bar {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 96rpx; height: 96rpx;
left: 0; left: 0;
top: 48rpx; top: 48rpx;
z-index: 9; z-index: 9;
.back { .back {
height: 100%; height: 100%;
aspect-ratio: 1/1; aspect-ratio: 1/1;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
} }
.view { .view {
position: fixed; position: fixed;
width: 100%; width: 100%;
height: 100%; height: 100%;
z-index: -1; z-index: -1;
top: 0; top: 0;
left: 0; left: 0;
visibility: hidden; visibility: hidden;
// display: none; // display: none;
} }
.showView { .showView {
position: absolute; position: absolute;
z-index: 1; z-index: 1;
visibility: visible; visibility: visible;
// display: block; // display: block;
animation: show-content-left 0.15s forwards; animation: show-content-left 0.15s forwards;
} }
.pen-box { .pen-box {
position: fixed; position: fixed;
right: 40rpx; right: 40rpx;
top: 5%; top: 5%;
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
z-index: 10; z-index: 10;
box-shadow: 0 4px 12px 0 #00000033; box-shadow: 0 4px 12px 0 #00000033;
border-radius: 16rpx; border-radius: 16rpx;
overflow: hidden; overflow: hidden;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
@keyframes show-content-left { @keyframes show-content-left {
0% { 0% {
left: 100%; left: 100%;
} }
100% { 100% {
left: 0; left: 0;
} }
} }
</style> </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!