12345市长热线标准版-前端

addTongZhi.html 17KB

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"></select><span>(必填)</span>
  154. </td>
  155. </tr>
  156. <tr>
  157. <th>通知标题:</th>
  158. <td><input type="text" class="tzTitle" name="Name" /><span>(必填)</span></td>
  159. </tr>
  160. <tr>
  161. <th>通知内容:</th>
  162. <td>
  163. <textarea class="tzCon" name="TaskContent" rows="2" cols=""></textarea>
  164. <span>(必填)</span>
  165. </td>
  166. </tr>
  167. <tr>
  168. <th>执行方式:</th>
  169. <td>
  170. <div class="radio-inline ">
  171. <label>
  172. <input type="radio" name="IsExcuteNow" id="way1" value="true" checked="checked"> 立即执行
  173. </label>
  174. </div>
  175. <div class="radio-inline">
  176. <label>
  177. <input type="radio" name="IsExcuteNow" id="way2" value="false"> 定时执行
  178. </label>
  179. </div>
  180. </td>
  181. </tr>
  182. <tr>
  183. <th>失败重试次数:</th>
  184. <td><input type="text" class="failCount" name="LoopTime" value="0" /><span>(必填)</span></td>
  185. </tr>
  186. <tr>
  187. <th>通知号码:</th>
  188. <td>
  189. <button class="btns set_called" style="padding: 3px 10px;" type="button"><i class="fa fa-wrench" style="margin-right: 5px;"></i>设置</button>
  190. <span class="drfs" style="background-color: #ed4e2a;font-size: 12px;padding: 0 3px;margin-left: 5px;color: #fff;"></span>
  191. <input type="hidden" name="importtype" value="" id="importtype" />
  192. </td>
  193. </tr>
  194. </table>
  195. <br />
  196. </div>
  197. </div>
  198. <div class="bjright col-md-6">
  199. <div class="bj-title">
  200. <i class="fa fa-calendar"></i> 发送时间
  201. </div>
  202. <div class="bjCon ">
  203. <table style="width: 100%;">
  204. <tr>
  205. <th>外呼开始时间段1:</th>
  206. <td>
  207. <i class="fa fa-calendar tub"></i>
  208. <input type="text" id="usestrTime1" readonly="readonly" name="StartTime1" /><span>(必填)</span>
  209. </td>
  210. </tr>
  211. <tr>
  212. <th>外呼结束时间段1:</th>
  213. <td>
  214. <i class="fa fa-calendar tub"></i>
  215. <input type="text" id="useendTime1" readonly="readonly" name="EndTime1" /><span>(必填)</span>
  216. </td>
  217. </tr>
  218. <tr>
  219. <th>外呼开始时间段2:</th>
  220. <td>
  221. <i class="fa fa-calendar tub"></i>
  222. <input type="text" id="usestrTime2" readonly="readonly" name="StartTime2" /><span>(必填)</span>
  223. </td>
  224. </tr>
  225. <tr>
  226. <th>外呼结束时间段2:</th>
  227. <td>
  228. <i class="fa fa-calendar tub"></i>
  229. <input type="text" id="useendTime2" readonly="readonly" name="EndTime2" /><span>(必填)</span>
  230. </td>
  231. </tr>
  232. </table>
  233. <br />
  234. <br />
  235. <br />
  236. <br />
  237. <br />
  238. <br />
  239. <br />
  240. </div>
  241. </div>
  242. </div>
  243. <p style="text-align: center; padding: 20px 0;">
  244. <button class="btns sureCun" type="button">保存</button>
  245. <button class="btns return" type="button">取消</button>
  246. </p>
  247. <!--设置被叫号码-->
  248. <div class="model addCall">
  249. <div class="box">
  250. <div class="btop clearfix">
  251. <p class="btl">设置被叫号码</p>
  252. <p class="btr addcbtr"><i class="fa fa-remove"></i></p>
  253. </div>
  254. <div class="boxCon">
  255. <ul class="nav nav-tabs" role="tablist">
  256. <li class="active"><a href="#import_from_telnos" role="tab" data-toggle="tab"><i class="fa fa-file"></i>Excel导入</a></li>
  257. <li><a href="#import_from_hmd" role="tab" data-toggle="tab"><i class="fa fa-table"></i>文本导入</a></li>
  258. <li><a href="#import_from_file" role="tab" data-toggle="tab"><i class="fa fa-reorder"></i>txt文件导入</a></li>
  259. </ul>
  260. <div class="tab-content">
  261. <div class="tab-pane fade active in" id="import_from_file">
  262. <br />
  263. 支持的Excel格式,每行一个号码,最多10万个号码:
  264. <br />
  265. <br />
  266. <input type="file" name="fileField" id="fileField" placeholder="号码列表" />
  267. </div>
  268. <div class="tab-pane fade" id="import_from_hmd">
  269. <br />
  270. 支持的文本文件格式,每行一个号码,最多10万个号码:
  271. <br />
  272. <br />
  273. <textarea class="haoDuan" name="PhoneList" rows="7" style="width: 100%; resize: none;"></textarea>
  274. </div>
  275. <div class="tab-pane fade" id="import_from_telnos">
  276. <br />
  277. 支持的文本文件格式,每行一个号码,最多10万个号码:
  278. <br />
  279. <br />
  280. <input type="file" name="fileField2" id="fileField2" placeholder="号码列表" />
  281. </div>
  282. </div>
  283. <div style="text-align: right;"><button class="btns queren" type="button">确认</button></div>
  284. </div>
  285. </div>
  286. </div>
  287. </form>
  288. </div>
  289. <script src="../js/jquery.form.min.js"></script>
  290. <script src="../js/laydate/laydate.js"></script>
  291. <script src="../js/adjustHeight.js"></script>
  292. <script>
  293. var token = $.cookie("token");
  294. var ImportType;//号码导入方式
  295. var haoma;
  296. //类别
  297. function LB(obj) {
  298. obj.empty();
  299. // $("<option value='-1'>所有分类</option>").appendTo(obj);
  300. $.getJSON(huayi.config.callcenter_url + "CallPlan/GetCategoryAllList2", {
  301. "token": $.cookie("token")
  302. }, function (data) {
  303. if (data.state.toLowerCase() == "success") {
  304. var content = data.data;
  305. $(content).each(function (i, n) {
  306. $("<option value='" + n.id + "'>" + n.name + "</option>").appendTo(obj);
  307. })
  308. }
  309. })
  310. }
  311. $(document).ready(function () {
  312. //返回首页
  313. $('#ReIndex').click(function () {
  314. top.home_index();
  315. })
  316. laydate.render({
  317. elem: '#usestrTime1'
  318. , type: 'datetime',
  319. theme: '#00a1cb'
  320. , value: new Date()
  321. });
  322. laydate.render({
  323. elem: '#useendTime1'
  324. , type: 'datetime',
  325. theme: '#00a1cb'
  326. , value: new Date()
  327. });
  328. laydate.render({
  329. elem: '#usestrTime2'
  330. , type: 'datetime',
  331. theme: '#00a1cb'
  332. , value: new Date()
  333. });
  334. laydate.render({
  335. elem: '#useendTime2'
  336. , type: 'datetime',
  337. theme: '#00a1cb'
  338. , value: new Date()
  339. });
  340. $('.set_called').click(function () {
  341. $('.addCall').show()
  342. })
  343. $('.addcbtr').click(function () {
  344. $('.addCall').hide();
  345. })
  346. LB($('.leiBie'))
  347. })
  348. $('.sureCun').click(function () {
  349. if ($('.tzTitle').val() == '') {
  350. layer.confirm('请输入标题!', {
  351. btn: ['确定']
  352. });
  353. return;
  354. } else if ($('.tzCon').val() == '') {
  355. layer.confirm('请输入内容!', {
  356. btn: ['确定']
  357. });
  358. return;
  359. } else if ($('.failCount').val() == '') {
  360. layer.confirm('请输入失败次数!', {
  361. btn: ['确定']
  362. });
  363. return;
  364. } else if ($('input[name="IsExcuteNow"]:checked').val() == 'false') {
  365. if ($('#usestrTime1').val() == '') {
  366. layer.confirm('请选择开始时间段1!', {
  367. btn: ['确定']
  368. });
  369. return;
  370. } else if ($('#useendTime1').val() == '') {
  371. layer.confirm('请选择结束时间段1!', {
  372. btn: ['确定']
  373. });
  374. return;
  375. } else if ($('#usestrTime2').val() == '') {
  376. layer.confirm('请选择开始时间段2!', {
  377. btn: ['确定']
  378. });
  379. return;
  380. } else if ($('#useendTime2').val() == '') {
  381. layer.confirm('请选择结束时间段2!', {
  382. btn: ['确定']
  383. });
  384. return;
  385. }
  386. } else {
  387. $(".container-fluid2")
  388. .attr("method", "post")
  389. .attr("action", huayi.config.callcenter_url + "Callplan/CreateOrUpdate")
  390. .attr("enctype", "multipart/form-data");
  391. $(".container-fluid2").ajaxSubmit({
  392. dataType: "json",
  393. success: function (res) {
  394. if (res.state == "success") {
  395. top.$("iframe:visible")[0].src = "VoiceNotification/tongZhiChaXun.html";
  396. } else {
  397. layer.msg(res.message);
  398. }
  399. }
  400. });
  401. }
  402. })
  403. $('.queren').click(function () {
  404. $('.drfs').show();
  405. if ($('#import_from_file').hasClass('active')) {
  406. ImportType = 4;//文件导入
  407. $('.drfs').html('选择Excel导入');
  408. } else if ($('#import_from_hmd').hasClass('active')) {
  409. ImportType = 2;//号段导入
  410. haoma = $('.haoDuan').val();
  411. $('.drfs').html('选择文本导入');
  412. } else if ($('#import_from_telnos').hasClass('active')) {
  413. ImportType = 1;//号码列表导入
  414. haoma = $('.haomaList').val();
  415. $('.drfs').html('选择文件导入');
  416. }
  417. console.log(ImportType);
  418. $("#importtype").val(ImportType);
  419. $('.addCall').hide();
  420. })
  421. </script>
  422. </body>
  423. </html>