Files
UNION_NSI/target/classes/views/platform/zgfw/difficulty/reading.html
T
2026-09-08 19:49:21 +08:00

242 lines
12 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<div id="app" v-cloak>
<guava ref="guava">
<template>
<el-card shadow="never">
<div class="btn-group tool-button">
<div class="block">
<el-date-picker clearable value-format="yyyy-MM-dd"
v-model="pageForm._dateRange"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</div>
</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('wyh02')||@shiro.hasRole('wyh03')||@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">
<div>
<el-input placeholder="请输入内容" v-model="pageForm.searchKeyword" clearable>
<el-select v-model="pageForm.searchName" slot="prepend" placeholder="查询类型"
style="width: 140px;">
<el-option label="申请人工号" value="sqr.loginname"></el-option>
<el-option label="申请人姓名" value="sqr.username"></el-option>
</el-select>
</el-input>
</div>
</div>
<div class="btn-group tool-button">
<el-button type="primary" @click="doSearch" icon="el-icon-search"></el-button>
</div>
<div class="pull-right offscreen-right">
</div>
</el-card>
<el-card shadow="never" class="mt20">
<vi-title2 title="申请列表">
<template #func>
<!--#if(@shiro.hasRole('A06')||@shiro.hasRole('wyh02')||@shiro.hasRole('wyh03')||@shiro.hasRole('H04')||@shiro.hasRole('sysadmin')){#-->
<el-button type="primary" @click="doExcel" size="small"><i class="el-icon-download"></i>
导出word
</el-button>
<el-button type="primary" @click="doExcel2" size="small"><i class="el-icon-download"></i>
导出excel
</el-button>
<!--#}#-->
</template>
</vi-title2>
<el-table
:data="tableData"
style="width: 100%"
@sort-change="pageOrder"
>
<el-table-column label="序号" type="index" header-align="center" align="center">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" prop="sqrname"
label="申请人姓名"></el-table-column>
<el-table-column align="center" header-align="center" prop="sqrloginname"
label="工号"></el-table-column>
<el-table-column align="center" header-align="center" prop="sex"
label="性别"></el-table-column>
<el-table-column align="center" header-align="center" prop="birthday"
label="出生年月"></el-table-column>
<el-table-column sortable show-overflow-tooltip align="center"
header-align="center" prop="sqrunionname"
label="分工会"></el-table-column>
<el-table-column sortable show-overflow-tooltip align="center"
header-align="center" prop="sqrunitname"
label="单位"></el-table-column>
<el-table-column prop="lxfs" label="联系方式" header-align="center" align="center"
show-overflow-tooltip
min-width="100"></el-table-column>
<!-- <el-table-column prop="sq_knlx" label="困难类型" header-align="center"-->
<!-- align="center"-->
<!-- show-overflow-tooltip min-width="100">-->
<!-- <template slot-scope="{row}">-->
<!-- <span> {{ difficulty.sq_knlx[row.sq_knlx] }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column sortable align="center" header-align="center" prop="sqsj"
label="申请时间"></el-table-column>
<el-table-column align="center" prop="state_id" header-align="center"
label="申请状态" sortable>
<template scope="scope">
<span :style="'color:'+scope.row.statecolor">{{scope.row.state_name}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" fixed="right"
width="120px">
<template slot-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:'downloadAnnex',data:row}">
下载
</el-dropdown-item>
<el-dropdown-item :disabled="row.zt!=500"
:command="{type:'export',data:row}">
导出备案表
</el-dropdown-item>
<el-dropdown-item :disabled="row.zt!=500"
:command="{type:'doExport',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],
components: {
'info': httpVueLoader('/components/difficulty/info.vue'),
},
data() {
return {
unions: [],
units: [],
pageForm: {
unitId: '',
unionId: '',
unit: "",
year: "",
searchName: "sqr.username"
},
unitOptions: [],
}
},
methods: {
doSearch() {
this.tabKey = new Date().getTime()
this.pageForm.pageNumber = 1
if (this.pageForm._dateRange && this.pageForm._dateRange.length) {
this.pageForm.dateRange = JSON.stringify(this.pageForm._dateRange)
} else {
this.pageForm.dateRange = ""
}
this.pageData()
},
dropdownCommand(command) {
const {type, data} = command
if (type == 'view') {
this.openView(data)
} else if (type == 'downloadAnnex') {
window.location.href = "/platform/fw/difficulty/reading/downloadAnnex?id=" + data.id
} else if (type == 'doExport') {
window.location.href = "/platform/fw/difficulty/reading/doExport?id=" + data.id
} else if (type == 'export') {
window.location.href = "/platform/fw/difficulty/reading/export?id=" + data.id
}
},
openView(row) {
const {id} = row
this.$refs.info.getInfo(id)
this.$refs.guava.view()
},
doExcel() {
const {unionId, unitId, _dateRange,searchName,searchKeyword} = this.pageForm
// window.open("/platform/fw/difficulty/reading/doExcel?dateRange=" + JSON.stringify(_dateRange)
// + "&unionId=" + unionId + "&unitId=" + unitId)
window.open("/platform/fw/difficulty/reading/exportDifficult?dateRange=" + JSON.stringify(_dateRange)
+ "&unionId=" + unionId + "&unitId=" + unitId+"&searchName="+searchName+"&searchKeyword="+searchKeyword)
},
doExcel2() {
const {unionId, unitId, _dateRange} = this.pageForm
// window.open("/platform/fw/difficulty/reading/doExcel?dateRange=" + JSON.stringify(_dateRange)
// + "&unionId=" + unionId + "&unitId=" + unitId)
window.open("/platform/fw/difficulty/reading/doExcel2?dateRange=" + JSON.stringify(_dateRange)
+ "&unionId=" + unionId + "&unitId=" + unitId)
},
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.unions = await getUnions()
this.flushUnits()
}
})
</script>
<!--#
}
#-->