From f4744cf0f465478f06a9ebbc2e4966bf096a06e2 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 03 四月 2025 18:18:13 +0800
Subject: [PATCH] 惠民卡代码

---
 cloud-server-management/src/main/webapp/static/modular/system/worldCup/worldCup_info.js |   50 +++++++++++++++++++++++++++-----------------------
 1 files changed, 27 insertions(+), 23 deletions(-)

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..95dcffd 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
@@ -92,16 +92,13 @@
         return
     }
     if(null == basePeople || '' == basePeople){
-        Feng.error("请填写有效的基础报名人数");
-        return
+        basePeople = 0;
     }
     if(null == participationIntegral || '' == participationIntegral){
-        Feng.error("请填写有效的参赛可获积分");
-        return
+        participationIntegral = 0;
     }
     if(null == winIntegral || '' == winIntegral){
-        Feng.error("请填写有效的胜场可获积分");
-        return
+        winIntegral = 0;
     }
     if(null == address || '' == address){
         Feng.error("请填写有效的比赛地点");
@@ -143,7 +140,6 @@
         '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),
         'startAge': startAge,
         'endAge': endAge,
         'gender': gender,
@@ -165,13 +161,16 @@
         'content': content,
         'stores': JSON.stringify(WorldCupInfo.stores)
     }
+    if(null != registrationClosingTime && '' != registrationClosingTime){
+        data.registrationClosingTime = new Date(registrationClosingTime + " 23:59:59");
+    }
 
     //提交信息
     var ajax = new $ax(Feng.ctxPath + "/worldCup/addWorldCup", function (res) {
         if (res.code==200){
             Feng.success("添加成功!");
             WorldCupInfo.close();
-            window.parent.WorldCup.refresh();
+            window.parent.WorldCup.search();
         }else{
             Feng.error(res.msg);
         }
@@ -255,16 +254,13 @@
         return
     }
     if(null == basePeople || '' == basePeople){
-        Feng.error("请填写有效的基础报名人数");
-        return
+        basePeople = 0;
     }
     if(null == participationIntegral || '' == participationIntegral){
-        Feng.error("请填写有效的参赛可获积分");
-        return
+        participationIntegral = 0;
     }
     if(null == winIntegral || '' == winIntegral){
-        Feng.error("请填写有效的胜场可获积分");
-        return
+        winIntegral = 0;
     }
     if(null == address || '' == address){
         Feng.error("请填写有效的比赛地点");
@@ -307,7 +303,6 @@
         '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),
         'startAge': startAge,
         'endAge': endAge,
         'gender': gender,
@@ -329,13 +324,16 @@
         'content': content,
         'stores': JSON.stringify(WorldCupInfo.stores)
     }
+    if(null != registrationClosingTime && '' != registrationClosingTime){
+        data.registrationClosingTime = new Date(registrationClosingTime + " 23:59:59");
+    }
 
     //提交信息
     var ajax = new $ax(Feng.ctxPath + "/worldCup/editWorldCup", function (res) {
         if (res.code==200){
             Feng.success("编辑成功!");
             WorldCupInfo.close();
-            window.parent.WorldCup.refresh();
+            window.parent.WorldCup.search();
         }else{
             Feng.error(res.msg);
         }
@@ -402,16 +400,16 @@
                 $('.cash').hide();
             }
             if(v == 2){
-                $('.classHour').hide();
+                $('.paiCoin').hide();
             }
             if(v == 3){
-                $('.paiCoin').hide();
+                $('.classHour').hide();
             }
         }
 
     });
 
-    if(null != $('#id').val()){
+    if(null != $('#id').val() && '' != $('#id').val()){
         WorldCupInfo.stores = JSON.parse($('#storeInfo').val());
         WorldCupInfo.initStore();
         let lng = $('#longitude').val();
@@ -541,12 +539,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