版本更新

This commit is contained in:
Zhang.WH
2025-09-03 15:54:41 +08:00
parent 0b93d16b64
commit 8f82322d10
3290 changed files with 154339 additions and 23829 deletions

View File

@@ -0,0 +1,147 @@
<template>
<div @keyup="handleKeyDown" tabindex="0" ref="tableWrapper">
<el-table
ref="adviceBaseRef"
height="400"
:data="adviceBaseList"
highlight-current-row
@current-change="handleCurrentChange"
row-key="patientId"
@cell-click="clickRow"
>
<el-table-column label="名称" align="center" prop="adviceName" />
<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" prop="volume" />
<el-table-column label="用法" align="center" prop="methodCode_dictText" />
<el-table-column label="频次" align="center" prop="rateCode_dictText" />
<el-table-column label="单次剂量" align="center" prop="dose" />
<el-table-column label="剂量单位" align="center" prop="doseUnitCode_dictText" />
<el-table-column label="注射药品" align="center" prop="injectFlag_enumText" />
<el-table-column label="皮试" align="center" prop="skinTestFlag_enumText" />
</el-table>
</div>
</template>
<script setup>
import { nextTick } from 'vue';
import { getAdviceBaseInfo } from './api';
import { throttle } from 'lodash-es';
const props = defineProps({
adviceQueryParams: {
type: Object,
default: '',
},
patientInfo: {
type: Object,
required: true,
},
});
const emit = defineEmits(['selectAdviceBase']);
const total = ref(0);
const adviceBaseRef = ref();
const tableWrapper = ref();
const currentIndex = ref(0); // 当前选中行索引
const currentSelectRow = ref({});
const queryParams = ref({
pageSize: 100,
pageNum: 1,
});
const adviceBaseList = ref([]);
// 节流函数
const throttledGetList = throttle(
() => {
getList();
},
300,
{ leading: true, trailing: true }
);
watch(
() => props.adviceQueryParams,
(newValue) => {
queryParams.value.searchKey = newValue.searchKey;
queryParams.value.adviceType = newValue.adviceType;
throttledGetList();
},
{ deep: true }
);
getList();
function getList() {
queryParams.value.organizationId = props.patientInfo.orgId;
getAdviceBaseInfo(queryParams.value).then((res) => {
adviceBaseList.value = res.data.records;
total.value = res.data.total;
nextTick(() => {
currentIndex.value = 0;
if (adviceBaseList.value.length > 0) {
adviceBaseRef.value.setCurrentRow(adviceBaseList.value[0]);
}
});
});
}
// 处理键盘事件
const handleKeyDown = (event) => {
const key = event.key;
const data = adviceBaseList.value;
switch (key) {
case 'ArrowUp': // 上箭头
event.preventDefault(); // 阻止默认滚动行为
if (currentIndex.value > 0) {
currentIndex.value--;
setCurrentRow(data[currentIndex.value]);
}
break;
case 'ArrowDown': // 下箭头`
event.preventDefault();
if (currentIndex.value < data.length - 1) {
currentIndex.value++;
setCurrentRow(data[currentIndex.value]);
}
break;
case 'Enter': // 回车键
// const currentRow = adviceBaseRef.value.getSelectionRows();
event.preventDefault();
if (currentSelectRow.value) {
// 这里可以触发自定义逻辑,如弹窗、跳转等
emit('selectAdviceBase', currentSelectRow.value);
}
break;
}
};
// 设置选中行(带滚动)
const setCurrentRow = (row) => {
adviceBaseRef.value.setCurrentRow(row);
// 滚动到选中行
const tableBody = adviceBaseRef.value.$el.querySelector('.el-table__body-wrapper');
const currentRowEl = adviceBaseRef.value.$el.querySelector('.current-row');
if (tableBody && currentRowEl) {
currentRowEl.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
}
};
// 当前行变化时更新索引
const handleCurrentChange = (currentRow) => {
currentIndex.value = adviceBaseList.value.findIndex((item) => item === currentRow);
currentSelectRow.value = currentRow;
};
function clickRow(row) {
emit('selectAdviceBase', row);
}
defineExpose({
handleKeyDown,
});
</script>
<style scoped>
.popover-table-wrapper:focus {
outline: 2px solid #409eff; /* 聚焦时的高亮效果 */
}
</style>

View File

@@ -0,0 +1,202 @@
import request from '@/utils/request'
/**
* 获取患者列表
*/
export function getList(queryParams) {
return request({
url: '/charge-manage/pricing/patient-info',
method: 'get',
params: queryParams
})
}
// 处方相关接口
/**
* 获取药品列表
*/
export function getAdviceBaseInfo(queryParams) {
return request({
url: '/charge-manage/pricing/advice-base-info',
method: 'get',
params: queryParams
})
}
/**
* 保存处方(单条)
*/
export function savePrescription(data) {
return request({
url: '/doctor-station/advice/save-advice',
method: 'post',
data: data
})
}
/**
* 签发处方
*/
export function savePrescriptionSign(data) {
return request({
url: '/doctor-station/advice/sign-advice',
method: 'post',
data: data
})
}
/**
* 处方签退
*/
export function singOut(data) {
return request({
url: '/doctor-station/advice/sign-off',
method: 'post',
data: data
})
}
/**
* 获取患者本次就诊处方
*/
export function getPrescriptionList(encounterId) {
return request({
url: '/doctor-station/advice/request-base-info?encounterId=' + encounterId,
method: 'get',
})
}
/**
* 获取科室列表
*/
export function getOrgTree() {
return request({
url: '/base-data-manage/organization/organization',
method: 'get',
})
}
/**
* 获取退费账单
*/
export function getEncounterPatientPayment(encounterId) {
return request({
url: '/charge-manage/refund/patient-payment?encounterId=' + encounterId,
method: 'get',
})
}
/**
* 申请退费
*/
export function refundPayment(data) {
return request({
url: '/charge-manage/refund/refund-payment',
method: 'post',
data: data
})
}
// 电子处方相关接口
/**
* 电子处方查询
*/
export function getVeriPrescriptionInfo(queryParams) {
return request({
url: '/ybelep-request/get-PrescriptionInfo',
method: 'get',
params: queryParams
})
}
// 处方开立相关接口
/**
* 获取全部药品信息
*/
export function getAllMedicationInfo(queryParams) {
return request({
url: '/doctor-station/elep/get-allMedicationInfo',
method: 'get',
params: queryParams
})
}
/**
* 电子处方下拉框
*/
export function elepPrescriptionInit() {
return request({
url: '/doctor-station/elep/init',
method: 'get'
})
}
/**
* 获取处方信息
*/
export function getPrescriptionInfo(queryParams) {
return request({
url: '/doctor-station/elep/get-prescriptionInfo',
method: 'get',
params: queryParams
})
}
/**
* 获取药品信息
*/
export function getMedicationInfo(queryParams) {
return request({
url: '/doctor-station/elep/get-medicationInfo',
method: 'get',
params: queryParams
})
}
/**
* 获取单据号
*/
export function prescriptionNoInit() {
return request({
url: '/doctor-station/elep/prescriptionNoInit',
method: 'get'
})
}
/**
* 新增处方
*/
export function savePrescriptionInfo(data) {
return request({
url: '/doctor-station/elep/save-prescriptionInfo',
method: 'post',
data: data
})
}
/**
* 修改处方
*/
export function updatePrescriptionInfo(data) {
return request({
url: '/doctor-station/elep/update-prescriptionInfo',
method: 'post',
data: data
})
}
/**
* 删除处方
*/
export function deletePrescriptionInfo(data) {
return request({
url: '/doctor-station/elep/delete-prescriptionInfo',
method: 'post',
data: data
})
}
/**
* 签发处方
*/
export function issuancePrescription(prescriptionNoList) {
return request({
url: '/doctor-station/elep/issuance-prescription',
method: 'post',
data: prescriptionNoList
})
}

View File

