Browse Source

添加异地结算统计功能

lighter 4 years ago
parent
commit
74a3054f40

+ 8 - 0
src/api/medical-insurance/si-query.js

@@ -150,3 +150,11 @@ export function fetchSiTimesList(patNo) {
     params: { patNo },
   })
 }
+
+export function selectSetlinfoStatistics(data) {
+  return request({
+    url: '/siQuery/selectSetlinfoStatistics',
+    method: 'post',
+    data,
+  })
+}

+ 7 - 2
src/router/modules/dashboard.js

@@ -109,8 +109,8 @@ const route = [
             meta: { title: '医保结算单', icon: 'iconfont icon-zhuyuanqingdan' },
           },
           {
-            path: 'setlInfo',
-            component: createNameComponent(() => import('@/views/medical-insurance/allpatient/SetlInfo.vue')),
+            path: 'setllistReconciliation',
+            component: createNameComponent(() => import('@/views/medical-insurance/allpatient/SetllistReconciliation.vue')),
             meta: { title: '结算与对账', icon: 'iconfont icon-menzhenteshubingdingdianbiangeng2' },
           },
           {
@@ -118,6 +118,11 @@ const route = [
             component: createNameComponent(() => import('@/views/medical-insurance/allpatient/SetSheetUpload.vue')),
             meta: { title: '结算单上传', icon: 'iconfont icon-jiesuandanshangchuan' },
           },
+          {
+            path: 'setlStatistics',
+            component: createNameComponent(() => import('@/views/medical-insurance/allpatient/SetlStatistics.vue')),
+            meta: { title: '异地结算统计', icon: 'iconfont icon-zhuyuanqingdan' },
+          },
         ],
       },
     ],

+ 9 - 0
src/utils/date.js

@@ -109,3 +109,12 @@ export function getDateRangeFormatDateTime(data) {
   }
   return { startTime, endTime }
 }
+
+export function formatMonth(date) {
+  if (typeof date === 'undefined') return null
+  if (date === '' || date === null) return null
+  if (typeof date === 'string') return date
+  const year = date.getFullYear()
+  const month = date.getMonth() + 1
+  return year + '-' + ('0' + month).slice(-2)
+}

+ 166 - 0
src/views/medical-insurance/allpatient/SetlStatistics.vue

