PingAnYeXianSZCG_Web 前端代码

LookMessage.html 12KB

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