Files
zhgh_hmc/src/main/resources/views/mobile/club/inClub.html
T
2025-01-06 09:30:09 +08:00

599 lines
26 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--#
layout("/mobile/platform.html"){
#-->
<style>
.van-index-bar__sidebar {
display: none;
}
.van-doc-card {
margin: 14px;
padding: 12px 12px 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 20px;
font-size: 13px;
position: relative;
}
.van-divider {
margin: 6px 0 6px 0px;
border-color: lightgray;
}
.van-button--small {
border-radius: 6px;
height: 26px;
font-size: 13px;
}
.van-col {
line-height: 24px;
}
.title_span {
font-size: 16px;
font-weight: bold;
position: absolute;
left: -1px;
top: 11px;
color: #1867b0;
}
.title {
font-size: 13px;
font-weight: bold;
flex: 1;
overflow: hidden;
white-space: nowrap;
}
.cus_overflow {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.van-dropdown-menu__item {
flex: auto;
}
p {
margin: 0 !important;
}
.van-cell__title {
width: 30%;
}
.van-cell__title, .van-cell__value{
flex: none;
}
.van-cell__value {
width: 68%;
}
.van-cell__right-icon {
margin-left: 0;
}
.footer {
background-color: white;
width: 100%;
height: 60px;
display: flex;
justify-content: space-evenly;
align-items: center;
left: 0;
}
.footer .van-button {
height: 34px;
border-radius: 6px;
width: 90% !important;
}
.join {
background-color: #0e78c5;
color: white;
}
.info_tab .van-doc-card > div:first-child {
border: 2px #0e78c5 solid;
width: 26px;
border-radius: 6px;
position: absolute;
top: 0;
left: 20px;
}
.van-card-header {
padding-bottom: 6px;
border-bottom: 1px solid #ebeef5;
box-sizing: border-box;
color: #0e78c5;
font-weight: bold;
}
.van-cell {
padding: 7px 16px !important;
}
.more_text{
display: inline-block !important;
}
.more_text .van-field__label {
width: 100% !important;
}
.more_text .van-cell__value {
width: auto !important;
}
</style>
<div id="app" v-cloak>
<m-page-loading v-if="mLoading"></m-page-loading>
<!--top栏-->
<van-nav-bar
title="加入协会"
left-arrow
placeholder
fixed
@click-left="pjaxReplace('/mobile/index')"
safe-area-inset-top
></van-nav-bar>
<!--筛选框-->
<div class="search-fixed">
<van-search
v-model="pageForm.searchKeyword"
shape="round"
maxlength="10"
@search="doSearch"
placeholder="请输入协会名称进行查询"
>
</van-search>
<van-dropdown-menu>
<van-dropdown-item v-model="pageForm.isjr" :options="clubType"
@change="doSearch"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.clubType" :options="typeOptions"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
</div>
<!--列表-->
<div style="margin-top: 116px">
<van-list
v-model="loading"
:finished="finished" :immediate-check="false" @load="onLoad"
:finished-text="tableData.length>0?'没有更多了':''">
<div class="van-doc-card" v-for="o in tableData">
<div>
<div style="display: flex; justify-content: space-between">
<div style="width: 74%">
<div class="van-ellipsis title">
<span class="title_span">|</span>
<span>{{o.name}}</span>
</div>
<div style="color: grey">{{o.location}}</div>
</div>
<div style="color: #1867b0; white-space: nowrap;">
<span v-if="o.status==1">待协会审核</span>
<span v-if="o.status==2" style="color: red">协会拒绝</span>
<span v-if="o.status==3">待校工会审核</span>
<span v-if="o.status==4" style="color: red">校工会拒绝</span>
<span v-if="o.status==5" style="color: green">审核通过</span>
</div>
</div>
<div style="margin-top: 4px">
<van-row>
<van-col span="12"><span style="color: grey">&ensp;&ensp;人:</span>{{o.fzrname}}</van-col>
<van-col span="12">
<span style="color: grey">&emsp;&emsp;话:</span>
<span>{{o.fzr_mobile}}</span>
</van-col>
</van-row>
<van-row>
<van-col span="12"><span style="color: grey">&emsp;&emsp;长:</span>{{o.hz}}</van-col>
<van-col span="12">
<span style="color: grey">成立时间:</span>
<span>{{moment(o.foundTime).format('YYYY-MM-DD')}}</span>
</van-col>
</van-row>
</div>
<van-divider></van-divider>
<div style="display: flex; justify-content: flex-end">
<div v-if="o.state > 800">
<van-button @click="openInfo(o, 'view')" color="#1867b0"
size="small" style="margin-right: 8px" type="primary">
查看
</van-button>
<van-button @click="rollback(o)" color="#1867b0"
size="small" style="margin-right: 8px" type="primary"
v-if="pageForm.isjr === true && o.status==1">撤回申请
</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>
</div>
<div v-else>
<van-button @click="openInfo(o, 'view')" color="#1867b0"
size="small" style="margin-right: 8px" type="primary">
查看
</van-button>
<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>
</van-list>
<van-empty
v-if="mLoading==false&&tableData.length==0"
class="custom-image"
image="/none.svg"
description="暂无数据"
></van-empty>
</div>
<van-popup v-model="infoShow" get-container="#app" position="right" :style="{ height: '100%', width: '100%' }">
<van-nav-bar
:title="viewType === 'view' ? '基础信息' : '信息登记'"
left-arrow
placeholder
fixed
@click-left="infoShow = false"
safe-area-inset-top></van-nav-bar>
<div v-if="viewType === 'view'" class="van-doc-card" style="margin-bottom: 16px; box-shadow: 0 0 16px 0 #ebedf0; margin-top: 10px">
<div></div>
<div class="van-card-header">
基础信息
</div>
<div class="van-card-body">
<van-cell title="协会名称">{{ detailData.name }}</van-cell>
<van-cell title="成立时间">{{ detailData.foundtime }}</van-cell>
<van-cell title="报名联系人">{{ detailData.fzrname }}</van-cell>
<van-cell title="所属单位">{{ detailData.fzr_unit_name }}</van-cell>
<van-cell title="联系人电话">{{ detailData.concatpersonmobile }}</van-cell>
<van-cell title="联系人邮箱">{{ detailData.concatpersonemail }}</van-cell>
<van-cell title="会费标准">{{ detailData.dues_standard }}</van-cell>
<van-cell title="当前人数">{{ detailData.cynum }}</van-cell>
<van-cell title="钉钉二维码" @click="showCode('QQ')">
<span style="cursor: pointer; color: #236eb4">点击查看</span>
</van-cell>
<!--<van-cell title="微信群二维码" @click="showCode('weChat')">
<span style="cursor: pointer; color: #236eb4">点击查看</span>
</van-cell>-->
</div>
</div>
<van-form v-if="viewType === 'join'" @submit="needJoin" ref="form" :show-error-message="false">
<div class="van-doc-card" style="margin-bottom: 16px; box-shadow: 0 0 16px 0 #ebedf0; margin-top: 10px">
<div></div>
<div class="van-card-header">
基础信息
</div>
<div class="van-card-body">
<van-field readonly v-model="formData.username" name="username" required
label="姓名" :rules="[{ required: true }]"></van-field>
<van-field readonly v-model="formData.sex" name="sex" required
label="性别" :rules="[{ required: true }]"></van-field>
<van-field readonly v-model="formData.loginname" name="loginname" required
label="工号" :rules="[{ required: true }]"></van-field>
<van-field readonly v-model="formData.unitName" name="unitName" required
label="工作部门" :rules="[{ required: true }]"></van-field>
<van-field v-model="formData.mobile" name="mobile" required
label="电话" placeholder="请填写电话" :rules="[{ required: true }]"></van-field>
<van-field v-model="formData.weChatNumber" name="weChatNumber"
label="微信号" placeholder="请填写微信号"></van-field>
<van-field v-model="formData.hobby" name="hobby" required
placeholder="请填写爱好" label="爱好" :rules="[{ required: true }]"></van-field>
<van-field class="more_text" v-model="formData.sickness" name="sickness" required @click="sicknessVisible = true"
placeholder="请选择是否患有运动限制类疾病"
label="是否患有运动限制类疾病"
readonly
:rules="[{ required: true }]"></van-field>
</div>
</div>
<div class="van-doc-card" style="margin-bottom: 16px; box-shadow: 0 0 16px 0 #ebedf0; margin-top: 10px">
<div></div>
<div class="van-card-header">
紧急联系人(建议家人)信息
</div>
<div class="van-card-body">
<van-field v-model="formData.familyUserName" name="familyUserName" required
placeholder="请填写紧急联系人姓名" label="姓名" :rules="[{ required: true }]"></van-field>
<van-field v-model="formData.familyRelation" name="familyRelation" required readonly
@click="familyRelationVisible = true" placeholder="请选择紧急联系人关系"
label="与申请者关系" :rules="[{ required: true }]"></van-field>
<van-field v-model="formData.familyMobile" name="familyMobile" required type="tel"
placeholder="请填写紧急联系人电话" label="联系电话" :rules="[{ required: true }]"></van-field>
</div>
</div>
<div class="van-doc-card" style="margin-bottom: 16px; box-shadow: 0 0 16px 0 #ebedf0; margin-top: 10px">
<div></div>
<div class="van-card-header">
选填项
</div>
<div class="van-card-body">
<van-field v-model="formData.project" name="project"
rows="1"
autosize
type="textarea"
placeholder="请填写擅长项目" label="擅长项目"></van-field>
<van-field v-model="formData.selfSkill" name="selfSkill" @click="selfSkillVisible = true"
readonly placeholder="请选择个人技能水平" label="个人技能水平"></van-field>
<van-field v-model="formData.playRole" name="playRole" @click="playRoleVisible = true" class="more_text"
readonly placeholder="请选择期望在协会中扮演的角色" label="期望在协会中扮演的角色"></van-field>
<van-field v-model="formData.provideServices" name="provideServices" @click="provideServicesVisible = true" class="more_text"
readonly placeholder="请选择是否愿意为协会提供志愿服务" label="是否愿意为协会提供志愿服务"></van-field>
<van-field v-model="formData.joinManageWork" name="joinManageWork" @click="joinManageWorkVisible = true" class="more_text"
readonly placeholder="请选择是否愿意参与协会的管理工作" label="是否愿意参与协会的管理工作"></van-field>
<van-field v-model="formData.giveHelp" name="giveHelp" @click="giveHelpVisible = true" class="more_text"
readonly placeholder="请选择是否愿意为协会的活动提供赞助或资源支持" label="是否愿意为协会的活动提供赞助或资源支持"></van-field>
</div>
</div>
<div class="footer">
<van-button class="join join_submit" native-type="submit">申请加入</van-button>
</div>
</van-form>
</van-popup>
<!-- 与申请者关系 -->
<van-popup position="bottom" round v-model="familyRelationVisible">
<van-picker
title="请选择紧急联系人关系" show-toolbar
:columns="['夫妻', '父亲', '母亲', '兄弟姐妹']"
@confirm="(value, index) => {formData.familyRelation = value; familyRelationVisible = false}"
@cancel="formData.familyRelation = ''; familyRelationVisible = false">
</van-picker>
</van-popup>
<van-popup position="bottom" round v-model="sicknessVisible">
<van-picker
title="是否患有运动限制类疾病" show-toolbar
:columns="['有', '无']"
@confirm="(value, index) => {formData.sickness = value; sicknessVisible = false}"
@cancel="formData.sickness = ''; sicknessVisible = false">
</van-picker>
</van-popup>
<van-popup position="bottom" round v-model="selfSkillVisible">
<van-picker
title="个人技能水平" show-toolbar
:columns="['无(零基础)', '初级(初学者)', '中级(有一定基础)', '高级(经验丰富)', '专业(领域专家)']"
@confirm="(value, index) => {formData.selfSkill = value; selfSkillVisible = false}"
@cancel="formData.selfSkill = ''; selfSkillVisible = false">
</van-picker>
</van-popup>
<van-popup position="bottom" round v-model="playRoleVisible">
<van-picker
title="期望在协会中扮演的角色" show-toolbar
:columns="['普通会员', '志愿者', '组织者/协调者', '专业指导']"
@confirm="(value, index) => {formData.playRole = value; playRoleVisible = false}"
@cancel="formData.playRole = ''; playRoleVisible = false">
</van-picker>
</van-popup>
<van-popup position="bottom" round v-model="provideServicesVisible">
<van-picker
title="是否愿意为协会提供志愿服务" show-toolbar
:columns="['是', '否']"
@confirm="(value, index) => {formData.provideServices = value; provideServicesVisible = false}"
@cancel="formData.provideServices = ''; provideServicesVisible = false">
</van-picker>
</van-popup>
<van-popup position="bottom" round v-model="joinManageWorkVisible">
<van-picker
title="是否愿意参与协会的管理工作" show-toolbar
:columns="['是', '否']"
@confirm="(value, index) => {formData.joinManageWork = value; joinManageWorkVisible = false}"
@cancel="formData.joinManageWork = ''; joinManageWorkVisible = false">
</van-picker>
</van-popup>
<van-popup position="bottom" round v-model="giveHelpVisible">
<van-picker
title="是否愿意为协会的活动提供赞助或资源支持" show-toolbar
:columns="['是', '否']"
@confirm="(value, index) => {formData.giveHelp = value; giveHelpVisible = false}"
@cancel="formData.giveHelp = ''; giveHelpVisible = false">
</van-picker>
</van-popup>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
showPicker: false,
clickRow: {},
typeOptions: [],
clubType: [{text: '未加入', value: false}, {text: '已加入', value: true}],
infoShow: false,
detailData: {},
viewType: '',
sicknessVisible: false,
giveHelpVisible: false,
joinManageWorkVisible: false,
provideServicesVisible: false,
playRoleVisible: false,
selfSkillVisible: false,
familyRelationVisible: false
}
},
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)
vant.ImagePreview({images: ids})
} else if(type === 'weChat' && this.clickRow.wechatgroupcode) {
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
this.tableData = []
this.finished = false
this.onLoad()
},
async onLoad() {
this.loading = true
$.post('/platform/sys/club/sq/pageData', this.pageForm).then(res => {
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
}
this.loading = false
})
},
openInfo(row, type) {
this.viewType = type
if(type === 'join') {
this.formData = {
username: "${@shiro.getPrincipalProperty('username')}",
loginname: "${@shiro.getPrincipalProperty('loginname')}",
sex: "${@shiro.getPrincipalProperty('sex')}",
birthday: "${@shiro.getPrincipalProperty('birthday')}",
birthPlace: "${@shiro.getPrincipalProperty('birthPlace')}",
education: "${@shiro.getPrincipalProperty('education')}",
hobby: "${@shiro.getPrincipalProperty('hobby')}",
unitName: "${@shiro.getPrincipalProperty('unit').getName()}",
position: "${@shiro.getPrincipalProperty('position')}",
mobile: "${@shiro.getPrincipalProperty('mobile')}",
email: "${@shiro.getPrincipalProperty('email')}",
homeAddress: "${@shiro.getPrincipalProperty('homeAddress')}",
}
}
this.clickRow = row
$.get("/platform/sys/club/mange/findOne", {id: row.id}, (data) => {
if (data.code === 0) {
this.detailData = data.data
this.infoShow = true
}
}, "json");
},
async needJoin() {
const row = this.clickRow
const {code, data} = await $.post('/platform/sys/club/sq/getInClubByCurUser')
let str = ''
if (data && data.length > 0) {
str = '您已经加入了'
data.forEach((item) => {
str += '【' + item.name + '】'
})
str += ''
}
str += '请确认是否申请加入【' + row.name + '】?'
vant.Dialog.confirm({title: '提示', message: str,}).then(() => {
this.formData.clubid = row.id
$.post("/platform/sys/club/sq/submit", this.formData, (data) => {
if (data.code === 0) {
vant.Toast(data.msg)
this.doSearch()
this.infoShow = false
} else {
vant.Toast(data.msg)
}
}, "json");
}).catch(() => {
});
},
rollback(o) {
vant.Dialog.confirm({title: '提示', message: '请确定是否撤销申请?',}).then(() => {
const id = o.id
$.post("/platform/sys/club/sq/revocation", {id}, (data) => {
if (data.code === 0) {
vant.Toast('撤销申请成功');
this.doSearch();
} else {
vant.Toast(data.msg);
}
}, "json");
}).catch(() => {
});
}
},
async created() {
const data = await getClubType()
data.forEach(item => {
this.typeOptions.push({text: item.name, value: item.code})
})
this.typeOptions.unshift({text: '全部类型'})
this.$set(this.pageForm, "clubType", this.typeOptions[0].value)
this.$set(this.pageForm, "isjr", this.clubType[0].value)
this.pageForm.searchName = 'club.name'
this.onLoad()
}
})
</script>
<!--#
}
#-->