commit
This commit is contained in:
+5
@@ -45,6 +45,11 @@ public class MemberApplyUnionGroupApprovalController {
|
|||||||
@SaCheckPermission("member.apply.unionGroupApproval")
|
@SaCheckPermission("member.apply.unionGroupApproval")
|
||||||
public void index() {}
|
public void index() {}
|
||||||
|
|
||||||
|
@At
|
||||||
|
@Ok("beetl:/platform/zhghh5/staffmanage/member/apply/uniongroupapproval/index.html")
|
||||||
|
@SaCheckPermission("h5.member.apply.uniongroupapproval")
|
||||||
|
public void h5() {
|
||||||
|
}
|
||||||
|
|
||||||
@At
|
@At
|
||||||
@ApiOperation("会员入会申请工会小组审核列表")
|
@ApiOperation("会员入会申请工会小组审核列表")
|
||||||
|
|||||||
+15
@@ -2,12 +2,15 @@ package com.budwk.app.zhgh.staffmanage.member.interceptor;
|
|||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.budwk.app.base.constant.RoleConstant;
|
||||||
import com.budwk.app.flow.constant.FlowConst;
|
import com.budwk.app.flow.constant.FlowConst;
|
||||||
import com.budwk.app.flow.engine.FlowInterceptor;
|
import com.budwk.app.flow.engine.FlowInterceptor;
|
||||||
import com.budwk.app.flow.engine.core.Execution;
|
import com.budwk.app.flow.engine.core.Execution;
|
||||||
import com.budwk.app.flow.engine.core.ServiceContext;
|
import com.budwk.app.flow.engine.core.ServiceContext;
|
||||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||||
|
import com.budwk.app.sys.models.Sys_role;
|
||||||
import com.budwk.app.sys.models.Sys_user;
|
import com.budwk.app.sys.models.Sys_user;
|
||||||
|
import com.budwk.app.sys.models.Sys_user_role;
|
||||||
import com.budwk.app.zhgh.staffmanage.member.models.MemberApplyRecord;
|
import com.budwk.app.zhgh.staffmanage.member.models.MemberApplyRecord;
|
||||||
import org.nutz.dao.Chain;
|
import org.nutz.dao.Chain;
|
||||||
import org.nutz.dao.Cnd;
|
import org.nutz.dao.Cnd;
|
||||||
@@ -45,6 +48,18 @@ public class MemberApplySchoolApprovalInterceptor implements FlowInterceptor {
|
|||||||
BeanUtil.copyProperties(record, sysUser);
|
BeanUtil.copyProperties(record, sysUser);
|
||||||
sysUser.setId(record.getUserId());
|
sysUser.setId(record.getUserId());
|
||||||
dao.updateIgnoreNull(sysUser);
|
dao.updateIgnoreNull(sysUser);
|
||||||
|
|
||||||
|
// 还要设置会员角色
|
||||||
|
Sys_role role = dao.fetch(Sys_role.class, Cnd.where(Sys_role::getCode, "=", RoleConstant.MEMBER.name()));
|
||||||
|
|
||||||
|
int count = dao.count(Sys_user_role.class, Cnd.where("userId", "=", record.getUserId()).and("roleId", "=", role.getId()));
|
||||||
|
if (count == 0) {
|
||||||
|
Sys_user_role userRole = new Sys_user_role();
|
||||||
|
userRole.setUserId(record.getUserId());
|
||||||
|
userRole.setRoleId(role.getId());
|
||||||
|
dao.insert(userRole);
|
||||||
|
}
|
||||||
|
|
||||||
// 正常的发送短信,审核通过
|
// 正常的发送短信,审核通过
|
||||||
} else {
|
} else {
|
||||||
// 发TMD短信 HMC,流程在流转到分工会接收环节
|
// 发TMD短信 HMC,流程在流转到分工会接收环节
|
||||||
|
|||||||
@@ -101,7 +101,12 @@ layout("/layouts/platform.html"){
|
|||||||
disabled style="width: 100%"></dict-select>
|
disabled style="width: 100%"></dict-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item></el-descriptions-item>
|
<el-descriptions-item label="编制类别">
|
||||||
|
<el-form-item prop="preparedBy">
|
||||||
|
<dict-select v-model="formData.preparedBy" code="USER_PREPARED_BY_TYPE"
|
||||||
|
disabled style="width: 100%"></dict-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="身份证号码">
|
<el-descriptions-item label="身份证号码">
|
||||||
<el-form-item prop="idCard">
|
<el-form-item prop="idCard">
|
||||||
|
|||||||
+1
-1
@@ -157,7 +157,7 @@ const MEMBER_CHANGE = {
|
|||||||
<el-form-item prop="retireDate">
|
<el-form-item prop="retireDate">
|
||||||
<el-date-picker v-model="formData.retireDate"
|
<el-date-picker v-model="formData.retireDate"
|
||||||
type="date"
|
type="date"
|
||||||
placeholder="请选择出生日期"
|
placeholder="请选择退休日期"
|
||||||
format="yyyy-MM-dd"
|
format="yyyy-MM-dd"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
style="width: 100%"></el-date-picker>
|
style="width: 100%"></el-date-picker>
|
||||||
|
|||||||
+16
-6
@@ -128,12 +128,17 @@ layout("/layouts/platform_h5.html"){
|
|||||||
},
|
},
|
||||||
|
|
||||||
async handleTaskAction(val) {
|
async handleTaskAction(val) {
|
||||||
try {
|
|
||||||
await this.$refs.formRef.validate();
|
await this.$refs.formRef.validate();
|
||||||
this.$dialog.confirm({
|
this.$dialog.confirm({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
message: "您确定要提交吗?"
|
message: "您确定要提交吗?"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
const loading = this.$toast.loading({
|
||||||
|
message: "加载中...",
|
||||||
|
forbidClick: true,
|
||||||
|
overlay: true,
|
||||||
|
duration: 0
|
||||||
|
})
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
...this.formData,
|
...this.formData,
|
||||||
@@ -145,13 +150,10 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.$toast.success(res.msg)
|
this.$toast.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
|
||||||
|
|
||||||
})
|
})
|
||||||
} catch (error) {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 撤回
|
// 撤回
|
||||||
@@ -160,11 +162,19 @@ layout("/layouts/platform_h5.html"){
|
|||||||
title: '提示',
|
title: '提示',
|
||||||
message: '您确定要撤回吗?',
|
message: '您确定要撤回吗?',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
const loading = this.$toast.loading({
|
||||||
|
message: "加载中...",
|
||||||
|
forbidClick: true,
|
||||||
|
overlay: true,
|
||||||
|
duration: 0
|
||||||
|
})
|
||||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
|
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$toast.success('撤回成功');
|
this.$toast.success('撤回成功');
|
||||||
this.doSearch();
|
this.doSearch();
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -98,9 +98,17 @@ layout("/layouts/platform_h5.html"){
|
|||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消"
|
cancelButtonText: "取消"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
const loading = this.$toast.loading({
|
||||||
|
message: "加载中...",
|
||||||
|
forbidClick: true,
|
||||||
|
overlay: true,
|
||||||
|
duration: 0
|
||||||
|
})
|
||||||
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
|
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
|
||||||
this.$toast.success(resp.msg)
|
this.$toast.success(resp.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -112,6 +120,12 @@ layout("/layouts/platform_h5.html"){
|
|||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消"
|
cancelButtonText: "取消"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
const loading = this.$toast.loading({
|
||||||
|
message: "加载中...",
|
||||||
|
forbidClick: true,
|
||||||
|
overlay: true,
|
||||||
|
duration: 0
|
||||||
|
})
|
||||||
this.$axios.post("/platform/member/apply/mine/onDelete", { id }).then((res) => {
|
this.$axios.post("/platform/member/apply/mine/onDelete", { id }).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
@@ -119,6 +133,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
} else {
|
} else {
|
||||||
this.$toast.fail(res.msg)
|
this.$toast.fail(res.msg)
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
+17
-8
@@ -128,12 +128,17 @@ layout("/layouts/platform_h5.html"){
|
|||||||
},
|
},
|
||||||
|
|
||||||
async handleTaskAction(val) {
|
async handleTaskAction(val) {
|
||||||
try {
|
|
||||||
await this.$refs.formRef.validate();
|
await this.$refs.formRef.validate();
|
||||||
this.$dialog.confirm({
|
this.$dialog.confirm({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
message: "您确定要提交吗?"
|
message: "您确定要提交吗?"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
const loading = this.$toast.loading({
|
||||||
|
message: "加载中...",
|
||||||
|
forbidClick: true,
|
||||||
|
overlay: true,
|
||||||
|
duration: 0
|
||||||
|
})
|
||||||
this.$axios.post("/flow/common/executeTask", {
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
...this.formData,
|
...this.formData,
|
||||||
@@ -145,13 +150,10 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.$toast.success(res.msg)
|
this.$toast.success(res.msg)
|
||||||
this.doSearch()
|
this.doSearch()
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
|
||||||
|
|
||||||
})
|
})
|
||||||
} catch (error) {
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 撤回
|
// 撤回
|
||||||
@@ -160,14 +162,21 @@ layout("/layouts/platform_h5.html"){
|
|||||||
title: '提示',
|
title: '提示',
|
||||||
message: '您确定要撤回吗?',
|
message: '您确定要撤回吗?',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
const loading = this.$toast.loading({
|
||||||
|
message: "加载中...",
|
||||||
|
forbidClick: true,
|
||||||
|
overlay: true,
|
||||||
|
duration: 0
|
||||||
|
})
|
||||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
|
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$toast.success('撤回成功');
|
this.$toast.success('撤回成功');
|
||||||
this.doSearch();
|
this.doSearch();
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
initUnion() {
|
initUnion() {
|
||||||
|
|||||||
+37
-4
@@ -143,6 +143,14 @@ layout("/layouts/platform_h5.html"){
|
|||||||
placeholder="请填写人员类型"
|
placeholder="请填写人员类型"
|
||||||
clickable
|
clickable
|
||||||
></van-field>
|
></van-field>
|
||||||
|
<van-field
|
||||||
|
v-model="formData.preparedBy"
|
||||||
|
name="preparedBy"
|
||||||
|
label="编制类别"
|
||||||
|
readonly
|
||||||
|
placeholder="请填写编制类别"
|
||||||
|
clickable
|
||||||
|
></van-field>
|
||||||
<van-field
|
<van-field
|
||||||
v-model="formData.idCard"
|
v-model="formData.idCard"
|
||||||
disabled
|
disabled
|
||||||
@@ -278,6 +286,12 @@ layout("/layouts/platform_h5.html"){
|
|||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消"
|
cancelButtonText: "取消"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
const loading = this.$toast.loading({
|
||||||
|
message: "加载中...",
|
||||||
|
forbidClick: true,
|
||||||
|
overlay: true,
|
||||||
|
duration: 0
|
||||||
|
})
|
||||||
this.$axios.post('/platform/member/apply/submit/save', {data: JSON.stringify(this.formData)}).then(res => {
|
this.$axios.post('/platform/member/apply/submit/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$toast.success(res.msg)
|
this.$toast.success(res.msg)
|
||||||
@@ -286,6 +300,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.$toast.fail('操作失败')
|
this.$toast.fail('操作失败')
|
||||||
console.log(res.msg)
|
console.log(res.msg)
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -296,6 +312,12 @@ layout("/layouts/platform_h5.html"){
|
|||||||
title: "提示",
|
title: "提示",
|
||||||
message: "您确定要提交吗?"
|
message: "您确定要提交吗?"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
const loading = this.$toast.loading({
|
||||||
|
message: "加载中...",
|
||||||
|
forbidClick: true,
|
||||||
|
overlay: true,
|
||||||
|
duration: 0
|
||||||
|
})
|
||||||
this.$axios.post('/platform/member/apply/submit/submit', {
|
this.$axios.post('/platform/member/apply/submit/submit', {
|
||||||
data: JSON.stringify(this.formData)
|
data: JSON.stringify(this.formData)
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -306,6 +328,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.$toast.fail('操作失败')
|
this.$toast.fail('操作失败')
|
||||||
console.log(res.msg)
|
console.log(res.msg)
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -317,6 +341,12 @@ layout("/layouts/platform_h5.html"){
|
|||||||
title: "提示",
|
title: "提示",
|
||||||
message: "您确定要提交吗?"
|
message: "您确定要提交吗?"
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
const loading = this.$toast.loading({
|
||||||
|
message: "加载中...",
|
||||||
|
forbidClick: true,
|
||||||
|
overlay: true,
|
||||||
|
duration: 0
|
||||||
|
})
|
||||||
this.$axios.post('/platform/member/apply/submit/submitAgain', {
|
this.$axios.post('/platform/member/apply/submit/submitAgain', {
|
||||||
data: JSON.stringify(this.formData),
|
data: JSON.stringify(this.formData),
|
||||||
taskId: this.taskId,
|
taskId: this.taskId,
|
||||||
@@ -328,6 +358,8 @@ layout("/layouts/platform_h5.html"){
|
|||||||
this.$toast.fail('操作失败')
|
this.$toast.fail('操作失败')
|
||||||
console.log(res.msg)
|
console.log(res.msg)
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -465,27 +497,28 @@ layout("/layouts/platform_h5.html"){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
||||||
nationColumns(){
|
nationColumns(){
|
||||||
if(this.dict && this.dict.type && this.dict.type.USER_NATION){
|
if(this.dict && this.dict.type && this.dict.type.USER_NATION){
|
||||||
return this.dict.type.USER_NATION.map(v=>v.value)
|
return this.dict.type.USER_NATION.map(v=>v.name)
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
politicalColumns(){
|
politicalColumns(){
|
||||||
if(this.dict && this.dict.type && this.dict.type.USER_POLITICAL){
|
if(this.dict && this.dict.type && this.dict.type.USER_POLITICAL){
|
||||||
return this.dict.type.USER_POLITICAL.map(v=>v.value)
|
return this.dict.type.USER_POLITICAL.map(v=>v.name)
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
educationColumns(){
|
educationColumns(){
|
||||||
if(this.dict && this.dict.type && this.dict.type.USER_EDUCATION){
|
if(this.dict && this.dict.type && this.dict.type.USER_EDUCATION){
|
||||||
return this.dict.type.USER_EDUCATION.map(v=>v.value)
|
return this.dict.type.USER_EDUCATION.map(v=>v.name)
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
academicDegreeColumns(){
|
academicDegreeColumns(){
|
||||||
if(this.dict && this.dict.type && this.dict.type.USER_ACADEMIC_DEGREE){
|
if(this.dict && this.dict.type && this.dict.type.USER_ACADEMIC_DEGREE){
|
||||||
return this.dict.type.USER_ACADEMIC_DEGREE.map(v=>v.value)
|
return this.dict.type.USER_ACADEMIC_DEGREE.map(v=>v.name)
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
|
|||||||
+224
@@ -0,0 +1,224 @@
|
|||||||
|
<!--#
|
||||||
|
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
|
||||||
|
:reverse-color="false"
|
||||||
|
input-align="left"
|
||||||
|
@search="doSearch">
|
||||||
|
<template #action>
|
||||||
|
<div @click="doSearch">搜索</div>
|
||||||
|
</template>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<table-list api="/platform/member/apply/unionGroupApproval/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.curTaskName}}</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(row)">
|
||||||
|
<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: {
|
||||||
|
pageNumber: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
totalCount: 0,
|
||||||
|
unionId: "",
|
||||||
|
unitId: "",
|
||||||
|
audit: false
|
||||||
|
},
|
||||||
|
unitList: [],
|
||||||
|
auditList: [
|
||||||
|
{ text: "已审核", value: true },
|
||||||
|
{ text: "未审核", value: 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) {
|
||||||
|
await this.$refs.formRef.validate();
|
||||||
|
this.$dialog.confirm({
|
||||||
|
title: "提示",
|
||||||
|
message: "您确定要提交吗?"
|
||||||
|
}).then(() => {
|
||||||
|
const loading = this.$toast.loading({
|
||||||
|
message: "加载中...",
|
||||||
|
forbidClick: true,
|
||||||
|
overlay: true,
|
||||||
|
duration: 0
|
||||||
|
})
|
||||||
|
this.$axios.post("/flow/common/executeTask", {
|
||||||
|
data: JSON.stringify({
|
||||||
|
...this.formData,
|
||||||
|
submitType: val
|
||||||
|
})
|
||||||
|
}).then((res) => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$refs.infoRef.onClose()
|
||||||
|
this.$toast.success(res.msg)
|
||||||
|
this.doSearch()
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 撤回
|
||||||
|
onRevoke(row) {
|
||||||
|
this.$dialog.confirm({
|
||||||
|
title: '提示',
|
||||||
|
message: '您确定要撤回吗?',
|
||||||
|
}).then(() => {
|
||||||
|
const loading = this.$toast.loading({
|
||||||
|
message: "加载中...",
|
||||||
|
forbidClick: true,
|
||||||
|
overlay: true,
|
||||||
|
duration: 0
|
||||||
|
})
|
||||||
|
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$toast.success('撤回成功');
|
||||||
|
this.doSearch();
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
|
}).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>
|
||||||
|
<!--#
|
||||||
|
}
|
||||||
|
#-->
|
||||||
Reference in New Issue
Block a user