日期默认值

master
zengchenxi 2 months ago
parent fe6c3f3818
commit b3cd205a2c

@ -375,6 +375,14 @@ export default {
},
//
async initSearchData() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const startDate = `${year}-${month}-01 00:00:00`;
const startDateTimestamp = new Date(startDate).getTime();
const endDate = `${year}-${month}-${new Date(year, now.getMonth() + 1, 0).getDate()}`;
const endDateTimestamp = new Date(endDate).getTime();
this.query.manufactureTime = [startDateTimestamp, endDateTimestamp];
},
initData() {
this.listLoading = true;

@ -379,6 +379,14 @@ export default {
},
//
async initSearchData() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const startDate = `${year}-${month}-01 00:00:00`;
const startDateTimestamp = new Date(startDate).getTime();
const endDate = `${year}-${month}-${new Date(year, now.getMonth() + 1, 0).getDate()}`;
const endDateTimestamp = new Date(endDate).getTime();
this.query.manufactureTime = [startDateTimestamp, endDateTimestamp];
},
initData() {
this.listLoading = true;

@ -359,6 +359,8 @@ export default {
},
//
async initSearchData() {
const now = new Date();
this.query.years= new Date(now.getFullYear(), now.getMonth(), 1).getTime();
},
initData() {

@ -398,6 +398,14 @@ export default {
},
//
async initSearchData() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const startDate = `${year}-${month}-01 00:00:00`;
const startDateTimestamp = new Date(startDate).getTime();
const endDate = `${year}-${month}-${new Date(year, now.getMonth() + 1, 0).getDate()}`;
const endDateTimestamp = new Date(endDate).getTime();
this.query.manufactureTime = [startDateTimestamp, endDateTimestamp];
},
initData() {
this.listLoading = true;

@ -345,6 +345,14 @@ export default {
},
//
async initSearchData() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const startDate = `${year}-${month}-01 00:00:00`;
const startDateTimestamp = new Date(startDate).getTime();
const endDate = `${year}-${month}-${new Date(year, now.getMonth() + 1, 0).getDate()}`;
const endDateTimestamp = new Date(endDate).getTime();
this.query.manufactureTime = [startDateTimestamp, endDateTimestamp];
},
initData() {
this.listLoading = true;

@ -418,6 +418,14 @@ export default {
},
//
async initSearchData() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const startDate = `${year}-${month}-01 00:00:00`;
const startDateTimestamp = new Date(startDate).getTime();
const endDate = `${year}-${month}-${new Date(year, now.getMonth() + 1, 0).getDate()}`;
const endDateTimestamp = new Date(endDate).getTime();
this.query.manufactureTime = [startDateTimestamp, endDateTimestamp];
},
initData() {
this.listLoading = true;

@ -417,6 +417,14 @@ export default {
},
//
async initSearchData() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const startDate = `${year}-${month}-01 00:00:00`;
const startDateTimestamp = new Date(startDate).getTime();
const endDate = `${year}-${month}-${new Date(year, now.getMonth() + 1, 0).getDate()}`;
const endDateTimestamp = new Date(endDate).getTime();
this.query.manufactureTime = [startDateTimestamp, endDateTimestamp];
},
initData() {
this.listLoading = true;

@ -377,6 +377,14 @@ export default {
},
//
async initSearchData() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const startDate = `${year}-${month}-01 00:00:00`;
const startDateTimestamp = new Date(startDate).getTime();
const endDate = `${year}-${month}-${new Date(year, now.getMonth() + 1, 0).getDate()}`;
const endDateTimestamp = new Date(endDate).getTime();
this.query.manufactureTime = [startDateTimestamp, endDateTimestamp];
},
initData() {
this.listLoading = true;

@ -345,6 +345,14 @@ export default {
},
//
async initSearchData() {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const startDate = `${year}-${month}-01 00:00:00`;
const startDateTimestamp = new Date(startDate).getTime();
const endDate = `${year}-${month}-${new Date(year, now.getMonth() + 1, 0).getDate()}`;
const endDateTimestamp = new Date(endDate).getTime();
this.query.manufactureTime = [startDateTimestamp, endDateTimestamp];
},
initData() {
this.listLoading = true;

Loading…
Cancel
Save