[update] 修改bug80451
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
<a-date-picker :placeholder="$t('pleaseSelect') + $t('expirationDate')"
|
||||
v-decorator="['deadline', validatorRules.deadline]"
|
||||
value-format="YYYY-MM-DD"
|
||||
:disabled-date="disabledDate"
|
||||
format="YYYY-MM-DD"
|
||||
:showTime="false"
|
||||
style="width: 100%" />
|
||||
@@ -59,6 +60,7 @@
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import UserSelection from '@/components/selection/UserSelection'
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
name: 'AddEditDrafterDrawer',
|
||||
@@ -118,6 +120,10 @@ export default {
|
||||
this.form.setFieldsValue(pick(this.model, 'dept', 'user', 'scope', 'deadline'))
|
||||
})
|
||||
},
|
||||
// 不可选择的日期
|
||||
disabledDate (current) {
|
||||
return current && current < moment().startOf('day')
|
||||
},
|
||||
// 选择用户得到用户名
|
||||
userSelectNameChange (value, fieldName) {
|
||||
this.model[fieldName + '_dictText'] = value
|
||||
|
||||
Reference in New Issue
Block a user