| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>查看信息</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link href="../css/Table/table1.css" rel="stylesheet" />
- <link href="../css/init.css" rel="stylesheet" />
- <style>
- table td {
- word-break: break-all;
- word-wrap: break-word;
- }
-
- table th {
- min-width: 120px;
- }
-
- .size-14 {
- font-size: 14px!important;
- }
-
- .shark_content_title {
- font-size: 14px;
- height: 30px;
- line-height: 20px;
- border-bottom: 1px solid #CCCCCC;
- margin-bottom: 5px;
- margin-top: 5px;
- }
-
- .content_2 li {
- width: 24%;
- margin-bottom: 10px;
- }
-
- .content_3 li {
- width: 24%;
- margin-bottom: 10px;
- }
-
- #tbr {
- border: 1px solid #ccc;
- }
-
- #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 {
- background-color: #f5f5f5;
- }
-
- 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;
- border-top: none
- }
-
- .Qus_box {
- padding-left: 0!important;
- }
-
- .Qus_box div {
- padding: 10px;
- border-top: 1px solid #ccc;
- }
-
- .title_ul {
- padding-left: 0;
- margin-bottom: 0;
- }
- .title_ul li {
- border: 1px solid #ccc;
- float: none;
- margin-top: -1px;
- overflow: hidden;
- }
- .title_ul li span{
- width: 90%;
- line-height: 30px;
- /*text-indent: 2em;*/
- border-left: 1px solid #ccc;
- display: block;
- float: left;
- padding: 0 10px;
- }
- .title_ul li label {
-
- line-height: 30px;
- margin: 0;
- text-align: center;
- width: 10%;
- display: block;
- float: left;
-
- }
- .checkbox input[type=checkbox] {
- margin-top: 0;
- margin-left: 0;
- position: relative;
- }
-
- .radio input[type=radio] {
- margin-top: 0;
- margin-left: 0;
- position: relative;
- }
-
- .wrapper {
- margin-bottom: 20px;
- }
-
- .Ul {
- float: left;
- padding-left: 0;
- border: none
- }
-
- .Ul li {
- float: left;
- border: none;
- padding: 5px;
- }
-
- .checkbox,
- .radio {
- margin-bottom: 0;
- }
-
- .Wd {
- border-bottom: 1px solid #ccc;
- }
- </style>
- </head>
- <body class="gray-bg">
- <div class="wrapper clearfix">
- <div class="content_1 clearfix">
- <div class="shark_content_title clearfix">
- <span>电话信息</span>
- </div>
- <div class="clearfix Phone_Text clearfix">
- <ul class="clearfix">
- <li>
- <label for="">姓名:</label><span class="Name_">18839115206</span>
- </li>
- <li>
- <label for="">电话号码:</label>
- <a class="CallOut" id="CallOut"><span class="Phone_"></span><img src="../img/Phones.png" alt="" /></a>
- </li>
- </ul>
- </div>
- </div>
- <div class="content_2 clearfix ">
- <div class="shark_content_title clearfix">
- <span>呼叫结果</span>
- </div>
- <div>
- <ul class="clearfix" id="Tgetruset">
- </ul>
- </div>
- </div>
- <div class="content_3 clearfix " style="display: none;">
- <div class="shark_content_title clearfix">
- <span>用户反馈</span>
- </div>
- <div>
- <ul class="clearfix" id="Tg">
- </ul>
- </div>
- </div>
- <div class="content_4 clearfix ">
- <div class="shark_content_title clearfix">
- <span>问卷信息</span>
- </div>
- <div>
- <ul style="padding-left: 0;" class="title_ul">
- <li>
- <label for="">问卷名称</label><span class="Title"></span>
- </li>
- <li>
- <label for="">问卷说明</label><span class="F_Remark"></span>
- </li>
- </ul>
- <ul class="Qus_box">
- </ul>
- </div>
- </div>
- <div class="content_5 clearfix" style="text-align: center;">
- <div>
- <button class="Ce btns">提交</button>
- <input type="hidden" id="F_CusID" />
- <input type="hidden" id="F_Id" />
- <input type="hidden" id="F_TaskId" />
- <input type="hidden" id="TelCode" value="" />
- </div>
- </div>
- </div>
- <script src="../js/guid.js"></script>
- <script>
- var wid = helper.request.queryString("Str");
- //console.log(wid);
- $(document).ready(function() {
- GetHJJG();
- //GetYHFK();
- XQ(wid);
- /*搜索*/
- $("#sc_btns").click(function() {
- initTable();
- })
- $(".CallOut").click(function(event) {
- if($(".Phone_").text()) {
- calloutopt($(".Phone_").text());
- }
- });
- })
- //外呼
- function calloutopt(telphone) {
- event.stopPropagation();
- if(telphone) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
- async: true,
- dataType: 'json',
- data: {
- token: $.cookie("token"),
- phone: telphone
- },
- success: function(result) {
- if(result.state.toLowerCase() == "success") {
- var guid = uuid();
- $("#TelCode").val(guid);
- top.obj.Type = "MakeCall";
- top.obj.DestinationNumber = result.data.phone;
- top.obj.Header = result.data.fix;
- top.obj.TaskType = "1"; //0:拨号外呼;1:问卷外呼;
- top.obj.TaskPhoneID = $("#F_Id").val(); //回访的电话ID
- top.obj.TaskID = guid; //回访记录编号
- top.Send();
- }
- }
- });
- }
- }
- //详情查看
- function XQ(wid) {
- console.log(wid);
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "CallOutPlan/GetTaskTelModel",
- dataType: 'json',
- data: {
- id: wid,
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- var Count = data.data;
- console.log(Count.taskModel);
- $(".Name_").text(Count.taskModel.F_CusName);
- $(".Phone_").text(Count.taskModel.F_Phone);
- $("#F_CusID").val(Count.taskModel.F_CusID);
- $("#F_Id").val(Count.taskModel.F_Id);
- $("#F_TaskId").val(Count.taskModel.F_TaskId);
- var pid = Count.paperid;
- WJ(pid)
- }
- });
- }
- //获取呼叫结果
- function GetHJJG() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
- dataType: 'json',
- data: {
- flag: 'HJJG',
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- var Count = data.data;
- $("<option value=''>--全部--</option>").appendTo($("#selhjjg"));
- for(var i = 0; i < Count.length; i++) {
- $("<li><label for=''><input type='radio' name='check' value='" + Count[i].F_DictionaryValueId + "' /></label>" + Count[i].F_Name + "</li>").
- appendTo($("#Tgetruset"));
- }
- }
- });
- }
- function WJ(pid) {
- $(".tbody").empty();
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "/Questionnaire/GetPagerInfoQ",
- async: true,
- dataType: "json",
- data: {
- pid: pid,
- 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 clearfix" name="ltype' + Quesid + '" indexs="' + Questions[i].quesid + '">';
- var quesitems = Questions[i].quesitems;
- html += '<ul class="Ul">'
- for(var j = 0; j < quesitems.length; j++) {
- html += '<li>'
- 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 += '</li>'
- }
- html += '</ul>'
- 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 clearfix" name="ltype' + Quesid + '" indexs="' + Questions[i].quesid + '">';
- html += '<ul class="Ul">'
- var quesitems = Questions[i].quesitems;
- for(var j = 0; j < quesitems.length; j++) {
- html += '<li>'
- 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 += '</li>'
- }
- html += '</ul>';
- html += '</div>'
- html += '</li >';
- }
- }
- }
- $(html).appendTo(".Qus_box");
- }
- }
- });
- }
- //用户反馈
- function GetYHFK() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
- dataType: 'json',
- data: {
- flag: 'YHFK',
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- var Count = data.data;
- $("<option value=''>--全部--</option>").appendTo($("#selhjjg"));
- for(var i = 0; i < Count.length; i++) {
- $("<li><label for=''><input type='radio' name='checks' value='" + Count[i].F_DictionaryValueId + "' /></label>" + Count[i].F_Name + "</li>").
- appendTo($("#Tg"));
- }
- }
- });
- }
- //提交
- var ans = [];
- var type;
- var star_number = [];
- var id;
- var content;
- var str;
- var strs;
- $(".Ce").click(function() {
- $(".radio").each(function(j, k) {
- str = '';
- var nameRadio = $(k).attr("name");
- var index = $(k).attr("indexs");
- var val = $('input[name="' + nameRadio + '"]:checked').val();
- var valText = $('input[name="' + nameRadio + '"]:checked').next().text();
- if(val != null) {
- str = index + '_' + val + '_' + valText;
- ans.push(str);
- }
- })
- $(".checkbox").each(function(j, k) {
- strs = '';
- var nameCheckbox = $(k).attr("name");
- var index = $(k).attr("indexs");
- var check = "";
- var text = "";
- //var val=$('input[name="'+ name+'"]:checked').val();
- var VAl = $('input[name="' + nameCheckbox + '"]: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 = '';
- //debugger;
- var nameWd = $(k).attr("name");
- var index = $(k).attr("indexs");
- var val = $(k).find(".Wds").val();
- if(val) {
- str = index + '_0_' + val;
- ans.push(str);
- }
- })
- if($('input[name="check"]:checked').val() == undefined){
- layer.confirm('呼叫结果必须选择!',
- {
- icon:2,
- btn: ['确定']
- });
- }else{
- //请求
- $.ajax({
- type: "POST",
- url: huayi.config.callcenter_url + "CallOutPlan/Answers",
- dataType: 'json',
- data: {
- taskid: $("#F_TaskId").val(), //任务ID
- custelid: $("#F_Id").val(), //客户电话ID
- cusid: $("#F_CusID").val(), //客户档案ID
- ans: ans, //答案,数组形式["15_20_单选选项内容","17_25|36|58_复选选项内容1|选项内容2|选项内容3","30_0_问答题"]
- hjjgid: $('input[name="check"]:checked').val(), //呼叫结果ID
- //yhfkid: $('input[name="checks"]:checked').val(), //用户反馈ID
- yhfkid: 0, //用户反馈ID
- token: $.cookie("token")
- },
- async: true,
- success: function(data) {
- var Count = data.data;
- //if(data.state == "success") {
- var index1 = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- //debugger;
- parent.layer.close(index1); //再执行关闭
- parent.initTable();
- parent.layer.msg('提交成功');
- //}
- },
- });
- }
- })
- </script>
- </body>
- </html>
|