Commit 30d78114 by 前端

Merge branch 'v1.0.7' of http://192.168.3.233:8090/glsx/gl_tape into v1.0.7

2 parents b9e93296 722689bc
...@@ -50,15 +50,16 @@ const imgToBase64 = (list, urlKey) => { ...@@ -50,15 +50,16 @@ const imgToBase64 = (list, urlKey) => {
let arr = [], let arr = [],
newList = JSON.parse(JSON.stringify(list)) newList = JSON.parse(JSON.stringify(list))
list.map((e, index) => { list.map((e, index) => {
if(!(urlKey ? e[urlKey] : e).startsWith('https')) return resolve(list) if (!e[urlKey]) return resolve(list)
if (!e[urlKey].startsWith('https')) return resolve(list)
uni.request({ uni.request({
url: urlKey ? e[urlKey] : e, url: urlKey ? e[urlKey] : e,
method: 'GET', method: 'GET',
responseType: 'arraybuffer', responseType: 'arraybuffer',
success: (res) => { success: (res) => {
const base64 = `data:image/png;base64,${uni.arrayBufferToBase64(res.data)}` const base64 = `data:image/png;base64,${uni.arrayBufferToBase64(res.data)}`
if (urlKey) newList[index][urlKey] = base64 newList[index][urlKey] = base64
else newList[index] = base64 newList[index][`original_${urlKey}`] = e[urlKey]
arr.push(e) arr.push(e)
if (arr.length === list.length) resolve(newList) if (arr.length === list.length) resolve(newList)
}, },
......
...@@ -22,13 +22,7 @@ ...@@ -22,13 +22,7 @@
"disableSwipeBack": true "disableSwipeBack": true
} }
}, },
{
"path": "pages/equity/informationEntry",
"style": {
"navigationBarTitleText": "信息录入",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/equity/detail/detail", "path": "pages/equity/detail/detail",
"style": { "style": {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2024-06-20 11:32:52 * @Date: 2024-06-20 11:32:52
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2024-06-24 11:10:47 * @LastEditTime: 2024-06-26 16:28:12
--> -->
<template> <template>
<view class="layout" @click.prevent="touch"> <view class="layout" @click.prevent="touch">
...@@ -301,11 +301,16 @@ export default { ...@@ -301,11 +301,16 @@ export default {
.item-text { .item-text {
position: absolute; position: absolute;
left: 24rpx; left: 0;
bottom: 24rpx; bottom: 0;
font-size: 30rpx; font-size: 30rpx;
color: #ffffff; color: #ffffff;
line-height: 44rpx; width: 100%;
height: 122rpx;
padding: 44rpx 22rpx 22rpx;
background-image: linear-gradient(180deg, #00000000 0%, #000000 100%);
border-radius: 0 0 24rpx 24rpx;
line-height: 66rpx;
} }
.details-container { .details-container {
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="end-text" v-if="historyList.length > 0 && isEnd">我是一个有底线的人</view>
</scroll-view> </scroll-view>
</template> </template>
<template v-else> <template v-else>
...@@ -39,7 +40,7 @@ ...@@ -39,7 +40,7 @@
<view class="no-data-text">暂无数据</view> <view class="no-data-text">暂无数据</view>
</view> </view>
</template> </template>
<view class="end-text" v-if="historyList.length > 0 && isEnd">我是一个有底线的人</view>
</view> </view>
</template> </template>
...@@ -55,7 +56,10 @@ export default { ...@@ -55,7 +56,10 @@ export default {
data() { data() {
return { return {
historyList: [], historyList: [],
isEnd: false isEnd: false,
currentPage: 1,
shopMerchantId: '',
goodsName: 'M5'
} }
}, },
watch: { watch: {
...@@ -108,6 +112,7 @@ export default { ...@@ -108,6 +112,7 @@ export default {
}, },
pageonReachBottom() { pageonReachBottom() {
console.log('xiala ') console.log('xiala ')
this.getQuotationList(false, true)
}, },
// 脱敏 // 脱敏
nameHide(name) { nameHide(name) {
...@@ -213,9 +218,10 @@ export default { ...@@ -213,9 +218,10 @@ export default {
} }
} }
.end-text { .end-text {
width: 100%;
color: #999; color: #999;
text-align: center; text-align: center;
margin: 50rpx 0; padding: 50rpx 0;
} }
.no-data { .no-data {
position: absolute; position: absolute;
......
<template>
<view class="layout">
<view class="bg">
<!-- <image src="../../../assets/images/media/bg-6.webp" /> -->
</view>
<view class="content">
<view class="title">{{ title || "历史成交记录" }}</view>
<template v-if="list.length && shopMerchantId">
<Tabs :list="list" @tabclick="tabclick" ref="tabs" />
</template>
<view class="card-list">
<template v-if="historyList.length > 0">
<view class="card-item" v-for="item in historyList" :key="item.id">
<view class="name"
>{{ nameHide(item.customerName) }}
<view
v-if="item.ownerGender"
:class="[
'sex-avatar sprite-icon',
`icon-${sexType[item.ownerGender]}`,
]"
></view>
</view>
<view class="goods-name">{{ item.goodsName }}</view>
<view class="card-info">
<view>车架号</view>
<view>{{ item.carVin || "-" }}</view>
</view>
<view class="card-info">
<view>工单号</view>
<view>{{ item.payId }}</view>
</view>
<view class="card-info">
<view>订单时间</view>
<view>{{ format(item.createdTime) }}</view>
</view>
<view class="card-info">
<view>交易流水号</view>
<view>{{ item.transactionNo }}</view>
</view>
<view class="card-info">
<view>支付方式</view>
<view
:class="[
'pay-type sprite-icon',
`icon-${payType[item.payType]}`,
]"
></view>
</view>
<view class="card-info">
<view>实收金额</view>
<view class="price">¥{{ accDiv(item.equityPrice) }}</view>
</view>
</view>
</template>
<template v-else>
<view class="no-data">
<glsx-image
class="no-data-img"
src="media/no-data.png"
mode="scaleToFill"
/>
<view class="no-data-text">暂无数据</view>
</view>
</template>
<!-- <uni-grid :column="3" :show-border="false" :square="false">
<uni-grid-item v-for="item in historyList" :key="item.id"> -->
<!-- </uni-grid-item>
</uni-grid> -->
</view>
<view class="end-text" v-if="historyList.length > 0 && isEnd"
>我是一个有底线的人</view
>
</view>
</view>
</template>
<script type="text/ecmascript-6">
import utils from '@/utils/utils';
import Tabs from './Tabs.vue';
export default {
name: 'Media_6',
props: {
show: Boolean,
title: String
},
components: { Tabs },
data () {
return {
list: [
{
tabName: '问界 M5',
value: 'M5'
},
{
tabName: '问界 M7',
value: 'M7'
},
{
tabName: '问界 M9',
value: 'M9'
}
],
historyList: [],
payType: {
1: 'icon-weixin',
2: 'icon-shop'
},
sexType: {
'男': 'icon-male',
'女': 'icon-female'
},
goodsName: 'M5',
shopMerchantId: '',
currentPage: 1,
isEnd: false
}
},
watch: {
show (n) {
if (n) this.init()
},
watchStatus: {
immediate: true,
handler (newval) {
this.$refs?.tabs?.tabClick(0)
}
},
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
},
mounted () {
if (this.show) this.init()
// const { shopMerchantId } = uni.$storage.get("userInfo");
// this.shopMerchantId = shopMerchantId
// this.getQuotationList();
},
methods: {
format (dateTimeStr) {
return utils.convertDateTimeFormat(dateTimeStr, '/')
},
accDiv (val) {
return utils.accDiv(val, 100)
},
init () {
const { shopMerchantId } = uni.$storage.get("userInfo");
this.shopMerchantId = shopMerchantId
this.getQuotationList();
},
async getQuotationList (isSwitch = false, next = false) {
const { goodsName, shopMerchantId, currentPage } = this
if (next) this.currentPage++
const data = await uni.$api.commonApi.getQuotationList({
currentPage,
pageSize: 18,
merchantId: shopMerchantId,
orderStatus: 3,
goodsName
})
if (isSwitch) {
this.historyList = data.list
this.isEnd = false
} else {
if (data.list.length > 0) {
this.historyList = this.historyList.concat(data.list)
this.isEnd = false
} else {
if (this.historyList.length > 9) this.isEnd = true
}
}
},
tabclick (index) {
this.goodsName = this.list[index].value
this.currentPage = 1
this.getQuotationList(true)
},
// 脱敏
nameHide (name) {
return name.substring(0, 1) + '**';
// if (name.length == 2) {
// name = name.substring(0, 1) + '*'; // 截取name 字符串截取第一个字符,
// return name; // 张三显示为张*
// } else if (name.length == 3) {
// name = name.substring(0, 1) + '*' + name.substring(2, 3); // 截取第一个和第三个字符
// return name; // 李思思显示为李*思
// } else if (name.length > 3) {
// name = name.substring(0, 1) + '*' + '*' + name.substring(3, name.length); // 截取第一个和大于第4个字符
// return name; // 王五哈哈显示为王**哈
// }
}
}
}
</script>
<style scoped lang="scss">
.layout {
padding-top: 192rpx;
position: relative;
.bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 240rpx;
image {
width: 100%;
height: 100%;
}
}
.content {
border-radius: 40rpx 40rpx 0 0;
background: linear-gradient(180deg, #f7f9fc 0%, #f7f9fc 100%);
overflow: hidden;
position: relative;
z-index: 1;
.title {
font-size: 40rpx;
line-height: 48rpx;
color: #1a1a1a;
padding: 32rpx 0;
text-align: center;
}
.card-list {
position: relative;
margin: 0 72rpx;
display: grid;
grid-template-columns: repeat(3, 664rpx);
grid-template-rows: 0fr;
justify-content: center;
grid-gap: 32rpx;
min-height: calc(100vh - 416rpx);
.card-item {
margin: 16rpx auto;
padding: 24rpx 40rpx;
width: 664rpx;
// height: 440rpx;
background: #ffffff;
border: 2rpx solid #dce0e6;
border-radius: 16rpx;
height: 448rpx;
.name {
display: flex;
align-items: center;
font-weight: 500;
font-size: 32rpx;
color: #1a1a1a;
margin-bottom: 16rpx;
.sex-avatar {
width: 32rpx;
height: 32rpx;
margin-left: 8rpx;
}
}
.goods-name {
margin-bottom: 16rpx;
font-weight: 500;
font-size: 32rpx;
color: #2c66f7;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.card-info {
display: flex;
justify-content: space-between;
font-size: 24rpx;
color: #999999;
line-height: 32rpx;
margin-bottom: 16rpx;
.pay-type {
width: 32rpx;
height: 32rpx;
}
.price {
font-weight: 600;
font-size: 36rpx;
color: #14cc68;
}
}
}
}
}
}
.end-text {
color: #999;
text-align: center;
margin: 50rpx 0;
}
.no-data {
position: absolute;
left: 50%;
top: 30%;
transform: translate(-50%, -50%);
&-img {
width: 640rpx;
height: 272rpx;
}
&-text {
font-size: 32rpx;
color: #999999;
text-align: center;
margin-top: 24rpx;
}
}
</style>
...@@ -153,7 +153,7 @@ export default { ...@@ -153,7 +153,7 @@ export default {
'问界M7': 1, '问界M7': 1,
'问界M9': 2 '问界M9': 2
}[this.customerInfo.carModel] }[this.customerInfo.carModel]
return this.carTypeList[name || 0] return this.carTypeList[name || 0].url
} }
}, },
methods: { methods: {
......
...@@ -20,26 +20,40 @@ ...@@ -20,26 +20,40 @@
src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/common/icon-car.webp" src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/common/icon-car.webp"
/> />
<view class="container"> <view class="container">
<view class="left-tab" > <view class="left-tab">
<view class="tab-item" v-for="item in list" :key="item.id" @click="tabChange(item)" :class="[item.id == activeIndex ? 'active' : '']">{{item.name}}</view> <view
class="tab-item"
v-for="item in list"
:key="item.id"
@click="tabChange(item)"
:class="[item.id == activeIndex ? 'active' : '']"
>{{item.name}}</view>
</view> </view>
<view class="content"> <view class="content">
<template v-if="activeIndex == 2"> <template v-if="activeIndex == 2">
<image <image
:key="imgKey" :class="direction" :key="imgKey"
:class="direction"
class="content-image" class="content-image"
:src="`https://img02.glsx.com.cn/weapp/resource/app-tape/media/common/${list[activeIndex - 1].urlName}-${tabIndex}.webp`" :src="viewsImg()"
/> />
<view class="content-tab"> <view class="content-tab">
<view class="tab-item" @click="tabSwitch(1)"></view> <view
<view class="tab-item" @click="tabSwitch(2)"></view> class="tab-item"
@click="tabSwitch(1)"
></view>
<view
class="tab-item"
@click="tabSwitch(2)"
></view>
</view> </view>
</template> </template>
<template v-else> <template v-else>
<image <image
:key="imgKey" :class="direction" :key="imgKey"
:class="direction"
class="content-image" class="content-image"
:src="`https://img02.glsx.com.cn/weapp/resource/app-tape/media/common/${list[activeIndex - 1].urlName}.webp`" :src="viewsImg()"
/> />
</template> </template>
</view> </view>
...@@ -83,22 +97,29 @@ export default { ...@@ -83,22 +97,29 @@ export default {
tabIndex: 1 tabIndex: 1
} }
}, },
mounted () { mounted () {
}, },
methods: { methods: {
tabChange(item) { tabChange (item) {
if (this.activeIndex === id) return if (this.activeIndex === id) return
const { id } = item const { id } = item
this.direction = '' this.direction = ''
console.log(id, this.activeIndex,' !!!!!!!!!!') console.log(id, this.activeIndex, ' !!!!!!!!!!')
this.direction = id > this.activeIndex ? 'bottom' : 'top' this.direction = id > this.activeIndex ? 'bottom' : 'top'
this.activeIndex = id this.activeIndex = id
this.imgKey = Date.now() this.imgKey = Date.now()
}, },
tabSwitch(val) { tabSwitch (val) {
console.log(val) console.log(val)
if (val == this.tabIndex) return if (val == this.tabIndex) return
this.tabIndex = val this.tabIndex = val
},
viewsImg () {
let { activeIndex, tabIndex } = this
if (activeIndex == 3) activeIndex = 4
if (activeIndex == 2) return this.views[tabIndex].detailUrl
return this.views[activeIndex - 1].detailUrl
} }
} }
} }
...@@ -142,21 +163,21 @@ export default { ...@@ -142,21 +163,21 @@ export default {
// justify-content: center; // justify-content: center;
width: 100%; width: 100%;
height: 312rpx; height: 312rpx;
background: #F2F5FF; background: #f2f5ff;
border: 4rpx solid hsl(0, 80%, 100%); border: 4rpx solid hsl(0, 80%, 100%);
box-shadow: inset 0 0 16rpx 0 #FFFFFF; box-shadow: inset 0 0 16rpx 0 #ffffff;
border-radius: 32rpx; border-radius: 32rpx;
margin-bottom: 48rpx; margin-bottom: 48rpx;
font-weight: 500; font-weight: 500;
font-size: 40rpx; font-size: 40rpx;
color: #1A1A1A; color: #1a1a1a;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
} }
&.active { &.active {
color: #fff; color: #fff;
background-image: linear-gradient(180deg, #6795FF 0%, #4A84F9 100%); background-image: linear-gradient(180deg, #6795ff 0%, #4a84f9 100%);
box-shadow: 16px 16px 24px 0 #849dc240, inset 0 0 16px 0 #FFFFFF; box-shadow: 16px 16px 24px 0 #849dc240, inset 0 0 16px 0 #ffffff;
} }
} }
} }
......
...@@ -6,7 +6,20 @@ ...@@ -6,7 +6,20 @@
* @LastEditTime: 2024-04-18 11:24:22 * @LastEditTime: 2024-04-18 11:24:22
--> -->
<template> <template>
<view class="information-entry"> <view class="information-entry" v-if="showPayPage">
<view class="nav-bar">
<view
class="back"
@click="$emit('update:showPayPage', false)"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view>
<view class="title">信息录入</view>
</view>
<view class="information-tips">建议同步采集凭证,若接待工作繁忙可在提单环节再进行补充。</view> <view class="information-tips">建议同步采集凭证,若接待工作繁忙可在提单环节再进行补充。</view>
<view class="information-box"> <view class="information-box">
<view <view
...@@ -50,24 +63,11 @@ ...@@ -50,24 +63,11 @@
</view> </view>
<view <view
class="information-done" class="information-done"
@click="done()" @click="$emit('finish')"
>完成接待</view> >完成接待</view>
<!-- <uni-popup ref="preview" type="center" border-radius="10px 10px 0 0"> <!-- <uni-popup ref="preview" type="center" border-radius="10px 10px 0 0">
<image class="preview-img" :src="previewImg" mode="aspectFit" /> <image class="preview-img" :src="previewImg" mode="aspectFit" />
</uni-popup> --> </uni-popup> -->
<MessageBox
ref="tipBox"
@cancel="tipCancel"
@confirm="tipConfirm"
content="系统检测到您在当前页面停留较久,是否仍在客户接待中?"
cancelBtnText="否"
confirmBtnText="是"
></MessageBox>
<finish-step
ref="stepRef"
@submit="submit"
/>
<update-box />
</view> </view>
</template> </template>
<script> <script>
...@@ -88,12 +88,11 @@ const INFO_LIST = [ ...@@ -88,12 +88,11 @@ const INFO_LIST = [
title: "客户延保合同", title: "客户延保合同",
}, },
]; ];
import myClick from "@/mixin/click";
import { mapMutations } from "vuex"; import { mapMutations } from "vuex";
import FinishStep from "@/components/FinishStep.vue";
export default { export default {
components: { FinishStep }, props: {
mixins: [myClick], showPayPage: Boolean
},
data () { data () {
return { return {
infoList: JSON.parse(JSON.stringify(INFO_LIST)), infoList: JSON.parse(JSON.stringify(INFO_LIST)),
...@@ -101,18 +100,12 @@ export default { ...@@ -101,18 +100,12 @@ export default {
isPreview: false, isPreview: false,
}; };
}, },
onLoad (options) {
const text = options.text;
uni.setNavigationBarTitle({
title: text,
});
},
watch: { watch: {
watchBooksList: { watchBooksList: {
immediate: true, immediate: true,
handler (newValue) { handler (newValue) {
console.log(newValue,'===') console.log(newValue, '===')
if(newValue.length) this.infoList = newValue if (newValue.length) this.infoList = newValue
else this.infoList = JSON.parse(JSON.stringify(INFO_LIST)) else this.infoList = JSON.parse(JSON.stringify(INFO_LIST))
}, },
} }
...@@ -122,14 +115,6 @@ export default { ...@@ -122,14 +115,6 @@ export default {
return this.$store.state.audio.booksList return this.$store.state.audio.booksList
} }
}, },
onBackPress () {
// this.infoList = this.infoList.map((item) => {
// if (item.imgUrl) {
// delete item.imgUrl;
// }
// return item;
// });
},
methods: { methods: {
...mapMutations("audio", ["setBooks"]), ...mapMutations("audio", ["setBooks"]),
// 上传图 // 上传图
...@@ -168,20 +153,6 @@ export default { ...@@ -168,20 +153,6 @@ export default {
this.infoList[index].imgUrl = '' this.infoList[index].imgUrl = ''
this.setBooks(utils.deepClone(this.infoList)) this.setBooks(utils.deepClone(this.infoList))
}, },
// 完成接待按钮
done () {
this.$refs.stepRef.open();
},
submit () {
this.$refs.stepRef.close();
this.stopAudio();
// this.infoList = INFO_LIST.map((item) => delete item.imgUrl);
setTimeout(() => {
uni.reLaunch({
url: "/pages/equity/index",
});
}, 1500);
},
// 预览图片 // 预览图片
preview (index) { preview (index) {
this.isPreview = true; this.isPreview = true;
...@@ -214,6 +185,33 @@ export default { ...@@ -214,6 +185,33 @@ export default {
position: relative; position: relative;
background-color: #fff; background-color: #fff;
height: 100vh; height: 100vh;
z-index: 998;
box-sizing: border-box;
padding-top: 72px;
.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;
}
.title {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 500;
font-size: 32rpx;
color: #1a1a1a;
}
}
.information-tips { .information-tips {
background: rgba(44, 102, 247, 0.1); background: rgba(44, 102, 247, 0.1);
color: #2c66f7; color: #2c66f7;
......
...@@ -163,9 +163,10 @@ export default { ...@@ -163,9 +163,10 @@ export default {
// delta: 1, // delta: 1,
// }); // });
// this.stopAudio(); // this.stopAudio();
uni.navigateTo({ // uni.navigateTo({
url: `/pages/equity/informationEntry`, // url: `/pages/equity/informationEntry`,
}); // });
this.$emit('jumpPay')
this.close(); this.close();
}, },
}, },
......
...@@ -60,35 +60,42 @@ ...@@ -60,35 +60,42 @@
<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 ref="pay"></pay-pop> <pay-pop
ref="pay"
@jumpPay="showPayPage = true"
></pay-pop>
<finish-step <finish-step
ref="stepRef" ref="stepRef"
@submit="done" @submit="done"
/> />
<informationEntry
:showPayPage.sync="showPayPage"
@finish="open"
/>
</view> </view>
</template> </template>
<script> <script>
import ToolBox from "@/components/ToolBox.vue"; import ToolBox from "@/components/ToolBox.vue";
import Reception from "./components/Reception.vue"; import Reception from "./components/Reception.vue";
import MediaComponent from "./components/MediaComponent.vue"; import MediaComponent from "./components/MediaComponent.vue";
import Media_6 from "./components/Media_6.vue";
import History from "./components/History.vue"; import History from "./components/History.vue";
import ThreeGuarantees from "./components/ThreeGuarantees.vue"; import ThreeGuarantees from "./components/ThreeGuarantees.vue";
import Guarantee from './components/Guarantee.vue'; import Guarantee from './components/Guarantee.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";
import informationEntry from './components/informationEntry.vue'
export default { export default {
components: { components: {
ToolBox, ToolBox,
Reception, Reception,
MediaComponent, MediaComponent,
Media_6,
payPop, payPop,
FinishStep, FinishStep,
Guarantee, Guarantee,
History, History,
ThreeGuarantees ThreeGuarantees,
informationEntry
}, },
props: { props: {
id: [String, Number], id: [String, Number],
...@@ -105,7 +112,8 @@ export default { ...@@ -105,7 +112,8 @@ export default {
startX: null, startX: null,
startY: null, startY: null,
screenWidth: null, screenWidth: null,
scaleValueObject: {} scaleValueObject: {},
showPayPage: false
}; };
}, },
computed: { computed: {
...@@ -155,6 +163,7 @@ export default { ...@@ -155,6 +163,7 @@ export default {
this.$emit('back') this.$emit('back')
}, },
done (e) { done (e) {
this.showPayPage = false
this.$refs.toolRef.hide() this.$refs.toolRef.hide()
this.$refs.stepRef.close() this.$refs.stepRef.close()
this.$emit('done', e) this.$emit('done', e)
...@@ -183,7 +192,7 @@ export default { ...@@ -183,7 +192,7 @@ export default {
isDistanceSignificant = Math.abs(touch.pageX - startX) > screenWidth / 3, isDistanceSignificant = Math.abs(touch.pageX - startX) > screenWidth / 3,
index = toolList.findIndex(item => item.id == id) index = toolList.findIndex(item => item.id == id)
if (Math.abs(this.startY - touch.pageY) > 100) return if (Math.abs(this.startY - touch.pageY) > 100) return
if(!scaleValueObject[id]) scaleValueObject[id] = 1 if (!scaleValueObject[id]) scaleValueObject[id] = 1
if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1) { if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1) {
const nextId = this.getNextId(index, toolList, startX, halfScreenWidth) const nextId = this.getNextId(index, toolList, startX, halfScreenWidth)
this.$emit('update:id', nextId) this.$emit('update:id', nextId)
...@@ -199,8 +208,8 @@ export default { ...@@ -199,8 +208,8 @@ export default {
return index === 0 ? toolList[toolList.length - 1].id : toolList[index - 1].id; return index === 0 ? toolList[toolList.length - 1].id : toolList[index - 1].id;
} }
}, },
scale(e){ scale (e) {
let {id} = this let { id } = this
this.scaleValueObject[id] = e this.scaleValueObject[id] = e
} }
}, },
......
...@@ -91,6 +91,7 @@ export default { ...@@ -91,6 +91,7 @@ export default {
const mock_data = uni.$storage.get("mock_data") || {}; const mock_data = uni.$storage.get("mock_data") || {};
this.moduleList = mock_data.moduleList || []; this.moduleList = mock_data.moduleList || [];
this.toolList = mock_data.toolList || []; this.toolList = mock_data.toolList || [];
this.get_Vehicle_Sales_Data();
}, },
onShow() { onShow() {
const userInfo = uni.$storage.get("userInfo"); const userInfo = uni.$storage.get("userInfo");
...@@ -113,6 +114,9 @@ export default { ...@@ -113,6 +114,9 @@ export default {
init() { init() {
this.getSoure(); this.getSoure();
this.findPayInfo(); this.findPayInfo();
},
/**获取车型&销售数据 */
get_Vehicle_Sales_Data() {
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
storageCarBrandList = uni.$storage.get("carBrandList"), storageCarBrandList = uni.$storage.get("carBrandList"),
storageEmployeeList = uni.$storage.get("employeeList"), storageEmployeeList = uni.$storage.get("employeeList"),
...@@ -121,6 +125,15 @@ export default { ...@@ -121,6 +125,15 @@ export default {
this.$store.dispatch("setCarBrandsList", storageCarBrandList); this.$store.dispatch("setCarBrandsList", storageCarBrandList);
if (storageEmployeeList) if (storageEmployeeList)
this.$store.dispatch("setEmployeeList", storageEmployeeList); this.$store.dispatch("setEmployeeList", storageEmployeeList);
/**获取销售人员 */
uni.$api.commonApi
.getEmployeeList({
merchantId: shopMerchantId,
})
.then((res) => {
this.$store.dispatch("setEmployeeList", res || []);
uni.$storage.set("employeeList", res || []);
});
/**获取品牌车型 */ /**获取品牌车型 */
uni.$api.commonApi uni.$api.commonApi
.getMerchantCarBrandList([shopMerchantId]) .getMerchantCarBrandList([shopMerchantId])
...@@ -154,15 +167,6 @@ export default { ...@@ -154,15 +167,6 @@ export default {
}); });
} }
}); });
/**获取销售人员 */
uni.$api.commonApi
.getEmployeeList({
merchantId: shopMerchantId,
})
.then((res) => {
this.$store.dispatch("setEmployeeList", res || []);
uni.$storage.set("employeeList", res || []);
});
}, },
// 查询素材 // 查询素材
async getSoure() { async getSoure() {
...@@ -176,7 +180,10 @@ export default { ...@@ -176,7 +180,10 @@ export default {
"detailUrl" "detailUrl"
); );
if (e.carTypeList) if (e.carTypeList)
e.carTypeList = await uni.$api.systemApi.imgToBase64(e.carTypeList); e.carTypeList = await uni.$api.systemApi.imgToBase64(
e.carTypeList,
"url"
);
}); });
this.moduleList = moduleList; this.moduleList = moduleList;
this.toolList = toolList; this.toolList = toolList;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!