commit
This commit is contained in:
@@ -116,8 +116,16 @@
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="电话" width="150px" prop="mobile" header-align="center"
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitname" header-align="center" show-overflow-tooltip="true"
|
||||
<el-table-column label="所属单位" prop="unitname" header-align="center" show-overflow-tooltip
|
||||
align="center"></el-table-column>
|
||||
<el-table-column label="是否同意邀请" prop="unitname" header-align="center"
|
||||
align="center">
|
||||
<template v-slot="{row}">
|
||||
<span class="text-success" v-if="row.invite === true && row.status === 5">是</span>
|
||||
<span v-if="row.invite === true && row.status !== 5">否</span>
|
||||
<span v-if="row.invite === false">未邀请</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-tab-pane>
|
||||
|
||||
@@ -27,6 +27,7 @@ layout("/mobile/platform.html"){
|
||||
.van-button--small {
|
||||
border-radius: 6px;
|
||||
height: 26px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.van-col {
|
||||
@@ -216,14 +217,14 @@ layout("/mobile/platform.html"){
|
||||
<van-divider></van-divider>
|
||||
|
||||
<div style="display: flex; justify-content: flex-end">
|
||||
<div>
|
||||
<van-button @click="openInfo(o, 'view')" color="#1867b0"
|
||||
size="small" style="margin-right: 8px" type="primary">
|
||||
查看
|
||||
</van-button>
|
||||
<van-button @click="openInfo(o, 'view')" color="#1867b0"
|
||||
size="small" style="margin-right: 8px" type="primary">
|
||||
查看
|
||||
</van-button>
|
||||
<div v-if="o.state > 800">
|
||||
<van-button @click="rollback(o)" color="#1867b0"
|
||||
size="small" style="margin-right: 8px" type="primary"
|
||||
v-if="pageForm.isjr === true && o.status==1">撤销申请
|
||||
v-if="pageForm.isjr === true && o.status==1">撤回申请
|
||||
</van-button>
|
||||
<van-button @click="openInfo(o, 'join')"
|
||||
color="#1867b0" v-if="pageForm.isjr === false"
|
||||
@@ -231,6 +232,25 @@ layout("/mobile/platform.html"){
|
||||
我要加入
|
||||
</van-button>
|
||||
</div>
|
||||
<div v-else>
|
||||
<template v-if="o.status == 7">
|
||||
<van-button @click="rollbackInvite(o)" color="#1867b0"
|
||||
size="small" style="margin-right: 8px" type="primary">撤回
|
||||
</van-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-button @click="inviteNotAgree(o)"
|
||||
color="#1867b0" v-if="pageForm.isjr === false"
|
||||
size="small" style="margin-right: 8px" type="primary">
|
||||
不同意
|
||||
</van-button>
|
||||
<van-button @click="openInfo(o, 'join')"
|
||||
color="#1867b0" v-if="pageForm.isjr === false"
|
||||
size="small" style="margin-right: 8px" type="primary">
|
||||
同意
|
||||
</van-button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -436,6 +456,28 @@ layout("/mobile/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async rollbackInvite(o) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤回吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post('/platform/sys/club/sq/rollbackInvite', {clubId: o.id})
|
||||
vant.Toast(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
async inviteNotAgree(o) {
|
||||
const confirm = await vant.Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要不同意的' + o.name + '的入会邀请吗?',
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post('/platform/sys/club/sq/inviteNotAgree', {clubId: o.id})
|
||||
vant.Toast(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
showCode(type) {
|
||||
if(type === 'QQ' && this.clickRow.qqgroupcode) {
|
||||
const ids = JSON.parse(this.clickRow.qqgroupcode).map(o => FILE_DOMAIN + '/fileStreamPreview?id=' + o.id)
|
||||
@@ -444,6 +486,7 @@ layout("/mobile/platform.html"){
|
||||
const ids = JSON.parse(this.clickRow.wechatgroupcode).map(o => FILE_DOMAIN + '/fileStreamPreview?id=' + o.id)
|
||||
vant.ImagePreview({images: ids})
|
||||
}
|
||||
vant.Toast('暂无二维码')
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
|
||||
@@ -71,9 +71,10 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" width="300px">
|
||||
<el-table-column label="操作" width="400px">
|
||||
<template scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="sendDingTalkMsg(row)" size="mini" type="primary">发送钉钉消息</el-button>
|
||||
<template v-if="${@shiro.hasRole('sysadmin')} || ${@shiro.hasRole('A06')} || ${@shiro.hasRole('xxhgly')}">
|
||||
<el-button @click="openEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="deleteDo(row)" size="mini" type="danger">删除</el-button>
|
||||
@@ -96,6 +97,29 @@ layout("/layouts/platform.html"){
|
||||
|
||||
</guava>
|
||||
|
||||
<el-dialog :visible.sync="inviteUserDialog" title="邀请人员" width="60%" top="2%">
|
||||
<el-table :data="inviteUserTableData" size="mini" max-height="600px" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="(row) => {return row.status !== 5}" type="selection" width="55"></el-table-column>
|
||||
<el-table-column label="序号" type="index" width="80"></el-table-column>
|
||||
<el-table-column label="姓名" prop="username"></el-table-column>
|
||||
<el-table-column label="工号" prop="loginname"></el-table-column>
|
||||
<el-table-column label="所属单位" prop="unitname" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="性别" prop="sex"></el-table-column>
|
||||
<el-table-column label="联系方式" prop="mobile"></el-table-column>
|
||||
<el-table-column label="是否同意邀请" prop="invite">
|
||||
<template slot-scope="{row}">
|
||||
<span class="text-success" v-if="row.invite === true && row.status === 5">是</span>
|
||||
<span v-if="row.invite === true && row.status !== 5">否</span>
|
||||
<span v-if="row.invite === false || row.invite === null || row.invite == undefined">未邀请</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="inviteUserDialog = false">取消</el-button>
|
||||
<el-button type="primary" @click="sendDo">发送</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -113,9 +137,49 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
tableData: [],
|
||||
schoolAudit: false,
|
||||
|
||||
inviteUserTableData: [],
|
||||
inviteUserDialog: false,
|
||||
|
||||
multipleSelection: [],
|
||||
clickRow: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange(val) {
|
||||
this.multipleSelection = val
|
||||
},
|
||||
async sendDingTalkMsg(row) {
|
||||
this.clickRow = row
|
||||
const resp = await $.post('/platform/sys/club/clubMyApply/getInviteUser', {id: row.id})
|
||||
this.inviteUserTableData = resp.data
|
||||
this.inviteUserDialog = true
|
||||
},
|
||||
async sendDo() {
|
||||
if (this.multipleSelection.length === 0) {
|
||||
this.$message.warning('请选择推送人员')
|
||||
return
|
||||
}
|
||||
const confirm = await this.$confirm('您选择了' + this.multipleSelection.length + '位人员,请再次确认是否要推送?' +
|
||||
'<br><span style="color: red">注:推送后消息不可撤回!</span>', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
dangerouslyUseHTMLString: true
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post('/platform/sys/club/clubMyApply/sendDingTalkMsg', {
|
||||
id: this.clickRow.id,
|
||||
userList: JSON.stringify(this.multipleSelection.map(o => o.loginname))
|
||||
})
|
||||
if(resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageData()
|
||||
|
||||
@@ -22,6 +22,7 @@ layout("/layouts/platform.html"){
|
||||
<el-step title="协会基本信息"></el-step>
|
||||
<el-step title="协会发起人"></el-step>
|
||||
<el-step title="协会理事机构"></el-step>
|
||||
<el-step title="协会成员"></el-step>
|
||||
</el-steps>
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
@@ -191,7 +192,7 @@ layout("/layouts/platform.html"){
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.username + ' - ' + item.unitname"
|
||||
:label="item.username"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@@ -250,7 +251,7 @@ layout("/layouts/platform.html"){
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.username + ' - ' + item.unitname"
|
||||
:label="item.username"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@@ -282,16 +283,76 @@ layout("/layouts/platform.html"){
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
<div v-show="activeName === '4'">
|
||||
<vi-title2 title="请选择协会成员(至少提交20人)"></vi-title2>
|
||||
<el-table :data="clubUserTableData">
|
||||
<el-table-column label="序号" type="index" width="80"></el-table-column>
|
||||
<el-table-column label="姓名" prop="userId">
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
style="width: 100%"
|
||||
v-model="scope.row.userId"
|
||||
filterable remote
|
||||
@change="(val) => { clubUserChange(val, scope.row, scope.$index) }"
|
||||
reserve-keyword
|
||||
placeholder="请输入姓名或工号查找"
|
||||
:remote-method="userRemoteMethod"
|
||||
:loading="userLoading">
|
||||
<el-option
|
||||
v-for="item in userOptions"
|
||||
:key="item.id"
|
||||
:label="item.username"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工号" prop="loginname">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.loginname" readonly></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>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系电话" prop="mobile">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="scope.row.mobile" readonly></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否同意邀请" prop="mobile">
|
||||
<template slot-scope="{row}">
|
||||
<span class="text-success" v-if="row.invite === true && row.status === 5">是</span>
|
||||
<span v-if="row.invite === true && row.status !== 5">否</span>
|
||||
<span v-if="row.invite === false || row.invite === null || row.invite == undefined">未邀请</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column>
|
||||
<template slot="header" slot-scope="scope">
|
||||
<el-button type="primary" @click="clubUserTableData.push({})" size="mini">增加</el-button>
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="danger"
|
||||
@click="clubUserDeleteRow(scope.row, scope.$index)" size="mini">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-row class="mt20" justify="end" type="flex">
|
||||
<el-button v-if="GetQueryString('id') !== '' || GetQueryString('from') !== ''" @click="doBack">返回</el-button>
|
||||
<el-button v-if="activeName === '2'" type="primary" @click="activeName = '1'">上一步</el-button>
|
||||
<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 type="primary" @click="doHandle(true)">保存</el-button>
|
||||
<el-button :disabled="activeName !== '3'" type="primary" @click="doHandle(false)">提交</el-button>
|
||||
<el-button type="primary" @click="doHandle(false)">提交</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</guava>
|
||||
@@ -304,6 +365,7 @@ layout("/layouts/platform.html"){
|
||||
mixins: [initTableMixins],
|
||||
data() {
|
||||
return {
|
||||
clubUserTableData: [],
|
||||
sponsorData: [
|
||||
{},
|
||||
{},
|
||||
@@ -315,11 +377,14 @@ layout("/layouts/platform.html"){
|
||||
sponsorType: 1,
|
||||
},
|
||||
formRules: {
|
||||
name: [{required: true, message: '请填写协会名称', trigger: ['blur', 'change']}],
|
||||
code: [{required: true, message: '请填写协会编码', trigger: ['blur', 'change']}],
|
||||
type: [{required: true, message: '请选择协会类型', trigger: ['blur', 'change']}],
|
||||
fzr: [{required: true, message: '请选择协会联系人', trigger: ['blur', 'change']}],
|
||||
sponsorType: [{required: true, message: '请选择发起类型', trigger: ['blur', 'change']}],
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
code: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
type: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
fzr: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
sponsorType: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
establishReport: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
rulesFile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
yearPlanFile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
typeOptions: [],
|
||||
userLoading: false,
|
||||
@@ -347,6 +412,29 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
this.managePerson.splice(index, 1)
|
||||
},
|
||||
clubUserChange(val, row, index) {
|
||||
const cloneData = clone(this.clubUserTableData)
|
||||
cloneData.splice(index, 1)
|
||||
const u = cloneData.find(o => val && o.userId === val)
|
||||
if (u) {
|
||||
this.$message.warning('协会成员不能重复')
|
||||
this.$set(row, 'loginname', '')
|
||||
this.$set(row, 'unitname', '')
|
||||
this.$set(row, 'mobile', '')
|
||||
this.$set(row, 'userId', '')
|
||||
return
|
||||
}
|
||||
const user = this.userOptions.find(o => o.id === val)
|
||||
row.loginname = user.loginname
|
||||
row.unitname = user.unitname
|
||||
row.mobile = user.mobile
|
||||
},
|
||||
clubUserDeleteRow(row, index) {
|
||||
if (row.id) {
|
||||
this.deleteIds.push(row.id)
|
||||
}
|
||||
this.clubUserTableData.splice(index, 1)
|
||||
},
|
||||
sponsorDeleteRow(row, index) {
|
||||
this.sponsorData.splice(index, 1)
|
||||
},
|
||||
@@ -457,24 +545,29 @@ layout("/layouts/platform.html"){
|
||||
this.formData.yearPlanFile = JSON.parse(this.formData.yearPlanFile)
|
||||
}
|
||||
|
||||
resp.data.clubuser = resp.data.clubuser.filter(o => o.sf !== 2)
|
||||
resp.data.clubuser.forEach(item => {
|
||||
let mUser = resp.data.clubuser.filter(o => o.sf !== 2)
|
||||
mUser.forEach(item => {
|
||||
const role = this.roleList.find(o => o.sf === item.sf)
|
||||
if (role) {
|
||||
item.roleId = role.id
|
||||
item.userId = item.userid
|
||||
}
|
||||
})
|
||||
this.managePerson = clone(resp.data.clubuser)
|
||||
this.managePerson = clone(mUser)
|
||||
|
||||
let cUser = resp.data.clubuser.filter(o => o.sf === 2)
|
||||
this.clubUserTableData = clone(cUser)
|
||||
|
||||
let cUserList = cUser.map(o => o.userid)
|
||||
let users = mUser.map(o => o.userId)
|
||||
|
||||
let users = resp.data.clubuser.map(o => o.userId)
|
||||
let array = []
|
||||
if(resp.data.sponsor) {
|
||||
this.sponsorData = []
|
||||
array = resp.data.sponsor.split(',')
|
||||
this.formData.sponsor = array
|
||||
}
|
||||
users = [...new Set(users.concat(array))]
|
||||
users = [...new Set(users.concat(array).concat(cUserList))]
|
||||
this.userOptions = await queryUserByIds(users)
|
||||
array.forEach(item => {
|
||||
let row = {}
|
||||
@@ -488,7 +581,6 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
async doHandle(flag) {
|
||||
|
||||
try {
|
||||
let valid = true
|
||||
if(flag) {
|
||||
@@ -528,9 +620,20 @@ layout("/layouts/platform.html"){
|
||||
this.$message.warning('请填写理事机构信息')
|
||||
return
|
||||
}
|
||||
if (!flag && this.managePerson.length < 3) {
|
||||
/*if (!flag && this.managePerson.length < 3) {
|
||||
this.$message.warning('理事机构成员要求不少于3人')
|
||||
return
|
||||
}*/
|
||||
let clubUserValid = false
|
||||
this.managePerson.forEach(item => {
|
||||
if(!item.userId) {
|
||||
clubUserValid = true
|
||||
return
|
||||
}
|
||||
})
|
||||
if (!flag && (this.clubUserTableData.length < 20 || clubUserValid)) {
|
||||
this.$message.warning('请至少选择20位协会成员')
|
||||
return
|
||||
}
|
||||
const cloneData = clone(this.formData)
|
||||
let array = []
|
||||
@@ -548,21 +651,17 @@ layout("/layouts/platform.html"){
|
||||
isSave: flag,
|
||||
isSchool: false,
|
||||
managePerson: this.managePerson,
|
||||
clubUserList: this.clubUserTableData,
|
||||
deleteIds: JSON.stringify(this.deleteIds),
|
||||
})
|
||||
if (resp.code === 0) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: resp.msg,
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
sublime.jumpPagePjax('/platform/sys/club/clubMyApply')
|
||||
}
|
||||
});
|
||||
this.$message.success(resp.msg)
|
||||
sublime.jumpPagePjax('/platform/sys/club/clubMyApply')
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.warning('存在必填项未填写')
|
||||
this.$message.warning('协会基本信息存在必填项未填写')
|
||||
}
|
||||
},
|
||||
async getClubCode() {
|
||||
|
||||
Reference in New Issue
Block a user