Brak opisu

XGbanli.html 9.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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. .inpBox {
  12. border: 1px solid #a9a9a9;
  13. height: 27px;
  14. width: 220px;
  15. display: inline-block;
  16. position: relative;
  17. vertical-align: middle;
  18. }
  19. .addTree {
  20. background: #fff;
  21. position: absolute;
  22. width: 100%;
  23. border: 1px solid darkgrey;
  24. right: 0;
  25. top: 26px;
  26. display: none;
  27. }
  28. .xl {
  29. display: inline-block;
  30. background: url(../../img/dropDown.png) no-repeat;
  31. height: 100%;
  32. background-position: center center;
  33. width: 20px;
  34. position: absolute;
  35. right: 0;
  36. top: 0px;
  37. /* background-color: #f7bc8b; */
  38. cursor: pointer;
  39. }
  40. .ztree li span {
  41. border: none;
  42. padding: 0;
  43. }
  44. .inps {
  45. width: 217px;
  46. height: 24px;
  47. outline: none;
  48. border: 0;
  49. border-image-width: 0;
  50. padding: 0;
  51. padding-left: 3px;
  52. }
  53. .xl {
  54. display: inline-block;
  55. background: url(../img/dropDown.png) no-repeat;
  56. height: 100%;
  57. background-position: center center;
  58. width: 20px;
  59. position: absolute;
  60. right: 0;
  61. top: 0px;
  62. /* background-color: #f7bc8b; */
  63. cursor: pointer;
  64. }
  65. </style>
  66. </head>
  67. <body>
  68. <div class="Common" style="height: 100%;">
  69. <table>
  70. <tr>
  71. <th class="Importent">办理结果:</th>
  72. <td><textarea data-adaptheight id="assignedopinion" name="" rows="4" cols=""></textarea></td>
  73. </tr>
  74. <tr>
  75. <th class="">附件:</th>
  76. <td>
  77. <div class="fileBox"></div>
  78. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
  79. <input class="input" type="button" value="上传" id="scwj">
  80. <input type="hidden" id="file">
  81. <span style="color: #ff0000; border: none">
  82. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  83. </span>
  84. </td>
  85. </tr>
  86. </table>
  87. <div class="btn_box">
  88. <button class="btns BC">保存</button>
  89. </div>
  90. </div>
  91. <script src="../css/laydate/laydate.js"></script>
  92. <script src="../js/zTree/jquery.ztree.core.js"></script>
  93. <script src="../js/adjustHeight.js"></script>
  94. <script src="../Script/Common/huayi.common.js"></script>
  95. <script>
  96. var wid = helper.request.queryString("wid");
  97. var fid = helper.request.queryString("fid");
  98. $(document).ready(function () {
  99. XQ()
  100. $('.BC').click(function () {
  101. JA();
  102. })
  103. //交办
  104. function JA() {
  105. $.post(huayi.config.callcenter_url + 'WorkOrder/EditDealWorkOrder', {
  106. workorderid: wid,
  107. feedbackid: fid,
  108. result: $('#assignedopinion').val(), //交办意见
  109. flies: $("#file").val(),
  110. token: $.cookie("token")
  111. }, function (result) {
  112. result = JSON.parse(result);
  113. if (result.state.toLowerCase() == "success") {
  114. parent.parent.layer.closeAll();
  115. parent.parent.$('#orderlist').bootstrapTable('refresh');
  116. parent.parent.layer.msg("操作成功!");
  117. }
  118. })
  119. }
  120. //详情
  121. function XQ() {
  122. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetNewSecondDealInfo', {
  123. workorderid: wid,
  124. token: $.cookie("token")
  125. }, function (result) {
  126. if (result.state.toLowerCase() == "success") {
  127. $('#assignedopinion').val(result.data[0].F_Result);
  128. $(result.data[0].File).each(function(k, q) {
  129. var strs =
  130. '<span class="files" fiel-num="' +
  131. q.F_FileId +
  132. '">' +
  133. q.F_FileName.substring(19) +
  134. '<i class="fa fa-remove del_file"></i></span>';
  135. $(strs)
  136. .appendTo($(".fileBox"))
  137. .find(".del_file")
  138. .click(function(event) {
  139. event.stopPropagation();
  140. $(this).parent().remove();
  141. file_num1();
  142. });
  143. file_num1();
  144. });
  145. // $("#file").val(result.data[0].F_File);
  146. }
  147. })
  148. }
  149. });
  150. function file_num1() {
  151. var str = "";
  152. var Str;
  153. $(".fileBox .files").each(function(j, m) {
  154. var aa = $(m).attr("fiel-num");
  155. str += aa + ",";
  156. Str =
  157. str.substring(str.length - 1) == "," ?
  158. str.substring(0, str.length - 1) :
  159. str;
  160. });
  161. $("#file").val(Str);
  162. }
  163. $("#scwj").click(function () {
  164. $("#upFile").trigger("click");
  165. });
  166. $("#upFile").change(function () {
  167. upload('upFile','.fileBox',['png','jpg','mp3','mp4','pdf','doc','docx','xls','xlsx'],"#file");
  168. });
  169. //上传文件
  170. // function upload() {
  171. // var Files = document.getElementById("upFile").files;
  172. // if (Files.length > 0) {
  173. // var formData = new FormData();
  174. // for (var i = 0; i < Files.length; i++) {
  175. // formData.append("file" + i, Files[i]);
  176. // }
  177. // formData.append("token", $.cookie("token"));
  178. // var typeName = Files[0].name.split(".")[1];
  179. // if (
  180. // typeName == "png" ||
  181. // typeName == "jpg" ||
  182. // typeName == "mp4" ||
  183. // typeName == "mp3" ||
  184. // typeName == "pdf" ||
  185. // typeName == "doc" ||
  186. // typeName == "docx" ||
  187. // typeName == "xls" ||
  188. // typeName == "xlsx"
  189. // ) {
  190. // $.ajax({
  191. // url: huayi.config.callcenter_url +
  192. // "/WorkOrder/UploadFile",
  193. // type: "POST",
  194. // data: formData,
  195. // /**
  196. // *必须false才会自动加上正确的Content-Type
  197. // */
  198. // contentType: false,
  199. // /**
  200. // * 必须false才会避开jQuery对 formdata 的默认处理
  201. // * XMLHttpRequest会对 formdata 进行正确的处理
  202. // */
  203. // processData: false,
  204. // success: function (result) {
  205. // document.getElementById(
  206. // "upFile"
  207. // ).outerHTML = document.getElementById(
  208. // "upFile"
  209. // ).outerHTML;
  210. // $("#upFile").change(function () {
  211. // upload();
  212. // });
  213. // var r = $.parseJSON(result);
  214. // if (r.state.toLowerCase() == "success") {
  215. // $(".fjnr").text(r.data[0].F_FileName);
  216. // var a = r.data;
  217. // $(a).each(function (i, n) {
  218. // var strs =
  219. // '<span class="files" fiel-num="' +
  220. // n.F_FileId +
  221. // '">' +
  222. // n.F_FileName.substring(19) +
  223. // '<i class="fa fa-remove del_file"></i></span>';
  224. // $(strs)
  225. // .appendTo($(".fileBox"))
  226. // .find(".del_file")
  227. // .click(function (event) {
  228. // event.stopPropagation();
  229. // $(this).parent().remove();
  230. // file_num();
  231. // });
  232. // });
  233. // file_num();
  234. // }
  235. // },
  236. // });
  237. // } else {
  238. // layer.msg("格式不正确");
  239. // }
  240. // } else {
  241. // layer.confirm("请上传文件!", {
  242. // btn: ["确定"],
  243. // });
  244. // }
  245. // }
  246. // //上传文件隐藏域值
  247. // function file_num() {
  248. // var str = "";
  249. // var Str;
  250. // $(".fileBox .files").each(function (j, m) {
  251. // var aa = $(m).attr("fiel-num");
  252. // console.log(aa);
  253. // str += aa + ",";
  254. // Str =
  255. // str.substring(str.length - 1) == "," ?
  256. // str.substring(0, str.length - 1) :
  257. // str;
  258. // });
  259. // $("#file").val(Str);
  260. // }
  261. </script>
  262. </body>
  263. </html>