From 5c6dd05ad4f55ad2655d8b9a8d445b769fa71447 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Thu, 23 May 2024 20:02:54 +0800 Subject: [PATCH] report --- src/components/occDisease/OccDisease.vue | 9 ++-- .../patientRegister/PatientRegisterEdit.vue | 11 ++++- src/components/sumDoctorCheck/ButtonList.vue | 43 ++++++++++++++++--- 3 files changed, 52 insertions(+), 11 deletions(-) diff --git a/src/components/occDisease/OccDisease.vue b/src/components/occDisease/OccDisease.vue index 610acec..e1de535 100644 --- a/src/components/occDisease/OccDisease.vue +++ b/src/components/occDisease/OccDisease.vue @@ -5,7 +5,7 @@ - + @@ -16,9 +16,12 @@ - + - + + + + diff --git a/src/components/patientRegister/PatientRegisterEdit.vue b/src/components/patientRegister/PatientRegisterEdit.vue index 782265a..74c438f 100644 --- a/src/components/patientRegister/PatientRegisterEdit.vue +++ b/src/components/patientRegister/PatientRegisterEdit.vue @@ -625,7 +625,11 @@ export default { data() { var validateMobileTelephone = (rule, value, callback) => { if (value) { - if (!isValidMobileNumber(value)) callback(new Error('请填写正确的手机号!')); + if (!isValidMobileNumber(value)){ + callback(new Error('请填写正确的手机号!')); + }else{ + callback(); + } } else { callback(); } @@ -1475,13 +1479,14 @@ export default { //提交 btnSubmit(formName, msgTip) { + console.log('btnSubmit',formName) this.$refs[formName].validate((valid, fields) => { // console.log('fields', fields) if (!valid) { this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message }); return false } - + console.log('btnSubmit1',formName) if (this.form.customerOrgId != this.dict.personOrgId) { if (!this.form.customerOrgRegisterId) { this.$message.warning({ showClose: true, message: "请填写单位体检次数!" }); @@ -1493,6 +1498,7 @@ export default { this.$message.warning({ showClose: true, message: "身份证号填写不合法!" }); return false } + console.log('btnSubmit2',formName) let body = this.madePrBody() // console.log('madePrBody',body) body.registerCheckAsbitems = deepCopy(this.dataTransOpts.tableM.register_check_asbitem) @@ -1504,6 +1510,7 @@ export default { } else { delete body.id; } + console.log('btnSubmit3',formName) // // console.log(`/api/patientregister/createreturninfo`, body); postapi(`/api/PatientRegister/CreatePatientRegister`, body) .then(async (res) => { diff --git a/src/components/sumDoctorCheck/ButtonList.vue b/src/components/sumDoctorCheck/ButtonList.vue index ffd9bfb..72a3ac3 100644 --- a/src/components/sumDoctorCheck/ButtonList.vue +++ b/src/components/sumDoctorCheck/ButtonList.vue @@ -7,10 +7,12 @@ 医生诊台
- 导入检查结果 + 导入检查结果
- 导入检验结果 + 导入检验结果
职业病 + :disabled="sumBtnDisabled('btnOcc')">职业病
@@ -89,6 +91,7 @@ import { getPagePriv, checkPagePriv, deepCopy } from "../../utlis/proFunc"; import PatientRegisterList from "../doctorCheck/PatientRegisterList.vue"; import SumDiagnosis from "./SumDiagnosis.vue"; import OccDisease from "../../components/occDisease/OccDisease.vue" +import moment from "moment"; export default { components: { @@ -124,7 +127,7 @@ export default { }, computed: { - ...mapState(["window", "dict", "dataTransOpts", "dialogWin","patientRegister", "doctorCheck", "sumDoctorCheck"]), + ...mapState(["window", "dict", "dataTransOpts", "dialogWin", "patientRegister", "doctorCheck", "sumDoctorCheck"]), }, methods: { @@ -200,7 +203,7 @@ export default { default: break; } - + postapi(url, { patientRegisterId: this.dataTransOpts.tableS.patient_register.id }).then(res => { if (res.code > -1) { this.$message.success({ showClose: true, message: '导入成功!' }) @@ -222,12 +225,40 @@ export default { let body = { patientRegisterId: this.dataTransOpts.tableS.patient_register.id, summaryDoctorId: this.dataTransOpts.tableS.patient_register.summaryDoctorId || null, - summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate, + summaryDate: this.dataTransOpts.tableS.patient_register.summaryDate||moment(new Date()).format("yyyy-MM-DD HH:mm:ss"), medicalConclusionId: this.dataTransOpts.tableS.patient_register.medicalConclusionId || null, sumSummarys: this.sumDoctorCheck.summaryList, sumSuggestions: this.sumDoctorCheck.suggestionList } + // 检查综述建议是否同一个人,防止不同人员数据覆盖 + let message = '' + for (let index = 0; index < this.sumDoctorCheck.summaryList.length; index++) { + let e = this.sumDoctorCheck.summaryList[index]; + if (!e.patientRegisterId || e.patientRegisterId != this.dataTransOpts.tableS.patient_register.id) { + message = "人员ID 与 综述人员ID 不一致" + break + } + } + if (message) { + this.$message.error({ showClose: true, message }) + return + } + + for (let index = 0; index < this.sumDoctorCheck.suggestionList.length; index++) { + let e = this.sumDoctorCheck.suggestionList[index]; + if (!e.patientRegisterId || e.patientRegisterId != this.dataTransOpts.tableS.patient_register.id) { + message = "人员ID 与 建议人员ID 不一致" + break + } + } + if (message) { + this.$message.error({ showClose: true, message }) + return + } + + + postapi(`/api/app/patientregister/UpdatePatientRegisterSummarySuggestion`, body) .then((res) => {