From eb49564ab17c6695d8928d5a63a57c58b3cfd79c Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 11 十二月 2024 18:21:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5/pages/staff/vehicle/sendACar.vue | 39 ++++++++++++++++++++++++---------------
1 files changed, 24 insertions(+), 15 deletions(-)
diff --git a/h5/pages/staff/vehicle/sendACar.vue b/h5/pages/staff/vehicle/sendACar.vue
index b243345..53e9809 100644
--- a/h5/pages/staff/vehicle/sendACar.vue
+++ b/h5/pages/staff/vehicle/sendACar.vue
@@ -7,8 +7,7 @@
<u-icon class="ml12" name="arrow-down" color="#999999" />
</view>
<view class="item" @click="isShowCar = true">
- <text v-if="param.carCode">{{ param.carCode }}</text>
- <text v-else class="placeholder9">閫夋嫨杞﹁締</text>
+ <text>{{ param.carCode || '鍏ㄩ儴杞﹁締' }}</text>
<u-icon class="ml12" name="arrow-down" color="#999999" />
</view>
</view>
@@ -47,6 +46,14 @@
</view>
</view>
</view>
+ <view v-if="dataList.length === 0" style="text-align: center">
+ <image
+ src="@/static/empty.png"
+ style="width: 320rpx; margin: 120rpx auto 0"
+ mode="widthFix"
+ />
+ <view class="placeholder9 fs24">鏆傛棤鏁版嵁</view>
+ </view>
</view>
<!-- 閫夋嫨杞﹁締 -->
<u-picker
@@ -83,12 +90,12 @@
carsList: [],
param: {
queryDate: dayjs().format('YYYY-MM-DD'),
- memberId: uni.getStorageSync('userInfo').memberId
+ // memberId: uni.getStorageSync('userInfo').memberId
},
minDate: '',
pagination: {
page: 0,
- capacity: 10
+ capacity: 6
},
total: 0,
dataList: [],
@@ -101,9 +108,12 @@
this.initData()
},
onReachBottom() {
- if (this.total > 10) {
+ console.log('onReachBottom');
+ if (this.total > this.dataList.length) {
this.getList()
- }
+ }else {
+ this.showToast('鏆傛棤鏇村鏁版嵁')
+ }
},
methods: {
getList() {
@@ -117,22 +127,19 @@
...pagination,
model: { ...param }
}).then(res => {
- if (pagination.page === 1) {
- this.dataList = res.data.records
- } else {
- this.dataList = [...list, ...res.data.records]
- }
+ this.dataList = [...this.dataList, ...res.data.records]
this.total = res.data.total
})
},
itemDetail(item) {
uni.navigateTo({
- url: "/pages/staff/vehicle/sendACarDetail?id=" + item.id
+ url: `/pages/staff/vehicle/sendACarDetail?id=${item.id}`
})
},
seletedCar(e) {
const item = e.value[0]
this.pagination.page = 0
+ this.dataList = []
this.$set(this.param, 'carCode', item.code)
this.$set(this.param, 'carId', item.id)
this.isShowCar = false
@@ -143,6 +150,7 @@
this.param.queryDate = dayjs(e.value).format('YYYY-MM-DD')
this.pagination.page = 0
this.isShowDate = false
+ this.dataList = []
this.getList()
})
},
@@ -159,9 +167,9 @@
},
initData() {
getCarsList({
- type: 1
+ type: 0
}).then(res => {
- this.carsList = [res.data]
+ this.carsList = [[{ code: '鍏ㄩ儴杞﹁締', id: '' }, ...res.data]]
})
},
}
@@ -171,6 +179,7 @@
<style lang="scss">
.main_app {
background: #f7f7f7;
+ min-height: 100vh;
padding: 0;
}
.app_header {
@@ -224,7 +233,7 @@
text {
&:nth-child(1) {
font-size: 32rpx;
- font-weight: 500;
+ font-weight: 600;
color: #222222;
}
&:nth-child(2) {
--
Gitblit v1.9.3