Files
2026-09-08 19:49:21 +08:00

285 lines
13 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<style>
</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 type="daterange" style="width: 100%" range-separator="——"
v-model="pageForm.reimbursementDate"
value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期"
end-placeholder="结束日期"></el-date-picker>
</div>
</div>
<div class="search-item">
<div class="search-item-label">&emsp13;&emsp13;人:</div>
<div class="search-item-option">
<el-input @keyup.enter.native="doSearch" clearable placeholder="请输入内容"
v-model="pageForm.searchKeyword">
<el-select placeholder="查询类型" slot="prepend" style="width: 100px;"
v-model="pageForm.searchName">
<el-option label="姓名" value="rei.userName"></el-option>
<el-option label="工号" value="rei.loginName"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属工会:</div>
<div class="search-item-option">
<el-select @change="flushUnits" @clear="flushUnits" clearable="true"
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.unionname" :value="item.id" v-for="item in unions"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">所属单位:</div>
<div class="search-item-option">
<el-select clearable="true" filterable="true" placeholder="所属单位"
style="width: 100%;"
v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id" v-for="item in units"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">报销项目:</div>
<div class="search-item-option">
<el-select clearable style="width: 100%" v-model="pageForm.reiItemId">
<el-option value="ww" label="慰问"></el-option>
<el-option value="fyhd" label="活动"></el-option>
<el-option value="fyjj" label="建家"></el-option>
<el-option value="fyrc" label="日常"></el-option>
<el-option value="zflw" label="劳务"></el-option>
<el-option value="zfzj" label="专家"></el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">经费来源:</div>
<div class="search-item-option">
<el-select clearable style="width: 100%" v-model="pageForm.jf_source">
<el-option value="1" label="校工会"></el-option>
<el-option value="2" label="分工会"></el-option>
<el-option value="3" label="社团"></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="doExportUserExcel" size="mini" type="primary">导出汇总名单
</el-button>
</template>
</table-tool>
<el-row class="el-table-container">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id" style="width: 100%"
v-loading="tabLoading">
<el-table-column :index="indexMethod" align="center" header-align="center" label="序号"
type="index"
width="80px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
align="center"
header-align="center"
v-for="column in tableColumns"
show-overflow-tooltip>
<template scope="{row}" v-if="column.prop=='stateId'">
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='reimbursementItemSort'">
{{row.reimbursementItemSort==='fy'?'费用报销':'支付报销'}}
</template>
<template scope="{row}" v-else-if="column.prop=='description'">
<span>{{row.activity_name!=null?'活动名称:'+row.activity_name:'被慰问人:'+row.be_username}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='money'">
<span>{{row.money}}元</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作" width="150px">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button :loading="row.loading" size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{type:'view',data:row}">
查看
</el-dropdown-item>
<el-dropdown-item
:command="{type:'export',data:row}">
打印
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
</el-row>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #view>
<!-- <activity-bx-info ref="act_info" v-show="reimbursementItemId!=4"></activity-bx-info>
<info ref="info" v-show="reimbursementItemId==4"></info>-->
<reimbursement-new ref="rei_info"></reimbursement-new>
</template>
</guava>
</div>
<script>
var vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
reimbursementItemId: "",
unions: [],
units: [],
tabLoading: false,
userOptions: [],
formData: {},
tableData: [],
typeOptions: [],
pageForm: {
reimbursementDate: [],
searchName: "rei.userName",
searchKeyword: '',
unionId: '',
unitId: '',
reiItemId: '',
isAudit: false,
},
formRules: {
auditOpinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
opinion: [{required: true, message: '必填', trigger: ['blur', 'change']}],
},
tableColumns: [
{prop: 'loginName', label: '经办人工号', sortable: true},
{prop: 'userName', label: '姓名', sortable: true},
{prop: 'unionName', label: '所属工会', sortable: true},
{prop: 'unitName', label: '所属单位', sortable: true},
{prop: 'applyTime', label: '申请时间', sortable: true},
{prop: 'reimbursementItemSort', label: '报销类别', sortable: true},
{prop: 'reimbursementItemName', label: '报销项目', sortable: true},
{prop: 'description', label: '备注'},
{prop: 'money', label: '金额'},
{prop: 'stateId', label: '申请状态', sortable: true}
],
subDis: false,
subLoading1: false,
subLoading2: false,
subLoading3: false,
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
'sign': httpVueLoader('/components/sign/sign.vue?v=2.0.0'),
'info': httpVueLoader('/components/condolence/Info.vue'),
'activity-bx-info': httpVueLoader('/components/activityBx/ActivityBxInfo.vue'),
'reimbursement-new': httpVueLoader('/components/reimbursement/reimbursementNew.vue'),
},
methods: {
doExportUserExcel() {
const {searchKeyword, searchName, unionId, unitId, reiItemId, reimbursementDate} = this.pageForm
window.open(loc() + "/doExportUserExcel?searchKeyword=" + searchKeyword + "&searchName=" + searchName + "&unionId=" + unionId + "&unitId" + unitId + "&reiItemId=" + reiItemId + "&reimbursementDate=" + JSON.stringify(reimbursementDate))
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'export') {
this.export(data)
}
},
export(data) {
const {reimbursementItemId, id} = data
if (reimbursementItemId != 4) {
window.open("/platform/reimbursement/Summary/reiExport?id=" + id + "&Print=true")
} else {
window.open("/platform/reimbursement/Summary/reiExport?id=" + id + "&Print=true")
}
},
openView(row) {
/* const {reimbursementId, reimbursementItemId} = row
this.reimbursementItemId = reimbursementItemId
if (reimbursementItemId != 4) {
this.$refs.act_info.getActInfo(reimbursementId)
} else {
this.$refs.info.getInfo(reimbursementId)
}*/
this.$refs.rei_info.getInfo(row.id)
this.$refs.guava.view()
},
async flushUnits() {
this.$set(this.pageForm, "unitId", "")
this.units = await getUnits(this.pageForm.unionId)
this.doSearch()
},
pageData() {//加载分页数据
sublime.showLoadingbar();//显示loading
this.tabLoading = true
const pageForm = clone(this.pageForm)
pageForm.reimbursementDate = JSON.stringify(pageForm.reimbursementDate)
$.post(loc() + "/pageData", pageForm, (data) => {
sublime.closeLoadingbar();//关闭loading
this.tabLoading = false
if (data.code == 0) {
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message.error(data.msg);
}
}, "json");
},
},
async created() {
this.pageData();
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('wyh02')||@shiro.hasRole('wyh03')||@shiro.hasRole('xghkj')}" === 'true') {
this.unions = await getUnionList()
} else {
this.unions = await getUnionList("${@shiro.getPrincipalProperty('unit').getUnionid()}")
this.pageForm.unionId = this.unions[0].id
}
this.flushUnits()
}
})
</script>
<!--#
}
#-->