diff --git a/openhis-ui-vue3/src/views/clinicmanagement/infusionrecord/index.vue b/openhis-ui-vue3/src/views/clinicmanagement/infusionrecord/index.vue index 8184ee5e..b6ef881c 100644 --- a/openhis-ui-vue3/src/views/clinicmanagement/infusionrecord/index.vue +++ b/openhis-ui-vue3/src/views/clinicmanagement/infusionrecord/index.vue @@ -64,7 +64,25 @@ :inline="true" v-show="showSearch" > + + + + 搜索 + 重置 确认执行 @@ -219,6 +237,7 @@ import { updateInfusionRecord, listInfusionRecord, editPatientInfusionTime, + listPatientInfusionRecord, listPatientInfusionPerformRecord, } from "./component/api"; @@ -255,6 +274,21 @@ const { queryParams } = toRefs(data); /** 查询门诊输液列表 */ function getList() { + listInfusionRecord(queryParams.value).then((response) => { + console.log("Full response1:", response); + infusionList.value = response.data; + // 为每个 groupId 分配固定颜色 + response.data.forEach((item) => { + const colorIndex = item.groupId % 2; // 奇偶性决定颜色索引 + item.color = groupColors[colorIndex]; + }); + // 更新表格行的样式 + updateTableRowStyles(); + // 统计每个 groupId 的行数 + const groupCounts = countGroupRows(infusionList.value); + // 设置每行的标记 + markers.value = getRowMarkers(groupCounts, infusionList.value); + }); listPatients().then((response) => { patientList.value = response.data.records; }); @@ -283,13 +317,54 @@ function handleQuery() { patientList.value = response.data.records; }); } +/** 右边搜索按钮操作 */ +function handleQueryRight() { + const createTimeSTime = dateRangeRight.value[0]; + const createTimeETime = dateRangeRight.value[1]; + timeRightStart.value = createTimeSTime; + timeRightEnd.value = createTimeETime; + listInfusionRecord(createTimeSTime, createTimeETime).then((response) => { + infusionList.value = response.data; + }); + listPatientInfusionPerformRecord(createTimeSTime, createTimeETime).then((response) => { + historyRecordsList.value = response.data; + } + ); +} /** 重置按钮操作 */ function resetQuery() { dateRange.value = []; proxy.resetForm("queryRef"); getList(); + listPatientInfusionPerformRecord().then((response) => { + historyRecordsList.value = response.data; + }); } +/** 右边重置按钮操作 */ +function resetQueryRight() { + if (historyRecordsList.value.length > 0) { + dateRangeRight.value = []; + listInfusionRecord().then((response) => { + infusionList.value = response.data; + }); + listPatientInfusionPerformRecord().then((response) => { + historyRecordsList.value = response.data; + }); + } else { + // 清空选中状态 + selectedItems.value.clear(); + selectedGroupIds.value.clear(); + dateRangeRight.value = []; + // 取消表格所有行的选中状态 + infusionList.value.forEach((row) => { + tableRef.value.toggleRowSelection(row, false); + }); + listPatientInfusionRecord(currentRow.value).then((response) => { + infusionList.value = response.data; + }); + } +} function getRowMarkers(groupCounts, data) { const markers = new Array(data.length).fill(""); @@ -388,11 +463,19 @@ function handleSelectionChange(selection) { }); } function clearSelections() { - currentRow.value.patientId= Number(currentRow.value.patientId) - listInfusionRecord(currentRow.value.patientId).then((response) => { + dateRangeRight.value = []; + if (!currentRow.value) { + const createTimeSTime = timeRightStart.value || null; + const createTimeETime = timeRightEnd.value || null; + listInfusionRecord(createTimeSTime, createTimeETime).then((response) => { infusionList.value = response.data; }); - listPatientInfusionPerformRecord(currentRow.value.patientId).then((response) => { + } else { + listPatientInfusionRecord(currentRow.value).then((response) => { + infusionList.value = response.data; + }); + } + listPatientInfusionPerformRecord().then((response) => { historyRecordsList.value = response.data; }); } @@ -411,24 +494,15 @@ function handleUpdateTime(row) { function handleCurrentChange(row) { currentRow.value = row; // 更新当前选中行的数据 - currentRow.value.patientId= Number(currentRow.value.patientId) - console.log("当前选中行的数据:", currentRow.value.patientId,typeof currentRow.value.patientId); - listInfusionRecord(currentRow.value.patientId).then((response) => { - console.log("Full response1:", response); + console.log("当前选中行的数据:", currentRow.value); + listPatientInfusionRecord(currentRow.value).then((response) => { infusionList.value = response.data; - // 为每个 groupId 分配固定颜色 - response.data.forEach((item) => { - const colorIndex = item.groupId % 2; // 奇偶性决定颜色索引 - item.color = groupColors[colorIndex]; - }); - // 更新表格行的样式 - updateTableRowStyles(); - // 统计每个 groupId 的行数 + // 统计每个 groupId 的行数 const groupCounts = countGroupRows(infusionList.value); // 设置每行的标记 markers.value = getRowMarkers(groupCounts, infusionList.value); }); - listPatientInfusionPerformRecord(Number(currentRow.value.patientId)).then((response) => { + listPatientInfusionPerformRecord(currentRow.value).then((response) => { historyRecordsList.value = response.data; }); } diff --git a/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/components/api.js b/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/components/api.js index 605267cf..8a3f4367 100644 --- a/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/components/api.js +++ b/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/components/api.js @@ -24,20 +24,24 @@ export function listWesternmedicine(query) { }) } - -export function updateMedicion(data) { +export function updateMedicion(prescriptionNo) { return request({ url: '/pharmacy-manage/western-medicine-dispense/medicine-dispense', method: 'put', - data: data + params: { + prescriptionNo: prescriptionNo + } }) } - export function backMedicion(data) { + export function backMedicion(prescriptionNo,notPerformedReasonEnum) { return request({ url: '/pharmacy-manage/western-medicine-dispense/medicine-cancel', method: 'put', - data: data + params: { + prescriptionNo: prescriptionNo, + notPerformedReasonEnum:notPerformedReasonEnum + } }) } \ No newline at end of file diff --git a/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue b/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue index de0b83a3..3950cb57 100644 --- a/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue +++ b/openhis-ui-vue3/src/views/pharmacymanagement/westernmedicine/index.vue @@ -38,10 +38,8 @@

患者基本信息

- 发药 - 作废 - 打印 + +
@@ -49,25 +47,31 @@ 性别:{{ personInfo.genderEnum_enumText }} 年龄:{{ personInfo.age }} 合同类型:{{ personInfo.categoryEnum_enumText }} - 证件号:{{ personInfo.idCard }}
- 就诊科室:{{ personInfo.organizationName }} + 就诊科室:{{ personInfo.organizationName }} 就诊日期:{{ personInfo.encounterDate }} - 门诊诊断:{{ personInfo.patientName }} + 证件号:{{ personInfo.idCard }} + +
- 总金额:{{ totalPrice ? totalPrice.toFixed(2) : '0.00' }}元 + 总金额:{{ personInfo.totalPrice ? personInfo.totalPrice.toFixed(2) : '0.00' }}元
- + + + - +