|
|
@@ -125,7 +125,6 @@ export default window.$crudCommon({
|
|
|
},
|
|
|
watch: {
|
|
|
'params.yearAndMonth'(newVal) {
|
|
|
- console.log(moment(newVal).startOf('months').format('YYYY-MM-DD'), moment(newVal).endOf('months').format('YYYY-MM-DD'))
|
|
|
if (newVal.length > 4) {
|
|
|
// 是否勾选未全年
|
|
|
this.isSelAnnual = false;
|
|
|
@@ -136,20 +135,21 @@ export default window.$crudCommon({
|
|
|
this.getList(this.page);
|
|
|
|
|
|
|
|
|
- // this.option.column.forEach(item => {
|
|
|
- // if (item.prop == 'hireDate') {
|
|
|
- // let lastMonthEndDate = moment(newVal).subtract(1, 'months').endOf('months').format('YYYY-MM-DD'); // 上个月最后一天
|
|
|
- // let monthEndDate = moment(newVal).endOf('months').format('YYYY-MM-DD'); // 当前月最后一天
|
|
|
- // item.defaultValue = monthEndDate;
|
|
|
- // item.pickerOptions = {
|
|
|
- // disabledDate(time) {
|
|
|
+ this.option.column.forEach(item => {
|
|
|
+ if (item.prop == 'hireDate') {
|
|
|
+ let lastMonthEndDate = moment(newVal).subtract(1, 'months').endOf('months').format('YYYY-MM-DD'); // 上个月最后一天
|
|
|
+ let monthEndDate = moment(newVal).endOf('months').format('YYYY-MM-DD'); // 当前月最后一天
|
|
|
+ item.defaultValue = monthEndDate;
|
|
|
+ item.pickerOptions = {
|
|
|
+ disabledDate(time) {
|
|
|
|
|
|
|
|
|
- // return time.getTime() < new Date(lastMonthEndDate).getTime() || time.getTime() > new Date(monthEndDate).getTime();
|
|
|
- // }
|
|
|
- // };
|
|
|
- // }
|
|
|
- // });
|
|
|
+ // return time.getTime() < new Date(lastMonthEndDate).getTime() || time.getTime() > new Date(monthEndDate).getTime();
|
|
|
+ return time.getTime() > new Date(monthEndDate).getTime();
|
|
|
+ }
|
|
|
+ };
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
computed: {
|