| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <script src="../../Script/Common/huayi.load.js"></script>
- <script src="../../Script/Common/huayi.http.js"></script>
- <script src="../../Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="../css/jquery-ui.css" />
- <link rel="stylesheet" href="../css/tpkerjqui.css" />
- <link rel="stylesheet" href="../css/timePicker.css" />
- <link rel="stylesheet" href="../../css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css">
- <link rel="stylesheet" href="../css/stty.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <title>任务编辑</title>
- <style>
- .page-title {
- padding: 0px;
- font-size: 16px;
- font-weight: bold;
- letter-spacing: -1px;
- display: block;
- color: #1570A6;
- margin: 20px 0px 15px 0px;
- }
- hr {
- margin: 20px 0;
- border: 0;
- border-top: 1px solid #E0DFDF;
- border-bottom: 1px solid #FEFEFE;
- }
- .bj-title {
- color: #ffffff;
- background-color: #1ab394;
- padding: 8px 35px 8px 14px;
- text-shadow: 0 1px 0 rgba(179, 142, 142, 0.5);
- border: 1px solid #e5e5e5;
- }
- .bjCon table th {
- padding: 5px 8px 5px 0;
- text-align: right;
- width: 30%;
- }
- .bjCon table td {
- padding: 6px 0 5px 10px;
- text-align: left;
- color: #717171;
- line-height: 200%;
- position: relative;
- }
- .bjCon table td input {
- border: 1px solid #e5e5e5;
- width: 240px;
- outline: 0;
- margin-right: 5px;
- padding-left: 10px;
- }
- .bjCon table td select {
- width: 240px;
- background-color: #ffffff;
- background-image: none !important;
- filter: none !important;
- border: 1px solid #e5e5e5;
- outline: none;
- height: 34px !important;
- line-height: 30px;
- margin-right: 5px;
- padding-left: 10px;
- }
- .bjCon {
- padding-top: 20px;
- border: 1px solid #e5e5e5;
- border-top: 0;
- }
- .bjright table td input {
- padding-left: 30px;
- }
- .tub {
- position: absolute;
- left: 18px;
- top: 13px;
- font-size: 18px;
- color: #ccc;
- }
- .ui-datepicker.ui-widget-content {
- background: none !important;
- background-color: #eee !important;
- }
- .ui-widget-header .ui-icon {
- background-image: url(img/ui-icons_444444_256x240.png) !important;
- }
- .box {
- width: 55%;
- margin: 0 auto;
- margin-top: 5%;
- }
- .box .btop {
- height: 35px;
- background: #1ab394;
- color: #fff;
- line-height: 35px;
- padding: 0 15px;
- /* margin-bottom: 15px; */
- }
- .btl {
- float: left;
- margin: 0;
- }
- .btr {
- float: right;
- margin: 0;
- cursor: pointer;
- }
- .boxCon {
- width: 100%;
- min-height: 400px;
- background: #fff;
- text-align: center;
- padding: 10px 15px;
- height: auto;
- overflow-y: auto;
- }
- .model {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- height: 100%;
- width: 100%;
- background: rgba(0, 0, 0, 0.48);
- z-index: 100;
- display: none;
- }
- .tab-content {
- text-align: left;
- height: 200px;
- }
-
- </style>
- </head>
- <body>
- <div class="container-fluid">
- <div class="page-title">任务编辑</div>
- <hr />
- <div class="row-fluid clearfix">
- <div class="bjleft col-md-6">
- <div class="bj-title">
- <i class="fa fa-user"></i> 基本信息
- </div>
- <div class="bjCon">
- <table style="width: 100%;">
- <tr>
- <th>任务名称:</th>
- <td><input type="text" class="taskName" /><span>(必填)</span></td>
- </tr>
- <tr>
- <th>并发数:</th>
- <td><input type="text" class="bingfa" /><span>(必填)</span></td>
- </tr>
- <tr>
- <th>录音文件:</th>
- <td>
- <select name="" id="videoFiel">
- <option value="">不播放录音</option>
- <option value="">2017茶叶录音</option>
- </select><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>技能队列:</th>
- <td>
- <select name="" id="jineng">
-
- </select><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>被叫号码:</th>
- <td>
- <span style="background-color:#fcb322;font-size: 12px;padding: 0 3px;color: #fff;">---不可更改---</span>
- </td>
- </tr>
- </table>
- <br />
- <br />
- </div>
- </div>
- <div class="bjright col-md-6">
- <div class="bj-title">
- <i class="fa fa-calendar"></i> 发送时间
- </div>
- <div class="bjCon ">
- <table style="width: 100%;">
- <tr>
- <th>任务发送时间:</th>
- <td>
- <i class="fa fa-calendar tub"></i>
- <input type="text" id="sendTime" readonly="readonly" /><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>任务结束时间:</th>
- <td>
- <i class="fa fa-calendar tub"></i>
- <input type="text" id="taskEndTime" readonly="readonly" /><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>生效开始时间段1:</th>
- <td>
- <i class="fa fa-clock-o tub"></i>
- <input type="text" id="usestrTime1" readonly="readonly" /><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>生效结束时间段1:</th>
- <td>
- <i class="fa fa-clock-o tub"></i>
- <input type="text" id="useendTime1" readonly="readonly" /><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>生效开始时间段2:</th>
- <td>
- <i class="fa fa-clock-o tub"></i>
- <input type="text" id="usestrTime2" /><span>(必填)</span>
- </td>
- </tr>
- <tr>
- <th>生效结束时间段2:</th>
- <td>
- <i class="fa fa-clock-o tub"></i>
- <input type="text" id="useendTime2" /><span>(必填)</span>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- <p style="text-align: center; padding: 20px 0;">
- <button class="btns sureCun">保存</button>
- <button class="btns return">取消</button>
- </p>
- </div>
- <script src="../js/jquery-ui.js"></script>
- <script src="../js/timePicker.js"></script>
- <script>
- var token = $.cookie("token");
- var id=helper.request.queryString("id");
-
- var setting = {
- dateFormat: 'yy-mm-dd', //日期格式
- clearText: "清除", //清除日期的按钮名称
- closeText: "关闭", //关闭选择框的按钮名称
- yearSuffix: '年', //年的后缀
- showMonthAfterYear: true, //是否把月放在年的后面
- monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
- dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
- dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
- dayNamesMin: ['日', '一', '二', '三', '四', '五', '六']
- }
- $("#sendTime").datepicker(setting); //任务发送时间
- $("#taskEndTime").datepicker(setting); //任务结束时间
- var set2 = {
- timeSeparator: ':', // The character to use to separate hours and minutes. (default: ':')
- showLeadingZero: true, // Define whether or not to show a leading zero for hours < 10. (default: true)
- showMinutesLeadingZero: true, // Define whether or not to show a leading zero for minutes < 10.(default: true)
- defaultTime: 'now', // Used as default time when input field is empty or for inline timePicker
- // Localization
- hourText: '时', // Define the locale text for "Hours"
- minuteText: '分', // Define the locale text for "Minute"
- amPmText: ['', ''], // Define the locale text for periods
- // custom hours and minutes
- hours: {
- starts: 0,
- ends: 23
- },
- minutes: {
- starts: 0,
- ends: 55,
- interval: 5,
- manual: []
- },
- rows: 4,
- showHours: true,
- showMinutes: true,
- // buttons
- showCloseButton: true, // shows an OK button to confirm the edit
- closeButtonText: '关闭', // Text for the confirmation button (ok button)
- showNowButton: true, // Shows the 'now' button
- nowButtonText: '现在', // Text for the now button
- }
- $("#usestrTime1").timepicker(set2); // 生效开始时间段1
- $("#useendTime1").timepicker(set2); // 生效结束时间段1
- $("#usestrTime2").timepicker(set2); // 生效开始时间段2
- $("#useendTime2").timepicker(set2); // 生效结束时间段2
- $.ajax({
- type:"get",
- url:huayi.config.callcenter_url +"CallPlan/GetModel",
- async:true,
- dataType:'json',
- data:{
- token:token,
- id:id
- },
- success:function(data){
- var con=data.data;
- console.log(con);
- if (data.state.toLowerCase() == "success") {
- $('.taskName').val(con.name);//任务名称
- $('.bingfa').val(con.concurrency);//并发数
- $('#jineng option').each(function(i,n){
- if($(n).attr("value")==365){
- $('#jineng').val(442);
- }
- })
- //$('#jineng').val();//技能排列
- $('#sendTime').val(con.planstartdate);//任务发送时间
- $('#taskEndTime').val(con.planenddate);//任务结束时间
- $('#usestrTime1').val(con.starttime1);//生效开始时间段1
- $('#useendTime1').val(con.endtime1);//生效结束时间段1
- $('#usestrTime2').val(con.starttime2);//生效开始时间段2
- $('#useendTime2').val(con.endtime2);//生效结束时间段2
- }
- }
- });
-
- $('.sureCun').click(function () {
- if($('.taskName').val()==''){
- layer.confirm('请输入任务名称!', {
- btn: ['确定']
- });
- return;
- }else if($('.bingfa').val()==''){
- layer.confirm('请输入并发值!', {
- btn: ['确定']
- });
- return;
- }else if($('#jineng').val()==''){
- layer.confirm('请选择技能!', {
- btn: ['确定']
- });
- return;
- }else if($('#sendTime').val()==''){
- layer.confirm('请选择任务发送时间!', {
- btn: ['确定']
- });
- return;
- }else if($('#taskEndTime').val()==''){
- layer.confirm('请选择任务结束时间!', {
- btn: ['确定']
- });
- return;
- }else if($('#usestrTime1').val()==''){
- layer.confirm('请选择任务开始时间段1!', {
- btn: ['确定']
- });
- return;
- }else if($('#useendTime1').val()==''){
- layer.confirm('请选择任务结束时间段1!', {
- btn: ['确定']
- });
- return;
- }else if($('#usestrTime2').val()==''){
- layer.confirm('请选择任务开始时间段2!', {
- btn: ['确定']
- });
- return;
- }else if($('#useendTime2').val()==''){
- layer.confirm('请选择任务结束时间段2!', {
- btn: ['确定']
- });
- return;
- }else{
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url +"CallPlan/CreateOrUpdate",
- async: true,
- dataType: 'json',
- data: {
- token: token,
- id:id,
- Name: $('.taskName').val(),//外呼任务名称
- Type:'',//1=点击外呼 2=自动外呼默认为2
- // ConcurrencyType: '',//并发类型0=并发数1=进号速率 下拉选择框,默认选中 “并发数”
- Concurrency: $('.bingfa').val(),//并发值 文本框,默认为0
- AgentGroupId:$('#jineng').val(),//坐席组Id ps:技能队列
- // RecordPathId: '',//自动语音文件Id
- // PagerId: '',//话术模板Id 下拉选择框,数据源为接口“获取话术模板列表(下拉框)”
- //Pre: '',//线路前缀下拉选择框,数据源为接口“获取字典值”参数为:XLQZ
- PlanStartDate: $("#sendTime").val(),//外呼任务开始时间
- PlanEndDate: $("#taskEndTime").val(),//外呼任务停止时间
- StartTime1: $("#usestrTime1").val(),//生效开始时间1
- EndTime1: $("#useendTime1").val(),//生效结束时间1
- StartTime2: $("#usestrTime2").val(),//生效开始时间2
- EndTime2: $("#useendTime2").val()//生效结束时间2
- },
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- layer.msg("编辑成功!");
- }
- }
- });
- }
-
- })
-
-
- //技能列表
- $.ajax({
- type:"get",
- url:huayi.config.callcenter_url +"Dictionary/GetDicValueListByFlag?flag=ZXZ",
- // url:"http://117.158.196.116:8878/Dictionary/GetDicValueListByFlag",
- async:true,
- dataType:'json',
- data:{
- token: token
- },
- success:function(data){
- var con=data.data;
- $(con).each(function(i, n) {
- $('#jineng').append('<option value="' + n.F_DictionaryValueId + '">' + n.F_Name + '</option>');
- })
- }
- });
- </script>
- </body>
- </html>
|