xs 5 år sedan
förälder
incheckning
92bf79b3f7

+ 20 - 13
src/main/java/com/jeeplus/modules/sg/managementcenter/materialplan/entity/MaterialPlan.java

@@ -1,6 +1,7 @@
 package com.jeeplus.modules.sg.managementcenter.materialplan.entity;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.jeeplus.common.utils.excel.annotation.ExcelField;
 import com.jeeplus.core.persistence.DataEntity;
 
 import java.util.Date;
@@ -23,6 +24,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     private String numberFrozen;//冻结数量
     private String supplierName;//供应商名称
 
+    @ExcelField(title="物资唯一码", align=2, sort=1)
     public String getUniqueCode() {
         return uniqueCode;
     }
@@ -30,7 +32,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     public void setUniqueCode(String uniqueCode) {
         this.uniqueCode = uniqueCode;
     }
-
+    @ExcelField(title="需求物资编码", align=2, sort=2)
     public String getRequireCoding() {
         return requireCoding;
     }
@@ -38,7 +40,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     public void setRequireCoding(String requireCoding) {
         this.requireCoding = requireCoding;
     }
-
+    @ExcelField(title="物料描述", align=2, sort=3)
     public String getDescription() {
         return description;
     }
@@ -46,7 +48,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     public void setDescription(String description) {
         this.description = description;
     }
-
+    @ExcelField(title="物料扩展编码", align=2, sort=4)
     public String getExpansionCode() {
         return expansionCode;
     }
@@ -54,7 +56,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     public void setExpansionCode(String expansionCode) {
         this.expansionCode = expansionCode;
     }
-
+    @ExcelField(title="物料扩展描述", align=2, sort=5)
     public String getExpansionDescription() {
         return expansionDescription;
     }
@@ -62,7 +64,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     public void setExpansionDescription(String expansionDescription) {
         this.expansionDescription = expansionDescription;
     }
-
+    @ExcelField(title="大类描述", align=2, sort=6)
     public String getBigDescribe() {
         return bigDescribe;
     }
@@ -70,7 +72,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     public void setBigDescribe(String bigDescribe) {
         this.bigDescribe = bigDescribe;
     }
-
+    @ExcelField(title="中类描述", align=2, sort=7)
     public String getModerateDescribe() {
         return moderateDescribe;
     }
@@ -78,7 +80,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     public void setModerateDescribe(String moderateDescribe) {
         this.moderateDescribe = moderateDescribe;
     }
-
+    @ExcelField(title="小类描述", align=2, sort=8)
     public String getSmallDescribe() {
         return smallDescribe;
     }
@@ -86,7 +88,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     public void setSmallDescribe(String smallDescribe) {
         this.smallDescribe = smallDescribe;
     }
-
+    @ExcelField(title="需求数量", align=2, sort=9)
     public String getRequireNumber() {
         return requireNumber;
     }
@@ -94,7 +96,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     public void setRequireNumber(String requireNumber) {
         this.requireNumber = requireNumber;
     }
-
+    @ExcelField(title="单位", align=2, sort=10)
     public String getUtil() {
         return util;
     }
@@ -102,7 +104,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     public void setUtil(String util) {
         this.util = util;
     }
-
+    @ExcelField(title="计划批次", align=2, sort=11)
     public String getPlanToBatch() {
         return planToBatch;
     }
@@ -110,15 +112,16 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     public void setPlanToBatch(String planToBatch) {
         this.planToBatch = planToBatch;
     }
-    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ExcelField(title="供货计划到日", align=2, sort=12)
+    @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss")
     public Date getDeliverySchedule() {
         return deliverySchedule;
     }
-    @JsonFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "YYYY-MM-DD HH:mm:ss")
     public void setDeliverySchedule(Date deliverySchedule) {
         this.deliverySchedule = deliverySchedule;
     }
-
+    @ExcelField(title="是否入库", align=2, sort=13)
     public String getFlagStorage() {
         return flagStorage;
     }
@@ -126,6 +129,8 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
     public void setFlagStorage(String flagStorage) {
         this.flagStorage = flagStorage;
     }
+
+    @ExcelField(title="库存数量", align=2, sort=14)
     public String getInventoryQuantity() {
         return inventoryQuantity;
     }
@@ -133,6 +138,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
         this.inventoryQuantity = inventoryQuantity;
     }
 
+    @ExcelField(title="冻结数量", align=2, sort=15)
     public String getNumberFrozen() {
         return numberFrozen;
     }
@@ -141,6 +147,7 @@ public class MaterialPlan extends DataEntity<MaterialPlan> {
         this.numberFrozen = numberFrozen;
     }
 
+    @ExcelField(title="供应商名称", align=2, sort=16)
     public String getSupplierName() {
         return supplierName;
     }

+ 31 - 17
src/main/webapp/webpage/modules/sg/managementcenter/materialplan/materialplanList.js

