Kaynağa Gözat

Merge remote-tracking branch 'origin/master'

xs 5 yıl önce
ebeveyn
işleme
d239762d45

+ 1 - 1
src/main/java/com/jeeplus/modules/sg/managementcenter/materialinfo/entity/MaterialInfo.java

@@ -14,7 +14,7 @@ public class MaterialInfo extends DataEntity<MaterialInfo> {
     private Double weightTon;      //总重/吨
     private String supplyType;   //甲乙供
     private String note;      //备注
-    private String state;     //状态,与标准比对,1:相同 2,不相同
+    private String state;     //状态,与标准比对,1:相同 0:不相同
 
 
     public String getState() {

+ 5 - 5
src/main/java/com/jeeplus/modules/sg/managementcenter/materialinfo/service/MaterialInfoService.java

@@ -80,7 +80,7 @@ public class MaterialInfoService extends CrudService<MaterialInfoMapper, Materia
 
 
     @Transactional(readOnly = false)
-	public void export(MultipartFile file,String batch) throws IOException, InvalidFormatException {
+	public void export(MultipartFile file,String batch,String itemBatch) throws IOException, InvalidFormatException {
 		ImportExcel mo = new ImportExcel(file,1,"模块表");
 		ImportExcel importExcel = new ImportExcel(file,1,"领料清单");
 		Row row = mo.getRow(0);
@@ -96,13 +96,13 @@ public class MaterialInfoService extends CrudService<MaterialInfoMapper, Materia
 		List<MaterialInfo> materialInfos = getData(importExcel,projectName);   //sheet页数据
 //		List<MaterialInfo> list = replaceDate(materialInfos);          //对比替换数据
 		List<MaterialInfo> list = getNewData(materialInfos);      //合并后数据
-//		List<MaterialInfo> standardList = materialInfoMapper.findSat(batch);     //标准库数据
-//		List<MaterialInfo> newList = compareData(list1,standardList);    //比对之后的数据
-		saveList(list);
+		List<MaterialInfo> standardList = materialInfoMapper.findSat(batch);     //标准库数据
+		List<MaterialInfo> newList = compareData(list,standardList);    //比对之后的数据
+		saveList(newList);
 		MaterialProject materialProject = new MaterialProject();
 		materialProject.setReserveProjectName(projectName);
 		materialProject.setSuppliesBatch(batch);
-		materialProject.setProjectBatch("2");
+		materialProject.setProjectBatch(itemBatch);
         materialProjectService.save(materialProject);
 	}
 

+ 74 - 6
src/main/java/com/jeeplus/modules/sg/managementcenter/materialinfo/web/MaterialInfoController.java

@@ -149,9 +149,10 @@ public class MaterialInfoController extends BaseController {
     @RequestMapping(value = "import")
    	public AjaxJson importFile(@RequestParam("file")MultipartFile file, HttpServletResponse response, HttpServletRequest request) {
 		String batch = request.getParameter("batch");
+		String itemBatch = request.getParameter("itemBatch");
 		AjaxJson j = new AjaxJson();
 		try {
-			materialInfoService.export(file,batch);
+			materialInfoService.export(file,batch,itemBatch);
 			j.setMsg("导入成功");
 		} catch (Exception e) {
 			j.setSuccess(false);
@@ -161,15 +162,37 @@ public class MaterialInfoController extends BaseController {
     }
 
 
+    /**
+     * 多文件导入
+     */
+    @ResponseBody
+    @RequiresPermissions("managementcenter:materialinfo:import")
+    @RequestMapping(value = "imports")
+    public AjaxJson importFile(@RequestParam("file")MultipartFile[] file, HttpServletResponse response, HttpServletRequest request) {
+        String batch = request.getParameter("batch");
+        String itemBatch = request.getParameter("itemBatch");
+        AjaxJson j = new AjaxJson();
+        try {
+            for(int i=0;i<file.length;i++) {
+                materialInfoService.export(file[i], batch,itemBatch);
+            }
+            j.setMsg("导入成功");
+        } catch (Exception e) {
+            j.setSuccess(false);
+            j.setMsg("导入失败!失败信息:"+e.getMessage());
+        }
+        return j;
+    }
 
-	/**
+
+    /**
 	 * 导入文件页面
 	 * @return
 	 */
 	@RequestMapping(value = "importExcel")
 	public String importExcel(Model model) {
-//		List<MaterialProject> list = materialProjectService.findBatch();
-//		model.addAttribute("batch",list);
+		List<MaterialProject> list = materialProjectService.findBatch();
+		model.addAttribute("batch",list);
 		return "modules/sg/managementcenter/materialinfo/importexcel";
 	}
 
@@ -179,10 +202,15 @@ public class MaterialInfoController extends BaseController {
 	 */
 	@RequestMapping(value = "/importMore/Form")
 	public String importMoreForm(Model model){
+		List<MaterialProject> list = materialProjectService.findBatch();
+		model.addAttribute("batch",list);
 		return "modules/sg/managementcenter/materialinfo/importmore";
 	}
 
 
+
+
+
 	/**
 	 * 项目验证
 	 * @param file
@@ -194,7 +222,7 @@ public class MaterialInfoController extends BaseController {
 
 	@ResponseBody
 	@RequestMapping(value = "importValidation")
-	public AjaxJson importValidation(@RequestParam("file")MultipartFile file,String batch) throws IOException, InvalidFormatException {
+	public AjaxJson importValidation(@RequestParam("file")MultipartFile file,String batch,String itemBatch){
 		AjaxJson j = new AjaxJson();
 		try {
 		ImportExcel mo = new ImportExcel(file,1,"模块表");
@@ -207,7 +235,7 @@ public class MaterialInfoController extends BaseController {
 		if(list != null && list.size()>0){
 			j.setSuccess(true);
 		}else {
-			materialInfoService.export(file,batch);
+			materialInfoService.export(file,batch,itemBatch);
 			j.setSuccess(true);
 			j.setErrorCode("0");
 			j.setMsg("导入成功");
@@ -220,6 +248,46 @@ public class MaterialInfoController extends BaseController {
 	}
 
 
+    /**
+     * 多文件验证
+     */
+    @ResponseBody
+    @RequestMapping(value = "importValidations")
+    public AjaxJson importValidations(@RequestParam("file")MultipartFile[] file,String batch,String itemBatch){
+        AjaxJson j = new AjaxJson();
+        List<MaterialProject> materialProjects = new ArrayList<>();
+        try {
+            for(int i = 0;i<file.length;i++) {
+                ImportExcel mo = new ImportExcel(file[i], 1, "模块表");
+                Row row = mo.getRow(0);
+                String projectName1 = (String) mo.getCellValue(row, 1);
+                String projectName = projectName1.trim();
+                MaterialProject materialProject = new MaterialProject();
+                materialProject.setReserveProjectName(projectName);
+                materialProjects.add(materialProject);
+            }
+            List<MaterialProject> list = materialProjectService.findByList(materialProjects);
+            if(list != null && list.size()>0){
+            	StringBuilder stringBuilder = new StringBuilder();
+            	for(MaterialProject materialProject : list){
+            		stringBuilder.append(materialProject.getReserveProjectName()+",");
+				}
+            	j.setMsg(stringBuilder.toString());
+                j.setSuccess(true);
+            }else {
+                for(int k=0;k<file.length;k++) {
+                    materialInfoService.export(file[k], batch,itemBatch);
+                }
+                j.setSuccess(true);
+                j.setErrorCode("0");
+                j.setMsg("导入成功");
+            }
+        } catch (Exception e) {
+            j.setSuccess(false);
+            j.setMsg("导入失败!失败信息:"+e.getMessage());
+        }
+        return j;
+    }
 
 
 

+ 1 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/materialproject/mapper/MaterialProjectMapper.java

@@ -14,5 +14,6 @@ import java.util.List;
 @MyBatisMapper
 public interface MaterialProjectMapper extends BaseMapper<MaterialProject> {
     List<MaterialProject> findBatch();
+    List<MaterialProject> findByList(@Param("list") List<MaterialProject> list);
 
 }

+ 12 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/materialproject/mapper/xml/MaterialProjectMapper.xml

@@ -70,6 +70,18 @@
 			</otherwise>
 		</choose>
 	</select>
+
+	<select id="findByList" resultType="MaterialProject">
+		SELECT
+		<include refid="infoColumns"/>
+		FROM xm_material_project a
+		<where>
+			a.reserve_project_name in
+			<foreach collection="list" item="item" open="(" close=")" separator=",">
+				#{item.reserveProjectName}
+			</foreach>
+		</where>
+	</select>
 	
 	<select id="findAllList" resultType="MaterialProject" >
 		SELECT 

+ 4 - 0
src/main/java/com/jeeplus/modules/sg/managementcenter/materialproject/service/MaterialProjectService.java

@@ -34,6 +34,10 @@ public class MaterialProjectService extends CrudService<MaterialProjectMapper, M
 	public List<MaterialProject> findBatch(){
 		return materialProjectMapper.findBatch();
 	}
+
+	public List<MaterialProject> findByList(List<MaterialProject> list){
+		return materialProjectMapper.findByList(list);
+	}
 	
 	public Page<MaterialProject> findPage(Page<MaterialProject> page, MaterialProject materialProject) {
 		return super.findPage(page, materialProject);

+ 31 - 2
src/main/webapp/webpage/modules/sg/managementcenter/materialinfo/importexcel.jsp

@@ -7,6 +7,21 @@
     <script>
         function importExcel(url, fn) {
             var importForm =$("#importForm")[0];
+            var file = $("#uploadFile").val();
+            var itemBatch = $("#itemBatch").val();
+            var suppliesBatch = $("#suppliesBatch").val();
+            if(file.length === 0){
+                layer.msg("请选择文件",{icon: 3,offset:['40%','40%']});
+                return false;
+            }
+            if(itemBatch == null || itemBatch === ''){
+                layer.msg("请输入项目批次",{icon: 3,offset:['40%','40%']});
+                return false;
+            }
+            if(suppliesBatch == null || suppliesBatch === ''){
+                layer.msg("请选择物料批次",{icon: 3,offset:['40%','40%']});
+                return false;
+            }
             jp.loading('  正在导入,请稍等...');
             // jp.uploadFile(importForm, url,function (data) {
             //    fn(data);
@@ -25,6 +40,7 @@
                     success: function (result) {
                         if(result.success && result.errorCode === '-1'){
                             jp.confirm('该项目已存在,确定覆盖嘛?', function(){
+                                jp.loading('  正在导入,请稍等...');
                                 $.ajax({
                                     type: "POST",
                                     enctype: 'multipart/form-data',
@@ -80,9 +96,22 @@
         <div id="importBox" >
             <form id="importForm" action="${url}" method="post" enctype="multipart/form-data"
                   style="padding-left:20px;text-align:center;" onsubmit="loading('正在导入,请稍等...');">
+                <div>
+                    <label class="label-item single-overflow pull-left" title="选择文件:">选择文件:</label>
                 <input id="uploadFile" name="file" type="file" class="form-control" style="width:300px"/>
-                <br/>
-                导入文件不能超过5M,仅允许导入“xls”或“xlsx”格式文件!  
+                </div>
+                <div style="margin-top: 4px;">
+                    <label class="label-item single-overflow pull-left" title="项目批次:">项目批次:</label>
+                    <input id="itemBatch" name="itemBatch" type="text" class="form-control" style="width:300px"/>
+                </div>
+                <div style="margin-top: 4px;">
+                    <label class="label-item single-overflow pull-left" title="物料批次:">物料批次:</label>
+                <select name="batch"  class="form-control   simple-select" id="suppliesBatch" style="width:300px"/>
+                    <c:forEach var="item" items="${batch}">
+                        <option value="${item.suppliesBatch}" label="${item.suppliesBatch}"></option>
+                    </c:forEach>
+                </select>
+                </div> 
 
             </form>
         </div>

+ 261 - 0
src/main/webapp/webpage/modules/sg/managementcenter/materialinfo/importmore.jsp

@@ -0,0 +1,261 @@
+<%@ page contentType="text/html;charset=UTF-8"%>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<link rel="stylesheet" href="${ctxStatic}/plugin/layui/dist/css/layui.css">
+<script src="${pageContext.request.contextPath}/act/rest/js/common/jquery-1.8.3.js"></script>
+<script src="${ctxStatic}/plugin/layui/dist/layui.js"></script>
+<script src="${ctxStatic}/common/js/jeeplus.js"></script>
+
+<html>
+<head>
+    <title>添加</title>
+    <meta http-equiv=Content-Type content=“text/html;charset=utf-8″>
+    <meta http-equiv=X-UA-Compatible content=IE=EmulateIE7>
+    <meta name="renderer" content="webkit">
+    <style>
+        .layui-input{ height: 28px;margin-top: 6px;line-height: 28px}
+        .layui-table-view .layui-table {width:100%}
+        .myselect{border: none;padding: 5px 7px;min-height: 20px;color: #666666;line-height: 20px}
+        .mydiv{padding: 5px 7px;min-height: 20px;border: whitesmoke;line-height: 20px}
+        .mydiv:empty:before{content: attr(placeholder);color:#999999;}
+        .mydiv:focus:before{content:none}
+        .layui-table-tips-main{display:none}
+        .layui-table-tips-c{display:none}
+    </style>
+</head>
+<body style="height: 100%;line-height: 100%">
+<div style="padding: 10px; background-color: #F2F2F2;">
+    <div class="layui-main-bgc">
+        <div class="layui-row layui-col-space15">
+            <div class="layui-col-md12">
+                <div class="layui-card">
+                        <div class="layui-card-body" style="margin-top: 2px;">
+                            <form>
+                            <div class="layui-form-item">
+                                <div class="layui-inline">
+                                    <label class="layui-form-label" style="width: 100px;">*项目批次</label>
+                                    <div class="layui-input-inline">
+                                        <input type="text" id="myinput" autocomplete="off" placeholder=""  class="layui-input">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">*物料批次</label>
+                                    <%--<div class="layui-input-inline">--%>
+                                    <select name="suppliesBatch"  id="suppliesBatch">
+                                        <c:forEach var="item" items="${batch}">
+                                            <option value="${item.suppliesBatch}" label="${item.suppliesBatch}"></option>
+                                        </c:forEach>
+                                    </select>
+                                    <%--</div>--%>
+                                </div>
+                            </div>
+                            </form>
+                            <div class="layui-upload">
+                                <button type="button" class="layui-btn layui-btn-normal" id="add_List">添加文件</button>
+                                <div class="layui-upload-list">
+                                        <table class="layui-table" id="mytable">
+                                        <thead>
+                                        <tr>
+                                            <th width="45%">*文件名称</th>
+                                            <%--<th width="17%">*项目类型</th>--%>
+                                            <%--<th width="25%">*结算书编号</th>--%>
+                                            <%--<th width="33%">*供应商</th>--%>
+                                            <th width="22%" style="text-align: center">操作</th>
+                                        </tr></thead>
+                                        <tbody id="tbody_List">
+
+                                        </tbody>
+                                    </table>
+                                </div>
+                             <%--<div style="margin-top: 20px">--%>
+                                <%--<button id="mybtn" type="button" class="layui-btn" style="width: 70px;" onclick="okSubmit()">确定</button>--%>
+                            <%--</div>--%>
+                        </div>
+                    </div>
+                </div>
+             </div>
+        </div>
+    </div>
+</div>
+</body>
+<script type="text/javascript">
+    /*//定义存放文件数组*/
+    var arrayFile=[];
+    /*加载layui文件上传*/
+    layui.use('upload', function(){
+        var $ = layui.jquery
+            ,upload = layui.upload;
+        //多文件列表示例
+        var tbodyListView = $('#tbody_List')
+            ,uploadListIns = upload.render({
+            elem: '#add_List'
+            ,accept: 'file'
+            ,exts:'xls|xlsx'
+            ,multiple: true
+            ,auto: false
+            ,choose: function(obj){
+                // var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
+                //读取本地文件
+                obj.preview(function(index, file, result){
+                    //添加 id 到数组
+                    arrayFile.push(index);
+                    //添加文件到数组
+                    arrayFile.push(file);
+                    //拼接生成表格
+                    var tr = $(['<tr id='+index+'>'
+                        ,'<td hidden><div class="td_id">'+index+'</div></td>'
+                        ,'<td><div contenteditable="true" class="mydiv1 mydiv" placeholder="请输入项目名称">'+file.name.split(".")[0]+'</div></td>'
+                        // ,'<td>'
+                        // ,' <select name="type" class="myselect"><option value="">请选择项目类型</option><option value="1">架空线路工程</option><option value="2">电缆工程</option><option value="3">变电站工程</option></select>'
+                        // ,'<td><div contenteditable="true" class="mydiv2 mydiv" placeholder="请输入项目编号"></div></td>'
+                        // ,'<td><div contenteditable="true" class="mydiv3 mydiv" placeholder="请输入供应商"></div></td>'
+                        ,'<td style="text-align: center">'
+                        ,'<button class="layui-btn layui-btn-xs layui-btn-danger demo-delete">删除</button>'
+                        ,'</td>'
+                        ,'</tr>'].join(''));
+                    //删除
+                    tr.find('.demo-delete').on('click', function(){
+                        // delete files[index]; //删除对应的文件
+                        tr.remove();//删除tr
+                        //清空input file当中已经存在文件
+                        uploadListIns.config.elem.next()[0].value = '';
+                    });
+
+                    tbodyListView.append(tr);
+                    //清空input file当中已经存在文件
+                    uploadListIns.config.elem.next()[0].value = '';
+                });
+            }
+        });
+    });
+
+    function importExcel(url, fn) {
+        var formdata = new FormData();
+
+        // 获取表格id的值
+        var itemBatch = $("#myinput").val();
+        var suppliesBatch = $("#suppliesBatch").val();
+        var file = $(":file").val;
+
+
+        //获取输入的项目名称
+        var div1 =  $(".mydiv1");
+
+        //判断列表中项目名称是否为空
+        if (div1.length<=0){
+            layer.msg("请选择文件",{icon: 3,offset:['40%','40%']});
+            return false;
+        }
+        //存储列表中 输入项目名称的值
+        var divvalue=[];
+        //存储列表中 输入项目名称的值
+        var div_val=[];
+        //循环获取当前项目列表的项目名称
+
+        for (var i = 0; i < div1.length; i++) {
+            //存放到集合当中
+            divvalue[i]=div1[i].innerHTML;
+            div_val[i]=div1[i].innerHTML;
+        }
+        //判断项目名称是否重复
+        for (var i = 0; i < divvalue.length; i++) {
+            if (divvalue[i] === ""||divvalue[i]==null){
+                layer.msg("请选择文件",{icon: 3,offset:['40%','40%']});
+                throw SyntaxError;
+            }
+            if(div_val[i] === divvalue[i+1]){
+                layer.msg("选择文件重复",{icon: 5,offset:['40%','40%']});
+                throw SyntaxError;
+            }
+        }
+        // if(file.length === 0){
+        //     layer.msg("请选择文件",{icon: 3,offset:['40%','40%']});
+        //     return false;
+        // }
+        if(itemBatch == null || itemBatch === ''){
+            layer.msg("请输入项目批次",{icon: 3,offset:['40%','40%']});
+            return false;
+        }
+        var td_id=document.getElementsByClassName("td_id");
+        //存放id的数组
+        var array_id = [];
+        //循环遍历id
+        for (var i = 0; i < td_id.length; i++) {
+            array_id[i]=td_id[i].innerHTML;
+        }
+        //根据id获取对象文件传入后台
+        for (var i = 0; i < array_id.length; i++) {
+            for (var j = 0; j < arrayFile.length; j++) {
+                if (array_id[i]==arrayFile[j]){
+                    //追加文件到表单当中
+                    formdata.append("file",arrayFile[j+1]);
+                }
+            }
+        }
+        formdata.append("itemBatch",itemBatch);
+
+        jp.loading('  正在导入,请稍等...');
+        $.ajax({
+            type: "POST",
+            enctype: 'multipart/form-data',
+            url: url,
+            data: formdata,
+            processData: false, //prevent jQuery from automatically transforming the data into a query string
+            contentType: false,
+            cache: false,
+            timeout: 600000,
+            success: function (result) {
+                if(result.success && result.errorCode === '-1'){
+                    jp.confirm('项目'+result.msg+'已存在,确定覆盖嘛?', function(){
+                        jp.loading('  正在导入,请稍等...');
+                        $.ajax({
+                            type: "POST",
+                            enctype: 'multipart/form-data',
+                            url: '${ctx}/managementcenter/materialinfo/imports',
+                            data: formdata,
+                            processData: false, //prevent jQuery from automatically transforming the data into a query string
+                            contentType: false,
+                            cache: false,
+                            timeout: 600000,
+                            success: function (result) {
+                                fn(result);
+                            }
+                        })
+                    });
+                }else if((result.success && result.errorCode === '0')){
+                    fn(result)
+                }
+                // fn(result);
+            },
+            error:function(xhr, textStatus){
+                if(xhr.status == 0){
+                    jp.info("连接失败,请检查网络!")
+                }else if(xhr.status == 404){
+                    var errDetail ="<font color='red'>404,请求地址不存在!</font>";
+                    top.layer.alert(errDetail , {
+                        icon: 2,
+                        area:['auto','auto'],
+                        title:"请求出错"
+                    })
+                }else if(xhr.status && xhr.responseText){
+                    var errDetail ="<font color='red'>"+ xhr.responseText.replace(/[\r\n]/g,"<br>").replace(/[\r]/g,"<br>").replace(/[\n]/g,"<br>")+"</font>";
+                    top.layer.alert(errDetail , {
+                        icon: 2,
+                        area:['80%','70%'],
+                        title:xhr.status+"错误"
+                    })
+                }else{
+                    var errDetail =xhr.responseText=="<font color='red'>未知错误!</font>";
+                    top.layer.alert(errDetail , {
+                        icon: 2,
+                        area:['auto','auto'],
+                        title:"真悲剧,后台抛出异常了"
+                    })
+                }
+
+            }
+        })
+
+    }
+
+</script>
+</html>

+ 48 - 2
src/main/webapp/webpage/modules/sg/managementcenter/materialinfo/materialInfoList.js

@@ -74,9 +74,11 @@ $(document).ready(function() {
                       
                    } 
                },
-              
                onClickRow: function(row, $el){
                },
+               onLoadSuccess: function (row) {  //加载成功时执行
+                   getTdValue();
+               },
                	onShowSearch: function () {
 			$("#search-collapse").slideToggle();
 		},
@@ -121,6 +123,11 @@ $(document).ready(function() {
                        field: 'note',
                        title: '备注'
                    }
+               ,{
+                       field: 'state',
+                       title : '状态'
+                   }
+
 		     ]
 		
 		});
@@ -141,7 +148,7 @@ $(document).ready(function() {
     $("#btnImport").click(function(){
              jp.open({
                        type: 2,
-                       area: [500, 200],
+                       area: [500, 300],
                        auto: true,
                        title:"导入数据",
                        // content: "${ctx}/managementcenter/materialinfo/importExcel" ,
@@ -166,6 +173,35 @@ $(document).ready(function() {
                       }
                    });
              });
+
+
+    $("#moreImport").click(function(){
+         jp.open({
+                      type: 2,
+                      area: [800, 400],
+                      auto: true,
+                      title:"导入数据",
+                       content: "${ctx}/managementcenter/materialinfo/importMore/Form" ,
+                       btn: ['确定', '关闭'],
+                      btn1: function(index, layero){
+                      var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
+                      iframeWin.contentWindow.importExcel('${ctx}/managementcenter/materialinfo/importValidations', function (data) {
+                      if(data.success){
+                           jp.success(data.msg);
+                            refresh();
+                      }else{
+                           jp.error(data.msg);
+                      }
+                      jp.close(index);
+                   });//调用保存事件
+                return false;
+          },
+
+                     btn2: function(index){
+                         jp.close(index);
+                      }
+                  });
+               });
 		
 		
 	 $("#export").click(function(){//导出Excel文件
@@ -194,6 +230,16 @@ $(document).ready(function() {
             return row.id
         });
     }
+
+    function getTdValue(){
+            var tableId = document.getElementById("dataTable");
+             // for(var i = 1;i < tableId.rows.length;i++) {
+             //     if(tableId.rows[i].cells[11].innerHTML.indexOf("1") != -1 ){
+             //       tableId.rows[i].setAttribute("style","background: #bfbfff;");
+             //       }
+             // }
+    }
+
   
   function deleteAll(){
 

+ 5 - 5
src/main/webapp/webpage/modules/sg/managementcenter/materialinfo/materialInfoList.jsp

@@ -83,11 +83,11 @@
 		<shiro:hasPermission name="managementcenter:materialinfo:import">
 			<button id="btnImport" class="btn btn-info"><i class="fa fa-folder-open-o"></i> 导入</button>
 		</shiro:hasPermission>
-			<%--<shiro:hasPermission name="managementcenter:materialinfo:export">--%>
-	        		<%--<button id="export" class="btn btn-warning">--%>
-					<%--<i class="fa fa-file-excel-o"></i> 导出--%>
-				<%--</button>--%>
-			 <%--</shiro:hasPermission>--%>
+			<shiro:hasPermission name="managementcenter:materialinfo:import">
+	        		<button id="moreImport" class="btn btn-warning">
+					<i class="fa fa-file-excel-o"></i> 多文件导入
+				</button>
+			 </shiro:hasPermission>
 	                 <%--<shiro:hasPermission name="managementcenter:materialinfo:view">--%>
 				<%--<button id="view" class="btn btn-default" disabled onclick="view()">--%>
 					<%--<i class="fa fa-search-plus"></i> 查看--%>

+ 10 - 10
src/main/webapp/webpage/modules/sg/managementcenter/materialproject/materialProjectForm.jsp

@@ -76,16 +76,16 @@
 					<td class="width-35">
 						<form:input path="projectBatch" htmlEscape="false"    class="form-control required"/>
 					</td>
-					<%--<td class="width-15 active"><label class="pull-right">物料批次:</label></td>--%>
-					<%--<td class="width-35">--%>
-						<%--&lt;%&ndash;<form:input path="suppliesBatch" htmlEscape="false"    class="form-control required"/>&ndash;%&gt;--%>
-						<%--<form:select path="suppliesBatch"  class="form-control   simple-select">--%>
-							<%--<form:option value="" label=""/>--%>
-							<%--<c:forEach var="item" items="${batch}">--%>
-								<%--<form:option value="${item.suppliesBatch}" label="${item.suppliesBatch}"/>--%>
-							<%--</c:forEach>--%>
-						<%--</form:select>--%>
-					<%--</td>--%>
+					<td class="width-15 active"><label class="pull-right">物料批次:</label></td>
+					<td class="width-35">
+						<%--<form:input path="suppliesBatch" htmlEscape="false"    class="form-control required"/>--%>
+						<form:select path="suppliesBatch"  class="form-control   simple-select">
+							<form:option value="" label=""/>
+							<c:forEach var="item" items="${batch}">
+								<form:option value="${item.suppliesBatch}" label="${item.suppliesBatch}"/>
+							</c:forEach>
+						</form:select>
+					</td>
 				</tr>
 		 	</tbody>
 		</table>

+ 4 - 4
src/main/webapp/webpage/modules/sg/managementcenter/materialproject/materialProjectList.js

@@ -127,10 +127,10 @@ $(document).ready(function() {
 					   field: 'projectBatch',
 					   title: '项目批次'
                }
-              // ,{
-              //          field: 'suppliesBatch',
-              //          title: '物资批次'
-              //      }
+              ,{
+                       field: 'suppliesBatch',
+                       title: '物资批次'
+                   }
 		     ]
 		
 		});

+ 1 - 1
src/main/webapp/webpage/modules/sg/managementcenter/materialproject/materialProjectList.jsp

@@ -50,7 +50,7 @@
 					<form:input path="projectBatch" htmlEscape="false" maxlength="64"  class=" form-control" id="bat"/>
 				</div>
 				<div class="col-xs-12 col-sm-6 col-md-4">
-					<label class="label-item single-overflow pull-left" title="项目批次:">物料批次:</label>
+					<label class="label-item single-overflow pull-left" title="物料批次:">物料批次:</label>
 					<form:input path="suppliesBatch" htmlEscape="false" maxlength="64"  class=" form-control"/>
 				</div>
 		 <div class="col-xs-12 col-sm-6 col-md-4">