first commit
This commit is contained in:
@@ -0,0 +1,172 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.descriptions-form .el-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava" v-model="guavaIndex">
|
||||
<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
|
||||
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-input v-model="pageForm.searchKeyword" clearable maxlength="10"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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
|
||||
@change="flushUnits" @clear="flushUnits"
|
||||
filterable>
|
||||
<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%;"
|
||||
@change="getThreeUnits"
|
||||
clearable
|
||||
filterable>
|
||||
<el-option v-for="item in units" :label="item.name" :value="item.id"></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>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize"
|
||||
@sort-change="pageOrder" header-align="center">
|
||||
<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="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
:width="column.width"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-if="column.prop==='stateName'" scope="{row}">
|
||||
{{row.state.stateName}}
|
||||
</template>
|
||||
|
||||
<template v-else-if="column.prop==='subsidyType'" scope="{row}">
|
||||
{{projectInfo.filter(v=>row.subsidyType.includes(v.id)).map(v=>v.projectName).join('、')}}
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openView(row.id)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #view>
|
||||
<process-info ref="processView" v-if="guavaIndex === 'view'"></process-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'process-info': httpVueLoader('/components/swufeDifficultSubsidy/processInfo.vue'),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{prop: 'userName', label: '姓名', sortable: true},
|
||||
{prop: 'loginName', label: '工号', sortable: true},
|
||||
{prop: 'unitName', label: '部门', sortable: true},
|
||||
{prop: 'mobile', label: '联系方式', sortable: true},
|
||||
{prop: 'subsidyType', label: '补助类别', sortable: true},
|
||||
{prop: 'applyDate', label: '申请日期', sortable: true},
|
||||
{prop: 'subsidyAmount', label: '补助金额', sortable: true},
|
||||
],
|
||||
pageForm: {},
|
||||
projectInfo: [],
|
||||
unions: [],
|
||||
units: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(id) {
|
||||
this.$refs.guava.view()
|
||||
this.$nextTick(async () => {
|
||||
await httpVueLoader('/components/swufeDifficultSubsidy/processInfo.vue')()
|
||||
this.$refs.processView.getApplyInfo(id)
|
||||
})
|
||||
},
|
||||
async getProjectInfo() {
|
||||
const resp = await $.post('/platform/difficultSubsidy/common/projectInfo')
|
||||
if (resp.code === 0) {
|
||||
this.projectInfo = resp.data
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.units = []
|
||||
if (this.pageForm.unionId) {
|
||||
this.units = await getUnits(this.pageForm.unionId)
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
async created() {
|
||||
this.unions = await getUnions(null, false)
|
||||
this.getProjectInfo()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user