diff --git a/gold-system/src/views/consume/addConsume.vue b/gold-system/src/views/consume/addConsume.vue index 0d969b9..02954f7 100644 --- a/gold-system/src/views/consume/addConsume.vue +++ b/gold-system/src/views/consume/addConsume.vue @@ -133,6 +133,7 @@ const rules = reactive({ ], indexName: [ { + required: true, validator: (rule, value, callback) => { if (isHC.value === 1 && !value) { callback(new Error("请选择指标")); diff --git a/gold-system/src/views/managerecharge/rate.vue b/gold-system/src/views/managerecharge/rate.vue index 8029380..2a4b7e3 100644 --- a/gold-system/src/views/managerecharge/rate.vue +++ b/gold-system/src/views/managerecharge/rate.vue @@ -101,8 +101,8 @@ const getToday = () => { const today = new Date() // 格式化开始时间 const startDate = moment(today).startOf('day').format('YYYY-MM-DD HH:mm:ss') - // 格式化结束时间 - const endDate = moment(today).endOf('day').format('YYYY-MM-DD HH:mm:ss') + // 格式化结束时间,将结束时间设为当天 00:00:00 + const endDate = moment(today).add(1, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss') time.value.startTime = startDate time.value.endTime = endDate search() @@ -113,8 +113,8 @@ const getYesterday = () => { const yesterday = moment().subtract(1, 'days') // 格式化开始时间 const startDate = yesterday.startOf('day').format('YYYY-MM-DD HH:mm:ss') - // 格式化结束时间 - const endDate = yesterday.endOf('day').format('YYYY-MM-DD HH:mm:ss') + // 格式化结束时间,将结束时间设为当天 00:00:00 + const endDate = yesterday.add(1, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss') time.value.startTime = startDate time.value.endTime = endDate search() @@ -124,8 +124,8 @@ const getYesterday = () => { const get7Days = () => { // 格式化开始时间 const startDate = moment().subtract(6, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss') - // 格式化结束时间 - const endDate = moment().endOf('day').format('YYYY-MM-DD HH:mm:ss') + // 格式化结束时间,将结束时间设为当天 00:00:00 + const endDate = moment().add(1, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss') time.value.startTime = startDate time.value.endTime = endDate search() diff --git a/gold-system/src/views/recharge/allRecharge.vue b/gold-system/src/views/recharge/allRecharge.vue index d81297b..e1fc6e9 100644 --- a/gold-system/src/views/recharge/allRecharge.vue +++ b/gold-system/src/views/recharge/allRecharge.vue @@ -214,8 +214,7 @@ const getToday = function () { const endDate = new Date( today.getFullYear(), today.getMonth(), - today.getDate(), - 23, 59, 59 + today.getDate() + 1 ) getTime.value = [startDate, endDate] // 格式化时间 @@ -238,8 +237,7 @@ const getYesterday = function () { const endDate = new Date( yesterday.getFullYear(), yesterday.getMonth(), - yesterday.getDate(), - 23, 59, 59 + yesterday.getDate() + 1 ) getTime.value = [startDate, endDate] // 格式化时间 @@ -261,8 +259,7 @@ const get7Days = function () { const endDate = new Date( today.getFullYear(), today.getMonth(), - today.getDate(), - 23, 59, 59 + today.getDate() + 1 ) getTime.value = [startDate, endDate] // 格式化时间 diff --git a/gold-system/src/views/usergold/index.vue b/gold-system/src/views/usergold/index.vue index f0175cf..e0bae00 100644 --- a/gold-system/src/views/usergold/index.vue +++ b/gold-system/src/views/usergold/index.vue @@ -152,16 +152,17 @@ const reset = function () { const getToday = function () { const today = moment() const startDate = today.startOf('day').toDate() - const endDate = today.endOf('day').toDate() + const endDate = today.add(1, 'days').startOf('day').toDate() getTime.value = [startDate, endDate] search() } // 昨天 const getYesterday = function () { + const today = moment() const yesterday = moment().subtract(1, 'day') const startDate = yesterday.startOf('day').toDate() - const endDate = yesterday.endOf('day').toDate() + const endDate = today.startOf('day').toDate() getTime.value = [startDate, endDate] search() } @@ -169,7 +170,7 @@ const getYesterday = function () { // 近7天 const get7Days = function () { const startDate = moment().subtract(6, 'day').startOf('day').toDate() - const endDate = moment().endOf('day').toDate() + const endDate = moment().add(1,'days').startOf('day').toDate() getTime.value = [startDate, endDate] search() } diff --git a/gold-system/stats.html b/gold-system/stats.html index 640cf61..1acf0be 100644 --- a/gold-system/stats.html +++ b/gold-system/stats.html @@ -4929,7 +4929,7 @@ var drawChart = (function (exports) {