@@ -0,0 +1,797 @@
<template>
<div style="width: 100%">
<div style="margin-bottom: 5px">
<el-button type="primary" @click="handleAddPrescription()" :disabled="false">
新增
</el-button>
<el-button type="primary" @click="handleSave()" :disabled="handleSaveDisabled"> 签发 </el-button>
<el-button type="warning" plain @click="handleSingOut()" :disabled="handleSingOutDisabled"> 签退 </el-button>
<!-- <el-button type="primary" plain @click="open()" :disabled="false"> 组套 </el-button> -->
<el-button type="danger" plain @click="handleDelete()" :disabled="false"> 删除 </el-button>
</div>
<el-table
max-height="650"
ref="prescriptionRef"
:data="prescriptionList"
row-key="uniqueKey"
border
@row-dblclick="clickRowDb"
:expand-row-keys="expandOrder"
>
<el-table-column type="expand" width="1" style="width: 0">
<template #default="scope">
<el-form :model="scope.row" :rules="rowRules" :ref="'formRef' + scope.$index">
<div style="padding: 16px; background: #f8f9fa; border-radius: 8px">
<template v-if="scope.row.adviceType == 2">
<div style="display: flex; align-items: center; margin-bottom: 16px; gap: 16px">
<span style="font-size: 16px; font-weight: 600">
{{
scope.row.adviceName +
' ' +
scope.row.volume +
' ' +
scope.row.unitPrice +
' 元/' +
scope.row.unitCode_dictText
}}
</span>
<div class="form-group">
<el-select
v-model="scope.row.lotNumber"
style="width: 180px; margin-right: 20px"
placeholder="药房"
>
<el-option
v-for="item in scope.row.stockList"
:key="item.lotNumber"
:value="item.lotNumber"
:label="
item.locationName +
' ' +
'批次号: ' +
item.lotNumber +
' ' +
' 库存:' +
item.quantity / scope.row.partPercent +
item.unitCode_dictText +
' 单价:' +
item.price.toFixed(2) +
'/' +
item.unitCode_dictText
"
@click="handleNumberClick(item, scope.$index)"
/>
</el-select>
<el-form-item
label="数量:"
prop="quantity"
class="required-field"
data-prop="quantity"
>
<el-input-number
placeholder="数量"
v-model="scope.row.quantity"
style="width: 70px"
controls-position="right"
:controls="false"
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.$index)"
@input="calculateTotalPrice(scope.row, scope.$index)"
/>
</el-form-item>
<el-select
v-model="scope.row.unitCode"
style="width: 70px; margin-right: 20px"
placeholder=" "
@change="calculateTotalAmount(scope.row, scope.$index)"
>
<template v-for="item in scope.row.unitCodeList" :key="item.value">
<el-option
v-if="item.type != unitMap['dose']"
:value="item.value"
:label="item.label"
/>
</template>
</el-select>
<span class="total-amount">
总金额{{ scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元' }}
</span>
</div>
<el-button type="primary" @click="handleSaveSign(scope.row, scope.$index)">
保存
</el-button>
</div>
</template>
<template v-else>
<div style="display: flex; align-items: center; margin-bottom: 16px; gap: 16px">
<span style="font-size: 16px; font-weight: 600">
{{
scope.row.adviceName + ' ' + scope.row.unitPrice
? Number(scope.row.unitPrice).toFixed(2)
: '-' + '元'
}}
</span>
<div class="form-group">
<el-form-item
label="执行次数:"
prop="quantity"
class="required-field"
data-prop="quantity"
>
<el-input-number
placeholder="执行次数"
style="width: 100px; margin: 0 20px"
v-model="scope.row.quantity"
controls-position="right"
:controls="false"
@keyup.enter.prevent="handleEnter('quantity', scope.row, scope.$index)"
@input="calculateTotalPrice(scope.row, scope.$index)"
/>
</el-form-item>
<el-tree-select
clearable
v-model="scope.row.orgId"
:data="organization"
:props="{ value: 'id', label: 'name', children: 'children' }"
value-key="id"
check-strictly
placeholder="请选择执行科室"
/>
<span class="total-amount">
总金额{{ scope.row.totalPrice ? scope.row.totalPrice + ' 元' : '0.00 元' }}
</span>
<span style="font-size: 16px; font-weight: 600">
<!-- 金额: {{ scope.row.priceList[0].price }} -->
</span>
</div>
<el-button type="primary" @click="handleSaveSign(scope.row, scope.$index)">
保存
</el-button>
</div>
</template>
</div>
</el-form>
</template>
</el-table-column>
<el-table-column label="" align="center" prop="groupId" width="60">
<template #default="scope">
<el-checkbox
:disabled = "scope.row.bizRequestFlag==0"
v-model="scope.row.check"
placeholder=""
@click.stop=""
@change="changeCheck(scope.row.check,scope.$index,scope.row)"
/>
</template>
<!-- (value) => {
if (value) {
groupIndexList.push(scope.$index);
} else {
groupIndexList.splice(groupIndexList.indexOf(scope.$index), 1);
}
} -->
</el-table-column>
<el-table-column label="项目" align="center" prop="productName" width="400">
<template #default="scope">
<template v-if="getRowDisabled(scope.row)">
<el-select
style="width: 35%; margin-right: 20px"
v-model="scope.row.adviceType"
:ref="'adviceTypeRef' + scope.$index"
@change="
(value) => {
expandOrder = [];
prescriptionList[scope.$index].adviceName = undefined;
adviceQueryParams.adviceType = value;
}
"
>
<el-option
v-for="item in adviceTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
@click="
() => {
prescriptionList[scope.$index].adviceType = item.value;
prescriptionList[scope.$index].adviceType_dictText = item.label;
}
"
/>
</el-select>
<el-popover
:popper-style="{ padding: '0' }"
placement="bottom-start"
:visible="scope.row.showPopover"
:width="1200"
>
<adviceBaseList
ref="adviceTableRef"
:popoverVisible="scope.row.showPopover"
:adviceQueryParams="adviceQueryParams"
:patientInfo="props.patientInfo"
@selectAdviceBase="(row) => selectAdviceBase(scope.row.uniqueKey, row)"
/>
<template #reference>
<el-input
:ref="'adviceRef' + scope.$index"
style="width: 50%"
v-model="scope.row.adviceName"
placeholder="请选择项目"
@input="handleChange"
@click="handleFocus(scope.row, scope.$index)"
@keyup.enter.stop="handleFocus(scope.row, scope.$index)"
@keydown="
(e) => {
if (!scope.row.showPopover) return;
// 拦截上下键和回车事件
if (['ArrowUp', 'ArrowDown', 'Enter'].includes(e.key)) {
e.preventDefault();
// 传递事件到弹窗容器
adviceTableRef.handleKeyDown(e);
}
}
"
@blur="handleBlur(scope.row)"
/>
</template>
</el-popover>
</template>
<span v-else>{{ scope.row.adviceName }}</span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="" width="90">
<template #default="scope">
<el-tag v-if="scope.row.statusEnum == 2" type="success">已签发</el-tag>
<el-tag v-else-if="scope.row.statusEnum == 1" type="">待签发</el-tag>
</template>
</el-table-column>
<el-table-column label="总量" align="center" prop="">
<template #default="scope">
<span v-if="!scope.row.isEdit">
{{ scope.row.quantity ? scope.row.quantity + ' ' + scope.row.unitCode_dictText : '' }}
</span>
</template>
</el-table-column>
<el-table-column label="总金额" align="right" prop="" header-align="center">
<template #default="scope">
<span v-if="!scope.row.isEdit" style="text-align: right">
{{ scope.row.totalPrice ? Number(scope.row.totalPrice).toFixed(2) + ' ' : '-' }}
</span>
</template>
</el-table-column>
<el-table-column label="药房/科室" align="center" prop="" width="240">
<template #default="scope">
<span v-if="!scope.row.isEdit">
{{ scope.row.positionName }}
</span>
</template>
</el-table-column>
<el-table-column label="签发人" align="center" prop="" width="240">
<template #default="scope">
<span v-if="!scope.row.isEdit">
{{ scope.row.requesterId_dictText }}
</span>
</template>
</el-table-column>
<el-table-column label="签发时间" align="center" prop="" width="240">
<template #default="scope">
<span v-if="!scope.row.isEdit">
{{ scope.row.requestTime }}
</span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script setup>
import {
savePrescription,
getPrescriptionList,
getOrgTree,
savePrescriptionSign,
singOut,
} from './api';
import adviceBaseList from './adviceBaseList';
import { getCurrentInstance, nextTick, ref, watch } from 'vue';
const emit = defineEmits(['selectDiagnosis']);
const prescriptionList = ref([]);
const form = ref({
prescriptionList: prescriptionList.value,
});
const adviceQueryParams = ref({});
const rowIndex = ref(-1);
const groupIndexList = ref([]);
const nextId = ref(1);
const unitCodeList = ref([]);
const adviceTableRef = ref([]);
const organization = ref([]);
const rowRules = ref({
conditionDefinitionId: [{ required: true, message: '请选择诊断', trigger: 'change' }],
dose: [{ required: true, message: '请输入单次剂量', trigger: 'change' }],
doseQuantity: [{ required: true, message: '请输入单次剂量', trigger: 'change' }],
quantity: [{ required: true, message: '请输入数量', trigger: 'change' }],
dispensePerDuration: [{ required: true, message: '请输入用药天数', trigger: 'change' }],
});
const unitMap = ref({
dose: 'dose',
minUnit: 'minUnit',
unit: 'unit',
});
const props = defineProps({
patientInfo: {
type: Object,
required: true,
},
activeTab: {
type: String,
},
});
const isAdding = ref(false);
const prescriptionRef = ref();
const expandOrder = ref([]); //目前的展开行
const stockList = ref([]);
const groupList = ref([])
const { proxy } = getCurrentInstance();
const inputRefs = ref({}); // 存储输入框实例
const requiredProps = ref([]); // 存储必填项 prop 顺序
const { method_code, unit_code, rate_code, distribution_category_code } = proxy.useDict(
'method_code',
'unit_code',
'rate_code',
'distribution_category_code'
);
const handleSaveDisabled = ref(false) //签发状态
const handleSingOutDisabled = ref(false) //签退状态
const adviceTypeList = ref([
{
label: '耗材',
value: 2,
},
{
label: '诊疗',
value: 3,
},
{
label: '全部',
value: undefined,
},
]);
watch(
() => expandOrder.value,
(newValue) => {
console.log(newValue,"监听·")
if (newValue.length > 0) {
nextTick(() => {
const index = prescriptionList.value.findIndex((row) => row.uniqueKey === newValue[0]);
const items = proxy.$refs['formRef' + index]?.$el?.querySelectorAll('[data-prop]');
requiredProps.value = Array.from(items).map((item) => item.dataset.prop);
});
} else {
requiredProps.value = {};
}
}
);
watch(
() => prescriptionList.value,
(newValue) => {
console.log(prescriptionList.value,"prescriptionList.value")
if(newValue&&newValue.length>0){
let saveList = prescriptionList.value.filter((item) => {
return item.statusEnum == 1&&(Number(item.bizRequestFlag)==1||!item.bizRequestFlag)
})
prescriptionList.value.map(k=>{
k.check = false
})
console.log(saveList,"prescriptionList.value")
if (saveList.length == 0) {
handleSaveDisabled.value = true
}else{
handleSaveDisabled.value = false
}
}
},
{ immediate: true }
);
function getListInfo(addNewRow) {
isAdding.value = false;
getPrescriptionList(props.patientInfo.encounterId).then((res) => {
prescriptionList.value = res.data;
if (props.activeTab == 'prescription' && addNewRow) {
handleAddPrescription();
}
});
}
function getRowDisabled(row) {
return row.isEdit;
}
// 新增医嘱
function handleAddPrescription() {
if (isAdding.value) {
proxy.$modal.msgWarning('请先保存当前医嘱');
return;
}
isAdding.value = true;
// 在数组最前方添加一行,让新增行显示在最上边
prescriptionList.value.unshift({
uniqueKey: nextId.value++,
showPopover: false,
check: false,
isEdit: true,
statusEnum: 1,
});
nextTick(() => {
proxy.$refs['adviceRef0'].focus();
});
}
// 行双击打开编辑块,仅待发送的可编辑
function clickRowDb(row) {
if (row.statusEnum == 1) {
row = { ...row, ...JSON.parse(row.contentJson) };
row.isEdit = true;
const index = prescriptionList.value.findIndex((item) => item.uniqueKey === row.uniqueKey);
prescriptionList.value[index] = row;
console.log(prescriptionList.value,"prescriptionList.value")
expandOrder.value = [row.uniqueKey];
}
}
function handleDiagnosisChange(item, row) {
row.diagnosisName = item.name;
row.conditionId = item.conditionId;
}
function handleFocus(row, index) {
rowIndex.value = index;
row.showPopover = true;
}
function handleBlur(row) {
row.showPopover = false;
}
function handleChange(value) {
adviceQueryParams.value.searchKey = value;
}
/**
* 选择药品回调
*/
function selectAdviceBase(key, row) {
getOrgList();
unitCodeList.value = [];
unitCodeList.value.push({ value: row.unitCode, label: row.unitCode_dictText, type: 'unit' });
if (row.doseUnitCode != row.minUnitCode) {
unitCodeList.value.push({
value: row.doseUnitCode,
label: row.doseUnitCode_dictText,
type: 'dose',
});
}
if (
(row.partAttributeEnum == 1 || row.partAttributeEnum == 3) &&
row.minUnitCode != row.unitCode
) {
unitCodeList.value.push({
value: row.minUnitCode,
label: row.minUnitCode_dictText,
type: 'minUnit',
});
}
prescriptionList.value[rowIndex.value] = {
...prescriptionList.value[rowIndex.value],
...JSON.parse(JSON.stringify(row)),
};
prescriptionList.value[rowIndex.value].orgId = undefined;
prescriptionList.value[rowIndex.value].dose = undefined;
prescriptionList.value[rowIndex.value].unitCodeList = unitCodeList.value;
prescriptionList.value[rowIndex.value].doseUnitCode =
row.minUnitCode != row.unitCode ? row.minUnitCode : row.unitCode;
prescriptionList.value[rowIndex.value].minUnitCode = JSON.parse(JSON.stringify(row.doseUnitCode));
prescriptionList.value[rowIndex.value].unitCode =
row.partAttributeEnum == 1 ? row.minUnitCode : row.unitCode;
// prescriptionList.value[rowIndex.value].doseUnitCode_dictText = row.minUnitCode_dictText;
prescriptionList.value[rowIndex.value].definitionId = JSON.parse(
JSON.stringify(row)
).chargeItemDefinitionId;
// 库存列表 + 价格列表拼成批次号的下拉框
if (row.adviceType != 3) {
if (row.inventoryList && row.inventoryList.length == 0) {
expandOrder.value = [];
proxy.$modal.msgWarning('该项目无库存');
return;
}
stockList.value = row.inventoryList.map((item, index) => {
return { ...item, ...row.priceList[index] };
});
prescriptionList.value[rowIndex.value].stockList = stockList.value;
// 获取默认批次号的库存,如果没有让医生重新选
let stock = stockList.value.filter((item) => {
return item.lotNumber == row.defaultLotNumber;
})[0];
if (stock != {} && stock != undefined) {
if (stock.quantity <= 0) {
proxy.$modal.msgWarning('该项目库存不足,请选择其它库房');
// return;
}
prescriptionList.value[rowIndex.value].lotNumber = stock.lotNumber;
prescriptionList.value[rowIndex.value].inventoryId = stock.inventoryId;
prescriptionList.value[rowIndex.value].locationId = stock.locationId;
prescriptionList.value[rowIndex.value].unitPrice = stock.price;
prescriptionList.value[rowIndex.value].positionName = stock.locationName;
}
} else {
prescriptionList.value[rowIndex.value].orgId = JSON.parse(JSON.stringify(row)).positionId;
prescriptionList.value[rowIndex.value].unitPrice = row.priceList[0].price;
}
expandOrder.value = [key];
nextTick(() => {
if (row.adviceType == 1) {
if (row.injectFlag == 1) {
inputRefs.value['executeNum']?.focus();
} else {
inputRefs.value['dose']?.focus();
}
} else {
inputRefs.value['quantity']?.focus();
}
});
}
function getOrgList() {
getOrgTree().then((res) => {
organization.value = res.data.records;
console.log(organization.value,"organization.value")
});
}
function handleDelete() {
let deleteList = prescriptionList.value
.filter((item) => {
return item.check && item.statusEnum == 1;
})
.map((item) => {
return {
requestId: item.requestId,
dbOpType: '3',
adviceType: item.adviceType,
};
});
if (deleteList.length == 0) {
proxy.$modal.msgWarning('请选择要删除的项目');
return;
}
if (!deleteList[0].requestId) {
prescriptionList.value.shift();
} else {
savePrescription({ adviceSaveList: deleteList }).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess('操作成功');
getListInfo(false);
}
});
}
// groupIndexList.value
// .sort((a, b) => b - a)
// .forEach((item) => {
// prescriptionList.value.splice(item, 1);
// });
// groupIndexList.value = [];
expandOrder.value = [];
isAdding.value = false;
adviceQueryParams.value.adviceType = undefined;
// prescriptionList.value.splice(index, 1);
}
function handleNumberClick(item, index) {
prescriptionList.value[index].unitPrice = item.price;
// prescriptionList.value[index].lotNumber = item.lotNumber;
prescriptionList.value[index].locationId = item.locationId;
prescriptionList.value[index].positionId = item.locationId;
prescriptionList.value[index].positionName = item.locationName;
}
function changeCheck(value,index,row){
if (value) {
groupIndexList.value.push(index)
groupList.value.push(row)
} else {
groupIndexList.value.splice(groupIndexList.value.indexOf(index), 1)
groupList.value.splice(groupList.value.indexOf(index), 1)
}
groupList.value.map(k=>{
if(k.check){
if(k.statusEnum == 1){//待签发
if(Number(k.bizRequestFlag)==1||!k.bizRequestFlag){
if(handleSaveDisabled.value&&!handleSingOutDisabled.value&&groupList.value.length>1){
proxy.$modal.msgWarning('请选择相同的状态的项目进行操作')
return
}else{
handleSaveDisabled.value = false
handleSingOutDisabled.value = true
}
}else{
handleSaveDisabled.value = true
handleSingOutDisabled.value = true
return
}
}
if(k.statusEnum == 2){ //已签发
if(Number(k.bizRequestFlag)==1||!k.bizRequestFlag){
if(!handleSaveDisabled.value&&handleSingOutDisabled.value&&groupList.value.length>1){
proxy.$modal.msgWarning('请选择相同的状态的项目进行操作')
return
}else{
handleSaveDisabled.value = true
handleSingOutDisabled.value = false
}
}else{
handleSaveDisabled.value = true
handleSingOutDisabled.value = true
return
}
}
}
})
console.log(groupIndexList.value,"!21")
}
/**
* 保存处方
*/
function handleSave() {
if (expandOrder.value.length > 0) {
proxy.$modal.msgWarning('请先保存当前医嘱');
return;
}
let saveList = prescriptionList.value.filter((item) => {
return item.statusEnum == 1&&(Number(item.bizRequestFlag)==1||!item.bizRequestFlag)
});
// let saveList = prescriptionList.value
// .filter((item) => {
// return item.check;
// }).filter((item) => {
// return item.statusEnum == 1&&item.bizRequestFlag==1
// })
// if (saveList.length == 0) {
// proxy.$modal.msgWarning('当前无可签发处方');
// return;
// }
// 此处签发处方和单行保存处方传参相同后台已经将传参存为JSON字符串此处直接转换为JSON即可
let list = saveList.map((item) => {
return {
...JSON.parse(item.contentJson),
requestId: item.requestId,
dbOpType: '1',
groupId: item.groupId,
};
});
savePrescriptionSign({
organizationId: props.patientInfo.orgId,
adviceSaveList: list,
}).then((res) => {
if (res.code === 200) {
proxy.$modal.msgSuccess('保存成功');
getListInfo(false);
prescriptionList.value.map(k=>{
k.check = false
})
groupIndexList.value = []
groupList.value = []
nextId.value == 1;
}
});
}
// 单行处方保存
function handleSaveSign(row, index) {
proxy.$refs['formRef' + index].validate((valid) => {
if (valid) {
row.isEdit = false;
isAdding.value = false;
expandOrder.value = [];
row.patientId = props.patientInfo.patientId;
row.encounterId = props.patientInfo.encounterId;
row.accountId = props.patientInfo.accountId;
row.contentJson = JSON.stringify(row);
row.dbOpType = row.requestId ? '2' : '1';
row.minUnitQuantity = row.quantity * row.partPercent;
savePrescription({ adviceSaveList: [row] }).then((res) => {
if (res.code === 200) {
proxy.$modal.msgSuccess('保存成功');
// getListInfo(true);
nextId.value == 1;
}
});
}
});
}
// 签退
function handleSingOut() {
let requestIdList = prescriptionList.value
.filter((item) => {
return item.check;
})
.filter((item) => {
return item.statusEnum == 2&&(Number(item.bizRequestFlag)==1||!item.bizRequestFlag)
})
.map((item) => {
return item.requestId;
});
console.log(requestIdList,"签退")
if (requestIdList.length == 0) {
proxy.$modal.msgWarning('未选择可签退的医嘱');
return
}
singOut(requestIdList).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess('操作成功');
getListInfo(false);
console.log( prescriptionList.value," groupIndexList.value")
prescriptionList.value.map(k=>{
k.check = false
})
groupIndexList.value = []
groupList.value = []
}
});
}
defineExpose({ getListInfo });
</script>
<style lang="scss" scoped>
:deep(.el-table__expand-icon) {
display: none !important;
}
.medicine-title {
font-size: 16px;
font-weight: 600;
min-width: 280px;
display: inline-block;
}
.total-amount {
font-size: 16px;
font-weight: 600;
color: #409eff;
white-space: nowrap;
}
.medicine-info {
font-size: 15px;
font-weight: 600;
color: #606266;
white-space: nowrap;
}
.form-group {
display: flex;
align-items: center;
gap: 8px;
background: #fff;
padding: 6px 10px;
border-radius: 4px;
border: 1px solid #ebeef5;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
/* 调整element组件默认间距 */
// .el-select,
// .el-input-number {
// margin-right: 0 !important;
// }
.el-input-number .el-input__inner {
text-align: center;
}
.el-table__cell .el-form-item--default {
margin-bottom: 0px;
}
</style>

View File

@@ -0,0 +1,327 @@
<template>
<div style="display: flex; justify-content: space-between; height: 90vh">
<div style="width: 15%; height: 100%; border: 1px solid #eee; border-right: 0">
<div style="padding: 10px; border: 1px solid #eee; height: 50px; border-right: 0">
<span>现诊患者</span>
</div>
<div style="width: 100%; padding: 10px">
<el-input
v-model="queryParams.searchKey"
placeholder="请输入患者名"
clearable
style="width: 100%; margin-bottom: 10px"
@keyup.enter="getPatientList"
>
<template #append>
<el-button icon="Search" @click="getPatientList" />
</template>
</el-input>
<el-scrollbar height="700px">
<div
v-for="(item, index) in patientList"
:class="item.active ? 'patient-card actived' : 'patient-card'"
:key="item.id"
@click="handleCardClick(item, index)"
>
<div class="main-info-container">
<div class="bed-container">
<div class="bed">
<el-text truncated :tclass="bedfont" width="auto">初诊</el-text>
</div>
<div class="bed_new" />
</div>
</div>
<div class="doctor-parent-line" />
<div class="personal-info-container">
<div class="name-container">
<!-- 患者姓名 -->
<div class="name" style="max-width: 70px">
<el-text tclass="name" width="auto">{{ item.patientName || '未知' }}</el-text>
</div>
<!-- 患者性别/年龄 -->
<div class="age">
{{ item.genderEnum_enumText }}/{{ item.age }}/{{ item.typeCode_dictText }}
</div>
</div>
</div>
</div>
</el-scrollbar>
</div>
</div>
<div style="width: 85%; border: 1px solid #eee; position: relative">
<div style="padding: 10px; border: 1px solid #eee; height: 50px; border-left: 0">
<el-descriptions :column="4">
<el-descriptions-item label="患者信息:" width="150">
{{
Object.keys(patientInfo).length !== 0
? patientInfo.patientName +
' / ' +
patientInfo.age +
' / ' +
patientInfo.genderEnum_enumText +
' / ' +
patientInfo.typeCode_dictText
: '-'
}}
</el-descriptions-item>
<el-descriptions-item label="挂号时间" width="150">
{{ Object.keys(patientInfo).length !== 0 ? formatDate(patientInfo.registerTime) : '-' }}
</el-descriptions-item>
<el-descriptions-item label="医生" width="150">{{ userStore.name }}</el-descriptions-item>
<el-descriptions-item label="" width="150">
<!-- {{ '' }} -->
</el-descriptions-item>
</el-descriptions>
</div>
<div style="padding: 10px">
<prescriptionlist :patientInfo="patientInfo" ref="prescriptionRef" />
<div class="overlay" v-if="disabled"></div>
</div>
</div>
</div>
</template>
<script setup>
import { getList } from './component/api.js';
import { formatDate } from '@/utils/index';
import useUserStore from '@/store/modules/user';
import { nextTick } from 'vue';
import Prescriptionlist from './component/prescriptionlist.vue';
import { onBeforeRouteLeave } from 'vue-router';
// // 监听路由离开事件
// onBeforeRouteLeave((to, from, next) => {
// // 弹出确认框
// const confirmLeave = window.confirm('确定要离开吗?未保存的数据可能丢失!');
// if (confirmLeave) {
// next(); // 允许离开
// } else {
// next(false); // 取消离开
// }
// });
defineOptions({
name: 'PatientParentCard',
});
const userStore = useUserStore();
const bedfont = 'bed-font';
const queryParams = ref({});
const currentEncounterId = ref('');
const emits = defineEmits(['click']);
const patientList = ref([]);
const patientInfo = ref({});
const prescriptionRef = ref();
const waitCount = ref(0);
const { proxy } = getCurrentInstance();
const disabled = computed(() => {
return Object.keys(patientInfo.value).length === 0;
});
getPatientList();
// 获取现诊患者列表
function getPatientList() {
getList(queryParams.value).then((res) => {
patientList.value = res.data.records.map((item) => {
return {
...item,
active: currentEncounterId.value ? item.encounterId == currentEncounterId.value : false,
};
});
});
}
function handleQuery() {}
function handleCardClick(item, index) {
currentEncounterId.value = '';
// if (item.active) {
// patientList.value[index].active = false;
// return;
// }
patientList.value.forEach((patient) => {
patient.active = patient.encounterId === item.encounterId;
});
patientInfo.value = item;
nextTick(() => {
prescriptionRef.value.getListInfo();
});
}
</script>
<style lang="scss" scoped>
.patient-card {
width: 100%;
overflow: hidden;
background-color: #fff;
border: 1px solid;
border-color: #eee;
border-radius: 4px;
box-shadow: 0 2px 2px 0 rgba(57.55, 69.04, 86.28, 20%);
margin-bottom: 10px;
cursor: pointer;
&.actived {
background-color: rgb(7, 155, 140, 5%);
border-color: var(--el-color-primary);
}
.cross-dept {
height: 24px;
padding: 0 16px;
color: #fff;
font-size: 14px;
line-height: 24px;
background-color: #256d95;
}
.main-info-container {
display: flex;
align-items: center;
justify-content: space-between;
height: 24px;
margin: 7px 0;
padding: 0 16px;
.bed-container {
display: flex;
flex: 1;
align-items: center;
min-width: 0;
.bed {
flex-grow: 0;
flex-shrink: 1;
min-width: 0;
:deep(.bed-font) {
color: #333;
font-weight: 600;
font-size: 16px;
}
}
.bed_new {
flex-shrink: 0;
width: 10px;
height: 10px;
margin-left: 4px;
background: #29af6f;
border-radius: 50%;
}
}
.indepatient-code-container {
display: flex;
flex-shrink: 0;
align-items: center;
padding-left: 6px;
color: #666;
font-size: 14px;
.sign {
width: 24px;
height: 24px;
color: white;
line-height: 24px;
text-align: center;
border-radius: 50%;
user-select: none;
}
}
}
.doctor-parent-line {
margin: 0 16px;
border-bottom: 1px dashed #ddd;
}
.personal-info-container {
display: flex;
align-items: center;
justify-content: space-between;
margin: 10px 0;
padding: 0 16px;
.name-container {
display: flex;
align-items: center;
height: 24px;
.name {
color: #333;
font-size: 16px;
}
.age {
margin-left: 10px;
color: #666;
font-size: 14px;
}
}
.change-department {
width: 58px;
height: 24px;
color: #5585e3;
font-size: 14px;
line-height: 24px;
text-align: center;
background: #e6edfb;
border-radius: 4px;
}
}
.dept {
margin-bottom: 4px;
padding: 0 16px;
display: flex;
justify-content: space-between;
align-items: center;
.doctor {
display: flex;
align-items: center;
height: 32px;
line-height: 32px;
.doctor_name {
display: flex;
align-items: center;
margin-left: 4px;
color: #333;
}
}
.deptNurseName {
display: flex;
align-items: center;
height: 32px;
color: #256d95;
line-height: 32px;
}
}
}
::v-deep .el-tabs__header {
padding: 0;
position: relative;
margin: 0 0 5px !important;
}
::v-deep .el-drawer__header {
margin-bottom: 15px !important;
}
::v-deep .el-drawer__body {
padding: 10px !important;
}
.el-badge {
--el-badge-padding: 6px;
}
.disabled-wrapper .overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999; /* 确保覆盖在内容上方 */
cursor: not-allowed;
}
</style>

View File

@@ -0,0 +1,2 @@
<template>
</template>

View File

@@ -0,0 +1,2 @@
<template>
</template>

View File

@@ -0,0 +1,2 @@
<template>
</template>

View File

