first commit
This commit is contained in:
@@ -0,0 +1,317 @@
|
||||
<!--#
|
||||
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
|
||||
v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy" style="width: 100%"
|
||||
placeholder="选择年" @change="doSearch();getPlan()">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search-item">
|
||||
<div class="search-item-label">姓名/工号:</div>
|
||||
<div class="search-item-option">
|
||||
<el-input placeholder="请输入姓名/工号" clearable
|
||||
v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
<el-select v-model="pageForm.searchName" slot="prepend"
|
||||
placeholder="姓名/工号"
|
||||
style="width: 80px;">
|
||||
<el-option label="姓名" value="app.userName"></el-option>
|
||||
<el-option label="工号" value="app.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 v-model="pageForm.planId" clearable placeholder="请选择计划">
|
||||
<el-option
|
||||
|
||||
v-for="item in planOptions"
|
||||
:key="item.id"
|
||||
:label="item.planName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search-query">
|
||||
<el-button type="primary" icon="el-icon-search" @click="doSearch">搜索
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="审核列表" :app="this">
|
||||
<template #func>
|
||||
<span style="color: red;margin-right: 10px">温馨提示:如您已全部审核完成可点击已审核提交名单到校工会</span>
|
||||
<el-radio-group v-model="pageForm.isAudit" @change="doSearch" size="medium">
|
||||
<el-radio-button label="">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-button type="primary" icon="el-icon-check" @click="doSchool"
|
||||
class="ml10"
|
||||
size="medium" v-if="pageForm.isAudit==true">提交到校工会
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-s-promotion" @click="doExport"
|
||||
class="ml10"
|
||||
size="medium">导出报销表
|
||||
</el-button>
|
||||
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" style="width: 100%" row-key="id"
|
||||
@sort-change="pageOrder"
|
||||
@selection-change="handleSelectionChange"
|
||||
v-loading="tableLoading" ref="table"
|
||||
:size="tableSize" class="vi-table">
|
||||
|
||||
<el-table-column align="center" header-align="center" width="80px" label="序号"
|
||||
type="index">
|
||||
<template scope="scope">
|
||||
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
:reserve-selection="true"
|
||||
:selectable="(row)=>{return row.state==6051}"
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
header-align="center"
|
||||
v-for="column in tableColumns"
|
||||
show-overflow-tooltip
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template v-if="column.prop=='planDateTime'" scope="{row}">
|
||||
{{row.startDateTime}}-{{row.endDateTime}}
|
||||
</template>
|
||||
<template v-else-if="column.prop=='planType'" scope="{row}">
|
||||
{{row.planType===1?'保育费':'其它'}}
|
||||
</template>
|
||||
<template scope="{row}" v-else-if="column.prop==='state'">
|
||||
<span :style="'color:'+row.stateColor">{{row.stateName}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userOnline" align="center" header-align="center"
|
||||
label="操作"
|
||||
width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" @click="openView(row)">
|
||||
查看
|
||||
</el-button>
|
||||
<el-button size="mini" type="primary" @click="openEdit(row)"
|
||||
:disabled="row.state!=6050">
|
||||
审核
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<info ref="info"></info>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<info ref="edit" label="分工会审核" handle>
|
||||
<template #handle>
|
||||
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
||||
style="padding: 20px 0"
|
||||
label-width="120px">
|
||||
<vi-title title="审核信息"></vi-title>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="username" label="审核人员">
|
||||
<el-input v-model="formData.username"
|
||||
disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="auditTime" label="审核时间">
|
||||
<el-input v-model="formData.auditTime" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-form-item prop="auditOpinion" label="审核意见">
|
||||
<el-input type="textarea" v-model="formData.auditOpinion" rows="4"
|
||||
maxlength="500"
|
||||
placeholder="请填写您的审核意见"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="auditSign" label="签  字">
|
||||
<sign :qz.sync="formData.auditSign"></sign>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div style="float: right;margin: 20px 0">
|
||||
<el-button @click="doReview(1)">拒绝</el-button>
|
||||
<el-button type="danger" @click="doReview(2)">退回修改</el-button>
|
||||
<el-button type="primary" @click="doReview(3)">通过</el-button>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</info>
|
||||
</template>
|
||||
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var vue = new Vue({
|
||||
el: '#app',
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
planOptions: [],
|
||||
isDoSchool: 0,
|
||||
selection: [],
|
||||
planList: [],
|
||||
pageForm: {
|
||||
searchName: "app.userName",
|
||||
isAudit: 'false',
|
||||
year: moment().format('YYYY')
|
||||
},
|
||||
tableColumns: [
|
||||
{prop: 'loginName', label: '工号'},
|
||||
{prop: 'userName', label: '姓名'},
|
||||
{prop: 'unitName', label: '单位'},
|
||||
{prop: 'unionName', label: '工会'},
|
||||
{prop: 'money', label: '报销金额', sortable: true},
|
||||
{prop: 'applyDateTime', label: '报销申请时间'},
|
||||
{prop: 'state', label: '报销状态', sortable: true},
|
||||
],
|
||||
formRules: {
|
||||
money: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
files: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': httpVueLoader('/components/childcareFees/info.vue?v=' + new Date().getTime()),
|
||||
},
|
||||
methods: {
|
||||
doExport() {
|
||||
const {year, planId} = this.pageForm
|
||||
if (!planId) {
|
||||
this.notifyWarning("请选择需要导出的计划");
|
||||
return
|
||||
}
|
||||
window.open(loc() + "/doExport?year=" + year + "&planId=" + planId)
|
||||
},
|
||||
async getIsDoSchool() {
|
||||
const resp = await $.post(loc() + '/getIsDoSchool', {year: this.pageForm.year})
|
||||
this.isDoSchool = resp.data
|
||||
},
|
||||
async getPlan() {
|
||||
const resp = await $.post('/platform/childcareFees/applyPlan/getPlan', {year: this.pageForm.year})
|
||||
this.planOptions = resp.data
|
||||
},
|
||||
async doSchool() {
|
||||
await this.getIsDoSchool()
|
||||
if (this.isDoSchool > 0) {
|
||||
this.notifyWarning("您已提交到校工会暂不能在提交")
|
||||
return
|
||||
}
|
||||
if (this.selection && this.selection.length === 0) {
|
||||
this.notifyWarning("请在左侧勾选所有需要提交到校工会的名单")
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm('请确保本工会人员已全部通过审核,提交校工会后暂不能修改人员!', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
const resp = await $.post(loc() + '/doSchool', {ids: JSON.stringify(this.selection)})
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
this.$refs.table.clearSelection();
|
||||
}
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
this.selection = val.map(v => v.id);
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.info.getInfo(row.id)
|
||||
this.$refs.guava.view()
|
||||
},
|
||||
openEdit(row) {
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
username: "${@shiro.getPrincipalProperty('username')}",
|
||||
auditTime: moment().format('YYYY-MM-DD'),
|
||||
auditOpinion: "同意",
|
||||
}
|
||||
this.$refs.edit.getInfo(row.id)
|
||||
this.$refs.guava.edit()
|
||||
},
|
||||
async doReview(flag) {
|
||||
const confirm = await this.$confirm('您确定要提交吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === 'confirm') {
|
||||
this.formData.flag = flag
|
||||
const resp = await $.post(loc() + '/doReview', this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.notifySuccess(resp.msg)
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getPlan()
|
||||
if (this.planOptions && this.planOptions.length > 0) {
|
||||
this.$set(this.pageForm, "planId", this.planOptions[0].id)
|
||||
}
|
||||
this.pageData()
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user