382 lines
15 KiB
HTML
382 lines
15 KiB
HTML
<!--#
|
|
layout("/layouts/platform.html"){
|
|
#-->
|
|
<style>
|
|
.flexible-gifts {
|
|
display: flex;
|
|
flex-direction: column
|
|
}
|
|
|
|
.flexible-gifts-item {
|
|
display: flex;
|
|
}
|
|
|
|
.flexible-gifts-item:not(:first-of-type) {
|
|
margin-top: 15px;
|
|
}
|
|
|
|
.flexible-gifts-item-input {
|
|
width: calc(100% - 144px);
|
|
}
|
|
|
|
.flexible-gifts-item-radio {
|
|
width: 100px;
|
|
text-align: center;
|
|
}
|
|
|
|
.flexible-gifts-item-delete {
|
|
width: 44px;
|
|
}
|
|
|
|
.avatar-uploader .el-upload {
|
|
border: 1px dashed #d9d9d9;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.avatar-uploader .el-upload:hover {
|
|
border-color: #409EFF;
|
|
}
|
|
|
|
.avatar-uploader-icon {
|
|
font-size: 28px;
|
|
color: #8c939d;
|
|
width: 178px;
|
|
height: 178px;
|
|
line-height: 178px;
|
|
text-align: center;
|
|
}
|
|
|
|
.avatar {
|
|
width: 178px;
|
|
height: 178px;
|
|
display: block;
|
|
}
|
|
|
|
</style>
|
|
|
|
<div id="app" class="platform" v-cloak>
|
|
<guava ref="guava" padding="0 20%">
|
|
<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
|
|
:clearable="false"
|
|
v-model="pageForm.year"
|
|
type="year"
|
|
style="width: 100%"
|
|
@change="getWelfareOptions"
|
|
value-format="yyyy"
|
|
placeholder="请选择">
|
|
</el-date-picker>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="search-item">
|
|
<div class="search-item-label">福利项目:</div>
|
|
<div class="search-item-option">
|
|
<el-select @change="doSearch()"
|
|
style="width: 100%"
|
|
v-model="pageForm.projectId">
|
|
<el-option :key="item.id" :label="item.name" :value="item.id"
|
|
v-for="item in welfareOptions"></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="mt10">
|
|
<table-tool label="福利项目" :app="this">
|
|
<template #func>
|
|
<el-button size="small" type="primary" @click="doExport">导出</el-button>
|
|
|
|
<el-button size="small" type="primary" @click="doExportByUnion">按分工会导出名单</el-button>
|
|
|
|
<el-button size="small" type="primary" @click="doExportUnionNum">按分工会导出人数</el-button>
|
|
</template>
|
|
</table-tool>
|
|
<el-table :data="tableData" style="width: 100%" row-key="id"
|
|
@sort-change="pageOrder" :size="tableSize"
|
|
v-loading="tableLoading" ref="table" class="vi-table">
|
|
<el-table-column type="expand">
|
|
<template scope="{row}">
|
|
<vi-title title="上报人员名单"></vi-title>
|
|
<el-table :data="row.users" size="small" v-if="row.users && row.users.length>0">
|
|
<el-table-column label="姓名" prop="username"></el-table-column>
|
|
<el-table-column label="工号" prop="loginname"></el-table-column>
|
|
<el-table-column label="单位" prop="unitname"></el-table-column>
|
|
</el-table>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
<el-table-column align="center" header-align="center" type="index"
|
|
:index="indexMethod" label="序号"
|
|
width="80px"></el-table-column>
|
|
|
|
<el-table-column align="center" header-align="center"
|
|
label="分工会名称" prop="unionname"></el-table-column>
|
|
|
|
<el-table-column align="center" header-align="center"
|
|
label="上报人数" prop="userNum"></el-table-column>
|
|
|
|
<el-table-column align="center" header-align="center"
|
|
label="审核状态" prop="stateName"></el-table-column>
|
|
|
|
<el-table-column prop="userOnline" align="center" header-align="center"
|
|
label="操作" width="150px">
|
|
<template scope="{row}">
|
|
|
|
<el-dropdown @command="dropdownCommand">
|
|
<el-button plain size="mini" :loading="submitLoading">
|
|
<i class="ti-settings"></i>
|
|
<span class="ti-angle-down"></span>
|
|
</el-button>
|
|
<el-dropdown-menu slot="dropdown">
|
|
<el-dropdown-item :command="{type:'view',data:row}">
|
|
查看
|
|
</el-dropdown-item>
|
|
<el-dropdown-item :command="{type:'doRollBack',data:row}"
|
|
:disabled="![7030,7020].includes(row.stateId)">
|
|
撤回
|
|
</el-dropdown-item>
|
|
<el-dropdown-item :command="{type:'audit',data:row}"
|
|
:disabled="![7030].includes(row.stateId)">
|
|
审核
|
|
</el-dropdown-item>
|
|
</el-dropdown-menu>
|
|
</el-dropdown>
|
|
|
|
</template>
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
</el-card>
|
|
</template>
|
|
|
|
|
|
<template #view>
|
|
<welfare-user-escalation ref="welfareUserEscalation"></welfare-user-escalation>
|
|
</template>
|
|
|
|
<template #edit>
|
|
<welfare-user-escalation ref="welfareUserEscalationAudit">
|
|
<template #handle>
|
|
<el-tab-pane label="分工会主席审核" name="unionAudit">
|
|
<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 value="${@shiro.getPrincipalProperty('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="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 type="danger" @click="doReview(1)">
|
|
拒绝
|
|
</el-button>
|
|
<el-button type="primary" @click="doReview(2)">
|
|
通过
|
|
</el-button>
|
|
</div>
|
|
</el-tab-pane>
|
|
</template>
|
|
</welfare-user-escalation>
|
|
</template>
|
|
</guava>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
<!--#include("/platform/welfare/include/common.js"){}#-->
|
|
|
|
var vue = new Vue({
|
|
el: '#app',
|
|
mixins: [initTableMixins],
|
|
data() {
|
|
return {
|
|
judgmentAuthority,
|
|
fields: [
|
|
{
|
|
label: '性别',
|
|
value: 'sex',
|
|
type: "select",
|
|
options: [{label: '男', value: '男'}, {label: '女', value: '女'}]
|
|
},
|
|
{label: '出生日期', value: 'birthday', type: "date"},
|
|
],
|
|
welfareProvideMode: [],
|
|
welfareSignMode: [],
|
|
welfareNoticePushMode: [],
|
|
pageForm: {
|
|
year: moment().format('YYYY')
|
|
},
|
|
tableColumns: [
|
|
// {prop: 'year', label: '年度'},
|
|
{prop: 'name', label: '项目名称'},
|
|
// {prop: 'gift', label: '福利礼品'},
|
|
// {prop: 'provideTimeStart', label: '发放时间'},
|
|
{prop: 'userCount', label: '当前上报'},
|
|
{prop: 'stateName', label: '审核状态'},
|
|
],
|
|
formRules: {
|
|
auditSign: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
|
auditOpinion: [{required: true, message: '必选', trigger: ['blur', 'change']}],
|
|
},
|
|
welfare,
|
|
welfareUnitMode,
|
|
exportWelfareListDialog: false,
|
|
selPersonType: [],
|
|
welfare_id: null,
|
|
welfarePersonTypeList: [],
|
|
welfareOptions: []
|
|
}
|
|
},
|
|
components: {
|
|
'welfare-user-escalation': httpVueLoader('/components/welfare/welfareUserEscalation.vue?v=1.0.0'),
|
|
},
|
|
methods: {
|
|
doExport() {
|
|
window.open(loc() + '/doExport?projectId=' + this.pageForm.projectId)
|
|
},
|
|
doExportByUnion(){
|
|
window.open(loc() + '/doExportByUnion?projectId=' + this.pageForm.projectId)
|
|
},
|
|
doExportUnionNum(){
|
|
window.open(loc() + '/doExportUnionNum?projectId=' + this.pageForm.projectId)
|
|
},
|
|
dropdownCommand(command) {
|
|
const {type, data} = command
|
|
this.welfare_id = data.projectId
|
|
if (type === 'view') {
|
|
this.openView(data)
|
|
} else if (type === 'audit') {
|
|
this.openAudit()
|
|
}
|
|
},
|
|
openView(data) {
|
|
this.$refs.guava.view()
|
|
this.$refs.welfareUserEscalation.findOne(this.welfare_id,data.id)
|
|
},
|
|
openAudit() {
|
|
this.$set(this.formData, 'auditTime', moment().format('YYYY-MM-DD'))
|
|
this.$refs.guava.edit()
|
|
this.$refs.welfareUserEscalationAudit.findOne(this.welfare_id)
|
|
},
|
|
doReview(row) {
|
|
this.$refs['form'].validate(valid => {
|
|
if (valid) {
|
|
this.$confirm('您确定要提交吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(async () => {
|
|
const {code, msg} = await $.post(loc() + '/doAudit', {
|
|
audit: JSON.stringify(this.formData),
|
|
projectId: this.welfare_id,
|
|
isPass: row,
|
|
})
|
|
if (code === 0) {
|
|
this.pageData()
|
|
this.notifySuccess(msg)
|
|
this.$refs.guava.index()
|
|
} else {
|
|
this.notifyWarning(msg)
|
|
}
|
|
})
|
|
}
|
|
})
|
|
},
|
|
|
|
async getWelfareOptions() {
|
|
const resp = await $.post(loc() + '/welfareOptions', {year: this.pageForm.year})
|
|
this.welfareOptions = resp.data
|
|
if (this.welfareOptions && this.welfareOptions.length > 0) {
|
|
this.pageForm.projectId = this.welfareOptions[0].id
|
|
this.pageData();
|
|
} else {
|
|
this.pageForm.projectId = ''
|
|
this.tableData = []
|
|
}
|
|
},
|
|
|
|
pageData() {
|
|
sublime.showLoadingbar();
|
|
this.tableLoading = true
|
|
$.post(loc() + "/pageData", this.pageForm, (data) => {
|
|
sublime.closeLoadingbar();
|
|
this.tableLoading = false
|
|
if (data.code == 0) {
|
|
this.tableData = data.data;
|
|
} else {
|
|
this.$message.error(data.msg);
|
|
}
|
|
}, "json");
|
|
},
|
|
},
|
|
async created() {
|
|
await this.getWelfareOptions()
|
|
this.welfareProvideMode = await getEnumOptions("WelfareProvideMode")
|
|
this.welfareSignMode = await getEnumOptions("WelfareSignMode")
|
|
this.welfareNoticePushMode = await getEnumOptions("WelfareNoticePushMode")
|
|
this.welfarePersonTypeList = await getPersonTypeListGroupByWelfare()
|
|
|
|
this.welfarePersonTypeList.map(v => {
|
|
this.selPersonType.push(v.personType)
|
|
})
|
|
|
|
const personType = await getDictOptions("UserType")
|
|
const userState = await getDictOptions("userState")
|
|
|
|
this.fields = this.fields.concat([{
|
|
label: '人员类型',
|
|
value: 'personType',
|
|
type: "select",
|
|
options: personType.map(v => {
|
|
return {label: v.name, value: v.code}
|
|
})
|
|
}, {
|
|
label: '在职状态',
|
|
value: 'userState',
|
|
type: "select",
|
|
options: userState.map(v => {
|
|
return {label: v.name, value: v.code}
|
|
})
|
|
}])
|
|
}
|
|
})
|
|
</script>
|
|
<!--#
|
|
}
|
|
#-->
|