tntdc 3 лет назад
Родитель
Сommit
78314f5d5f

+ 8 - 2
adm/src/main/java/com/minpay/guomao/ordermanage/action/OrderManageAction.java

@@ -1798,7 +1798,7 @@ public class OrderManageAction implements IMINAction {
 		}
 		Map<String, Object> map = new HashMap<String, Object>();
 		map.put("contractInfList", contractInfList);
-		map.put("dates", createTime);
+		map.put("createTime", createTime);
 		map.put("orderName",orderName);
 		map.put("htYue", htYue);
 		map.put("contractMonth", contractMonth);
@@ -1816,6 +1816,7 @@ public class OrderManageAction implements IMINAction {
 			map.put("orIdList", CommonUtil.listToStr4InSql(orIdList));
 		}
 		map.put("orderId", orderId);
+		map.put("dates", dates);
 		List<Map<String, String>> list = Service.lookup(IMINDataBaseService.class)
 				.getMybatisMapper(OrderManageMapper.class)
 				.queryOrder(map);
@@ -1829,12 +1830,17 @@ public class OrderManageAction implements IMINAction {
 		for (Map<String, String> map2 : list) {
 			orderIdList.add(map2.get("orderId"));
 		}
-		
+		// 订单创建时间
+		if(StringUtils.isNotEmpty(dates)) {
+			ApOrderInfExample orderInfExample = new ApOrderInfExample();
+			orderInfExample.createCriteria().andStateNotEqualTo("04").andBranchEqualTo(user.getBranchid()).andCreateTimeBetween(dates.substring(0, 8), dates.substring(11, 19));
+		}
 		// 区域查询
 		OwnApWarehouseInfExample warehouseInfExample = new OwnApWarehouseInfExample(user.getBranchid());
 		if (!CommonUtil.isEmpty(region)) {
 			warehouseInfExample.createCriteria().andRegionEqualTo(region);
 		}
+		
 		warehouseInfExample.branchIdQuery();
 		List<ApWarehouseInf> warehouseInfList = Service.lookup(IMINDataBaseService.class).selectByExample(ApWarehouseInfMapper.class, warehouseInfExample);
 		List<String>  warehouseInfId = new ArrayList<String>();

+ 4 - 1
adm/src/main/java/com/minpay/guomao/stockManage/WarehouseDistributionAction.java

@@ -405,7 +405,10 @@ public class WarehouseDistributionAction implements IMINAction {
 			String saleId = ((Map<String, String>)tableDataArray.get(0)).get("saleId");
 			for(int i = 0 ;i < tableDataArray.size();i++){
 				Map<String, String> map = (Map<String, String>) tableDataArray.get(i);
-				if(!saleId.equals(map.get("saleId"))) {
+				if(saleId == null && map.get("saleId") != null) {
+					throw new MINBusinessException("请选择相同的货源方!");
+				}
+				if(saleId != null && !saleId.equals(map.get("saleId"))) {
 					throw new MINBusinessException("请选择相同的货源方!");
 				}
 			}

+ 30 - 1
adm/src/main/webapp/admin/warehouseChargesManage/queryWareChargeByType.html

@@ -141,6 +141,7 @@
 		})
 	    var rowData = getTempVal("costMessage");
     	$("#awiName").val(rowData.awiName);
+    	
   		//回车搜索功能
     	$("input").keydown(function (e) {//当按下按键时
         	if (e.which == 13) {//.which属性判断按下的是哪个键,回车键的键位序号为13
@@ -150,6 +151,22 @@
 		var table;
 		var awiId = rowData.awiId;
 	    layui.use(['table','form'], function(){
+	    	// 产生日期初始化
+	    	var productionDate = getTempVal("productionDate");
+	    	if(!!productionDate) {
+				$("#startDate").val(productionDate);		
+	    	} else {
+	    		var date = new Date();
+	    		var startDate = '' + date.getFullYear();
+	    		startDate += (date.getMonth()+1)>=10?(date.getMonth()+1):('0'+(date.getMonth()+1));
+	    		startDate += "01" 
+	    		startDate += " - "; 
+	    		startDate += date.getFullYear();
+	    		startDate += (date.getMonth()+1)>=10?(date.getMonth()+1):('0'+(date.getMonth()+1));
+	    		startDate += "31";
+	    		$("#startDate").val(startDate);
+	    	}
+	    	
 	    	var form = layui.form;
 	    	initSelectb('state', "SETTLEMENT_TYPE", "state", '00', true);
 	    	form.render();
@@ -161,7 +178,7 @@
 		    	,limit:10
 		    	,url: 'WarehouseChargesManageAction/queryWareChargeByType' //数据接口
 		    	,method: 'post'
-		    	,where:{MINView:"JSON", awiId:awiId, state : "00"}
+		    	,where:{MINView:"JSON", awiId:awiId, state : "00", startDate: $("#startDate").val()}
 		    	,page: true //开启分页
 	    		,cols: [[//表头
 	    		      {type:'checkbox',title: '序号',width:"5%",fixed:'left'}    
@@ -241,6 +258,18 @@
 		
 		var cdId = $("#cdId").val();
 		var startDate = $("#startDate").val();
+		if(isEmpty(startDate)) {
+			var date = new Date();
+    		var startDate = '' + date.getFullYear();
+    		startDate += (date.getMonth()+1)>=10?(date.getMonth()+1):('0'+(date.getMonth()+1));
+    		startDate += "01" 
+    		startDate += " - "; 
+    		startDate += date.getFullYear();
+    		startDate += (date.getMonth()+1)>=10?(date.getMonth()+1):('0'+(date.getMonth()+1));
+    		startDate += "31";
+    		$("#startDate").val(startDate);
+		}
+		startDate = $("#startDate").val();
 		var entryTime = $("#entryTime").val();
 		var supplier = $("#supplier").val();
 		var detailIdStr = $("#detailIdStr").val();

+ 1 - 0
adm/src/main/webapp/admin/warehouseChargesManage/warehouseChargesManage.html

@@ -126,6 +126,7 @@
      	//查询详情
 		function showDetail(data) {
 		    setTempVal("costMessage", data);
+		    setTempVal("productionDate", $("#productionDate").val());
     	    openMainTabPageParent('080002-01', '详情', 'warehouseChargesManage/queryWareChargeByType.html?tabPageId=080002-01', '', '080002', null);	
       	}
       	//结算