Explorar o código

默认时间范围更改为当月

chenrui %!s(int64=3) %!d(string=hai) anos
pai
achega
d296bada22

+ 15 - 7
src/views/promotionRulesManagement/orderStatistics/list.vue

@@ -6,7 +6,7 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+              <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -90,6 +90,8 @@
 </template>
 
 <script>
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import custList from '@/views/common/custList.vue'
@@ -105,13 +107,17 @@ export default {
       tableHeight: 0,
       // 查询参数
       queryParam: {
-        beginDate: '',
-        endDate: '',
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         buyerSn: undefined,
         promoActiveSn: undefined,
         salesBillNo: '',
         billStatus: undefined
       },
+      time: [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ],
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -186,15 +192,17 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.buyerSn = undefined
       this.queryParam.promoActiveSn = undefined
       this.queryParam.salesBillNo = ''
       this.queryParam.billStatus = undefined
       this.$refs.custList.resetForm()
-      this.$refs.promoList.resetForm()
+      if (this.advanced) {
+        this.$refs.promoList.resetForm()
+      }
       this.$refs.table.refresh(true)
     },
     // 关闭弹框

+ 12 - 6
src/views/promotionRulesManagement/productStatistics/list.vue

@@ -6,7 +6,7 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-item label="统计时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
+              <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -95,6 +95,8 @@
 </template>
 
 <script>
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import productStatisticsDetailModal from './detailModal.vue'
@@ -109,8 +111,8 @@ export default {
       tableHeight: 0,
       productType: [],
       queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         productCode: '', //  产品编码
         productName: '', //  产品名称
         productBrandSn: undefined, //  产品品牌
@@ -118,6 +120,10 @@ export default {
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '' //  产品三级分类
       },
+      time: [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ],
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -162,9 +168,9 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.productCode = ''
       this.queryParam.productName = ''
       this.queryParam.productBrandSn = undefined

+ 1 - 1
src/views/reportData/salesReturnReport/list.vue

@@ -4,7 +4,7 @@
       <!-- 搜索条件 -->
       <div class="table-page-search-wrapper">
         <a-form-model
-          id="returnSlipReportList-form"
+          id="salesReturnReportList-form"
           layout="inline"
           ref="ruleForm"
           :model="queryParam"

+ 4 - 4
src/views/salesManagement/shortageStatisticsC/list.vue

@@ -126,7 +126,7 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        beginDate: getDate.getThreeMonthDays().starttime,
+        beginDate: getDate.getCurrMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
         buyerSn: undefined,
         subareaSn: undefined, //  区域
@@ -140,8 +140,8 @@ export default {
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       time: [
-        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
       ], //  创建时间
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -210,7 +210,7 @@ export default {
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.buyerSn = undefined
       this.queryParam.subareaSn = undefined

+ 4 - 4
src/views/salesManagement/shortageStatisticsP/list.vue

@@ -76,7 +76,7 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        beginDate: getDate.getThreeMonthDays().starttime,
+        beginDate: getDate.getCurrMonthDays().starttime,
         endDate: getDate.getCurrMonthDays().endtime,
         productName: '',
         productCode: '',
@@ -84,8 +84,8 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       time: [
-        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
       ], //  创建时间
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
@@ -152,7 +152,7 @@ export default {
     //  重置
     resetSearchForm () {
       this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.productName = ''
       this.queryParam.productCode = ''