| | |
| | | :wrapperCol='wrapperCol' |
| | | prop='annex' |
| | | > |
| | | <j-image-upload |
| | | :isMultiple="false" |
| | | v-model="model.annex" |
| | | ></j-image-upload> |
| | | <j-upload :returnUrl= "false" :isMultiple="false" v-model="model.file" ></j-upload> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | |
| | | |
| | | import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' |
| | | import { JVXETypes } from '@comp/jeecg/JVxeTable' |
| | | import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' |
| | | |
| | | import JFormContainer from '@/components/jeecg/JFormContainer' |
| | | import { getAction } from '@api/manage' |
| | | import { VALIDATE_FAILED, getRefPromise, validateFormAndTables,validateFormModelAndTables} from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' |
| | | |
| | | export default { |
| | | name: 'ProjectMaintenanceOrderForm', |
| | |
| | | }, |
| | | methods: { |
| | | |
| | | handleOk() { |
| | | this.model['annex'] = this.model.file[0].filePath; |
| | | /** 触发表单验证 */ |
| | | this.getAllTable().then(tables => { |
| | | /** 一次性验证主表和所有的次表 */ |
| | | return validateFormModelAndTables(this.$refs.form,this.model, tables) |
| | | }).then(allValues => { |
| | | /** 一次性验证一对一的所有子表 */ |
| | | return this.validateSubForm(allValues) |
| | | }).then(allValues => { |
| | | if (typeof this.classifyIntoFormData !== 'function') { |
| | | throw this.throwNotFunction('classifyIntoFormData') |
| | | } |
| | | let formData = this.classifyIntoFormData(allValues) |
| | | // 发起请求 |
| | | return this.request(formData) |
| | | }).catch(e => { |
| | | if (e.error === VALIDATE_FAILED) { |
| | | // 如果有未通过表单验证的子表,就自动跳转到它所在的tab |
| | | this.activeKey = e.index == null ? this.activeKey : this.refKeys[e.index] |
| | | } else { |
| | | console.error(e) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | getSuppler() { |
| | | getAction(this.url.supplierVoList).then((res) => { |
| | | if (res.success) { |