| | |
| | | <a-row> |
| | | <a-col :span='12'> |
| | | <a-form-model-item label='申请单编号' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> |
| | | <a-input v-model='model.num' placeholder="将由系统生成"></a-input> |
| | | <a-input v-model='model.num' placeholder="将由系统生成" disabled></a-input> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='12'> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | isAchievement:false, |
| | | labelCol: { |
| | | xs: { span: 24 }, |
| | | sm: { span: 5 } |
| | |
| | | { |
| | | title: '用户', |
| | | key: 'userId', |
| | | type: JVXETypes.userSelect, |
| | | type: JVXETypes.selectSearch, |
| | | dictCode: 'sys_user,realname,id ', |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '', |
| | |
| | | { |
| | | title: '设备统一编码', |
| | | key: 'equipmentIds', |
| | | type: JVXETypes.selectSearch, |
| | | type: JVXETypes.selectMultiple, |
| | | dictCode: 'mom_eam_equipment,num,id ', |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '', |
| | | disabled:false |
| | | disabled:'achievementDisabled' |
| | | }, |
| | | { |
| | | title: '实操成绩', |
| | |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '', |
| | | disabled:false |
| | | disabled:'achievementDisabled' |
| | | }, |
| | | { |
| | | title: '考试结论', |
| | |
| | | width: '200px', |
| | | placeholder: '请输入${title}', |
| | | defaultValue: '', |
| | | disabled:false |
| | | disabled:'achievementDisabled' |
| | | }, |
| | | // { |
| | | // title: '状态', |
| | |
| | | default: false, |
| | | required: false |
| | | }, |
| | | achievement: { |
| | | type: Boolean, |
| | | default: false, |
| | | required: false |
| | | }, |
| | | }, |
| | | computed: { |
| | | formDisabled() { |
| | | return this.disabled |
| | | }, |
| | | achievementDisabled() { |
| | | return this.achievement |
| | | } |
| | | }, |
| | | created() { |
| | | this.initNum() |
| | | }, |
| | | methods: { |
| | | |
| | | initNum(){ |
| | | getAction(this.url.getNum, { type: 'OperationCertificateApply', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | }, |
| | | addBefore() { |
| | | this.operationCertificateApplyDetailTable.dataSource = [] |
| | | }, |
| | |
| | | if (this.model.id) { |
| | | let params = { id: this.model.id } |
| | | this.requestSubTableData(this.url.operationCertificateApplyDetail.list, params, this.operationCertificateApplyDetailTable) |
| | | }else{ |
| | | getAction(this.url.getNum, { type: 'OperationCertificateApply', length: '4' }).then((res) => { |
| | | if (res.success) { |
| | | this.model.num = res.message |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | //校验所有一对一子表表单 |
| | |
| | | console.log("formData===>",formData); |
| | | httpAction(url, formData, method).then((res) => { |
| | | if (res.success) { |
| | | httpAction(this.url.addOperationCertificate, formData.operationCertificateApplyDetailList, 'post').then((res) => { |
| | | if (res.success) { |
| | | this.$message.success(res.message) |
| | | }else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | if(this.achievementDisabled){ |
| | | httpAction(this.url.addOperationCertificate, formData.operationCertificateApplyDetailList, 'post').then((res) => { |
| | | if (res.success) { |
| | | this.$message.success(res.message) |
| | | }else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }) |
| | | } |
| | | this.$message.success(res.message) |
| | | this.$emit('ok') |
| | | this.close() |