|
@@ -117,17 +117,6 @@ export const FORECAST_FORM_RULES = {
|
|
|
/** 年份验证规则 */
|
|
|
year: [
|
|
|
{ required: true, message: '请选择年份', trigger: 'change' },
|
|
|
- {
|
|
|
- validator: (rule, value, callback) => {
|
|
|
- const year = parseInt(value)
|
|
|
- if (isNaN(year) || year < 2020 || year > 2050) {
|
|
|
- callback(new Error('年份必须在2020-2050之间'))
|
|
|
- } else {
|
|
|
- callback()
|
|
|
- }
|
|
|
- },
|
|
|
- trigger: 'change'
|
|
|
- }
|
|
|
],
|
|
|
/** 月份验证规则 */
|
|
|
month: [
|
|
@@ -164,7 +153,7 @@ export const FORECAST_FORM_RULES = {
|
|
|
*/
|
|
|
export const DEFAULT_FORECAST_FORM = {
|
|
|
forecastCode: '',
|
|
|
- year: new Date().getFullYear(),
|
|
|
+ year: new Date().getFullYear().toString(), // 改为字符串类型
|
|
|
month: new Date().getMonth() + 1,
|
|
|
customerId: null,
|
|
|
customerCode: '',
|