Browse Source

医保首页增加待遇检查

lighter 1 year ago
parent
commit
55346eb79e

+ 38 - 9
src/components/medical-insurance/treatmentinfo/Index.vue

@@ -7,13 +7,19 @@
           <el-button plain icon="Close" circle title="关闭" @click="close"></el-button>
         </div>
       </div>
+      <div style="padding: 8px 12px">
+        <span style="font-weight: bold">待遇检查日期:</span>
+        <el-button icon="ArrowLeft" @click="dateOffset(-1)"></el-button>
+        <el-date-picker style="width: 110px" :clearable="false" v-model="checktime"
+                        @change="handleDateChange"></el-date-picker>
+        <el-button icon="ArrowRight" @click="dateOffset(1)"></el-button>
+      </div>
       <el-table :data="treatmentinfos" stripe height="360">
         <el-table-column label="人员编号" prop="psnNo"></el-table-column>
         <el-table-column label="待遇检查类型" prop="trtChkTypeName"></el-table-column>
         <el-table-column label="基金支付类型" prop="fundPayTypeName"></el-table-column>
         <el-table-column label="基金款项待遇享受标志" prop="trtEnjymntFlagName"></el-table-column>
-        <el-table-column label="开始日期" prop="begndate"></el-table-column>
-        <el-table-column label="结束日期" prop="enddate"></el-table-column>
+        <el-table-column label="待遇检查日期" prop="begndate"></el-table-column>
         <el-table-column label="待遇检查结果" prop="trtChkRslt"></el-table-column>
       </el-table>
     </div>
@@ -23,6 +29,7 @@
 <script>
 import { ref, onMounted } from 'vue'
 import { checkPersonTreatment } from '@/api/medical-insurance/si-query'
