let pickDate = moment(this.searchForm.date);
let firstDay = pickDate.day(0).format('YYYYMMDD');//上周天
let lastDay = pickDate.day(7).format('YYYYMMDD');//周天
let previousDate = moment(this.searchForm.date).subtract(1, "weeks").format("YYYY-MM-DD");//上周
let diff = pickDate.diff(moment(), 'days');//相差几天
 
 
var today = moment().format('YYYY-MM-DD');
var last7 = moment().subtract('days', 6).format('YYYY-MM-DD');//7天前
var lart30 = moment().subtract('days', 29).format('YYYY-MM-DD');//30天前
 
let week = moment(this.searchForm.week);
startTime = week.startOf('week').format('YYYYMMDD');//周初
endTime = week.endOf('week').format('YYYYMMDD');//周末
 
let month = moment();
startTime = month.startOf('month');//月初
endTime = month.endOf('month');//月末
posted on 2018-06-05 11:46  阿梅M  阅读(33625)  评论(0编辑  收藏  举报