first commit
This commit is contained in:
@@ -0,0 +1,208 @@
|
||||
<!--#
|
||||
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
|
||||
placeholder="选择年度"
|
||||
type="year"
|
||||
@change="doSearch"
|
||||
style="width: 100%"
|
||||
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 v-model="pageForm.projectId" placeholder="请选择项目名称"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
@change="doSearch();"
|
||||
filterable="true">
|
||||
<el-option v-for="o in projectList"
|
||||
:label="o.projectName"
|
||||
:value="o.id"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">申报人:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入内容" @keyup.enter.native="doSearch">
|
||||
<el-select slot="prepend" v-model="pageForm.searchName" placeholder="查询类型"
|
||||
style="width: 120px;">
|
||||
<el-option label="申报人姓名" value="u.username"></el-option>
|
||||
<el-option label="申报人工号" value="u.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 placeholder="请选择所属工会" v-model="pageForm.unionId"
|
||||
style="width: 100%;"
|
||||
clearable
|
||||
@change="doSearch();"
|
||||
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-input @keyup.enter.native="doSearch" clearable
|
||||
placeholder="请输入申报金额"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.subsidyAmount">
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">审批金额:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input @keyup.enter.native="doSearch" clearable
|
||||
placeholder="请输入审批金额"
|
||||
style="width: 100%"
|
||||
v-model="pageForm.auditAmount">
|
||||
</el-input>
|
||||
</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>
|
||||
<el-button size="mini" type="primary" @click="doExport">申报表导出(全部)</el-button>
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" @sort-change="pageOrder" ref="table">
|
||||
<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"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="280px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="doExport(row)">申报表导出</el-button>
|
||||
<el-button size="mini" type="primary" @click="openView(row)">查看</el-button>
|
||||
<el-button size="mini" type="danger" @click="doDelete(row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<project-funding-info ref="viewInfo"></project-funding-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
pageForm:{
|
||||
year:moment().format('YYYY'),
|
||||
isAudit: 'false',
|
||||
},
|
||||
formData:{},
|
||||
tableColumns:[
|
||||
{label: '项目名称', prop: 'projectName', sortable: true},
|
||||
{label: '申报工会', prop: 'unionName', sortable: true},
|
||||
{label: '工会人数', prop: 'unionPeoNum', sortable: true},
|
||||
{label: '工会主席', prop: 'unionLeader', sortable: true},
|
||||
{label: '申报人', prop: 'username', sortable: true},
|
||||
{label: '申报金额', prop: 'subsidyAmount', sortable: true},
|
||||
{label: '审批金额', prop: 'auditAmount', sortable: true},
|
||||
{label: '状态', prop: 'stateName', sortable: true},
|
||||
{label: '申报日期', prop: 'auditTime', sortable: true},
|
||||
],
|
||||
unions:[],
|
||||
projectList:[],
|
||||
}
|
||||
},
|
||||
components:{
|
||||
'project-funding-info': httpVueLoader('/components/projectfunding/projectInfo.vue'),
|
||||
},
|
||||
methods: {
|
||||
openView(row){
|
||||
this.$refs.guava.view()
|
||||
this.$refs.viewInfo.showInfo(row.id)
|
||||
},
|
||||
async doDelete(row) {
|
||||
const confirm = await this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post('/platform/projectfunding/myDeclare/doDelete', {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.$notify.success(resp.msg);
|
||||
this.pageData();
|
||||
} else {
|
||||
this.$notify.warning(resp.msg);
|
||||
}
|
||||
}
|
||||
},
|
||||
async getProjectFunding(){
|
||||
const resp = await $.get('/platform/projectfunding/manage/getProjectFunding')
|
||||
if (resp.code === 0){
|
||||
this.projectList = resp.data
|
||||
this.pageForm.projectId=this.projectList[0].id
|
||||
}
|
||||
},
|
||||
doExport(row){
|
||||
if (row.id){
|
||||
window.open(loc() + '/doExport?id=' + row.id)
|
||||
}else {
|
||||
const {year,subsidyAmount, auditAmount,projectId,unionId,searchName,searchKeyword} = this.pageForm
|
||||
window.open(loc()+'/doExport?year='+ year +
|
||||
'&subsidyAmount=' +(subsidyAmount ? subsidyAmount : '') +
|
||||
'&auditAmount=' +(auditAmount ? auditAmount : '') +
|
||||
'&projectId=' +projectId +
|
||||
'&unionId=' +(unionId ? unionId : '') +
|
||||
'&searchName=' +searchName +
|
||||
'&searchKeyword=' +searchKeyword)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unions = await getUnions();
|
||||
await this.getProjectFunding();
|
||||
this.pageData();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user