| | |
| | | <a-row> |
| | | <a-col :span='24'> |
| | | <a-form-item label='文档类型编码' :labelCol='labelCol' :wrapperCol='wrapperCol'> |
| | | <a-input placeholder='请输入文档类型编码' v-decorator="['num', validatorRules.num]"></a-input> |
| | | <a-input placeholder='将由系统自动生成' v-decorator="['num', validatorRules.num]" disabled></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span='24'> |
| | |
| | | |
| | | <script> |
| | | import pick from 'lodash.pick' |
| | | import { postAction, requestPut } from '@/api/manage' |
| | | import { getAction,postAction, requestPut } from '@/api/manage' |
| | | import { duplicateCheck } from '@/api/api' |
| | | |
| | | export default { |
| | |
| | | url: { |
| | | add: '/momEamDocumentType/add', |
| | | edit: '/momEamDocumentType/edit', |
| | | queryById: '/momEamDocumentType/queryById' |
| | | queryById: '/momEamDocumentType/queryById', |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | | alterFlag: '' |
| | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'num', 'name', 'remark')) |
| | | }) |
| | | if (record.id) { |
| | | if (this.model.id) { |
| | | this.codeDisable = true |
| | | } else { |
| | | this.codeDisable = false |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'DocumentType', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | |