| | |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :picker-options="pickerOptions" |
| | | format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" |
| | | @change="selectDate" |
| | | ></el-date-picker> |
| | |
| | | components: { TableLayout, BillDetailWindow }, |
| | | data () { |
| | | return { |
| | | value1: [new Date(), new Date()], |
| | | value1: [], |
| | | // 搜索 |
| | | searchForm: { |
| | | endDate: '', |
| | | startDate: '', |
| | | }, |
| | | pickerOptions: {} |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' |
| | | this.pickerOptions.disabledDate = (time) => { |
| | | // 一天 |
| | | let tempTime = 3600 * 1000 * 24 |
| | | return time.getTime() > new Date() - tempTime |
| | | } |
| | | // let tempTime = new Date().getTime() - 3600 * 1000 * 24 |
| | | // this.searchForm.startDate = formatDateTime(new Date(tempTime), 'yyyy-MM-dd') + ' 00:00:00' |
| | | // this.searchForm.endDate = formatDateTime(new Date(tempTime), 'yyyy-MM-dd') + ' 23:59:59' |
| | | // this.value1 = [this.searchForm.startDate, this.searchForm.endDate] |
| | | |
| | | this.search() |
| | | }, |
| | | methods: { |