256 lines
10 KiB
HTML
256 lines
10 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
<style>
|
|
.formData .viewFile {
|
|
height: 200px;
|
|
}
|
|
</style>
|
|
|
|
<div id="app" v-cloak>
|
|
<guava ref="guava">
|
|
<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.notes" placeholder="请选择或输入摘要" clearable>
|
|
</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="true"
|
|
@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%;"
|
|
clearable="true"
|
|
filterable="true">
|
|
<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>
|
|
<el-radio-group v-model="pageForm.auditState" @change="doSearch" size="small">
|
|
<el-radio-button :label="0">全部</el-radio-button>
|
|
<el-radio-button :label="1">已审核</el-radio-button>
|
|
<el-radio-button :label="2">未审核</el-radio-button>
|
|
</el-radio-group>
|
|
</template>
|
|
</table-tool>
|
|
<el-table :data="tableData" @sort-change="pageOrder" 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"
|
|
v-for="column in tableColumns">
|
|
<template scope="{row}" v-if="column.prop==='auditState'">
|
|
<el-tag v-if="row.auditState===0" type="info">保存中</el-tag>
|
|
<el-tag v-if="row.auditState===1" type="info">待审核</el-tag>
|
|
<el-tag v-else-if="row.auditState===2" type="danger">退回修改</el-tag>
|
|
<el-tag v-else-if="row.auditState===3" type="success">已通过</el-tag>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column align="center" header-align="center" label="操作"
|
|
width="300">
|
|
<template scope="{row}">
|
|
<el-button @click="openView(row)" type="primary" size="mini">查看
|
|
</el-button>
|
|
<el-button @click="openAudit(row)" type="primary" size="mini"
|
|
:disabled="![1].includes(row.auditState)">审核
|
|
</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<!--#include("/layouts/pagination.html"){}#-->
|
|
</el-card>
|
|
</guava>
|
|
|
|
<el-dialog
|
|
title="报销预审信息"
|
|
:visible.sync="dialogVisible"
|
|
width="40%"
|
|
:close-on-click-modal="false"
|
|
>
|
|
<info ref="auditInfo">
|
|
<template #handle>
|
|
<el-form :model="formData" ref="form" :rules="formRules" label-position="right"
|
|
style="padding: 20px 0"
|
|
label-width="120px">
|
|
|
|
<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="time" label="审核时间">
|
|
<el-input v-model="formData.auditTime" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
<el-form-item prop="opinion" label="审核意见">
|
|
<el-input type="textarea" v-model="formData.auditOpinion" rows="4"
|
|
maxlength="500"
|
|
placeholder="请填写您的审核意见"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
</template>
|
|
</info>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="dialogVisible = false">关 闭</el-button>
|
|
<el-button type="danger" @click="doSubmit(false)">退回修改</el-button>
|
|
<el-button type="primary" @click="doSubmit(true)">通 过</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
|
|
<el-dialog
|
|
title="报销预审信息"
|
|
:visible.sync="viewDialogVisible"
|
|
width="40%"
|
|
:close-on-click-modal="false">
|
|
<info ref="info"></info>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="viewDialogVisible = false">关 闭</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
</div>
|
|
<script>
|
|
<!--#include("info.js"){}#-->
|
|
new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {
|
|
units: [],
|
|
unions: [],
|
|
pageForm: {
|
|
auditState: 0,
|
|
year: new Date().getFullYear() + ""
|
|
},
|
|
tableColumns: [
|
|
{prop: 'loginName', label: '工号'},
|
|
{prop: 'userName', label: '姓名'},
|
|
{prop: 'unitName', label: '单位'},
|
|
{prop: 'unionName', label: '工会'},
|
|
{prop: 'notes', label: '事由'},
|
|
{prop: 'applyDate', label: '填写时间'},
|
|
{prop: 'auditState', label: '状态'},
|
|
],
|
|
formRules: {},
|
|
dialogVisible: false,
|
|
viewDialogVisible: false,
|
|
}
|
|
},
|
|
components: {
|
|
"info": info
|
|
},
|
|
methods: {
|
|
openView(row) {
|
|
this.viewDialogVisible = true
|
|
setTimeout(() => {
|
|
this.$refs.info.openView(row.id)
|
|
}, 300)
|
|
},
|
|
openAudit(row) {
|
|
this.formData = {
|
|
id: row.id,
|
|
auditOpinion: "",
|
|
auditTime: moment().format('YYYY-MM-DD'),
|
|
username: "${@shiro.getPrincipalProperty('username')}",
|
|
}
|
|
this.dialogVisible = true
|
|
setTimeout(() => {
|
|
this.$refs.auditInfo.openAudit(row.id, true)
|
|
}, 300)
|
|
},
|
|
doSubmit(flag) {
|
|
this.$refs.form.validate(async (valid) => {
|
|
if (valid) {
|
|
this.$confirm('确定要' + (flag ? '通过' : '退回修改') + '吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
this.formData.flag=flag
|
|
$.post("/platform/reimbursementPreAudit/audit/doSubmit", this.formData).then(res => {
|
|
if (res.code === 0) {
|
|
this.$message({
|
|
type: 'success',
|
|
message: '操作成功!'
|
|
});
|
|
this.dialogVisible = false
|
|
this.pageData()
|
|
}
|
|
})
|
|
})
|
|
|
|
}
|
|
})
|
|
},
|
|
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.unions = await getUnions(null)
|
|
this.flushUnits()
|
|
this.pageData()
|
|
}
|
|
})
|
|
</script>
|
|
|
|
|
|
<!--#
|
|
}
|
|
#-->
|