lilei 1 年之前
父節點
當前提交
e1c048accf
共有 3 個文件被更改,包括 15 次插入8 次删除
  1. 1 1
      public/version.json
  2. 5 5
      src/views/Home.vue
  3. 9 2
      src/views/reportData/receivedSendStorageReport/list.vue

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1710121318900
+  "version": 1710147876459
 }

+ 5 - 5
src/views/Home.vue

@@ -240,8 +240,8 @@
                   <!-- <a-radio-button value="6">
                   最近半年
                 </a-radio-button> -->
-                  <a-radio-button value="12">
-                    最近一年
+                  <a-radio-button value="3">
+                    最近3个月
                   </a-radio-button>
                   <a-radio-button value="0">
                     全部
@@ -365,10 +365,10 @@ export default {
       openNewProduct: false,
       onlineFalg: '1', // 上下线标识  1为上线,0为下线
       queryParams: {
-        beginDate: getDate.getMonthDays(12).starttime,
-        endDate: getDate.getMonthDays(12).endtime
+        beginDate: getDate.getMonthDays(3).starttime,
+        endDate: getDate.getMonthDays(3).endtime
       },
-      curDate: '12',
+      curDate: '3',
       navList: [
         [ // 客户
           [

+ 9 - 2
src/views/reportData/receivedSendStorageReport/list.vue

@@ -16,7 +16,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="日期" prop="time">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate ref="rangeDate" :showShortcut="false" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -96,6 +96,7 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import { downloadExcel } from '@/libs/JGPrint.js'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
+import moment from 'moment'
 import { reportPageList, reportStockPutOutCount, reportStockPutOutExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
@@ -122,7 +123,7 @@ export default {
       labelCol: { span: 8 },
       wrapperCol: { span: 16 },
       rules: {
-        'time': [{ required: true, message: '请选择日期', trigger: 'change' }]
+        'time': [{ required: true, message: '请选择日期(最多查看三个月)', trigger: 'change' }]
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
@@ -198,6 +199,12 @@ export default {
     handleSearch () {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          const a = moment(this.queryParam.beginDate)
+          const b = moment(this.queryParam.endDate)
+          if (b.diff(a, 'month') > 2) {
+            this.$message.info('最多只能查询3个月')
+            return false
+          }
           this.$refs.table.refresh(true)
         } else {
           console.log('error submit!!')