Przeglądaj źródła

时间控件优化

dev
nizongfeng 3 lat temu
rodzic
commit
4c91fa1bea
3 zmienionych plików z 87 dodań i 2 usunięć
  1. +32
    -1
      application/admin/view/order_main/index.html
  2. +27
    -0
      application/admin/view/payment_order/index.html
  3. +28
    -1
      application/admin/view/receipt_order/index.html

+ 32
- 1
application/admin/view/order_main/index.html Wyświetl plik

@@ -72,6 +72,7 @@
v-model="search.startTime"
type="date"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
~
@@ -80,6 +81,7 @@
v-model="search.endTime"
value-format="yyyy-MM-dd"
type="date"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
</div>
@@ -115,6 +117,7 @@
v-model="search.startInDate"
type="date"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
~
@@ -123,6 +126,7 @@
v-model="search.endInDate"
value-format="yyyy-MM-dd"
type="date"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
<span>离店时间</span>
@@ -131,6 +135,7 @@
v-model="search.startOutDate"
type="date"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
~
@@ -139,6 +144,7 @@
v-model="search.endOutDate"
value-format="yyyy-MM-dd"
type="date"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
<el-button type="primary" icon="el-icon-search" @click="getData(1)">搜索</el-button>
@@ -376,7 +382,32 @@
{"id": 2, 'value': "已付款"}
],
type_list:[],
supplierList:[]
supplierList:[],
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
shortcuts: [{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date());
}
}, {
text: '昨天',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
picker.$emit('pick', date);
}
}, {
text: '一周前',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', date);
}
}]
},
}
},
created() {


+ 27
- 0
application/admin/view/payment_order/index.html Wyświetl plik

@@ -205,6 +205,7 @@
v-model="orderMainListSearch.startTime"
type="date"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
~
@@ -213,6 +214,7 @@
v-model="orderMainListSearch.endTime"
value-format="yyyy-MM-dd"
type="date"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
<el-button type="primary" icon="el-icon-search" @click="getOrderMainData(1)">搜索</el-button>
@@ -357,6 +359,31 @@
hotelList:[],
itemList:[],
type_list:[],
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
shortcuts: [{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date());
}
}, {
text: '昨天',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
picker.$emit('pick', date);
}
}, {
text: '一周前',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', date);
}
}]
},
}
},
created() {


+ 28
- 1
application/admin/view/receipt_order/index.html Wyświetl plik

@@ -185,6 +185,7 @@
v-model="orderMainListSearch.startTime"
type="date"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
~
@@ -193,6 +194,7 @@
v-model="orderMainListSearch.endTime"
value-format="yyyy-MM-dd"
type="date"
:picker-options="pickerOptions"
placeholder="选择日期">
</el-date-picker>
<el-button type="primary" icon="el-icon-search" @click="getOrderMainData(1)">搜索</el-button>
@@ -315,7 +317,32 @@
{id:11,name:"已取消"}
],
channelList:[],
multipleSelection: []
multipleSelection: [],
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
shortcuts: [{
text: '今天',
onClick(picker) {
picker.$emit('pick', new Date());
}
}, {
text: '昨天',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24);
picker.$emit('pick', date);
}
}, {
text: '一周前',
onClick(picker) {
const date = new Date();
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', date);
}
}]
},
}
},
created() {


Ładowanie…
Anuluj
Zapisz