From cd197acb8e9263f6b91db02d63d887c04699ce6b Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期四, 31 十月 2024 12:03:08 +0800
Subject: [PATCH] ll
---
admin/src/components/operation/OperCarUseBookParamWindow.vue | 85 ++++++++++++++++++++++++------------------
1 files changed, 49 insertions(+), 36 deletions(-)
diff --git a/admin/src/components/operation/OperCarUseBookParamWindow.vue b/admin/src/components/operation/OperCarUseBookParamWindow.vue
index f78ebdd..fddb479 100644
--- a/admin/src/components/operation/OperCarUseBookParamWindow.vue
+++ b/admin/src/components/operation/OperCarUseBookParamWindow.vue
@@ -93,12 +93,12 @@
<h1>娉ㄦ剰浜嬮」锛�</h1>
<div>1銆佸叕鍙歌溅杈嗗鍑洪渶鍔炵悊鐢ㄨ溅鐢宠琛紝缁忔壒鍑嗗悗鏂瑰彲澶栧嚭锛堝�熷嚭锛夈��</div>
<div>2銆佸競澶栫敤杞﹂渶棰嗗瀹℃牳銆�</div>
- <div>
+ <!-- <div>
3銆佸�熷嚭杞﹁締蹇呴』閬靛畧浜ら�氳鍒欙紝瀹夊叏琛岄┒銆傚浜庤溅杈嗗彂鐢熶氦閫氭剰澶栵紝瀵瑰綋浜嬩汉鍙婄涓夋柟閫犳垚浜鸿韩浼ゅ鍙婃崯澶憋紝鍏徃鍙互鍗忓姪澶勭悊淇濋櫓鍏徃璧斿伩鐩稿叧浜嬪疁锛屼絾涓嶆壙鎷呬换浣曡矗浠诲拰璐圭敤銆�
</div>
<div>
4銆佸叕鍙稿�熺粰鐢宠浜虹敤杞︼紝鐢宠鍊熻溅浜轰负绗竴璐d换浜猴紝涓嶅厑璁歌浆鍊熺粰鍏朵粬浜轰娇鐢紝鑻ヨ鍊熺粰浠栦汉浣跨敤銆傝矗浠讳汉瑕佹壙鎷呭叏閮ㄨ矗浠汇��
- </div>
+ </div> -->
</div>
</div>
@@ -107,7 +107,7 @@
title="閫夋嫨鐢ㄨ溅鏃堕棿"
:visible.sync="isShowTime"
append-to-body
- width="600px"
+ width="640px"
>
<el-form :model="form" ref="modalRef" class="el_form" :rules="rules">
<el-form-item label="鐢ㄨ溅鏃ユ湡" prop="dateDay">
@@ -139,7 +139,7 @@
v-for="(item, i) in timeList"
:key="i"
>
- {{ item.startHours }}-{{ item.endHours }}
+ {{ item.startHours }} - {{ item.endHours }}
</div>
</div>
</div>
@@ -168,20 +168,22 @@
<el-form-item label="鐢ㄨ溅寮�濮嬫椂闂�" prop="startTime">
<el-date-picker
v-model="form.startTime"
- format="yyyy-MM-dd HH:mm"
+ format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
- :picker-options="pickerOptions"
- @change="seletedShiwaiDate"
+ :default-time="defaultTime"
+ :picker-options="pickerOptionsNow"
+ @change="seletedShiwaiDate(1)"
>
</el-date-picker>
</el-form-item>
<el-form-item label="鐢ㄨ溅缁撴潫鏃堕棿" prop="endTime">
<el-date-picker
v-model="form.endTime"
- format="yyyy-MM-dd HH:mm"
+ format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
+ :default-time="defaultTime"
:picker-options="pickerOptions"
@change="seletedShiwaiDate"
>
@@ -283,6 +285,7 @@
memberList: [],
timeList: [],
+ defaultTime: dayjs().format('HH:mm:ss'),
selDatetime: '',
colorOptions: [
{ color: this.$store.state.primaryColor, name: '宸查�夋嫨' },
@@ -329,6 +332,11 @@
},
selectableRange: '00:00:00 - 23:59:59'
},
+ pickerOptionsNow: {
+ disabledDate: (time) => {
+ return time.getTime() < Date.now() - 8.64e7;
+ }
+ },
// 楠岃瘉瑙勫垯
rules: {
type: [{ required: true, message: '璇烽�夋嫨', trigger: 'change' }],
@@ -350,16 +358,6 @@
handler (newValue, oldValue) {
if (newValue) {
this.$set(this.pickerOptions, 'selectableRange', this.form.startTime.slice(11, 19) + ' - ' + this.form.endTime.slice(11, 19))
- // this.startPickerOptions = this.startPickerOptions
- }
- },
- deep: true,
- immediate: true
- },
- 'form.startTime': {
- handler (newValue, oldValue) {
- if (newValue) {
- this.$set(this.pickerOptions, 'selectableRange', this.form.startTime.slice(11, 19) + ' - ' + '23:59:59')
// this.startPickerOptions = this.startPickerOptions
}
},
@@ -417,6 +415,7 @@
this.isShowTime = true
} else {
this.clearTime()
+ this.selDatetime = ''
this.isShowShiwai = true
}
},
@@ -505,10 +504,13 @@
seletedDate (e) {
this.gettimes()
},
- seletedShiwaiDate () {
+ seletedShiwaiDate (str) {
const { form } = this
+ if(str && str == 1){
+ this.$set(this.form, 'endTime', '')
+ }
if (form.startTime && form.endTime) {
- this.selDatetime = form.startTime + '-' + form.endTime
+ this.selDatetime = form.startTime + ' - ' + form.endTime
carUseBookList({
carId: form.carId,
startTime: form.startTime,
@@ -533,12 +535,14 @@
},
initData () {
getCarList({
- type: 1
+ type: 0
}).then(res => {
this.carsList = res
})
findTypeMemberInfo({
- type: '2'
+ type: '2',
+ companyType: 1,
+ querySpecial: 1
}).then(res => {
this.memberList = res || []
})
@@ -584,32 +588,41 @@
div {
line-height: 28px;
}
- }
+ }
}
.time_list {
display: flex;
- justify-content: space-between;
flex-wrap: wrap;
.item {
- width: 154px;
- height: 32px;
- line-height: 32px;
- text-align: center;
- background: #f7f7f7;
- border-radius: 4px;
- margin-bottom: 10px;
+ margin-right: 8px;
+ margin-bottom: 8px;
+ font-size: 14px;
+ font-weight: 400;
+ line-height: 14px;
+ width: 124px;
+ height: 36px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ border-radius: 5px;
+ color: #111;
+ border: #cccccc solid 1px;
+ cursor: pointer;
}
.active {
- background-color: $primary-color;
- color: #fff;
+ border-color: $primary-color;
+ background-color: #f6f9fe;
+ color: $primary-color;
}
.disable {
+ color: #fff;
+ border-color: #cccccc;
background-color: #cccccc;
- color: #999999;
}
.hasSub {
- color: #fff;
- background: #cccccc;
+ border-color: #bed6f9;
+ background-color: #bed6f9;
+ color: #fff;
}
}
.color_op {
--
Gitblit v1.9.3