Просмотр исходного кода

发运量增加客户,配货总量/明细添加配货时锁定客户

xuefy 1 год назад
Родитель
Сommit
b7896f4d4c

+ 12 - 0
adm/src/main/java/com/minpay/db/table/model/ApGiveOut.java

@@ -298,6 +298,8 @@ public class ApGiveOut extends AbstractMINBean {
      * @mbggenerated
      */
     private String contractMonth;
+    
+    private String cusId;
 
     /**
      * This method was generated by MyBatis Generator.
@@ -1186,4 +1188,14 @@ public class ApGiveOut extends AbstractMINBean {
     public void setContractMonth(String contractMonth) {
         this.contractMonth = contractMonth == null ? null : contractMonth.trim();
     }
+
+	public String getCusId() {
+		return cusId;
+	}
+
+	public void setCusId(String cusId) {
+		this.cusId = cusId;
+	}
+    
+    
 }

+ 13 - 1
adm/src/main/java/com/minpay/db/table/model/ApWarehouseDetail.java

@@ -378,8 +378,12 @@ public class ApWarehouseDetail extends AbstractMINBean {
      * @mbggenerated
      */
     private String receiptTotal;
+    
+    private String awdCustomerId;
 
-    /**
+   
+
+	/**
      * This method was generated by MyBatis Generator.
      * This method returns the value of the database column ap_warehouse_detail.AWD_ID
      *
@@ -1506,4 +1510,12 @@ public class ApWarehouseDetail extends AbstractMINBean {
     public void setReceiptTotal(String receiptTotal) {
         this.receiptTotal = receiptTotal == null ? null : receiptTotal.trim();
     }
+    
+    public String getAwdCustomerId() {
+		return awdCustomerId;
+	}
+
+	public void setAwdCustomerId(String awdCustomerId) {
+		this.awdCustomerId = awdCustomerId;
+	}
 }

+ 6 - 1
adm/src/main/java/com/minpay/guomao/giveoutmanage/giveOutManageAction.java

@@ -644,6 +644,8 @@ public class giveOutManageAction implements IMINAction {
 			@MINParam(key = "region") String region,					//区域
 			@MINParam(key = "payUnit") String payUnit,					//付款单位
 			@MINParam(key = "wareId") String wareId,					//仓库
+			@MINParam(key = "customerId") String customerId,		    //客户id
+			
 			MINSession session
 			) throws MINBusinessException {
 		MINActionResult res = new MINActionResult();
@@ -760,7 +762,8 @@ public class giveOutManageAction implements IMINAction {
 			ago.setEscortFee(logisticsDetails.getEscort());				// 押运费
 			ago.setLocalRailwayCost(logisticsDetails.getRailway());		// 地方铁路费用
 			ago.setChangeTrains(logisticsDetails.getTransfer());		// 中转信息费
-		}		
+		}	
+		ago.setCusId(customerId); 				//客户id
 		Service.lookup(IGuoMaoGiveOutService.class).updateGiveOutContractMonth(ago);
 		Service.lookup(IMINDataBaseService.class)
 				.getMybatisMapper(ApGiveOutMapper.class)
@@ -949,6 +952,7 @@ public class giveOutManageAction implements IMINAction {
 			@MINParam(key = "region") String region,
 			@MINParam(key = "payUnit") String payUnit,
 			@MINParam(key = "wareId") String wareId,
+			@MINParam(key = "customerId") String customerId,
 			MINSession session)throws MINBusinessException{
 		MINActionResult res = new MINActionResult();
 		//当前时间
@@ -1063,6 +1067,7 @@ public class giveOutManageAction implements IMINAction {
 			}
 			
 			go.setBranchId(user.getBranchId());//部门
+			go.setCusId(customerId); 		//客户id
 			Service.lookup(IGuoMaoGiveOutService.class).updateGiveOutContractMonth(go);
 			Service.lookup(IMINDataBaseService.class)
 					.getMybatisMapper(ApGiveOutMapper.class)

+ 2 - 0
adm/src/main/java/com/minpay/guomao/logisticsmanage/LogisticsManageAction.java

@@ -829,6 +829,7 @@ public class LogisticsManageAction implements IMINAction {
 			@MINParam(key = "region") String region,  				//区域
 			@MINParam(key = "payUnit") String payUnit,  				//付款单位
 			@MINParam(key = "wareId") String wareId,  				//付款单位
+			@MINParam(key = "customerId") String customerId,  		//客户id
 			MINSession session
 			) throws MINBusinessException {
 		
@@ -946,6 +947,7 @@ public class LogisticsManageAction implements IMINAction {
 			ago.setWareinfId(wareId); 	// 仓库Id
 		}
 		ago.setBranchId(user.getBranchId());//部门
+		ago.setCusId(customerId); 			//客户id
 		Service.lookup(IGuoMaoGiveOutService.class).updateGiveOutContractMonth(ago);
 		// 执行新增
 		Service.lookup(IMINDataBaseService.class).getMybatisMapper(ApGiveOutMapper.class).insertSelective(ago);

+ 3 - 1
adm/src/main/java/com/minpay/guomao/stockManage/StockManageAction.java

@@ -572,6 +572,7 @@ public class StockManageAction implements IMINAction {
 			@MINParam(key = "saleName") String saleName,
 			@MINParam(key = "remarks") String remarks,
 			@MINParam(key = "entryTime") String entryTime,
+			@MINParam(key = "buyerId") String buyerId,
 			@MINParam(key = "isPage") boolean isPage,
 			@MINParam(key = "page", defaultValue = "1") int page,
 			@MINParam(key = "limit", defaultValue = "10") int limit,
@@ -603,9 +604,10 @@ public class StockManageAction implements IMINAction {
 		map.put("spvalue",spvalue);   					//规格
 		map.put("saleName",saleName);   				//资源方
 		map.put("boxNo",boxNo);   						//箱号
-		map.put("remarks",remarks);   						//备注
+		map.put("remarks",remarks);   					//备注
 		map.put("state",state);   						//zhuangtai
 		map.put("entryTime",entryTime);   						//入库时间
+		map.put("buyerId", buyerId);					//采购方
 		if("00000000".equals(user.getRoleId())){//平台
 			map.put("companyId",""); 	
 		}

+ 22 - 5
adm/src/main/resources/com/minpay/db/table/mapper/ApGiveOutMapper.xml

@@ -43,6 +43,7 @@
     <result column="AGO_BRANCH_ID" jdbcType="VARCHAR" property="branchId" />
     <result column="AGO_FAPIAO_ID" jdbcType="VARCHAR" property="fapiaoId" />
     <result column="AGO_CONTRACT_MONTH" jdbcType="VARCHAR" property="contractMonth" />
+    <result column="AGO_CUS_ID" jdbcType="VARCHAR" property="cusId" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
@@ -121,7 +122,7 @@
     AGO_TRANSPORT_PRICE, AGO_EXTRAS, AGO_ESCORT_FEE, AGO_LOCAL_RAILWAY_COST, AGO_CHANGE_TRAINS, 
     AGO_FH_DATE, AGO_DH_DATE, AGO_STOCK_ID, AGO_REMARKS, AGO_LOGISTICS_CONTRACT, AGO_SETTLEMENT_PRICE, 
     AGO_REGION, AGO_PAY_UNIT, AGO_WAREINF_ID, AGO_IS_TRANS, AGO_BRANCH_ID, AGO_FAPIAO_ID, 
-    AGO_CONTRACT_MONTH
+    AGO_CONTRACT_MONTH,AGO_CUS_ID
   </sql>
   <select id="selectByExample" parameterType="com.minpay.db.table.model.ApGiveOutExample" resultMap="BaseResultMap">
     <!--
@@ -186,7 +187,7 @@
       AGO_REMARKS, AGO_LOGISTICS_CONTRACT, AGO_SETTLEMENT_PRICE, 
       AGO_REGION, AGO_PAY_UNIT, AGO_WAREINF_ID, 
       AGO_IS_TRANS, AGO_BRANCH_ID, AGO_FAPIAO_ID, 
-      AGO_CONTRACT_MONTH)
+      AGO_CONTRACT_MONTH,AGO_CUS_ID)
     values (#{id,jdbcType=VARCHAR}, #{consignee,jdbcType=VARCHAR}, #{station,jdbcType=VARCHAR}, 
       #{carNumber,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, #{caseNo,jdbcType=VARCHAR}, 
       #{spcl,jdbcType=VARCHAR}, #{weight,jdbcType=VARCHAR}, #{contractId,jdbcType=VARCHAR}, 
@@ -199,7 +200,9 @@
       #{remarks,jdbcType=VARCHAR}, #{logisticsContract,jdbcType=VARCHAR}, #{settlementPrice,jdbcType=VARCHAR}, 
       #{region,jdbcType=VARCHAR}, #{payUnit,jdbcType=VARCHAR}, #{wareinfId,jdbcType=VARCHAR}, 
       #{isTrans,jdbcType=VARCHAR}, #{branchId,jdbcType=VARCHAR}, #{fapiaoId,jdbcType=VARCHAR}, 
-      #{contractMonth,jdbcType=VARCHAR})
+      #{contractMonth,jdbcType=VARCHAR},
+      #{cusId,jdbcType=VARCHAR}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.minpay.db.table.model.ApGiveOut">
     <!--
@@ -319,6 +322,9 @@
       <if test="contractMonth != null">
         AGO_CONTRACT_MONTH,
       </if>
+       <if test="cusId != null">
+        AGO_CUS_ID,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -432,6 +438,9 @@
       <if test="contractMonth != null">
         #{contractMonth,jdbcType=VARCHAR},
       </if>
+       <if test="cusId != null">
+        #{cusId,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.minpay.db.table.model.ApGiveOutExample" resultType="java.lang.Integer">
@@ -562,6 +571,9 @@
       <if test="record.contractMonth != null">
         AGO_CONTRACT_MONTH = #{record.contractMonth,jdbcType=VARCHAR},
       </if>
+       <if test="record.cusId != null">
+        AGO_CUS_ID = #{record.cusId,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -609,7 +621,8 @@
       AGO_IS_TRANS = #{record.isTrans,jdbcType=VARCHAR},
       AGO_BRANCH_ID = #{record.branchId,jdbcType=VARCHAR},
       AGO_FAPIAO_ID = #{record.fapiaoId,jdbcType=VARCHAR},
-      AGO_CONTRACT_MONTH = #{record.contractMonth,jdbcType=VARCHAR}
+      AGO_CONTRACT_MONTH = #{record.contractMonth,jdbcType=VARCHAR},
+      AGO_CUS_ID = #{record.cusId,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -729,6 +742,9 @@
       <if test="contractMonth != null">
         AGO_CONTRACT_MONTH = #{contractMonth,jdbcType=VARCHAR},
       </if>
+      <if test="cusId != null">
+        AGO_CUS_ID = #{cusId,jdbcType=VARCHAR}
+      </if>
     </set>
     where AGO_ID = #{id,jdbcType=VARCHAR}
   </update>
@@ -773,7 +789,8 @@
       AGO_IS_TRANS = #{isTrans,jdbcType=VARCHAR},
       AGO_BRANCH_ID = #{branchId,jdbcType=VARCHAR},
       AGO_FAPIAO_ID = #{fapiaoId,jdbcType=VARCHAR},
-      AGO_CONTRACT_MONTH = #{contractMonth,jdbcType=VARCHAR}
+      AGO_CONTRACT_MONTH = #{contractMonth,jdbcType=VARCHAR},
+      AGO_CUS_ID = #{cusId,jdbcType=VARCHAR}
     where AGO_ID = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 19 - 4
adm/src/main/resources/com/minpay/db/table/mapper/ApWarehouseDetailMapper.xml

@@ -53,6 +53,7 @@
     <result column="AWD_RECEIPT" jdbcType="VARCHAR" property="receipt" />
     <result column="AWD_EXCEL_RECEIPT_ID" jdbcType="VARCHAR" property="excelReceiptId" />
     <result column="AWD_RECEIPT_TOTAL" jdbcType="VARCHAR" property="receiptTotal" />
+    <result column="AWD_CUSTOMER_ID" jdbcType="VARCHAR" property="awdCustomerId" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <!--
@@ -132,7 +133,7 @@
     AWD_STANDARD_ID, AWD_WRECEIPT, AWD_OLD_ID, AWD_REMARKS, AWD_ENTRY_TIME, AWD_CREATE_USER, 
     AWD_CREATE_TIME, AWD_MODIFY_USER, AWD_MODIFY_TIME, AWD_COMPANY_ID, AWD_HAS_AMOUNT, 
     AWD_PLAN_ID, AWD_STOCK_ID, AWD_LICENSE_NUMBER, AWD_BRANCH_ID, AWD_COST_FLAG, AWD_KUCUN_FLAG, 
-    AWD_YG_WEIGHT, AWD_SJ_WEIGHT, AWD_SAVE_NO, AWD_RECEIPT, AWD_EXCEL_RECEIPT_ID, AWD_RECEIPT_TOTAL
+    AWD_YG_WEIGHT, AWD_SJ_WEIGHT, AWD_SAVE_NO, AWD_RECEIPT, AWD_EXCEL_RECEIPT_ID, AWD_RECEIPT_TOTAL,AWD_CUSTOMER_ID
   </sql>
   <select id="selectByExample" parameterType="com.minpay.db.table.model.ApWarehouseDetailExample" resultMap="BaseResultMap">
     <!--
@@ -200,7 +201,7 @@
       AWD_STOCK_ID, AWD_LICENSE_NUMBER, AWD_BRANCH_ID, 
       AWD_COST_FLAG, AWD_KUCUN_FLAG, AWD_YG_WEIGHT, 
       AWD_SJ_WEIGHT, AWD_SAVE_NO, AWD_RECEIPT, 
-      AWD_EXCEL_RECEIPT_ID, AWD_RECEIPT_TOTAL)
+      AWD_EXCEL_RECEIPT_ID, AWD_RECEIPT_TOTAL,AWD_CUSTOMER_ID)
     values (#{id,jdbcType=VARCHAR}, #{warehouseId,jdbcType=VARCHAR}, #{warehouseName,jdbcType=VARCHAR}, 
       #{orderId,jdbcType=VARCHAR}, #{orderName,jdbcType=VARCHAR}, #{contranctMonth,jdbcType=VARCHAR}, 
       #{contractId,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR}, #{buyerId,jdbcType=VARCHAR}, 
@@ -216,7 +217,7 @@
       #{stockId,jdbcType=VARCHAR}, #{licenseNumber,jdbcType=VARCHAR}, #{branchId,jdbcType=VARCHAR}, 
       #{costFlag,jdbcType=VARCHAR}, #{kucunFlag,jdbcType=VARCHAR}, #{ygWeight,jdbcType=VARCHAR}, 
       #{sjWeight,jdbcType=VARCHAR}, #{saveNo,jdbcType=VARCHAR}, #{receipt,jdbcType=VARCHAR}, 
-      #{excelReceiptId,jdbcType=VARCHAR}, #{receiptTotal,jdbcType=VARCHAR})
+      #{excelReceiptId,jdbcType=VARCHAR}, #{receiptTotal,jdbcType=VARCHAR},#{awdCustomerId,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.minpay.db.table.model.ApWarehouseDetail">
     <!--
@@ -366,6 +367,9 @@
       <if test="receiptTotal != null">
         AWD_RECEIPT_TOTAL,
       </if>
+      <if test="awdCustomerId != null">
+        AWD_CUSTOMER_ID,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -509,6 +513,9 @@
       <if test="receiptTotal != null">
         #{receiptTotal,jdbcType=VARCHAR},
       </if>
+       <if test="awdCustomerId != null">
+        #{awdCustomerId,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.minpay.db.table.model.ApWarehouseDetailExample" resultType="java.lang.Integer">
@@ -669,6 +676,9 @@
       <if test="record.receiptTotal != null">
         AWD_RECEIPT_TOTAL = #{record.receiptTotal,jdbcType=VARCHAR},
       </if>
+      <if test="record.awdCustomerId != null">
+        AWD_CUSTOMER_ID = #{record.awdCustomerId,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -727,6 +737,7 @@
       AWD_RECEIPT = #{record.receipt,jdbcType=VARCHAR},
       AWD_EXCEL_RECEIPT_ID = #{record.excelReceiptId,jdbcType=VARCHAR},
       AWD_RECEIPT_TOTAL = #{record.receiptTotal,jdbcType=VARCHAR}
+      AWD_CUSTOMER_ID = #{record.awdCustomerId,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -876,6 +887,9 @@
       <if test="receiptTotal != null">
         AWD_RECEIPT_TOTAL = #{receiptTotal,jdbcType=VARCHAR},
       </if>
+       <if test="awdCustomerId != null">
+        AWD_CUSTOMER_ID = #{awdCustomerId,jdbcType=VARCHAR},
+      </if>
     </set>
     where AWD_ID = #{id,jdbcType=VARCHAR}
   </update>
@@ -930,7 +944,8 @@
       AWD_SAVE_NO = #{saveNo,jdbcType=VARCHAR},
       AWD_RECEIPT = #{receipt,jdbcType=VARCHAR},
       AWD_EXCEL_RECEIPT_ID = #{excelReceiptId,jdbcType=VARCHAR},
-      AWD_RECEIPT_TOTAL = #{receiptTotal,jdbcType=VARCHAR}
+      AWD_RECEIPT_TOTAL = #{receiptTotal,jdbcType=VARCHAR},
+      AWD_CUSTOMER_ID = #{awdCustomerId,jdbcType=VARCHAR}
     where AWD_ID = #{id,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 4 - 1
adm/src/main/resources/com/minpay/db/table/own/mapper/GiveoutManageMapper.xml

@@ -36,11 +36,14 @@
 		  ago.AGO_WAREINF_ID            "wareId",
 		  if(ago.AGO_IS_TRANS is null or ago.AGO_IS_TRANS = '', '0', '1')				"transState",
 		  w.AWI_NAME                	"wareName",
-		  ago.AGO_REMARKS				"remarks"
+		  ago.AGO_REMARKS				"remarks",
+		  f.ACI_NAME					"customerName"
 		FROM
 		  ap_give_out ago
 		  left join ap_warehouse_inf w
 		  on ago.AGO_WAREINF_ID = w.AWI_ID
+		  left join ap_company_inf f
+		  on f.ACI_ID = ago.AGO_CUS_ID
 		WHERE ago.AGO_STATE != "01"
 		<if test=" region !=null and region != ''">
 		   and  ago.AGO_REGION = #{region,jdbcType=VARCHAR}

+ 3 - 0
adm/src/main/resources/com/minpay/db/table/own/mapper/StockManageMapper.xml

@@ -521,6 +521,9 @@
 		</if>	
 		and (ad.AWD_TYPE in ('00','03','06'))
 		and ad.AWD_AVL_WEIGHT > 0
+		<if test="buyerId != null and buyerId != ''">
+			and (ad.AWD_CUSTOMER_ID is null or ad.AWD_CUSTOMER_ID = #{buyerId,jdbcType=VARCHAR})
+		</if>
 		ORDER BY  ad.AWD_ENTRY_TIME,ad.AWD_CARD_NO desc
 	</select>
 	

+ 2 - 1
adm/src/main/resources/com/minpay/db/table/own/mapper/WarehouseInventoryMapper.xml

@@ -183,7 +183,8 @@
 					ad.AWST_CREATE_TIME,
 					ad.AWST_CONTRACT_NO contractNo,
 					w.AWI_REGION region,
-					aci.ACI_CONTRACT_TYPE contractType
+					aci.ACI_CONTRACT_TYPE contractType,
+					ad.AWST_BUYER_ID buyerId
 		 FROM  		
 		 	ap_warehouse_stock ad
 		 left join ap_product_spec_rel apsr

+ 28 - 1
adm/src/main/webapp/admin/giveOutManage/editGiveout.html

@@ -167,6 +167,13 @@
      			<input type="radio" name = "payUnit" value="00" title="代付">
 			</div>
 		</div>
+		<div class="layui-inline">
+			<label class="layui-form-label">客户:</label>
+			<div class="layui-input-block">
+				<input type="hidden" name="customerId" id="customerId">
+				<input type="text" name="customerName" id="customerName" onclick="toChooseCusomer()" placeholder="请选择客户" class="layui-input">
+			</div>
+		</div>
 	</div>
     <div class="layui-form-item box-button">
         <div class="layui-input-block" style="width: 100%;">
@@ -272,6 +279,7 @@
 			var region = $("select[name='region']").val();//区域
 			var payUnit = $("input[name='payUnit']:checked").val();
 			var wareId = $("#wareId").val();          		//仓库
+			var customerId = $("#customerId").val();   //客户id
 			$.request({
 				action : 'giveOutManageAction/editGiveout',
 				data :  {
@@ -294,7 +302,8 @@
 					remarks : remarks,           			//备注
 					payUnit : payUnit,           			//备注
 					region:region,							//区域
-					wareId : wareId							//仓库
+					wareId : wareId	,						//仓库
+					customerId:customerId					//客户id
 				},
 				success : function(data) {
 					 layer.alert('保存成功!',  function(){
@@ -340,6 +349,24 @@
 	   	});
 	} 
 	
+	//选择客户
+	function toChooseCusomer(){
+		layer.open({
+	   	      type: 2,
+	   	      title: '选择客户',
+	   	      shadeClose: true,
+	   	      shade: 0.8,
+	   	   	  area: ['95%', '84%'],
+	   	      content: '../longcontractManage/chooseCustomerPC.html?type=00'
+	   	});
+		
+	}
+	
+	function childRetunCustomer(data){
+	    	$("#customerName").val(data.aciName);
+			$("#customerId").val(data.aciId);
+	  }
+	
 	//带产品信息
 		function childRetunData2(data){
 			$("#specId").val(data.specNo);

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

@@ -421,6 +421,7 @@ if(!isEmpty(stockId)){
 		    	  }
 		    	  },width:"10%"}
 		      ,{field: 'forwardingUnit', title: '发货单位名称', width:"10%"}
+		      ,{field: 'customerName', title: '客户名称', width:"10%"}
 		      ,{field: 'settlementPrice', title: '结算单价', width:"10%"}
 		      ,{field: 'transPrice', title: '运输单价', width:"10%"}
 		      ,{field: 'contractNo', title: '合同单号', width:"10%"}

+ 28 - 2
adm/src/main/webapp/admin/giveOutManage/uploadGiveout.html

@@ -115,6 +115,14 @@
       				<input type="radio" name = "payUnit" value="00" title="代付" checked>
 				</div>
 			</div>
+			<div class="layui-inline">
+				<label class="layui-form-label">*选择客户:</label>
+				<div class="layui-input-block">
+					<input type="hidden" name="customerId" id="customerId"  autocomplete="off" class="layui-input">
+					<input type="tel" name="customerName" id="customerName" lay-verify="customerName" autocomplete="off" onclick="selectCustomer()" placeholder="请选择客户" class="layui-input">
+				</div>
+			</div>
+			
 	    </div>  
     </div> 
   </form>
@@ -367,7 +375,7 @@
 			var region = $("select[name='region']").val();
 			var payUnit = $("input[name='payUnit']:checked").val();
 			var apiId = $("#apiId").val();
-			
+			var customerId = $("#customerId").val();
 	    	if (isEmpty(contractId)) {
 	    		layer.msg('请选择所属合同!', {icon: 6});
 	    		return;
@@ -407,7 +415,8 @@
 					date : date,
 					payUnit : payUnit,
 					region : region,
-					wareId : wareId
+					wareId : wareId,
+					customerId : customerId
 				},
 				success : function(resData) {
 					if (resData.MINStatus == 0) {
@@ -754,6 +763,23 @@
 		   	      content: 'selectProductByBranch.html'
 		   	});
 		}
+		
+		  //选择客户
+	    function selectCustomer(){
+			layer.open({
+		   	      type: 2,
+		   	      title: '选择客户',
+		   	      shadeClose: true,
+		   	      shade: 0.8,
+		   	   	  area: ['95%', '84%'],
+		   	      content: '../longcontractManage/chooseCustomerPC.html?type=00'
+		   	});
+	    }
+		
+		function childRetunCustomer(data){
+		    	$("#customerName").val(data.aciName);
+				$("#customerId").val(data.aciId);
+		    }
     </script>
 </body>
 </html>

+ 28 - 1
adm/src/main/webapp/admin/logisticsManage/addLogistics.html

@@ -160,6 +160,13 @@
      			<input type="radio" name = "payUnit" value="01" title="自付" checked>
 			</div>
 		</div>
+		<div class="layui-inline">
+			<label class="layui-form-label">*选择客户:</label>
+			<div class="layui-input-block">
+				<input type="hidden" name="customerId" id="customerId"  autocomplete="off" class="layui-input">
+				<input type="tel" name="customerName" id="customerName" lay-verify="customerName" autocomplete="off" onclick="selectCustomer()" placeholder="请选择客户" class="layui-input">
+			</div>
+		</div>
 	</div>
      <div class="layui-form-item box-button">
           <div class="layui-input-block" style="width: 100%;">
@@ -278,6 +285,7 @@
 		var region = $("select[name='region']").val();
 		var payUnit = $("input[name='payUnit']:checked").val();
 		var wareId = $("#wareId").val();		// 仓库
+		var customerId = $("#customerId").val();//客户id
 		$.request({
 			action : 'LogisticsManageAction/addOutPut',
 			data :  {
@@ -297,7 +305,8 @@
 				settlementPrice : settlementPrice,  //结算单价
 				remarks : remarks,             		//备注
 				region : region,            		//区域
-				payUnit : payUnit            		//付款单位
+				payUnit : payUnit,            		//付款单位
+				customerId:customerId				//客户id
 			},
 			success : function(data) {
 				 layer.alert('保存成功!',  function(){
@@ -468,10 +477,28 @@
 	   	      content: '../orderManage/logisticsCustomers.html?type=00&conType=00'
 	   	});
 	}
+    
+    //选择客户
+    function selectCustomer(){
+		layer.open({
+	   	      type: 2,
+	   	      title: '选择客户',
+	   	      shadeClose: true,
+	   	      shade: 0.8,
+	   	   	  area: ['95%', '84%'],
+	   	      content: '../longcontractManage/chooseCustomerPC.html?type=00'
+	   	});
+    }
+    
     function contractRetun(data){
 		$("#aciName").val(data.aciName);
 		$("#aciId").val(data.aciId);
 	}
+    
+    function childRetunCustomer(data){
+    	$("#customerName").val(data.aciName);
+		$("#customerId").val(data.aciId);
+    }
     function logisticsOrder(){
 		var custId = $('#aciId').val();
 		if (isEmpty(custId)) {

+ 2 - 1
adm/src/main/webapp/admin/stockManage/enteringStock.html

@@ -134,6 +134,7 @@
 	var abfId = getQueryString("abfId");
 	var branchId = getTempVal("branchid");
 	var isPage = getQueryString("isPage");
+	var buyerId = getQueryString("buyerId");
 	var limt = 10;
 	if (isEmpty(isPage)) {
 		isPage = true;
@@ -205,7 +206,7 @@
 		    ,limit:limt
 		    ,url: 'StockManageAction/selectStock' //数据接口
 		    ,method: 'post'
-		    ,where:{MINView:"JSON",wareId : wareId ,state:"99",spId:spId,abfId :abfId,isPage : isPage}
+		    ,where:{MINView:"JSON",wareId : wareId ,state:"99",spId:spId,abfId :abfId,isPage : isPage,buyerId:buyerId}
 		    ,page: isPage //开启分页
 		    ,cols: [[ //表头
 			   {type:'checkbox',width:'5%',fixed:'left'}

+ 2 - 1
adm/src/main/webapp/admin/stockManage/outWarehouseTwo.html

@@ -47,6 +47,7 @@ var orderName = getQueryString("orderName");
 var awstId = getQueryString("awstId");	//主表id 
 var spId = getQueryString("spId");
 var abfId = getQueryString("abfId");
+var buyerId = getQueryString("buyerId");
 layui.use('element', function () {
     var $ = layui.jquery
         , element = layui.element; //Tab的切换功能,切换事件监听等,需要依赖element模块
@@ -89,7 +90,7 @@ function iframeInit(id) {
 }
 
 $(function () {
-	$('#iframeOne').attr('src','enteringStock.html?wareId='+wareId+'&type='+type+'&orderId='+orderId+'&orderName='+orderName+'&awstId='+awstId+'&spId='+spId+'&abfId='+abfId+'&tabPageId='+tabPageId+'&isPage=false');
+	$('#iframeOne').attr('src','enteringStock.html?wareId='+wareId+'&type='+type+'&orderId='+orderId+'&orderName='+orderName+'&awstId='+awstId+'&spId='+spId+'&abfId='+abfId+'&tabPageId='+tabPageId+'&isPage=false&buyerId='+buyerId);
 	$('#iframeTwo').attr('src','enteringReceipt.html?wareId='+wareId+'&type='+type+'&orderId='+orderId+'&orderName='+orderName+'&awstId='+awstId+'&spId='+spId+'&abfId='+abfId+'&tabPageId='+tabPageId+'&isPage=false');
     iframeInit('iframeOne');
     iframeInit('iframeTwo');

+ 2 - 1
adm/src/main/webapp/admin/wareHouseManage/wareHouseOut.html

@@ -395,11 +395,12 @@
 	    var orderId = data.orderId;
 	    var orderName = data.orderName;
 	    var wareId = data.warehouseId;
+	    var buyerId = data.buyerId;
     	params.columnNumber = 2; //每行显示两个字段
 	    // 寄存当前数据
 	    layui.sessionData("ROW_DATA_OUT", {key:"NOW_ROW", value:data});
 	  	//新增出库
-	  	openMainTabPageParent(tabPageId+'-01', '配货', 'stockManage/outWarehouseTwo.html?wareId='+wareId+'&type='+type+'&awstId='+awstId+'&orderId='+orderId+'&orderName='+orderName+'&spId='+data.spId+'&abfId='+data.abfId+'&tabPageId='+tabPageId+'-01','',tabPageId,reloadPage);
+	  	openMainTabPageParent(tabPageId+'-01', '配货', 'stockManage/outWarehouseTwo.html?wareId='+wareId+'&type='+type+'&awstId='+awstId+'&orderId='+orderId+'&orderName='+orderName+'&spId='+data.spId+'&abfId='+data.abfId+'&tabPageId='+tabPageId+'-01&buyerId='+data.buyerId,'',tabPageId,reloadPage);
   	}
   	
   	/* //多订单批量入库