diff --git a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue index f9a392a67..6ca2e46ad 100755 --- a/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue +++ b/openhis-ui-vue3/src/views/inpatientNurse/drugDistribution/components/prescriptionList.vue @@ -315,13 +315,25 @@ function selectAllRows() { } item.forEach((row) => { tableRef.toggleRowSelection(row, true); + for (const timeKey in row.checkedRates) { + row.checkedRates[timeKey] = row.rate[timeKey].map((r) => r.rate); + } }); }); } function clearSelection() { prescriptionList.value.forEach((item, index) => { - getTableRef(index)?.clearSelection(); + const tableRef = getTableRef(index); + if (!tableRef) { + return; + } + item.forEach((row) => { + tableRef.clearSelection(); + for (const timeKey in row.checkedRates) { + row.checkedRates[timeKey] = []; + } + }); }); }