No Description

processing_audit.html 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  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. <style>
  11. .input {
  12. background-color: #FFF;
  13. background-image: none;
  14. border: 1px solid #ccc;
  15. border-radius: 1px;
  16. color: inherit;
  17. padding: 6px 12px
  18. }
  19. .fjnr {
  20. padding: 0 !important;
  21. border: none !important;
  22. }
  23. .HGXX td {
  24. padding: 8px;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29. <div class="Common" style="padding: 10px;">
  30. <table class="table" border="" cellspacing="0" cellpadding="0"
  31. style="border: 1px solid #e7eaec; text-align: center;">
  32. <theard>
  33. <tr>
  34. <td class="text-center" style="min-width:80px;">承办人</td>
  35. <td class="text-center" style="min-width:80px;">联系方式</td>
  36. <td class="text-center" style="min-width:80px;">职务</td>
  37. <td class="text-center" style="min-width:80px;">处理结果</td>
  38. <td class="text-center" style="min-width:80px;">单位</td>
  39. <!-- <td class="text-center" style="min-width:80px;">类型</td> -->
  40. <td class="text-center" style="min-width:80px;">办理结果</td>
  41. <td class="text-center" style="min-width:80px;">办理时间</td>
  42. <td class="text-center" style="min-width:80px;">是/否向当事人反馈</td>
  43. <td class="text-center" style="min-width:80px;">是否满意</td>
  44. <td class="text-center" style="min-width:80px;">审核领导</td>
  45. <!-- <td class="text-center" style="min-width:80px;">处理方案/进程</td> -->
  46. <td class="text-center" style="min-width:80px;">附件</td>
  47. <td class="text-center authority" style="min-width: 100px;">操作</td>
  48. </tr>
  49. </theard>
  50. <tbody class="BLNR" style="border-top: none; padding: 8px;">
  51. </tbody>
  52. <!--<div class="FJ">
  53. </div>-->
  54. </table>
  55. <table>
  56. <tr>
  57. <th>工单内容:</th>
  58. <td id="workOrderContent"></td>
  59. </tr>
  60. <!-- <tr>
  61. <th class="Importent" style="text-align: left;"> 审核意见:</th>
  62. </tr>
  63. <tr>
  64. <td style="padding: 0px;"><textarea data-adaptheight id="reason" name="" rows="" cols=""
  65. style="text-indent: 2em;"></textarea></td>
  66. <input type="hidden" id="ID" />
  67. </tr> -->
  68. </table>
  69. <!--<div class="btn_box">
  70. <button class="btns BC">同意</button>
  71. <button class="btns Submit">拒绝</button>
  72. </div>-->
  73. </div>
  74. <script src="../css/laydate/laydate.js"></script>
  75. <script src="../js/adjustHeight.js"></script>
  76. <script>
  77. var wid = helper.request.queryString("wid");
  78. var State;
  79. var a = $("#ID").val()
  80. var nid = '';
  81. Detail();
  82. $(document).ready(function () {
  83. // HGXX();
  84. Hove();
  85. getDetail();
  86. //上传附件
  87. $("#scwj").click(function () {
  88. $("#upFile").trigger("click");
  89. })
  90. $("#upFile").change(function () {
  91. upload('upFile','.fileBox',['png','jpg','mp3','mp4','pdf','doc','docx','xls','xlsx'],"#file");
  92. })
  93. $("#scfj").click(function () {
  94. $(".fjnr").text("");
  95. $("#scfj").hide();
  96. })
  97. // $('.BC').click(function () {
  98. // // if ($("#reason").val() == "") {
  99. // // layer.msg("请填写审核意见");
  100. // // } else {
  101. // State = 1;
  102. // JA();
  103. // // }
  104. //
  105. // })
  106. // $('.Submit').click(function () {
  107. // layer.open({
  108. // type: 2,
  109. // content: "./processing_refuse.html?wid=" + wid + "&backid=" +
  110. // ccc, //iframe的url,no代表不显示滚动条
  111. // title: "拒绝",
  112. // area: ["60%", "80%"], //宽高
  113. // });
  114. // })
  115. });
  116. //审批意见
  117. function JA() {
  118. $.post(huayi.config.callcenter_url + 'WorkOrder/AuditSplitWorkOrder', {
  119. workorderid: wid,
  120. // reason: $('#reason').val(), //办理内容
  121. state: State,
  122. backid: nid,
  123. token: $.cookie("token")
  124. }, function (result) {
  125. result = JSON.parse(result);
  126. if (result.state.toLowerCase() == "success") {
  127. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  128. parent.layer.close(index); //再执行关闭
  129. parent.$('#orderlist').bootstrapTable('refresh');
  130. parent.layer.msg("处理成功");
  131. }
  132. })
  133. }
  134. // 获取详情
  135. function getDetail() {
  136. $.ajax({
  137. type: "get",
  138. url: huayi.config.callcenter_url + "WorkOrder/GetWorkOrder",
  139. dataType: 'json',
  140. async: false,
  141. data: {
  142. workorderid: wid,
  143. token: $.cookie("token")
  144. },
  145. success: function (result) {
  146. var content = result.data;
  147. if (result.state.toLowerCase() == "success") {
  148. if (content.data[0].F_Content === "" || content.data[0].F_Content === null) {
  149. $("#workOrderContent").text(content.data[0].F_ComContent)
  150. } else {
  151. $("#workOrderContent").text(content.data[0].F_Content)
  152. }
  153. var temp1;
  154. if (result.data.ejbldata.length <= 0) {
  155. return
  156. }
  157. var ejbldata = result.data.ejbldata
  158. // var ejbldata = []
  159. // ejbldata.push(result.data.ejbldata[result.data.ejbldata.length - 1])
  160. $.each(ejbldata, function (i, n) {
  161. var bval = n.F_Type;
  162. switch (bval + '') {
  163. case '1':
  164. bval = '主办';
  165. break;
  166. case '2':
  167. bval = '协办';
  168. break;
  169. }
  170. //是/否向当事人反馈
  171. var isProResultValue = n.F_IsProResult + "";
  172. switch (isProResultValue) {
  173. case "0":
  174. isProResultValue = "否";
  175. break;
  176. case "1":
  177. isProResultValue = "是";
  178. break;
  179. case "2":
  180. isProResultValue = "已办未果";
  181. break;
  182. }
  183. //是否满意
  184. var isSatisfiedValue = n.F_IsSatisfied + "";
  185. switch (isSatisfiedValue) {
  186. case "0":
  187. isSatisfiedValue = "未评价";
  188. break;
  189. case "1":
  190. isSatisfiedValue = "满意";
  191. break;
  192. case "2":
  193. isSatisfiedValue = "基本满意";
  194. break;
  195. case "3":
  196. isSatisfiedValue = "不满意";
  197. break;
  198. }
  199. //沟通时间
  200. var connectTimeValue = n.F_ConnectTime;
  201. switch (connectTimeValue) {
  202. case null:
  203. connectTimeValue = "";
  204. break;
  205. default:
  206. connectTimeValue = n.F_ConnectTime;
  207. }
  208. //职务
  209. var dutiesValue
  210. switch (n.F_Duties) {
  211. case "":
  212. dutiesValue = ""
  213. break;
  214. case null:
  215. dutiesValue = ""
  216. break;
  217. default:
  218. dutiesValue = n.F_Duties
  219. break;
  220. }
  221. //处理情况
  222. var situationValue
  223. switch (n.F_Situation) {
  224. case "":
  225. situationValue = ""
  226. break;
  227. case null:
  228. situationValue = ""
  229. break;
  230. default:
  231. situationValue = n.F_Situation
  232. break;
  233. }
  234. // 审核领导
  235. var auditUser
  236. switch (n.F_AuditUser) {
  237. case "":
  238. auditUser = ""
  239. break;
  240. case null:
  241. auditUser = ""
  242. break;
  243. default:
  244. auditUser = n.F_AuditUser
  245. break;
  246. }
  247. temp1 = temp1 +
  248. '<tr>' +
  249. '<td class="text-center">' + n.F_DealUser + '</td>' +
  250. '<td class="text-center">' + n.F_DealUserContact + '</td>' +
  251. '<td class="text-center">' + dutiesValue + '</td>' +
  252. '<td class="text-center">' + situationValue + '</td>' +
  253. '<td class="text-center">' + n.DeptName + '</td>' +
  254. // '<td class="text-center" data-formatter="shtype">' + bval +
  255. // '</td>' +
  256. '<td class="text-center">' + n.F_Result + '</td>' +
  257. '<td class="text-center">' + n.F_CreateTime + '</td>' +
  258. '<td class="text-center">' + isProResultValue + '</td>' +
  259. '<td class="text-center">' + isSatisfiedValue + '</td>' +
  260. '<td class="text-center">' + auditUser + '</td>' +
  261. '<td class="text-center FJ" style="color:#00a1cb;">';
  262. var FileHtml;
  263. $(n.File).each(function (j, m) {
  264. if (m.F_FileType == ".jpg" || m
  265. .F_FileType ==
  266. ".png") {
  267. FileHtml =
  268. '<img style="width:80px; height:80px" border="0" onclick="viewImage(this)" src="' +
  269. m.F_FileUrl + '" alt="' + m
  270. .F_FileName +
  271. '" fileId="' + m.F_FileId +
  272. '">';
  273. } else {
  274. FileHtml =
  275. '<div><a style="margin-right:5px;" target="view_window" href="' +
  276. m.F_FileUrl + '" download="' + m
  277. .F_FileName + '">' + m.F_FileName.substring(
  278. 19) + '</a></div>'
  279. }
  280. // htmls +=
  281. // '<div><a style="margin-right:5px;" target="view_window" href="' +
  282. // m.F_FileUrl + '" download="' + m
  283. // .F_FileName + '">' + m.F_FileName.substring(
  284. // 19) + '</a></div>';
  285. temp1 += FileHtml;
  286. })
  287. if(n.F_IsAudit == 0){
  288. temp1 += "</td>" +
  289. '<td class="text-center authority"><button class="btns edit" index="' +
  290. n
  291. .F_Id + '">修改</button>'
  292. temp1 += '<button class="btns BC" index="' + n.F_Id + '">同意</button>'
  293. temp1 += '<button class="btns Submit" index="' + n.F_Id + '">拒绝</button></td></tr>'
  294. }
  295. ccc = n.F_Id;
  296. });
  297. $('.BLNR').append(temp1);
  298. // $(result.data.ejbldata.File).each(function (i, n) {
  299. // HTML = '<a style="margin-right:5px;" href="' + n.F_FileUrl +
  300. // '" download="' + n
  301. // .F_FileName.substring(19) + '">' + n.F_FileName.substring(19) +
  302. // '</a>'
  303. // $(HTML).appendTo($('.FJ'));
  304. // })
  305. $(".edit").click(function () {
  306. var index = $(this).attr('index');
  307. layer.open({
  308. type: 2,
  309. content: "../CommonHtml/XGbanli.html?wid=" + wid+"&fid="+index, //iframe的url,no代表不显示滚动条
  310. title: '修改办理结果',
  311. area: ['60%', '55%'], //宽高
  312. });
  313. })
  314. $('.BC').click(function () {
  315. var index = $(this).attr('index');
  316. nid = index;
  317. State = 1;
  318. JA();
  319. })
  320. $('.Submit').click(function () {
  321. var index = $(this).attr('index');
  322. layer.open({
  323. type: 2,
  324. content: "./processing_refuse.html?wid=" + wid + "&backid=" +
  325. index, //iframe的url,no代表不显示滚动条
  326. title: "拒绝",
  327. area: ["60%", "80%"], //宽高
  328. });
  329. })
  330. }
  331. }
  332. })
  333. }
  334. // 判断附件
  335. function Hove() {
  336. $(document).on("mouseover mouseout", '.tiaozhuan', function (event) {
  337. if (event.type == "mouseover") {
  338. //鼠标悬浮
  339. var miao = $(this).attr("href");
  340. if (miao == "") {
  341. $(this).removeAttr("href");
  342. $(this).removeAttr("download");
  343. $(this).html("")
  344. } else {
  345. $(this).attr("href");
  346. $(this).attr("download");
  347. }
  348. } else if (event.type == "mouseout") {
  349. //鼠标离开
  350. }
  351. })
  352. }
  353. //草稿详情
  354. function Detail() {
  355. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  356. workorderid: wid,
  357. type: 2,
  358. token: $.cookie("token")
  359. }, function (result) {
  360. if (result.state.toLowerCase() == "success") {
  361. if (result.data.length > 0) {
  362. $("#dealman").val(result.data[0].F_DealUser);
  363. $('#result').val(result.data[0].F_Result);
  364. a = result.data[0].F_Id;
  365. };
  366. }
  367. })
  368. }
  369. //清除
  370. function Clean() {
  371. $("#startTime").val(''),
  372. $('#assignedopinion').val('')
  373. }
  374. //上传文件
  375. // function upload() {
  376. // var Files = document.getElementById("upFile").files;
  377. // if (Files.length > 0) {
  378. // var formData = new FormData();
  379. // for (var i = 0; i < Files.length; i++) {
  380. // formData.append('file' + i, Files[i]);
  381. // }
  382. // formData.append("token", $.cookie("token"));
  383. // $.ajax({
  384. // url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  385. // type: "POST",
  386. // data: formData,
  387. // /**
  388. // *必须false才会自动加上正确的Content-Type
  389. // */
  390. // contentType: false,
  391. // /**
  392. // * 必须false才会避开jQuery对 formdata 的默认处理
  393. // * XMLHttpRequest会对 formdata 进行正确的处理
  394. // */
  395. // processData: false,
  396. // success: function (result) {
  397. // document.getElementById("upFile").outerHTML = document.getElementById("upFile")
  398. // .outerHTML;
  399. // $("#upFile").change(function () {
  400. // upload();
  401. // });
  402. // var r = $.parseJSON(result);
  403. // if (r.state.toLowerCase() == "success") {
  404. // $(".fjnr").text(r.data[0].F_FileName);
  405. // var a = r.data;
  406. // $(a).each(function (i, n) {
  407. // var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n
  408. // .F_FileName.substring(19) +
  409. // '<i class="fa fa-remove del_file"></i></span>'
  410. // $(strs).appendTo($('.fileBox')).find('.del_file').click(function (
  411. // event) {
  412. // event.stopPropagation();
  413. // $(this).parent().remove();
  414. // file_num()
  415. // })
  416. // })
  417. // file_num();
  418. // }
  419. // }
  420. // });
  421. // } else {
  422. // layer.confirm('请上传文件!', {
  423. // btn: ['确定']
  424. // });
  425. // }
  426. // }
  427. // //上传文件隐藏域值
  428. // function file_num() {
  429. // var str = '';
  430. // var Str;
  431. // $('.fileBox .files').each(function (j, m) {
  432. // var aa = $(m).attr("fiel-num")
  433. // console.log(aa);
  434. // str += aa + ",";
  435. // Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  436. // })
  437. // $("#file").val(Str);
  438. // }
  439. // 关闭页面
  440. function closePage() {
  441. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  442. parent.layer.close(index); //再执行关闭
  443. parent.$('#orderlist').bootstrapTable('refresh');
  444. }
  445. function viewImage(file) {
  446. var json = {
  447. "title": "", //相册标题
  448. "id": 1, //相册id
  449. "start": 0, //初始显示的图片序号,默认0
  450. "data": [ //相册包含的图片,数组格式
  451. {
  452. "alt": $(file).attr("alt"),
  453. "pid": $(file).attr("fileId"), //图片id
  454. "src": $(file).attr("src"), //原图地址
  455. "thumb": "" //缩略图地址
  456. }
  457. ]
  458. }
  459. layer.photos({
  460. photos: json,
  461. anim: 5 //0-6的选择,指定弹出图片动画类型,默认随机(请注意,3.0之前的版本用shift参数)
  462. });
  463. }
  464. </script>
  465. </body>
  466. </html>