123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- <!-- 添加推广明细页面 -->
- {extend name="public/layout"}
- {block name="body"}
- <link rel="stylesheet" href="__LAYUI__/layui/css/layui.css" media="all">
- <link rel="stylesheet" href=" /static/css/common.css">
- <script src="/static/js/jquery.min.js"></script>
- <style>
- body {
- padding-bottom: 40px;
- background-color: #F3F3F3;
- }
- .mainbox {
- display: block;
- width: 900px;
- padding-top: 20px;
- margin: 0 auto;
- }
- .titbox {
- padding: 15px 10px;
- border: 1px solid #F0F0F0;
- background: #FCFCFC;
- margin-bottom: 10px;
- position: relative;
- line-height: 28px;
- }
- .goback {
- display: block;
- cursor: pointer;
- color: #000;
- background: url(__STATIC__/img/btn_bg.gif) repeat-x;
- border: 1px solid #C0C0C0;
- padding: 0 12px;
- *padding: 0 6px;
- height: 28px;
- width: 84px;
- }
- .maintable{table-layout:fixed;_width:100%;width:100%; border:1px solid #DFDFDF;
- border-collapse: separate !important;
- background-color:#FFF; border-right:0; border-bottom:2px solid #DFDFDF;}
- .maintable th{ background-color:#F2F3F7; border-right:1px solid #DFDFDF; border-bottom:1px solid #DFDFDF; line-height:25px; padding:5px; text-align:center; font-family:Arial; font-size:12px; letter-spacing:1px; color:#333}
- .maintable td{border-right:1px solid #DFDFDF; border-bottom:1px solid #EAEAEC; padding:7px; line-height:25px; font-size:13px; position:relative;}
- .tablelist th,.tablelist td{overflow: hidden;white-space: nowrap;text-overflow: ellipsis;word-wrap: break-word;}
- .tbcenter td{ text-align:center}
- .maintable h2{border-bottom:1px solid #999; margin:0; font-weight:bold; font-size:15px; margin-bottom:10px; margin-top:5px; text-indent:3px; font-family:Arial; letter-spacing:1px;}
- .maintable td label{ cursor:pointer}
- .addbtn {
- border: none;
- width: 98px;
- height: 30px;
- color: #fff;
- font-size: 14px;
- font-weight: bold;
- text-align: center;
- background: url(__STATIC__/img/icon-sub.png) no-repeat;
- cursor: pointer;
- }
- .goback1 {
- cursor: pointer;
- color: #000;
- background: url(__STATIC__/img/btn_bg.gif) repeat-x;
- border: 1px solid #C0C0C0;
- padding: 0 12px;
- *padding: 0 6px;
- height: 28px;
- width: 84px;
- }
- .sourcebox input[type=radio]{
- position:relative;
- top:2px;
- }
- </style>
- <body class="clearfix">
- <div class="mainbox">
- <div class="titbox clearfix">
- <div class="left">你正在添加一条新记录......</div>
- <div class="right">
- <div class="left">点击这里返回编辑列表:</div>
- <button class="left goback" type="button">返回</button>
- </div>
- </div>
- <div style="width:900px;">
- <table class="maintable" border="0" cellspacing="0" cellpadding="0">
- <tbody>
- <tr><th>添加投放消费明细</th></tr>
- <!-- <tr><td>隶属企业:<input name="cpid" id="cpid27" type="radio" value="27" title="{$company_name}"><label for="cpid27" title="{$company_name}">{$company_name}</label> </td></tr> -->
- <tr>
- <td>
- <div class="clearfix sourcebox" style="line-height:25px;">
- <div class="left">来源渠道:</div>
- {volist name="soudata" id="vo" key="k"}
- <input name="source_id" type="radio" value="{$vo.id}" id="tid{$k}" title="{$vo.name}">
- <label for="tid{$k}" title="{$vo.name}">{$vo.name}</label>
- {/volist}
- </div>
- </td>
- </tr>
- <tr><td>投放时间:<input id="launch_time" name="launch_time" class="txtbox" type="text" readonly="readonly"></td></tr>
- <tr><td>消费金额:<input id="money" name="money" type="text" class="txtbox" size="15" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')" autocomplete="off"></td></tr>
- <tr><td>展现次数:<input id="show" name="show" type="text" class="txtbox" size="15" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')" autocomplete="off"></td></tr>
- <tr><td>点击总数:<input id="click" name="click" type="text" class="txtbox" size="15" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')" autocomplete="off"></td></tr>
- <tr><td>默认时间:<span class="nowtime"></span> 录入人:{$empname}<input id="userid" name="userid" type="hidden" value="1662"></td></tr>
- <tr>
- <td style="padding-left:70px">
- <input class="addbtn" type="submit" value=" 提交 ">
- <span style="padding-left:100px;">
- <input type="button" value=" 返回 " class="goback1">
- </span>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </body>
- <script src="__LAYUI__/layui/layui.js"></script>
- {/block}{block name="js"}
- <script type="text/javascript">
- layui.config({
- base: '__LAYUI__/',
- urlbase: '/sys'
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['table', 'laydate'], function () {
- var table = layui.table, laydate = layui.laydate,
- $ = layui.$;
- let date=new Date();
- let time=date.getFullYear()+'/'+(date.getMonth()*1+1)+'/'+date.getDate()+' '+date.getHours()+':'+date.getMinutes()+':'+date.getSeconds();
- $('.nowtime').html(time);
- laydate.render({
- elem: '#launch_time'
- , max: 0
- , trigger: 'click'
- });
- $('.addbtn').click(function(){
- //if($('input:radio[name="cpid"]:checked').val()==null){alert("提示:请选择的隶属公司!");return false;}
- if($('input:radio[name="source_id"]:checked').val()==null){alert("提示:请选择的来源渠道!");return false;}
- if($('input[name="launch_time"]').val()==""){alert("提示:请选择投放时间!");return false;}
- if($('input[name="money"]').val()==""){alert("提示:请输入消费金额!");$('input[name="money"]').focus();return false;}
- if($('input[name="show"]').val()==""){alert("提示:请输入展现次数!");$('input[name="show"]').focus();return false;}
- if($('input[name="click"]').val()==""){alert("提示:请输入点击总数!");$('input[name="click"]').focus();return false;}
- $.ajax({
- url: '{:url("ManagerEmp/add_extension")}'
- , data: {
- source_id:$('input:radio[name="source_id"]:checked').val(),//
- launch_time:$('input[name="launch_time"]').val(),//
- money:$('input[name="money"]').val(),
- show:$('input[name="show"]').val(),
- click:$('input[name="click"]').val()
- }
- , type: 'post'
- , success: function (res) {
- if (res.code == 0) {
- let hobj = GetRequest();
- window.parent.closemsg(hobj.type);
- }else if(res.code == 403){
- $(".exitbtn").trigger("click");
- }else{
- alert(res.msg)
- }
- }
- });
- })
- })
- $('.goback').click(function(){
- let hobj = GetRequest();
- window.parent.closemsg(hobj.type);
- })
- $('.goback1').click(function(){
- let hobj = GetRequest();
- window.parent.closemsg(hobj.type);
- })
- function GetRequest() {
- var url = location.search; //获取url中"?"符后的字串
- var theRequest = new Object();
- if (url.indexOf("?") != -1) {
- var str = url.substr(1);
- strs = str.split("&");
- for (var i = 0; i < strs.length; i++) {
- theRequest[strs[i].split("=")[0]] = (strs[i].split("=")[1]);
- }
- }
- return theRequest;
- }
- </script>
- {/block}
|