商丘12345 前端

banli_zilei.html 19KB

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. <!--办理内容-->
  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><textarea data-adaptheight id="result" name="" rows="" cols=""></textarea></td>
  69. <input type="hidden" id="ID" />
  70. </tr>
  71. <tr>
  72. <th>是否有处理结果:</th>
  73. <td id="isProResultRadio" style="font-size: 12px">
  74. <label style="margin-right: 10px">
  75. <input type="radio" value="0" name="isDisposeResult" style="vertical-align: -2px;" checked="checked" />默认
  76. </label>
  77. <label style="margin-right: 10px">
  78. <input type="radio" value="1" name="isDisposeResult" style="vertical-align: -2px;" />是
  79. </label>
  80. <label>
  81. <input type="radio" value="2" name="isDisposeResult" style="vertical-align: -2px;" />否
  82. </label>
  83. </td>
  84. </tr>
  85. <tr class="prosituation-wrapper">
  86. <th>处理方案/进程:</th>
  87. <td>
  88. <textarea data-adaptheight id="prosituation" name="" rows="6" cols="" ></textarea>
  89. </td>
  90. </tr>
  91. <tr class="annotation-wrapper">
  92. <th style="color:#FF0000;">注释:</th>
  93. <td style="color:#FF0000">请提交加盖单位公章的相关说明文件</td>
  94. </tr>
  95. <tr class="dealcontact-wrapper">
  96. <th>联系方式:</th>
  97. <td>
  98. <input type="text" id="dealcontact">
  99. </td>
  100. </tr>
  101. <tr class="connecttime-wrapper">
  102. <th>沟通时间:</th>
  103. <td>
  104. <input type="text" id="connecttime">
  105. </td>
  106. </tr>
  107. <tr class="connectmode-wrapper">
  108. <th>沟通方式:</th>
  109. <td>
  110. <input type="text" id="connectmode">
  111. </td>
  112. </tr>
  113. <tr class="replycontent-wrapper">
  114. <th>答复内容:</th>
  115. <td>
  116. <input type="text" id="replycontent">
  117. </td>
  118. </tr>
  119. <tr class="isstaisfied-wrapper">
  120. <th>是否满意:</th>
  121. <td id="isStaisfiedRadio" style="font-size: 12px">
  122. <label style="margin-right: 10px;">
  123. <input type="radio" value="1" name="isstaisfied" style="vertical-align: -2px;" />满意
  124. </label>
  125. <label style="margin-right: 10px;">
  126. <input type="radio" value="2" name="isstaisfied" style="vertical-align: -2px;" />基本满意
  127. </label>
  128. <label style="margin-right: 10px;">
  129. <input type="radio" value="3" name="isstaisfied" style="vertical-align: -2px;" />不满意
  130. </label>
  131. </td>
  132. </tr>
  133. <tr>
  134. <th class="Importent">附件:</th>
  135. <td>
  136. <div class="fileBox">
  137. </div>
  138. <span class="fjnr"></span>
  139. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
  140. <input class="input" type="button" value="上传" id="scwj" />
  141. <!--<input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />-->
  142. <input type="hidden" id="file" />
  143. <span style="color:#FF0000; border: none;">
  144. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  145. </span>
  146. </td>
  147. </tr>
  148. </table>
  149. <div class="btn_box">
  150. <button class="btns Submit">保存并办理</button>
  151. </div>
  152. </div>
  153. <script src="../css/laydate/laydate.js"></script>
  154. <script src="../js/adjustHeight.js"></script>
  155. <script>
  156. var wid = helper.request.queryString("wid");
  157. var isProtect = helper.request.queryString("isProtect");
  158. var State;
  159. var a = $("#ID").val()
  160. Detail();
  161. $(document).ready(function () {
  162. HGXX();
  163. BLNR();
  164. // Hove();
  165. // LOAD();
  166. //上传附件
  167. $("#scwj").click(function () {
  168. $("#upFile").trigger("click");
  169. })
  170. $("#upFile").change(function () {
  171. upload();
  172. })
  173. $("#scfj").click(function () {
  174. $(".fjnr").text("");
  175. $("#scfj").hide();
  176. })
  177. // $('.BC').click(function() {
  178. // if($("#dealman").val()==""){
  179. // layer.msg("办理人不能为空");
  180. // }else if($("#result").val()==""){
  181. // layer.msg("办理内容不能为空");
  182. // }else{
  183. // State = 0;
  184. // JA();
  185. // }
  186. //
  187. // })
  188. $('.Submit').click(function () {
  189. if ($("#dealman").val() == "") {
  190. layer.msg("办理人不能为空");
  191. } else if ($("#result").val() == "") {
  192. layer.msg("办理内容不能为空");
  193. } else {
  194. State = 1;
  195. JA();
  196. }
  197. })
  198. $(".prosituation-wrapper").hide(); //处理方案/进程
  199. $(".annotation-wrapper").hide(); //注释
  200. $(".dealcontact-wrapper").hide(); //联系方式
  201. $(".connecttime-wrapper").hide(); //沟通时间
  202. $(".connectmode-wrapper").hide(); //沟通方式
  203. $(".replycontent-wrapper").hide(); //答复内容
  204. $(".isstaisfied-wrapper").hide(); //是否满意
  205. /*
  206. * 处理结果
  207. * 默认 0
  208. * 是 1
  209. * 否 2
  210. */
  211. $('#isProResultRadio').find('input[type="radio"]').on('change', function() {
  212. if($(this).val() === '0') {
  213. $(".prosituation-wrapper").hide(); //处理方案/进程
  214. $(".annotation-wrapper").hide(); //注释
  215. $(".dealcontact-wrapper").hide(); //联系方式
  216. $(".connecttime-wrapper").hide(); //沟通时间
  217. $(".connectmode-wrapper").hide(); //沟通方式
  218. $(".replycontent-wrapper").hide(); //答复内容
  219. $(".isstaisfied-wrapper").hide(); //是否满意
  220. } else if($(this).val() === '1') {
  221. if (isProtect === "1" ) {
  222. $(".prosituation-wrapper").hide(); //处理方案/进程
  223. $(".annotation-wrapper").hide(); //注释
  224. $(".dealcontact-wrapper").show(); //联系方式
  225. $(".connecttime-wrapper").hide(); //沟通时间
  226. $(".connectmode-wrapper").hide(); //沟通方式
  227. $(".replycontent-wrapper").hide(); //答复内容
  228. $(".isstaisfied-wrapper").hide(); //是否满意
  229. } else if (isProtect === "0") {
  230. $(".prosituation-wrapper").hide(); //处理方案/进程
  231. $(".annotation-wrapper").hide(); //注释
  232. $(".dealcontact-wrapper").hide(); //联系方式
  233. $(".connecttime-wrapper").show(); //沟通时间
  234. $(".connectmode-wrapper").show(); //沟通方式
  235. $(".replycontent-wrapper").show(); //答复内容
  236. $(".isstaisfied-wrapper").show(); //是否满意
  237. }
  238. } else if ($(this).val() === '2') {
  239. $(".prosituation-wrapper").show(); //处理方案/进程
  240. $(".annotation-wrapper").show(); //注释
  241. $(".dealcontact-wrapper").hide(); //联系方式
  242. $(".connecttime-wrapper").hide(); //沟通时间
  243. $(".connectmode-wrapper").hide(); //沟通方式
  244. $(".replycontent-wrapper").hide(); //答复内容
  245. $(".isstaisfied-wrapper").hide(); //是否满意
  246. }
  247. });
  248. });
  249. //交办
  250. function JA() {
  251. $.post(huayi.config.callcenter_url + 'WorkOrder/DealWorkOrder', {
  252. workorderid: wid,
  253. dealman: $("#dealman").val(), //办理人
  254. result: $('#result').val(), //办理内容
  255. isproresult: $('#isProResultRadio input[name="isDisposeResult"]:checked').val(), //处理结果
  256. prosituation: $("#prosituation").val(), //处理方案/进程
  257. dealcontact: $("#dealcontact").val(), //联系方式
  258. connecttime: $("#connecttime").val(), //沟通时间
  259. connectmode: $("#connectmode").val(), //沟通方式
  260. replycontent: $("#replycontent").val(), //答复内容
  261. isstaisfied: $('#isStaisfiedRadio input[name="isstaisfied"]:checked').val(), //是否满意
  262. state: State,
  263. feedbackid: a,
  264. files: $("#file").val(),
  265. token: $.cookie("token")
  266. }, function (result) {
  267. result = JSON.parse(result);
  268. if (result.state.toLowerCase() == "success") {
  269. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  270. parent.layer.close(index); //再执行关闭
  271. parent.load();
  272. parent.layer.msg("办理成功");
  273. $('.fileBox').html('');
  274. }
  275. })
  276. }
  277. // 工单详情
  278. function HGXX() {
  279. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
  280. workorderid: wid,
  281. token: $.cookie("token")
  282. }, function (result) {
  283. // result = JSON.stringify(result)
  284. // alert(result)
  285. console.log(result);
  286. if (result.state.toLowerCase() == "success") {
  287. var temp;
  288. var Agree;
  289. $.each(result.data.fkinfo, function (i, n) {
  290. // var r = JSON.stringify(n.File);
  291. if (n.F_IsAudit == 1) {
  292. Agree = "同意";
  293. } else if (n.F_IsAudit == 2) {
  294. Agree = "拒绝";
  295. }
  296. temp = '<tr><td class="text-center">' + (i + 1) + '</td><td class="text-center">'
  297. + n.F_CreateTime + '</td><td class="text-center">' + n.F_Result
  298. + '</td><td class="text-center FJ" style="color:#00a1cb;"></td><td class="text-center">'
  299. + n.F_AuditTime + '</td><td class="text-center">' + n.F_AuditReason
  300. + '</td><td class="text-center">' + Agree + '</td></tr>';
  301. var tmp = '';
  302. if (n.File) {
  303. $.each(n.File, function (d, f) {
  304. tmp += '<a style="margin-right:5px;" href="' + f.F_FileUrl + '" download="' + f.F_FileUrl + '">' + f.F_FileName.substring(19) + '</a>';
  305. })
  306. }
  307. $(temp).appendTo($('.HGXX')).find('.FJ').append(tmp);
  308. });
  309. //
  310. // alert(i);
  311. }
  312. })
  313. }
  314. // <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>
  315. // function Hove(){
  316. // $(document).on("mouseover mouseout",'.tiaozhuan',function(event){
  317. // if(event.type == "mouseover"){
  318. // //鼠标悬浮
  319. // var miao=$(this).attr("href");
  320. // if (miao=="") {
  321. // $(this).removeAttr("href");
  322. // $(this).removeAttr("download");
  323. // $(this).html("");
  324. //
  325. // } else{
  326. // $(this).attr("href");
  327. // $(this).attr("download");
  328. // }
  329. // }else if(event.type == "mouseout"){
  330. // //鼠标离开
  331. // }
  332. // })
  333. //
  334. //
  335. // }
  336. // $(window).load(function(){
  337. // alert("DDD");
  338. // alert($(".tiaozhuan").attr("href"));
  339. // var miao1=$(".tiaozhuan").attr("href");
  340. // if (miao1=="") {
  341. // alert("aaa");
  342. //// $(this).html("");
  343. // } else{
  344. // alert("bbb");
  345. // $(this).html("");
  346. // }
  347. // });
  348. // 派单内容给
  349. function BLNR() {
  350. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetSecondDealInfo', {
  351. workorderid: wid,
  352. token: $.cookie("token")
  353. }, function (result) {
  354. // result = JSON.stringify(result)
  355. // console.log(result);
  356. if (result.state.toLowerCase() == "success") {
  357. var temp2;
  358. $.each(result.data.pdinfo, function (i, n) {
  359. 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>';
  360. });
  361. $('.BLNR').append(temp2);
  362. }
  363. })
  364. }
  365. //草稿详情
  366. function Detail() {
  367. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetDraftInfo', {
  368. workorderid: wid,
  369. type: 2,
  370. token: $.cookie("token")
  371. }, function (result) {
  372. if (result.state.toLowerCase() == "success") {
  373. if (result.data.length > 0) {
  374. $("#dealman").val(result.data[0].F_DealUser);
  375. $('#result').val(result.data[0].F_Result);
  376. a = result.data[0].F_Id;
  377. };
  378. }
  379. })
  380. }
  381. //清除
  382. function Clean() {
  383. $("#startTime").val(''),
  384. $('#assignedopinion').val('')
  385. }
  386. //上传文件
  387. function upload() {
  388. var Files = document.getElementById("upFile").files;
  389. if (Files.length > 0) {
  390. var formData = new FormData();
  391. for (var i = 0; i < Files.length; i++) {
  392. formData.append('file' + i, Files[i]);
  393. }
  394. formData.append("token", $.cookie("token"));
  395. var typeName=Files[0].name.split('.')[1];
  396. if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
  397. $.ajax({
  398. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  399. type: "POST",
  400. data: formData,
  401. /**
  402. *必须false才会自动加上正确的Content-Type
  403. */
  404. contentType: false,
  405. /**
  406. * 必须false才会避开jQuery对 formdata 的默认处理
  407. * XMLHttpRequest会对 formdata 进行正确的处理
  408. */
  409. processData: false,
  410. success: function (result) {
  411. document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  412. $("#upFile").change(function () {
  413. upload();
  414. });
  415. var r = $.parseJSON(result);
  416. if (r.state.toLowerCase() == "success") {
  417. //$(".fjnr").text(r.data[0].F_FileName);
  418. var a = r.data;
  419. $(a).each(function (i, n) {
  420. var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n.F_FileName.substring(19) + '<i class="fa fa-remove del_file"></i></span>'
  421. $(strs).appendTo($('.fileBox')).find('.del_file').click(function (event) {
  422. event.stopPropagation();
  423. $(this).parent().remove();
  424. file_num()
  425. })
  426. })
  427. file_num();
  428. }
  429. }
  430. });
  431. }else{
  432. layer.msg("格式不正确");
  433. }
  434. } else {
  435. layer.confirm('请上传文件!', {
  436. btn: ['确定']
  437. });
  438. }
  439. }
  440. //上传文件隐藏域值
  441. function file_num() {
  442. var str = '';
  443. var Str;
  444. $('.fileBox .files').each(function (j, m) {
  445. var aa = $(m).attr("fiel-num")
  446. console.log(aa);
  447. str += aa + ",";
  448. Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  449. })
  450. $("#file").val(Str);
  451. }
  452. </script>
  453. </body>
  454. </html>