From 6ba1c5a9f73604edb005212b7fed058e185ce295 Mon Sep 17 00:00:00 2001 From: yangan <yangan0921@163.com> Date: 星期四, 18 七月 2024 16:38:41 +0800 Subject: [PATCH] featL库管首页样式更新 --- pages/driver-page/drvier-my/certifiCate/certifiCate.vue | 43 ++++++++++++++++++++----------------------- 1 files changed, 20 insertions(+), 23 deletions(-) diff --git a/pages/driver-page/drvier-my/certifiCate/certifiCate.vue b/pages/driver-page/drvier-my/certifiCate/certifiCate.vue index e3732e7..33f5731 100644 --- a/pages/driver-page/drvier-my/certifiCate/certifiCate.vue +++ b/pages/driver-page/drvier-my/certifiCate/certifiCate.vue @@ -129,13 +129,13 @@ label="杩愯緭璇佸紑濮嬫椂闂�" labelWidth="20%" borderBottom> - <uni-datetime-picker v-model="tranSportForm.startTime" type="date" /> + <uni-datetime-picker v-model="tranSportForm.startTime" type="datetime" /> </u-form-item> <u-form-item prop="expirationTime" label="杩愯緭璇佽繃鏈熸椂闂�" labelWidth="20%" borderBottom> - <uni-datetime-picker v-model="tranSportForm.expirationTime" type="date" :start="minDate" /> + <uni-datetime-picker v-model="tranSportForm.expirationTime" type="datetime" :start="minDate" /> </u-form-item> <view class="adddelete"> <u-button text="娣诲姞椹鹃┒鍛�" @@ -267,18 +267,24 @@ message: '璇峰~鍐欒繍杈撹瘉鍙�', trigger: ['blur', 'change'] }, - expirationTime: { - type: 'string', - required: true, - message: '璇烽�夋嫨杩愯緭璇佸紑濮嬫椂闂�', - trigger: ['blur', 'change'] - }, - startTime:{ + expirationTime: [{ type: 'string', required: true, message: '璇烽�夋嫨杩愯緭璇佽繃鏈熸椂闂�', trigger: ['blur', 'change'] - }, + },{ + pattern: /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/, + message: '璇烽�夋嫨寮�濮嬫椂闂�' + }], + startTime:[{ + type: 'string', + required: true, + message: '璇烽�夋嫨杩愯緭璇佸紑濮嬫椂闂�', + trigger: ['blur', 'change'] + },{ + pattern: /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/, + message: '璇烽�夋嫨寮�濮嬫椂闂�' + }], carNo: [{ type: 'string', required: true, @@ -344,7 +350,10 @@ let year = now.getFullYear(); let month = this.padStart(now.getMonth() + 1); // 鏈堜唤鏄粠0寮�濮嬬殑 let day = this.padStart(now.getDate()); - return `${year}-${month}-${day}`; + 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}`; }, padStart(value) { return value.toString().padStart(2, '0'); @@ -462,12 +471,6 @@ 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+" 23:55" - } this.$reqPost('addJcroadtransport', { userId:this.userInfo.userId, ...this.tranSportForm, @@ -500,12 +503,6 @@ icon: 'none', duration: 2000 }); - if(this.tranSportForm.startTime){ - this.tranSportForm.startTime=this.tranSportForm.startTime.slice(0,10) - } - if(this.tranSportForm.expirationTime){ - this.tranSportForm.expirationTime=this.tranSportForm.expirationTime.slice(0,10) - } } }) } -- Gitblit v1.9.1