@@ -0,0 +1,66 @@
import request from '@/utils/request'
export function getRreportReturnIssue(query) {
return request({
url:'/report-manage/return-issue/report-return-issue',
method: 'get',
params: query
})
}
// 获取科室列表
export function getDepartmentList() {
return request({
url: '/app-common/department-list',
method: 'get',
})
}
// 获取日结
export function getTotal(params) {
return request({
url: '/payment/bill/getTotal',
method: 'get',
params: params
})
}
// 查询费用性质
export function getContractList() {
return request({
url: '/app-common/contract-list',
method: 'get'
})
}
// 获取门诊日结数据
export function getClincReport(params) {
return request({
url: '/payment/bill/getTotalCcu',
method: 'get',
params: params
})
}
// 获取全部人员
export function getAllUser(params) {
return request({
url: '/base-data-manage/practitioner/user-practitioner-page',
method: 'get',
params: params
})
}
import axios from 'axios';
export function testWithAxios() {
return axios.create(
{
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: '/api',
// 超时
timeout: 60000
}
).post('/api/data/', {
FunctionId: 3
});
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,436 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="查询日期:">
<el-date-picker
v-model="queryTime"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 300px; margin-right: 20px"
@change="getValue"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item label="费用性质:">
<el-select
v-model="contractNo"
placeholder="费用性质"
clearable
@change="getValue"
style="width: 150px; margin-right: 30px"
>
<el-option
v-for="item in contractList"
:key="item.busNo"
:label="item.contractName"
:value="item.busNo"
/>
</el-select>
<el-button type="primary" plain icon="Search" @click="getValue">查询</el-button>
<el-button type="primary" plain icon="Printer" @click="print">打印</el-button>
</el-form-item>
<!-- <el-form-item label="科室:" prop="sourceLocationId">
<el-select
v-model="queryParams.sourceLocationId"
placeholder=""
clearable
style="width: 150px"
>
<el-option
v-for="issueDepartment in issueDepartmentDto"
:key="issueDepartment.id"
:label="issueDepartment.name"
:value="issueDepartment.id"
/>
</el-select>
</el-form-item> -->
</el-form>
<!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Search" @click="getValue">查询</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
</el-col>
</el-row> -->
<div v-loading="loading">
<el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<!-- <el-col :span="3">
<span>经办人编号</span>
</el-col> -->
<el-col :span="3">
<span class="label">经办人姓名</span>
<span class="value"> {{ userStore.nickName }}</span>
</el-col>
<el-col :span="3">
<span class="label">科室</span>
<span class="value">{{ userStore.orgName }}</span>
</el-col>
<el-col :span="4.5">
<span class="label">时间</span>
<span class="value"> {{ queryTime[0] + '~' + queryTime[1] }} </span>
</el-col>
</el-row>
<el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col :span="3">
<span class="label">实际现金收入</span>
<span class="value"> {{ formatValue(reportValue.cashSum) }}</span>
</el-col>
<el-col :span="3">
<span class="label">现金</span>
<span class="value">{{ formatValue(reportValue.rmbCashSum) }}</span>
</el-col>
<el-col :span="3">
<span class="label">微信</span>
<span class="value">{{ formatValue(reportValue.vxCashSum) }}</span>
</el-col>
<el-col :span="3">
<span class="label">支付宝</span>
<span class="value">{{ formatValue(reportValue.aliCashSum) }}</span>
</el-col>
</el-row>
<el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col :span="3">
<span class="label">统筹支付</span>
<span class="value">{{ formatValue(reportValue.tcSum) }}</span>
</el-col>
<el-col :span="3">
<span class="label">账户支付</span>
<span class="value">{{ formatValue(reportValue.zhSum) }}</span>
</el-col>
<el-col :span="3">
<span class="label">基金支付总额</span>
<span class="value">{{ formatValue(reportValue.fundSum) }}</span>
</el-col>
<!-- <el-col :span="3">
<span>医保人次{{ reportValue.aliCashSum }}</span>
</el-col> -->
</el-row>
<el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col :span="3">
<span class="label">诊查费</span>
<span class="value">{{ formatValue(reportValue.DIAGNOSTIC_FEE) }}</span>
</el-col>
<el-col :span="3">
<span class="label">检查费</span>
<span class="value">{{ formatValue(reportValue.CHECK_FEE) }}</span>
</el-col>
<el-col :span="3">
<span class="label">化验费</span>
<span class="value">{{ formatValue(reportValue.DIAGNOSTIC_TEST_FEE) }}</span>
</el-col>
<el-col :span="3">
<span class="label">治疗费</span>
<span class="value">{{ formatValue(reportValue.MEDICAL_EXPENSE_FEE) }}</span>
</el-col>
</el-row>
<el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col :span="3">
<span class="label">西药费</span>
<span class="value">{{ formatValue(reportValue.WEST_MEDICINE) }}</span>
</el-col>
<el-col :span="3">
<span class="label">中药饮片费</span>
<span class="value">{{ formatValue(reportValue.CHINESE_MEDICINE_SLICES_FEE) }}</span>
</el-col>
<el-col :span="3">
<span class="label">中成药费</span>
<span class="value">{{ formatValue(reportValue.CHINESE_MEDICINE_FEE) }}</span>
</el-col>
<el-col :span="3">
<span class="label">卫生材料费</span>
<span class="value">{{ formatValue(reportValue.SANITARY_MATERIALS_FEE) }}</span>
</el-col>
</el-row>
<el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col :span="3">
<span class="label">诊疗费</span>
<span class="value">{{ formatValue(reportValue.GENERAL_CONSULTATION_FEE) }}</span>
</el-col>
<el-col :span="3">
<span class="label">挂号费</span>
<span class="value">{{ formatValue(reportValue.REGISTRATION_FEE) }}</span>
</el-col>
<el-col :span="3">
<span class="label">其他费用</span>
<span class="value">{{ formatValue(reportValue.OTHER_FEE) }}</span>
</el-col>
<!-- <el-col :span="3">
<span>现金</span>
</el-col> -->
</el-row>
</div>
</div>
</template>
<script setup name="dayEnd">
import { getRreportReturnIssue, getTotal, getContractList } from './component/api';
import dayjs from 'dayjs';
import useUserStore from '@/store/modules/user';
import { formatDate, formatDateStr } from '@/utils/index';
import Decimal from 'decimal.js';
const userStore = useUserStore();
// import Dialog from "./components/Dialog";
const router = useRouter();
const { proxy } = getCurrentInstance();
const purchaseinventoryRef = ref(null); // 初始化 ref
const purchaseinventoryList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const title = ref('');
const contractList = ref(undefined);
const reportValue = ref({});
const queryTime = ref([
formatDateStr(new Date(), 'YYYY-MM-DD'),
formatDateStr(new Date(), 'YYYY-MM-DD'),
]);
const contractNo = ref('0000');
const data = reactive({
queryParams: {
form: {},
pageNo: 1,
pageSize: 10,
searchKey: undefined,
purposeLocationId: undefined,
sourceLocationId: undefined,
supplierId: undefined,
approvalTimeSTime: undefined,
approvalTimeETime: undefined,
},
rules: {},
});
const { queryParams, form, rules } = toRefs(data);
getValue();
function getValue() {
loading.value = true;
getTotal({
contractNo: contractNo.value,
startTime: queryTime.value[0] + ' 00:00:00',
endTime: queryTime.value[1] + ' 23:59:59',
entererId: userStore.practitionerId,
}).then((res) => {
loading.value = false;
reportValue.value = res.data;
});
}
getContract();
function getContract() {
getContractList().then((response) => {
contractList.value = response.data;
});
}
function getPharmacyCabinetLists() {
// occurrenceTime.value =
// getDepartmentList().then((response) => {
// issueDepartmentDto.value = response.data
// })
}
/** 查询调拨管理项目列表 */
function getList() {
loading.value = true;
getRreportReturnIssue(queryParams.value).then((res) => {
loading.value = false;
purchaseinventoryList.value = res.data.records;
total.value = res.data.total;
});
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.approvalTimeSTime =
occurrenceTime.value && occurrenceTime.value.length == 2
? occurrenceTime.value[0] + ' 00:00:00'
: '';
queryParams.value.approvalTimeETime =
occurrenceTime.value && occurrenceTime.value.length == 2
? occurrenceTime.value[1] + ' 23:59:59'
: '';
queryParams.value.pageNo = 1;
getList();
}
/** 清空条件按钮操作 */
function handleClear() {
// 清空查询条件
queryParams.value.approvalTimeSTime = '';
queryParams.value.approvalTimeETime = '';
occurrenceTime.value = '';
proxy.resetForm('queryRef');
getList();
}
/** 选择条数 */
function handleSelectionChange(selection) {
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
/** 打印门诊日结 */
async function print() {
// const selectedRows = proxy.$refs['tableRef'].getSelectionRows();
console.log(reportValue.value, '==reportValue.value==');
const result = {
data: [
{
...reportValue.value, // 将 reportValue.value 中的所有属性展开到 result 中
nickName: userStore.nickName,
orgName: userStore.orgName,
fixmedinsName: '长春大学医院',
queryTime: queryTime.value[0] + '~' + queryTime.value[1],
zfAmount: new Decimal(reportValue.value.zhSum || 0).add(reportValue.value.fundSum || 0),
feeAmount: new Decimal(reportValue.value.DIAGNOSTIC_FEE || 0)
.add(reportValue.value.CHECK_FEE || 0)
.add(reportValue.value.DIAGNOSTIC_TEST_FEE || 0)
.add(reportValue.value.MEDICAL_EXPENSE_FEE || 0)
.add(reportValue.value.WEST_MEDICINE || 0)
.add(reportValue.value.CHINESE_MEDICINE_SLICES_FEE || 0)
.add(reportValue.value.CHINESE_MEDICINE_FEE || 0)
.add(reportValue.value.GENERAL_CONSULTATION_FEE || 0)
.add(reportValue.value.REGISTRATION_FEE || 0)
.add(reportValue.value.OTHER_FEE || 0)
.add(reportValue.value.SANITARY_MATERIALS_FEE || 0),
},
],
};
console.log(result, '==result.data==');
// 将对象转换为 JSON 字符串
let jsonString = JSON.stringify(result, null, 2);
console.log(jsonString, 'jsonstring');
await CefSharp.BindObjectAsync('boundAsync');
await boundAsync
.printReport(getPrintFileName(contractNo.value), jsonString)
.then((response) => {
//返回结果是jsonString可判断其调用是否成功
console.log(response, 'response');
var res = JSON.parse(response);
if (!res.IsSuccess) {
proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
}
})
.catch((error) => {
proxy.$modal.msgError('调用打印插件失败:' + error);
});
}
function getPrintFileName(value) {
switch (value) {
case '0000':
return '门诊日结单(按登录角色查询)自费.grf';
case '229900': // 省医保
return '门诊日结单(按登录角色查询)省医保.grf';
case '220100': // 市医保
return '门诊日结单(按登录角色查询)市医保.grf';
}
}
function formatValue(value) {
return value == null || value == undefined ? '0.00 元' : value.toFixed(2) + ' 元';
}
getList();
getPharmacyCabinetLists();
</script>
<style scoped>
.custom-tree-node {
display: flex;
align-items: center;
}
.title {
font-weight: bold;
font-size: large;
margin-bottom: 10px;
}
.label {
display: inline-block;
width: 120px !important;
}
.value {
float: right;
}
.el-col {
margin-right: 50px;
}
</style>

View File

@@ -0,0 +1,498 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="查询日期:">
<el-date-picker
v-model="queryTime"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 300px; margin-right: 20px"
@change="getValue"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item label="费用性质:">
<el-select
v-model="contractNo"
placeholder="费用性质"
clearable
@change="getValue"
style="width: 150px; margin-right: 30px"
>
<el-option
v-for="item in contractList"
:key="item.busNo"
:label="item.contractName"
:value="item.busNo"
/>
</el-select>
</el-form-item>
<el-form-item label="经办人:">
<el-select
v-model="entererId"
placeholder="经办人"
clearable
filterable
@change="
(value) => {
if (!value) {
curUserInfo = {};
}
getValue();
}
"
style="width: 150px; margin-right: 30px"
>
<el-option
v-for="item in userList"
:key="item.practitionerId"
:label="item.nickName"
:value="item.practitionerId"
@click="
() => {
curUserInfo = item;
}
"
/>
</el-select>
</el-form-item>
<el-button type="primary" plain icon="Search" @click="getValue">查询</el-button>
<el-button type="primary" plain icon="Printer" @click="print">打印</el-button>
</el-form>
<div v-loading="loading" style="width: 1300px">
<div style="text-align: center">
<h2>门诊收费日结单</h2>
</div>
<el-row
:gutter="5"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col :span="4">
<span class="label">经办人姓名</span>
<span class="value"> {{ curUserInfo.nickName ? curUserInfo.nickName : '全部' }}</span>
</el-col>
<el-col :span="4">
<span class="label">科室</span>
<span class="value">{{ curUserInfo.orgId_dictText }}</span>
</el-col>
<el-col :span="5">
<span class="label">机构</span>
<span class="value">{{ '长春大学医院' }}</span>
</el-col>
<el-col :span="7">
<span class="label">时间</span>
<span class="value"> {{ queryTime[0] + '~' + queryTime[1] }} </span>
</el-col>
</el-row>
<div class="divider"></div>
<el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col
v-for="(item, index) in fin_type_code"
:span="5"
:key="index"
style="margin-bottom: 15px"
>
<span class="label">{{ item.label + '' }}</span>
<span class="value">{{ formatValue(reportValue[item.value]) }}</span>
</el-col>
</el-row>
<div class="divider"></div>
<el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col :span="5">
<span class="label">总收入</span>
<span class="value">{{ formatValue(reportValue.SUM) }}</span>
</el-col>
<!-- <el-col :span="5">
<span class="label">实际现金收入</span>
<span class="value">
{{
formatValue(
(reportValue['0000cash'] || 0) +
(reportValue['220100cash'] || 0) +
(reportValue['229900cash'] || 0)
)
}}
</span>
</el-col> -->
<!-- <el-col :span="5">
<span class="label">现金</span>
<span class="value">{{ formatValue(reportValue.rmbCashSum) }}</span>
</el-col> -->
<el-col :span="5">
<span class="label">微信</span>
<span class="value">{{ formatValue(reportValue.vxCashSum) }}</span>
</el-col>
<el-col :span="5">
<span class="label">支付宝</span>
<span class="value">{{ formatValue(reportValue.aliCashSum) }}</span>
</el-col>
<el-col :span="5">
<span class="label">网银</span>
<span class="value">{{ formatValue(reportValue.aliCashSum) }}</span>
</el-col>
</el-row>
<!-- <el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col :span="5">
<span class="label">统筹支付</span>
<span class="value">{{ formatValue(reportValue.tcSum) }}</span>
</el-col>
<el-col :span="5">
<span class="label">账户支付</span>
<span class="value">{{ formatValue(reportValue.zhSum) }}</span>
</el-col>
<el-col :span="5">
<span class="label">基金支付总额</span>
<span class="value">{{ formatValue(reportValue.fundSum) }}</span>
</el-col>
</el-row> -->
<el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col :span="5">
<span class="label">自费现金总额</span>
<span class="value">{{ formatValue(reportValue['0000cash']) }}</span>
</el-col>
<!-- <el-col :span="5">
<span class="label">医保现金总额</span>
<span class="value">{{ formatValue(reportValue.ybCashSum) }}</span>
</el-col> -->
<el-col :span="5">
<span class="label">自费人次</span>
<span class="value">
{{ reportValue['0000reg'] ? reportValue['0000reg'] + ' 人' : '0 人' }}
</span>
</el-col>
<el-col :span="5">
<span class="label">省医保人次</span>
<span class="value">
{{ reportValue['229900reg'] ? reportValue['229900reg'] + ' 人' : '0 人' }}
</span>
</el-col>
<el-col :span="5">
<span class="label">市医保人次</span>
<span class="value">
{{ reportValue['220100reg'] ? reportValue['220100reg'] + ' 人' : '0 人' }}
</span>
</el-col>
<!-- <el-col :span="5">
<span class="label">医保人次</span>
<span class="value">{{ reportValue.ybReg + ' 人' }}</span>
</el-col> -->
</el-row>
<el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col :span="5">
<span class="label">省医保现金</span>
<span class="value">{{ formatValue(reportValue['229900cash']) }}</span>
</el-col>
<el-col :span="5">
<span class="label">省医保统筹</span>
<span class="value">{{ formatValue(reportValue['229900tcSum']) }}</span>
</el-col>
<el-col :span="5">
<span class="label">省医保账户</span>
<span class="value">{{ formatValue(reportValue['229900zhSum']) }}</span>
</el-col>
<el-col :span="5">
<span class="label">省医保基金</span>
<span class="value">{{ formatValue(reportValue['229900fundSum']) }}</span>
</el-col>
</el-row>
<el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col :span="5">
<span class="label">市医保现金</span>
<span class="value">{{ formatValue(reportValue['220100cash']) }}</span>
</el-col>
<el-col :span="5">
<span class="label">市医保统筹</span>
<span class="value">{{ formatValue(reportValue['220100tcSum']) }}</span>
</el-col>
<el-col :span="5">
<span class="label">市医保账户</span>
<span class="value">{{ formatValue(reportValue['220100zhSum']) }}</span>
</el-col>
<el-col :span="5">
<span class="label">市医保基金</span>
<span class="value">{{ formatValue(reportValue['220100fundSum']) }}</span>
</el-col>
</el-row>
<el-row
:gutter="10"
outpatientNo="mb8"
style="
margin: 20px 0;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 0 20px;
"
>
<el-col :span="5">
<span class="label">省医保总额</span>
<span class="value">{{ formatValue((reportValue['229900cash'] || 0 + reportValue['229900tcSum'] || 0 + reportValue['229900zhSum'] || 0 + reportValue['229900fundSum'] || 0)) }}</span>
</el-col>
<el-col :span="5">
<span class="label">省医保总额</span>
<span class="value">{{ formatValue((reportValue['220100cash'] || 0 + reportValue['220100tcSum'] || 0 + reportValue['220100zhSum'] || 0 + reportValue['220100fundSum'] || 0)) }}</span>
</el-col>
</el-row>
</div>
</div>
</template>
<script setup name="dayEnd">
import { getAllUser, getContractList, getClincReport, testWithAxios } from './component/api';
import useUserStore from '@/store/modules/user';
import { formatDate, formatDateStr } from '@/utils/index';
import Decimal from 'decimal.js';
import { hiprint } from 'vue-plugin-hiprint';
import templateJson from './component/template.json';
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
const purchaseinventoryList = ref([]);
const userList = ref([]);
const loading = ref(true);
const showSearch = ref(true);
const total = ref(0);
const entererId = ref(undefined);
const contractList = ref(undefined);
const reportValue = ref({});
const curUserInfo = ref({});
const { fin_type_code } = proxy.useDict('fin_type_code');
const queryTime = ref([
formatDateStr(new Date(), 'YYYY-MM-DD'),
formatDateStr(new Date(), 'YYYY-MM-DD'),
]);
const contractNo = ref('0000');
const data = reactive({
queryParams: {
form: {},
pageNo: 1,
pageSize: 10,
searchKey: undefined,
purposeLocationId: undefined,
sourceLocationId: undefined,
supplierId: undefined,
approvalTimeSTime: undefined,
approvalTimeETime: undefined,
},
rules: {},
});
const { queryParams } = toRefs(data);
getValue();
function getValue() {
console.log(fin_type_code.value);
loading.value = true;
getClincReport({
contractNo: contractNo.value,
startTime: queryTime.value[0] + ' 00:00:00',
endTime: queryTime.value[1] + ' 23:59:59',
entererId: entererId.value,
}).then((res) => {
loading.value = false;
reportValue.value = res.data;
let list = processObjectWithFinType(reportValue.value);
console.log(list);
});
}
getContract();
function getContract() {
getContractList().then((response) => {
contractList.value = response.data;
});
getAllUser({ pageSize: 100 }).then((res) => {
userList.value = res.data.records.filter((item) => item.userName != 'admin');
});
}
function processObjectWithFinType(obj) {
return Object.keys(obj).map((key) => {
const matchedItem = fin_type_code.value.find((item) => item.value === key);
if (matchedItem) {
return {
label: matchedItem ? matchedItem.label : key,
value: obj[key],
};
}
});
}
/** 打印门诊日结 */
async function print() {
// const selectedRows = proxy.$refs['tableRef'].getSelectionRows();
console.log(reportValue.value, '==reportValue.value==');
const result = {
data: [
{
...reportValue.value, // 将 reportValue.value 中的所有属性展开到 result 中
nickName: userStore.nickName,
orgName: userStore.orgName,
fixmedinsName: '长春大学医院',
createTime: formatDateStr(new Date(), 'YYYY-MM-DD HH:mm:ss'),
scheduler: userStore.nickName,
queryTime: queryTime.value[0] + '~' + queryTime.value[1],
zfAmount: new Decimal(reportValue.value.zhSum || 0).add(reportValue.value.fundSum || 0),
feeAmount: new Decimal(reportValue.value.DIAGNOSTIC_FEE || 0)
.add(reportValue.value.CHECK_FEE || 0)
.add(reportValue.value.DIAGNOSTIC_TEST_FEE || 0)
.add(reportValue.value.MEDICAL_EXPENSE_FEE || 0)
.add(reportValue.value.WEST_MEDICINE || 0)
.add(reportValue.value.CHINESE_MEDICINE_SLICES_FEE || 0)
.add(reportValue.value.CHINESE_MEDICINE_FEE || 0)
.add(reportValue.value.GENERAL_CONSULTATION_FEE || 0)
.add(reportValue.value.REGISTRATION_FEE || 0)
.add(reportValue.value.OTHER_FEE || 0)
.add(reportValue.value.SANITARY_MATERIALS_FEE || 0),
},
],
};
console.log(result, '==result.data==');
const printElements = templateJson;
var hiprintTemplate = new hiprint.PrintTemplate({ template: printElements }); // 定义模板
const printerList = hiprintTemplate.getPrinterList();
console.log(hiprintTemplate, '打印机列表');
hiprintTemplate.print2(result.data[0], {
title: '打印标题',
});
// 将对象转换为 JSON 字符串
// let jsonString = JSON.stringify(result, null, 2);
// console.log(jsonString, 'jsonstring');
// await CefSharp.BindObjectAsync('boundAsync');
// await boundAsync
// .printReport(getPrintFileName(contractNo.value), jsonString)
// .then((response) => {
// //返回结果是jsonString可判断其调用是否成功
// console.log(response, 'response');
// var res = JSON.parse(response);
// if (!res.IsSuccess) {
// proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
// }
// })
// .catch((error) => {
// proxy.$modal.msgError('调用打印插件失败:' + error);
// });
}
function getPrintFileName(value) {
switch (value) {
case '0000':
return '门诊日结单(按登录角色查询)自费.grf';
case '229900': // 省医保
return '门诊日结单(按登录角色查询)省医保.grf';
case '220100': // 市医保
return '门诊日结单(按登录角色查询)市医保.grf';
}
}
function formatValue(value) {
return value == null || value == undefined || value == NaN ? '0.00 元' : value.toFixed(2) + ' 元';
}
</script>
<style scoped>
.custom-tree-node {
display: flex;
align-items: center;
}
.title {
font-weight: bold;
font-size: large;
margin-bottom: 10px;
}
.label {
display: inline-block;
width: 120px !important;
}
.value {
float: right;
}
.el-col {
margin-right: 50px;
}
.divider {
height: 3px;
background-color: #000;
margin: 20px 0;
}
</style>

View File

@@ -0,0 +1,76 @@
import request from '@/utils/request'
/**
* 获取患者列表
*/
export function getList(queryParams) {
return request({
url: '/outpatient-manage/treatment/encounter-list',
method: 'get',
params: queryParams
})
}
/**
* 诊疗列表
*/
export function getDisposalList(encounterId) {
return request({
url: '/outpatient-manage/treatment/treatment-list?encounterId=' + encounterId,
method: 'get',
})
}
/**
* 执行列表
*/
export function getExecuteList(queryParams) {
return request({
url: '/outpatient-manage/treatment/execute-list',
method: 'get',
params: queryParams
})
}
/**
* 初始化
*/
export function init() {
return request({
url: '/outpatient-manage/treatment/init',
method: 'get',
})
}
/**
* 执行
*/
export function execute(data) {
return request({
url: '/outpatient-manage/treatment/perform',
method: 'put',
data: data
})
}
/**
* 取消
*/
export function cancel(data) {
return request({
url: '/outpatient-manage/treatment/cancel-perform',
method: 'put',
data: data
})
}
/**
* 获取执行记录
*/
export function getPerformRecord(params) {
return request({
url: '/outpatient-manage/treatment/perform-record',
method: 'get',
params: params
})
}

View File

@@ -0,0 +1,50 @@
<template>
<el-dialog
title="执行记录"
v-model="props.open"
width="1000px"
append-to-body
destroy-on-close
@close="close"
@open="openDialog"
>
<el-table
:data="recordList"
highlight-current-row
@row-click="handlePatientSelect"
max-height="650"
style="width: 100%"
border
>
<el-table-column prop="occurrenceTime" label="执行时间" align="center" width="150" />
<el-table-column prop="statusEnum_enumText" label="执行状态" align="center" />
<el-table-column prop="orgName" label="执行科室" align="center" width="100" />
<el-table-column prop="practitionerName" label="执行人" align="center" width="100" />
</el-table>
<template #footer>
<div class="dialog-footer">
<el-button @click="close"> </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
const props = defineProps({
open: {
type: Boolean,
default: false,
},
recordList: {
type: [],
},
});
const emit = defineEmits(['close']);
function close() {
emit('close');
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -0,0 +1,541 @@
<template>
<div class="his-container">
<!-- 主体内容区域 -->
<div class="main-content">
<!-- 左侧患者列表区域 -->
<div class="section patient-section">
<div class="section-header">
<div class="section-title">
<i class="el-icon-user"></i>
<h2>患者列表</h2>
</div>
</div>
<div class="search-area">
<el-input v-model="patientSearch" placeholder="搜索患者" clearable class="search-input" />
</div>
<el-table
:data="patientList"
highlight-current-row
@row-click="handlePatientSelect"
max-height="650"
style="width: 100%"
border
>
<el-table-column prop="encounterNo" label="就诊号" align="center" width="150" />
<el-table-column prop="patientName" label="姓名" align="center" />
<el-table-column prop="genderEnum_enumText" label="性别" align="center" width="100" />
<el-table-column prop="age" label="年龄" align="center" width="100" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
layout="total, sizes, prev, pager, next"
@pagination="getPatientList"
/>
</div>
<!-- 右侧区域 -->
<div class="right-section">
<!-- 处置项目区域 -->
<div class="section treatment-section">
<div class="section-header">
<div class="section-title">
<i class="el-icon-first-aid-kit"></i>
<h2>处置项目</h2>
<el-button type="primary" plain @click="printBottleLabel()">打印瓶签</el-button>
<el-button type="primary" plain @click="printPrescription()">打印处方</el-button>
</div>
</div>
<el-table
:data="activityList"
height="calc(100% - 60px)"
style="width: 100%"
border
v-loading="loading"
:span-method="operationSpanMethod"
>
<el-table-column type="selection" align="center" width="50" />
<el-table-column label="序号" align="center" prop="sortNumber" width="60" />
<el-table-column align="center" prop="busNo" label="项目编号" width="150" />
<el-table-column align="center" prop="itemName" label="项目名称" />
<!-- <el-table-column align="center" prop="medicationName" label="药品名称" /> -->
<el-table-column
align="center"
prop="serviceCategory_dictText"
label="项目类型"
width="80"
>
<template #default="scope">
{{
scope.row.medCategory
? scope.row.medCategory_dictText
: scope.row.serviceCategory_dictText
}}
</template>
</el-table-column>
<el-table-column align="center" prop="size" label="规格" width="100" />
<el-table-column align="center" prop="executeNum" label="执行次数" width="90" />
<el-table-column align="center" label="已执行次数" width="90">
<template #default="scope">
{{ scope.row.performCount - scope.row.cancelCount }}
</template>
</el-table-column>
<el-table-column
align="right"
header-align="center"
prop="unitPrice"
label="单价"
width="90"
>
<template #default="scope">
<span>
{{
scope.row.unitPrice ? scope.row.unitPrice.toFixed(2) + ' 元' : '0.00' + ' 元'
}}
</span>
</template>
</el-table-column>
<el-table-column
align="right"
header-align="center"
prop="totalPrice"
label="总价"
width="90"
>
<template #default="scope">
<span>{{
scope.row.totalPrice ? scope.row.totalPrice.toFixed(2) + ' 元' : '0.00' + ' 元'
}}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="serviceStatus_enumText" label="状态" width="100">
<template #default="{ row }">
<el-tag type="primary" size="small">
{{ row.serviceStatus_enumText }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200" fixed="right">
<template #default="{ row }">
<el-button type="text" @click="handleExecute(row)"> 执行 </el-button>
<el-button type="danger" link @click="handleCancel(row)"> 取消 </el-button>
<el-button type="text" @click="getRecord(row)">执行记录</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- 耗材区域 -->
<div class="section material-section">
<div class="section-header">
<div class="section-title">
<i class="el-icon-box"></i>
<h2>耗材使用</h2>
</div>
</div>
<el-table
:data="deviceList"
height="calc(100% - 60px)"
style="width: 100%"
ref="deviceListRef"
v-loading="loading"
border
>
<el-table-column type="selection" align="center" width="50" />
<el-table-column type="index" label="序号" align="center" width="60" />
<el-table-column prop="itemName" align="center" label="耗材名称" />
<el-table-column prop="size" align="center" label="规格" />
<el-table-column prop="quantity" align="center" label="使用数量">
<template #default="scope">
<span>{{ scope.row.quantity + ' ' + scope.row.unitCode_dictText }}</span>
</template>
</el-table-column>
<el-table-column align="right" header-align="center" prop="unitPrice" label="单价">
<template #default="scope">
<span>{{ scope.unitPrice ? scope.unitPrice.toFixed(2) : '0.00' + ' 元' }}</span>
</template>
</el-table-column>
<el-table-column align="right" header-align="center" prop="totalPrice" label="总价">
<template #default="scope">
<span>{{ scope.totalPrice ? scope.totalPrice.toFixed(2) : '0.00' + ' 元' }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="serviceStatus_enumText" label="状态">
<template #default="{ row }">
<el-tag type="primary" size="small">
{{ row.dispenseStatus_enumText }}
</el-tag>
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="80">
<template #default="{ row }">
<el-button type="text" size="small" @click="removeMaterial(row)">移除</el-button>
</template>
</el-table-column> -->
</el-table>
</div>
</div>
</div>
<PerformRecordDialog :open="openDialog" :recordList="recordList" @close="openDialog = false" />
</div>
</template>
<script setup>
import { getCurrentInstance } from 'vue';
import { getList, getDisposalList, execute, cancel, getPerformRecord } from './components/api';
import PerformRecordDialog from './components/performRecordDialog';
// 患者搜索
const patientSearch = ref('');
const queryParams = ref({
pageNo: 1,
pageSize: 10,
});
const total = ref(0);
// 患者数据
const patientList = ref([]);
// 处置项目列表
const activityList = ref([]);
// 耗材列表
const deviceList = ref([]);
// 当前选中的患者
const currentPatient = ref({});
const recordList = ref([]);
const openDialog = ref(false);
const loading = ref(false);
const { proxy } = getCurrentInstance();
// 总费用计算
const totalCost = computed(() => {
if (!currentPatient.value.id) return 0;
const treatmentCost = currentPatient.value.treatments.reduce((sum, item) => sum + item.cost, 0);
const materialCost = currentPatient.value.materials.reduce(
(sum, item) => sum + item.cost * item.quantity,
0
);
return treatmentCost + materialCost;
});
getPatientList();
function getPatientList() {
getList(queryParams.value).then((res) => {
patientList.value = res.data.records;
total.value = res.data.total;
});
}
function handlePatientSelect(row) {
console.log(row, 3456789);
loading.value = true;
getDisposalList(row.encounterId).then((res) => {
deviceList.value = res.data.records.filter((item) => {
return item.requestTable == 'wor_device_request';
});
activityList.value = res.data.records.filter((item) => {
return (
item.requestTable == 'wor_service_request' || item.requestTable == 'med_medication_request'
);
});
loading.value = false;
console.log(activityList.value, 345678);
});
}
function handleExecute(row) {
let data = {
requestId: row.requestId,
dispenseId: row.dispenseId,
requestTable: row.requestTable,
};
let params = activityList.value
.filter((item) => {
return item.groupId == row.groupId;
})
.map((item) => {
return {
requestId: item.requestId,
dispenseId: item.dispenseId,
requestTable: item.requestTable,
};
});
let list = proxy.$refs.deviceListRef.getSelectionRows().map((item) => {
return {
requestId: item.requestId,
dispenseId: item.dispenseId,
requestTable: item.requestTable,
};
});
list.push(data);
execute(params).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess('执行成功');
handlePatientSelect(row);
} else {
proxy.$modal.msgError(res.message);
}
});
}
// 添加操作列的合并方法
function operationSpanMethod({ row, column, rowIndex, columnIndex }) {
// 操作列是最后一列索引为11 (从0开始)
if (columnIndex === 11) {
const groupId = row.groupId;
// 如果没有groupId则不合并
if (groupId === undefined || groupId === null) {
return [1, 1];
}
// 向上查找相同groupId的行如果找到则隐藏当前行
for (let i = rowIndex - 1; i >= 0; i--) {
if (activityList.value[i].groupId === groupId) {
return [0, 0]; // 隐藏被合并的行
} else {
break;
}
}
// 向下统计相同groupId的行数
let spanCount = 1;
for (let i = rowIndex + 1; i < activityList.value.length; i++) {
if (activityList.value[i].groupId === groupId) {
spanCount++;
} else {
break;
}
}
return [spanCount, 1];
}
return [1, 1];
}
// 判断是否为组内的第一行
function isFirstRowInGroup(rowIndex) {
const row = activityList.value[rowIndex];
const groupId = row.groupId;
// 如果没有groupId每行都显示操作按钮
if (groupId === undefined || groupId === null) {
return true;
}
// 检查是否为该groupId的第一行
for (let i = rowIndex - 1; i >= 0; i--) {
if (activityList.value[i].groupId === groupId) {
return false;
} else {
break;
}
}
return true;
}
function handleCancel(row) {
let data = {
requestId: row.requestId,
dispenseId: row.dispenseId,
requestTable: row.requestTable,
};
let params = activityList.value
.filter((item) => {
return item.groupId == row.groupId;
})
.map((item) => {
return {
requestId: item.requestId,
dispenseId: item.dispenseId,
requestTable: item.requestTable,
};
});
cancel(params).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess('操作成功');
handlePatientSelect(row);
} else {
proxy.$modal.msgError(res.message);
}
});
}
function getRecord(row) {
getPerformRecord({ reqId: row.requestId }).then((res) => {
recordList.value = res.data;
openDialog.value = true;
});
}
</script>
<style scoped>
.his-container {
height: 90vh;
display: flex;
flex-direction: column;
background-color: #f0f2f5;
font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', Arial, sans-serif;
padding: 20px;
box-sizing: border-box;
}
.main-content {
display: flex;
flex: 1;
gap: 20px;
overflow: hidden;
height: calc(100% - 70px);
}
.patient-section {
min-width: 400px;
width: 28%;
background: white;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
padding: 20px;
display: flex;
flex-direction: column;
overflow: hidden;
}
.right-section {
flex: 2;
display: flex;
flex-direction: column;
gap: 20px;
min-width: 600px;
}
.current-patient {
background: white;
border-radius: 12px;
padding: 20px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
display: flex;
justify-content: space-between;
align-items: center;
}
.patient-info {
display: flex;
align-items: center;
gap: 15px;
}
.patient-avatar {
background: #e6f7ff;
border-radius: 50%;
padding: 5px;
}
.patient-details {
display: flex;
flex-direction: column;
}
.patient-name {
font-size: 18px;
font-weight: 600;
color: #333;
margin-bottom: 8px;
}
.patient-gender,
.patient-age {
margin-left: 10px;
font-size: 16px;
color: #666;
font-weight: normal;
}
.patient-meta {
display: flex;
gap: 20px;
}
.meta-item {
display: flex;
align-items: center;
color: #666;
font-size: 14px;
}
.meta-item i {
margin-right: 5px;
color: #1890ff;
}
.patient-status {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 10px;
}
.total-cost {
display: flex;
align-items: center;
font-size: 14px;
color: #666;
}
.cost-value {
font-weight: 600;
color: #e53935;
font-size: 20px;
margin-left: 10px;
}
.treatment-section,
.material-section {
background: white;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
padding: 20px 10px 5px 10px;
display: flex;
flex-direction: column;
overflow: hidden;
flex: 1;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.section-title {
display: flex;
align-items: center;
gap: 10px;
}
.section-title h2 {
margin: 0;
font-size: 18px;
color: #333;
font-weight: 600;
}
.section-title i {
font-size: 20px;
color: #1890ff;
}
.search-area {
display: flex;
align-items: center;
gap: 10px;
}
.search-input {
width: 200px;
margin-bottom: 10px;
}
</style>

View File

@@ -0,0 +1,126 @@
import request from '@/utils/request'
// 电子处方管理画面相关接口
/**
* 电子处方查询
*/
export function getVeriPrescriptionInfo(queryParams) {
return request({
url: '/ybelep-request/get-PrescriptionInfo',
method: 'get',
params: queryParams
})
}
/**
* 电子处方详细
*/
export function getPrescriptionDetailInfo(prescriptionNo) {
return request({
url: '/ybelep-request/get-PrescriptionDetailInfo',
method: 'get',
params: { prescriptionNo }
})
}
/**
* 电子处方取药结果查询
*/
export function queryMedPrescription(hiRxno) {
return request({
url: '/ybelep-request/med-query',
method: 'get',
params: {hiRxno}
})
}
/**
* 电子处方查询
*/
export function queryPrescription(hiRxno) {
return request({
url: '/ybelep-request/pre-query',
method: 'get',
params: {hiRxno}
})
}
/**
* 医保电子处方状态更新(上传)
*/
export function uploadPrescriptionStatus(prescriptionNo) {
return request({
url: '/ybelep-request/uploadPrescriptionStatus',
method: 'put',
params: {prescriptionNo}
})
}
/**
* 医保电子处方拒绝上传
*/
export function refusePrescriptionStatus(prescriptionNo) {
return request({
url: '/ybelep-request/refusePrescriptionStatus',
method: 'put',
params: {prescriptionNo}
})
}
/**
* 医保电子处方状态更新(撤销)
*/
export function quashPrescriptionStatus(prescriptionNo,quashReason) {
return request({
url: '/ybelep-request/quashPrescriptionStatus',
method: 'put',
params: {prescriptionNo,quashReason}
})
}
/**
* 电子处方上传预核验
*/
export function preVerification(prescriptionNo,ecToken,authNo,tenantId) {
return request({
url: '/ybelep-request/pre-verification',
method: 'get',
params: {prescriptionNo,ecToken,authNo,tenantId}
})
}
/**
* 电子处方医保电子签名
*/
export function eleSignature(hiRxno,practitionerId,checkDate,tenantId) {
return request({
url: '/ybelep-request/pre-signature',
method: 'get',
params: {hiRxno,practitionerId,checkDate,tenantId}
})
}
/**
* 电子处方上传
*/
export function uploadElePrescription(hiRxno,practitionerId,checkDate,tenantId) {
return request({
url: '/ybelep-request/pre-upload',
method: 'get',
params: {hiRxno,practitionerId,checkDate,tenantId}
})
}
/**
* 电子处方撤销
*/
export function revokePrescription(hiRxno,practitionerId,description,revokeDate,tenantId) {
return request({
url: '/ybelep-request/pre-revoke',
method: 'get',
params: {hiRxno,practitionerId,description,revokeDate,tenantId}
})
}

View File

@@ -0,0 +1,138 @@
<template>
<div class="app-container">
<!-- 添加或修改用户配置对话框 -->
<el-dialog :title="详情" v-model="visible" width="1200px" append-to-body>
<div style="width: 100%">
<el-table max-height="650" :data="ePrescribingDetailList" border>
<el-table-column
label="处方号"
align="center"
prop="prescriptionNo"
sortable
width="100"
/>
<el-table-column label="门诊号" align="center" prop="iptOtpNo" />
<el-table-column label="请求数量" align="center" prop="quantity" />
<el-table-column label="请求单位" align="center" prop="unitCode" />
<el-table-column label="审核状态" align="center" prop="statusEnum_enumText" />
<el-table-column label="药品名" align="center" prop="medicationName" />
<el-table-column label="药品规格" align="center" prop="drugSpecification" />
<el-table-column label="药品剂量" align="center" prop="medDosage" />
<el-table-column label="药品剂量单位" align="center" prop="medDosageUnitCode" />
<el-table-column label="使用频次" align="center" prop="medFrequency_dictText" />
<el-table-column label="途径" align="center" prop="medRoute_dictText" />
<el-table-column label="取药状态" align="center" prop="medStatus" />
<el-table-column label="处方状态" align="center" prop="prescriptionStatus" />
<el-table-column label="处方类别" align="center" prop="rxTypeCode_enumText" />
<el-table-column label="支持用药信息" align="center" prop="supportInfo" />
<el-table-column label="服药时间(开始)" align="center" prop="effectiveDoseStart">
<template #default="scope">
{{ formatDate(scope.row.effectiveDoseStart) }}
</template>
</el-table-column>
<el-table-column label="服药时间(结束)" align="center" prop="effectiveDoseEnd">
<template #default="scope">
{{ formatDate(scope.row.effectiveDoseEnd) }}
</template>
</el-table-column>
<el-table-column label="给药间隔" align="center" prop="dispenseInterval" />
<el-table-column label="单次发药数" align="center" prop="dispensePerQuantity" />
<el-table-column label="每次发药供应天数" align="center" prop="dispensePerDuration" />
<el-table-column label="患者姓名" align="center" prop="patnName" />
<el-table-column label="身份证号" align="center" prop="certno" />
<el-table-column label="开方医生名" align="center" prop="practitionerName" />
<el-table-column label="挂号科室" align="center" prop="mdtrtDeptName" />
<el-table-column label="开单科室" align="center" prop="prscDeptName" />
<el-table-column label="挂号日期" align="center" prop="mdtrtTime">
<template #default="scope">
{{ formatDate(scope.row.mdtrtTime) }}
</template>
</el-table-column>
<el-table-column label="处方开立日期" align="center" prop="prscTime">
<template #default="scope">
{{ formatDate(scope.row.prscTime) }}
</template>
</el-table-column>
<el-table-column label="诊断名" align="center" prop="conditionName" />
</el-table>
<!-- <pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/> -->
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="EPrescribingDetailDialog">
import { formatDate, formatDateStr } from '@/utils/index';
const { proxy } = getCurrentInstance();
const { unit_code, yb_type, fin_type_code, activity_category_code, chrgitm_lv } = proxy.useDict(
'unit_code',
'yb_type',
'fin_type_code',
'activity_category_code',
'chrgitm_lv'
);
const title = ref('');
const visible = ref(false);
const emits = defineEmits(['submit']); // 声明自定义事件
const ePrescribingDetailList = ref(undefined);
const data = reactive({
form: {},
rules: {},
});
const { queryParams, form, rules } = toRefs(data);
const props = defineProps({
ePrescribingDetail: {
type: Object,
required: false,
},
});
// 显示弹框
function show() {
reset();
ePrescribingDetailList.value = props.ePrescribingDetail;
visible.value = true;
}
/** 重置操作表单 */
function reset() {
ePrescribingDetailList.value = [];
}
/** 取消按钮 */
function cancel() {
visible.value = false;
reset();
}
defineExpose({
show,
});
</script>
<style scoped>
.el-form--inline .el-form-item {
display: inline-flex;
vertical-align: middle;
margin-right: 10px !important;
}
/* 使用深度选择器 */
.custom-label-spacing :deep(.el-form-item__label) {
line-height: 1.2; /* 调整行间距 */
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
}
</style>

View File

@@ -0,0 +1,204 @@
<template>
<div class="app-container">
<!-- 添加或修改用户配置对话框 -->
<el-dialog :title="电子处方取药结果" v-model="visible" width="800px" append-to-body>
<div style="width: 100%">
<!-- <div style="margin-bottom: 5px">
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="订单时间">
<el-date-picker
v-model="dateRange"
value-format="YYYY-MM-DD HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 400px"
></el-date-picker>
</el-form-item>
<el-form-item label="关键字" prop="searchKey">
<el-input
v-model="queryParams.searchKey"
placeholder="门诊号/姓名:"
clearable
style="width: 150px"
/>
</el-form-item>
<el-form-item label=" " class="search-button" style="margin-left: 10px">
<el-button type="primary" @click="handleQuery()" :disabled="false"> 查询 </el-button>
</el-form-item>
</el-form>
</div> -->
<el-form
:model="form"
:rules="rules"
ref="medresultInfoRef"
label-width="130px"
label-position="left"
>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="医保处方编号" prop="hiRxno">
<el-input v-model="form.hiRxno" placeholder="" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="医保结算时间" prop="setlTime">
<el-input v-model="form.setlTime" placeholder="" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="医保处方状态编码" prop="rxStasCodg">
<el-input v-model="form.rxStasCodg" placeholder="" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="医保处方状态名称" prop="rxStasName">
<el-input v-model="form.rxStasName" placeholder="" disabled />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="8">
<el-form-item label="处方使用状态编号" prop="rxUsedStasCodg">
<el-input v-model="form.rxUsedStasCodg" placeholder="" disabled />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="处方使用状态名称" prop="rxUsedStasName">
<el-input v-model="form.rxUsedStasName" placeholder="" disabled />
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-table max-height="650" :data="medicinePickupQueryList" border>
<el-table-column
label="医疗目录编码"
align="center"
prop="medListCodg"
width="200"
sortable
/>
<el-table-column label="药品通用名" align="center" prop="drugGenname" width="90" />
<el-table-column label="药品商品名" align="center" prop="drugProdname" width="60" />
<el-table-column label="药品剂型" align="center" prop="drugDosform" />
<el-table-column label="药品规格" align="center" prop="drugSpec" width="130" />
<el-table-column label="数量" align="center" prop="cnt" width="80" />
<el-table-column label="批准文号" align="center" prop="aprvno" />
<el-table-column label="批次号" align="center" prop="bchno" />
<el-table-column label="生产批号" align="center" prop="manuLotnum" />
<el-table-column label="生产厂家" align="center" prop="prdrName" />
<el-table-column label="是否取药" align="center" prop="takeDrugFlag" />
</el-table>
<!-- <pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/> -->
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="MedicinePickupQueryDialog">
// import {
// getDiagnosisTreatmentList,
// editDiagnosisTreatment,
// addDiagnosisTreatment,
// deptTreeSelect,
// locationTreeSelect,
// } from './diagnosistreatment';
import { formatDate, formatDateStr } from '@/utils/index';
const { proxy } = getCurrentInstance();
const { unit_code, yb_type, fin_type_code, activity_category_code, chrgitm_lv } = proxy.useDict(
'unit_code',
'yb_type',
'fin_type_code',
'activity_category_code',
'chrgitm_lv'
);
const visible = ref(false);
const emits = defineEmits(['submit']); // 声明自定义事件
const medicinePickupQueryList = ref(undefined);
const data = reactive({
form: {},
rules: {},
});
const { queryParams, form, rules } = toRefs(data);
const props = defineProps({
medicinePickupQuery: {
type: Object,
required: false,
},
medicinePickupInfo: {
type: Object,
required: false,
},
});
// 显示弹框
function show() {
reset();
medicinePickupQueryList.value =
props.medicinePickupQuery.seltdelts > 0 ? props.medicinePickupQuery.seltdelts : [];
form.value = props.medicinePickupQuery ? props.medicinePickupQuery : {};
visible.value = true;
}
/** 重置操作表单 */
function reset() {
form.value = {
id: undefined,
hiRxno: undefined, // 编码
setlTime: undefined, // 名称
rxStasCodg: undefined, // 地点
rxStasName: undefined, // 执行科室
rxUsedStasCodg: undefined, // 拼音码
rxUsedStasName: undefined, // 五笔码
};
proxy.resetForm('medresultInfoRef');
medicinePickupQueryList.value = [];
}
/** 取消按钮 */
function cancel() {
visible.value = false;
reset();
}
defineExpose({
show,
});
</script>
<style scoped>
.el-form--inline .el-form-item {
display: inline-flex;
vertical-align: middle;
margin-right: 10px !important;
}
/* 使用深度选择器 */
.custom-label-spacing :deep(.el-form-item__label) {
line-height: 1.2; /* 调整行间距 */
margin-bottom: 4px; /* 调整 label 和输入框之间的间距 */
}
</style>

View File

@@ -0,0 +1,361 @@
<template>
<div class="app-container">
<!-- 添加或修改用户配置对话框 -->
<el-dialog :title="电子处方查询结果" v-model="visible" width="1800px" append-to-body>
<div style="width: 100%">
<div class="title">处方信息</div>
<el-table max-height="650" :data="prescriptionInfoList" border>
<el-table-column label="医保处方编号" align="center" prop="hiRxno" width="280" sortable />
<el-table-column label="就诊凭证类型" align="center" prop="mdtrtCertType" width="110" />
<el-table-column label="就诊凭证编号" align="center" prop="mdtrtCertNo" width="150" />
<el-table-column label="卡识别码" align="center" prop="cardSn" />
<el-table-column label="业务类型" align="center" prop="bizTypeCode" width="130" />
<el-table-column label="处方附加属性" align="center" prop="rxExraAttrCode" width="130" />
<el-table-column label="电子凭证令牌" align="center" prop="ecToken" width="130" />
<el-table-column
label="电子凭证线上身份核验流水号"
align="center"
prop="authNo"
width="200"
/>
<el-table-column label="参保地编号" align="center" prop="insuPlcNo" width="100" />
<el-table-column label="就医地编号" align="center" prop="mdtrtareaNo" width="100" />
<el-table-column
label="定点医疗机构处方编号"
align="center"
prop="hospRxno"
width="160"
/>
<el-table-column label="续方的原处方编号" align="center" prop="initRxno" width="160" />
<el-table-column
label="处方类别代码"
align="center"
prop="rxTypeCode"
width="200"
sortable
/>
<el-table-column label="开方时间" align="center" prop="prscTime" width="180">
<template #default="scope">
{{ formatDate(scope.row.prscTime) }}
</template>
</el-table-column>
<el-table-column label="药品类目数" align="center" prop="rxDrugCnt" width="110" />
<el-table-column
label="处方整剂用法编号"
align="center"
prop="rxUsedWayCodg"
width="150"
/>
<el-table-column
label="处方整剂用法名称"
align="center"
prop="rxUsedWayName"
width="130"
/>
<el-table-column label="处方整剂频次编号" align="center" prop="rxFrquCodg" width="130" />
<el-table-column label="处方整剂频次名称" align="center" prop="rxFrquName" width="130" />
<el-table-column label="处方整剂剂量单位" align="center" prop="rxDosunt" width="130" />
<el-table-column label="处方整剂单次剂量数" align="center" prop="rxDoscnt" width="150" />
<el-table-column label="处方整剂医嘱说明" align="center" prop="rxDrordDscr" width="130" />
<el-table-column label="处方有效天数" align="center" prop="valiDays" width="130" />
<el-table-column label="有效截止时间" align="center" prop="valiEndTime" width="180">
<template #default="scope">
{{ formatDate(scope.row.valiEndTime) }}
</template>
</el-table-column>
<el-table-column label="复用" align="center" prop="reptFlag" />
<el-table-column label="最大使用次数" align="center" prop="maxReptCnt" width="110" />
<el-table-column
label="使用最小间隔(天数)"
align="center"
prop="minInvDays"
width="150"
/>
<el-table-column label="续方" align="center" prop="rxCotnFlag" width="80" />
<el-table-column label="长期处方" align="center" prop="longRxFlag" />
</el-table>
<!-- <pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/> -->
</div>
<div style="width: 100%">
<div class="title">处方明细信息</div>
<el-table max-height="650" :data="rxdrugdetailList" border>
<el-table-column
label="医疗目录编码"
align="center"
prop="medListCodg"
width="200"
sortable
/>
<el-table-column
label="定点医药机构目录编号"
align="center"
prop="fixmedinsHilistId"
width="90"
/>
<el-table-column label="医疗机构制剂标志" align="center" prop="hospPrepFlag" width="60" />
<el-table-column label="处方项目分类代码" align="center" prop="rxItemTypeCode" />
<el-table-column
label="处方项目分类名称"
align="center"
prop="rxItemTypeName"
width="130"
/>
<el-table-column label="中药类别代码" align="center" prop="tcmdrugTypeCode" width="80" />
<el-table-column label="中药类别名称" align="center" prop="tcmdrugTypeName" />
<el-table-column label="草药脚注" align="center" prop="tcmherbFoote" />
<el-table-column label="药物类型代码" align="center" prop="mednTypeCode" />
<el-table-column label="药物类型名称" align="center" prop="mednTypeName" />
<el-table-column label="主要用药标志" align="center" prop="mainMedcFlag" />
<el-table-column label="加急标志" align="center" prop="urgtFlag" width="200" sortable />
<el-table-column label="基本药物标志" align="center" prop="basMednFlag" width="90" />
<el-table-column label="是否进口药品" align="center" prop="impDrugFlag" width="60" />
<el-table-column label="是否OTC药品" align="center" prop="otcFlag" />
<el-table-column label="药品通用名" align="center" prop="drugGenname" width="130" />
<el-table-column label="药品剂型" align="center" prop="drugDosform" width="80" />
<el-table-column label="药品规格" align="center" prop="drugSpec" />
<el-table-column label="药品商品名" align="center" prop="drugProdname" />
<el-table-column label="生产厂家" align="center" prop="prdrName" />
<el-table-column label="用药途径代码" align="center" prop="medcWayCodg" />
<el-table-column label="用药途径描述" align="center" prop="medcWayDscr" />
<el-table-column label="用药开始时间" align="center" prop="medcBegntime" width="90">
<template #default="scope">
{{ formatDate(scope.row.medcBegntime) }}
</template>
</el-table-column>
<el-table-column label="用药结束时间" align="center" prop="medcEndtime" width="90">
<template #default="scope">
{{ formatDate(scope.row.medcEndtime) }}
</template>
</el-table-column>
<el-table-column label="用药天数" align="center" prop="medcDays" width="200" sortable />
<el-table-column label="单次剂量单位" align="center" prop="sinDosunt" width="90" />
<el-table-column label="单次用量" align="center" prop="sinDoscnt" width="60" />
<el-table-column label="使用频次编码" align="center" prop="usedFrquCodg" />
<el-table-column label="使用频次名称" align="center" prop="usedFrquName" width="130" />
<el-table-column label="药品总用药量单位" align="center" prop="drugDosunt" width="80" />
<el-table-column label="药品总用药量" align="center" prop="drugCnt" />
<el-table-column label="药品单价" align="center" prop="drugPric" />
<el-table-column label="药品总金额" align="center" prop="drugSumamt" />
<el-table-column label="医院审批标志" align="center" prop="hospApprFlag" />
<el-table-column label="自费原因类型" align="center" prop="selfPayRea" />
<el-table-column
label="自费原因描述"
align="center"
prop="realDscr"
width="200"
sortable
/>
<el-table-column label="扩展数据" align="center" prop="extras" width="90" />
<el-table-column label="院内内部处方号" align="center" prop="prescriptionNo" width="60" />
<el-table-column label="医保处方编号" align="center" prop="hiRxno" />
</el-table>
</div>
<div style="width: 100%">
<div class="title">就诊信息</div>
<el-table max-height="650" :data="mdtrtinfoList" border>
<el-table-column
label="定点医疗机构名称"
align="center"
prop="fixmedinsName"
width="200"
sortable
/>
<el-table-column
label="定点医疗机构编号"
align="center"
prop="fixmedinsCode"
width="90"
/>
<el-table-column label="医保就诊ID" align="center" prop="mdtrtId" width="70" />
<el-table-column label="医疗类别" align="center" prop="medType" />
<el-table-column label="门诊/住院号" align="center" prop="iptOtpNo" width="130" />
<el-table-column label="门诊住院标识" align="center" prop="otpIptFlag" width="80" />
<el-table-column label="医保人员编号" align="center" prop="psnNo" />
<el-table-column label="患者姓名" align="center" prop="patnName" />
<el-table-column label="人员证件类型" align="center" prop="psnCertType" />
<el-table-column label="证件号码" align="center" prop="certno" />
<el-table-column label="年龄" align="center" prop="patnAge" />
<el-table-column
label="患者身高(cm)"
align="center"
prop="patnHgt"
width="200"
sortable
/>
<el-table-column label="患者体重(kg)" align="center" prop="patnWt" width="90" />
<el-table-column label="性别" align="center" prop="gend" width="60" />
<el-table-column label="计划生育手术类别" align="center" prop="birctrlType" />
<el-table-column
label="计划生育手术或生育日期"
align="center"
prop="birctrlMatnDate"
width="130"
/>
<el-table-column label="生育类别" align="center" prop="matnType" width="80" />
<el-table-column label="妊娠(孕周)" align="center" prop="gesoVal" />
<el-table-column label="新生儿标志" align="center" prop="nwbFlag" />
<el-table-column label="新生儿日、月龄" align="center" prop="nwbAge" />
<el-table-column label="哺乳期标志" align="center" prop="suckPrdFlag" />
<el-table-column label="过敏史" align="center" prop="algsHis" />
<el-table-column
label="开方科室名称"
align="center"
prop="prscDeptName"
width="200"
sortable
/>
<el-table-column label="开方科室编号" align="center" prop="prscDeptCode" width="90" />
<el-table-column label="开方医保医师代码" align="center" prop="drCode" width="60" />
<el-table-column label="开方医师姓名" align="center" prop="prscDrName" />
<el-table-column
label="开方医师证件类型"
align="center"
prop="prscDrCertType"
width="130"
/>
<el-table-column label="开方医师证件号码" align="center" prop="prscDrCertno" width="80" />
<el-table-column label="医生职称编码" align="center" prop="drProfttlCodg" />
<el-table-column label="医生职称名称" align="center" prop="drProfttlName" />
<el-table-column label="医生科室编码" align="center" prop="drDeptCode" />
<el-table-column label="医生科室名称" align="center" prop="drDeptName" />
<el-table-column label="科别" align="center" prop="caty" />
<el-table-column label="就诊时间" align="center" prop="mdtrtTime" width="90">
<template #default="scope">
{{ formatDate(scope.row.mdtrtTime) }}
</template>
</el-table-column>
<el-table-column label="病种编码" align="center" prop="diseCodg" width="200" sortable />
<el-table-column label="病种名称" align="center" prop="diseName" width="90" />
<el-table-column label="特殊病种标志" align="center" prop="spDiseFlag" width="60" />
<el-table-column label="主诊断代码" align="center" prop="maindiagCode" />
<el-table-column label="主诊断名称" align="center" prop="maindiagName" width="130" />
<el-table-column label="疾病病情描述" align="center" prop="diseCondDscr" width="80" />
<el-table-column label="医保费用结算类型" align="center" prop="hiFeesetlType" />
<el-table-column label="医保费用类别名称" align="center" prop="hiFeesetlName" />
<el-table-column label="挂号费" align="center" prop="rgstFee" />
<el-table-column label="医疗费总额" align="center" prop="medfeeSumamt" />
<el-table-column label="是否初诊" align="center" prop="fstdiagFlag" />
<el-table-column label="扩展数据" align="center" prop="extras" />
<el-table-column label="院内内部处方号" align="center" prop="prescriptionNo" />
<el-table-column label="医保处方编号" align="center" prop="hiRxno" />
</el-table>
</div>
<div style="width: 100%">
<div class="title">诊断信息</div>
<el-table max-height="650" :data="discinfoList" border>
<el-table-column label="诊断类别" align="center" prop="diagType" width="200" sortable />
<el-table-column label="主诊断标志" align="center" prop="maindiagFlag" width="90" />
<el-table-column label="诊断排序号" align="center" prop="diagSrtNo" width="60" />
<el-table-column label="诊断代码" align="center" prop="diagCode" />
<el-table-column label="诊断名称" align="center" prop="diagName" width="130" />
<el-table-column label="诊断科室名称" align="center" prop="diagDept" width="80" />
<el-table-column label="诊断科室代码" align="center" prop="diagDeptCode" />
<el-table-column label="诊断医生编码" align="center" prop="diagDrNo" />
<el-table-column label="诊断医生姓名" align="center" prop="diagDrName" />
<el-table-column label="诊断时间" align="center" prop="diagTime" width="90">
<template #default="scope">
{{ formatDate(scope.row.diagTime) }}
</template>
</el-table-column>
<el-table-column label="中医病名代码" align="center" prop="tcmDiseCode" />
<el-table-column label="中医病名" align="center" prop="tcmDiseName" />
<el-table-column
label="中医证候代码"
align="center"
prop="tcmsympCode"
width="200"
sortable
/>
<el-table-column label="中医证候" align="center" prop="tcmsymp" width="90" />
<el-table-column label="院内内部处方号" align="center" prop="prescriptionNo" width="60" />
<el-table-column label="医保处方编号" align="center" prop="hiRxno" />
</el-table>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="PrescriptionQueryDialog">
import { formatDate, formatDateStr } from '@/utils/index';
const { proxy } = getCurrentInstance();
const title = ref('');
const visible = ref(false);
const emits = defineEmits(['submit']); // 声明自定义事件
const prescriptionQuery = ref(undefined);
const prescriptionInfoList = ref([]); // 初始化为空数组; // 处方信息
const rxdrugdetailList = ref(undefined); // 处方明细信息
const mdtrtinfoList = ref([]); // 就诊信息
const discinfoList = ref(undefined); // 诊断信息
const data = reactive({
form: {},
rules: {},
});
const { queryParams, form, rules } = toRefs(data);
const props = defineProps({
prescriptionQuery: {
type: Object,
required: false,
},
});
// 显示弹框
function show() {
reset();
prescriptionQuery.value = props.prescriptionQuery;
console.log(prescriptionQuery.value, '处方查询prescriptionQuery.value');
prescriptionInfoList.value.push(prescriptionQuery.value); // 处方信息
rxdrugdetailList.value = prescriptionQuery.value.rxDetlList
? prescriptionQuery.value.rxDetlList
: []; // 处方明细信息
mdtrtinfoList.value.push(prescriptionQuery.value.rxOtpinfo); // 就诊信息
discinfoList.value = prescriptionQuery.value.rxDiseList ? prescriptionQuery.value.rxDiseList : []; // 诊断信息
visible.value = true;
}
/** 重置操作表单 */
function reset() {
prescriptionInfoList.value = []; // 初始化为空数组; // 处方信息
rxdrugdetailList.value = []; // 处方明细信息
mdtrtinfoList.value = []; // 就诊信息
discinfoList.value = []; // 诊断信息
}
/** 取消按钮 */
function cancel() {
visible.value = false;
reset();
}
defineExpose({
show,
});
</script>
<style scoped>
.el-form--inline .el-form-item {
display: inline-flex;
vertical-align: middle;
margin-right: 10px !important;
}
.title {
font-weight: bold;
font-size: large;
margin-bottom: 10px;
}
</style>

View File

@@ -0,0 +1,462 @@
<template>
<div class="app-container">
<div style="width: 100%">
<div style="margin-bottom: 5px">
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="订单时间">
<el-date-picker
v-model="dateRange"
value-format="YYYY-MM-DD HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 400px"
></el-date-picker>
</el-form-item>
<el-form-item label="关键字" prop="searchKey">
<el-input
v-model="queryParams.searchKey"
placeholder="门诊号/姓名:"
clearable
style="width: 150px"
/>
</el-form-item>
<el-form-item label=" " class="search-button" style="margin-left: 10px">
<el-button type="primary" @click="handleQuery()" :disabled="false"> 查询 </el-button>
</el-form-item>
</el-form>
</div>
<!-- <div style="margin-bottom: 5px">
<el-button type="primary" @click="handleSave()" :disabled="false"> 取药查询 </el-button>
<el-button type="primary" plain @click="open()" :disabled="false"> 审核查询 </el-button>
<el-button type="default" @click="combination()" :disabled="false"> 处方查询 </el-button>
<el-button type="danger" @click="split()" :disabled="false"> 处方撤销 </el-button>
</div> -->
<el-table
max-height="650"
ref="eprescriptionRef"
:data="prescriptionList"
border
v-loading="loading"
:element-loading-text="'处理中...'"
>
<el-table-column label="处方号" align="center" prop="prescriptionNo" sortable width="190" />
<el-table-column label="门诊号" align="center" prop="iptOtpNo" width="110" />
<el-table-column label="姓名" align="center" prop="patientName" width="100" />
<el-table-column label="身份证号" align="center" prop="certno" width="180" />
<el-table-column label="取药状态" align="center" prop="medStatus" width="130" />
<el-table-column label="状态" align="center" prop="statusEnum_enumText" width="80" />
<el-table-column label="科室" align="center" prop="prscDeptName" />
<el-table-column label="挂号日期" align="center" prop="mdtrtTime" width="190">
<template #default="scope">
{{ formatDate(scope.row.mdtrtTime) }}
</template>
</el-table-column>
<el-table-column label="处方开立日期" align="center" prop="prscTime" width="190">
<template #default="scope">
{{ formatDate(scope.row.prscTime) }}
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
width="600"
class-name="small-padding fixed-width"
fixed="right"
>
<template #default="scope">
<el-button link type="primary" icon="View" @click="openEPrescribingDetail(scope.row)"
>查看</el-button
>
<el-button
link
type="primary"
icon="Plus"
:disabled="scope.row.statusEnum != '2'"
@click="uploadElePrescriptions(scope.row)"
>处方上传</el-button
>
<el-button
link
type="danger"
icon="CloseBold"
:disabled="scope.row.statusEnum != '2'"
@click="refusePrescription(scope.row)"
>拒绝上传</el-button
>
<el-button
link
type="primary"
icon="Search"
:disabled="scope.row.statusEnum != '3'"
@click="openPrescriptionQuery(scope.row)"
>处方查询</el-button
>
<el-button
link
type="warning"
icon="Switch"
:disabled="scope.row.statusEnum != '3'"
@click="openRevokeDialog(scope.row)"
>处方撤销</el-button
>
<el-button
link
type="primary"
icon="Search"
:disabled="scope.row.statusEnum != '3'"
@click="openMedicinePickupQuery(scope.row)"
>取药查询</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</div>
<prescription-query-dialog
ref="prescriptionQueryRef"
:prescriptionQuery="prescriptionQueryData"
@submit="getList()"
/>
<medicine-pickup-query-dialog
ref="medicinePickupQueryRef"
:medicinePickupQuery="medicinePickupQueryData"
:medicinePickupInfo="medicinePickupInfoData"
@submit="getList()"
/>
<e-prescribing-detail-dialog
ref="ePrescribingDetailRef"
:ePrescribingDetail="eprescriptionDetailData"
@submit="getList()"
/>
<!-- 添加或修改用户配置对话框 -->
<el-dialog :title="处方撤销" v-model="open" width="600px" append-to-body>
<el-form :model="form" :rules="rules" ref="removeRef" label-width="80px">
<el-row :gutter="24">
<el-col :span="16">
<el-form-item label="撤销原因" prop="description">
<el-input
v-model="form.description"
:autosize="{ minRows: 4, maxRows: 10 }"
type="textarea"
placeholder=""
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="revokePrescriptionStatus"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup>
import {
getVeriPrescriptionInfo,
queryMedPrescription,
queryPrescription,
getPrescriptionDetailInfo,
uploadPrescriptionStatus,
refusePrescriptionStatus,
quashPrescriptionStatus,
preVerification,
eleSignature,
uploadElePrescription,
revokePrescription,
} from './components/api';
import medicinePickupQueryDialog from './components/medicinePickupQueryDialog.vue';
import prescriptionQueryDialog from './components/prescriptionQueryDialog.vue';
import ePrescribingDetailDialog from './components/ePrescribingDetailDialog.vue';
import { getCurrentInstance } from 'vue';
import useUserStore from '@/store/modules/user';
import { dayjs, ElMessage } from 'element-plus';
import { formatDate, formatDateStr } from '@/utils/index';
const userStore = useUserStore();
const emit = defineEmits(['selectDiagnosis']);
const open = ref(false);
const total = ref(0);
const queryParams = ref({
pageNo: 1,
pageSize: 10,
searchKey: undefined, // 门诊号/姓名
});
const dateRange = ref([]);
const showSearch = ref(true);
const loading = ref(false);
const prescriptionList = ref([]);
const form = ref({
description: undefined,
});
const prescriptionQueryRef = ref();
const medicinePickupQueryRef = ref();
const eprescriptionRef = ref();
const ePrescribingDetailRef = ref();
// 使用 ref 定义当前电子处方
const prescriptionQueryData = ref({});
// 使用 ref 定义当前查看取药结果
const medicinePickupQueryData = ref({});
// 使用 ref 定义当前查看处方详细
const eprescriptionDetailData = ref({});
// 要撤销的处方信息
const revokePrescriptionData = ref({});
// 撤销原因
const description = ref('');
const { proxy } = getCurrentInstance();
const { method_code, unit_code, rate_code, distribution_category_code } = proxy.useDict(
'method_code',
'unit_code',
'rate_code',
'distribution_category_code'
);
getList();
function getList() {
console.log(queryParams.value, 'queryParams.value电子处方');
getVeriPrescriptionInfo(queryParams.value).then((res) => {
prescriptionList.value = res.data.records;
total.value = res.data.total;
});
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.prscTimeSTime =
dateRange.value && dateRange.value.length == 2 ? dateRange.value[0] : '';
queryParams.value.prscTimeETime =
dateRange.value && dateRange.value.length == 2 ? dateRange.value[1] : '';
getList();
}
/** 电子处方撤销按钮 */
function openRevokeDialog(row) {
form.value.description = '';
open.value = true;
revokePrescriptionData.value = row;
}
/** 电子处方撤销按钮操作 */
function revokePrescriptionStatus() {
open.value = false;
description.value = form.value.description;
const practitionerId = userStore.id;
// 撤销时间
const revokeDate = dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
console.log(revokePrescriptionData.value, 'revokePrescriptionData');
console.log(description.value, '撤销原因');
revokePrescription(
revokePrescriptionData.value.hiRxno,
practitionerId,
description.value,
revokeDate,
revokePrescriptionData.value.tenantId
).then((response) => {
if (response.code == 200) {
quashPrescriptionStatus(revokePrescriptionData.value.prescriptionNo, description.value).then(
(response) => {
if (response.code == 200) {
console.log(response, '电子处方撤销');
proxy.$modal.msgSuccess('电子处方撤销成功');
getList();
} else {
ElMessage.error(response.msg);
}
}
);
} else {
ElMessage.error(response.msg);
}
});
}
/** 打开查看弹窗 */
function openEPrescribingDetail(row) {
console.log(row.prescriptionNo, 'row88888', row);
loading.value = true;
getPrescriptionDetailInfo(row.prescriptionNo).then((response) => {
console.log(response, 'response88888');
eprescriptionDetailData.value = response.data;
nextTick(() => {
proxy.$refs['ePrescribingDetailRef'].show();
loading.value = false;
});
getList();
});
}
/** 打开电子处方查询结果弹窗 */
function openPrescriptionQuery(row) {
queryPrescription(row.hiRxno).then((response) => {
console.log(response, 'response打开电子处方查询结果弹窗');
prescriptionQueryData.value = response.data;
nextTick(() => {
proxy.$refs['prescriptionQueryRef'].show();
});
getList();
});
}
/** 打开取药查询弹窗 */
function openMedicinePickupQuery(row) {
queryMedPrescription(row.hiRxno).then((response) => {
console.log(response, 'responseopenMedicinePickupQuery');
medicinePickupQueryData.value = response.data;
nextTick(() => {
proxy.$refs['medicinePickupQueryRef'].show();
});
getList();
});
}
/** 处方上传 */
function uploadElePrescriptions(row) {
console.log(row, '处方上传');
loading.value = true;
// 电子处方上传预核验
preVerification(row.prescriptionNo, row.ecToken, row.authNo, row.tenantId)
.then((response) => {
console.log(response, '电子处方上传预核验');
let date = new Date();
const preVerificationResult = response.data;
if (response.code == 200) {
const practitionerId = userStore.id;
// 电子处方医保电子签名
eleSignature(
preVerificationResult.hiRxno,
practitionerId,
dayjs(date).format('YYYY-MM-DD HH:mm:ss'),
row.tenantId
).then((response) => {
console.log(response, '电子处方医保电子签名');
if (response.code == 200) {
// 电子处方上传
uploadElePrescription(
preVerificationResult.hiRxno,
practitionerId,
dayjs(date).format('YYYY-MM-DD HH:mm:ss'),
row.tenantId
).then((response) => {
if (response.code == 200) {
console.log(response, '电子处方上传');
// 医保电子处方状态更新(上传)
console.log(row.prescriptionNo, '处方上传prescriptionNo');
uploadPrescriptionStatus(row.prescriptionNo).then((response) => {
if (response.code == 200) {
loading.value = false;
console.log(response, '医保电子处方状态更新(上传)');
proxy.$modal.msgSuccess('处方上传成功');
getList();
} else {
proxy.$modal.msgError(response.msg);
}
});
}
});
}
});
}
// medicinePickupQueryData.value = response.data;
// // nextTick(() => {
// // proxy.$refs['medicinePickupQueryRef'].show();
// // });
// getList();
})
.finally(() => {
loading.value = false;
});
}
/** 医保电子处方拒绝上传 */
function refusePrescription(row) {
refusePrescriptionStatus(row.prescriptionNo).then((response) => {
if (response.code == 200) {
console.log(response, '医保电子处方状态更新(拒绝上传)');
proxy.$modal.msgSuccess('拒绝上传成功');
getList();
} else {
ElMessage.error(response.msg);
}
getList();
});
}
/** 取消按钮 */
function cancel() {
open.value = false;
reset();
}
</script>
<style lang="scss" scoped>
:deep(.el-table__expand-icon) {
display: none !important;
}
.medicine-title {
font-size: 16px;
font-weight: 600;
min-width: 280px;
display: inline-block;
}
.total-amount {
font-size: 16px;
font-weight: 600;
color: #409eff;
white-space: nowrap;
}
.medicine-info {
font-size: 15px;
font-weight: 600;
color: #606266;
white-space: nowrap;
}
.form-group {
display: flex;
align-items: center;
gap: 8px;
background: #fff;
padding: 6px 10px;
border-radius: 4px;
border: 1px solid #ebeef5;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}
/* 调整element组件默认间距 */
// .el-select,
// .el-input-number {
// margin-right: 0 !important;
// }
.el-input-number .el-input__inner {
text-align: center;
}
.el-table__cell .el-form-item--default {
margin-bottom: 0px;
}
</style>

View File

@@ -0,0 +1,18 @@
import request from '@/utils/request'
export function getPrescriptionPageInfo(queryParams) {
return request({
url: '/doctor-station/main/prescription-page-info',
method: 'get',
params: queryParams
})
}
/**
* 获取患者本次就诊处方
*/
export function getPrescriptionDetail(prescriptionNo) {
return request({
url: '/doctor-station/main/prescription-detail-info?prescriptionNo=' + prescriptionNo,
method: 'get',
})
}

View File

@@ -0,0 +1,290 @@
<template>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- v-hasPermi="['system:user:import']" -->
<el-button
type="primary"
plain
icon="Back"
@click="handleBack"
>返回列表</el-button
>
</el-col>
<el-col :span="1.5">
<!-- v-hasPermi="['system:user:import']" -->
<el-button
type="primary"
plain
icon="Search"
@click="handleQuery"
>查询</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
icon="CircleClose"
@click="handleClear"
>重置</el-button
>
</el-col> -->
</el-row>
<el-table
v-loading="loading"
:data="purchaseinventoryList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50" align="center" />
<!-- <el-table-column label="组" align="center" width="60">
<template #default="scope">
<div v-if="groupMarkers[scope.$index] === '┏'"></div>
<div v-if="groupMarkers[scope.$index] === '┗'"></div>
<div v-if="groupMarkers[scope.$index] === '┃'"></div>
</template>
</el-table-column> -->
<el-table-column
label="处方号"
align="center"
key="prescriptionNo"
prop="prescriptionNo"
:show-overflow-tooltip="true"
/>
<el-table-column
label="请求人"
align="center"
key="requesterId_dictText"
prop="requesterId_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="请求时间"
align="center"
key="requestTime"
prop="requestTime"
:show-overflow-tooltip="true"
width="160px"
>
<template #default="scope">
<span>{{ parseTime(scope.row.requestTime) }}</span>
</template>
</el-table-column>
<el-table-column
label="医嘱名称"
align="center"
key="adviceName"
prop="adviceName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="规格"
align="center"
key="volume"
prop="volume"
:show-overflow-tooltip="true"
/>
<el-table-column
label="产品批号"
align="center"
key="lotNumber"
prop="lotNumber"
:show-overflow-tooltip="true"
/>
<el-table-column label="请求数量" align="center" prop="">
<template #default="scope">
<span>
{{ scope.row.quantity ? scope.row.quantity + ' ' + scope.row.unitCode_dictText : '' }}
</span>
</template>
</el-table-column>
<!-- <el-table-column
label="请求单位"
align="center"
key="unitCode_dictText"
prop="unitCode_dictText"
:show-overflow-tooltip="true"
/> -->
<el-table-column label="请求状态" align="center" prop="" width="80">
<template #default="scope">
<el-tag v-if="scope.row.statusEnum == 2" type="success">已签发</el-tag>
<el-tag v-else-if="!scope.row.requestId && scope.row.statusEnum == 1" type="warning"
>待保存</el-tag
>
<el-tag v-else-if="scope.row.statusEnum == 1" type="primary">待签发</el-tag>
</template>
</el-table-column>
<el-table-column
label="用法"
align="center"
key="methodCode_dictText"
prop="methodCode_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column
label="使用频次"
align="center"
key="rateCode_dictText"
prop="rateCode_dictText"
:show-overflow-tooltip="true"
/>
<el-table-column label="单次剂量" align="center" prop="">
<template #default="scope">
<span>
{{ scope.row.dose ? scope.row.dose + ' ' + scope.row.doseUnitCode_dictText : '' }}
</span>
</template>
</el-table-column>
<el-table-column label="总价" align="center" prop="" header-align="center" width="99">
<template #default="scope">
<span style="text-align: center">
{{ scope.row.totalPrice ? Number(scope.row.totalPrice).toFixed(2) + ' 元' : '-' }}
</span>
</template>
</el-table-column>
<el-table-column
label="收费状态"
align="center"
key="chargeStatus_enumText"
prop="chargeStatus_enumText"
:show-overflow-tooltip="true"
/>
<el-table-column label="收费状态" align="center" prop="" width="80">
<template #default="scope">
<el-tag v-if="scope.row.chargeStatus == 2" type="success">{{scope.row.chargeStatus_enumText}}</el-tag>
<el-tag v-else-if="!scope.row.requestId && scope.row.chargeStatus == 1" type="warning"
>{{scope.row.chargeStatus_enumText}}</el-tag>
<el-tag v-else-if="scope.row.statusEnum == 1" type="primary">{{scope.row.chargeStatus_enumText}}</el-tag>
</template>
</el-table-column>
<el-table-column label="发药药房/耗材房/执行科室" align="center" prop="" width="179">
<template #default="scope">
<span v-if="!scope.row.isEdit">
{{ scope.row.positionName }}
</span>
</template>
</el-table-column>
<el-table-column
label="用药天数"
align="center"
key="dispensePerDuration"
prop="dispensePerDuration"
:show-overflow-tooltip="true"
/>
<el-table-column
label="诊断定义名称"
align="center"
key="conditionDefinitionName"
prop="conditionDefinitionName"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script setup name="historicalPrescriptionDetail">
import {
getPrescriptionDetail
} from "./api";
const { proxy } = getCurrentInstance();
const props = defineProps({
typeDetail: {
type: String,
required: false,
},
prescriptionNo:{
type: String,
required: false,
}
});
const prescriptionNo = ref('')
const typeDetail = ref('2')
const purchaseinventoryList = ref([]);
const loading = ref(false);
const occurrenceTime = ref([])
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const supplyTypeOptions = ref(undefined);
const supplyStatusOptions = ref(undefined);
const groupMarkers = ref([]);
const data = reactive({
form: {},
queryParams: {
pageNo: 1,
pageSize: 10,
},
rules: {},
});
watch(
() => props,
(newValue) => {
typeDetail.value = newValue.typeDetail;
getList();
},
{ immdiate: true, deep: true }
);
const emits = defineEmits(['handleBack']);
const { queryParams, form, rules } = toRefs(data);
function handleBack(){
typeDetail.value = '1'
emits("handleBack", typeDetail.value);
}
/** 查询调拨管理项目列表 */
function getList() {
loading.value = true;
// props.prescriptionNo = ""
getPrescriptionDetail(props.prescriptionNo).then((res) => {
loading.value = false;
if(res.data&&res.data.length>0){
purchaseinventoryList.value = res.data
}
});
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNo = 1;
getList();
}
/** 选择条数 */
function handleSelectionChange(selection) {
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
getList()
</script>
<style scoped>
.custom-tree-node {
display: flex;
align-items: center;
}
</style>

View File

@@ -0,0 +1,238 @@
<template>
<div class="app-container">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- v-hasPermi="['system:user:import']" -->
<el-button type="primary" plain icon="Back" @click="handleBack">返回列表</el-button>
</el-col>
<el-col :span="1.5">
<!-- v-hasPermi="['system:user:import']" -->
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
icon="CircleClose"
@click="handleClear"
>重置</el-button
>
</el-col> -->
</el-row>
<div>
<div class="prescription-container">
<div>
<span>处方号</span>
<span>CF0000000001</span>
</div>
<div style="text-align: center">
<h2>长春大学医院</h2>
</div>
<div style="text-align: center">
<h3>处方单</h3>
</div>
<div style="display: flex; justify-content: space-between">
<div>
<span class="item-label">姓名</span>
<span class="item-value">张先生</span>
</div>
<div>
<span class="item-label">年龄</span>
<span class="item-value">20</span>
</div>
<div>
<span class="item-label">性别</span>
<span class="item-value"></span>
</div>
</div>
<div class="divider"></div>
<div style="display: flex; justify-content: space-between">
<div>
<span class="item-label">科室</span>
<span class="item-value">门诊内科</span>
</div>
<div>
<span class="item-label">费用性质</span>
<span class="item-value">自费</span>
</div>
<div>
<span class="item-label">日期</span>
<span class="item-value">2025-01-01</span>
</div>
</div>
<div class="divider"></div>
<div style="display: flex; justify-content: space-between">
<div>
<span class="item-label">门诊号</span>
<span class="item-value">M0000000001</span>
</div>
<div>
<span class="item-label">开单医生</span>
<span class="item-value">徐丹</span>
</div>
</div>
<div class="divider"></div>
<div style="display: flex; justify-content: space-between">
<div>
<span class="item-label">诊断</span>
<span class="item-value">感冒</span>
</div>
</div>
<div class="divider"></div>
<div style="font-size: 16px; font-weight: 700">Rp</div>
<div class="medicen-list">
<div>
<span>1.</span>
<span>罗红霉素分散片</span>
<span>1mg</span>
<span>1</span>
<span>批次号 202500000001</span>
</div>
<div>
<span>用法</span>
<span>口服一次1片一天</span>
</div>
</div>
<div class="divider"></div>
<div style="display: flex; justify-content: space-between">
<div>
<span class="item-label">医师</span>
<span class="item-value">徐丹</span>
</div>
<div>
<span class="item-label">收费</span>
<span class="item-value"></span>
</div>
<div>
<span class="item-label">合计</span>
<span class="item-value">徐丹</span>
</div>
</div>
<div style="display: flex; justify-content: space-between">
<div>
<span class="item-label">调配</span>
<span class="item-value">徐丹</span>
</div>
<div>
<span class="item-label">核对</span>
<span class="item-value"></span>
</div>
<div>
<span class="item-label">发药</span>
<span class="item-value">徐丹</span>
</div>
</div>
</div>
</div>
</div>
</template>
<script setup name="historicalPrescriptionDetail">
import { getPrescriptionDetail } from './api';
const { proxy } = getCurrentInstance();
const props = defineProps({
typeDetail: {
type: String,
required: false,
},
prescriptionNo: {
type: String,
required: false,
},
});
const prescriptionNo = ref('');
const typeDetail = ref('2');
const purchaseinventoryList = ref([]);
const loading = ref(false);
const occurrenceTime = ref([]);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const supplyTypeOptions = ref(undefined);
const supplyStatusOptions = ref(undefined);
const groupMarkers = ref([]);
const data = reactive({
form: {},
queryParams: {
pageNo: 1,
pageSize: 10,
},
rules: {},
});
watch(
() => props,
(newValue) => {
typeDetail.value = newValue.typeDetail;
getList();
},
{ immdiate: true, deep: true }
);
const emits = defineEmits(['handleBack']);
const { queryParams, form, rules } = toRefs(data);
function handleBack() {
typeDetail.value = '1';
emits('handleBack', typeDetail.value);
}
/** 查询调拨管理项目列表 */
function getList() {
loading.value = true;
// props.prescriptionNo = ""
getPrescriptionDetail(props.prescriptionNo).then((res) => {
loading.value = false;
if (res.data && res.data.length > 0) {
purchaseinventoryList.value = res.data;
}
});
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNo = 1;
getList();
}
/** 选择条数 */
function handleSelectionChange(selection) {
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
getList();
</script>
<style scoped>
.prescription-container {
height: 650px;
width: 500px;
border: solid 2px #757575;
font-size: 13px;
padding: 10px;
}
.divider {
height: 2px;
background-color: #757575;
margin: 5px 0 5px 0;
}
.medicen-list {
height: 330px;
}
.item-label {
width: 70px;
text-align: left;
font-weight: 700;
color: #000000;
display: inline-block;
}
.item-value {
color: #393a3b;
font-weight: 500;
width: 80px;
display: inline-block;
}
</style>

View File

@@ -0,0 +1,304 @@
<template>
<div class="app-container" v-loading="loadingcontainer" v-if="typeDetail == '1'">
<el-form
:model="queryParams"
ref="earlyWarningRef"
:inline="true"
:rules="rules"
label-width="200px"
>
<el-form-item label="处方号/病人名称/开方医生:" prop="searchKey">
<el-input
v-model="queryParams.searchKey"
placeholder="可按处方号/病人名称/开方医生查询"
clearable
style="width: 260px"
/>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<!-- v-hasPermi="['system:user:import']" -->
<el-button type="primary" plain icon="Search" @click="handleQuery">查询</el-button>
</el-col>
<el-col :span="1.5">
<!-- v-hasPermi="['system:user:export']" -->
<el-button type="warning" plain icon="CircleClose" @click="handleClear">重置</el-button>
</el-col>
</el-row>
<el-table
v-loading="loading"
:data="purchaseinventoryList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="50" align="center" />
<el-table-column
label="处方号"
align="center"
key="prescriptionNo"
prop="prescriptionNo"
:show-overflow-tooltip="true"
/>
<el-table-column
label="患者"
align="center"
key="patientName"
prop="patientName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="疾病诊断"
align="center"
key="conditionDefinitionName"
prop="conditionDefinitionName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="修改时间"
align="center"
key="requestTime"
prop="requestTime"
:show-overflow-tooltip="true"
>
<template #default="scope">
<span>{{ parseTime(scope.row.requestTime) }}</span>
</template>
</el-table-column>
<el-table-column
label="开方医生"
align="center"
key="practitionerName"
prop="practitionerName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="操作"
align="center"
fixed="right"
class-name="small-padding fixed-width"
>
<template #default="scope">
<el-button link type="primary" icon="View" @click="viewDetails(scope.row)"
>查看</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</div>
<!-- <historicalPrescriptionDetail
v-loading="loadingcontainer"
v-else
@handleBack="handleBack"
:typeDetail="typeDetail"
:prescriptionNo="prescriptionNo"
/> -->
<Prescription v-else />
</template>
<script setup name="historicalPrescription">
import { ref } from 'vue';
import { getPrescriptionPageInfo } from './component/api';
import historicalPrescriptionDetail from './component/details.vue';
import Prescription from './component/prescription.vue';
const { proxy } = getCurrentInstance();
const { item_type } = proxy.useDict('item_type');
const prescriptionNo = ref('');
const typeDetail = ref('1');
const purchaseinventoryList = ref([]);
const loading = ref(false);
const loadingcontainer = ref(false);
const occurrenceTime = ref([]);
const ids = ref([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const supplyTypeOptions = ref(undefined);
const supplyStatusOptions = ref(undefined);
const data = reactive({
form: {},
queryParams: {
pageNo: 1,
pageSize: 10,
searchKey: undefined,
categoryCode: undefined,
remainingMonth: undefined,
expirationDateSTime: undefined,
expirationDateETime: undefined,
},
rules: {},
});
const { queryParams, form, rules } = toRefs(data);
function handleBack(val) {
loadingcontainer.value = true;
typeDetail.value = val;
setTimeout(() => {
loadingcontainer.value = false;
}, 800);
}
function viewDetails(row) {
loadingcontainer.value = true;
prescriptionNo.value = row.prescriptionNo;
console.log(row.prescriptionNo, prescriptionNo.value, '详情');
typeDetail.value = '2';
setTimeout(() => {
loadingcontainer.value = false;
}, 700);
}
/** 查询调拨管理项目列表 */
function getList() {
loading.value = true;
getPrescriptionPageInfo(queryParams.value).then((res) => {
loading.value = false;
// res = {
// "code": 200,
// "msg": "操作成功",
// "data": {
// "records": [
// {
// "prescriptionNo": "PCN00000029",
// "encounterId": "1937393559205539842",
// "patientId": "1937393514477481986",
// "patientName": "龙傲天",
// "conditionDefinitionName": "感冒",
// "requestTime": "2025-06-24 17:05:36",
// "practitionerName": "李辉"
// },
// {
// "prescriptionNo": "PCN00000028",
// "encounterId": "1937393559205539842",
// "patientId": "1937393514477481986",
// "patientName": "龙傲天",
// "conditionDefinitionName": "感冒",
// "requestTime": "2025-06-24 17:02:18",
// "practitionerName": "李辉"
// },
// {
// "prescriptionNo": "PCN00000027",
// "encounterId": "1937393559205539842",
// "patientId": "1937393514477481986",
// "patientName": "龙傲天",
// "conditionDefinitionName": "感冒",
// "requestTime": "2025-06-24 14:25:21",
// "practitionerName": "李辉"
// },
// {
// "prescriptionNo": "PCN00000023",
// "encounterId": "1937393559205539842",
// "patientId": "1937393514477481986",
// "patientName": "龙傲天",
// "conditionDefinitionName": "感冒",
// "requestTime": "2025-06-24 14:14:26",
// "practitionerName": "李辉"
// },
// {
// "prescriptionNo": "PCN00000022",
// "encounterId": "1937113899091587074",
// "patientId": "1937066626118815745",
// "patientName": "就诊卡",
// "conditionDefinitionName": "肾痨",
// "requestTime": "2025-06-24 14:05:18",
// "practitionerName": "李辉"
// },
// {
// "prescriptionNo": "PCN00000004",
// "encounterId": "1935570184300519426",
// "patientId": "1935541163105837058",
// "patientName": "孙嘉琦",
// "conditionDefinitionName": "眼科杂病",
// "requestTime": "2025-06-19 16:24:47",
// "practitionerName": "李辉"
// },
// {
// "prescriptionNo": "PCN00000003",
// "encounterId": "1935570184300519426",
// "patientId": "1935541163105837058",
// "patientName": "孙嘉琦",
// "conditionDefinitionName": "眼科杂病",
// "requestTime": "2025-06-19 16:24:47",
// "practitionerName": "李辉"
// },
// {
// "prescriptionNo": "PCN00000002",
// "encounterId": "1935570184300519426",
// "patientId": "1935541163105837058",
// "patientName": "孙嘉琦",
// "conditionDefinitionName": "眼科杂病",
// "requestTime": "2025-06-19 14:40:05",
// "practitionerName": "李辉"
// }
// ],
// "total": 8,
// "size": 10,
// "current": 1,
// "orders": [],
// "optimizeCountSql": true,
// "searchCount": true,
// "maxLimit": null,
// "countId": null,
// "pages": 1
// }
// }
purchaseinventoryList.value = res.data.records;
total.value = res.data.total;
});
}
/** 搜索按钮操作 */
function handleQuery() {
// proxy.$refs['earlyWarningRef'].validate((valid) => {
// if (valid) {
queryParams.value.expirationDateSTime =
occurrenceTime.value && occurrenceTime.value.length == 2
? occurrenceTime.value[0] + ' 00:00:00'
: '';
queryParams.value.expirationDateETime =
occurrenceTime.value && occurrenceTime.value.length == 2
? occurrenceTime.value[1] + ' 23:59:59'
: '';
queryParams.value.pageNo = 1;
getList();
// }
// })
}
/** 清空条件按钮操作 */
function handleClear() {
// 清空查询条件
queryParams.value.expirationDateSTime = '';
queryParams.value.expirationDateETime = '';
occurrenceTime.value = '';
proxy.resetForm('earlyWarningRef');
getList();
}
/** 选择条数 */
function handleSelectionChange(selection) {
ids.value = selection.map((item) => item.id);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
getList();
</script>
<style scoped>
.custom-tree-node {
display: flex;
align-items: center;
}
</style>

View File

@@ -0,0 +1,20 @@
import request from '@/utils/request'
// 待执行输液记录查询
export function getChargeItemByOrg(data) {
return request({
url: '/payment/bill/charge-summary',
method: 'post',
data: data
})
}
export function getDepartmentList() {
return request({
url: '/app-common/department-list',
method: 'get',
})
}

View File

@@ -0,0 +1,129 @@
<template>
<div class="app-continer">
<div style="margin: 15px 0; padding: 0 20px">
<el-form :model="queryParams" ref="queryRef" :inline="true" label-width="90px">
<el-form-item label="科室" prop="orgIdList">
<el-select
v-model="queryParams.orgIdList"
placeholder="请选择科室"
clearable
multiple
style="width: 480px"
>
<el-option
v-for="item in departmentList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="结算时间:" prop="activeFlag">
<el-date-picker
v-model="occurrenceTime"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 300px; margin-bottom: 10px; margin-left: 20px"
value-format="YYYY-MM-DD"
:clearable="false"
@change="getClinicRecord"
/>
</el-form-item>
<div style="float: right">
<el-button type="primary" plain @click="getClinicRecord">查询</el-button>
<el-button type="warning" plain @click="handleReset">重置</el-button>
</div>
</el-form>
</div>
<el-table :data="clinicRecord" show-summary border>
<!-- <el-table-column label="计算类型" align="center" prop="statusEnum_enumText" /> -->
<el-table-column label="序号" width="80" type="index" align="center">
<template #default="scope">
<span>{{ (queryParams.pageNo - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="科室" align="center" prop="orgName" :show-overflow-tooltip="true"/>
<el-table-column label="人次" align="center" prop="personCnt" :show-overflow-tooltip="true"/>
<el-table-column label="应收金额" align="center" prop="amount" :show-overflow-tooltip="true"/>
<el-table-column label="实收金额" align="center" prop="receivedAmount" width="280" :show-overflow-tooltip="true"/>
<el-table-column label="挂号费" align="center" prop="registrationFee" :show-overflow-tooltip="true"/>
<el-table-column label="处置费" align="center" prop="serviceFee" :show-overflow-tooltip="true"/>
<el-table-column label="药品费" align="center" prop="medFee" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="优惠金额" align="center" prop="entererName" :show-overflow-tooltip="true"/> -->
<!-- <el-table-column label="日结" align="center" prop="outcomeEnum_dictText" :show-overflow-tooltip="true"/> -->
<!-- <el-table-column label="月累计" align="center" prop="printCount" :show-overflow-tooltip="true"/> -->
<el-table-column label="备注" align="center" prop="printCount" :show-overflow-tooltip="true"/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getLists"
/>
</div>
</template>
<script setup name="incomeStatement">
const { proxy } = getCurrentInstance();
import { getChargeItemByOrg, getDepartmentList } from './components/api.js';
import { formatDate } from '@/utils/index';
const occurrenceTime = ref([formatDate(new Date()),formatDate(new Date())]);
const total = ref(0);
const queryParams = ref({
pageNo: 1,
pageSize: 10,
startTime:"",
endTime:"",
searchKey:"",
});
const clinicRecord = ref([]);
const paymentDetailList = ref([])
const departmentList = ref([])
getOrgId()
getClinicRecord();
function getClinicRecord() {
queryParams.value.startTime =
occurrenceTime.value && occurrenceTime.value.length == 2
? occurrenceTime.value[0] + " 00:00:00"
: "";
queryParams.value.endTime =
occurrenceTime.value && occurrenceTime.value.length == 2
? occurrenceTime.value[1] + " 23:59:59"
: "";
queryParams.value.pageNo = 1;
getLists()
}
function getOrgId() {
getDepartmentList().then(res => {
departmentList.value = res.data
})
}
function getLists(){
getChargeItemByOrg(queryParams.value).then((res) => {
total.value = res.data.total;
clinicRecord.value = res.data.clinic;
});
}
/** 清空条件按钮操作 */
function handleReset() {
// 清空查询条件
occurrenceTime.value = ""
queryParams.value.startTime = ""
queryParams.value.endTime = ""
proxy.resetForm("queryRef");
getLists();
}
</script>
<style scoped>
.el-dialog{
height: 90vh!important;
}
.dialog-footer {
text-align: right;
}
.el-textarea__inner {
resize: none;
}
</style>

View File

@@ -0,0 +1,164 @@
<template>
<el-dialog
title="医嘱列表"
v-model="props.open"
width="1300px"
append-to-body
destroy-on-close
@close="close"
@open="openDialog"
>
<div>
<!-- <el-row :gutter="24" class="mb8">
<el-col :span="12">
<el-input
v-model="queryParams.searchKey"
placeholder="诊断名称/拼音码"
clearable
style="width: 100%; margin-bottom: 10px"
@keyup.enter="queryDiagnosisUse"
>
<template #append>
<el-button icon="Search" @click="queryDiagnosisUse" />
</template>
</el-input>
</el-col>
</el-row> -->
<el-table
ref="refundListRef"
:data="props.adviceList"
row-key="paymentId"
row-class-name="parent-row"
v-loading="tableLoading"
border
max-height="600"
>
<el-table-column type="index" align="center"/>
<el-table-column label="医嘱" align="center" prop="adviceName" width="200" />
<el-table-column label="状态" align="center" prop="" width="90">
<template #default="scope">
<el-tag v-if="scope.row.statusEnum == 2" type="success">已签发</el-tag>
<el-tag v-else-if="!scope.row.requestId && scope.row.statusEnum == 1" type="warning">
待保存
</el-tag>
<el-tag v-else-if="scope.row.statusEnum == 1" type="primary">待签发</el-tag>
</template>
</el-table-column>
<el-table-column label="单次剂量" align="center" prop="">
<template #default="scope">
{{ scope.row.dose ? scope.row.dose + ' ' + scope.row.doseUnitCode_dictText : '' }}
</template>
</el-table-column>
<el-table-column label="总量" align="center" prop="">
<template #default="scope">
{{ scope.row.quantity ? scope.row.quantity + ' ' + scope.row.unitCode_dictText : '' }}
</template>
</el-table-column>
<el-table-column label="总金额" align="right" prop="" header-align="center" width="100">
<template #default="scope">
<span style="text-align: right">
{{ scope.row.totalPrice ? Number(scope.row.totalPrice).toFixed(2) + ' 元' : '-' }}
</span>
</template>
</el-table-column>
<el-table-column label="药房/科室" align="center" prop="" width="180">
<template #default="scope">
{{ scope.row.positionName }}
</template>
</el-table-column>
<el-table-column label="频次/用法" align="center" prop="" width="180">
<template #default="scope">
<span style="text-align: right">
{{
scope.row.rateCode_dictText
? scope.row.rateCode_dictText +
' ' +
scope.row.dispensePerDuration +
'天' +
' ' +
scope.row.methodCode_dictText
: ''
}}
</span>
</template>
</el-table-column>
<el-table-column label="注射药品" align="center" prop="" width="80">
<template #default="scope">
{{ scope.row.injectFlag_enumText || '-' }}
</template>
</el-table-column>
<el-table-column label="皮试" align="center" prop="" width="80">
<template #default="scope">
{{ scope.row.skinTestFlag_enumText || '-' }}
</template>
</el-table-column>
<el-table-column label="诊断" align="center" prop="diagnosisName" width="150">
<template #default="scope">
{{ scope.row.diagnosisName || scope.row.conditionDefinitionName }}
</template>
</el-table-column>
</el-table>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="close"> </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
const props = defineProps({
open: {
type: Boolean,
default: false,
},
adviceList: {
type: [],
default: [],
},
});
const emit = defineEmits(['close']);
function close() {
emit('close');
}
</script>
<style lang="scss" scoped>
.sub-table-wrapper {
padding: 16px 55px;
background: #f9fafe;
.nested-sub-table {
border: 1px solid #e8e8f3;
border-radius: 2px;
// :deep(.sub-cell) {
// background: #ffffff !important;
// padding: 12px 16px;
// }
}
}
:deep(.parent-row) {
td {
// background: #e8ece6 !important; /* 浅蓝色背景 */
// border-color: #e4e7ed !important;
height: 48px;
}
}
.footer {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
border-top: 1px solid #ebeef5;
.total {
margin-left: 20px;
color: #f56c6c;
font-weight: 500;
}
}
</style>

View File

@@ -0,0 +1,88 @@
import request from '@/utils/request'
// 待执行输液记录查询
export function listInfusionRecord(encounterId) {
return request({
url: '/outpatient-manage/infusion/infusion-pending-record',
method: 'get',
params: encounterId
})
}
// 病人列表
export function listPatients(query) {
return request({
url: '/outpatient-manage/infusion/infusion-patient-list',
method: 'get',
params: query
})
}
// 批量执行患者门诊输液
export function updateInfusionRecord(data) {
return request({
url: '/outpatient-manage/infusion/infusion-perform',
method: 'put',
data: data
})
}
// 时间更改
export function editPatientInfusionTime(data) {
return request({
url: '/outpatient-manage/infusion/infusion-perform-time',
method: 'put',
params: data
})
}
// 撤销申请
export function cancelPerform(data) {
return request({
url: '/outpatient-manage/infusion/cancel-perform',
method: 'put',
params: { serviceReqId: data.serviceId }
})
}
// 点击患者,查询该患者的输液记录
export function listPatientInfusionRecord(query) {
return request({
url: '/outpatient-manage/infusion/patient-infusion-record',
method: 'get',
params: query
})
}
// 门诊输液执行历史记录查询
export function listPatientInfusionPerformRecord(params) {
return request({
url: '/outpatient-manage/infusion/infusion-perform-record',
method: 'get',
params: params
})
}
// 初始化
export function init() {
return request({
url: '/outpatient-manage/infusion/init',
method: 'get',
})
}
//输液贴打印获取
export function getBottleLabel(params) {
return request({
url: '/report-manage/print/bottle-label-batch-print',
method: 'get',
params: params
})
}
//获取医嘱列表
export function getAdvice(params) {
return request({
url: '/doctor-station/advice/request-base-info',
method: 'get',
params: params
})
}

View File

@@ -0,0 +1,535 @@
<template>
<div class="app-container">
<div class="left">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
<el-form-item label="就诊日期">
<el-date-picker
v-model="dateRange"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: auto"
value-format="YYYY-MM-DD"
@change="handleQuery"
/>
</el-form-item>
<el-form-item label="基础信息" prop="searchKey">
<el-input
v-model="queryParams.searchKey"
placeholder="门诊号/病人/ID"
clearable
style="width: 150px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="执行状态" prop="searchKey">
<el-select
v-model="queryParams.serviceStatus"
placeholder="执行状态"
style="width: 150px"
@change="handleQuery"
>
<el-option
v-for="item in statusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<div style="margin-bottom: 10px">
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</div>
</el-form>
<el-table
:data="patientList"
border
style="width: 100%; height: 73%"
highlight-current-row
@row-click="handleCurrentChange"
>
<el-table-column prop="encounterBusNo" label="就诊号" width="120px" />
<el-table-column prop="patientName" label="姓名" />
<el-table-column prop="genderEnum_enumText" label="性别" />
<el-table-column prop="ageString" label="年龄" />
<el-table-column prop="serviceStatus_enumText" label="执行状态" />
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</div>
<div class="right">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
<el-form-item>
<el-button type="primary" icon="SuccessFilled" @click="handleSubmit">确认执行</el-button>
<!-- <el-button type="primary" plain icon="Printer" @click="resetQuery">打印患者卡</el-button> -->
<el-button type="primary" plain icon="Printer" @click="printLabel">打印瓶签</el-button>
<!-- <el-button type="primary" plain icon="Printer" @click="printbloodLabel"> -->
<!-- 打印采血条码 -->
<!-- </el-button> -->
<!-- <el-button type="primary" plain icon="Printer" @click="resetQuery">打印输液单</el-button> -->
<el-button type="primary" plain @click="geiAdviceList">查看医嘱</el-button>
</el-form-item>
</el-form>
<div>
<p style="margin: 0px 0px 10px 0px">院注医嘱</p>
<el-table
:data="infusionList"
highlight-current-row
border
style="width: 100%; height: 300px"
:row-style="rowStyle"
@selection-change="handleSelectionChange"
@row-click="handleRowClick"
ref="tableRef"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="组" width="50">
<template #default="scope">
<span>{{ markers[scope.$index] }}</span>
</template>
</el-table-column>
<!-- <el-table-column prop="groupId" label="组" width="60" /> -->
<el-table-column prop="busNo" label="编码" align="center" />
<el-table-column prop="serviceName" label="项目" align="center" />
<el-table-column prop="executeNum" label="总执行次数" align="center" />
<el-table-column prop="performCount" label="已执行次数" align="center" />
<el-table-column prop="practitionerName" label="开单医生" align="center" />
<el-table-column prop="medicationName" label="药品信息" align="center" />
<el-table-column prop="dose" label="药品数量" align="center">
<template #default="scope">
<span style="text-align: right">
{{
scope.row.unitCode_dictText
? scope.row.quantity + ' ' + scope.row.unitCode_dictText
: ''
}}
</span>
</template>
</el-table-column>
<!-- <el-table-column prop="speed" label="输液速度" width="80" /> -->
<el-table-column prop="dispenseStatus_enumText" label="药品状态" align="center" />
<el-table-column prop="skinTestFlag_enumText" label="皮试标志" align="center" />
<!-- <el-table-column prop="clinicalStatusEnum_enumText" label="皮试结果" width="70" /> -->
</el-table>
</div>
<div>
<p style="margin: 13px 0px 10px 0px">院注执行历史</p>
<el-table :data="historyRecordsList" border style="width: 100%; height: 300px">
<el-table-column prop="occurrenceEndTime" label="执行时间" align="center" width="260">
<template #default="scope">
<div v-if="scope.row.isEdit" @dblclick="scope.row.isEdit = !scope.row.isEdit">
{{ formatDate(scope.row.occurrenceEndTime) }}
</div>
<el-date-picker
v-else
v-model="scope.row.occurrenceEndTime"
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
style="width: 220px"
@change="(value) => handleOccurrenceTimeChange(value, scope.row)"
/>
</template>
</el-table-column>
<el-table-column prop="performerName" label="执行人" align="center" />
<el-table-column prop="serviceStatus_enumText" label="执行状态" align="center" />
<el-table-column prop="serviceName" label="项目" align="center" />
<el-table-column prop="orgName" label="执行科室" align="center" />
<el-table-column
label="操作"
align="center"
width="90"
fixed="right"
class-name="small-padding fixed-width"
>
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleCancelPerform(scope.row)">
撤销
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</div>
<AdviceListDialog :open="open" :adviceList="adviceList" @close="open = false" />
</div>
</template>
<script setup name="InfusionRecord">
import { ref, computed } from 'vue';
import {
listPatients,
updateInfusionRecord,
listInfusionRecord,
editPatientInfusionTime,
listPatientInfusionPerformRecord,
getBottleLabel,
cancelPerform,
init,
getAdvice,
} from './component/api';
import AdviceListDialog from './component/adviceListDialog.vue';
import { formatDate, formatDateStr } from '@/utils/index';
const showSearch = ref(true);
const total = ref(1);
const selectedItems = ref([]);
const tableRef = ref(null);
const selectedGroupIds = ref(new Set());
const currentRow = ref(null);
const dateRange = ref([
formatDateStr(new Date(), 'YYYY-MM-DD'),
formatDateStr(new Date(), 'YYYY-MM-DD'),
]);
const dateRangeRight = ref([]);
const historyRecordsList = ref([]);
const patientList = ref([]);
const infusionList = ref([]);
const timeRightStart = ref([]);
const timeRightEnd = ref([]);
const statusOptions = ref([]);
const recordRow = ref({}); // 待执行点击行
const encounterId = ref('');
const groupColors = ['#C6E2FF', '#FFFFFF'];
const markers = ref([]);
const adviceList = ref([]);
const open = ref(false);
const { proxy } = getCurrentInstance();
const data = reactive({
form: {},
queryParams: {
pageNo: 1,
pageSize: 10,
searchKey: undefined,
serviceStatus: 10,
},
});
const { queryParams } = toRefs(data);
initOptions();
function initOptions() {
init().then((res) => {
statusOptions.value = res.data.serviceStatusOptions;
});
}
/** 查询门诊输液列表 */
function getList() {
if (dateRange.value) {
queryParams.value.createTimeSTime = dateRange.value[0] + ' 00:00:00';
queryParams.value.createTimeETime = dateRange.value[1] + ' 23:59:59';
} else {
queryParams.value.createTimeSTime = null;
queryParams.value.createTimeETime = null;
}
listPatients(queryParams.value).then((response) => {
total.value = response.data.total;
patientList.value = response.data.records;
});
}
function updateTableRowStyles() {
const tableRows = document.querySelectorAll('.infusion-table-row');
tableRows.forEach((row) => {
const groupId = row.getAttribute('data-group-id');
const color = groupColors[groupId % 2]; // 奇偶性决定颜色
if (color) {
row.style.backgroundColor = color;
}
});
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNo = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
dateRange.value = [];
proxy.resetForm('queryRef');
getList();
}
/** 打印瓶贴 */
async function printLabel() {
const selectedRows = proxy.$refs['tableRef'].getSelectionRows();
if (selectedRows.length === 0) {
proxy.$modal.msgWarning('未选择要打印的医嘱,请重新选择,打印失败');
return;
}
const result = {
data: selectedRows.map((item) => {
// 创建新对象避免修改原数据
return {
...item,
// 当 groupid 为 null 时,用 bus_no 替换
groupId: item.groupId === null ? item.busNo : item.groupId,
name: currentRow.value.patientName,
sex: currentRow.value.genderEnum_enumText,
age: currentRow.value.ageString,
printDate: formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'),
};
}),
};
// 将对象转换为 JSON 字符串
let jsonString = JSON.stringify(result, null, 2);
console.log(jsonString, '瓶贴');
await CefSharp.BindObjectAsync('boundAsync');
await boundAsync
.printReport('输液瓶贴.grf', jsonString)
.then((response) => {
//返回结果是jsonString可判断其调用是否成功
console.log(response, 'response');
var res = JSON.parse(response);
if (!res.IsSuccess) {
proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
}
})
.catch((error) => {
proxy.$modal.msgError('调用打印插件失败:' + error);
});
}
//打印采血条码
async function printbloodLabel() {
const selectedRows = proxy.$refs['tableRef'].getSelectionRows();
if (selectedRows.length === 0) {
proxy.$modal.msgWarning('未选择要打印的检验项目,请重新选择,打印失败');
return;
}
// 构造一个新的对象,添加头 "data"
const result = {
data: selectedRows.map((item) => {
// 创建新对象避免修改原数据
return {
...item,
// 当 groupid 为 null 时,用 bus_no 替换
groupId: item.groupId === null ? item.busNo : item.groupId,
name: currentRow.value.patientName,
sex: currentRow.value.genderEnum_enumText,
age: currentRow.value.ageString,
};
}),
};
// 将对象转换为 JSON 字符串
let jsonString = JSON.stringify(result, null, 2);
console.log(jsonString, 'jsonstring');
await CefSharp.BindObjectAsync('boundAsync');
await boundAsync
.printReport('采血条码.grf', jsonString)
.then((response) => {
//返回结果是jsonString可判断其调用是否成功
console.log(response, 'response');
var res = JSON.parse(response);
if (!res.IsSuccess) {
proxy.$modal.msgError('调用打印插件失败:' + res.ErrorMessage);
}
})
.catch((error) => {
proxy.$modal.msgError('调用打印插件失败:' + error);
});
}
function handleRowClick(row) {
recordRow.value = row;
listPatientInfusionPerformRecord({
serviceReqId: row.serviceId,
}).then((response) => {
historyRecordsList.value =
response.data.records.length > 0
? response.data.records.map((item) => {
return {
...item,
isEdit: true,
};
})
: [];
});
}
function geiAdviceList() {
if (!encounterId.value) {
proxy.$modal.msgWarning('请先选择患者');
return;
}
open.value = true;
getAdvice({ encounterId: encounterId.value }).then((res) => {
adviceList.value = res.data;
});
}
function getRowMarkers(groupCounts, data) {
const markers = new Array(data.length).fill('');
groupCounts.forEach((groupInfo, groupId) => {
const { count, indices } = groupInfo;
if (count === 1) {
// 如果只有一行,不显示标记
return;
} else if (count === 2) {
// 如果有两行,分别显示左右括号
markers[indices[0]] = '┏';
markers[indices[1]] = '┗ ';
} else {
// 如果有两行以上,第一条显示左括号,中间用竖线,最后一条显示右括号
markers[indices[0]] = '┏';
for (let i = 1; i < indices.length - 1; i++) {
markers[indices[i]] = '┃';
}
markers[indices[indices.length - 1]] = '┗ ';
}
});
return markers;
}
// 生成行数
function countGroupRows(data) {
const groupCounts = new Map();
data.forEach((item, index) => {
if (!groupCounts.has(item.groupId)) {
groupCounts.set(item.groupId, { count: 0, indices: [] });
}
const groupInfo = groupCounts.get(item.groupId);
groupInfo.count++;
groupInfo.indices.push(index);
});
return groupCounts;
}
// 执行输液
function handleSubmit() {
console.log(selectedItems.value);
const itemsList = selectedItems.value.map((item) => {
return item.serviceId;
});
// 如果没有有效数据,直接返回
if (itemsList.length === 0) {
proxy.$modal.msgError('没有有效的数据可供提交');
return;
}
// const allExecuted = itemsList.every((item) => item.executeNum === item.doneNum);
// if (allExecuted) {
// // 如果所有药品的 executeNum 和 doneNum 都相等,提示用户
// proxy.$modal.msgError('已执行完总次数');
// return;
// }
updateInfusionRecord(itemsList).then((response) => {
proxy.$modal.msgSuccess('执行成功');
// clearSelections();
});
}
function handleSelectionChange(selection) {
// // 清空之前选中的数据
selectedItems.value = [];
// // 将当前选中的数据存到 selectedItems 中
selection.forEach((item) => {
selectedItems.value.push(item);
});
// // 更新 selectedGroupIds
// selection.forEach((item) => {
// const groupId = item.groupId;
// // 检查 groupId 是否同时存在
// if (selectedGroupIds.value.has(groupId)) {
// // 如果都存在,则移除它们
// selectedGroupIds.value.delete(groupId);
// } else {
// // 否则添加它们
// selectedGroupIds.value.add(groupId);
// }
// });
// // 动态更新表格行的选中状态
// infusionList.value.forEach((row) => {
// const isSelected = selectedGroupIds.value.has(row.groupId);
// tableRef.value.toggleRowSelection(row, isSelected);
// });
}
function clearSelections() {
listInfusionRecord(currentRow.value.patientId).then((response) => {
infusionList.value = response.data;
});
listPatientInfusionPerformRecord(currentRow.value.patientId).then((response) => {
historyRecordsList.value = response.data;
});
}
// function rowStyle({ row }) {
// const colorIndex = row.groupId % 2; // 奇偶性决定颜色索引
// return { backgroundColor: groupColors[colorIndex] };
// }
function handleCurrentChange(row) {
currentRow.value = row; // 更新当前选中行的数据
console.log(row, '123123');
listInfusionRecord({ encounterId: row.encounterId, serviceStatus: row.serviceStatus }).then(
(response) => {
encounterId.value = row.encounterId;
console.log('Full response1:', response);
infusionList.value = response.data.records;
// 为每个 groupId 分配固定颜色
response.data.records.forEach((item) => {
const colorIndex = item.groupId % 2; // 奇偶性决定颜色索引
item.color = groupColors[colorIndex];
});
// 更新表格行的样式
updateTableRowStyles();
// 统计每个 groupId 的行数
const groupCounts = countGroupRows(infusionList.value);
// 设置每行的标记
markers.value = getRowMarkers(groupCounts, infusionList.value);
}
);
historyRecordsList.value = [];
// listPatientInfusionPerformRecord(currentRow.value.patientId).then((response) => {
// historyRecordsList.value = response.data;
// });
}
function handleOccurrenceTimeChange(value, row) {
editPatientInfusionTime({ serviceReqId: row.serviceId, performTime: value }).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess('操作成功');
row.isEdit = true;
}
});
}
function handleCancelPerform(row) {
cancelPerform(row).then((res) => {
if (res.code == 200) {
proxy.$modal.msgSuccess('操作成功');
handleRowClick(recordRow.value);
}
});
}
getList();
</script>
<style scoped>
.app-container {
padding: 20px;
display: flex;
}
.left {
width: 28%;
}
.right {
margin-left: 2%;
width: 70%;
}
:deep(.el-table tbody tr:hover > td) {
background-color: inherit !important;
}
</style>

View File

@@ -0,0 +1,2 @@
<template>
</template>

View File

@@ -0,0 +1,2 @@
<template>
</template>

View File

@@ -0,0 +1,2 @@
<template>
</template>

View File

@@ -0,0 +1,2 @@
<template>
</template>

View File

@@ -0,0 +1,51 @@
import request from '@/utils/request'
/**
* 获取患者列表
*/
export function getList(queryParams) {
return request({
url: '/pharmacy-manage/return-medicine/return-patient-page',
method: 'get',
params: queryParams
})
}
/**
* 获取退药列表
*/
export function getReturnDrugList(params) {
return request({
url: '/pharmacy-manage/return-medicine/medicine-return-list',
method: 'get',
params: params
})
}
/**
* 退药
*/
export function returnDrug(data) {
return request({
url: '/pharmacy-manage/return-medicine/medicine-return',
method: 'put',
data: data
})
}
/**
* 初始化
*/
export function init() {
return request({
url: '/pharmacy-manage/return-medicine/init',
method: 'get',
})
}
//扫码枪返回追溯码筛选
export function itemTraceNo(params) {
return request({
url: '/app-common/item-trace-no?traceNoList=' + params,
method: 'get',
})
}

View File

@@ -0,0 +1,405 @@
<template>
<div class="container">
<!-- 左侧患者列表 -->
<el-card class="patient-list">
<template #header>
<div class="card-header">
<span>患者列表</span>
</div>
</template>
<div style="width: 100%">
<el-input
v-model="queryParams.searchKey"
placeholder="搜索患者"
style="width: 48%; margin-bottom: 10px; margin-right: 15px"
@keyup.enter="getEncounterList"
>
<template #append>
<el-button icon="Search" @click="getEncounterList" />
</template>
</el-input>
<el-select
v-model="queryParams.refundEnum"
style="width: 48%; margin-bottom: 10px"
placeholder="收费状态"
@change="getEncounterList"
>
<el-option
v-for="item in statusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-date-picker
v-model="dateRange"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
style="width: 85%; margin-bottom: 10px"
value-format="YYYY-MM-DD"
/>
<el-button
type="primary"
@click="getEncounterList"
style="margin-bottom: 10px; margin-left: 18px"
>
搜索
</el-button>
</div>
<el-table
:data="encounterList"
border
style="width: 100%"
height="calc(100vh - 300px)"
highlight-current-row
@cell-click="handleGetReturnDrugList"
>
<el-table-column
prop="patientName"
align="center"
label="姓名"
width="130"
show-overflow-tooltip
/>
<el-table-column
prop="genderEnum_enumText"
align="center"
label="性别"
show-overflow-tooltip
/>
<el-table-column align="center" width="140" label="就诊日期" show-overflow-tooltip>
<template #default="scope">
{{
scope.row.receptionTime ? formatDateStr(scope.row.receptionTime, 'YYYY-MM-DD') : '-'
}}
</template>
</el-table-column>
<!-- <el-table-column label="状态" align="center" prop="refundEnum_enumText" /> -->
</el-table>
</el-card>
<!-- 右侧退药列表 -->
<el-card class="refund-list">
<template #header>
<div class="card-header">
<span>退药单</span>
<!-- <div v-if="selectedPatient">
<span class="patient-info">{{ selectedPatient.name }}</span>
<el-tag type="info">{{ selectedPatient.visitNo }}</el-tag>
</div> -->
</div>
</template>
<el-button
type="primary"
:disabled="!selectedMedicines.length"
@click="handleReturnDrug(undefined)"
style="margin-bottom: 10px"
>
确认退药
</el-button>
<el-button type="primary" @click="handleScan()" style="margin-bottom: 10px"> 扫码 </el-button>
<el-table
ref="returnDrugRef"
:data="returDrugList"
style="width: 100%"
height="calc(100vh - 300px)"
border
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
<el-table-column prop="itemName" label="药品名称" show-overflow-tooltip align="center" />
<el-table-column
prop="totalPrice"
label="总价"
width="100"
align="right"
header-align="center"
>
<template #default="scope">
{{ scope.row.totalPrice ? scope.row.totalPrice.toFixed(2) + ' 元' : '-' }}
</template>
</el-table-column>
<el-table-column prop="lotNumber" label="批号" width="180" align="center" />
<el-table-column prop="traceNo" label="追溯码" width="180" align="center">
<template #default="scope">
<el-input v-model="scope.row.traceNo" placeholder="请输入追溯码" />
</template>
</el-table-column>
<el-table-column prop="reqStatus_enumText" label="退药状态" width="100" align="center">
<template #default="scope">
{{
scope.row.reqStatus_enumText == null
? scope.row.refundEnum_enumText
: scope.row.reqStatus_enumText
}}
</template>
</el-table-column>
<el-table-column prop="waitingQuantity" label="退药数量" width="100" align="center">
<template #default="scope">
<span>{{
scope.row.quantity
? Math.abs(scope.row.quantity)
: '0' + ' ' + scope.row.unitCode_dictText
}}</span>
</template>
</el-table-column>
<el-table-column prop="doctorName" label="开单医生" align="center" width="180" />
<el-table-column label="操作" width="100" align="center" fixed="right">
<template #default="scope">
<el-popconfirm
width="150"
hide-after="10"
title="操作确认"
placement="top-start"
@confirm="handleReturnDrug(scope.row)"
>
<template #reference>
<el-button type="primary" link :disabled="scope.row.reqStatus != 11">
退药
</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
<!-- 底部操作栏 -->
<div class="footer">
<div class="statistics">
<span>已选 {{ selectedMedicines.length }} 种药品</span>
<span class="total">合计金额¥ {{ totalAmount.toFixed(2) }}</span>
</div>
</div>
</el-card>
<TraceNoDialog
:ypName="ypName"
:openDialog="openTraceNoDialog"
@submit="submit"
@cancel="openTraceNoDialog = false"
/>
</div>
</template>
<script setup name="ReturnDrug">
import { getCurrentInstance } from 'vue';
import { getList, getReturnDrugList, returnDrug, init, itemTraceNo } from './components/api';
import { formatDateStr } from '@/utils/index';
import { debounce } from 'lodash-es';
import TraceNoDialog from '@/components/OpenHis/TraceNoDialog/index.vue';
const queryParams = ref({
pageSize: 50,
pageNum: 1,
refundEnum: 11,
});
const openTraceNo = ref(false);
const traceNoList = ref([]);
const traceNo = ref('');
const encounterList = ref([]);
const encounterId = ref('');
const returDrugList = ref([]);
const selectedMedicines = ref([]);
const statusOptions = ref([]);
const dateRange = ref([]);
const traceNoTemp = ref('');
const traceNoTempRef = ref();
const totalAmount = ref(0);
const openTraceNoDialog = ref(false);
const ypName = ref('');
const { proxy } = getCurrentInstance();
getEncounterList();
function getEncounterList() {
queryParams.value.receptionTimeSTime = dateRange.value[0] + ' 00:00:00';
queryParams.value.receptionTimeETime = dateRange.value[1] + ' 23:59:59';
getList(queryParams.value).then((res) => {
encounterList.value = res.data.records;
});
}
initOptions();
function initOptions() {
init().then((res) => {
statusOptions.value = res.data.refundStatusOptions;
});
}
function handleGetReturnDrugList(row) {
encounterId.value = row.encounterId;
getReturnDrugList({
encounterId: row.encounterId,
refundStatus: queryParams.value.refundEnum,
}).then((res) => {
returDrugList.value = res.data;
});
}
function handleScan() {
openTraceNoDialog.value = true;
}
function submit(value) {
let list = [];
if (value) {
list = value.split(',');
}
itemTraceNo(list).then((res) => {
if (res.code === 200) {
returDrugList.value.forEach((item, index) => {
if (res.data[item.itemId] && res.data[item.itemId].split(',') > item.quantity) {
proxy.$modal.msgWarning('操作失败');
return;
}
returDrugList.value[index].traceNo = res.data[item.itemId];
});
openTraceNoDialog.value = false;
// proxy.$modal.msgSuccess('退药成功');
// getReturnDrugList(encounterId.value);
}
});
}
const throttledGetList = debounce(handelTraceNo, 500);
let inputValue = '';
function handelTraceNo(value) {
traceNoList.value.push(value);
traceNo.value = traceNo.value + '[' + traceNoList.value.length + ']' + ' ' + value + '\n';
traceNoTemp.value = '';
// let saveValue = value.substring(inputValue.length + 5, value.length);
// inputValue = value;
// console.log(value);
// console.log(saveValue);
// traceNoList.value.push(saveValue);
// traceNo.value = value + '[' + (traceNoList.value.length + 1) + ']' + ' ';
}
function handleClear() {
traceNo.value = '';
traceNoList.value = [];
}
function cancel() {
openTraceNo.value = false;
traceNoList.value = [];
traceNo.value = '';
}
/**
* 退药
*/
function handleReturnDrug(row) {
console.log(row);
let saveList = [];
if (row) {
saveList = [
{
requestId: row.requestId,
dispenseId: row.dispenseId,
tableName: row.serviceTable,
traceNo: row.traceNo,
},
];
} else {
saveList = proxy.$refs.returnDrugRef.getSelectionRows().map((item) => {
return {
requestId: item.requestId,
dispenseId: item.dispenseId,
tableName: item.serviceTable,
traceNo: item.traceNo,
};
});
console.log(saveList);
}
returnDrug(saveList).then((res) => {
if (res.code === 200) {
proxy.$modal.msgSuccess('退药成功');
getEncounterList()
getReturnDrugList({
encounterId: encounterId.value,
refundStatus: queryParams.value.refundEnum,
}).then((res) => {
returDrugList.value = res.data;
});
}
});
}
function handleSelectionChange(selectRows) {
selectedMedicines.value = selectRows;
totalAmount.value = selectRows.reduce((accumulator, currentRow) => {
return accumulator + (currentRow.totalPrice || 0);
}, 0);
}
</script>
<style lang="scss" scoped>
.container {
display: flex;
height: 90vh;
gap: 16px;
padding: 16px;
background: #f0f2f5;
}
.patient-list {
width: 600px;
flex-shrink: 0;
}
.refund-list {
flex: 1;
}
.patient-item {
padding: 12px;
margin-bottom: 8px;
cursor: pointer;
border-radius: 4px;
transition: all 0.3s;
&:hover {
background-color: #f5f7fa;
}
&.active {
background-color: #ecf5ff;
border-left: 4px solid #409eff;
}
}
.patient-info {
display: flex;
justify-content: space-between;
margin-bottom: 8px;
.name {
font-weight: 500;
}
.visit-no {
color: #666;
font-size: 12px;
}
}
.visit-time {
color: #999;
font-size: 12px;
}
.footer {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
border-top: 1px solid #ebeef5;
.total {
margin-left: 20px;
color: #f56c6c;
font-weight: 500;
}
}
::v-deep.el-textarea .el-textarea__inner {
resize: none !important;
}
</style>

View File

@@ -0,0 +1,34 @@
import request from '@/utils/request'
export function listSkinRecord(query) {
return request({
url: '/outpatient-manage/skin-test/outpatient-record-page',
method: 'get',
params: query
})
}
export function lists() {
return request({
url: '/outpatient-manage/skin-test/init',
method: 'get',
})
}
export function updateSkinTestRecord(data) {
return request({
url: '/outpatient-manage/skin-test/outpatient-record-skin-test',
method: 'put',
data: data
})
}
export function updateNurseSign(data) {
return request({
url: '/outpatient-manage/skin-test/outpatient-record-sign-check',
method: 'put',
data: data
})
}

View File

@@ -0,0 +1,507 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
v-show="showSearch"
>
<el-form-item label="ID号" prop="searchKey">
<el-input
v-model="queryParams.searchKey"
placeholder="请输入门诊号/处方号/病人ID"
clearable
style="width: 210px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="处方号" prop="prescriptionNo">
<el-input
v-model="queryParams.prescriptionNo"
placeholder="请输入处方号"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="病人ID" prop="patientBusNo">
<el-input
v-model="queryParams.patientBusNo"
placeholder="请输入病人ID"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item> -->
<el-form-item label="电话" prop="phone">
<el-input
v-model="queryParams.phone"
placeholder="请输入电话"
clearable
style="width: 200px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="查询时间">
<el-date-picker
v-model="dateRange"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item label="皮试项目状态" prop="clinicalStatusEnum">
<el-select
v-model="queryParams.clinicalStatusEnum"
placeholder="请选择状态"
clearable
@keyup.enter="handleQuery"
style="width: 160px"
>
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"
>搜索</el-button
>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table :data="skinRecordList" border style="width: 100%">
<el-table-column prop="prescriptionNo" label="处方号" width="150" />
<el-table-column prop="encounterBusNo" label="门诊号" width="150" />
<el-table-column prop="patientBusNo" label="病人ID" width="150" />
<el-table-column prop="patientName" label="病人" width="120" />
<el-table-column label="发药状态" width="180">
<template #default="scope">
<span
:class="getStatusColor(scope.row.medicationStatusEnum_enumText)"
>
{{ scope.row.medicationStatusEnum_enumText }}
</span>
</template>
</el-table-column>
<el-table-column
prop="medicationInformation"
label="药品信息"
width="150"
/>
<el-table-column prop="medicationDetail" label="药品" width="160" />
<el-table-column
prop="medicationLotNumber"
label="药品批号"
width="160"
/>
<el-table-column
prop="verificationStatusEnum_enumText"
label="皮试状态"
width="80"
/>
<el-table-column
prop="clinicalStatusEnum_enumText"
label="皮试结果"
width="120"
>
<template #default="scope">
<span
:class="getClinicalStatus(scope.row.clinicalStatusEnum_enumText)"
>
{{ scope.row.clinicalStatusEnum_enumText }}
</span>
</template>
</el-table-column>
<el-table-column
prop="performerId_dictText"
label="执行护士"
width="130"
/>
<el-table-column
prop="performerCheckId_dictText"
label="核对护士"
width="130"
/>
<el-table-column
prop="occurrenceStartTime"
key="occurrenceStartTime"
label="开始时间"
width="180"
>
<template #default="scope">
<span>{{ parseTime(scope.row.occurrenceStartTime) }}</span>
</template>
</el-table-column>
<el-table-column
prop="occurrenceEndTime"
key="occurrenceEndTime"
label="结束时间"
width="180"
>
<template #default="scope">
<span>{{ parseTime(scope.row.occurrenceEndTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="doctorId_dictText" label="开单医生" width="180" />
<el-table-column prop="note" label="备注" width="180" />
<el-table-column
label="操作"
align="center"
width="210"
fixed="right"
class-name="small-padding fixed-width"
>
<template #default="scope">
<el-button
link
type="primary"
icon="Edit"
@click="handleUpdate(scope.row)"
:disabled="!!scope.row.performerCheckId_dictText"
>修改</el-button
>
<el-button
link
type="primary"
icon="EditPen"
@click="sign(scope.row)"
:disabled="
!!scope.row.performerCheckId_dictText ||
scope.row.medicationStatusEnum_enumText == '未完成'
"
>签名</el-button
>
<!-- <el-button link type="primary" icon="Finished" @click="submitForm(scope.row)" v-hasPermi="['system:menu:add']">保存</el-button> -->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<el-dialog title="查看" v-model="open" width="900px" append-to-body>
<el-form
ref="skinRecordRef"
:model="form"
:rules="rules"
label-width="100px"
>
<el-row>
<el-col :span="7">
<el-form-item label="处方号" prop="prescriptionNo">
<el-input v-model="form.prescriptionNo" disabled />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="门诊号" prop="encounterBusNo">
<el-input v-model="form.encounterBusNo" disabled />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="病人" prop="patientName">
<el-input v-model="form.patientName" disabled />
</el-form-item>
</el-col> </el-row
><br />
<el-row>
<el-col :span="8">
<el-form-item label="药品信息" prop="medicationInformation">
<el-input
v-model="form.medicationInformation"
clearable
disabled
/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="药品" prop="medicationDetail">
<el-input v-model="form.medicationDetail" disabled />
</el-form-item>
</el-col> </el-row
><br />
<el-row>
<el-col :span="7">
<el-form-item label="药品批号" prop="medicationLotNumber">
<el-input v-model="form.medicationLotNumber" disabled />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="皮试状态" prop="verificationStatusEnum">
<el-select
v-model="form.verificationStatusEnum"
placeholder="请选择皮试状态"
clearable
>
<el-option
v-for="item in statusList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="皮试结果" prop="clinicalStatusEnum">
<el-select
v-model="form.clinicalStatusEnum"
placeholder="请选择皮试结果"
clearable
:disabled="isViewMode"
>
<el-option
v-for="item in skinResultList"
:key="item.value"
:label="item.info"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col> </el-row
><br />
<el-row>
<el-col :span="7">
<el-form-item label="执行护士" prop="performerId_dictText">
<el-input v-model="form.performerId_dictText" disabled />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="核对护士" prop="performerCheckId_dictText">
<el-input v-model="form.performerCheckId_dictText" disabled />
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="开单医生" prop="name">
<el-input v-model="form.name" disabled />
</el-form-item>
</el-col> </el-row
><br />
<el-row>
<el-col :span="8">
<el-form-item label="开始时间" prop="occurrenceStartTime">
<el-date-picker
v-model="form.occurrenceStartTime"
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="开始时间"
:default-time="defaultTime"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="结束时间" prop="occurrenceEndTime">
<el-date-picker
v-model="form.occurrenceEndTime"
type="datetime"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="结束时间"
:default-time="defaultTime"
/>
</el-form-item>
</el-col> </el-row
><br />
<el-row>
<el-col :span="7">
<el-form-item label="发药状态" prop="medicationStatusEnum">
<el-input v-model="form.medicationStatusEnum" disabled />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" prop="note">
<el-input v-model="form.note" clearable />
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="saveForm">确认项目</el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="skinRecord">
import { ref, computed } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import {
listSkinRecord,
updateNurseSign,
updateSkinTestRecord,
lists,
} from "./component/api";
const showSearch = ref(true);
const total = ref(1);
const dateRange = ref([]);
const skinRecordList = ref([]);
const skinResultList = ref([]);
const statusList = ref([]);
const open = ref(false);
const getStatusColor = (clinicalStatusEnum) => {
return clinicalStatusEnum !== "已完成" ? "status-red" : "";
};
const getClinicalStatus = (clinicalStatusEnum) => {
return clinicalStatusEnum === "阳性" ? "status-red" : "";
};
const { proxy } = getCurrentInstance();
const data = reactive({
form: {},
queryParams: {
pageNo: 1,
pageSize: 10,
// encounterBusNo: undefined,
// prescriptionNo: undefined,
// patientBusNo: undefined,
searchKey: undefined,
phone: undefined,
clinicalStatusEnum: undefined,
},
});
const { queryParams, form } = toRefs(data);
/** 表单重置 */
function reset() {
form.value = {
prescriptionNo: 0,
encounterBusNo: undefined,
patientName: undefined,
medicationInformation: undefined,
medicationDetail: undefined,
medicationLotNumber: undefined,
status: undefined,
clinicalStatusEnum: 0,
performerId_dictText: undefined,
performerCheckId_dictText: undefined,
occurrenceStartTime: undefined,
occurrenceEndTime: undefined,
medicationStatusEnum: undefined,
note: undefined,
};
proxy.resetForm("skinRecordRef");
}
/** 查询门诊皮试列表 */
function getList() {
listSkinRecord(queryParams.value).then((response) => {
console.log("12346999999");
skinRecordList.value = response.data.records;
total.value = response.data.total;
});
lists().then((response) => {
console.log("1234", response);
// skinResultList.value = response.data.verificationStatus;
// statusList.value = response.data.clinicalStatus;
//皮试状态
statusList.value = response.data.verificationStatus;
//皮试结果
skinResultList.value = response.data.clinicalStatus;
});
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.recordedDateSTime =
dateRange.value && dateRange.value.length == 2 ? dateRange.value[0] : "";
queryParams.value.recordedDateETime =
dateRange.value && dateRange.value.length == 2 ? dateRange.value[1] : "";
queryParams.value.pageNo = 1;
getList();
}
/** 重置按钮操作 */
function resetQuery() {
dateRange.value = [];
proxy.resetForm("queryRef");
handleQuery();
}
function cancel() {
open.value = false;
reset();
}
function handleUpdate(row) {
if (row.medicationStatusEnum_enumText === "已发药") {
// 如果状态是“已完成”,允许编辑
reset();
open.value = true;
form.value = row;
} else {
// 如果状态不是“已完成”,提示用户
ElMessageBox.alert("请先领药", "提示", {
type: "error",
center: true, // 确保对话框居中
});
}
}
function sign(row) {
console.log("564564", row);
proxy.$modal
.confirm("签字后无法修改信息")
.then(() => {
updateNurseSign(row)
.then((response) => {
proxy.$modal.msgSuccess("签名成功");
open.value = false;
getList();
})
.catch((error) => {
// 处理签名失败的逻辑
proxy.$modal.msgError("签名失败:" + error.message);
});
})
.catch(() => {});
}
function saveForm() {
if (form.value.startTime > form.value.endTime) {
ElMessage({
message: "开始时间不能大于结束时间",
type: "error",
});
} else {
updateSkinTestRecord(form.value).then((response) => {
proxy.$modal.msgSuccess("更新成功");
open.value = false;
getList();
});
open.value = false;
}
}
// function submitForm() {
// proxy.$refs["patientRef"].validate((valid) => {
// if (valid) {
// updateSkinTestRecord(form.value).then((response) => {
// proxy.$modal.msgSuccess("更新成功");
// open.value = false;
// getList();
// });
// }
// });
// }
getList();
</script>
<style scoped>
.status-red {
color: red; /* 设置字体颜色为红色 */
}
</style>

View File

@@ -0,0 +1,2 @@
<template>
</template>

View File

@@ -0,0 +1,2 @@
<template>
</template>

View File

@@ -0,0 +1,2 @@
<template>
</template>