Update store-rx-list.vue
This commit is contained in:
parent
d954fd6ac5
commit
e4c8891823
@ -32,12 +32,13 @@
|
||||
<el-common-column prop="medOrgOrderNo" label="处方编号" :min-width="180" />
|
||||
<el-common-column prop="doctorName" label="开方医生" :width="120" />
|
||||
<el-common-column prop="drugTypeText" label="药品类型" :width="100" />
|
||||
<el-table-column fixed="right" label="操作" :width="180">
|
||||
<el-table-column fixed="right" label="操作" :width="220">
|
||||
<template #default="{ row }">
|
||||
<el-text type="primary" class="cursor-pointer" @click="viewDetails(row)">详情</el-text>
|
||||
<el-text v-if="row.status === 'PASS'" type="danger" class="cursor-pointer ml-10px" @click="cancelRx(row)">撤销</el-text>
|
||||
<el-text v-if="row.status !== 'CANCELLED'" type="primary" class="cursor-pointer ml-10px" @click="printRx(row)">打印</el-text>
|
||||
<!-- <template v-if="row.feeType === 'ZF'"> -->
|
||||
<el-text type="primary" class="cursor-pointer ml-10px" @click="printRx(row)">打印</el-text>
|
||||
<el-text v-if="row.printCount > 0" type="info" class="ml-5px">(已打印)</el-text>
|
||||
<el-text v-if="row.printCount > 0 && row.status !== 'CANCELLED'" type="info" class="ml-5px">(已打印)</el-text>
|
||||
<!-- </template> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -78,7 +79,7 @@
|
||||
|
||||
<script setup>
|
||||
import { computed, nextTick, onMounted, ref } from "vue";
|
||||
import { ElMessage } from "element-plus";
|
||||
import { ElMessage, ElMessageBox } from "element-plus";
|
||||
import dayjs from "dayjs";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { memberStore } from "@/store/member";
|
||||
@ -311,6 +312,30 @@ async function printRx(row) {
|
||||
paperDrawerRef.value && paperDrawerRef.value.print();
|
||||
}
|
||||
|
||||
async function cancelRx(row) {
|
||||
try {
|
||||
await ElMessageBox.confirm("撤销后处方将无法打印,确认撤销该处方吗?", "撤销处方", {
|
||||
confirmButtonText: "确认撤销",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
});
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
|
||||
const { success, message } = await useHlw({
|
||||
type: "cancelStoreDiagnosisRecord",
|
||||
id: String(row._id),
|
||||
storeIds: storeIds.value,
|
||||
});
|
||||
if (!success) {
|
||||
ElMessage.error(message || "处方撤销失败");
|
||||
return;
|
||||
}
|
||||
ElMessage.success(message || "处方撤销成功");
|
||||
getList();
|
||||
}
|
||||
|
||||
async function handlePrinted() {
|
||||
const row = printingRow.value;
|
||||
if (!row) return;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user