From 58826419a37c0fa746b54c7942877f5c10ddf9d5 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期五, 14 六月 2024 08:36:14 +0800 Subject: [PATCH] feat:添加押运员更改按钮条件 --- pages/driver-page/drvier-my/certifiCate/certifiCate.vue | 26 +++++++++++++++++++------- 1 files changed, 19 insertions(+), 7 deletions(-) diff --git a/pages/driver-page/drvier-my/certifiCate/certifiCate.vue b/pages/driver-page/drvier-my/certifiCate/certifiCate.vue index 3beb32f..a274862 100644 --- a/pages/driver-page/drvier-my/certifiCate/certifiCate.vue +++ b/pages/driver-page/drvier-my/certifiCate/certifiCate.vue @@ -117,11 +117,17 @@ :previewFullImage="true"> </u-upload> </u-form-item> + <u-form-item prop="startTime" + label="杩愯緭璇佸紑濮嬫椂闂�" + labelWidth="20%" + borderBottom> + <uni-datetime-picker v-model="tranSportForm.startTime" type="date" :start="minDate" /> + </u-form-item> <u-form-item prop="expirationTime" label="杩愯緭璇佽繃鏈熸椂闂�" labelWidth="20%" borderBottom> - <uni-datetime-picker v-model="tranSportForm.expirationTime" type="datetime" :start="minDate" /> + <uni-datetime-picker v-model="tranSportForm.expirationTime" type="date" :start="minDate" /> </u-form-item> <view class="adddelete"> <u-button text="娣诲姞椹鹃┒鍛�" @@ -277,6 +283,12 @@ message: '璇烽�夋嫨杩愯緭璇佽繃鏈熸椂闂�', trigger: ['blur', 'change'] }, + startTime:{ + type: 'string', + required: true, + message: '璇烽�夋嫨杩愯緭璇佽繃鏈熸椂闂�', + trigger: ['blur', 'change'] + }, carNo: [{ type: 'string', required: true, @@ -334,10 +346,7 @@ let year = now.getFullYear(); let month = this.padStart(now.getMonth() + 1); // 鏈堜唤鏄粠0寮�濮嬬殑 let day = this.padStart(now.getDate()); - let hour = this.padStart(now.getHours()); - let minute = this.padStart(now.getMinutes()); - let second = this.padStart(now.getSeconds()); - return `${year}-${month}-${day} ${hour}:${minute}:${second}`; + return `${year}-${month}-${day}`; }, padStart(value) { return value.toString().padStart(2, '0'); @@ -455,8 +464,11 @@ supercargoInfo = this.supercargoList.map((item, index) => { return item.driverName+ '|'+item.driverIdcard+"|"+item.driverPhone }).join(","); + if(this.tranSportForm.startTime){ + this.tranSportForm.startTime=this.tranSportForm.startTime+" 00:01" + } if(this.tranSportForm.expirationTime){ - this.tranSportForm.expirationTime=this.tranSportForm.expirationTime.slice(0,16) + this.tranSportForm.expirationTime=this.tranSportForm.expirationTime+" 23:55" } this.$reqPost('addJcroadtransport', { userId:this.userInfo.userId, @@ -467,7 +479,7 @@ }, 'json').then(res => { if (res.code == 0) { this.editTranShow = false; - this.$u.toast('淇敼鎴愬姛'); + this.$u.toast('鎻愪氦鎴愬姛'); this.init(); } else { uni.showToast({ -- Gitblit v1.9.1