zhangdan %!s(int64=3) %!d(string=hai) anos
pai
achega
0bb47fdcf2

+ 29 - 10
src/views/reportData/districtTypeSalesDetails/list.vue

@@ -2,19 +2,19 @@
   <a-card size="small" :bordered="false" class="districtTypeSalesDetailsList-wrap">
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+      <a-form-model layout="inline" ref="ruleForm" :rules="rules" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
+            <a-form-model-item label="创建时间" prop="time">
+              <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+            </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="districtTypeSalesDetailsList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="districtTypeSalesDetailsList-reset">重置</a-button>
           </a-col>
         </a-row>
-      </a-form>
+      </a-form-model>
     </div>
     <!-- 列表 -->
     <s-table
@@ -34,6 +34,7 @@
 import { STable, VSelect } from '@/components'
 import reportData from '@/libs/reportData'
 import rangeDate from '@/views/common/rangeDate.vue'
+import getDate from '@/libs/getDate.js'
 // import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
 // import { allocateTypeAllList } from '@/api/allocateType'
 export default {
@@ -43,8 +44,12 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         targetName: '', //  调往对象
         allocateTypeSn: undefined, //  调拨类型
         state: undefined, //  业务状态
@@ -52,6 +57,9 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
+      rules: {
+        'time': [{ required: true, message: '请选择创建时间', trigger: 'change' }]
+      },
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '区域', dataIndex: 'area', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
@@ -116,14 +124,25 @@ export default {
   methods: {
     //  创建时间  change
     dateChange (date) {
+      if (date.length) {
+        if (date[0] == '' && date[1] == '') {
+          this.resetSearchForm()
+        } else {
+          this.queryParam.time = date
+        }
+      }
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ],
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.targetName = ''
       this.queryParam.allocateTypeSn = undefined
       this.queryParam.state = undefined

+ 31 - 14
src/views/reportData/nationalCustomerCostStatistics/list.vue

@@ -2,33 +2,33 @@
   <a-card size="small" :bordered="false" class="nationalCustomerCostStatisticsList-wrap">
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+      <a-form-model layout="inline" ref="ruleForm" :rules="rules" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
+            <a-form-model-item label="创建时间" prop="time">
+              <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+            </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="区域">
+            <a-form-model-item label="区域">
               <a-select id="nationalCustomerCostStatisticsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择区域" allowClear >
                 <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
               </a-select>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="省份">
+            <a-form-model-item label="省份">
               <a-select id="nationalCustomerCostStatisticsList-state" v-model="queryParam.state" placeholder="请选择省份" allowClear >
                 <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
               </a-select>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="nationalCustomerCostStatisticsList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="nationalCustomerCostStatisticsList-reset">重置</a-button>
           </a-col>
         </a-row>
-      </a-form>
+      </a-form-model>
     </div>
     <!-- 列表 -->
     <s-table
@@ -49,6 +49,7 @@
 import { STable, VSelect } from '@/components'
 import reportData from '@/libs/reportData'
 import rangeDate from '@/views/common/rangeDate.vue'
+import getDate from '@/libs/getDate.js'
 // import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
 // import { allocateTypeAllList } from '@/api/allocateType'
 export default {
@@ -58,8 +59,12 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
+        time: [
+         getDate.getCurrMonthDays().starttime,
+         getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate:  getDate.getCurrMonthDays().endtime,
         targetName: '', //  调往对象
         allocateTypeSn: undefined, //  调拨类型
         state: undefined, //  业务状态
@@ -67,6 +72,9 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
+	  rules: {
+	    'time': [{ required: true, message: '请选择创建时间', trigger: 'change' }]
+	  },
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '区域', dataIndex: 'area', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
@@ -152,14 +160,23 @@ export default {
   methods: {
     //  创建时间  change
     dateChange (date) {
+      if (date.length) {
+        if (date[0] == '' && date[1] == '') {
+          this.resetSearchForm()
+        } else {
+          this.queryParam.time = date
+        }
+      }
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.time=[getDate.getCurrMonthDays().starttime,
+         getDate.getCurrMonthDays().endtime]
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.targetName = ''
       this.queryParam.allocateTypeSn = undefined
       this.queryParam.state = undefined

+ 33 - 14
src/views/reportData/provinceTypeSalesDetails/list.vue

@@ -2,33 +2,33 @@
   <a-card size="small" :bordered="false" class="provinceTypeSalesDetailsList-wrap">
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+      <a-form-model layout="inline" ref="ruleForm" :rules="rules" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
+            <a-form-model-item label="创建时间" prop="time">
+              <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+            </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="区域">
+            <a-form-model-item label="区域">
               <a-select id="provinceTypeSalesDetailsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择区域" allowClear >
                 <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
               </a-select>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="省份">
+            <a-form-model-item label="省份">
               <a-select id="provinceTypeSalesDetailsList-state" v-model="queryParam.state" placeholder="请选择省份" allowClear >
                 <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
               </a-select>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="provinceTypeSalesDetailsList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="provinceTypeSalesDetailsList-reset">重置</a-button>
           </a-col>
         </a-row>
-      </a-form>
+      </a-form-model>
     </div>
     <!-- 列表 -->
     <s-table
@@ -48,6 +48,7 @@
 import { STable, VSelect } from '@/components'
 import reportData from '@/libs/reportData'
 import rangeDate from '@/views/common/rangeDate.vue'
+import getDate from '@/libs/getDate.js'
 // import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
 // import { allocateTypeAllList } from '@/api/allocateType'
 export default {
@@ -57,8 +58,12 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         targetName: '', //  调往对象
         allocateTypeSn: undefined, //  调拨类型
         state: undefined, //  业务状态
@@ -66,6 +71,9 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
+      rules: {
+        'time': [{ required: true, message: '请选择创建时间', trigger: 'change' }]
+      },
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '区域', dataIndex: 'area', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
@@ -131,18 +139,29 @@ export default {
   methods: {
     //  创建时间  change
     dateChange (date) {
+      if (date.length) {
+        if (date[0] == '' && date[1] == '') {
+          this.resetSearchForm()
+        } else {
+          this.queryParam.time = date
+        }
+      }
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ],
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.targetName = ''
       this.queryParam.allocateTypeSn = undefined
       this.queryParam.state = undefined
       this.queryParam.allocateNo = ''
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
       this.$refs.table.refresh(true)
     }
   },

+ 31 - 12
src/views/reportData/regionalPromotionCostStatistics/list.vue

@@ -2,26 +2,26 @@
   <a-card size="small" :bordered="false" class="regionalPromotionCostStatisticsList-wrap">
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+      <a-form-model layout="inline" ref="ruleForm" :rules="rules" @keyup.enter.native="$refs.table.refresh(true)">
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
+            <a-form-model-item label="创建时间" prop="time">
+              <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+            </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="区域">
+            <a-form-model-item label="区域">
               <a-select id="regionalPromotionCostStatisticsList-allocateTypeSn" v-model="queryParam.allocateTypeSn" placeholder="请选择区域" allowClear >
                 <a-select-option v-for="item in allocateTypeList" :key="item.allocateTypeSn" :value="item.allocateTypeSn">{{ item.name }}</a-select-option>
               </a-select>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="regionalPromotionCostStatisticsList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="regionalPromotionCostStatisticsList-reset">重置</a-button>
           </a-col>
         </a-row>
-      </a-form>
+      </a-form-model>
     </div>
     <!-- 列表 -->
     <s-table
@@ -42,6 +42,7 @@
 import { STable, VSelect } from '@/components'
 import reportData from '@/libs/reportData'
 import rangeDate from '@/views/common/rangeDate.vue'
+import getDate from '@/libs/getDate.js'
 // import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
 // import { allocateTypeAllList } from '@/api/allocateType'
 export default {
@@ -51,8 +52,12 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         targetName: '', //  调往对象
         allocateTypeSn: undefined, //  调拨类型
         state: undefined, //  业务状态
@@ -60,6 +65,9 @@ export default {
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
+      rules: {
+        'time': [{ required: true, message: '请选择创建时间', trigger: 'change' }]
+      },
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
         { title: '省份', dataIndex: 'province', align: 'center', customRender: function (text) { return text || '--' } },
@@ -134,14 +142,25 @@ export default {
   methods: {
     //  创建时间  change
     dateChange (date) {
+      if (date.length) {
+        if (date[0] == '' && date[1] == '') {
+          this.resetSearchForm()
+        } else {
+          this.queryParam.time = date
+        }
+      }
       this.queryParam.beginDate = date[0]
       this.queryParam.endDate = date[1]
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ],
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.targetName = ''
       this.queryParam.allocateTypeSn = undefined
       this.queryParam.state = undefined