fix: 修复多模块Bug及功能优化
修复药品汇总、医嘱套餐、转科管理、用药汇总、处方列表、用户管理等多个模块的问题
This commit is contained in:
@@ -187,6 +187,9 @@ public class MedicineSummaryAppServiceImpl implements IMedicineSummaryAppService
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public R<?> medicineSummary(List<MedicineSummaryParam> medicineSummaryParamList) {
|
public R<?> medicineSummary(List<MedicineSummaryParam> medicineSummaryParamList) {
|
||||||
|
if (medicineSummaryParamList == null || medicineSummaryParamList.isEmpty()) {
|
||||||
|
throw new ServiceException("请至少选择一条待汇总的药品");
|
||||||
|
}
|
||||||
// 领药人
|
// 领药人
|
||||||
Long receiverId = medicineSummaryParamList.get(0).getReceiverId();
|
Long receiverId = medicineSummaryParamList.get(0).getReceiverId();
|
||||||
// 申请时间
|
// 申请时间
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ public class OrdersGroupPackageAppServiceImpl implements IOrdersGroupPackageAppS
|
|||||||
ordersGroupPackageDetail.setMethodCode(ordersGroupPackageDetailSaveDto.getMethodCode()); // 给药途径
|
ordersGroupPackageDetail.setMethodCode(ordersGroupPackageDetailSaveDto.getMethodCode()); // 给药途径
|
||||||
ordersGroupPackageDetail.setDoseQuantity(ordersGroupPackageDetailSaveDto.getDoseQuantity()); // 小单位单次剂量
|
ordersGroupPackageDetail.setDoseQuantity(ordersGroupPackageDetailSaveDto.getDoseQuantity()); // 小单位单次剂量
|
||||||
ordersGroupPackageDetail.setGroupId(ordersGroupPackageDetailSaveDto.getGroupId()); // 组号
|
ordersGroupPackageDetail.setGroupId(ordersGroupPackageDetailSaveDto.getGroupId()); // 组号
|
||||||
|
ordersGroupPackageDetail.setGroupOrder(ordersGroupPackageDetailSaveDto.getGroupOrder()); // 组内排序号
|
||||||
ordersGroupPackageDetail.setTherapyEnum(ordersGroupPackageDetailSaveDto.getTherapyEnum()); // 治疗类型
|
ordersGroupPackageDetail.setTherapyEnum(ordersGroupPackageDetailSaveDto.getTherapyEnum()); // 治疗类型
|
||||||
ordersGroupPackageDetailService.save(ordersGroupPackageDetail);
|
ordersGroupPackageDetailService.save(ordersGroupPackageDetail);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,6 +88,11 @@ public class OrdersGroupPackageDetailQueryDto {
|
|||||||
*/
|
*/
|
||||||
private Long groupId;
|
private Long groupId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组内排序号
|
||||||
|
*/
|
||||||
|
private Integer groupOrder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 治疗类型:1-长期 2-临时
|
* 治疗类型:1-长期 2-临时
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -63,6 +63,11 @@ public class OrdersGroupPackageDetailSaveDto {
|
|||||||
*/
|
*/
|
||||||
private Long groupId;
|
private Long groupId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组内排序号
|
||||||
|
*/
|
||||||
|
private Integer groupOrder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 治疗类型:1-长期 2-临时
|
* 治疗类型:1-长期 2-临时
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
togpd.method_code AS method_code,
|
togpd.method_code AS method_code,
|
||||||
togpd.dose_quantity AS dose_quantity,
|
togpd.dose_quantity AS dose_quantity,
|
||||||
togpd.group_id,
|
togpd.group_id,
|
||||||
|
togpd.group_order AS group_order,
|
||||||
togpd.dispense_per_duration AS dispense_per_duration,
|
togpd.dispense_per_duration AS dispense_per_duration,
|
||||||
togpd.therapy_enum AS therapy_enum,
|
togpd.therapy_enum AS therapy_enum,
|
||||||
CASE
|
CASE
|
||||||
|
|||||||
@@ -67,6 +67,11 @@ public class OrdersGroupPackageDetail extends HisBaseEntity {
|
|||||||
*/
|
*/
|
||||||
private Long groupId;
|
private Long groupId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组内排序号
|
||||||
|
*/
|
||||||
|
private Integer groupOrder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 治疗类型:1-长期 2-临时
|
* 治疗类型:1-长期 2-临时
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -267,7 +267,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</template>
|
||||||
<span v-else>{{ scope.row.methodCode }}</span>
|
<span v-else>{{ scope.row.methodCode_dictText || scope.row.methodCode }}</span>
|
||||||
</template>
|
</template>
|
||||||
<span v-else>{{ '-' }}</span>
|
<span v-else>{{ '-' }}</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -597,6 +597,13 @@ function handleEdit(tab, row) {
|
|||||||
groupId: item.groupId,
|
groupId: item.groupId,
|
||||||
groupOrder: item.groupOrder,
|
groupOrder: item.groupOrder,
|
||||||
therapyEnum: item.therapyEnum != null ? String(item.therapyEnum) : '1',
|
therapyEnum: item.therapyEnum != null ? String(item.therapyEnum) : '1',
|
||||||
|
// 医嘱类型(药品=1):没有则按表名推断
|
||||||
|
adviceType:
|
||||||
|
item.adviceType !== undefined
|
||||||
|
? item.adviceType
|
||||||
|
: item.orderDefinitionTable === 'med_medication_definition'
|
||||||
|
? 1
|
||||||
|
: undefined,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
prescriptionList.value.unshift({
|
prescriptionList.value.unshift({
|
||||||
|
|||||||
@@ -34,11 +34,12 @@
|
|||||||
type="daterange"
|
type="daterange"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
style="width: 510px"
|
style="width: 400px"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
:clearable="false"
|
:clearable="false"
|
||||||
@change="getSummaryList"
|
|
||||||
/>
|
/>
|
||||||
|
<el-button type="primary" @click="getSummaryList" style="margin-left: 10px">搜索</el-button>
|
||||||
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" plain @click="handleSend">批量发药</el-button>
|
<el-button type="primary" plain @click="handleSend">批量发药</el-button>
|
||||||
@@ -178,6 +179,17 @@ function getSummaryList() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 重置查询条件
|
||||||
|
function resetQuery() {
|
||||||
|
queryParams.value.applyTime = [
|
||||||
|
proxy.formatDateStr(new Date().setMonth(new Date().getMonth() - 1), 'YYYY-MM-DD'),
|
||||||
|
proxy.formatDateStr(new Date(), 'YYYY-MM-DD'),
|
||||||
|
];
|
||||||
|
queryParams.value.searchKey = '';
|
||||||
|
queryParams.value.statusEnum = '';
|
||||||
|
getSummaryList();
|
||||||
|
}
|
||||||
|
|
||||||
function getDetails(row) {
|
function getDetails(row) {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
getFromSummaryDetails({ summaryNo: row.busNo }).then((res) => {
|
getFromSummaryDetails({ summaryNo: row.busNo }).then((res) => {
|
||||||
|
|||||||
@@ -272,10 +272,18 @@ function handleGetPrescription() {
|
|||||||
|
|
||||||
function handleMedicineSummary() {
|
function handleMedicineSummary() {
|
||||||
let paramList = getSelectRows();
|
let paramList = getSelectRows();
|
||||||
|
if (!paramList || paramList.length === 0) {
|
||||||
|
proxy.$message.warning('请至少选择一条待汇总的药品');
|
||||||
|
return;
|
||||||
|
}
|
||||||
let ids = [];
|
let ids = [];
|
||||||
paramList = paramList.forEach((item) => {
|
paramList.forEach((item) => {
|
||||||
ids.push(...item.dispenseIds);
|
ids.push(...item.dispenseIds);
|
||||||
});
|
});
|
||||||
|
if (ids.length === 0) {
|
||||||
|
proxy.$message.warning('所选药品未关联发放信息');
|
||||||
|
return;
|
||||||
|
}
|
||||||
medicineSummary(ids).then((res) => {
|
medicineSummary(ids).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
proxy.$message.success('操作成功');
|
proxy.$message.success('操作成功');
|
||||||
|
|||||||
@@ -918,10 +918,13 @@ function remakeBlur(row, index) {
|
|||||||
editBatchTransfer(index);
|
editBatchTransfer(index);
|
||||||
}
|
}
|
||||||
function handleSave() {
|
function handleSave() {
|
||||||
// if (form.purchaseinventoryList.length == 0) {
|
const invalidRow = totalIncentoryInfoList.value.find(
|
||||||
// proxy.$message.warning('请先生成批量调拨单在进行批量保存!');
|
(row) => !row.price || row.price <= 0
|
||||||
// return;
|
);
|
||||||
// }
|
if (invalidRow) {
|
||||||
|
proxy.$message.warning('调拨单价不能为空或为0,请检查!');
|
||||||
|
return;
|
||||||
|
}
|
||||||
addTransferProductBatch(totalIncentoryInfoList.value).then((res) => {
|
addTransferProductBatch(totalIncentoryInfoList.value).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
proxy.$modal.msgSuccess('保存成功');
|
proxy.$modal.msgSuccess('保存成功');
|
||||||
|
|||||||
@@ -1306,10 +1306,12 @@ function handleSave(row, index) {
|
|||||||
} else if (row.unitCode == row.unitList.minUnitCode) {
|
} else if (row.unitCode == row.unitList.minUnitCode) {
|
||||||
row.unitCode_dictText = row.unitList.minUnitCode_dictText;
|
row.unitCode_dictText = row.unitList.minUnitCode_dictText;
|
||||||
}
|
}
|
||||||
if (forms.purchaseinventoryList[index].price == 0) {
|
if (!forms.purchaseinventoryList[index].price || forms.purchaseinventoryList[index].price <= 0) {
|
||||||
forms.purchaseinventoryList[index].price = 0;
|
proxy.$message.warning('调拨单价不能为空或为0,请检查!');
|
||||||
forms.purchaseinventoryList[index].totalPrice = 0;
|
return;
|
||||||
}
|
}
|
||||||
|
forms.purchaseinventoryList[index].totalPrice =
|
||||||
|
forms.purchaseinventoryList[index].price * forms.purchaseinventoryList[index].itemQuantity;
|
||||||
rowList.value.push(JSON.parse(JSON.stringify(row)));
|
rowList.value.push(JSON.parse(JSON.stringify(row)));
|
||||||
if (
|
if (
|
||||||
rowList._rawValue &&
|
rowList._rawValue &&
|
||||||
@@ -1355,10 +1357,12 @@ function handleSave(row, index) {
|
|||||||
} else if (rows.unitCode == rows.unitList.minUnitCode) {
|
} else if (rows.unitCode == rows.unitList.minUnitCode) {
|
||||||
rows.unitCode_dictText = rows.unitList.minUnitCode_dictText;
|
rows.unitCode_dictText = rows.unitList.minUnitCode_dictText;
|
||||||
}
|
}
|
||||||
if (form.purchaseinventoryList[index].price == 0) {
|
if (!form.purchaseinventoryList[index].price || form.purchaseinventoryList[index].price <= 0) {
|
||||||
form.purchaseinventoryList[index].price = 0;
|
proxy.$message.warning('调拨单价不能为空或为0,请检查!');
|
||||||
form.purchaseinventoryList[index].totalPrice = 0;
|
return;
|
||||||
}
|
}
|
||||||
|
form.purchaseinventoryList[index].totalPrice =
|
||||||
|
form.purchaseinventoryList[index].price * form.purchaseinventoryList[index].itemQuantity;
|
||||||
rowList.value.push(JSON.parse(JSON.stringify(rows)));
|
rowList.value.push(JSON.parse(JSON.stringify(rows)));
|
||||||
if (
|
if (
|
||||||
rowList._rawValue &&
|
rowList._rawValue &&
|
||||||
|
|||||||
@@ -23,7 +23,11 @@
|
|||||||
highlight-current
|
highlight-current
|
||||||
default-expand-all
|
default-expand-all
|
||||||
@node-click="handleNodeClick"
|
@node-click="handleNodeClick"
|
||||||
/>
|
>
|
||||||
|
<template #default="{ node, data }">
|
||||||
|
<span v-html="highlightText(data.name)"></span>
|
||||||
|
</template>
|
||||||
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!--用户数据-->
|
<!--用户数据-->
|
||||||
@@ -690,7 +694,13 @@ const { queryParams, form, rules } = toRefs(data);
|
|||||||
/** 通过条件过滤节点 */
|
/** 通过条件过滤节点 */
|
||||||
const filterNode = (value, data) => {
|
const filterNode = (value, data) => {
|
||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
return data.label.indexOf(value) !== -1;
|
return data.name.indexOf(value) !== -1;
|
||||||
|
};
|
||||||
|
/** 高亮匹配关键字 */
|
||||||
|
const highlightText = (text) => {
|
||||||
|
if (!deptName.value || !text) return text;
|
||||||
|
const regex = new RegExp(`(${deptName.value})`, 'gi');
|
||||||
|
return text.replace(regex, '<span class="tree-highlight">$1</span>');
|
||||||
};
|
};
|
||||||
/** 根据名称筛选部门树 */
|
/** 根据名称筛选部门树 */
|
||||||
watch(deptName, (val) => {
|
watch(deptName, (val) => {
|
||||||
@@ -1344,4 +1354,8 @@ getWardList();
|
|||||||
top: -10px;
|
top: -10px;
|
||||||
right: -10px;
|
right: -10px;
|
||||||
}
|
}
|
||||||
|
:deep(.tree-highlight) {
|
||||||
|
color: #409eff;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user