Commit 92ad500e by yukang

物料清单支持输入和选择,没有选项的情况下,输入自动生成存货档案

	1)物料清单可输入规格,规格不联动,默认查询无规格的存货档案,保存时,如果没有同规格的数据,则自动生成新的存货档案
	2)所有的入库支持手填存货档案,数据库有则直接关联保存档案ID,没有则自动生成
	3)物料清单含耗材生产
	4)物料清单重量非必填
	5)生产入库通过物料清单单重计算总量
	6)物料清单新增部件保存上级部件编码
	7)生产订单新增上级部件编码、名称
parent 2010f86b
......@@ -64,7 +64,6 @@ public enum DdynamicEnum {
*/
INVENT_PRDT_NAME_BLOCK_ID("invent_prdt_name_block_id","id","inventCode","inventName","HPPZ006.queryPrdtComboBoxAll"),
/**
* 模块:存货档案(规格)
* 用途:存货档案下拉框
......
......@@ -223,4 +223,5 @@
<include refid="customCondition"/>
ORDER BY ID
</select>
</sqlMap>
......@@ -6,8 +6,10 @@ import com.baosight.hpjx.hp.pz.domain.HPPZ007;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.pz.domain.HPPZ004;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.iplat4j.core.util.StringUtils;
import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -134,5 +136,28 @@ public class HPPZTools {
}
return CommonConstant.YesNo.YES_1.equals(pz009.getValidFlag());
}
/**
* 拼接规格
* @param length
* @param width
* @param thick
* @return
*/
public static String jointSpec(BigDecimal length, BigDecimal width, BigDecimal thick) {
StringBuffer sb = new StringBuffer();
if (length != null && length.compareTo(BigDecimal.ZERO) != 0) {
sb.append(StringUtils.toString(length));
sb.append("*");
}
if (width != null && width.compareTo(BigDecimal.ZERO) != 0) {
sb.append(StringUtils.toString(width));
sb.append("*");
}
if (thick != null && thick.compareTo(BigDecimal.ZERO) != 0) {
sb.append(StringUtils.toString(thick));
}
return sb.toString();
}
}
......@@ -54,6 +54,13 @@ public class HPSC002 extends DaoEPBase {
private String remark = " "; /* 备注*/
private Integer lv = 0; /*层级*/
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal(0.00); /* 长*/
private BigDecimal width = new BigDecimal(0.00); /* 宽*/
private BigDecimal thick = new BigDecimal(0.00); /* 厚*/
/**
* initialize the metadata
*/
......@@ -190,6 +197,32 @@ public class HPSC002 extends DaoEPBase {
eiColumn = new EiColumn("lv");
eiColumn.setDescName("层级");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("spec");
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("length");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("width");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("thick");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -658,6 +691,68 @@ public class HPSC002 extends DaoEPBase {
}
/**
* get the sort - 规格
* @return the sort
*/
public String getSpec() {
return this.spec;
}
/**
* set the sort - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* get the value from Map
*/
public void fromMap(Map map) {
......@@ -693,6 +788,11 @@ public class HPSC002 extends DaoEPBase {
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("updatedTime")),updatedTime));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark")), remark));
setLv(NumberUtils.toInteger(StringUtils.toString(map.get("lv")), lv));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("spec")), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get("length")), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("width")), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("thick")), thick));
}
/**
......@@ -732,6 +832,10 @@ public class HPSC002 extends DaoEPBase {
map.put("updatedTime", StringUtils.toString(updatedTime, eiMetadata.getMeta("updatedTime")));
map.put("remark", StringUtils.toString(remark, eiMetadata.getMeta("remark")));
map.put("lv", StringUtils.toString(lv, eiMetadata.getMeta("lv")));
map.put("spec", StringUtils.toString(spec, eiMetadata.getMeta("spec")));
map.put("length", StringUtils.toString(length, eiMetadata.getMeta("length")));
map.put("width", StringUtils.toString(width, eiMetadata.getMeta("width")));
map.put("thick", StringUtils.toString(thick, eiMetadata.getMeta("thick")));
return map;
......
......@@ -3,6 +3,8 @@ package com.baosight.hpjx.hp.sc.domain;
import com.baosight.iplat4j.core.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils;
......@@ -90,6 +92,13 @@ public class HPSC003 extends DaoEPBase {
private Long inventRecordId = new Long(0);
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal(0.00); /* 长*/
private BigDecimal width = new BigDecimal(0.00); /* 宽*/
private BigDecimal thick = new BigDecimal(0.00); /* 厚*/
/**
* initialize the metadata.
*/
......@@ -173,6 +182,31 @@ public class HPSC003 extends DaoEPBase {
eiColumn.setDescName("项目档案ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("spec");
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("length");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("width");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("thick");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
}
......@@ -465,6 +499,68 @@ public class HPSC003 extends DaoEPBase {
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the sort - 规格
* @return the sort
*/
public String getSpec() {
return this.spec;
}
/**
* set the sort - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* get the value from Map.
*
......@@ -492,6 +588,10 @@ public class HPSC003 extends DaoEPBase {
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_SCHEDULE)), schedule));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("spec")), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get("length")), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("width")), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("thick")), thick));
}
......@@ -521,6 +621,10 @@ public class HPSC003 extends DaoEPBase {
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_SCHEDULE, StringUtils.toString(schedule, eiMetadata.getMeta(FIELD_SCHEDULE)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put("spec", StringUtils.toString(spec, eiMetadata.getMeta("spec")));
map.put("length", StringUtils.toString(length, eiMetadata.getMeta("length")));
map.put("width", StringUtils.toString(width, eiMetadata.getMeta("width")));
map.put("thick", StringUtils.toString(thick, eiMetadata.getMeta("thick")));
return map;
}
......
......@@ -141,6 +141,12 @@ public class HPSC004 extends DaoEPBase {
private String remark = " "; /* 备注*/
private Long inventRecordId = new Long(0);
private String spec = " "; /* 规格*/
private BigDecimal length = new BigDecimal(0.00); /* 长*/
private BigDecimal width = new BigDecimal(0.00); /* 宽*/
private BigDecimal thick = new BigDecimal(0.00); /* 厚*/
/**
* initialize the metadata.
*/
......@@ -301,6 +307,31 @@ public class HPSC004 extends DaoEPBase {
eiColumn.setDescName("项目档案ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("spec");
eiColumn.setDescName("规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("length");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("width");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("thick");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
}
/**
......@@ -888,6 +919,67 @@ public class HPSC004 extends DaoEPBase {
this.inventRecordId = inventRecordId;
}
/**
* get the sort - 规格
* @return the sort
*/
public String getSpec() {
return this.spec;
}
/**
* set the sort - 规格
*/
public void setSpec(String spec) {
this.spec = spec;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getLength() {
return this.length;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setLength(BigDecimal length) {
this.length = length;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getWidth() {
return this.width;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setWidth(BigDecimal width) {
this.width = width;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getThick() {
return this.thick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/**
* get the value from Map.
*
* @param map - source data map
......@@ -931,6 +1023,10 @@ public class HPSC004 extends DaoEPBase {
setUpdatedTime(StringUtils.toString(map.get(FIELD_UPDATED_TIME)));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("spec")), spec));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get("length")), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("width")), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("thick")), thick));
}
/**
......@@ -976,6 +1072,10 @@ public class HPSC004 extends DaoEPBase {
map.put(FIELD_UPDATED_TIME, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_UPDATED_TIME)));
map.put(FIELD_REMARK, StringUtils.toString(remark, eiMetadata.getMeta(FIELD_REMARK)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put("spec", StringUtils.toString(spec, eiMetadata.getMeta("spec")));
map.put("length", StringUtils.toString(length, eiMetadata.getMeta("length")));
map.put("width", StringUtils.toString(width, eiMetadata.getMeta("width")));
map.put("thick", StringUtils.toString(thick, eiMetadata.getMeta("thick")));
return map;
}
......
......@@ -109,6 +109,20 @@ public class HPSC005 extends DaoEPBase {
private String filePath5 = " "; /* 文件地址5*/
private Long inventRecordId = new Long(0);
private String prdtSpec;
private BigDecimal prdtLength = new BigDecimal(0.00); /* 长*/
private BigDecimal prdtWidth = new BigDecimal(0.00); /* 宽*/
private BigDecimal prdtThick = new BigDecimal(0.00); /* 厚*/
private Integer partType = new Integer(0);
private String partCode;
private String partName;
private String partSpec;
private BigDecimal partLength = new BigDecimal(0.00); /* 长*/
private BigDecimal partWidth = new BigDecimal(0.00); /* 宽*/
private BigDecimal partThick = new BigDecimal(0.00); /* 厚*/
private String remark1;
/**
* initialize the metadata.
*/
......@@ -222,6 +236,108 @@ public class HPSC005 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_INVENT_RECORD_ID);
eiColumn.setDescName("项目档案ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtSpec");
eiColumn.setDescName("产品规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partType");
eiColumn.setDescName("零件类型");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partCode");
eiColumn.setDescName("零件编码");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partName");
eiColumn.setDescName("零件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partSpec");
eiColumn.setDescName("零件规格");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("remark1");
eiColumn.setDescName("备注");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partLength");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("零件-长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partWidth");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("零件-宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("partThick");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("零件-厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtLength");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("产品-长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtWidth");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("产品-宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn("prdtThick");
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setFieldLength(10);
eiColumn.setDescName("产品-厚");
eiMetadata.addMeta(eiColumn);
}
public String getRemark1() {
return this.remark1;
}
public void setRemark1(String remark1) {
this.remark1 = remark1;
}
public String getPartSpec() {
return this.partSpec;
}
public void setPartSpec(String partSpec) {
this.partSpec = partSpec;
}
public String getPartName() {
return this.partName;
}
public void setPartName(String partName) {
this.partName = partName;
}
public String getPartCode() {
return this.partCode;
}
public void setPartCode(String partCode) {
this.partCode = partCode;
}
public Integer getPartType() {
return this.partType;
}
public void setPartType(Integer partType) {
this.partType = partType;
}
public String getPrdtSpec() {
return this.prdtSpec;
}
public void setPrdtSpec(String prdtSpec) {
this.prdtSpec = prdtSpec;
}
/**
......@@ -648,6 +764,101 @@ public class HPSC005 extends DaoEPBase {
public void setInventRecordId(Long inventRecordId) {
this.inventRecordId = inventRecordId;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getPrdtLength() {
return this.prdtLength;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setPrdtLength(BigDecimal prdtLength) {
this.prdtLength = prdtLength;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getPrdtWidth() {
return this.prdtWidth;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setPrdtWidth(BigDecimal prdtWidth) {
this.prdtWidth = prdtWidth;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getPrdtThick() {
return this.prdtThick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setPrdtThick(BigDecimal prdtThick) {
this.prdtThick = prdtThick;
}
/**
* get the length - 长.
* @return the length
*/
public BigDecimal getPartLength() {
return this.partLength;
}
/**
* set the length - 长.
*
* @param length - 长
*/
public void setPartLength(BigDecimal partLength) {
this.partLength = partLength;
}
/**
* get the width - 宽.
* @return the width
*/
public BigDecimal getPartWidth() {
return this.partWidth;
}
/**
* set the width - 宽.
*
* @param width - 宽
*/
public void setPartWidth(BigDecimal partWidth) {
this.partWidth = partWidth;
}
/**
* get the thick - 厚.
* @return the thick
*/
public BigDecimal getPartThick() {
return this.partThick;
}
/**
* set the thick - 厚.
*
* @param thick - 厚
*/
public void setPartThick(BigDecimal partThick) {
this.partThick = partThick;
}
/**
* get the value from Map.
......@@ -683,6 +894,19 @@ public class HPSC005 extends DaoEPBase {
setFilePath4(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH4)), filePath4));
setFilePath5(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_FILE_PATH5)), filePath5));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
setPrdtSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("prdtSpec")), prdtSpec));
setPartType(NumberUtils.toInteger(StringUtils.toString(map.get("partType")), partType));
setPartCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("partCode")), partCode));
setPartName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("partName")), partName));
setPartSpec(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("partName")), partSpec));
setRemark1(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("remark1")), remark1));
setPrdtLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get("prdtLength")), prdtLength));
setPrdtWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("prdtWidth")), prdtWidth));
setPrdtThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("prdtThick")), prdtThick));
setPartLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get("partLength")), partLength));
setPartWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get("partWidth")), partWidth));
setPartThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get("partThick")), partThick));
}
/**
......@@ -718,6 +942,18 @@ public class HPSC005 extends DaoEPBase {
map.put(FIELD_FILE_PATH4, StringUtils.toString(filePath4, eiMetadata.getMeta(FIELD_FILE_PATH4)));
map.put(FIELD_FILE_PATH5, StringUtils.toString(filePath5, eiMetadata.getMeta(FIELD_FILE_PATH5)));
map.put(FIELD_INVENT_RECORD_ID, StringUtils.toString(inventRecordId, eiMetadata.getMeta(FIELD_INVENT_RECORD_ID)));
map.put("prdtSpec", StringUtils.toString(prdtSpec, eiMetadata.getMeta("prdtSpec")));
map.put("partType", StringUtils.toString(partType, eiMetadata.getMeta("partType")));
map.put("partCode", StringUtils.toString(partCode, eiMetadata.getMeta("partCode")));
map.put("partName", StringUtils.toString(partName, eiMetadata.getMeta("partName")));
map.put("partSpec", StringUtils.toString(partSpec, eiMetadata.getMeta("partSpec")));
map.put("remark1", StringUtils.toString(remark1, eiMetadata.getMeta("prdtSpec")));
map.put("prdtLength", StringUtils.toString(prdtLength, eiMetadata.getMeta("prdtLength")));
map.put("prdtWidth", StringUtils.toString(prdtWidth, eiMetadata.getMeta("prdtWidth")));
map.put("prdtThick", StringUtils.toString(prdtThick, eiMetadata.getMeta("prdtThick")));
map.put("partLength", StringUtils.toString(partLength, eiMetadata.getMeta("partLength")));
map.put("partWidth", StringUtils.toString(partWidth, eiMetadata.getMeta("partWidth")));
map.put("partThick", StringUtils.toString(partThick, eiMetadata.getMeta("partThick")));
return map;
}
......
......@@ -83,9 +83,10 @@ public class ServiceHPSC002 extends ServiceBase {
BigDecimal totalWt = new BigDecimal(decimalFormat.format(Math.round(num.multiply(unitWt).floatValue())));
hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue());
hppz002.setTotalWt(totalWt);
if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentId().equals("root")) {
hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
}
// if (StringUtils.isNotEmpty(hppz002.getPrdtCode()) && !hppz002.getParentId().equals("root")) {
// hppz002.setPrdtName(HPPZTools.getPz004ByCode(hppz002.getPrdtCode()).getInventName());
// }
hppz002.setSpec(HPPZTools.jointSpec(hppz002.getLength(),hppz002.getWidth(),hppz002.getThick()));
if(hppz002.getParentId().equals("root")){
hppz002.setLv(new Integer(1));
}else{
......@@ -366,12 +367,13 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC003.setPrdtType(THPSC002.getPrdtType());
HPSC003.setPrdtCode(THPSC002.getPrdtCode());
HPSC003.setPrdtName(THPSC002.getPrdtName());
HPSC003.setSpec(THPSC002.getSpec());
HPSC003.setLength(THPSC002.getLength());
HPSC003.setWidth(THPSC002.getWidth());
HPSC003.setThick(THPSC002.getThick());
HPSC003.setRemark(THPSC002.getRemark());
HPSC003.setPlanCompletionDate("");
HPSC003.setStatus(0);
HPSC003.setCreatedBy(UserSession.getUserId());
HPSC003.setCreatedTime(sdf.format(new Date()));
HPSC003.setUpdatedBy(null);
HPSC003.setUpdatedTime(null);
DaoUtils.insert("HPSC003.insert", HPSC003.toMap());
//生产计划详情
......@@ -392,6 +394,11 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC004.setPrdtType(HPSC002.getPrdtType());
HPSC004.setPrdtCode(HPSC002.getPrdtCode());
HPSC004.setPrdtName(HPSC002.getPrdtName());
HPSC004.setSpec(HPSC002.getSpec());
HPSC004.setLength(HPSC002.getLength());
HPSC004.setWidth(HPSC002.getWidth());
HPSC004.setThick(HPSC002.getThick());
HPSC004.setRemark(HPSC002.getRemark());
HPSC004.setNum(HPSC002.getNum());
HPSC004.setUnitWt(HPSC002.getUnitWt());
HPSC004.setFilePath1(HPSC002.getId().toString());
......@@ -401,10 +408,6 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC004.setActualCompletionUnitWt(NumberUtils.toBigDecimal(0.00));
HPSC004.setActualCompletionDate("");
HPSC004.setDelStatus(1);
HPSC004.setCreatedBy(UserSession.getUserId());
HPSC004.setCreatedTime(sdf.format(new Date()));
HPSC004.setUpdatedBy(null);
HPSC004.setUpdatedTime(null);
DaoUtils.insert("HPSC004.insert", HPSC004.toMap());
}
}
......
......@@ -194,9 +194,22 @@ public class ServiceHPSC003 extends ServiceBase {
HPSC005.setProjName(HPSC003.getProjName());
HPSC005.setProductionOrderNo(SCDD);
HPSC005.setInventRecordId(HPSC004.getInventRecordId());
HPSC005.setPrdtType(HPSC004.getPrdtType());
HPSC005.setPrdtCode(HPSC004.getPrdtCode());
HPSC005.setPrdtName(HPSC004.getPrdtName());
HPSC005.setPrdtType(HPSC003.getPrdtType());
HPSC005.setPrdtCode(HPSC003.getPrdtCode());
HPSC005.setPrdtName(HPSC003.getPrdtName());
HPSC005.setPrdtLength(HPSC003.getLength());
HPSC005.setPrdtWidth(HPSC003.getWidth());
HPSC005.setPrdtThick(HPSC003.getThick());
HPSC005.setPrdtSpec(HPSC003.getSpec());
HPSC005.setRemark(HPSC003.getRemark());
HPSC005.setPartType(HPSC004.getPrdtType());
HPSC005.setPartCode(HPSC004.getPrdtCode());
HPSC005.setPartName(HPSC004.getPrdtName());
HPSC005.setPartLength(HPSC004.getLength());
HPSC005.setPartWidth(HPSC004.getWidth());
HPSC005.setPartThick(HPSC004.getThick());
HPSC005.setPartSpec(HPSC004.getSpec());
HPSC005.setRemark1(HPSC004.getRemark());
HPSC005.setPlanCompletionDate(HPSC004.getPlanCompletionDate());
HPSC005.setNum(HPSC004.getNum());
HPSC005.setTotalWt(HPSC004.getUnitWt());
......@@ -219,16 +232,4 @@ public class ServiceHPSC003 extends ServiceBase {
return eiInfo;
}
private static String generateFixedLengthRandomNumber(int length) {
StringBuilder sb = new StringBuilder();
Random rand = new Random();
for (int i = 0; i < length; i++) {
int digit = rand.nextInt(10); // 生成0-9之间的随机数字
sb.append(digit);
}
return sb.toString();
}
}
......@@ -68,7 +68,12 @@
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark", <!-- 备注 -->
LV as "lv"
LV as "lv",
SPEC as "spec",
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick" <!-- 厚 -->
FROM hpjx.t_hpsc002 WHERE 1=1
AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0
......@@ -259,9 +264,17 @@
UPDATED_BY, <!-- 更新人 -->
UPDATED_TIME, <!-- 更新时间 -->
REMARK, <!-- 备注 -->
LV
LV,
SPEC,
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK <!-- 厚 -->
)
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #inventRecordId#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#, #lv#)
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#,
#type#, #leaf#, #sort#, #icon#, #prdtType#, #prdtCode#, #prdtName#, #inventRecordId#, #num#,
#unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #status#,
#delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#, #lv#, #spec#,
#length#, #width#, #thick#)
</insert>
<delete id="delete">
......@@ -300,7 +313,11 @@
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
REMARK = #remark# <!-- 备注 -->
REMARK = #remark#, <!-- 备注 -->
SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick# <!-- 厚 -->
WHERE
ID = #id#
</update>
......@@ -322,7 +339,8 @@
LEAF as "leaf", <!-- 是否有叶子节点 -->
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
LV as "lv"
LV as "lv",
SPEC as "spec"
FROM
hpjx.t_hpsc002
WHERE
......@@ -368,7 +386,11 @@
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark", <!-- 备注 -->
LV as "lv"
LV as "lv",
SPEC as "spec",
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick" <!-- 厚 -->
FROM hpjx.t_hpsc002
WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id">
......@@ -413,7 +435,11 @@
UPDATED_BY as "updatedBy", <!-- 更新人 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
REMARK as "remark", <!-- 备注 -->
LV as "lv"
LV as "lv",
SPEC as "spec",
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick" <!-- 厚 -->
FROM hpjx.t_hpsc002 WHERE 1 = 1
<isNotEmpty prepend=" AND " property="id">
ID = #id#
......
......@@ -98,6 +98,10 @@
UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
REMARK as "remark", <!-- 备注 -->
SPEC as "spec",
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
CONCAT((
SELECT
format((ifnull( SUM( ACTUAL_COMPLETION_NUM ), 0 ) / ifnull( SUM( NUM ), 0 ) * 100),2)
......@@ -180,6 +184,10 @@
PROJ_NAME, <!-- 项目名称 -->
PLAN_INFO_NO, <!-- 生产计划单号 -->
INVENT_RECORD_ID,
SPEC,
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
......@@ -192,7 +200,9 @@
DEP_CODE, <!-- 部门编码 -->
REMARK <!-- 备注 -->
)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#,#inventRecordId#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#)
VALUES (#id#, #companyCode#, #projType#, #projCode#, #projName#, #planInfoNo#,#inventRecordId#,
#spec#, #length#, #width#, #thick#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #status#, #createdBy#,
#createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#)
</insert>
<delete id="delete">
......@@ -209,6 +219,10 @@
PROJ_NAME = #projName#, <!-- 项目编码 -->
PLAN_INFO_NO = #planInfoNo#, <!-- 生产计划单号 -->
PRDT_TYPE = #prdtType#,
SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick#, <!-- 厚 -->
PRDT_CODE = #prdtCode#, <!-- 产品编码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 -->
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
......
......@@ -163,6 +163,10 @@
SORT as "sort", <!-- 排序字段 -->
ICON as "icon", <!-- 图片地址 -->
INVENT_RECORD_ID as "inventRecordId",
SPEC as "spec",
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
......@@ -319,6 +323,10 @@
SORT, <!-- 排序字段 -->
ICON, <!-- 图片地址 -->
INVENT_RECORD_ID,
SPEC,
LENGTH, <!-- 长 -->
WIDTH, <!-- 宽 -->
THICK, <!-- 厚 -->
PRDT_TYPE,
PRDT_CODE, <!-- 产品编码 -->
PRDT_NAME, <!-- 产品名称 -->
......@@ -343,7 +351,12 @@
UPDATED_TIME, <!-- 更新时间 -->
REMARK <!-- 备注 -->
)
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#, #type#, #leaf#, #sort#, #icon#,#inventRecordId#, #prdtType#, #prdtCode#, #prdtName#, #num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#, #planCommentDate#, #planCompletionDate#, #actualCompletionDate#, #actualCompletionNum#, #actualCompletionUnitWt#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #remark#)
VALUES (#id#, #companyCode#, #deptCode#, #projCode#, #projName#, #parentId#, #parentPrdtName#,
#type#, #leaf#, #sort#, #icon#,#inventRecordId#,#spec#, #length#, #width#, #thick#,#prdtType#, #prdtCode#, #prdtName#,
#num#, #unitWt#, #totalWt#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#,
#planCommentDate#, #planCompletionDate#, #actualCompletionDate#, #actualCompletionNum#,
#actualCompletionUnitWt#, #status#, #delStatus#, #createdBy#, #createdTime#, #updatedBy#,
#updatedTime#, #remark#)
</insert>
<delete id="delete">
......@@ -387,7 +400,11 @@
CREATED_TIME = #createdTime#, <!-- 创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
REMARK = #remark# <!-- 备注 -->
REMARK = #remark#, <!-- 备注 -->
SPEC = #spec#, <!-- 规格 -->
LENGTH = #length#, <!-- 长 -->
WIDTH = #width#, <!-- 宽 -->
THICK = #thick# <!-- 厚 -->
WHERE
ID = #id#
</update>
......@@ -421,6 +438,10 @@
PRDT_TYPE as "prdtType",
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
SPEC as "spec",
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
NUM as "num", <!-- 数量 -->
UNIT_WT as "unitWt", <!-- 单重 -->
TOTAL_WT as "totalWt", <!-- 总重 -->
......
......@@ -137,7 +137,19 @@
FILE_PATH2 as "filePath2", <!-- 文件地址2 -->
FILE_PATH3 as "filePath3", <!-- 文件地址3 -->
FILE_PATH4 as "filePath4", <!-- 文件地址4 -->
FILE_PATH5 as "filePath5" <!-- 文件地址5 -->
FILE_PATH5 as "filePath5", <!-- 文件地址5 -->
PRDT_SPEC as "prdtSpec",
PART_TYPE as "partType",
PART_CODE as "partCode",
PART_NAME as "partName",
PART_SPEC as "partSpec",
REMARK1 as "remark1",
PRDT_LENGTH as "prdtLength", <!-- 长 -->
PRDT_WIDTH as "prdtWidth", <!-- 宽 -->
PRDT_THICK as "prdtThick", <!-- 厚 -->
PART_LENGTH as "partLength", <!-- 长 -->
PART_WIDTH as "partWidth", <!-- 宽 -->
PART_THICK as "partThick" <!-- 厚 -->
FROM ${hpjxSchema}.T_HPSC005 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
......@@ -242,9 +254,25 @@
FILE_PATH2, <!-- 文件地址2 -->
FILE_PATH3, <!-- 文件地址3 -->
FILE_PATH4, <!-- 文件地址4 -->
FILE_PATH5 <!-- 文件地址5 -->
FILE_PATH5, <!-- 文件地址5 -->
PRDT_SPEC,
PART_TYPE,
PART_CODE,
PART_NAME,
PART_SPEC,
REMARK1,
PRDT_LENGTH, <!-- 长 -->
PRDT_WIDTH, <!-- 宽 -->
PRDT_THICK, <!-- 厚 -->
PART_LENGTH, <!-- 长 -->
PART_WIDTH, <!-- 宽 -->
PART_THICK <!-- 厚 -->
)
VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#,#inventRecordId#, #prdtType#, #prdtCode#, #prdtName#, #planCompletionDate#, #num#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#, #updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#)
VALUES (#id#, #companyCode#, #projCode#, #projName#, #productionOrderNo#,#inventRecordId#, #prdtType#, #prdtCode#,
#prdtName#, #planCompletionDate#, #num#, #totalWt#, #status#, #orgNo#, #orgName#, #createdBy#, #createdTime#,
#updatedBy#, #updatedTime#, #depCode#, #remark#, #filePath1#, #filePath2#, #filePath3#, #filePath4#, #filePath5#,
#prdtSpec#,#partType#,#partCode#,#partName#,#partSpec#,#remark1#,
#prdtLength#,#prdtWidth#,#prdtThick#,#partLength#,#partWidth#,#partThick#)
</insert>
<delete id="delete">
......
......@@ -103,10 +103,24 @@ let productionOrderQueryCallback = function (row) {
resultGrid.setCellValue(0, "productionOrderNo", row[i]["productionOrderNo"]);
resultGrid.setCellValue(0, "amount", row[i]["num"]);
resultGrid.setCellValue(0, "weight", row[i]["totalWt"]);
resultGrid.setCellValue(0, "inventType", row[i]["prdtType"]);
resultGrid.setCellValue(0, "inventCode", row[i]["prdtCode"]);
resultGrid.setCellValue(0, "inventName", row[i]["prdtName"]);
resultGrid.setCellValue(0, "inventRecordId", row[i]["inventRecordId"]);
resultGrid.setCellValue(0, "projCode", row[i]["projCode"]);
resultGrid.setCellValue(0, "projName", row[i]["projName"]);
resultGrid.setCellValue(0, "prdtType", row[i]["prdtType"]);
resultGrid.setCellValue(0, "prdtCode", row[i]["prdtCode"]);
resultGrid.setCellValue(0, "prdtName", row[i]["prdtName"]);
resultGrid.setCellValue(0, "prdtSpec", row[i]["prdtSpec"]);
resultGrid.setCellValue(0, "prdtLength", row[i]["prdtLength"]);
resultGrid.setCellValue(0, "prdtWidth", row[i]["prdtWidth"]);
resultGrid.setCellValue(0, "prdtThick", row[i]["prdtThick"]);
resultGrid.setCellValue(0, "partType", row[i]["partType"]);
resultGrid.setCellValue(0, "partCode", row[i]["partCode"]);
resultGrid.setCellValue(0, "partName", row[i]["partName"]);
resultGrid.setCellValue(0, "partSpec", row[i]["partSpec"]);
resultGrid.setCellValue(0, "partLength", row[i]["partLength"]);
resultGrid.setCellValue(0, "partWidth", row[i]["partWidth"]);
resultGrid.setCellValue(0, "partThick", row[i]["partThick"]);
resultGrid.setCellValue(0, "remark", row[i]["remark"]);
resultGrid.setCellValue(0, "remark1", row[i]["remark1"]);
lists[i] = i;
}
resultGrid.setCheckedRows(lists);
......
......@@ -42,6 +42,8 @@
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目号" align="center"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称" align="center"/>
<EF:EFColumn ename="prodNo" cname="生产入库单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date" readonly="true"
......@@ -51,13 +53,26 @@
sumType="all" readonly="true"/>
<EF:EFColumn cname="重量" ename="weight" width="100" align="right" format="{0:N3}"
sumType="all" readonly="true"/>
<EF:EFComboColumn cname="存货类型" ename="inventType" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
<EF:EFComboColumn ename="prdtType" cname="部件类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn cname="存货代码" ename="inventCode" width="120" align="center" enable="false"/>
<EF:EFColumn cname="存货名称" ename="inventName" width="120" align="center" enable="false"/>
<EF:EFColumn ename="inventRecordId" cname="存货档案ID" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" editType="textarea" readonly="true"/>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码" align="center"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称" align="center"/>
<EF:EFColumn enable="false" ename="prdtSpec" cname="部件规格" align="center"/>
<EF:EFColumn hidden="true" enable="false" ename="prdtLength" cname="部件-长"/>
<EF:EFColumn hidden="true" enable="false" ename="prdtWidth" cname="部件-宽"/>
<EF:EFColumn hidden="true" enable="false" ename="prdtThick" cname="部件-厚"/>
<EF:EFColumn enable="false" ename="remark" cname="部件备注"/>
<EF:EFComboColumn ename="partType" cname="零件类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="partCode" cname="零件编码" align="center"/>
<EF:EFColumn enable="false" ename="partName" cname="零件名称" align="center"/>
<EF:EFColumn enable="false" ename="partSpec" cname="零件规格" align="center"/>
<EF:EFColumn hidden="true" enable="false" ename="partLength" cname="零件-长"/>
<EF:EFColumn hidden="true" enable="false" ename="partWidth" cname="零件-宽"/>
<EF:EFColumn hidden="true" enable="false" ename="partThick" cname="零件-厚"/>
<EF:EFColumn enable="false" ename="remark1" cname="零件备注"/>
<EF:EFColumn cname="原生产单号" ename="prodNoOld" enable="false" width="140" align="center" hidden="true"/>
<EF:EFColumn cname="创建人名称" ename="createdName" enable="false" width="120" align="center"/>
<EF:EFColumn cname="创建时间" ename="createdTime" enable="false" width="140" align="center"
......
......@@ -30,7 +30,6 @@
<EF:EFGrid blockId="result" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="inventRecordId" cname="项目档案ID" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目号" />
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFColumn enable="false" ename="productionOrderNo" cname="生产订单号"/>
......@@ -39,6 +38,22 @@
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称"/>
<EF:EFColumn enable="false" ename="prdtSpec" cname="部件规格"/>
<EF:EFColumn hidden="true" enable="false" ename="prdtLength" cname="部件-长"/>
<EF:EFColumn hidden="true" enable="false" ename="prdtWidth" cname="部件-宽"/>
<EF:EFColumn hidden="true" enable="false" ename="prdtThick" cname="部件-厚"/>
<EF:EFColumn enable="false" ename="remark" cname="部件备注"/>
<EF:EFComboColumn ename="partType" cname="零件类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="partCode" cname="零件编码"/>
<EF:EFColumn enable="false" ename="partName" cname="零件名称"/>
<EF:EFColumn enable="false" ename="partSpec" cname="零件规格"/>
<EF:EFColumn hidden="true" enable="false" ename="partLength" cname="零件-长"/>
<EF:EFColumn hidden="true" enable="false" ename="partWidth" cname="零件-宽"/>
<EF:EFColumn hidden="true" enable="false" ename="partThick" cname="零件-厚"/>
<EF:EFColumn enable="false" ename="remark1" cname="零件备注"/>
<EF:EFColumn enable="false" ename="planCompletionDate" cname="计划完成日期"/>
<EF:EFColumn enable="false" ename="num" cname="计划数量"/>
<EF:EFColumn enable="false" ename="totalWt" cname="计划重量"/>
......
......@@ -208,59 +208,68 @@ $(function () {
return template;
}
},{
field: "inventRecordId",
template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventNameGlobalData[i]['textField']+'-'+inventNameGlobalData[i]['param1Field'];
}
}
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);
field: "prdtName",
query: function (container, options) {
let eiInfo = new EiInfo();
eiInfo.set("inqu_status-0-inventTypes", [3, 4]);
eiInfo.set("inqu_status-0-inventType", options.model["prdtType"]);
var dataSource;
EiCommunicator.send("HPPZ006", "queryPrdtComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_prdt_name_block_id").getMappedRows();
inventNameGlobalData = dataSource;
},
onFail: function (ei) {
}
}, {async: false});
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataParam1Field: "param1Field",
dataValueField: "valueField",
dataSource: dataSource,
template: "#=textField#-#=param1Field#"
});
return eiInfo;
}
}
// {
// field: "inventRecordId",
// template: function (dataItem) {
// for (let i = 0; i < inventNameGlobalData.length; i++) {
// if (inventNameGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
// return inventNameGlobalData[i]['textField']+'-'+inventNameGlobalData[i]['param1Field'];
// }
// }
// 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("inqu_status-0-inventTypes", [3, 4]);
// eiInfo.set("inqu_status-0-inventType", options.model["prdtType"]);
// var dataSource;
// EiCommunicator.send("HPPZ006", "queryPrdtComboBox", eiInfo, {
// onSuccess: function (ei) {
// dataSource = ei.getBlock("invent_prdt_name_block_id").getMappedRows();
// inventNameGlobalData = dataSource;
// },
// onFail: function (ei) {
// }
// }, {async: false});
// input.kendoDropDownList({
// valuePrimitive: true,
// dataTextField: "textField",
// dataParam1Field: "param1Field",
// dataValueField: "valueField",
// dataSource: dataSource,
// template: "#=textField#-#=param1Field#"
// });
// }
// }
],
loadComplete: function (grid) {
// 此grid对象
grid.dataSource.bind("change", function(e) {
if (e.field == "inventRecordId") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === item.inventRecordId) {
resultGrid.setCellValue(item, 'prdtCode', inventNameGlobalData[i]['textField'])
}
}
}
});
// grid.dataSource.bind("change", function(e) {
// if (e.field == "inventRecordId") {
// var tr,index;
// // 获取此model元素信息
// var item = e.items[0];
// for (let i = 0; i < inventNameGlobalData.length; i++) {
// if (inventNameGlobalData[i]['valueField'] === item.inventRecordId) {
// resultGrid.setCellValue(item, 'prdtCode', inventNameGlobalData[i]['textField'])
// }
// }
// }
// });
}
},
};
......
......@@ -49,12 +49,22 @@
<EF:EFComboColumn cname="产品类型" ename="prdtType" width="90" align="center" required="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" required="true" cname="产品名称"/>
<EF:EFColumn ename="prdtCode" required="true" cname="产品编码" hidden="true"/>
<EF:EFPopupColumn ename="prdtName" cname="产品名称" width="200" popupType="ServiceGrid"
popupTitle="产品信息" serviceName="HPPZ006" methodName="queryPrdtComboBox" resultId="invent_prdt_name_block_id"
columnEnames="param1Field,textField"
columnCnames="产品名称,产品编码"
backFillColumnIds="param1Field,textField"
backFillFieldIds="prdtName,prdtCode"
valueField="param1Field" textField="param1Field"/>
<EF:EFColumn ename="prdtCode" cname="产品编码"/>
<EF:EFColumn ename="length" cname="长" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽" format="{0:N3}"/>
<EF:EFColumn ename="thick" cname="厚" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="备注" />
<EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级产品名称"/>
<EF:EFColumn enable="false" ename="parentPrdtName" cname="上级产品名称"/>
<EF:EFColumn ename="num" required="true" cname="数量"/>
<EF:EFColumn ename="unitWt" required="true" format="{0:N3}" cname="单重"/>
<EF:EFColumn ename="num" cname="数量"/>
<EF:EFColumn ename="unitWt" format="{0:N3}" cname="单重"/>
<EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" cname="总重"/>
<EF:EFComboColumn enable="false" ename="status" align="center"
columnTemplate="#=textField#" optionLabel=" "
......
......@@ -42,6 +42,12 @@ $(function () {
}
}
],
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'){
query();
}
},
onRowClick : function(e) {
var block = detailGrid.getEiBlock();
if (block != null) {
......
......@@ -41,11 +41,13 @@
<EF:EFColumn enable="false" ename="projCode" cname="项目号" readonly="true"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称" readonly="true"/>
<EF:EFColumn enable="false" ename="planInfoNo" cname="生产计划单号" readonly="true"/>
<EF:EFComboColumn ename="prdtType" cname="产品类型" width="90" align="center" enable="false">
<EF:EFComboColumn ename="prdtType" cname="部件类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="产品编码" readonly="true"/>
<EF:EFColumn enable="false" ename="prdtName" cname="产品名称" readonly="true"/>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码" readonly="true"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称" readonly="true"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150"
required='true' readonly="true"/>
<EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" readonly="true"/>
......@@ -61,11 +63,13 @@
<EF:EFRegion id="detail" title="明细信息">
<EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="prdtType" cname="件类型" width="90" align="center" readonly="true">
<EF:EFComboColumn ename="prdtType" cname="件类型" width="90" align="center" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码"/>
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="部件名称"/>
<EF:EFColumn enable="false" ename="prdtCode" cname="零件编码"/>
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零件名称"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFComboColumn enable="false" ename="delStatus" cname="状态">
<EF:EFOption label="已删除" value="0"/>
<EF:EFOption label="启用" value="1"/>
......
......@@ -37,8 +37,21 @@
<EF:EFColumn enable="false" ename="projCode" cname="项目号" />
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFColumn enable="false" ename="productionOrderNo" cname="生产订单号"/>
<EF:EFComboColumn ename="prdtType" cname="部件类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码"/>
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称"/>
<EF:EFColumn enable="false" ename="prdtSpec" cname="部件规格"/>
<EF:EFColumn enable="false" ename="remark" cname="部件备注"/>
<EF:EFComboColumn ename="partType" cname="零件类型" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="partCode" cname="零件编码"/>
<EF:EFColumn enable="false" ename="partName" cname="零件名称"/>
<EF:EFColumn enable="false" ename="partSpec" cname="零件规格"/>
<EF:EFColumn enable="false" ename="remark1" cname="零件备注"/>
<EF:EFColumn enable="false" ename="planCompletionDate" cname="计划完成日期"/>
<EF:EFColumn enable="false" ename="num" cname="计划数量"/>
<EF:EFColumn enable="false" ename="totalWt" cname="计划重量"/>
......
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