@@ -86,6 +86,7 @@ $(document).ready(function() {
 			,{
 		        field: 'uniqueCode',
 		        title: '物资唯一码(批次编码)',
+                       width:200,
 		        sortName: 'uniqueCode'
 		        ,formatter:function(value, row , index){
 
@@ -110,87 +111,100 @@ $(document).ready(function() {
 			,{
 		        field: 'requireCoding',
 		        title: '需求物资编码',
+				width:200,
 		        sortName: 'requireCoding'
 		       
 		    }
 			,{
 		        field: 'description',
 		        title: '物料描述',
+                width:200,
 		        sortName: 'description'
 		       
 		    }
 			,{
 		        field: 'expansionCode',
 		        title: '物料扩展编码',
+					   width:200,
 		        sortName: 'expansionCode'
-		       
 		    }
 			,{
 		        field: 'expansionDescription',
 		        title: '物料扩展描述',
+                width:200,
 		        sortName: 'expansionDescription'
-		       
+
 		    }
                    ,{
                        field: 'bigDescribe',
                        title: '大类描述',
+                       width:200,
                        sortName: 'bigDescribe'
 
                    }
                    ,{
                        field: 'moderateDescribe',
                        title: '中类描述',
+                       width:200,
                        sortName: 'moderateDescribe'
 
                    }
                    ,{
                        field: 'smallDescribe',
                        title: '小类描述',
+                       width:200,
                        sortName: 'smallDescribe'
 
                    }
                    ,{
                        field: 'requireNumber',
                        title: '需求数量',
+                       width:200,
                        sortName: 'requireNumber'
-
                    }
                    ,{
                        field: 'util',
                        title: '单位',
+                       width:200,
                        sortName: 'util'
 
                    }
                    ,{
                        field: 'planToBatch',
                        title: '计划批次',
+                       width:200,
                        sortName: 'planToBatch'
 
                    }
                    ,{
                        field: 'deliverySchedule',
                        title: '供货计划到日',
+					   width:230,
                        sortName: 'deliverySchedule',
-                       // formatter: getTime
+                       formatter: getTime
                    }
                    ,{
                        field: 'flagStorage',
                        title: '是否入库',
+                       width:200,
                        sortName: 'flagStorage'
                    }
                    ,{
                        field: 'inventoryQuantity',
                        title: '库存数量',
+                       width:200,
                        sortName: 'inventoryQuantity'
                    }
                    ,{
                        field: 'numberFrozen',
                        title: '冻结数量',
+                       width:200,
                        sortName: 'numberFrozen'
                    }
                    ,{
                        field: 'supplierName',
                        title: '供应商名称',
+                       width:200,
                        sortName: 'supplierName'
                    }
 		     ]
@@ -198,7 +212,7 @@ $(document).ready(function() {
 		});
 		function getTime(value, row, index) {
 			return [
-				"<div class='input-group form_datetime' id='deliverySchedule'> <input type='text'  name='deliverySchedule' class='form-control required'  value=''/> <span class='input-group-addon'> <span class='glyphicon glyphicon-calendar'></span> </span></div>" ,
+				"<div class='input-group form_datetime deliverySchedule' onclick="+"listDate()"+"> <input type='text' id="+row.uniqueCode+" name='deliverySchedule' class='form-control required'  value=''/> <span class='input-group-addon'> <span class='glyphicon glyphicon-calendar'></span> </span></div>" ,
 			].join('');
 		}
 
@@ -259,7 +273,7 @@ $(document).ready(function() {
 		  $('#materialPlanTable').bootstrapTable('refresh');
 		});
 		
-		$('#beginDate').datetimepicker({
+		$('.deliverySchedule').datetimepicker({
 			 format: "YYYY-MM-DD HH:mm:ss"
 		});
 		$('#endBeginDate').datetimepicker({
@@ -279,17 +293,17 @@ $(document).ready(function() {
   
   function deleteAll(){
 		jp.confirm('确认要删除该项目管理表单记录吗?', function(){
-			jp.loading();  	
-			jp.get("${ctx}/sg/managementcenter/materialplan/deleteAll?ids=" + getIdSelections(), function(data){
-         	  		if(data.success){
-         	  			$('#materialPlanTable').bootstrapTable('refresh');
-         	  			jp.success(data.msg);
-         	  		}else{
-         	  			jp.error(data.msg);
-         	  		}
-         	  	})
-          	   
-		})
+          jp.loading();
+          jp.get("${ctx}/sg/managementcenter/materialplan/deleteAll?ids=" + getIdSelections(), function(data){
+              if(data.success){
+                  $('#materialPlanTable').bootstrapTable('refresh');
+                  jp.success(data.msg);
+              }else{
+                  jp.error(data.msg);
+              }
+          })
+
+      })
   }
 
     //刷新列表

+ 13 - 12
src/main/webapp/webpage/modules/sg/managementcenter/materialplan/materialplanList.jsp

@@ -9,16 +9,6 @@
 	<%@include file="/webpage/include/treeview.jsp" %>
 	<%@include file="materialplanList.js" %>
 </head>
-<script>
-    $(document).ready(function() {
-        $('#beginDate').datetimepicker({
-            format: "YYYY-MM-DD HH:mm:ss"
-        });
-        $('#endDate').datetimepicker({
-            format: "YYYY-MM-DD HH:mm:ss"
-        });
-    });
-</script>
 <body>
 	<div class="wrapper wrapper-content">
 	<div class="panel panel-primary">
@@ -75,9 +65,20 @@
 				</button>
 			<%--</shiro:hasPermission>--%>
 		    </div>
-		
 	<!-- 表格 -->
-	<table id="materialPlanTable"   data-toolbar="#toolbar"></table>
+	<table id="materialPlanTable" style="table-layout:fixed"  data-toolbar="#toolbar"></table>
+		<script>
+			function listDate() {
+                $('.deliverySchedule').datetimepicker({
+                    format: "YYYY-MM-DD HH:mm:ss"
+                });
+
+                // jp.confirm('确认要删除该项目管理表单记录吗?', function(){
+                //     jp.loading();
+				//
+                // })
+            }
+		</script>
 
     <!-- context menu -->
     <ul id="context-menu" class="dropdown-menu">