commit
This commit is contained in:
+22
-11
@@ -302,7 +302,18 @@ public class ActivityApplyController {
|
||||
result.put("awardsModeT", awardsModeT);
|
||||
result.put("awardsModeG", awardsModeG);
|
||||
|
||||
result.put("team", activitySchoolTeamService.query(Cnd.where("eventId", "=", eventId).and("activityId", "=", activityId).asc("location")));
|
||||
Cnd cndTeam = Cnd.NEW();
|
||||
cndTeam.and("eventId", "=", eventId);
|
||||
cndTeam.and("activityId", "=", activityId);
|
||||
cnd.asc("location");
|
||||
List<ActivitySchoolTeam> teamList = activitySchoolTeamService.query(cndTeam);
|
||||
|
||||
if (activity.getApplyMultipleTeamsUnionIds().contains(Vi.getUnionId())) {
|
||||
result.put("team", teamList);
|
||||
} else {
|
||||
result.put("team", Lang.isNotEmpty(teamList) ? List.of(teamList.get(0)) : teamList);
|
||||
}
|
||||
|
||||
|
||||
result.put("activity", activity);
|
||||
List<NutMap> events = (List<NutMap>) getEvents(activityId);
|
||||
@@ -557,15 +568,15 @@ public class ActivityApplyController {
|
||||
public Object findUserOne(String id) {
|
||||
try {
|
||||
Sql sql = Sqls.create("SELECT\n" +
|
||||
"\tu.id,u.username,u.unitid,\n" +
|
||||
"\tu.loginname,\n" +
|
||||
"\tu.sex,\n" +
|
||||
"\tu.mobile,\n" +
|
||||
"\tu.position,\n" +
|
||||
"\tun.`name` unitname \n" +
|
||||
"FROM\n" +
|
||||
"\tsys_user u\n" +
|
||||
"\tLEFT JOIN sys_unit un ON u.unitid = un.id Where u.id = @id").setParam("id", id);
|
||||
"\tu.id,u.username,u.unitid,\n" +
|
||||
"\tu.loginname,\n" +
|
||||
"\tu.sex,\n" +
|
||||
"\tu.mobile,\n" +
|
||||
"\tu.position,\n" +
|
||||
"\tun.`name` unitname \n" +
|
||||
"FROM\n" +
|
||||
"\tsys_user u\n" +
|
||||
"\tLEFT JOIN sys_unit un ON u.unitid = un.id Where u.id = @id").setParam("id", id);
|
||||
|
||||
return Result.success().addData(activitySchoolService.list(sql).get(0));
|
||||
} catch (Exception e) {
|
||||
@@ -708,7 +719,7 @@ public class ActivityApplyController {
|
||||
@Param(value = "CoachData", required = false) ActivitySchoolApply CoachData,
|
||||
@Param(value = "headData", required = false) ActivitySchoolApply headData,
|
||||
@Param(value = "activityId") String activityId) {
|
||||
ActivityBasicUnit thisBasicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=",ShiroUtil.getUnitId()));
|
||||
ActivityBasicUnit thisBasicUnit = activitySchoolService.dao().fetch(ActivityBasicUnit.class, Cnd.where("id", "=", ShiroUtil.getUnitId()));
|
||||
ActivityBasicUnion thisBasicUnion = activitySchoolService.dao().fetch(ActivityBasicUnion.class, Cnd.where("id", "=", thisBasicUnit.getUnionid()));
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("activityId", "=", activityId);
|
||||
|
||||
@@ -206,4 +206,9 @@ public class ActivitySchool extends BaseModel implements Serializable {
|
||||
@Default("0")
|
||||
@ColDefine(type = ColType.BOOLEAN)
|
||||
private Boolean isSign;
|
||||
|
||||
@Column
|
||||
@Comment("可报多队的工会id")
|
||||
@ColDefine(type = ColType.MYSQL_JSON)
|
||||
private List<String> applyMultipleTeamsUnionIds;
|
||||
}
|
||||
|
||||
@@ -157,6 +157,15 @@
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item prop="funding" label="哪个工会可以报多队(只有选中的工会能全部报,否则只能报一队)">
|
||||
<el-select v-model="form.applyMultipleTeamsUnionIds" clearable filterable multiple collapse-tags
|
||||
placeholder="请选择可报多队的工会" style="width: 100%">
|
||||
<el-option v-for="item in unionOptions" :key="item.id"
|
||||
:label="item.unionname" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item prop="xlFlag" label="活动提醒">
|
||||
<el-switch
|
||||
@@ -736,6 +745,7 @@ module.exports = {
|
||||
checkedEventInfo2: [],
|
||||
checkedEvents: [],
|
||||
unitOptions: [],
|
||||
unionOptions: [],
|
||||
clubOptions: [],
|
||||
planList: [],
|
||||
events: [],
|
||||
@@ -1134,6 +1144,7 @@ module.exports = {
|
||||
v.eventsIds = JSON.parse(v.eventsIds)
|
||||
v.applyWay = JSON.parse(v.applyWay)
|
||||
v.unitSponsor = JSON.parse(v.unitSponsor)
|
||||
v.applyMultipleTeamsUnionIds = JSON.parse(v.applyMultipleTeamsUnionIds)
|
||||
v.undertakeUnit = JSON.parse(v.undertakeUnit)
|
||||
v.unitJointly = JSON.parse(v.unitJointly)
|
||||
v.activityGroupId = parseInt(v.activityGroupId)
|
||||
@@ -1376,6 +1387,7 @@ module.exports = {
|
||||
},
|
||||
async created() {
|
||||
await this.initCnd()
|
||||
this.unionOptions = await getUnions(null)
|
||||
const clubs = await getClubs()
|
||||
const units = await getUnits(null)
|
||||
this.unitOptions = clubs.concat(units)
|
||||
|
||||
@@ -330,21 +330,21 @@ layout("/layouts/platform.html"){
|
||||
|
||||
|
||||
</template>
|
||||
<!--<template #func>
|
||||
<template #func>
|
||||
<div class="mr10" v-if="unionLeaderCoach">
|
||||
<!–团长:<span style="color: #419BF8">{{headData.username | str}}</span> –>–>
|
||||
<!--团长:<span style="color: #419BF8">{{headData.username | str}}</span> –>-->
|
||||
领队:<span style="color: #419BF8">{{LeaderData.username | str}} </span> 
|
||||
教练:<span style="color: #419BF8">{{CoachData.username | str}}</span>
|
||||
<!– 工作人员:<span
|
||||
style="color: #419BF8">{{staffData.username | str}}</span>–>
|
||||
<!-- 工作人员:<span
|
||||
style="color: #419BF8">{{staffData.username | str}}</span>-->
|
||||
</div>
|
||||
<div>
|
||||
<el-button @click="openLeaderCoach" plain type="primary"
|
||||
<el-button @click="openLeaderCoach" type="primary"
|
||||
v-if="unionLeaderCoach">设置领队/教练
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
</template>-->
|
||||
</template>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
@@ -625,33 +625,33 @@ layout("/layouts/platform.html"){
|
||||
v-if="substituteNum>0">
|
||||
设置替补
|
||||
</el-button>
|
||||
<!-- <el-button icon="el-icon-check" size="small"
|
||||
plain type="primary"
|
||||
@click="changeTeam" v-if="projectType==2&&teams.length>1">
|
||||
修改小队
|
||||
</el-button>
|
||||
<el-select size="small" v-model="teamId" placeholder="队伍" :clearable="false"
|
||||
v-if="projectType==2&&teams.length>1">
|
||||
<el-option
|
||||
v-for="item in teams"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>-->
|
||||
<el-button icon="el-icon-check" size="small"
|
||||
plain type="primary"
|
||||
@click="changeTeam" v-if="projectType==2&&teams.length>1">
|
||||
修改小队
|
||||
</el-button>
|
||||
<el-select size="small" v-model="teamId" placeholder="队伍" :clearable="false"
|
||||
v-if="projectType==2&&teams.length>1">
|
||||
<el-option
|
||||
v-for="item in teams"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
<!--<el-dropdown @command="changeTeam"
|
||||
<el-dropdown @command="changeTeam"
|
||||
v-if="projectType==2&&teams.length>1">
|
||||
<el-button size="small" type="primary">
|
||||
修改小队<i
|
||||
class="el-icon-arrow-down el-icon--right"></i>
|
||||
class="el-icon-arrow-down el-icon--right"></i>
|
||||
</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="{item}"
|
||||
v-for="item in teams">{{item.name}}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>-->
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
||||
<el-table :data="appliedData2" :key="tabkey"
|
||||
@@ -711,7 +711,8 @@ layout("/layouts/platform.html"){
|
||||
align="center" header-align="center" label="职务"
|
||||
prop="position">
|
||||
<template slot-scope="{row}">
|
||||
<el-input v-model="row.position" placeholder="请填写填写职称职务"></el-input>
|
||||
<el-input v-model="row.position"
|
||||
placeholder="请填写填写职称职务"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -2101,20 +2102,20 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
//判断每一个选手填写的是否正确
|
||||
for (let i = 0; i < appliedData.length; i++) {
|
||||
/* if (!appliedData[i].position) {
|
||||
this.$message.warning("请填写完整职称职务!")
|
||||
return
|
||||
}
|
||||
if (!appliedData[i].mobile) {
|
||||
this.$message.warning("请填写手机号!")
|
||||
return
|
||||
} else {
|
||||
const phoneRegex = /^1[3-9]\d{9}$/;
|
||||
if (!phoneRegex.test(appliedData[i].mobile)) {
|
||||
this.$message.warning("手机号填写不正确!")
|
||||
return
|
||||
}
|
||||
}*/
|
||||
/* if (!appliedData[i].position) {
|
||||
this.$message.warning("请填写完整职称职务!")
|
||||
return
|
||||
}
|
||||
if (!appliedData[i].mobile) {
|
||||
this.$message.warning("请填写手机号!")
|
||||
return
|
||||
} else {
|
||||
const phoneRegex = /^1[3-9]\d{9}$/;
|
||||
if (!phoneRegex.test(appliedData[i].mobile)) {
|
||||
this.$message.warning("手机号填写不正确!")
|
||||
return
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if (this.appliedData3.length == 0 && this.appliedData.length == 0) {
|
||||
@@ -2481,18 +2482,6 @@ layout("/layouts/platform.html"){
|
||||
this.rightChecked = v
|
||||
},
|
||||
flushApplyed(applyed) {
|
||||
if (this.activityData2.id === "6a2546b6df41457b871d590c0290eb07") {
|
||||
if (["00dfa3b4f2ad4d238277b1345e6437f3", "6748ad4bd12c4af5b32c3ceace7fc694"].includes(this.team)
|
||||
&& "${@shiro.getPrincipalProperty('unit').getUnionid()}" !== "6234c0450ef0414f87a38794faac6c3d") {
|
||||
this.$notify({
|
||||
title: "警告",
|
||||
message: "您只能报一队暂时不能报两队!",
|
||||
type: "warning"
|
||||
})
|
||||
this.team = this.teams[0].id
|
||||
return
|
||||
}
|
||||
}
|
||||
this.applyedTabLoading = true
|
||||
//如果项目等于单项
|
||||
if (this.eventData.projectType === "1") {
|
||||
|
||||
Reference in New Issue
Block a user