Merge remote-tracking branch 'origin/main'

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