封丘民意调查

LookMessage.html 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479
  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="../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="../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"><span style="color: #f00;">*</span>乡镇或单位:</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="../cutVideo/rrweb.min.js"></script>
  115. <script src="../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="../cutVideo/index.js"></script>
  119. <script src="../cutVideo/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. var countryName;
  131. //console.log(wid);
  132. $(document).ready(function() {
  133. if (wid != null && wid != undefined && wid != "") {
  134. //获取乡镇或单位下拉
  135. getCountry();
  136. XQ();
  137. GetHJJG(); //获取呼叫结果
  138. //GetYHFK();//获取用户反馈
  139. }
  140. //点击电话号码外呼
  141. $(".CallOut").click(function(event) {
  142. if($("#Phone_").text()) {
  143. calloutopt($("#Phone_").text());
  144. }
  145. });
  146. });
  147. //获取乡镇或单位下拉
  148. function getCountry() {
  149. $.ajax({
  150. type: "get",
  151. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  152. dataType: 'json',
  153. data: {
  154. flag: 'JBDW',
  155. token: $.cookie("token")
  156. },
  157. async: true,
  158. success: function(data) {
  159. var res = data.data;
  160. for(var i = 0; i < res.length; i++) {
  161. $('<option value="' + res[i].F_DictionaryValueId + '">' + res[i].F_Name + '</option>').appendTo($("#country"));
  162. }
  163. }
  164. });
  165. }
  166. //外呼
  167. function calloutopt(telphone) {
  168. event.stopPropagation();
  169. if(telphone) {
  170. $.ajax({
  171. type: "get",
  172. url: huayi.config.callcenter_url + "CallOutOpt/GetCallOutprefix",
  173. async: true,
  174. dataType: 'json',
  175. data: {
  176. token: $.cookie("token"),
  177. phone: telphone
  178. },
  179. success: function(result) {
  180. if(result.state.toLowerCase() == "success") {
  181. //debugger
  182. var guid = uuid();
  183. $("#TelCode").val(guid);
  184. top.obj.Type = "MakeCall";
  185. top.obj.DestinationNumber = result.data.phone;
  186. top.obj.Header = result.data.fix;
  187. top.obj.TaskType = "1"; //0:拨号外呼;1:问卷外呼;
  188. top.obj.TaskPhoneID = $("#F_Id").val(); //回访的电话ID
  189. //top.obj.TaskID = guid; //回访记录编号
  190. top.obj.TaskID = $("#F_TaskId").val()
  191. top.Send();
  192. }
  193. }
  194. });
  195. }
  196. }
  197. //详情查看
  198. function XQ() {
  199. $.ajax({
  200. type: "get",
  201. url: huayi.config.callcenter_url + "CallOutPlan/GetTaskTelModel",
  202. dataType: 'json',
  203. data: {
  204. id: wid,
  205. token: $.cookie("token")
  206. },
  207. async: true,
  208. success: function(data) {
  209. var Count = data.data;
  210. if(Count) {
  211. if(Count.taskModel) {
  212. //console.log(Count.taskModel);
  213. $("#Name_").val(Count.taskModel.F_CusName);
  214. $("#Phone_").text(Count.taskModel.F_Phone);
  215. $('#address').val(Count.taskModel.F_Address)
  216. $("#F_CusID").val(Count.taskModel.F_CusID);
  217. $("#F_Id").val(Count.taskModel.F_Id);
  218. $("#F_TaskId").val(Count.taskModel.F_TaskId);
  219. var pid = Count.paperid;
  220. if(pid) {
  221. WJ(pid);
  222. }
  223. }
  224. }
  225. }
  226. });
  227. }
  228. //获取呼叫结果
  229. function GetHJJG() {
  230. $.ajax({
  231. type: "get",
  232. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  233. dataType: 'json',
  234. data: {
  235. flag: 'HJJG',
  236. token: $.cookie("token")
  237. },
  238. async: true,
  239. success: function(data) {
  240. var Count = data.data;
  241. for(var i = 0; i < Count.length; i++) {
  242. //$("<li><label for=''><input type='radio' name='check' value='" + Count[i].F_DictionaryValueId + "' /></label>" + Count[i].F_Name + "</li>").
  243. var listItem = '<li>' +
  244. '<input id="listR_' + i + '" type="radio" name="check" value="' + Count[i].F_DictionaryValueId + '" />' +
  245. '<label for="listR_' + i + '">' + Count[i].F_Name + '</label>' +
  246. '</li>';
  247. $(listItem).appendTo($("#Tgetruset"));
  248. }
  249. }
  250. });
  251. }
  252. //提交
  253. $(".Ce").click(function () {
  254. var telreg = /^\d{3,12}$/;
  255. let callid = localStorage.getItem('callid')
  256. if( $('#callNum').val() && !telreg.test($.trim($('#callNum').val()))) {
  257. layer.confirm('请输入正确格式的电话!', {
  258. icon: 2,
  259. btn: ['确定'] //按钮
  260. });
  261. return;
  262. }
  263. $(".radio").each(function(j, k) {
  264. str = '';
  265. var nameRadio = $(k).attr("name");
  266. var index = $(k).attr("indexs");
  267. var val = $('input[name="' + nameRadio + '"]:checked').val();
  268. var valText = $('input[name="' + nameRadio + '"]:checked').next().text();
  269. var country = $('input[name="' + nameRadio + '"]:checked').next().attr('country')
  270. if(country) {
  271. countryName = country
  272. }
  273. if(val != null) {
  274. str = index + '_' + val + '_' + valText;
  275. ans.push(str);
  276. }
  277. })
  278. $(".checkbox").each(function(j, k) {
  279. strs = '';
  280. var nameCheckbox = $(k).attr("name");
  281. var index = $(k).attr("indexs");
  282. var check = "";
  283. var text = "";
  284. //var val=$('input[name="'+ name+'"]:checked').val();
  285. var VAl = $('input[name="' + nameCheckbox + '"]:checked');
  286. $(VAl).each(function(i, n) {
  287. text += $(this).next().text() + "|";
  288. check += $(this).val() + "|";
  289. })
  290. if(check != "") {
  291. str = index + '_' + check + '_' + text;
  292. ans.push(str);
  293. }
  294. })
  295. $(".Wd").each(function(j, k) {
  296. strs = '';
  297. //debugger;
  298. var nameWd = $(k).attr("name");
  299. var index = $(k).attr("indexs");
  300. var val = $(k).find(".Wds").val();
  301. if(val) {
  302. str = index + '_0_' + val;
  303. ans.push(str);
  304. }
  305. })
  306. if($('input[name="check"]:checked').val() == undefined) {
  307. layer.confirm('呼叫结果必须选择!', {
  308. icon: 2,
  309. btn: ['确定']
  310. });
  311. } else {
  312. //请求
  313. $.ajax({
  314. type: "POST",
  315. url: huayi.config.callcenter_url + "CallOutPlan/Answers",
  316. dataType: 'json',
  317. data: {
  318. callid:callid,
  319. taskid: $("#F_TaskId").val(), //任务ID
  320. custelid: $("#F_Id").val(), //客户电话ID
  321. cusid: $("#F_CusID").val(), //客户档案ID
  322. ans: ans, //答案,数组形式["15_20_单选选项内容","17_25|36|58_复选选项内容1|选项内容2|选项内容3","30_0_问答题"]
  323. hjjgid: $('input[name="check"]:checked').val(), //呼叫结果ID
  324. //yhfkid: $('input[name="checks"]:checked').val(), //用户反馈ID
  325. yhfkid: 0, //用户反馈ID
  326. telphone: $('#Phone_').text(), //电话号码,
  327. name: $('#Name_').val(), //姓名,
  328. phone: $('#callNum').val(), //固定号码,
  329. country: countryName, //乡镇或单位id,
  330. address: $('#address').val(), //地址
  331. token: $.cookie("token")
  332. },
  333. async: true,
  334. success: function(data) {
  335. var Count = data.data;
  336. var index1 = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  337. parent.layer.close(index1); //再执行关闭
  338. parent.initTable();
  339. //停止录屏保存
  340. stopPlayers(); //Count
  341. parent.layer.msg('提交成功');
  342. },
  343. });
  344. }
  345. })
  346. function WJ(pid) {
  347. $(".tbody").empty();
  348. $.ajax({
  349. type: "get",
  350. url: huayi.config.callcenter_url + "/Questionnaire/GetPagerInfoQ",
  351. async: true,
  352. dataType: "json",
  353. data: {
  354. pid: pid,
  355. token: $.cookie("token"),
  356. },
  357. success: function(data) {
  358. if(data.state.toLowerCase() == 'success') {
  359. $('.Title').text(data.data.F_Title);
  360. $("#F_Remark").text(data.data.F_Remark);
  361. $("#startText").text(data.data.F_StartText);
  362. $("#endText").text(data.data.F_EndText);
  363. var Questions = data.data.F_Questions;
  364. var html = '';
  365. for(var i = 0; i < Questions.length; i++) {
  366. var questype = Questions[i].questype;
  367. var Quesid = Questions[i].quesid;
  368. var quesremark = Questions[i].quesremark; //试题说明
  369. if(quesremark) {
  370. quesremark = ' 【' + quesremark + '】';
  371. } else {
  372. quesremark = "";
  373. }
  374. html += '<li class="" name="ltype' + Quesid + '" >';
  375. html += '<div class="Back ">';
  376. html += '<h3 class="size-14 QuesTitle" indexs="' + Questions[i].quesid + '">' + Questions[i].questitle + quesremark + ' </h3>';
  377. html += '</div>';
  378. //判断类型
  379. if(questype == 2) {
  380. //选项
  381. if(Questions[i].quesitems.length > 0) { //单选
  382. html += '<div class="radio clearfix" name="ltype' + Quesid + '" indexs="' + Questions[i].quesid + '">';
  383. var quesitems = Questions[i].quesitems;
  384. html += '<ul class="Ul">'
  385. for(var j = 0; j < quesitems.length; j++) {
  386. html += '<li>'
  387. html += '<label style="font-weight: normal;">'
  388. html += '' + (j + 1) + '.';
  389. if(Questions[i].questitle === 'S3、请问您居住地在本县\\市\\区的哪个乡镇\\街道办事处? 【单选题】') {
  390. console.log(111123222)
  391. html += '<input type="radio" index_="' + quesitems[j].itemid + '" value="' + quesitems[j].itemid + '" name="ltype' + Quesid + '" style="margin-left:5px;"> <span country ="'+ quesitems[j].itemname+ '">' + quesitems[j].itemname + '</span></label>'
  392. }else{
  393. 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>'
  394. }
  395. html += '</li>'
  396. }
  397. html += '</ul>'
  398. html += '</div>'
  399. html += '</li>'
  400. }
  401. } else if(questype == 1) {
  402. //问答题
  403. html += '<div class="Wd" indexs="' + Questions[i].quesid + '">';
  404. html += '<textarea class="Wds" index="' + Questions[i].quesid + '"name="" rows="" cols="" style="width: 100%;"></textarea>'
  405. html += '</div>'
  406. } else {
  407. if(Questions[i].quesitems.length > 0) { //多选
  408. html += '<div class="checkbox clearfix" name="ltype' + Quesid + '" indexs="' + Questions[i].quesid + '">';
  409. html += '<ul class="Ul">'
  410. var quesitems = Questions[i].quesitems;
  411. for(var j = 0; j < quesitems.length; j++) {
  412. html += '<li>'
  413. html += '<label style="font-weight: normal;">'
  414. html += '' + (j + 1) + '.';
  415. html += '<input type="checkbox" index_="' + quesitems[j].itemid + '" value="' + quesitems[j].itemid + '" name="ltype' + Quesid + '" ><span> ' + quesitems[j].itemname + '</span></label>'
  416. //html += '<input type="checkbox" index_="' + quesitems[j].itemid + '" value="' + quesitems[j].itemid + '" name="ltype' + Quesid + '" > ' + quesitems[j].itemname + '</label>'
  417. html += '</li>'
  418. }
  419. html += '</ul>';
  420. html += '</div>'
  421. html += '</li >';
  422. }
  423. }
  424. }
  425. $(html).appendTo(".Qus_box");
  426. autosize($('textarea'));
  427. }
  428. }
  429. });
  430. }
  431. //用户反馈
  432. function GetYHFK() {
  433. $.ajax({
  434. type: "get",
  435. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  436. dataType: 'json',
  437. data: {
  438. flag: 'YHFK',
  439. token: $.cookie("token")
  440. },
  441. async: true,
  442. success: function(data) {
  443. var Count = data.data;
  444. $("<option value=''>--全部--</option>").appendTo($("#selhjjg"));
  445. for(var i = 0; i < Count.length; i++) {
  446. $("<li><label for=''><input type='radio' name='checks' value='" + Count[i].F_DictionaryValueId + "' /></label>" + Count[i].F_Name + "</li>").
  447. appendTo($("#Tg"));
  448. }
  449. }
  450. });
  451. }
  452. //
  453. </script>
  454. </body>
  455. </html>