Commit bb24660c by 宋祥

1.库存盘点逻辑开发

2.存货类型页面显示优化
parent 091bf229
...@@ -17,7 +17,7 @@ public class HPConstant { ...@@ -17,7 +17,7 @@ public class HPConstant {
//项目档案编号 //项目档案编号
public static final String PROJ_NUMBER = "PROJ_NUMBER"; public static final String PROJ_NUMBER = "PROJ_NUMBER";
// 盘点单号 // 盘点单号
public static final String STATISTICAL_NUMBER = "STATISTICAL_NUMBER"; public static final String CHECK_NO = "STATISTICAL_NUMBER";
// 统计单号 // 统计单号
public static final String HPKC008_NUMBER = "HPKC008_NUMBER"; public static final String HPKC008_NUMBER = "HPKC008_NUMBER";
// 巡检单号 // 巡检单号
......
...@@ -7,6 +7,20 @@ package com.baosight.hpjx.hp.constant; ...@@ -7,6 +7,20 @@ package com.baosight.hpjx.hp.constant;
public class HPSqlConstant { public class HPSqlConstant {
/** /**
* HPKC005 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public class HPKC005 {
// 查询
public static final String QUERY_SUM = "HPKC005.querySum";
// 锁
public static final String LOCK = "HPKC005.lock";
}
/**
* HPKC006 SQL 定义 * HPKC006 SQL 定义
* *
* @author:songx * @author:songx
......
...@@ -16,13 +16,13 @@ import com.baosight.iplat4j.core.util.StringUtils; ...@@ -16,13 +16,13 @@ import com.baosight.iplat4j.core.util.StringUtils;
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br> * Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
* *
* @version 1.0 * @version 1.0
* @history 2024-01-23 20:37:58 create * @history 2024-01-24 16:06:39 create
*/ */
public class HPKC006 extends DaoEPBase { public class HPKC006 extends DaoEPBase {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final String FIELD_ID = "id"; public static final String FIELD_ID = "id";
public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/ public static final String FIELD_COMPANY_CODE = "companyCode"; /* 企业编码 预留*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/ public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期*/ public static final String FIELD_RECEIPT_DATE = "receiptDate"; /* 单据日期*/
...@@ -37,14 +37,16 @@ public class HPKC006 extends DaoEPBase { ...@@ -37,14 +37,16 @@ public class HPKC006 extends DaoEPBase {
public static final String FIELD_WEIGHT = "weight"; /* 重量*/ public static final String FIELD_WEIGHT = "weight"; /* 重量*/
public static final String FIELD_STATUS = "status"; /* 状态 0审核 1保存*/ public static final String FIELD_STATUS = "status"; /* 状态 0审核 1保存*/
public static final String FIELD_REMARK = "remark"; /* 备注*/ public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_OLD_ENTER_NO = "oldEnterNo"; /* 原入库单号*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/ public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/ public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/ public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/ public static final String FIELD_UPDATED_BY = "updatedBy"; /* 更新人*/
public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/ public static final String FIELD_UPDATED_NAME = "updatedName"; /* 更新人名称*/
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码 预留*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/ public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期*/ public static final String COL_RECEIPT_DATE = "RECEIPT_DATE"; /* 单据日期*/
...@@ -59,12 +61,14 @@ public class HPKC006 extends DaoEPBase { ...@@ -59,12 +61,14 @@ public class HPKC006 extends DaoEPBase {
public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/ public static final String COL_WEIGHT = "WEIGHT"; /* 重量*/
public static final String COL_STATUS = "STATUS"; /* 状态 0审核 1保存*/ public static final String COL_STATUS = "STATUS"; /* 状态 0审核 1保存*/
public static final String COL_REMARK = "REMARK"; /* 备注*/ public static final String COL_REMARK = "REMARK"; /* 备注*/
public static final String COL_OLD_ENTER_NO = "OLD_ENTER_NO"; /* 原入库单号*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/ public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/ public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/ public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/ public static final String COL_UPDATED_BY = "UPDATED_BY"; /* 更新人*/
public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/ public static final String COL_UPDATED_NAME = "UPDATED_NAME"; /* 更新人名称*/
public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/ public static final String COL_UPDATED_TIME = "UPDATED_TIME"; /* 更新时间*/
public static final String COL_DELETE_FLAG = "DELETE_FLAG"; /* 是否删除0.否1.是*/
public static final String QUERY = "HPKC006.query"; public static final String QUERY = "HPKC006.query";
public static final String COUNT = "HPKC006.count"; public static final String COUNT = "HPKC006.count";
...@@ -85,14 +89,16 @@ public class HPKC006 extends DaoEPBase { ...@@ -85,14 +89,16 @@ public class HPKC006 extends DaoEPBase {
private Long inventRecordId = null; /* 规格*/ private Long inventRecordId = null; /* 规格*/
private BigDecimal amount = new BigDecimal(0.00); /* 数量*/ private BigDecimal amount = new BigDecimal(0.00); /* 数量*/
private BigDecimal weight = new BigDecimal(0.00); /* 重量*/ private BigDecimal weight = new BigDecimal(0.00); /* 重量*/
private Integer status; /* 状态 0审核 1保存*/ private Integer status = new Integer(0); /* 状态 0审核 1保存*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private String oldEnterNo = " "; /* 原入库单号*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
private String createdName = " "; /* 创建人名称*/ private String createdName = " "; /* 创建人名称*/
private String createdTime = " "; /* 创建时间*/ private String createdTime = " "; /* 创建时间*/
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 更新人名称*/ private String updatedName = " "; /* 更新人名称*/
private String updatedTime = " "; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag = new Integer(0); /* 是否删除0.否1.是*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -167,6 +173,10 @@ public class HPKC006 extends DaoEPBase { ...@@ -167,6 +173,10 @@ public class HPKC006 extends DaoEPBase {
eiColumn.setDescName("备注"); eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_OLD_ENTER_NO);
eiColumn.setDescName("原入库单号");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY); eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人"); eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
...@@ -191,6 +201,10 @@ public class HPKC006 extends DaoEPBase { ...@@ -191,6 +201,10 @@ public class HPKC006 extends DaoEPBase {
eiColumn.setDescName("更新时间"); eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DELETE_FLAG);
eiColumn.setDescName("是否删除0.否1.是");
eiMetadata.addMeta(eiColumn);
} }
...@@ -212,7 +226,7 @@ public class HPKC006 extends DaoEPBase { ...@@ -212,7 +226,7 @@ public class HPKC006 extends DaoEPBase {
/** /**
* set the id . * set the id .
* *
* @param id * @param id
*/ */
public void setId(Integer id) { public void setId(Integer id) {
this.id = id; this.id = id;
...@@ -442,6 +456,22 @@ public class HPKC006 extends DaoEPBase { ...@@ -442,6 +456,22 @@ public class HPKC006 extends DaoEPBase {
this.remark = remark; this.remark = remark;
} }
/** /**
* get the oldEnterNo - 原入库单号.
* @return the oldEnterNo
*/
public String getOldEnterNo() {
return this.oldEnterNo;
}
/**
* set the oldEnterNo - 原入库单号.
*
* @param oldEnterNo - 原入库单号
*/
public void setOldEnterNo(String oldEnterNo) {
this.oldEnterNo = oldEnterNo;
}
/**
* get the createdBy - 创建人. * get the createdBy - 创建人.
* @return the createdBy * @return the createdBy
*/ */
...@@ -538,6 +568,22 @@ public class HPKC006 extends DaoEPBase { ...@@ -538,6 +568,22 @@ public class HPKC006 extends DaoEPBase {
this.updatedTime = updatedTime; this.updatedTime = updatedTime;
} }
/** /**
* get the deleteFlag - 是否删除0.否1.是.
* @return the deleteFlag
*/
public Integer getDeleteFlag() {
return this.deleteFlag;
}
/**
* set the deleteFlag - 是否删除0.否1.是.
*
* @param deleteFlag - 是否删除0.否1.是
*/
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
/**
* get the value from Map. * get the value from Map.
* *
* @param map - source data map * @param map - source data map
...@@ -560,12 +606,14 @@ public class HPKC006 extends DaoEPBase { ...@@ -560,12 +606,14 @@ public class HPKC006 extends DaoEPBase {
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight)); setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status)); setStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_STATUS)), status));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setOldEnterNo(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_OLD_ENTER_NO)), oldEnterNo));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName)); setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime)); setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_BY)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_NAME)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime)); setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UPDATED_TIME)), updatedTime));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
} }
/** /**
...@@ -590,12 +638,14 @@ public class HPKC006 extends DaoEPBase { ...@@ -590,12 +638,14 @@ public class HPKC006 extends DaoEPBase {
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT))); map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS))); map.put(FIELD_STATUS, StringUtils.toString(status, eiMetadata.getMeta(FIELD_STATUS)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK))); map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_OLD_ENTER_NO, StringUtils.toString(oldEnterNo, eiMetadata.getMeta(FIELD_OLD_ENTER_NO)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY))); map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME))); map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME))); map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY))); map.put(FIELD_UPDATED_BY, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_UPDATED_BY)));
map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME))); map.put(FIELD_UPDATED_NAME, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_UPDATED_NAME)));
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME))); map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
return map; return map;
} }
......
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC005; import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.domain.HPKC006; import com.baosight.hpjx.hp.kc.domain.HPKC006;
import com.baosight.hpjx.hp.kc.domain.HPKC007;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.BeanUtils;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtil; import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
...@@ -23,6 +28,7 @@ import java.util.List; ...@@ -23,6 +28,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 库存盘点
* *
* @author:songx * @author:songx
* @date:2024/1/22,10:51 * @date:2024/1/22,10:51
...@@ -120,8 +126,8 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -120,8 +126,8 @@ public class ServiceHPKC005 extends ServiceBase {
*/ */
private void add(HPKC005 fKc005) { private void add(HPKC005 fKc005) {
// 生成单据号 // 生成单据号
fKc005.setStatisticalNumber(SequenceGenerator.getNextSequence( fKc005.setCheckNo(SequenceGenerator.getNextSequence(
HPConstant.SequenceId.STATISTICAL_NUMBER)); HPConstant.SequenceId.CHECK_NO));
DaoUtils.insert("HPKC005.insert", fKc005); DaoUtils.insert("HPKC005.insert", fKc005);
} }
...@@ -148,8 +154,7 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -148,8 +154,7 @@ public class ServiceHPKC005 extends ServiceBase {
// 设置基础信息 // 设置基础信息
this.setBaseInfo(fKc005); this.setBaseInfo(fKc005);
// 生成单据号 // 生成单据号
fKc005.setStatisticalNumber(SequenceGenerator.getNextSequence( fKc005.setCheckNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CHECK_NO));
HPConstant.SequenceId.STATISTICAL_NUMBER));
DaoUtils.insert(HPKC005.INSERT, fKc005); DaoUtils.insert(HPKC005.INSERT, fKc005);
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
...@@ -213,8 +218,29 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -213,8 +218,29 @@ public class ServiceHPKC005 extends ServiceBase {
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 盘点单号
List<String> checkNos = ObjectUtils.listKey(resultRows, "checkNo");
// 锁记录
HPKCTools.lockKc005(checkNos);
// 查询数据库记录
Map<String, HPKC005> mapKc005 = HPKCTools.mapKc005(checkNos);
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
DaoUtils.update(HPKC005.DELETE, resultRows.get(i)); HPKC005 fKc005 = new HPKC005();
fKc005.fromMap(resultRows.get(i));
DaoUtils.update(HPKC005.DELETE, fKc005);
// 原盘点单
HPKC005 dbKc005 = mapKc005.get(fKc005.getCheckNo());
// 生成红冲记录
HPKC005 newKc005 = BeanUtils.copy(dbKc005, HPKC005.class);
newKc005.setCheckNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CHECK_NO));
newKc005.setDiffAmount(dbKc005.getDiffAmount().negate());
newKc005.setDiffWeight(dbKc005.getDiffWeight().negate());
newKc005.setOldCheckNo(dbKc005.getCheckNo());
newKc005.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.insert(HPKC005.INSERT, newKc005);
// 修改库存
HPKCTools.updateStock(newKc005.getWhCode(), newKc005.getInventRecordId(),
newKc005.getDiffAmount(), newKc005.getDiffWeight());
} }
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
......
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.domain.HPKC007;
import com.baosight.hpjx.hp.kc.domain.HPKC010;
import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.BeanUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 库存盘点挑选库存
*
* @author:songx
* @date:2022/7/11,11:08
*/
public class ServiceHPKC005A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SPEC_NAME_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC010().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
inInfo = super.query(inInfo, HPKC010.QUERY, new HPKC010());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 生产盘点单
*
* @param inInfo
* @return
*/
public EiInfo select(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 库存ID
List<Long> ids = ObjectUtils.listKey(resultRows, "id");
// 行锁
HPKCTools.lockKc010(ids);
// 获取库存信息
Map<Long, HPKC010> dbKc010Map = HPKCTools.mapKc010(ids);
// 状态校验
for (Map row : resultRows) {
Long id = MapUtils.getLong(row, "id");
HPKC010 dbKc010 = dbKc010Map.get(id);
AssertUtils.isNull(dbKc010, "库存号[" + id + "]不存在!");
// 校验数量
BigDecimal entityAmount = MapUtils.getBigDecimal(row, "entityAmount");
AssertUtils.isGt(BigDecimal.ZERO, entityAmount, "库存号[" + id + "]实物数量不能小于0!");
BigDecimal entityWeight = MapUtils.getBigDecimal(row, "entityWeight");
AssertUtils.isGt(BigDecimal.ZERO, entityWeight, "库存号[" + id + "]实物重量不能小于0!");
}
// 生成盘点单
for (Map row : resultRows) {
BigDecimal entityAmount = MapUtils.getBigDecimal(row, "entityAmount");
BigDecimal entityWeight = MapUtils.getBigDecimal(row, "entityWeight");
String entityRemark = MapUtils.getString(row, "entityRemark");
Long kcId = MapUtils.getLong(row, "id");
HPKC010 dbKc010 = dbKc010Map.get(kcId);
// 生成盘点单
HPKC005 newKc005 = BeanUtils.copy(dbKc010, HPKC005.class);
newKc005.setCheckNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.CHECK_NO));
newKc005.setReceiptDate(DateUtils.shortDate());
newKc005.setEntityAmount(entityAmount);
newKc005.setEntityWeight(entityWeight);
newKc005.setBookAmount(dbKc010.getAmount());
newKc005.setBookWeight(dbKc010.getWeight());
newKc005.setDiffAmount(entityAmount.subtract(dbKc010.getAmount()));
newKc005.setDiffWeight(entityWeight.subtract(dbKc010.getWeight()));
newKc005.setKcId(kcId);
newKc005.setRemark(entityRemark);
DaoUtils.insert(HPKC005.INSERT, newKc005);
// 修改库存数量
HPKCTools.updateStock(newKc005.getWhCode(), newKc005.getInventRecordId(),
newKc005.getDiffAmount(), newKc005.getDiffWeight());
}
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "生成盘点单失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.kc.service; package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC006; import com.baosight.hpjx.hp.kc.domain.HPKC006;
import com.baosight.hpjx.hp.kc.domain.HPKC007;
import com.baosight.hpjx.hp.kc.tools.HPKCTools; import com.baosight.hpjx.hp.kc.tools.HPKCTools;
import com.baosight.hpjx.hp.pz.tools.HPPZTools; import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.BeanUtils;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils; import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
...@@ -195,8 +198,16 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -195,8 +198,16 @@ public class ServiceHPKC006 extends ServiceBase {
HPKC006 fKc006 = new HPKC006(); HPKC006 fKc006 = new HPKC006();
fKc006.fromMap(resultRows.get(i)); fKc006.fromMap(resultRows.get(i));
DaoUtils.update(HPKC006.DELETE, fKc006); DaoUtils.update(HPKC006.DELETE, fKc006);
// 修改库存 // 生成红冲记录
HPKC006 dbKc006 = mapKc006.get(fKc006.getOtherEnterNo()); HPKC006 dbKc006 = mapKc006.get(fKc006.getOtherEnterNo());
HPKC006 newKc006 = BeanUtils.copy(dbKc006, HPKC006.class);
newKc006.setOtherEnterNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.OTHER_ENTER_NO));
newKc006.setAmount(newKc006.getAmount().negate());
newKc006.setWeight(newKc006.getWeight().negate());
newKc006.setOldEnterNo(newKc006.getOtherEnterNo());
newKc006.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.insert(HPKC006.INSERT, newKc006);
// 修改库存
HPKCTools.updateStock(dbKc006.getWhCode(), dbKc006.getInventRecordId(), dbKc006.getAmount().negate(), HPKCTools.updateStock(dbKc006.getWhCode(), dbKc006.getInventRecordId(), dbKc006.getAmount().negate(),
dbKc006.getWeight().negate()); dbKc006.getWeight().negate());
} }
......
...@@ -203,12 +203,13 @@ public class ServiceHPKC007 extends ServiceBase { ...@@ -203,12 +203,13 @@ public class ServiceHPKC007 extends ServiceBase {
HPKC007 fKc007 = new HPKC007(); HPKC007 fKc007 = new HPKC007();
fKc007.fromMap(resultRows.get(i)); fKc007.fromMap(resultRows.get(i));
DaoUtils.update(HPKC007.DELETE, fKc007); DaoUtils.update(HPKC007.DELETE, fKc007);
// 生成红冲记录 // 原库存
HPKC007 dbKc007 = mapKc007.get(fKc007.getOtherOuterNo()); HPKC007 dbKc007 = mapKc007.get(fKc007.getOtherOuterNo());
// 生成红冲记录
HPKC007 newKc007 = BeanUtils.copy(dbKc007, HPKC007.class); HPKC007 newKc007 = BeanUtils.copy(dbKc007, HPKC007.class);
newKc007.setOtherOuterNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.OTHER_OUTER_NO)); newKc007.setOtherOuterNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.OTHER_OUTER_NO));
newKc007.setAmount(newKc007.getAmount().negate()); newKc007.setAmount(dbKc007.getAmount().negate());
newKc007.setWeight(newKc007.getWeight().negate()); newKc007.setWeight(dbKc007.getWeight().negate());
newKc007.setOldOuterNo(dbKc007.getOtherOuterNo()); newKc007.setOldOuterNo(dbKc007.getOtherOuterNo());
newKc007.setDeleteFlag(CommonConstant.YesNo.YES_1); newKc007.setDeleteFlag(CommonConstant.YesNo.YES_1);
DaoUtils.insert(HPKC007.INSERT, newKc007); DaoUtils.insert(HPKC007.INSERT, newKc007);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
COMPANY_CODE as "companyCode", <!-- 企业编码 预留 --> COMPANY_CODE as "companyCode", <!-- 企业编码 预留 -->
DEP_CODE as "depCode", <!-- 部门编码 预留 --> DEP_CODE as "depCode", <!-- 部门编码 预留 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 --> RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
STATISTICAL_NUMBER as "statisticalNumber", <!-- 盘点单号 --> CHECK_NO as "checkNo", <!-- 盘点单号 -->
WH_CODE as "whCode", <!-- 仓库编码 --> WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 --> WH_NAME as "whName", <!-- 仓库名称 -->
INVENT_TYPE as "inventType", <!-- 存货类型 --> INVENT_TYPE as "inventType", <!-- 存货类型 -->
...@@ -20,17 +20,21 @@ ...@@ -20,17 +20,21 @@
ENTITY_WEIGHT as "entityWeight", <!-- 实物重量 --> ENTITY_WEIGHT as "entityWeight", <!-- 实物重量 -->
DIFF_AMOUNT as "diffAmount", <!-- 差异数量 --> DIFF_AMOUNT as "diffAmount", <!-- 差异数量 -->
DIFF_WEIGHT as "diffWeight", <!-- 差异重量 --> DIFF_WEIGHT as "diffWeight", <!-- 差异重量 -->
KC_ID as "kcId", <!-- 库存ID -->
STATUS as "status", <!-- 单据状态 0待审核 1已审核 --> STATUS as "status", <!-- 单据状态 0待审核 1已审核 -->
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
OLD_CHECK_NO as "oldCheckNo", <!-- 原盘点单号 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 --> CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag" <!-- 是否删除0.否1.是 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -40,8 +44,8 @@ ...@@ -40,8 +44,8 @@
<isNotEmpty prepend=" AND " property="receiptDate"> <isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate# RECEIPT_DATE = #receiptDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="statisticalNumber"> <isNotEmpty prepend=" AND " property="checkNo">
STATISTICAL_NUMBER = #statisticalNumber# CHECK_NO = #checkNo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode"> <isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode# WH_CODE = #whCode#
...@@ -82,6 +86,9 @@ ...@@ -82,6 +86,9 @@
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
<isNotEmpty prepend=" AND " property="checkNos">
CHECK_NO IN <iterate close=")" open="(" conjunction="," property="checkNos">#checkNos[]#</iterate>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="spec"> <isNotEmpty prepend=" AND " property="spec">
<isEqual property="spec" compareValue="无规格"> <isEqual property="spec" compareValue="无规格">
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = '') INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = '')
...@@ -139,7 +146,7 @@ ...@@ -139,7 +146,7 @@
COMPANY_CODE, <!-- 企业编码 预留 --> COMPANY_CODE, <!-- 企业编码 预留 -->
DEP_CODE, <!-- 部门编码 预留 --> DEP_CODE, <!-- 部门编码 预留 -->
RECEIPT_DATE, <!-- 单据日期 --> RECEIPT_DATE, <!-- 单据日期 -->
STATISTICAL_NUMBER, <!-- 盘点单号 --> CHECK_NO, <!-- 盘点单号 -->
WH_CODE, <!-- 仓库编码 --> WH_CODE, <!-- 仓库编码 -->
WH_NAME, <!-- 仓库名称 --> WH_NAME, <!-- 仓库名称 -->
INVENT_TYPE, <!-- 存货类型 --> INVENT_TYPE, <!-- 存货类型 -->
...@@ -152,20 +159,25 @@ ...@@ -152,20 +159,25 @@
ENTITY_WEIGHT, <!-- 实物重量 --> ENTITY_WEIGHT, <!-- 实物重量 -->
DIFF_AMOUNT, <!-- 差异数量 --> DIFF_AMOUNT, <!-- 差异数量 -->
DIFF_WEIGHT, <!-- 差异重量 --> DIFF_WEIGHT, <!-- 差异重量 -->
KC_ID, <!-- 库存ID -->
REMARK, <!-- 备注 --> REMARK, <!-- 备注 -->
OLD_CHECK_NO, <!-- 原盘点单号 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 --> CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG <!-- 是否删除0.否1.是 -->
) VALUES ( ) VALUES (
#companyCode#, #depCode#, #receiptDate#, #statisticalNumber#, #whCode#, #whName#, #companyCode#, #depCode#, #receiptDate#, #checkNo#, #whCode#, #whName#,
#inventType#, #inventCode#, #inventName#, #inventRecordId#, #bookAmount#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #bookAmount#,
#bookWeight#, #entityAmount#, #entityWeight#, #diffAmount#, #diffWeight#, #bookWeight#, #entityAmount#, #entityWeight#, #diffAmount#, #diffWeight#,
#remark#, #createdBy#, #createdName#, #createdTime# #kcId#, #remark#, #oldCheckNo#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#
) )
</insert> </insert>
<!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.T_HPKC005 WHERE ID = #id# UPDATE hpjx.T_HPKC005 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
...@@ -191,4 +203,17 @@ ...@@ -191,4 +203,17 @@
WHERE ID = #id# WHERE ID = #id#
</update> </update>
<!-- 行锁 -->
<update id="lock">
UPDATE ${hpjxSchema}.T_HPKC005
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty prepend=" AND " property="checkNo">
CHECK_NO = #checkNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkNos">
CHECK_NO IN <iterate close=")" open="(" conjunction="," property="checkNos">#checkNos[]#</iterate>
</isNotEmpty>
</update>
</sqlMap> </sqlMap>
...@@ -18,15 +18,17 @@ ...@@ -18,15 +18,17 @@
WEIGHT as "weight", <!-- 重量 --> WEIGHT as "weight", <!-- 重量 -->
STATUS as "status", <!-- 状态 0审核 1保存 --> STATUS as "status", <!-- 状态 0审核 1保存 -->
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
OLD_ENTER_NO as "oldEnterNo", <!-- 原入库单号 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 --> CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 --> CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 更新人 --> UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_NAME as "updatedName", <!-- 更新人名称 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime" <!-- 更新时间 --> UPDATED_TIME as "updatedTime" <!-- 更新时间 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -129,18 +131,21 @@ ...@@ -129,18 +131,21 @@
AMOUNT, <!-- 数量 --> AMOUNT, <!-- 数量 -->
WEIGHT, <!-- 重量 --> WEIGHT, <!-- 重量 -->
REMARK, <!-- 备注 --> REMARK, <!-- 备注 -->
OLD_ENTER_NO, <!-- 原入库单号 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
CREATED_NAME, <!-- 创建人名称 --> CREATED_NAME, <!-- 创建人名称 -->
CREATED_TIME <!-- 创建时间 --> CREATED_TIME, <!-- 创建时间 -->
DELETE_FLAG
) VALUES ( ) VALUES (
#companyCode#, #depCode#, #receiptDate#, #otherEnterNo#, #whCode#, #whName#, #companyCode#, #depCode#, #receiptDate#, #otherEnterNo#, #whCode#, #whName#,
#inventType#, #inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #amount#, #weight#,
#remark#, #createdBy#, #createdName#, #createdTime# #remark#, #oldEnterNo#, #createdBy#, #createdName#, #createdTime#, #deleteFlag#
) )
</insert> </insert>
<!-- 逻辑删除 -->
<delete id="delete"> <delete id="delete">
DELETE FROM hpjx.t_hpkc006 WHERE ID = #id# UPDATE hpjx.t_hpkc006 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete> </delete>
<update id="update"> <update id="update">
......
...@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.kc.tools; ...@@ -2,6 +2,7 @@ package com.baosight.hpjx.hp.kc.tools;
import com.baosight.hpjx.core.dao.DaoBase; import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC005;
import com.baosight.hpjx.hp.kc.domain.HPKC006; import com.baosight.hpjx.hp.kc.domain.HPKC006;
import com.baosight.hpjx.hp.kc.domain.HPKC007; import com.baosight.hpjx.hp.kc.domain.HPKC007;
import com.baosight.hpjx.hp.kc.domain.HPKC010; import com.baosight.hpjx.hp.kc.domain.HPKC010;
...@@ -26,6 +27,50 @@ public class HPKCTools { ...@@ -26,6 +27,50 @@ public class HPKCTools {
/** /**
* 锁 * 锁
* *
* @param checkNos
* @return
*/
public static void lockKc005(List<String> checkNos) {
if (CollectionUtils.isEmpty(checkNos)) {
return;
}
Map queryMap = new HashMap();
queryMap.put("checkNos", checkNos);
DaoBase.getInstance().update(HPSqlConstant.HPKC005.LOCK, queryMap);
}
/**
* 查询盘点单信息
*
* @param checkNos
* @return
*/
public static List<HPKC005> listKc005(List<String> checkNos) {
if (CollectionUtils.isEmpty(checkNos)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("checkNos", checkNos);
return DaoBase.getInstance().query(HPKC005.QUERY, queryMap);
}
/**
* 查询盘点单信息
*
* @param checkNos
* @return
*/
public static Map<String, HPKC005> mapKc005(List<String> checkNos) {
List<HPKC005> results = listKc005(checkNos);
if (CollectionUtils.isEmpty(results)) {
return null;
}
return results.stream().collect(Collectors.toMap(HPKC005::getCheckNo, item -> item));
}
/**
* 锁
*
* @param otherEnterNos * @param otherEnterNos
* @return * @return
*/ */
...@@ -164,6 +209,9 @@ public class HPKCTools { ...@@ -164,6 +209,9 @@ public class HPKCTools {
* @param weight * @param weight
*/ */
public static void updateStock(String whCode, Long inventRecordId, BigDecimal amount, BigDecimal weight) { public static void updateStock(String whCode, Long inventRecordId, BigDecimal amount, BigDecimal weight) {
if (amount.compareTo(BigDecimal.ZERO) == 0 && weight.compareTo(BigDecimal.ZERO) == 0) {
return;
}
EiInfo inInfo = new EiInfo(); EiInfo inInfo = new EiInfo();
inInfo.set("whCode", whCode); inInfo.set("whCode", whCode);
inInfo.set("inventRecordId", inventRecordId); inInfo.set("inventRecordId", inventRecordId);
......
...@@ -159,6 +159,9 @@ public class SqlMapDaoLogProxy extends SqlMapDao { ...@@ -159,6 +159,9 @@ public class SqlMapDaoLogProxy extends SqlMapDao {
if ("HPXSUser.query".equals(name)) { if ("HPXSUser.query".equals(name)) {
return; return;
} }
if(!(parameters instanceof Map)){
return;
}
if (parameters == null) { if (parameters == null) {
parameters = new HashMap(); parameters = new HashMap();
} }
......
var inventNameGlobalData = []; var inventNameGlobalData = [];
var specGlobalData = []; var specGlobalData = [];
$(function() { $(function() {
// var day1 = new Date();
// day1.setTime(day1.getTime());
// var s1 = day1.getFullYear() + "-" + (day1.getMonth() + 1) + "-" + day1.getDate();
// $("#inqu_status-0-receiptDate").val(s1);
// 查询
$("#QUERY").on("click", query);
// 保存
$("#BTN_SAVE").on("click", save);
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
pageable: { pageable: {
...@@ -70,6 +61,12 @@ $(function() { ...@@ -70,6 +61,12 @@ $(function() {
} }
} }
} }
// 查询
$("#QUERY").on("click", query);
// 挑选库存
$("#SELECT_STOCK").on("click", selectStock);
}); });
/** /**
...@@ -105,6 +102,29 @@ let query = function () { ...@@ -105,6 +102,29 @@ let query = function () {
} }
/** /**
* 挑选库存
*/
let selectStock = function () {
JSColorbox.open({
href: "HPKC005A?methodName=initLoad",
title: "<div style='text-align: center;'>库存查询</div>",
width: "90%",
height: "80%",
callbackName: selectStockCallback
});
}
/**
* 挑选库存回调
*/
let selectStockCallback = function () {
// 刷新页面
query();
// 关闭弹窗
JSColorbox.close();
}
/**
* 保存 * 保存
*/ */
let save = function () { let save = function () {
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-inventType" cname="存货类型" colWidth="3" filter="contains" <EF:EFSelect ename="inqu_status-0-inventType" cname="存货类型" colWidth="3" filter="contains">
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -41,7 +40,7 @@ ...@@ -41,7 +40,7 @@
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="statisticalNumber" cname="盘点单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="checkNo" cname="盘点单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd" <EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd"
parseFormats="['yyyyMMdd']" width="90" align="center" required="true"/> parseFormats="['yyyyMMdd']" width="90" align="center" required="true"/>
<%--<EF:EFComboColumn ename="status" cname="单据状态" enable="false" width="100" readonly="true" <%--<EF:EFComboColumn ename="status" cname="单据状态" enable="false" width="100" readonly="true"
...@@ -54,8 +53,7 @@ ...@@ -54,8 +53,7 @@
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
align="center" filter="contains" required="true"> align="center" filter="contains" required="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true" <EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true">
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true"/> <EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true"/>
......
$(function () {
IPLATUI.EFGrid = {
"result": {
columns: [],
dataBound: function () {
}
}
};
$("#ef_form_head").hide();
// 查询
$("#QUERY").on("click", query);
// 选择
$("#BTN_SELECT").on("click", select);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 勾选全部事件
$("#ef_grid_result").on("click", "input.check-all", function (e) {
var action = $(this).prop("checked");
if (action == true) {
var rowData = $('#ef_grid_result').data("kendoGrid").getCheckedRows();
for (var i = 0; i < rowData.length; i++) {
resultGrid.setCellValue(i, "entityAmount", parseFloat(rowData[i]["amount"]));
resultGrid.setCellValue(i, "entityWeight", parseFloat(rowData[i]["weight"]));
}
}
});
// 勾选一行的事件
$("#ef_grid_result").on("click", "input.check-one", function (e) {
var rowNo = $(this).closest("tr").index();
var action = $(this).prop("checked");
var data = resultGrid.getDataItems();
if (action == true) {
resultGrid.setCellValue(rowNo, "entityAmount", parseFloat(data[rowNo]["amount"]));
resultGrid.setCellValue(i, "entityWeight", parseFloat(rowData[i]["weight"]));
}
});
// 初始化查询
query();
});
/**
* 查询
*/
var query = function (e) {
resultGrid.dataSource.page(1);
};
/**
* 选择库存
*/
let select = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据")
return;
}
for (let i = 0; i < rows.length; i++) {
let entityAmount = rows[i]['entityAmount'];
let entityWeight = rows[i]['entityWeight'];
if (isBlank(entityAmount) || !isNumber(entityAmount) || entityAmount < 0) {
message("第" + (i + 1) + "行实物数量不能小于0");
return;
}
if (isBlank(entityWeight) || !isNumber(entityWeight) || entityWeight < 0) {
message("第" + (i + 1) + "行实物重量不能小于0");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成盘点单吗? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPKC005A", "select",
true, function (e) {
var status = e.getStatus();
if (status !== -1) {
parent.JSColorbox.setValueCallback();
}
}
);
}
});
}
<!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="查询区域" type="query">
<div class="row">
<EF:EFDatePicker cname="单据日期" ename="inqu_status-0-receiptDate" colWidth="3"
role="date" format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="入库单号" ename="inqu_status-0-otherEnterNo" colWidth="3"/>
<EF:EFSelect cname="仓库名称" ename="inqu_status-0-whCode" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-spec" cname="规格" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center"/>
<EF:EFComboColumn ename="whCode" cname="仓库名称" enable="false" width="120" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#"
blockName="wh_record_block_id"
textField="textField" valueField="valueField">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="120" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#"
blockName="invent_name_block_id"
textField="textField" valueField="valueField">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventRecordId" cname="规格" enable="false" width="120" align="center"
columnTemplate="#=textField#" itemTemplate="#=textField#"
blockName="invent_spec_block_id"
textField="textField" valueField="valueField">
</EF:EFComboColumn>
<EF:EFColumn ename="entityAmount" cname="实物数量" width="120" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="entityWeight" cname="实物重量" width="120" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="entityRemark" cname="说明" width="150" editType="textarea" copy="true"/>
<EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="weight" cname="库存重量" enable="false" width="120" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains" <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -38,23 +37,23 @@ ...@@ -38,23 +37,23 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="otherEnterNo" cname="入库单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="otherEnterNo" cname="入库单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd" <EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd"
parseFormats="['yyyyMMdd']" width="90" align="center" required="true"/> parseFormats="['yyyyMMdd']" width="90" align="center" required="true" readonly="true"/>
<EF:EFComboColumn ename="whCode" cname="仓库编码" width="120" columnTemplate="#=textField#" <EF:EFComboColumn ename="whCode" cname="仓库编码" width="120" columnTemplate="#=textField#"
itemTemplate="#=textField#" blockName="wh_record_block_id" itemTemplate="#=textField#" blockName="wh_record_block_id"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
align="center" filter="contains" required="true"> align="center" filter="contains" required="true" readonly="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true" <EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true"
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#"> readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true"/> <EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center" required="true"/> <EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="100" align="right" <EF:EFColumn ename="amount" cname="数量" format="{0:N3}" maxLength="20" width="100" align="right"
sumType="all" required="true"/> sumType="all" required="true" readonly="true"/>
<EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="100" align="right" <EF:EFColumn ename="weight" cname="重量" format="{0:N3}" maxLength="20" width="100" align="right"
sumType="all" required="true"/> sumType="all" required="true" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" maxLength="255"/> <EF:EFColumn ename="remark" cname="备注" width="150" maxLength="255" readonly="true"/>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
......
...@@ -46,6 +46,16 @@ $(function() { ...@@ -46,6 +46,16 @@ $(function() {
inInfo.set("field", options.field); inInfo.set("field", options.field);
refreshSelect(container, inInfo); refreshSelect(container, inInfo);
} }
}, {
field: "createdName",
template: function (options) {
return showUserName(options.createdBy, options.createdName);
}
}, {
field: "updatedName",
template: function (options) {
return showUserName(options.updatedBy, options.updatedName);
}
}], }],
loadComplete: function (grid) { loadComplete: function (grid) {
} }
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains" <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -45,8 +44,7 @@ ...@@ -45,8 +44,7 @@
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
align="center" filter="contains"> align="center" filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center" <EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center">
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" enable="false" width="120" align="center"/> <EF:EFColumn ename="inventCode" cname="存货名称" enable="false" width="120" align="center"/>
......
...@@ -43,14 +43,23 @@ let select = function () { ...@@ -43,14 +43,23 @@ let select = function () {
} }
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
let applyAmount = rows[i]['applyAmount']; let applyAmount = rows[i]['applyAmount'];
let applyWeight = rows[i]['applyWeight'];
let amount = rows[i]['amount']; let amount = rows[i]['amount'];
let weight = rows[i]['weight'];
if (isBlank(applyAmount) || !isNumber(applyAmount) || !(applyAmount > 0)) { if (isBlank(applyAmount) || !isNumber(applyAmount) || !(applyAmount > 0)) {
message("第" + (i + 1) + "行申请数量必须是大于0的数"); message("第" + (i + 1) + "行申请数量必须大于0");
return; return;
} }
if (parseFloat(applyAmount) > parseFloat(amount)) { if (parseFloat(applyAmount) > parseFloat(amount)) {
message("第" + (i + 1) + "行申请数量不能大于库存数量"); message("第" + (i + 1) + "行申请数量不能大于库存数量");
return; return;
}if (isBlank(applyWeight) || !isNumber(applyWeight) || !(applyWeight > 0)) {
message("第" + (i + 1) + "行申请重量必须大于0");
return;
}
if (parseFloat(applyWeight) > parseFloat(weight)) {
message("第" + (i + 1) + "行申请重量不能大于库存重量");
return;
} }
} }
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成出库单吗? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成出库单吗? ", {
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains" <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -41,8 +40,7 @@ ...@@ -41,8 +40,7 @@
blockName="wh_record_block_id" blockName="wh_record_block_id"
textField="textField" valueField="valueField"> textField="textField" valueField="valueField">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center" <EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="100" align="center">
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="120" align="center" <EF:EFComboColumn ename="inventCode" cname="存货名称" enable="false" width="120" align="center"
......
...@@ -12,8 +12,7 @@ ...@@ -12,8 +12,7 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-inventType" cname="存货类型" colWidth="3" filter="contains" <EF:EFSelect ename="inqu_status-0-inventType" cname="存货类型" colWidth="3" filter="contains">
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -37,8 +36,7 @@ ...@@ -37,8 +36,7 @@
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
align="center" filter="contains"> align="center" filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true" <EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true">
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true"/> <EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true"/>
......
...@@ -8,14 +8,12 @@ ...@@ -8,14 +8,12 @@
<EF:EFPage title="供应商档案"> <EF:EFPage title="供应商档案">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect ename="inqu_status-0-custType" cname="供应商类型" colWidth="3" <EF:EFSelect ename="inqu_status-0-custType" cname="供应商类型" colWidth="3">
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_type_block_id" textField="valueField" valueField="textField"/> <EF:EFOptions blockId="company_type_block_id" textField="valueField" valueField="textField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput ename="inqu_status-0-custName" cname="供应商名称" colWidth="3" readonly="false"/> <EF:EFInput ename="inqu_status-0-custName" cname="供应商名称" colWidth="3" readonly="false"/>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="3" <EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="3">
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect> </EF:EFSelect>
......
...@@ -9,13 +9,11 @@ ...@@ -9,13 +9,11 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput cname="客户名称" ename="custName" blockId="inqu_status" row="0" colWidth="3"/> <EF:EFInput cname="客户名称" ename="custName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-custType" cname="客户类型" colWidth="3" <EF:EFSelect ename="inqu_status-0-custType" cname="客户类型" colWidth="3">
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="company_type_block_id" textField="valueField" valueField="textField"/> <EF:EFOptions blockId="company_type_block_id" textField="valueField" valueField="textField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="3" <EF:EFSelect ename="inqu_status-0-status" cname="状态" colWidth="3">
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -28,13 +26,11 @@ ...@@ -28,13 +26,11 @@
<EF:EFColumn ename="custCode" cname="客户编码" enable="false" width="100" align="center"/> <EF:EFColumn ename="custCode" cname="客户编码" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center" <EF:EFComboColumn ename="custType" cname="客户类型" width="100" align="center"
blockName="company_type_block_id" textField="textField" valueField="valueField" blockName="company_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#"
required="true"> required="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="custName" cname="客户名称" width="120" align="center" required="true"/> <EF:EFColumn ename="custName" cname="客户名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="address" cname="地址" width="150" align="center" required="true"/> <EF:EFColumn ename="address" cname="地址" width="150" align="center" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" width="100" align="center" required="true" <EF:EFComboColumn ename="status" cname="状态" width="100" align="center" required="true">
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/>
......
...@@ -8,14 +8,12 @@ ...@@ -8,14 +8,12 @@
<EF:EFPage title="存货类型"> <EF:EFPage title="存货类型">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3">
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput cname="存货名称" ename="inqu_status-0-inventName" colWidth="3"/> <EF:EFInput cname="存货名称" ename="inqu_status-0-inventName" colWidth="3"/>
<EF:EFSelect cname="状态" ename="inqu_status-0-status" colWidth="3" <EF:EFSelect cname="状态" ename="inqu_status-0-status" colWidth="3">
template="#=valueField#-#=textField#" valueTemplate="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -26,13 +24,11 @@ ...@@ -26,13 +24,11 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/> <EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="90" align="center" required="true" <EF:EFComboColumn ename="inventType" cname="存货类型" width="90" align="center" required="true">
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" required="true"/> <EF:EFColumn ename="inventName" cname="存货名称" width="120" required="true"/>
<EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true" <EF:EFComboColumn ename="status" cname="状态" align="center" width="100" required="true">
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/>
......
...@@ -8,8 +8,7 @@ ...@@ -8,8 +8,7 @@
<EF:EFPage title="存货档案"> <EF:EFPage title="存货档案">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3">
valueTemplate="#=valueField#-#=textField#" template="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -17,8 +16,7 @@ ...@@ -17,8 +16,7 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="状态" ename="inqu_status-0-status" colWidth="3" valueTemplate="#=valueField#-#=textField#" <EF:EFSelect cname="状态" ename="inqu_status-0-status" colWidth="3">
template="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -28,8 +26,7 @@ ...@@ -28,8 +26,7 @@
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" requird="true" <EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" requird="true">
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" requird="true"/> <EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" requird="true"/>
......
...@@ -9,13 +9,11 @@ ...@@ -9,13 +9,11 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput cname="仓库名称:" blockId="inqu_status" ename="whName" row="0" colWidth="3"/> <EF:EFInput cname="仓库名称:" blockId="inqu_status" ename="whName" row="0" colWidth="3"/>
<EF:EFSelect cname="仓库类型:" blockId="inqu_status" ename="whType" row="0" colWidth="3" <EF:EFSelect cname="仓库类型:" blockId="inqu_status" ename="whType" row="0" colWidth="3">
valueTemplate="#=valueField#-#=textField#" template="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hppz.whType"/> <EF:EFCodeOption codeName="hpjx.hppz.whType"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="状态:" blockId="inqu_status" ename="status" row="0" colWidth="3" <EF:EFSelect cname="状态:" blockId="inqu_status" ename="status" row="0" colWidth="3">
valueTemplate="#=valueField#-#=textField#" template="#=valueField#-#=textField#">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFSelect> </EF:EFSelect>
...@@ -27,8 +25,7 @@ ...@@ -27,8 +25,7 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="whCode" cname="仓库编码" enable="false" width="120" align="center"/> <EF:EFColumn ename="whCode" cname="仓库编码" enable="false" width="120" align="center"/>
<EF:EFColumn ename="whName" cname="仓库名称" width="120" align="center" required="true"/> <EF:EFColumn ename="whName" cname="仓库名称" width="120" align="center" required="true"/>
<EF:EFComboColumn ename="whType" cname="仓库类型" width="120" align="center" required="true" <EF:EFComboColumn ename="whType" cname="仓库类型" width="120" align="center" required="true">
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#">
<EF:EFCodeOption codeName="hpjx.hppz.whType"/> <EF:EFCodeOption codeName="hpjx.hppz.whType"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="princ" cname="负责人" width="120" align="center" required="true" <EF:EFComboColumn ename="princ" cname="负责人" width="120" align="center" required="true"
...@@ -36,8 +33,7 @@ ...@@ -36,8 +33,7 @@
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="status" cname="状态" width="100" align="center" required="true" <EF:EFComboColumn ename="status" cname="状态" width="100" align="center" required="true">
columnTemplate="#=valueField#-#=textField#" itemTemplate="#=valueField#-#=textField#">
<EF:EFCodeOption codeName="hpjx.hpjx.status"/> <EF:EFCodeOption codeName="hpjx.hpjx.status"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人名称" enable="false" width="100" align="center"/>
......
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