| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.http.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="../css/init.css" />
- <title>添加新通知</title>
- <style>
- .bj-title {
- color: #ffffff;
- background-color: #00a1cb;
- padding: 8px 35px 8px 14px;
- text-shadow: 0 1px 0 rgba(179, 142, 142, 0.5);
- border: 1px solid #e5e5e5;
- }
- .bjCon table th {
- padding: 5px 8px 5px 0;
- text-align: right;
- width: 30%;
- }
- .bjCon table td {
- padding: 6px 0 5px 10px;
- text-align: left;
- color: #717171;
- line-height: 200%;
- position: relative;
- }
- .bjCon table td input[type=text] {
- border: 1px solid #e5e5e5;
- width: 240px;
- outline: 0;
- margin-right: 5px;
- padding-left: 10px;
- }
- .bjCon table td textarea {
- border: 1px solid #e5e5e5;
- resize: none;
- width: 80%;
- vertical-align: middle;
- outline: none;
- }
- .bjCon table td select {
- width: 240px;
- background-color: #ffffff;
- background-image: none !important;
- filter: none !important;
- border: 1px solid #e5e5e5;
- outline: none;
- height: 34px !important;
- line-height: 30px;
- margin-right: 5px;
- padding-left: 10px;
- }
- .bjCon {
- padding-top: 20px;
- border: 1px solid #e5e5e5;
- border-top: 0;
- }
- .bjright table td input {
- padding-left: 44px !important;
- }
- .tub {
- position: absolute;
- left: 18px;
- top: 13px;
- font-size: 18px;
- color: #ccc;
- }
- .box {
- width: 55%;
- margin: 0 auto;
- margin-top: 5%;
- }
- .box .btop {
- height: 35px;
- background: #00a1cb;
- color: #fff;
- line-height: 35px;
- padding: 0 15px;
- }
- .btl {
- float: left;
- margin: 0;
- }
- .btr {
- float: right;
- margin: 0;
- cursor: pointer;
- }
- .boxCon {
- width: 100%;
- min-height: 400px;
- background: #fff;
- text-align: center;
- padding: 10px 15px;
- height: auto;
- overflow-y: auto;
- }
- .boxCon1 {
- width: 100%;
- min-height: 100px;
- background: #fff;
- text-align: center;
- padding: 10px 15px;
- height: auto;
- overflow-y: auto;
- }
- .model {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- height: 100%;
- width: 100%;
- background: rgba(0, 0, 0, 0.48);
- z-index: 100;
- display: none;
- }
- .model1 {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- height: 100%;
- width: 100%;
- background: rgba(0, 0, 0, 0.48);
- z-index: 100;
- display: none;
- }
- .tab-content {
- text-align: left;
- height: 200px;
- }
- .drfs {
- display: none;
- }
- .radio-inline input[type=radio] {
- margin-top: 5px;
- }
- .daoHang {
- border-bottom: 1px solid #ccc;
- margin-bottom: 20px;
- }
- .layui-laydate-footer .laydate-footer-btns .laydate-btns-clear:hover,
- .layui-laydate-footer .laydate-footer-btns .laydate-btns-now:hover,
- .layui-laydate-footer .laydate-footer-btns .laydate-btns-confirm:hover {
- color: #00a1cb;
- }
- </style>
- </head>
- <body>
- <div class="container-fluid">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn><i class="syIcon"></i>位置:<a id="ReIndex">首页</a>><a href="javaScript:;">通知查询</a>><a href="" class="nowPosition">添加新通知</a></sapn>
- </div>
- <div class="dhRight"><a href="" title="刷新"><i class="fa fa-refresh"></i></a></div>
- </div>
- <form class="container-fluid2" enctype="multipart/form-data">
- <div class="row-fluid clearfix">
- <div class="bjleft col-md-6" style="height:444px;">
- <div class="bj-title">
- <i class="fa fa-user"></i> 基本信息
- </div>
- <div class="bjCon" style="height:444px;">
- <table style="width: 100%;">
- <tr>
- <th>所属类别:</th>
- <td>
- <select name="TaskCategoryId" class="leiBie"></select><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>通知标题:</th>
- <td><input type="text" class="tzTitle" name="Name" /><span>(必填)</span></td>
- </tr>
- <tr>
- <th>通知模板:</th>
- <td>
- <select name="voicetempid" class="voicetempid"></select>
- </td>
- </tr>
- <tr>
- <th>通知内容:</th>
- <td>
- <textarea class="tzCon" name="TaskContent" rows="2" cols="" id="TaskContent"></textarea>
- <span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>试听通知:</th>
- <td>
- <button class="btns try_listen" style="padding: 3px 10px;" type="button"><i class="fa fa-volume-up" style="margin-right: 5px;"></i>试听</button>
- </td>
- </tr>
- <tr>
- <th>执行方式:</th>
- <td>
- <div class="radio-inline ">
- <label>
- <input type="radio" name="IsExcuteNow" id="way1" value="true" checked="checked"> 立即执行
- </label>
- </div>
- <div class="radio-inline">
- <label>
- <input type="radio" name="IsExcuteNow" id="way2" value="false"> 定时执行
- </label>
- </div>
- </td>
- </tr>
- <tr>
- <th>失败重试次数:</th>
- <td><input type="text" class="failCount" name="LoopTime" value="0" /><span>(必填)</span></td>
- </tr>
- <tr>
- <th>通知号码:</th>
- <td>
- <button class="btns set_called" style="padding: 3px 10px;" type="button"><i class="fa fa-wrench" style="margin-right: 5px;"></i>设置</button>
- <span class="drfs" style="background-color: #ed4e2a;font-size: 12px;padding: 0 3px;margin-left: 5px;color: #fff;"></span>
- <input type="hidden" name="importtype" value="" id="importtype" />
- </td>
- </tr>
- </table>
- <br />
- </div>
- </div>
- <div class="bjright col-md-6">
- <div class="bj-title">
- <i class="fa fa-calendar"></i> 发送时间
- </div>
- <div class="bjCon" style="height:444px;">
- <table style="width: 100%;">
- <tr>
- <th>开始日期:</th>
- <td>
- <i class="fa fa-calendar tub"></i>
- <input type="text" id="startdate" readonly="readonly" name="planstartdate" /><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>结束日期:</th>
- <td>
- <i class="fa fa-calendar tub"></i>
- <input type="text" id="enddate" readonly="readonly" name="planenddate" /><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>开始时间段1:</th>
- <td>
- <i class="fa fa-calendar tub"></i>
- <input type="text" id="usestrTime1" readonly="readonly" name="StartTime1" /><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>结束时间段1:</th>
- <td>
- <i class="fa fa-calendar tub"></i>
- <input type="text" id="useendTime1" readonly="readonly" name="EndTime1" /><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>开始时间段2:</th>
- <td>
- <i class="fa fa-calendar tub"></i>
- <input type="text" id="usestrTime2" readonly="readonly" name="StartTime2" /><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>结束时间段2:</th>
- <td>
- <i class="fa fa-calendar tub"></i>
- <input type="text" id="useendTime2" readonly="readonly" name="EndTime2" /><span>(必填)</span>
- </td>
- </tr>
- </table>
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- <br />
- </div>
- </div>
- </div>
- <p style="text-align: center; padding: 20px 0;">
- <button class="btns sureCun" type="button">保存</button>
- <button class="btns return" type="button">取消</button>
- </p>
- <!--设置被叫号码-->
- <div class="model addCall">
- <div class="box">
- <div class="btop clearfix">
- <p class="btl">设置被叫号码</p>
- <p class="btr addcbtr"><i class="fa fa-remove"></i></p>
- </div>
- <div class="boxCon">
- <ul class="nav nav-tabs" role="tablist">
- <li class="active"><a href="#import_from_telnos" role="tab" data-toggle="tab"><i class="fa fa-file"></i>Excel导入</a></li>
- <li><a href="#import_from_hmd" role="tab" data-toggle="tab"><i class="fa fa-table"></i>文本导入</a></li>
- <li><a href="#import_from_file" role="tab" data-toggle="tab"><i class="fa fa-reorder"></i>txt文件导入</a></li>
- </ul>
- <div class="tab-content">
- <div class="tab-pane fade active in" id="import_from_telnos">
- <a href="/VoiceNotification/files/Excel导入模板.xls">下载Excel模板</a>
- <br />
- 支持的Excel格式,每行一个号码,最多10万个号码:
- <br />
- <br />
- <input type="file" name="fileField" id="fileField" placeholder="号码列表" />
- </div>
- <div class="tab-pane fade" id="import_from_hmd">
- <br />
- 支持的文本文件格式,每行一个号码,最多10万个号码:
- <br />
- <br />
- <textarea class="haoDuan" name="PhoneList" rows="7" style="width: 100%; resize: none;"></textarea>
- </div>
- <div class="tab-pane fade" id="import_from_file">
- <br />
- 支持的文本文件格式,每行一个号码,最多10万个号码:
- <br />
- <br />
- <input type="file" name="fileField2" id="fileField2" placeholder="号码列表" />
- </div>
- </div>
- <div style="text-align: right;"><button class="btns queren" type="button">确认</button></div>
- </div>
- </div>
- </div>
- <div class="model1">
- <div class="box">
- <div class="btop clearfix">
- <p class="btl">试听通知</p>
- <p class="btr closeaddListen"><i class="fa fa-remove"></i></p>
- </div>
- <div class="boxCon1">
- <table style="width: 40%; margin:0 auto;">
- <tr>
- <th>请添加试听号码:</th>
- <td>
- <input type="text" class="tzTitle" name="listenphone" id="listenphone" /><span>(必填)</span>
- </td>
- </tr>
- </table>
- <p style="text-align: center; padding: 20px 0;">
- <button class="btns tryListen" type="button">加入试听队列</button>
- </p>
- </div>
- </div>
- </div>
- </form>
- </div>
- <script src="../js/jquery.form.min.js"></script>
- <script src="../js/laydate/laydate.js"></script>
- <script src="../js/adjustHeight.js"></script>
- <script>
- var token = $.cookie("token");
- var ImportType;//号码导入方式
- var haoma;
- //类别
- function LB(obj) {
- obj.empty();
- // $("<option value='-1'>所有分类</option>").appendTo(obj);
- $.getJSON(huayi.config.callcenter_url + "CallPlan/GetCategoryAllList2", {
- "token": $.cookie("token")
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.id + "'>" + n.name + "</option>").appendTo(obj);
- })
- }
- })
- }
- function loadContent(obj) {
- obj.empty();
- $("<option value='-1'>请选择通知模板</option>").appendTo(obj);
- $.getJSON(huayi.config.callcenter_url + "CallPlan/GetVoiceTempTitleList", {
- "token": $.cookie("token")
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.id + "'>" + n.title + "</option>").appendTo(obj);
- });
- obj.change(function () {
- var value = this.value;
- if (value != '-1') {
- $.getJSON(huayi.config.callcenter_url + "CallPlan/GetVoiceTemp", {
- token: $.cookie("token"),
- id: value
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- $(".tzCon").val(data.data.content);
- }
- });
- }
- });
- }
- });
- }
- $(document).ready(function () {
- laydate.render({
- elem: '#startdate',
- type: 'date',
- theme: '#00a1cb',
- value: new Date()
- });
- laydate.render({
- elem: '#enddate',
- type: 'date',
- theme: '#00a1cb',
- value: new Date()
- });
- laydate.render({
- elem: '#usestrTime1',
- type: 'time',
- theme: '#00a1cb',
- value: new Date("2017/01/01 09:00:00")
- });
- laydate.render({
- elem: '#useendTime1',
- type: 'time',
- theme: '#00a1cb',
- value: new Date("2017/01/01 12:00:00")
- });
- laydate.render({
- elem: '#usestrTime2',
- type: 'time',
- theme: '#00a1cb',
- value: new Date("2017/01/01 14:00:00")
- });
- laydate.render({
- elem: '#useendTime2',
- type: 'time',
- theme: '#00a1cb',
- value: new Date("2017/01/01 18:00:00")
- });
- $('.set_called').click(function () {
- $('.addCall').show()
- })
- $('.addcbtr').click(function () {
- $('.addCall').hide();
- })
- $('.try_listen').click(function () {
- $('.model1').show()
- })
- $('.closeaddListen').click(function () {
- $('#listenphone').val('');
- $('.model1').hide()
- })
- $('.tryListen').click(function () {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
- async: true,
- dataType: 'json',
- data: {
- token: $.cookie("token"),
- phone: $('#listenphone').val()
- },
- success: function (result) {
- if (result.state.toLowerCase() == "success") {
- var fix = result.data.fix;
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "CallPlan/TryListen",
- async: true,
- dataType: 'json',
- data: {
- token: $.cookie("token"),
- phone: $('#listenphone').val(),
- text: $('#TaskContent').val(),
- fix: fix
- },
- success: function (res) {
- if (result.state.toLowerCase() == "success") {
- layer.msg(res.message);
- $('#listenphone').val('');
- $('.model1').hide()
- }
- }
- });
- }
- }
- });
- })
- LB($('.leiBie'))
- loadContent($('.voicetempid'));
- $('.sureCun').click(function () {
- if ($('.tzTitle').val() == '') {
- layer.confirm('请输入标题!', {
- btn: ['确定']
- });
- return;
- } else if ($('.tzCon').val() == '') {
- layer.confirm('请输入内容!', {
- btn: ['确定']
- });
- return;
- } else if ($('.failCount').val() == '') {
- layer.confirm('请输入失败次数!', {
- btn: ['确定']
- });
- return;
- } else if ($('input[name="IsExcuteNow"]:checked').val() == 'false') {
- if ($('#usestrTime1').val() == '') {
- layer.confirm('请选择开始时间段1!', {
- btn: ['确定']
- });
- return;
- } else if ($('#useendTime1').val() == '') {
- layer.confirm('请选择结束时间段1!', {
- btn: ['确定']
- });
- return;
- } else if ($('#usestrTime2').val() == '') {
- layer.confirm('请选择开始时间段2!', {
- btn: ['确定']
- });
- return;
- } else if ($('#useendTime2').val() == '') {
- layer.confirm('请选择结束时间段2!', {
- btn: ['确定']
- });
- return;
- }
- formSubmit();
- } else {
- formSubmit();
- }
- })
- $('.queren').click(function () {
- $('.drfs').show();
- if ($('#import_from_telnos').hasClass('active')) {
- ImportType = 4;//文件导入
- $('.drfs').html('选择Excel导入');
- } else if ($('#import_from_hmd').hasClass('active')) {
- ImportType = 2;//号段导入
- haoma = $('.haoDuan').val();
- $('.drfs').html('选择文本导入');
- } else if ($('#import_from_file').hasClass('active')) {
- ImportType = 1;//号码列表导入
- haoma = $('.haomaList').val();
- $('.drfs').html('选择文件导入');
- }
- console.log(ImportType);
- $("#importtype").val(ImportType);
- $('.addCall').hide();
- })
- $('.return').click(function () {
- top.$("iframe:visible")[0].src = "VoiceNotification/tongZhiChaXun.html";
- });
- function formSubmit() {
- $(".container-fluid2")
- .attr("method", "post")
- .attr("action", huayi.config.callcenter_url + "Callplan/CreateOrUpdate")
- .attr("enctype", "multipart/form-data");
- $(".container-fluid2").ajaxSubmit({
- dataType: "json",
- data: { token: $.cookie("token") },
- success: function (res) {
- if (res.state == "success") {
- top.$("iframe:visible")[0].src = "VoiceNotification/tongZhiChaXun.html";
- } else {
- layer.msg(res.message);
- }
- }
- });
- }
- });
- </script>
- </body>
- </html>
|