Commit b198a6cc by 胡悦

历史订单触发底部

1 parent 22891a8c
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
{ {
"path": "pages/detail/detail", "path": "pages/detail/detail",
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom",
"onReachBottonDistance":50
} }
}, },
{ {
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<Tabs :list="list" @tabclick="tabclick" /> <Tabs :list="list" @tabclick="tabclick" />
<view class="card-list"> <view class="card-list">
<!-- <uni-grid :column="3" :show-border="false" :square="false"> <!-- <uni-grid :column="3" :show-border="false" :square="false">
<uni-grid-item v-for="item in historyList" :key="item.id"> <uni-grid-item v-for="item in historyList" :key="item.id"> -->
<view class="card-item"> <view class="card-item" v-for="item in historyList" :key="item.id">
<view class="name">{{ item.customerName }}</view> <view class="name">{{ item.customerName }}</view>
<view class="goods-name">{{ item.goodsName }}</view> <view class="goods-name">{{ item.goodsName }}</view>
<view class="card-info"><view>车架号</view><view>{{ item.carVin || 4654651 }}</view></view> <view class="card-info"><view>车架号</view><view>{{ item.carVin || 4654651 }}</view></view>
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
<view class="card-info"><view>支付方式</view><glsx-image class="pay-type" :src="`media/${payType[item.payType]}.png`" /></view> <view class="card-info"><view>支付方式</view><glsx-image class="pay-type" :src="`media/${payType[item.payType]}.png`" /></view>
<view class="card-info"><view>实收金额</view><view class="price">¥{{ item.equityPrice }}</view></view> <view class="card-info"><view>实收金额</view><view class="price">¥{{ item.equityPrice }}</view></view>
</view> </view>
</uni-grid-item> <!-- </uni-grid-item>
</uni-grid> --> </uni-grid> -->
</view> </view>
<view class="end-text" v-if="isEnd">我是一个有底线的人</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -55,8 +55,10 @@ export default { ...@@ -55,8 +55,10 @@ export default {
1: 'icon-weixin', 1: 'icon-weixin',
2: 'icon-shop' 2: 'icon-shop'
}, },
goodsName: 'M5', goodsName: '',
shopMerchantId: '' shopMerchantId: '',
currentPage: 1,
isEnd: false
} }
}, },
mounted () { mounted () {
...@@ -65,20 +67,26 @@ export default { ...@@ -65,20 +67,26 @@ export default {
this.getQuotationList(); this.getQuotationList();
}, },
methods: { methods: {
async getQuotationList() { async getQuotationList() {
const {goodsName, shopMerchantId} = this const { goodsName, shopMerchantId, currentPage } = this
this.currentPage++
this.isEnd = false
const data = await uni.$api.commonApi.getQuotationList({ const data = await uni.$api.commonApi.getQuotationList({
currentPage: 1, currentPage,
pageSize: 18, pageSize: 18,
merchantId: shopMerchantId, merchantId: shopMerchantId,
orderStatus: 3, orderStatus: 3,
goodsName goodsName
}) })
this.historyList = data.list if (data.list.length !== 0) {
this.historyList = this.historyList.concat(data.list)
} else {
this.isEnd = true
}
}, },
tabclick(index) { tabclick(index) {
console.log(index, '======')
this.goodsName = this.list[index].value this.goodsName = this.list[index].value
this.getQuotationList() this.getQuotationList()
} }
...@@ -113,6 +121,10 @@ export default { ...@@ -113,6 +121,10 @@ export default {
} }
.card-list { .card-list {
margin: 0 72rpx; margin: 0 72rpx;
display: grid;
grid-template-columns: repeat(3,664rpx);
justify-content: center;
grid-gap: 32rpx;
.card-item { .card-item {
margin: 16rpx auto; margin: 16rpx auto;
padding: 24rpx 40rpx; padding: 24rpx 40rpx;
...@@ -155,4 +167,9 @@ export default { ...@@ -155,4 +167,9 @@ export default {
} }
} }
.end-text {
color: #999;
text-align: center;
margin: 50rpx 0;
}
</style> </style>
\ No newline at end of file \ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @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-09 16:51:00 * @LastEditTime: 2024-04-09 20:54:28
--> -->
<template> <template>
<view <view
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
/> />
</view> </view>
<view :class="['view', { showView: id == 6 }]"> <view :class="['view', { showView: id == 6 }]">
<media_6 :views="media[id]" /> <media_6 ref="history" :views="media[id]" />
</view> </view>
<pay-pop ref="pay"></pay-pop> <pay-pop ref="pay"></pay-pop>
<template v-if="type != 'preview'"> <template v-if="type != 'preview'">
...@@ -129,6 +129,9 @@ export default { ...@@ -129,6 +129,9 @@ export default {
this.id = options.id; this.id = options.id;
this.getFindSoureDetail(options.id); this.getFindSoureDetail(options.id);
}, },
async onReachBottom() {
this.$refs.history.getQuotationList()
},
methods: { methods: {
open () { open () {
// 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!