From 5cbba170e270e6f1c99a91e27dbb7951a27d596a Mon Sep 17 00:00:00 2001 From: “linengliang” <vanSuperEnergy@163.com> Date: 星期五, 24 十一月 2023 16:41:32 +0800 Subject: [PATCH] 故障报修验收 --- src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue | 68 +++++++++++++++++++++++----------- 1 files changed, 46 insertions(+), 22 deletions(-) diff --git a/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue b/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue index 9745f0c..fa9fee4 100644 --- a/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue +++ b/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue @@ -6,7 +6,7 @@ <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'> @@ -28,6 +28,12 @@ <a-form-model-item label='鐢宠浜�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='applicant'> <j-dict-select-tag type='list' v-model='model.applicant' dictCode='sys_user,realname,id' placeholder='璇烽�夋嫨鐢宠浜�' disabled /> + </a-form-model-item> + </a-col> + <a-col :span='12'> + <a-form-model-item label='鍔炵悊浜�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='handlePerson'> + <j-dict-select-tag type='list' v-model='model.handlePerson' dictCode='sys_user,realname,id' + placeholder='璇烽�夋嫨鍔炵悊浜�' /> </a-form-model-item> </a-col> <a-col :span='12'> @@ -82,7 +88,6 @@ }, data() { return { - isAchievement:false, labelCol: { xs: { span: 24 }, sm: { span: 5 } @@ -99,9 +104,9 @@ // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁 addDefaultRowNum: 1, validatorRules: { - num: [ - { required: true, message: '璇疯緭鍏ョ敵璇峰崟缂栧彿!' } - ], + // num: [ + // { required: true, message: '璇疯緭鍏ョ敵璇峰崟缂栧彿!' } + // ], auditStatus: [ { required: true, message: '璇疯緭鍏ュ鏍哥姸鎬�!' } ] @@ -117,7 +122,8 @@ { title: '鐢ㄦ埛', key: 'userId', - type: JVXETypes.userSelect, + type: JVXETypes.selectSearch, + dictCode: 'sys_user,realname,id ', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', @@ -136,7 +142,7 @@ { title: '璁惧缁熶竴缂栫爜', key: 'equipmentIds', - type: JVXETypes.selectSearch, + type: JVXETypes.selectMultiple, dictCode: 'mom_eam_equipment,num,id ', width: '200px', placeholder: '璇疯緭鍏�${title}', @@ -153,7 +159,7 @@ validateRules: [{ required: true, message: '${title}涓嶈兘涓虹┖' }] }, { - title: '琛ュ姙鍘熷洜', + title: '鐢宠/琛ュ姙鍘熷洜', key: 'replaceReason', type: JVXETypes.input, width: '200px', @@ -175,7 +181,7 @@ width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', - disabled:false + disabled:'achievementDisabled' }, { title: '瀹炴搷鎴愮哗', @@ -184,17 +190,17 @@ width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', - disabled:false + disabled:'achievementDisabled' }, { title: '鑰冭瘯缁撹', key: 'examinationConclusion', - type: JVXETypes.checkbox, - customValue: ['Y', 'N'], + type: JVXETypes.select, + dictCode:'examination_conclusion', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', - disabled:false + disabled:'achievementDisabled' }, // { // title: '鐘舵��', @@ -203,7 +209,7 @@ // width: '200px', // placeholder: '璇疯緭鍏�${title}', // defaultValue: '' - // } + // } ] }, url: { @@ -213,7 +219,8 @@ queryById: '/eam/operationCertificateApply/queryById', operationCertificateApplyDetail: { list: '/eam/operationCertificateApply/queryOperationCertificateApplyDetailByMainId' - } + }, + getNum: '/eam/sysIdentity/getNumNew', } } }, @@ -224,15 +231,24 @@ default: false, required: false }, + achievement: { + type: Boolean, + default: false, + required: false + }, }, computed: { formDisabled() { return this.disabled + }, + achievementDisabled() { + return this.achievement } }, created() { }, methods: { + addBefore() { this.operationCertificateApplyDetailTable.dataSource = [] }, @@ -248,6 +264,12 @@ 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 + } + }) } }, //鏍¢獙鎵�鏈変竴瀵逛竴瀛愯〃琛ㄥ崟 @@ -286,13 +308,15 @@ 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() -- Gitblit v1.9.3