lilei 1 год назад
Родитель
Сommit
2be0ef1876

+ 1 - 1
public/version.json

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

+ 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: [
         [ // 客户
           [

+ 6 - 2
src/views/common/rangeDate.vue

@@ -17,7 +17,7 @@
       :showToday="false"
       style="width:100%"
     >
-      <div slot="renderExtraFooter">
+      <div slot="renderExtraFooter" v-if="showShortcut">
         <a-button @click="setVal('date1')" type="link" size="small">今天</a-button>
         <a-button @click="setVal('date2')" type="link" size="small">近一个月</a-button>
         <a-button @click="setVal('date3')" type="link" size="small">本月</a-button>
@@ -77,7 +77,11 @@ export default {
     allowClear: {
       type: Boolean,
       default: true
-    }
+    },
+    showShortcut: {
+      type: Boolean,
+      default: true
+    },
   },
   data () {
     return {

+ 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!!')

+ 6 - 6
src/views/salesManagement/salesQuery/list.vue

@@ -269,15 +269,15 @@ export default {
       showDiscount: false,
       showCell: false,
       time: [
-        getDate.getMonthDays(12).starttime,
-        getDate.getMonthDays(12).endtime
+        getDate.getMonthDays(3).starttime,
+        getDate.getMonthDays(3).endtime
       ],
       auditTime: [],
       outWareTime: [],
       // 查询参数
       queryParam: {
-        beginDate: getDate.getMonthDays(12).starttime,
-        endDate: getDate.getMonthDays(12).endtime,
+        beginDate: getDate.getMonthDays(3).starttime,
+        endDate: getDate.getMonthDays(3).endtime,
         auditBeginDate: '',
         auditEndDate: '',
         outWarehouseBeginDate: '',
@@ -503,8 +503,8 @@ export default {
     // 重置数据
     resetData (flag) {
       this.$refs.rangeDate.resetDate(flag ? '' : this.time)
-      this.queryParam.beginDate = flag ? '' : getDate.getMonthDays(12).starttime
-      this.queryParam.endDate = flag ? '' : getDate.getMonthDays(12).endtime
+      this.queryParam.beginDate = flag ? '' : getDate.getMonthDays(3).starttime
+      this.queryParam.endDate = flag ? '' : getDate.getMonthDays(3).endtime
 
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditEndDate = ''

+ 6 - 6
src/views/salesManagement/salesQueryNew/list.vue

@@ -270,15 +270,15 @@ export default {
       showDiscount: false,
       showCell: false,
       time: [
-        getDate.getMonthDays(12).starttime,
-        getDate.getMonthDays(12).endtime
+        getDate.getMonthDays(3).starttime,
+        getDate.getMonthDays(3).endtime
       ],
       auditTime: [],
       outWareTime: [],
       // 查询参数
       queryParam: {
-        beginDate: getDate.getMonthDays(12).starttime,
-        endDate: getDate.getMonthDays(12).endtime,
+        beginDate: getDate.getMonthDays(3).starttime,
+        endDate: getDate.getMonthDays(3).endtime,
         auditBeginDate: '',
         auditEndDate: '',
         outWarehouseBeginDate: '',
@@ -505,8 +505,8 @@ export default {
     // 重置数据
     resetData (flag) {
       this.$refs.rangeDate.resetDate(flag ? '' : this.time)
-      this.queryParam.beginDate = flag ? '' : getDate.getMonthDays(12).starttime
-      this.queryParam.endDate = flag ? '' : getDate.getMonthDays(12).endtime
+      this.queryParam.beginDate = flag ? '' : getDate.getMonthDays(3).starttime
+      this.queryParam.endDate = flag ? '' : getDate.getMonthDays(3).endtime
 
       this.queryParam.auditBeginDate = ''
       this.queryParam.auditEndDate = ''