123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <script type="text/javascript">
- //低保
- function dbUpload_submit(){
- if(dbUpload == null || dbUpload == ''){
- $.messager.alert("系统提示","请选择文件上传!","error");
- }else{
- $("#error").text("正在上传请稍后......")
- $("#importForm").form("submit",{
- url : whzl.basePath+"/mzBatchAction_importDBInfo",//要访问的后台地址
- success : function(result){
- var parseResult = $.parseJSON(result);
- if (parseResult.success){
- $("#error").text("已上传完成......");
- }else{
- $("#error").html(parseResult.obj);
- }
- }
- })
- }
- }
- //婚姻
- function hyUpload_submit(){
- if(hyUpload == null || hyUpload == ''){
- $.messager.alert("系统提示","请选择文件上传!","error");
- }else{
- $("#error").text("正在上传请稍后......")
- $("#importForm").form("submit",{
- url : whzl.basePath+"/mzBatchAction_importHYInfo",//要访问的后台地址
- success : function(result){
- var parseResult = $.parseJSON(result);
- if (parseResult.success){
- $("#error").text("已上传完成......");
- }else{
- $("#error").html(parseResult.obj);
- }
- }
- })
- }
- }
-
- //法人
- function frUpload_submit(){
- if(frUpload == null || frUpload == ''){
- $.messager.alert("系统提示","请选择文件上传!","error");
- }else{
- $("#error").text("正在上传请稍后......")
- $("#importForm").form("submit",{
- url : whzl.basePath+"/mzBatchAction_importFRInfo",//要访问的后台地址
- success : function(result){
- var parseResult = $.parseJSON(result);
- if (parseResult.success){
- $("#error").text("已上传完成......");
- }else{
- $("#error").html(parseResult.obj);
- }
- }
- })
- }
- }
- //高管
- function ggUpload_submit(){
- if(ggUpload == null || ggUpload == ''){
- $.messager.alert("系统提示","请选择文件上传!","error");
- }else{
- $("#error").text("正在上传请稍后......")
- $("#importForm").form("submit",{
- url : whzl.basePath+"/mzBatchAction_importGGInfo",//要访问的后台地址
- success : function(result){
- var parseResult = $.parseJSON(result);
- if (parseResult.success){
- $("#error").text("已上传完成......");
- }else{
- $("#error").html(parseResult.obj);
- }
- }
- })
- }
- }
-
- //股东
- function gdUpload_submit(){
- if(gdUpload == null || gdUpload == ''){
- $.messager.alert("系统提示","请选择文件上传!","error");
- }else{
- $("#error").text("正在上传请稍后......")
- $("#importForm").form("submit",{
- url : whzl.basePath+"/mzBatchAction_importGDInfo",//要访问的后台地址
- success : function(result){
- var parseResult = $.parseJSON(result);
- if (parseResult.success){
- $("#error").text("已上传完成......");
- }else{
- $("#error").html(parseResult.obj);
- }
- }
- })
- }
- }
-
- //车辆省级
- function carPUpload_submit(){
- if(carPUpload == null || carPUpload == ''){
- $.messager.alert("系统提示","请选择文件上传!","error");
- }else{
- $("#error").text("正在上传请稍后......")
- $("#importForm").form("submit",{
- url : whzl.basePath+"/mzBatchAction_importCarPInfo",//要访问的后台地址
- success : function(result){
- var parseResult = $.parseJSON(result);
- if (parseResult.success){
- $("#error").text("已上传完成......");
- }else{
- $("#error").html(parseResult.obj);
- }
- }
- })
- }
- }
- //车辆市级
- function carCUpload_submit(){
- if(carCUpload == null || carCUpload == ''){
- $.messager.alert("系统提示","请选择文件上传!","error");
- }else{
- $("#error").text("正在上传请稍后......")
- $("#importForm").form("submit",{
- url : whzl.basePath+"/mzBatchAction_importCarCInfo",//要访问的后台地址
- success : function(result){
- var parseResult = $.parseJSON(result);
- if (parseResult.success){
- $("#error").text("已上传完成......");
- }else{
- $("#error").html(parseResult.obj);
- }
- }
- })
- }
- }
- //退休
- function txUpload_submit(){
- if(txUpload == null || txUpload == ''){
- $.messager.alert("系统提示","请选择文件上传!","error");
- }else{
- $("#error").text("正在上传请稍后......")
- $("#importForm").form("submit",{
- url : whzl.basePath+"/mzBatchAction_importTXInfo",//要访问的后台地址
- success : function(result){
- var parseResult = $.parseJSON(result);
- if (parseResult.success){
- $("#error").text("已上传完成......");
- }else{
- $("#error").html(parseResult.obj);
- }
- }
- })
- }
- }
-
- //金融信息
- function yhUpload_submit(){
- if(yhUpload == null || yhUpload == ''){
- $.messager.alert("系统提示","请选择文件上传!","error");
- }else{
- $("#error").text("正在上传请稍后......")
- $("#importForm").form("submit",{
- url : whzl.basePath+"/mzBatchAction_importYHInfo",//要访问的后台地址
- success : function(result){
- var parseResult = $.parseJSON(result);
- if (parseResult.success){
- $("#error").text("已上传完成......");
- }else{
- $("#error").html(parseResult.obj);
- }
- }
- })
- }
- }
-
- //PDF压缩包
- function pdfUpload_submit(){
- if(pdfUpload == null || pdfUpload == ''){
- $.messager.alert("系统提示","请选择文件上传!","error");
- }else{
- $("#error").text("正在上传请稍后......")
- $("#importForm").form("submit",{
- url : whzl.basePath+"/mzBatchAction_importPDFZip",//要访问的后台地址
- success : function(result){
- var parseResult = $.parseJSON(result);
- if (parseResult.success){
- $("#error").text("已上传完成......");
- }else{
- $("#error").html(parseResult.obj);
- }
- }
- })
- }
- }
-
- $("#mzBatchFile_update").change(function(){
- var obj = document.getElementById('mzBatchFile_update');
- if(imageFormat(obj)){
- $('#importForm').form('submit',{
- url : whzl.basePath+'/mzBatchAction_addUploadFile',
- success: function(result){
- $("#mzBatchFile_update").attr("value","");
- $.ajax({
- type: "post",//使用get方法访问后台
- dataType: "json",//返回json格式的数据
- url: "mzBatchAction_mzBatchDetail",//要访问的后台地址
- data: {"mzBatch.id":$("#mzBatch_id").val()},//要发送的数据
- success: function(msg){
- for(var i=0;i< msg.obj.list.length;i++){
- var $image = $("<div style='width: 100px;height: 40px;float:left;'><img src='../" + msg.obj.list[i].filePath + "' width='100' height='40'/></div>");
- $("#mzBatchFile_file").append ($image);
- }
- }
- });
- }
- });
- }
- });
-
- function imageFormat(obj){
- var files = obj.files;
- for(var i=0;i<files.length;i++){
- /**判断图片格式*/
- if(!/\.(jpg)$/.test(files[i].name)){
- $.messager.alert('提示','图片类型必须是.jpg');
- return false;
- }
- /**判断图片大小*/
- if(files[i].size>10*1024*1024){
- $.messager.alert('提示','单张图片不得大于10M。');
- return false;
- }
- }
- return true;
- }
-
- function import_load(id){
- $("#mzBatch_id").val(id);
- }
- </script>
- <form id="importForm" method="post" enctype="multipart/form-data">
- <table class="mytable" style="width: 100%;">
- <tr>
- <th>低保信息</th>
- <td>
- <input type="hidden" id="mzBatch_id" name="mzBatch.id">
- <input type="file" id="dbUpload" name="dbUpload" accept="application/vnd.ms-excel">
- <input type="button" value="提交" onclick="dbUpload_submit()"/>
- </td>
- </tr>
- <tr>
- <th>婚姻信息</th>
- <td>
- <input type="file" id="hyUpload" name="hyUpload" accept="application/vnd.ms-excel">
- <input type="button" value="提交" onclick="hyUpload_submit()"/>
- </td>
- </tr>
- <tr>
- <th>车辆信息_省级</th>
- <td>
- <input type="file" id="carPUpload" name="carPUpload" accept="application/vnd.ms-excel">
- <input type="button" value="提交" onclick="carPUpload_submit()"/>
- </td>
- </tr>
- <tr>
- <th>车辆信息_市级</th>
- <td>
- <input type="file" id="carCUpload" name="carCUpload" accept="application/vnd.ms-excel">
- <input type="button" value="提交" onclick="carCUpload_submit()"/>
- </td>
- </tr>
- <tr>
- <th>法人登记信息_省级</th>
- <td>
- <input type="file" id="frUpload" name="frUpload" accept="application/vnd.ms-excel">
- <input type="button" value="提交" onclick="frUpload_submit()"/>
- </td>
- </tr>
- <tr>
- <th>高管人员信息_省级</th>
- <td>
- <input type="file" id="ggUpload" name="ggUpload" accept="application/vnd.ms-excel">
- <input type="button" value="提交" onclick="ggUpload_submit()"/>
- </td>
- </tr>
-
- <tr>
- <th>股东信息_省级</th>
- <td>
- <input type="file" id="gdUpload" name="gdUpload" accept="application/vnd.ms-excel">
- <input type="button" value="提交" onclick="gdUpload_submit()"/>
- </td>
- </tr>
- <tr>
- <th>退休信息</th>
- <td>
- <input type="file" id="txUpload" name="txUpload" accept="application/vnd.ms-excel">
- <input type="button" value="提交" onclick="txUpload_submit()"/>
- </td>
- </tr>
- <tr>
- <th>金融信息</th>
- <td>
- <input type="file" id="yhUpload" name="yhUpload" accept="application/vnd.ms-excel">
- <input type="button" value="提交" onclick="yhUpload_submit()"/>
- </td>
- </tr>
- <tr>
- <th>PDF压缩包</th>
- <td>
- <input type="file" id="pdfUpload" name="pdfUpload" >
- <input type="button" value="提交" onclick="pdfUpload_submit()"/>
- </td>
- </tr>
- <tr>
- <th>单位委托书</th>
- <td>
- <span id="mzBatchFile_file">
- <input type="button" value="上传" onclick="mzBatchFile_update.click()">
- <input type="file" accept="image/gif, image/jpeg" multiple name="mzBatchFile" id="mzBatchFile_update" class="easyui-validatebox" style="float:left;width:0px;display: none">
- </span>
- </td>
- </tr>
- <tr>
- <td colspan="2"><span id="error" style="color:red;font-size: 14px;"></span></td>
- </tr>
- </table>
- </form>
|