commit
This commit is contained in:
@@ -169,16 +169,16 @@ public class ActivitySchoolApply extends BaseModel implements Serializable {
|
|||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
|
// @Excel(name = "身份证号", width = 20)
|
||||||
|
@Excel(name = "身份证", width = 25)
|
||||||
|
private String idCard;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("职级")
|
@Comment("职级")
|
||||||
@Excel(name = "职级", width = 20)
|
@Excel(name = "职级", width = 20)
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 50)
|
@ColDefine(type = ColType.VARCHAR, width = 50)
|
||||||
private String professionalLevel;
|
private String professionalLevel;
|
||||||
|
|
||||||
|
|
||||||
// @Excel(name = "身份证号", width = 20)
|
|
||||||
private String idCard;
|
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("性别")
|
@Comment("性别")
|
||||||
@Excel(name = "性别", width = 20)
|
@Excel(name = "性别", width = 20)
|
||||||
|
|||||||
+15
-1
@@ -10,6 +10,7 @@ import com.budwk.app.base.utils.DateUtil;
|
|||||||
import com.budwk.app.sys.models.Sys_home_activity;
|
import com.budwk.app.sys.models.Sys_home_activity;
|
||||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||||
import com.budwk.app.zhgh.activity.basic.models.ActivityBasicUnit;
|
import com.budwk.app.zhgh.activity.basic.models.ActivityBasicUnit;
|
||||||
|
import com.budwk.app.zhgh.activity.basic.models.ActivityBasicUnion;
|
||||||
import com.budwk.app.zhgh.activity.culture.models.ActivityTissue;
|
import com.budwk.app.zhgh.activity.culture.models.ActivityTissue;
|
||||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchool;
|
import com.budwk.app.zhgh.activity.sports.models.ActivitySchool;
|
||||||
import com.budwk.app.zhgh.activity.sports.models.ActivitySchoolApply;
|
import com.budwk.app.zhgh.activity.sports.models.ActivitySchoolApply;
|
||||||
@@ -200,6 +201,7 @@ public class ActivitySportsServiceImpl extends BaseServiceImpl<ActivitySchool> i
|
|||||||
app.activityUnionName unionname,
|
app.activityUnionName unionname,
|
||||||
app.sex,
|
app.sex,
|
||||||
app.mobile,
|
app.mobile,
|
||||||
|
u.idcard AS idCard,
|
||||||
app.professionalLevel,
|
app.professionalLevel,
|
||||||
u.userState,
|
u.userState,
|
||||||
ev.allName,
|
ev.allName,
|
||||||
@@ -242,13 +244,25 @@ public class ActivitySportsServiceImpl extends BaseServiceImpl<ActivitySchool> i
|
|||||||
ExportParams exportParams = new ExportParams();
|
ExportParams exportParams = new ExportParams();
|
||||||
exportParams.setType(ExcelType.XSSF);
|
exportParams.setType(ExcelType.XSSF);
|
||||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, ActivitySchoolApply.class, excels);
|
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, ActivitySchoolApply.class, excels);
|
||||||
CommonDownloadUtil.download("报名表.xlsx", workbook, response);
|
CommonDownloadUtil.download(getUnionApplyExportFileName(unionId), workbook, response);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getUnionApplyExportFileName(String unionId) {
|
||||||
|
String unionName = "分工会";
|
||||||
|
if (Strings.isNotBlank(unionId)) {
|
||||||
|
ActivityBasicUnion union = dao().fetch(ActivityBasicUnion.class, unionId);
|
||||||
|
if (union != null && Strings.isNotBlank(union.getName())) {
|
||||||
|
unionName = union.getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 分工会名称可能已经包含“分工会”后缀,避免导出文件名重复拼接。
|
||||||
|
return unionName.endsWith("分工会") ? unionName + "报名表.xlsx" : unionName + "分工会报名表.xlsx";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class personType {
|
private static class personType {
|
||||||
|
|
||||||
|
|||||||
+1
@@ -135,6 +135,7 @@ public class TrainSignUpApplyController {
|
|||||||
tsuc.courseLocationCoordinates,
|
tsuc.courseLocationCoordinates,
|
||||||
tsuc.courseReservedNumber,
|
tsuc.courseReservedNumber,
|
||||||
tsuc.courseInstructor,
|
tsuc.courseInstructor,
|
||||||
|
tsuc.courseInstructorMobile,
|
||||||
tsuc.campus,
|
tsuc.campus,
|
||||||
tsuc.unionLimit,
|
tsuc.unionLimit,
|
||||||
tsuc.isMobileSign,
|
tsuc.isMobileSign,
|
||||||
|
|||||||
@@ -68,6 +68,11 @@ public class TrainSignUpCourse extends BaseModel implements Serializable {
|
|||||||
@Comment("课程讲师")
|
@Comment("课程讲师")
|
||||||
private String courseInstructor;
|
private String courseInstructor;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
@Comment("负责人手机号")
|
||||||
|
private String courseInstructorMobile;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||||
@Comment("校区")
|
@Comment("校区")
|
||||||
|
|||||||
+5
-3
@@ -693,11 +693,11 @@ public class SiteCugApplyController {
|
|||||||
@SaCheckPermission(value = {"siteCug.apply", "h5.siteCug.apply"}, mode = SaMode.OR)
|
@SaCheckPermission(value = {"siteCug.apply", "h5.siteCug.apply"}, mode = SaMode.OR)
|
||||||
public Result timeLimitConfig(@Param("siteId") String siteId) {
|
public Result timeLimitConfig(@Param("siteId") String siteId) {
|
||||||
if (StrUtil.isBlank(siteId)) {
|
if (StrUtil.isBlank(siteId)) {
|
||||||
return Result.success(NutMap.NEW().addv("filterHolidays", false).addv("holidayList", new ArrayList<>()).addv("notApplyTimeList", new ArrayList<>()));
|
return Result.success(NutMap.NEW().addv("filterHolidays", false).addv("holidayList", new ArrayList<>()).addv("notApplyTimeList", new ArrayList<>()).addv("termStartDate", "").addv("termEndDate", ""));
|
||||||
}
|
}
|
||||||
SiteCugInfo info = infoService.fetch(siteId);
|
SiteCugInfo info = infoService.fetch(siteId);
|
||||||
if (info == null) {
|
if (info == null) {
|
||||||
return Result.success(NutMap.NEW().addv("filterHolidays", false).addv("holidayList", new ArrayList<>()).addv("notApplyTimeList", new ArrayList<>()));
|
return Result.success(NutMap.NEW().addv("filterHolidays", false).addv("holidayList", new ArrayList<>()).addv("notApplyTimeList", new ArrayList<>()).addv("termStartDate", "").addv("termEndDate", ""));
|
||||||
}
|
}
|
||||||
List<String> holidayList = new ArrayList<>();
|
List<String> holidayList = new ArrayList<>();
|
||||||
if (Boolean.TRUE.equals(info.getFilterHolidays())) {
|
if (Boolean.TRUE.equals(info.getFilterHolidays())) {
|
||||||
@@ -713,7 +713,9 @@ public class SiteCugApplyController {
|
|||||||
return Result.success(NutMap.NEW()
|
return Result.success(NutMap.NEW()
|
||||||
.addv("filterHolidays", Boolean.TRUE.equals(info.getFilterHolidays()))
|
.addv("filterHolidays", Boolean.TRUE.equals(info.getFilterHolidays()))
|
||||||
.addv("holidayList", holidayList)
|
.addv("holidayList", holidayList)
|
||||||
.addv("notApplyTimeList", info.getNotApplyTimeList() == null ? new ArrayList<>() : info.getNotApplyTimeList()));
|
.addv("notApplyTimeList", info.getNotApplyTimeList() == null ? new ArrayList<>() : info.getNotApplyTimeList())
|
||||||
|
.addv("termStartDate", info.getTermStartDate() != null ? info.getTermStartDate() : "")
|
||||||
|
.addv("termEndDate", info.getTermEndDate() != null ? info.getTermEndDate() : ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<SiteCugApply> buildYearlyApplyList(SiteCugApply apply) {
|
private List<SiteCugApply> buildYearlyApplyList(SiteCugApply apply) {
|
||||||
|
|||||||
@@ -73,6 +73,16 @@ public class SiteCugInfo extends BaseModel {
|
|||||||
@ColDefine(type = ColType.INT)
|
@ColDefine(type = ColType.INT)
|
||||||
private Integer sexLimit;
|
private Integer sexLimit;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("本学期开始时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String termStartDate;
|
||||||
|
|
||||||
|
@Column
|
||||||
|
@Comment("本学期结束时间")
|
||||||
|
@ColDefine(type = ColType.VARCHAR, width = 20)
|
||||||
|
private String termEndDate;
|
||||||
|
|
||||||
@Column
|
@Column
|
||||||
@Comment("场地的禁用时间")
|
@Comment("场地的禁用时间")
|
||||||
@ColDefine(type = ColType.MYSQL_JSON)
|
@ColDefine(type = ColType.MYSQL_JSON)
|
||||||
|
|||||||
@@ -239,6 +239,12 @@ const basicForm = {
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="手机号" prop="courseInstructorMobile">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
<el-input size="small" v-model="row.courseInstructorMobile" placeholder="请输入手机号"></el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="分类标识" prop="assort">
|
<el-table-column label="分类标识" prop="assort">
|
||||||
<template v-slot="{row}">
|
<template v-slot="{row}">
|
||||||
<el-input size="small" v-model="row.assort" placeholder="请输入分类标识"></el-input>
|
<el-input size="small" v-model="row.assort" placeholder="请输入分类标识"></el-input>
|
||||||
@@ -328,7 +334,7 @@ const basicForm = {
|
|||||||
formData: {
|
formData: {
|
||||||
notice: false,
|
notice: false,
|
||||||
courseList: [
|
courseList: [
|
||||||
{ orderNum: 1, courseName: "", courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false },
|
{ orderNum: 1, courseName: "", courseInstructorMobile: "", courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false },
|
||||||
],
|
],
|
||||||
conditionStructure: {
|
conditionStructure: {
|
||||||
method: "AND",
|
method: "AND",
|
||||||
@@ -462,7 +468,7 @@ const basicForm = {
|
|||||||
this.formData.courseList = this.formData.courseList.sort((a, b) => a.orderNum - b.orderNum)
|
this.formData.courseList = this.formData.courseList.sort((a, b) => a.orderNum - b.orderNum)
|
||||||
},
|
},
|
||||||
addCourse() {
|
addCourse() {
|
||||||
this.formData.courseList.push({ courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false })
|
this.formData.courseList.push({ courseInstructorMobile: "", courseTimeList: [], isMobileSign: false, isReceiveGift: false, reserveMode: 1, courseIsLimitApply: false })
|
||||||
},
|
},
|
||||||
async historicalActChange(val) {
|
async historicalActChange(val) {
|
||||||
const resp = await this.$axios.post("/platform/trainSignUp/manage/findOne", {id: val})
|
const resp = await this.$axios.post("/platform/trainSignUp/manage/findOne", {id: val})
|
||||||
@@ -572,6 +578,10 @@ const basicForm = {
|
|||||||
this.$message.warning("第" + (i + 1) + "行信息填写有误,请核查")
|
this.$message.warning("第" + (i + 1) + "行信息填写有误,请核查")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if (v.courseInstructorMobile && !/^1[3-9]\d{9}$/.test(v.courseInstructorMobile)) {
|
||||||
|
this.$message.warning("第" + (i + 1) + "行手机号格式填写有误,请核查")
|
||||||
|
return true
|
||||||
|
}
|
||||||
if (v.isMobileSign === true && v.signType === 3 && (v.courseLocationCoordinates === undefined || v.courseLocationCoordinates.length < 2)) {
|
if (v.isMobileSign === true && v.signType === 3 && (v.courseLocationCoordinates === undefined || v.courseLocationCoordinates.length < 2)) {
|
||||||
this.$message.warning("第" + (i + 1) + "行地点坐标填写有误,请核查")
|
this.$message.warning("第" + (i + 1) + "行地点坐标填写有误,请核查")
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="150px">
|
<el-table-column label="操作" width="150px">
|
||||||
<template v-slot="{row}">
|
<template v-slot="{row}">
|
||||||
<el-button @click="handleUser(row.userId)" size="mini" type="danger" v-if="!row.isDisabled">拉黑</el-button>
|
<el-button @click="handleUser(row.userId)" size="mini" type="danger" v-if="!row.isDisabled">冻结</el-button>
|
||||||
<el-button @click="handleUser(row.userId)" size="mini" type="success" v-if="row.isDisabled">解封</el-button>
|
<el-button @click="handleUser(row.userId)" size="mini" type="success" v-if="row.isDisabled">解封</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@@ -222,6 +222,8 @@ const apply = {
|
|||||||
filterHolidays: false,
|
filterHolidays: false,
|
||||||
holidayList: [],
|
holidayList: [],
|
||||||
notApplyTimeList: [],
|
notApplyTimeList: [],
|
||||||
|
termStartDate: '',
|
||||||
|
termEndDate: '',
|
||||||
},
|
},
|
||||||
availabilityData: {
|
availabilityData: {
|
||||||
date: '',
|
date: '',
|
||||||
@@ -513,6 +515,8 @@ const apply = {
|
|||||||
filterHolidays: !!this.row.filterHolidays,
|
filterHolidays: !!this.row.filterHolidays,
|
||||||
holidayList: [],
|
holidayList: [],
|
||||||
notApplyTimeList: Array.isArray(this.row.notApplyTimeList) ? this.row.notApplyTimeList : [],
|
notApplyTimeList: Array.isArray(this.row.notApplyTimeList) ? this.row.notApplyTimeList : [],
|
||||||
|
termStartDate: this.row.termStartDate || '',
|
||||||
|
termEndDate: this.row.termEndDate || '',
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await this.$axios.post('/platform/siteCug/apply/timeLimitConfig', {
|
const res = await this.$axios.post('/platform/siteCug/apply/timeLimitConfig', {
|
||||||
@@ -523,6 +527,8 @@ const apply = {
|
|||||||
filterHolidays: !!res.data.filterHolidays,
|
filterHolidays: !!res.data.filterHolidays,
|
||||||
holidayList: Array.isArray(res.data.holidayList) ? res.data.holidayList : [],
|
holidayList: Array.isArray(res.data.holidayList) ? res.data.holidayList : [],
|
||||||
notApplyTimeList: Array.isArray(res.data.notApplyTimeList) ? res.data.notApplyTimeList : [],
|
notApplyTimeList: Array.isArray(res.data.notApplyTimeList) ? res.data.notApplyTimeList : [],
|
||||||
|
termStartDate: res.data.termStartDate || '',
|
||||||
|
termEndDate: res.data.termEndDate || '',
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.timeLimitConfig = fallback
|
this.timeLimitConfig = fallback
|
||||||
@@ -599,6 +605,9 @@ const apply = {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.formRef?.clearValidate(['applyUnionName', 'clubId'])
|
this.$refs.formRef?.clearValidate(['applyUnionName', 'clubId'])
|
||||||
})
|
})
|
||||||
|
this.pickerRefreshKey += 1
|
||||||
|
this.scheduleDate = this.getInitialScheduleDate()
|
||||||
|
await this.queryAvailability(this.scheduleDate)
|
||||||
},
|
},
|
||||||
async loadManagedClubs() {
|
async loadManagedClubs() {
|
||||||
try {
|
try {
|
||||||
@@ -671,6 +680,11 @@ const apply = {
|
|||||||
if (currentDay.day() === 0 || currentDay.day() === 6) {
|
if (currentDay.day() === 0 || currentDay.day() === 6) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if (this.formData.reserveType === 'union' && this.timeLimitConfig.termStartDate && this.timeLimitConfig.termEndDate) {
|
||||||
|
if (currentDay.isBefore(this.timeLimitConfig.termStartDate) || currentDay.isAfter(this.timeLimitConfig.termEndDate)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
return this.timeLimitConfig.filterHolidays && this.timeLimitConfig.holidayList.includes(day)
|
return this.timeLimitConfig.filterHolidays && this.timeLimitConfig.holidayList.includes(day)
|
||||||
},
|
},
|
||||||
normalizeTime(timeStr) {
|
normalizeTime(timeStr) {
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
<el-tab-pane label="设置场地" name="siteSetting">
|
<el-tab-pane label="设置场地" name="siteSetting">
|
||||||
<el-row :gutter="20" type="flex">
|
<el-row :gutter="20" type="flex">
|
||||||
<el-col :span="12">
|
<el-col :span="8">
|
||||||
<el-form-item prop="state" label="开启状态">
|
<el-form-item prop="state" label="开启状态">
|
||||||
<el-radio-group v-model="formData.state" size="medium">
|
<el-radio-group v-model="formData.state" size="medium">
|
||||||
<el-radio-button :label="true">开启</el-radio-button>
|
<el-radio-button :label="true">开启</el-radio-button>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="8">
|
||||||
<el-form-item prop="sexLimit" label="性别限制">
|
<el-form-item prop="sexLimit" label="性别限制">
|
||||||
<el-radio-group v-model="formData.sexLimit" size="medium">
|
<el-radio-group v-model="formData.sexLimit" size="medium">
|
||||||
<el-radio-button :label="0">不限制</el-radio-button>
|
<el-radio-button :label="0">不限制</el-radio-button>
|
||||||
@@ -98,10 +98,23 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="本学期时间">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="formData.termDateRange"
|
||||||
|
type="daterange"
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
style="width: 100%">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="20" type="flex">
|
<el-row :gutter="20" type="flex">
|
||||||
<el-col :span="12">
|
<el-col :span="8">
|
||||||
<el-form-item prop="reserveTimeType" label="预约时间段类型">
|
<el-form-item prop="reserveTimeType" label="预约时间段类型">
|
||||||
<el-radio-group v-model="formData.reserveTimeType" @change="handleReserveTimeTypeChange" size="medium">
|
<el-radio-group v-model="formData.reserveTimeType" @change="handleReserveTimeTypeChange" size="medium">
|
||||||
<el-radio-button :label="1">分段预约</el-radio-button>
|
<el-radio-button :label="1">分段预约</el-radio-button>
|
||||||
@@ -109,7 +122,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="8">
|
||||||
<el-form-item prop="filterHolidays" label="排除节假日">
|
<el-form-item prop="filterHolidays" label="排除节假日">
|
||||||
<el-radio-group v-model="formData.filterHolidays" size="medium">
|
<el-radio-group v-model="formData.filterHolidays" size="medium">
|
||||||
<el-radio-button :label="true">是</el-radio-button>
|
<el-radio-button :label="true">是</el-radio-button>
|
||||||
@@ -117,7 +130,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="8">
|
||||||
<el-form-item label="禁用时间">
|
<el-form-item label="禁用时间">
|
||||||
<el-button type="primary" @click="openSetUpTime" size="small">点击设置禁用时间</el-button>
|
<el-button type="primary" @click="openSetUpTime" size="small">点击设置禁用时间</el-button>
|
||||||
<span style="color: #c64120">您已设置{{ formData.notApplyTimeList ? formData.notApplyTimeList.length : 0 }}个禁用时间</span>
|
<span style="color: #c64120">您已设置{{ formData.notApplyTimeList ? formData.notApplyTimeList.length : 0 }}个禁用时间</span>
|
||||||
@@ -325,6 +338,7 @@
|
|||||||
formData: {
|
formData: {
|
||||||
state: true,
|
state: true,
|
||||||
sexLimit: 0,
|
sexLimit: 0,
|
||||||
|
termDateRange: [],
|
||||||
filterHolidays: false,
|
filterHolidays: false,
|
||||||
reserveTimeType: 1,
|
reserveTimeType: 1,
|
||||||
openHours: [{ startTime: '', endTime: '', timeUnit: 30 }],
|
openHours: [{ startTime: '', endTime: '', timeUnit: 30 }],
|
||||||
@@ -408,6 +422,14 @@
|
|||||||
} else {
|
} else {
|
||||||
submitData.openHours = [clone(this.fullDayOpenHourCache || { startTime: '', endTime: '', timeUnit: 60 })]
|
submitData.openHours = [clone(this.fullDayOpenHourCache || { startTime: '', endTime: '', timeUnit: 60 })]
|
||||||
}
|
}
|
||||||
|
if (Array.isArray(submitData.termDateRange) && submitData.termDateRange.length === 2) {
|
||||||
|
submitData.termStartDate = submitData.termDateRange[0]
|
||||||
|
submitData.termEndDate = submitData.termDateRange[1]
|
||||||
|
} else {
|
||||||
|
submitData.termStartDate = ''
|
||||||
|
submitData.termEndDate = ''
|
||||||
|
}
|
||||||
|
delete submitData.termDateRange
|
||||||
return submitData
|
return submitData
|
||||||
},
|
},
|
||||||
initOpenHoursCache() {
|
initOpenHoursCache() {
|
||||||
@@ -654,11 +676,17 @@
|
|||||||
if (!this.formData.fullDayOpenHour) {
|
if (!this.formData.fullDayOpenHour) {
|
||||||
this.$set(this.formData, 'fullDayOpenHour', { startTime: '', endTime: '', timeUnit: 30 })
|
this.$set(this.formData, 'fullDayOpenHour', { startTime: '', endTime: '', timeUnit: 30 })
|
||||||
}
|
}
|
||||||
|
if (this.formData.termStartDate && this.formData.termEndDate) {
|
||||||
|
this.$set(this.formData, 'termDateRange', [this.formData.termStartDate, this.formData.termEndDate])
|
||||||
|
} else {
|
||||||
|
this.$set(this.formData, 'termDateRange', [])
|
||||||
|
}
|
||||||
this.initOpenHoursCache()
|
this.initOpenHoursCache()
|
||||||
} else {
|
} else {
|
||||||
this.formData = {
|
this.formData = {
|
||||||
state: true,
|
state: true,
|
||||||
sexLimit: 0,
|
sexLimit: 0,
|
||||||
|
termDateRange: [],
|
||||||
filterHolidays: false,
|
filterHolidays: false,
|
||||||
reserveTimeType: 1,
|
reserveTimeType: 1,
|
||||||
openHours: [{ startTime: '', endTime: '', timeUnit: 30 }],
|
openHours: [{ startTime: '', endTime: '', timeUnit: 30 }],
|
||||||
@@ -698,6 +726,11 @@
|
|||||||
if (!this.formData.fullDayOpenHour) {
|
if (!this.formData.fullDayOpenHour) {
|
||||||
this.$set(this.formData, 'fullDayOpenHour', { startTime: '', endTime: '', timeUnit: 30 })
|
this.$set(this.formData, 'fullDayOpenHour', { startTime: '', endTime: '', timeUnit: 30 })
|
||||||
}
|
}
|
||||||
|
if (this.formData.termStartDate && this.formData.termEndDate) {
|
||||||
|
this.$set(this.formData, 'termDateRange', [this.formData.termStartDate, this.formData.termEndDate])
|
||||||
|
} else {
|
||||||
|
this.$set(this.formData, 'termDateRange', [])
|
||||||
|
}
|
||||||
this.initOpenHoursCache()
|
this.initOpenHoursCache()
|
||||||
}
|
}
|
||||||
if (!stayOnPage) {
|
if (!stayOnPage) {
|
||||||
|
|||||||
@@ -586,6 +586,7 @@ layout("/layouts/platform.html"){
|
|||||||
</el-form>
|
</el-form>
|
||||||
<el-row type="flex" justify="end" class="mt20">
|
<el-row type="flex" justify="end" class="mt20">
|
||||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||||
|
<el-button type="primary" plain @click="onNextStep" v-if="showInvoiceTab && activeTabName === 'basic'">下一步</el-button>
|
||||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||||
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
<el-button type="primary" @click="onFinishTask" v-else>提交</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -1285,6 +1286,12 @@ layout("/layouts/platform.html"){
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 下一步
|
||||||
|
onNextStep() {
|
||||||
|
this.rebuildInvoiceSummary()
|
||||||
|
this.normalizeFundBalance()
|
||||||
|
this.activeTabName = "invoice"
|
||||||
|
},
|
||||||
// 提交验证
|
// 提交验证
|
||||||
validateBeforeSubmit() {
|
validateBeforeSubmit() {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<!--#
|
<!--#
|
||||||
layout("/layouts/platform.html"){
|
layout("/layouts/platform.html"){
|
||||||
#-->
|
#-->
|
||||||
<div id="app" v-cloak>
|
<div id="app" v-cloak>
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ layout("/layouts/platform_h5.html"){
|
|||||||
<table-column label="校区">{{row.campus}}</table-column>
|
<table-column label="校区">{{row.campus}}</table-column>
|
||||||
<table-column label="地点">{{row.courseLocation}}</table-column>
|
<table-column label="地点">{{row.courseLocation}}</table-column>
|
||||||
<table-column label="联系人">{{row.courseInstructor}}</table-column>
|
<table-column label="联系人">{{row.courseInstructor}}</table-column>
|
||||||
|
<table-column v-if="row.courseInstructorMobile" label="联系方式">{{row.courseInstructorMobile}}</table-column>
|
||||||
<table-column label="时间">
|
<table-column label="时间">
|
||||||
<span v-if="row.courseTimes && row.courseTimes.length === 1" class="primary-color" @click="onTime(row)">
|
<span v-if="row.courseTimes && row.courseTimes.length === 1" class="primary-color" @click="onTime(row)">
|
||||||
{{ weekdayCNMap[$moment(row.courseTimes[0].courseDate).day()]
|
{{ weekdayCNMap[$moment(row.courseTimes[0].courseDate).day()]
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ new Vue({
|
|||||||
filterHolidays: false,
|
filterHolidays: false,
|
||||||
holidayList: [],
|
holidayList: [],
|
||||||
notApplyTimeList: [],
|
notApplyTimeList: [],
|
||||||
|
termStartDate: '',
|
||||||
|
termEndDate: '',
|
||||||
},
|
},
|
||||||
availabilityData: {
|
availabilityData: {
|
||||||
date: '',
|
date: '',
|
||||||
@@ -282,7 +284,6 @@ new Vue({
|
|||||||
this.formData.applyUnionName = user.union ? user.union.name : ''
|
this.formData.applyUnionName = user.union ? user.union.name : ''
|
||||||
this.formData.clubId = ''
|
this.formData.clubId = ''
|
||||||
this.formData.clubName = ''
|
this.formData.clubName = ''
|
||||||
return
|
|
||||||
}
|
}
|
||||||
if (value === 'club') {
|
if (value === 'club') {
|
||||||
this.formData.applyUnionId = ''
|
this.formData.applyUnionId = ''
|
||||||
@@ -291,6 +292,9 @@ new Vue({
|
|||||||
this.formData.clubName = ''
|
this.formData.clubName = ''
|
||||||
await this.loadManagedClubs()
|
await this.loadManagedClubs()
|
||||||
}
|
}
|
||||||
|
this.scheduleDate = this.getInitialScheduleDate()
|
||||||
|
this.schedulePickerDate = this.$moment(this.scheduleDate, 'YYYY-MM-DD').toDate()
|
||||||
|
await this.queryAvailability(this.scheduleDate)
|
||||||
},
|
},
|
||||||
async loadManagedClubs() {
|
async loadManagedClubs() {
|
||||||
try {
|
try {
|
||||||
@@ -710,6 +714,11 @@ new Vue({
|
|||||||
if (currentDay.day() === 0 || currentDay.day() === 6) {
|
if (currentDay.day() === 0 || currentDay.day() === 6) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if (this.formData.reserveType === 'union' && this.timeLimitConfig.termStartDate && this.timeLimitConfig.termEndDate) {
|
||||||
|
if (currentDay.isBefore(this.timeLimitConfig.termStartDate) || currentDay.isAfter(this.timeLimitConfig.termEndDate)) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
return this.timeLimitConfig.filterHolidays && this.timeLimitConfig.holidayList.includes(day)
|
return this.timeLimitConfig.filterHolidays && this.timeLimitConfig.holidayList.includes(day)
|
||||||
},
|
},
|
||||||
getDisabledRangesByDay(dayStr) {
|
getDisabledRangesByDay(dayStr) {
|
||||||
@@ -924,6 +933,8 @@ new Vue({
|
|||||||
filterHolidays: !!this.row.filterHolidays,
|
filterHolidays: !!this.row.filterHolidays,
|
||||||
holidayList: [],
|
holidayList: [],
|
||||||
notApplyTimeList: Array.isArray(this.row.notApplyTimeList) ? this.row.notApplyTimeList : [],
|
notApplyTimeList: Array.isArray(this.row.notApplyTimeList) ? this.row.notApplyTimeList : [],
|
||||||
|
termStartDate: this.row.termStartDate || '',
|
||||||
|
termEndDate: this.row.termEndDate || '',
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await this.$axios.post('/platform/siteCug/apply/timeLimitConfig', {
|
const res = await this.$axios.post('/platform/siteCug/apply/timeLimitConfig', {
|
||||||
@@ -934,6 +945,8 @@ new Vue({
|
|||||||
filterHolidays: !!res.data.filterHolidays,
|
filterHolidays: !!res.data.filterHolidays,
|
||||||
holidayList: Array.isArray(res.data.holidayList) ? res.data.holidayList : [],
|
holidayList: Array.isArray(res.data.holidayList) ? res.data.holidayList : [],
|
||||||
notApplyTimeList: Array.isArray(res.data.notApplyTimeList) ? res.data.notApplyTimeList : [],
|
notApplyTimeList: Array.isArray(res.data.notApplyTimeList) ? res.data.notApplyTimeList : [],
|
||||||
|
termStartDate: res.data.termStartDate || '',
|
||||||
|
termEndDate: res.data.termEndDate || '',
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user