Ver Fonte

Merge branch 'develop_yh45' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh45

lilei há 9 meses atrás
pai
commit
6acf6a87a3

+ 12 - 12
src/views/reportData/tireFeeReport/monthQueryList.vue

@@ -56,14 +56,13 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="轮胎省仓">
-                  <a-select id="monthQueryList-provinceFlag" placeholder="请选择是否是轮胎省仓" v-model="queryParam.provinceFlag">
-                    <a-select-option value="1">
-                      是
-                    </a-select-option>
-                    <a-select-option value="0">
-                      否
-                    </a-select-option>
-                  </a-select>
+                  <v-select
+                    v-model="queryParam.provinceFlag"
+                    ref="provinceFlag"
+                    id="monthQueryList-provinceFlag"
+                    code="FlAG"
+                    placeholder="请选择是否是轮胎省仓"
+                    allowClear></v-select>
                 </a-form-model-item>
               </a-col>
             </template>
@@ -198,8 +197,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        const oldParams = Object.assign(parameter, this.queryParam)
-        const params = JSON.parse(JSON.stringify(oldParams))
+        const params = Object.assign(parameter, this.queryParam)
         // 获取列表数据  有分页
         return tireFeeReportList(params).then(res => {
           let data
@@ -348,8 +346,10 @@ export default {
       this.queryParam.dealerLevel = undefined
       this.queryParam.provinceFlag = undefined
       this.$refs.subarea.clearData()
-      this.$refs.dealerSubareaScopeList.resetForm()
-      this.$refs.provinceDealerList.resetForm()
+      if (this.advanced) {
+        this.$refs.dealerSubareaScopeList.resetForm()
+        this.$refs.provinceDealerList.resetForm()
+      }
       this.totalData = null
       this.$refs.areaList.clearData()
       this.$refs.table.clearTable()

+ 3 - 1
src/views/reportData/tireFeeReport/quarterQueryList.vue

@@ -293,7 +293,9 @@ export default {
       this.queryParam.dealerLevel = undefined
       this.queryParam.provinceFlag = '1'
       this.$refs.subarea.clearData()
-      this.$refs.dealerSubareaScopeList.resetForm()
+      if (this.advanced) {
+        this.$refs.dealerSubareaScopeList.resetForm()
+      }
       this.totalData = null
       this.$refs.areaList.clearData()
       this.$refs.table.clearTable()

+ 11 - 7
src/views/reportData/tireFeeReport/yearQueryList.vue

@@ -122,6 +122,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { hdExportExcel } from '@/libs/exportExcel'
+import moment from 'moment'
 // 组件
 import { STable, VSelect } from '@/components'
 import subarea from '@/views/common/subarea.js'
@@ -143,12 +144,12 @@ export default {
       exportLoading: false, // 导出按钮加载状态
       showExport: false, // 导出弹窗
       toYears: new Date().getFullYear(), // 今年
-      currYear: '2023', // 查询年份
+      currYear: moment().subtract(1, 'years').format('YYYY'), // 查询年份
       //  查询条件
       queryParam: {
         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, // 客户等级
         customSn: undefined, // 客户sn
         subareaArea: {
@@ -285,9 +286,10 @@ export default {
     //  重置
     resetSearchForm () {
       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.citySn = undefined
       this.queryParam.dealerEntity.districtSn = undefined
@@ -298,7 +300,9 @@ export default {
       this.queryParam.dealerLevel = undefined
       this.$refs.subarea.clearData()
       this.$refs.areaList.clearData()
-      this.$refs.dealerSubareaScopeList.resetForm()
+      if (this.advanced) {
+        this.$refs.dealerSubareaScopeList.resetForm()
+      }
       this.totalData = null
       this.$refs.table.clearTable()
       this.$refs.ruleForm.resetFields()