永城市12345 (县级市)- 来源于虞城县12345 - 所有县级统一API

banli_zilei.html 14KB

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. <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. <!--办理内容-->
  30. <div style="width: 100%;padding: 10px;">
  31. <table class="table" border="" cellspacing="0" cellpadding="0" style="border: 1px solid #e7eaec;">
  32. <theard>
  33. <tr>
  34. <td class="text-center" style="min-width: 100px;">派单时间</td>
  35. <td class="text-center" style="min-width: 100px;">办理期限</td>
  36. <td class="text-center" style="min-width: 100px;">内容</td>
  37. </tr>
  38. </theard>
  39. <tbody class="BLNR" style="border-top: none; padding: 8px;"></tbody>
  40. </table>
  41. </div>
  42. <!--重新办理-->
  43. <div style="width: 100%;padding: 10px;">
  44. <table class="table" border="" cellspacing="0" cellpadding="0" style="border: 1px solid #e7eaec;">
  45. <theard>
  46. <tr>
  47. <td class="text-center" style="min-width: 100px;">序号</td>
  48. <td class="text-center" style="min-width: 100px;">办理时间</td>
  49. <td class="text-center" style="min-width: 100px;">内容</td>
  50. <td class="text-center" style="min-width: 100px;">附件</td>
  51. <td class="text-center" style="min-width: 100px;">审批时间</td>
  52. <td class="text-center" style="min-width: 100px;">审批内容</td>
  53. <td class="text-center" style="min-width: 100px;">审批意见</td>
  54. </tr>
  55. </theard>
  56. <tbody class="HGXX" style="border-top: none; padding: 8px;"></tbody>
  57. <!--<div class="FJ"></div>-->
  58. </table>
  59. </div>
  60. <div class="Common">
  61. <table>
  62. <tr>
  63. <th class="Importent">办理人:</th>
  64. <td> <input id="dealman" type="text" style="height: 32px;"></td>
  65. </tr>
  66. <tr>
  67. <th class="Importent">附件:</th>
  68. <td>
  69. <div class="fileBox">
  70. </div>
  71. <span class="fjnr"></span>
  72. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
  73. <input class="input" type="button" value="上传" id="scwj" />
  74. <!--<input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />-->
  75. <input type="hidden" id="file" />
  76. <span style="color:#FF0000; border: none;">
  77. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  78. </span>
  79. </td>
  80. </tr>
  81. <tr>
  82. <th class="Importent">办理内容:</th>
  83. <td><textarea data-adaptheight id="result" name="" rows="" cols=""></textarea></td>
  84. <input type="hidden" id="ID" />
  85. </tr>
  86. </table>
  87. <div class="btn_box">
  88. <button class="btns Submit">保存并办理</button>
  89. </div>
  90. </div>
  91. <script src="../css/laydate/laydate.js"></script>
  92. <script src="../js/adjustHeight.js"></script>
  93. <script>
  94. var wid = helper.request.queryString("wid");
  95. var State;
  96. var a = $("#ID").val()
  97. Detail();
  98. $(document).ready(function () {
  99. HGXX();
  100. BLNR();
  101. // Hove();
  102. // LOAD();
  103. //上传附件
  104. $("#scwj").click(function () {
  105. $("#upFile").trigger("click");
  106. })
  107. $("#upFile").change(function () {
  108. upload();
  109. })
  110. $("#scfj").click(function () {
  111. $(".fjnr").text("");
  112. $("#scfj").hide();
  113. })
  114. // $('.BC').click(function() {
  115. // if($("#dealman").val()==""){
  116. // layer.msg("办理人不能为空");
  117. // }else if($("#result").val()==""){
  118. // layer.msg("办理内容不能为空");
  119. // }else{
  120. // State = 0;
  121. // JA();
  122. // }
  123. //
  124. // })
  125. $('.Submit').click(function () {
  126. if ($("#dealman").val() == "") {
  127. layer.msg("办理人不能为空");
  128. } else if ($("#result").val() == "") {
  129. layer.msg("办理内容不能为空");
  130. } else {
  131. State = 1;
  132. JA();
  133. }
  134. })
  135. });
  136. //交办
  137. function JA() {
  138. $.post(huayi.config.callcenter_url + 'WorkOrder/DealWorkOrder', {
  139. workorderid: wid,
  140. dealman: $("#dealman").val(), //办理人
  141. result: $('#result').val(), //办理内容
  142. state: State,
  143. feedbackid: a,
  144. files: $("#file").val(),
  145. token: $.cookie("token")
  146. }, function (result) {
  147. result = JSON.parse(result);
  148. if (result.state.toLowerCase() == "success") {
  149. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  150. parent.layer.close(index); //再执行关闭
  151. parent.load();
  152. parent.layer.msg("办理成功");
  153. $('.fileBox').html('');
  154. }
  155. })
  156. }
  157. // 工单详情
  158. function HGXX() {
  159. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
  160. workorderid: wid,
  161. token: $.cookie("token")
  162. }, function (result) {
  163. // result = JSON.stringify(result)
  164. // alert(result)
  165. console.log(result);
  166. if (result.state.toLowerCase() == "success") {
  167. var temp;
  168. var Agree;
  169. $.each(result.data.fkinfo, function (i, n) {
  170. // var r = JSON.stringify(n.File);
  171. if (n.F_IsAudit == 1) {
  172. Agree = "同意";
  173. } else if (n.F_IsAudit == 2) {
  174. Agree = "拒绝";
  175. }
  176. temp = '<tr><td class="text-center">' + (i + 1) + '</td><td class="text-center">'
  177. + n.F_CreateTime + '</td><td class="text-center">' + n.F_Result
  178. + '</td><td class="text-center FJ" style="color:#00a1cb;"></td><td class="text-center">'
  179. + n.F_AuditTime + '</td><td class="text-center">' + n.F_AuditReason
  180. + '</td><td class="text-center">' + Agree + '</td></tr>';
  181. var tmp = '';
  182. if (n.File) {
  183. $.each(n.File, function (d, f) {
  184. tmp += '<a style="margin-right:5px;" href="' + f.F_FileUrl + '" download="' + f.F_FileUrl + '">' + f.F_FileName.substring(19) + '</a>';
  185. })
  186. }
  187. $(temp).appendTo($('.HGXX')).find('.FJ').append(tmp);
  188. });
  189. //
  190. // alert(i);
  191. }
  192. })
  193. }
  194. // <a class="tiaozhuan" style="margin-right:5px;" href="' + (n.File == null ? '' : n.File[0].F_FileUrl) + '" download="' + (n.File == null ? '' : n.File[0].F_FileUrl) + '" >附件</a>
  195. // function Hove(){
  196. // $(document).on("mouseover mouseout",'.tiaozhuan',function(event){
  197. // if(event.type == "mouseover"){
  198. // //鼠标悬浮
  199. // var miao=$(this).attr("href");
  200. // if (miao=="") {
  201. // $(this).removeAttr("href");
  202. // $(this).removeAttr("download");
  203. // $(this).html("");
  204. //
  205. // } else{
  206. // $(this).attr("href");
  207. // $(this).attr("download");
  208. // }
  209. // }else if(event.type == "mouseout"){
  210. // //鼠标离开
  211. // }
  212. // })
  213. //
  214. //
  215. // }
  216. // $(window).load(function(){
  217. // alert("DDD");
  218. // alert($(".tiaozhuan").attr("href"));
  219. // var miao1=$(".tiaozhuan").attr("href");
  220. // if (miao1=="") {
  221. // alert("aaa");
  222. //// $(this).html("");
  223. // } else{
  224. // alert("bbb");
  225. // $(this).html("");
  226. // }
  227. // });
  228. // 派单内容给
  229. function BLNR() {
  230. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
  231. workorderid: wid,
  232. token: $.cookie("token")
  233. }, function (result) {
  234. // result = JSON.stringify(result)
  235. // console.log(result);
  236. if (result.state.toLowerCase() == "success") {
  237. var temp2;
  238. $.each(result.data.pdinfo, function (i, n) {
  239. temp2 = temp2 + '<tr><td class="text-center">' + n.F_CreateTime + '</td><td class="text-center">' + n.F_LimitTime + '</td><td class="text-center">' + n.F_AssignedOpinion + '</td></tr>';
  240. });
  241. $('.BLNR').append(temp2);
  242. }
  243. })
  244. }
  245. //草稿详情
  246. function Detail() {
  247. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  248. workorderid: wid,
  249. type: 2,
  250. token: $.cookie("token")
  251. }, function (result) {
  252. if (result.state.toLowerCase() == "success") {
  253. if (result.data.length > 0) {
  254. $("#dealman").val(result.data[0].F_DealUser);
  255. $('#result').val(result.data[0].F_Result);
  256. a = result.data[0].F_Id;
  257. };
  258. }
  259. })
  260. }
  261. //清除
  262. function Clean() {
  263. $("#startTime").val(''),
  264. $('#assignedopinion').val('')
  265. }
  266. //上传文件
  267. function upload() {
  268. var Files = document.getElementById("upFile").files;
  269. if (Files.length > 0) {
  270. var formData = new FormData();
  271. for (var i = 0; i < Files.length; i++) {
  272. formData.append('file' + i, Files[i]);
  273. }
  274. formData.append("token", $.cookie("token"));
  275. var typeName=Files[0].name.split('.')[1];
  276. if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
  277. $.ajax({
  278. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  279. type: "POST",
  280. data: formData,
  281. /**
  282. *必须false才会自动加上正确的Content-Type
  283. */
  284. contentType: false,
  285. /**
  286. * 必须false才会避开jQuery对 formdata 的默认处理
  287. * XMLHttpRequest会对 formdata 进行正确的处理
  288. */
  289. processData: false,
  290. success: function (result) {
  291. document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  292. $("#upFile").change(function () {
  293. upload();
  294. });
  295. var r = $.parseJSON(result);
  296. if (r.state.toLowerCase() == "success") {
  297. //$(".fjnr").text(r.data[0].F_FileName);
  298. var a = r.data;
  299. $(a).each(function (i, n) {
  300. var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n.F_FileName.substring(19) + '<i class="fa fa-remove del_file"></i></span>'
  301. $(strs).appendTo($('.fileBox')).find('.del_file').click(function (event) {
  302. event.stopPropagation();
  303. $(this).parent().remove();
  304. file_num()
  305. })
  306. })
  307. file_num();
  308. }
  309. }
  310. });
  311. }else{
  312. layer.msg("格式不正确");
  313. }
  314. } else {
  315. layer.confirm('请上传文件!', {
  316. btn: ['确定']
  317. });
  318. }
  319. }
  320. //上传文件隐藏域值
  321. function file_num() {
  322. var str = '';
  323. var Str;
  324. $('.fileBox .files').each(function (j, m) {
  325. var aa = $(m).attr("fiel-num")
  326. console.log(aa);
  327. str += aa + ",";
  328. Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  329. })
  330. $("#file").val(Str);
  331. }
  332. </script>
  333. </body>
  334. </html>