暫無描述

LDPS.html 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. .HT{
  24. display: none;
  25. }
  26. </style>
  27. </head>
  28. <body>
  29. <div class="Common">
  30. <table>
  31. <tr class="HT">
  32. <th class="Importent">批示人:</th>
  33. <td> <input type="text" id="superuser"/></td>
  34. </tr>
  35. <tr>
  36. <th >批示类型:</th>
  37. <td>
  38. <input type="text" id="Type" readonly="readonly"/>
  39. <input type="hidden" id="Types"/>
  40. </td>
  41. </tr>
  42. <tr>
  43. <th class="Importent">批示内容:</th>
  44. <td colspan="2"><textarea data-adaptheight id="superopinion" name="" rows="6" cols=""></textarea></td>
  45. </tr>
  46. <tr>
  47. <th>附件上传:</th>
  48. <td colspan="7">
  49. <div class="fileBox"></div>
  50. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
  51. <input class="input" type="button" value="上传" id="scwj" />
  52. <!--<input class="input" type="button" value="删除附件" id="scfj" style="display:none;" />-->
  53. <input type="hidden" id="file" />
  54. <span style="color:#FF0000; border: none;">
  55. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  56. </span>
  57. </td>
  58. </tr>
  59. </table>
  60. <div class="btn_box">
  61. <button class="btns">保存</button>
  62. </div>
  63. </div>
  64. <script src="../css/laydate/laydate.js"></script>
  65. <script src="../js/adjustHeight.js"></script>
  66. <script src="../Script/Common/huayi.common.js"></script>
  67. <script>
  68. var wid = helper.request.queryString("wid");
  69. var type = helper.request.queryString("type");
  70. console.log(type)
  71. $(document).ready(function() {
  72. if(type==1||type==2){
  73. $(".HT").show();
  74. }
  75. XQ();
  76. //上传附件
  77. $("#scwj").click(function() {
  78. $("#upFile").trigger("click");
  79. })
  80. $("#upFile").change(function() {
  81. upload('upFile','.fileBox',['png','jpg','mp3','mp4','pdf','doc','docx','xls','xlsx'],"#file");
  82. })
  83. $("#scfj").click(function() {
  84. $(".fjnr").text("");
  85. $("#scfj").hide();
  86. })
  87. $(".btns").click(function(){
  88. JA();
  89. })
  90. })
  91. //批示
  92. function JA() {
  93. $.post(huayi.config.callcenter_url + 'WorkOrder/EditSuperInfoByAdmin', {
  94. id: wid,
  95. type:$("#Types").val(),//(1领导批示 2市长指示)
  96. superuser:$("#superuser").val(),//批示人&
  97. superopinion:$('#superopinion').val(),//批示内容&
  98. files:$("#file").val(),//附件id(多个用英文逗号,隔开
  99. "token": $.cookie("token")
  100. }, function(result) {
  101. result = JSON.parse(result);
  102. if(result.state.toLowerCase() == "success") {
  103. parent.parent.layer.closeAll();
  104. parent.parent.$('#orderlist').bootstrapTable('refresh');
  105. parent.parent.layer.msg("操作成功!");
  106. }
  107. })
  108. }
  109. // function upload() {
  110. // var Files = document.getElementById("upFile").files;
  111. // if(Files.length > 0) {
  112. // var formData = new FormData();
  113. // for(var i = 0; i < Files.length; i++) {
  114. // formData.append('file' + i, Files[i]);
  115. // }
  116. // formData.append("token", $.cookie("token"));
  117. // var typeName=Files[0].name.split('.')[1];
  118. // if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
  119. // $.ajax({
  120. // url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  121. // type: "POST",
  122. // data: formData,
  123. // /**
  124. // *必须false才会自动加上正确的Content-Type
  125. // */
  126. // contentType: false,
  127. // /**
  128. // * 必须false才会避开jQuery对 formdata 的默认处理
  129. // * XMLHttpRequest会对 formdata 进行正确的处理
  130. // */
  131. // processData: false,
  132. // success: function(result) {
  133. // document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  134. // $("#upFile").change(function() {
  135. // upload();
  136. // });
  137. // var r = $.parseJSON(result);
  138. // if(r.state.toLowerCase() == "success") {
  139. // $(".fjnr").text(r.data[0].F_FileName);
  140. // var a = r.data;
  141. // var str = '';
  142. // var Str;
  143. //
  144. // $(a).each(function(i, n) {
  145. // console.log(n.F_FileId);
  146. // str += n.F_FileId + ",";
  147. // Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
  148. // console.log(Str);
  149. // })
  150. // $("#file").val(Str);
  151. // $("#scfj").show();
  152. // }
  153. // }
  154. // });
  155. // }else{
  156. // layer.msg("格式不正确");
  157. // }
  158. // } else {
  159. // layer.confirm('请上传文件!', {
  160. // btn: ['确定']
  161. // });
  162. // }
  163. // }
  164. function XQ(){
  165. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetInfoByAdmin', {
  166. id: wid,
  167. type:5,
  168. token: $.cookie("token")
  169. }, function(result) {
  170. if(result.state.toLowerCase() == "success") {
  171. var type=result.data[0].F_Type;
  172. var Ltype="";
  173. if(type==1){
  174. Ltype="领导批示";
  175. }else if(type==2){
  176. Ltype="市长指示";
  177. } else if(type==3){
  178. Ltype="回退";
  179. }
  180. $("#Type").val(Ltype);
  181. $("#Types").val(type);
  182. $("#superuser").val(result.data[0].F_BatchReason);
  183. $('#superopinion').val(result.data[0].F_SuperOpinion);
  184. // $("#reason").val(result.data[0].F_RefuseReason)
  185. console.log(result);
  186. }
  187. })
  188. }
  189. </script>
  190. </body>
  191. </html>