265 lines
11 KiB
HTML
265 lines
11 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<style>
|
|
input[type="file"] {
|
|
display: none
|
|
}
|
|
|
|
.el-input-number input {
|
|
text-align: left !important;
|
|
}
|
|
|
|
.el-input-number__decrease, .el-input-number__increase {
|
|
display: none;
|
|
}
|
|
|
|
</style>
|
|
<div id="app" class="platform" v-cloak>
|
|
|
|
<guava ref="guava" padding="0% 5%">
|
|
<template>
|
|
<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
|
|
v-model="pageForm.year"
|
|
type="year"
|
|
value-format="yyyy" style="width: 100%"
|
|
placeholder="选择年">
|
|
</el-date-picker>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="search-item">
|
|
<div class="search-item-label">被慰问人:</div>
|
|
<div class="search-item-option">
|
|
<el-input placeholder="请输入内容" clearable v-model="pageForm.searchKeyword"
|
|
@keyup.enter.native="doSearch">
|
|
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
|
|
style="width: 140px;">
|
|
<el-option label="被慰问人姓名" value="be.username"></el-option>
|
|
<el-option label="被慰问人工号" value="be.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 v-model="pageForm.type" placeholder="请选择慰问类型" clearable style="width: 100%;">
|
|
<el-option v-for="item in typeOptions" :value="item.id"
|
|
:label="item.name+' ('+item.code+')'"></el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
|
|
<template v-if="searchMore">
|
|
|
|
<div class="search-item">
|
|
<div class="search-item-label">所属工会:</div>
|
|
<div class="search-item-option">
|
|
<el-select placeholder="所属工会" v-model="pageForm.unionId" style="width: 100%;"
|
|
clearable="true"
|
|
@change="flushUnits" @clear="flushUnits"
|
|
|
|
v-if="${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}"
|
|
|
|
filterable="true">
|
|
<el-option v-for="item in unions" :label="item.unionname"
|
|
:value="item.id"></el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="search-item">
|
|
<div class="search-item-label">所属单位:</div>
|
|
<div class="search-item-option">
|
|
<el-select placeholder="所属单位" v-model="pageForm.unitId" style="width: 100%;"
|
|
clearable="true"
|
|
filterable="true">
|
|
<el-option v-for="item in units" :label="item.name" :value="item.id"></el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="search-item">
|
|
<div class="search-item-label">慰问方式:</div>
|
|
<div class="search-item-option">
|
|
<el-select v-model="pageForm.way" placeholder="请选择慰问方式" clearable style="width: 100%;">
|
|
<el-option
|
|
v-for="(v,k) in condolence.way"
|
|
:key="k"
|
|
:label="v"
|
|
:value="v">
|
|
</el-option>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
<div class="search-query">
|
|
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索</el-button>
|
|
<more v-model="searchMore"></more>
|
|
</div>
|
|
|
|
</div>
|
|
</el-card>
|
|
|
|
|
|
<el-card shadow="never" class="mt10">
|
|
<table-tool label="慰问列表" :app="this"></table-tool>
|
|
|
|
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder"
|
|
v-loading="tableLoading" :size="tableSize" class="vi-table">
|
|
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
|
|
width="80px"></el-table-column>
|
|
|
|
<el-table-column
|
|
align="center"
|
|
header-align="center"
|
|
v-for="column in tableColumns"
|
|
show-overflow-tooltip
|
|
:label="column.label"
|
|
:prop="column.prop"
|
|
:sortable="column.sortable"
|
|
>
|
|
<template v-if="column.prop=='state_id'" scope="{row}">
|
|
<span :style="'color:'+row.state_color">{{row.state_name}}</span>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" header-align="center" label="操作" fixed="right" width="150px">
|
|
<template scope="{row}">
|
|
|
|
<el-dropdown @command="dropdownCommand">
|
|
<el-button plain 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:'doExport',data:row}">
|
|
导出报销表
|
|
</el-dropdown-item>
|
|
<el-dropdown-item :disabled="row.state_id!=2080"
|
|
:command="{type:'export',data:row}">
|
|
导出备案表
|
|
</el-dropdown-item>
|
|
<el-dropdown-item :disabled="row.state_id!=2080"
|
|
:command="{type:'Print',data:row}">
|
|
打印
|
|
</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
|
|
</el-card>
|
|
|
|
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</template>
|
|
<template #edit>
|
|
|
|
</template>
|
|
<template #view>
|
|
<info ref="info"></info>
|
|
</template>
|
|
</guava>
|
|
|
|
</div>
|
|
<script>
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {
|
|
tabLoading: false,
|
|
tableData: [],
|
|
pageForm: {
|
|
year: new Date().getFullYear() + ""
|
|
},
|
|
unions: [],
|
|
units: [],
|
|
typeOptions: [],
|
|
tableColumns: [
|
|
{prop: 'be_username', label: '被慰问人'},
|
|
{prop: 'be_loginname', label: '被慰问人工号'},
|
|
{prop: 'sqr_username', label: '申请人'},
|
|
{prop: 'be_unionname', label: '所在工会'},
|
|
{prop: 'be_unitname', label: '所在单位',},
|
|
{prop: 'type_name', label: '慰问类型', sortable: true},
|
|
{prop: 'way', label: '慰问方式', sortable: true},
|
|
{prop: 'personnel', label: '随从人员', sortable: true},
|
|
{prop: 'apply_time', label: '申请时间', sortable: true},
|
|
{prop: 'state_id', label: '申请状态', sortable: true},
|
|
],
|
|
}
|
|
},
|
|
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'),
|
|
},
|
|
methods: {
|
|
dropdownCommand(command) {
|
|
const {type, data} = command
|
|
if (type == 'view') {
|
|
this.openView(data)
|
|
} else if (type == 'doExport') {
|
|
condolence.doExport(data.id)
|
|
} else if (type == 'export') {
|
|
condolence.export(data.id)
|
|
} else if (type == 'Print') {
|
|
condolence.doPrint(data.id)
|
|
}
|
|
},
|
|
openView(row) {
|
|
const {id} = row
|
|
this.$refs.info.getInfo(id)
|
|
this.$refs.guava.view()
|
|
},
|
|
async getTypeOptions() {
|
|
const {code, data} = await $.get("/platform/condolence/type/getAll")
|
|
if (code == 0) {
|
|
this.typeOptions = data
|
|
}
|
|
},
|
|
async flushUnits() {
|
|
this.$set(this.pageForm, "unitId", "")
|
|
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
|
this.units = await getUnits(this.pageForm.unionId)
|
|
} else {
|
|
this.units = await getUnits("${@shiro.getPrincipalProperty('unit').getUnionid()}")
|
|
}
|
|
},
|
|
},
|
|
async created() {
|
|
this.pageData();
|
|
this.getTypeOptions()
|
|
this.unions = await getUnions()
|
|
this.flushUnits()
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#--> |