Files
UNION_NSI/target/classes/views/platform/lxy/HdGhbm.html
T
2026-09-08 19:49:21 +08:00

1118 lines
54 KiB
HTML

<!--#
layout("/layouts/platform.html"){
#-->
<style>
.w-e-text-container {
height: 250px !important;
}
.v-box .el-card__header {
padding: 5px 15px;
}
.el-select-dropdown {
z-index: 99999999 !important;
}
.el-loading-mask {
z-index: 99999999 !important;
}
.el-picker-panel {
z-index: 99999999 !important;
}
.el-transfer {
text-align: center;
}
.el-transfer-panel {
text-align: left;
width: 40%;
height: 500px;
}
.el-transfer-panel__list.is-filterable {
height: 400px;
}
.demo-table-expand {
font-size: 0;
}
.demo-table-expand label {
margin-left: 100px;
width: 100%;
color: #99a9bf;
}
.demo-table-expand .el-form-item {
margin-right: 0;
margin-bottom: 0;
width: 50%;
}
.el-textarea__inner {
width: 600px;
margin-left: 90px;
text-align: center;
}
.el-transfer-panel__body {
height: calc(100% - 40px) !important;
}
.el-transfer-panel__list {
height: 100%;
}
.el-transfer {
border: 1px solid #EBEEF5;
}
.el-transfer .el-checkbox-group {
line-height: 40px;
}
</style>
<div id="app" v-cloak>
<guava>
<el-row class="transition-row">
<transition name="el-zoom-in-center">
<div class="transition-item" v-show="v=='index'">
<el-card shadow="never">
<div class="btn-group tool-button mt5">
<el-date-picker
placeholder="选择年度"
type="year"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</div>
<div class="btn-group tool-button mt5">
<el-select @change="pageData" clearable filterable placeholder="请选择活动"
v-model="pageForm.hdid">
<el-option
:key="item.id"
:label="item.name"
:value="item.id"
v-for="item in lxyHd">
</el-option>
</el-select>
</div>
<div class="btn-group tool-button mt5">
<el-button @click="doSearch" icon="el-icon-search" type="primary"></el-button>
</div>
</el-card>
<el-card shadow="never" class="mt10">
<el-table :data="tableData" @sort-change="pageOrder" row-key="id" style="width: 100%"
v-loading="tabLoading">
<el-table-column align="center" header-align="center" label="序号" width="100px">
<template scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="活动名称" prop="name"
width="300px">
<template scope="scope">
<el-link @click="lxy_app.openView(scope.row.id)" type="primary">
{{scope.row.name}}
</el-link>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="活动场地" prop="hdcd"
show-overflow-tooltip></el-table-column>
<el-table-column align="center" header-align="center" label="活动时间" prop="hdkssj"
sortable width="200px">
<template scope="scope">
{{scope.row.hdkssj}} 至 {{scope.row.hdjssj}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="报名时间" prop="bmsj"
sortable width="300px">
<template scope="scope">
{{scope.row.bmkssj}} 至 {{scope.row.bmjzsj}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="状态"
prop="name">
<template scope="scope">
<span :class="lxy_app.getStatus(scope.row).class">{{lxy_app.getStatus(scope.row).name}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="分工会"
prop="unionname" show-overflow-tooltip>
<template scope="scope">
<span>({{scope.row.unioncode}}){{scope.row.unionname}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="分配名额"
prop="number" width="100px">
<template scope="scope">
<span style="color: tomato">{{scope.row.number}}</span>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="已报人数"
prop="remain" width="100px">
<template scope="scope">
<span style="color: tomato">{{scope.row.number-scope.row.remain}}</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="200px">
<template scope="scope">
<!--# if(@shiro.hasRole('sysadmin')){ #-->
<el-button @click="openView(scope.row)" plain size="mini">查看
</el-button>
<!--# } #-->
<!--# if(@shiro.hasRole('H04')){ #-->
<!-- <el-button size="mini" @click="openEdit(scope.row)"-->
<!-- :disabled="scope.row.number ==scope.row.remain" plain>修改-->
<!-- </el-button>-->
<!-- <el-button size="mini" type="primary" @click="openBm(scope.row)"-->
<!-- :disabled="scope.row.remain<=0" plain>报名-->
<!-- </el-button>-->
<el-button @click="openBm2(scope.row)" plain size="mini" type="primary">报名
</el-button>
<!--# } #-->
</template>
</el-table-column>
</el-table>
</el-card>
<el-row class="el-pagination-container">
<el-pagination
:current-page="pageForm.pageNumber"
:page-size="pageForm.pageSize"
:page-sizes="[10, 20, 30, 50]"
:total="pageForm.totalCount"
@current-change="pageNumberChange"
@size-change="pageSizeChange"
layout="total, sizes, prev, pager, next">
</el-pagination>
</el-row>
</div>
</transition>
<transition name="el-zoom-in-center">
<div class="transition-item" v-show="v=='bm'">
<el-card class="box-card v-box" shadow="never">
<div class="clearfix" slot="header">
<el-button @click="v='index'" icon="el-icon-back" style="font-size: 18px" type="text">返回
</el-button>
</div>
<el-row style="padding: 0 15%;" v-loading="loading">
<el-steps :active="stepActive" finish-status="success" simple>
<el-step title="选择人员"></el-step>
<el-step title="确定名单"></el-step>
</el-steps>
<transition name="el-zoom-in-top">
<div class="transition-box" style="margin-top: 20px;" v-show="stepActive==0">
<el-row class="navbar">
<div class="btn-group tool-button mt5">
<el-input placeholder="请输入姓名或工号查询" v-model="userPageForm.query"></el-input>
</div>
<div class="btn-group tool-button mt5">
<el-button @click="doUserSearch" icon="el-icon-search"
type="primary">
</el-button>
</div>
<div class="btn-group tool-button mt5">
<el-checkbox-group @change="checkChange" v-model="userPageForm.check">
<el-checkbox label="honer">是否获取荣誉</el-checkbox>
<el-checkbox label="five">五年内未参加</el-checkbox>
</el-checkbox-group>
</div>
<div class="pull-right offscreen-right mt5">
<div class="text-primary" style="line-height: 40px">
{{numData.unionname}} 共有 <span
class="text-danger">{{numData.sum}}</span>个名额,
可选择 <span
class="text-danger">{{numData.sum - multipleSelection.length}}</span>
个,
已选择<span class="text-danger">{{multipleSelection.length}}</span>个。
</div>
</div>
</el-row>
<el-row class="">
<el-table :data="userData" :key="tabKey"
@selection-change="handleSelectionChange"
@sort-change="userPageOrder"
ref="userTable" row-key="id" size="medium"
style="width: 100%"
v-loading="userTableLoading">
<el-table-column
:reserve-selection="true"
type="selection"
width="55">
</el-table-column>
<el-table-column align="center" header-align="center" label="工号"
prop="loginname"></el-table-column>
<el-table-column align="center" header-align="center" label="姓名"
prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="性别" prop="sex"
sortable></el-table-column>
<el-table-column align="center" header-align="center" label="年龄" prop="age"
sortable></el-table-column>
<el-table-column align="center" header-align="center" label="联系电话"
prop="mobile"></el-table-column>
</el-table>
</el-row>
<el-row class="el-pagination-container" style="margin-top: 20px">
<el-pagination
:current-page="userPageForm.pageNumber"
:page-size="userPageForm.pageSize"
:total="userPageForm.totalCount"
@current-change="userPageNumberChange"
@size-change="userPageSizeChange"
layout="total, prev, pager, next">
</el-pagination>
</el-row>
<div style="float: right;margin: 0px 0">
<el-button @click="next" type="primary">下一步</el-button>
</div>
</div>
</transition>
<transition name="el-zoom-in-bottom">
<div class="transition-box" style="margin-top: 20px;" v-show="stepActive==1">
<el-table :data="multipleSelection" :key="tabKey" row-key="id" size="medium"
style="width: 100%">
<el-table-column align="center" header-align="center" label="工号"
prop="loginname"></el-table-column>
<el-table-column align="center" header-align="center" label="姓名"
prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="性别" prop="sex"
sortable></el-table-column>
<el-table-column align="center" header-align="center" label="年龄" prop="age"
sortable></el-table-column>
<el-table-column align="center" header-align="center" label="联系电话"
prop="mobile"></el-table-column>
</el-table>
<div style="float: right;margin: 20px 0">
<el-button @click="stepActive=0">上一步</el-button>
<el-button @click="doBm" type="primary">
</el-button>
</div>
</div>
</transition>
</el-row>
</el-card>
</div>
</transition>
<transition name="el-zoom-in-center">
<div class="transition-item" v-show="v=='view'">
<el-row class="header navbar bg-white shadow">
<div class="btn-group tool-button mt5">
<el-button @click="v='index'" icon="el-icon-back" style="font-size: 18px" type="text">返回
</el-button>
</div>
</el-row>
<el-row class="el-table-container">
<el-table :data="bmTableData" ref="multipleTableRy" row-key="id" style="width: 100%"
tooltip-effect="dark">
<el-table-column align="center" header-align="center" label="工号"
prop="loginname"></el-table-column>
<el-table-column align="center" header-align="center" label="姓名"
prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="性别" prop="sex"
sortable></el-table-column>
<el-table-column align="center" header-align="center" label="年龄" prop="age"
sortable></el-table-column>
<el-table-column align="center" header-align="center" label="联系电话"
prop="mobile"></el-table-column>
<el-table-column align="center" header-align="center" label="报名状态" prop="bmzt">
<template scope="scope">
<span style="color: #E6A23C" v-if="scope.row.bmzt==1">待分工会审核</span>
<span style="color: #F56C6C" v-if="scope.row.bmzt==2">分工会审核未通过</span>
<span style="color: #E6A23C" v-if="scope.row.bmzt==3">待校工会审核</span>
<span style="color: #F56C6C" v-if="scope.row.bmzt==4">校工会审核未通过</span>
<span style="color: #67C23A" v-if="scope.row.bmzt==5">报名成功</span>
<span style="color: #E6A23C" v-if="scope.row.bmzt==6">待填写个人资料</span>
</template>
</el-table-column>
<el-table-column align="center" fixed="right" header-align="center" label="操作"
width="120px">
<template scope="scope">
<el-button @click="openViewXx(scope.row)" plain size="mini" type="primary">详细信息
</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
</div>
</transition>
<el-dialog :close-on-click-modal="false" :visible.sync="viewDialogSh" custom-class="ViewDialogClass"
top="3%" width="60%">
<el-form label-position="right" label-width="120px" style="padding: 20px 0">
<vi-title title="个人信息"></vi-title>
<el-row gutter="20">
<el-col :span="8">
<el-form-item label="工号:">
{{ viewData.loginname }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="姓名:">
{{ viewData.username }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="职务:">
{{ viewData.zw }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="人事编制:">
{{ viewData.rsbz }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性别:">
{{ viewData.sex }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="年龄:">
{{ viewData.age }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所在单位:">
{{ viewData.unitname }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="手机号:">
{{ viewData.mobile }}
</el-form-item>
</el-col>
</el-row>
<vi-title title="曾获荣誉"></vi-title>
<el-table :data="viewData.chry" show-header="false" size="mini" style="width: 100%">
<el-table-column align="center" header-align="center" label="获得时间" prop="hdsj"
width="250px">
<template slot-scope="{row}">
<el-date-picker format="yyyy-MM-dd" readonly type="date"
v-model="row.hdsj"></el-date-picker>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="曾获荣誉" prop="shry">
<template slot-scope="{row}">
<el-input readonly v-model="row.shry"></el-input>
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="附件" width="120px">
<template slot-scope="{row}">
<div @click="dd3s.download(row.ryfj,row.ryfj)" class="file-down-span">
<i class="el-icon-download"></i>
</div>
<el-image :src="'${AppFileDomain!}'+row.ryfj" @click="dd3s.showpic(row.ryfj)"
fit="cover"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
v-if="dd3s.isPic(row.ryfj)">
</el-image>
<el-image src="***"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
v-else>
<div class="image-slot" slot="error"
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical">{{row.ryfj}}</span>
</div>
</el-image>
</template>
</el-table-column>
</el-table>
<template v-if="viewData.files&&viewData.files.length">
<vi-title title="身份证复印件"></vi-title>
<div style="text-align: left;">
<div style="display: inline-block;width: 100px;margin-right:10px"
v-for="item in viewData.files">
<div @click="dd3s.download(item.filepath,item.filename)" class="file-down-span">
<i class="el-icon-download"></i>
</div>
<el-image :src="'${AppFileDomain!}'+item.filepath" @click="dd3s.showpic(item.filepath)"
fit="cover"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
v-if="dd3s.isPic(item.filepath)">
</el-image>
<el-image src="***"
style="width: 100px;height: 100px;box-shadow: 0 0 5px rgb(200,200,200)"
v-else>
<div class="image-slot" slot="error"
style="width: 100%;height: 100%; display:flex;align-items: center;text-align: center">
<span style="font-size: 12px;color: rgb(180,180,180);width: 100%;text-align: center;overflow: hidden;padding: 0 10px;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical">{{item.filename}}</span>
</div>
</el-image>
</div>
</div>
</template>
<vi-title title="个人材料" style="margin-top: 10px"></vi-title>
<el-descriptions :column="2" border>
<el-descriptions-item label="附件">
<file-upload v-if="viewData.bmFiles && viewData.bmFiles.length > 0"
:files="viewData.bmFiles"
:view="true"></file-upload>
<span v-else>暂无个人材料</span>
</el-descriptions-item>
</el-descriptions>
</el-form>
</el-dialog>
<transition name="el-zoom-in-center">
<div class="transition-item" v-show="v=='bm2'">
<el-card class="box-card v-box" shadow="never">
<div slot="header" style="display: flex;justify-content: space-between">
<div>
<el-button @click="v='index'" icon="el-icon-back" style="font-size: 18px" type="text">返回
</el-button>
</div>
<div>
<el-button @click="doSubmit(false)" style="font-size: 18px" type="text">保存
</el-button>
<el-button @click="doSubmit(true)" style="font-size: 18px" type="text">提交
</el-button>
</div>
</div>
<el-row style="padding: 0 5%;">
<el-transfer
:data="notApplyUser"
:filter-method="filterNotApplyUser"
:props="{
key: 'id',
label: 'label'
}"
:right-default-checked="rightCheckedData"
:titles="['可报人员名单','当前选择']"
@change="transferChange"
@right-check-change="rightCheckChange"
filter-placeholder="请输入工号或者姓名查询"
filterable
v-model="CheckNotApplyUser">
<template #left-footer>
<el-checkbox-group @change="checkChange" v-model="userPageForm.check">
<el-checkbox label="honer">是否获取荣誉</el-checkbox>
<el-checkbox label="five">五年内未参加</el-checkbox>
</el-checkbox-group>
</template>
<template #right-footer>
<div class="text-right pr20" style="line-height: 40px">
<el-button @click="addHasApplyUserTableData" size="mini" type="primary">添加
</el-button>
</div>
</template>
</el-transfer>
<div>
<el-divider content-position="left">
工会分配名额<span class="text-info">{{checkTableRowData.number}}</span>人,
您已选择名额<span
class="text-info">{{hasApplyUserTableData.filter(v=>v.bmzt!='4').length}}</span>人,
<!-- &lt;!&ndash; 通过审核<span class="text-success">{{checkTableRowData.passnum}}</span>人,&ndash;&gt;
还可选择<span
class="text-primary">{{checkTableRowData.number - checkTableRowData.passnum - checkTableRowData.reviewnum}}</span>人 -->
还可选择<span class="text-primary">{{checkTableRowData.number - hasApplyUserTableData.filter(v=>v.bmzt!='4').length}}</span>
</el-divider>
</div>
<el-table :data="hasApplyUserTableData" border height="480" size="mini">
<el-table-column align="center" header-align="center" label="序号" type="index"
width="70"></el-table-column>
<el-table-column align="center" header-align="center" label="姓名"
prop="username"></el-table-column>
<el-table-column align="center" header-align="center" label="工号"
prop="loginname"></el-table-column>
<el-table-column align="center" header-align="center" label="单位"
prop="unitname"></el-table-column>
<el-table-column align="center" header-align="center" label="职称"></el-table-column>
<el-table-column align="center" header-align="center" label="年龄"
prop="age"></el-table-column>
<el-table-column align="center" header-align="center" label="是否审核通过">
<template scope="{row}">
<span class="text-primary" v-if="row.bmzt==1">待分工会审核</span>
<span class="text-danger" v-else-if="row.bmzt==2">分工会审核不通过</span>
<span class="text-primary" v-else-if="row.bmzt==3">待校工会审核</span>
<span class="text-danger" v-else-if="row.bmzt==4">校工会审核不通过</span>
<span class="text-success" v-else-if="row.bmzt==5">报名成功</span>
<span class="text-muted" v-else>预选</span>
</template>
</el-table-column>
<el-table-column header-align="center" label="操作">
<template scope="scope">
<el-button @click="hasApplyUserTableData.splice(scope.$index,1)" type="text"
v-if="!scope.row.bmzt">
<span class="text-primary">
移除
</span>
</el-button>
<el-button @click="uploadMaterial(scope.row)" v-if="!scope.row.bmzt"
type="text">
<span class="text-primary">
上传材料
</span>
</el-button>
<el-button @click="viewInfo(scope.row)" type="text" v-if="scope.row.files">
<span class="text-primary">
查看
</span>
</el-button>
</template>
</el-table-column>
</el-table>
</el-row>
</el-card>
</div>
</transition>
</el-row>
<el-dialog title="上传材料" :visible.sync="importVisible"
:close-on-click-modal="false" width="50%">
<file-upload :files.sync="uploadForm.files"
card></file-upload>
<span slot="footer" class="dialog-footer">
<el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>
<el-button type="primary" @click="doImport" :loading="importLoading">确定</el-button>
</span>
</el-dialog>
<el-dialog :close-on-click-modal="false" :visible.sync="viewDialog" custom-class="ViewDialogClass"
top="3%" width="60%">
<vi-title title="个人材料" style="margin-top: 10px"></vi-title>
<el-descriptions :column="2" border>
<el-descriptions-item label="附件">
<file-upload v-if="viewDataFgh && viewDataFgh.length > 0"
:files="viewDataFgh"
:view="true"></file-upload>
<span v-else>暂无个人材料</span>
</el-descriptions-item>
</el-descriptions>
</el-dialog>
</guava>
</div>
<script>
var E = window.wangEditor
var vue = new Vue({
el: '#app',
data() {
return {
unionname: '',
viewDialogSh: false,
bmTableData: [],
lxyHd: [],
tabKey: new Date().getTime(),
stepActive: 0,
unions: [],
v: "index",
userOptions: [],
loading: false,
tabLoading: false,
userLoading: false,
bmDialog: false,
viewDialog: false,
formData: {},
tableData: [],
pageForm: {
year: new Date().getFullYear() + "",
searchName: "",
searchKeyword: "",
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: "",
hdid: ""
},
userPageForm: {
check: [],
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: ""
},
searchForm: {
userId: "",
ghId: ""
},
userData: [],
multipleSelection: [],
userTableLoading: false,
numData: {},
viewData: [],
notApplyUser: [], //未申请的用户
CheckNotApplyUser: [], //选择的用户
hasApplyUserTableData: [],
checkTableRowData: {},
rightCheckedData: [],
//上传材料
importVisible: false,
importLoading: false,
uploadForm: {},
fileList: [],
viewDataFgh: [],
}
},
methods: {
openBm2(row) {
this.checkTableRowData = row
this.tabKey = new Date().getTime()
this.userPageForm = {
check: [],
hdid: row.hdid,
unionid: row.ghid
}
//查询该工会已申请的人员
$.post(base + "/platform/zgfw/lxy/ghbm/getHasApply", this.userPageForm, (data) => {
this.hasApplyUserTableData = data.data
this.v = 'bm2'
})
this.getNotApplyUser()
},
//添加预选人员
addHasApplyUserTableData() {
//const readyApplyUsers = this.notApplyUser.filter(v => this.CheckNotApplyUser.includes(v.id))
const readyApplyUsers = this.notApplyUser.filter(v => this.rightCheckedData.includes(v.id))
const num = this.checkTableRowData.number - this.hasApplyUserTableData.filter(v => v.bmzt != '4').length
const num2 = readyApplyUsers.length + this.hasApplyUserTableData.filter(v => v.bmzt != '4').length
if (num === 0 || (num2 > this.checkTableRowData.number)) {
this.$message({
message: '工会分配名额只需报' + this.checkTableRowData.number + "人",
type: 'warning'
});
return
}
this.notApplyUser = this.notApplyUser.filter(v => !this.rightCheckedData.includes(v.id))
readyApplyUsers.map(v => this.hasApplyUserTableData.unshift(v))
//this.CheckNotApplyUser = []
},
filterNotApplyUser(keys, data) {
return data.loginname.indexOf(keys) > -1 || data.username.indexOf(keys) > -1
},
//查询该工会未申请的人员
getNotApplyUser() {
$.post(base + "/platform/zgfw/lxy/ghbm/getNotApply", this.userPageForm, (data) => {
data.data.forEach(v => {
v.label = v.username + '(' + v.sex + '-' + v.loginname + '-' + v.unitname + ')'
})
this.notApplyUser = data.data
this.v = 'bm2'
})
},
//获奖、五年未申请
checkChange(val) {
this.userPageForm.pageNumber = 1
this.getNotApplyUser()
},
transferChange(keyData) {
this.rightCheckedData = this.CheckNotApplyUser
//console.log(keyData)
},
rightCheckChange(checkedData, statusChangeData) {
this.rightCheckedData = checkedData
},
//提交
async doSubmit(flag) {
let array = []
this.hasApplyUserTableData.forEach(item => {
if (!item.bmzt || item.bmzt !== 3) {
array.push({
hdid: this.userPageForm.hdid,
ghid: this.userPageForm.unionid,
userid: item.id,
files: item.files
})
}
})
const params = {
data: JSON.stringify(array),
flag: flag,
}
/* if (readyUserIds.length === 0) {
this.$message.warning('请选择用户之后再提交')
return
}*/
if (array.length > (this.checkTableRowData.number - this.checkTableRowData.passnum)) {
//名额分配数 - 通过数 - 审核中数
const msg = '您当前选中了' + array.length + '个人,最多只能提交' + (this.checkTableRowData.number - this.checkTableRowData.passnum - this.checkTableRowData.reviewnum) + '个人'
this.$message.warning(msg)
return
}
if (flag) {
for (let i = 0; i < array.length; i++) {
if (array[i].files === undefined) {
this.$message.warning("请选择上传材料!")
return
}
}
const confirm = await this.$confirm('是否提交,提交后表示分工会审核通过!', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
if (confirm === "confirm") {
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
$.post('/platform/zgfw/lxy/ghbm/bm', params).then(res => {
loading.close()
if (res.code === 0) {
this.v = 'index'
this.$message.success('提交成功')
this.pageData()
}
})
}
} else {
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
$.post('/platform/zgfw/lxy/ghbm/bm', params).then(res => {
loading.close()
if (res.code === 0) {
this.v = 'index'
this.$message.success('提交成功')
this.pageData()
}
})
}
},
async getLxyBmInfo(id) {
const {data} = await $.get(base + "/platform/zgfw/lxy/fghsh/getBmInfo", {id})
return data
},
async openViewXx(row) {
this.viewData = await this.getLxyBmInfo(row.id)
this.pageForm.hdid = row.hdid
this.pageForm.uid = row.uid
this.viewData.unitname = row.unitname
this.viewDialogSh = true
},
doBm() {
const loading = this.$loading({
lock: true,
text: '数据提交中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
let array = []
this.hasApplyUserTableData.forEach(item => {
if (v => !v.bmzt) {
if (item.files == null) {
this.$message.warning("请选择上传材料")
return
}
array.push({
hdid: this.userPageForm.hdid,
ghid: this.userPageForm.unionid,
userid: item.id,
files: item.files
})
}
})
const params = {
data: JSON.stringify(array),
}
let url;
if (this.userPageForm.sign == 0) {
url = base + "/platform/zgfw/lxy/ghbm/bm";
} else if (this.userPageForm.sign == 1) {
url = base + "/platform/zgfw/lxy/ghbm/doEdit";
}
$.post(url, {
hdid: this.userPageForm.hdid,
unionid: this.userPageForm.unionid,
users: JSON.stringify(arr),
data: params
}, (res) => {
loading.close()
if (res.code === 0) {
this.$message({
message: '提交成功',
type: 'success'
});
this.v = 'index'
this.pageData()
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
next() {
if (this.multipleSelection.length == 0) {
this.$message({
message: '请选择人员!',
type: 'warning'
});
return
}
if (this.userPageForm.sign == 0 && this.numData.sum - this.multipleSelection.length < 0) {
this.$message({
message: '选择人数已达上限!',
type: 'warning'
});
return
} else if (this.userPageForm.sign == 1 && this.multipleSelection.length > this.numData.sum) {
this.$message({
message: '选择人数已达上限!',
type: 'warning'
});
return
}
this.stepActive = 1
},
doUserSearch() {
this.userPageForm.pageNumber = 1
this.userPageData()
},
userPageOrder(column) {//按字段排序
this.userPageForm.pageOrderName = column.prop;
this.userPageForm.pageOrderBy = column.order;
this.userPageData();
},
userPageNumberChange(val) {//页码更新操作
this.userPageForm.pageNumber = val;
this.userPageData();
},
userPageSizeChange(val) {//分页大小更新操作
this.userPageForm.pageSize = val;
this.userPageData();
},
userPageData() {//加载分页数据
sublime.showLoadingbar();//显示loading
this.userTableLoading = true
this.userPageForm.checks = JSON.stringify(this.userPageForm.check)
$.post(base + "/platform/zgfw/lxy/ghbm/getUser", this.userPageForm, (data) => {
sublime.closeLoadingbar();//关闭loading
this.userTableLoading = false
if (data.code == 0) {
this.userData = data.data.list;
this.userPageForm.totalCount = data.data.totalCount;
this.$nextTick(() => {
const arr = JSON.parse(JSON.stringify(this.multipleSelection))
this.userData.forEach(v => {
if (arr.includes(v.id)) {
this.$refs.userTable.toggleRowSelection(v)
}
})
})
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
handleSelectionChange(val) {
this.multipleSelection = val;
},
filterMethod(query, item) {
return item.username.indexOf(query) > -1 || item.loginname.indexOf(query) > -1;
},
openView(row) {
this.unionname = row.unionname
this.pageForm.hdid = row.hdid
this.pageForm.ghid = row.ghid
this.v = "view"
$.post(base + "/platform/zgfw/lxy/ghbm/findBm", {ghId: row.ghid, hdId: row.hdid}, (data) => {
sublime.closeLoadingbar();
this.tabLoading = false
if (data.code == 0) {
this.bmTableData = data.data;
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
openBm(row) {
this.tabKey = new Date().getTime()
this.stepActive = 0
this.userPageForm = {
sign: 0,
check: [],
hdid: row.hdid,
unionid: row.ghid,
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: ""
}
$.post(base + "/platform/zgfw/lxy/ghbm/getNumberData", this.userPageForm, (data) => {
this.numData = data.data
this.v = 'bm'
this.multipleSelection = []
this.userData = []
this.userPageData()
})
},
openEdit(row) {
this.tabKey = new Date().getTime()
this.stepActive = 0
this.userPageForm = {
sign: 1,
check: [],
hdid: row.hdid,
unionid: row.ghid,
pageNumber: 1,
pageSize: 10,
totalCount: 0,
pageOrderName: "",
pageOrderBy: ""
}
$.post(base + "/platform/zgfw/lxy/ghbm/getNumberData", this.userPageForm, (data) => {
this.numData = data.data
this.multipleSelection = data.data.multiple.map(v => {
return v.id
})
this.userData = []
this.v = 'bm'
this.userPageData()
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.pageData()
},
pageOrder(column) {//按字段排序
this.pageForm.pageOrderName = column.prop;
this.pageForm.pageOrderBy = column.order;
this.pageData();
},
pageNumberChange(val) {//页码更新操作
this.pageForm.pageNumber = val;
this.pageData();
},
pageSizeChange(val) {//分页大小更新操作
this.pageForm.pageSize = val;
this.pageData();
},
pageData() {
sublime.showLoadingbar();
this.tabLoading = true
$.post(base + "/platform/zgfw/lxy/ghbm/pageData", this.pageForm, (data) => {
sublime.closeLoadingbar();
this.tabLoading = false
if (data.code == 0) {
this.tableData = data.data.list;
this.pageForm.totalCount = data.data.totalCount;
} else {
this.$message({
message: data.msg,
type: 'error'
});
}
}, "json");
},
uploadMaterial(row) {
if (row.files && !Array.isArray(row.files)) {
row.files = JSON.parse(row.files)
}
this.uploadForm = row
this.importVisible = true;
},
async viewInfo(row) {
let files = []
if (Array.isArray(row.files)) {
files = row.files
} else {
files = JSON.parse(row.files)
}
this.viewDataFgh = files
this.viewDialog = true
},
doImport() {
this.importVisible = false
},
},
async created() {
this.unions = await getUnions()
this.lxyHd = await getNowLxyHd()
this.pageForm.hdid = this.lxyHd[0].id
this.pageData();
},
component: {
'file-upload': httpVueLoader('/components/plugins/FileUpload.vue'),
}
})
</script>
<!--#layout("/platform/zgfw/lxy/dialogView.html"){}#-->
<!--#
}
#-->