人员、品牌活动、答题、单身教工

This commit is contained in:
Paidax
2025-03-10 14:21:54 +08:00
parent 223811d097
commit c338d21e61
82 changed files with 3936 additions and 1415 deletions
@@ -133,7 +133,7 @@ layout("/mobile/platform.html"){
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 25px;
font-size: 12px;
font-size: 15px;
}
@@ -158,9 +158,6 @@ layout("/mobile/platform.html"){
<van-sticky>
<van-nav-bar :title="trainType + '列表'" left-arrow
@click-left="pjaxReplace('/platform/mobile/trainSignUpActivity/trainList?type=' + type)"></van-nav-bar>
</van-sticky>
<van-sticky>
<van-dropdown-menu active-color="#1867b0">
<van-dropdown-item @change="tabChange" v-model="activityStatus"
:options="activityOptions"></van-dropdown-item>
@@ -171,7 +168,6 @@ layout("/mobile/platform.html"){
<van-tabs v-if="activityStatus != '1' && assortList.length > 0" v-model="assort" type="card" color="#1867B0"
style="margin-top: 10px" @click="tabClick">
<van-tab v-for="item in assortList" :name="item" :title="item">
</van-tab>
</van-tabs>
@@ -181,7 +177,7 @@ layout("/mobile/platform.html"){
</van-notice-bar>-->
<template>
<div id="parentDiv" v-model="loading" v-if="tableData.courseList && tableData.courseList.length>0">
<div id="parentDiv" v-model="loading" v-if="tableData.courseList && tableData.courseList.length>0" style="margin-bottom: 60px">
<template v-for="o in tableData.courseList">
<div style="position: relative"
@@ -211,13 +207,24 @@ layout("/mobile/platform.html"){
</div>
<div>
<span class="train-title">活动时间:</span>
<span v-if="o.courseTimeList && o.courseTimeList.length > 1" @click="trainClick(o)"
style="color: #1867b0">点我查看</span>
<span @click="trainClick(o)" v-if="o.courseTimeList && o.courseTimeList.length === 1"
style="color: #1867b0">
<template v-if="o.courseName.includes('时间待定')">
<span style="color: #e5a15e">活动时间另行通知</span>
</template>
<template v-else>
<span v-if="o.courseTimeList && o.courseTimeList.length > 1" @click="trainClick(o)"
style="color: #1867b0">点我查看</span>
<span @click="trainClick(o)" v-if="o.courseTimeList && o.courseTimeList.length === 1"
style="color: #1867b0">
{{o.courseTimeList[0].courseStartTime.substring(11, 19) + ' ~ ' + o.courseTimeList[0].courseEndTime.substring(11, 19)}}
</span>
</template>
</div>
<template v-if="o.courseTimeName">
<div>
<span class="train-title">报名时段:</span>
<span style="color: #1867b0">{{o.courseTimeName}}</span>
</div>
</template>
<div>
<span @click.stop="showPic(FILE_DOMAIN + '/fileStreamPreview?id=' + tableData.wechat.id)"
v-if="o.isSign === true && tableData.wechat"
@@ -241,11 +248,11 @@ layout("/mobile/platform.html"){
style="position: absolute; left: 77%; top: 58%;"
src="/assets/mobile/svg/train/sign_up.svg"></image>
<div @click="trainClick(o)" v-if="activityStatus === '1' && o.isMobileSign"
style="text-align: center; line-height: 40px; width: 40px; height: 40px;display: inline-block; font-size: 14px;
position: absolute; right: -10px; top: 8%; background-color: #00c698; border-radius: 7px; color: white">
签到
</div>
<!-- <div @click="trainClick(o)" v-if="activityStatus === '1'"-->
<!-- style="text-align: center; line-height: 40px; width: 40px; height: 40px;display: inline-block; font-size: 14px;-->
<!-- position: absolute; right: -10px; top: 8%; background-color: #00c698; border-radius: 7px; color: white">-->
<!-- 签到-->
<!-- </div>-->
</div>
</template>
</div>
@@ -304,7 +311,14 @@ layout("/mobile/platform.html"){
<div class="join_content">
<van-form @submit="joinSubmit" :show-error-message="false">
<div class="van-doc-card-two" style="margin-bottom: 16px">
<div></div>
<div class="van-card-header">
活动信息
</div>
<div class="van-card-body">
<van-field label="活动名称" readonly v-model="choose.courseName"></van-field>
<van-field label="校区" readonly v-model="choose.campus"></van-field>
<van-field label="活动地点" readonly v-model="choose.courseLocation"></van-field>
</div>
<div class="van-card-header">
基础信息
</div>
@@ -316,6 +330,19 @@ layout("/mobile/platform.html"){
<van-field label="性别" readonly v-model="formData.sex"></van-field>
<van-field label="联系方式" required :rules="[{ required: true, message: '请填写联系方式' }]"
placeholder="请填写联系方式" v-model="formData.mobile"></van-field>
<template v-if="this.choose.courseIsLimitApply">
<van-field label="报名时段" required :rules="[{ required: true, message: '请选择报名时段' }]"
readonly @click="showCoursePicker = true;getCourseTimeSelectList(choose);"
placeholder="请选择报名时段" v-model="formData.courseTimeName"></van-field>
<van-popup v-model="showCoursePicker" position="bottom">
<van-picker
show-toolbar
:columns="courseTimeSelectList"
@confirm="onCourseConfirm"
@cancel="showCoursePicker=false"
></van-picker>
</van-popup>
</template>
<train-dynamic-form v-model="dynamicColumnsData" ref="trainDynamicForm"></train-dynamic-form>
</div>
</div>
@@ -325,11 +352,17 @@ layout("/mobile/platform.html"){
</van-form>
</div>
</van-popup>
<div>
<van-tabbar v-model="tarBarActive">
<van-tabbar-item icon="home-o" replace @click="pjaxReplace('/platform/mobile/trainSignUpActivity/trainList')">活动报名</van-tabbar-item>
<van-tabbar-item icon="manager-o" replace @click="pjaxReplace('/platform/mobile/trainSignUpActivity/trainList?type=my')">我的活动</van-tabbar-item>
</van-tabbar>
</div>
</div>
<script>
let pointArray = []
let locations = null
let map = null
@@ -339,6 +372,7 @@ layout("/mobile/platform.html"){
mixins: [mobileMixins],
data() {
return {
tarBarActive: 0,
assort: '',
assortList: [],
allColumnsData: [],
@@ -362,6 +396,9 @@ layout("/mobile/platform.html"){
activitySignUpStartTime: null,
choose: {},
activity: '',
showCoursePicker: false,
courseTimeSelectList: [],
}
},
components: {
@@ -528,7 +565,7 @@ layout("/mobile/platform.html"){
cancel(o) {
vant.Dialog.confirm({
title: '温馨提示',
message: "您确定要<span style='color: red'>取消【" + o.courseName + "】</span>吗?\n一旦确认,可不能反悔了哟!",
message: "您确定要<span style='color: red'>取消【" + o.courseName + "】</span>吗?",
confirmButtonColor: '#1867b0',
}).then(async () => {
const resp = await $.post('/platform/mobile/trainSignUpActivity/cancelSignUp', {
@@ -543,12 +580,24 @@ layout("/mobile/platform.html"){
});
},
async signUp(o) {
if (o.courseName.includes('时间待定')) {
vant.Dialog.alert({
title: '提示',
message: '活动报名尚未开始哦,请报名其他活动吧',
confirmButtonColor: '#1867b0'
})
return
}
this.choose = o
const res = await $.post('/platform/mobile/trainSignUpActivity/validateSignUp', {
cndId: o.conditionStructureId,
courseId: o.id,
})
if (o.courseIsLimitApply) {
await this.getCourseTimeSelectList(o)
}
if(res.code !== 0) {
vant.Dialog.alert({
title: '提示',
@@ -579,6 +628,20 @@ layout("/mobile/platform.html"){
})
this.joinPopup = true
},
async getCourseTimeSelectList(o) {
const resp = await $.post('/platform/mobile/trainSignUpActivity/getCourseTimeSelectList',{courseId: o.id})
if (resp.code === 0) {
this.courseTimeSelectList = resp.data
} else {
this.$toast.fail("获取时段信息失败,请联系管理员")
}
},
onCourseConfirm(val){
this.formData.activityCourseId = val.value
this.$set(this.formData, "activityCourseId", val.value)
this.$set(this.formData, "courseTimeName", val.text.substring(0, 12))
this.showCoursePicker = false
},
async joinSubmit() {
let valid = false
try {
@@ -609,9 +672,24 @@ layout("/mobile/platform.html"){
return
}
let flag = this.choose.courseIsLimitApply
if (flag) {
const resp = await $.post('/platform/mobile/trainSignUpActivity/validateSourceSignUp',{activityCourseId: this.formData.activityCourseId})
if (resp.code !== 0) {
vant.Dialog.alert({
title: '温馨提示',
message: resp.msg,
confirmButtonColor: '#1867b0'
})
return
}
}
let msg = '您选择了【' + this.choose.courseName + (flag ? this.formData.courseTimeName : '') + '】\n的报名,是否确认?'
vant.Dialog.confirm({
title: '温馨提示',
message: '您选择了【' + this.choose.courseName + '】\n一旦确认,可不能反悔了哟',
message: msg,
confirmButtonColor: '#1867b0',
}).then(async () => {
const toast = vant.Toast.loading({
@@ -632,7 +710,7 @@ layout("/mobile/platform.html"){
const resp = await $.post('/platform/mobile/trainSignUpActivity/doSignUp', this.formData)
vant.Toast(resp.msg)
if (resp.code === 0) {
await this.pageData()
this.pageData()
this.joinPopup = false
}
toast.clear()
@@ -800,6 +878,7 @@ layout("/mobile/platform.html"){
if (this.type === 'my') {
this.activityOptions = [{text: '我报名的', value: '1'}]
this.activityStatus = '1'
this.tarBarActive = 1
} else {
this.activityOptions = [{text: '全部', value: '0'}, {text: '我报名的', value: '1'}]
this.activityStatus = new Date().getTime() > new Date(time).getTime() ? '1' : '0'