前端最新版本同步

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

@@ -13,6 +13,13 @@
<el-table-column label="类型" align="center" prop="activityType_enumText" />
<el-table-column label="包装单位" align="center" prop="unitCode_dictText" />
<el-table-column label="最小单位" align="center" prop="minUnitCode_dictText" />
<el-table-column label="单次剂量" align="center">
<template #default="scope">
<span>
{{ parseFloat(scope.row.dose).toFixed(2) + scope.row.doseUnitCode_dictText }}
</span>
</template>
</el-table-column>
<el-table-column label="规格" align="center" prop="volume" />
<el-table-column label="用法" align="center" prop="methodCode_dictText" />
<el-table-column label="库存数量" align="center">
@@ -64,7 +71,7 @@ const currentSelectRow = ref({});
const queryParams = ref({
pageSize: 100,
pageNum: 1,
adviceTypes: '1,2,3'
adviceTypes: '1,2,3',
});
const adviceBaseList = ref([]);
// 节流函数
@@ -80,8 +87,10 @@ watch(
(newValue) => {
queryParams.value.searchKey = newValue.searchKey;
// queryParams.value.adviceType = newValue.adviceType;
if(newValue.adviceTyp){
if (newValue.adviceType) {
queryParams.value.adviceTypes = [newValue.adviceType].join(',');
} else {
queryParams.value.adviceTypes = '1,2,3';
}
throttledGetList();
},

View File

@@ -607,6 +607,16 @@ export function getInit() {
})
}
/**
* 查询参与者下拉列表
*/
export function queryParticipantList(params) {
return request({
url: '/app-common/practitioner-list',
method: 'get',
params: params
})
}
/**
* 获取科室下拉列表
@@ -650,3 +660,14 @@ export function getEnPrescriptionInfo(data) {
params: data
})
}
/**
* 获取组套列表
*/
export function getOrderGroup(data) {
return request({
url: '/personalization/orders-group-package/group-package-for-order',
method: 'get',
params: data
})
}

View File

@@ -143,7 +143,7 @@
type="primary"
icon="Edit"
@click="handleEdit(scope.row)"
:disabled="scope.row.statusEnum == 2 || scope.row.statusEnum == 3"
:disabled="scope.row.statusEnum == 2 || scope.row.statusEnum == 3 || scope.row.statusEnum == 6"
>编辑</el-button
>
<el-button
@@ -342,7 +342,7 @@ function handleAddPrescription() {
function selectable(row, index) {
// 返回 true 表示该行可选,返回 false 表示该行不可选
// console.log(row, 'selectable', rowIndex.value);
return row.statusEnum !== 2;
return ![2, 3, 6].includes(row.statusEnum);
}
/**

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 {

View File

@@ -30,10 +30,30 @@
<el-form-item label="联系方式">
<el-input v-model="appointmentForm.patientTel" />
</el-form-item>
<el-form-item label="牙位">
<el-input v-model="appointmentForm.toothPosition" />
</el-form-item>
<el-form-item label="预约医生" prop="practitionerId">
<el-select
v-model="appointmentForm.practitionerId"
placeholder="预约医生"
clearable
filterable
remote
:remote-method="getInit"
>
<el-option
v-for="item in participantListOptions"
:key="item.practitionerId"
:label="item.practitionerName"
:value="item.practitionerId"
/>
</el-select>
</el-form-item>
<el-form-item label="预约时间">
<el-time-select
v-model="appointmentForm.reservationTime"
start="08:30"
start="07:00"
step="00:30"
end="18:00"
placeholder="选择时间"
@@ -66,6 +86,7 @@
>
<div class="card-header">
<span class="time">{{ appointment.reservationTime }}</span>
<span>{{ appointment.practitionerName }}</span>
<!-- <el-tag :type="getTagType(appointment.type)" size="small">
{{ appointment.type }}
</el-tag> -->
@@ -73,15 +94,27 @@
<div class="card-body">
<div class="patient-info">
<el-icon><User /></el-icon>
<span style="margin-left: 0; font-size: 16px" class="descriptions-item-label">
患者姓名:
</span>
<span>{{ appointment.patientName }}</span>
</div>
<div class="patient-info">
<el-icon><Phone /></el-icon>
<span style="margin-left: 0; font-size: 16px" class="descriptions-item-label">
手机号:
</span>
<span>{{ appointment.patientTel }}</span>
</div>
<div class="patient-info">
<span style="margin-left: 0; font-size: 16px" class="descriptions-item-label">
牙位:
</span>
<span>{{ appointment.toothPosition }}</span>
</div>
<div v-if="appointment.remark" class="remark">
<el-icon><Comment /></el-icon>
<span style="margin-left: 0; font-size: 16px" class="descriptions-item-label">
备注:
</span>
<span>{{ appointment.remark }}</span>
</div>
</div>
@@ -107,6 +140,7 @@ import {
addReservationInfo,
editReservationInfo,
delReservationInfo,
queryParticipantList,
} from './api';
import { formatDateStr } from '@/utils/index';
@@ -117,6 +151,7 @@ const isEditing = ref(false);
const editingId = ref(null);
const queryParams = ref({});
const currentAppointments = ref([]);
const participantListOptions = ref([]);
const { proxy } = getCurrentInstance();
// 预约数据
const appointments = ref([]);
@@ -143,8 +178,8 @@ function getRecords(date) {
getReservationInfo({
pageNo: 1,
pageSize: 1000,
reservationTimeSTime: month + '01 00:00:00',
reservationTimeETime: month + '31 23:59:59',
reservationTimeSTime: month + '-01 00:00:00',
reservationTimeETime: month + '-31 23:59:59',
}).then((res) => {
appointments.value = res.data.records.map((item) => {
return formatDateStr(item.reservationTime, 'YYYY-MM-DD');
@@ -152,6 +187,12 @@ function getRecords(date) {
console.log(appointments.value);
});
}
getInit();
function getInit(value) {
queryParticipantList({ searchKey: value }).then((res) => {
participantListOptions.value = res.data;
});
}
// 格式化选中的日期
const selectedDateFormatted = computed(() => {