diff --git a/src/main/java/io/v/nutz/zhgh/mobile/activity/Sports/mobileActivityListController.java b/src/main/java/io/v/nutz/zhgh/mobile/activity/Sports/mobileActivityListController.java
index 84a7f66..fb45628 100644
--- a/src/main/java/io/v/nutz/zhgh/mobile/activity/Sports/mobileActivityListController.java
+++ b/src/main/java/io/v/nutz/zhgh/mobile/activity/Sports/mobileActivityListController.java
@@ -14,6 +14,7 @@ import io.v.nutz.web.commons.utils.ShiroUtil;
import io.v.nutz.zhgh.activity.models.*;
import io.v.nutz.zhgh.mobile.activity.Sports.service.MobileActivityApplyService;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
+import org.nutz.dao.Chain;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
@@ -63,6 +64,7 @@ public class mobileActivityListController {
@RequiresAuthentication
public Object doActivity(@Param(value = "activityId", required = false) String activityId,
@Param(value = "eventId", required = false) String eventId,
+ @Param(value = "applyUserSign", required = false) String applyUserSign,
@Param(value = "teamId", required = false) String teamId,
@Param(value = "teamName", required = false) String teamName) {
@@ -92,6 +94,7 @@ public class mobileActivityListController {
schoolApply.setLoginname(user.getLoginname());
schoolApply.setUsername(user.getUsername());
schoolApply.setBirthday(user.getBirthday());
+ schoolApply.setApplyUserSign(applyUserSign);
baseService.insert(schoolApply);
return null;
}
@@ -173,6 +176,7 @@ public class mobileActivityListController {
IF (sum(apply.`status`=2) IS NULL, 0, sum(apply.`status`=2)) AS successUserApply,
count(apply.id) userApply,
apply.applyUser,
+ apply.applyUserSign,
(SELECT ast.`name` FROM activity_school_apply app LEFT JOIN activity_school_team ast ON ast.id = app.teamId WHERE app.eventId = ase.eventId AND app.activityId = ase.activityId AND app.userId = @userId) activityTeamName,
(select GROUP_CONCAT(username) FROM activity_school_apply WHERE status=2 and eventId = ase.eventId
AND activityId = ase.activityId AND applyUser AND (applyUser=@userId or userId=@userId)) userApplyNames,
@@ -283,7 +287,8 @@ public class mobileActivityListController {
activityUnionName unionName,
activityUnionId unionId,
eventId,
- applyUser
+ applyUser,
+ applyUserSign
FROM
activity_school_apply
$condition
@@ -302,5 +307,16 @@ public class mobileActivityListController {
return null;
}
+ @At
+ @ViReturn
+ @RequiresAuthentication
+ public Object doSign(String activityId, String eventId,String applyUserSign) {
+ mobileActivityApplyService.update(Chain.make("applyUserSign",applyUserSign),
+ Cnd.where("activityId", "=", activityId)
+ .and("eventId", "=", eventId)
+ .and("userId", "=", ShiroUtil.getUserId()));
+ return null;
+ }
+
}
diff --git a/src/main/resources/static/components/activity/school/Info.vue b/src/main/resources/static/components/activity/school/Info.vue
index d256c10..874dfc0 100644
--- a/src/main/resources/static/components/activity/school/Info.vue
+++ b/src/main/resources/static/components/activity/school/Info.vue
@@ -100,15 +100,13 @@
-
-
-
+
diff --git a/src/main/resources/views/mobile/activity/Sports/activityEventList.html b/src/main/resources/views/mobile/activity/Sports/activityEventList.html
index 9aad284..88c44d5 100644
--- a/src/main/resources/views/mobile/activity/Sports/activityEventList.html
+++ b/src/main/resources/views/mobile/activity/Sports/activityEventList.html
@@ -89,20 +89,20 @@ layout("/mobile/platform.html"){
暂无
-->
-
-
- 最少报男运动员:
-
- {{o.restrictBoyNum}}人
-
-
-
-
- 最少报女运动员:
-
- {{o.restrictGirlNum}}人
-
-
+
@@ -133,14 +133,16 @@ layout("/mobile/platform.html"){
已报名总人数:
- {{ o.successUserApply }}人
- {{
- o.totalApplyNum
- }}人
- {{ o.totalApplyNum }}人
- 0人
+
+ {{o.totalApplyNum}}
+
@@ -162,9 +164,18 @@ layout("/mobile/platform.html"){
-
+
+ 签 字
+
@@ -188,6 +199,14 @@ layout("/mobile/platform.html"){
v-model="unitName">
+
+
+
+ 暂无
+
+
+
+
+
+ 暂无
+
+
+
@@ -217,28 +245,36 @@ layout("/mobile/platform.html"){
签字
-
-
-
-
- 添加队友
-
-
-
+
- 自愿参赛责任及风险告知书
+ 自愿参赛责任及风险告知书
+
-
- 提 交
-
+
+
+
+ 添加队友
+
+
+
+
+ 提 交
+
+
+
+
+
@@ -277,30 +313,103 @@ layout("/mobile/platform.html"){
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ 自愿参赛责任及风险告知书
+
+
+
+
+
+ 提 交
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 自愿参赛责任及风险告知书
+
+
+
+
+
+ 提 交
+
+
+
+
+
+
+
@@ -312,6 +421,7 @@ layout("/mobile/platform.html"){
mixins: [mobileMixins],
data() {
return {
+ userId: "${@shiro.getPrincipalProperty('id')}",
userName: "${@shiro.getPrincipalProperty('username')}",
loginName: "${@shiro.getPrincipalProperty('loginname')}",
sex: "${@shiro.getPrincipalProperty('sex')}",
@@ -365,20 +475,65 @@ layout("/mobile/platform.html"){
addRegisterList: [],
isView: false,
activityData: {},
- applyUserSign: "",
- fxgzsActionPopup:false,
+ fxgzsActionPopup: false,
+ signActionPopup: false
}
},
methods: {
+ doSign() {
+ if (this.activityData.isSign && !this.formData.applyUserSign) {
+ this.$dialog.alert({
+ title: "温馨提示",
+ message: "请签字后再提交!"
+ }).then(() => {
+
+ })
+ return
+ }
+ if (this.activityData.isSign && !this.formData.isCy) {
+ this.$dialog.alert({
+ title: "温馨提示",
+ message: "请先阅读自愿参赛责任及风险告知书!"
+ }).then(() => {
+
+ })
+ return
+ }
+
+ this.$dialog.confirm({
+ title: "提示",
+ message: "您确认要提交吗?"
+ }).then(() => {
+ $.post("/mobile/activity/Sports/list/doSign", {
+ applyUserSign: this.formData.applyUserSign,
+ activityId: this.activityData.activityId,
+ eventId: this.activityData.eventId
+ }).then(resp => {
+ if (resp.code === 0) {
+ this.$toast.success("提交成功!")
+ window.location.reload()
+ } else {
+ this.$toast.fail(resp.msg)
+ }
+ })
+ })
+
+ },
+ openSign(row) {
+ this.activityData = row
+ this.signActionPopup = true
+ },
async openApplyUser(item) {
this.isView = true
+ this.activityData = item
this.formData.activityId = item.activityId
const resp = await this.selectRegisterList()
if (resp) {
const selfInfo = resp.find(v => v.id === "${@shiro.getPrincipalProperty('id')}" && v.eventId === item.eventId)
if (selfInfo) {
- this.registerList = resp.filter(v => v.eventId == item.eventId && v.applyUser === selfInfo.applyUser)
+ this.registerList = resp.filter(v => v.eventId === item.eventId && v.applyUser === selfInfo.applyUser)
+ this.formData.applyUserSign = selfInfo.applyUserSign
}
this.teamSignUpShow = true
}
@@ -391,7 +546,7 @@ layout("/mobile/platform.html"){
},
async doTeamSignUp() {
- if (this.activityData.isSign && !this.applyUserSign) {
+ if (this.activityData.isSign && !this.formData.applyUserSign) {
this.$dialog.alert({
title: "温馨提示",
message: "请签字后再提交!"
@@ -475,7 +630,7 @@ layout("/mobile/platform.html"){
teamId: this.formData.teamId,
teamName: this.formData.teamName,
userIds: JSON.stringify(userIds),
- applyUserSign: this.applyUserSign
+ applyUserSign: this.formData.applyUserSign
})
await this.onRefresh()
@@ -558,6 +713,24 @@ layout("/mobile/platform.html"){
return done(false)
},
async doActivityConfirm() {
+ if (this.activityData.isSign && !this.formData.applyUserSign) {
+ this.$dialog.alert({
+ title: "温馨提示",
+ message: "请签字后再提交!"
+ }).then(() => {
+
+ })
+ return
+ }
+ if (this.activityData.isSign && !this.formData.isCy) {
+ this.$dialog.alert({
+ title: "温馨提示",
+ message: "请先阅读自愿参赛责任及风险告知书!"
+ }).then(() => {
+
+ })
+ return
+ }
if (this.formData.teamId == null && this.projectType == 2) {
this.$toast("请选择报名的小队")
return