187 lines
8.2 KiB
HTML
187 lines
8.2 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
|
|
<div id="app" v-cloak>
|
|
<guava ref="guava">
|
|
<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
|
|
@change="doSearch"
|
|
formData="yyyy"
|
|
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-select @change="doSearch" 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-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="申报列表">
|
|
</table-tool>
|
|
|
|
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
|
class="vi-table"
|
|
ref="table"
|
|
row-key="id" style="width: 100%" v-loading="tableLoading">
|
|
<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"
|
|
show-overflow-tooltip
|
|
v-for="column in tableColumns"
|
|
>
|
|
<template scope="{row}" v-if="column.prop === 'applyDate'">
|
|
<span>{{ moment(row.applyDate).format('YYYY年MM月DD日') }}</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column align="center" fixed="right" header-align="center" label="操作"
|
|
width="280px">
|
|
<template scope="{row}">
|
|
<el-button @click="openView(row)"
|
|
size="mini"
|
|
type="primary"
|
|
v-if="!['10000'].includes(row.state) && row.state">查看
|
|
</el-button>
|
|
<el-button @click="openExport(row.id)"
|
|
size="mini"
|
|
type="primary"
|
|
v-if="row.state">申报表导出
|
|
</el-button>
|
|
<el-button @click="openEdit(row)"
|
|
size="mini"
|
|
type="primary"
|
|
v-if="['10000','10015','10025'].includes(row.state) || !row.state">
|
|
编辑
|
|
</el-button>
|
|
<el-button @click="doDelete(row)"
|
|
size="mini"
|
|
type="danger"
|
|
v-if="['10000'].includes(row.state) || !row.state">删除
|
|
</el-button>
|
|
<el-button @click="doDelete(row)"
|
|
size="mini"
|
|
type="danger"
|
|
v-if="!['10000'].includes(row.state) && row.state && (${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')})">
|
|
删除
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
</template>
|
|
|
|
|
|
<template #view>
|
|
<wakes-info-apply ref="viewInfo"></wakes-info-apply>
|
|
</template>
|
|
</guava>
|
|
</div>
|
|
|
|
<script>
|
|
const vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {
|
|
unions: [],
|
|
pageForm: {
|
|
isAudit: false,
|
|
year: moment().format('YYYY'),
|
|
},
|
|
tableColumns: [
|
|
{prop: 'unionName', label: '申报工会', sortable: true},
|
|
{prop: 'username', label: '申报人', sortable: true},
|
|
{prop: 'loginName', label: '申报人工号', sortable: true},
|
|
{prop: 'mobile', label: '联系方式', sortable: true},
|
|
// {prop: 'basicInformation', label: '基本情况简介', sortable: true},
|
|
{prop: 'applyDate', label: '申报日期', sortable: true},
|
|
{prop: 'stateName', label: '审核状态', sortable: true},
|
|
],
|
|
}
|
|
},
|
|
components: {
|
|
'guava': httpVueLoader('/components/plugins/Guava.vue'),
|
|
'wakes-info-apply': httpVueLoader('/components/wakeshome/declaration/WakesHomeInfoApply.vue')
|
|
},
|
|
methods: {
|
|
openExport(id) {
|
|
window.open(loc() + "/openExport?id=" + id)
|
|
},
|
|
openView(row) {
|
|
this.$refs.guava.view()
|
|
this.$refs.viewInfo.openView(row.id)
|
|
},
|
|
async doDelete(row) {
|
|
this.$confirm('确定删除该申报记录吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(async () => {
|
|
const resp = await $.get(loc() + '/doDelete', {id: row.id})
|
|
if (resp.code === 0) {
|
|
this.$message.success(resp.msg)
|
|
this.pageData();
|
|
} else {
|
|
this.$message.warning(resp.msg)
|
|
}
|
|
})
|
|
},
|
|
openEdit(row) {
|
|
window.location.href = '/platform/wakeshome/declaration/apply?id=' + row.id;
|
|
},
|
|
async flushUnits() {
|
|
this.$set(this.pageForm, "unitId", null)
|
|
this.units = []
|
|
if (this.pageForm.unionId) {
|
|
this.units = await getUnits(this.pageForm.unionId)
|
|
}
|
|
},
|
|
},
|
|
async created() {
|
|
if ("${@shiro.hasRole('sysadmin')||@shiro.hasRole('A06')||@shiro.hasRole('H03')}" === 'true') {
|
|
this.unions = await getUnions(null, false)
|
|
} else {
|
|
this.unions = await getUnions(null, true)
|
|
this.$set(this.pageForm, 'unionId', this.unions ? this.unions[0].id : null)
|
|
this.flushUnits()
|
|
}
|
|
this.pageData();
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#-->
|