前端最新版本同步

This commit is contained in:
Zhang.WH
2025-09-25 10:36:07 +08:00
parent a3a06d6f3c
commit 1276dc4adb
117 changed files with 11964 additions and 2466 deletions

View File

@@ -12,7 +12,7 @@
<el-button icon="Search" @click="getList" />
</template>
</el-input>
<el-radio-group v-model="queryParams.rangeCode" @change="getList">
<el-radio-group v-model="queryParams.rangeCode" @change="handelRadioChange">
<el-radio-button :label="1">个人</el-radio-button>
<el-radio-button :label="2">科室</el-radio-button>
<el-radio-button :label="3">全院</el-radio-button>
@@ -32,21 +32,26 @@
</template>
<script setup>
import { getOrderGroupList } from '../api';
import { getOrderGroup } from '../api';
const props = defineProps({
diagnosis: {
type: Object,
required: true,
},
organizationId: {
type: String,
required: true,
}
});
const drawer = ref(false);
const orderList = ref([]);
const result = ref([]);
const emit = defineEmits(['useOrderGroup']);
const queryParams = ref({
typeEnum: 1,
rangeCode: 3,
rangeCode: 2,
});
function handleOpen() {
@@ -54,24 +59,39 @@ function handleOpen() {
getList();
}
function handelRadioChange(value){
switch (value) {
case 1:
orderList.value = result.value.personalList;
break;
case 2:
orderList.value = result.value.organizationList;
break;
case 3:
orderList.value = result.value.hospitalList;
break;
}
}
function handleUseOrderGroup(row) {
let value = JSON.parse(row.groupJson);
value = value.map((item) => {
return {
...item,
conditionId: props.diagnosis.conditionId,
conditionDefinitionId: props.diagnosis.definitionId,
};
});
// let value = JSON.parse(row.groupJson);
// value = value.map((item) => {
// return {
// ...item,
// conditionId: props.diagnosis.conditionId,
// conditionDefinitionId: props.diagnosis.definitionId,
// };
// });
// value.conditionId = props.diagnosis.conditionId;
// value.conditionDefinitionId = props.diagnosis.definitionId;
emit('useOrderGroup', value);
emit('useOrderGroup', row.detailList);
drawer.value = false;
}
function getList() {
getOrderGroupList(queryParams.value).then((res) => {
orderList.value = res.data.records;
getOrderGroup({ organizationId: props.organizationId }).then((res) => {
result.value = res.data
orderList.value = res.data.organizationList;
});
}

View File

@@ -19,7 +19,7 @@
<span>{{ item.prescriptionNo }}</span>
</div>
<div style="text-align: center">
<h2>长春大学医院</h2>
<h2>医院</h2>
</div>
<div style="text-align: center">
<h3>处方单</h3>

View File

@@ -101,7 +101,7 @@
<el-form-item prop="lotNumber" label="药房:">
<el-select
v-model="scope.row.inventoryId"
style="width: 180px; margin-right: 20px"
style="width: 400px; margin-right: 20px"
placeholder="药房"
>
<el-option
@@ -348,6 +348,11 @@
v-if="item.type != unitMap['dose']"
:value="item.value"
:label="item.label"
@click="
() => {
scope.row.unitCode_dictText = item.label;
}
"
/>
</template>
</el-select>
@@ -539,7 +544,7 @@
<!-- <div v-if="groupMarkers[scope.$index] === 'all'">┗</div> -->
</template>
</el-table-column>
<el-table-column label="序号" align="center" width="60" prop="sortNumber"> </el-table-column>
<!-- <el-table-column label="序号" align="center" width="60" prop="sortNumber"> </el-table-column> -->
<el-table-column label="医嘱" align="center" prop="productName" width="400">
<template #default="scope">
<template v-if="getRowDisabled(scope.row)">
@@ -687,16 +692,17 @@
</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100" fixed="right">
<!-- <el-table-column label="操作" align="center" width="100" fixed="right">
<template #default="scope">
<el-icon @click="up(scope.row)"><Upload /></el-icon>
<el-icon @click="down(scope.row)"><Download /></el-icon>
</template>
</el-table-column>
</el-table-column> -->
</el-table>
<OrderGroupDrawer
ref="orderFroupRef"
:diagnosis="diagnosisInfo"
:organizationId="props.patientInfo.orgId"
@useOrderGroup="handleSaveGroup"
/>
<PrescriptionHistory
@@ -723,7 +729,7 @@ import {
getContract,
getAdviceBaseInfo,
} from '../api';
import adviceBaseList from '../adviceBaseList';
import adviceBaseList from '../advicebaselist';
import { computed, getCurrentInstance, nextTick, watch } from 'vue';
import { calculateQuantityByDays, formatNumber } from '@/utils/his';
import OrderGroupDrawer from './orderGroupDrawer';
@@ -919,7 +925,6 @@ function handleAddPrescription() {
proxy.$modal.msgWarning('请先保存当前医嘱');
return;
}
debugger;
isAdding.value = true;
// 在数组最前方添加一行,让新增行显示在最上边
prescriptionList.value.unshift({
@@ -1045,7 +1050,14 @@ function selectAdviceBase(key, row) {
})[0];
if (stock != {} && stock != undefined) {
if (stock.quantity <= 0) {
proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
stock = stockList.value.filter((item) => {
return item.quantity > 0 && item.locationId == row.positionId;
})[0];
if (stock == {} || stock == undefined) {
proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
return;
}
// proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
// return;
}
prescriptionList.value[rowIndex.value].lotNumber = stock.lotNumber;
@@ -1082,9 +1094,7 @@ function getOrgList() {
}
function handleDelete() {
let selectRow = prescriptionList.value.filter((item) => {
return item.check;
});
let selectRow = groupIndexList.value.map((index) => prescriptionList.value[index]);
if (selectRow.length == 0) {
proxy.$modal.msgWarning('请选择要删除的医嘱');
return;
@@ -1105,19 +1115,20 @@ function handleDelete() {
});
}
}
handleEmrTreatment();
expandOrder.value = [];
isAdding.value = false;
adviceQueryParams.value.adviceType = undefined;
if (sum == selectRow.length) {
proxy.$modal.msgSuccess('删除成功');
groupIndexList.value = [];
return;
}
if (deleteList.length > 0) {
savePrescription({ adviceSaveList: deleteList }).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess('删除成功');
groupIndexList.value = [];
getListInfo(false);
}
});
@@ -1299,18 +1310,20 @@ function handleSaveSign(row, index) {
row.minUnitQuantity = row.quantity;
}
row.conditionId = conditionId.value;
if (row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit') {
row.unitPrice = row.unitPrice;
} else {
row.unitCode_dictText = row.unitCodeList.find(
(item) => item.value == row.minUnitCode
).label;
row.unitPrice = row.minUnitPrice;
}
// if (row.unitCodeList.find((item) => item.value == row.unitCode).type == 'unit') {
// row.unitPrice = row.unitPrice;
// } else {
// row.unitCode_dictText = row.unitCodeList.find(
// (item) => item.value == row.minUnitCode
// ).label;
// row.unitPrice = row.minUnitPrice;
// }
row.conditionDefinitionId = conditionDefinitionId.value;
row.encounterDiagnosisId = encounterDiagnosisId.value;
row.diagnosisName = diagnosisName.value;
row.sortNumber = row.sortNumber ? row.sortNumber : prescriptionList.value.length;
if (row.injectFlag == 1) {
row.sortNumber = row.sortNumber ? row.sortNumber : prescriptionList.value.length;
}
// row.dose = row.doseQuantity;
// row.doseUnitCode = unitCodeList.value.find((item) => item.type == 'dose').value;
// row.doseUnitCode = JSON.parse(JSON.stringify(row.minUnitCode)); // 页面显示与赋值不符,此处先简单处理,后续修改
@@ -1334,6 +1347,10 @@ function handleSaveSign(row, index) {
}
function handleSaveBatch() {
if (expandOrder.value.length > 0) {
proxy.$modal.msgWarning('请先点击确定确认当前医嘱');
return;
}
if (prescriptionList.value[0].isEdit && !prescriptionList.value[0].adviceType) {
prescriptionList.value.shift();
isAdding.value = false;
@@ -1401,6 +1418,7 @@ function setValue(row) {
// prescriptionList.value[rowIndex.value].minUnitCode = JSON.parse(JSON.stringify(row.doseUnitCode));
prescriptionList.value[rowIndex.value].doseUnitCode = row.doseUnitCode;
prescriptionList.value[rowIndex.value].minUnitCode = row.minUnitCode;
prescriptionList.value[rowIndex.value].categoryEnum = row.categoryCode;
prescriptionList.value[rowIndex.value].unitCode =
row.partAttributeEnum == 1 ? row.minUnitCode : row.unitCode;
// prescriptionList.value[rowIndex.value].doseUnitCode_dictText = row.minUnitCode_dictText;
@@ -1425,7 +1443,13 @@ function setValue(row) {
})[0];
if (stock != {} && stock != undefined) {
if (stock.quantity <= 0) {
proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
stock = stockList.value.filter((item) => {
return item.quantity > 0 && item.locationId == row.positionId;
})[0];
if (stock == {} || stock == undefined) {
proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
}
// proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
// return;
}
prescriptionList.value[rowIndex.value].lotNumber = stock.lotNumber;
@@ -1454,39 +1478,47 @@ function handleSaveGroup(orderGroupList) {
// item.contentJson = JSON.stringify(item);
// prescriptionList.value.push(item);
// });
let paramList = orderGroupList.map((item) => {
return item.adviceDefinitionId;
});
getAdviceBaseInfo({
adviceDefinitionIdParamList: paramList.join(','),
organizationId: props.patientInfo.orgId,
}).then((res) => {
getOrgList();
res.data.records.forEach((item, index) => {
rowIndex.value = prescriptionList.value.length;
setValue(item);
let orderGroupValue = orderGroupList.find(
(k) => k.adviceDefinitionId == item.adviceDefinitionId
);
// let paramList = orderGroupList.map((item) => {
// return item.adviceDefinitionId;
// });
// getAdviceBaseInfo({
// adviceDefinitionIdParamList: paramList.join(','),
// organizationId: props.patientInfo.orgId,
// }).then((res) => {
// getOrgList();
orderGroupList.forEach((item, index) => {
rowIndex.value = prescriptionList.value.length;
setValue(item.orderDetailInfos);
// let orderGroupValue = orderGroupList.find(
// (k) => k.adviceDefinitionId == item.adviceDefinitionId
// );
prescriptionList.value[rowIndex.value] = {
...prescriptionList.value[rowIndex.value],
...orderGroupValue,
patientId: props.patientInfo.patientId,
encounterId: props.patientInfo.encounterId,
accountId: accountId.value,
dbOpType: orderGroupValue.requestId ? '2' : '1',
minUnitQuantity: orderGroupValue.quantity * orderGroupValue.partPercent,
conditionId: conditionId.value,
conditionDefinitionId: conditionDefinitionId.value,
encounterDiagnosisId: encounterDiagnosisId.value,
};
prescriptionList.value[rowIndex.value].contentJson = JSON.stringify(
prescriptionList.value[rowIndex.value]
);
});
console.log(prescriptionList.value);
prescriptionList.value[rowIndex.value] = {
...prescriptionList.value[rowIndex.value],
// ...orderGroupValue,
patientId: props.patientInfo.patientId,
encounterId: props.patientInfo.encounterId,
accountId: accountId.value,
quantity: item.quantity,
totalPrice: item.quantity * prescriptionList.value[rowIndex.value].unitPrice,
unitCode: item.unitCode,
unitCode_dictText: item.unitCodeName ? item.unitCodeName : '',
statusEnum: 1,
dbOpType: prescriptionList.value[rowIndex.value].requestId ? '2' : '1',
minUnitQuantity:
unitCodeList.value.find((k) => k.value == item.unitCode).type == 'minUnit'
? item.quantity
: item.quantity * item.orderDetailInfos.partPercent,
conditionId: conditionId.value,
conditionDefinitionId: conditionDefinitionId.value,
encounterDiagnosisId: encounterDiagnosisId.value,
};
prescriptionList.value[rowIndex.value].contentJson = JSON.stringify(
prescriptionList.value[rowIndex.value]
);
});
console.log(prescriptionList.value);
// });
// savePrescription({ adviceSaveList: saveList }).then((res) => {
// if (res.code === 200) {
// proxy.$modal.msgSuccess('保存成功');
@@ -1592,6 +1624,7 @@ function combination() {
proxy.$modal.msgWarning('至少选择两项');
return;
}
// 相同分组用法需要相同
let uniqueValues = new Set();
// 相同分组诊断需要相同
@@ -1824,10 +1857,13 @@ function convertDoseValues(row, index) {
// 总量计算,仅适用只有两种单位的情况
function calculateTotalAmount(row, index) {
nextTick(() => {
// 项目为耗材时
if (row.adviceType == 2) {
// 拆零比为1时 总价等于数量乘以单价
if (row.partPercent == 1) {
row.totalPrice = row.quantity * row.unitPrice;
} else {
// 拆零比不为1时 如果当前总量单位是大单位,总价等于数量乘以大单位价格 否则总价等于数量乘以小单位价格
if (row.unitCodeList.find((k) => k.value == row.unitCode).type == 'unit') {
row.totalPrice = row.quantity * row.unitPrice;
} else {