暂无描述

auditAddReply.html 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <script src="../Script/Common/huayi.load.js"></script>
  6. <script src="../Script/Common/huayi.config.js"></script>
  7. <link href="../css/layer/need/layer.css" />
  8. <link rel="stylesheet" href="../css/init.css" />
  9. <title>审核</title>
  10. </head>
  11. <style>
  12. .text-center{
  13. text-align: center !important;
  14. }
  15. .textarea_audio{
  16. width: 96% !important;
  17. }
  18. </style>
  19. <body>
  20. <div class="Common">
  21. <div style="width: 100%;padding: 10px;">
  22. <table class="Table" border="" cellspacing="0" cellpadding="0">
  23. <theard>
  24. <tr>
  25. <td class="text-center" style="min-width:80px;">承办人</td>
  26. <td class="text-center" style="min-width:80px;">联系方式</td>
  27. <td class="text-center" style="min-width:80px;">办理结果</td>
  28. <td class="text-center" style="min-width:80px;">办理时间</td>
  29. <td class="text-center" style="min-width:80px;">是/否向当事人反馈</td>
  30. <td class="text-center" style="min-width:80px;">是否满意</td>
  31. <td class="text-center" style="min-width:80px;">附件</td>
  32. <td class="text-center" style="min-width:80px;">追加回复附件</td>
  33. <td class="text-center" style="min-width:100px;">审核状态</td>
  34. <td class="text-center" style="min-width:500px;">审核原因</td>
  35. </tr>
  36. </theard>
  37. <tbody class="BLQK">
  38. </tbody>
  39. </table>
  40. <div class="Common">
  41. <div class="btn_box">
  42. <button class="btns BC">提交</button>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <script src="../js/adjustHeight.js"></script>
  48. <script src="../css/laydate/laydate.js"></script>
  49. <script>
  50. var wid = helper.request.queryString("wid");
  51. var idData = []
  52. $(document).ready(function() {
  53. getDetail(16);
  54. });
  55. $(".BC").click(function(){
  56. var isaudit
  57. var params = getParams()
  58. if (params.nexttype ===0|| params.nexttype ===2 ) {
  59. params.isaudit = 1
  60. if (params.nexttype === 0) {
  61. layer.confirm('是否发送短信?', {
  62. btn: ['是', '否'] // 按钮
  63. }, function() {
  64. params.issms = 1
  65. handleAuditAppend(params)
  66. }, function() {
  67. params.issms =0
  68. handleAuditAppend(params)
  69. });
  70. }else{
  71. handleAuditAppend(params)
  72. }
  73. }else {
  74. params.isaudit = 0
  75. handleAuditAppend(params)
  76. }
  77. })
  78. function handleAuditAppend (params) {
  79. params.workorderid = wid
  80. params.token = $.cookie("token")
  81. console.log(params)
  82. $.post(huayi.config.callcenter_url + 'WorkOrder/AuditAppend', params, function(result) {
  83. result = JSON.parse(result);
  84. if(result.state.toLowerCase() == "success") {
  85. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  86. parent.layer.close(index); //再执行关闭
  87. parent.$("#orderlist").bootstrapTable("refresh");
  88. parent.layer.msg("操作成功");
  89. }
  90. })
  91. }
  92. // 获取详情
  93. function getDetail(type) {
  94. $.ajax({
  95. type: "get",
  96. url: huayi.config.callcenter_url + "WorkOrder/GetWorkOrderNew",
  97. dataType: 'json',
  98. async: false,
  99. data: {
  100. workorderid: wid,
  101. type: type,
  102. token: $.cookie("token")
  103. },
  104. success: function(result) {
  105. if(result.state.toLowerCase() == "success") {
  106. var htmls = ''
  107. var banliHtml;
  108. var creatTime;
  109. var number = 0
  110. $(".BLQK").empty();
  111. $(result.data.bldata).each(function(i, n) {
  112. idData.push(n.F_Id)
  113. //是/否向当事人反馈
  114. var isProResultValue = n.F_IsProResult + "";
  115. switch(isProResultValue) {
  116. case "0":
  117. isProResultValue = "否";
  118. break;
  119. case "1":
  120. isProResultValue = "是";
  121. break;
  122. case "2":
  123. isProResultValue = "已办未果";
  124. break;
  125. }
  126. //是否满意
  127. var isSatisfiedValue = n.F_IsSatisfied + "";
  128. switch(isSatisfiedValue) {
  129. case "0":
  130. isSatisfiedValue = "未评价";
  131. break;
  132. case "1":
  133. isSatisfiedValue = "满意";
  134. break;
  135. case "2":
  136. isSatisfiedValue = "基本满意";
  137. break;
  138. case "3":
  139. isSatisfiedValue = "不满意";
  140. break;
  141. }
  142. if(n.F_Type === 4){
  143. htmls += '<tr>' +
  144. '<td class="text-center">' + n.F_DealUser +
  145. '</td>' +
  146. '<td class="text-center">' + n.F_DealUserContact +
  147. '</td>' +
  148. '<td class="text-center">' + n.F_Result +
  149. '</td>' +
  150. '<td class="text-center">' + n.F_CreateTime +
  151. '</td>' +
  152. '<td class="text-center">' + isProResultValue +
  153. '</td>' +
  154. '<td class="text-center">' + isSatisfiedValue +
  155. '</td>'
  156. //办理情况附件
  157. htmls += '<td class="gallerys">';
  158. var FileHtml;
  159. $(n.File).each(function(j, m) {
  160. if(m.F_FileType == ".jpg" || m.F_FileType ===".png") {
  161. FileHtml =
  162. '<img class="gallery-pic" style="width:60px; height:60px" border="0" ondblclick="$.openPhotoGallery(this)" src="' +
  163. m.F_FileUrl + '" alt="' + m
  164. .F_FileName +
  165. '" fileId="' + m.F_FileId + '">'
  166. } else {
  167. FileHtml =
  168. '<div><a style="margin-right:5px;" target="view_window" href="' +
  169. m.F_FileUrl + '" download="' + m
  170. .F_FileName + '">' + m
  171. .F_FileName.substring(
  172. 19) + '</a></div>'
  173. }
  174. htmls += FileHtml;
  175. })
  176. htmls += '</td>' +
  177. '<td class="gallerys">'
  178. var FileHtmls;
  179. $(n.Files).each(function(j, m) {
  180. if(m.F_FileType == ".jpg" || m
  181. .F_FileType ==
  182. ".png") {
  183. FileHtmls =
  184. '<img style="width:60px; height:60px" border="0" ondblclick="$.openPhotoGallery(this)" src="' +
  185. m.F_FileUrl + '" alt="' + m
  186. .F_FileName +
  187. '" fileId="' + m.F_FileId +
  188. '">';
  189. } else {
  190. FileHtmls =
  191. '<div><a style="margin-right:5px;" target="view_window" href="' +
  192. m.F_FileUrl + '" download="' + m
  193. .F_FileName + '">' + m
  194. .F_FileName.substring(
  195. 19) + '</a></div>'
  196. }
  197. htmls += FileHtmls
  198. })
  199. htmls += '</td>';
  200. htmls +='<td class="text-center"><select class="select_" id="audio_'+n.F_Id+'"><option value="1">同意</option><option value="2">同意并公开</option><option value="3">拒绝</option></select></td>'
  201. htmls +='<td class="text-center"><textarea class="select_ textarea_audio" id="reason'+n.F_Id+'"></textarea></td></tr>'
  202. }else if (n.F_Type === 1) {
  203. number++
  204. if (number === 1) {
  205. creatTime = n.F_CreateTime
  206. banliHtml = getHtml(n,isProResultValue,isSatisfiedValue)
  207. } else {
  208. if (new Date(n.F_CreateTime)>new Date(creatTime) ) {
  209. creatTime = n.F_CreateTime
  210. if (n.F_IsAudit) {
  211. banliHtml = ''
  212. } else{
  213. banliHtml = getHtml(n,isProResultValue,isSatisfiedValue)
  214. }
  215. }
  216. }
  217. }
  218. })
  219. if (banliHtml) {
  220. $(banliHtml).appendTo($(".BLQK"));
  221. }
  222. $(htmls).appendTo($(".BLQK"));
  223. }
  224. }
  225. })
  226. }
  227. function getHtml(n,isProResultValue,isSatisfiedValue){
  228. var returnHtml = ''
  229. returnHtml += '<tr>' +
  230. '<td class="text-center">' + n.F_DealUser +
  231. '</td>' +
  232. '<td class="text-center">' + n.F_DealUserContact +
  233. '</td>' +
  234. '<td class="text-center">' + n.F_Result +
  235. '</td>' +
  236. '<td class="text-center">' + n.F_CreateTime +
  237. '</td>' +
  238. '<td class="text-center">' + isProResultValue +
  239. '</td>' +
  240. '<td class="text-center">' + isSatisfiedValue +
  241. '</td>'
  242. //办理情况附件
  243. returnHtml += '<td class="gallerys">';
  244. var FileHtml;
  245. $(n.File).each(function(j, m) {
  246. if(m.F_FileType == ".jpg" || m.F_FileType ===".png") {
  247. FileHtml =
  248. '<img class="gallery-pic" style="width:60px; height:60px" border="0" ondblclick="$.openPhotoGallery(this)" src="' +
  249. m.F_FileUrl + '" alt="' + m
  250. .F_FileName +
  251. '" fileId="' + m.F_FileId + '">'
  252. } else {
  253. FileHtml =
  254. '<div><a style="margin-right:5px;" target="view_window" href="' +
  255. m.F_FileUrl + '" download="' + m
  256. .F_FileName + '">' + m
  257. .F_FileName.substring(
  258. 19) + '</a></div>'
  259. }
  260. returnHtml += FileHtml;
  261. })
  262. returnHtml += '</td><td class="gallerys">';
  263. var FileHtmls;
  264. var creatTime;
  265. var number = 0
  266. $(n.Files).each(function(j, m) {
  267. if(m.F_FileType == ".jpg" || m
  268. .F_FileType ==
  269. ".png") {
  270. FileHtmls =
  271. '<img style="width:60px; height:60px" border="0" ondblclick="$.openPhotoGallery(this)" src="' +
  272. m.F_FileUrl + '" alt="' + m
  273. .F_FileName +
  274. '" fileId="' + m.F_FileId +
  275. '">';
  276. } else {
  277. FileHtmls =
  278. '<div><a style="margin-right:5px;" target="view_window" href="' +
  279. m.F_FileUrl + '" download="' + m
  280. .F_FileName + '">' + m
  281. .F_FileName.substring(
  282. 19) + '</a></div>'
  283. }
  284. returnHtml += FileHtmls
  285. })
  286. returnHtml += '</td>';
  287. returnHtml += '<td class="text-center"><select class="select_" id="audio_'+n.F_Id+'"><option value="4">审核通过</option><option value="5">审核不通过</option><option value="6">审核通过并转办</option></select></td>'
  288. returnHtml += '<td class="text-center"><textarea class="select_ textarea_audio" id="reason'+n.F_Id+'"></textarea></td></tr>'
  289. return returnHtml
  290. }
  291. function getParams(){
  292. var paramsAppend = []
  293. var dataParams = {}
  294. idData.forEach((ele)=>{
  295. var obj = {}
  296. if ($("#audio_"+ele).val() =='1') { // 同意
  297. obj.backid = ele
  298. obj.reason =$("#reason"+ele).val()
  299. obj.state = 1
  300. obj.isopen = 0
  301. paramsAppend.push(obj)
  302. } else if ($("#audio_"+ele).val() =='2' ) { // 同意并公开
  303. obj.backid = ele
  304. obj.reason =$("#reason"+ele).val()
  305. obj.state = 1
  306. obj.isopen = 1
  307. paramsAppend.push(obj)
  308. } else if ($("#audio_"+ele).val() =='3' ){ // 拒绝
  309. obj.backid = ele
  310. obj.reason =$("#reason"+ele).val()
  311. obj.state =2
  312. obj.isopen = 0
  313. paramsAppend.push(obj)
  314. } else if ($("#audio_"+ele).val() =='4') { // 审核通过
  315. dataParams.nexttype = 0
  316. dataParams.cbreason = $("#reason"+ele).val()
  317. dataParams.backid = ele
  318. } else if ($("#audio_"+ele).val() =='5') { // 审核不通过
  319. dataParams.nexttype = 1
  320. dataParams.cbreason = $("#reason"+ele).val()
  321. dataParams.backid = ele
  322. } else if ($("#audio_"+ele).val() =='6') { // 审核通过并转办
  323. dataParams.nexttype = 2
  324. dataParams.backid = ele
  325. dataParams.cbreason = $("#reason"+ele).val()
  326. }
  327. })
  328. dataParams.Append = paramsAppend
  329. return dataParams
  330. }
  331. // 追加回复 69
  332. function audioAddReply(str){
  333. layer.open({
  334. type: 2,
  335. content: "../CommonHtml/auditHandleAddReply.html?wid=" + str , //iframe的url,no代表不显示滚动条
  336. title: "办理工单",
  337. area: ["100%", "80%"], //宽高
  338. });
  339. }
  340. </script>
  341. </body>
  342. </html>