From 3ecb3c14d3741d864ded3ed0a0a85d7b358f3dc0 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 08 三月 2024 17:38:27 +0800 Subject: [PATCH] 修改bug --- cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupMapper.xml | 4 ++-- cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_edit.html | 1 + cloud-server-management/src/main/webapp/static/modular/system/referee/referee.js | 16 ++++++++-------- cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup.js | 2 +- cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_add.html | 1 + cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_info.html | 1 + cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js | 22 ++++++++++++++-------- 7 files changed, 28 insertions(+), 19 deletions(-) diff --git a/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupMapper.xml b/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupMapper.xml index a295f55..298b62e 100644 --- a/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupMapper.xml +++ b/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupMapper.xml @@ -92,10 +92,10 @@ and `name` like CONCAT('%', #{item.name}, '%') </if> <if test="null != item.startTime and '' != item.startTime"> - and DATE_FORMAT(startTime, '%Y-%m-%d') >= #{item.startTime} + and DATE_FORMAT(startTime, '%Y-%m-%d') = #{item.startTime} </if> <if test="null != item.endTime and '' != item.endTime"> - and DATE_FORMAT(endTime, '%Y-%m-%d') <= #{item.endTime} + and DATE_FORMAT(endTime, '%Y-%m-%d') = #{item.endTime} </if> <if test="null != item.status"> and status= #{item.status} diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_add.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_add.html index 4036fde..33d19cc 100644 --- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_add.html +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_add.html @@ -20,6 +20,7 @@ <div class="ibox-content"> <div class="form-horizontal" id="userInfoForm"> <input type="hidden" id="id" value=""> + <input type="hidden" id="page", value='add'> <div class="row"> <div class="form-group"> <label class="col-sm-3 control-label">*比赛名称:</label> diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_edit.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_edit.html index ff95132..5890a5a 100644 --- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_edit.html +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_edit.html @@ -21,6 +21,7 @@ <div class="form-horizontal" id="userInfoForm"> <input type="hidden" id="id" value="${item.id}"> <input type="hidden" id="storeInfo", value='${stores}'> + <input type="hidden" id="page", value='edit'> <div class="row"> <div class="form-group"> <label class="col-sm-3 control-label">*比赛名称:</label> diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_info.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_info.html index 5943704..d5737b1 100644 --- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_info.html +++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/worldCup/worldCup_info.html @@ -21,6 +21,7 @@ <div class="form-horizontal" id="userInfoForm"> <input type="hidden" id="id" value="${item.id}"> <input type="hidden" id="storeInfo", value='${stores}'> + <input type="hidden" id="page", value='info'> <div class="row"> <div class="form-group"> <label class="col-sm-3 control-label">*比赛名称:</label> diff --git a/cloud-server-management/src/main/webapp/static/modular/system/referee/referee.js b/cloud-server-management/src/main/webapp/static/modular/system/referee/referee.js index 4694b30..a08a483 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/referee/referee.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/referee/referee.js @@ -269,12 +269,12 @@ if (res.code == 200) { Feng.success("删除成功"); layer.closeAll(); - Referee.table.refresh(); + Referee.search(); } else { Feng.error(res.msg); } }, function (data) { - Feng.error("添加失败!" + data.responseJSON.message + "!"); + Feng.error("删除失败!" + data.responseJSON.message + "!"); }); ajax.setData({ 'id': Referee.seItem.id, @@ -296,14 +296,14 @@ var operation = function(){ var ajax = new $ax(Feng.ctxPath + "/referee/updateState", function (res) { if (res.code == 200) { - Feng.success("删除成功"); + Feng.success("解冻成功"); layer.closeAll(); - Referee.table.refresh(); + Referee.search(); } else { Feng.error(res.msg); } }, function (data) { - Feng.error("添加失败!" + data.responseJSON.message + "!"); + Feng.error("解冻失败!" + data.responseJSON.message + "!"); }); ajax.setData({ 'id': Referee.seItem.id, @@ -323,14 +323,14 @@ var operation = function(){ var ajax = new $ax(Feng.ctxPath + "/referee/updateState", function (res) { if (res.code == 200) { - Feng.success("删除成功"); + Feng.success("冻结成功"); layer.closeAll(); - Referee.table.refresh(); + Referee.search(); } else { Feng.error(res.msg); } }, function (data) { - Feng.error("添加失败!" + data.responseJSON.message + "!"); + Feng.error("冻结失败!" + data.responseJSON.message + "!"); }); ajax.setData({ 'id': Referee.seItem.id, diff --git a/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup.js b/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup.js index 92d5ee9..9d178fe 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup.js @@ -14,7 +14,7 @@ return [ {field: 'selectItem', checkbox: true}, {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, - {title: '比赛名字', field: 'name', visible: true, align: 'center', valign: 'middle',width:'20%',}, + {title: '比赛名称', field: 'name', visible: true, align: 'center', valign: 'middle',width:'20%',}, {title: '开始时间', field: 'startTime', visible: true, align: 'center', valign: 'middle',}, {title: '结束时间', field: 'endTime', visible: true, align: 'center', valign: 'middle'}, {title: '报名条件', field: 'age', visible: true, align: 'center', valign: 'middle', diff --git a/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js b/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js index ae905e3..7c2af8b 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js @@ -143,7 +143,7 @@ 'name': name, 'startTime': new Date(startTime + " 00:00:00"), 'endTime': new Date(endTime + " 23:59:59"), - 'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : registrationClosingTime), + 'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : null), 'startAge': startAge, 'endAge': endAge, 'gender': gender, @@ -171,7 +171,7 @@ if (res.code==200){ Feng.success("添加成功!"); WorldCupInfo.close(); - window.parent.WorldCup.refresh(); + window.parent.WorldCup.search(); }else{ Feng.error(res.msg); } @@ -307,7 +307,7 @@ 'name': name, 'startTime': new Date(startTime + " 00:00:00"), 'endTime': new Date(endTime + " 23:59:59"), - 'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : registrationClosingTime), + 'registrationClosingTime': (null != registrationClosingTime && '' != registrationClosingTime ? new Date(registrationClosingTime + " 23:59:59") : null), 'startAge': startAge, 'endAge': endAge, 'gender': gender, @@ -335,7 +335,7 @@ if (res.code==200){ Feng.success("编辑成功!"); WorldCupInfo.close(); - window.parent.WorldCup.refresh(); + window.parent.WorldCup.search(); }else{ Feng.error(res.msg); } @@ -541,12 +541,18 @@ WorldCupInfo.initStore = function (){ let html = ''; + let page = $('#page').val(); for (let i = 0; i < WorldCupInfo.stores.length; i++) { let item = WorldCupInfo.stores[i]; - html += '<tr><td>' + item.province + '</td><td>' + (typeof item.operator == "undefined" ? "" : item.operator) + '</td><td>' + item.name + '</td><td><button style="height: 30px;\n' + - ' line-height: 30px;\n' + - ' font-size: 14px;\n' + - ' width: 50px" onclick="WorldCupInfo.delStore(' + item.id + ')">删除</button></td></tr>' + html += '<tr><td>' + item.province + '</td><td>' + (typeof item.operator == "undefined" ? "" : item.operator) + '</td><td>' + item.name + '</td>'; + if("info" != page){ + html += '<td><button style="height: 30px;\n' + + ' line-height: 30px;\n' + + ' font-size: 14px;\n' + + ' width: 50px" onclick="WorldCupInfo.delStore(' + item.id + ')">删除</button></td></tr>' + }else{ + html += '</tr>'; + } } $('#stores tbody').html(html); } -- Gitblit v1.7.1