|
@@ -1,32 +1,41 @@
|
|
|
<template>
|
|
|
<el-container>
|
|
|
<el-header style="height: 35px; margin-top: 10px">
|
|
|
- <el-select v-model="slctSetlPrm.clrType" placeholder="结算类别" style="width: 100px">
|
|
|
+ <el-select v-model="slctSetlPrm.clrType" placeholder="结算类别" style="width: 100px" @change="setlinfos = []">
|
|
|
<el-option v-for="item in clrTypes" :key="item.code" :value="item.code" :label="item.name"></el-option>
|
|
|
</el-select>
|
|
|
<el-date-picker
|
|
|
- v-model="dateRange"
|
|
|
- type="daterange"
|
|
|
- :shortcuts="setlShtcuts"
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始日期"
|
|
|
- end-placeholder="结束日期"
|
|
|
- style="width: 220px"
|
|
|
+ v-model="dateRange"
|
|
|
+ type="daterange"
|
|
|
+ :shortcuts="setlShtcuts"
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="开始日期"
|
|
|
+ end-placeholder="结束日期"
|
|
|
+ style="width: 220px"
|
|
|
+ @change="setlinfos = []"
|
|
|
></el-date-picker>
|
|
|
- <el-select v-model="slctSetlPrm.insutype" placeholder="险种类型" filterable clearable>
|
|
|
+ <el-select v-model="slctSetlPrm.insutype" placeholder="险种类型" filterable clearable style="width: 120px" @change="currentPage = 1">
|
|
|
<el-option v-for="item in insutypes" :key="item.code" :value="item.code" :label="item.name"></el-option>
|
|
|
</el-select>
|
|
|
- <el-select v-model="slctSetlPrm.clrOptins" placeholder="清算机构" filterable clearable
|
|
|
- :disabled="setlinfos.length === 0">
|
|
|
+ <el-select v-model="slctSetlPrm.clrOptins" placeholder="清算机构" filterable clearable :disabled="setlinfos.length === 0" style="width: 120px" @change="currentPage = 1">
|
|
|
<el-option v-for="item in optins" :key="item.code" :value="item.code" :label="item.name"></el-option>
|
|
|
</el-select>
|
|
|
<el-divider direction="vertical"></el-divider>
|
|
|
<el-button type="primary" icon="el-icon-search" @click="getSetlInfos">检索</el-button>
|
|
|
<el-button type="primary" icon="el-icon-coin" @click="bfrChkSetl">对总账</el-button>
|
|
|
<el-button type="primary" icon="el-icon-data-analysis" @click="setlDtlCheck">明细对账</el-button>
|
|
|
+ <el-button type="success" @click="upldAllList">全部上传</el-button>
|
|
|
+ <el-button type="success" @click="upldSelections">上传选中条目</el-button>
|
|
|
</el-header>
|
|
|
<el-main>
|
|
|
- <el-table :data="cptSetlinfos" stripe :height="tableHeight" highlight-current-row>
|
|
|
+ <el-table
|
|
|
+ :data="cptSetlinfos.slice(pageSize * (currentPage - 1), pageSize * currentPage)"
|
|
|
+ stripe
|
|
|
+ :height="tableHeight"
|
|
|
+ highlight-current-row
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="35"></el-table-column>
|
|
|
<el-table-column type="index" label="序号"></el-table-column>
|
|
|
<el-table-column prop="patNo" label="住院号/门诊号"></el-table-column>
|
|
|
<el-table-column prop="times" label="次数"></el-table-column>
|
|
@@ -45,6 +54,16 @@
|
|
|
<el-table-column prop="psnCashPay" label="个人现金支出"></el-table-column>
|
|
|
<el-table-column prop="clrOptinsName" label="清算机构"></el-table-column>
|
|
|
</el-table>
|
|
|
+ <el-pagination
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-sizes="[15, 30, 45, 60]"
|
|
|
+ :page-size="pageSize"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="cptSetlinfos.length"
|
|
|
+ style="margin-top: 5px"
|
|
|
+ ></el-pagination>
|
|
|
<el-dialog v-model="showSetlDtlCheckRslt" title="明细对账结果">
|
|
|
<el-table :data="setlDtlCheckRslt" stripe :height="300" highlight-current-row>
|
|
|
<el-table-column type="index" label="序号"></el-table-column>
|
|
@@ -58,38 +77,89 @@
|
|
|
</el-table>
|
|
|
</el-dialog>
|
|
|
</el-main>
|
|
|
+ <div style="position: fixed; z-index: 10000">
|
|
|
+ <el-dialog v-model="showUpldRsps" title="结算单上传详情" :close-on-click-modal="false" :close-on-press-escape="false" :before-close="beforeCloseUpldRsps">
|
|
|
+ <el-progress :text-inside="true" title="sd" :stroke-width="22" :percentage="percentage" status="success">
|
|
|
+ <span><i v-show="percentage < 100" class="el-icon-loading"></i> {{ cptUpldRsTxt }}</span>
|
|
|
+ </el-progress>
|
|
|
+ <el-divider></el-divider>
|
|
|
+ <el-table ref="upldRsTbl" :data="upldRsps" height="300" stripe>
|
|
|
+ <el-table-column type="index" label="序号" width="40">
|
|
|
+ <template #default="scope">
|
|
|
+ <span :style="{ color: scope.row.code === 200 ? 'green' : 'red' }"> {{ scope.$index + 1 }} </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="住院号" width="80">
|
|
|
+ <template #default="scope">
|
|
|
+ <span :style="{ color: scope.row.code === 200 ? 'green' : 'red' }">{{ scope.row.patNo }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="次数" width="40">
|
|
|
+ <template #default="scope">
|
|
|
+ <span :style="{ color: scope.row.code === 200 ? 'green' : 'red' }">{{ scope.row.times }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="账页号" width="50">
|
|
|
+ <template #default="scope">
|
|
|
+ <span :style="{ color: scope.row.code === 200 ? 'green' : 'red' }">{{ scope.row.ledgerSn }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="上传结果">
|
|
|
+ <template #default="scope">
|
|
|
+ <span :style="{ color: scope.row.code === 200 ? 'green' : 'red' }">{{ scope.row.message }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
</el-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {computed, onMounted, reactive, ref} from '@vue/runtime-core'
|
|
|
+import { computed, onActivated, onMounted, reactive, ref } from '@vue/runtime-core'
|
|
|
import store from '@/store'
|
|
|
-import {getClrTypes, getInsutypes} from '@/api/medical-insurance/si-dict'
|
|
|
-import {setlShtcuts} from '@/data/shortcuts'
|
|
|
-import {ElMessage, ElMessageBox} from 'element-plus'
|
|
|
-import {
|
|
|
- institutionSettlementDetailCheck,
|
|
|
- institutionSettlementLedgerCheck,
|
|
|
- selectSetlinfos
|
|
|
-} from '@/api/medical-insurance/si-manage'
|
|
|
-import {formatDate} from '@/utils/date'
|
|
|
+import { getClrTypes, getInsutypes } from '@/api/medical-insurance/si-dict'
|
|
|
+import { setlShtcuts } from '@/data/shortcuts'
|
|
|
+import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
+import { institutionSettlementDetailCheck, institutionSettlementLedgerCheck, selectSetlinfos, upldSetlList, upldSetlListTimes } from '@/api/medical-insurance/si-manage'
|
|
|
+import { formatDate } from '@/utils/date'
|
|
|
+import { getDateRangeFormatDate } from '../../../utils/date'
|
|
|
+import { setCallback } from '@/utils/websocket'
|
|
|
|
|
|
export default {
|
|
|
setup() {
|
|
|
const windowSize = store.state.app.windowSize
|
|
|
- const tableHeight = windowSize.h - 45
|
|
|
+ const tableHeight = windowSize.h - 100
|
|
|
const insutypes = ref([])
|
|
|
const clrTypes = ref([])
|
|
|
const dateRange = ref(null)
|
|
|
const setlinfos = ref([])
|
|
|
const optins = ref([])
|
|
|
+ const showUpldRsps = ref(false)
|
|
|
+ const upldRsps = ref([])
|
|
|
+ const percentage = ref(0)
|
|
|
+ const upldRsTbl = ref(null)
|
|
|
+ const cptUpldRsTxt = computed(() => {
|
|
|
+ if (percentage.value < 100) {
|
|
|
+ return `上传中 ( ${percentage.value}% ) ...`
|
|
|
+ }
|
|
|
+ return '上传完成(100%)'
|
|
|
+ })
|
|
|
const slctSetlPrm = reactive({
|
|
|
- insutype: null,
|
|
|
+ insutype: '',
|
|
|
clrType: null,
|
|
|
clrOptins: null,
|
|
|
begndate: null,
|
|
|
enddate: null,
|
|
|
})
|
|
|
+ const pageSize = ref(30)
|
|
|
+ const currentPage = ref(1)
|
|
|
+ const handleSizeChange = (val) => {
|
|
|
+ pageSize.value = val
|
|
|
+ }
|
|
|
+ const handleCurrentChange = (val) => {
|
|
|
+ currentPage.value = val
|
|
|
+ }
|
|
|
const cptSetlinfos = computed(() => {
|
|
|
return setlinfos.value.filter((item) => {
|
|
|
if (!slctSetlPrm.insutype && !slctSetlPrm.clrOptins) {
|
|
@@ -127,14 +197,14 @@ export default {
|
|
|
slctSetlPrm.begndate = formatDate(dateRange.value[0])
|
|
|
slctSetlPrm.enddate = formatDate(dateRange.value[1])
|
|
|
selectSetlinfos(slctSetlPrm)
|
|
|
- .then((res) => {
|
|
|
- setlinfos.value = res.list
|
|
|
- optins.value = res.optins
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- setlinfos.value = []
|
|
|
- optins.value = []
|
|
|
- })
|
|
|
+ .then((res) => {
|
|
|
+ setlinfos.value = res.list
|
|
|
+ optins.value = res.optins
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ setlinfos.value = []
|
|
|
+ optins.value = []
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
const bfrChkSetl = () => {
|
|
@@ -229,6 +299,74 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ const upldAllList = () => {
|
|
|
+ if (slctSetlPrm.clrType !== '21') {
|
|
|
+ ElMessage({
|
|
|
+ message: '结算类别请选择为【住院】!',
|
|
|
+ type: 'warning',
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!dateRange.value) {
|
|
|
+ ElMessage({
|
|
|
+ message: '请选择日期范围!',
|
|
|
+ type: 'warning',
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const dates = getDateRangeFormatDate(dateRange.value)
|
|
|
+ showUpldRsps.value = true
|
|
|
+ upldSetlListTimes(dates.startTime, dates.endTime, slctSetlPrm.insutype).then(() => {
|
|
|
+ ElMessage({
|
|
|
+ message: '上传完成。',
|
|
|
+ type: 'info',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const selections = ref([])
|
|
|
+ const handleSelectionChange = (val) => {
|
|
|
+ selections.value = val
|
|
|
+ }
|
|
|
+
|
|
|
+ const upldSelections = () => {
|
|
|
+ showUpldRsps.value = true
|
|
|
+ upldSetlList(selections.value).then(() => {
|
|
|
+ ElMessage({
|
|
|
+ message: '上传完成。',
|
|
|
+ type: 'info',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ const beforeCloseUpldRsps = (done) => {
|
|
|
+ percentage.value = 0
|
|
|
+ upldRsps.value = []
|
|
|
+ done()
|
|
|
+ }
|
|
|
+
|
|
|
+ const socketCallback = (data) => {
|
|
|
+ switch (data.name) {
|
|
|
+ case 'upldSetlListMessage':
|
|
|
+ upldRsps.value.push(data)
|
|
|
+ percentage.value = data.percentage
|
|
|
+ upldRsTbl.value.$refs.bodyWrapper.scrollTop = upldRsTbl.value.$refs.bodyWrapper.scrollHeight
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ onActivated(() => {
|
|
|
+ setCallback(socketCallback)
|
|
|
+ })
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
getInsutypes().then((res) => {
|
|
|
insutypes.value = res
|
|
@@ -247,12 +385,25 @@ export default {
|
|
|
setlShtcuts,
|
|
|
setlinfos,
|
|
|
cptSetlinfos,
|
|
|
+ pageSize,
|
|
|
+ currentPage,
|
|
|
+ setlDtlCheckRslt,
|
|
|
+ optins,
|
|
|
+ showSetlDtlCheckRslt,
|
|
|
+ showUpldRsps,
|
|
|
+ upldRsTbl,
|
|
|
+ upldRsps,
|
|
|
+ percentage,
|
|
|
+ cptUpldRsTxt,
|
|
|
+ upldSelections,
|
|
|
+ handleCurrentChange,
|
|
|
+ handleSizeChange,
|
|
|
getSetlInfos,
|
|
|
bfrChkSetl,
|
|
|
- optins,
|
|
|
+ upldAllList,
|
|
|
+ handleSelectionChange,
|
|
|
setlDtlCheck,
|
|
|
- setlDtlCheckRslt,
|
|
|
- showSetlDtlCheckRslt,
|
|
|
+ beforeCloseUpldRsps,
|
|
|
}
|
|
|
},
|
|
|
}
|
|
@@ -272,6 +423,6 @@ function calSumamt(list) {
|
|
|
fundSum = fundSum.toFixed(2)
|
|
|
acctSum = acctSum.toFixed(2)
|
|
|
psnCashPay = psnCashPay.toFixed(2)
|
|
|
- return {medSum, fundSum, acctSum, psnCashPay}
|
|
|
+ return { medSum, fundSum, acctSum, psnCashPay }
|
|
|
}
|
|
|
</script>
|