Browse Source

重新绑卡

lihong 1 year ago
parent
commit
2a35f6a36a
2 changed files with 75 additions and 1 deletions
  1. 18 0
      src/api/triage/triage.js
  2. 57 1
      src/views/clinic/triage/Untriaged.vue

+ 18 - 0
src/api/triage/triage.js

@@ -213,4 +213,22 @@ export function getVideoList() {
     url: '/roomScreen/getVideoList',
     method: 'get',
   })
+}
+
+
+export function saveNewCard(data) {
+  return request({
+    url: '/triage/saveNewCard',
+    method: 'post',
+    data,
+  })
+}
+
+
+export function queryCardInfo(data) {
+  return request({
+    url: '/triage/queryCardInfo',
+    method: 'post',
+    data,
+  })
 }

+ 57 - 1
src/views/clinic/triage/Untriaged.vue

@@ -2,6 +2,7 @@
     <page-layer>
         <template #header>
             <el-button type="primary" icon="Refresh" @click="fetchUnTriagedPatient">刷新数据</el-button>
+            <el-button type="primary"  @click="openCardDiag">重新绑卡</el-button>
             <ReadElectronicSiCard pat-no="triage" biztype="01101" @success="afterReadCard"/>
         </template>
         <template #main>
@@ -141,6 +142,24 @@
                     </div>
                 </div>
             </el-dialog>
+          <el-dialog v-model="showCardDialog" title="重新绑卡" width="30%">
+            <el-form  label-width="auto" style="max-width: 600px">
+              <el-form-item label="旧门诊号">
+                <el-input v-model="cardForm.oldPatientId" />
+              </el-form-item>
+              <el-form-item label="新门诊号">
+                <el-input v-model="cardForm.newPatientId" />
+              </el-form-item>
+            </el-form>
+            <template #footer>
+              <div class="dialog-footer">
+                <el-button @click="showCardDialog = false">取消</el-button>
+                <el-button type="primary" @click="saveNewCardInfo">
+                  确认
+                </el-button>
+              </div>
+            </template>
+          </el-dialog>
         </template>
     </page-layer>
 </template>
@@ -155,9 +174,11 @@ import {
     getChosenDept,
     getRooms,
     getUnTriagedPatient,
+    saveNewCard,
+  queryCardInfo,
     saveMzVitalSigns
 } from '@/api/triage/triage'
-import {ElMessage} from 'element-plus'
+import {ElMessage,ElMessageBox} from 'element-plus'
 import PageLayer from "@/layout/PageLayer";
 import ReadElectronicSiCard from '@/components/medical-insurance/read-electronic-si-card/index.vue'
 
@@ -313,8 +334,43 @@ export default {
             clearInterval(fetchInteval.value)
         })
 
+       const showCardDialog = ref(false)
+        const cardForm = ref({
+          oldPatientId : '',
+          newPatientId :''
+        })
+       const saveNewCardInfo  =()=>{
+         queryCardInfo(cardForm.value).then((res)=>{
+           let name =  res.name
+           ElMessageBox.confirm(
+               `请确认是否重新绑定病人[${name}](旧卡号:${cardForm.value.oldPatientId})的新门诊号为:${cardForm.value.newPatientId},新卡号为:${res.ic_card_no}?`,
+               '确认界面',
+               {
+                 confirmButtonText: '确认',
+                 cancelButtonText: '取消',
+                 type: 'warning',
+               }
+           )
+               .then(() => {
+                 saveNewCard(cardForm.value).then(res=>{})
+               })
+               .catch(() => {
+                 ElMessage({
+                   type: 'info',
+                   message: '取消',
+                 })
+               })
+         })
+       }
+        const openCardDiag = ()=>{
+          showCardDialog.value = true
+        }
         return {
             tableHeight,
+            openCardDiag,
+            showCardDialog,
+            saveNewCardInfo,
+            cardForm,
             patients,
             totalSize,
             pageSize,