Commit bfd65b72 by 李伟康

commit 提交

1 parent 18d25797

7.51 MB | W: | H:

7.68 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -27,7 +27,10 @@ ...@@ -27,7 +27,10 @@
</view> </view>
</view> </view>
</template> </template>
<view class="form-check flex" @click="showphoto = !showphoto"> <view
class="form-check flex"
@click="showphoto = !showphoto"
>
<view :class="['check-box flex',{'checked':showphoto}]"> <view :class="['check-box flex',{'checked':showphoto}]">
<uni-icons <uni-icons
type="checkmarkempty" type="checkmarkempty"
...@@ -46,51 +49,63 @@ ...@@ -46,51 +49,63 @@
:scroll-top="scrollTop" :scroll-top="scrollTop"
@scrolltolower="pageonReachBottom" @scrolltolower="pageonReachBottom"
> >
<view class="card-list"> <template v-for="(i,index) in formatList">
<view <view
class="card-item" :key="index"
v-for="item in list" class="card-box"
:key="item.id"
> >
<template v-if="showphoto"> <view class="card-title">{{i.title}}</view>
<image <view class="card-list">
v-if="item.vdQuotationPaymentDoc && item.vdQuotationPaymentDoc.paymentDocUrl" <view
class="image-box" class="card-item"
:src="item.vdQuotationPaymentDoc.paymentDocUrl" v-for="item in i.list"
/> :key="item.id"
<image >
v-else <template v-if="showphoto">
class="image-box photo" <image
src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/common/pay.webp" v-if="item.vdQuotationPaymentDoc && item.vdQuotationPaymentDoc.paymentDocUrl"
/> class="image-box"
<view class="gradient-overlay"></view> :src="item.vdQuotationPaymentDoc.paymentDocUrl"
</template> />
<view> <image
<view class="name">{{ nameHide(item.customerName) }}</view> v-else
<!-- <view class="name">{{ item.id }}</view> --> class="image-box photo"
<view class="goods-name">{{ item.goodsName }}</view> src="https://img02.glsx.com.cn/weapp/resource/app-tape/media/common/pay.webp"
<view class="card-info"> />
<view class="label">车架号</view> <view class="gradient-overlay"></view>
<view class="value">{{ item.carVin || '-' }}</view> </template>
</view> <template v-else>
<view class="card-info"> <!-- 1:线上微信支付,2:线下收款,3:POS机收款,4:支付宝支付,5:嘀加收款 -->
<view class="label">工单号</view> <div :class="['payType sprite-icon',`icon-payType-${item.payType}`]"></div>
<view class="value">{{ item.payId }}</view> </template>
</view> <view>
<view class="card-info"> <view class="name">{{ nameHide(item.customerName) }}</view>
<view class="label">交易流水号</view> <!-- <view class="name">{{ item.id }}</view> -->
<view class="value">{{ item.transactionNo }}</view> <view class="goods-name">{{ item.goodsName }}</view>
</view> <view class="card-info">
<view class="card-info"> <view class="label">车架号</view>
<view class="label">实收金额</view> <view class="value">{{ item.carVin || '-' }}</view>
<view class="price"> </view>
<view class="flag">¥</view> <view class="card-info">
{{ accDiv(item.equityPrice) }} <view class="label">工单号</view>
<view class="value">{{ item.payId }}</view>
</view>
<view class="card-info">
<view class="label">交易流水号</view>
<view class="value">{{ item.transactionNo }}</view>
</view>
<view class="card-info">
<view class="label">实收金额</view>
<view class="price">
<view class="flag">¥</view>
{{ accDiv(item.equityPrice) }}
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </template>
<view <view
class="end-text" class="end-text"
v-if="list.length > 0 && isEnd" v-if="list.length > 0 && isEnd"
...@@ -120,6 +135,7 @@ ...@@ -120,6 +135,7 @@
import utils from '@/utils/utils' import utils from '@/utils/utils'
import Record from '@/mixin/record' import Record from '@/mixin/record'
import CarBrands from '@/components/CarBrands.vue' import CarBrands from '@/components/CarBrands.vue'
import dayjs from 'dayjs'
export default { export default {
components: { CarBrands }, components: { CarBrands },
name: 'History', name: 'History',
...@@ -146,6 +162,7 @@ export default { ...@@ -146,6 +162,7 @@ export default {
customerInfo: {}, customerInfo: {},
focusIndex: -1, focusIndex: -1,
showphoto: false, showphoto: false,
formatList: []
} }
}, },
watch: { watch: {
...@@ -200,16 +217,59 @@ export default { ...@@ -200,16 +217,59 @@ export default {
async getQuotationList () { async getQuotationList () {
const { shopMerchantId, pageNum, pageSize } = this, const { shopMerchantId, pageNum, pageSize } = this,
goodsName = this.customerInfo.carModel goodsName = this.customerInfo.carModel
// try {
// await this.getList('getQuotationList', {
// merchantId: shopMerchantId,
// pageNum,
// pageSize,
// goodsName: '',
// orderStatus: 3
// })
// if (!goodsName && this.pageNum == 1 && this.list.length) uni.setStorageSync(`${shopMerchantId}-historyList`, this.list)
// } catch (error) {
// if (!goodsName && this.pageNum == 1) this.list = uni.getStorageSync(`${this.shopMerchantId}-historyList`)
// }
try { try {
await this.getList('getQuotationList', { uni.showLoading({
mask: true
});
let { list, total } = await uni.$api.boutiqueApi.getQuotationList({
merchantId: shopMerchantId, merchantId: shopMerchantId,
pageNum, pageNum,
pageSize, pageSize,
goodsName, goodsName: '',
orderStatus: 3 orderStatus: 3
});
uni.hideLoading();
// this.list = [...(pageNum == 1 ? [] : this.list), ...list];
this.list = [...(pageNum == 1 ? [] : this.list), ...list];
let previousCreatedTime = null
let _list = []
this.list.map(e => {
let createdTime = dayjs(e.createdTime).format("YYYY年MM月DD日")
if (createdTime !== previousCreatedTime) {
_list.push({
title: createdTime,
list: []
})
previousCreatedTime = createdTime
}
}) })
_list.map(e => {
this.list.map(i => {
let createdTime = dayjs(i.createdTime).format("YYYY年MM月DD日")
if (e.title === createdTime) e.list.push(i)
})
})
this.formatList = _list
this.flag = true;
this.total = total;
if (!goodsName && this.pageNum == 1 && this.list.length) uni.setStorageSync(`${shopMerchantId}-historyList`, this.list) if (!goodsName && this.pageNum == 1 && this.list.length) uni.setStorageSync(`${shopMerchantId}-historyList`, this.list)
} catch (error) { } catch (error) {
uni.hideLoading()
this.flag = true;
this.isEnd = true
if (!goodsName && this.pageNum == 1) this.list = uni.getStorageSync(`${this.shopMerchantId}-historyList`) if (!goodsName && this.pageNum == 1) this.list = uni.getStorageSync(`${this.shopMerchantId}-historyList`)
} }
}, },
...@@ -382,12 +442,51 @@ export default { ...@@ -382,12 +442,51 @@ export default {
.has-tabs { .has-tabs {
padding-top: toRpx(360); padding-top: toRpx(360);
} }
.card-box {
position: relative;
&::before {
position: absolute;
height: calc(100% - #{toRpx(22)});
width: toRpx(3);
background: #fff;
content: '';
top: toRpx(22);
left: toRpx(84);
}
&::after {
content: '';
position: absolute;
width: toRpx(18);
height: toRpx(3);
background: #fff;
bottom: 0;
left: toRpx(76);
}
}
.card-title {
font-weight: 500;
font-size: toRpx(32);
color: #333333;
line-height: toRpx(44);
margin: toRpx(24) 0 toRpx(24) toRpx(122);
position: relative;
&::before {
width: toRpx(18);
height: toRpx(18);
background: #ffffff;
position: absolute;
top: 50%;
transform: translateY(-50%);
border-radius: 100%;
left: toMinusRpx(46);
content: '';
}
}
.card-list { .card-list {
// width: 100%;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
gap:toRpx(24) toRpx(48); gap: toRpx(24) toRpx(48);
padding: 0 toRpx(64) toRpx(48) toRpx(122); padding: 0 toRpx(64) 0 toRpx(122);
.card-item { .card-item {
background-color: #f7f9ff; background-color: #f7f9ff;
border-radius: toRpx(32); border-radius: toRpx(32);
...@@ -409,6 +508,13 @@ export default { ...@@ -409,6 +508,13 @@ export default {
border-radius: 0 toRpx(32) toRpx(32) 0; border-radius: 0 toRpx(32) toRpx(32) 0;
z-index: -1; z-index: -1;
} }
.payType {
position: absolute;
width: toRpx(160);
height: toRpx(160);
right: toRpx(16);
bottom: toRpx(16);
}
.name { .name {
font-weight: 500; font-weight: 500;
font-size: toRpx(32); font-size: toRpx(32);
......
...@@ -6,28 +6,85 @@ ...@@ -6,28 +6,85 @@
* @LastEditTime: 2024-12-25 18:52:46 * @LastEditTime: 2024-12-25 18:52:46
--> -->
<template> <template>
<view class="detail-box" @dblclick="dbClick"> <view
<view class="nav-bar" :style="{ 'z-index': backZindex }"> class="detail-box"
<view class="back" @click="back"> @dblclick="dbClick"
<uni-icons type="left" :size="20" color="#000"></uni-icons> >
<view
class="nav-bar"
:style="{ 'z-index': backZindex }"
>
<view
class="back"
@click="back"
>
<uni-icons
type="left"
:size="20"
color="#000"
></uni-icons>
</view> </view>
</view> </view>
<template v-for="(item, index) in media"> <template v-for="(item, index) in media">
<view :class="['view', { showView: id == item.id }, modeName]" :key="index" @touchstart.stop="touchStart" @touchend.stop="touchEnd"> <view
<component @full="handleFull" :detail="item" :is="item.componentName" :views="item.receptionSourceDetailList || []" :penSwitch="penSwitch" :show="id == item.id" :ref="'media' + item.id" :title="item.detailTitle || ''" :madiaId="item.id" @scale="scale" :ulList="item.ulList" :screenList="item.screenList" @onProductModel="productModelStatus = $event" :isPreview="isPreview" :isByd="isByd" :hasCarBrand="item.hasCarBrand" /> :class="['view', { showView: id == item.id }, modeName]"
:key="index"
@touchstart.stop="touchStart"
@touchend.stop="touchEnd"
>
<component
@full="handleFull"
:detail="item"
:is="item.componentName"
:views="item.receptionSourceDetailList || []"
:penSwitch="penSwitch"
:show="id == item.id"
:ref="'media' + item.id"
:title="item.detailTitle || ''"
:madiaId="item.id"
@scale="scale"
:ulList="item.ulList"
:screenList="item.screenList"
@onProductModel="productModelStatus = $event"
:isPreview="isPreview"
:isByd="isByd"
:hasCarBrand="item.hasCarBrand"
/>
</view> </view>
</template> </template>
<template v-if="type != 'preview'"> <template v-if="type != 'preview'">
<template v-if="backZindex"> <template v-if="backZindex">
<tool-box ref="toolRef" :data="toolList" :type="type" @choose="choose" @finish="open" :id="id" @toPay="toPay" :showPayBtn="watchPayInfo" /> <tool-box
<view class="pen-box" @click="drawStatus = !drawStatus"> ref="toolRef"
:data="pageToolList"
:type="type"
@choose="choose"
@finish="open"
:id="id"
@toPay="toPay"
:showPayBtn="watchPayInfo"
/>
<view
class="pen-box"
@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>
</template> </template>
<pay-pop ref="pay" @jumpPay="showPayPage = true"></pay-pop> <pay-pop
<finish-step ref="stepRef" @submit="done" :titleTips="finishTips" /> ref="pay"
<informationEntry :showPayPage.sync="showPayPage" @finish="open" /> @jumpPay="showPayPage = true"
></pay-pop>
<finish-step
ref="stepRef"
@submit="done"
:titleTips="finishTips"
/>
<informationEntry
:showPayPage.sync="showPayPage"
@finish="open"
/>
</view> </view>
</template> </template>
<script> <script>
...@@ -65,10 +122,11 @@ export default { ...@@ -65,10 +122,11 @@ export default {
type: String, type: String,
default: 'preview' default: 'preview'
}, },
toolList: Array toolList: Array,
aitoCarModelIds: Array
}, },
mixins: [receptionTrackMixin], mixins: [receptionTrackMixin],
data() { data () {
return { return {
backZindex: 9, backZindex: 9,
drawStatus: false, drawStatus: false,
...@@ -78,60 +136,83 @@ export default { ...@@ -78,60 +136,83 @@ export default {
scaleValueObject: {}, scaleValueObject: {},
showPayPage: false, showPayPage: false,
productModelStatus: false, productModelStatus: false,
modeName: '' modeName: '',
pageToolList: []
} }
}, },
computed: { computed: {
watchStatus() { channelType () {
const { channelType } = uni.$storage.get('userInfo')
return channelType
},
watchStatus () {
return this.$store.state.user.historyStatus return this.$store.state.user.historyStatus
}, },
penSwitch() { penSwitch () {
return !this.isPreview && this.drawStatus return !this.isPreview && this.drawStatus
}, },
watchPayInfo() { watchPayInfo () {
return this.$store.state.user.paymentType.length ? true : false return this.$store.state.user.paymentType.length ? true : false
}, },
title() { title () {
let { id } = this, let { id } = this,
name = this.media.find(e => e.id == id)?.detailTitle || '' name = this.media.find(e => e.id == id)?.detailTitle || ''
return name return name
}, },
finishTips() { finishTips () {
const { channelType } = uni.$storage.get('userInfo')
let text = '' let text = ''
if (channelType == 3) text = '检测到“汽车保险告知书”中未填写客户档案,请填写后再完成接待。' if (this.channelType == 3) text = '检测到“汽车保险告知书”中未填写客户档案,请填写后再完成接待。'
return text return text
}, },
isByd() { isByd () {
const { channelType } = uni.$storage.get('userInfo') return this.channelType == 2
return channelType == 2
}, },
isPreview() { isPreview () {
return this.type == 'preview' return this.type == 'preview'
} },
CarModelId () {
return this.$store.state.user.customerInfo.carModelId
},
}, },
watch: { watch: {
watchStatus: { watchStatus: {
immediate: true, immediate: true,
handler(newval) { handler (newval) {
if (newval) this.drawStatus = false if (newval) this.drawStatus = false
} }
} },
CarModelId: {
immediate: true,
handler (newval) {
if (this.channelType == 1) {
const isAito = this.aitoCarModelIds.findIndex(e => e == newval)
if (isAito == -1) {
this.pageToolList = this.toolList.filter(e => !e.isAito)
} else this.pageToolList = this.toolList
}
}
},
toolList: {
immediate: true,
handler (newval) {
this.pageToolList = newval
}
},
}, },
mounted() { mounted () {
const systemInfo = uni.getSystemInfoSync() const systemInfo = uni.getSystemInfoSync()
this.screenWidth = systemInfo.screenWidth this.screenWidth = systemInfo.screenWidth
}, },
methods: { methods: {
...mapMutations('audio', ['setReceptionStatus']), ...mapMutations('audio', ['setReceptionStatus']),
open() { open () {
this.$refs.stepRef.open() this.$refs.stepRef.open()
}, },
handleFull(val) { handleFull (val) {
this.backZindex = val ? 0 : 9 this.backZindex = val ? 0 : 9
}, },
/**切换素材 */ /**切换素材 */
choose(e) { choose (e) {
Object.keys(this.$refs).map(refKey => { Object.keys(this.$refs).map(refKey => {
let ref = this.$refs[refKey] let ref = this.$refs[refKey]
if (ref) { if (ref) {
...@@ -143,42 +224,42 @@ export default { ...@@ -143,42 +224,42 @@ export default {
this.$emit('update:id', e.id) this.$emit('update:id', e.id)
uni.$logger.local.info(`预览${e.title}`) uni.$logger.local.info(`预览${e.title}`)
}, },
back() { back () {
this.$refs?.toolRef?.hide() this.$refs?.toolRef?.hide()
this.$emit('back') this.$emit('back')
}, },
done(e) { done (e) {
this.showPayPage = false this.showPayPage = false
this.$refs.toolRef.hide() this.$refs.toolRef.hide()
this.$refs.stepRef.close() this.$refs.stepRef.close()
this.receptionTrackLeave() this.receptionTrackLeave()
this.$emit('done', e) this.$emit('done', e)
}, },
toPay() { toPay () {
this.$refs.pay.show() this.$refs.pay.show()
}, },
dbClick() { dbClick () {
if (!this.isPreview) this.drawStatus = !this.drawStatus if (!this.isPreview) this.drawStatus = !this.drawStatus
}, },
touchStart(e) { touchStart (e) {
if (!this.drawStatus && e.changedTouches?.length) { if (!this.drawStatus && e.changedTouches?.length) {
this.startX = e.changedTouches[0].pageX this.startX = e.changedTouches[0].pageX
this.startY = e.changedTouches[0].pageY this.startY = e.changedTouches[0].pageY
} }
}, },
touchEnd(e) { touchEnd (e) {
if (this.modeName) return if (this.modeName) return
try { try {
let { toolList, drawStatus, startX, screenWidth, id, scaleValueObject, productModelStatus } = this let { pageToolList, drawStatus, startX, screenWidth, id, scaleValueObject, productModelStatus } = this
if (!e || !e.changedTouches || drawStatus || toolList.length == 0 || e.changedTouches.length === 0) return if (!e || !e.changedTouches || drawStatus || pageToolList.length == 0 || e.changedTouches.length === 0) return
let halfScreenWidth = screenWidth / 2, let halfScreenWidth = screenWidth / 2,
touch = e.changedTouches[0], touch = e.changedTouches[0],
isDistanceSignificant = Math.abs(touch.pageX - startX) > screenWidth / 6, isDistanceSignificant = Math.abs(touch.pageX - startX) > screenWidth / 6,
index = toolList.findIndex(item => item.id == id) index = pageToolList.findIndex(item => item.id == id)
if (Math.abs(this.startY - touch.pageY) > 150) return if (Math.abs(this.startY - touch.pageY) > 150) return
if (!scaleValueObject[id]) scaleValueObject[id] = 1 if (!scaleValueObject[id]) scaleValueObject[id] = 1
if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1 && !productModelStatus) { if (isDistanceSignificant && index != -1 && scaleValueObject[id] == 1 && !productModelStatus) {
const { nextId, modeName, title } = this.getNextId(index, toolList, startX, halfScreenWidth) const { nextId, modeName, title } = this.getNextId(index, pageToolList, startX, halfScreenWidth)
this.modeName = modeName this.modeName = modeName
this.receptionTrackLeave() this.receptionTrackLeave()
this.$emit('update:id', nextId) this.$emit('update:id', nextId)
...@@ -191,14 +272,14 @@ export default { ...@@ -191,14 +272,14 @@ export default {
console.log(error) console.log(error)
} }
}, },
getNextId(index, toolList, startX, halfScreenWidth) { getNextId (index, pageToolList, startX, halfScreenWidth) {
let nextItem = {}, let nextItem = {},
modeName = '' modeName = ''
if (startX > halfScreenWidth) { if (startX > halfScreenWidth) {
nextItem = index === toolList.length - 1 ? toolList[0] : toolList[index + 1] nextItem = index === pageToolList.length - 1 ? pageToolList[0] : pageToolList[index + 1]
modeName = 'to-right' modeName = 'to-right'
} else { } else {
nextItem = index === 0 ? toolList[toolList.length - 1] : toolList[index - 1] nextItem = index === 0 ? pageToolList[pageToolList.length - 1] : pageToolList[index - 1]
modeName = 'to-left' modeName = 'to-left'
} }
return { return {
...@@ -207,7 +288,7 @@ export default { ...@@ -207,7 +288,7 @@ export default {
title: nextItem.title title: nextItem.title
} }
}, },
scale(e) { scale (e) {
let { id } = this let { id } = this
this.scaleValueObject[id] = e this.scaleValueObject[id] = e
} }
...@@ -228,7 +309,7 @@ export default { ...@@ -228,7 +309,7 @@ export default {
left: 0; left: 0;
top: toRpx(48); top: toRpx(48);
z-index: 9; z-index: 9;
pointer-events: none; pointer-events: none;
.back { .back {
height: 100%; height: 100%;
aspect-ratio: 1/1; aspect-ratio: 1/1;
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
:media="moduleList" :media="moduleList"
:type.sync="type" :type.sync="type"
:toolList="toolList" :toolList="toolList"
:aitoCarModelIds="aitoCarModelIds"
@back="back" @back="back"
@done="done" @done="done"
ref="detail" ref="detail"
...@@ -80,7 +81,8 @@ export default { ...@@ -80,7 +81,8 @@ export default {
type: '', type: '',
chooseItem: {}, chooseItem: {},
tabIndex: 0, tabIndex: 0,
recording: false recording: false,
aitoCarModelIds:[]
} }
}, },
computed: { computed: {
...@@ -207,7 +209,7 @@ export default { ...@@ -207,7 +209,7 @@ export default {
) )
this.setViewInfo(moduleList, toolList) this.setViewInfo(moduleList, toolList)
} else { } else {
let { moduleList, toolList, default_moduleList, default_toolList, boutiqueDefaultCarBrandId } = await uni.$api.systemApi.getMockData(true) let { moduleList, toolList, default_moduleList, default_toolList, boutiqueDefaultCarBrandId,aitoCarModelIds } = await uni.$api.systemApi.getMockData(true)
if (this.channelType == 3) { if (this.channelType == 3) {
let configList let configList
try { try {
...@@ -247,6 +249,7 @@ export default { ...@@ -247,6 +249,7 @@ export default {
) )
this.setViewInfo(default_moduleList, default_toolList) this.setViewInfo(default_moduleList, default_toolList)
} else { } else {
this.aitoCarModelIds = aitoCarModelIds
/**默认问界 */ /**默认问界 */
moduleList = await Promise.all( moduleList = await Promise.all(
moduleList.map(async e => { moduleList.map(async e => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!