@@ -0,0 +1,166 @@
+<template>
+  <el-container>
+    <el-header style="height: 35px; margin-top: 10px">
+      <el-date-picker v-model="setlConditon.month" type="month" style="width: 110px" placeholder="请选择" :clearable="false"></el-date-picker>
+      <el-select v-model="setlConditon.insutype" placeholder="险种类型" filterable clearable style="width: 150px">
+        <el-option v-for="item in insutypes" :key="item.code" :value="item.code" :label="item.name"></el-option>
+      </el-select>
+      <el-select v-model="setlConditon.admdvs" placeholder="参保地" style="width: 120px">
+        <el-option v-for="item in insuOptins" :key="item.code" :value="item.code" :label="item.name"></el-option>
+      </el-select>
+      <el-divider direction="vertical"></el-divider>
+      <el-button type="success" icon="el-icon-search" @click="fetchSetlinfos">查询</el-button>
+      <el-button type="primary" icon="el-icon-download" @click="exportExcel">导出Excel</el-button>
+    </el-header>
+    <el-main>
+      <el-table :data="setlinfos" stripe :height="tableHeight" highlight-current-row>
+        <el-table-column type="index" label="序号"></el-table-column>
+        <el-table-column prop="admdvsName" label="参保地名称"></el-table-column>
+        <el-table-column prop="psnSumamt" label="人次"></el-table-column>
+        <el-table-column prop="medfeeSumamt" label="医疗总费用"></el-table-column>
+        <el-table-column prop="baseMedFundpaySumamt" label="基本医疗统筹金额"></el-table-column>
+        <el-table-column prop="bigDssFundpaySumamt" label="大病基金"></el-table-column>
+        <el-table-column prop="clvFundpaySumamt" label="公务员基金支付"></el-table-column>
+        <el-table-column prop="othFundpaySumamt" label="其他基金"></el-table-column>
+        <el-table-column prop="acctpaySumamt" label="个人账户基金"></el-table-column>
+        <el-table-column prop="fundpaySumamt" label="全部基金"></el-table-column>
+      </el-table>
+    </el-main>
+  </el-container>
+</template>
+
+<script>
+import { onMounted, reactive, ref } from 'vue'
+import { formatMonth } from '../../../utils/date'
+import { getInsutypes } from '@/api/medical-insurance/si-dict'
+import { useStore } from 'vuex'
+import { selectSetlinfoStatistics } from '@/api/medical-insurance/si-query'
+import { ElMessage } from 'element-plus'
+import { Export } from '@/utils/ExportExcel'
+export default {
+  setup() {
+    const store = useStore()
+    const windowSize = store.state.app.windowSize
+    const tableHeight = windowSize.h - 55
+
+    const setlConditon = reactive({
+      month: formatMonth(new Date()),
+      insutype: null,
+      admdvs: null,
+    })
+
+    const insutypes = ref([])
+    const insuOptins = initInsuOptions()
+    const setlinfos = ref([])
+
+    const fetchSetlinfos = () => {
+      if (!setlConditon.month) {
+        ElMessage({
+          message: '请选择年月!',
+          type: 'warning',
+          duration: 2500,
+          showClose: true,
+        })
+        return
+      }
+      if (!setlConditon.insutype) {
+        ElMessage({
+          message: '请选择险种类型!',
+          type: 'warning',
+          duration: 2500,
+          showClose: true,
+        })
+        return
+      }
+      if (!setlConditon.admdvs) {
+        ElMessage({
+          message: '请选择参保地!',
+          type: 'warning',
+          duration: 2500,
+          showClose: true,
+        })
+        return
+      }
+      setlConditon.month = formatMonth(setlConditon.month)
+      selectSetlinfoStatistics(setlConditon)
+        .then((res) => {
+          setlinfos.value = res
+        })
+        .catch(() => {
+          setlinfos.value = []
+        })
+    }
+
+    const filterInsutypeName = () => {
+      for (let i = 0; i < insutypes.value.length; i++) {
+        if (insutypes.value[i].code === setlConditon.insutype) {
+          return insutypes.value[i].name
+        }
+      }
+      return ''
+    }
+
+    const filterAdmdvsName = () => {
+      if (setlConditon.admdvs === 1) {
+        return '省内异地'
+      }
+      return '省外异地'
+    }
+
+    const exportExcel = () => {
+      if (setlinfos.value.length === 0) {
+        ElMessage({
+          message: '没有可以导出的数据!',
+          type: 'warning',
+          duration: 2500,
+          showClose: true,
+        })
+      } else {
+        const title = {
+          admdvsName: '参保地名称',
+          psnSumamt: '人次',
+          medfeeSumamt: '医疗总费用',
+          baseMedFundpaySumamt: '基本医疗统筹金额',
+          bigDssFundpaySumamt: '大病基金',
+          clvFundpaySumamt: '公务员基金支付',
+          othFundpaySumamt: '其他基金',
+          acctpaySumamt: '个人账户基金',
+          fundpaySumamt: '全部基金',
+        }
+        const admdvsName = filterAdmdvsName()
+        const insutypeName = filterInsutypeName()
+        Export(setlinfos.value, title, `【${setlConditon.month}】【${admdvsName}】【${insutypeName}】`)
+      }
+    }
+
+    onMounted(() => {
+      getInsutypes().then((res) => {
+        insutypes.value = res
+      })
+    })
+
+    return {
+      tableHeight,
+      setlConditon,
+      insutypes,
+      insuOptins,
+      setlinfos,
+      fetchSetlinfos,
+      exportExcel,
+    }
+  },
+}
+
+function initInsuOptions() {
+  return [
+    {
+      code: 1,
+      name: '省内异地',
+    },
+    {
+      code: 2,
+      name: '省外异地',
+    },
+  ]
+}
+</script>

+ 0 - 0
src/views/medical-insurance/allpatient/SetlInfo.vue → src/views/medical-insurance/allpatient/SetllistReconciliation.vue