|
@@ -374,82 +374,96 @@ $(document).ready(function(){
|
|
|
});
|
|
|
}
|
|
|
//默认广告位
|
|
|
- //清空表格
|
|
|
- var table = document.getElementById('uploadTable');
|
|
|
- var rowCount=table.rows.length;
|
|
|
- for (i=1;i<rowCount;i++){
|
|
|
- table.deleteRow(i);
|
|
|
- rowCount=rowCount-1;
|
|
|
- i=i-1;
|
|
|
- }
|
|
|
- //取值
|
|
|
- var check_input = [];
|
|
|
- check_input =$(".input-group input[name=position]");
|
|
|
- console.log(check_input);
|
|
|
- var checked_id = "";
|
|
|
- for(i=0;i<check_input.length;i++){
|
|
|
- var p_checked = check_input[i].checked;
|
|
|
- if(check_input[i].checked ==true){
|
|
|
- checked_id = check_input[i].value +","+ checked_id;
|
|
|
- }
|
|
|
- }
|
|
|
- //alert(checked_id);
|
|
|
- var zone_url = ctx+"/advertiser/main/ad/target/operator-ad-group/zonelist?position="+checked_id;
|
|
|
- $.getJSON( zone_url, function(data){
|
|
|
- $.each( data, function( key, val ) {
|
|
|
- $("#uploadTable").append('<tr><td class="all-app-advertiser" onclick="td_click('+val.id+')" value='+val.id+'|'+val.name+' id="td_'+val.id+'">'+val.name+'</td></tr>');
|
|
|
- });
|
|
|
-
|
|
|
- })
|
|
|
+ //清空表格
|
|
|
+ var table = document.getElementById('uploadTable');
|
|
|
+ var rowCount=table.rows.length;
|
|
|
+ for (i=1;i<rowCount;i++){
|
|
|
+ table.deleteRow(i);
|
|
|
+ rowCount=rowCount-1;
|
|
|
+ i=i-1;
|
|
|
+ }
|
|
|
+ //取值
|
|
|
+ var check_input = [];
|
|
|
+ check_input =$(".input-group input[name=position]");
|
|
|
+ console.log(check_input);
|
|
|
+ var checked_id = "";
|
|
|
+ for(i=0;i<check_input.length;i++){
|
|
|
+ var p_checked = check_input[i].checked;
|
|
|
+ if(check_input[i].checked ==true){
|
|
|
+ checked_id = check_input[i].value +","+ checked_id;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var zone_url = ctx+"/advertiser/main/ad/target/operator-ad-group/zonelist?position="+checked_id;
|
|
|
+ $.getJSON( zone_url, function(data){
|
|
|
+ $.each( data, function( key, val ) {
|
|
|
+ $("#uploadTable").append('<tr><td class="all-app-advertiser" onclick="td_click('+val.id+')" value='+val.id+'|'+val.name+' id="td_'+val.id+'">'+val.name+'</td></tr>');
|
|
|
+ });
|
|
|
+
|
|
|
+ })
|
|
|
//选择广告位
|
|
|
- $(".input-group input[name=position]").click(function(){
|
|
|
- //清空表格
|
|
|
- var table = document.getElementById('uploadTable');
|
|
|
- var rowCount=table.rows.length;
|
|
|
- for (i=1;i<rowCount;i++){
|
|
|
- table.deleteRow(i);
|
|
|
- rowCount=rowCount-1;
|
|
|
- i=i-1;
|
|
|
- }
|
|
|
- //取值
|
|
|
- var check_input = [];
|
|
|
- check_input =$(".input-group input[name=position]");
|
|
|
- console.log(check_input);
|
|
|
- //alert(check_input.length);
|
|
|
- var checked_id = "";
|
|
|
- for(i=0;i<check_input.length;i++){
|
|
|
- var p_checked = check_input[i].checked;
|
|
|
- //alert(p_checked+" check_input[i].checked");
|
|
|
- if(check_input[i].checked ==true){
|
|
|
- checked_id = check_input[i].value +","+ checked_id;
|
|
|
- //alert(checked_id);
|
|
|
+ $(".input-group input[name=position]").click(function(){
|
|
|
+ //清空表格
|
|
|
+ var table = document.getElementById('uploadTable');
|
|
|
+ var rowCount=table.rows.length;
|
|
|
+ for (i=1;i<rowCount;i++){
|
|
|
+ table.deleteRow(i);
|
|
|
+ rowCount=rowCount-1;
|
|
|
+ i=i-1;
|
|
|
+ }
|
|
|
+ //取值
|
|
|
+ var check_input = [];
|
|
|
+ check_input =$(".input-group input[name=position]");
|
|
|
+ console.log(check_input);
|
|
|
+ var checked_id = "";
|
|
|
+ for(i=0;i<check_input.length;i++){
|
|
|
+ var p_checked = check_input[i].checked;
|
|
|
+ if(check_input[i].checked ==true){
|
|
|
+ checked_id = check_input[i].value +","+ checked_id;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var zone_url = ctx+"/advertiser/main/ad/target/operator-ad-group/zonelist?position="+checked_id;
|
|
|
+ $.getJSON( zone_url, function(data){
|
|
|
+ $.each( data, function( key, val ) {
|
|
|
+ $("#uploadTable").append('<tr><td class="all-app-advertiser" onclick="td_click('+val.id+')" value='+val.id+'|'+val.name+' id="td_'+val.id+'">'+val.name+'</td></tr>');
|
|
|
+ });
|
|
|
+
|
|
|
+ })
|
|
|
+ })
|
|
|
+ //数据场景或分组
|
|
|
+ $(".input-group input[name=aa]").click(function(){
|
|
|
+ $(".input-checkboxsDiv").html("");
|
|
|
+ var check_input = [];
|
|
|
+ check_input =$(".input-group input[name=aa]");
|
|
|
+ console.log(check_input);
|
|
|
+ var checked_id = "";
|
|
|
+ for(i=0;i<check_input.length;i++){
|
|
|
+ var p_checked = check_input[i].checked;
|
|
|
+ if(check_input[i].checked ==true){
|
|
|
+ checked_id = check_input[i].value;
|
|
|
+ }
|
|
|
+ if(checked_id==1){
|
|
|
+ var zone_url_place = ctx+"/advertiser/main/ad/target/operator-ad-group/palceList";
|
|
|
+ $.getJSON( zone_url_place, function(data){
|
|
|
+ $.each( data, function( key, val ) {
|
|
|
+ //alert(val.name);
|
|
|
+ $(".input-checkboxsDiv").append('<div class="single_div"><input class="single_div_checkbox" name="place" type="checkbox" value="'+val.id+'"><span class="single_div_span">'+val.name+'</span></div>');
|
|
|
+ });
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if(checked_id==2){
|
|
|
+ var zone_url_adgroup = ctx+"/advertiser/main/ad/target/operator-ad-group/wifiGroupInfoList";
|
|
|
+ $.getJSON( zone_url_adgroup, function(data){
|
|
|
+ $.each( data, function( key, val ) {
|
|
|
+ //alert(val.name);
|
|
|
+ $(".input-checkboxsDiv").append('<div class="single_div"><input class="single_div_checkbox" name="ad_groud_ed" type="checkbox" value="'+val.id+'"><span class="single_div_span">'+val.name+'</span></div>');
|
|
|
+ });
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- //alert(checked_id);
|
|
|
-
|
|
|
- var zone_url = ctx+"/advertiser/main/ad/target/operator-ad-group/zonelist?position="+checked_id;
|
|
|
- //if(check_input=='checked'){
|
|
|
- //document.getElementById('uploadTable').rows[];
|
|
|
- //var array_table = document.getElementById("zone_tr");
|
|
|
- //alert(array_table.length);
|
|
|
- //for(i=0;i<array_table.length;i++){
|
|
|
- // $("#zone_tr").remove();
|
|
|
- //}
|
|
|
|
|
|
-
|
|
|
- $.getJSON( zone_url, function(data){
|
|
|
- // alert(data.positionList);
|
|
|
- $.each( data, function( key, val ) {
|
|
|
- //alert(val.name);
|
|
|
- $("#uploadTable").append('<tr><td class="all-app-advertiser" onclick="td_click('+val.id+')" value='+val.id+'|'+val.name+' id="td_'+val.id+'">'+val.name+'</td></tr>');
|
|
|
- });
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- //}
|
|
|
- })
|
|
|
-
|
|
|
-
|
|
|
+ })
|
|
|
//位置
|
|
|
if($(".position-edit").html()){
|
|
|
var position = $("#edit-position").val();
|