修改时间禁用
This commit is contained in:
@@ -80,6 +80,7 @@
|
||||
<a-date-picker class="box-input"
|
||||
:placeholder="$t('PleaseSelect')+item.db_field_txt"
|
||||
@change="dateChange(item)"
|
||||
:disabledDate="disabledDate"
|
||||
format="YYYY-MM-DD"
|
||||
v-model="formInline[item.db_field_name]"
|
||||
:disabled="disabled"
|
||||
@@ -115,9 +116,9 @@
|
||||
formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')
|
||||
}}
|
||||
</a-button>
|
||||
<!-- <span class="button-text-text" v-if="formInline[item.db_field_name]">-->
|
||||
<!-- {{formInline[item.db_field_name].split(',').length}}-->
|
||||
<!-- </span>-->
|
||||
<!-- <span class="button-text-text" v-if="formInline[item.db_field_name]">-->
|
||||
<!-- {{formInline[item.db_field_name].split(',').length}}-->
|
||||
<!-- </span>-->
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
@@ -292,6 +293,9 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
disabledDate(current) {
|
||||
return current && current < moment().subtract(1,"day");
|
||||
},
|
||||
sumber() {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
@@ -327,7 +331,7 @@
|
||||
onChange(item) {
|
||||
let dateOne = moment(this.formInline[item][0]).format('YYYY-MM-DD')
|
||||
let dateTwo = moment(this.formInline[item][1]).format('YYYY-MM-DD')
|
||||
this.formInline[item] =dateOne ? [dateOne, dateTwo] : []
|
||||
this.formInline[item] = dateOne ? [dateOne, dateTwo] : []
|
||||
},
|
||||
|
||||
clickButtonToUpload(current) {
|
||||
@@ -402,10 +406,10 @@
|
||||
}
|
||||
if (res.field_show_type === '1' || res.field_show_type === '2' ||
|
||||
res.field_show_type === '8' || res.field_show_type === '9' || res.field_show_type === '10'
|
||||
|| res.field_show_type === '11'){
|
||||
|| res.field_show_type === '11') {
|
||||
rule.push({
|
||||
max: res.db_length,
|
||||
message: res.db_field_txt+'不能超出'+res.db_length+'个字符',
|
||||
message: res.db_field_txt + '不能超出' + res.db_length + '个字符',
|
||||
trigger: 'blur'
|
||||
})
|
||||
}
|
||||
@@ -458,7 +462,7 @@
|
||||
},
|
||||
StandardselectionChange(value, id) {
|
||||
this.formInline[value + '_id'] = id
|
||||
this.formInline = {...this.formInline}
|
||||
this.formInline = { ...this.formInline }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user