| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>黑名单管理</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <script src="../js/laydate/laydate.js"></script>
- <style>
- .greetings{
- margin-top: 20px;
- }
- .greetings label{
- text-align: right;
- }
- .greetings ul{
- margin: 0;
- padding: 0;
- }
- .greetings li{
- list-style: none;
- }
- .text_require {
- color: red;
- vertical-align: middle;
- font-weight: 900;
- }
- .time-box{
- position: relative;
- }
- i.tub {
- position: absolute;
- right: 26px;
- top: 8px;
- font-size: 18px;
- color: rgb(26, 179, 148);
- }
- .greetings .radio-inline input[type="radio"] {
- margin-top: 4px;
- }
- .greetings textarea {
- resize: none;
- }
- .greetings .form-horizontal .radio-inline {
- padding-top: 0;
- }
- #greetingSave{
- background: rgb(26, 179, 148);
- color: #fff;
- }
- </style>
- </head>
- <body class="gray-bg">
- <div class="container greetings">
- <ul class="row clearfix form-horizontal">
- <li class="form-group">
- <label for="greetingTitle" class="col-md-2"><b class="text_require">*</b>电话号码</label>
- <div class="col-md-10">
- <input id="TelNum" class="form-control" type="text" autofocus="true" autocomplete="off" />
- </div>
- </li>
- <li class="form-group">
- <label for="greetingTimes" class="col-md-2"><b class="text_require">*</b>拉黑时限</label>
- <div class="col-md-10 time-box">
- <i class="tub fa fa-calendar"></i>
- <input class="form-control" type="text" id="greetingTimes" autocomplete="off">
- </div>
- </li>
- <li class="form-group">
- <label for="greetingRemark" class="col-md-2">屏蔽说明</label>
- <div class="col-md-10">
- <textarea id="Pb" class="form-control" rows="7"></textarea>
- </div>
- </li>
- </ul>
- <div class="form-group row clearfix" style="text-align: center;">
- <div class="col-md-offset-2 col-md-10">
- <button class="btn " id="greetingSave" type="button" onclick="addedit()">保存</button>
- </div>
- </div>
- <input type="hidden" id="oldname"/>
- <input type="hidden" id="newname"/>
- <input type="hidden" id="wavpath"/>
- </div>
- <script>
- $(document).ready(function() {
- laydate.render({
- elem: '#greetingTimes',
- range: '~',
- type: 'datetime',
- //max : 31,
- min: 0,
- theme: '#1ab394',
- });
- })
- //新增或者编辑
- function addedit() {
- var telreg = /^\d{1,12}$/;
- if(!telreg.test($.trim($("#TelNum").val()))) {
- layer.confirm('请输入有效的电话号码', {
- icon: 2,
- btn: ['确定'] //按钮
- });
- return;
- }
- if(!$("#greetingTimes").val()) {
- layer.confirm('请选择时间', {
- icon: 2,
- btn: ['确定'] //按钮
- });
- return;
- }
- /*发送请求*/
- $.post(huayi.config.callcenter_url + "Callblack/AddBlack", {
- blackid: $("#ID").val(),
- telphone: $("#TelNum").val(),
- // settime: $("#StartTime").val(),
- // removetime: $("#EndTime").val(),
- settime: $('#greetingTimes').val() && $('#greetingTimes').val().split(' ~ ')[0],//生效时间
- removetime: $('#greetingTimes').val() && $('#greetingTimes').val().split(' ~ ')[1],//失效时间
- des: $("#Pb").val(),
- token: $.cookie("token")
- }, function(result) {
- result = JSON.parse(result);
- if(result.state.toLowerCase() == "success") {
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- parent.layer.msg("保存");
- parent.initTable();
- }
- })
- }
- </script>
- </body>
- </html>
|