|
@@ -0,0 +1,450 @@
|
|
|
+<template>
|
|
|
+ <el-container>
|
|
|
+ <el-aside width="210px">
|
|
|
+ <PatientBaseList
|
|
|
+ :yzType="yzType"
|
|
|
+ @selectPatientInfo="selectPatientInfo"
|
|
|
+ ></PatientBaseList>
|
|
|
+ </el-aside>
|
|
|
+ <el-container>
|
|
|
+ <el-header style="height: 150px">
|
|
|
+ <PatientInfo :patientInfo="patientInfo"></PatientInfo>
|
|
|
+ </el-header>
|
|
|
+ <div>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-button icon="Search" type="primary" @click="queryInfo"
|
|
|
+ >查询</el-button
|
|
|
+ >
|
|
|
+ <el-button icon="Printer" type="success" @click="batchUpdateVisible = true;"
|
|
|
+ >批量更新</el-button
|
|
|
+ >
|
|
|
+<!-- <el-button icon="Printer" type="success" @click="printClick"
|
|
|
+ >打印</el-button
|
|
|
+ >-->
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-radio-group
|
|
|
+ @change="initPageNumList"
|
|
|
+ v-model="yzOrderParam.printType"
|
|
|
+ >
|
|
|
+ <el-radio :label="1">打印新增</el-radio>
|
|
|
+ <el-radio :label="2">打印单页</el-radio>
|
|
|
+ <el-radio :label="3">打印某页后</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ 医嘱页号:
|
|
|
+ <el-select
|
|
|
+ v-model="yzOrderParam.pageNum"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 60px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in pageNumList"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <el-button type="primary" @click="clearPrintPageClick"
|
|
|
+ >清空打印页号</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <el-main>
|
|
|
+ <el-scrollbar height="100%">
|
|
|
+ <div id="cqYz">
|
|
|
+ <el-table :data="yzPrintVOList" border style="width: 100%" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" :selectable="isSelectable" width="30"/>
|
|
|
+ <el-table-column prop="actOrderNo" label="医嘱号" width="80" />
|
|
|
+ <el-table-column prop="date" label="日期" width="80" />
|
|
|
+ <el-table-column prop="time" label="时间" width="80" />
|
|
|
+ <el-table-column prop="newOrderName" label="临时医嘱" width="360"/>
|
|
|
+ <el-table-column prop="doctorName" label="医师签名" width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-select v-if="scope.row.actOrderNo != null" v-model="scope.row.doctorCode" filterable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in users"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="nurseName" label="核对护士签名" width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-select v-if="scope.row.actOrderNo != null" v-model="scope.row.nurseCode" filterable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in users"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="execTime" label="执行时间" width="160">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-input v-if="scope.row.actOrderNo != null"
|
|
|
+ v-model="scope.row.execTime" autocomplete="off" placeholder="格式:yyyy-MM-dd HH:mm:ss"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="execName" label="执行护士签名" width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-select v-if="scope.row.actOrderNo != null" v-model="scope.row.execId" filterable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in users"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column fixed="right" label="操作" min-width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.actOrderNo != null"
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click.prevent="saveItem(scope.row)"
|
|
|
+ >
|
|
|
+ 保存
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </el-scrollbar>
|
|
|
+ </el-main>
|
|
|
+ </el-container>
|
|
|
+ </el-container>
|
|
|
+ <el-dialog v-model="batchUpdateVisible" title="更新" width="500">
|
|
|
+ <el-form :model="form">
|
|
|
+ <el-form-item label="医师" label-width="140px">
|
|
|
+ <el-select v-model="form.doctorCode" filterable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in users"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="核对护士" label-width="140px">
|
|
|
+ <el-select v-model="form.nurseCode" filterable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in users"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="执行时间" label-width="140px">
|
|
|
+ <el-input v-model="form.execTime" autocomplete="off" placeholder="格式:yyyy-MM-dd HH:mm:ss"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="执行护士" label-width="140px">
|
|
|
+ <el-select v-model="form.execId" filterable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in users"
|
|
|
+ :key="item.code"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.code"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <template #footer>
|
|
|
+ <div class="dialog-footer">
|
|
|
+ <el-button @click="batchUpdateVisible = false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="batchUpdate">
|
|
|
+ 保存
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup name="lsYzPrint">
|
|
|
+import PatientInfo from "@/components/medical-advice/PatientInfo.vue";
|
|
|
+import PatientBaseList from "@/components/medical-advice/PatientBaseList.vue";
|
|
|
+import {
|
|
|
+ lsYzPrint,
|
|
|
+ getTotalPageNUm,
|
|
|
+ recPrint,
|
|
|
+ clearPrintPageNo,
|
|
|
+ updateActOrder
|
|
|
+} from "@/api/medical-advice/medical-advice-management";
|
|
|
+import { getLodop, initLodop } from "@/utils/c-lodop";
|
|
|
+import { onMounted, ref } from "vue";
|
|
|
+import { stringNotBlank } from "@/utils/blank-utils";
|
|
|
+import { ElMessage } from "element-plus";
|
|
|
+import env from "../../../utils/setting";
|
|
|
+import { getEmployeeMiList } from "@/api/lc/sterile.js";
|
|
|
+// 基本信息
|
|
|
+const patientInfo = ref({});
|
|
|
+const yzType = ref("cq");
|
|
|
+const yzPrintVOList = ref([]);
|
|
|
+const companyFunc = (val, company) => {
|
|
|
+ if (stringNotBlank(val)) {
|
|
|
+ return val + company;
|
|
|
+ } else {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+};
|
|
|
+const multipleSelection = ref([]);
|
|
|
+const handleSelectionChange = (val) => {
|
|
|
+ multipleSelection.value = val;
|
|
|
+}
|
|
|
+
|
|
|
+const batchUpdateVisible = ref(false);
|
|
|
+
|
|
|
+const isSelectable = (row) => {
|
|
|
+ return row.actOrderNo !== null;
|
|
|
+}
|
|
|
+
|
|
|
+const yzOrderParam = ref({
|
|
|
+ patNo: "",
|
|
|
+ times: null,
|
|
|
+ inOutStatusFlag: "",
|
|
|
+ type: 2,
|
|
|
+ printType: 1,
|
|
|
+ pageNum: "",
|
|
|
+});
|
|
|
+
|
|
|
+const pageNumList = ref([]);
|
|
|
+
|
|
|
+const form = reactive({
|
|
|
+ doctorCode: "",
|
|
|
+ nurseCode: "",
|
|
|
+ execTime:"",
|
|
|
+ execId:""
|
|
|
+});
|
|
|
+
|
|
|
+// 批量修改
|
|
|
+const batchUpdate = () => {
|
|
|
+ if(multipleSelection.value.length > 0) {
|
|
|
+ multipleSelection.value.forEach(item => {
|
|
|
+ if(form.doctorCode) {
|
|
|
+ item.doctorCode = form.doctorCode;
|
|
|
+ }
|
|
|
+ if(form.nurseCode) {
|
|
|
+ item.nurseCode = form.nurseCode;
|
|
|
+ }
|
|
|
+ if(form.execTime) {
|
|
|
+ item.execTime = form.execTime;
|
|
|
+ }
|
|
|
+ if(form.execId) {
|
|
|
+ item.execId = form.execId;
|
|
|
+ }
|
|
|
+ saveItem(item);
|
|
|
+ batchUpdateVisible.value = false;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ type: "error",
|
|
|
+ duration: 2000,
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: "未选中要修改的栏目",
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 修改单个
|
|
|
+const saveItem = (row) => {
|
|
|
+ console.log('row', row);
|
|
|
+ let param = {
|
|
|
+ physician: row.doctorCode,
|
|
|
+ executer1: row.nurseCode,
|
|
|
+ execId: row.execId,
|
|
|
+ execTimeStr: row.execTime,
|
|
|
+ actOrderNoStr: row.actOrderNo
|
|
|
+ }
|
|
|
+ updateActOrder(param).then(res => {
|
|
|
+ ElMessage({
|
|
|
+ type: "success",
|
|
|
+ duration: 1000,
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: "修改成功",
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+const users = ref([]);
|
|
|
+
|
|
|
+const getUserList = () => {
|
|
|
+ getEmployeeMiList().then(res => {
|
|
|
+ users.value = res;
|
|
|
+ }).catch(err => {
|
|
|
+
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+//
|
|
|
+const initPageNumList = () => {
|
|
|
+ yzOrderParam.value.pageNum = "";
|
|
|
+ yzPrintVOList.value = [];
|
|
|
+ if (yzOrderParam.value.printType === 1) {
|
|
|
+ pageNumList.value = [];
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ getTotalPageNUm(yzOrderParam.value).then(res => {
|
|
|
+ if (res.total) {
|
|
|
+ pageNumList.value = [];
|
|
|
+ for (let i = 0; i < res.total; i++) {
|
|
|
+ let param = { code: i + 1 + "", name: i + 1 + "" };
|
|
|
+ pageNumList.value.push(param);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ pageNumList.value = [];
|
|
|
+ }
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const yzPrintCss = `
|
|
|
+#pageTable tr td, #pageTable tr th {
|
|
|
+border: 1px solid black;
|
|
|
+text-align: center;
|
|
|
+font-size: 12px;
|
|
|
+padding: 0 0;
|
|
|
+
|
|
|
+}
|
|
|
+#pageTable tr td{
|
|
|
+height: 27px;
|
|
|
+}
|
|
|
+
|
|
|
+#pageTable {
|
|
|
+border-collapse: collapse;
|
|
|
+}
|
|
|
+
|
|
|
+`;
|
|
|
+//清空
|
|
|
+const clearPrintPageClick = () => {
|
|
|
+ clearPrintPageNo(yzOrderParam.value).then(res => {
|
|
|
+ yzPrintVOList.value = [];
|
|
|
+ pageNumList.value = [];
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const selectPatientInfo = val => {
|
|
|
+ if (!stringNotBlank(val.patientInfo.inpatientNo)) {
|
|
|
+ return ElMessage.error("请选中一个病人");
|
|
|
+ }
|
|
|
+ yzOrderParam.value.patNo = val.patientInfo.inpatientNo;
|
|
|
+ yzOrderParam.value.times = val.patientInfo.admissTimes;
|
|
|
+ yzOrderParam.value.inOutStatusFlag = val.inOutStatusFlag;
|
|
|
+ clearInfo();
|
|
|
+};
|
|
|
+
|
|
|
+const queryInfo = () => {
|
|
|
+ lsYzPrint(yzOrderParam.value).then(res => {
|
|
|
+ patientInfo.value = res.patientInfo;
|
|
|
+ yzPrintVOList.value = res.yzPrintVOList;
|
|
|
+ // 遍历数组处理每个对象
|
|
|
+ yzPrintVOList.value.forEach(item => {
|
|
|
+ if(item.actOrderNo) {
|
|
|
+ item.newOrderName = `${item.orderGroupNo} ${item.newOrderName} ${item.newOrderNameCode} ${item.frequCode}`;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+};
|
|
|
+
|
|
|
+const clearInfo = () => {
|
|
|
+ yzPrintVOList.value = [];
|
|
|
+ yzOrderParam.value.pageNum = "";
|
|
|
+ yzOrderParam.value.printType = 1;
|
|
|
+ pageNumList.value = [];
|
|
|
+};
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ initLodop();
|
|
|
+ getUserList();
|
|
|
+});
|
|
|
+const daYingClick = () => {
|
|
|
+ let LODOP = getLodop();
|
|
|
+ LODOP.PRINT_INIT("长期医嘱单"); // 初始化打印机 名字
|
|
|
+ LODOP.SET_PRINT_PAGESIZE(1, "210mm", "297mm", ""); // 设置纸张大小 A4
|
|
|
+ LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true); // 整宽不变形
|
|
|
+ LODOP.ADD_PRINT_TABLE(
|
|
|
+ "2mm",
|
|
|
+ "5mm",
|
|
|
+ "205mm",
|
|
|
+ "220mm",
|
|
|
+ "<style>" +
|
|
|
+ yzPrintCss +
|
|
|
+ "</style>" +
|
|
|
+ "<body>" +
|
|
|
+ document.getElementById("cqYz").innerHTML +
|
|
|
+ "</body>"
|
|
|
+ ); //要打印的内容
|
|
|
+ LODOP.PREVIEW(); // 关闭
|
|
|
+};
|
|
|
+
|
|
|
+const printClick = () => {
|
|
|
+ if (yzPrintVOList.value.length <= 0) {
|
|
|
+ return ElMessage.error("没有打印数据");
|
|
|
+ }
|
|
|
+ if (yzOrderParam.value.printType === 1) {
|
|
|
+ recPrint(yzOrderParam.value).then(res => {});
|
|
|
+ }
|
|
|
+ let LODOP = getLodop();
|
|
|
+ LODOP.PRINT_INIT("长期医嘱单"); // 初始化打印机 名字
|
|
|
+ LODOP.SET_PRINT_PAGESIZE(1, "210mm", "297mm", ""); // 设置纸张大小 A4
|
|
|
+ LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW", true); // 整宽不变形
|
|
|
+ LODOP.ADD_PRINT_TABLE(
|
|
|
+ "2mm",
|
|
|
+ "5mm",
|
|
|
+ "205mm",
|
|
|
+ "220mm",
|
|
|
+ "<style>" +
|
|
|
+ yzPrintCss +
|
|
|
+ "</style>" +
|
|
|
+ "<body>" +
|
|
|
+ document.getElementById("cqYz").innerHTML +
|
|
|
+ "</body>"
|
|
|
+ ); //要打印的内容
|
|
|
+ LODOP.PRINT(); // 关闭
|
|
|
+ queryInfo();
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.nav {
|
|
|
+ margin: 0 auto;
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+ul {
|
|
|
+ list-style: none;
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+.nav li {
|
|
|
+ float: left;
|
|
|
+ margin-left: 10px;
|
|
|
+}
|
|
|
+#cqYz {
|
|
|
+ width: 100%;
|
|
|
+ padding: 0 0px;
|
|
|
+}
|
|
|
+
|
|
|
+#pageTable tr td,
|
|
|
+#pageTable tr th {
|
|
|
+ border: 1px solid black;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 12px;
|
|
|
+}
|
|
|
+#pageTable {
|
|
|
+ border-collapse: collapse;
|
|
|
+}
|
|
|
+
|
|
|
+#pageTable tr td {
|
|
|
+ height: 27px;
|
|
|
+}
|
|
|
+</style>
|