|
|
@@ -74,9 +74,9 @@
|
|
|
exportUrl: prefix + "/export",
|
|
|
modalName: "赛事",
|
|
|
columns: [
|
|
|
- /* {
|
|
|
- checkbox: false
|
|
|
- },*/
|
|
|
+ /* {
|
|
|
+ checkbox: false
|
|
|
+ },*/
|
|
|
{
|
|
|
field: 'id',
|
|
|
title: 'id',
|
|
|
@@ -113,13 +113,13 @@
|
|
|
field: 'applyBeforeTime',
|
|
|
title: '取消报名截至时间',
|
|
|
formatter: function (value, row, index) {
|
|
|
- return "赛事开始前"+value+"小时";
|
|
|
+ return "赛事开始前" + value + "小时";
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
field: 'competitionExpense',
|
|
|
title: '报名费用'
|
|
|
- },{
|
|
|
+ }, {
|
|
|
field: 'viewingTicket',
|
|
|
title: '观看费用'
|
|
|
},
|
|
|
@@ -139,9 +139,9 @@
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + publisFlag + '" href="javascript:void(0)" onclick="publish(\'' + row.id + '\', \'' + row.competitionTitle + '\', \'' + row.applyStartTime + '\', \'' + row.applyBeforeTime + '\', \'' + row.applyEndTime + '\')"><i class="fa fa-edit"></i>发布</a> ')
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.editToSet(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
|
|
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
|
|
- } else if(row.competitionState === 'competiton_state_4'){
|
|
|
+ } else if (row.competitionState === 'competiton_state_4') {
|
|
|
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="getTakePartList(\'' + row.id + '\')"><i class="fa fa-edit"></i>参赛名单</a> ')
|
|
|
}
|
|
|
|
|
|
@@ -152,13 +152,13 @@
|
|
|
$.table.init(options);
|
|
|
});
|
|
|
|
|
|
- function getTakePartList(id){
|
|
|
- $.modal.open("参赛人员名单", prefix+"/openDetails/"+id);
|
|
|
+ function getTakePartList(id) {
|
|
|
+ $.modal.open("参赛人员名单", prefix + "/openDetails/" + id);
|
|
|
}
|
|
|
|
|
|
- function publish(id, dataName, applyStartTime, applyBeforeTime, applyEndTime){
|
|
|
+ function publish(id, dataName, applyStartTime, applyBeforeTime, applyEndTime) {
|
|
|
table.set();
|
|
|
- $.modal.confirm("确定发布该条" + dataName + "信息吗?<br/>发布后赛事信息无法修改!", function() {
|
|
|
+ $.modal.confirm("确定发布该条" + dataName + "信息吗?<br/>发布后赛事信息无法修改!", function () {
|
|
|
var url = $.common.isEmpty(id) ? table.options.publishUrl : table.options.publishUrl.replace("{id}", id);
|
|
|
if (table.options.type == table_type.bootstrapTreeTable) {
|
|
|
debugger
|
|
|
@@ -172,12 +172,17 @@
|
|
|
var allowPublishTime = new Date(startTime.getTime() - beforeTimeMs);
|
|
|
// 获取当前时间
|
|
|
var currentTime = new Date();
|
|
|
- if(startTime <= currentTime){
|
|
|
+ if (startTime <= currentTime) {
|
|
|
$.modal.alertError("赛事开始时间早于当前时间, 请先修改赛事开始时间!")
|
|
|
- }else if(allowPublishTime <= currentTime){
|
|
|
+ } else if (allowPublishTime <= currentTime) {
|
|
|
$.modal.alertError("取消报名时间早于当前时间, 请先修改取消报名时间!")
|
|
|
- }else if(allowPublishTime > currentTime){
|
|
|
- var data = { "id": id , "applyStartTime": formatApplyStartTime(startTime), "allowPublishTime": (startTime.getTime() - beforeTimeMs)/1000, "applyEndTime":formatApplyStartTime(new Date(applyEndTime))};
|
|
|
+ } else if (allowPublishTime > currentTime) {
|
|
|
+ var data = {
|
|
|
+ "id": id,
|
|
|
+ "applyStartTime": formatApplyStartTime(startTime),
|
|
|
+ "allowPublishTime": (startTime.getTime() - beforeTimeMs) / 1000,
|
|
|
+ "applyEndTime": formatApplyStartTime(new Date(applyEndTime))
|
|
|
+ };
|
|
|
$.operate.submit(url, "post", "json", data);
|
|
|
}
|
|
|
}
|