✨ 设置应收账单默认日期范围
This commit is contained in:
@@ -187,7 +187,7 @@ const salesOptions = ref([])
|
||||
const salesLoading = ref(false)
|
||||
let salesSearchVersion = 0
|
||||
const areaRules = ref({})
|
||||
const dateRange = ref([])
|
||||
const dateRange = ref(defaultBillDateRange())
|
||||
const pageNum = ref(1), pageSize = ref(10), total = ref(0), rows = ref([]), loading = ref(false)
|
||||
const summaries = ref([]), summaryLoaded = ref(false)
|
||||
const detailsVisible = ref(false), detailsLoading = ref(false), details = ref([]), detailsTotal = ref(0)
|
||||
@@ -211,9 +211,18 @@ const missingRates = ref([]), missingTotal = ref(0), missingPage = ref(1), missi
|
||||
const confirmVisible = ref(false), confirmForm = reactive({ writeoffId: null, billNo: '', rate: null, remark: '' })
|
||||
const writeoffRatesVisible = ref(false), writeoffRatesLoading = ref(false), writeoffRates = ref([])
|
||||
|
||||
function formatLocalDate(offset) {
|
||||
const date = new Date()
|
||||
date.setDate(date.getDate() + offset)
|
||||
const year = date.getFullYear()
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
function defaultBillDateRange() { return [formatLocalDate(-30), formatLocalDate(0)] }
|
||||
function params() { return { ...query, beginBillDate: dateRange.value?.[0], endBillDate: dateRange.value?.[1] } }
|
||||
function search() { pageNum.value = 1; loadRows(); loadSummary() }
|
||||
function reset() { Object.assign(query, { customerId: null, salesUserId: null, billNo: '', status: '' }); dateRange.value = []; search() }
|
||||
function reset() { Object.assign(query, { customerId: null, salesUserId: null, billNo: '', status: '' }); dateRange.value = defaultBillDateRange(); search() }
|
||||
function handleSalesInput() {
|
||||
salesSearchVersion++
|
||||
salesOptions.value = []
|
||||
|
||||
Reference in New Issue
Block a user