Files
zhgh_hhu/target/classes/views/platform/sickHelp/medicalIns/index.html
T
2026-09-24 09:56:49 +08:00

338 lines
11 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<style>
.table-error-row {
color: #f00 !important;
}
.medical-import-dialog .import-container {
padding: 0 10px;
}
.medical-import-dialog .import-warnings {
margin-bottom: 20px;
}
.medical-import-dialog .warning-list {
margin: 8px 0 0 20px;
padding: 0;
line-height: 1.8;
}
.medical-import-dialog .warning-list li {
list-style-type: decimal;
}
.medical-import-dialog .warning-list .important {
color: #e6a23c;
font-weight: bold;
list-style-type: none;
margin-top: 8px;
}
.medical-import-dialog .upload-area {
padding: 20px;
border: 1px dashed #dcdfe6;
border-radius: 4px;
background-color: #f5f7fa;
}
.medical-import-dialog .upload-area:hover {
border-color: #c0c4cc;
}
.medical-import-dialog .import-results {
margin-top: 20px;
}
.medical-import-dialog .result-card {
border: none;
}
.medical-import-dialog .result-header {
font-weight: bold;
font-size: 16px;
}
.medical-import-dialog .result-content {
font-size: 14px;
}
.medical-import-dialog .result-item {
margin-bottom: 10px;
}
.medical-import-dialog .result-item:last-child {
margin-bottom: 0;
}
.medical-import-dialog .result-label {
color: #606266;
}
.medical-import-dialog .result-value {
font-weight: bold;
position: relative;
padding-right: 20px;
}
.medical-import-dialog .result-value.success {
color: #67c23a;
}
.medical-import-dialog .result-value.warning {
color: #e6a23c;
}
.medical-import-dialog .download-icon {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
color: #409EFF;
font-size: 16px;
margin-left: 5px;
}
.medical-import-dialog .download-icon:hover {
color: #66b1ff;
}
.medical-import-dialog .mb-10 {
margin-bottom: 10px;
}
.medical-import-dialog .mt10 {
margin-top: 10px;
}
.medical-import-dialog .template-download {
margin-bottom: 15px;
display: flex;
align-items: center;
gap: 10px;
}
.medical-import-dialog .template-tip {
color: #909399;
font-size: 12px;
}
</style>
<div id="app" v-cloak>
<guava ref="guava">
<el-card shadow="never">
<div class="search">
<div class="search-item">
<div class="search-item-label">年度:</div>
<div class="search-item-option">
<el-date-picker
placeholder="选择年度"
style="width: 100%"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">关键字:</div>
<div class="search-item-option">
<el-input clearable placeholder="可输入工号、姓名、身份证号查询"
v-model.trim="pageForm.searchKeyword"></el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">数据检查:</div>
<div class="search-item-option">
<el-select v-model="pageForm.dataCheck" clearable style="width: 100%" placeholder="请选择">
<el-option label="医保数据匹配失败记录" value="1"></el-option>
<el-option label="学习二次报销数据匹配失败记录" value="2"></el-option>
</el-select>
</div>
</div>
<div class="search-query">
<el-button @click="doSearch" icon="el-icon-search" type="primary">搜索</el-button>
</div>
</div>
</el-card>
<el-card class="mt10" shadow="never">
<table-tool :app="this" label="补助列表">
<template #func>
<el-button @click="$refs.insImportRef.onOpen()" size="small" type="primary">① 导入医保数据
</el-button>
<el-button @click="openEc" size="small" type="primary">② 导入学校二次报销数据
</el-button>
<el-button @click="exportXlsx" size="small" type="primary">导出汇总表</el-button>
<el-button @click="doCalculate" size="small" type="primary">计算补助数据</el-button>
</template>
</table-tool>
<el-table :data="tableData"
:size="tableSize"
@sort-change="pageOrder"
align="center"
header-align="center">
<el-table-column align="center" header-align="center" label="序号" type="index" width="80" fixed="left">
<template scope="scope">
<span>{{ scope.$index + (pageForm.pageNumber - 1) * pageForm.pageSize + 1 }} </span>
</template>
</el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
:formatter="column.prop === 'calc' ? formatCalc : undefined"
align="center"
header-align="center"
:fixed="column.fixed"
show-overflow-tooltip
v-for="column in tableColumns"
>
</el-table-column>
<el-table-column label="操作" align="center" header-align="center" fixed="right" width="200">
<template scope="scope">
<el-button @click="onEdit(scope.row)" size="mini" type="primary">编辑</el-button>
<el-button @click="onDelete(scope.row.id)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</guava>
<ins-import ref="insImportRef" @refresh="doSearch"></ins-import>
<ec-import ref="ecImportRef" @refresh="doSearch"></ec-import>
<ins-form ref="insFormRef" @refresh="doSearch"></ins-form>
</div>
<script>
<!--#include('insImport.js'){}#-->
<!--#include('insForm.js'){}#-->
<!--#include('ecImport.js'){}#-->
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
components: {
"ins-import": insImport,
"ec-import": ecImport,
"ins-form": insForm
},
data() {
return {
tableColumns: [
{prop: 'userName', label: '姓名'},
{prop: 'loginName', label: '工号'},
{prop: 'idCard', label: '身份证号', width: 200},
{prop: 'zhzl', label: '账户自理'},
{prop: 'zhzf', label: '账户自付'},
{prop: 'xjzl', label: '现金自理'},
{prop: 'xjzf', label: '现金自付'},
{prop: 'sxzf', label: '个人自付、个人自理'},
{prop: 'lxzf', label: '个人自付'},
{prop: 'ecbx', label: '学校二次报销金额'},
{prop: 'calc', label: '补助计算金额'},
],
pageForm: {
year: (new Date().getFullYear() - 1).toString()
}
}
},
methods: {
// 补助金额未写入时仅在列表显示 0,保留数据库原值供其他流程判断。
formatCalc(row, column, value) {
return value == null ? 0 : value
},
openEc() {
$.post('/platform/sickHelp/medicalIns/checkIns').then(res => {
if (res.code === 0) {
this.$refs.ecImportRef.onOpen()
} else {
this.$message.error(res.msg)
}
})
},
onEdit(row) {
this.$refs.insFormRef.onOpen(row)
},
onDelete(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
$.post(loc() + '/delete', {id: id}).then(res => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
} else {
this.$message.error(res.msg)
}
})
})
},
async doCalculate() {
const {code, msg} = await $.post(loc() + '/checkIns')
if (code === 0) {
$.post(loc() + '/checkEc').then(res => {
if (res.code === 0) {
this.$confirm('计算补助金额将会自动过滤掉补助计算金额不超过10000元的记录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
sublime.jumpPagePjax('/platform/sickHelp/importByExcel?mode=ins')
}).catch(() => {
});
} else {
this.$message.error(res.msg)
}
})
} else {
this.$message.error(msg)
}
},
exportXlsx() {
const {year} = this.pageForm
if (!year) {
this.$message.error('请选择年份')
return
}
window.open(loc() + '/exportXlsx?year=' + year)
},
tableRowClassName({row, rowIndex}) {
if (!row.loginName || row.loginName === '' || row.loginName === undefined) {
return 'table-error-row'
}
// if (row.loginName && ( !row.ecbx || row.ecbx === '' || row.ecbx === undefined)) {
// return 'table-error-row'
// }
return '';
}
},
created() {
this.pageData()
}
})
</script>
<!--#
}
#-->