Prechádzať zdrojové kódy

借阅,复印,封存的优化。

lighter 1 rok pred
rodič
commit
4620b4ed94

+ 16 - 0
src/api/case-front-sheet/index.js

@@ -268,6 +268,22 @@ export function markClosedown(data) {
     })
 }
 
+export function getMarkStateDetail(bah, times, type) {
+    return request({
+        url: '/caseFrontSheet/getMarkStateDetail',
+        method: 'get',
+        params: { bah, times, type},
+    })
+}
+
+export function getLendOutDetail(bah, times) {
+    return request({
+        url: '/caseFrontSheet/getLendOutDetail',
+        method: 'get',
+        params: { bah, times},
+    })
+}
+
 export function signedByDateCount(signDate) {
     return request({
         url: '/caseFrontSheet/signedByDateCount',

BIN
src/assets/case-frontsheet/ba-lendout.png


+ 72 - 15
src/components/inpatient/frontsheet-printpage/LendOut.vue

@@ -1,20 +1,42 @@
 <template>
   <el-tabs @tab-change="tabClick">
     <el-tab-pane label="借阅登记">
-      <div style="margin-top: 4px;display: flex">
-        <div style="width: 80px">
+      <div class="line-box">
+        <div class="line-label">
+          病案管理员:
+        </div>
+        <div style="width: 300px">{{userName}}</div>
+      </div>
+      <div class="line-box">
+        <div class="line-label">
+          借阅时间:
+        </div>
+        <div style="width: 300px">{{lendTime}}</div>
+      </div>
+      <div class="line-box">
+        <div class="line-label">
           借阅人:
         </div>
-        <el-input style="width: 300px" v-model="lendOutRequest.lendStaff"></el-input>
+        <el-input style="width: 200px" v-model="lendOutRequest.lendStaff"></el-input>
+        <div style="margin-left: 12px">
+          借阅人签字:
+        </div>
+        <div style="width: 120px; border-bottom: 1px solid #555555"></div>
+      </div>
+      <div class="line-box">
+        <div class="line-label">
+          借阅人电话:
+        </div>
+        <el-input style="width: 200px" v-model="lendOutRequest.lendStaffPhone"></el-input>
       </div>
-      <div style="margin-top: 12px;display: flex">
-        <div style="width: 80px">
+      <div class="line-box">
+        <div class="line-label">
           备注:
         </div>
         <el-input type="textarea" style="width: 300px" v-model="lendOutRequest.remark"></el-input>
       </div>
-      <div style="margin-top: 12px;display: flex">
-        <div style="width: 80px">
+      <div class="line-box">
+        <div class="line-label">
           借阅病案:
         </div>
         <el-input style="width: 150px" v-model="bah" placeholder="输入住院号搜索">
@@ -44,7 +66,8 @@
 
       <div style="margin-top: 30px; width: 100%; text-align: right">
         <el-button type="primary" @click="submitLendOut">提交</el-button>
-        <el-button @click="executePrint">打印</el-button>
+        <el-button type="primary" @click="executePrint">打印</el-button>
+        <el-button type="success" @click="submitAndPrint">提交并打印</el-button>
       </div>
 
       <el-dialog v-model="showSearchResult" title="患者病案" width="530px">
@@ -64,7 +87,6 @@
       </el-dialog>
     </el-tab-pane>
     <el-tab-pane label="借阅归还">
-
       <el-table :data="lendOutSheets">
         <el-table-column prop="bah" label="住院号" width="70"></el-table-column>
         <el-table-column prop="times" label="住院次数" width="40"></el-table-column>
@@ -87,9 +109,22 @@
 import {doLendOut, getSimpleSheetForLendOut, getLendOutSheets, returnLendOutSheet} from "@/api/case-front-sheet";
 import {ElMessage} from "element-plus";
 
+const props = defineProps({
+  userName: {
+    type: String,
+    required: true,
+  },
+  lendTime: {
+    type: String,
+    required: true
+  }
+})
+
 const lendOutRequest = reactive({
   list: [],
+  lendTime: '',
   lendStaff: '',
+  lendStaffPhone: '',
   remark: ''
 })
 
@@ -128,12 +163,15 @@ function deleteFromList(index) {
 }
 
 function submitLendOut() {
-  doLendOut(lendOutRequest).then(() => {
-    ElMessage({
-      message: '操作成功',
-      type: 'success'
+  return new Promise((resolve) => {
+    lendOutRequest.lendTime = props.lendTime
+    doLendOut(lendOutRequest).then(() => {
+      ElMessage({
+        message: '操作成功',
+        type: 'success'
+      })
+      resolve()
     })
-
   })
 }
 
@@ -141,6 +179,12 @@ function executePrint() {
   window.print()
 }
 
+function submitAndPrint() {
+  submitLendOut().then(() => {
+    executePrint()
+  })
+}
+
 const lendOutSheets = ref([])
 function tabClick(tabIndex) {
   if (tabIndex === '1') {
@@ -159,4 +203,17 @@ function returnSheet(id, index) {
     lendOutSheets.value.splice(index, 1)
   })
 }
-</script>
+</script>
+
+<style scoped>
+
+.line-box {
+  margin-top: 12px;
+  display: flex;
+}
+
+.line-label {
+  width: 90px;
+}
+
+</style>

+ 142 - 38
src/views/hospitalization/case-front-sheet/AllCaseFrontSheet.vue

@@ -79,10 +79,13 @@
           <div style="position: fixed; top: 180px; left: 1230px">
             <img v-if="sheet.zyDismissWay === '4'" :src="patientdead" alt="">
             <div v-if="sheet.duplicated">
-              <img :src="baduplicated" alt="">
+              <img class="img-state" :src="baduplicated" alt="" @click="showMarkStateDetail('DUPLICATE')">
+            </div>
+            <div v-if="sheet.lendout">
+              <img class="img-state" :src="balendout" alt="" @click="showLendOutDetail">
             </div>
             <div v-if="sheet.closedown">
-              <img :src="baclosedown" alt="">
+              <img class="img-state" :src="baclosedown" alt="" @click="showMarkStateDetail('CLOSEDOWN')">
             </div>
           </div>
         </div>
@@ -305,39 +308,100 @@
 
       <el-dialog v-model="showMarkStateDialog" :title="markStateTitle" width="450px">
         <div style="margin-top: 30px;display: flex">
-          <div style="width: 80px">
+          <div style="width: 90px">
+            病案管理员:
+          </div>
+          <el-input style="width: 300px" v-model="markStateRequest.userName" disabled></el-input>
+        </div>
+        <div style="margin-top: 12px;display: flex">
+          <div style="width: 90px">
             住院号:
           </div>
           <el-input style="width: 300px" v-model="markStateRequest.bah" disabled></el-input>
         </div>
         <div style="margin-top: 12px;display: flex">
-          <div style="width: 80px">
+          <div style="width: 90px">
             住院次数:
           </div>
           <el-input style="width: 300px" v-model="markStateRequest.times" disabled></el-input>
         </div>
         <div style="margin-top: 12px;display: flex">
-          <div style="width: 80px">
+          <div style="width: 90px">
+            {{markStateTitle}}时间:
+          </div>
+          <el-input style="width: 300px" v-model="markStateRequest.markTime" disabled></el-input>
+        </div>
+        <div style="margin-top: 12px;display: flex">
+          <div style="width: 90px">
             来访人员:
           </div>
           <el-input style="width: 300px" v-model="markStateRequest.visitStaff"></el-input>
         </div>
         <div style="margin-top: 12px;display: flex">
-          <div style="width: 80px">
+          <div style="width: 90px">
             备注:
           </div>
           <el-input type="textarea" style="width: 300px" v-model="markStateRequest.remark"></el-input>
         </div>
+
         <template #footer>
-          <div>
-            <el-button type="primary" @click="executeDuplicateOrClosedown">提交</el-button>
-            <el-button @click="printMarkStateRequest">打印</el-button>
+          <div style="margin-top: -12px">
+            <el-button type="primary" @click="executeDuplicateOrClosedown(false)">提交</el-button>
+            <el-button type="primary" @click="printMarkStateRequest">打印</el-button>
+            <el-button type="success" @click="submitAndPrint">提交并打印</el-button>
           </div>
         </template>
       </el-dialog>
 
+
+      <el-dialog v-model="lendOutDetailVisible" title="借阅详情" width="450px">
+        <div style="margin-top: 30px;display: flex">
+          <div style="width: 100px">
+            病案管理员:
+          </div>
+          <el-input style="width: 300px" v-model="lendOutDetail.opStaff" readonly></el-input>
+        </div>
+        <div style="margin-top: 12px;display: flex">
+          <div style="width: 100px">
+            住院号:
+          </div>
+          <el-input style="width: 300px" v-model="lendOutDetail.bah" readonly></el-input>
+        </div>
+        <div style="margin-top: 12px;display: flex">
+          <div style="width: 100px">
+            住院次数:
+          </div>
+          <el-input style="width: 300px" v-model="lendOutDetail.times" readonly></el-input>
+        </div>
+        <div style="margin-top: 12px;display: flex">
+          <div style="width: 100px">
+            借阅时间:
+          </div>
+          <el-input style="width: 300px" v-model="lendOutDetail.lendTime" readonly></el-input>
+        </div>
+        <div style="margin-top: 12px;display: flex">
+          <div style="width: 100px">
+            借阅人员:
+          </div>
+          <el-input style="width: 300px" v-model="lendOutDetail.lendStaff" readonly></el-input>
+        </div>
+        <div style="margin-top: 12px;display: flex">
+          <div style="width: 100px">
+            借阅人员电话:
+          </div>
+          <el-input style="width: 300px" v-model="lendOutDetail.lendStaffPhone" readonly></el-input>
+        </div>
+        <div style="margin-top: 12px;display: flex">
+          <div style="width: 100px">
+            备注:
+          </div>
+          <el-input type="textarea" style="width: 300px" v-model="lendOutDetail.remark" readonly></el-input>
+        </div>
+
+      </el-dialog>
+
       <el-dialog v-model="showLendOut" title="借阅管理" style="width: 600px">
-        <LendOut />
+        <LendOut :lend-time="currentTime" :user-name="userName" />
       </el-dialog>
     </template>
   </page-layer>
@@ -357,7 +421,7 @@ import {
   executeUnArchiveBa,
   getAllDictionary,
   getAllWards,
-  getSheetInfo, markClosedown, markDuplicate,
+  getSheetInfo, markClosedown, markDuplicate, getMarkStateDetail, getLendOutDetail,
   sheetSearch, signedByDateCount,
 } from '@/api/case-front-sheet'
 import maleIcon from '@/assets/male-icon.png'
@@ -374,9 +438,9 @@ import SheetQuality from '@/components/inpatient/CaseFrontSheetQuality.vue'
 import PageLayer from "@/layout/PageLayer";
 import patientdead from '@/assets/case-frontsheet/patient-dead.png'
 import baduplicated from '@/assets/case-frontsheet/ba-duplicated.png'
+import balendout from '@/assets/case-frontsheet/ba-lendout.png'
 import baclosedown from '@/assets/case-frontsheet/ba-closedown.png'
 import LendOut from "@/components/inpatient/frontsheet-printpage/LendOut.vue";
-import {isDev} from "@/utils/public";
 
 const showSheetQuality = ref(false)
 const currentPage = ref(1)
@@ -385,6 +449,7 @@ const handleCurrentPageChange = (val) => {
 }
 const userWards = ref([])
 const windowSize = store.state.app.windowSize
+const userName = store.state.user.info.name
 const tableHeight = windowSize.h - 50
 const overview = ref([])
 let sheet = ref({
@@ -550,8 +615,8 @@ const signData = ref({})
 const currentSignStaff = ref('')
 
 const dateOffset = (val) => {
-  let currentTime = new Date(signDate.value).getTime()
-  signDate.value = new Date(currentTime + (3600 * 24 * val * 1000) )
+  let nowtime = new Date(signDate.value).getTime()
+  signDate.value = new Date(nowtime + (3600 * 24 * val * 1000))
   handleSignDateChange(signDate.value)
 }
 
@@ -569,7 +634,7 @@ const clickSignStaff = (key) => {
   }
 }
 
-const showLendOut = ref(isDev)
+const showLendOut = ref(false)
 const handleCommand = (val) => {
   switch (val) {
     case 'dismissCount':
@@ -607,6 +672,7 @@ const handleCommand = (val) => {
       beforeDuplicateOrClosedown('CLOSEDOWN')
       break
     case 'lendout':
+      currentTime.value = formatDatetime(new Date())
       showLendOut.value = true
       break
   }
@@ -845,20 +911,19 @@ const handleCurrentDismissCountPageChange = (val) => {
   currentDismissCountPage.value = val
 }
 
-
-
-
-
 const showMarkStateDialog = ref(false)
 const markStateType = ref('')
+const currentTime = ref('')
 const markStateTitle = computed(() => {
   return markStateType.value === 'DUPLICATE' ? '复印' : '封存'
 })
 const markStateRequest = reactive({
+  userName: null,
   bah: null,
   times: null,
   visitStaff: null,
   remark: null,
+  markTime: null,
 })
 
 const beforeDuplicateOrClosedown = (type) => {
@@ -869,42 +934,76 @@ const beforeDuplicateOrClosedown = (type) => {
     return
   }
   markStateType.value = type
+  markStateRequest.userName = userName
   markStateRequest.bah = sheet.value.bah
   markStateRequest.times = sheet.value.admissTimes
+  markStateRequest.markTime = formatDatetime(new Date())
   showMarkStateDialog.value = true
 }
 
-const executeDuplicateOrClosedown = () => {
-  if (markStateType.value === 'DUPLICATE') {
-    markDuplicate(markStateRequest).then(res => {
-      ElMessage({
-        message: '操作成功',
-        type: 'success'
+const executeDuplicateOrClosedown = (keepDialogVisible) => {
+  return new Promise((resolve, reject) => {
+    if (markStateType.value === 'DUPLICATE') {
+      markDuplicate(markStateRequest).then(res => {
+        ElMessage({
+          message: '操作成功',
+          type: 'success'
+        })
+        sheet.value.duplicated += 1
+        showMarkStateDialog.value = keepDialogVisible
+        resolve()
       })
-      sheet.value.duplicated += 1
-      showMarkStateDialog.value = false
-    })
-  } else {
-    markClosedown(markStateRequest).then(res => {
-      ElMessage({
-        message: '操作成功',
-        type: 'success'
+    } else {
+      markClosedown(markStateRequest).then(res => {
+        ElMessage({
+          message: '操作成功',
+          type: 'success'
+        })
+        sheet.value.closedown += 1
+        showMarkStateDialog.value = keepDialogVisible
+        resolve()
       })
-      sheet.value.closedown += 1
-      showMarkStateDialog.value = false
-    })
-  }
+    }
+  })
 }
 
 const printMarkStateRequest = () => {
   window.print()
 }
 
+const submitAndPrint = () => {
+  executeDuplicateOrClosedown(true).then(() => {
+    printMarkStateRequest()
+  })
+}
+
+function showMarkStateDetail(type) {
+  getMarkStateDetail(sheet.value.bah, sheet.value.admissTimes, type).then(res => {
+    markStateRequest.bah = res.bah
+    markStateRequest.times = res.times
+    markStateRequest.opStaff = res.opStaff
+    markStateRequest.userName = res.opStaff
+    markStateRequest.visitStaff = res.visitStaff
+    markStateRequest.remark = res.remark
+    markStateRequest.markTime = res.markTime
+    showMarkStateDialog.value = true
+  })
+}
+
+const lendOutDetail = ref({})
+const lendOutDetailVisible = ref(false)
+function showLendOutDetail() {
+  getLendOutDetail(sheet.value.bah, sheet.value.admissTimes).then(res => {
+    lendOutDetail.value = res
+    lendOutDetailVisible.value = true
+  })
+}
+
 onActivated(() => {
   initLodop()
 })
 
-onMounted(() => {
+  onMounted(() => {
   getAllDictionary().then((res) => {
     res.getOperations = operations
     res.getYesOrNo = yesOrNo
@@ -976,4 +1075,9 @@ onMounted(() => {
   font-size: 18px;
   color: gray;
 }
+
+.img-state:hover {
+  scale: 1.08;
+  cursor: pointer;
+}
 </style>