commit
This commit is contained in:
@@ -2,6 +2,9 @@ package io.v.nutz.base.utils;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.v.nutz.base.enums.Env;
|
||||
import io.v.nutz.web.commons.base.Globals;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -83,7 +86,7 @@ public class MsgApi {
|
||||
map.put("imageUrl", imageUrl);
|
||||
map.put("link", link);
|
||||
|
||||
/*HttpRequest request = HttpUtil.createPost(MSG_API)
|
||||
HttpRequest request = HttpUtil.createPost(MSG_API)
|
||||
.header("token", msgToken)
|
||||
.body(Json.toJson(map));
|
||||
JSONObject jsonObject = JSON.parseObject(request.execute().body());
|
||||
@@ -94,7 +97,7 @@ public class MsgApi {
|
||||
} else {
|
||||
log.info("发送失败>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
throw new RuntimeException("Message sending failed with status code: " + status + ", Message: " + jsonObject.getString("message"));
|
||||
}*/
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
+1
-1
@@ -168,7 +168,7 @@ public class ClubMyApplyController {
|
||||
LEFT JOIN sys_user u ON scu.userid = u.id
|
||||
LEFT JOIN sys_unit unit ON u.unitid = unit.id
|
||||
WHERE scu.clubid = @clubid and scu.status in (5, 6) and isNormal = true
|
||||
ORDER BY FIELD( scu.sf, 1, 3, 4, 5, 2 ),scu.join_time DESC
|
||||
ORDER BY FIELD( scu.sf, 1, 3, 4, 5, 2 ), scu.status asc, scu.join_time DESC
|
||||
""").setParam("clubid", id)));
|
||||
return result;
|
||||
}
|
||||
|
||||
+8
-3
@@ -77,7 +77,7 @@ public class ClubRegistApplyController {
|
||||
@Param(value = "::managePerson", required = false) List<NutMap> managePerson,
|
||||
@Param(value = "::clubUserList", required = false) List<NutMap> clubUserList) throws IOException {
|
||||
if(!isSave && !sysClubService.getInviteAgree(club)) {
|
||||
return Result.error("邀请会员中确认人数暂未达到20人");
|
||||
return Result.error("您邀请的会员中确认人数暂未达到20人,<span style='color: red'>暂不能提交,只能保存</span>");
|
||||
}
|
||||
club.setIsjs(false);
|
||||
if (ShiroUtil.hasAnyRoles("sysadmin, A06, xxhgly")) {
|
||||
@@ -118,6 +118,7 @@ public class ClubRegistApplyController {
|
||||
cUser.setUnitName(user != null ? user.getUnitname() : "");
|
||||
cUser.setEmail(user != null ? user.getEmail() : "");
|
||||
cUser.setPosition(user != null ? user.getPosition() : "");
|
||||
cUser.setInvite(true);
|
||||
clubUsers.add(cUser);
|
||||
|
||||
//如果是管理员创建的协会,直接加角色
|
||||
@@ -143,7 +144,6 @@ public class ClubRegistApplyController {
|
||||
cUser.setJoin_time(DateUtil.getDateTime());
|
||||
cUser.setSf(2);
|
||||
cUser.setIsjf(true);
|
||||
cUser.setStatus(6);
|
||||
cUser.setGiveMoney(true);
|
||||
cUser.setIsNormal(true);
|
||||
cUser.setInvite(true);
|
||||
@@ -151,6 +151,8 @@ public class ClubRegistApplyController {
|
||||
cUser.setUnitName(user != null ? user.getUnitname() : "");
|
||||
cUser.setEmail(user != null ? user.getEmail() : "");
|
||||
cUser.setPosition(user != null ? user.getPosition() : "");
|
||||
cUser.setInvite(item.getBoolean("invite", true));
|
||||
cUser.setStatus(item.getInt("status", 6));
|
||||
clubUsers.add(cUser);
|
||||
}
|
||||
});
|
||||
@@ -189,7 +191,7 @@ public class ClubRegistApplyController {
|
||||
@Param(value = "::clubUserList", required = false) List<NutMap> clubUserList) throws IOException {
|
||||
|
||||
if(!isSave && Objects.equals(club.getState(), ClubRegistAuditState.NOT_SUBMIT) && !sysClubService.getInviteAgree(club)) {
|
||||
return Result.error("邀请会员中确认人数暂未达到20人");
|
||||
return Result.error("您邀请的会员中确认人数暂未达到20人,<span style='color: red'>暂不能提交,只能保存</span>");
|
||||
}
|
||||
|
||||
//如果不是管理员,并且点的提交按钮
|
||||
@@ -235,6 +237,7 @@ public class ClubRegistApplyController {
|
||||
cUser.setUnitName(user != null ? user.getUnitname() : "");
|
||||
cUser.setEmail(user != null ? user.getEmail() : "");
|
||||
cUser.setPosition(user != null ? user.getPosition() : "");
|
||||
cUser.setInvite(true);
|
||||
}
|
||||
clubUsers.add(cUser);
|
||||
|
||||
@@ -270,6 +273,8 @@ public class ClubRegistApplyController {
|
||||
cUser.setUnitName(user != null ? user.getUnitname() : "");
|
||||
cUser.setEmail(user != null ? user.getEmail() : "");
|
||||
cUser.setPosition(user != null ? user.getPosition() : "");
|
||||
cUser.setInvite(item.getBoolean("invite", true));
|
||||
cUser.setStatus(item.getInt("status", 6));
|
||||
clubUsers.add(cUser);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,6 +89,10 @@ module.exports = {
|
||||
type: Number,
|
||||
default: 300
|
||||
},
|
||||
placeholder: {
|
||||
type: String,
|
||||
default: '请输入正文'
|
||||
},
|
||||
menus: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
@@ -181,6 +185,7 @@ module.exports = {
|
||||
this.editor.config.height = this.height
|
||||
//菜单
|
||||
this.editor.config.menus = this.menus
|
||||
this.editor.config.placeholder = this.placeholder
|
||||
this.editor.create()
|
||||
},
|
||||
isEmptyEditor() {
|
||||
|
||||
@@ -117,11 +117,11 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="协会介绍" prop="stjs" required>
|
||||
<text-editor v-model="formData.stjs"></text-editor>
|
||||
<text-editor v-model="formData.stjs" :placeholder="'请输入协会介绍,至少需要200个字'"></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="协会宗旨" prop="stzz" required>
|
||||
<text-editor v-model="formData.stzz"></text-editor>
|
||||
<text-editor v-model="formData.stzz" :placeholder="'请输入协会宗旨,至少需要30个字'"></text-editor>
|
||||
</el-form-item>
|
||||
|
||||
<el-row gutter="30">
|
||||
@@ -176,12 +176,13 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
|
||||
<div v-show="activeName === '2'">
|
||||
<vi-title title="请填写协会发起人信息"></vi-title>
|
||||
<vi-title title="请填写协会发起人信息(至少需要3人)"></vi-title>
|
||||
<el-table :data="sponsorData">
|
||||
<el-table-column label="姓名" prop="userId">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
:disabled="scope.row.disabled"
|
||||
v-model="scope.row.userId"
|
||||
filterable remote
|
||||
@change="(val) => { sponsorPersonChange(val, scope.row, scope.$index) }"
|
||||
@@ -200,26 +201,25 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="工号" prop="loginname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.loginname" readonly></el-input>
|
||||
<el-input :value="scope.row.loginname" disabled placeholder="选择发起人后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.unitname" readonly></el-input>
|
||||
<el-input :value="scope.row.unitname" disabled placeholder="选择发起人后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系电话" prop="mobile">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.mobile" readonly></el-input>
|
||||
<el-input :value="scope.row.mobile" disabled placeholder="选择发起人后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button type="primary" @click="sponsorData.push({})" size="mini">增加</el-button>
|
||||
<el-button type="primary" @click="sponsorData.push({disabled:false})" size="mini">增加</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" :disabled="scope.$index <= 4"
|
||||
@click="sponsorDeleteRow(scope.row, scope.$index)" size="mini">删除</el-button>
|
||||
<el-button type="danger" @click="sponsorDeleteRow(scope.row, scope.$index)" size="mini">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -241,6 +241,7 @@ layout("/layouts/platform.html"){
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
:disabled="scope.row.disabled"
|
||||
v-model="scope.row.userId"
|
||||
filterable remote
|
||||
@change="(val) => { managePersonChange(val, scope.row, scope.$index) }"
|
||||
@@ -259,26 +260,25 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="工号" prop="loginname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.loginname" readonly></el-input>
|
||||
<el-input :value="scope.row.loginname" disabled placeholder="选择理事机构后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.unitname" readonly></el-input>
|
||||
<el-input :value="scope.row.unitname" disabled placeholder="选择理事机构后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系电话" prop="mobile">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.mobile" readonly></el-input>
|
||||
<el-input :value="scope.row.mobile" disabled placeholder="选择理事机构后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button type="primary" @click="managePerson.push({})" size="mini">增加</el-button>
|
||||
<el-button type="primary" @click="managePerson.push({disabled: false})" size="mini">增加</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger" :disabled="scope.$index <= 1"
|
||||
@click="deleteRow(scope.row, scope.$index)" size="mini">删除</el-button>
|
||||
<el-button type="danger" @click="deleteRow(scope.row, scope.$index)" size="mini">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -310,17 +310,17 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column label="工号" prop="loginname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.loginname" readonly></el-input>
|
||||
<el-input :value="scope.row.loginname" readonly placeholder="选择协会成员后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.unitname" readonly></el-input>
|
||||
<el-input :value="scope.row.unitname" readonly placeholder="选择协会成员后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系电话" prop="mobile">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.mobile" readonly></el-input>
|
||||
<el-input :value="scope.row.mobile" readonly placeholder="选择协会成员后自动填充"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否同意邀请" prop="mobile">
|
||||
@@ -332,7 +332,7 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button type="primary" @click="clubUserTableData.push({})" size="mini">增加</el-button>
|
||||
<el-button type="primary" @click="clubUserTableData.push({invite: true})" size="mini">增加</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger"
|
||||
@@ -349,8 +349,8 @@ layout("/layouts/platform.html"){
|
||||
<el-button v-if="activeName === '3'" type="primary" @click="activeName = '2'">上一步</el-button>
|
||||
<el-button v-if="activeName === '4'" type="primary" @click="activeName = '3'">上一步</el-button>
|
||||
<el-button v-if="activeName === '1'" type="primary" @click="activeName = '2'">下一步</el-button>
|
||||
<el-button v-if="activeName === '2'" type="primary" @click="activeName = '3'">下一步</el-button>
|
||||
<el-button v-if="activeName === '3'" type="primary" @click="activeName = '4'">下一步</el-button>
|
||||
<el-button v-if="activeName === '2'" type="primary" @click="sponsorNext">下一步</el-button>
|
||||
<el-button v-if="activeName === '3'" type="primary" @click="manageNext">下一步</el-button>
|
||||
<el-button type="primary" @click="doHandle(true)">保存</el-button>
|
||||
<el-button type="primary" @click="doHandle(false)">提交</el-button>
|
||||
</el-row>
|
||||
@@ -426,11 +426,40 @@ layout("/layouts/platform.html"){
|
||||
|
||||
},
|
||||
methods: {
|
||||
sponsorNext() {
|
||||
this.sponsorData.forEach(row => {
|
||||
if(row.userId) {
|
||||
let sameUserIndex = this.clubUserTableData.findIndex(o => o.userId === row.userId)
|
||||
if(sameUserIndex !== -1) {
|
||||
this.clubUserTableData.splice(sameUserIndex, 1, {...row, invite: true, status: 5})
|
||||
} else {
|
||||
this.clubUserTableData.push({...row, invite: true, status: 5})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.sponsorData.forEach(item => item.disabled = true)
|
||||
this.activeName = '3'
|
||||
},
|
||||
manageNext() {
|
||||
this.managePerson.forEach(row => {
|
||||
if(row.userId) {
|
||||
let sameUserIndex = this.clubUserTableData.findIndex(o => o.userId === row.userId)
|
||||
if(sameUserIndex !== -1) {
|
||||
this.clubUserTableData.splice(sameUserIndex, 1, {...row, invite: true, status: 5})
|
||||
} else {
|
||||
this.clubUserTableData.push({...row, invite: true, status: 5})
|
||||
}
|
||||
}
|
||||
})
|
||||
this.managePerson.forEach(item => item.disabled = true)
|
||||
this.activeName = '4'
|
||||
},
|
||||
deleteRow(row, index) {
|
||||
if (row.id) {
|
||||
this.deleteIds.push(row.id)
|
||||
}
|
||||
this.managePerson.splice(index, 1)
|
||||
this.clubUserTableData = this.clubUserTableData.filter(o => o.userId !== row.userId)
|
||||
},
|
||||
clubUserChange(val, row, index) {
|
||||
const cloneData = clone(this.clubUserTableData)
|
||||
@@ -438,12 +467,6 @@ layout("/layouts/platform.html"){
|
||||
const u = cloneData.find(o => val && o.userId === val)
|
||||
if (u) {
|
||||
this.$message.warning('协会成员不能重复')
|
||||
}
|
||||
const sameUser = this.managePerson.find(o => o.userId === val)
|
||||
if(sameUser) {
|
||||
this.$message.warning('该成员已在理事机构中设置')
|
||||
}
|
||||
if(u || sameUser) {
|
||||
this.$set(row, 'loginname', '')
|
||||
this.$set(row, 'unitname', '')
|
||||
this.$set(row, 'mobile', '')
|
||||
@@ -463,6 +486,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
sponsorDeleteRow(row, index) {
|
||||
this.sponsorData.splice(index, 1)
|
||||
this.clubUserTableData = this.clubUserTableData.filter(o => o.userId !== row.userId)
|
||||
},
|
||||
sfChange(val, row, index) {
|
||||
const cloneData = clone(this.managePerson)
|
||||
@@ -491,17 +515,10 @@ layout("/layouts/platform.html"){
|
||||
this.$set(row, 'userId', '')
|
||||
return
|
||||
}
|
||||
let user = this.userOptions.find(o => o.id === val)
|
||||
const sameUser = this.clubUserTableData.find(o => o.userId === val)
|
||||
if(sameUser) {
|
||||
this.$message.warning(user.username + '已在协会成员设置,自动为您调整到理事机构中')
|
||||
user = sameUser
|
||||
this.clubUserTableData = this.clubUserTableData.filter(o => o.userId !== sameUser.userId)
|
||||
}
|
||||
const user = this.userOptions.find(o => o.id === val)
|
||||
row.loginname = user.loginname
|
||||
row.unitname = user.unitname
|
||||
row.mobile = user.mobile
|
||||
//this.userOptions = []
|
||||
},
|
||||
sponsorPersonChange(val, row, index) {
|
||||
const cloneData = clone(this.sponsorData)
|
||||
@@ -519,8 +536,6 @@ layout("/layouts/platform.html"){
|
||||
row.loginname = user.loginname
|
||||
row.unitname = user.unitname
|
||||
row.mobile = user.mobile
|
||||
|
||||
//this.userOptions = []
|
||||
},
|
||||
fzrChange(id) {
|
||||
const user = this.userOptions.find(v => {
|
||||
@@ -587,10 +602,9 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
this.managePerson = clone(mUser)
|
||||
|
||||
let cUser = resp.data.clubuser.filter(o => o.sf === 2)
|
||||
this.clubUserTableData = clone(cUser)
|
||||
this.clubUserTableData = clone(resp.data.clubuser)
|
||||
|
||||
let cUserList = cUser.map(o => o.userid)
|
||||
let cUserList = this.clubUserTableData.map(o => o.userid)
|
||||
let users = mUser.map(o => o.userId)
|
||||
|
||||
let array = []
|
||||
@@ -690,7 +704,11 @@ layout("/layouts/platform.html"){
|
||||
this.$message.success(resp.msg)
|
||||
sublime.jumpPagePjax('/platform/sys/club/clubMyApply')
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
this.$alert(resp.msg, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'warning',
|
||||
dangerouslyUseHTMLString: true,
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.warning('协会基本信息存在必填项未填写')
|
||||
|
||||
Reference in New Issue
Block a user