| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="../css/init.css" />
- <title></title>
- <style>
- .shark_content {
- overflow-y: auto;
- position: relative;
- padding-bottom: 50px;
- padding: 10px;
- margin-bottom: 30px;
- }
-
- .shark_content_title {
- font-size: 14px;
- height: 30px;
- line-height: 20px;
- border-bottom: 1px solid #CCCCCC;
- margin-bottom: 5px;
- margin-top: 5px;
- }
-
- .clearfix:after {
- content: "";
- display: block;
- clear: both;
- }
-
- ul {
- padding-left: 0;
- overflow: hidden;
- }
-
- ul li {
- list-style: none;
- float: left;
- width: 33%;
- padding: 6px 0 5px 10px;
- line-height: 30px;
- border: 0.1px dotted #cccccc;
- }
-
- label {
- text-align: center;
- width: 30%;
- }
-
- .layui-layer-shade {
- background-color: red !important;
- }
-
- .wh_btn {
- width: 80%;
- text-align: center;
- padding-top: 20px;
- margin: 0 auto;
- margin-bottom: 20px;
- }
-
- .content_3 {
- display: none;
- }
-
- #tbr {
- border: 1px solid #ccc;
- border-bottom: none;
- }
-
- #tbr td {
- padding: 10px;
- padding: 6px 0 5px 10px;
- color: #717171;
- line-height: 200%;
- border-top: 1px dotted #cccccc;
- }
-
- #tbr th {
- border-right: 1px dotted #cccccc;
- border-top: 1px dotted #cccccc;
- background: #f9f9f9;
- text-align: right;
- }
-
- .Back {
- padding: 5px;
- border-bottom: 1px solid #ccc;
- }
-
- label {
- margin-right: 10px;
- }
-
- .Phone_Text ul {
- padding-left: 0;
- }
-
- .Phone_Text li {
- width: 50%;
- }
-
- .Phone_Text label {
- width: 60px;
- }
-
- .Qus_box li {
- list-style: none;
- border: 1px solid #ccc;
- border-bottom: none;
- float: none;
- }
-
- .Qus_box {
- padding-left: 0 !important;
- }
-
- .Qus_box div {
- padding: 10px;
- border-bottom: 1px solid #ccc;
- }
-
- .title_ul {
- padding-left: 0;
- margin-bottom: 0;
- }
-
- .title_ul li {
- border: 1px solid #ccc;
- float: none;
- }
-
- .title_ul li label {
- border-right: 1px solid #ccc;
- line-height: 30px;
- margin: 0;
- padding: 10px;
- }
-
- .checkbox input[type=checkbox] {
- margin-top: 0;
- margin-left: 0;
- position: relative;
- }
-
- .radio input[type=radio] {
- margin-top: 0;
- margin-left: 0;
- position: relative;
- }
-
- .tbody li {
- width: 100%;
- padding: 5px;
- }
-
- .tbody label {
- text-align: left;
- background-color: #fff;
- }
- </style>
- </head>
- <body>
- <div class="shark_content ">
- <div class="content_1">
- <div class="shark_content_title">
- <span>电话信息:</span>
- </div>
- <ul class="UL"></ul>
- </div>
- <div class="content_2 clearfix">
- <div class="shark_content_title">
- <span>呼叫结果</span>
- </div>
- <div class="clearfix">
- <ul class="clearfix " id="ulhjjg"></ul>
- </div>
- </div>
- <div class="content_2 clearfix">
- <div class="shark_content_title">
- <span>用户反馈</span>
- </div>
- <div class="clearfix">
- <ul class="clearfix " id="ulyhfk"></ul>
- </div>
- </div>
- <div class="content_3 clearfix" style="display: none;">
- <div class="shark_content_title">
- <span>问卷调查</span>
- </div>
- <div class="clearfix">
- <div class="tbright">
- <table id="tbr" style="width: 100%;">
- <thead>
- <tr>
- <th style='width: 150px;'>问卷名称:</th>
- <td colspan="7"><span class="Title"></span></td>
- </tr>
- <tr>
- <th style='width: 150px;'>问卷说明:</th>
- <td colspan="7"><span class="F_Remark"></span></td>
- </tr>
- </thead>
- <!--<tbody class="tbody">
- <tr class="Back">
- <td colspan="2">
- <h3 class="size-14">1、对我们的产品是否满意? </h3>
- </td>
- </tr>
- <tr class="">
- <td colspan="2">
- <div class="Message_box">
- <label style="font-weight: normal;">1.<input type="checkbox" value="一般" name="ltype"> 一般</label>
- <label style="font-weight: normal;"><input type="checkbox" value="538" name="ltype"> 满意</label>
- <label style="font-weight: normal;"><input type="checkbox" value="539" name="ltype">不满意</label>
- </div>
- </td>
- </tr>
- <tr class="Back">
- <td colspan="2">
- <h3 class="size-14">2、您好,你是? </h3>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <div class="Message_box">
- <textarea name="" rows="" cols="" style="width: 100%;"></textarea>
- </div>
- </td>
- </tr>
- </tbody>-->
- </table>
- <ul class="tbody"></ul>
- </div>
- </div>
- </div>
-
- </div>
- <div class="wh_btn">
- <input type="hidden" name="taskid" id="taskid" value="" />
- <input type="hidden" name="id" id="id" value="" />
- <input type="button" value="提交" class="btn btn-primary" id="Submit" />
- </div>
- <script src="../js/guid.js"></script>
- <script>
- var id = helper.request.queryString("wid");
- var taskId;
- var token = $.cookie("token");
- console.log(id);
- $(document).ready(function() {
- if(id) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "CallPlan/GetCallNumDetail",
- async: true,
- dataType: 'json',
- data: {
- token: token,
- id: id
- },
- success: function(data) {
- if(data.state == 'success') {
- debugger;
- var html = '';
- var detail = data.data.detail;
- for(var i = 0; i < detail.length; i++) {
- if(detail[i].field == "F_Phone") {
- html = '<li>' +
- '<label for="">' + detail[i].text + ':</label>' +
- '<span class="CusTelphone">' + detail[i].value + '</span><img id="Call" style="vertical-align: text-bottom;margin-left: 5px;"src="../img/Phones.png" />' +
- '</li>'
- } else {
- html = '<li>' +
- '<label for="">' + detail[i].text + ':</label>' +
- '<span class="' + detail[i].field + '">' + detail[i].value + '</span>' +
- '</li>'
- }
- $(html).appendTo(".UL");
- }
- if(data.data.pagerid > 0) {
- $('.content_3').show();
- $(".tbody").empty();
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "/Questionnaire/GetPagerInfoQ",
- async: true,
- dataType: "json",
- data: {
- pid: data.data.pagerid,
- token: $.cookie("token"),
- },
- success: function(data) {
- if(data.state.toLowerCase() == 'success') {
- $('.Title').text(data.data.F_Title);
- $(".F_Remark").text(data.data.F_Remark);
- var Questions = data.data.F_Questions;
- var html = '';
- for(var i = 0; i < Questions.length; i++) {
- var questype = Questions[i].questype;
- var Quesid = Questions[i].quesid;
- html += '<li class="" name="ltype' + Quesid + '" >';
- html += '<div class="Back">';
- html += '<h3 class="size-14 QuesTitle" indexs="' + Questions[i].quesid + '">' + Questions[i].questitle + ' </h3>';
- html += '</div>';
- //判断类型
- if(questype == 2) {
- //选项
- if(Questions[i].quesitems.length > 0) { //单选
- html += '<div class="radio" name="ltype' + Quesid + '" indexs="' + Questions[i].quesid + '">';
- var quesitems = Questions[i].quesitems;
- for(var j = 0; j < quesitems.length; j++) {
- html += '<label style="font-weight: normal;">'
- html += '' + (j + 1) + '.';
- html += '<input type="radio" index_="' + quesitems[j].itemid + '" value="' + quesitems[j].itemid + '" name="ltype' + Quesid + '" style="margin-left:5px;"> <span>' + quesitems[j].itemname + '</span></label>'
- }
- html += '</div>'
- html += '</li>'
- }
- } else if(questype == 1) {
- //问答题
- html += '<div class="Wd" indexs="' + Questions[i].quesid + '">';
- html += '<textarea class="Wds" index="' + Questions[i].quesid + '"name="" rows="" cols="" style="width: 100%;"></textarea>'
- html += '</div>'
- } else {
- if(Questions[i].quesitems.length > 0) { //多选
- html += '<div class="checkbox" name="ltype' + Quesid + '" indexs="' + Questions[i].quesid + '">';
- var quesitems = Questions[i].quesitems;
- for(var j = 0; j < quesitems.length; j++) {
- html += '<label style="font-weight: normal;">'
- html += '' + (j + 1) + '.';
- html += '<input type="checkbox" index_="' + quesitems[j].itemid + '" value="' + quesitems[j].itemid + '" name="ltype' + Quesid + '" ><span> ' + quesitems[j].itemname + '</span></label>'
- //html += '<input type="checkbox" index_="' + quesitems[j].itemid + '" value="' + quesitems[j].itemid + '" name="ltype' + Quesid + '" > ' + quesitems[j].itemname + '</label>'
- }
- html += '</div>'
- html += '</li >';
- }
- }
- }
- $(html).appendTo(".tbody");
- }
- }
- });
- }
- $('#taskid').val(data.data.taskid);
- $('#id').val(data.data.id);
- }
- $("#Call").click(function() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
- async: true,
- dataType: 'json',
- data: {
- token: $.cookie("token"),
- phone: $(".CusTelphone").text()
- },
- success: function(result) {
- // result = $.parseJSON(result);
- if(result.state.toLowerCase() == "success") {
- var guid = uuid();
- top.obj.Type = "MakeCall";
- top.obj.DestinationNumber = result.data.phone;
- top.obj.Header = result.data.fix;
- top.obj.TaskType = "9"; //0:点击外呼;
- top.obj.TaskPhoneID = $('#id').val(); //点击外呼号码ID
- top.obj.TaskID = $('#taskid').val(); //点击外呼任务Id
- top.Send();
- $(".WH").addClass("hidens");
- //更新外呼号码状态
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + "CallPlan/UpdateCallState",
- dataType: "json",
- data: {
- id: id
- },
- success: function(res) {}
- })
- }
- }
- });
- })
- }
- });
- GetHJJG();
- GetYHFK();
- }
- })
- //获取呼叫结果
- function GetHJJG() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
- dataType: 'json',
- data: {
- flag: 'HJJG',
- token: token
- },
- async: true,
- success: function(data) {
- debugger;
- var Count = data.data;
- //$("<option value=''>--全部--</option>").appendTo($("#selhjjg"));
- for(var i = 0; i < Count.length; i++) {
- console.log(Count[i].F_UserName);
- //$("<option value='" + Count[i].F_DictionaryValueId + "'>" + Count[i].F_Name + "</option>").appendTo($("#selhjjg"));
- $("<li><input type='radio' name='hjjg' value='" + Count[i].F_DictionaryValueId + "' id='hjjg" + Count[i].F_DictionaryValueId + "' /><label for='hjjg" + Count[i].F_DictionaryValueId + "'>" + Count[i].F_Name + "</label></li>").
- appendTo($("#ulhjjg"));
- }
- }
- });
- }
- function GetYHFK() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
- dataType: 'json',
- data: {
- flag: 'YHFK',
- token: token
- },
- async: true,
- success: function(data) {
- debugger;
- var Count = data.data;
- //$("<option value=''>--全部--</option>").appendTo($("#selhjjg"));
- for(var i = 0; i < Count.length; i++) {
- console.log(Count[i].F_UserName);
- //$("<option value='" + Count[i].F_DictionaryValueId + "'>" + Count[i].F_Name + "</option>").appendTo($("#selhjjg"));
- $("<li><input type='radio' name='yhfk' value='" + Count[i].F_DictionaryValueId + "' id='yhfk" + Count[i].F_DictionaryValueId + "' /><label for='yhfk" + Count[i].F_DictionaryValueId + "'>" + Count[i].F_Name + "</label></li>").
- appendTo($("#ulyhfk"));
- }
- }
- });
- }
- //提交
- var ans = [];
- var type;
- var star_number = [];
- var content;
- var str;
- var strs;
- $("#Submit").click(function() {
- $("#Submit").attr("disabled", "disabled");
- $(".radio").each(function(j, k) {
- str = '';
- var name = $(k).attr("name");
- var index = $(k).attr("indexs");
- var val = $('input[name="' + name + '"]:checked').val();
- var valText = $('input[name="' + name + '"]:checked').next().text();
- if(val != null) {
- str = index + '_' + val + '_' + valText;
- ans.push(str);
- }
- })
- $(".checkbox").each(function(j, k) {
- strs = '';
- var name = $(k).attr("name");
- var index = $(k).attr("indexs");
- var check = "";
- var text = "";
- //var val=$('input[name="'+ name+'"]:checked').val();
- var VAl = $('input[name="' + name + '"]:checked');
- $(VAl).each(function(i, n) {
- text += $(this).next().text() + "|";
- check += $(this).val() + "|";
- })
- if(check != "") {
- str = index + '_' + check + '_' + text;
- ans.push(str);
- }
- })
- $(".Wd").each(function(j, k) {
- strs = '';
- var name = $(k).attr("name");
- var index = $(k).attr("indexs");
- var val = $(k).find(".Wds").val();
- if(val) {
- str = index + '_0_' + val;
- ans.push(str);
- }
- })
- console.log(ans);
- //请求
- $.ajax({
- type: "POST",
- url: huayi.config.callcenter_url + "CallPlan/Answers",
- dataType: 'json',
- data: {
- taskid: $("#taskid").val(), //任务ID
- id: $('#id').val(), //客户电话ID
- //cusid: $("#F_CusID").val(),//客户档案ID
- ans: ans, //答案,数组形式["15_20_单选选项内容","17_25|36|58_复选选项内容1|选项内容2|选项内容3","30_0_问答题"]
- hjjg: $('#ulhjjg input[name="hjjg"]:checked ').val(), //呼叫结果
- yhfk: $('#ulyhfk input[name="yhfk"]:checked ').val(), //用户反馈
- remark: $(".remark").val(),
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- if(data.state == 'success') {
- var Count = data.data;
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- parent.initTable();
- console.log(Count)
- } else {
- $("#Submit").removeAttr("disabled");
- }
- }
- });
- })
- </script>
- </body>
- </html>
|