From a272691bfb1d184e07b91debd9d38f40d2920917 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期三, 12 六月 2024 10:49:23 +0800
Subject: [PATCH] ''
---
h5/pages/staff/vehicle/sendACar.vue | 44 +++++++++++++++++++++++++-------------------
1 files changed, 25 insertions(+), 19 deletions(-)
diff --git a/h5/pages/staff/vehicle/sendACar.vue b/h5/pages/staff/vehicle/sendACar.vue
index f11605d..4bee49a 100644
--- a/h5/pages/staff/vehicle/sendACar.vue
+++ b/h5/pages/staff/vehicle/sendACar.vue
@@ -18,7 +18,7 @@
class="box_list_item"
v-for="(item, index) in dataList"
:key="index"
- @click="itemDetail(item)"
+ @click="itemDetail(item)"
>
<view class="box_list_item_head">
<text>{{ item.carCode }}</text>
@@ -47,6 +47,7 @@
</view>
</view>
</view>
+ <image v-if="dataList.length === 0" src="@/static/empty.png" style="width: 320rpx;margin: 120rpx auto;" mode="widthFix" />
</view>
<!-- 閫夋嫨杞﹁締 -->
<u-picker
@@ -61,10 +62,11 @@
<!-- 鏃ユ湡 -->
<u-datetime-picker
mode="date"
+ v-model="param.queryDate"
:show="isShowDate"
:minDate="minDate"
+ closeOnClickOverlay
@close="isShowDate = false"
- :closeOnClickOverlay="true"
@confirm="seletedDate"
@cancel="isShowDate = false"
/>
@@ -81,6 +83,7 @@
isShowDate: false,
carsList: [],
param: {
+ queryDate: dayjs().format('YYYY-MM-DD'),
memberId: uni.getStorageSync('userInfo').memberId
},
minDate: '',
@@ -89,7 +92,7 @@
capacity: 10
},
total: 0,
- dataList: []
+ dataList: [],
}
},
onLoad() {
@@ -107,6 +110,10 @@
getList() {
const { param, pagination } = this
pagination.page = pagination.page + 1
+ if (param.queryDate) {
+ param.queryStartTime = param.queryDate + ' 00:00:00'
+ param.queryEndTime = param.queryDate + ' 23:59:59'
+ }
carUseBookPaiche({
...pagination,
model: { ...param }
@@ -119,28 +126,26 @@
this.total = res.data.total
})
},
- itemDetail(item) {
- uni.navigateTo({
- url: "/pages/staff/vehicle/sendACarDetail?id=" + item.id
- })
- },
+ itemDetail(item) {
+ uni.navigateTo({
+ url: "/pages/staff/vehicle/sendACarDetail?id=" + item.id
+ })
+ },
seletedCar(e) {
const item = e.value[0]
+ this.pagination.page = 0
this.$set(this.param, 'carCode', item.code)
this.$set(this.param, 'carId', item.id)
this.isShowCar = false
- if (this.param.carId && this.param.queryDate) {
- this.pagination.page = 0
- this.getList()
- }
+ this.getList()
},
seletedDate(e) {
- this.param.queryDate = dayjs(e.value).format('YYYY-MM-DD')
- this.isShowDate = false
- if (this.param.carId && this.param.queryDate) {
+ setTimeout(() => {
+ this.param.queryDate = dayjs(e.value).format('YYYY-MM-DD')
this.pagination.page = 0
+ this.isShowDate = false
this.getList()
- }
+ })
},
endtimeClose() {
this.param.endTime = ''
@@ -167,6 +172,7 @@
<style lang="scss">
.main_app {
background: #f7f7f7;
+ min-height: 100vh;
padding: 0;
}
.app_header {
@@ -214,9 +220,9 @@
.error {
color: #e0312a;
}
- .grr{
- color: #999999;
- }
+ .grr {
+ color: #999999;
+ }
text {
&:nth-child(1) {
font-size: 32rpx;
--
Gitblit v1.9.3