| | |
| | | :wrapperCol="{span:18}" |
| | | > |
| | | <a-input |
| | | :readOnly="disableSubmit" |
| | | :readOnly="true" |
| | | allow-clear |
| | | placeholder="请输入工段编号" |
| | | placeholder="将由系统自动生成" |
| | | v-decorator="['num', validatorRules.num ]" |
| | | /> |
| | | </a-form-item> |
| | |
| | | |
| | | <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: "/base/productionLine/add", |
| | | edit: "/base/productionLine/edit" |
| | | edit: "/base/productionLine/edit", |
| | | getNum: '/eam/sysIdentity/getNumNew', |
| | | }, |
| | | disableSubmit: false, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | |
| | | this.$nextTick(() => { |
| | | this.form.setFieldsValue(pick(this.model, 'num', 'name', 'shiftCategoryId', 'remark')) |
| | | }); |
| | | if (!record.id) { |
| | | this.$nextTick(() => { |
| | | getAction(this.url.getNum, { type: 'ProductionLine', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.form.setFieldsValue({ num: res.message }); |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | }, |
| | | close() { |
| | | this.$emit('close'); |