Нет описания

auditAddReply.html 11KB

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