Commit 1471df14 by 江和松

详情取消增加功能,增加选择功能,点击选择弹窗显示存货的库存明细

parent d1321201
...@@ -5,7 +5,7 @@ package com.baosight.hggp.hg.kc.constant; ...@@ -5,7 +5,7 @@ package com.baosight.hggp.hg.kc.constant;
* @date:2024/9/29,9:54 * @date:2024/9/29,9:54
*/ */
public class HgKcSqlConst { public class HgKcSqlConst {
/** /**
* HGKC008 SQL 定义 * HGKC008 SQL 定义
* *
...@@ -13,7 +13,7 @@ public class HgKcSqlConst { ...@@ -13,7 +13,7 @@ public class HgKcSqlConst {
* @date:2024/1/20,16:45 * @date:2024/1/20,16:45
*/ */
public class HgKc008 { public class HgKc008 {
// 锁 // 锁
public static final String LOCK = "HGKC008.lock"; public static final String LOCK = "HGKC008.lock";
// 修改状态 // 修改状态
...@@ -23,7 +23,7 @@ public class HgKcSqlConst { ...@@ -23,7 +23,7 @@ public class HgKcSqlConst {
// 修改 // 修改
public static final String UPDATE_RECEIVE_TYPE = "HGKC008.updateReceiveType"; public static final String UPDATE_RECEIVE_TYPE = "HGKC008.updateReceiveType";
} }
/** /**
* HGKC008A SQL 定义 * HGKC008A SQL 定义
* *
...@@ -31,7 +31,7 @@ public class HgKcSqlConst { ...@@ -31,7 +31,7 @@ public class HgKcSqlConst {
* @date:2024/1/20,16:45 * @date:2024/1/20,16:45
*/ */
public class HgKc008A { public class HgKc008A {
// 锁 // 锁
public static final String LOCK = "HGKC008A.lock"; public static final String LOCK = "HGKC008A.lock";
// 修改状态 // 修改状态
...@@ -41,7 +41,19 @@ public class HgKcSqlConst { ...@@ -41,7 +41,19 @@ public class HgKcSqlConst {
// 批量删除 // 批量删除
public static final String BATCH_DELETE = "HGKC008A.batchDelete"; public static final String BATCH_DELETE = "HGKC008A.batchDelete";
} }
/**
* HGKC013A SQL 定义
*
* @author:jhs
* @date:2024/10/30,16:45
*/
public class HgKc013A {
// 锁
public static final String LOCK = "HGKC013A.lock";
}
/** /**
* HGKC014 SQL 定义 * HGKC014 SQL 定义
* *
...@@ -49,7 +61,7 @@ public class HgKcSqlConst { ...@@ -49,7 +61,7 @@ public class HgKcSqlConst {
* @date:2024/1/20,16:45 * @date:2024/1/20,16:45
*/ */
public class HgKc014 { public class HgKc014 {
// 锁 // 锁
public static final String LOCK = "HGKC014.lock"; public static final String LOCK = "HGKC014.lock";
// 修改状态 // 修改状态
...@@ -57,7 +69,7 @@ public class HgKcSqlConst { ...@@ -57,7 +69,7 @@ public class HgKcSqlConst {
// 修改 // 修改
public static final String UPDATE_RECEIVE_TYPE = "HGKC014.updateReceiveType"; public static final String UPDATE_RECEIVE_TYPE = "HGKC014.updateReceiveType";
} }
/** /**
* HGKC014A SQL 定义 * HGKC014A SQL 定义
* *
...@@ -65,7 +77,7 @@ public class HgKcSqlConst { ...@@ -65,7 +77,7 @@ public class HgKcSqlConst {
* @date:2024/1/20,16:45 * @date:2024/1/20,16:45
*/ */
public class HgKc014A { public class HgKc014A {
// 锁 // 锁
public static final String LOCK = "HGKC014A.lock"; public static final String LOCK = "HGKC014A.lock";
// 修改状态 // 修改状态
...@@ -77,5 +89,5 @@ public class HgKcSqlConst { ...@@ -77,5 +89,5 @@ public class HgKcSqlConst {
// 实际入库数量 // 实际入库数量
public static final String UPDATE_ACTUAL_QTY = "HGKC014A.updateActualQty"; public static final String UPDATE_ACTUAL_QTY = "HGKC014A.updateActualQty";
} }
} }
package com.baosight.hggp.hg.kc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.common.InventTypeDetailEnum;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.constant.HGConstant;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.utils.HGKCUtils;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.*;
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.ServiceBase;
import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author:songx
* @date:2024/5/9,11:04
*/
public class ServiceHGKC013B extends ServiceBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "综合库存", operType = "查询", operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("inventTypeDetails", InventTypeDetailEnum.getInentTypeTwo());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_CODE_BLOCK_ID));
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_TYPE_BLOCK_ID), paramMap);
// CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_RECORD_BLOCK_ID), paramMap);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
EiInfoUtils.addBlock(inInfo, "roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGKC010().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation(operModul = "综合库存", operType = "查询", operDesc = "查询")
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
// inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "inventTypeDetails", InventTypeDetailEnum.getInentTypeTwo());
queryRow.put("isInvQty", CommonConstant.YesNo.YES_1);
inInfo = super.query(inInfo, HGSqlConstant.HgKc010.QUERY_LY, new HGKC010());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 确认操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "实时库存", operType = "查询", operDesc = "确认")
public EiInfo confirm(EiInfo inInfo) {
try {
String parentId = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0,
HGKC013A.FIELD_PARENT_ID);
List<HGKC010B> fKc010Bs = MapUtils.toDaoEPBases(inInfo, HGKC010B.class);
// db数据
Map<Long, HGKC010> dbKc010Map = HGKCUtils.HgKc010.lockGetDataEp(fKc010Bs);
// 调拨单明细
List<HGKC013A> dbKc013As = HGKCUtils.HgKc013A.listByPrimaryId(parentId);
// 调拨单主信息
HGKC013 hgkc013 = HGKCUtils.HgKc013.get(parentId);
// 数据校验
this.checkConfirmData(fKc010Bs, dbKc013As, dbKc010Map, hgkc013);
// 保存数据
this.confirmData(fKc010Bs, dbKc010Map, hgkc013);
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + fKc010Bs.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 确认数量
*
* @param fKc010Bs
* @param dbKc010Map
* @param dbKc013
*/
private void confirmData(List<HGKC010B> fKc010Bs, Map<Long, HGKC010> dbKc010Map, HGKC013 dbKc013) {
for (HGKC010B fKc010B : fKc010Bs) {
Long id = fKc010B.getId();
HGKC010 dbKc010 = dbKc010Map.get(id);
HGKC013A newKc013A = BeanUtils.copy(dbKc010, HGKC013A.class);
newKc013A.setParentId(dbKc013.getId());
newKc013A.setCalloutWhCode(dbKc013.getCalloutWhCode());
newKc013A.setCalloutWhName(dbKc013.getCalloutWhName());
newKc013A.setCallinWhCode(dbKc013.getCallinWhCode());
newKc013A.setCallinWhName(dbKc013.getCallinWhName());
//存货ID
newKc013A.setInventRecordId(dbKc010.getId());
newKc013A.setQuantity(fKc010B.getApplyQty());
newKc013A.setUnitWeight(fKc010B.getInvUnitWeight());
newKc013A.setWeight(fKc010B.getInvWeight());
newKc013A.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode());
DaoUtils.insert(HGKC013A.INSERT, newKc013A);
}
}
/**
* 数据校验
*
* @param fKc010Bs
* @param dbKc013As
* @param dbKc010Map
* @param dbKc013
*/
private void checkConfirmData(List<HGKC010B> fKc010Bs, List<HGKC013A> dbKc013As, Map<Long, HGKC010> dbKc010Map,
HGKC013 dbKc013) {
AssertUtils.isEquals(dbKc013.getStatus(), HGConstant.ProductStatus.YTJ, "调拨单已提交,不可修改");
for (HGKC013A dbKc013A : dbKc013As) {
for (Map.Entry<Long, HGKC010> dbKc010MapEntry : dbKc010Map.entrySet()) {
HGKC010 dbKc010 = dbKc010MapEntry.getValue();
AssertUtils.isEquals(dbKc010.getInventCode(), dbKc013A.getInventCode(),
String.format("此调拨单已选择存货:%s", dbKc010.getInventCode()));
}
}
for (HGKC010B fKc010B : fKc010Bs) {
AssertUtils.isGe(BigDecimal.ZERO, fKc010B.getApplyQty(), String.format("库存【%s】申请数量必须大于0",
fKc010B.getInventCode()));
// 查询已申请未提交的明细数量
BigDecimal applyQtySum = CollectionUtils.isEmpty(dbKc013As) ? BigDecimal.ZERO
: dbKc013As.stream().filter(o->o.getCalloutWhCode().equals(fKc010B.getWhCode()))
.map(HGKC013A::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal totalApplyQty = applyQtySum.add(fKc010B.getApplyQty());
HGKC010 dbKc010 = dbKc010Map.get(fKc010B.getId());
AssertUtils.isGt(totalApplyQty, dbKc010.getInvQty(), String.format("存货【%s(%s)】累计申请数量【%s】超过库存数量【%s】",
fKc010B.getInventCode(), fKc010B.getInventName(),
totalApplyQty.stripTrailingZeros().toPlainString(), dbKc010.getInvQty()));
}
}
}
...@@ -4,31 +4,31 @@ ...@@ -4,31 +4,31 @@
Version : 1.0 Version : 1.0
schema : hggp schema : hggp
tableName : HGKC013A tableName : HGKC013A
ID BIGINT NOT NULL primarykey, ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR, ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR, DEP_CODE VARCHAR,
CREATED_BY VARCHAR, CREATED_BY VARCHAR,
CREATED_NAME VARCHAR, CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR, CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR, UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR, UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR, UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT, DELETE_FLAG TINYINT,
CALLOUT_WH_CODE VARCHAR, CALLOUT_WH_CODE VARCHAR,
CALLOUT_WH_NAME VARCHAR, CALLOUT_WH_NAME VARCHAR,
CALLIN_WH_CODE VARCHAR, CALLIN_WH_CODE VARCHAR,
CALLIN_WH_NAME VARCHAR, CALLIN_WH_NAME VARCHAR,
INVENT_RECORD_ID BIGINT, INVENT_RECORD_ID BIGINT,
INVENT_TYPE VARCHAR, INVENT_TYPE VARCHAR,
INVENT_CODE VARCHAR NOT NULL, INVENT_CODE VARCHAR NOT NULL,
INVENT_NAME VARCHAR NOT NULL, INVENT_NAME VARCHAR NOT NULL,
SPEC VARCHAR, SPEC VARCHAR,
LENGTH DECIMAL, LENGTH DECIMAL,
WIDTH DECIMAL, WIDTH DECIMAL,
THICK DECIMAL, THICK DECIMAL,
QUANTITY DECIMAL, QUANTITY DECIMAL,
UNIT_WEIGHT DECIMAL, UNIT_WEIGHT DECIMAL,
WEIGHT DECIMAL, WEIGHT DECIMAL,
PARENT_ID BIGINT PARENT_ID BIGINT
--> -->
<sqlMap namespace="HGKC013A"> <sqlMap namespace="HGKC013A">
...@@ -156,6 +156,15 @@ ...@@ -156,6 +156,15 @@
UPDATED_TIME = #updatedTime# <!-- 记录修改时间 --> UPDATED_TIME = #updatedTime# <!-- 记录修改时间 -->
</sql> </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>
</sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGKC013A"> <select id="query" parameterClass="java.util.HashMap" resultClass="HGKC013A">
SELECT SELECT
<include refid="column"/> <include refid="column"/>
...@@ -340,4 +349,12 @@ ...@@ -340,4 +349,12 @@
ID = #id# ID = #id#
</update> </update>
</sqlMap> <!-- 行锁 -->
\ No newline at end of file <update id="lock">
UPDATE ${hggpSchema}.HGKC013A
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include refid="idCondition"/>
</update>
</sqlMap>
...@@ -1493,6 +1493,113 @@ public class HGKCTools { ...@@ -1493,6 +1493,113 @@ public class HGKCTools {
} }
/** /**
* HGKC013A 定义
*
* @author:jhs
* @date:2024/9/29,10:47
*/
public static class HgKc013A {
/**
* 锁
*
* @param ids
* @return
*/
public static void lockEx(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return;
}
Map paramMap = new HashMap();
paramMap.put("ids", ids);
DaoBase.getInstance().update(HgKcSqlConst.HgKc008A.LOCK, paramMap);
}
/**
* 锁
*
* @param ids
* @return
*/
public static void lock(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return;
}
Map paramMap = new HashMap();
paramMap.put("ids", ids);
DaoBase.getInstance().update(HgKcSqlConst.HgKc013A.LOCK, paramMap);
}
/**
* 查询
*
* @param ids
* @return
*/
public static List<HGKC013A> listEx(List<Long> ids) {
AssertUtils.isEmpty(ids, "ID不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("ids", ids);
return DaoBase.getInstance().query(HGKC013A.QUERY, paramMap);
}
/**
* 查询
*
* @param ids
* @return
*/
public static Map<Long, HGKC013A> mapEx(List<Long> ids) {
List<HGKC013A> results = listEx(ids);
return results.stream().collect(Collectors.toMap(HGKC013A::getId, item -> item));
}
/**
* 查询
*
* @param ids
* @return
*/
public static List<HGKC013A> list(List<Long> ids) {
AssertUtils.isEmpty(ids, "调拨明细id不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("ids", ids);
return DaoBase.getInstance().query(HGKC013A.QUERY, paramMap);
}
/**
* 查询
*
* @param ids
* @return
*/
public static Map<Long, HGKC013A> map(List<Long> ids) {
List<HGKC013A> results = list(ids);
return results.stream().collect(Collectors.toMap(HGKC013A::getId, item -> item));
}
/**
* 查询
*
* @param parentId
* @param whCode
* @param inventCode
* @return
*/
public static List<HGKC013A> listByInv(Long parentId,String whCode, String inventCode) {
if (Objects.isNull(parentId) || StringUtils.isBlank(whCode) || StringUtils.isBlank(inventCode)) {
return null;
}
Map<String, Object> paramMap = new HashMap();
paramMap.put(HGKC013A.FIELD_PARENT_ID, parentId);
paramMap.put(HGKC013A.FIELD_CALLOUT_WH_CODE, whCode);
paramMap.put(HGKC013A.FIELD_INVENT_CODE, inventCode);
return DaoBase.getInstance().query(HGKC013A.QUERY, paramMap);
}
}
/**
* HGKC014 定义 * HGKC014 定义
* *
* @author:songx * @author:songx
......
...@@ -5,18 +5,7 @@ import com.baosight.hggp.core.dao.DaoUtils; ...@@ -5,18 +5,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.enums.DeleteFlagEnum; import com.baosight.hggp.core.enums.DeleteFlagEnum;
import com.baosight.hggp.hg.cg.domain.HGCG003B; import com.baosight.hggp.hg.cg.domain.HGCG003B;
import com.baosight.hggp.hg.constant.HGSqlConstant; import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.kc.domain.HGKC001; import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.domain.HGKC002;
import com.baosight.hggp.hg.kc.domain.HGKC003;
import com.baosight.hggp.hg.kc.domain.HGKC006;
import com.baosight.hggp.hg.kc.domain.HGKC007;
import com.baosight.hggp.hg.kc.domain.HGKC008;
import com.baosight.hggp.hg.kc.domain.HGKC008A;
import com.baosight.hggp.hg.kc.domain.HGKC010;
import com.baosight.hggp.hg.kc.domain.HGKC010A;
import com.baosight.hggp.hg.kc.domain.HGKC011;
import com.baosight.hggp.hg.kc.domain.HGKC014;
import com.baosight.hggp.hg.kc.domain.HGKC014A;
import com.baosight.hggp.hg.kc.tools.HGKCTools; import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.pz.domain.HGPZ005; import com.baosight.hggp.hg.pz.domain.HGPZ005;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
...@@ -40,7 +29,7 @@ import java.util.Map; ...@@ -40,7 +29,7 @@ import java.util.Map;
* @date:2024/5/13,14:57 * @date:2024/5/13,14:57
*/ */
public class HGKCUtils { public class HGKCUtils {
/** /**
* HGKC001 工具类 * HGKC001 工具类
* *
...@@ -48,7 +37,7 @@ public class HGKCUtils { ...@@ -48,7 +37,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58 * @date:2024/5/9,16:58
*/ */
public static class HgKc001 { public static class HgKc001 {
/** /**
* 设置查询条件 * 设置查询条件
* *
...@@ -63,7 +52,7 @@ public class HGKCUtils { ...@@ -63,7 +52,7 @@ public class HGKCUtils {
queryRow.put(HGKC001.FIELD_DEPOSIT_DATE, DateUtils.formatShort(depositDate)); queryRow.put(HGKC001.FIELD_DEPOSIT_DATE, DateUtils.formatShort(depositDate));
} }
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -73,7 +62,7 @@ public class HGKCUtils { ...@@ -73,7 +62,7 @@ public class HGKCUtils {
public static Map<String, HGKC001> lockGetDataEp(List<? extends HGKC001> kc001s) { public static Map<String, HGKC001> lockGetDataEp(List<? extends HGKC001> kc001s) {
return lockGetData(ObjectUtils.listEpKey(kc001s, HGKC001.FIELD_DEPOSIT_NO)); return lockGetData(ObjectUtils.listEpKey(kc001s, HGKC001.FIELD_DEPOSIT_NO));
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -87,7 +76,7 @@ public class HGKCUtils { ...@@ -87,7 +76,7 @@ public class HGKCUtils {
return HGKCTools.HgKc001.map(depositNos); return HGKCTools.HgKc001.map(depositNos);
} }
} }
/** /**
* HGKC002 工具类 * HGKC002 工具类
* *
...@@ -95,7 +84,7 @@ public class HGKCUtils { ...@@ -95,7 +84,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58 * @date:2024/5/9,16:58
*/ */
public static class HgKc002 { public static class HgKc002 {
/** /**
* 设置查询条件 * 设置查询条件
* *
...@@ -110,7 +99,7 @@ public class HGKCUtils { ...@@ -110,7 +99,7 @@ public class HGKCUtils {
queryRow.put(HGKC002.FIELD_RECEIPT_DATE, DateUtils.formatShort(receiptDate)); queryRow.put(HGKC002.FIELD_RECEIPT_DATE, DateUtils.formatShort(receiptDate));
} }
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -120,7 +109,7 @@ public class HGKCUtils { ...@@ -120,7 +109,7 @@ public class HGKCUtils {
public static Map<String, HGKC002> lockGetDataEp(List<? extends HGKC002> kc002s) { public static Map<String, HGKC002> lockGetDataEp(List<? extends HGKC002> kc002s) {
return lockGetData(ObjectUtils.listEpKey(kc002s, HGKC002.FIELD_REQ_NO)); return lockGetData(ObjectUtils.listEpKey(kc002s, HGKC002.FIELD_REQ_NO));
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -134,7 +123,7 @@ public class HGKCUtils { ...@@ -134,7 +123,7 @@ public class HGKCUtils {
return HGKCTools.HgKc002.map(reqNos); return HGKCTools.HgKc002.map(reqNos);
} }
} }
/** /**
* HGKC003 工具类 * HGKC003 工具类
* *
...@@ -142,7 +131,7 @@ public class HGKCUtils { ...@@ -142,7 +131,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58 * @date:2024/5/9,16:58
*/ */
public static class HgKc003 { public static class HgKc003 {
/** /**
* 设置查询条件 * 设置查询条件
* *
...@@ -157,7 +146,7 @@ public class HGKCUtils { ...@@ -157,7 +146,7 @@ public class HGKCUtils {
queryRow.put(HGKC003.FIELD_DEPOSIT_DATE, DateUtils.formatShort(depositDate)); queryRow.put(HGKC003.FIELD_DEPOSIT_DATE, DateUtils.formatShort(depositDate));
} }
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -167,7 +156,7 @@ public class HGKCUtils { ...@@ -167,7 +156,7 @@ public class HGKCUtils {
public static Map<String, HGKC003> lockGetDataEp(List<? extends HGKC003> kc003s) { public static Map<String, HGKC003> lockGetDataEp(List<? extends HGKC003> kc003s) {
return lockGetData(ObjectUtils.listEpKey(kc003s, HGKC003.FIELD_DEPOSIT_NO)); return lockGetData(ObjectUtils.listEpKey(kc003s, HGKC003.FIELD_DEPOSIT_NO));
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -180,11 +169,11 @@ public class HGKCUtils { ...@@ -180,11 +169,11 @@ public class HGKCUtils {
// db数据 // db数据
return HGKCTools.HgKc003.map(depositNos); return HGKCTools.HgKc003.map(depositNos);
} }
} }
public static class HgKc006 { public static class HgKc006 {
/** /**
* 设置查询条件 * 设置查询条件
* *
...@@ -199,9 +188,9 @@ public class HGKCUtils { ...@@ -199,9 +188,9 @@ public class HGKCUtils {
} }
} }
} }
public static class HgKc007 { public static class HgKc007 {
/** /**
* 设置查询条件 * 设置查询条件
* *
...@@ -215,7 +204,7 @@ public class HGKCUtils { ...@@ -215,7 +204,7 @@ public class HGKCUtils {
queryRow.put(HGKC007.FIELD_OTHER_OUT_DATE, DateUtils.formatShort(otherOutDate)); queryRow.put(HGKC007.FIELD_OTHER_OUT_DATE, DateUtils.formatShort(otherOutDate));
} }
} }
/** /**
* 查询 * 查询
* *
...@@ -229,7 +218,7 @@ public class HGKCUtils { ...@@ -229,7 +218,7 @@ public class HGKCUtils {
return DaoBase.getInstance().query(HGCG003B.QUERY, paramMap); return DaoBase.getInstance().query(HGCG003B.QUERY, paramMap);
} }
} }
/** /**
* HGKC008 定义 * HGKC008 定义
* *
...@@ -237,7 +226,7 @@ public class HGKCUtils { ...@@ -237,7 +226,7 @@ public class HGKCUtils {
* @date:2024/9/29,10:02 * @date:2024/9/29,10:02
*/ */
public static class HgKc008 { public static class HgKc008 {
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -247,7 +236,7 @@ public class HGKCUtils { ...@@ -247,7 +236,7 @@ public class HGKCUtils {
public static Map<String, HGKC008> lockGetDataEp(List<? extends HGKC008> kc008s) { public static Map<String, HGKC008> lockGetDataEp(List<? extends HGKC008> kc008s) {
return lockGetData(ObjectUtils.listEpKey(kc008s, HGKC008.FIELD_APPLY_CODE)); return lockGetData(ObjectUtils.listEpKey(kc008s, HGKC008.FIELD_APPLY_CODE));
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -260,7 +249,7 @@ public class HGKCUtils { ...@@ -260,7 +249,7 @@ public class HGKCUtils {
// db数据 // db数据
return HGKCTools.HgKc008.map(applyCodes); return HGKCTools.HgKc008.map(applyCodes);
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -273,7 +262,7 @@ public class HGKCUtils { ...@@ -273,7 +262,7 @@ public class HGKCUtils {
// db数据 // db数据
return HGKCTools.HgKc008.mapEx(ids); return HGKCTools.HgKc008.mapEx(ids);
} }
/** /**
* 查询 * 查询
* *
...@@ -287,15 +276,15 @@ public class HGKCUtils { ...@@ -287,15 +276,15 @@ public class HGKCUtils {
List<HGKC008> hgkc008List = DaoBase.getInstance().query(HGKC008.QUERY, paramMap); List<HGKC008> hgkc008List = DaoBase.getInstance().query(HGKC008.QUERY, paramMap);
return hgkc008List.get(0); return hgkc008List.get(0);
} }
} }
/** /**
* @author:songx * @author:songx
* @date:2024/9/29,10:30 * @date:2024/9/29,10:30
*/ */
public static class HgKc008A { public static class HgKc008A {
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -305,7 +294,7 @@ public class HGKCUtils { ...@@ -305,7 +294,7 @@ public class HGKCUtils {
public static Map<String, HGKC008A> lockGetDataEp(List<? extends HGKC008A> kc008As) { public static Map<String, HGKC008A> lockGetDataEp(List<? extends HGKC008A> kc008As) {
return lockGetData(ObjectUtils.listEpKey(kc008As, HGKC008A.FIELD_APPLY_LINE_CODE)); return lockGetData(ObjectUtils.listEpKey(kc008As, HGKC008A.FIELD_APPLY_LINE_CODE));
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -321,8 +310,8 @@ public class HGKCUtils { ...@@ -321,8 +310,8 @@ public class HGKCUtils {
// db数据 // db数据
return HGKCTools.HgKc008A.map(applyLineCodes); return HGKCTools.HgKc008A.map(applyLineCodes);
} }
/** /**
* 查询 * 查询
* *
...@@ -336,7 +325,7 @@ public class HGKCUtils { ...@@ -336,7 +325,7 @@ public class HGKCUtils {
return DaoBase.getInstance().query(HGKC008A.QUERY, paramMap); return DaoBase.getInstance().query(HGKC008A.QUERY, paramMap);
} }
} }
/** /**
* HGKC010 工具类 * HGKC010 工具类
* *
...@@ -344,7 +333,7 @@ public class HGKCUtils { ...@@ -344,7 +333,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58 * @date:2024/5/9,16:58
*/ */
public static class HgKc010 { public static class HgKc010 {
/** /**
* 更新库存 * 更新库存
* *
...@@ -358,7 +347,7 @@ public class HGKCUtils { ...@@ -358,7 +347,7 @@ public class HGKCUtils {
BigDecimal weight) { BigDecimal weight) {
updateInv(companyCode, whCode, inventCode, qty, null, weight); updateInv(companyCode, whCode, inventCode, qty, null, weight);
} }
/** /**
* 更新库存 * 更新库存
* *
...@@ -384,7 +373,7 @@ public class HGKCUtils { ...@@ -384,7 +373,7 @@ public class HGKCUtils {
updateInvData(newKc010, dbKc010); updateInvData(newKc010, dbKc010);
} }
} }
/** /**
* 构建对象 * 构建对象
* *
...@@ -407,7 +396,7 @@ public class HGKCUtils { ...@@ -407,7 +396,7 @@ public class HGKCUtils {
newKc010.setInvWeight(weight); newKc010.setInvWeight(weight);
return newKc010; return newKc010;
} }
/** /**
* 参数校验 * 参数校验
* *
...@@ -427,7 +416,7 @@ public class HGKCUtils { ...@@ -427,7 +416,7 @@ public class HGKCUtils {
AssertUtils.isTrue(qty.compareTo(BigDecimal.ZERO) == 0 AssertUtils.isTrue(qty.compareTo(BigDecimal.ZERO) == 0
&& weight.compareTo(BigDecimal.ZERO) == 0, "库存变更数量和重量不能为空"); && weight.compareTo(BigDecimal.ZERO) == 0, "库存变更数量和重量不能为空");
} }
/** /**
* 新增库存 * 新增库存
* *
...@@ -453,7 +442,7 @@ public class HGKCUtils { ...@@ -453,7 +442,7 @@ public class HGKCUtils {
newKc010.setInventTypeDetail(dbPz005.getInventTypeDetail()); newKc010.setInventTypeDetail(dbPz005.getInventTypeDetail());
DaoUtils.insert(HGKC010.INSERT, newKc010); DaoUtils.insert(HGKC010.INSERT, newKc010);
} }
/** /**
* 修改库存 * 修改库存
* *
...@@ -473,7 +462,7 @@ public class HGKCUtils { ...@@ -473,7 +462,7 @@ public class HGKCUtils {
dbKc010.setInvUnitWeight(newUnitWeight); dbKc010.setInvUnitWeight(newUnitWeight);
DaoUtils.update(HGKC010.UPDATE_INV, dbKc010); DaoUtils.update(HGKC010.UPDATE_INV, dbKc010);
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -483,7 +472,7 @@ public class HGKCUtils { ...@@ -483,7 +472,7 @@ public class HGKCUtils {
public static Map<Long, HGKC010> lockGetDataEp(List<? extends HGKC010> kc010s) { public static Map<Long, HGKC010> lockGetDataEp(List<? extends HGKC010> kc010s) {
return lockGetData(ObjectUtils.listEpKey(kc010s, HGKC010.FIELD_ID)); return lockGetData(ObjectUtils.listEpKey(kc010s, HGKC010.FIELD_ID));
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -496,9 +485,9 @@ public class HGKCUtils { ...@@ -496,9 +485,9 @@ public class HGKCUtils {
// db数据 // db数据
return HGKCTools.HgKc010.map(ids); return HGKCTools.HgKc010.map(ids);
} }
} }
/** /**
* HGKC010 工具类 * HGKC010 工具类
* *
...@@ -506,7 +495,7 @@ public class HGKCUtils { ...@@ -506,7 +495,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58 * @date:2024/5/9,16:58
*/ */
public static class HgKc010A { public static class HgKc010A {
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -516,7 +505,7 @@ public class HGKCUtils { ...@@ -516,7 +505,7 @@ public class HGKCUtils {
public static Map<Long, HGKC010A> lockGetDataEp(List<HGKC010A> kc010s) { public static Map<Long, HGKC010A> lockGetDataEp(List<HGKC010A> kc010s) {
return lockGetData(ObjectUtils.listEpKey(kc010s, HGKC010A.FIELD_ID)); return lockGetData(ObjectUtils.listEpKey(kc010s, HGKC010A.FIELD_ID));
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -530,7 +519,7 @@ public class HGKCUtils { ...@@ -530,7 +519,7 @@ public class HGKCUtils {
return HGKCTools.HgKc010A.map(ids); return HGKCTools.HgKc010A.map(ids);
} }
} }
/** /**
* HGKC011 工具类 * HGKC011 工具类
* *
...@@ -538,7 +527,7 @@ public class HGKCUtils { ...@@ -538,7 +527,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58 * @date:2024/5/9,16:58
*/ */
public static class HgKc011 { public static class HgKc011 {
/** /**
* 更新库存 * 更新库存
* *
...@@ -552,7 +541,7 @@ public class HGKCUtils { ...@@ -552,7 +541,7 @@ public class HGKCUtils {
BigDecimal weight) { BigDecimal weight) {
updateInv(companyCode, whCode, prodOrderNo, qty, null, weight); updateInv(companyCode, whCode, prodOrderNo, qty, null, weight);
} }
/** /**
* 更新库存 * 更新库存
* *
...@@ -578,7 +567,7 @@ public class HGKCUtils { ...@@ -578,7 +567,7 @@ public class HGKCUtils {
updateInvData(newKc011, dbKc011); updateInvData(newKc011, dbKc011);
} }
} }
/** /**
* 构建对象 * 构建对象
* *
...@@ -601,7 +590,7 @@ public class HGKCUtils { ...@@ -601,7 +590,7 @@ public class HGKCUtils {
newKc011.setInvWeight(weight); newKc011.setInvWeight(weight);
return newKc011; return newKc011;
} }
/** /**
* 参数校验 * 参数校验
* *
...@@ -621,7 +610,7 @@ public class HGKCUtils { ...@@ -621,7 +610,7 @@ public class HGKCUtils {
AssertUtils.isTrue(qty.compareTo(BigDecimal.ZERO) == 0 AssertUtils.isTrue(qty.compareTo(BigDecimal.ZERO) == 0
&& weight.compareTo(BigDecimal.ZERO) == 0, "库存变更数量和重量不能为0"); && weight.compareTo(BigDecimal.ZERO) == 0, "库存变更数量和重量不能为0");
} }
/** /**
* 新增库存 * 新增库存
* *
...@@ -644,7 +633,7 @@ public class HGKCUtils { ...@@ -644,7 +633,7 @@ public class HGKCUtils {
newKc011.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode()); newKc011.setDeleteFlag(DeleteFlagEnum.UN_REMOVE.getCode());
DaoUtils.insert(HGKC011.INSERT, newKc011); DaoUtils.insert(HGKC011.INSERT, newKc011);
} }
/** /**
* 修改库存 * 修改库存
* *
...@@ -663,7 +652,7 @@ public class HGKCUtils { ...@@ -663,7 +652,7 @@ public class HGKCUtils {
dbKc011.setInvUnitWeight(newUnitWeight); dbKc011.setInvUnitWeight(newUnitWeight);
DaoUtils.update(HGSqlConstant.HgKc011.UPDATE_INV, dbKc011); DaoUtils.update(HGSqlConstant.HgKc011.UPDATE_INV, dbKc011);
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -673,7 +662,7 @@ public class HGKCUtils { ...@@ -673,7 +662,7 @@ public class HGKCUtils {
public static Map<Long, HGKC010> lockGetDataEp(List<? extends HGKC010> kc010s) { public static Map<Long, HGKC010> lockGetDataEp(List<? extends HGKC010> kc010s) {
return lockGetData(ObjectUtils.listEpKey(kc010s, HGKC010.FIELD_ID)); return lockGetData(ObjectUtils.listEpKey(kc010s, HGKC010.FIELD_ID));
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -686,9 +675,81 @@ public class HGKCUtils { ...@@ -686,9 +675,81 @@ public class HGKCUtils {
// db数据 // db数据
return HGKCTools.HgKc010.map(ids); return HGKCTools.HgKc010.map(ids);
} }
}
/**
* HGKC013 定义
*
* @author:jhs
* @date:2024/10/30,10:02
*/
public static class HgKc013 {
/**
* 查询
*
* @param parentId
* @return
*/
public static HGKC013 get(String parentId) {
AssertUtils.isNull(parentId, "调拨单id不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("id", parentId);
List<HGKC013> hgkc013List = DaoBase.getInstance().query(HGKC013.QUERY, paramMap);
return hgkc013List.get(0);
}
} }
/**
* @author:jhs
* @date:2024/10/30,10:30
*/
public static class HgKc013A {
/**
* 锁并且获取数据
*
* @param kc013As
* @return
*/
public static Map<Long, HGKC013A> lockGetDataEp(List<? extends HGKC013A> kc013As) {
return lockGetData(ObjectUtils.listEpKey(kc013As, HGKC013A.FIELD_ID));
}
/**
* 锁并且获取数据
*
* @param ids
* @return
*/
public static Map<Long, HGKC013A> lockGetData(List<Long> ids) {
if (CollectionUtils.isEmpty(ids)) {
return null;
}
// 锁
HGKCTools.HgKc013A.lock(ids);
// db数据
return HGKCTools.HgKc013A.map(ids);
}
/**
* 查询
*
* @param parentId
* @return
*/
public static List<HGKC013A> listByPrimaryId(String parentId) {
AssertUtils.isEmpty(parentId, "调拨单id不能为空");
Map<String, Object> paramMap = new HashMap();
paramMap.put("parentId", parentId);
return DaoBase.getInstance().query(HGKC013A.QUERY, paramMap);
}
}
/** /**
* HGKC014 工具类 * HGKC014 工具类
* *
...@@ -696,7 +757,7 @@ public class HGKCUtils { ...@@ -696,7 +757,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58 * @date:2024/5/9,16:58
*/ */
public static class HgKc014 { public static class HgKc014 {
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -709,9 +770,9 @@ public class HGKCUtils { ...@@ -709,9 +770,9 @@ public class HGKCUtils {
// db数据 // db数据
return HGKCTools.HgKc014.map(depositCodes); return HGKCTools.HgKc014.map(depositCodes);
} }
} }
/** /**
* HGKC014 工具类 * HGKC014 工具类
* *
...@@ -719,7 +780,7 @@ public class HGKCUtils { ...@@ -719,7 +780,7 @@ public class HGKCUtils {
* @date:2024/5/9,16:58 * @date:2024/5/9,16:58
*/ */
public static class HgKc014A { public static class HgKc014A {
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -729,7 +790,7 @@ public class HGKCUtils { ...@@ -729,7 +790,7 @@ public class HGKCUtils {
public static Map<Long, HGKC014A> lockGetDataEp(List<? extends HGKC014A> kc014As) { public static Map<Long, HGKC014A> lockGetDataEp(List<? extends HGKC014A> kc014As) {
return lockGetData(ObjectUtils.listEpKey(kc014As, HGKC014A.FIELD_ID)); return lockGetData(ObjectUtils.listEpKey(kc014As, HGKC014A.FIELD_ID));
} }
/** /**
* 锁并且获取数据 * 锁并且获取数据
* *
...@@ -742,6 +803,6 @@ public class HGKCUtils { ...@@ -742,6 +803,6 @@ public class HGKCUtils {
// db数据 // db数据
return HGKCTools.HgKc014A.map(ids); return HGKCTools.HgKc014A.map(ids);
} }
} }
} }
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true" copyToAdd="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="left"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="180" align="left"/>
<EF:EFComboColumn cname="类型" ename="receiveType" width="80" align="center" required="false" enable="false"> <EF:EFComboColumn cname="类型" ename="receiveType" width="80" align="center" required="false" enable="false">
<EF:EFCodeOption codeName="hggp.receiveType"/> <EF:EFCodeOption codeName="hggp.receiveType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
......
...@@ -21,9 +21,9 @@ $(function (){ ...@@ -21,9 +21,9 @@ $(function (){
}, },
toolbarConfig: { toolbarConfig: {
// hidden: false, // true时,不显示功能按钮,但保留setting导出按钮 // hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
add: receiveDataSource === 2 ? false : true, // 不显示新增按钮 add: receiveDataSource == 2 ? false : true, // 不显示新增按钮
add: receiveDataSource === 2 ? false : true, // 不显示取消按钮 save: receiveDataSource == 2 ? false : true, // 不显示保存按钮
save: receiveDataSource === 2 ? false : true // 不显示保存按钮 cancel: receiveDataSource == 2 ? false : true // 不显示取消按钮
// delete: false, // 显示删除按钮 // delete: false, // 显示删除按钮
}, },
beforeEdit: function (e) { beforeEdit: function (e) {
......
...@@ -13,6 +13,12 @@ $(function() { ...@@ -13,6 +13,12 @@ $(function() {
pageSize: 10, pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200] pageSizes: [10, 20, 30, 50, 100, 200]
}, },
toolbarConfig: {
// hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
add: false, // 不显示新增按钮
cancel : false
// delete: false, // 显示删除按钮
},
columns: [{ columns: [{
field: "inventType", field: "inventType",
filter: function (options) { filter: function (options) {
...@@ -23,73 +29,6 @@ $(function() { ...@@ -23,73 +29,6 @@ $(function() {
editor: function (container, options) { editor: function (container, options) {
this.filter(options); this.filter(options);
} }
}, {
field: "inventCode",
title: "存货名称",
filter: function (options) {
let inventType = options.model["inventType"];
/*if (inventType){
return _.filter(inventCodedBox, function (item) {
return item["param1Field"] === inventType;
})
}*/
return options.values;
},
template: function (dataItem) {
for (let i = 0; i < inventCodedBox.length; i++) {
if (inventCodedBox[i]['valueField'] === dataItem['inventCode']){
dataItem['inventName'] = inventCodedBox[i]['textField']
dataItem['inventRecordId'] = inventCodedBox[i]['param2Field'];
return inventCodedBox[i]['textField'];
}
}
return dataItem["inventCode"];
},
editor: function (container, options) {
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
input.kendoDropDownList({
dataSource: inventCodedBox,
minLength: 0,
dataTextField: "textField",
dataValueField: "valueField",
optionLabelTemplate: "#:valueField#-#:textField#-#:param3Field#",
valueTemplate: "#:valueField#-#:textField#-#:param3Field#",
template: "#:valueField#-#:textField#-#:param3Field#",
filter: "contains"
});
}
}, {
field: "spec",
filter: function (options) {
let specId = options.model["inventRecordId"];
if (specId){
return _.filter(specIdBox, function (item) {
return item["param7Field"] === specId;
})
}
return options.values;
},
template: function (item) {
return $.trim(item.spec) == "" ? "" : item.spec;
}
}, {
field: "length",
template: function (item) {
return item.length == 0 ? "-" : item.length;
}
}, {
field: "width",
template: function (item) {
return item.width == 0 ? "-" : item.width;
}
}, {
field: "thick",
template: function (item) {
return item.thick == 0 ? "-" : item.thick;
}
}/*, { }/*, {
field: "unitWeight", field: "unitWeight",
format: "{0:n3}", format: "{0:n3}",
...@@ -171,6 +110,8 @@ $(function() { ...@@ -171,6 +110,8 @@ $(function() {
//deleteFunc(); //deleteFunc();
} }
} }
// 选择存货
$("#SELECT_INVENT").on("click", selectInvent);
downKeyUp(); downKeyUp();
}); });
...@@ -261,4 +202,33 @@ let deleteFunc = function () { ...@@ -261,4 +202,33 @@ let deleteFunc = function () {
JSUtils.submitGridsData("result", "HGKC004A", "delete", true); JSUtils.submitGridsData("result", "HGKC004A", "delete", true);
} }
}); });
} }
\ No newline at end of file
/**
* 选择
*/
let selectInvent = function () {
let params = {
"inqu_status-0-parentId": $("#inqu_status-0-parentId").val(),
"inqu_status-0-companyCode": $("#inqu_status-0-calloutCompanyCode").val(),
"inqu_status-0-whCode": $("#inqu_status-0-calloutWhCode").val()
}
JSColorbox.open({
href: "HGKC013B",
title: "<div style='text-align: center;'>综合实时库存</div>",
width: "90%",
height: "90%",
params: params,
callbackName: selectInventCallback
});
}
/**
* 选择回调
*/
let selectInventCallback = function () {
// 刷新页面
query();
// 关闭弹窗
JSColorbox.close();
}
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
<EF:EFInput blockId="inqu_status" row="0" ename="callinWhName" cname="调入仓库名称" colWidth="3" readonly="true"/> <EF:EFInput blockId="inqu_status" row="0" ename="callinWhName" cname="调入仓库名称" colWidth="3" readonly="true"/>
<EF:EFInput blockId="inqu_status" row="0" ename="calloutWhCode" cname="调出仓库编码" colWidth="3" type="hidden" readonly="true"/> <EF:EFInput blockId="inqu_status" row="0" ename="calloutWhCode" cname="调出仓库编码" colWidth="3" type="hidden" readonly="true"/>
<EF:EFInput blockId="inqu_status" row="0" ename="callinWhCode" cname="调入仓库编码" colWidth="3" type="hidden" readonly="true"/> <EF:EFInput blockId="inqu_status" row="0" ename="callinWhCode" cname="调入仓库编码" colWidth="3" type="hidden" readonly="true"/>
<EF:EFInput blockId="inqu_status" row="0" ename="calloutCompanyCode" cname="调出公司编码" colWidth="3" type="hidden" readonly="true"/>
<EF:EFInput blockId="inqu_status" row="0" ename="callinCompanyCode" cname="调入公司编码" colWidth="3" type="hidden" readonly="true"/>
<EF:EFInput blockId="inqu_status" row="0" ename="inventName" cname="存货名称" colWidth="3" placeholder="模糊查询"/> <EF:EFInput blockId="inqu_status" row="0" ename="inventName" cname="存货名称" colWidth="3" placeholder="模糊查询"/>
<EF:EFInput blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" type="hidden"/> <EF:EFInput blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="parentId" cname="上级ID" colWidth="3" type="hidden"/> <EF:EFInput blockId="inqu_status" row="0" ename="parentId" cname="上级ID" colWidth="3" type="hidden"/>
...@@ -33,23 +35,24 @@ ...@@ -33,23 +35,24 @@
<%--<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" <%--<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center"
blockName="invent_code_box_block_id" textField="textField" valueField="valueField" blockName="invent_code_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" filter="contains" />--%> columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" filter="contains" />--%>
<EF:EFColumn ename="inventCode" cname="存货名称" enable="true" required="true" readonly="false" width="200" align="center"/> <EF:EFColumn ename="inventCode" cname="存货编码" enable="false" required="false" readonly="true" width="120" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true" <EF:EFColumn ename="inventName" cname="存货名称" enable="false" required="false" readonly="true" width="200" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="120" align="center" required="false"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField" blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/> <EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true" <EF:EFComboColumn ename="spec" cname="规格" enable="false" width="120" align="center" required="false"
blockName="spec_box_block_id" textField="textField" valueField="valueField" blockName="spec_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<%--defaultValue="0"--%> <%--defaultValue="0"--%>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/> <EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="false" 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="length" cname="长度(MM)" enable="false" readonly="true" 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="width" cname="宽度(MM)" enable="false" readonly="true" 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="thick" cname="厚度(MM)" enable="false" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N3}" editType="text" <EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true" data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
......
$(function () {
IPLATUI.EFGrid = {
"result": {
exportGrid: false, // 隐藏右侧自定义导出按钮
columns: []
},
};
// 查询
$("#QUERY").on("click", query);
// 确认
$("#CONFIRM").on("click", confirm);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
//存货编号查询条件
// initInventCode();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1); // 点击查询按钮,从第1页开始查询
}
/**
* 选择
*/
let confirm = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
let applyQty = rows[i]['applyQty'];
let invQty = rows[i]['invQty'];
if (!isPositiveNumber(applyQty)) {
message("勾选的第" + (i + 1) + "行申请数量必须大于0");
return;
}
if (parseFloat(invQty) < parseFloat(applyQty)) {
message("勾选的第" + (i + 1) + "行申请数量不能大于库存数量");
return;
}
}
JSUtils.confirm("确定对勾选的[" + rows.length + "]条数据进行\"调拨\"操作吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HGKC013B", "confirm",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
/**
* 存货编号
*/
let initInventCode = function () {
//物料信息下拉
var inInfo=new EiInfo();
EiCommunicator.send("HGPZ005", "queryComboBox", inInfo, {
onSuccess: function (ei) {
let dataSource;
var input=$("#inqu_status-0-inventCode");
dataSource=ei.getBlock("invent_record_block_id").getMappedRows();
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
optionLabel:"请选择",
dataSource: dataSource,
template: "[#:valueField#]#:textField#|#:param2Field#",
filter: "contains"
});
}, onFail: function (ei) {
}
}, {async: false});
}
<!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="查询条件">
<EF:EFInput ename="inqu_status-0-companyCode" cname="公司编号" colWidth="3" type="hidden"/>
<EF:EFInput ename="inqu_status-0-parentId" cname="领料单id" colWidth="3" type="hidden"/>
<div class="row">
<EF:EFSelect cname="仓库" ename="whCode" blockId="inqu_status" row="0" colWidth="3"
optionLabel="全部" defultValue="" readonly="true">
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货类型" ename="inventType" blockId="inqu_status" row="0" colWidth="3"
optionLabel="全部" defultValue="" filter="contains">
<EF:EFOptions blockId="invent_type_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput cname="存货编码" ename="inventCode" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="存货名称" ename="inventName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="companyName" cname="公司名称" enable="false" width="130" align="center" hidden="true"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="120" align="center"
blockName="wh_record_block_id" textField="textField" valueField="valueField">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center"
blockName="invent_type_block_id" textField="textField" valueField="valueField">
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="specId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="applyQty" cname="申请数量" width="120" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="invQty" cname="库存数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invUnitWeight" cname="单重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="库存总重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(MM)" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
<EF:EFColumn ename="updatedName" cname="更新人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="updatedTime" cname="更新时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
</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