Keine Beschreibung

LookMessage.html 14KB

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