Commit b56adea9 by 李伟康

commit 清空操作缓存

1 parent 1acc5f01
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
<wnCanvas <wnCanvas
saveImageType="3" saveImageType="3"
:drawImage="i.detailUrl" :drawImage="i.detailUrl"
:drawStatus="penSwitch" :drawStatus="penSwitch"
:canvasId="`c-2-${index}`" :canvasId="`c-2-${index}`"
></wnCanvas> ></wnCanvas>
...@@ -40,7 +39,7 @@ export default { ...@@ -40,7 +39,7 @@ export default {
props: { props: {
views: Array, views: Array,
penSwitch: Boolean, penSwitch: Boolean,
title:String title: String
}, },
name: 'Media_2', name: 'Media_2',
data () { data () {
...@@ -48,6 +47,19 @@ export default { ...@@ -48,6 +47,19 @@ export default {
viewIndex: 0 viewIndex: 0
} }
}, },
watch: {
watchStatus: {
immediate: true,
handler (newval) {
this.$refs.tabs.tabClick(0)
}
},
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
},
mounted () { mounted () {
}, },
methods: { methods: {
...@@ -68,14 +80,14 @@ export default { ...@@ -68,14 +80,14 @@ export default {
top: 0; top: 0;
width: 100%; width: 100%;
height: 240rpx; height: 240rpx;
image{ image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.content { .content {
border-radius: 40rpx 40rpx 0 0; border-radius: 40rpx 40rpx 0 0;
background: #FCFBF9; background: #fcfbf9;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
z-index: 1; z-index: 1;
...@@ -92,7 +104,7 @@ export default { ...@@ -92,7 +104,7 @@ export default {
.left { .left {
animation: show-view-left 0.3s; animation: show-view-left 0.3s;
} }
.right{ .right {
animation: show-view-right 0.3s; animation: show-view-right 0.3s;
} }
} }
......
...@@ -49,6 +49,19 @@ export default { ...@@ -49,6 +49,19 @@ export default {
viewIndex: 0 viewIndex: 0
} }
}, },
watch: {
watchStatus: {
immediate: true,
handler (newval) {
this.$refs.tabs.tabClick(0)
}
},
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
},
mounted () { mounted () {
}, },
methods: { methods: {
......
...@@ -6,39 +6,47 @@ ...@@ -6,39 +6,47 @@
<view class="content"> <view class="content">
<view class="title">{{title||'历史成交记录'}}</view> <view class="title">{{title||'历史成交记录'}}</view>
<template v-if="list.length && shopMerchantId"> <template v-if="list.length && shopMerchantId">
<Tabs :list="list" @tabclick="tabclick" /> <Tabs
:list="list"
@tabclick="tabclick"
ref="tabs"
/>
</template> </template>
<view class="card-list"> <view class="card-list">
<template v-if="historyList.length > 0"> <template v-if="historyList.length > 0">
<view class="card-item" v-for="item in historyList" :key="item.id"> <view
class="card-item"
v-for="item in historyList"
:key="item.id"
>
<view class="name">{{ nameHide(item.customerName) }} <view class="name">{{ nameHide(item.customerName) }}
<view :class="['sex-avatar sprite-icon',`icon-${sexType[item.ownerGender]}`]"></view> <view :class="['sex-avatar sprite-icon',`icon-${sexType[item.ownerGender]}`]"></view>
</view> </view>
<view class="goods-name">{{ item.goodsName }}</view> <view class="goods-name">{{ item.goodsName }}</view>
<view class="card-info" <view class="card-info">
><view>车架号</view <view>车架号</view>
><view>{{ item.carVin || '-' }}</view></view <view>{{ item.carVin || '-' }}</view>
> </view>
<view class="card-info" <view class="card-info">
><view>工单号</view><view>{{ item.payId }}</view></view <view>工单号</view>
> <view>{{ item.payId }}</view>
<view class="card-info" </view>
><view>订单时间</view> <view class="card-info">
<view>订单时间</view>
<view>{{ format(item.createdTime) }}</view> <view>{{ format(item.createdTime) }}</view>
</view> </view>
<view class="card-info" <view class="card-info">
><view>交易流水号</view <view>交易流水号</view>
><view>{{ item.transactionNo }}</view></view <view>{{ item.transactionNo }}</view>
> </view>
<view class="card-info" <view class="card-info">
><view>支付方式</view <view>支付方式</view>
>
<view :class="['pay-type sprite-icon',`icon-${payType[item.payType]}`]"></view> <view :class="['pay-type sprite-icon',`icon-${payType[item.payType]}`]"></view>
</view> </view>
<view class="card-info" <view class="card-info">
><view>实收金额</view <view>实收金额</view>
><view class="price">¥{{ accDiv(item.equityPrice) }}</view></view <view class="price">¥{{ accDiv(item.equityPrice) }}</view>
> </view>
</view> </view>
</template> </template>
<template v-else> <template v-else>
...@@ -57,9 +65,10 @@ ...@@ -57,9 +65,10 @@
<!-- </uni-grid-item> <!-- </uni-grid-item>
</uni-grid> --> </uni-grid> -->
</view> </view>
<view class="end-text" v-if="historyList.length > 0 && isEnd" <view
>我是一个有底线的人</view class="end-text"
> v-if="historyList.length > 0 && isEnd"
>我是一个有底线的人</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -70,10 +79,10 @@ import Tabs from './Tabs.vue'; ...@@ -70,10 +79,10 @@ import Tabs from './Tabs.vue';
export default { export default {
name: 'Media_6', name: 'Media_6',
props: { props: {
show:Boolean, show: Boolean,
title:String title: String
}, },
components: {Tabs}, components: { Tabs },
data () { data () {
return { return {
list: [ list: [
...@@ -105,13 +114,24 @@ export default { ...@@ -105,13 +114,24 @@ export default {
isEnd: false isEnd: false
} }
}, },
watch:{ watch: {
show(n){ show (n) {
if(n) this.init() if (n) this.init()
},
watchStatus: {
immediate: true,
handler (newval) {
this.$refs.tabs.tabClick(0)
} }
}, },
},
computed: {
watchStatus () {
return this.$store.state.user.historyStatus
},
},
mounted () { mounted () {
if(this.show) this.init() if (this.show) this.init()
// const { shopMerchantId } = uni.$storage.get("userInfo"); // const { shopMerchantId } = uni.$storage.get("userInfo");
// this.shopMerchantId = shopMerchantId // this.shopMerchantId = shopMerchantId
// this.getQuotationList(); // this.getQuotationList();
...@@ -119,20 +139,20 @@ export default { ...@@ -119,20 +139,20 @@ export default {
methods: { methods: {
format(dateTimeStr) { format (dateTimeStr) {
return utils.convertDateTimeFormat(dateTimeStr, '/') return utils.convertDateTimeFormat(dateTimeStr, '/')
}, },
accDiv(val) { accDiv (val) {
return utils.accDiv(val, 100) return utils.accDiv(val, 100)
}, },
init(){ init () {
const { shopMerchantId } = uni.$storage.get("userInfo"); const { shopMerchantId } = uni.$storage.get("userInfo");
this.shopMerchantId = shopMerchantId this.shopMerchantId = shopMerchantId
this.getQuotationList(); this.getQuotationList();
}, },
async getQuotationList(isSwitch = false) { async getQuotationList (isSwitch = false, next = false) {
const { goodsName, shopMerchantId, currentPage } = this const { goodsName, shopMerchantId, currentPage } = this
this.currentPage++ if (next) this.currentPage++
const data = await uni.$api.commonApi.getQuotationList({ const data = await uni.$api.commonApi.getQuotationList({
currentPage, currentPage,
pageSize: 18, pageSize: 18,
...@@ -153,13 +173,13 @@ export default { ...@@ -153,13 +173,13 @@ export default {
} }
}, },
tabclick(index) { tabclick (index) {
this.goodsName = this.list[index].value this.goodsName = this.list[index].value
this.currentPage = 1 this.currentPage = 1
this.getQuotationList(true) this.getQuotationList(true)
}, },
// 脱敏 // 脱敏
nameHide(name) { nameHide (name) {
return name.substring(0, 1) + '**'; return name.substring(0, 1) + '**';
// if (name.length == 2) { // if (name.length == 2) {
// name = name.substring(0, 1) + '*'; // 截取name 字符串截取第一个字符, // name = name.substring(0, 1) + '*'; // 截取name 字符串截取第一个字符,
......
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
this.$emit('done', e) this.$emit('done', e)
}, },
pageonReachBottom () { pageonReachBottom () {
if (this.id == 6) this.$refs.media6[0].getQuotationList(); if (this.id == 6) this.$refs.media6[0].getQuotationList(false, true);
}, },
toPay () { toPay () {
this.$refs.pay.show() this.$refs.pay.show()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!