PingAnYeXianSZCG_Web 前端代码

LookMessage.html 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  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. </style>
  107. </head>
  108. <body class="gray-bg">
  109. <div class="wrapper clearfix">
  110. <div class="content_1 clearfix">
  111. <div class="shark_content_title clearfix">
  112. <span>电话信息</span>
  113. </div>
  114. <div class="clearfix Phone_Text clearfix">
  115. <ul class="clearfix">
  116. <li>
  117. <label for="">姓名:</label><span class="Name_">18839115206</span>
  118. </li>
  119. <li>
  120. <label for="">电话号码:</label><span class="Phone_"></span>
  121. </li>
  122. </ul>
  123. </div>
  124. </div>
  125. <div class="content_2 clearfix ">
  126. <div class="shark_content_title clearfix">
  127. <span>呼叫结果</span>
  128. </div>
  129. <div>
  130. <ul class="clearfix" id="Tgetruset">
  131. </ul>
  132. </div>
  133. </div>
  134. <div class="content_3 clearfix ">
  135. <div class="shark_content_title clearfix">
  136. <span>用户反馈</span>
  137. </div>
  138. <div>
  139. <ul class="clearfix" id="Tg">
  140. </ul>
  141. </div>
  142. </div>
  143. <div class="content_4 clearfix ">
  144. <div class="shark_content_title clearfix">
  145. <span>问卷信息</span>
  146. <div>
  147. <ul style="padding-left: 0;" class="title_ul">
  148. <li>
  149. <label for="">问卷名称</label><span class="Title">5555555555555555</span>
  150. </li>
  151. <li>
  152. <label for="">问卷名称</label><span class="F_Remark"></span>
  153. </li>
  154. </ul>
  155. <ul class="Qus_box">
  156. </ul>
  157. </div>
  158. </div>
  159. </div>
  160. <div class="content_5 clearfix">
  161. <div>
  162. <button class="Ce">提交</button>
  163. <input type="hidden" id="F_CusID"/>
  164. <input type="hidden" id="F_Id"/>
  165. </div>
  166. </div>
  167. </div>
  168. <script>
  169. var wid = helper.request.queryString("Str");
  170. console.log(wid);
  171. $(document).ready(function() {
  172. GetHJJG();
  173. GetYHFK();
  174. XQ(wid);
  175. /*搜索*/
  176. $("#sc_btns").click(function() {
  177. initTable();
  178. })
  179. })
  180. //详情查看
  181. function XQ(wid) {
  182. console.log(wid);
  183. $.ajax({
  184. type: "get",
  185. url: huayi.config.callcenter_url + "CallOutPlan/GetTaskTelModel?",
  186. dataType: 'json',
  187. data: {
  188. id: wid,
  189. token: $.cookie("token")
  190. },
  191. async: true,
  192. success: function(data) {
  193. var Count = data.data;
  194. console.log(Count.taskModel);
  195. $(".Name_").text(Count.taskModel.F_CusName);
  196. $(".Phone_").text(Count.taskModel.F_Phone);
  197. $("#F_CusID").val(Count.taskModel.F_CusID);
  198. $("#F_Id").val(Count.taskModel.F_Id);
  199. var pid = Count.paperid;
  200. WJ(pid)
  201. }
  202. });
  203. }
  204. //获取呼叫结果
  205. function GetHJJG() {
  206. $.ajax({
  207. type: "get",
  208. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  209. dataType: 'json',
  210. data: {
  211. flag: 'HJJG',
  212. token: $.cookie("token")
  213. },
  214. async: true,
  215. success: function(data) {
  216. var Count = data.data;
  217. $("<option value=''>--全部--</option>").appendTo($("#selhjjg"));
  218. for(var i = 0; i < Count.length; i++) {
  219. $("<li><label for=''><input type='radio' name='check' value='" + Count[i].F_DictionaryValueId + "' /></label>" + Count[i].F_Name + "</li>").
  220. appendTo($("#Tgetruset"));
  221. }
  222. }
  223. });
  224. }
  225. function WJ(pid) {
  226. $(".tbody").empty();
  227. $.ajax({
  228. type: "get",
  229. url: huayi.config.callcenter_url + "/Questionnaire/GetPagerInfoQ",
  230. async: true,
  231. dataType: "json",
  232. data: {
  233. pid: pid,
  234. token: $.cookie("token"),
  235. },
  236. success: function(data) {
  237. if(data.state.toLowerCase() == 'success') {
  238. $('.Title').text(data.data.F_Title);
  239. $(".F_Remark").text(data.data.F_Remark);
  240. var Questions = data.data.F_Questions;
  241. var html = '';
  242. for(var i = 0; i < Questions.length; i++) {
  243. var questype = Questions[i].questype;
  244. var Quesid = Questions[i].quesid;
  245. html += '<li class="" name="ltype' + Quesid + '" >';
  246. html += '<div class="Back">';
  247. html += '<h3 class="size-14 QuesTitle" indexs="' + Questions[i].quesid + '">' + Questions[i].questitle + ' </h3>';
  248. html += '</div>';
  249. //判断类型
  250. if(questype == 2) {
  251. //选项
  252. if(Questions[i].quesitems.length > 0) { //单选
  253. html += '<div class="radio" name="ltype' + Quesid + '" indexs="' + Questions[i].quesid + '">';
  254. var quesitems = Questions[i].quesitems;
  255. for(var j = 0; j < quesitems.length; j++) {
  256. html += '<label style="font-weight: normal;">'
  257. html += '' + (j + 1) + '.';
  258. html += '<input type="radio" index_="' + quesitems[j].itemid + '" value="' + quesitems[j].itemid + '" name="ltype' + Quesid + '" style="margin-left:5px;"> ' + quesitems[j].itemname + '</label>'
  259. }
  260. html += '</div>'
  261. html += '</li>'
  262. }
  263. } else if(questype == 1) {
  264. //问答题
  265. html += '<div class="Wd" indexs="' + Questions[i].quesid + '">';
  266. html += '<textarea class="Wds" index="' + Questions[i].quesid + '"name="" rows="" cols="" style="width: 100%;"></textarea>'
  267. html += '</div>'
  268. } else {
  269. if(Questions[i].quesitems.length > 0) { //多选
  270. html += '<div class="checkbox" name="ltype' + Quesid + '" indexs="' + Questions[i].quesid + '">';
  271. var quesitems = Questions[i].quesitems;
  272. for(var j = 0; j < quesitems.length; j++) {
  273. html += '<label style="font-weight: normal;">'
  274. html += '' + (j + 1) + '.';
  275. html += '<input type="checkbox" index_="' + quesitems[j].itemid + '" value="' + quesitems[j].itemid + '" name="ltype' + Quesid + '" > ' + quesitems[j].itemname + '</label>'
  276. }
  277. html += '</div>'
  278. html += '</li >';
  279. }
  280. }
  281. }
  282. $(html).appendTo(".Qus_box");
  283. }
  284. }
  285. });
  286. }
  287. //用户反馈
  288. function GetYHFK() {
  289. $.ajax({
  290. type: "get",
  291. url: huayi.config.callcenter_url + "Dictionary/GetDicValueListByFlag",
  292. dataType: 'json',
  293. data: {
  294. flag: 'YHFK',
  295. token: $.cookie("token")
  296. },
  297. async: true,
  298. success: function(data) {
  299. var Count = data.data;
  300. $("<option value=''>--全部--</option>").appendTo($("#selhjjg"));
  301. for(var i = 0; i < Count.length; i++) {
  302. $("<li><label for=''><input type='radio' name='checks' value='" + Count[i].F_DictionaryValueId + "' /></label>" + Count[i].F_Name + "</li>").
  303. appendTo($("#Tg"));
  304. }
  305. }
  306. });
  307. }
  308. //提交
  309. var ans = [];
  310. var type;
  311. var star_number = [];
  312. var id;
  313. var content;
  314. var str;
  315. var strs;
  316. $(".Ce").click(function() {
  317. $(".radio").each(function(j,k) {
  318. str = '';
  319. var name = $(k).attr("name");
  320. var index = $(k).attr("indexs");
  321. var val=$('input[name="'+ name+'"]:checked').val();
  322. str=index+'_'+val+'_';
  323. ans.push(str);
  324. })
  325. $(".checkbox").each(function(j,k) {
  326. strs = '';
  327. var name = $(k).attr("name");
  328. var index = $(k).attr("indexs");
  329. var val=$('input[name="'+ name+'"]:checked').val();
  330. str=index+'|'+val+'_';
  331. ans.push(str);
  332. })
  333. $(".Wd").each(function(j,k) {
  334. strs = '';
  335. var name = $(k).attr("name");
  336. var index = $(k).attr("indexs");
  337. var val=$(k).find(".Wds").val();
  338. str=index+'_0_'+val;
  339. ans.push(str);
  340. })
  341. console.log(ans);
  342. //请求
  343. $.ajax({
  344. type: "POST",
  345. url: huayi.config.callcenter_url + "CallOutPlan/Answers",
  346. dataType: 'json',
  347. data: {
  348. taskid: wid,//任务ID
  349. custelid:$("#F_Id").val(),//客户电话ID
  350. cusid:$("#F_CusID").val(),//客户档案ID
  351. ans:ans,//答案,数组形式["15_20_单选选项内容","17_25|36|58_复选选项内容1|选项内容2|选项内容3","30_0_问答题"]
  352. hjjgid:$('input[name="check"]:checked').val(),//呼叫结果ID
  353. yhfkid:$('input[name="checks"]:checked').val(),//用户反馈ID
  354. token: $.cookie("token")
  355. },
  356. async: true,
  357. success: function(data) {
  358. var Count = data.data;
  359. console.log(Count)
  360. }
  361. });
  362. })
  363. </script>
  364. </body>
  365. </html>