Нет описания

XGBLS.html 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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. </style>
  24. </head>
  25. <body>
  26. <div class="Common">
  27. <table>
  28. <tr>
  29. <th class="Importent">办理人:</th>
  30. <td> <input id="dealman" type="text" style="height: 32px;"></td>
  31. </tr>
  32. <tr>
  33. <th class="Importent">附件:</th>
  34. <td>
  35. <!--<span class="fjnr"></span>-->
  36. <div class="fileBox"></div>
  37. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
  38. <input class="input" type="button" value="上传" id="scwj" />
  39. <!--<input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />-->
  40. <input type="hidden" id="file" />
  41. <span style="color:#FF0000; border: none;">
  42. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  43. </span>
  44. </td>
  45. </tr>
  46. <tr>
  47. <th class="Importent">办理内容:</th>
  48. <td><textarea data-adaptheight id="result" name="" rows="" cols=""></textarea></td>
  49. <input type="hidden" id="ID" />
  50. </tr>
  51. </table>
  52. <div class="btn_box">
  53. <button class="btns BC">保存</button>
  54. </div>
  55. </div>
  56. <script src="../css/laydate/laydate.js"></script>
  57. <script src="../js/adjustHeight.js"></script>
  58. <script src="../Script/Common/huayi.common.js"></script>
  59. <script>
  60. var wid = helper.request.queryString("wid");
  61. $(document).ready(function() {
  62. XQ();
  63. //上传附件
  64. $("#scwj").click(function() {
  65. $("#upFile").trigger("click");
  66. })
  67. $("#upFile").change(function() {
  68. upload('upFile','.fileBox',['png','jpg','mp3','mp4','pdf','doc','docx','xls','xlsx'],"#file");
  69. })
  70. $("#scfj").click(function() {
  71. $(".fjnr").text("");
  72. $("#scfj").hide();
  73. })
  74. $('.BC').click(function() {
  75. if($("#dealman").val() == "") {
  76. layer.msg("办理人不能为空");
  77. } else if($("#result").val() == "") {
  78. layer.msg("办理内容不能为空");
  79. } else {
  80. JA();
  81. }
  82. })
  83. });
  84. //交办
  85. function JA() {
  86. $.post(huayi.config.callcenter_url + 'WorkOrder/EditFeedBackInfoByAdmin', {
  87. id: wid,
  88. dealman: $("#dealman").val(), //办理人
  89. result: $('#result').val(), //办理内容
  90. files: $("#file").val(),
  91. token: $.cookie("token")
  92. }, function(result) {
  93. result = JSON.parse(result);
  94. if(result.state.toLowerCase() == "success") {
  95. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  96. parent.layer.close(index); //再执行关闭
  97. parent.layer.msg("办理成功");
  98. }
  99. })
  100. }
  101. //上传文件
  102. // function upload() {
  103. // var Files = document.getElementById("upFile").files;
  104. // if(Files.length > 0) {
  105. // var formData = new FormData();
  106. // for(var i = 0; i < Files.length; i++) {
  107. // formData.append('file' + i, Files[i]);
  108. // }
  109. // formData.append("token", $.cookie("token"));
  110. // var typeName=Files[0].name.split('.')[1];
  111. // if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
  112. // $.ajax({
  113. // url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  114. // type: "POST",
  115. // data: formData,
  116. // /**
  117. // *必须false才会自动加上正确的Content-Type
  118. // */
  119. // contentType: false,
  120. // /**
  121. // * 必须false才会避开jQuery对 formdata 的默认处理
  122. // * XMLHttpRequest会对 formdata 进行正确的处理
  123. // */
  124. // processData: false,
  125. // success: function(result) {
  126. // document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  127. // $("#upFile").change(function() {
  128. // upload();
  129. // });
  130. // var r = $.parseJSON(result);
  131. // if(r.state.toLowerCase() == "success") {
  132. // $(".fjnr").text(r.data[0].F_FileName);
  133. // var a = r.data;
  134. // var str = '';
  135. // var Str;
  136. //
  137. // $(a).each(function(i, n) {
  138. // console.log(n.F_FileId);
  139. // str += n.F_FileId + ",";
  140. // Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  141. // console.log(Str);
  142. // })
  143. // $("#file").val(Str);
  144. // $("#scfj").show();
  145. // }
  146. // }
  147. // });
  148. // }else{
  149. // layer.msg("格式不正确");
  150. // }
  151. // } else {
  152. // layer.confirm('请上传文件!', {
  153. // btn: ['确定']
  154. // });
  155. // }
  156. // }
  157. function XQ(){
  158. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetInfoByAdmin', {
  159. id: wid,
  160. type:3,
  161. token: $.cookie("token")
  162. }, function(result) {
  163. if(result.state.toLowerCase() == "success") {
  164. $("#dealman").val(result.data[0].F_DealUser), //办理人
  165. $('#result').val(result.data[0].F_Result), //办理内容
  166. console.log(result);
  167. }
  168. })
  169. }
  170. </script>
  171. </body>
  172. </html>