Commit 587098e1 by wuwenlong

Merge remote-tracking branch 'origin/dev' into dev

parents 46c3d092 4ef826e1
...@@ -45,6 +45,13 @@ public enum DdynamicEnum { ...@@ -45,6 +45,13 @@ public enum DdynamicEnum {
CUSTOMER_RECORD_BLOCK_ID("customer_record_block_id", "custCode", "custName", "HGPZ002.queryComboBox"), CUSTOMER_RECORD_BLOCK_ID("customer_record_block_id", "custCode", "custName", "HGPZ002.queryComboBox"),
/** /**
* 模块:客户档案
* 用途:客户档案全部信息下拉框
* 编写:wwl
*/
CUSTOMER_RECORD_ALL_BLOCK_ID("customer_record_all_block_id", "custCode", "custName","phoneName","putAddress", "HGPZ002.queryCustAllBox"),
/**
* 模块:供应商档案 * 模块:供应商档案
* 用途:供应商档案下拉框 * 用途:供应商档案下拉框
* 编写: * 编写:
...@@ -299,7 +306,7 @@ public enum DdynamicEnum { ...@@ -299,7 +306,7 @@ public enum DdynamicEnum {
* 用途:项目档案下拉框 * 用途:项目档案下拉框
* 编写:wwl * 编写:wwl
*/ */
PROJ_RECORD_BLOCK_ID("proj_record_block_id", "projCode", "projName", "HGSC001.queryComboBox"), PROJ_RECORD_BLOCK_ID("proj_record_block_id", "projCode", "projName","companyCode","companyName", "HGSC001.queryComboBox"),
/** /**
* 模块:蓝图 * 模块:蓝图
......
...@@ -126,6 +126,8 @@ public class HGConstant { ...@@ -126,6 +126,8 @@ public class HGConstant {
//材料计划订单号 //材料计划订单号
public static final String PLAN_MATERIAL_CODE = "PLAN_MATERIAL_CODE"; public static final String PLAN_MATERIAL_CODE = "PLAN_MATERIAL_CODE";
// 销售发货单号
public static final String DELIVERY_CODE = "DELIVERY_CODE";
} }
......
...@@ -9,10 +9,7 @@ import com.baosight.hggp.hg.cw.tools.HGCWTools; ...@@ -9,10 +9,7 @@ import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.*; import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.*;
import com.baosight.hggp.util.DateUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.StringUtils;
import com.baosight.hggp.util.contants.ACConstants; import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -79,7 +76,7 @@ public class ServiceHGKC013 extends ServiceEPBase { ...@@ -79,7 +76,7 @@ public class ServiceHGKC013 extends ServiceEPBase {
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "销售出库明细",operType = "保存",operDesc = "保存操作") @OperationLogAnnotation(operModul = "调拨单",operType = "保存",operDesc = "保存操作")
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
...@@ -118,6 +115,8 @@ public class ServiceHGKC013 extends ServiceEPBase { ...@@ -118,6 +115,8 @@ public class ServiceHGKC013 extends ServiceEPBase {
* 修改操作 * 修改操作
*/ */
public void modify(HGKC013 hgkc013) { public void modify(HGKC013 hgkc013) {
List<HGKC013A> hgkc013aList = HGKCTools.HgKc013.getDetail(hgkc013.getId());
AssertUtils.isNotEmpty(hgkc013aList, "已经添加调拨单明细,无法保存!");
DaoUtils.update(HGKC013.UPDATE, hgkc013); DaoUtils.update(HGKC013.UPDATE, hgkc013);
} }
...@@ -132,6 +131,7 @@ public class ServiceHGKC013 extends ServiceEPBase { ...@@ -132,6 +131,7 @@ public class ServiceHGKC013 extends ServiceEPBase {
hgkc013.fromMap(map); hgkc013.fromMap(map);
HGKC013 kc013 = HGKCTools.HgKc013.getId(hgkc013.getId()); HGKC013 kc013 = HGKCTools.HgKc013.getId(hgkc013.getId());
List<HGKC013A> list = HGKCTools.HgKc013.getDetail(hgkc013.getId()); List<HGKC013A> list = HGKCTools.HgKc013.getDetail(hgkc013.getId());
AssertUtils.isEmpty(list, "调拨单明细为空!");
addKC006(kc013,list); addKC006(kc013,list);
addKC007(kc013,list); addKC007(kc013,list);
DaoUtils.update(HGKC013.UPDATE_STATUS, hgkc013); DaoUtils.update(HGKC013.UPDATE_STATUS, hgkc013);
......
...@@ -160,6 +160,9 @@ ...@@ -160,6 +160,9 @@
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #parentId#, #receiptDate#, #saleOutCode#, #whCode#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #parentId#, #receiptDate#, #saleOutCode#, #whCode#,
#whName#, #status#) #whName#, #status#)
<selectKey resultClass="long" keyProperty="id">
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGKC004
</selectKey>
</insert> </insert>
<delete id="delete"> <delete id="delete">
......
...@@ -60,6 +60,7 @@ ...@@ -60,6 +60,7 @@
STATUS as "status" <!-- 状态0-未提交,1-已提交 --> STATUS as "status" <!-- 状态0-未提交,1-已提交 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
PARENT_ID as "parentId" <!-- 调度单ID --> PARENT_ID as "parentId" <!-- 调度单ID -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
......
...@@ -575,7 +575,6 @@ public class HGKCTools { ...@@ -575,7 +575,6 @@ public class HGKCTools {
paramMap.put("parentId", parentId); paramMap.put("parentId", parentId);
paramMap.put("deleteFlag", 0); paramMap.put("deleteFlag", 0);
List<HGKC013A> list = DaoBase.getInstance().query(HGKC013A.QUERY, paramMap); List<HGKC013A> list = DaoBase.getInstance().query(HGKC013A.QUERY, paramMap);
AssertUtils.isEmpty(list, "调拨单明细为空!");
return list; return list;
} }
} }
......
...@@ -328,4 +328,22 @@ ...@@ -328,4 +328,22 @@
ORDER BY CUST_CODE ORDER BY CUST_CODE
</select> </select>
<select id="queryCustAllBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
CUST_CODE as "custCode",
CUST_NAME as "custName",
PHONE_NAME as "phoneName",
PUT_ADDRESS as "putAddress"
FROM ${hggpSchema}.HGPZ002
WHERE DELETE_FLAG = 0
AND STATUS=1
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="custType">
CUST_TYPE = #custType#
</isNotEmpty>
ORDER BY CUST_CODE
</select>
</sqlMap> </sqlMap>
...@@ -364,7 +364,9 @@ ...@@ -364,7 +364,9 @@
resultClass="java.util.HashMap"> resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
PROJ_CODE as "projCode", PROJ_CODE as "projCode",
PROJ_NAME as "projName" PROJ_NAME as "projName",
company_code as "companyCode", <!-- 公司编码 -->
company_name as "companyName" <!-- 公司名称 -->
FROM ${hggpSchema}.HGSC001 FROM ${hggpSchema}.HGSC001
WHERE 1=1 WHERE 1=1
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
......
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.kc.domain.HGKC013;
import com.baosight.hggp.hg.kc.domain.HGKC013A;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.resource.I18nMessages;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/4
*/
public class ServiceHGYX001A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_PARENT_ID);
EiInfo outInfo = super.initLoad(inInfo, new HGYX001A());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
if (id != null) {
HGYX001 hgYx001 =HGYXTools.Hgyx001.getId(Long.valueOf(id));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
outInfo = super.query(inInfo, HGYX001A.QUERY, new HGYX001A());
outInfo.getBlock(EiConstant.queryBlock).setRows(Collections.singletonList(hgYx001));
}
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX001().eiMetadata);
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.COMPANY_BOX_BLOCK_ID,
DdynamicEnum.WH_RECORD_BOX_BLOCK_ID,
DdynamicEnum.CUSTOMER_RECORD_ALL_BLOCK_ID));
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.PROJ_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,userVO.getUsercode());
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}, false);
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_COMPANY_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_COMPANY_NAME, userVO.getUsername());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_CONS_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_CONS_NAME, userVO.getUsername());
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGYX001.QUERY,new HGYX001());
}
@OperationLogAnnotation(operModul = "销售发货详情",operType = "删除",operDesc = "删除操作")
@Override
public EiInfo delete(EiInfo inInfo) {
int i = 0;
try {
String status = inInfo.getCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_STATUS).toString();
if ("1".equals(status)) {
String str = "已审核,无法删除!";
throw new PlatException(str);
}
HGYX001A hgyx001A = new HGYX001A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hgyx001A.fromMap(map);
hgyx001A.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGYX001A.DELETE_FLAG, hgyx001A);
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsgByKey("ep.1000", new String[]{String.valueOf(i), I18nMessages.getText("label.delete", "删除")});
} catch (PlatException e) {
LogUtils.setMsg(inInfo, e,"删除失败");
}
return inInfo;
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC013;
import com.baosight.hggp.hg.kc.domain.HGKC013A;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.hg.yx.tools.HGYXTools;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.StringUtils;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
/**
* @author LiuYang
* @version 1.0 2024/6/4
*/
public class ServiceHGYX001B extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_PARENT_ID);
EiInfo outInfo = super.initLoad(inInfo, new HGYX001A());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
if (id != null) {
HGYX001 hgYx001 = HGYXTools.Hgyx001.getId(Long.valueOf(id));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
outInfo = super.query(inInfo, HGYX001A.QUERY, new HGYX001A());
outInfo.getBlock(EiConstant.queryBlock).setRows(Collections.singletonList(hgYx001));
}
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX001().eiMetadata);
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.COMPANY_BOX_BLOCK_ID,
DdynamicEnum.WH_RECORD_BOX_BLOCK_ID,
DdynamicEnum.CUSTOMER_RECORD_ALL_BLOCK_ID));
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.PROJ_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,userVO.getUsercode());
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}, false);
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_COMPANY_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_COMPANY_NAME, userVO.getUsername());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_CONS_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_CONS_NAME, userVO.getUsername());
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_ID);
inInfo.getBlock(EiConstant.queryBlock).getRows().clear();
if (StringUtils.isNotEmpty(id)) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_PARENT_ID, id);
}
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGYX001A.QUERY,new HGYX001A());
}
}
package com.baosight.hggp.hg.yx.service;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001C;
import com.baosight.hggp.util.CommonMethod;
import com.baosight.hggp.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
/**
* @author LiuYang
* @version 1.0 2024/6/4
*/
public class ServiceHGYX001C extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001C.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
String[] specIds = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "specIds").split(",");
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "specIds", specIds);
inInfo = super.query(inInfo, HGYX001C.QUERY, new HGYX001C());
CommonMethod.initBlock(inInfo,
Arrays.asList(
DdynamicEnum.INVENT_TYPE_BLOCK_ID,
DdynamicEnum.INVENT_RECORD_BLOCK_ID,
DdynamicEnum.SPEC_NAME_BLOCK_ID));
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGYX001C().eiMetadata);
return inInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo, HGYX001C.QUERY,new HGYX001C());
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HGYX001C">
<sql id="column">
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
MATERIAL as "material", <!-- 材质 -->
UNIT as "unit", <!-- 单位 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
INV_QTY as "consQuantity", <!-- 库存数量 -->
INV_UNIT_WEIGHT as "consUnitWeight", <!-- 库存单重 -->
INV_WEIGHT as "consWeight", <!-- 库存重量 -->
FACTORY_CODE as "factoryCode", <!-- 厂区编码 -->
FACTORY_NAME as "factoryName" <!-- 厂区名称 -->
</sql>
<sql id="condition">
<include refid="HGXSDataAuth.authCondition"/>
<include refid="idCondition"/>
<include refid="customCondition"/>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventCode">
INVENT_CODE LIKE CONCAT('%',#inventCode#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME LIKE CONCAT('%',#inventName#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specId">
SPEC_ID = #specId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec">
SPEC LIKE CONCAT(#spec#,'%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="material">
MATERIAL = #material#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="unit">
UNIT = #unit#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryName">
FACTORY_NAME = #factoryName#
</isNotEmpty>
</sql>
<sql id="idCondition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="ids">
ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="specIds">
SPEC_ID NOT IN <iterate close=")" open="(" conjunction="," property="specIds">#specIds[]#</iterate>
</isNotEmpty>
</sql>
<sql id="customCondition">
<include refid="BaseCondition.specCondition"/>
<include refid="BaseCondition.createdTimeCondition"/>
</sql>
<sql id="orderBy">
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</sql>
<select id="query" resultClass="com.baosight.hggp.hg.yx.domain.HGYX001C">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include refid="condition"/>
<include refid="orderBy"/>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGKC010 WHERE 1=1
<include refid="condition"/>
</select>
<insert id="insert">
INSERT INTO ${hggpSchema}.HGKC010 (
ACCOUNT_CODE, <!-- 企业编码 -->
DEP_CODE, <!-- 部门编码 -->
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 -->
INVENT_CODE, <!-- 存货编码 -->
INVENT_NAME, <!-- 存货名称 -->
SPEC_ID, <!-- 规格ID -->
SPEC, <!-- 规格 -->
MATERIAL, <!-- 材质 -->
UNIT, <!-- 单位 -->
LENGTH, <!-- 长度 -->
WIDTH, <!-- 宽度 -->
THICK, <!-- 厚度 -->
INV_QTY, <!-- 库存数量 -->
INV_UNIT_WEIGHT, <!-- 库存单重 -->
INV_WEIGHT, <!-- 库存重量 -->
FACTORY_CODE, <!-- 厂区编码 -->
FACTORY_NAME <!-- 厂区名称 -->
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#,
#companyName#, #whCode#, #whName#, #inventType#, #inventCode#,
#inventName#, #specId#, #spec#, #material#, #unit#, #length#, #width#,
#thick#, #consQuantity#, #invUnitWeight#, #consWeight#, #factoryCode#, #factoryName#
)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGKC010 WHERE ID = #id#
</delete>
<!-- 锁 -->
<update id="lock">
UPDATE ${hggpSchema}.HGKC010
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
AND ACCOUNT_CODE = #accountCode#
AND COMPANY_CODE = #companyCode#
AND WH_CODE = #whCode#
AND INVENT_CODE = #inventCode#
AND SPEC_ID = #specId#
</update>
<!-- 锁 -->
<update id="locks">
UPDATE ${hggpSchema}.HGKC010
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
<!-- 更新库存 -->
<update id="updateInv">
UPDATE ${hggpSchema}.HGKC010
SET
INV_QTY = #consQuantity#, <!-- 库存数量 -->
INV_UNIT_WEIGHT = #invUnitWeight#, <!-- 库存单重 -->
INV_WEIGHT = #consWeight# <!-- 库存重量 -->
WHERE ID = #id#
</update>
<!--仓库公司下拉框-->
<select id="queryWhCodeBox" resultClass="java.util.HashMap">
SELECT distinct
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName" <!-- 仓库名称 -->
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include refid="condition"/>
</select>
<!--存货名称下拉框-->
<select id="queryInventCodeBox" resultClass="java.util.HashMap">
SELECT distinct
INVENT_TYPE as "inventType", <!-- 存货类型 -->
INVENT_CODE as "inventCode", <!-- 存货编码 -->
INVENT_NAME as "inventName", <!-- 存货名称 -->
SPEC_ID as "specId" <!-- 规格ID -->
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include refid="condition"/>
</select>
<!--规格下拉框-->
<select id="querySpecIdBox" resultClass="java.util.HashMap">
SELECT distinct
SPEC_ID as "specId", <!-- 规格ID -->
SPEC as "spec", <!-- 规格 -->
LENGTH as "length", <!-- 长度 -->
WIDTH as "width", <!-- 宽度 -->
THICK as "thick", <!-- 厚度 -->
INV_QTY as "consQuantity", <!-- 库存数量 -->
INV_UNIT_WEIGHT as "invUnitWeight", <!-- 库存单重 -->
INV_WEIGHT as "consWeight" <!-- 库存重量 -->
FROM ${hggpSchema}.HGKC010
WHERE 1=1
<include refid="condition"/>
</select>
</sqlMap>
package com.baosight.hggp.hg.yx.tools;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.hg.sj.domain.HGSJ001;
import com.baosight.hggp.hg.yx.domain.HGYX001;
import com.baosight.hggp.hg.yx.domain.HGYX001A;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.MapUtils;
import org.apache.commons.collections.CollectionUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/6/4
*/
public class HGYXTools {
/**
* Hgyx001公共DAO方法定义
*/
public static class Hgyx001 {
public static HGYX001 getId(Long id){
HGYX001 hgyx001 = new HGYX001();
AssertUtils.isNull(id, "销售发货ID不能为空!");
Object object = DaoBase.getInstance().get(HGYX001.QUERY,HGYX001.FIELD_ID, id);
AssertUtils.isNull(object, "销售发货不存在!");
hgyx001.fromMap(MapUtils.toMap(object));
return hgyx001;
}
public static List<HGYX001> list(Map params){
List<HGYX001> hgyx001s = DaoBase.getInstance().query(HGYX001.QUERY, params);
AssertUtils.isNull(hgyx001s, "销售发货不存在!");
return hgyx001s;
}
public static List<HGYX001> list(List<Long> ids){
AssertUtils.isNull(ids, "销售发货ID不能为空!");
Map params = new HashMap<>();
params.put("ids", ids);
List<HGYX001> hgyx001s = DaoBase.getInstance().query(HGYX001.QUERY, params);
AssertUtils.isEmpty(hgyx001s, "销售发货不存在!");
return hgyx001s;
}
public static List<HGYX001A> getParentId(Long parentId){
AssertUtils.isNull(parentId, "销售发货ID不能为空!");
Map params = new HashMap<>();
params.put("parentId", parentId);
List<HGYX001A> hgyx001As = DaoBase.getInstance().query(HGYX001A.QUERY, params);
AssertUtils.isEmpty(hgyx001As, "销售发货详情不存在!");
return hgyx001As;
}
}
}
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC004A.xml"/> <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC004A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC010.xml"/> <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC010.xml"/>
<sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC011.xml"/> <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC011.xml"/>
<!-- <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC013.xml"/>--> <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC013.xml"/>
<!-- <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC013A.xml"/>--> <sqlMap resource="com/baosight/hggp/hg/kc/sql/HGKC013A.xml"/>
<!-- 质量 --> <!-- 质量 -->
<sqlMap resource="com/baosight/hggp/hg/zl/sql/HGZL001.xml"/> <sqlMap resource="com/baosight/hggp/hg/zl/sql/HGZL001.xml"/>
<!-- 生产 --> <!-- 生产 -->
...@@ -63,4 +63,9 @@ ...@@ -63,4 +63,9 @@
<!--配置--> <!--配置-->
<sqlMap resource="com/baosight/hggp/hg/pz/sql/HGPZ005A.xml"/> <sqlMap resource="com/baosight/hggp/hg/pz/sql/HGPZ005A.xml"/>
<!--销售-->
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001.xml"/>
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001A.xml"/>
<sqlMap resource="com/baosight/hggp/hg/yx/sql/HGYX001C.xml"/>
</sqlMapConfig> </sqlMapConfig>
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
<EF:EFColumn cname="统一社会信用代码" ename="taxRegisterCode" align="center" width="200" /> <EF:EFColumn cname="统一社会信用代码" ename="taxRegisterCode" align="center" width="200" />
<EF:EFColumn cname="开户银行" ename="openBankName" align="center" width="200" /> <EF:EFColumn cname="开户银行" ename="openBankName" align="center" width="200" />
<EF:EFColumn cname="银行账号" ename="accountNum" align="center" width="200" /> <EF:EFColumn cname="银行账号" ename="accountNum" align="center" width="200" />
<EF:EFColumn cname="地址" ename="docIdPc" align="center" width="200" /> <EF:EFColumn cname="地址" ename="address" align="center" width="200" />
<EF:EFColumn cname="收货地址" ename="putAddress" align="center" width="200" />
<EF:EFColumn cname="联系人" ename="headName" align="center" width="200" /> <EF:EFColumn cname="联系人" ename="headName" align="center" width="200" />
<EF:EFColumn cname="电话" ename="phoneName" align="center" width="200" <EF:EFColumn cname="电话" ename="phoneName" align="center" width="200"
data-rules="mobile_phone"/> data-rules="mobile_phone"/>
......
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/4
Time: 10:45
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="销售发货">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="tranType" cname="运输方式" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgyx.tranType"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="numPlate" cname="车牌号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consName" cname="发货方" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" cname="收货方" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" cname="发货仓库" placeholder="模糊查询" colWidth="3"/>
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="consWhName" cname="发货仓库" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>--%>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row" copyToAdd="false">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="companyCode" enable="true" cname="公司名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="projCode" enable="true" cname="项目名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="deliveryCode" cname="发货单号" enable="false" width="120" align="center"/>
<EF:EFColumn ename="outboundCode" cname="出库单号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="consCode" enable="true" cname="发货方" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="receCode" enable="true" cname="收货方" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="customer_record_all_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receAddr" cname="收货地址" width="120" align="center"/>
<EF:EFColumn ename="receUserPhone" cname="收货人电话" width="120" align="center" data-rules="mobile_phone"/>
<EF:EFComboColumn ename="tranType" cname="运输方式" width="80" align="center" enable="true" required="true">
<EF:EFCodeOption codeName="hggp.hgyx.tranType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="numPlate" cname="车牌号" width="120" align="center"/>
<EF:EFComboColumn ename="consWhCode" cname="发货仓库" enable="true" width="120" align="center" required="true"
blockName="wh_record_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="consAddr" cname="发货地址" hidden="true" width="120" align="center"/>
<EF:EFColumn ename="consQuantity" cname="发货数量" width="120" align="center" format="{0:N0}" data-rules="number"/>
<EF:EFColumn ename="consWeight" cname="发货重量" width="120" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFComboColumn ename="status" cname="审核状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/4
Time: 10:46
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="销售发货">
<EF:EFRegion id="inqu" title="发货信息">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="id" cname="ID" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" required="true" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" disabled="true" filter="contains" value="0">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consName" type="hidden" cname="发货方名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="consWhCode" cname="发货仓库" required="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consAddr" cname="发货地址" placeholder="请输入发货地址" required="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" type="hidden" cname="收货方名称" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="receAddr" cname="收货地址" placeholder="请输入收货地址" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receUserPhone" cname="收货人电话" required="true" data-rules="mobile_phone" placeholder="请输入电话号码" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="tranType" cname="运输方式" required="true" placeholder="请选择运输方式" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgyx.tranType"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="numPlate" cname="车牌号" placeholder="请输入车牌号" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="consQuantity" cname="发货数量" format="{0:N0}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWeight" cname="发货重量" format="{0:N3}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save_status" cname="保存&提交审核" type="button" class="btn-center"/>
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
</div>
</EF:EFPage>
\ No newline at end of file
$(function () {
$(".row").children().attr("class", "col-md-3");
var inventTypeBox = __eiInfo.getBlock("invent_type_box_block_id").getMappedRows();
var inventCodedBox = __eiInfo.getBlock("invent_code_box_block_id").getMappedRows();
var specIdBox = __eiInfo.getBlock("spec_box_block_id").getMappedRows();
// 查询
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [],
loadComplete: function(grid) {
// 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) {
// 判断父级节点是否发生变化
if (e.field === "spec"){
for (let i = 0; i < specIdBox.length; i++) {
if (specIdBox[i]['param7Field'] === e.items[0]["inventRecordId"]){
e.items[0]["length"] = specIdBox[i]['param1Field'];
e.items[0]["width"] = specIdBox[i]['param2Field'];
e.items[0]["thick"] = specIdBox[i]['param3Field'];
e.items[0]["quantity"] = specIdBox[i]['param4Field'];
resultGrid.setCellValue(e.items[0],"unitWeight",specIdBox[i]['param5Field']);
resultGrid.setCellValue(e.items[0],"weight",specIdBox[i]['param6Field']);
//e.items[0]["unitWeight"] = specIdBox[i]['param5Field'];
//e.items[0]["weight"] = specIdBox[i]['param6Field'];
}
}
loadChange(grid,e,"length");
loadChange(grid,e,"width");
loadChange(grid,e,"thick");
//loadChange(grid,e,"unitWeight");
//loadChange(grid,e,"weight");
loadChange(grid,e,"quantity");
}else if (e.field === "quantity"){
if (e.items[0].quantity != 0 && e.items[0].unitWeight > 0){
e.items[0].weight = e.items[0].unitWeight*e.items[0].quantity;
resultGrid.setCellValue(e.items[0],"weight",e.items[0].unitWeight*e.items[0].quantity);
}
}else if (e.field === "inventCode"){
loadChange(grid,e,"spec");
}
});
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
//e.preventDefault();
//deleteFunc();
}
}
})
let query = function () {
resultGrid.dataSource.page(1);
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/4
Time: 14:56
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="销售发货">
<EF:EFRegion id="inqu" title="发货信息">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="id" cname="ID" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" required="true" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="审核状态" colWidth="3" disabled="true" filter="contains" value="0">
<EF:EFCodeOption codeName="hggp.hgsb.approveStatus" condition="ITEM_CODE IN ('0','1')"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consName" type="hidden" cname="发货方名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="consWhCode" cname="发货仓库" required="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consAddr" cname="发货地址" placeholder="请输入发货地址" required="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" type="hidden" cname="收货方名称" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="receAddr" cname="收货地址" placeholder="请输入收货地址" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receUserPhone" cname="收货人电话" required="true" data-rules="mobile_phone" placeholder="请输入电话号码" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="tranType" cname="运输方式" required="true" placeholder="请选择运输方式" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgyx.tranType"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="numPlate" cname="车牌号" placeholder="请输入车牌号" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="consQuantity" cname="发货数量" format="{0:N0}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWeight" cname="发货重量" format="{0:N3}"
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
\ No newline at end of file
$(function () {
// 查询
$("#QUERY").on("click", query);
$("#BNT_CHOICE").on("click", choice)
})
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
let choice = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
parent.JSColorbox.setValueCallback(rows);
parent.JSColorbox.close();
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/6/4
Time: 22:28
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<script>
var ctx = "${ctx}";
</script>
<EF:EFPage title="发货明细">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="inventName" cname="物料名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="spec" cname="规格" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" type="hidden" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="whCode" cname="仓库名称" type="hidden" required="true" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
blockName="invent_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="consQuantity" cname="数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="consUnitWeight" cname="单重" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="consWeight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment