Browse Source

DVP 时间选择范围 补充 能选择当天,补充整车DVP的样车提供时间选择限制

weibowen 10 months ago
parent
commit
87d6801113

+ 1 - 1
src/views/componentsDVP/dvpPlan/editModal/applyForChange.vue

@@ -398,7 +398,7 @@ export default {
      * @returns {boolean}
      */
     disabledStartDate(current) {
-      return current && current < moment().endOf('day');
+      return current && current < moment().subtract(1,"day").endOf('day');
     },
 
     /**

+ 1 - 1
src/views/componentsDVP/dvpPlan/editModal/editDvp.vue

@@ -352,7 +352,7 @@ export default {
      * @returns {boolean}
      */
     disabledStartDate(current) {
-      return current && current < moment().endOf('day');
+      return current && current < moment().subtract(1,"day").endOf('day');
     },
 
     /**

+ 1 - 1
src/views/componentsDVP/dvpPlan/editModal/editTableRow.vue

@@ -453,7 +453,7 @@ export default {
      * @returns {boolean}
      */
     disabledStartDate(current) {
-      return current && current < moment().endOf('day');
+      return current && current < moment().subtract(1,"day").endOf('day');
     },
 
     /**

+ 11 - 2
src/views/fullVehicle/dvpPlan/AddModal/addDvpTest.vue

@@ -73,7 +73,7 @@
           <!--样车计划提供时间-->
           <a-col :md="12" :sm="12">
             <a-form-item :required='true' :label="$t('plan.dvp.sample-vehicle-plan-delivery-time')">
-              <a-date-picker v-model="formData.prototypePlanTime" style="width: 100%" allowClear @change="handlePlanTime" valueFormat="YYYY/MM/DD" :placeholder="$t('plan.dvp.please_select-sample-vehicle-plan-delivery-time')"/>
+              <a-date-picker v-model="formData.prototypePlanTime" :disabled-date="disabledPlanDate" style="width: 100%" allowClear @change="handlePlanTime" valueFormat="YYYY/MM/DD" :placeholder="$t('plan.dvp.please_select-sample-vehicle-plan-delivery-time')"/>
             </a-form-item>
           </a-col>
           <!--计划开始时间-->
@@ -480,13 +480,22 @@ export default {
       this.formData.prototypePlanTime = dateString;
     },
 
+    /**
+     * 样车提供时间 不能选择当天以前
+     * @param current
+     * @returns {boolean}
+     */
+    disabledPlanDate(current) {
+      return current && current < moment().subtract(1,"day").endOf('day');
+    },
+
     /**
      * 开始时间不能选择当天
      * @param current
      * @returns {boolean}
      */
     disabledStartDate(current) {
-      return current && current < moment().endOf('day');
+      return current && current < moment().subtract(1,"day").endOf('day');
     },
 
     /**

+ 1 - 1
src/views/fullVehicle/dvpPlan/AddModal/applyForChange.vue

@@ -426,7 +426,7 @@ export default {
      * @returns {boolean}
      */
     disabledStartDate(current) {
-      return current && current < moment().endOf('day');
+      return current && current < moment().subtract(1,"day").endOf('day');
     },
 
     /**

+ 12 - 2
src/views/fullVehicle/verify/dvpVerify.vue

@@ -179,6 +179,7 @@
                   :placeholder="$t('dvp.full.vehicle.dvp.please-select-vehicle-actual-delivery-time')"
                   class="width100"
                   valueFormat="YYYY/MM/DD"
+                  :disabled-date="disabledDeliveryDate"
                   @change='changeDeliveryTime'
                   v-model="editParam.prototypeActualTime"
               />
@@ -647,12 +648,21 @@ export default {
     },
 
     /**
-     * 开始时间不能选择当天
+     * 样车时间不能选择当天以前
+     * @param current
+     * @returns {boolean}
+     */
+    disabledDeliveryDate(current) {
+      return current && current < moment().subtract(1,"day").endOf('day');
+    },
+
+    /**
+     * 开始时间不能选择当天以前
      * @param current
      * @returns {boolean}
      */
     disabledStartDate(current) {
-      return current && current < moment().endOf('day');
+      return current && current < moment().subtract(1,"day").endOf('day');
     },
 
     /**

+ 1 - 1
src/views/systemDVP/dvpPlan/applyChange/applyForChange.vue

@@ -320,7 +320,7 @@ export default {
      * @returns {boolean}
      */
     disabledStartDate(current) {
-      return current && current < moment().endOf('day');
+      return current && current < moment().subtract(1,"day").endOf('day');
     },
 
     /**

+ 1 - 1
src/views/systemDVP/dvpPlan/index.vue

@@ -958,7 +958,7 @@ export default {
      * @returns {boolean}
      */
     disabledStartDate(current) {
-      return current && current < moment().endOf('day');
+      return current && current < moment().subtract(1,"day").endOf('day');
     },
 
     /**

+ 1 - 1
src/views/systemDVP/verify/dvpVerify.vue

@@ -857,7 +857,7 @@ export default {
      * @returns {boolean}
      */
     disabledStartDate(current) {
-      return current && current < moment().endOf('day');
+      return current && current < moment().subtract(1,"day").endOf('day');
     },
 
     /**