Commit dd8026da by 宋祥

1.生产入库单页面调整

parent abfcdd85
package com.baosight.hpjx.core.dao;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.xs.tools.HPXSUserTools;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.iplat4j.core.data.DaoEPBase;
......@@ -103,6 +105,24 @@ public class DaoUtils {
} catch (Exception e) {
log.warn("写入创建人姓名失败", e);
}
// 创建人企业编码
try {
String companyCode;
try {
companyCode = UserSessionUtils.getCompanyCode();
} catch (Exception e) {
companyCode = "";
}
BeanUtils.setProperty(bean, "companyCode", companyCode);
} catch (Exception e) {
log.warn("写入创建人企业编码失败", e);
}
// 创建人部门编码
try {
BeanUtils.setProperty(bean, "depCode", HPXSUserTools.getOrgId());
} catch (Exception e) {
log.warn("写入创建人企业编码失败", e);
}
// 创建时刻
try {
BeanUtils.setProperty(bean, "createdTime", DateUtils.shortDateTime());
......@@ -141,6 +161,24 @@ public class DaoUtils {
}
map.put("createdName", userName);
map.put("updatedName", "");
// 创建人企业编码
try {
String companyCode;
try {
companyCode = UserSessionUtils.getCompanyCode();
} catch (Exception e) {
companyCode = "";
}
map.put("companyCode", companyCode);
} catch (Exception e) {
log.warn("写入创建人企业编码失败", e);
}
// 创建人部门编码
try {
map.put("depCode", HPXSUserTools.getOrgId());
} catch (Exception e) {
log.warn("写入创建人企业编码失败", e);
}
// 创建时刻
try {
map.put("createdTime", DateUtils.shortDateTime());
......
......@@ -20,6 +20,8 @@ public class HPConstant {
public static final String HPKC008_NUMBER = "HPKC008_NUMBER";
// 巡检单号
public static final String HPZL001_NUMBER = "HPZL001_NUMBER";
// 生产入库单号
public static final String HPKC003_PROD_NO = "HPKC003_PROD_NO";
}
/**
......
......@@ -84,7 +84,7 @@ public class HPKC009 extends DaoEPBase {
private String dateProc = " "; /* 日期*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String inventType = " "; /* 存货类型*/
private Integer inventType; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private String spec = " "; /* 规格*/
......@@ -380,7 +380,7 @@ public class HPKC009 extends DaoEPBase {
* get the inventType - 存货类型.
* @return the inventType
*/
public String getInventType() {
public Integer getInventType() {
return this.inventType;
}
......@@ -389,7 +389,7 @@ public class HPKC009 extends DaoEPBase {
*
* @param inventType - 存货类型
*/
public void setInventType(String inventType) {
public void setInventType(Integer inventType) {
this.inventType = inventType;
}
/**
......@@ -680,7 +680,7 @@ public class HPKC009 extends DaoEPBase {
setDateProc(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DATE_PROC)), dateProc));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SPEC)), spec));
......
package com.baosight.hpjx.hp.kc.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC003;
import com.baosight.hpjx.hp.kc.domain.HPKC009;
import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.THppz004;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author xuao
* @date 2024年01月12日 14:22
* @author:songx
* @date:2024/1/22,10:48
*/
public class ServiceHPKC003 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
HPKC003 hpkc003 = new HPKC003();
EiInfo outInfo = new EiInfo();
outInfo.addBlock(EiConstant.resultBlock);
outInfo.getBlock(EiConstant.resultBlock).addBlockMeta(hpkc003.eiMetadata);
return outInfo;
}
/**
* 查询操作.
*/
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
EiInfo outInfo = super.query(inInfo, "HPKC003.query", new HPKC003());
return outInfo;
}
/**
* 新增操作.
*/
@Override
public EiInfo insert(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
for (int i = 0; i < inInfo.getBlock(EiConstant.resultBlock).getRowCount(); i++) {
// String inventName =inInfo.getCellStr(EiConstant.resultBlock,i,"inventName");
// String[] str = inventName.split("-");
// inInfo.setCell(EiConstant.resultBlock,i,"inventCode", str[0]);
// inInfo.setCell(EiConstant.resultBlock,i,"inventName", str[1]);
String documentDate = inInfo.getCellStr(EiConstant.resultBlock,i,"documentDate");
inInfo.setCell(EiConstant.resultBlock,i,"documentDate", StringUtil.removeHorizontalLine(documentDate));
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
} catch (PlatException e) {
e.printStackTrace();
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("新增失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("新增失败", e.getMessage());
return inInfo;
}
return super.insert(inInfo,"HPKC003.insert");
}
/**
* 修改操作.
*/
public EiInfo update(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo,EiConstant.resultBlock);
HPKC003 hpkc003 = new HPKC003();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpkc003.fromMap(map);
String documentDate = inInfo.getCellStr(EiConstant.resultBlock,i,"documentDate");
inInfo.setCell(EiConstant.resultBlock,i,"documentDate", StringUtil.removeHorizontalLine(documentDate));
this.dao.update("HPKC003.update", hpkc003.toMap());
}
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("修改成功!");
} catch (PlatException e) {
inInfo.setStatus(EiConstant.STATUS_FAILURE);
inInfo.setMsg("操作失败!原因参见详细错误描述!");
inInfo.setDetailMsg(e.getMessage());
logError("修改失败", e.getMessage());
return inInfo;
}
return query(inInfo);
}
/**
* 删除操作.
*/
public EiInfo delete(EiInfo eiInfo) {
HPKC003 hpkc003 = new HPKC003();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpkc003.fromMap(map);
this.dao.delete("HPKC003.delete", hpkc003.toMap());
}
} catch (PlatException e) {
eiInfo.setStatus(EiConstant.STATUS_FAILURE);
eiInfo.setMsg("删除失败,原因参见详细错误描述!");
eiInfo.setDetailMsg(e.getMessage());
logError("删除失败!", e.getMessage());
return eiInfo;
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
}
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_QUERY_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC003().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HPKC003.query", new HPPZ009());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 新增操作
*
* @param inInfo
* @return
*/
@Override
public EiInfo insert(EiInfo inInfo) {
CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 数据写入
for (int i = 0; i < resultRows.size(); i++) {
HPKC003 fKc003 = new HPKC003();
fKc003.fromMap(resultRows.get(i));
fKc003.setDocumentDate(StringUtil.removeHorizontalLine(fKc003.getDocumentDate()));
// 仓库名称
fKc003.setWhName(HPPZTools.getWhNameByCode(fKc003.getWhCode()));
// 物料名称
fKc003.setInventName(HPPZTools.getInventNameByCode(fKc003.getInventCode()));
// 生成入库单号
fKc003.setProdNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HPKC003_PROD_NO));
DaoUtils.insert("HPKC003.insert", fKc003);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "新增失败");
}
return inInfo;
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
public EiInfo update(EiInfo inInfo) {
try {
CommonMethod.creatorInfo(inInfo, EiConstant.resultBlock);
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (int i = 0; i < resultRows.size(); i++) {
HPKC003 fKc003 = new HPKC003();
fKc003.fromMap(resultRows.get(i));
fKc003.setDocumentDate(StringUtil.removeHorizontalLine(fKc003.getDocumentDate()));
// 仓库名称
fKc003.setWhName(HPPZTools.getWhNameByCode(fKc003.getWhCode()));
// 物料名称
fKc003.setInventName(HPPZTools.getInventNameByCode(fKc003.getInventCode()));
DaoUtils.update("HPKC003.update", fKc003);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据新增成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 删除操作
*
* @param eiInfo
* @return
*/
public EiInfo delete(EiInfo eiInfo) {
HPKC003 hpkc003 = new HPKC003();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock);
try {
for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
hpkc003.fromMap(map);
this.dao.delete("HPKC003.delete", hpkc003.toMap());
}
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(eiInfo, e, "删除失败");
}
return eiInfo;
}
}
......@@ -30,24 +30,28 @@ import java.util.Map;
import java.util.stream.Collectors;
/**
* @author YK
* @date 2024年01月09日 10:18
*
* @author:songx
* @date:2024/1/22,10:51
*/
public class ServiceHPKC005 extends ServiceBase {
/**
* 画面初始化.
*/
public EiInfo initLoad(EiInfo inInfo) {
HPKC005 HPKC005 = new HPKC005();
EiInfo outInfo = super.initLoad(inInfo, HPKC005);
outInfo.addBlock(EiConstant.queryBlock).setCell(0, "receiptDate", CommonMethod.getCurrentSameYearMonth());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.WH_RECORD_QUERY_BLOCK_ID), null);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), null);
return outInfo;
}
/**
* 画面初始化
*
* @param inInfo
* @return
*/
public EiInfo initLoad(EiInfo inInfo) {
HPKC005 HPKC005 = new HPKC005();
EiInfo outInfo = super.initLoad(inInfo, HPKC005);
outInfo.addBlock(EiConstant.queryBlock).setCell(0, "receiptDate", CommonMethod.getCurrentSameYearMonth());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), null);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.WH_RECORD_QUERY_BLOCK_ID), null);
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), null);
return outInfo;
}
/**
* 查询操作.
......
......@@ -204,7 +204,7 @@ public class ServiceHPKC009 extends ServiceBase {
+ aItem.getWhCode() + "#" + aItem.getMaterialType() + "#"
+ aItem.getMaterialCode() + "#" + aItem.getSpec();
HPKC009 kc009 = BeanUtils.copy(aItem, HPKC009.class);
kc009.setInventType(aItem.getMaterialType());
kc009.setInventType(Integer.parseInt(aItem.getMaterialType()));
kc009.setInventCode(aItem.getMaterialCode());
kc009.setKcType(HPConstant.KcType.CG);
kc009.setDateType(queryMap.get("dateType").toString());
......@@ -251,8 +251,8 @@ public class ServiceHPKC009 extends ServiceBase {
queryMap.put("createdTimeTo", queryMap.get("yesterday") + "235959");
List<HPKC003> bItems = dao.query("HPKC003.statDate", queryMap);
Map<String, HPKC003> bItemMap = bItems.stream().collect(Collectors.toMap(item ->
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWarehouseCode() + "#"
+ item.getMaterialType() + "#" + item.getMaterialCode(), item -> item));
item.getCompanyCode() + "#" + item.getDepCode() + "#" + item.getWhCode() + "#"
+ item.getInventType() + "#" + item.getInventCode(), item -> item));
// 1.3、发出
List<HPKC004> cItems = dao.query("HPKC004.statDate", queryMap);
Map<String, HPKC004> cItemMap = cItems.stream().collect(Collectors.toMap(item ->
......@@ -268,22 +268,22 @@ public class ServiceHPKC009 extends ServiceBase {
// 根据期末库存生成收发存对象
for (HPKC003 aItem : aItems) {
String key = aItem.getCompanyCode() + "#" + aItem.getDepCode() + "#"
+ aItem.getWarehouseCode() + "#" + aItem.getMaterialType() + "#"
+ aItem.getMaterialCode();
+ aItem.getWhCode() + "#" + aItem.getInventType() + "#"
+ aItem.getInventCode();
HPKC009 kc009 = BeanUtils.copy(aItem, HPKC009.class);
kc009.setWhCode(aItem.getWarehouseCode());
kc009.setInventType(aItem.getMaterialType() + "");
kc009.setInventCode(aItem.getMaterialCode());
kc009.setWhCode(aItem.getWhCode());
kc009.setInventType(aItem.getInventType());
kc009.setInventCode(aItem.getInventCode());
kc009.setKcType(HPConstant.KcType.SC);
kc009.setDateType(queryMap.get("dateType").toString());
kc009.setDateProc(queryMap.get("yesterDate").toString());
// 期末
kc009.setEndAmount(new BigDecimal(aItem.getNumber()));
kc009.setEndWeight(new BigDecimal(aItem.getWeight()));
kc009.setEndAmount(aItem.getAmount());
kc009.setEndWeight(aItem.getWeight());
// 收入
HPKC003 bItem = bItemMap.get(key);
kc009.setStockinAmount(bItem == null ? BigDecimal.ZERO : new BigDecimal(bItem.getNumber()));
kc009.setStockinWeight(bItem == null ? BigDecimal.ZERO : new BigDecimal(bItem.getWeight()));
kc009.setStockinAmount(bItem == null ? BigDecimal.ZERO : bItem.getAmount());
kc009.setStockinWeight(bItem == null ? BigDecimal.ZERO : bItem.getWeight());
// 发出
HPKC004 cItem = cItemMap.get(key);
kc009.setStockoutAmount(cItem == null ? BigDecimal.ZERO : cItem.getAmount());
......@@ -338,7 +338,7 @@ public class ServiceHPKC009 extends ServiceBase {
String key = aItem.getCompanyCode() + "#" + aItem.getDepCode() + "#"
+ aItem.getWhCode() + "#" + aItem.getMatType() + "#" + aItem.getMatCode();
HPKC009 kc009 = BeanUtils.copy(aItem, HPKC009.class);
kc009.setInventType(aItem.getMatType());
kc009.setInventType(Integer.parseInt(aItem.getMatType()));
kc009.setInventCode(aItem.getMatCode());
kc009.setKcType(HPConstant.KcType.QT);
kc009.setDateType(queryMap.get("dateType").toString());
......
......@@ -154,15 +154,10 @@
ORDER BY WH_CODE
</select>
<select id="queryByWhCode" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ007">
<select id="queryByWhCode" resultClass="com.baosight.hpjx.hp.pz.domain.HPPZ007">
SELECT WH_NAME as "whName"
FROM hpjx.t_hppz007 WHERE 1=1
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
AND WH_CODE = #whCode#
</select>
</sqlMap>
......@@ -21,6 +21,34 @@ import java.util.stream.Collectors;
public class HPPZTools {
/**
* 查询存货名称
*
* @param inventCode
* @return
*/
public static String getInventNameByCode(String inventCode) {
AssertUtils.isEmpty(inventCode, "存货编码不能为空");
Map queryMap = new HashMap();
queryMap.put("inventCode", inventCode);
List<THppz004> pz004s = DaoBase.getInstance().query("HPPZ004.queryMatNameByCode", queryMap);
return CollectionUtils.isEmpty(pz004s) ? null : pz004s.get(0).getInventName();
}
/**
* 查询仓库名称
*
* @param whCode
* @return
*/
public static String getWhNameByCode(String whCode) {
AssertUtils.isEmpty(whCode, "仓库编码不能为空");
Map queryMap = new HashMap();
queryMap.put("whCode", whCode);
List<HPPZ007> pz007s = DaoBase.getInstance().query("HPPZ007.queryByWhCode", queryMap);
return CollectionUtils.isEmpty(pz007s) ? null : pz007s.get(0).getWhName();
}
/**
* 查询存货信息
*
* @param inventCodes
......
......@@ -52,15 +52,11 @@
AND MEMBER_ID = #memberId#
</select>
<!-- 用户组查询 -->
<select id="queryGroupEname" resultClass="java.util.LinkedHashMap">
SELECT
ID as "id", <!-- id -->
GROUP_ENAME as "groupEname", <!-- 用户组id -->
GROUP_CNAME as "groupCname" <!-- 用户组名字 -->
FROM ${platSchema}.XS_USER_GROUP
WHERE 1=1
AND ID IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
<!-- 查询用户组织机构 -->
<select id="queryOrgId" resultClass="java.util.LinkedHashMap">
SELECT ORG_ID AS "orgId"
FROM ${platSchema}.TXSOG02
WHERE USER_ID = #userId#
</select>
</sqlMap>
package com.baosight.hpjx.hp.xs.tools;
import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import org.springframework.util.CollectionUtils;
import java.util.HashMap;
......@@ -26,4 +27,16 @@ public class HPXSUserTools {
return CollectionUtils.isEmpty(results) ? 0 : results.get(0);
}
/**
* 查询用户组织机构
*
* @return
*/
public static String getOrgId() {
Map paramMap = new HashMap();
paramMap.put("userId", UserSession.getLoginName());
List<Map> results = DaoBase.getInstance().query("HPXSUser.queryOrgId", paramMap);
return CollectionUtils.isEmpty(results) ? "" : results.get(0).get("orgId").toString();
}
}
let inventNameGlobalData = [];
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
$("#QUERY").on("click", query);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200],
},
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 30, 50, 100, 200],
},
columns: [{
field: "inventCode",
template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
return inventNameGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
var grid = container.closest(".k-grid").data("kendoGrid");
var cellIndex = grid.cellIndex(container);
var input = $('<input />');
input.attr("name", options.field);
input.attr("id", options.field);
input.appendTo(container);
let eiInfo = new EiInfo();
eiInfo.set("inventType", options.model["inventType"]);
var dataSource;
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_name_block_id").getMappedRows();
inventNameGlobalData = dataSource;
},
onFail: function (ei) {
}
}, {async: false});
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
dataSource: dataSource,
template: "#=textField#"
});
}
}]
}
}
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 存货名称
let inInfo = new EiInfo();
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 查询
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
......@@ -6,40 +6,47 @@
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="生产入库单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFDatePicker ename="inqu_status-0-documentDate" cname="单据日期"
format="yyyy-MM-dd"/>
<EF:EFInput ename="inqu_status-0-productionNumber" cname="生产入库单号" colWidth="4" readonly="false"/>
<EF:EFInput ename="inqu_status-0-warehouseName" cname="仓库名称" colWidth="4" readonly="false"/>
</div>
<EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>
<div class="row">
<EF:EFDatePicker ename="inqu_status-0-documentDate" cname="单据日期" colWidth="3" format="yyyy-MM-dd"
readonly="true"/>
<EF:EFInput ename="inqu_status-0-prodNo" cname="生产入库单号" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-whCode" cname="仓库名称" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="whName_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-inventCode" cname="存货名称" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="documentDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" width="100" readonly="false" />
<EF:EFColumn ename="productionNumber" cname="生产入库单号" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="warehouseCode" cname="仓库编码" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="warehouseName" cname="仓库名称" width="100" readonly="false" required="true"/>
<EF:EFComboColumn ename="materialType" cname="物料类型" align="center"
columnTemplate="#=valueField#-#=textField#" optionLabel=" "
itemTemplate="#=valueField#-#=textField#" textField="textField"
valueField="valueField" width="100">
<EF:EFOption label="--请选择--" value=""></EF:EFOption>
<EF:EFOption label="待补充" value="1"></EF:EFOption>
</EF:EFComboColumn>
<EF:EFColumn ename="materialCode" cname="物料编码" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="materialName" cname="物料名称" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="number" cname="数量" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="weight" cname="重量" width="100" readonly="false" required="true"/>
<EF:EFColumn ename="remark" cname="备注" width="100" readonly="false" />
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="false" isFloat="true" autoFit="true">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="prodNo" cname="生产入库单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn cname="仓库名称" ename="whCode" columnTemplate="#=textField#"
itemTemplate="#=textField#" blockName="whName_block_id"
textField="textField" valueField="valueField"
align="center" filter="contains" width="100">
</EF:EFComboColumn>
<EF:EFComboColumn cname="存货类型" ename="inventType" width="90" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn cname="存货名称" ename="inventCode" width="120" align="center"/>
<EF:EFColumn cname="数量" ename="amount" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn cname="重量" ename="weight" width="100" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="remark" cname="备注" width="150" editType="textarea"/>
<EF:EFColumn cname="创建人名称" ename="createdName" enable="false" width="120" align="center"/>
<EF:EFColumn cname="创建时间" ename="createdTime" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
</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