|
@@ -0,0 +1,1192 @@
|
|
|
+
|
|
|
+<!DOCTYPE html>
|
|
|
+<head>
|
|
|
+ <link rel="stylesheet" type="text/css" href="${ctx}/assets/css/public-head.css"/>
|
|
|
+ <link rel="stylesheet" href="${ctx}/assets/css/create.css"/>
|
|
|
+ <link rel="stylesheet" href="${ctx}/assets/css/daterangepicker.css" />
|
|
|
+ <link rel="stylesheet" type="text/css" href="${ctx}/assets/css/style.css">
|
|
|
+ <link rel="stylesheet" type="text/css" href="${ctx}/assets/css/geo.css">
|
|
|
+ <link rel="stylesheet" type="text/css" href="${ctx}/assets/css/regionReport.css">
|
|
|
+ <link rel="stylesheet" href="${ctx}/assets/css/font-awesome.min.css"/>
|
|
|
+ <link rel="stylesheet" href="${ctx}/assets/css/bootstrap.min.css">
|
|
|
+ <link rel="stylesheet" href="${ctx}/assets/css/banner-template-list.css"/>
|
|
|
+ <link rel="stylesheet" href="${ctx}/assets/css/zbone.css"/>
|
|
|
+
|
|
|
+ <script type="text/javascript" src="${ctx}/assets/js/lib/jquery-1.9.1.min.js"></script>
|
|
|
+ <script type="text/javascript" src="${ctx}/assets/js/lib/jquery.min.js"></script>
|
|
|
+ <script type="text/javascript" src="${ctx}/assets/js/lib/moment.min.js"></script>
|
|
|
+ <script type="text/javascript" src="${ctx}/assets/js/lib/jquery.daterangepicker.js"></script>
|
|
|
+ <script type="text/javascript" src="${ctx}/assets/js/lib/jquery.daterangepicker1.js"></script>
|
|
|
+ <script type="text/javascript" src="${ctx}/assets/js/lib/jquery.validate.min.js"></script>
|
|
|
+ <script type="text/javascript" src="${ctx}/assets/js/lib/jquery.common.min.js"></script>
|
|
|
+ <script type="text/javascript" src="${ctx}/assets/js/lib/jquery.geo.js"></script>
|
|
|
+ <script type="text/javascript" src="${ctx}/assets/js/lib/areas_popup.js"></script>
|
|
|
+ <script type="text/javascript" src="${ctx}/assets/js/lib/jquery-ui-1.10.4.custom.js"></script>
|
|
|
+ <script type="text/javascript" src="${ctx}/assets/js/lib/jquery.cxselect.js"></script>
|
|
|
+ <script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=2767a619003d806b2dba379e3e023dfd"></script>
|
|
|
+ <script type="text/javascript" src="${ctx}/assets/js/divselect.js"></script>
|
|
|
+
|
|
|
+ <style>
|
|
|
+ #pagecontent{height:1660px;}
|
|
|
+
|
|
|
+ .ui-widget-overlay { background: #aeaeae 50% 50% repeat-y; opacity: .90;filter:Alpha(Opacity=90); position: absolute; top: 0; left: 0; width: 100%; height:460%;;}
|
|
|
+ .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
|
|
|
+ .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
|
|
|
+ .modal-foot{text-algin:center;width:560px;height:40px;}
|
|
|
+ .modal-head{height:25px; }
|
|
|
+ .modal-content{height:380px;}
|
|
|
+ label{font-size:14px;}
|
|
|
+ modal-dialog{backgroud:#ffffff 100% 100% repeat;}
|
|
|
+ #wifitab{float:left;margin-left:10px;}
|
|
|
+ /**搜索和已选wifi列表**/
|
|
|
+ .wifilist{
|
|
|
+ height: 320px;
|
|
|
+ width:320px;
|
|
|
+ display:block;
|
|
|
+ }
|
|
|
+ #wifitabul { margin:0; padding:0; list-style:none; overflow:hidden; float:left;margin-left:0 20px 0 0; width:320px;border-bottom:1px solid #E9E9E9;}
|
|
|
+ #wifitabul li {float:left;line-height:30px;color:#3469E2;border-radius: 5px 5px 0px 0px;display:block;cursor:pointer;width:85px;text-align:center;border:1px solid #E9E9E9;}
|
|
|
+ #wifitabul li a { color:#3469E2; text-decoration:none; }
|
|
|
+ #wifitabul li.current { background-color:#eeeeee;}
|
|
|
+ #wifipage{height:320px;width:360px;}
|
|
|
+ #divLBS{width:900px;height:540px;background-color:#ffffff;}
|
|
|
+ #mapdistance{width:35px;}
|
|
|
+ #divmapsearch{height:35px;}
|
|
|
+ #mapview{width:520px;height:360px;margin-top:10px;}
|
|
|
+ #wifimap{width:520px;height:360px;float:left;}
|
|
|
+ #address{width:180px;}
|
|
|
+ #divselectedwifi{width:320px;margin-top:15px;font-size:14px;}
|
|
|
+ #divsearchedwifi{width:320px;margin-top:15px;font-size:14px;}
|
|
|
+ #prov{width:91px;}
|
|
|
+ #city{width:91px;}
|
|
|
+ #wifitab{height:380px;}
|
|
|
+ #distance{width:80px;}
|
|
|
+ #content{position:absolut;}
|
|
|
+ .pagination-wifi{float:left;margin-left:10px;width:320px;padding-top:10px;}
|
|
|
+ .pagination-mini-wifi{margin:0; padding:0; list-style:none; overflow:hidden; float:left; border:solid 1px #E9E9E9;border-radius: 5px;}
|
|
|
+ .pagination-mini-wifi li{margin:0px; padding:3px; list-style:none; overflow:hidden; float:left; width:20px;height:20px;border:solid 1px #E9E9E9;text-align:center; }
|
|
|
+ #pagecontent{
|
|
|
+ margin-top:42px;
|
|
|
+ }
|
|
|
+ #third{
|
|
|
+ margin-left:-60px;
|
|
|
+ margin-top:-16px;
|
|
|
+ }
|
|
|
+ .control-group{
|
|
|
+ margin-left:-25px;
|
|
|
+ }
|
|
|
+ .time_tit{
|
|
|
+ height:30px;
|
|
|
+ line-height:30px;
|
|
|
+ }
|
|
|
+ .time_tit p{
|
|
|
+ float: left;
|
|
|
+ width: 150px;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #d5d5d5;
|
|
|
+ height:30px;
|
|
|
+ line-height:30px;
|
|
|
+ }
|
|
|
+ .time_add{
|
|
|
+ width: 302px;
|
|
|
+ border: 1px solid;
|
|
|
+ text-align: center;
|
|
|
+ height: 30px;
|
|
|
+ line-height: 30px;
|
|
|
+ border: 1px solid #d5d5d5;
|
|
|
+ }
|
|
|
+ .time_item{
|
|
|
+ height:32px;
|
|
|
+ clear:both;
|
|
|
+ }
|
|
|
+ .tr_data{
|
|
|
+ height:32px;
|
|
|
+ float:left;
|
|
|
+ }
|
|
|
+ .time_box .inp{
|
|
|
+ display:block;
|
|
|
+ float: left;
|
|
|
+ height:30px;
|
|
|
+ line-height:30px;
|
|
|
+ width: 150px;
|
|
|
+ overflow:hidden;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #d5d5d5;
|
|
|
+ }
|
|
|
+ .time_box .inp input{
|
|
|
+ width:150px;
|
|
|
+ height:30px;
|
|
|
+ line-height:30px;
|
|
|
+ text-align:center;
|
|
|
+ border:none;
|
|
|
+ padding:0;
|
|
|
+ overflow:hidden;
|
|
|
+ }
|
|
|
+
|
|
|
+ .time_quantum{
|
|
|
+ width:300px;
|
|
|
+ float:left;
|
|
|
+ margin-top:3px;
|
|
|
+ -moz-border-radius:4px;
|
|
|
+ -webkit-border-radius:4px;
|
|
|
+ border-radius:4px;
|
|
|
+ background-color:#e7eaee;
|
|
|
+ border: solid #d5d5d5 1px;
|
|
|
+ margin-left: 20px;
|
|
|
+ }
|
|
|
+ .time_quantum div p a{
|
|
|
+ color:#4da8e1;
|
|
|
+ font-size:12px;
|
|
|
+ }
|
|
|
+ .time_quantum p{
|
|
|
+ float:right;
|
|
|
+ margin:0 5px 0 0;
|
|
|
+ }
|
|
|
+ .quantum_title{
|
|
|
+ height:26px;
|
|
|
+ line-height:26px;
|
|
|
+ color:#4da8e1;
|
|
|
+ }
|
|
|
+ .quantum_list{
|
|
|
+ overflow:hidden;
|
|
|
+ }
|
|
|
+ .quantum_list p{
|
|
|
+ float:left;
|
|
|
+ width:98px;
|
|
|
+ font-size:12px;
|
|
|
+ color:#4da8e1;
|
|
|
+ border: solid #d5d5d5 1px;
|
|
|
+ text-align:center;
|
|
|
+ padding:0px;
|
|
|
+ margin:0px;
|
|
|
+ height:26px;
|
|
|
+ cursor:pointer;
|
|
|
+ line-height:26px;
|
|
|
+ }
|
|
|
+ .pitchon{
|
|
|
+ background-color:red;
|
|
|
+ background:url(/ssp_web/assets/images/duihao.png) no-repeat right bottom;
|
|
|
+ background-size:16%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn_del{
|
|
|
+ width:90px;
|
|
|
+ height:30px;
|
|
|
+ line-height:30px;
|
|
|
+ border: 1px solid #36aeea;
|
|
|
+ border-radius: 5px;
|
|
|
+ color: #36aeea;
|
|
|
+ background-color: white;
|
|
|
+ margin-left:20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .btn_del:hover{
|
|
|
+ color: white;
|
|
|
+ background-color: #36aeea;
|
|
|
+ }
|
|
|
+ .i1{
|
|
|
+ cursor:text !important;
|
|
|
+ }
|
|
|
+ .btn2:hover{
|
|
|
+ background-color: #4c637b;
|
|
|
+ }
|
|
|
+</style>
|
|
|
+
|
|
|
+<script type="text/javascript">
|
|
|
+
|
|
|
+ $(document).ready(function(){
|
|
|
+
|
|
|
+ $('#id-date-picker-1').dateRangePicker({
|
|
|
+ separator : ' to ',
|
|
|
+ inline:true,
|
|
|
+ container: '#divdaterangepick',
|
|
|
+ alwaysOpen:false
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#city_custom').cxSelect({
|
|
|
+ selects: ['prov', 'city'],
|
|
|
+ required: true,
|
|
|
+ url:'${ctx}/advertiser/main/ad/target/ad-group/getLocations'
|
|
|
+ });
|
|
|
+
|
|
|
+ $( "#btn-toggle" ).click(function( event ) {
|
|
|
+ $( "#divLBS" ).dialog( "open" );
|
|
|
+ try{
|
|
|
+ map = new AMap.Map('mapview',{level:12});
|
|
|
+ if($('#cacheSelected').val().length>2){
|
|
|
+ loadselectwifi(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch(e){alert('加载已选wifi时出错')}
|
|
|
+ map.plugin(['AMap.MarkerClusterer'], function(){
|
|
|
+ var cl = new AMap.MarkerClusterer(map, initMarker($("#cacheSelected")[0]));
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ $( "#divLBS" ).dialog({
|
|
|
+ autoOpen: false,
|
|
|
+ width: 900,
|
|
|
+ modal: true,
|
|
|
+ open: function (event, ui) {
|
|
|
+ $(".ui-dialog-titlebar-close", $(this).parent()).hide();
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#validation-form').validate({
|
|
|
+ errorElement: 'span',
|
|
|
+ errorClass: 'help-inline',
|
|
|
+ focusInvalid: false,
|
|
|
+ onfocusout: function(element) {
|
|
|
+ $(element).valid();
|
|
|
+ },
|
|
|
+ ignore:".ignore",
|
|
|
+ rules: {
|
|
|
+ adGroupName: {
|
|
|
+ required: true,
|
|
|
+ maxlength:50
|
|
|
+ },
|
|
|
+ price:{
|
|
|
+ number:true,
|
|
|
+ required:true
|
|
|
+ },
|
|
|
+ dailyBudget:{
|
|
|
+ number:true
|
|
|
+ },
|
|
|
+ maxImpression:{
|
|
|
+ number:true
|
|
|
+ },
|
|
|
+ maxClick:{
|
|
|
+ number:true
|
|
|
+ },
|
|
|
+ dailyMaxImpression:{
|
|
|
+ digits:true
|
|
|
+ },
|
|
|
+ dailyMaxclick:{
|
|
|
+ digits:true
|
|
|
+ },
|
|
|
+ dailyMaxConversion:{
|
|
|
+ digits:true
|
|
|
+ },
|
|
|
+ maxSessionImpression:{
|
|
|
+ digits:true
|
|
|
+ },
|
|
|
+ maxUserImpression:{
|
|
|
+ digits:true
|
|
|
+ },
|
|
|
+
|
|
|
+ },
|
|
|
+ messages: {
|
|
|
+ adGroupName:{
|
|
|
+ required:"请输入内容!",
|
|
|
+ maxlength:"输入的长度大于50超出范围!"
|
|
|
+ },
|
|
|
+ price:{
|
|
|
+ required:"请输入内容!",
|
|
|
+ number:"请输入数字!"
|
|
|
+ },
|
|
|
+ dailyBudget:{
|
|
|
+ number:"请输入正确格式"
|
|
|
+ },
|
|
|
+ maxImpression:{
|
|
|
+ digits:"请输入正确格式"
|
|
|
+ },
|
|
|
+ maxClick:{
|
|
|
+ digits:"请输入正确格式"
|
|
|
+ },
|
|
|
+ dailyMaxImpression:{
|
|
|
+ digits:"请输入正确格式"
|
|
|
+ },
|
|
|
+ dailyMaxclick:{
|
|
|
+ digits:"请输入正确格式"
|
|
|
+ },
|
|
|
+ dailyMaxConversion:{
|
|
|
+ digits:"请输入正确格式"
|
|
|
+ },
|
|
|
+ maxSessionImpression:{
|
|
|
+ digits:"请输入正确格式"
|
|
|
+ },
|
|
|
+ maxUserImpression:{
|
|
|
+ digits:"请输入正确格式"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ invalidHandler: function (event, validator) { //display error alert on form submit
|
|
|
+ $('.alert-error', $('.login-form')).show();
|
|
|
+ },
|
|
|
+ highlight: function (e) {
|
|
|
+ $(e).closest('.control-group').removeClass('info').addClass('error');
|
|
|
+ $(e).closest('.control-group').find("span.note").addClass('hidden');
|
|
|
+ },
|
|
|
+ success: function (e) {
|
|
|
+ $(e).closest('.control-group').removeClass('error').addClass('info');
|
|
|
+ $(e).closest('.control-group').find("span.note").removeClass('hidden');
|
|
|
+ $(e).remove();
|
|
|
+ },
|
|
|
+ errorPlacement: function (error, element) {
|
|
|
+ if(element.is(':checkbox') || element.is(':radio')) {
|
|
|
+ var controls = element.closest('.controls');
|
|
|
+ if(controls.find(':checkbox,:radio').length > 1) controls.append(error);
|
|
|
+ else error.insertAfter(element.nextAll('.lbl').eq(0));
|
|
|
+ }
|
|
|
+ else if(element.is('.chzn-select')) {
|
|
|
+ error.insertAfter(element.nextAll('[class*="chzn-container"]').eq(0));
|
|
|
+ }
|
|
|
+ else error.insertAfter(element);
|
|
|
+ },
|
|
|
+ submitHandler:function(form){form.submit();}
|
|
|
+ /*
|
|
|
+
|
|
|
+ submitHandler: function (form) {
|
|
|
+ var startDate = $('input[name=startDate]').val();
|
|
|
+ var endDate = $('input[name=endDate]').val();
|
|
|
+ if(startDate!==""&&endDate!==""){
|
|
|
+ if(datefalg){
|
|
|
+ // 防止表单二次提交
|
|
|
+ $('button:submit').attr('disabled', 'disabled');
|
|
|
+ var _url = $('form').attr('action');
|
|
|
+ var _param = $('form').serialize();
|
|
|
+ $.post(_url,_param,function(data) {
|
|
|
+ $('#main-content').html(data);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $('input[name=startDate]').nextAll(".date-inline").text("请输入内容").addClass("loginerror");
|
|
|
+ $('input[name=endDate]').nextAll(".date-inline").text("请输入内容").addClass("loginerror");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ */
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+var datefalg = true;
|
|
|
+
|
|
|
+
|
|
|
+});
|
|
|
+</script>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<#include "/advertiser/main/public-head.ftl">
|
|
|
+<@override name="page">
|
|
|
+
|
|
|
+<!-- PAGE CONTENT BEGINS HERE -->
|
|
|
+<div id=content_bg>
|
|
|
+
|
|
|
+<div id= "pagecontent">
|
|
|
+ <div id="content" style="width:97%;height:94%;">
|
|
|
+ <div id="third">
|
|
|
+ <ul style="">
|
|
|
+ <li class="size1"><i class="icon-home" style="background-image:none;"></i> <a href="${ctx}/advertiser/main/dashboard">首页</a>
|
|
|
+ <span class="divider1"><i class="icon-angle-right"></i></span></li>
|
|
|
+ <#if role == "agent">
|
|
|
+ <li class="size2"><a href="${ctx}/advertiser/main/ad/advertiser/list">投放管理</a></li>
|
|
|
+ <span class="divider2"><i class="icon-angle-right"></i></span>
|
|
|
+ <li class="size2"><a href="${ctx}/advertiser/main/ad/order/list?advertiserId=${advertiserId}">订单管理</a></li>
|
|
|
+ <span class="divider2"><i class="icon-angle-right"></i></span>
|
|
|
+ <li class="size2"><a href="${ctx}/advertiser/main/ad/target/campaign/list?orderId=${orderId}&advertiserId=${advertiserId}">活动管理</a>
|
|
|
+ <span class="divider3"><i class="icon-angle-right"></i></span></li>
|
|
|
+ <li class="size2"><a href="${ctx}/advertiser/main/ad/target/ad-group/list?campaignId=${campaignId}&orderId=${orderId}&advertiserId=${advertiserId}">投放管理</a></li>
|
|
|
+ <span class="divider2"><i class="icon-angle-right"></i></span></li>
|
|
|
+ <li class="size3">创建投放</li>
|
|
|
+ <#elseif role == "advertiser">
|
|
|
+ <li class="size2"><a href="${ctx}/advertiser/main/ad/order/list?advertiserId=${advertiserId}">订单管理</a></li>
|
|
|
+ <span class="divider2"><i class="icon-angle-right"></i></span>
|
|
|
+ <li class="size2"><a href="${ctx}/advertiser/main/ad/target/campaign/list?orderId=${orderId}&advertiserId=${advertiserId}">活动管理</a></li>
|
|
|
+ <span class="divider2"><i class="icon-angle-right"></i></span></li>
|
|
|
+ <li class="size2"><a href="${ctx}/advertiser/main/ad/target/ad-group/list?campaignId=${campaignId}&orderId=${orderId}&advertiserId=${advertiserId}">投放管理</a></li>
|
|
|
+ <span class="divider2"><i class="icon-angle-right"></i></span></li>
|
|
|
+ <li class="size3">创建投放</li>
|
|
|
+ </#if>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <form id="validation-form" action="${ctx}/advertiser/main/ad/target/ad-group/save" method="post">
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="clname" for="form-field-1"><sup style="color:red">*</sup>投放名称:</label>
|
|
|
+ <div class="inputtext">
|
|
|
+ <input class="i1" autocomplete="off" type="text" name="adGroupName" id="form-field-1" placeholder="">
|
|
|
+ <span class="help-inline" for="form-field-1">支持输入1~50个字符</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="clname" for="id-date-picker-1"><sup style="color:red">*</sup>活动周期:</label>
|
|
|
+ <div class="inputtext">
|
|
|
+ <div class="row-fluid input-append date row-fluid-revise">
|
|
|
+ <input class="input1" autocomplete="off" name="activeTime" id="id-date-picker-1" type="text" value="" />
|
|
|
+ <div id="divdaterangepick" style="width:456px; position: absolute;margin: -17px 0 0 115px;"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="clname" style="margin-top:-14px" for="form-field-2"><sup style="color:red">*</sup>总预算: </label>
|
|
|
+ <div class="inputtext">
|
|
|
+ <input class="i1" autocomplete="off" name="totalBudget" type="text" id="form-field-2" placeholder="">
|
|
|
+ <input name="budget" type="hidden" id="budget" value="${budget!}"/>
|
|
|
+ <span class="help-inline1" style="margin-top:-30px" >元</span>
|
|
|
+ <span id="totalBudget_span" style="position:absolute;margin:-9px 0 0 5px;color:#595959;" for="form-field-2">总预算不能大于订单总预算</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="form-field-3"><sup style="color:red">*</sup>投放模式:</label>
|
|
|
+ <label style="float:left;margin:-27px 0 0 115px;"><input id="input-radio-cpm" autocomplete="off" name="mode" type="radio" value="1" checked="checked"><span style="position:absolute;margin:3px 0 0 5px;">CPM</span></label>
|
|
|
+ <label style="float:left;margin:-27px 0 0 200px;"><input id="input-radio-cpc" autocomplete="off" name="mode" type="radio" value="2"><span style="position:absolute;margin:3px 0 0 5px;">CPC</span></label>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="control-group" style="clear:both;">
|
|
|
+ <label class="control-label" style="margin-top:28px" for="form-field-3"><sup style="color:red">*</sup>单价(CPM):</label>
|
|
|
+ <div class="inputtext">
|
|
|
+ <input class="i1" autocomplete="off" name="price" type="text" id="form-field-3" placeholder="">
|
|
|
+ <span class="help-inline1" style="margin-top:-46px" >元</span>
|
|
|
+ <span style="margin-top:-46px" class="help-inline" for="form-field-3">单价</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="form-field-5">曝光总上限:</label>
|
|
|
+ <div class="controls4">
|
|
|
+ <input class="i1" autocomplete="off" name="maxImpression" type="text" id="form-field-5" placeholder="">
|
|
|
+ <span class="help-inline1" style="margin-top:-46px" >千次</span>
|
|
|
+ <span class="help-inline" style="margin-top:-46px" for="form-field-5">整个投放期,广告最多被曝光多少千次</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="form-field-6">点击总上限:</label>
|
|
|
+ <div class="controls4">
|
|
|
+ <input class="i1" autocomplete="off" name="maxClick" type="text" id="form-field-6" placeholder="">
|
|
|
+ <span class="help-inline1" style="margin-top:-46px" >次</span>
|
|
|
+ <span class="help-inline" style="margin-top:-46px" for="form-field-6">整个投放期,广告最多被点击多少次</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="form-field-7">转化总上限:</label>
|
|
|
+ <div class="controls4">
|
|
|
+ <input class="i1" autocomplete="off" name="maxConversion" type="text" id="form-field-7" placeholder="">
|
|
|
+ <span class="help-inline1" style="margin-top:-46px" >次</span>
|
|
|
+ <span class="help-inline" style="margin-top:-46px" for="form-field-7">整个投放期,广告最多被转化多少次</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="form-field-8">每日曝光上限:</label>
|
|
|
+ <div class="controls5">
|
|
|
+ <input class="i1" autocomplete="off" type="text" name="dailyMaxImpression" id="form-field-8" placeholder="">
|
|
|
+ <span class="help-inline1" style="margin-top:-46px" >千次</span>
|
|
|
+ <span class="help-inline" style="margin-top:-46px" for="form-field-8">每天,广告最多被曝光多少千次</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="form-field-9">每日点击上限:</label>
|
|
|
+ <div class="controls5">
|
|
|
+ <input class="i1" autocomplete="off" type="text" name="dailyMaxClick" id="form-field-9" placeholder="">
|
|
|
+ <span class="help-inline1" style="margin-top:-46px" >次</span>
|
|
|
+ <span class="help-inline" style="margin-top:-46px" for="form-field-9">每天,广告最多被点击多少次</span>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="form-field-10">每日转换上限:</label>
|
|
|
+ <div class="controls5">
|
|
|
+ <input class="i1" autocomplete="off" type="text" name="dailyMaxConversion" id="form-field-10" placeholder="">
|
|
|
+ <span class="help-inline1" style="margin-top:-46px" >次</span>
|
|
|
+ <span class="help-inline" style="margin-top:-46px" for="form-field-10">每天,广告最多被转换多少次</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="form-field-11">单人曝光频次:</label>
|
|
|
+ <div class="controls-reset">
|
|
|
+ <select id="form-field-11" name="perImpressionType">
|
|
|
+ <option value="0">请选择曝光类型</option>
|
|
|
+ <option value="1">每天</option>
|
|
|
+ <option value="2">投放周期</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="controls">
|
|
|
+ <input class="i1" autocomplete="off" type="text" name="perImpression" id="form-field-11" placeholder="">
|
|
|
+ <span class="help-inline" style="margin-top:-48px" for="form-field-11">单人曝光频次</span>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="form-field-12">单人点击频次:</label>
|
|
|
+ <div class="controls-reset">
|
|
|
+ <select id="form-field-12" name="perClickType">
|
|
|
+ <option value="0">请选择曝光类型</option>
|
|
|
+ <option value="1">每天</option>
|
|
|
+ <option value="2">投放周期</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ <div class="controls">
|
|
|
+ <input class="i1" autocomplete="off" type="text" name="perClick" id="form-field-12" placeholder="">
|
|
|
+ <span class="help-inline" style="margin-top:-48px" for="form-field-12">单人点击频次</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 前端需要传输给后端的地域定向的数据值放在value里面 -->
|
|
|
+ <div class="control-group" style="margin-top:-15px;">
|
|
|
+ <label style="margin-top:37px;margin-left:0px;" class="control-label">地域定向:</label>
|
|
|
+
|
|
|
+ <div class="inputtext">
|
|
|
+ <div class="dashed">
|
|
|
+ <input class="ignore" type="hidden" id="areas" name="areas" value="">
|
|
|
+ <input type="button" style="width:150px;margin-top:-45px;margin-left:116px;" class="btn-Directed btn1" id="btn-areas" value="地域设定">
|
|
|
+ <div class="geo">
|
|
|
+ <div class="geo-selected" id="geo-selected-areas" style="display: none;margin:-63px 0 0 300px;position: absolute;">
|
|
|
+ <span class="area-direct"></span><span >您已经设定了<strong id="count-areas">0</strong>个地域条件</span>
|
|
|
+ </div>
|
|
|
+ <div class="geo-all" id="geo-all-areas" style="display: block;margin:-63px 0 0 300px;position: absolute;">
|
|
|
+ <span class="area-direct"></span><span class="default_text">不限</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <br>
|
|
|
+ <div id="timediv" class="control-group" style="margin-top:-60px;">
|
|
|
+ <label style="margin-top:-48px;margin-left:2px;" class="control-label">时段定向:</label>
|
|
|
+ <div class="controls">
|
|
|
+ <div class="setting" style="float:left;margin:-25px 0 20px 115px;">
|
|
|
+ <div class="time_tit">
|
|
|
+ <p>开始时间</p>
|
|
|
+ <p>结束时间</p>
|
|
|
+ </div>
|
|
|
+ <input type="hidden" name="sdayParting" id="sdayParting" value=""/>
|
|
|
+ <div class="clear"></div>
|
|
|
+ <div class="time_box"></div>
|
|
|
+ <div class="time_add"><p id="setting_list" class="dateRangePicker" href="">新增时间段</p></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div><br/>
|
|
|
+
|
|
|
+ <div class="control-group">
|
|
|
+ <label class="control-label" for="form-field-3"><sup style="color:red">*</sup>操作系统:</label>
|
|
|
+ <label style="float:left;margin:-27px 0 0 115px;"><input id="input-radio-cpm" autocomplete="off" name="mode" type="radio" value="1" checked="checked"><span style="position:absolute;margin:3px 0 0 5px;">Windows</span></label>
|
|
|
+ <label style="float:left;margin:-27px 0 0 230px;"><input id="input-radio-cpc" autocomplete="off" name="mode" type="radio" value="2"><span style="position:absolute;margin:3px 0 0 5px;">Mac</span></label>
|
|
|
+ <label style="float:left;margin:-27px 0 0 305px;"><input id="input-radio-cpc" autocomplete="off" name="mode" type="radio" value="3"><span style="position:absolute;margin:3px 0 0 5px;">IOS</span></label>
|
|
|
+ <label style="float:left;margin:-27px 0 0 360px;"><input id="input-radio-cpc" autocomplete="off" name="mode" type="radio" value="4"><span style="position:absolute;margin:3px 0 0 5px;">Android</span></label>
|
|
|
+ <label style="float:left;margin:-27px 0 0 450px;"><input id="input-radio-cpc" autocomplete="off" name="mode" type="radio" value="5"><span style="position:absolute;margin:3px 0 0 5px;">MP</span></label>
|
|
|
+ <label style="float:left;margin:-27px 0 0 500px;"><input id="input-radio-cpc" autocomplete="off" name="mode" type="radio" value="6"><span style="position:absolute;margin:3px 0 0 5px;">其他</span></label>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="control-group">
|
|
|
+ <label style="position:relative;" class="control-label"><sup></sup>广告位:</label>
|
|
|
+ <div class="controls" style="position:absolute; margin:-30px 0 0 98px;width:auto;">
|
|
|
+ <div class="form-align-radio1" style="margin-right:100px;">
|
|
|
+ <input autocomplete="off" style="line-height:30px;margin:0px 5px 0 0;border:none;" name="position" type="checkbox" id= "1position" value="1"><span class="lb2"> 全部</span>
|
|
|
+ </div>
|
|
|
+ <div class="form-align-radio1" style="margin-right:85px;">
|
|
|
+ <input autocomplete="off" style="line-height:30px;margin:0px 5px 0 0;" name="position" type="checkbox" id= "2position" value="2"><span class="lb2"> 认证页</span>
|
|
|
+ </div>
|
|
|
+ <div class="form-align-radio1" style="margin-right:70px;">
|
|
|
+ <input autocomplete="off" style="line-height:30px;margin:0px 5px 0 0;" name="position" type="checkbox" id= "3position" value="3"><span class="lb2"> 认证页后</span>
|
|
|
+ </div>
|
|
|
+ <div class="form-align-radio1">
|
|
|
+ <input autocomplete="off" style="line-height:30px;margin:0px 5px 0 0;" name="position" type="checkbox" id= "4position" value="4"><span class="lb2"> 上网过程</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div><br/>
|
|
|
+
|
|
|
+ <div class="control-group">
|
|
|
+ <label style="position:relative;" class="control-label"><sup></sup>定向:</label>
|
|
|
+ <div class="controls" style="position:absolute; margin:-30px 0 0 98px;width:auto;">
|
|
|
+ <div class="form-align-radio1" style="margin-right:100px;">
|
|
|
+ <input autocomplete="off" style="line-height:30px;margin:0px 5px 0 0;border:none;" name="position" type="checkbox" id= "1position" value="1"><span class="lb2">数聚场景</span>
|
|
|
+ </div>
|
|
|
+ <div class="form-align-radio1" style="margin-right:85px;">
|
|
|
+ <input autocomplete="off" style="line-height:30px;margin:0px 5px 0 0;" name="position" type="checkbox" id= "2position" value="2"><span class="lb2">分组</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <br>
|
|
|
+ <div class="control-group" id="placediv">
|
|
|
+ <sup style="color:red">*</sup>场景:
|
|
|
+ <div class="controls6" style="margin-left: 25px;margin-top: -18px;width:auto;">
|
|
|
+ <#if placeList ??>
|
|
|
+ <#list placeList as place>
|
|
|
+ <div style="display:inline-block; margin-left:180px;margin-bottom:20px;">
|
|
|
+ <input autocomplete="off" style="display:inline-block;margin-left:-155px;" type="checkbox" name="place" id ="#{place.id}place" value="#{place.id}">
|
|
|
+ <li style="float:left;margin-left:-50px;margin-top:3px;width:120px;" >${place.name}</li>
|
|
|
+ </div>
|
|
|
+ </#list>
|
|
|
+ </#if>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="control-group">
|
|
|
+ <lable style="margin-top:107px;margin-left:-660px;" class="control-label">
|
|
|
+ <span style="color:red;">*</span>代表必填项
|
|
|
+ </lable>
|
|
|
+ </div>
|
|
|
+
|
|
|
+<div class="control-group">
|
|
|
+ <lable style="margin-top:107px;" class="control-label">
|
|
|
+ <input type="button" class="btn1" style="width:150px;" id="btn-toggle" value="LBS定向"> <span id="spanselectedhint" style="display:none;margin-left:7px;"></span>
|
|
|
+ </lable>
|
|
|
+</div>
|
|
|
+
|
|
|
+
|
|
|
+<div class="control-group">
|
|
|
+ <input style="width:150px;margin-right:15px;" type="submit" value="保存" class="btn2" id="btnsave"/>
|
|
|
+ <button class="btn2" href="${ctx}/advertiser/main/ad/target/ad-group/list?campaignId=${campaignId}&orderId=${orderId}&advertiserId=${advertiserId}" style="background-color:#36aeea;" id="btncancel"><i class="icon-undo"></i> 取消</button>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <input autocomplete="off" type="hidden" name="campaignId" value="${campaignId}">
|
|
|
+ <input autocomplete="off" type="hidden" name="orderId" value="${orderId}">
|
|
|
+ <input autocomplete="off" type="hidden" name="advertiserId" value="${advertiserId}">
|
|
|
+ <input autocomplete="off" type="hidden" name="agentId" value="${agentId}">
|
|
|
+ <input autocomplete="off" type="hidden" name="zoneIdString" value="1,12">
|
|
|
+ <input type="hidden" name="selectedwifi" id="selectedwifi" value="">
|
|
|
+</form>
|
|
|
+<div id="divLBS" >
|
|
|
+ <div class="modal-dialog">
|
|
|
+ <div class="modal-head"> LBS 设定</div>
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-body" style="height:400px;">
|
|
|
+ <div id="wifimap">
|
|
|
+ <div id="divmapsearch">
|
|
|
+ <form name="frmwifisearch" id="frmWifiSearch" action="${ctx}/advertiser/main/ad/target/ad-group/wifiList">
|
|
|
+ <fieldset id="city_custom">
|
|
|
+ <input type="text" class="form-control" name="address" id="address" onkeydown="if(event.keyCode==13){return false;}">
|
|
|
+ <select name="prov" id="prov" class="prov" ></select>
|
|
|
+ <select name="city" id="city" class="city"></select>
|
|
|
+ <#-- 距离
|
|
|
+ <select name="distance" id="mapdistance" >
|
|
|
+ <option value="1">1Km</option>
|
|
|
+ <option value="2">2Km</option><option value="3">3Km</option>
|
|
|
+ <option value="4">4Km</option><option value="5" selected>5Km</option>
|
|
|
+ <option value="6">6Km</option><option value="10">10Km</option>
|
|
|
+ <option value="20">20Km</option>
|
|
|
+ </select>--> <input type="button" name="mapSearch" id="btnmapSearch" style="margin-top:-10px;background:#36aeea;" class="btn btn-primary" value="搜索"></fieldset>
|
|
|
+ </form>
|
|
|
+ <input type="hidden" name="cacheSearched" id="cacheSearched" > <input type="hidden" name="cacheSelected" id="cacheSelected" value=''><!--[{"id":1,"address":"上海体育馆","lat":121.535816,"lng":31.24231},{"id":2,"address":"上海市八万人体育场","lat":121.526224,"lng":31.238806},{"id":3,"address":"上海市卢湾区体育馆","lat":121.523198,"lng":31.235045},{"id":9,"address":"智造局一期国际服务外包产业","lat":121.478716, "lng":31.206612},{"id":10,"address":"上海市红房子妇产科医院","lat":121.483587, "lng":31.213861},{"id":11,"address":"上海东仁商贸中","lat":121.499101, "lng":31.220265}]-->
|
|
|
+ <input type="hidden" id="searchedPage"><input type="hidden" id="selectedPage">
|
|
|
+ </div>
|
|
|
+ <div id="mapview" >
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div id="wifitab" >
|
|
|
+ <ul class="nav navtab" id="wifitabul" >
|
|
|
+ <li id="mnusearchedwifi" ><a href="javascript:" onclick="tabshow(this,'mnusearchedwifi')">搜索wifii</a></li>
|
|
|
+ <li id="mnuselectedwifi" class="current"><a href="javascript:" onclick="tabshow(this,'mnuselectedwifi')">已选wifi</a></li>
|
|
|
+ </ul><br class="clearfix">
|
|
|
+ <div id="divselectedwifi" class="in fade">没有选中wifi</div>
|
|
|
+ <div id="divsearchedwifi" class="in fade" style="display:none;">没有相关数据</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <br class="clearfix"><br class="clearfix">
|
|
|
+ <div class="modal-foot" style="width:300px;height:34px;position:absloute;margin-left:300px;"><input type="button" value="确定" class="btn122" onclick='savewifi();$("#divLBS").dialog("close");'style="width:100px;position:absloute;height:30px;"> <input type="button" class="btn2" value="取消" onclick='$("#divLBS").dialog("close");' style="width:100px;position:absloute;magin-left:105px;height:30px;"></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+</div>
|
|
|
+
|
|
|
+</div>
|
|
|
+<div id="areas_layout"></div>
|
|
|
+<div id="schedule_layout"></div>
|
|
|
+<script type="text/javascript">
|
|
|
+
|
|
|
+ var areasgeoPopup = $("#areas_popup")[0];
|
|
|
+ var GEO_list;
|
|
|
+ $('#btn-areas').click(function () {
|
|
|
+ if (!areasgeoPopup) {
|
|
|
+ areasgeoPopup = new areasPopup({
|
|
|
+ width: '746px',
|
|
|
+ height: '435px',
|
|
|
+ title: '地域定向设定'
|
|
|
+ });
|
|
|
+ var defaultValue = "不限";
|
|
|
+ var input = $('#areas').trigger('change');
|
|
|
+ var selectedIds = input.val() ? input.val().split(',') : null;
|
|
|
+ $('#areasconfirm').click(function(){
|
|
|
+ var pop= areasgeoPopup;
|
|
|
+ areasgeoPopup.hide();
|
|
|
+ input.val(Area.save());
|
|
|
+ var id = 'areas',selected = Area.save();
|
|
|
+ parent.$('#'+id).val(selected);
|
|
|
+ if (selected && $('input[type=checkbox]:not(:checked)').length) {
|
|
|
+ //有选择 且 非全选的
|
|
|
+ parent.$('#count-'+id)[0].innerHTML = selected.split(',').length;
|
|
|
+ parent.$('#geo-all-'+id).hide();
|
|
|
+ parent.$('#geo-selected-'+id).show();
|
|
|
+ }else{
|
|
|
+ if(!$('input[type=checkbox]:not(:checked)').length){
|
|
|
+ parent.$('#geo-all-'+id).find('.default_text')[0].innerHTML=defaultValue;
|
|
|
+ }else{
|
|
|
+ var val = defaultValue;
|
|
|
+ parent.$('#geo-all-'+id).find('.default_text')[0].innerHTML=decodeURIComponent(val);
|
|
|
+ }
|
|
|
+ parent.$('#geo-all-'+id).show();
|
|
|
+ parent.$('#geo-selected-'+id).hide();
|
|
|
+ }
|
|
|
+ parent.$(parent.document).trigger('setData');
|
|
|
+
|
|
|
+ });
|
|
|
+ //Area.init(GEO_LIST,selectedIds);
|
|
|
+ $.ajax({
|
|
|
+ url: '${ctx}/advertiser/main/ad/target/ad-group/getLocations',
|
|
|
+ dataType:'json',
|
|
|
+ success:function(GEO_LIST){
|
|
|
+ Area.init(GEO_LIST,selectedIds);
|
|
|
+ areasgeoPopup.show();
|
|
|
+ GEO_list = GEO_LIST;
|
|
|
+ },
|
|
|
+ error:function(){
|
|
|
+ alert('数据拉取失败,请检查您的网络连接是否可用');
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }else{
|
|
|
+ areasgeoPopup.show();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#count-areas').click(function () {
|
|
|
+ $('#btn-areas').trigger('click');
|
|
|
+ });
|
|
|
+
|
|
|
+ if ($('#areas').val()) {
|
|
|
+ $('#geo-selected-areas').show();
|
|
|
+ $('#geo-all-areas').hide();
|
|
|
+ $('#count-areas')[0].innerHTML = $('#areas').val().split(',').length;
|
|
|
+ } else {
|
|
|
+ $('#geo-selected-areas').hide();
|
|
|
+ $('#geo-all-areas').show();
|
|
|
+ }
|
|
|
+
|
|
|
+ </script>
|
|
|
+<script type="text/javascript">
|
|
|
+//Alex add for wifi LBS
|
|
|
+
|
|
|
+ jspagesize = 15 ;
|
|
|
+
|
|
|
+/*get wifi from cachedata*/
|
|
|
+function initMarker(obj){
|
|
|
+
|
|
|
+ try{
|
|
|
+ if(obj.value.length>4){
|
|
|
+ allwifi=jQuery.parseJSON(obj.value)
|
|
|
+ markers = [];
|
|
|
+ for (var i = 0; length= allwifi.length,i<length ;i ++) {
|
|
|
+ var markerPosition = new AMap.LngLat(allwifi[i]['lat'],allwifi[i]['lng']);
|
|
|
+ var marker = new AMap.Marker({
|
|
|
+ position: markerPosition,
|
|
|
+ icon: "http://developer.amap.com/wp-content/uploads/2014/06/marker.png"
|
|
|
+ });
|
|
|
+ markers.push(marker);
|
|
|
+ }
|
|
|
+ return markers;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch(e){return false;}
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+function savewifi(){
|
|
|
+ try{
|
|
|
+ wifiids=''
|
|
|
+ selectedwificount=0
|
|
|
+ if($("#cacheSelected").val().length>2){
|
|
|
+ allwifi=$.parseJSON($("#cacheSelected").val())
|
|
|
+ for (var i = 0; length= allwifi.length,i<length ;i ++) {
|
|
|
+ wifiids += allwifi[i]['id']+',';
|
|
|
+ selectedwificount+=1;
|
|
|
+ }
|
|
|
+ wifiids=wifiids.substring(0,wifiids.length-1)
|
|
|
+ }
|
|
|
+ $("#selectedwifi").val(wifiids);
|
|
|
+ $("#spanselectedhint").html("共选择了" + selectedwificount + " 个 wifi")
|
|
|
+ $("#spanselectedhint").show();
|
|
|
+
|
|
|
+ }
|
|
|
+ catch(e){alert(e)}
|
|
|
+}
|
|
|
+
|
|
|
+function tabshow(e,id){
|
|
|
+ var mnu=['mnusearchedwifi','mnuselectedwifi']
|
|
|
+ try{
|
|
|
+ for(i=0;i<mnu.length;i++){
|
|
|
+ mnuid=mnu[i];divid="#div" + mnuid.substr(3)
|
|
|
+ if(mnu[i]==id){
|
|
|
+ $('#'+mnuid).addClass('current');
|
|
|
+ $(divid)[0].style.display='block';
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ $('#'+mnuid).removeClass('current');
|
|
|
+ $(divid)[0].style.display='none';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }catch(e){alert(e)}
|
|
|
+}
|
|
|
+
|
|
|
+function wificlick(e){
|
|
|
+ var nval="",v=$(e).attr("dataj"),oldval,strcache=$('#cacheSelected').val()
|
|
|
+ if(strcache.length>2){
|
|
|
+ oldval=$.parseJSON(strcache);
|
|
|
+ }
|
|
|
+
|
|
|
+ try{
|
|
|
+ if(e.checked == true){//add string to cache
|
|
|
+ if(strcache.length>2){
|
|
|
+ if(strcache.indexOf(v)<1){
|
|
|
+ strcache= strcache.substr(0,strcache.length-1) +',' + v + ']'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ strcache='['+ v +']';
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if(e.checked== false){
|
|
|
+ if(strcache.indexOf(v)>1){
|
|
|
+ strcache='['+strcache.substring(1,strcache.indexOf(v)) + strcache.substring(strcache.indexOf(v)+v.length,strcache.length-1)+ ']'
|
|
|
+ strcache=strcache.replace(",,",",");
|
|
|
+ strcache=strcache.replace("[,","[");
|
|
|
+ strcache=strcache.replace(",]","]");
|
|
|
+ }
|
|
|
+ else{strcache='[]'}
|
|
|
+ }
|
|
|
+ //alert(strcache);
|
|
|
+ $('#cacheSelected').val(strcache);
|
|
|
+ loadselectwifi($('#selectedPage').val())
|
|
|
+ loadsearchwifi($('#searchedPage').val())
|
|
|
+ //alert($('#cacheSelected').val())
|
|
|
+ }catch(e){alert(e)}
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+function loadsearchwifi(p){
|
|
|
+ var totalcount,pageno,swifi
|
|
|
+
|
|
|
+ try{
|
|
|
+ if($('#cacheSearched').val().length>2){
|
|
|
+ swifi=$.parseJSON($('#cacheSearched').val())
|
|
|
+ totalcount = swifi.length
|
|
|
+ pagecount=Math.ceil(totalcount/jspagesize)
|
|
|
+ $("#searchedPage").val(p)
|
|
|
+ if(isNaN(p)|| typeof(p)!=='number' || parseInt(p)!==p || parseInt(p)>pagecount){pageno=1;}
|
|
|
+ else{pageno=p;}
|
|
|
+ $("#searchPage").val(p)
|
|
|
+ wifihtm = '<div class="wifilist">';
|
|
|
+ //select item in wifisections
|
|
|
+ for(i=jspagesize*(pageno-1);i<jspagesize*(pageno-1)+jspagesize;i++){
|
|
|
+ if(swifi[i]){
|
|
|
+ wifihtm +="<div class=\"wifiitem\"><input type=\"checkbox\" name=\"swifi["+swifi[i]['id'] +"]\" id=\"swifi"+swifi[i]['id'] +"\" value=\""+swifi[i]['id'] +"\" onclick=\"wificlick(this)\" dataj='" + JSON.stringify(swifi[i]) +"'";
|
|
|
+ if($("#cacheSelected")[0].value.indexOf(JSON.stringify(swifi[i]))>-1){wifihtm +=' checked ';}
|
|
|
+ wifihtm+= "> <lable class=\"wifilab\" for=\"swifi" +swifi[i]['id'] +"\">" +swifi[i]['address'] + "</lable></div>";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ wifihtm += '</div>';
|
|
|
+ resulthtm= wifihtm+genwifinav(pagecount,pageno,'loadsearchwifi');
|
|
|
+ $("#divsearchedwifi").html(resulthtm);
|
|
|
+ }
|
|
|
+ else{$("#divsearchedwifi").html('没有搜索到wifif信息')}
|
|
|
+ }
|
|
|
+ catch(e){$("#divsearchedwifi").html('加载wifi信息出错');}
|
|
|
+}
|
|
|
+
|
|
|
+function loadselectwifi(p){
|
|
|
+ var totalcount,pageno,allwifi
|
|
|
+ try{
|
|
|
+ if($('#cacheSelected').val().length>2){
|
|
|
+ var allwifi=$.parseJSON($('#cacheSelected').val())
|
|
|
+ totalcount = allwifi.length
|
|
|
+ pagecount=Math.ceil(totalcount/jspagesize)
|
|
|
+ if(isNaN(p)|| typeof(p)!=='number' || parseInt(p)!==p || parseInt(p)>pagecount){pageno=1;}
|
|
|
+ else{pageno=p;}
|
|
|
+ $("#selectedPage").val(p)
|
|
|
+ wifihtm = '<div class="wifilist">';
|
|
|
+ //show select item in wifisections
|
|
|
+ for(i=jspagesize*(pageno-1);i<jspagesize*(pageno-1)+jspagesize;i++){
|
|
|
+ if((allwifi[i])){
|
|
|
+ wifihtm +="<div class=\"\"><input type=\"checkbox\" name=\"swifi[]\" id=\"swifi"+allwifi[i]['id'] +"\" value=\""+allwifi[i]['id'] +"\" onclick=\"wificlick(this) \" dataj='" + JSON.stringify(allwifi[i]) + "' checked> <lable class=\"\" for=\"swifi" +allwifi[i]['id'] +"\">" +allwifi[i]['address'] + "</lable></div>"
|
|
|
+ }
|
|
|
+ else{break;}
|
|
|
+ }
|
|
|
+ wifihtm += '</div>';
|
|
|
+ resulthtml= wifihtm+genwifinav(pagecount,pageno,'loadselectwifi');
|
|
|
+ $("#divselectedwifi").html(resulthtml);
|
|
|
+ }
|
|
|
+ else{$("#divselectedwifi").html("没有选择wifi");}
|
|
|
+ }
|
|
|
+ catch(e){$("#divselectedwifi").html("加载wifi时出错");}
|
|
|
+}
|
|
|
+
|
|
|
+function genwifinav(pcount,pno,fun){
|
|
|
+ //pageinvbar
|
|
|
+ wifinavhtm='<div class="pagination-wifi"><ul class="pagination-mini-wifi">';
|
|
|
+ if(pcount<=7){pagebegin=1;pageend=pagecount;}
|
|
|
+ else{
|
|
|
+ if(pno<=4){pagebegin=1;pageend=pagecount;}
|
|
|
+ else{
|
|
|
+ if(pagecount-pno<4){pagebegin=pcount-6;pageend=pcount;}
|
|
|
+ else{pagebegin=pno-3;pageend=pno+3}
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for(i=pagebegin;i<=pageend;i++){
|
|
|
+ wifinavhtm +="<li ><a href=\"javascript:\" onclick=\""+ fun + "("+ i +")\""
|
|
|
+ if(i==pno){wifinavhtm+=" class=\"disabled\""}
|
|
|
+
|
|
|
+ wifinavhtm+= ">"+ i +"</li>"
|
|
|
+ }
|
|
|
+ wifinavhtm +='</ul></div>';
|
|
|
+ return wifinavhtm;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+(function(){
|
|
|
+ var map ;
|
|
|
+ $('#btnmapSearch').click(function(e){
|
|
|
+ try{
|
|
|
+ var sdata = $(document.forms["frmwifisearch"]).serializeArray();
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ url: document.forms['frmwifisearch'].action,
|
|
|
+ type: "POST",
|
|
|
+ // formate "name=codeplayer&age=18&uid=1&uid=2&uid=3"
|
|
|
+ data: sdata,
|
|
|
+ datatype: 'json',
|
|
|
+ // sucess
|
|
|
+ success: function( rdata, textStatus, jqXHR ){
|
|
|
+ try{
|
|
|
+ if(rdata.length>4){
|
|
|
+ $('#cacheSearched').val(rdata);
|
|
|
+ map=window.map;
|
|
|
+ map.plugin(['AMap.MarkerClusterer'], function(){
|
|
|
+ var cl = new AMap.MarkerClusterer(map, initMarker($("#cacheSearched")[0]));
|
|
|
+ });
|
|
|
+ loadsearchwifi(1);
|
|
|
+ tabshow($("#mnusearchedwifi")[0],'mnusearchedwifi')
|
|
|
+ }
|
|
|
+ else{$("#cacheSearched").val("");$("#divsearchedwifi").html("没有搜索到wifi");}
|
|
|
+
|
|
|
+ }
|
|
|
+ catch(e){alert(e);}
|
|
|
+
|
|
|
+ },
|
|
|
+ // onfaile
|
|
|
+ error: function(jqXHR, textStatus, errorMsg){
|
|
|
+ // jqXHR object of XMLHttpRequest
|
|
|
+ // textStatus value: null、"timeout"、"error"、"abort"或"parsererror"
|
|
|
+ // errorMsg value: "Not Found"、"Internal Server Error"
|
|
|
+ alert("请求失败:" + errorMsg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ catch(e){alert(e.error);}
|
|
|
+ });
|
|
|
+ })();
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ </script>
|
|
|
+<script>
|
|
|
+
|
|
|
+
|
|
|
+ $(function(){
|
|
|
+ $('#setting_list').unbind("mousedown").bind("mousedown",function(){
|
|
|
+ var date = $("#id-date-picker-1").val().split('to');
|
|
|
+ var s_date = date[0];
|
|
|
+ var e_date = date[1];
|
|
|
+ var len_box = $(".time_box").find(".time_item").length;
|
|
|
+ if(len_box > 6){
|
|
|
+ alert("最多只能添加6个时段");
|
|
|
+ }else{
|
|
|
+ if(s_date!=""&&e_date!=""){
|
|
|
+ var datePickerOptions = {
|
|
|
+ "startDate":s_date,
|
|
|
+ "endDate":e_date
|
|
|
+ }
|
|
|
+ $("#quantum_list1").find("p").removeClass("pitchon");
|
|
|
+ $('#setting_list').unbind("datepicker-apply").bind('datepicker-apply',function(event,obj){
|
|
|
+ var date = $("#id-date-picker-1").val().split('to');
|
|
|
+ var s_date = date[0];
|
|
|
+ var e_date = date[1];
|
|
|
+ var checked_date = new Array();
|
|
|
+ var len = $(".setting .time_item").length;
|
|
|
+ for(var i=0;i<len;i++){
|
|
|
+ var json_check = {"startDate":$(".time_item").eq(i).find(".start_date").val(),"endDate":$(".time_item").eq(i).find(".end_date").val()};
|
|
|
+ checked_date.push(json_check);
|
|
|
+ }
|
|
|
+ var startDate = obj.value.split('to')[0];
|
|
|
+ var endDate = obj.value.split('to')[1];
|
|
|
+ var flag = true;
|
|
|
+ for(var j=0;j<checked_date.length;j++){
|
|
|
+ if(startDate < checked_date[j].startDate && endDate < checked_date[j].startDate){
|
|
|
+ console.log(startDate+":"+endDate)
|
|
|
+ console.log(flag+":1");
|
|
|
+ }else if(startDate > checked_date[j].endDate && endDate > checked_date[j].endDate){
|
|
|
+ console.log(flag+":2");
|
|
|
+ }else{
|
|
|
+ flag=false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(flag){
|
|
|
+ var obj = $("#quantum_list1");
|
|
|
+ if(obj.find(".pitchon").length){
|
|
|
+ var timeData = obj.find(".pitchon").map(function(i,span){
|
|
|
+ return $(span).attr("title");
|
|
|
+ }).toArray().join(',');
|
|
|
+ }else{
|
|
|
+ var timeData = -1;
|
|
|
+ }
|
|
|
+ var html = '<div class="time_item"><p class="tr_data"><span class="inp"><input type="text" class="start_date edit_time" readonly="readonly" value="'+startDate+'"></span><span class="inp"><input type="text" class="end_date edit_time" readonly="readonly" value = "'+endDate+'"></span></p><button class="btn_del">删除</button><input class="json_date" type="hidden" value = "'+timeData+'"></div>';
|
|
|
+ $(".setting .time_box").append(html);
|
|
|
+ $(".time_box .time_item .btn_del").bind("click",function(e){
|
|
|
+ $(this).parents(".time_item").remove();
|
|
|
+ });
|
|
|
+ $(".setting .tr_data").unbind("mousedown").bind("mousedown",function(){
|
|
|
+ var obj_tr = $(this);
|
|
|
+ var datePickerOptions_td = {
|
|
|
+ "startDate":s_date,
|
|
|
+ "endDate":e_date,
|
|
|
+ getValue: function(){
|
|
|
+ if (obj_tr.find(".start_date").val() && obj_tr.find(".end_date").val() )
|
|
|
+ return obj_tr.find(".start_date").val() + ' to ' + obj_tr.find(".end_date").val();
|
|
|
+ else
|
|
|
+ return '';
|
|
|
+ },
|
|
|
+ setValue: function(s,s1,s2){
|
|
|
+ obj_tr.find(".start_date").val(s1);
|
|
|
+ obj_tr.find(".end_date").val(s2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ obj_tr.unbind("datepicker-apply").bind('datepicker-apply',function(event,obj){
|
|
|
+ var date = $("#id-date-picker-1").val().split('to');
|
|
|
+ var s_date = date[0];
|
|
|
+ var e_date = date[1];
|
|
|
+ var checked_date = new Array();
|
|
|
+ var other_box =obj_tr.parent().siblings();
|
|
|
+ var len = other_box.length;
|
|
|
+ for(var i=0;i<len;i++){
|
|
|
+ var json_check = {"startDate":other_box.eq(i).find(".start_date").val(),"endDate":other_box.eq(i).find(".end_date").val()};
|
|
|
+ checked_date.push(json_check);
|
|
|
+ }
|
|
|
+ console.log(checked_date);
|
|
|
+ var startDate = obj.value.split('to')[0];
|
|
|
+ var endDate = obj.value.split('to')[1];
|
|
|
+ var flag = true;
|
|
|
+ console.log(checked_date);
|
|
|
+
|
|
|
+ if(flag){
|
|
|
+ var obj = $("#quantum_list1");
|
|
|
+ if(obj.find(".pitchon")){
|
|
|
+ var timeData = obj.find(".pitchon").map(function(i,span){
|
|
|
+ return $(span).attr("title");
|
|
|
+ }).toArray().join(',');
|
|
|
+ }else{
|
|
|
+ var timeData = -1;
|
|
|
+ }
|
|
|
+ obj_tr.find(".start_date").val(startDate);
|
|
|
+ obj_tr.find(".end_date").val(endDate);
|
|
|
+ console.log(timeData);
|
|
|
+ console.log(obj_tr);
|
|
|
+ obj_tr.parent().find(".json_date").val(timeData);
|
|
|
+ }else{alert("请选择正确时间!");}
|
|
|
+ });
|
|
|
+ obj_tr.dateRangePicker1(datePickerOptions_td);
|
|
|
+ $("#quantum_list1").find("p").removeClass("pitchon");
|
|
|
+ var chose_time = obj_tr.parent().find(".json_date").val();
|
|
|
+ console.log(chose_time);
|
|
|
+ if(chose_time!=-1&&chose_time!=""){
|
|
|
+ var chose_arr = chose_time.split(",");
|
|
|
+ for(var n=0;n<chose_arr.length;n++){
|
|
|
+ $("#quantum_list1 p").eq(chose_arr[n]).addClass("pitchon");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ alert("请选择正确时间!");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#setting_list').dateRangePicker1(datePickerOptions);
|
|
|
+ }else{
|
|
|
+ alert("请选择活动周期,在进行操作!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#btnsave").click(function(){
|
|
|
+ var checked_date = new Array();
|
|
|
+ var len = $(".setting .time_item").length;
|
|
|
+ var jsondata = "[";
|
|
|
+ for(var i=0;i<len;i++){
|
|
|
+ if(i == 0){
|
|
|
+ jsondata += '{"startDate":\"'+$(".time_item").eq(i).find(".start_date").val()+'\","endDate":\"'+$(".time_item").eq(i).find(".end_date").val()+'\","dehours":\"'+$(".time_item").eq(i).find(".json_date").val()+'\"}';
|
|
|
+ }else{
|
|
|
+ jsondata += ',{"startDate":\"'+$(".time_item").eq(i).find(".start_date").val()+'\","endDate":\"'+$(".time_item").eq(i).find(".end_date").val()+'\","dehours":\"'+$(".time_item").eq(i).find(".json_date").val()+'\"}';
|
|
|
+ }
|
|
|
+ }
|
|
|
+ jsondata += "]";
|
|
|
+ $("#sdayParting").val(jsondata);
|
|
|
+ var falg = validateMoney();
|
|
|
+ if(falg == false){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ //提示场景选择
|
|
|
+ var placelist = $("#placediv input[type='checkbox']:checked");
|
|
|
+ if(placelist.length == 0){
|
|
|
+ alert("场景为必填项,请选择!");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#validation-form input[name='totalBudget']").focus(function(){
|
|
|
+ $("#totalBudget_span").html("");
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#validation-form input[name='totalBudget']").blur(function(){
|
|
|
+ validateMoney();
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#btncancel").click(function(){
|
|
|
+ location.href = $(this).attr("href");
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+ function validateMoney(){
|
|
|
+ var reg=/^\d{1,8}\.?\d{0,2}$/;
|
|
|
+ var $this = $("#validation-form input[name='totalBudget']");
|
|
|
+ if($this.val().match(reg)!=null){
|
|
|
+ if(($this.val().indexOf('.') == -1 && $this.val().length > 8) || $this.val() <= 0){
|
|
|
+ $this.css("box-shadow","0 0 6px red").attr('title','总预算金额必须大于0且整数位最多8位');
|
|
|
+ $("#totalBudget_span").html("总预算金额必须大于0且整数位最多8位").css("color","red");
|
|
|
+ return false;
|
|
|
+ }if($this.val() > parseInt($("#budget").val())){
|
|
|
+ $this.css("box-shadow","0 0 6px red").attr('title','总预算不能大于订单总预算');
|
|
|
+ $("#totalBudget_span").html("总预算不能大于订单总预算").css("color","red");
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ $this.css("box-shadow","none").attr('title','');
|
|
|
+ $("#totalBudget_span").html("");
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ $this.css("box-shadow","0 0 6px red").attr('title','总预算金额必须大于0整数位最多8位且最多有2位小数');
|
|
|
+ $("#totalBudget_span").html("总预算金额必须大于0整数位最多8位且最多有2位小数").css("color","red");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+</script>
|
|
|
+</@override>
|
|
|
+<@extends name="/common/page.ftl"/>
|
|
|
+
|