Sin descripción

LookMessage.html 13KB

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