Bladeren bron

报表时间修改

1004749546@qq.com 4 jaren geleden
bovenliggende
commit
9de6125af4

+ 14 - 7
src/views/reportData/allocationDetails/list.vue

@@ -156,6 +156,7 @@
 </template>
 
 <script>
+import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import subarea from '@/views/common/subarea.js'
@@ -173,9 +174,12 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        time: [],
-        beginDate: '',
-        endDate: '',
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         productName: '',
         productBrandTypeSn: undefined,
         productBrandSn: undefined, //  产品品牌
@@ -305,10 +309,13 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.time = []
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.productName = ''
       this.queryParam.productBrandTypeSn = undefined
       this.queryParam.productBrandSn = undefined

+ 14 - 7
src/views/reportData/billingReturnReport/list.vue

@@ -94,6 +94,7 @@
 </template>
 
 <script>
+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'
@@ -108,9 +109,12 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        time: [],
-        beginDate: '',
-        endDate: '',
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         dealer: {
           'dealerSn': undefined,
           'provinceSn': undefined,
@@ -342,10 +346,13 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.time = []
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.dealer = {
         'dealerSn': undefined,
         'provinceSn': undefined,

+ 53 - 30
src/views/reportData/priceDifferenceDetailReport/list.vue

@@ -2,68 +2,74 @@
   <a-card size="small" :bordered="false" class="shortageStatisticsCList-wrap">
     <!-- 搜索条件 -->
     <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+      <a-form-model
+        id="priceDifferenceDetailReport-form"
+        layout="inline"
+        ref="ruleForm"
+        :model="queryParam"
+        :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" :value="time" @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-input placeholder="请输入单号" />
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <a-col :md="6" :sm="24">
-            <a-form-item label="客户名称">
+            <a-form-model-item label="客户名称">
               <custList ref="custList" id="shortageStatisticsCList-buyerSn" @change="custChange"></custList>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <template v-if="advanced">
             <a-col :md="6" :sm="24">
-              <a-form-item label="客户类型">
+              <a-form-model-item label="客户类型">
                 <custList ref="custList" id="shortageStatisticsCList-buyerSn" @change="custChange"></custList>
-              </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 placeholder="选择品牌类别">
                 </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="产品品牌">
                 <ProductBrand id="productInfoList-productBrandSn" v-model="queryParam.brandSn"></ProductBrand>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="二级品类">
+              <a-form-model-item label="二级品类">
                 <ProductType id="productInfoList-productType" v-model="productType" @change="changeProductType"></ProductType>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="所在区域">
+              <a-form-model-item label="所在区域">
                 <subarea id="shortageStatisticsCList-subarea" v-model="queryParam.subareaSn"></subarea>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="省级区域" prop="provinceSn">
+              <a-form-model-item label="省级区域" prop="provinceSn">
                 <a-select id="supplierInfoEdit-provinceSn" @change="getCityList" v-model="queryParam.provinceSn" placeholder="请选择省">
                   <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ 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="类型">
                 <subarea id="shortageStatisticsCList-subarea" v-model="queryParam.subareaSn"></subarea>
-              </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-checkbox>
                   盘点区间日期
                 </a-checkbox>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
           </template>
           <a-col :md="6" :sm="24">
@@ -75,7 +81,7 @@
             </a>
           </a-col>
         </a-row>
-      </a-form>
+      </a-form-model>
     </div>
     <!-- 列表 -->
     <s-table
@@ -128,20 +134,26 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         buyerSn: undefined,
         subareaSn: undefined, //  区域
         provinceSn: undefined,
         citySn: undefined,
         districtSn: undefined
       },
+	  rules: {
+	    'time': [{ required: true, message: '请选择销售日期', trigger: 'change' }]
+	  },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
       addrProvinceList: [], //  省下拉
       addrCityList: [], //  市下拉
       addrDistrictList: [], //  区下拉
-      time: [], //  创建时间
       columns: [
         { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
         { title: '区域',
@@ -353,6 +365,13 @@ 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]
     },
@@ -427,8 +446,12 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate(this.time)
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
       this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.buyerSn = undefined
       this.queryParam.subareaSn = undefined

+ 14 - 7
src/views/reportData/returnSlipReport/list.vue

@@ -99,6 +99,7 @@
 </template>
 
 <script>
+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'
@@ -113,9 +114,12 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        time: [],
-        beginDate: '',
-        endDate: '',
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         dealer: {
           'dealerSn': undefined,
           'provinceSn': undefined,
@@ -346,10 +350,13 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.time = []
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.dealer = {
         'dealerSn': undefined,
         'provinceSn': undefined,

+ 58 - 34
src/views/reportData/salesDetails/list.vue

@@ -2,50 +2,55 @@
   <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"
+        :model="queryParam"
+        :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-input id="bulkWarehousingOrderList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入销售单号"/>
-            </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-input id="productPricingList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码"/>
-            </a-form-item>
+            </a-form-model-item>
           </a-col>
           <template v-if="advanced">
             <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-form-item label="产品名称">
+              <a-form-model-item label="产品名称">
                 <a-input id="productPricingList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
-              </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-input id="productPricingList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入客户名称"/>
-              </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
                   placeholder="请选择"
                   id="productPricingList-productBrandSn"
@@ -56,10 +61,10 @@
                   :filter-option="filterOption">
                   <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</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
                   placeholder="请选择"
                   id="productPricingList-productBrandSn"
@@ -70,15 +75,15 @@
                   :filter-option="filterOption">
                   <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</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="品牌类别">
                 <v-select code="BRAND_TYPE" id="productBrandList-brandType" v-model="queryParam.brandType" allowClear placeholder="请选择品牌分类"></v-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
                   placeholder="请选择"
                   id="productPricingList-productBrandSn"
@@ -89,10 +94,10 @@
                   :filter-option="filterOption">
                   <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</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
                   placeholder="请选择"
                   id="productPricingList-productBrandSn"
@@ -103,12 +108,12 @@
                   :filter-option="filterOption">
                   <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</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-checkbox @change="onChange"></a-checkbox>
-              </a-form-item>
+              </a-form-model-item>
             </a-col>
           </template>
           <a-col :md="6" :sm="24">
@@ -120,7 +125,7 @@
             </a>
           </a-col>
         </a-row>
-      </a-form>
+      </a-form-model>
     </div>
     <!-- 列表 -->
     <s-table
@@ -156,6 +161,7 @@
 </template>
 
 <script>
+import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import reportData from '@/libs/reportData'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -168,13 +174,20 @@ 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, //  业务状态
         allocateNo: '' //  调拨单号
       },
+	  rules: {
+	    'time': [{ required: true, message: '请选择调拨开单日期', trigger: 'change' }]
+	  },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
       checkVal: '',
@@ -242,6 +255,13 @@ export default {
     },
     //  创建时间  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]
     },
@@ -253,9 +273,13 @@ export default {
 
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.targetName = ''
       this.queryParam.allocateTypeSn = undefined
       this.queryParam.state = undefined

+ 14 - 7
src/views/reportData/salesReturnReport/list.vue

@@ -94,6 +94,7 @@
 </template>
 
 <script>
+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'
@@ -108,9 +109,12 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        time: [],
-        beginDate: '',
-        endDate: '',
+        time: [
+          getDate.getCurrMonthDays().starttime,
+          getDate.getCurrMonthDays().endtime
+        ],
+        beginDate: getDate.getCurrMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         dealer: {
           'dealerSn': undefined,
           'provinceSn': undefined,
@@ -342,10 +346,13 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.time = []
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.queryParam.time = [
+        getDate.getCurrMonthDays().starttime,
+        getDate.getCurrMonthDays().endtime
+      ]
+      this.$refs.rangeDate.resetDate(this.queryParam.time)
+      this.queryParam.beginDate = getDate.getCurrMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.dealer = {
         'dealerSn': undefined,
         'provinceSn': undefined,