|
@@ -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');
|
|
|
},
|
|
|
|
|
|
/**
|