新乡民调(来自息县民调) - 主标

LookMessage.html 14KB

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