|
|
@@ -12,6 +12,7 @@
|
|
12
|
12
|
<link rel="stylesheet" href="../css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css">
|
|
13
|
13
|
<link rel="stylesheet" href="../css/stty.css" />
|
|
14
|
14
|
<link rel="stylesheet" href="../css/init.css" />
|
|
|
15
|
+ <link rel="stylesheet" href="../js/select2/css/select2.min.css" />
|
|
15
|
16
|
<title>添加任务</title>
|
|
16
|
17
|
<style>
|
|
17
|
18
|
.page-title {
|
|
|
@@ -199,6 +200,24 @@
|
|
199
|
200
|
.excelName {
|
|
200
|
201
|
padding-left: 10px;
|
|
201
|
202
|
}
|
|
|
203
|
+
|
|
|
204
|
+ .select_ {
|
|
|
205
|
+ width: 150px;
|
|
|
206
|
+ background-color: #FFF;
|
|
|
207
|
+ background-image: none;
|
|
|
208
|
+ border: 1px solid #ccc;
|
|
|
209
|
+ border-radius: 1px;
|
|
|
210
|
+ color: inherit;
|
|
|
211
|
+ padding: 6px 12px;
|
|
|
212
|
+ outline: none;
|
|
|
213
|
+ vertical-align: middle;
|
|
|
214
|
+ margin-top: 20px;
|
|
|
215
|
+ margin-right: 20px;
|
|
|
216
|
+ }
|
|
|
217
|
+
|
|
|
218
|
+ #import_from_excel table thead th {
|
|
|
219
|
+ width: 10%;
|
|
|
220
|
+ }
|
|
202
|
221
|
</style>
|
|
203
|
222
|
|
|
204
|
223
|
</head>
|
|
|
@@ -240,6 +259,19 @@
|
|
240
|
259
|
<select name="RecordPathId" id="videoFiel"></select><span>(必填)</span>
|
|
241
|
260
|
</td>
|
|
242
|
261
|
</tr>-->
|
|
|
262
|
+
|
|
|
263
|
+ <tr>
|
|
|
264
|
+ <th>任务所属:</th>
|
|
|
265
|
+ <td>
|
|
|
266
|
+ <select name="deptid" id="bumen" class="x-color select usercode"></select><span>(必填)</span>
|
|
|
267
|
+ </td>
|
|
|
268
|
+ </tr>
|
|
|
269
|
+ <tr>
|
|
|
270
|
+ <th>问卷设置:</th>
|
|
|
271
|
+ <td>
|
|
|
272
|
+ <select name="pagerid" id="pager"></select><span>(必填)</span>
|
|
|
273
|
+ </td>
|
|
|
274
|
+ </tr>
|
|
243
|
275
|
<tr>
|
|
244
|
276
|
<th>坐席组:</th>
|
|
245
|
277
|
<td>
|
|
|
@@ -247,6 +279,14 @@
|
|
247
|
279
|
</td>
|
|
248
|
280
|
</tr>
|
|
249
|
281
|
<tr>
|
|
|
282
|
+ <th>计划页面设置:</th>
|
|
|
283
|
+ <td>
|
|
|
284
|
+ <a class="fa fa-pencil " id='Plan'>设置</a>
|
|
|
285
|
+ </td>
|
|
|
286
|
+ </tr>
|
|
|
287
|
+
|
|
|
288
|
+
|
|
|
289
|
+ <tr>
|
|
250
|
290
|
<th>被叫号码:</th>
|
|
251
|
291
|
<td>
|
|
252
|
292
|
<button class="btns set_called" style="padding: 3px 10px;" type="button"><i class="fa fa-wrench" style="margin-right: 5px;"></i>设置</button>
|
|
|
@@ -421,6 +461,7 @@
|
|
421
|
461
|
<script src="../js/timePicker.js"></script>
|
|
422
|
462
|
<!--<script src="../js/ajaxfileupload.js"></script>-->
|
|
423
|
463
|
<script src="../dianXiao/js/jquery.form.min.js"></script>
|
|
|
464
|
+ <script src="../js/select2/js/select2.min.js"></script>
|
|
424
|
465
|
<script>
|
|
425
|
466
|
var token = $.cookie("token");
|
|
426
|
467
|
var ImportType;//号码导入方式
|
|
|
@@ -491,91 +532,210 @@
|
|
491
|
532
|
$("#usestrTime2").timepicker(set2); // 生效开始时间段2
|
|
492
|
533
|
$("#useendTime2").timepicker(set2); // 生效结束时间段2
|
|
493
|
534
|
|
|
494
|
|
- $('.set_called').click(function () {
|
|
495
|
|
- $('.addCall').show()
|
|
496
|
|
- })
|
|
497
|
|
- $('.addcbtr').click(function () {
|
|
498
|
|
- $('.addCall').hide();
|
|
499
|
|
- })
|
|
500
|
|
- $('.sureCun').click(function () {
|
|
501
|
|
- if ($('.taskName').val() == '') {
|
|
502
|
|
- layer.confirm('请输入任务名称!', {
|
|
503
|
|
- btn: ['确定']
|
|
504
|
|
- });
|
|
505
|
|
- return;
|
|
506
|
|
- }
|
|
507
|
|
- else if ($('#concurrencytype').val() == '') {
|
|
508
|
|
- layer.confirm('请选择并发类型!', {
|
|
509
|
|
- btn: ['确定']
|
|
510
|
|
- });
|
|
511
|
|
- return;
|
|
512
|
|
- }
|
|
513
|
|
- else if ($('.bingfa').val() == '') {
|
|
514
|
|
- layer.confirm('请输入并发值!', {
|
|
515
|
|
- btn: ['确定']
|
|
516
|
|
- });
|
|
517
|
|
- return;
|
|
518
|
|
- } else if ($('#jineng').val() == '') {
|
|
519
|
|
- layer.confirm('请选择技能!', {
|
|
520
|
|
- btn: ['确定']
|
|
521
|
|
- });
|
|
522
|
|
- return;
|
|
523
|
|
- } else if ($('#sendTime').val() == '') {
|
|
524
|
|
- layer.confirm('请选择任务发送时间!', {
|
|
525
|
|
- btn: ['确定']
|
|
526
|
|
- });
|
|
527
|
|
- return;
|
|
528
|
|
- } else if ($('#taskEndTime').val() == '') {
|
|
529
|
|
- layer.confirm('请选择任务结束时间!', {
|
|
530
|
|
- btn: ['确定']
|
|
531
|
|
- });
|
|
532
|
|
- return;
|
|
533
|
|
- } else if ($('#usestrTime1').val() == '') {
|
|
534
|
|
- layer.confirm('请选择任务开始时间段1!', {
|
|
535
|
|
- btn: ['确定']
|
|
536
|
|
- });
|
|
537
|
|
- return;
|
|
538
|
|
- } else if ($('#useendTime1').val() == '') {
|
|
539
|
|
- layer.confirm('请选择任务结束时间段1!', {
|
|
540
|
|
- btn: ['确定']
|
|
541
|
|
- });
|
|
542
|
|
- return;
|
|
543
|
|
- } else if ($('#usestrTime2').val() == '') {
|
|
544
|
|
- layer.confirm('请选择任务开始时间段2!', {
|
|
545
|
|
- btn: ['确定']
|
|
546
|
|
- });
|
|
547
|
|
- return;
|
|
548
|
|
- } else if ($('#useendTime2').val() == '') {
|
|
549
|
|
- layer.confirm('请选择任务结束时间段2!', {
|
|
550
|
|
- btn: ['确定']
|
|
551
|
|
- });
|
|
552
|
|
- return;
|
|
553
|
|
- } else {
|
|
554
|
|
- $(".container-fluid")
|
|
555
|
|
- .attr("method", "post")
|
|
556
|
|
- .attr("action", huayi.config.callcenter_url + "CallPlan/CreateOrUpdate")
|
|
557
|
|
- .attr("enctype", "multipart/form-data");
|
|
|
535
|
+ $(document).ready(function () {
|
|
|
536
|
+ $('.set_called').click(function () {
|
|
|
537
|
+ $('.addCall').show()
|
|
|
538
|
+ })
|
|
|
539
|
+ $('.addcbtr').click(function () {
|
|
|
540
|
+ $('.addCall').hide();
|
|
|
541
|
+ })
|
|
|
542
|
+ $('.sureCun').click(function () {
|
|
|
543
|
+ if ($('.taskName').val() == '') {
|
|
|
544
|
+ layer.confirm('请输入任务名称!', {
|
|
|
545
|
+ btn: ['确定']
|
|
|
546
|
+ });
|
|
|
547
|
+ return;
|
|
|
548
|
+ }
|
|
|
549
|
+ else if ($('#concurrencytype').val() == '') {
|
|
|
550
|
+ layer.confirm('请选择并发类型!', {
|
|
|
551
|
+ btn: ['确定']
|
|
|
552
|
+ });
|
|
|
553
|
+ return;
|
|
|
554
|
+ }
|
|
|
555
|
+ else if ($('.bingfa').val() == '') {
|
|
|
556
|
+ layer.confirm('请输入并发值!', {
|
|
|
557
|
+ btn: ['确定']
|
|
|
558
|
+ });
|
|
|
559
|
+ return;
|
|
|
560
|
+ } else if ($('#jineng').val() == '') {
|
|
|
561
|
+ layer.confirm('请选择技能!', {
|
|
|
562
|
+ btn: ['确定']
|
|
|
563
|
+ });
|
|
|
564
|
+ return;
|
|
|
565
|
+ } else if ($('#sendTime').val() == '') {
|
|
|
566
|
+ layer.confirm('请选择任务发送时间!', {
|
|
|
567
|
+ btn: ['确定']
|
|
|
568
|
+ });
|
|
|
569
|
+ return;
|
|
|
570
|
+ } else if ($('#taskEndTime').val() == '') {
|
|
|
571
|
+ layer.confirm('请选择任务结束时间!', {
|
|
|
572
|
+ btn: ['确定']
|
|
|
573
|
+ });
|
|
|
574
|
+ return;
|
|
|
575
|
+ } else if ($('#usestrTime1').val() == '') {
|
|
|
576
|
+ layer.confirm('请选择任务开始时间段1!', {
|
|
|
577
|
+ btn: ['确定']
|
|
|
578
|
+ });
|
|
|
579
|
+ return;
|
|
|
580
|
+ } else if ($('#useendTime1').val() == '') {
|
|
|
581
|
+ layer.confirm('请选择任务结束时间段1!', {
|
|
|
582
|
+ btn: ['确定']
|
|
|
583
|
+ });
|
|
|
584
|
+ return;
|
|
|
585
|
+ } else if ($('#usestrTime2').val() == '') {
|
|
|
586
|
+ layer.confirm('请选择任务开始时间段2!', {
|
|
|
587
|
+ btn: ['确定']
|
|
|
588
|
+ });
|
|
|
589
|
+ return;
|
|
|
590
|
+ } else if ($('#useendTime2').val() == '') {
|
|
|
591
|
+ layer.confirm('请选择任务结束时间段2!', {
|
|
|
592
|
+ btn: ['确定']
|
|
|
593
|
+ });
|
|
|
594
|
+ return;
|
|
|
595
|
+ } else {
|
|
|
596
|
+ $(".container-fluid")
|
|
|
597
|
+ .attr("method", "post")
|
|
|
598
|
+ .attr("action", huayi.config.callcenter_url + "CallPlan/CreateOrUpdate")
|
|
|
599
|
+ .attr("enctype", "multipart/form-data");
|
|
|
600
|
+
|
|
|
601
|
+ $(".container-fluid").ajaxSubmit({
|
|
|
602
|
+ dataType: "json",
|
|
|
603
|
+ data: {
|
|
|
604
|
+ token: token
|
|
|
605
|
+ },
|
|
|
606
|
+ success: function (res) {
|
|
|
607
|
+ //debugger;
|
|
|
608
|
+ if (res.state == "success") {
|
|
|
609
|
+ top.$("iframe:visible")[0].src = "huJiaoManger/renWuManger.html";
|
|
|
610
|
+ } else {
|
|
|
611
|
+ layer.msg(res.message);
|
|
|
612
|
+ }
|
|
|
613
|
+
|
|
|
614
|
+ }
|
|
|
615
|
+ });
|
|
|
616
|
+
|
|
|
617
|
+ }
|
|
558
|
618
|
|
|
559
|
|
- $(".container-fluid").ajaxSubmit({
|
|
|
619
|
+ })
|
|
|
620
|
+
|
|
|
621
|
+ $('.return').click(function () {
|
|
|
622
|
+ top.$("iframe:visible")[0].src = "huJiaoManger/renWuManger.html";
|
|
|
623
|
+ })
|
|
|
624
|
+
|
|
|
625
|
+ $("#upFileExcel").click(function () {
|
|
|
626
|
+ $("#fileExcel").trigger("click")
|
|
|
627
|
+ .change(function () {
|
|
|
628
|
+ upload();
|
|
|
629
|
+ });
|
|
|
630
|
+ });
|
|
|
631
|
+
|
|
|
632
|
+ $('.queren').click(function () {
|
|
|
633
|
+ $('.drfs').show();
|
|
|
634
|
+ if ($('#import_from_file').hasClass('active')) {
|
|
|
635
|
+ ImportType = 1;//文件导入
|
|
|
636
|
+ $('.drfs').html('选择从文件导入');
|
|
|
637
|
+ } else if ($('#import_from_hmd').hasClass('active')) {
|
|
|
638
|
+ ImportType = 3;//号段导入
|
|
|
639
|
+ haoma = $('.haoDuan').val();
|
|
|
640
|
+ $('.drfs').html('选择从号段导入');
|
|
|
641
|
+ } else if ($('#import_from_telnos').hasClass('active')) {
|
|
|
642
|
+ ImportType = 2;//号码列表导入
|
|
|
643
|
+ haoma = $('.haomaList').val();
|
|
|
644
|
+ $('.drfs').html('选择从号码列表导入');
|
|
|
645
|
+ } else if ($('#import_from_excel').hasClass('active')) {
|
|
|
646
|
+ ImportType = 4;//文件导入
|
|
|
647
|
+ $('.drfs').html('选择从EXCEL文件导入');
|
|
|
648
|
+ }
|
|
|
649
|
+ //console.log(ImportType);
|
|
|
650
|
+ $("#importtype").val(ImportType);
|
|
|
651
|
+ $('.addCall').hide();
|
|
|
652
|
+ })
|
|
|
653
|
+ //技能列表
|
|
|
654
|
+ $.ajax({
|
|
|
655
|
+ type: "get",
|
|
|
656
|
+ url: huayi.config.callcenter_url + "SeatGroup/GetListDrop",
|
|
|
657
|
+ async: true,
|
|
|
658
|
+ dataType: 'json',
|
|
|
659
|
+ data: {
|
|
|
660
|
+ token: token
|
|
|
661
|
+ },
|
|
|
662
|
+ success: function (data) {
|
|
|
663
|
+ var con = data.data;
|
|
|
664
|
+ $('#jineng').append('<option value="0">请选择</option>');
|
|
|
665
|
+ $('#jineng').append('<option value="-999">不转坐席</option>');
|
|
|
666
|
+
|
|
|
667
|
+ $(con).each(function (i, n) {
|
|
|
668
|
+ $('#jineng').append('<option value="' + n.id + '">' + n.name + '</option>');
|
|
|
669
|
+ })
|
|
|
670
|
+ }
|
|
|
671
|
+ });
|
|
|
672
|
+
|
|
|
673
|
+ //部门下拉数据
|
|
|
674
|
+ $("#bumen").select2({
|
|
|
675
|
+ width: 'resolve',
|
|
|
676
|
+ minimumResultsForSearch: -1,
|
|
|
677
|
+ ajax: {
|
|
|
678
|
+ type: "get",
|
|
|
679
|
+ url: huayi.config.callcenter_url + "Department/GetDeptListForReport",
|
|
|
680
|
+ async: true,
|
|
560
|
681
|
dataType: "json",
|
|
561
|
|
- success: function (res) {
|
|
562
|
|
- //debugger;
|
|
563
|
|
- if (res.state == "success") {
|
|
564
|
|
- top.$("iframe:visible")[0].src = "huJiaoManger/renWuManger.html";
|
|
565
|
|
- } else {
|
|
566
|
|
- layer.msg(res.message);
|
|
|
682
|
+ data: function (params) {
|
|
|
683
|
+ return {
|
|
|
684
|
+ token: $.cookie("token"),
|
|
|
685
|
+ pid: params.id,
|
|
|
686
|
+ text: "当前用户所属部门"
|
|
567
|
687
|
}
|
|
|
688
|
+ },
|
|
|
689
|
+ processResults: function (data) {
|
|
568
|
690
|
|
|
569
|
|
- }
|
|
|
691
|
+ return {
|
|
|
692
|
+ results: data.data
|
|
|
693
|
+ }
|
|
|
694
|
+ },
|
|
|
695
|
+ cache: true
|
|
|
696
|
+ },
|
|
|
697
|
+ placeholder: "请选择",
|
|
|
698
|
+
|
|
|
699
|
+ });
|
|
|
700
|
+
|
|
|
701
|
+ $.ajax({
|
|
|
702
|
+ type: "get",
|
|
|
703
|
+ url: huayi.config.callcenter_url + "Questionnaire/GetAllPagerInfo",
|
|
|
704
|
+ async: true,
|
|
|
705
|
+ dataType: 'json',
|
|
|
706
|
+ data: {
|
|
|
707
|
+ token: token
|
|
|
708
|
+ },
|
|
|
709
|
+ success: function (data) {
|
|
|
710
|
+ var con = data.data;
|
|
|
711
|
+ $('#pager').append('<option value="0">请选择</option>');
|
|
|
712
|
+ $(con).each(function (i, n) {
|
|
|
713
|
+ $('#pager').append('<option value="' + n.id + '">' + n.name + '</option>');
|
|
|
714
|
+ })
|
|
|
715
|
+ }
|
|
|
716
|
+ });
|
|
|
717
|
+
|
|
|
718
|
+ //编辑页面跳转
|
|
|
719
|
+ $("#Plan").click(function () {
|
|
|
720
|
+ layer.open({
|
|
|
721
|
+ type: 2,
|
|
|
722
|
+ content: "../hujiaoManger/Plan.html?wid=", //iframe的url,no代表不显示滚动条
|
|
|
723
|
+ title: '页面设置',
|
|
|
724
|
+ area: ['75%', '80%'], //宽高
|
|
570
|
725
|
});
|
|
|
726
|
+ })
|
|
|
727
|
+
|
|
|
728
|
+ //上传EXCEL文件
|
|
|
729
|
+ $("#upFileExcel").click(function () {
|
|
|
730
|
+ $("#fileExcel").trigger("click")
|
|
|
731
|
+ .change(function () {
|
|
|
732
|
+ upload();
|
|
|
733
|
+ });
|
|
|
734
|
+ });
|
|
|
735
|
+ });
|
|
571
|
736
|
|
|
572
|
|
- }
|
|
573
|
737
|
|
|
574
|
|
- })
|
|
575
|
738
|
|
|
576
|
|
- $('.return').click(function () {
|
|
577
|
|
- top.$("iframe:visible")[0].src = "huJiaoManger/renWuManger.html";
|
|
578
|
|
- })
|
|
579
|
739
|
//上传文件
|
|
580
|
740
|
function ajaxFileUpload() {
|
|
581
|
741
|
$.ajaxFileUpload({
|
|
|
@@ -591,15 +751,6 @@
|
|
591
|
751
|
})
|
|
592
|
752
|
return false;
|
|
593
|
753
|
}
|
|
594
|
|
-
|
|
595
|
|
- //上传EXCEL文件
|
|
596
|
|
- $("#upFileExcel").click(function () {
|
|
597
|
|
- $("#fileExcel").trigger("click")
|
|
598
|
|
- .change(function () {
|
|
599
|
|
- upload();
|
|
600
|
|
- });
|
|
601
|
|
- });
|
|
602
|
|
-
|
|
603
|
754
|
//上传文件
|
|
604
|
755
|
function upload() {
|
|
605
|
756
|
var Files = document.getElementById("fileExcel").files;
|
|
|
@@ -660,11 +811,11 @@
|
|
660
|
811
|
});
|
|
661
|
812
|
}
|
|
662
|
813
|
}
|
|
663
|
|
-
|
|
664
|
814
|
//获取字段
|
|
665
|
815
|
function getFields(sLength) {
|
|
666
|
816
|
$.getJSON(huayi.config.callcenter_url + "ExcelTmp/GetSelectedList", {
|
|
667
|
|
- taskid: '-1',
|
|
|
817
|
+ taskid: -1,
|
|
|
818
|
+ tempid: $('#tempid').val(),
|
|
668
|
819
|
"token": token
|
|
669
|
820
|
}, function (result) {
|
|
670
|
821
|
if (result.state.toLowerCase() == "success") {
|
|
|
@@ -714,46 +865,10 @@
|
|
714
|
865
|
}
|
|
715
|
866
|
|
|
716
|
867
|
|
|
717
|
|
- $('.queren').click(function () {
|
|
718
|
|
- $('.drfs').show();
|
|
719
|
|
- if ($('#import_from_file').hasClass('active')) {
|
|
720
|
|
- ImportType = 1;//文件导入
|
|
721
|
|
- $('.drfs').html('选择从文件导入');
|
|
722
|
|
- } else if ($('#import_from_hmd').hasClass('active')) {
|
|
723
|
|
- ImportType = 3;//号段导入
|
|
724
|
|
- haoma = $('.haoDuan').val();
|
|
725
|
|
- $('.drfs').html('选择从号段导入');
|
|
726
|
|
- } else if ($('#import_from_telnos').hasClass('active')) {
|
|
727
|
|
- ImportType = 2;//号码列表导入
|
|
728
|
|
- haoma = $('.haomaList').val();
|
|
729
|
|
- $('.drfs').html('选择从号码列表导入');
|
|
730
|
|
- } else if ($('#import_from_excel').hasClass('active')) {
|
|
731
|
|
- ImportType = 4;//文件导入
|
|
732
|
|
- $('.drfs').html('选择从EXCEL文件导入');
|
|
733
|
|
- }
|
|
734
|
|
- //console.log(ImportType);
|
|
735
|
|
- $("#importtype").val(ImportType);
|
|
736
|
|
- $('.addCall').hide();
|
|
737
|
|
- })
|
|
738
|
|
- //技能列表
|
|
739
|
|
- $.ajax({
|
|
740
|
|
- type: "get",
|
|
741
|
|
- url: huayi.config.callcenter_url + "SeatGroup/GetListDrop",
|
|
742
|
|
- async: true,
|
|
743
|
|
- dataType: 'json',
|
|
744
|
|
- data: {
|
|
745
|
|
- token: token
|
|
746
|
|
- },
|
|
747
|
|
- success: function (data) {
|
|
748
|
|
- var con = data.data;
|
|
749
|
|
- $('#jineng').append('<option value="0">请选择</option>');
|
|
750
|
|
- $('#jineng').append('<option value="-999">不转坐席</option>');
|
|
751
|
|
-
|
|
752
|
|
- $(con).each(function (i, n) {
|
|
753
|
|
- $('#jineng').append('<option value="' + n.id + '">' + n.name + '</option>');
|
|
754
|
|
- })
|
|
755
|
|
- }
|
|
756
|
|
- });
|
|
|
868
|
+
|
|
|
869
|
+
|
|
|
870
|
+
|
|
|
871
|
+
|
|
757
|
872
|
|
|
758
|
873
|
//$.getJSON(huayi.config.callcenter_url + "CallPlan/GetRecordDropList", {
|
|
759
|
874
|
// "token": token
|