|
@@ -122,6 +122,7 @@
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
import { hdExportExcel } from '@/libs/exportExcel'
|
|
|
|
+import moment from 'moment'
|
|
// 组件
|
|
// 组件
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
@@ -143,12 +144,12 @@ export default {
|
|
exportLoading: false, // 导出按钮加载状态
|
|
exportLoading: false, // 导出按钮加载状态
|
|
showExport: false, // 导出弹窗
|
|
showExport: false, // 导出弹窗
|
|
toYears: new Date().getFullYear(), // 今年
|
|
toYears: new Date().getFullYear(), // 今年
|
|
- currYear: '2023', // 查询年份
|
|
|
|
|
|
+ currYear: moment().subtract(1, 'years').format('YYYY'), // 查询年份
|
|
// 查询条件
|
|
// 查询条件
|
|
queryParam: {
|
|
queryParam: {
|
|
queryType: 'year', // 轮胎年度费用报表
|
|
queryType: 'year', // 轮胎年度费用报表
|
|
- beginDate: '2023-01-31 00:00:00', // 开始时间
|
|
|
|
- endDate: '2023-12-31 23:59:59', // 结束时间
|
|
|
|
|
|
+ beginDate: moment().subtract(1, 'years').format('YYYY') + '-01-31 00:00:00', // 开始时间
|
|
|
|
+ endDate: moment().subtract(1, 'years').format('YYYY') + '-12-31 23:59:59', // 结束时间
|
|
dealerLevel: undefined, // 客户等级
|
|
dealerLevel: undefined, // 客户等级
|
|
customSn: undefined, // 客户sn
|
|
customSn: undefined, // 客户sn
|
|
subareaArea: {
|
|
subareaArea: {
|
|
@@ -285,9 +286,10 @@ export default {
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam.queryType = 'year'
|
|
this.queryParam.queryType = 'year'
|
|
- this.currYear = '2023'
|
|
|
|
- this.queryParam.beginDate = '2023-01-31 00:00:00'
|
|
|
|
- this.queryParam.endDate = '2023-12-31 23:59:59'
|
|
|
|
|
|
+ const lastYear = moment().subtract(1, 'years').format('YYYY')
|
|
|
|
+ this.currYear = lastYear
|
|
|
|
+ this.queryParam.beginDate = lastYear + '-01-31 00:00:00'
|
|
|
|
+ this.queryParam.endDate = lastYear + '-12-31 23:59:59'
|
|
this.queryParam.dealerEntity.provinceSn = undefined
|
|
this.queryParam.dealerEntity.provinceSn = undefined
|
|
this.queryParam.dealerEntity.citySn = undefined
|
|
this.queryParam.dealerEntity.citySn = undefined
|
|
this.queryParam.dealerEntity.districtSn = undefined
|
|
this.queryParam.dealerEntity.districtSn = undefined
|
|
@@ -298,7 +300,9 @@ export default {
|
|
this.queryParam.dealerLevel = undefined
|
|
this.queryParam.dealerLevel = undefined
|
|
this.$refs.subarea.clearData()
|
|
this.$refs.subarea.clearData()
|
|
this.$refs.areaList.clearData()
|
|
this.$refs.areaList.clearData()
|
|
- this.$refs.dealerSubareaScopeList.resetForm()
|
|
|
|
|
|
+ if (this.advanced) {
|
|
|
|
+ this.$refs.dealerSubareaScopeList.resetForm()
|
|
|
|
+ }
|
|
this.totalData = null
|
|
this.totalData = null
|
|
this.$refs.table.clearTable()
|
|
this.$refs.table.clearTable()
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|