This commit is contained in:
那些花儿
2025-09-10 08:41:32 +08:00
parent 7e9ec112f1
commit 3a43ab0352
19 changed files with 1004 additions and 622 deletions
@@ -52,6 +52,12 @@ public class DifficultHelpBranchUnionApprovalController {
public void form() {
}
@At
@SaCheckPermission("h5.difficultHelp.branchUnionApproval")
@Ok("beetl:/platform/zhghh5/staffbenefit/difficulthelp/branchunionapproval/index.html")
public void h5() {
}
@At
@ApiOperation("困难补助分工会审核列表")
@@ -52,6 +52,11 @@ public class DifficultHelpSchoolUnionApprovalController {
public void form() {
}
@At
@SaCheckPermission("h5.difficultHelp.schoolUnionApproval")
@Ok("beetl:/platform/zhghh5/staffbenefit/difficulthelp/schoolunionapproval/index.html")
public void h5() {
}
@At
@ApiOperation("困难补助校工会审核列表")
@@ -72,6 +72,12 @@ public class MemberApplyBranchUnionApprovalController {
public void form() {
}
@At
@Ok("beetl:/platform/zhghh5/staffmanage/member/apply/branchunionapproval/index.html")
@SaCheckPermission("h5.member.apply.branchUnionApproval")
public void h5() {
}
@At
@ApiOperation("会员入会申请分工会审核列表")
@SaCheckPermission("member.apply.branchUnionApproval")
@@ -58,6 +58,12 @@ public class MemberApplyController {
public void index() {
}
@At
@Ok("beetl:/platform/zhghh5/staffmanage/member/apply/submit/index.html")
@SaCheckPermission("h5.member.apply.submit")
public void h5() {
}
@At
@ApiOperation("保存申请")
@@ -53,6 +53,13 @@ public class MemberApplyMineController {
}
@At
@Ok("beetl:/platform/zhghh5/staffmanage/member/apply/mine/index.html")
@SaCheckPermission("h5.member.apply.mine")
public void h5() {
}
@At
@ApiOperation("会员入会申请,我的申请列表")
@SaCheckPermission("member.apply.mine")
@@ -70,6 +70,11 @@ public class MemberApplySchoolUnionApprovalController {
public void form() {
}
@At
@Ok("beetl:/platform/zhghh5/staffmanage/member/apply/schoolunionapproval/index.html")
@SaCheckPermission("h5.member.apply.schoolunionapproval")
public void h5() {
}
@At
@ApiOperation("会员入会校工会审核列表")
@@ -45,6 +45,12 @@ public class MemberInfoBoardController {
public void index() {
}
@At
@Ok("beetl:/platform/zhghh5/staffmanage/member/board/index.html")
@SaCheckPermission("h5.member.info.board")
public void h5() {
}
/**
* @return 今年和去年的会员数
*/
@@ -43,6 +43,12 @@ public class MemberComprehensiveController {
public void index() {
}
@At
@Ok("beetl:/platform/zhghh5/staffmanage/member/query/index.html")
@SaCheckPermission("h5.member.query")
public void h5() {
}
@At
@SaCheckPermission("member.statistics.comprehensive")
public Result pageData(MemberStatisticsPageForm pageForm) {
@@ -3,7 +3,7 @@ layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<van-sticky>
<van-nav-bar title="帮扶申请记录" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-nav-bar title="帮扶分工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
@@ -23,9 +23,14 @@ layout("/layouts/platform_h5.html"){
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
<van-tabs v-model="pageForm.approvalText"
@change="(val)=>{this.pageForm.audit = val==='1';this.doSearch();}">
<van-tab title="已审核" name="1"></van-tab>
<van-tab title="未审核" name="0"></van-tab>
</van-tabs>
</van-sticky>
<table-list api="/platform/difficultHelp/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<table-list api="/platform/difficultHelp/branchUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="受助人">{{row.userName + '(' + row.loginName + ')'}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
@@ -39,40 +44,44 @@ layout("/layouts/platform_h5.html"){
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onEdit(row)">
<i class="fa fa-check-square-o"></i>
<span>编辑</span>
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
<i class="fa fa-check"></i>
<span>审核</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(item)">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
</template>
</table-list>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="分工会审核"></van-nav-bar>
</van-sticky>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field label="审意见" name="tf_opinion" v-model="formData.tf_opinion"
required :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
</van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回到发起人</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝申请</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意申请</van-button>
</div>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field
v-model="formData.tf_opinion"
name="tf_opinion"
label="审意见"
placeholder="请输入审批意见"
:rules="[{ required: true, message: '请填写审批意见' }]"
required
maxlength="100"
show-word-limit
></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
</div>
</info>
</van-popup>
</div>
</info>
</div>
<script>
<!--#include("../common/info.js"){}#-->
new Vue({
el: '#app',
store,
@@ -83,19 +92,131 @@ layout("/layouts/platform_h5.html"){
pageSize: 10,
searchKeyword: '',
unionId: '',
unitId: ''
unitId: '',
approvalText: "0",
audit: false
},
unionList: [],
unitList: [],
infoShow: false
formData: {},
showApprovalForm: false
}
},
components: {
"info": INFO
},
methods: {
historyBack,
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
// 查看详情
onView(row) {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
},
onApproval(row) {
this.showApprovalForm = true
this.$refs.infoRef.onOpen(row)
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
},
async handleTaskAction(val) {
try {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.suggestionBoxInfoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
})
}).catch(() => {
})
} catch (error) {
}
},
// 撤回
onRevoke(row) {
this.$dialog.confirm({
title: '提示',
message: '您确定要撤回吗?',
}).then(() => {
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
if (res.code === 0) {
this.$toast.success('撤回成功');
this.doSearch();
}
})
}).catch(() => {
});
},
unionChange() {
this.$set(this.pageForm, "unitId", null)
this.flushUnits()
this.doSearch()
},
async initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.unionList = await this.$businessTool.listUnion(unionId)
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
},
async flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.unitList = await this.$businessTool.listUnit(unionId)
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin && !this.pageForm.unionId) {
this.unitList.unshift({ text: "全部单位", value: null })
}
if (this.unitList && this.unitList.length > 0) {
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
},
},
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
@@ -86,6 +86,7 @@ const INFO = {
<slot></slot>
</van-action-sheet>
`,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
visible: false,
@@ -126,4 +127,36 @@ const INFO = {
})
},
},
style: /*language=CSS*/ `
.column-cell {
flex-direction: column;
}
.family-table {
width: 100%;
max-width: 100%;
border-collapse: collapse;
table-layout: auto;
text-align: center;
font-family: 'Arial', sans-serif;
margin: 20px 0;
}
.table-header {
background-color: gray;
color: white;
font-weight: bold;
text-transform: uppercase;
}
.table-row {
background-color: #f9f9f9;
transition: background-color 0.3s;
}
.table-row:hover {
background-color: #f1f1f1;
}
.table-cell {
padding: 10px 20px;
border: 1px solid #ddd;
text-align: center;
}
`
}
@@ -24,8 +24,8 @@ layout("/layouts/platform_h5.html"){
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/difficultHelp/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<table-list api="/platform/difficultHelp/branchUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="受助人">{{row.userName + '(' + row.loginName + ')'}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
@@ -55,13 +55,8 @@ layout("/layouts/platform_h5.html"){
</div>
</template>
</table-list>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="申请信息"></van-nav-bar>
</van-sticky>
<info ref="infoRef"></info>
</van-popup>
<info ref="infoRef"></info>
</div>
<script>
<!--#include("../common/info.js"){}#-->
@@ -80,8 +75,6 @@ layout("/layouts/platform_h5.html"){
},
unionList: [],
unitList: [],
infoShow: false
}
},
components: {
@@ -89,18 +82,15 @@ layout("/layouts/platform_h5.html"){
},
methods: {
historyBack,
onView(row) {
this.infoShow = true
this.$nextTick(() => {
this.$refs.infoRef.onOpen(row)
})
this.$refs.infoRef.onOpen(row)
},
onEdit(row) {
this.$pjaxReplace('/platform/h5/difficultHelp/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
},
onRevoke(row) {
this.$dialog.confirm({
title: "提示",
@@ -114,7 +104,7 @@ layout("/layouts/platform_h5.html"){
})
})
},
onDelete(id) {
this.$dialog.confirm({
title: "提示",
@@ -132,7 +122,7 @@ layout("/layouts/platform_h5.html"){
})
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
@@ -1,10 +1,225 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<van-sticky>
<van-nav-bar title="帮扶校工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
show-action
:reverse-color="false"
input-align="left"
@search="doSearch">
<template #action>
<div @click="doSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
:close-on-click-outside="false"
:close-on-click-overlay="false"
>
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
<van-tabs v-model="pageForm.approvalText"
@change="(val)=>{this.pageForm.audit = val==='1';this.doSearch();}">
<van-tab title="已审核" name="1"></van-tab>
<van-tab title="未审核" name="0"></van-tab>
</van-tabs>
</van-sticky>
</body>
</html>
<table-list api="/platform/difficultHelp/schoolUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="受助人">{{row.userName + '(' + row.loginName + ')'}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
<table-column label="填报时间">{{row.applyTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
<i class="fa fa-check"></i>
<span>审核</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(item)">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
</template>
</table-list>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field
v-model="formData.tf_opinion"
name="tf_opinion"
label="审批意见"
placeholder="请输入审批意见"
:rules="[{ required: true, message: '请填写审批意见' }]"
required
maxlength="100"
show-word-limit
></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
</div>
</div>
</info>
</div>
<script>
<!--#include("../common/info.js"){}#-->
new Vue({
el: '#app',
store,
data() {
return {
pageForm: {
pageNo: 1,
pageSize: 10,
searchKeyword: '',
unionId: '',
unitId: '',
approvalText: "0",
audit: false
},
unionList: [],
unitList: [],
formData: {},
showApprovalForm: false
}
},
components: {
"info": INFO
},
methods: {
historyBack,
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
// 查看详情
onView(row) {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
},
onApproval(row) {
this.showApprovalForm = true
this.$refs.infoRef.onOpen(row)
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
},
async handleTaskAction(val) {
try {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.suggestionBoxInfoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
})
}).catch(() => {
})
} catch (error) {
}
},
// 撤回
onRevoke(row) {
this.$dialog.confirm({
title: '提示',
message: '您确定要撤回吗?',
}).then(() => {
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
if (res.code === 0) {
this.$toast.success('撤回成功');
this.doSearch();
}
})
}).catch(() => {
});
},
unionChange() {
this.$set(this.pageForm, "unitId", null)
this.flushUnits()
this.doSearch()
},
async initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.unionList = await this.$businessTool.listUnion(unionId)
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
},
async flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.unitList = await this.$businessTool.listUnit(unionId)
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin && !this.pageForm.unionId) {
this.unitList.unshift({ text: "全部单位", value: null })
}
if (this.unitList && this.unitList.length > 0) {
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
},
},
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -18,51 +18,52 @@ layout("/layouts/platform_h5.html"){
</van-dropdown-menu>
</van-sticky>
<div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
<div class="list-card" v-for="row in tableData" :key="row.id">
<div class="list-card-body">
<van-cell title="工">{{row.loginName}}</van-cell>
<van-cell title="姓名">{{row.userName}}</van-cell>
<van-cell title="所属工会">{{row.unionName}}</van-cell>
<van-cell title="工作单位">{{row.unitName}}</van-cell>
<van-cell title="在职状态">{{row.userState}}</van-cell>
<van-cell title="人员类型">{{row.personType}}</van-cell>
<van-cell title="流程状态">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</van-cell>
</div>
<div class="list-card-footer">
<van-button type="info" size="small" @click="openView(row)">查看</van-button>
<van-button type="primary" v-if="row.taskState === 10" @click="openApproval(row)" size="small">审核</van-button>
<van-button type="danger" v-if="row.canRevoke" @click="openRevoke(row)" size="small">撤回</van-button>
</div>
</div>
</van-list>
<van-empty image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据" v-else></van-empty>
</div>
<table-list api="/platform/member/apply/branchUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="工号">{{row.loginName}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="填报时间">{{row.applyDateTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
<i class="fa fa-check"></i>
<span>审核</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(item)">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
</template>
</table-list>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="分工会审核"></van-nav-bar>
</van-sticky>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field label="审核意见" name="tf_opinion" v-model="formData.tf_opinion"
required :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
</van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回到发起人</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝申请</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意申请</van-button>
</div>
</div>
</info>
</van-popup>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field
v-model="formData.tf_opinion"
name="tf_opinion"
label="审批意见"
placeholder="请输入审批意见"
:rules="[{ required: true, message: '请填写审批意见' }]"
required
maxlength="100"
show-word-limit
></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
</div>
</div>
</info>
</div>
<script>
<!--#include("../common/info.js"){}#-->
@@ -87,108 +88,88 @@ layout("/layouts/platform_h5.html"){
],
tableLoading: false,
tableFinished: false,
// 审核相关
infoShow: false,
showApprovalForm: false,
formData: {
tf_opinion: ""
},
formData: {},
showApprovalForm: false
}
},
components: {
"info": INFO
},
methods: {
historyBack,
openView(row) {
this.infoShow = true
this.$nextTick(() => {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openApproval(row) {
this.infoShow = true
this.$nextTick(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.info.onOpen(row)
})
},
handleTaskAction(val) {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.infoShow = false
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
})
})
},
openRevoke(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要撤回吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.pageData()
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
})
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
this.$axios.post("/platform/member/apply/branchUnionAudit/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
this.pageForm.totalCount = res.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.tableFinished = true
} else {
this.pageForm.pageNumber++
}
this.tableLoading = false
} else {
this.$toast(res.msg)
}
})
},
historyBack,
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
// 查看详情
onView(row) {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
},
onApproval(row) {
this.showApprovalForm = true
this.$refs.infoRef.onOpen(row)
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
},
async handleTaskAction(val) {
try {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.suggestionBoxInfoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
})
}).catch(() => {
})
} catch (error) {
}
},
// 撤回
onRevoke(row) {
this.$dialog.confirm({
title: '提示',
message: '您确定要撤回吗?',
}).then(() => {
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
if (res.code === 0) {
this.$toast.success('撤回成功');
this.doSearch();
}
})
}).catch(() => {
});
},
initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
@@ -222,11 +203,10 @@ layout("/layouts/platform_h5.html"){
})
}
},
created() {
this.initUnion()
this.flushUnits()
this.pageData()
}
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
<!--#
@@ -1,103 +1,115 @@
const INFO = {
template: /*language=HTML*/ `
<div>
<van-tabs v-model="activeName">
<van-tab title="申请信息" name="basicInfo">
<van-cell>
<div style="font-weight: bold;font-size: 16px;display: flex;align-items: center;justify-content: space-between">
<div>
<span>申请信息</span> <el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<div style="color: #1867b0;" @click="clickUpOrDown=!clickUpOrDown">
<span>{{clickUpOrDown ? '点击收起' : '点击展开'}}</span>
<van-icon :name="clickUpOrDown?'arrow-up':'arrow-down'"></van-icon>
</div>
</div>
</van-cell>
<template v-if="clickUpOrDown">
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
<van-cell title="姓名">{{ viewData.username }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="民族">{{ viewData.nation }}</van-cell>
<van-cell title="出生日期">{{ $moment(viewData.birthday).format("YYYY年MM月DD日") }}</van-cell>
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
<van-cell title="学历">{{ viewData.education }}</van-cell>
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
<van-cell title="党政职务">{{ viewData.position }}</van-cell>
<van-cell title="工作单位">{{ viewData.unitName }}</van-cell>
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
<van-cell title="所属校区">{{ viewData.campus }}</van-cell>
<van-cell title="身份证号码">{{ viewData.idCard }}</van-cell>
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
<van-cell title="电子邮箱">{{ viewData.email }}</van-cell>
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
<van-cell title="人员类型">{{ viewData.personType }}</van-cell>
<van-cell title="人员性质">{{ viewData.preparedBy || '暂无' }}</van-cell>
<template v-if="viewData.loginname === $store.state.user.loginnmae">
<van-cell title="家庭成员" class="column-cell">
<table class="family-table">
<thead>
<tr>
<th class="table-header">序号</th>
<th class="table-header">与本人关系</th>
<th class="table-header">姓名</th>
<th class="table-header">单位</th>
<th class="table-header">备注</th>
</tr>
</thead>
<tbody>
<tr class="table-row" v-for="(item, index) in viewData.families" :key="index">
<td class="table-cell">{{ index + 1 }}</td>
<td class="table-cell">{{ item.relation }}</td>
<td class="table-cell">{{ item.name }}</td>
<td class="table-cell">{{ item.unit }}</td>
<td class="table-cell">{{ item.remark }}</td>
</tr>
</tbody>
</table>
</van-cell>
<van-cell title="个人简历">
<template #label>
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span style="font-size: 14px" v-else>无数据</span>
</template>
</van-cell>
</template>
<van-action-sheet v-model="visible" title="查看详情">
<div>
<van-cell-group title="基本信息">
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
<van-cell title="姓名">{{ viewData.username }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="民族">{{ viewData.nation }}</van-cell>
<van-cell title="出生日期">{{ $moment(viewData.birthday).format("YYYY年MM月DD日") }}</van-cell>
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
<van-cell title="学历">{{ viewData.education }}</van-cell>
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
<van-cell title="党政职务">{{ viewData.position }}</van-cell>
<van-cell title="工作单位">{{ viewData.unitName }}</van-cell>
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
<van-cell title="所属校区">{{ viewData.campus }}</van-cell>
<van-cell title="身份证号码">{{ viewData.idCard }}</van-cell>
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
<van-cell title="电子邮箱">{{ viewData.email }}</van-cell>
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
<van-cell title="人员类型">{{ viewData.personType }}</van-cell>
<van-cell title="人员性质">{{ viewData.preparedBy || '暂无' }}</van-cell>
<template v-if="viewData.loginname === $store.state.user.loginnmae">
<van-cell title="家庭成员" class="column-cell">
<table class="family-table">
<thead>
<tr>
<th class="table-header">序号</th>
<th class="table-header">与本人关系</th>
<th class="table-header">姓名</th>
<th class="table-header">单位</th>
<th class="table-header">备注</th>
</tr>
</thead>
<tbody>
<tr class="table-row" v-for="(item, index) in viewData.families" :key="index">
<td class="table-cell">{{ index + 1 }}</td>
<td class="table-cell">{{ item.relation }}</td>
<td class="table-cell">{{ item.name }}</td>
<td class="table-cell">{{ item.unit }}</td>
<td class="table-cell">{{ item.remark }}</td>
</tr>
</tbody>
</table>
</van-cell>
<van-cell title="个人简历">
<template #label>
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span style="font-size: 14px" v-else>无数据</span>
</template>
</van-cell>
</template>
</van-tab>
<van-tab title="审核信息" name="audit" v-if="doneTasks && doneTasks.length > 0">
</van-tab>
</van-tabs>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
</van-cell-group>
<template v-for="task in doneTasks">
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
</van-cell>
<van-cell title="申请时间">{{ task.finishTime }}</van-cell>
<van-cell title="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</van-cell>
</van-cell-group>
<van-cell-group :title="task.displayName" v-else>
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
</van-cell>
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
<van-cell title="办理结果">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="task.ext.caseFilingResult"></dict-tag>
</van-cell>
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
<div v-html="task.taskFormData.tf_opinion"></div>
</van-cell>
</van-cell-group>
</template>
</div>
<slot></slot>
</van-action-sheet>
`,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
visible: false,
row: {},
viewData: {},
doneTasks: [],
activeName: 'basicInfo',
clickUpOrDown: true,
}
},
methods: {
onOpen(row) {
this.row = row
this.visible = true
this.info()
this.getDoneTasks()
},
// 关闭
onClose(){
this.visible = false
},
info() {
this.$axios.post("/platform/member/apply/mine/findMemberApplyRecord", { id: this.row.id }).then((res) => {
if (res.code === 0) {
@@ -112,10 +124,6 @@ const INFO = {
}
})
},
// 查看流程图
openChart(){
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
}
},
style: /*language=CSS*/ `
.column-cell {
@@ -24,8 +24,8 @@ layout("/layouts/platform_h5.html"){
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/member/apply/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="工号">{{row.loginName}}</table-column>
@@ -55,13 +55,8 @@ layout("/layouts/platform_h5.html"){
</div>
</template>
</table-list>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="申请信息"></van-nav-bar>
</van-sticky>
<info ref="infoRef"></info>
</van-popup>
<info ref="infoRef"></info>
</div>
<script>
<!--#include("../common/info.js"){}#-->
@@ -80,8 +75,6 @@ layout("/layouts/platform_h5.html"){
},
unionList: [],
unitList: [],
infoShow: false
}
},
components: {
@@ -89,18 +82,15 @@ layout("/layouts/platform_h5.html"){
},
methods: {
historyBack,
onView(row) {
this.infoShow = true
this.$nextTick(() => {
this.$refs.infoRef.onOpen(row)
})
this.$refs.infoRef.onOpen(row)
},
onEdit(row) {
this.$pjaxReplace('/platform/h5/member/apply/submit?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
},
onRevoke(row) {
this.$dialog.confirm({
title: "提示",
@@ -114,7 +104,7 @@ layout("/layouts/platform_h5.html"){
})
})
},
onDelete(id) {
this.$dialog.confirm({
title: "提示",
@@ -132,7 +122,7 @@ layout("/layouts/platform_h5.html"){
})
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
@@ -3,238 +3,211 @@ layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar title="入会校工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-sticky>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
:show-action="false"
:reverse-color="false"
input-align="left"
@search="doSearch"
></van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<van-sticky>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
:show-action="false"
:reverse-color="false"
input-align="left"
@search="doSearch"
></van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了" @load="pageData">
<div class="list-card" v-for="row in tableData" :key="row.id">
<div class="list-card-body">
<van-cell title="工">{{row.loginName}}</van-cell>
<van-cell title="姓名">{{row.userName}}</van-cell>
<van-cell title="所属工会">{{row.unionName}}</van-cell>
<van-cell title="工作单位">{{row.unitName}}</van-cell>
<van-cell title="在职状态">{{row.userState}}</van-cell>
<van-cell title="人员类型">{{row.personType}}</van-cell>
<van-cell title="流程状态">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</van-cell>
</div>
<div class="list-card-footer">
<van-button type="info" size="small" @click="openView(row)">查看</van-button>
<van-button type="primary" v-if="row.taskState === 10" @click="openApproval(row)" size="small">审核</van-button>
<van-button type="danger" v-if="row.canRevoke" @click="openRevoke(row)" size="small">撤回</van-button>
</div>
</div>
</van-list>
<van-empty image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据" v-else></van-empty>
</div>
<table-list api="/platform/member/apply/branchUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="工号">{{row.loginName}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="填报时间">{{row.applyDateTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
<i class="fa fa-check"></i>
<span>审核</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(item)">
<i class="fa fa-undo"></i>
<span>撤回</span>
</div>
</template>
</table-list>
<van-popup v-model="infoShow" position="right" :style="{ height: '100%', width: '100%' }" safe-area-inset-bottom>
<van-sticky>
<van-nav-bar @click-left="infoShow=false" left-arrow left-text="返回" title="校工会审核"></van-nav-bar>
</van-sticky>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field label="审核意见" name="tf_opinion" v-model="formData.tf_opinion"
required :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
</van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回到发起人</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝申请</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意申请</van-button>
</div>
</div>
</info>
</van-popup>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field
v-model="formData.tf_opinion"
name="tf_opinion"
label="审批意见"
placeholder="请输入审批意见"
:rules="[{ required: true, message: '请填写审批意见' }]"
required
maxlength="100"
show-word-limit
></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
</div>
</div>
</info>
</div>
<script>
<!--#include("../common/mobileMemberChangeInfo.js"){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
audit: false
},
tableData: [],
unionList: [],
unitList: [],
auditList: [
{ text: "审核", value: true },
{ text: "未审核", value: false }
],
tableLoading: false,
tableFinished: false,
// 审核相关
infoShow: false,
showApprovalForm: false,
formData: {
tf_opinion: ""
},
}
},
components: {
"info": INFO
},
methods: {
historyBack,
openView(row) {
this.infoShow = true
this.$nextTick(() => {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openApproval(row) {
this.infoShow = true
this.$nextTick(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.info.onOpen(row)
})
},
handleTaskAction(val) {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.infoShow = false
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
})
})
},
openRevoke(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要撤回吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.pageData()
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
})
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
this.$axios.post("/platform/member/apply/schoolUnionAudit/pageData", this.pageForm).then((res) => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
this.pageForm.totalCount = res.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.tableFinished = true
} else {
this.pageForm.pageNumber++
}
this.tableLoading = false
} else {
this.$toast(res.msg)
}
})
},
unionChange() {
this.$set(this.pageForm, "unitId", null)
this.flushUnits()
this.doSearch()
},
initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.$businessTool.listUnion(unionId).then((data) => {
this.unionList = data
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
})
},
flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.$businessTool.listUnit(unionId).then((data) => {
this.unitList = data
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (this.unitList && this.unitList.length > 0) {
this.unitList.unshift({ text: "全部单位", value: null })
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
})
}
},
created() {
this.initUnion()
this.flushUnits()
this.pageData()
}
})
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
audit: false
},
tableData: [],
unitList: [],
auditList: [
{ text: "已审核", value: true },
{ text: "审核", value: false }
],
tableLoading: false,
tableFinished: false,
// 审核相关
formData: {},
showApprovalForm: false
}
},
components: {
"info": INFO
},
methods: {
historyBack,
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
// 查看详情
onView(row) {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
},
onApproval(row) {
this.showApprovalForm = true
this.$refs.infoRef.onOpen(row)
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
},
async handleTaskAction(val) {
try {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.suggestionBoxInfoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
})
}).catch(() => {
})
} catch (error) {
}
},
// 撤回
onRevoke(row) {
this.$dialog.confirm({
title: '提示',
message: '您确定要撤回吗?',
}).then(() => {
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
if (res.code === 0) {
this.$toast.success('撤回成功');
this.doSearch();
}
})
}).catch(() => {
});
},
initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.$businessTool.listUnion(unionId).then((data) => {
this.unionList = data
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
})
},
flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.$businessTool.listUnit(unionId).then((data) => {
this.unitList = data
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (this.unitList && this.unitList.length > 0) {
this.unitList.unshift({ text: "全部单位", value: null })
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
})
}
},
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
<!--#
}
@@ -94,7 +94,7 @@ layout("/layouts/platform_h5.html"){
}
</style>
<div id="app" v-cloak>
<van-nav-bar title="会员统计" @click-left="historyBack" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
<van-nav-bar title="会员统计" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-row style="background-color: #f0f2f5" class="margin-top5" type="flex">
<van-col span="12" class="top-col">
<div class="col-title">会员数</div>
@@ -218,6 +218,7 @@ layout("/layouts/platform_h5.html"){
unionMember: []
},
methods: {
historyBack,
/**
* 会员数
* @returns {Promise<void>}
@@ -1,20 +1,63 @@
const MOBILE_MEMBER_INFO = {
template: `
<div>
<van-cell-group>
<van-cell title="姓名">{{ viewData.username }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="联系方式">{{ viewData.mobile }}</van-cell>
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
<van-cell title="所属单位">{{ viewData.unitName }}</van-cell>
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
<van-cell title="人事编制">{{ viewData.preparedBy }}</van-cell>
<van-cell title="人员类型">{{ viewData.personType }}</van-cell>
<van-cell title="出生日期">{{ $moment(viewData.birthday).format('YYYY-MM-DD') }}</van-cell>
<van-cell title="学">{{ viewData.education }}</van-cell>
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
<van-cell title="是否会员">{{ viewData.member ? '是' : '否' }}</van-cell>
</van-cell-group>
<van-cell-group title="基本信息">
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
<van-cell title="姓名">{{ viewData.username }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="民族">{{ viewData.nation }}</van-cell>
<van-cell title="出生日期">{{ $moment(viewData.birthday).format("YYYY年MM月DD日") }}</van-cell>
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
<van-cell title="学历">{{ viewData.education }}</van-cell>
<van-cell title="学">{{ viewData.academicDegree }}</van-cell>
<van-cell title="党政职务">{{ viewData.position }}</van-cell>
<van-cell title="工作单位">{{ viewData.unitName }}</van-cell>
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
<van-cell title="所属校区">{{ viewData.campus }}</van-cell>
<van-cell title="身份证号码">{{ viewData.idCard }}</van-cell>
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
<van-cell title="电子邮箱">{{ viewData.email }}</van-cell>
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
<van-cell title="人员类型">{{ viewData.personType }}</van-cell>
<van-cell title="人员性质">{{ viewData.preparedBy || '暂无' }}</van-cell>
<template v-if="viewData.loginname === $store.state.user.loginnmae">
<van-cell title="家庭成员" class="column-cell">
<table class="family-table">
<thead>
<tr>
<th class="table-header">序号</th>
<th class="table-header">与本人关系</th>
<th class="table-header">姓名</th>
<th class="table-header">单位</th>
<th class="table-header">备注</th>
</tr>
</thead>
<tbody>
<tr class="table-row" v-for="(item, index) in viewData.families" :key="index">
<td class="table-cell">{{ index + 1 }}</td>
<td class="table-cell">{{ item.relation }}</td>
<td class="table-cell">{{ item.name }}</td>
<td class="table-cell">{{ item.unit }}</td>
<td class="table-cell">{{ item.remark }}</td>
</tr>
</tbody>
</table>
</van-cell>
<van-cell title="个人简历">
<template #label>
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span style="font-size: 14px" v-else>无数据</span>
</template>
</van-cell>
</template>
</van-cell-group>
</div>
`,
props: {
@@ -3,7 +3,7 @@ layout("/layouts/platform_h5.html"){
#-->
<style></style>
<div id="app" v-cloak>
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="会员查询" placeholder fixed></van-nav-bar>
<van-nav-bar title="会员查询" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-sticky offset-top="46px">
<van-search
v-model="pageForm.searchKeyword"
@@ -20,26 +20,22 @@ layout("/layouts/platform_h5.html"){
</van-dropdown-menu>
</van-sticky>
<div>
<van-list v-if="tableData.length>0" v-model="tableLoading" :finished="tableFinished" finished-text="没有更多了"
@load="pageData">
<div class="table-list">
<div class="table-card" v-for="row in tableData" :key="row.id">
<van-cell title="姓名" :value="row.username"></van-cell>
<van-cell title="工号" :value="row.loginname"></van-cell>
<van-cell title="性别" :value="row.sex"></van-cell>
<van-cell title="联系电话" :value="row.mobile"></van-cell>
<van-cell title="所属工会" :value="row.unionName"></van-cell>
<van-cell title="所属单位" :value="row.unitName"></van-cell>
<van-cell class="table-card-footer">
<van-button type="info" size="small" @click="viewInfo(row)">查看</van-button>
</van-cell>
</div>
<table-list api="/platform/member/info/group/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="姓名">{{row.username}}</table-column>
<table-column label="工号">{{row.loginname}}</table-column>
<table-column label="性别">{{row.sex}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="所属单位">{{row.unitName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="viewInfo(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
</van-list>
<van-empty v-else image="/assets/platform/plugins/vant-green/images/nodata/nodata.png"
description="暂无数据"></van-empty>
</div>
</template>
</table-list>
<div :style="{color:'#1890ff'}" style="text-align: right; position: fixed; bottom: 20px; right: 20px">
<van-button :color="'#1890ff'" hairline size="small" type="primary">总人数:{{pageForm.totalCount}}人
@@ -64,11 +60,8 @@ layout("/layouts/platform_h5.html"){
unionId: "",
unitId: ""
},
tableData: [],
unionList: [],
unitList: [],
tableLoading: false,
tableFinished: false,
userId: "",
infoShow: false
@@ -79,6 +72,11 @@ layout("/layouts/platform_h5.html"){
},
methods: {
historyBack,
onReady() {
this.doSearch()
},
viewInfo(row) {
this.userId = row.id
this.infoShow = true
@@ -89,63 +87,46 @@ layout("/layouts/platform_h5.html"){
this.doSearch()
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
pageData() {
this.tableLoading = true
this.$axios.post("/platform/member/info/group/pageData", {pageForm: JSON.stringify(this.pageForm)}).then((resp) => {
this.tableData = this.tableData.concat(resp.data.list)
this.pageForm.totalCount = resp.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.tableFinished = true
} else {
this.pageForm.pageNumber++
}
this.tableLoading = false
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
initUnion() {
async initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.$businessTool.listUnion(unionId).then((data) => {
this.unionList = data
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({text: "全部工会", value: null})
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
this.unionList = await this.$businessTool.listUnion(unionId)
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
},
flushUnits() {
async flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.$businessTool.listUnit(unionId).then((data) => {
this.unitList = data
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin && !this.pageForm.unionId) {
this.unitList.unshift({text: "全部单位", value: null})
}
if (this.unitList && this.unitList.length > 0) {
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
this.unitList = await this.$businessTool.listUnit(unionId)
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
}
if (hasAdmin && !this.pageForm.unionId) {
this.unitList.unshift({ text: "全部单位", value: null })
}
if (this.unitList && this.unitList.length > 0) {
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
},
},
created() {
this.initUnion()
this.flushUnits()
this.pageData()
}
})
</script>