给单据列表中的时间段增加默认值,默认3个月

This commit is contained in:
jishenghua
2024-04-25 21:30:55 +08:00
parent 7cbf15174a
commit 1a53fe1117
3 changed files with 44 additions and 5 deletions

View File

@@ -1,7 +1,8 @@
import {findFinancialDetailByNumber, findBySelectSup, findBySelectCus, findBySelectOrgan, findBySelectRetail,
getUserList, getPersonByType, getAccount, getCurrentSystemConfig, getPlatformConfigByKey} from '@/api/api'
import { getCheckFlag } from "@/utils/util"
import { getCheckFlag, getFormatDate, getPrevMonthFormatDate } from '@/utils/util'
import Vue from 'vue'
import moment from 'moment'
export const FinancialListMixin = {
data () {
@@ -18,7 +19,12 @@ export const FinancialListMixin = {
retailList: [],
userList: [],
personList: [],
accountList: []
accountList: [],
queryParam: {
beginTime: getPrevMonthFormatDate(3),
endTime: getFormatDate(),
createTimeRange: [moment(getPrevMonthFormatDate(3)), moment(getFormatDate())]
}
}
},
computed: {
@@ -83,7 +89,10 @@ export const FinancialListMixin = {
},
searchReset() {
this.queryParam = {
type: this.queryParam.type
type: this.queryParam.type,
beginTime: getPrevMonthFormatDate(3),
endTime: getFormatDate(),
createTimeRange: [moment(getPrevMonthFormatDate(3)), moment(getFormatDate())]
}
this.loadData(1);
},
@@ -161,6 +170,7 @@ export const FinancialListMixin = {
onDateChange: function (value, dateString) {
this.queryParam.beginTime=dateString[0];
this.queryParam.endTime=dateString[1];
this.queryParam.createTimeRange = [moment(dateString[0]), moment(dateString[1])]
},
onDateOk(value) {
console.log(value);