+import {formatDatetime} from "@/utils/date";
 export default {
   props: {
     params: {
@@ -34,22 +41,44 @@ export default {
   setup(props, ctx) {
     const treatmentinfos = ref([])
 
+    const checktime = ref(null)
+
     const close = () => {
       ctx.emit('close')
     }
 
+    const checkTreatment = () => {
+      checkPersonTreatment(props.params).then((res) => {
+        treatmentinfos.value = res
+      }).catch(() => {
+        ctx.emit('close')
+      })
+    }
+
+    const dateOffset = (val) => {
+      let currentTime = new Date(checktime.value).getTime()
+      let begin = new Date(currentTime + (3600 * 24 * val * 1000) )
+      checktime.value = begin.getFullYear() + '-' + ('0' + (begin.getMonth() + 1))
+          .slice(-2) + '-' + ('0' + begin.getDate()).slice(-2)
+      props.params.begntime = formatDatetime(begin)
+      checkTreatment()
+    }
+
+    const handleDateChange = (val) => {
+      props.params.begntime = formatDatetime(val)
+      checkTreatment()
+    }
+
     onMounted(() => {
-      checkPersonTreatment(props.params)
-        .then((res) => {
-          treatmentinfos.value = res
-        })
-        .catch(() => {
-          ctx.emit('close')
-        })
+      checktime.value = props.params.begntime
+      checkTreatment()
     })
 
     return {
       treatmentinfos,
+      checktime,
+      dateOffset,
+      handleDateChange,
       close,
     }
   },

+ 48 - 69
src/views/medical-insurance/allpatient/PsnInfo.vue

@@ -78,7 +78,7 @@
   </page-layer>
 </template>
 
-<script>
+<script setup>
 import { ref } from 'vue'
 import { obtainBasicPersonInfo } from '@/api/medical-insurance/si-query'
 import { allAdmdvses } from '@/data/admdvs'
@@ -86,76 +86,55 @@ import Cuminfo from '@/components/medical-insurance/cuminfo/Index.vue'
 import { ElMessage } from 'element-plus'
 import PageLayer from "@/layout/PageLayer";
 import {getPsnCertTypes} from "@/api/medical-insurance/si-dict";
-export default {
-  components: {
-    PageLayer,
-    Cuminfo,
-  },
-  setup() {
-    const psnCertTypes = ref([])
-    const psnCertType = ref('01')
-    const socialNo = ref('')
-    const psnAdmdvs = ref(null)
-    const psnInfo = ref({ insuinfo: [] })
-    const showCumInfo = ref(false)
-    const nullPsninfo = () => {
-      if (!psnInfo.value.psnNo) {
-        ElMessage({
-          message: '请先查询人员基本信息!',
-          type: 'warning',
-          duration: 2000,
-          showClose: true,
-        })
-        return true
-      }
-      return false
-    }
-    const execQuery = () => {
-      const param = {
-        psnCertType: psnCertType.value,
-        socialNo: socialNo.value,
-        admdvs: psnAdmdvs.value,
-        onlyQry: 1,
-      }
-      obtainBasicPersonInfo(param).then((res) => {
-        psnInfo.value = res
-      })
-    }
-    const resetPage = () => {
-      socialNo.value = ''
-      psnCertType.value = ''
-      psnInfo.value = { insuinfo: [] }
-    }
-    const getCuminfo = () => {
-      if (nullPsninfo()) {
-        return
-      }
-      showCumInfo.value = true
-    }
 
-    const handleAdmdvsChange = (val) => {
-      psnAdmdvs.value = val[1]
-    }
-
-    onMounted(() => {
-      getPsnCertTypes().then(res => {
-        psnCertTypes.value = res
-      })
+const psnCertTypes = ref([])
+const psnCertType = ref('01')
+const socialNo = ref('')
+const psnAdmdvs = ref(null)
+const psnInfo = ref({ insuinfo: [] })
+const showCumInfo = ref(false)
+const nullPsninfo = () => {
+  if (!psnInfo.value.psnNo) {
+    ElMessage({
+      message: '请先查询人员基本信息!',
+      type: 'warning',
+      duration: 2000,
+      showClose: true,
     })
+    return true
+  }
+  return false
+}
+const execQuery = () => {
+  const param = {
+    psnCertType: psnCertType.value,
+    socialNo: socialNo.value,
+    admdvs: psnAdmdvs.value,
+    onlyQry: 1,
+  }
+  obtainBasicPersonInfo(param).then((res) => {
+    psnInfo.value = res
+  })
+}
+const resetPage = () => {
+  socialNo.value = ''
+  psnCertType.value = ''
+  psnInfo.value = { insuinfo: [] }
+}
+const getCuminfo = () => {
+  if (nullPsninfo()) {
+    return
+  }
+  showCumInfo.value = true
+}
 
-    return {
-      allAdmdvses,
-      psnCertType,
-      socialNo,
-      psnAdmdvs,
-      psnInfo,
-      showCumInfo,
-      psnCertTypes,
-      execQuery,
-      resetPage,
-      getCuminfo,
-      handleAdmdvsChange,
-    }
-  },
+const handleAdmdvsChange = (val) => {
+  psnAdmdvs.value = val[1]
 }
+
+onMounted(() => {
+  getPsnCertTypes().then(res => {
+    psnCertTypes.value = res
+  })
+})
 </script>

+ 44 - 3
src/views/medical-insurance/inpatient/Home.vue

@@ -11,9 +11,10 @@
             <el-button type="primary" icon="Search" @click="searchPatient">检索</el-button>
           </span>
       <el-button type="primary" icon="Postcard" @click="checkIdCard" style="margin-left: 8px">身份信息</el-button>
-      <el-button style="margin-left: 10px" type="success" icon="Document" @click="getRegInfo">登记信息</el-button>
-      <el-button style="margin-left: 10px" type="danger" icon="MagicStick" @click="toEmpiView">360视图</el-button>
-      <el-button style="margin-left: 10px" icon="Document" @click="openEmr">电子病历</el-button>
+      <el-button type="success" icon="Document" @click="getRegInfo">登记信息</el-button>
+      <el-button type="primary" icon="Tickets" @click="beforeGetTreatinfo">待遇检查</el-button>
+      <el-button type="danger" icon="MagicStick" @click="toEmpiView">360视图</el-button>
+      <el-button icon="Document" @click="openEmr">电子病历</el-button>
       <bloodSugar :pat-no="patient.inpatientNo" :times="patient.admissTimes" :old-button="false"/>
     </template>
     <template #aside>
@@ -30,6 +31,9 @@
       <Registinfo v-if="showRegisterInfo" :params="patient" @close="showRegisterInfo = false"></Registinfo>
       <IdentifyImage v-if="showIdCardImg" :pat-no="patient.inpatientNo" :times="patient.admissTimes"
                      @close="showIdCardImg = false"></IdentifyImage>
+      <Insuinfo v-if="showPsnInsuinfo" :params="checkTreatmentParams" @close="showPsnInsuinfo = false"
+                @row-click="checkTreatmentinfos"/>
+      <Treatmentinfo v-if="showTreatmentinfos" :params="checkTreatmentParams" @close="showTreatmentinfos = false"/>
     </template>
   </page-layer>
 </template>
@@ -50,6 +54,10 @@ import {
   getEmrUrl
 } from "@/views/hospitalization/zhu-yuan-yi-sheng/electronic-medical-record/emr-editor/emr-init";
 import BloodSugar from "@/views/hospitalization/zhu-yuan-yi-sheng/yi-zhu-lu-ru/components/BloodSugar.vue";
+import Treatmentinfo from "@/components/medical-insurance/treatmentinfo/Index.vue";
+import Insuinfo from "@/components/medical-insurance/insuinfo/Index.vue";
+import {ElMessage} from "element-plus";
+import {getDatetime} from "@/utils/date";
 
 
 const search = initSearchParam()
@@ -135,4 +143,37 @@ function makeOverview(val) {
     status: val.mdtrtId || val.injurySerialNo ? 1 : 0,
   }
 }
+
+const showPsnInsuinfo = ref(false)
+const showTreatmentinfos = ref(false)
+const checkTreatmentParams = ref({})
+const beforeGetTreatinfo = () => {
+  if (nullPatient()) return
+  if (!patient.value.medType) {
+    ElMessage({
+      message: '医疗类别不能为空!',
+      type: 'warning',
+      duration: 2600,
+      showClose: true,
+    })
+    return true
+  }
+  checkTreatmentParams.value = {
+    medType: patient.value.medType,
+    patNo: patient.value.patNo,
+    times: patient.value.admissTimes,
+    ledgerSn: patient.value.ledgerSn,
+    socialNo: patient.value.socialNo,
+    name: patient.value.name,
+    admdvs: patient.value.admdvs,
+  }
+  showPsnInsuinfo.value = true
+}
+const checkTreatmentinfos = (row) => {
+  checkTreatmentParams.value.psnNo = row.psnNo
+  checkTreatmentParams.value.begntime = getDatetime()
+  checkTreatmentParams.value.insutype = row.insutype
+  showPsnInsuinfo.value = false
+  showTreatmentinfos.value = true
+}
 </script>