12345市长热线标准版-前端

addTongZhi.html 17KB

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