完善检查项目模块
This commit is contained in:
parent
c35c310221
commit
45e66025dc
@ -7,8 +7,8 @@
|
||||
label-width="100px"
|
||||
v-loading="formLoading"
|
||||
>
|
||||
<el-form-item label="检查项目编码" prop="examItemCode" label-width="111px" >
|
||||
<el-input v-model="formData.examItemCode" placeholder="请输入检查项目编码" />
|
||||
<el-form-item label="检查项目编码" prop="examItemCode" label-width="111px">
|
||||
<el-input v-model="formData.examItemCode" placeholder="请输入检查项目编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检查项目名称" prop="examItemName" label-width="111px">
|
||||
<el-input v-model="formData.examItemName" placeholder="请输入检查项目名称" />
|
||||
@ -27,7 +27,7 @@
|
||||
<el-form-item label="删除标记:删除为 1 " prop="isdelete" v-if="false">
|
||||
<el-input v-model="formData.isdelete" placeholder="请输入删除标记:删除为 1 " />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="删除人" prop="deletePerson" v-if="false">
|
||||
<el-input v-model="formData.deletePerson" placeholder="请输入删除人" />
|
||||
</el-form-item>
|
||||
@ -46,13 +46,26 @@
|
||||
<el-input v-model="formData.orgId" placeholder="请输入机构编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="第三方系统的检查项目的CODE" prop="thirdPartyExamItemCode" v-if="false">
|
||||
<el-input v-model="formData.thirdPartyExamItemCode" placeholder="请输入第三方系统的检查项目的CODE" />
|
||||
<el-input
|
||||
v-model="formData.thirdPartyExamItemCode"
|
||||
placeholder="请输入第三方系统的检查项目的CODE"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="第三方系统的检查项目名称" prop="thirdPartyExamItemName" v-if="false">
|
||||
<el-input v-model="formData.thirdPartyExamItemName" placeholder="请输入第三方系统的检查项目名称" />
|
||||
<el-input
|
||||
v-model="formData.thirdPartyExamItemName"
|
||||
placeholder="请输入第三方系统的检查项目名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="第三方系统的检查项目的收费价格" prop="thirdPartyExamItemPrice" v-if="false">
|
||||
<el-input v-model="formData.thirdPartyExamItemPrice" placeholder="请输入第三方系统的检查项目的收费价格" />
|
||||
<el-form-item
|
||||
label="第三方系统的检查项目的收费价格"
|
||||
prop="thirdPartyExamItemPrice"
|
||||
v-if="false"
|
||||
>
|
||||
<el-input
|
||||
v-model="formData.thirdPartyExamItemPrice"
|
||||
placeholder="请输入第三方系统的检查项目的收费价格"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
@ -87,21 +100,13 @@ const formData = ref({
|
||||
examPartCode: undefined,
|
||||
thirdPartyExamItemCode: undefined,
|
||||
thirdPartyExamItemName: undefined,
|
||||
thirdPartyExamItemPrice: undefined,
|
||||
thirdPartyExamItemPrice: undefined
|
||||
})
|
||||
const formRules = reactive({
|
||||
examItemCode: [
|
||||
{ required: true, message: '请输入检查项目编号', trigger: 'blur' }
|
||||
],
|
||||
examItemName: [
|
||||
{ required: true, message: '请输入检查项目名称', trigger: 'blur' }
|
||||
],
|
||||
examPartCode: [
|
||||
{ required: true, message: '请选择检查部位编号', trigger: 'blur' }
|
||||
],
|
||||
orgId: [
|
||||
{ required: true, message: '请选择机构编号', trigger: 'blur' }
|
||||
]
|
||||
examItemCode: [{ required: true, message: '请输入检查项目编号', trigger: 'blur' }],
|
||||
examItemName: [{ required: true, message: '请输入检查项目名称', trigger: 'blur' }],
|
||||
examPartCode: [{ required: true, message: '请选择检查部位编号', trigger: 'blur' }],
|
||||
orgId: [{ required: true, message: '请选择机构编号', trigger: 'blur' }]
|
||||
})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
@ -132,16 +137,24 @@ const submitForm = async () => {
|
||||
formLoading.value = true
|
||||
try {
|
||||
const data = formData.value as unknown as examitemsVO
|
||||
const re = ref()
|
||||
if (formType.value === 'create') {
|
||||
await examitemsApi.createexamitems(data)
|
||||
re.value = await examitemsApi.createexamitems(data)
|
||||
if (re.value ==='项目ID已经存在') {
|
||||
message.error(re.value)
|
||||
return
|
||||
} else {
|
||||
message.success(t('common.createSuccess'))
|
||||
}
|
||||
|
||||
} else {
|
||||
await examitemsApi.updateexamitems(data)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
dialogVisible.value = false
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
|
||||
// 发送操作成功的事件
|
||||
emit('success')
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
@ -162,8 +175,8 @@ const resetForm = () => {
|
||||
examPartCode: undefined,
|
||||
thirdPartyExamItemCode: undefined,
|
||||
thirdPartyExamItemName: undefined,
|
||||
thirdPartyExamItemPrice: undefined,
|
||||
thirdPartyExamItemPrice: undefined
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user