From 4e2d4d85ec1b9fc629ce517a0ca8d335c994537f Mon Sep 17 00:00:00 2001 From: Auora <14587305+auoraasd@user.noreply.gitee.com> Date: Mon, 17 Nov 2025 15:55:59 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E3=80=90bug=E3=80=91=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E6=92=A4=E5=9B=9E=E6=8C=89=E9=92=AE=E5=BC=B9=E5=87=BA=E5=A4=9A?= =?UTF-8?q?=E4=BD=99=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/doctorstation/components/api.js | 3 +- .../maintainSystem/chargeConfig/index.vue | 54 +++++++++++++++---- 2 files changed, 45 insertions(+), 12 deletions(-) diff --git a/openhis-ui-vue3/src/views/doctorstation/components/api.js b/openhis-ui-vue3/src/views/doctorstation/components/api.js index 0521a2d4..476cd2f4 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/api.js +++ b/openhis-ui-vue3/src/views/doctorstation/components/api.js @@ -250,7 +250,8 @@ export function singOut(data) { return request({ url: '/doctor-station/advice/sign-off', method: 'post', - data: data + data: data, + skipErrorMsg: true }) } /** diff --git a/openhis-ui-vue3/src/views/maintainSystem/chargeConfig/index.vue b/openhis-ui-vue3/src/views/maintainSystem/chargeConfig/index.vue index dc1c56cb..b0e47f7a 100644 --- a/openhis-ui-vue3/src/views/maintainSystem/chargeConfig/index.vue +++ b/openhis-ui-vue3/src/views/maintainSystem/chargeConfig/index.vue @@ -198,9 +198,41 @@ const handleSave = async () => { await formRef.value.validate(); } - // 模拟保存操作 - // 实际项目中应该调用API保存数据 - console.log('保存配置:', formData); + // 将表单数据转换为系统配置格式 + const configData = [ + { configKey: 'medicalRecordFee', configValue: formData.medicalRecordFee, configName: '病历本费用' }, + { configKey: 'patientCardFee', configValue: formData.patientCardFee, configName: '就诊卡费' }, + { configKey: 'medicalRecordFlag', configValue: formData.medicalRecordFlag ? '1' : '0', configName: '病历费入账标志' }, + { configKey: 'isNightShift', configValue: formData.isNightShift ? '1' : '0', configName: '是否启用晚班' }, + { configKey: 'patientCardFlag', configValue: formData.patientCardFlag ? '1' : '0', configName: '就诊卡记账标志' }, + { configKey: 'morningStartTime', configValue: formData.morningStartTime, configName: '上午接诊起始时间' }, + { configKey: 'autoGenerateOutpatientNo', configValue: formData.autoGenerateOutpatientNo ? '1' : '0', configName: '自动产生门诊号' }, + { configKey: 'allowModifyOutpatientNo', configValue: formData.allowModifyOutpatientNo ? '1' : '0', configName: '建档时是否允许修改门诊号' }, + { configKey: 'afternoonStartTime', configValue: formData.afternoonStartTime, configName: '下午起始时间' }, + { configKey: 'eveningStartTime', configValue: formData.eveningStartTime, configName: '晚上起始时间' }, + { configKey: 'registrationValidity', configValue: formData.registrationValidity, configName: '挂号有效期' }, + { configKey: 'registrationDocumentMode', configValue: formData.registrationDocumentMode, configName: '挂号单据模式' }, + { configKey: 'exemptFlag', configValue: formData.exemptFlag ? '1' : '0', configName: '减免标志' }, + { configKey: 'consultationFlag', configValue: formData.consultationFlag ? '1' : '0', configName: '义诊标志' }, + { configKey: 'enableHolidayFeeFloat', configValue: formData.enableHolidayFeeFloat ? '1' : '0', configName: '启用法定节假日挂号费浮动' }, + { configKey: 'guardianAge', configValue: formData.guardianAge, configName: '监护人规定年龄' }, + { configKey: 'enableDoubleScreen', configValue: formData.enableDoubleScreen ? '1' : '0', configName: '门诊挂号启用双屏' }, + { configKey: 'optionalRegistrationType', configValue: formData.optionalRegistrationType ? '1' : '0', configName: '挂号类型可选择' }, + { configKey: 'isPrint', configValue: formData.isPrint ? '1' : '0', configName: '是否打印挂号单' }, + ]; + + // 调用系统配置API保存每个参数 + for (const config of configData) { + // 先查询是否存在该配置 + const existingConfig = await getConfigKey(config.configKey); + if (existingConfig.data) { + // 如果存在则更新 + await updateConfig({ ...config, configId: existingConfig.data.configId }); + } else { + // 如果不存在则新增 + await addConfig(config); + } + } ElMessage.success('保存成功'); } catch (error) { @@ -217,11 +249,11 @@ const handleClose = () => {