From 7e7f901b2172281dc294dfbc67e6ad00625f09f4 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期一, 04 三月 2024 10:11:21 +0800 Subject: [PATCH] 合并代码 --- cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCompetition_info.js | 83 ++++++++++++++++++++++++++++------------- 1 files changed, 57 insertions(+), 26 deletions(-) diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCompetition_info.js b/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCompetition_info.js index 726d69e..bc9e345 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCompetition_info.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/tCompetition/tCompetition_info.js @@ -103,16 +103,17 @@ } TCarInfoDlg.oneChange9 = function (e) { - console.log(111) var oneId=$(e).val(); - var elementById = document.getElementById("pt"); + var elementById = document.getElementById("radio1"); var operatorId; - if (elementById.checked){ - operatorId = 0 - }else{ + if (elementById !== null) { operatorId = $("#account").val() + if (elementById.checked){ + operatorId = $("#account").val() + }else{ + operatorId = 0 + } } - var ajax = new $ax(Feng.ctxPath + "/tShop/getCityYys", function(data){ if(data!=null){ if(language==1){ @@ -205,25 +206,50 @@ * 提交添加 */ TCarInfoDlg.addSubmit = function() { - this.clearData(); this.collectData(); if(!this.validate()){ return ; } - - - - var pCode = $("#pCode").val(); - if(pCode==""){ - Feng.info("请选择省"); - return; + var pCode; + var cCode; + var elementById = document.getElementById("radio1"); + console.log("看看标签") + console.log(elementById) + if (elementById!=null){ + if (!elementById.checked){ + console.log("选中平台") + console.log($("#pCode1").val()) + console.log($("#cCode1").val()) + // 选中平台赛事 + pCode = $("#pCode1").val(); + if($("#pCode1").val()==""){ + Feng.info("请选择省"); + return; + } + cCode = $("#cCode1").val(); + if($("#cCode1").val()==""){ + Feng.info("请选择市"); + return; + } + }else{ + console.log("选中运营商") + console.log($("#pCode").val()) + console.log($("#cCode").val()) + // 选中运营商赛事 + pCode = $("#pCode").val(); + if(pCode==""){ + Feng.info("请选择省"); + return; + } + cCode = $("#cCode").val(); + if(cCode==""){ + Feng.info("请选择市"); + return; + } } - var cCode = $("#cCode").val(); - if(cCode==""){ - Feng.info("请选择市"); - return; } + var shopId = $("#shopId").val(); if(shopId==""){ @@ -563,13 +589,19 @@ TCarInfoDlg.oneChangeYys = function(e){ - - var oneId= $("input[name='pt']:checked").val() - - console.log("===========oneId=========="+oneId) + var oneId= $(e).val() var SelectValue=""; - if(SelectValue=='0' ){ + if(oneId=='0' ){ oneId=0 + console.log("隐藏") + $("#yys1").hide(); + $("#t1").hide(); + $("#account").hide(); + }else{ + console.log("展示") + $("#yys1").show(); + $("#t1").show(); + $("#account").show(); } // var ajax = new $ax(Feng.ctxPath + "/tSite/getChangeOne", function(data){ // if(data!=null){ @@ -609,9 +641,8 @@ ajax.start(); - if (typeof(oneId) == "undefined"){ + if (oneId == "1"){ console.log("===============") - var button = document.getElementById("account"); button.removeAttribute("disabled"); @@ -749,7 +780,7 @@ var marker; //搜索地图 TCarInfoDlg.searchByStationName = function(e,type){ - var keyword="成都"; + var keyword=""; if(type==2){ keyword = $(e).parent().prev().find("input").val(); }else { -- Gitblit v1.7.1