Browse Source

入院接收记录陪护人员

lighter 1 month ago
parent
commit
5f57ec9fec

+ 7 - 0
src/components/search/Index.vue

@@ -7,6 +7,9 @@
           <el-button plain icon="Close" circle title="关闭" @click="close"></el-button>
         </div>
       </div>
+      <div v-if="tip" style="margin: -8px 0 8px 0; color: red">
+        {{tip}}
+      </div>
       <div style="display: flex;align-items: center;">
         <div>检索依据:</div>
         <div>
@@ -102,6 +105,10 @@ const props = defineProps({
     type: String,
     required: true,
   },
+  tip: {
+    type: String,
+    required: false,
+  },
   target: {
     type: String,
     required: true,

+ 31 - 3
src/views/medical-advice/patient-info/AdjustBed.vue

@@ -341,7 +341,6 @@
       </template>
     </el-dialog>
   </el-dialog>
-
   <el-dialog
       v-model="receiveAdmVisible"
       title="入院接收"
@@ -369,6 +368,16 @@
       </el-table-column>
     </el-table>
   </el-dialog>
+  <Search
+      v-if="showSearchPh"
+      width="500px"
+      title="请选择陪护人员"
+      target="physician"
+      tip="提示:如无陪护人员,请选择【自助】(拼音为‘zz’,编码为‘99999’)"
+      :show-emp-dept="true"
+      @close="showSearchPh = false"
+      @click-item="handleSelectPh"
+  />
 </template>
 
 <script setup name="AdjustBed">
@@ -390,6 +399,7 @@ import { clone } from "@/utils/clone";
 import { useUserStore } from "@/pinia/user-store";
 import { BizException, ExceptionEnum } from "@/utils/BizException";
 import {xcMessage} from "@/utils/xiaochan-element-plus";
+import Search from '@/components/search/Index.vue'
 
 const user = useUserStore().userInfo
 const getRoles = user.roles;
@@ -408,15 +418,33 @@ function openReceiveAdmDialog() {
     receiveAdmVisible.value = true;
   })
 }
+
+const showSearchPh = ref(false);
+const receiveRow = ref({})
 function handleClickReceive(row) {
-  ElMessageBox.confirm(`是否确认接收患者【${row.name}】?`, '提示', {
+  receiveRow.value = row
+  let msg = `是否确认接收患者【${row.name}】?`
+  ElMessageBox.confirm(msg, '提示', {
+    type: "warning",
+    confirmButtonText: "接收",
+  }).then(() => {
+    showSearchPh.value = true;
+  }).catch(() => {})
+}
+
+function handleSelectPh(val) {
+  receiveRow.value.phry = val.code
+  showSearchPh.value = false
+  ElMessageBox.confirm(`已选择陪护人员【${val.name}】,是否确认接收患者?`, '提示', {
     type: "warning",
     confirmButtonText: "接收",
   }).then(() => {
-    receivePatient(row).then(res => {
+    receivePatient(receiveRow.value).then(res => {
       xcMessage.success(res)
       receiveAdmVisible.value = false
     })
+  }).catch(() => {
+    receiveRow.value.phry = null
   })
 }