No Description

LookMessage.html 13KB

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