413 460 513 514
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.openhis.web.doctorstation.dto;
|
package com.openhis.web.doctorstation.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -55,6 +56,7 @@ public class InfectiousDiseaseReportDto {
|
|||||||
private String sex;
|
private String sex;
|
||||||
|
|
||||||
/** 出生日期 */
|
/** 出生日期 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date birthday;
|
private Date birthday;
|
||||||
|
|
||||||
/** 实足年龄 */
|
/** 实足年龄 */
|
||||||
|
|||||||
@@ -17,6 +17,9 @@ import com.openhis.common.constant.PromptMsgConstant;
|
|||||||
import com.openhis.common.enums.*;
|
import com.openhis.common.enums.*;
|
||||||
import com.openhis.common.utils.EnumUtils;
|
import com.openhis.common.utils.EnumUtils;
|
||||||
import com.openhis.common.utils.HisQueryUtils;
|
import com.openhis.common.utils.HisQueryUtils;
|
||||||
|
import com.core.common.utils.SecurityUtils;
|
||||||
|
import com.openhis.workflow.domain.InventoryItem;
|
||||||
|
import com.openhis.workflow.service.IInventoryItemService;
|
||||||
import com.openhis.web.basedatamanage.dto.LocationDto;
|
import com.openhis.web.basedatamanage.dto.LocationDto;
|
||||||
import com.openhis.web.common.dto.UnitDto;
|
import com.openhis.web.common.dto.UnitDto;
|
||||||
import com.openhis.web.inventorymanage.appservice.IProductTransferAppService;
|
import com.openhis.web.inventorymanage.appservice.IProductTransferAppService;
|
||||||
@@ -57,6 +60,9 @@ public class ProductTransferAppServiceImpl implements IProductTransferAppService
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IPractitionerService practitionerService;
|
private IPractitionerService practitionerService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IInventoryItemService inventoryItemService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品调拨页面初始化
|
* 商品调拨页面初始化
|
||||||
*
|
*
|
||||||
@@ -196,6 +202,23 @@ public class ProductTransferAppServiceImpl implements IProductTransferAppService
|
|||||||
@Override
|
@Override
|
||||||
public R<?> addOrEditBatchTransferReceipt(List<ProductTransferDto> productTransferDtoList, Boolean flag) {
|
public R<?> addOrEditBatchTransferReceipt(List<ProductTransferDto> productTransferDtoList, Boolean flag) {
|
||||||
|
|
||||||
|
// 校验调拨数量:必须 > 0 且不超过源库存数量(从数据库查实时库存)
|
||||||
|
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||||
|
for (ProductTransferDto dto : productTransferDtoList) {
|
||||||
|
if (dto.getItemQuantity() == null || dto.getItemQuantity().compareTo(java.math.BigDecimal.ZERO) <= 0) {
|
||||||
|
return R.fail("调拨数量必须大于0");
|
||||||
|
}
|
||||||
|
// 查询该药品在源仓库的实时库存总量
|
||||||
|
List<InventoryItem> inventoryList = inventoryItemService.selectInventoryByItemId(
|
||||||
|
dto.getItemId(), dto.getLotNumber(), dto.getSourceLocationId(), tenantId);
|
||||||
|
java.math.BigDecimal actualStock = inventoryList.stream()
|
||||||
|
.map(InventoryItem::getQuantity)
|
||||||
|
.reduce(java.math.BigDecimal.ZERO, java.math.BigDecimal::add);
|
||||||
|
if (dto.getItemQuantity().compareTo(actualStock) > 0) {
|
||||||
|
return R.fail("调拨数量不可超出源库存数量(当前库存:" + actualStock + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<String> idList = new ArrayList<>();
|
List<String> idList = new ArrayList<>();
|
||||||
if (flag) {
|
if (flag) {
|
||||||
// 批量保存按钮
|
// 批量保存按钮
|
||||||
@@ -309,6 +332,22 @@ public class ProductTransferAppServiceImpl implements IProductTransferAppService
|
|||||||
@Override
|
@Override
|
||||||
public R<?> addOrEditTransferReceipt(List<ProductTransferDto> productTransferDtoList) {
|
public R<?> addOrEditTransferReceipt(List<ProductTransferDto> productTransferDtoList) {
|
||||||
|
|
||||||
|
// 校验调拨数量:必须 > 0 且不超过源库存数量(从数据库查实时库存)
|
||||||
|
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||||
|
for (ProductTransferDto dto : productTransferDtoList) {
|
||||||
|
if (dto.getItemQuantity() == null || dto.getItemQuantity().compareTo(java.math.BigDecimal.ZERO) <= 0) {
|
||||||
|
return R.fail("调拨数量必须大于0");
|
||||||
|
}
|
||||||
|
List<InventoryItem> inventoryList = inventoryItemService.selectInventoryByItemId(
|
||||||
|
dto.getItemId(), dto.getLotNumber(), dto.getSourceLocationId(), tenantId);
|
||||||
|
java.math.BigDecimal actualStock = inventoryList.stream()
|
||||||
|
.map(InventoryItem::getQuantity)
|
||||||
|
.reduce(java.math.BigDecimal.ZERO, java.math.BigDecimal::add);
|
||||||
|
if (dto.getItemQuantity().compareTo(actualStock) > 0) {
|
||||||
|
return R.fail("调拨数量不可超出源库存数量(当前库存:" + actualStock + ")");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<String> idList = new ArrayList<>();
|
List<String> idList = new ArrayList<>();
|
||||||
|
|
||||||
// 单据号取得
|
// 单据号取得
|
||||||
@@ -380,6 +419,25 @@ public class ProductTransferAppServiceImpl implements IProductTransferAppService
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> submitApproval(String busNo) {
|
public R<?> submitApproval(String busNo) {
|
||||||
|
// 提交前再次校验调拨数量(从数据库查实时库存)
|
||||||
|
List<SupplyRequest> requestList = supplyRequestService.getSupplyByBusNo(busNo);
|
||||||
|
if (requestList != null && !requestList.isEmpty()) {
|
||||||
|
Integer tenantId = SecurityUtils.getLoginUser().getTenantId();
|
||||||
|
for (SupplyRequest request : requestList) {
|
||||||
|
if (request.getItemQuantity() == null || request.getItemQuantity().compareTo(java.math.BigDecimal.ZERO) <= 0) {
|
||||||
|
return R.fail("调拨数量必须大于0,请检查后重新保存");
|
||||||
|
}
|
||||||
|
// 查询该药品在源仓库的实时库存总量
|
||||||
|
List<InventoryItem> inventoryList = inventoryItemService.selectInventoryByItemId(
|
||||||
|
request.getItemId(), request.getLotNumber(), request.getSourceLocationId(), tenantId);
|
||||||
|
java.math.BigDecimal actualStock = inventoryList.stream()
|
||||||
|
.map(InventoryItem::getQuantity)
|
||||||
|
.reduce(java.math.BigDecimal.ZERO, java.math.BigDecimal::add);
|
||||||
|
if (request.getItemQuantity().compareTo(actualStock) > 0) {
|
||||||
|
return R.fail("调拨数量不可超出源库存数量(当前库存:" + actualStock + "),请检查后重新保存");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 单据提交审核
|
// 单据提交审核
|
||||||
boolean result = supplyRequestService.submitApproval(busNo);
|
boolean result = supplyRequestService.submitApproval(busNo);
|
||||||
return result ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null))
|
return result ? R.ok(null, MessageUtils.createMessage(PromptMsgConstant.Common.M00004, null))
|
||||||
|
|||||||
@@ -519,9 +519,10 @@
|
|||||||
>
|
>
|
||||||
<template #append>
|
<template #append>
|
||||||
<!-- 审核记录:查看/审核都展示,保证留痕可追溯 -->
|
<!-- 审核记录:查看/审核都展示,保证留痕可追溯 -->
|
||||||
|
<!-- 修复:查看模式始终显示区块;审核模式始终显示区块(header + 空状态 或 timeline) -->
|
||||||
<div
|
<div
|
||||||
class="audit-records-section"
|
class="audit-records-section"
|
||||||
v-if="drawerMode === 'view' || (drawerMode === 'audit' && auditRecords.length > 0)"
|
v-if="drawerMode === 'view' || drawerMode === 'audit'"
|
||||||
>
|
>
|
||||||
<h3 class="section-title">审核记录</h3>
|
<h3 class="section-title">审核记录</h3>
|
||||||
<el-timeline v-if="auditRecords.length > 0">
|
<el-timeline v-if="auditRecords.length > 0">
|
||||||
|
|||||||
@@ -349,11 +349,17 @@ async function getList() {
|
|||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
// 过滤掉中医诊断,只保留西医诊断
|
// 过滤掉中医诊断,只保留西医诊断
|
||||||
form.value.diagnosisList = res.data.filter(item => item.typeName !== '中医诊断');
|
form.value.diagnosisList = res.data.filter(item => item.typeName !== '中医诊断');
|
||||||
// 为旧数据添加默认分类
|
// 为旧数据添加默认分类和selectedDiseases
|
||||||
form.value.diagnosisList.forEach(item => {
|
form.value.diagnosisList.forEach(item => {
|
||||||
if (!item.classification) {
|
if (!item.classification) {
|
||||||
item.classification = '西医';
|
item.classification = '西医';
|
||||||
}
|
}
|
||||||
|
// 如果ybNo(诊断编码)符合传染病编码格式,添加到selectedDiseases
|
||||||
|
if (item.ybNo && /^(01|02|03)/.test(item.ybNo)) {
|
||||||
|
item.selectedDiseases = [item.ybNo];
|
||||||
|
} else {
|
||||||
|
item.selectedDiseases = item.selectedDiseases || [];
|
||||||
|
}
|
||||||
});
|
});
|
||||||
emits('diagnosisSave', false);
|
emits('diagnosisSave', false);
|
||||||
}
|
}
|
||||||
@@ -685,23 +691,78 @@ async function handleFoodDiseasesCheck() {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 传染病报告卡处理
|
* 传染病报告卡处理
|
||||||
* 通过诊断目录维护的'报卡类型'字段自动识别是否有需要填写的传染病报告卡
|
* 通过诊断名称自动识别并勾选传染病报告卡中的疾病
|
||||||
* 如果有则弹出诊断对应需登记的报告卡界面
|
|
||||||
*/
|
*/
|
||||||
function handleInfectiousDiseaseReport() {
|
function handleInfectiousDiseaseReport() {
|
||||||
// 查找所有有报卡类型的诊断(reportTypeCode不为空)
|
// 疾病名称到报卡编码的映射(根据传染病报告卡弹窗中的疾病列表)
|
||||||
const diagnosesWithReportType = form.value.diagnosisList.filter(d => d.reportTypeCode);
|
const diseaseNameToCode = {
|
||||||
|
// 甲类
|
||||||
|
'鼠疫': '0101',
|
||||||
|
'霍乱': '0102',
|
||||||
|
// 乙类
|
||||||
|
'传染性非典型肺炎': '0201',
|
||||||
|
'艾滋病': '0202',
|
||||||
|
'病毒性肝炎': '0203',
|
||||||
|
'脊髓灰质炎': '0204',
|
||||||
|
'人感染高致病性禽流感': '0205',
|
||||||
|
'麻疹': '0206',
|
||||||
|
'流行性出血热': '0207',
|
||||||
|
'狂犬病': '0208',
|
||||||
|
'流行性乙型脑炎': '0209',
|
||||||
|
'登革热': '0210',
|
||||||
|
'炭疽': '0211',
|
||||||
|
'细菌性和阿米巴性痢疾': '0212',
|
||||||
|
'肺结核': '0213',
|
||||||
|
'伤寒和副伤寒': '0214',
|
||||||
|
'流行性脑脊髓膜炎': '0215',
|
||||||
|
'百日咳': '0216',
|
||||||
|
'白喉': '0217',
|
||||||
|
'新生儿破伤风': '0218',
|
||||||
|
'猩红热': '0219',
|
||||||
|
'布鲁氏菌病': '0220',
|
||||||
|
'淋病': '0221',
|
||||||
|
'梅毒': '0222',
|
||||||
|
'钩端螺旋体病': '0223',
|
||||||
|
'血吸虫病': '0224',
|
||||||
|
'疟疾': '0225',
|
||||||
|
'新型冠状病毒肺炎': '0226',
|
||||||
|
'甲型H1N1流感': '0227',
|
||||||
|
'人感染H7N9禽流感': '0228',
|
||||||
|
// 丙类
|
||||||
|
'流行性感冒': '0301',
|
||||||
|
'流行性腮腺炎': '0302',
|
||||||
|
'风疹': '0303',
|
||||||
|
'急性出血性结膜炎': '0304',
|
||||||
|
'麻风病': '0305',
|
||||||
|
'流行性和地方性斑疹伤寒': '0306',
|
||||||
|
'黑热病': '0307',
|
||||||
|
'包虫病': '0308',
|
||||||
|
'丝虫病': '0309',
|
||||||
|
'除霍乱/菌痢/伤寒副伤寒以外的感染性腹泻病': '0310',
|
||||||
|
'其它感染性腹泻病': '0310',
|
||||||
|
'手足口病': '0311',
|
||||||
|
};
|
||||||
|
|
||||||
if (diagnosesWithReportType.length === 0) {
|
// 获取所有诊断名称对应的报卡编码
|
||||||
|
const allSelectedDiseases = form.value.diagnosisList
|
||||||
|
.map(d => diseaseNameToCode[d.name] || null)
|
||||||
|
.filter(code => code);
|
||||||
|
|
||||||
|
if (allSelectedDiseases.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 优先使用主诊断,如果没有主诊断有报卡类型则使用第一个有报卡类型的诊断
|
// 优先使用主诊断
|
||||||
const mainDiagnosisWithReport = diagnosesWithReportType.find(d => d.maindiseFlag === 1);
|
const mainDiagnosis = form.value.diagnosisList.find(d => d.maindiseFlag === 1);
|
||||||
const targetDiagnosis = mainDiagnosisWithReport || diagnosesWithReportType[0];
|
const firstDiagnosis = form.value.diagnosisList[0];
|
||||||
|
|
||||||
|
const diagnosisToShow = {
|
||||||
|
...(mainDiagnosis || firstDiagnosis),
|
||||||
|
selectedDiseases: allSelectedDiseases
|
||||||
|
};
|
||||||
|
|
||||||
// 弹出传染病报告卡弹窗
|
// 弹出传染病报告卡弹窗
|
||||||
proxy.$refs.infectiousDiseaseReportRef?.show(targetDiagnosis);
|
proxy.$refs.infectiousDiseaseReportRef?.show(diagnosisToShow);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -814,7 +875,8 @@ form.value.diagnosisList.push({
|
|||||||
classification: '西医', // 默认为西医
|
classification: '西医', // 默认为西医
|
||||||
onsetDate: getCurrentDate(),
|
onsetDate: getCurrentDate(),
|
||||||
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
diagnosisDoctor: props.patientInfo.practitionerName || props.patientInfo.doctorName || props.patientInfo.physicianName || userStore.name,
|
||||||
diagnosisTime: getCurrentDate()
|
diagnosisTime: getCurrentDate(),
|
||||||
|
selectedDiseases: data.ybNo ? [data.ybNo] : [], // 用于传染病报告卡自动勾选
|
||||||
});
|
});
|
||||||
|
|
||||||
// 添加后按排序号排序
|
// 添加后按排序号排序
|
||||||
|
|||||||
@@ -16,15 +16,15 @@
|
|||||||
v-model="form.cardNo"
|
v-model="form.cardNo"
|
||||||
class="card-number-input"
|
class="card-number-input"
|
||||||
placeholder="单位自编,与网络直报一致"
|
placeholder="单位自编,与网络直报一致"
|
||||||
maxlength="12"
|
maxlength="20"
|
||||||
:disabled="readOnly"
|
:disabled="readOnly || dialogReadOnly"
|
||||||
/>
|
/>
|
||||||
</el-space>
|
</el-space>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-card class="report-form" shadow="never">
|
<el-card class="report-form" shadow="never">
|
||||||
<el-form ref="formRef" :model="form" :rules="rules" label-position="top" :disabled="readOnly">
|
<el-form ref="formRef" :model="form" :rules="rules" label-position="top" :disabled="readOnly || dialogReadOnly">
|
||||||
<!-- 患者姓名、家长姓名、身份证号 -->
|
<!-- 患者姓名、家长姓名、身份证号 -->
|
||||||
<el-row :gutter="16" class="form-row">
|
<el-row :gutter="16" class="form-row">
|
||||||
<el-col :span="8" class="form-item">
|
<el-col :span="8" class="form-item">
|
||||||
@@ -476,9 +476,9 @@
|
|||||||
<template #footer>
|
<template #footer>
|
||||||
<slot name="footer" :close="handleClose" :submit-loading="submitLoading">
|
<slot name="footer" :close="handleClose" :submit-loading="submitLoading">
|
||||||
<el-space :size="16" justify="center" class="dialog-footer-space" style="display: flex; justify-content: center; width: 100%;">
|
<el-space :size="16" justify="center" class="dialog-footer-space" style="display: flex; justify-content: center; width: 100%;">
|
||||||
<el-button v-if="!readOnly" type="primary" @click="handleSubmit" :loading="submitLoading" class="blue-button">保 存</el-button>
|
<el-button v-if="!(readOnly || dialogReadOnly)" type="primary" @click="handleSubmit" :loading="submitLoading" class="blue-button">保 存</el-button>
|
||||||
<el-button type="info" @click="handleClose">关 闭</el-button>
|
<el-button type="info" @click="handleClose">关 闭</el-button>
|
||||||
<el-button v-if="!readOnly" type="danger" @click="handleReset">重 置</el-button>
|
<el-button v-if="!(readOnly || dialogReadOnly)" type="danger" @click="handleReset">重 置</el-button>
|
||||||
</el-space>
|
</el-space>
|
||||||
</slot>
|
</slot>
|
||||||
</template>
|
</template>
|
||||||
@@ -510,6 +510,7 @@ const DISEASE_NAMES = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const dialogVisible = ref(false);
|
const dialogVisible = ref(false);
|
||||||
|
const dialogReadOnly = ref(false);
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
// 保存按钮加载状态,防止重复提交
|
// 保存按钮加载状态,防止重复提交
|
||||||
const submitLoading = ref(false);
|
const submitLoading = ref(false);
|
||||||
@@ -1037,8 +1038,9 @@ function resetAddressSelector() {
|
|||||||
* 以只读详情方式打开报卡弹窗,供报卡管理等页面复用医生站报卡样式。
|
* 以只读详情方式打开报卡弹窗,供报卡管理等页面复用医生站报卡样式。
|
||||||
* @param {Object} reportData - 报卡详情数据
|
* @param {Object} reportData - 报卡详情数据
|
||||||
*/
|
*/
|
||||||
function showReport(reportData = {}) {
|
function showReport(reportData = {}, readOnly = true) {
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
|
dialogReadOnly.value = readOnly;
|
||||||
|
|
||||||
resetAddressSelector();
|
resetAddressSelector();
|
||||||
initProvinceOptions();
|
initProvinceOptions();
|
||||||
@@ -1205,6 +1207,7 @@ function calculateAge() {
|
|||||||
*/
|
*/
|
||||||
async function show(diagnosisData) {
|
async function show(diagnosisData) {
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
|
dialogReadOnly.value = false;
|
||||||
|
|
||||||
// 重置地址选择器状态
|
// 重置地址选择器状态
|
||||||
resetAddressSelector();
|
resetAddressSelector();
|
||||||
@@ -1238,14 +1241,13 @@ async function show(diagnosisData) {
|
|||||||
let cardNo = '';
|
let cardNo = '';
|
||||||
try {
|
try {
|
||||||
const res = await getNextCardNo(orgCode);
|
const res = await getNextCardNo(orgCode);
|
||||||
if (res.code === 200 && res.data) {
|
if (res.code === 200 && res.data && res.data.length >= 12) {
|
||||||
cardNo = res.data;
|
cardNo = res.data;
|
||||||
} else {
|
|
||||||
cardNo = 'TEMP_' + Date.now();
|
|
||||||
}
|
}
|
||||||
|
// API失败或返回不合规时保持为空字符串,由用户手动填写或后端自动生成
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('获取卡片编号失败:', err);
|
console.error('获取卡片编号失败:', err);
|
||||||
cardNo = 'TEMP_' + Date.now();
|
// 保持为空,不使用不合规的临时值
|
||||||
}
|
}
|
||||||
|
|
||||||
form.value = {
|
form.value = {
|
||||||
@@ -1424,9 +1426,9 @@ async function buildSubmitData() {
|
|||||||
function validateFormManually() {
|
function validateFormManually() {
|
||||||
const errors = [];
|
const errors = [];
|
||||||
|
|
||||||
// 卡片编号验证(可选,但如果填写了必须是12位)
|
// 卡片编号验证(至少12位,后端自动生成16位编号)
|
||||||
if (form.value.cardNo && form.value.cardNo.length !== 12) {
|
if (form.value.cardNo && form.value.cardNo.length < 12) {
|
||||||
errors.push('卡片编号必须为12位');
|
errors.push('卡片编号至少12位');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 身份证号验证
|
// 身份证号验证
|
||||||
|
|||||||
@@ -2495,11 +2495,13 @@ function handleSave(prescriptionId) {
|
|||||||
|
|
||||||
// 🔧 BugFix#318: 从 parsedContent 提取标准医嘱字段,排除手术特有字段
|
// 🔧 BugFix#318: 从 parsedContent 提取标准医嘱字段,排除手术特有字段
|
||||||
const standardFields = [
|
const standardFields = [
|
||||||
'accountId', 'chargeItemId', 'conditionDefinitionId', 'conditionId',
|
'accountId', 'chargeItemId', 'conditionDefinitionId', 'conditionId',
|
||||||
'contentJson', 'definitionDetailId', 'definitionId', 'diagnosisName',
|
'contentJson', 'definitionDetailId', 'definitionId', 'diagnosisName',
|
||||||
'dosageInstruction', 'effectiveOrgId', 'encounterDiagnosisId',
|
'dosageInstruction', 'effectiveOrgId', 'encounterDiagnosisId',
|
||||||
'encounterId', 'lotNumber', 'patientId', 'practitionerId',
|
'encounterId', 'lotNumber', 'patientId', 'practitionerId',
|
||||||
'prescriptionNo', 'skinTestFlag', 'unitPrice', 'volume', 'ybClassEnum'
|
'prescriptionNo', 'skinTestFlag', 'unitPrice', 'volume', 'ybClassEnum',
|
||||||
|
// 🔧 Bug Fix: 添加 therapyEnum 字段(医嘱类型:1=长期, 2=临时)
|
||||||
|
'therapyEnum'
|
||||||
];
|
];
|
||||||
let filteredContent = {};
|
let filteredContent = {};
|
||||||
standardFields.forEach(field => {
|
standardFields.forEach(field => {
|
||||||
@@ -3143,7 +3145,9 @@ function handleSaveBatch(prescriptionId) {
|
|||||||
// 🔧 Bug Fix: 添加 definitionId 和 definitionDetailId 字段
|
// 🔧 Bug Fix: 添加 definitionId 和 definitionDetailId 字段
|
||||||
'definitionId', 'definitionDetailId',
|
'definitionId', 'definitionDetailId',
|
||||||
// 🔧 Bug Fix: 添加 categoryEnum 字段(耗材必填)
|
// 🔧 Bug Fix: 添加 categoryEnum 字段(耗材必填)
|
||||||
'categoryEnum'
|
'categoryEnum',
|
||||||
|
// 🔧 Bug Fix: 添加 therapyEnum 字段(医嘱类型:1=长期, 2=临时)
|
||||||
|
'therapyEnum'
|
||||||
];
|
];
|
||||||
let filteredItem = {};
|
let filteredItem = {};
|
||||||
standardItemFields.forEach(field => {
|
standardItemFields.forEach(field => {
|
||||||
|
|||||||
@@ -151,23 +151,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog
|
<InfectiousDiseaseReportDialog
|
||||||
v-model="detailVisible"
|
ref="infectiousDiseaseReportRef"
|
||||||
:title="detailMode === 'view' ? '报卡详情 - 中华人民共和国传染病报告卡' : '编辑报卡 - 中华人民共和国传染病报告卡'"
|
:read-only="detailMode === 'view'"
|
||||||
width="1100px"
|
@success="detailVisible = false"
|
||||||
destroy-on-close
|
@close="detailVisible = false"
|
||||||
class="card-detail-dialog"
|
/>
|
||||||
>
|
|
||||||
<InfectiousReport
|
|
||||||
:mode=" detailMode"
|
|
||||||
:card-data="currentCard"
|
|
||||||
@submit-edit="handleSaveEdit"
|
|
||||||
style="max-height: 75vh; overflow-y: auto;"
|
|
||||||
/>
|
|
||||||
<template #footer>
|
|
||||||
<el-button @click="detailVisible = false">关闭</el-button>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -175,7 +164,7 @@
|
|||||||
import { ref, reactive, onMounted, onActivated, onBeforeUnmount, nextTick, computed } from 'vue';
|
import { ref, reactive, onMounted, onActivated, onBeforeUnmount, nextTick, computed } from 'vue';
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||||
import { DataAnalysis, Warning, CircleCheck, Check, RefreshRight } from '@element-plus/icons-vue';
|
import { DataAnalysis, Warning, CircleCheck, Check, RefreshRight } from '@element-plus/icons-vue';
|
||||||
import InfectiousReport from '../components/infectiousReport/index.vue';
|
import InfectiousDiseaseReportDialog from '../components/diagnosis/infectiousDiseaseReportDialog.vue';
|
||||||
import {
|
import {
|
||||||
getDoctorCardStatistics,
|
getDoctorCardStatistics,
|
||||||
getDoctorCardList,
|
getDoctorCardList,
|
||||||
@@ -185,7 +174,6 @@ import {
|
|||||||
batchDeleteCards,
|
batchDeleteCards,
|
||||||
exportCardToWord,
|
exportCardToWord,
|
||||||
getCardDetail,
|
getCardDetail,
|
||||||
updateDoctorCard,
|
|
||||||
} from './api';
|
} from './api';
|
||||||
|
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
@@ -211,7 +199,7 @@ const queryParams = reactive({
|
|||||||
|
|
||||||
const detailVisible = ref(false);
|
const detailVisible = ref(false);
|
||||||
const detailMode = ref('view');
|
const detailMode = ref('view');
|
||||||
const currentCard = ref({});
|
const infectiousDiseaseReportRef = ref(null);
|
||||||
|
|
||||||
// 计算表格高度:根据视口高度动态调整
|
// 计算表格高度:根据视口高度动态调整
|
||||||
const tableHeight = computed(() => {
|
const tableHeight = computed(() => {
|
||||||
@@ -327,9 +315,11 @@ async function handleView(row) {
|
|||||||
try {
|
try {
|
||||||
const res = await getCardDetail(row.cardNo);
|
const res = await getCardDetail(row.cardNo);
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
currentCard.value = res.data || {};
|
|
||||||
detailMode.value = 'view';
|
detailMode.value = 'view';
|
||||||
detailVisible.value = true;
|
detailVisible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
infectiousDiseaseReportRef.value?.showReport(res.data || {});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage.error('获取详情失败');
|
ElMessage.error('获取详情失败');
|
||||||
@@ -340,57 +330,17 @@ async function handleEdit(row) {
|
|||||||
try {
|
try {
|
||||||
const res = await getCardDetail(row.cardNo);
|
const res = await getCardDetail(row.cardNo);
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
currentCard.value = res.data || {};
|
|
||||||
detailMode.value = 'edit';
|
detailMode.value = 'edit';
|
||||||
detailVisible.value = true;
|
detailVisible.value = true;
|
||||||
|
nextTick(() => {
|
||||||
|
infectiousDiseaseReportRef.value?.showReport(res.data || {}, false);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
ElMessage.error('获取详情失败');
|
ElMessage.error('获取详情失败');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleSaveEdit(submitData) {
|
|
||||||
// submitData 来自 InfectiousReport 组件的 submit-edit 事件
|
|
||||||
try {
|
|
||||||
const updateData = {
|
|
||||||
cardNo: submitData.cardNo,
|
|
||||||
phone: submitData.phone,
|
|
||||||
contactPhone: submitData.contactPhone,
|
|
||||||
onsetDate: submitData.onsetDate,
|
|
||||||
diagDate: submitData.diagDate,
|
|
||||||
diseaseCode: submitData.diseaseCode,
|
|
||||||
diseaseType: submitData.diseaseType,
|
|
||||||
otherDisease: submitData.otherDisease,
|
|
||||||
caseClass: submitData.caseClass,
|
|
||||||
occupation: submitData.occupation,
|
|
||||||
patientBelong: submitData.patientBelong,
|
|
||||||
addressProv: submitData.addressProv,
|
|
||||||
addressCity: submitData.addressCity,
|
|
||||||
addressCounty: submitData.addressCounty,
|
|
||||||
addressTown: submitData.addressTown,
|
|
||||||
addressVillage: submitData.addressVillage,
|
|
||||||
addressHouse: submitData.addressHouse,
|
|
||||||
workplace: submitData.workplace,
|
|
||||||
parentName: submitData.parentName,
|
|
||||||
deathDate: submitData.deathDate,
|
|
||||||
correctName: submitData.correctName,
|
|
||||||
withdrawReason: submitData.withdrawReason,
|
|
||||||
remark: submitData.remark,
|
|
||||||
};
|
|
||||||
|
|
||||||
const res = await updateDoctorCard(updateData);
|
|
||||||
if (res.code === 200) {
|
|
||||||
ElMessage.success('保存成功');
|
|
||||||
detailVisible.value = false;
|
|
||||||
getList();
|
|
||||||
} else {
|
|
||||||
ElMessage.error(res.msg || '保存失败');
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
ElMessage.error('保存失败:' + (error.message || '网络错误'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleSubmit(row) {
|
async function handleSubmit(row) {
|
||||||
try {
|
try {
|
||||||
await ElMessageBox.confirm('确认提交该报卡?', '提示', {
|
await ElMessageBox.confirm('确认提交该报卡?', '提示', {
|
||||||
@@ -800,17 +750,4 @@ function handleResize() {
|
|||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 报卡详情弹窗 */
|
|
||||||
:deep(.card-detail-dialog .el-dialog__body) {
|
|
||||||
padding: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.card-detail-dialog .infectious-report-container) {
|
|
||||||
padding: 16px;
|
|
||||||
height: auto;
|
|
||||||
max-height: 70vh;
|
|
||||||
overflow-y: auto;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
@@ -11,9 +11,9 @@
|
|||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<el-radio-group v-model="type" class="ml20" @change="handleRadioChange">
|
<el-radio-group v-model="type" class="ml20" @change="handleRadioChange">
|
||||||
<el-radio :label="1">全部</el-radio>
|
<el-radio :label="null">全部</el-radio>
|
||||||
<el-radio :label="2">长期</el-radio>
|
<el-radio :label="1">长期</el-radio>
|
||||||
<el-radio :label="3">临时</el-radio>
|
<el-radio :label="2">临时</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<el-button class="ml20" type="primary" plain @click="handleGetPrescription">
|
<el-button class="ml20" type="primary" plain @click="handleGetPrescription">
|
||||||
查询
|
查询
|
||||||
@@ -159,7 +159,7 @@ import {formatDateStr} from '@/utils/index';
|
|||||||
const activeNames = ref([]);
|
const activeNames = ref([]);
|
||||||
const prescriptionList = ref([]);
|
const prescriptionList = ref([]);
|
||||||
const deadline = ref(formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59');
|
const deadline = ref(formatDateStr(new Date(), 'YYYY-MM-DD') + ' 23:59:59');
|
||||||
const type = ref(1);
|
const type = ref(null);
|
||||||
const { proxy } = getCurrentInstance();
|
const { proxy } = getCurrentInstance();
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const chooseAll = ref(false);
|
const chooseAll = ref(false);
|
||||||
@@ -181,7 +181,7 @@ function handleGetPrescription() {
|
|||||||
getPrescriptionList({
|
getPrescriptionList({
|
||||||
encounterIds: encounterIds,
|
encounterIds: encounterIds,
|
||||||
requestStatus: props.requestStatus,
|
requestStatus: props.requestStatus,
|
||||||
...(type.value !== undefined ? { therapyEnum: type.value } : {}),
|
...(type.value != null ? { therapyEnum: type.value } : {}),
|
||||||
pageSize: 10000,
|
pageSize: 10000,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
|||||||
@@ -744,11 +744,7 @@ function handleSubmitApproval() {
|
|||||||
} else {
|
} else {
|
||||||
submitApproval(receiptHeaderForm.busNo).then((response) => {
|
submitApproval(receiptHeaderForm.busNo).then((response) => {
|
||||||
proxy.$modal.msgSuccess('提交审批成功');
|
proxy.$modal.msgSuccess('提交审批成功');
|
||||||
// proxy.$tab.closePage(route).then(({ visitedViews }) => { // 关闭当前页
|
|
||||||
// toLastView(visitedViews, route)
|
|
||||||
// })
|
|
||||||
tagsViewStore.delView(router.currentRoute.value);
|
tagsViewStore.delView(router.currentRoute.value);
|
||||||
// 跳转到调拨管理页面
|
|
||||||
router.replace({ path: 'transferManagentList' });
|
router.replace({ path: 'transferManagentList' });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -871,7 +867,6 @@ function handleUnitCodeChange(row, index, value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleItemQuantityChange(row, value) {
|
function handleItemQuantityChange(row, value) {
|
||||||
debugger;
|
|
||||||
let quantityTemp = ''; // 转换成小单位的临时变量 做校验
|
let quantityTemp = ''; // 转换成小单位的临时变量 做校验
|
||||||
// 大单位情况
|
// 大单位情况
|
||||||
if (row.unitCodeMap[row.unitCode] == 'unit') {
|
if (row.unitCodeMap[row.unitCode] == 'unit') {
|
||||||
@@ -882,12 +877,6 @@ function handleItemQuantityChange(row, value) {
|
|||||||
row.itemQuantity = value;
|
row.itemQuantity = value;
|
||||||
quantityTemp = value;
|
quantityTemp = value;
|
||||||
}
|
}
|
||||||
if (row.totalSourceQuantity < quantityTemp) {
|
|
||||||
proxy.$modal.msgWarning('调拨数量不可超出源库存数量');
|
|
||||||
row.itemQuantity = 0;
|
|
||||||
row.itemQuantityDisplay = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
row.totalPrice = ((row.price * quantityTemp) / row.partPercent).toFixed(2);
|
row.totalPrice = ((row.price * quantityTemp) / row.partPercent).toFixed(2);
|
||||||
// 更新总数据中对应的记录
|
// 更新总数据中对应的记录
|
||||||
const totalIndex = totalIncentoryInfoList.value.findIndex((item) => item.id === row.id);
|
const totalIndex = totalIncentoryInfoList.value.findIndex((item) => item.id === row.id);
|
||||||
@@ -918,11 +907,12 @@ function remakeBlur(row, index) {
|
|||||||
editBatchTransfer(index);
|
editBatchTransfer(index);
|
||||||
}
|
}
|
||||||
function handleSave() {
|
function handleSave() {
|
||||||
const invalidRow = totalIncentoryInfoList.value.find(
|
// 校验单价
|
||||||
|
const invalidPriceRow = totalIncentoryInfoList.value.find(
|
||||||
(row) => !row.price || row.price <= 0
|
(row) => !row.price || row.price <= 0
|
||||||
);
|
);
|
||||||
if (invalidRow) {
|
if (invalidPriceRow) {
|
||||||
proxy.$message.warning('调拨单价不能为空或为0,请检查!');
|
proxy.$modal.msgError('调拨单价不能为空或为0,请检查!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
addTransferProductBatch(totalIncentoryInfoList.value).then((res) => {
|
addTransferProductBatch(totalIncentoryInfoList.value).then((res) => {
|
||||||
|
|||||||
@@ -970,12 +970,6 @@ function handleItemQuantityChange(row, value) {
|
|||||||
row.itemQuantity = value;
|
row.itemQuantity = value;
|
||||||
quantityTemp = value;
|
quantityTemp = value;
|
||||||
}
|
}
|
||||||
if (row.totalSourceQuantity < quantityTemp) {
|
|
||||||
proxy.$modal.msgWarning('调拨数量不可超出源库存数量');
|
|
||||||
row.itemQuantity = 0;
|
|
||||||
row.itemQuantityDisplay = 0;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
row.totalPrice = ((row.price * quantityTemp) / row.partPercent).toFixed(2);
|
row.totalPrice = ((row.price * quantityTemp) / row.partPercent).toFixed(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1022,11 +1016,7 @@ function handleSubmitApproval() {
|
|||||||
} else {
|
} else {
|
||||||
submitApproval(receiptHeaderForm.busNo).then((response) => {
|
submitApproval(receiptHeaderForm.busNo).then((response) => {
|
||||||
proxy.$modal.msgSuccess('提交审批成功');
|
proxy.$modal.msgSuccess('提交审批成功');
|
||||||
// proxy.$tab.closePage(route).then(({ visitedViews }) => { // 关闭当前页
|
|
||||||
// toLastView(visitedViews, route)
|
|
||||||
// })
|
|
||||||
tagsViewStore.delView(router.currentRoute.value);
|
tagsViewStore.delView(router.currentRoute.value);
|
||||||
// 跳转到调拨管理页面
|
|
||||||
router.replace({ path: 'transferManagentList' });
|
router.replace({ path: 'transferManagentList' });
|
||||||
store.clearCurrentDataDB();
|
store.clearCurrentDataDB();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user