mzBatchBack.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <script type="text/javascript">
  3. //低保
  4. function dbUpload_submit(){
  5. if(dbUpload == null || dbUpload == ''){
  6. $.messager.alert("系统提示","请选择文件上传!","error");
  7. }else{
  8. $("#error").text("正在上传请稍后......")
  9. $("#importForm").form("submit",{
  10. url : whzl.basePath+"/mzBatchAction_importDBInfo",//要访问的后台地址
  11. success : function(result){
  12. var parseResult = $.parseJSON(result);
  13. if (parseResult.success){
  14. $("#error").text("已上传完成......");
  15. }else{
  16. $("#error").html(parseResult.obj);
  17. }
  18. }
  19. })
  20. }
  21. }
  22. //婚姻
  23. function hyUpload_submit(){
  24. if(hyUpload == null || hyUpload == ''){
  25. $.messager.alert("系统提示","请选择文件上传!","error");
  26. }else{
  27. $("#error").text("正在上传请稍后......")
  28. $("#importForm").form("submit",{
  29. url : whzl.basePath+"/mzBatchAction_importHYInfo",//要访问的后台地址
  30. success : function(result){
  31. var parseResult = $.parseJSON(result);
  32. if (parseResult.success){
  33. $("#error").text("已上传完成......");
  34. }else{
  35. $("#error").html(parseResult.obj);
  36. }
  37. }
  38. })
  39. }
  40. }
  41. //法人
  42. function frUpload_submit(){
  43. if(frUpload == null || frUpload == ''){
  44. $.messager.alert("系统提示","请选择文件上传!","error");
  45. }else{
  46. $("#error").text("正在上传请稍后......")
  47. $("#importForm").form("submit",{
  48. url : whzl.basePath+"/mzBatchAction_importFRInfo",//要访问的后台地址
  49. success : function(result){
  50. var parseResult = $.parseJSON(result);
  51. if (parseResult.success){
  52. $("#error").text("已上传完成......");
  53. }else{
  54. $("#error").html(parseResult.obj);
  55. }
  56. }
  57. })
  58. }
  59. }
  60. //高管
  61. function ggUpload_submit(){
  62. if(ggUpload == null || ggUpload == ''){
  63. $.messager.alert("系统提示","请选择文件上传!","error");
  64. }else{
  65. $("#error").text("正在上传请稍后......")
  66. $("#importForm").form("submit",{
  67. url : whzl.basePath+"/mzBatchAction_importGGInfo",//要访问的后台地址
  68. success : function(result){
  69. var parseResult = $.parseJSON(result);
  70. if (parseResult.success){
  71. $("#error").text("已上传完成......");
  72. }else{
  73. $("#error").html(parseResult.obj);
  74. }
  75. }
  76. })
  77. }
  78. }
  79. //股东
  80. function gdUpload_submit(){
  81. if(gdUpload == null || gdUpload == ''){
  82. $.messager.alert("系统提示","请选择文件上传!","error");
  83. }else{
  84. $("#error").text("正在上传请稍后......")
  85. $("#importForm").form("submit",{
  86. url : whzl.basePath+"/mzBatchAction_importGDInfo",//要访问的后台地址
  87. success : function(result){
  88. var parseResult = $.parseJSON(result);
  89. if (parseResult.success){
  90. $("#error").text("已上传完成......");
  91. }else{
  92. $("#error").html(parseResult.obj);
  93. }
  94. }
  95. })
  96. }
  97. }
  98. //车辆省级
  99. function carPUpload_submit(){
  100. if(carPUpload == null || carPUpload == ''){
  101. $.messager.alert("系统提示","请选择文件上传!","error");
  102. }else{
  103. $("#error").text("正在上传请稍后......")
  104. $("#importForm").form("submit",{
  105. url : whzl.basePath+"/mzBatchAction_importCarPInfo",//要访问的后台地址
  106. success : function(result){
  107. var parseResult = $.parseJSON(result);
  108. if (parseResult.success){
  109. $("#error").text("已上传完成......");
  110. }else{
  111. $("#error").html(parseResult.obj);
  112. }
  113. }
  114. })
  115. }
  116. }
  117. //车辆市级
  118. function carCUpload_submit(){
  119. if(carCUpload == null || carCUpload == ''){
  120. $.messager.alert("系统提示","请选择文件上传!","error");
  121. }else{
  122. $("#error").text("正在上传请稍后......")
  123. $("#importForm").form("submit",{
  124. url : whzl.basePath+"/mzBatchAction_importCarCInfo",//要访问的后台地址
  125. success : function(result){
  126. var parseResult = $.parseJSON(result);
  127. if (parseResult.success){
  128. $("#error").text("已上传完成......");
  129. }else{
  130. $("#error").html(parseResult.obj);
  131. }
  132. }
  133. })
  134. }
  135. }
  136. //退休
  137. function txUpload_submit(){
  138. if(txUpload == null || txUpload == ''){
  139. $.messager.alert("系统提示","请选择文件上传!","error");
  140. }else{
  141. $("#error").text("正在上传请稍后......")
  142. $("#importForm").form("submit",{
  143. url : whzl.basePath+"/mzBatchAction_importTXInfo",//要访问的后台地址
  144. success : function(result){
  145. var parseResult = $.parseJSON(result);
  146. if (parseResult.success){
  147. $("#error").text("已上传完成......");
  148. }else{
  149. $("#error").html(parseResult.obj);
  150. }
  151. }
  152. })
  153. }
  154. }
  155. //金融信息
  156. function yhUpload_submit(){
  157. if(yhUpload == null || yhUpload == ''){
  158. $.messager.alert("系统提示","请选择文件上传!","error");
  159. }else{
  160. $("#error").text("正在上传请稍后......")
  161. $("#importForm").form("submit",{
  162. url : whzl.basePath+"/mzBatchAction_importYHInfo",//要访问的后台地址
  163. success : function(result){
  164. var parseResult = $.parseJSON(result);
  165. if (parseResult.success){
  166. $("#error").text("已上传完成......");
  167. }else{
  168. $("#error").html(parseResult.obj);
  169. }
  170. }
  171. })
  172. }
  173. }
  174. //PDF压缩包
  175. function pdfUpload_submit(){
  176. if(pdfUpload == null || pdfUpload == ''){
  177. $.messager.alert("系统提示","请选择文件上传!","error");
  178. }else{
  179. $("#error").text("正在上传请稍后......")
  180. $("#importForm").form("submit",{
  181. url : whzl.basePath+"/mzBatchAction_importPDFZip",//要访问的后台地址
  182. success : function(result){
  183. var parseResult = $.parseJSON(result);
  184. if (parseResult.success){
  185. $("#error").text("已上传完成......");
  186. }else{
  187. $("#error").html(parseResult.obj);
  188. }
  189. }
  190. })
  191. }
  192. }
  193. $("#mzBatchFile_update").change(function(){
  194. var obj = document.getElementById('mzBatchFile_update');
  195. if(imageFormat(obj)){
  196. $('#importForm').form('submit',{
  197. url : whzl.basePath+'/mzBatchAction_addUploadFile',
  198. success: function(result){
  199. $("#mzBatchFile_update").attr("value","");
  200. $.ajax({
  201. type: "post",//使用get方法访问后台
  202. dataType: "json",//返回json格式的数据
  203. url: "mzBatchAction_mzBatchDetail",//要访问的后台地址
  204. data: {"mzBatch.id":$("#mzBatch_id").val()},//要发送的数据
  205. success: function(msg){
  206. for(var i=0;i< msg.obj.list.length;i++){
  207. var $image = $("<div style='width: 100px;height: 40px;float:left;'><img src='../" + msg.obj.list[i].filePath + "' width='100' height='40'/></div>");
  208. $("#mzBatchFile_file").append ($image);
  209. }
  210. }
  211. });
  212. }
  213. });
  214. }
  215. });
  216. function imageFormat(obj){
  217. var files = obj.files;
  218. for(var i=0;i<files.length;i++){
  219. /**判断图片格式*/
  220. if(!/\.(jpg)$/.test(files[i].name)){
  221. $.messager.alert('提示','图片类型必须是.jpg');
  222. return false;
  223. }
  224. /**判断图片大小*/
  225. if(files[i].size>10*1024*1024){
  226. $.messager.alert('提示','单张图片不得大于10M。');
  227. return false;
  228. }
  229. }
  230. return true;
  231. }
  232. function import_load(id){
  233. $("#mzBatch_id").val(id);
  234. }
  235. </script>
  236. <form id="importForm" method="post" enctype="multipart/form-data">
  237. <table class="mytable" style="width: 100%;">
  238. <tr>
  239. <th>低保信息</th>
  240. <td>
  241. <input type="hidden" id="mzBatch_id" name="mzBatch.id">
  242. <input type="file" id="dbUpload" name="dbUpload" accept="application/vnd.ms-excel">
  243. <input type="button" value="提交" onclick="dbUpload_submit()"/>
  244. </td>
  245. </tr>
  246. <tr>
  247. <th>婚姻信息</th>
  248. <td>
  249. <input type="file" id="hyUpload" name="hyUpload" accept="application/vnd.ms-excel">
  250. <input type="button" value="提交" onclick="hyUpload_submit()"/>
  251. </td>
  252. </tr>
  253. <tr>
  254. <th>车辆信息_省级</th>
  255. <td>
  256. <input type="file" id="carPUpload" name="carPUpload" accept="application/vnd.ms-excel">
  257. <input type="button" value="提交" onclick="carPUpload_submit()"/>
  258. </td>
  259. </tr>
  260. <tr>
  261. <th>车辆信息_市级</th>
  262. <td>
  263. <input type="file" id="carCUpload" name="carCUpload" accept="application/vnd.ms-excel">
  264. <input type="button" value="提交" onclick="carCUpload_submit()"/>
  265. </td>
  266. </tr>
  267. <tr>
  268. <th>法人登记信息_省级</th>
  269. <td>
  270. <input type="file" id="frUpload" name="frUpload" accept="application/vnd.ms-excel">
  271. <input type="button" value="提交" onclick="frUpload_submit()"/>
  272. </td>
  273. </tr>
  274. <tr>
  275. <th>高管人员信息_省级</th>
  276. <td>
  277. <input type="file" id="ggUpload" name="ggUpload" accept="application/vnd.ms-excel">
  278. <input type="button" value="提交" onclick="ggUpload_submit()"/>
  279. </td>
  280. </tr>
  281. <tr>
  282. <th>股东信息_省级</th>
  283. <td>
  284. <input type="file" id="gdUpload" name="gdUpload" accept="application/vnd.ms-excel">
  285. <input type="button" value="提交" onclick="gdUpload_submit()"/>
  286. </td>
  287. </tr>
  288. <tr>
  289. <th>退休信息</th>
  290. <td>
  291. <input type="file" id="txUpload" name="txUpload" accept="application/vnd.ms-excel">
  292. <input type="button" value="提交" onclick="txUpload_submit()"/>
  293. </td>
  294. </tr>
  295. <tr>
  296. <th>金融信息</th>
  297. <td>
  298. <input type="file" id="yhUpload" name="yhUpload" accept="application/vnd.ms-excel">
  299. <input type="button" value="提交" onclick="yhUpload_submit()"/>
  300. </td>
  301. </tr>
  302. <tr>
  303. <th>PDF压缩包</th>
  304. <td>
  305. <input type="file" id="pdfUpload" name="pdfUpload" >
  306. <input type="button" value="提交" onclick="pdfUpload_submit()"/>
  307. </td>
  308. </tr>
  309. <tr>
  310. <th>单位委托书</th>
  311. <td>
  312. <span id="mzBatchFile_file">
  313. <input type="button" value="上传" onclick="mzBatchFile_update.click()">
  314. <input type="file" accept="image/gif, image/jpeg" multiple name="mzBatchFile" id="mzBatchFile_update" class="easyui-validatebox" style="float:left;width:0px;display: none">
  315. </span>
  316. </td>
  317. </tr>
  318. <tr>
  319. <td colspan="2"><span id="error" style="color:red;font-size: 14px;"></span></td>
  320. </tr>
  321. </table>
  322. </form>