first commit
This commit is contained in:
@@ -0,0 +1,279 @@
|
||||
<!--#
|
||||
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" v-cloak>
|
||||
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<div class="btn-group tool-button">
|
||||
<el-date-picker
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy" style="width: 150px"
|
||||
placeholder="选择年">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
<div class="btn-group tool-button">
|
||||
<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 class="btn-group tool-button">
|
||||
<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 class="btn-group tool-button">
|
||||
<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 class="btn-group tool-button">
|
||||
<el-select v-model="pageForm.type" placeholder="请选择慰问类型" clearable>
|
||||
<el-option v-for="item in typeOptions" :value="item.id"
|
||||
:label="item.name+' ('+item.money+')'"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="btn-group tool-button">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch"></el-button>
|
||||
</div>
|
||||
|
||||
<!-- <div class="pull-right offscreen-right">-->
|
||||
<!-- <el-button @click="doExportSummary" icon="el-icon-printer"-->
|
||||
<!-- type="primary">-->
|
||||
<!-- 导出申报人汇总xlsx-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </div>-->
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<vi-title2 title="申请列表">
|
||||
<template #func>
|
||||
<el-button @click="doExportSummary" icon="el-icon-printer"
|
||||
size="small"
|
||||
type="primary">
|
||||
导出申报人汇总xlsx
|
||||
</el-button>
|
||||
</template>
|
||||
</vi-title2>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
v-loading="tabLoading">
|
||||
<el-table-column align="center" header-align="center" label="序号" width="120px">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="慰问对象" prop="be_username" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="慰问对象工号" prop="be_loginname" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="申请人" prop="sqr_username" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip label="所在工会" prop="be_unionname"
|
||||
header-align="center"
|
||||
sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip label="所在单位" prop="be_unitname"
|
||||
header-align="center"
|
||||
sortable
|
||||
align="center"></el-table-column>
|
||||
<el-table-column show-overflow-tooltip label="联系方式" prop="mobile"
|
||||
header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="慰问类型" prop="type_name" header-align="center" sortable
|
||||
align="center">
|
||||
<template scope="{row}">
|
||||
{{row.type_name}}({{row.money}})
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="慰问方式" prop="way" header-align="center"
|
||||
align="center"></el-table-column>-->
|
||||
<!--<el-table-column label="随从人员" prop="personnel" header-align="center" sortable
|
||||
align="center"></el-table-column>-->
|
||||
<el-table-column label="申请时间" prop="apply_time" header-align="center" sortable
|
||||
align="center" width="200px"></el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="state_id" header-align="center"
|
||||
label="申请状态" sortable>
|
||||
<template scope="scope">
|
||||
<span :style="'color:'+scope.row.state_color">{{scope.row.state_name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="state_id" header-align="center"
|
||||
label="是否导出" sortable>
|
||||
<template scope="scope">
|
||||
<span v-if="scope.row.exportdocumentno" class="text-success">
|
||||
是
|
||||
</span>
|
||||
<span v-else class="text-danger">否</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:'exportReceipt',data:row}">
|
||||
导出领据
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'exportFiles',data:row}">
|
||||
导出申请附件
|
||||
</el-dropdown-item>
|
||||
|
||||
<!-- <el-dropdown-item-->
|
||||
<!-- :command="{type:'export',data:row}">-->
|
||||
<!-- 导出慰问登记表-->
|
||||
<!-- </el-dropdown-item>-->
|
||||
<!--<el-dropdown-item :disabled="row.state_id!=2040"
|
||||
:command="{type:'Print',data:row}">
|
||||
打印
|
||||
</el-dropdown-item>-->
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<info ref="info"></info>
|
||||
</template>
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
typeOptions: [],
|
||||
tabLoading: false,
|
||||
tableData: [],
|
||||
pageForm: {
|
||||
year: new Date().getFullYear() + "",
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
type: '',
|
||||
searchName: 'be.username',
|
||||
},
|
||||
unions: [],
|
||||
units: [],
|
||||
}
|
||||
},
|
||||
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?v=1.0.1'),
|
||||
},
|
||||
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)
|
||||
} else if (type == 'exportReceipt') {
|
||||
if (!['D', 'E', 'F', 'G', 'H', 'I', 'J'].includes(data.code)) {
|
||||
this.notifyWarning('只有住院和去世类型才可导出领据')
|
||||
return
|
||||
}
|
||||
window.open(loc() + '/exportReceipt?id=' + data.id)
|
||||
} else if (type == 'exportFiles') {
|
||||
window.open(loc() + '/exportFiles?id=' + data.id)
|
||||
}
|
||||
},
|
||||
doExportSummary() {
|
||||
const {unionId, unitId, year, type} = this.pageForm
|
||||
window.open(loc() + "/doExportSummary?unionId=" + unionId +
|
||||
"&unitId=" + unitId +
|
||||
"&year=" + year +
|
||||
"&type=" + type)
|
||||
},
|
||||
openView(row) {
|
||||
const {id} = row
|
||||
this.$refs.info.getInfo(id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
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 getTypeOptions() {
|
||||
const {code, data} = await $.get("/platform/condolence/type/getAll")
|
||||
if (code == 0) {
|
||||
this.typeOptions = data
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData();
|
||||
this.getTypeOptions()
|
||||
this.unions = await getUnions()
|
||||
this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user