commit
This commit is contained in:
+3
-3
@@ -121,7 +121,7 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<NutMap> activityData(Integer year, Integer isActivity, Integer applyStatus) {
|
||||
public Pagination activityData(Integer year, Integer isActivity, Integer applyStatus) {
|
||||
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -186,8 +186,8 @@ public class ActivitySportsApplyUserServiceImpl extends BaseServiceImpl<Activity
|
||||
cnd.desc("school.applyStartTime");
|
||||
|
||||
sql.setCondition(cnd);
|
||||
|
||||
return listMap(sql);
|
||||
Pagination pagination = listPageMap(1, 50, sql);
|
||||
return pagination;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+6
-2
@@ -139,6 +139,10 @@ public class H5HealthCheckupController {
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"h5.healthCheckup.list", "h5.healthCheckup.mine"}, mode = SaMode.OR)
|
||||
public Result doSubmit(@Param("userSelection") HealthCheckupUserSelection userSelection) {
|
||||
BigDecimal money = userSelection.getMoney();
|
||||
if (money.compareTo(BigDecimal.ZERO) <= 0) { // 小于等于0
|
||||
return Result.error("金额必须大于0,当前医院没有符合您的选项!");
|
||||
}
|
||||
if (StrUtil.isNotBlank(userSelection.getId())) {
|
||||
baseService.dao().clearLinks(userSelection, "companionList");
|
||||
baseService.dao().delete(HealthCheckupUserSelection.class, userSelection.getId());
|
||||
@@ -208,7 +212,7 @@ public class H5HealthCheckupController {
|
||||
public Result getSubjectMoney(String id, String marriage) {
|
||||
List<HealthCheckupProjectSubjectMoney> list = healthCheckupProjectService.dao().query(HealthCheckupProjectSubjectMoney.class, Cnd.where(HealthCheckupProjectSubjectMoney::getSubjectId, "=", id));
|
||||
BigDecimal money = BigDecimal.valueOf(0.00);
|
||||
String subjectMoneyId = null;
|
||||
String subjectMoneyId = "";
|
||||
for (HealthCheckupProjectSubjectMoney subject : list) {
|
||||
// 是否满足条件
|
||||
Cnd cnd = Cnd.where("id", "=", SecurityUtil.getUserId());
|
||||
@@ -221,7 +225,7 @@ public class H5HealthCheckupController {
|
||||
}
|
||||
}
|
||||
|
||||
return Result.success().addData(Map.of("money", money,"subjectMoneyId",subjectMoneyId));
|
||||
return Result.success().addData(Map.of("money", money, "subjectMoneyId", subjectMoneyId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -461,7 +461,7 @@ layout("/layouts/platform.html"){
|
||||
async activityInfoData() {
|
||||
const resp = await this.$axios.post(loc() + "/activityData", this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.activityList = resp.data
|
||||
this.activityList = resp.data.list
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ layout("/layouts/platform.html"){
|
||||
async activityInfoData() {
|
||||
const resp = await this.$axios.post(loc() + "/activityData", this.pageForm)
|
||||
if (resp.code === 0) {
|
||||
this.activityList = resp.data
|
||||
this.activityList = resp.data.list
|
||||
} else {
|
||||
this.notifyWarning(resp.msg)
|
||||
}
|
||||
|
||||
@@ -52,58 +52,30 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-dropdown-item :options="activityTypeOptions" @change="doSearch" v-model="pageForm.activity_type"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<van-pull-refresh v-model="refreshing" @refresh="doSearch" style="min-height: calc(100vh - 94px); background: #f1f1f1">
|
||||
<van-list v-if="tableData && tableData.length>0" v-model="loading" :finished="finished" finished-text="" @load="pageData">
|
||||
<div class="list-card" v-for="item in tableData" :key="item.id" @click="openDetail(item)">
|
||||
<div class="list-card-img">
|
||||
<img :src="item.cover" alt="" />
|
||||
<table-list api="/platform/activity/culture/applyUser/pageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="name"
|
||||
img="cover"
|
||||
@ready="onReady"
|
||||
>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="报名开始时间">
|
||||
{{$moment(row.startTime).format('MM/DD HH:mm')}}
|
||||
</table-column>
|
||||
<table-column label="报名结束时间">
|
||||
{{$moment(row.endTime).format('MM/DD HH:mm')}}
|
||||
</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<template v-if="$moment().isBefore($moment(row.endTime))">
|
||||
<div class="action-btn" @click="openDetail(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>去报名</span>
|
||||
</div>
|
||||
<div class="list-card-body">
|
||||
<div class="title">{{item.name}}</div>
|
||||
<div class="time">{{item.startTime + ' 至 ' + item.endTime}}</div>
|
||||
<div class="footer">
|
||||
<span
|
||||
class="tag"
|
||||
v-if="$moment(item.applyStartTime).valueOf() > $moment().valueOf()"
|
||||
style="color: var(--color-primary); border: 1px solid var(--color-primary)"
|
||||
>
|
||||
未开始报名
|
||||
</span>
|
||||
|
||||
<span
|
||||
class="tag"
|
||||
v-else-if="$moment(item.applyEndTime).valueOf() > $moment().valueOf() && $moment().valueOf() > $moment(item.applyStartTime).valueOf()"
|
||||
style="color: var(--color-primary); border: 1px solid var(--color-primary)"
|
||||
>
|
||||
报名进行中
|
||||
</span>
|
||||
|
||||
<span
|
||||
class="tag"
|
||||
v-else-if="$moment(item.applyEndTime).valueOf() < $moment().valueOf() && $moment().valueOf() < $moment(item.startTime).valueOf()"
|
||||
style="color: var(--color-primary); border: 1px solid var(--color-primary)"
|
||||
>
|
||||
报名已结束
|
||||
</span>
|
||||
|
||||
<span
|
||||
class="tag"
|
||||
v-else-if="$moment(item.startTime).valueOf() < $moment().valueOf() && $moment().valueOf() < $moment(item.endTime).valueOf()"
|
||||
style="color: var(--color-primary); border: 1px solid var(--color-primary)"
|
||||
>
|
||||
活动进行中
|
||||
</span>
|
||||
|
||||
<span class="tag" v-else-if="$moment().valueOf() > $moment(item.endTime).valueOf()" style="color: red; border: 1px solid red">
|
||||
活动已结束
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty description="" v-else></van-empty>
|
||||
</van-pull-refresh>
|
||||
</template>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<van-popup :style="{ height: '100%',width: '100%'}" position="right" v-model="viewShow">
|
||||
<mobile-culture-apply-user :id="viewData.id" @back="back" @submit_back="submit_back" ref="viewInfo"></mobile-culture-apply-user>
|
||||
@@ -153,30 +125,8 @@ layout("/layouts/platform_h5.html"){
|
||||
"mobile-culture-apply-user": MOBILE_CULTURE_APPLY_USER
|
||||
},
|
||||
methods: {
|
||||
pageData() {
|
||||
this.loading = true
|
||||
const loading = createListLoading()
|
||||
const pageForm = {
|
||||
...this.pageForm,
|
||||
isEnrolled: this.pageForm.isEnrolledText === 1
|
||||
}
|
||||
this.$axios
|
||||
.post("/platform/activity/culture/applyUser/pageData", pageForm)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = this.tableData.concat(res.data.list)
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
if (this.tableData.length >= res.data.totalCount) {
|
||||
this.finished = true
|
||||
}
|
||||
this.pageForm.pageNumber++
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
loading.close()
|
||||
this.loading = false
|
||||
this.refreshing = false
|
||||
})
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
openDetail(row) {
|
||||
@@ -266,15 +216,14 @@ layout("/layouts/platform_h5.html"){
|
||||
.catch(() => {})
|
||||
},
|
||||
doSearch() {
|
||||
this.tableKey = new Date().getTime()
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.tableData = []
|
||||
this.pageData()
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -11,66 +11,38 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-nav-bar title="活动列表" @click-left="()=>this.$pjaxReplace('/platform/home')" left-arrow left-text="返回" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu>
|
||||
<year-van-dropdown-item :num="5" @change="pageData" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item :options="stateList" @change="pageData"
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item :options="stateList" @change="doSearch"
|
||||
v-model="pageForm.isActivity"></van-dropdown-item>
|
||||
<van-dropdown-item :options="applyStatusOptions" @change="pageData"
|
||||
<van-dropdown-item :options="applyStatusOptions" @change="doSearch"
|
||||
v-model="pageForm.applyStatus"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<div>
|
||||
<van-list :finished="finished" @load="pageData" finished-text="没有更多了" v-if="tableData.length>0"
|
||||
v-model="loading">
|
||||
<div class="table-list">
|
||||
<div :key="row.id" class="table-card" v-for="row in tableData">
|
||||
<van-tag mark size="large" style="position: absolute; right: 0%; top: 5px; z-index: 1">
|
||||
<span style="color: forestgreen"
|
||||
v-if="$moment(row.applyStartTime).valueOf() > $moment().valueOf()">未开始报名</span>
|
||||
<span
|
||||
style="color: forestgreen"
|
||||
v-else-if="$moment(row.applyEndTime).valueOf() > $moment().valueOf() &&
|
||||
$moment().valueOf() > $moment(row.applyStartTime).valueOf()"
|
||||
>
|
||||
报名中
|
||||
</span>
|
||||
<span
|
||||
style="color: #ee1919"
|
||||
v-else-if="$moment(row.applyEndTime).valueOf() < $moment().valueOf() &&
|
||||
$moment().valueOf() < $moment(row.startTime).valueOf()"
|
||||
>
|
||||
报名结束
|
||||
</span>
|
||||
<span
|
||||
style="color: forestgreen"
|
||||
v-else-if="$moment(row.startTime).valueOf() < $moment().valueOf() &&
|
||||
$moment().valueOf() < $moment(row.endTime).valueOf()"
|
||||
>
|
||||
活动进行中
|
||||
</span>
|
||||
<span style="color: #ee1919" v-else-if="$moment().valueOf() > $moment(row.endTime).valueOf()">活动结束</span>
|
||||
</van-tag>
|
||||
<van-image :src="row.image" fit="cover" height="200" v-if="row.image" width="100%"></van-image>
|
||||
<van-cell>
|
||||
<template slot="title">
|
||||
<div class="flex-align margin-top20">
|
||||
<span class="font-size3 bold">{{row.NAME}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell :value="row.applyStartTime" title="报名开始时间"></van-cell>
|
||||
<van-cell :value="row.applyEndTime" title="报名结束时间"></van-cell>
|
||||
<van-cell class="table-card-footer">
|
||||
<template>
|
||||
<van-button :loading="subLoading" @click="openView(row)" round size="small" type="primary">查 看</van-button>
|
||||
</template>
|
||||
</van-cell>
|
||||
<table-list api="/platform/activity/apply/h5/activityData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="NAME"
|
||||
img="image"
|
||||
@ready="onReady"
|
||||
>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="报名时间">
|
||||
{{$moment(row.applyStartTime).format('MM/DD HH:mm') + '~' + $moment(row.applyEndTime).format('MM/DD HH:mm')}}
|
||||
</table-column>
|
||||
<table-column label="活动时间">
|
||||
{{$moment(row.startTime).format('MM/DD HH:mm') + '~' + $moment(row.endTime).format('MM/DD HH:mm')}}
|
||||
</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<template v-if="$moment().isBefore($moment(row.applyEndTime))">
|
||||
<div class="action-btn" @click="openView(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>去报名</span>
|
||||
</div>
|
||||
</div>
|
||||
</van-list>
|
||||
<van-empty image="/assets/platform/plugins/vant-green/images/nodata/nodata.png" description="暂无数据"
|
||||
v-else></van-empty>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<activity_event_notification
|
||||
:event_notification="viewData.eventNotification"
|
||||
@@ -119,18 +91,18 @@ layout("/layouts/platform_h5.html"){
|
||||
this.viewData = row
|
||||
this.$refs.eventNotification.viewShow = true
|
||||
},
|
||||
pageData() {
|
||||
this.loading = true
|
||||
this.$axios.post("/platform/activity/apply/h5/activityData", this.pageForm).then((res) => {
|
||||
this.tableData = res.data
|
||||
|
||||
this.finished = true
|
||||
this.loading = false
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
+5
-16
@@ -10,7 +10,7 @@ let H5_PROJECT_MANAGE_FROM = {
|
||||
name="idCard"
|
||||
readonly
|
||||
required
|
||||
placeholder="请选择身份证号"
|
||||
placeholder="请联系校工会补充身份证号"
|
||||
v-model="formData.idCard"
|
||||
:rules="[{ required: true, message: '请输入身份证号' }]">
|
||||
</van-field>
|
||||
@@ -258,7 +258,7 @@ let H5_PROJECT_MANAGE_FROM = {
|
||||
},
|
||||
async selectInfo(row) {
|
||||
//this.formData.projectId = row.projectId;
|
||||
const resp = await $.post('/platform/healthCheckup/h5/selectInfo', {projectId: row.projectId});
|
||||
const resp = await this.$axios.post('/platform/healthCheckup/h5/selectInfo', {projectId: row.projectId});
|
||||
if (resp.data !== null) {
|
||||
this.formData = resp.data;
|
||||
/* const o = this.campusList.find(o => o.id === this.formData.campus)
|
||||
@@ -278,12 +278,6 @@ let H5_PROJECT_MANAGE_FROM = {
|
||||
|
||||
// 执行提交
|
||||
async doSubmit() {
|
||||
const loading = this.$toast.loading({
|
||||
message: "报名中...",
|
||||
forbidClick: true,
|
||||
overlay: true,
|
||||
duration: 0
|
||||
})
|
||||
const formData = clone(this.formData);
|
||||
formData.projectId = this.row.projectId;
|
||||
/* if (formData.isFamily === '否') {
|
||||
@@ -292,17 +286,13 @@ let H5_PROJECT_MANAGE_FROM = {
|
||||
// 过滤空的家属信息
|
||||
formData.companionList = formData.companionList.filter(item => item.userName && item.userName.trim() !== '');
|
||||
}*/
|
||||
|
||||
const resp = await $.post('/platform/healthCheckup/h5/doSubmit', {
|
||||
const resp = await this.$axios.post('/platform/healthCheckup/h5/doSubmit', {
|
||||
userSelection: JSON.stringify(formData),
|
||||
});
|
||||
loading.clear()
|
||||
if (resp.code === 0) {
|
||||
this.visible = false;
|
||||
this.$toast.success(resp.msg)
|
||||
this.$emit('submit_success');
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
|
||||
},
|
||||
@@ -350,12 +340,11 @@ let H5_PROJECT_MANAGE_FROM = {
|
||||
// 查询体检套餐
|
||||
async findSubject(id) {
|
||||
try {
|
||||
const resp = await $.post('/platform/healthCheckup/project/mange/findOne', {
|
||||
const resp = await this.$axios.post('/platform/healthCheckup/project/mange/findOne', {
|
||||
id: id
|
||||
});
|
||||
this.project = resp.data || {};
|
||||
} catch (error) {
|
||||
console.error('获取体检套餐失败:', error);
|
||||
vant.Toast('获取体检套餐失败');
|
||||
}
|
||||
},
|
||||
@@ -363,7 +352,7 @@ let H5_PROJECT_MANAGE_FROM = {
|
||||
// 获取院区
|
||||
async getCampus() {
|
||||
try {
|
||||
const resp = await $.post('/platform/healthCheckup/h5/getCampus');
|
||||
const resp = await this.$axios.post('/platform/healthCheckup/h5/getCampus');
|
||||
this.campusList = resp.data || [];
|
||||
} catch (error) {
|
||||
vant.Toast('获取院区失败');
|
||||
|
||||
Reference in New Issue
Block a user