From 81c519d7412ef28d3cc3e2d015830e0f493a0dd5 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期四, 28 十一月 2024 09:32:59 +0800
Subject: [PATCH] MDC设备实施台账页面调整弹窗标题及输入提醒
---
src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue | 218 ++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 169 insertions(+), 49 deletions(-)
diff --git a/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue b/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue
index 9745f0c..c12eabf 100644
--- a/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue
+++ b/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue
@@ -2,63 +2,162 @@
<a-spin :spinning='confirmLoading'>
<j-form-container :disabled='formDisabled'>
<!-- 涓昏〃鍗曞尯鍩� -->
- <a-form-model ref='form' :model='model' :rules='validatorRules' slot='detail'>
+ <a-form-model
+ ref='form'
+ :model='model'
+ :rules='validatorRules'
+ slot='detail'
+ >
<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-form-model-item
+ label='鐢宠鍗曠紪鍙�'
+ :labelCol='labelCol'
+ :wrapperCol='wrapperCol'
+ prop='num'
+ >
+ <a-input
+ v-model='model.num'
+ placeholder="灏嗙敱绯荤粺鐢熸垚"
+ disabled
+ ></a-input>
</a-form-model-item>
</a-col>
<a-col :span='12'>
- <a-form-model-item label='绫诲瀷' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='type'>
- <j-dict-select-tag type='radio' v-model='model.type' dictCode='apply_type' placeholder='璇烽�夋嫨绫诲瀷' />
+ <a-form-model-item
+ label='绫诲瀷'
+ :labelCol='labelCol'
+ :wrapperCol='wrapperCol'
+ prop='type'
+ >
+ <j-dict-select-tag
+ type='radio'
+ v-model='model.type'
+ dictCode='apply_type'
+ placeholder='璇烽�夋嫨绫诲瀷'
+ />
</a-form-model-item>
</a-col>
<a-col :span='12'>
- <a-form-model-item label='鎵�鍦ㄥ崟浣�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='departId'>
- <j-select-depart v-model='model.departId' :multi='true' />
+ <a-form-model-item
+ label='鎵�鍦ㄥ崟浣�'
+ :labelCol='labelCol'
+ :wrapperCol='wrapperCol'
+ prop='departId'
+ >
+ <!-- <j-select-depart
+ v-model='model.departId'
+ :multi='true'
+ /> -->
+ <j-dict-select-tag
+ type='list'
+ v-model='model.departId'
+ dictCode="sys_depart,depart_name,id"
+ placeholder='璇烽�夋嫨鎵�鍦ㄥ崟浣�'
+ />
</a-form-model-item>
</a-col>
<a-col :span='12'>
- <a-form-model-item label='鑱旂郴鐢佃瘽' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='contactNumber'>
- <a-input v-model='model.contactNumber' placeholder='璇疯緭鍏ヨ仈绯荤數璇�'></a-input>
+ <a-form-model-item
+ label='鑱旂郴鐢佃瘽'
+ :labelCol='labelCol'
+ :wrapperCol='wrapperCol'
+ prop='contactNumber'
+ >
+ <a-input
+ v-model='model.contactNumber'
+ placeholder='璇疯緭鍏ヨ仈绯荤數璇�'
+ ></a-input>
</a-form-model-item>
</a-col>
<a-col :span='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
+ 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='auditStatus'>
- <j-dict-select-tag type='list' v-model='model.auditStatus' dictCode='certificate_apply_status'
- placeholder='璇烽�夋嫨瀹℃牳鐘舵��' disabled />
+ <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 , del_flag!='1'"
+ placeholder='璇烽�夋嫨鍔炵悊浜�'
+ />
</a-form-model-item>
</a-col>
- <a-col :span='24'>
- <a-form-model-item label='澶囨敞' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'>
- <a-input v-model='model.remark' placeholder='璇疯緭鍏ュ娉�'></a-input>
+ <a-col :span='12'>
+ <a-form-model-item
+ label='瀹℃牳鐘舵��'
+ :labelCol='labelCol'
+ :wrapperCol='wrapperCol'
+ prop='auditStatus'
+ >
+ <j-dict-select-tag
+ type='list'
+ v-model='model.auditStatus'
+ dictCode='certificate_apply_status'
+ placeholder='璇烽�夋嫨瀹℃牳鐘舵��'
+ disabled
+ />
</a-form-model-item>
</a-col>
+ <!-- <a-col :span='24'>
+ <a-form-model-item
+ label='澶囨敞'
+ :labelCol='labelCol'
+ :wrapperCol='wrapperCol'
+ prop='remark'
+ >
+ <a-input
+ v-model='model.remark'
+ placeholder='璇疯緭鍏ュ娉�'
+ ></a-input>
+ </a-form-model-item>
+ </a-col> -->
</a-row>
</a-form-model>
</j-form-container>
<!-- 瀛愯〃鍗曞尯鍩� -->
- <a-tabs v-model='activeKey' @change='handleChangeTabs'>
- <a-tab-pane tab='鎿嶄綔璇佺敵璇锋槑缁嗚〃' :key='refKeys[0]' :forceRender='true'>
+ <a-tabs
+ v-model='activeKey'
+ @change='handleChangeTabs'
+ >
+ <a-tab-pane
+ tab='鎿嶄綔璇佺敵璇锋槑缁嗚〃'
+ :key='refKeys[0]'
+ :forceRender='true'
+ >
<j-vxe-table
keep-source
:ref='refKeys[0]'
+ :bordered='true'
+ :alwaysEdit='true'
:loading='operationCertificateApplyDetailTable.loading'
:columns='operationCertificateApplyDetailTable.columns'
:dataSource='operationCertificateApplyDetailTable.dataSource'
- :maxHeight='300'
+ :maxHeight='600'
:disabled='formDisabled'
- :rowNumber='true'
+ rowNumber='2'
:rowSelection='true'
:toolbar='true'
/>
+ <!-- :toolbarConfig='toolbarConfig' -->
</a-tab-pane>
</a-tabs>
</a-spin>
@@ -66,7 +165,7 @@
<script>
-import { getAction,httpAction } from '@/api/manage'
+import { getAction, httpAction } from '@/api/manage'
import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
import { JVXETypes } from '@/components/jeecg/JVxeTable'
import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js'
@@ -82,7 +181,6 @@
},
data() {
return {
- isAchievement:false,
labelCol: {
xs: { span: 24 },
sm: { span: 5 }
@@ -99,9 +197,9 @@
// 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁
addDefaultRowNum: 1,
validatorRules: {
- num: [
- { required: true, message: '璇疯緭鍏ョ敵璇峰崟缂栧彿!' }
- ],
+ // num: [
+ // { required: true, message: '璇疯緭鍏ョ敵璇峰崟缂栧彿!' }
+ // ],
auditStatus: [
{ required: true, message: '璇疯緭鍏ュ鏍哥姸鎬�!' }
]
@@ -112,17 +210,20 @@
// 鎿嶄綔璇佺敵璇锋槑缁嗚〃
operationCertificateApplyDetailTable: {
loading: false,
+ bordered: true,
dataSource: [],
columns: [
{
title: '鐢ㄦ埛',
key: 'userId',
- type: JVXETypes.userSelect,
+ type: JVXETypes.select,
+ dictCode: 'sys_user,realname,id ',
width: '200px',
placeholder: '璇疯緭鍏�${title}',
defaultValue: '',
validateRules: [{ required: true, message: '${title}涓嶈兘涓虹┖' }]
},
+ // type: JVXETypes.selectSearch,
// {
// title: '璁惧缁熶竴缂栫爜',
// key: 'equipmentIds',
@@ -136,13 +237,14 @@
{
title: '璁惧缁熶竴缂栫爜',
key: 'equipmentIds',
- type: JVXETypes.selectSearch,
- dictCode: 'mom_eam_equipment,num,id ',
- width: '200px',
+ type: JVXETypes.selectMultiple,
+ width: '270px',
placeholder: '璇疯緭鍏�${title}',
defaultValue: '',
+ dictCode: 'mom_eam_equipment,num,id, del_flag!=\'1\'',
validateRules: [{ required: true, message: '${title}涓嶈兘涓虹┖' }]
},
+ // dictCode: 'mom_eam_equipment,num,id',
{
title: '涓婂矖璇佸彿',
key: 'appointmentCardNum',
@@ -153,7 +255,7 @@
validateRules: [{ required: true, message: '${title}涓嶈兘涓虹┖' }]
},
{
- title: '琛ュ姙鍘熷洜',
+ title: '鐢宠/琛ュ姙鍘熷洜',
key: 'replaceReason',
type: JVXETypes.input,
width: '200px',
@@ -175,7 +277,7 @@
width: '200px',
placeholder: '璇疯緭鍏�${title}',
defaultValue: '',
- disabled:false
+ disabled: 'achievementDisabled'
},
{
title: '瀹炴搷鎴愮哗',
@@ -184,17 +286,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,17 +305,18 @@
// width: '200px',
// placeholder: '璇疯緭鍏�${title}',
// defaultValue: ''
- // }
+ // }
]
},
url: {
add: '/eam/operationCertificateApply/add',
edit: '/eam/operationCertificateApply/edit',
- addOperationCertificate:'/eam/operationCertificate/addOperationCertificate',
+ addOperationCertificate: '/eam/operationCertificate/addOperationCertificate',
queryById: '/eam/operationCertificateApply/queryById',
operationCertificateApplyDetail: {
list: '/eam/operationCertificateApply/queryOperationCertificateApplyDetailByMainId'
- }
+ },
+ getNum: '/eam/sysIdentity/getNumNew',
}
}
},
@@ -224,15 +327,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 +360,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
+ }
+ })
}
},
//鏍¢獙鎵�鏈変竴瀵逛竴瀛愯〃琛ㄥ崟
@@ -283,17 +401,19 @@
method = 'put'
}
this.confirmLoading = true
- console.log("formData===>",formData);
+ 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)
- }
- })
- this.$message.success(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()
} else {
--
Gitblit v1.9.3