No Description

LookMessage.html 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>查看信息</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <script src="../Script/Common/huayi.load.js"></script>
  8. <script src="../Script/Common/huayi.config.js"></script>
  9. <link href="../css/Table/table1.css" rel="stylesheet" />
  10. <link href="../css/init.css" rel="stylesheet" />
  11. <link rel="stylesheet" type="text/css" href="../css/lookMsg.css"/>
  12. </head>
  13. <body class="gray-bg">
  14. <div class="wrapper clearfix">
  15. <div class="content_1 clearfix">
  16. <div class="shark_content_title clearfix">
  17. <span>电话信息</span>
  18. </div>
  19. <div class="clearfix Phone_Text clearfix">
  20. <ul class="clearfix form-inline">
  21. <li>
  22. <label for="Name_">姓名:</label>
  23. <input type="text" id="Name_" class="form-control" />
  24. </li>
  25. <li>
  26. <label for="Phone_">电话号码:</label>
  27. <a class="CallOut" id="CallOut"><span id="Phone_"></span><img src="../img/Phones.png" alt="" /></a>
  28. </li>
  29. <li>
  30. <label for="callNum">固定号码:</label>
  31. <input type="text" id="callNum" class="form-control" />
  32. </li>
  33. <li>
  34. <label for="country">乡镇:</label>
  35. <select id="country" class="form-control">
  36. <option value="">请选择乡镇</option>
  37. </select>
  38. </li>
  39. <li>
  40. <label for="address">地址:</label>
  41. <input type="text" id="address" class="form-control" />
  42. </li>
  43. </ul>
  44. </div>
  45. </div>
  46. <div class="content_2 clearfix ">
  47. <div class="shark_content_title clearfix">
  48. <span>呼叫结果</span>
  49. </div>
  50. <div>
  51. <ul class="clearfix" id="Tgetruset">
  52. </ul>
  53. </div>
  54. </div>
  55. <div class="content_3 clearfix " style="display: none;">
  56. <div class="shark_content_title clearfix">
  57. <span>用户反馈</span>
  58. </div>
  59. <div>
  60. <ul class="clearfix" id="Tg">
  61. </ul>
  62. </div>
  63. </div>
  64. <div class="content_4 clearfix ">
  65. <div class="shark_content_title clearfix">
  66. <span>问卷信息</span>
  67. </div>
  68. <div>
  69. <ul style="padding-left: 0;" class="title_ul">
  70. <li>
  71. <label for="">问卷名称</label><span class="Title"></span>
  72. </li>
  73. <li>
  74. <label for="startText">问卷开场语</label><span id="startText" class="F_Remark"></span>
  75. </li>
  76. <li>
  77. <label for="F_Remark">问卷说明</label><span id="F_Remark" class="F_Remark"></span>
  78. </li>
  79. </ul>
  80. <ul class="Qus_box">
  81. </ul>
  82. <ul style="padding-left: 0;" class="title_ul">
  83. <li>
  84. <label for="">问卷结束语</label><span id="endText" class="F_Remark"></span>
  85. </li>
  86. </ul>
  87. </div>
  88. </div>
  89. <div class="content_5 clearfix" style="text-align: center;">
  90. <div>
  91. <button class="Ce btns">提交</button>
  92. <input type="hidden" id="F_CusID" />
  93. <input type="hidden" id="F_Id" />
  94. <input type="hidden" id="F_TaskId" />
  95. <input type="hidden" id="TelCode" value="" />
  96. </div>
  97. </div>
  98. </div>
  99. <script src="../js/guid.js"></script>
  100. <script src="../js/autosize/autosize.js"></script>
  101. <script>
  102. var wid = helper.request.queryString("Str");
  103. var ans = [];
  104. var type;
  105. var star_number = [];
  106. var id;
  107. var content;
  108. var str;
  109. var strs;
  110. //console.log(wid);
  111. $(document).ready(function() {
  112. if(wid != null && wid != undefined && wid != "") {
  113. //获取乡镇下拉
  114. getCountry();
  115. XQ();
  116. GetHJJG(); //获取呼叫结果
  117. //GetYHFK();//获取用户反馈
  118. }
  119. //点击电话号码外呼
  120. $(".CallOut").click(function(event) {
  121. if($("#Phone_").text()) {
  122. calloutopt($("#Phone_").text());
  123. }
  124. });
  125. });
  126. //获取乡镇下拉
  127. function getCountry(){
  128. $.ajax({
  129. type: "get",
  130. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  131. dataType: 'json',
  132. data: {
  133. flag: 'JBDW',
  134. token: $.cookie("token")
  135. },
  136. async: true,
  137. success: function(data) {
  138. var res = data.data;
  139. for(var i = 0; i < res.length; i++) {
  140. $('<option value="'+ res[i].F_DictionaryValueId +'">'+ res[i].F_Name +'</option>').appendTo($("#country"));
  141. }
  142. }
  143. });
  144. }
  145. //外呼
  146. function calloutopt(telphone) {
  147. event.stopPropagation();
  148. if(telphone) {
  149. $.ajax({
  150. type: "get",
  151. url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
  152. async: true,
  153. dataType: 'json',
  154. data: {
  155. token: $.cookie("token"),
  156. phone: telphone
  157. },
  158. success: function(result) {
  159. if(result.state.toLowerCase() == "success") {
  160. //debugger
  161. var guid = uuid();
  162. $("#TelCode").val(guid);
  163. top.obj.Type = "MakeCall";
  164. top.obj.DestinationNumber = result.data.phone;
  165. top.obj.Header = result.data.fix;
  166. top.obj.TaskType = "1"; //0:拨号外呼;1:问卷外呼;
  167. top.obj.TaskPhoneID = $("#F_Id").val(); //回访的电话ID
  168. //top.obj.TaskID = guid; //回访记录编号
  169. top.obj.TaskID = $("#F_TaskId").val()
  170. top.Send();
  171. }
  172. }
  173. });
  174. }
  175. }
  176. //详情查看
  177. function XQ() {
  178. $.ajax({
  179. type: "get",
  180. url: huayi.config.callcenter_url + "CallOutPlan/GetTaskTelModel",
  181. dataType: 'json',
  182. data: {
  183. id: wid,
  184. token: $.cookie("token")
  185. },
  186. async: true,
  187. success: function(data) {
  188. var Count = data.data;
  189. if(Count) {
  190. if(Count.taskModel) {
  191. //console.log(Count.taskModel);
  192. $("#Name_").val(Count.taskModel.F_CusName);
  193. $("#Phone_").text(Count.taskModel.F_Phone);
  194. $("#F_CusID").val(Count.taskModel.F_CusID);
  195. $("#F_Id").val(Count.taskModel.F_Id);
  196. $("#F_TaskId").val(Count.taskModel.F_TaskId);
  197. var pid = Count.paperid;
  198. if(pid) {
  199. WJ(pid);
  200. }
  201. }
  202. }
  203. }
  204. });
  205. }
  206. //获取呼叫结果
  207. function GetHJJG() {
  208. $.ajax({
  209. type: "get",
  210. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  211. dataType: 'json',
  212. data: {
  213. flag: 'HJJG',
  214. token: $.cookie("token")
  215. },
  216. async: true,
  217. success: function(data) {
  218. var Count = data.data;
  219. for(var i = 0; i < Count.length; i++) {
  220. //$("<li><label for=''><input type='radio' name='check' value='" + Count[i].F_DictionaryValueId + "' /></label>" + Count[i].F_Name + "</li>").
  221. var listItem = '<li>' +
  222. '<input id="listR_' + i + '" type="radio" name="check" value="' + Count[i].F_DictionaryValueId + '" />' +
  223. '<label for="listR_' + i + '">' + Count[i].F_Name + '</label>' +
  224. '</li>';
  225. $(listItem).appendTo($("#Tgetruset"));
  226. }
  227. }
  228. });
  229. }
  230. //提交
  231. $(".Ce").click(function() {
  232. $(".radio").each(function(j, k) {
  233. str = '';
  234. var nameRadio = $(k).attr("name");
  235. var index = $(k).attr("indexs");
  236. var val = $('input[name="' + nameRadio + '"]:checked').val();
  237. var valText = $('input[name="' + nameRadio + '"]:checked').next().text();
  238. if(val != null) {
  239. str = index + '_' + val + '_' + valText;
  240. ans.push(str);
  241. }
  242. })
  243. $(".checkbox").each(function(j, k) {
  244. strs = '';
  245. var nameCheckbox = $(k).attr("name");
  246. var index = $(k).attr("indexs");
  247. var check = "";
  248. var text = "";
  249. //var val=$('input[name="'+ name+'"]:checked').val();
  250. var VAl = $('input[name="' + nameCheckbox + '"]:checked');
  251. $(VAl).each(function(i, n) {
  252. text += $(this).next().text() + "|";
  253. check += $(this).val() + "|";
  254. })
  255. if(check != "") {
  256. str = index + '_' + check + '_' + text;
  257. ans.push(str);
  258. }
  259. })
  260. $(".Wd").each(function(j, k) {
  261. strs = '';
  262. //debugger;
  263. var nameWd = $(k).attr("name");
  264. var index = $(k).attr("indexs");
  265. var val = $(k).find(".Wds").val();
  266. if(val) {
  267. str = index + '_0_' + val;
  268. ans.push(str);
  269. }
  270. })
  271. if($('input[name="check"]:checked').val() == undefined) {
  272. layer.confirm('呼叫结果必须选择!', {
  273. icon: 2,
  274. btn: ['确定']
  275. });
  276. } else {
  277. //请求
  278. $.ajax({
  279. type: "POST",
  280. url: huayi.config.callcenter_url + "CallOutPlan/Answers",
  281. dataType: 'json',
  282. data: {
  283. taskid: $("#F_TaskId").val(), //任务ID
  284. custelid: $("#F_Id").val(), //客户电话ID
  285. cusid: $("#F_CusID").val(), //客户档案ID
  286. ans: ans, //答案,数组形式["15_20_单选选项内容","17_25|36|58_复选选项内容1|选项内容2|选项内容3","30_0_问答题"]
  287. hjjgid: $('input[name="check"]:checked').val(), //呼叫结果ID
  288. //yhfkid: $('input[name="checks"]:checked').val(), //用户反馈ID
  289. yhfkid: 0, //用户反馈ID
  290. telphone: $('#Phone_').text(),//电话号码,
  291. name: $('#Name_').val(),//姓名,
  292. phone: $('#callNum').val(),//固定号码,
  293. countryid: $('#country').val(),//乡镇id,
  294. address: $('#address').val(),//地址
  295. token: $.cookie("token")
  296. },
  297. async: true,
  298. success: function(data) {
  299. var Count = data.data;
  300. var index1 = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  301. parent.layer.close(index1); //再执行关闭
  302. parent.initTable();
  303. parent.layer.msg('提交成功');
  304. },
  305. });
  306. }
  307. })
  308. function WJ(pid) {
  309. $(".tbody").empty();
  310. $.ajax({
  311. type: "get",
  312. url: huayi.config.callcenter_url + "/Questionnaire/GetPagerInfoQ",
  313. async: true,
  314. dataType: "json",
  315. data: {
  316. pid: pid,
  317. token: $.cookie("token"),
  318. },
  319. success: function(data) {
  320. if(data.state.toLowerCase() == 'success') {
  321. $('.Title').text(data.data.F_Title);
  322. $("#F_Remark").text(data.data.F_Remark);
  323. $("#startText").text(data.data.F_StartText);
  324. $("#endText").text(data.data.F_EndText);
  325. var Questions = data.data.F_Questions;
  326. var html = '';
  327. for(var i = 0; i < Questions.length; i++) {
  328. var questype = Questions[i].questype;
  329. var Quesid = Questions[i].quesid;
  330. html += '<li class="" name="ltype' + Quesid + '" >';
  331. html += '<div class="Back ">';
  332. html += '<h3 class="size-14 QuesTitle" indexs="' + Questions[i].quesid + '">' + Questions[i].questitle + ' </h3>';
  333. html += '</div>';
  334. //判断类型
  335. if(questype == 2) {
  336. //选项
  337. if(Questions[i].quesitems.length > 0) { //单选
  338. html += '<div class="radio clearfix" name="ltype' + Quesid + '" indexs="' + Questions[i].quesid + '">';
  339. var quesitems = Questions[i].quesitems;
  340. html += '<ul class="Ul">'
  341. for(var j = 0; j < quesitems.length; j++) {
  342. html += '<li>'
  343. html += '<label style="font-weight: normal;">'
  344. html += '' + (j + 1) + '.';
  345. 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>'
  346. html += '</li>'
  347. }
  348. html += '</ul>'
  349. html += '</div>'
  350. html += '</li>'
  351. }
  352. } else if(questype == 1) {
  353. //问答题
  354. html += '<div class="Wd" indexs="' + Questions[i].quesid + '">';
  355. html += '<textarea class="Wds" index="' + Questions[i].quesid + '"name="" rows="" cols="" style="width: 100%;"></textarea>'
  356. html += '</div>'
  357. } else {
  358. if(Questions[i].quesitems.length > 0) { //多选
  359. html += '<div class="checkbox clearfix" name="ltype' + Quesid + '" indexs="' + Questions[i].quesid + '">';
  360. html += '<ul class="Ul">'
  361. var quesitems = Questions[i].quesitems;
  362. for(var j = 0; j < quesitems.length; j++) {
  363. html += '<li>'
  364. html += '<label style="font-weight: normal;">'
  365. html += '' + (j + 1) + '.';
  366. html += '<input type="checkbox" index_="' + quesitems[j].itemid + '" value="' + quesitems[j].itemid + '" name="ltype' + Quesid + '" ><span> ' + quesitems[j].itemname + '</span></label>'
  367. //html += '<input type="checkbox" index_="' + quesitems[j].itemid + '" value="' + quesitems[j].itemid + '" name="ltype' + Quesid + '" > ' + quesitems[j].itemname + '</label>'
  368. html += '</li>'
  369. }
  370. html += '</ul>';
  371. html += '</div>'
  372. html += '</li >';
  373. }
  374. }
  375. }
  376. $(html).appendTo(".Qus_box");
  377. autosize($('textarea'));
  378. }
  379. }
  380. });
  381. }
  382. //用户反馈
  383. function GetYHFK() {
  384. $.ajax({
  385. type: "get",
  386. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  387. dataType: 'json',
  388. data: {
  389. flag: 'YHFK',
  390. token: $.cookie("token")
  391. },
  392. async: true,
  393. success: function(data) {
  394. var Count = data.data;
  395. $("<option value=''>--全部--</option>").appendTo($("#selhjjg"));
  396. for(var i = 0; i < Count.length; i++) {
  397. $("<li><label for=''><input type='radio' name='checks' value='" + Count[i].F_DictionaryValueId + "' /></label>" + Count[i].F_Name + "</li>").
  398. appendTo($("#Tg"));
  399. }
  400. }
  401. });
  402. }
  403. </script>
  404. </body>
  405. </html>