Browse Source

Merge commit '374b78513fef87f781a875a1f3cc2d474da57227' into HEAD

gitadmin 2 years ago
parent
commit
2ef6e3efb8

+ 1 - 1
public/version.json

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

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

@@ -6,6 +6,7 @@
     :size="size"
     :disabledDate="disabledDate"
     :format="dateFormat"
+    :allowClear="allowClear"
     @change="dateChange"
     @calendarChange="dateCalendarChange"
     :placeholder="['开始时间', '结束时间']" />
@@ -27,6 +28,10 @@ export default {
     showTime: {
       type: Boolean,
       default: true
+    },
+    allowClear: {
+      type: Boolean,
+      default: true
     }
   },
   data () {
@@ -49,8 +54,8 @@ export default {
       const maxYearVs = moment().endOf('day') //  今天,包含今天
       //  限制最多只能查一年区间的数据
       if (this.selectPriceDate) {
-        const oMinYearVs = moment(this.selectPriceDate, 'YYYY-MM-DD').subtract(1, 'years') //  当前选中开始日期前推一年
-        const oMaxYearVs = moment(this.selectPriceDate, 'YYYY-MM-DD').add(1, 'years') //  当前选中开始日期后推一年
+        const oMinYearVs = moment(this.selectPriceDate, 'YYYY-MM-DD').subtract(2, 'years') //  当前选中开始日期前推一年
+        const oMaxYearVs = moment(this.selectPriceDate, 'YYYY-MM-DD').add(2, 'years') //  当前选中开始日期后推一年
         // 判断两个时间段是否相差m天  第二个参数指相差单位,第三个参数指是否返回浮点形式(小数)
         const beginDate = minYearVs.diff(oMinYearVs, 'days') > 0 ? minYearVs : oMinYearVs // 若当前选中开始日期前推一年超出最多倒推两年数据时,则以两年为标准
         const endDate = maxYearVs.diff(oMaxYearVs, 'days') > 0 ? oMaxYearVs : maxYearVs // 若当前选中开始日期后推一年超出今天时,则以今天为标准

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

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate :allowClear="false" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -23,12 +23,12 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="审核时间">
-                  <rangeDate ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
+                  <rangeDate :allowClear="false" ref="auditRangeDate" :value="auditTime" @change="auditDateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="出库时间">
-                  <rangeDate ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
+                  <rangeDate :allowClear="false" ref="outWareRangeDate" :value="outWareTime" @change="outWareDateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">