12345市长热线标准版-前端

addTongZhi.html 17KB

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