安图前端代码

taskBianji.html 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  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/jquery-ui.css" />
  9. <link rel="stylesheet" href="../css/tpkerjqui.css" />
  10. <link rel="stylesheet" href="../css/timePicker.css" />
  11. <link rel="stylesheet" href="../../css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css">
  12. <link rel="stylesheet" href="../css/stty.css" />
  13. <link rel="stylesheet" href="../css/init.css" />
  14. <title>任务编辑</title>
  15. <style>
  16. .page-title {
  17. padding: 0px;
  18. font-size: 16px;
  19. font-weight: bold;
  20. letter-spacing: -1px;
  21. display: block;
  22. color: #1570A6;
  23. margin: 20px 0px 15px 0px;
  24. }
  25. hr {
  26. margin: 20px 0;
  27. border: 0;
  28. border-top: 1px solid #E0DFDF;
  29. border-bottom: 1px solid #FEFEFE;
  30. }
  31. .bj-title {
  32. color: #ffffff;
  33. background-color: #1ab394;
  34. padding: 8px 35px 8px 14px;
  35. text-shadow: 0 1px 0 rgba(179, 142, 142, 0.5);
  36. border: 1px solid #e5e5e5;
  37. }
  38. .bjCon table th {
  39. padding: 5px 8px 5px 0;
  40. text-align: right;
  41. width: 30%;
  42. }
  43. .bjCon table td {
  44. padding: 6px 0 5px 10px;
  45. text-align: left;
  46. color: #717171;
  47. line-height: 200%;
  48. position: relative;
  49. }
  50. .bjCon table td input {
  51. border: 1px solid #e5e5e5;
  52. width: 240px;
  53. outline: 0;
  54. margin-right: 5px;
  55. padding-left: 10px;
  56. }
  57. .bjCon table td select {
  58. width: 240px;
  59. background-color: #ffffff;
  60. background-image: none !important;
  61. filter: none !important;
  62. border: 1px solid #e5e5e5;
  63. outline: none;
  64. height: 34px !important;
  65. line-height: 30px;
  66. margin-right: 5px;
  67. padding-left: 10px;
  68. }
  69. .bjCon {
  70. padding-top: 20px;
  71. border: 1px solid #e5e5e5;
  72. border-top: 0;
  73. }
  74. .bjright table td input {
  75. padding-left: 30px;
  76. }
  77. .tub {
  78. position: absolute;
  79. left: 18px;
  80. top: 13px;
  81. font-size: 18px;
  82. color: #ccc;
  83. }
  84. .ui-datepicker.ui-widget-content {
  85. background: none !important;
  86. background-color: #eee !important;
  87. }
  88. .ui-widget-header .ui-icon {
  89. background-image: url(img/ui-icons_444444_256x240.png) !important;
  90. }
  91. .box {
  92. width: 55%;
  93. margin: 0 auto;
  94. margin-top: 5%;
  95. }
  96. .box .btop {
  97. height: 35px;
  98. background: #1ab394;
  99. color: #fff;
  100. line-height: 35px;
  101. padding: 0 15px;
  102. /* margin-bottom: 15px; */
  103. }
  104. .btl {
  105. float: left;
  106. margin: 0;
  107. }
  108. .btr {
  109. float: right;
  110. margin: 0;
  111. cursor: pointer;
  112. }
  113. .boxCon {
  114. width: 100%;
  115. min-height: 400px;
  116. background: #fff;
  117. text-align: center;
  118. padding: 10px 15px;
  119. height: auto;
  120. overflow-y: auto;
  121. }
  122. .model {
  123. position: fixed;
  124. top: 0;
  125. right: 0;
  126. bottom: 0;
  127. left: 0;
  128. height: 100%;
  129. width: 100%;
  130. background: rgba(0, 0, 0, 0.48);
  131. z-index: 100;
  132. display: none;
  133. }
  134. .tab-content {
  135. text-align: left;
  136. height: 200px;
  137. }
  138. </style>
  139. </head>
  140. <body>
  141. <div class="container-fluid">
  142. <div class="page-title">任务编辑</div>
  143. <hr />
  144. <div class="row-fluid clearfix">
  145. <div class="bjleft col-md-6">
  146. <div class="bj-title">
  147. <i class="fa fa-user"></i> 基本信息
  148. </div>
  149. <div class="bjCon">
  150. <table style="width: 100%;">
  151. <tr>
  152. <th>任务名称:</th>
  153. <td><input type="text" class="taskName" /><span>(必填)</span></td>
  154. </tr>
  155. <tr>
  156. <th>并发数:</th>
  157. <td><input type="text" class="bingfa" /><span>(必填)</span></td>
  158. </tr>
  159. <tr>
  160. <th>录音文件:</th>
  161. <td>
  162. <select name="" id="videoFiel">
  163. <option value="">不播放录音</option>
  164. <option value="">2017茶叶录音</option>
  165. </select><span>(必填)</span>
  166. </td>
  167. </tr>
  168. <tr>
  169. <th>技能队列:</th>
  170. <td>
  171. <select name="" id="jineng">
  172. </select><span>(必填)</span>
  173. </td>
  174. </tr>
  175. <tr>
  176. <th>被叫号码:</th>
  177. <td>
  178. <span style="background-color:#fcb322;font-size: 12px;padding: 0 3px;color: #fff;">---不可更改---</span>
  179. </td>
  180. </tr>
  181. </table>
  182. <br />
  183. <br />
  184. </div>
  185. </div>
  186. <div class="bjright col-md-6">
  187. <div class="bj-title">
  188. <i class="fa fa-calendar"></i> 发送时间
  189. </div>
  190. <div class="bjCon ">
  191. <table style="width: 100%;">
  192. <tr>
  193. <th>任务发送时间:</th>
  194. <td>
  195. <i class="fa fa-calendar tub"></i>
  196. <input type="text" id="sendTime" readonly="readonly" /><span>(必填)</span>
  197. </td>
  198. </tr>
  199. <tr>
  200. <th>任务结束时间:</th>
  201. <td>
  202. <i class="fa fa-calendar tub"></i>
  203. <input type="text" id="taskEndTime" readonly="readonly" /><span>(必填)</span>
  204. </td>
  205. </tr>
  206. <tr>
  207. <th>生效开始时间段1:</th>
  208. <td>
  209. <i class="fa fa-clock-o tub"></i>
  210. <input type="text" id="usestrTime1" readonly="readonly" /><span>(必填)</span>
  211. </td>
  212. </tr>
  213. <tr>
  214. <th>生效结束时间段1:</th>
  215. <td>
  216. <i class="fa fa-clock-o tub"></i>
  217. <input type="text" id="useendTime1" readonly="readonly" /><span>(必填)</span>
  218. </td>
  219. </tr>
  220. <tr>
  221. <th>生效开始时间段2:</th>
  222. <td>
  223. <i class="fa fa-clock-o tub"></i>
  224. <input type="text" id="usestrTime2" /><span>(必填)</span>
  225. </td>
  226. </tr>
  227. <tr>
  228. <th>生效结束时间段2:</th>
  229. <td>
  230. <i class="fa fa-clock-o tub"></i>
  231. <input type="text" id="useendTime2" /><span>(必填)</span>
  232. </td>
  233. </tr>
  234. </table>
  235. </div>
  236. </div>
  237. </div>
  238. <p style="text-align: center; padding: 20px 0;">
  239. <button class="btns sureCun">保存</button>
  240. <button class="btns return">取消</button>
  241. </p>
  242. </div>
  243. <script src="../js/jquery-ui.js"></script>
  244. <script src="../js/timePicker.js"></script>
  245. <script>
  246. var token = $.cookie("token");
  247. var id=helper.request.queryString("id");
  248. var setting = {
  249. dateFormat: 'yy-mm-dd', //日期格式
  250. clearText: "清除", //清除日期的按钮名称
  251. closeText: "关闭", //关闭选择框的按钮名称
  252. yearSuffix: '年', //年的后缀
  253. showMonthAfterYear: true, //是否把月放在年的后面
  254. monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
  255. dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
  256. dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
  257. dayNamesMin: ['日', '一', '二', '三', '四', '五', '六']
  258. }
  259. $("#sendTime").datepicker(setting); //任务发送时间
  260. $("#taskEndTime").datepicker(setting); //任务结束时间
  261. var set2 = {
  262. timeSeparator: ':', // The character to use to separate hours and minutes. (default: ':')
  263. showLeadingZero: true, // Define whether or not to show a leading zero for hours < 10. (default: true)
  264. showMinutesLeadingZero: true, // Define whether or not to show a leading zero for minutes < 10.(default: true)
  265. defaultTime: 'now', // Used as default time when input field is empty or for inline timePicker
  266. // Localization
  267. hourText: '时', // Define the locale text for "Hours"
  268. minuteText: '分', // Define the locale text for "Minute"
  269. amPmText: ['', ''], // Define the locale text for periods
  270. // custom hours and minutes
  271. hours: {
  272. starts: 0,
  273. ends: 23
  274. },
  275. minutes: {
  276. starts: 0,
  277. ends: 55,
  278. interval: 5,
  279. manual: []
  280. },
  281. rows: 4,
  282. showHours: true,
  283. showMinutes: true,
  284. // buttons
  285. showCloseButton: true, // shows an OK button to confirm the edit
  286. closeButtonText: '关闭', // Text for the confirmation button (ok button)
  287. showNowButton: true, // Shows the 'now' button
  288. nowButtonText: '现在', // Text for the now button
  289. }
  290. $("#usestrTime1").timepicker(set2); // 生效开始时间段1
  291. $("#useendTime1").timepicker(set2); // 生效结束时间段1
  292. $("#usestrTime2").timepicker(set2); // 生效开始时间段2
  293. $("#useendTime2").timepicker(set2); // 生效结束时间段2
  294. $.ajax({
  295. type:"get",
  296. url:huayi.config.callcenter_url +"CallPlan/GetModel",
  297. async:true,
  298. dataType:'json',
  299. data:{
  300. token:token,
  301. id:id
  302. },
  303. success:function(data){
  304. var con=data.data;
  305. console.log(con);
  306. if (data.state.toLowerCase() == "success") {
  307. $('.taskName').val(con.name);//任务名称
  308. $('.bingfa').val(con.concurrency);//并发数
  309. $('#jineng option').each(function(i,n){
  310. if($(n).attr("value")==365){
  311. $('#jineng').val(442);
  312. }
  313. })
  314. //$('#jineng').val();//技能排列
  315. $('#sendTime').val(con.planstartdate);//任务发送时间
  316. $('#taskEndTime').val(con.planenddate);//任务结束时间
  317. $('#usestrTime1').val(con.starttime1);//生效开始时间段1
  318. $('#useendTime1').val(con.endtime1);//生效结束时间段1
  319. $('#usestrTime2').val(con.starttime2);//生效开始时间段2
  320. $('#useendTime2').val(con.endtime2);//生效结束时间段2
  321. }
  322. }
  323. });
  324. $('.sureCun').click(function () {
  325. if($('.taskName').val()==''){
  326. layer.confirm('请输入任务名称!', {
  327. btn: ['确定']
  328. });
  329. return;
  330. }else if($('.bingfa').val()==''){
  331. layer.confirm('请输入并发值!', {
  332. btn: ['确定']
  333. });
  334. return;
  335. }else if($('#jineng').val()==''){
  336. layer.confirm('请选择技能!', {
  337. btn: ['确定']
  338. });
  339. return;
  340. }else if($('#sendTime').val()==''){
  341. layer.confirm('请选择任务发送时间!', {
  342. btn: ['确定']
  343. });
  344. return;
  345. }else if($('#taskEndTime').val()==''){
  346. layer.confirm('请选择任务结束时间!', {
  347. btn: ['确定']
  348. });
  349. return;
  350. }else if($('#usestrTime1').val()==''){
  351. layer.confirm('请选择任务开始时间段1!', {
  352. btn: ['确定']
  353. });
  354. return;
  355. }else if($('#useendTime1').val()==''){
  356. layer.confirm('请选择任务结束时间段1!', {
  357. btn: ['确定']
  358. });
  359. return;
  360. }else if($('#usestrTime2').val()==''){
  361. layer.confirm('请选择任务开始时间段2!', {
  362. btn: ['确定']
  363. });
  364. return;
  365. }else if($('#useendTime2').val()==''){
  366. layer.confirm('请选择任务结束时间段2!', {
  367. btn: ['确定']
  368. });
  369. return;
  370. }else{
  371. $.ajax({
  372. type: "post",
  373. url: huayi.config.callcenter_url +"CallPlan/CreateOrUpdate",
  374. async: true,
  375. dataType: 'json',
  376. data: {
  377. token: token,
  378. id:id,
  379. Name: $('.taskName').val(),//外呼任务名称
  380. Type:'',//1=点击外呼 2=自动外呼默认为2
  381. // ConcurrencyType: '',//并发类型0=并发数1=进号速率 下拉选择框,默认选中 “并发数”
  382. Concurrency: $('.bingfa').val(),//并发值 文本框,默认为0
  383. AgentGroupId:$('#jineng').val(),//坐席组Id ps:技能队列
  384. // RecordPathId: '',//自动语音文件Id
  385. // PagerId: '',//话术模板Id 下拉选择框,数据源为接口“获取话术模板列表(下拉框)”
  386. //Pre: '',//线路前缀下拉选择框,数据源为接口“获取字典值”参数为:XLQZ
  387. PlanStartDate: $("#sendTime").val(),//外呼任务开始时间
  388. PlanEndDate: $("#taskEndTime").val(),//外呼任务停止时间
  389. StartTime1: $("#usestrTime1").val(),//生效开始时间1
  390. EndTime1: $("#useendTime1").val(),//生效结束时间1
  391. StartTime2: $("#usestrTime2").val(),//生效开始时间2
  392. EndTime2: $("#useendTime2").val()//生效结束时间2
  393. },
  394. success: function (data) {
  395. if (data.state.toLowerCase() == "success") {
  396. layer.msg("编辑成功!");
  397. }
  398. }
  399. });
  400. }
  401. })
  402. //技能列表
  403. $.ajax({
  404. type:"get",
  405. url:huayi.config.callcenter_url +"Dictionary/GetDicValueListByFlag?flag=ZXZ",
  406. // url:"http://117.158.196.116:8878/Dictionary/GetDicValueListByFlag",
  407. async:true,
  408. dataType:'json',
  409. data:{
  410. token: token
  411. },
  412. success:function(data){
  413. var con=data.data;
  414. $(con).each(function(i, n) {
  415. $('#jineng').append('<option value="' + n.F_DictionaryValueId + '">' + n.F_Name + '</option>');
  416. })
  417. }
  418. });
  419. </script>
  420. </body>
  421. </html>