12345市长热线标准版-前端

addTongZhi.html 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <script src="../Script/Common/huayi.load.js"></script>
  6. <script src="../Script/Common/huayi.http.js"></script>
  7. <script src="../Script/Common/huayi.config.js"></script>
  8. <link rel="stylesheet" href="../css/init.css" />
  9. <title>添加新通知</title>
  10. <style>
  11. .bj-title {
  12. color: #ffffff;
  13. background-color: #00a1cb;
  14. padding: 8px 35px 8px 14px;
  15. text-shadow: 0 1px 0 rgba(179, 142, 142, 0.5);
  16. border: 1px solid #e5e5e5;
  17. }
  18. .bjCon table th {
  19. padding: 5px 8px 5px 0;
  20. text-align: right;
  21. width: 30%;
  22. }
  23. .bjCon table td {
  24. padding: 6px 0 5px 10px;
  25. text-align: left;
  26. color: #717171;
  27. line-height: 200%;
  28. position: relative;
  29. }
  30. .bjCon table td input[type=text] {
  31. border: 1px solid #e5e5e5;
  32. width: 240px;
  33. outline: 0;
  34. margin-right: 5px;
  35. padding-left: 10px;
  36. }
  37. .bjCon table td textarea {
  38. border: 1px solid #e5e5e5;
  39. resize: none;
  40. width: 80%;
  41. vertical-align: middle;
  42. outline: none;
  43. }
  44. .bjCon table td select {
  45. width: 240px;
  46. background-color: #ffffff;
  47. background-image: none !important;
  48. filter: none !important;
  49. border: 1px solid #e5e5e5;
  50. outline: none;
  51. height: 34px !important;
  52. line-height: 30px;
  53. margin-right: 5px;
  54. padding-left: 10px;
  55. }
  56. .bjCon {
  57. padding-top: 20px;
  58. border: 1px solid #e5e5e5;
  59. border-top: 0;
  60. }
  61. .bjright table td input {
  62. padding-left: 44px!important;
  63. }
  64. .tub {
  65. position: absolute;
  66. left: 18px;
  67. top: 13px;
  68. font-size: 18px;
  69. color: #ccc;
  70. }
  71. .box {
  72. width: 55%;
  73. margin: 0 auto;
  74. margin-top: 5%;
  75. }
  76. .box .btop {
  77. height: 35px;
  78. background: #00a1cb;
  79. color: #fff;
  80. line-height: 35px;
  81. padding: 0 15px;
  82. }
  83. .btl {
  84. float: left;
  85. margin: 0;
  86. }
  87. .btr {
  88. float: right;
  89. margin: 0;
  90. cursor: pointer;
  91. }
  92. .boxCon {
  93. width: 100%;
  94. min-height: 400px;
  95. background: #fff;
  96. text-align: center;
  97. padding: 10px 15px;
  98. height: auto;
  99. overflow-y: auto;
  100. }
  101. .model {
  102. position: fixed;
  103. top: 0;
  104. right: 0;
  105. bottom: 0;
  106. left: 0;
  107. height: 100%;
  108. width: 100%;
  109. background: rgba(0, 0, 0, 0.48);
  110. z-index: 100;
  111. display: none;
  112. }
  113. .tab-content {
  114. text-align: left;
  115. height: 200px;
  116. }
  117. .drfs {
  118. display: none;
  119. }
  120. .radio-inline input[type=radio]{
  121. margin-top: 5px;
  122. }
  123. .daoHang{
  124. border-bottom: 1px solid #ccc;
  125. margin-bottom: 20px;
  126. }
  127. .layui-laydate-footer .laydate-footer-btns .laydate-btns-clear:hover,
  128. .layui-laydate-footer .laydate-footer-btns .laydate-btns-now:hover,
  129. .layui-laydate-footer .laydate-footer-btns .laydate-btns-confirm:hover{
  130. color: #00a1cb;
  131. }
  132. </style>
  133. </head>
  134. <body>
  135. <div class="container-fluid">
  136. <div class="daoHang clearfix">
  137. <div class="dhLeft">
  138. <sapn><i class="syIcon"></i>位置:<a id="ReIndex">首页</a>&gt;<a href="javaScript:;">通知查询</a>&gt;<a href="" class="nowPosition">添加新通知</a></sapn>
  139. </div>
  140. <div class="dhRight"><a href="" title="刷新"><i class="fa fa-refresh"></i></a></div>
  141. </div>
  142. <form class="container-fluid2" enctype="multipart/form-data">
  143. <div class="row-fluid clearfix">
  144. <div class="bjleft col-md-6">
  145. <div class="bj-title">
  146. <i class="fa fa-user"></i> 基本信息
  147. </div>
  148. <div class="bjCon">
  149. <table style="width: 100%;">
  150. <tr>
  151. <th>所属类别:</th>
  152. <td>
  153. <select name="TaskCategoryId" class="leiBie">
  154. </select><span>(必填)</span>
  155. </td>
  156. </tr>
  157. <tr>
  158. <th>通知标题:</th>
  159. <td><input type="text" class="tzTitle" name="Name" /><span>(必填)</span></td>
  160. </tr>
  161. <tr>
  162. <th>通知内容:</th>
  163. <td>
  164. <textarea class="tzCon" name="TaskContent" rows="2" cols=""></textarea>
  165. <span>(必填)</span>
  166. </td>
  167. </tr>
  168. <tr>
  169. <th>执行方式:</th>
  170. <td>
  171. <div class="radio-inline ">
  172. <label>
  173. <input type="radio" name="IsExcuteNow" id="way1" value="option1" checked="checked"> 立即执行
  174. </label>
  175. </div>
  176. <div class="radio-inline">
  177. <label>
  178. <input type="radio" name="IsExcuteNow" id="way2" value="option2"> 定时执行
  179. </label>
  180. </div>
  181. </td>
  182. </tr>
  183. <tr>
  184. <th>失败重试次数:</th>
  185. <td><input type="text" class="failCount" name="LoopTime" /><span>(必填)</span></td>
  186. </tr>
  187. <tr>
  188. <th>通知号码:</th>
  189. <td>
  190. <button class="btns set_called" style="padding: 3px 10px;" type="button"><i class="fa fa-wrench" style="margin-right: 5px;"></i>设置</button>
  191. <span class="drfs" style="background-color: #ed4e2a;font-size: 12px;padding: 0 3px;margin-left: 5px;color: #fff;"></span>
  192. <input type="hidden" name="importtype" value="" id="importtype" />
  193. </td>
  194. </tr>
  195. </table>
  196. <br />
  197. </div>
  198. </div>
  199. <div class="bjright col-md-6">
  200. <div class="bj-title">
  201. <i class="fa fa-calendar"></i> 发送时间
  202. </div>
  203. <div class="bjCon ">
  204. <table style="width: 100%;">
  205. <tr>
  206. <th>外呼开始时间段1:</th>
  207. <td>
  208. <i class="fa fa-calendar tub"></i>
  209. <input type="text" id="usestrTime1" readonly="readonly" name="StartTime1" /><span>(必填)</span>
  210. </td>
  211. </tr>
  212. <tr>
  213. <th>外呼结束时间段1:</th>
  214. <td>
  215. <i class="fa fa-calendar tub"></i>
  216. <input type="text" id="useendTime1" readonly="readonly" name="EndTime1" /><span>(必填)</span>
  217. </td>
  218. </tr>
  219. <tr>
  220. <th>外呼开始时间段2:</th>
  221. <td>
  222. <i class="fa fa-calendar tub"></i>
  223. <input type="text" id="usestrTime2" readonly="readonly" name="StartTime2" /><span>(必填)</span>
  224. </td>
  225. </tr>
  226. <tr>
  227. <th>外呼结束时间段2:</th>
  228. <td>
  229. <i class="fa fa-calendar tub"></i>
  230. <input type="text" id="useendTime2" readonly="readonly" name="EndTime2" /><span>(必填)</span>
  231. </td>
  232. </tr>
  233. </table>
  234. <br />
  235. <br />
  236. <br />
  237. <br />
  238. <br />
  239. <br />
  240. <br />
  241. </div>
  242. </div>
  243. </div>
  244. <p style="text-align: center; padding: 20px 0;">
  245. <button class="btns sureCun" type="button">保存</button>
  246. <button class="btns return" type="button">取消</button>
  247. </p>
  248. <!--设置被叫号码-->
  249. <div class="model addCall">
  250. <div class="box">
  251. <div class="btop clearfix">
  252. <p class="btl">设置被叫号码</p>
  253. <p class="btr addcbtr"><i class="fa fa-remove"></i></p>
  254. </div>
  255. <div class="boxCon">
  256. <ul class="nav nav-tabs" role="tablist">
  257. <li class="active"><a href="#import_from_telnos" role="tab" data-toggle="tab"><i class="fa fa-file"></i>文件导入</a></li>
  258. <li><a href="#import_from_hmd" role="tab" data-toggle="tab"><i class="fa fa-table"></i>文本导入</a></li>
  259. <li><a href="#import_from_file" role="tab" data-toggle="tab"><i class="fa fa-reorder"></i>Excel导入</a></li>
  260. </ul>
  261. <div class="tab-content">
  262. <div class="tab-pane fade active in" id="import_from_telnos">
  263. <br />
  264. 支持的文本文件格式,每行一个号码,最多10万个号码:
  265. <br />
  266. <br />
  267. <input type="file" name="fileField2" id="fileField2" placeholder="号码列表" />
  268. </div>
  269. <div class="tab-pane fade" id="import_from_hmd">
  270. <br />
  271. 支持的文本文件格式,每行一个号码,最多10万个号码:
  272. <br />
  273. <br />
  274. <textarea class="haoDuan" name="PhoneList" rows="7" style="width: 100%; resize: none;"></textarea>
  275. </div>
  276. <div class="tab-pane fade" id="import_from_file">
  277. <br />
  278. 支持的Excel格式,每行一个号码,最多10万个号码:
  279. <br />
  280. <br />
  281. <input type="file" name="fileField" id="fileField" placeholder="号码列表" />
  282. </div>
  283. </div>
  284. <div style="text-align: right;"><button class="btns queren" type="button">确认</button></div>
  285. </div>
  286. </div>
  287. </div>
  288. </form>
  289. </div>
  290. <script src="../js/jquery.form.min.js"></script>
  291. <script src="../js/laydate/laydate.js"></script>
  292. <script src="../js/adjustHeight.js"></script>
  293. <script>
  294. var token = $.cookie("token");
  295. var ImportType;//号码导入方式
  296. var haoma;
  297. //类别
  298. function LB(obj) {
  299. obj.empty();
  300. // $("<option value='-1'>所有分类</option>").appendTo(obj);
  301. $.getJSON(huayi.config.callcenter_url + "CallPlan/GetCategoryAllList", {
  302. "token": $.cookie("token")
  303. }, function(data) {
  304. if(data.state.toLowerCase() == "success") {
  305. var content = data.data;
  306. $(content).each(function(i, n) {
  307. $("<option value='" + n.id + "'>" + n.name + "</option>").appendTo(obj);
  308. })
  309. }
  310. })
  311. }
  312. $(document).ready(function(){
  313. //返回首页
  314. $('#ReIndex').click(function(){
  315. top.home_index();
  316. })
  317. laydate.render({
  318. elem: '#usestrTime1'
  319. ,type: 'datetime',
  320. theme: '#00a1cb'
  321. ,value:new Date()
  322. });
  323. laydate.render({
  324. elem: '#useendTime1'
  325. ,type: 'datetime',
  326. theme: '#00a1cb'
  327. ,value:new Date()
  328. });
  329. laydate.render({
  330. elem: '#usestrTime2'
  331. ,type: 'datetime',
  332. theme: '#00a1cb'
  333. ,value:new Date()
  334. });
  335. laydate.render({
  336. elem: '#useendTime2'
  337. ,type: 'datetime',
  338. theme: '#00a1cb'
  339. ,value:new Date()
  340. });
  341. $('.set_called').click(function () {
  342. $('.addCall').show()
  343. })
  344. $('.addcbtr').click(function () {
  345. $('.addCall').hide();
  346. })
  347. LB($('.leiBie'))
  348. })
  349. $('.sureCun').click(function () {
  350. if($('.tzTitle').val() == '') {
  351. layer.confirm('请输入标题!', {
  352. btn: ['确定']
  353. });
  354. return;
  355. } else if($('.tzCon').val() == '') {
  356. layer.confirm('请输入内容!', {
  357. btn: ['确定']
  358. });
  359. return;
  360. } else if($('.failCount').val() == '') {
  361. layer.confirm('请输入失败次数!', {
  362. btn: ['确定']
  363. });
  364. return;
  365. } else if($('input[name="IsExcuteNow"]:checked').val()=='false') {
  366. if($('#usestrTime1').val() == '') {
  367. layer.confirm('请选择开始时间段1!', {
  368. btn: ['确定']
  369. });
  370. return;
  371. } else if($('#useendTime1').val() == '') {
  372. layer.confirm('请选择结束时间段1!', {
  373. btn: ['确定']
  374. });
  375. return;
  376. } else if($('#usestrTime2').val() == '') {
  377. layer.confirm('请选择开始时间段2!', {
  378. btn: ['确定']
  379. });
  380. return;
  381. } else if($('#useendTime2').val() == '') {
  382. layer.confirm('请选择结束时间段2!', {
  383. btn: ['确定']
  384. });
  385. return;
  386. }
  387. } else {
  388. $(".container-fluid2")
  389. .attr("method", "post")
  390. .attr("action", huayi.config.callcenter_url + "Callplan/CreateOrUpdate")
  391. .attr("enctype", "multipart/form-data");
  392. $(".container-fluid2").ajaxSubmit({
  393. dataType: "json",
  394. success: function (res) {
  395. if (res.state == "success") {
  396. top.$("iframe:visible")[0].src = "VoiceNotification/tongZhiChaXun.html";
  397. } else {
  398. layer.msg(res.message);
  399. }
  400. }
  401. });
  402. }
  403. })
  404. $('.queren').click(function () {
  405. $('.drfs').show();
  406. if ($('#import_from_file').hasClass('active')) {
  407. ImportType = 4;//文件导入
  408. $('.drfs').html('选择Excel导入');
  409. } else if ($('#import_from_hmd').hasClass('active')) {
  410. ImportType = 2;//号段导入
  411. haoma = $('.haoDuan').val();
  412. $('.drfs').html('选择文本导入');
  413. } else if ($('#import_from_telnos').hasClass('active')) {
  414. ImportType = 1;//号码列表导入
  415. haoma = $('.haomaList').val();
  416. $('.drfs').html('选择文件导入');
  417. }
  418. console.log(ImportType);
  419. $("#importtype").val(ImportType);
  420. $('.addCall').hide();
  421. })
  422. </script>
  423. </body>
  424. </html>