Commit c52075a2 by 江和松

物料增加长宽厚字段

parent 7f654c5f
...@@ -91,7 +91,7 @@ public enum DdynamicEnum { ...@@ -91,7 +91,7 @@ public enum DdynamicEnum {
* 用途:存货档案下拉框,带id名称等信息 * 用途:存货档案下拉框,带id名称等信息
* 编写: * 编写:
*/ */
PRODUCT_BLOCK_ID("product_block_id","inventCode","inventName","id","inventType","HGPZ005.queryProductComboBox"), PRODUCT_BLOCK_ID("product_block_id","inventCode","inventName","id","inventType","length","width","thick","HGPZ005.queryProductComboBox"),
/** /**
* 模块:存货档案(ALL) * 模块:存货档案(ALL)
* 用途:存货档案下拉框 * 用途:存货档案下拉框
......
...@@ -345,6 +345,9 @@ ...@@ -345,6 +345,9 @@
a.INVENT_TYPE as "inventType", a.INVENT_TYPE as "inventType",
a.INVENT_CODE as "inventCode", a.INVENT_CODE as "inventCode",
a.INVENT_NAME as "inventName", a.INVENT_NAME as "inventName",
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
b.PAR_INVENT_TYPE as "parInventType" b.PAR_INVENT_TYPE as "parInventType"
FROM ${hggpSchema}.HGPZ005 a FROM ${hggpSchema}.HGPZ005 a
left join ${hggpSchema}.hgpz004 b on a.INVENT_TYPE = b.INVENT_TYPE and b.STATUS=1 and b.DELETE_FLAG = 0 left join ${hggpSchema}.hgpz004 b on a.INVENT_TYPE = b.INVENT_TYPE and b.STATUS=1 and b.DELETE_FLAG = 0
......
...@@ -40,6 +40,9 @@ public class HGSC004A extends DaoEPBase { ...@@ -40,6 +40,9 @@ public class HGSC004A extends DaoEPBase {
public static final String FIELD_product_name = "productName"; /* 产品名称*/ public static final String FIELD_product_name = "productName"; /* 产品名称*/
public static final String FIELD_product_type = "productType"; /* 产品type*/ public static final String FIELD_product_type = "productType"; /* 产品type*/
public static final String FIELD_invent_type = "inventType"; /* 档案类型*/ public static final String FIELD_invent_type = "inventType"; /* 档案类型*/
public static final String FIELD_length = "length"; /* 长*/
public static final String FIELD_width = "width"; /* 宽*/
public static final String FIELD_thick = "thick"; /* 厚*/
public static final String FIELD_product_status = "productStatus"; /* 产品状态 0:未提交,1:已提交*/ public static final String FIELD_product_status = "productStatus"; /* 产品状态 0:未提交,1:已提交*/
public static final String FIELD_change_type = "changeType"; /* 变更类型:默认0,1:增加,2:替换,3:删除*/ public static final String FIELD_change_type = "changeType"; /* 变更类型:默认0,1:增加,2:替换,3:删除*/
public static final String FIELD_quantity = "quantity"; /* 数量*/ public static final String FIELD_quantity = "quantity"; /* 数量*/
...@@ -72,6 +75,9 @@ public class HGSC004A extends DaoEPBase { ...@@ -72,6 +75,9 @@ public class HGSC004A extends DaoEPBase {
public static final String COL_product_name = "product_name"; /* 产品名称*/ public static final String COL_product_name = "product_name"; /* 产品名称*/
public static final String COL_product_type = "product_type"; /* 产品类型*/ public static final String COL_product_type = "product_type"; /* 产品类型*/
public static final String COL_invent_type = "invent_type"; /* 档案类型*/ public static final String COL_invent_type = "invent_type"; /* 档案类型*/
public static final String COL_length = "length"; /* 长*/
public static final String COL_width = "width"; /* 宽*/
public static final String COL_thick = "thick"; /* 厚*/
public static final String COL_product_status = "product_status"; /* 产品状态 0:未提交,1:已提交*/ public static final String COL_product_status = "product_status"; /* 产品状态 0:未提交,1:已提交*/
public static final String COL_change_type = "change_type"; /* 变更类型:默认0,1:增加,2:替换,3:删除*/ public static final String COL_change_type = "change_type"; /* 变更类型:默认0,1:增加,2:替换,3:删除*/
public static final String COL_quantity = "quantity"; /* 数量*/ public static final String COL_quantity = "quantity"; /* 数量*/
...@@ -119,6 +125,9 @@ public class HGSC004A extends DaoEPBase { ...@@ -119,6 +125,9 @@ public class HGSC004A extends DaoEPBase {
private String productName = " "; /* 产品名称*/ private String productName = " "; /* 产品名称*/
private String productType = " "; /* 产品类型*/ private String productType = " "; /* 产品类型*/
private String inventType = " "; /* 档案类型*/ private String inventType = " "; /* 档案类型*/
private BigDecimal length = new BigDecimal("0"); /* 长*/
private BigDecimal width = new BigDecimal("0"); /* 宽*/
private BigDecimal thick = new BigDecimal("0"); /* 厚*/
private Integer productStatus = new Integer(0); /* 产品状态 0:未提交,1:已提交*/ private Integer productStatus = new Integer(0); /* 产品状态 0:未提交,1:已提交*/
private Integer changeType = new Integer(0); /* 变更类型:默认0,1:增加,2:替换,3:删除*/ private Integer changeType = new Integer(0); /* 变更类型:默认0,1:增加,2:替换,3:删除*/
private Integer quantity = new Integer(0); /* 数量*/ private Integer quantity = new Integer(0); /* 数量*/
...@@ -234,6 +243,27 @@ public class HGSC004A extends DaoEPBase { ...@@ -234,6 +243,27 @@ public class HGSC004A extends DaoEPBase {
eiColumn.setDescName("档案类型"); eiColumn.setDescName("档案类型");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_length);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("长");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_width);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("宽");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_thick);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(12);
eiColumn.setDescName("厚");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_product_status); eiColumn = new EiColumn(FIELD_product_status);
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(0); eiColumn.setScaleLength(0);
...@@ -786,6 +816,30 @@ public class HGSC004A extends DaoEPBase { ...@@ -786,6 +816,30 @@ public class HGSC004A extends DaoEPBase {
this.inventType = inventType; this.inventType = inventType;
} }
public BigDecimal getLength() {
return length;
}
public void setLength(BigDecimal length) {
this.length = length;
}
public BigDecimal getWidth() {
return width;
}
public void setWidth(BigDecimal width) {
this.width = width;
}
public BigDecimal getThick() {
return thick;
}
public void setThick(BigDecimal thick) {
this.thick = thick;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -812,6 +866,9 @@ public class HGSC004A extends DaoEPBase { ...@@ -812,6 +866,9 @@ public class HGSC004A extends DaoEPBase {
setProductId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_product_id)), productId)); setProductId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_product_id)), productId));
setProductType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_product_type)), productType)); setProductType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_product_type)), productType));
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_invent_type)), inventType)); setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_invent_type)), inventType));
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_length)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_width)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_thick)), thick));
setProductStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_product_status)), productStatus)); setProductStatus(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_product_status)), productStatus));
setChangeType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_change_type)), changeType)); setChangeType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_change_type)), changeType));
setQuantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_quantity)), quantity)); setQuantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_quantity)), quantity));
...@@ -852,6 +909,9 @@ public class HGSC004A extends DaoEPBase { ...@@ -852,6 +909,9 @@ public class HGSC004A extends DaoEPBase {
map.put(FIELD_product_id, StringUtils.toString(productId, eiMetadata.getMeta(FIELD_product_id))); map.put(FIELD_product_id, StringUtils.toString(productId, eiMetadata.getMeta(FIELD_product_id)));
map.put(FIELD_product_type, StringUtils.toString(productType, eiMetadata.getMeta(FIELD_product_type))); map.put(FIELD_product_type, StringUtils.toString(productType, eiMetadata.getMeta(FIELD_product_type)));
map.put(FIELD_invent_type, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_invent_type))); map.put(FIELD_invent_type, StringUtils.toString(inventType, eiMetadata.getMeta(FIELD_invent_type)));
map.put(FIELD_length, StringUtils.toString(length, eiMetadata.getMeta(FIELD_length)));
map.put(FIELD_width, StringUtils.toString(width, eiMetadata.getMeta(FIELD_width)));
map.put(FIELD_thick, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_thick)));
map.put(FIELD_product_status, StringUtils.toString(productStatus, eiMetadata.getMeta(FIELD_product_status))); map.put(FIELD_product_status, StringUtils.toString(productStatus, eiMetadata.getMeta(FIELD_product_status)));
map.put(FIELD_change_type, StringUtils.toString(changeType, eiMetadata.getMeta(FIELD_change_type))); map.put(FIELD_change_type, StringUtils.toString(changeType, eiMetadata.getMeta(FIELD_change_type)));
map.put(FIELD_quantity, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_quantity))); map.put(FIELD_quantity, StringUtils.toString(quantity, eiMetadata.getMeta(FIELD_quantity)));
......
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
product_code as "productCode", <!-- 产品编号 --> product_code as "productCode", <!-- 产品编号 -->
product_name as "productName", <!-- 产品名称 --> product_name as "productName", <!-- 产品名称 -->
invent_type as "inventType", <!-- 档案类型 --> invent_type as "inventType", <!-- 档案类型 -->
length as "length", <!-- 长 -->
width as "width", <!-- 宽 -->
thick as "thick", <!-- 厚 -->
product_status as "productStatus", <!-- 产品状态 0:未提交,1:已提交 --> product_status as "productStatus", <!-- 产品状态 0:未提交,1:已提交 -->
change_type as "changeType", <!-- 变更类型:默认0,1:增加,2:替换,3:删除 --> change_type as "changeType", <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity as "quantity", <!-- 数量 --> quantity as "quantity", <!-- 数量 -->
...@@ -129,6 +132,15 @@ ...@@ -129,6 +132,15 @@
<isNotEmpty prepend=" AND " property="ids"> <isNotEmpty prepend=" AND " property="ids">
id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate> id IN <iterate close=")" open="(" conjunction="," property="ids">#ids[]#</iterate>
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="length">
length = #length#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="width">
width = #width#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="thick">
thick = #thick#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -178,6 +190,9 @@ ...@@ -178,6 +190,9 @@
a.product_code as "productCode", <!-- 产品编号 --> a.product_code as "productCode", <!-- 产品编号 -->
a.product_name as "productName", <!-- 产品名称 --> a.product_name as "productName", <!-- 产品名称 -->
a.invent_type as "inventType", <!-- 档案类型 --> a.invent_type as "inventType", <!-- 档案类型 -->
a.length as "length", <!-- 长 -->
a.width as "width", <!-- 宽 -->
a.thick as "thick", <!-- 厚 -->
a.product_status as "productStatus", <!-- 产品状态 0:未提交,1:已提交 --> a.product_status as "productStatus", <!-- 产品状态 0:未提交,1:已提交 -->
a.change_type as "changeType", <!-- 变更类型:默认0,1:增加,2:替换,3:删除 --> a.change_type as "changeType", <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
a.quantity as "quantity", <!-- 数量 --> a.quantity as "quantity", <!-- 数量 -->
...@@ -267,13 +282,16 @@ ...@@ -267,13 +282,16 @@
created_time, <!-- 创建时间 --> created_time, <!-- 创建时间 -->
updated_by, <!-- 更新人 --> updated_by, <!-- 更新人 -->
updated_name, <!-- 修改人名称 --> updated_name, <!-- 修改人名称 -->
updated_time <!-- 更新时间 --> updated_time, <!-- 更新时间 -->
length, <!-- 长 -->
width, <!-- 宽 -->
thick <!-- 厚 -->
) )
VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#,
#parentProdCode#, #parentProdName#,#leaf#,#sort#,#lv#, #materialId#, #productId#,#productType#, #parentProdCode#, #parentProdName#,#leaf#,#sort#,#lv#, #materialId#, #productId#,#productType#,
#productCode#, #productName#,#inventType#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#, #productCode#, #productName#,#inventType#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#,
#approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#) #updatedName#, #updatedTime#, #length#, #width#, #thick#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -300,6 +318,9 @@ ...@@ -300,6 +318,9 @@
product_code = #productCode#, <!-- 产品编号 --> product_code = #productCode#, <!-- 产品编号 -->
product_name = #productName#, <!-- 产品名称 --> product_name = #productName#, <!-- 产品名称 -->
invent_type = #inventType#, <!-- 档案类型 --> invent_type = #inventType#, <!-- 档案类型 -->
length = #length#, <!-- 长 -->
width = #width#, <!-- 宽 -->
thick = #thick#, <!-- 厚 -->
product_status = #productStatus#, <!-- 产品状态 0:未提交,1:已提交 --> product_status = #productStatus#, <!-- 产品状态 0:未提交,1:已提交 -->
change_type = #changeType#, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 --> change_type = #changeType#, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity = #quantity#, <!-- 数量 --> quantity = #quantity#, <!-- 数量 -->
......
let projCode = ''; let projCode = '';
var companyCode=''; var companyCode='';
var rowNum=0;
$(function () { $(function () {
var productCodeBox = __eiInfo.getBlock("product_block_id").getMappedRows(); var productCodeBox = __eiInfo.getBlock("product_block_id").getMappedRows();
...@@ -128,6 +127,29 @@ $(function () { ...@@ -128,6 +127,29 @@ $(function () {
} }
}, },
{ {
field: "changeType",
title: "变更类型",
template: function (item) {
let changeType = item.changeType;
let template = '';
if (item.id){
if(changeType == 1){
//新增
template += '<div style="display:flex;justify-content: center;align-items: center; position: absolute;top: 0;left: 0; width:100%;height:100%;background-color: green;">增加</div>'
}
if(changeType == 2){
//替换
template += '<div style="display:flex;justify-content: center;align-items: center; position: absolute;top: 0;left: 0; width:100%;height:100%;background-color: yellow;">替换</div>'
}
if(changeType == 3){
//删除
template += '<div style="display:flex;justify-content: center;align-items: center; position: absolute;top: 0;left: 0; width:100%;height:100%;background-color: red;">删除</div>'
}
}
return template;
}
},
{
field: "productCode", field: "productCode",
template: function (item) { template: function (item) {
let template = ""; let template = "";
...@@ -137,6 +159,9 @@ $(function () { ...@@ -137,6 +159,9 @@ $(function () {
item['productName'] = productCodeBox[i]['textField']; item['productName'] = productCodeBox[i]['textField'];
item['productId'] = productCodeBox[i]['param1Field']; item['productId'] = productCodeBox[i]['param1Field'];
item['inventType'] = productCodeBox[i]['param2Field']; item['inventType'] = productCodeBox[i]['param2Field'];
item['length'] = productCodeBox[i]['param3Field'];
item['width'] = productCodeBox[i]['param4Field'];
item['thick'] = productCodeBox[i]['param5Field'];
console.log(item) console.log(item)
template = productCodeBox[i]['valueField']; template = productCodeBox[i]['valueField'];
}else{ }else{
...@@ -203,22 +228,6 @@ $(function () { ...@@ -203,22 +228,6 @@ $(function () {
console.log(grid.getCheckedBlockData()); console.log(grid.getCheckedBlockData());
} }
}); });
//给变更类型的颜色处理
let rows = grid.eiBlock.rows;
for (let i = 0; i < rows.length; i++) {
var tdId = "datacell_"+i+"_8";
if (rows[i][19] === "1") {
//新增
document.getElementById(tdId).style.backgroundColor="green";
}else if (rows[i][19] === "2"){
//替换
document.getElementById(tdId).style.backgroundColor="yellow";
}else if (rows[i][19] === "3"){
//删除
document.getElementById(tdId).style.backgroundColor="red";
}
}
// 此 grid 对象 // 此 grid 对象
// 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化 // 处理父子级联动,通过监听 change 事件,判断父级节点是否发生变化
grid.dataSource.bind("change", function(e) { grid.dataSource.bind("change", function(e) {
......
...@@ -4,7 +4,11 @@ ...@@ -4,7 +4,11 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<style>
td{
position: relative;
}
</style>
<EF:EFPage title="物料清单详情"> <EF:EFPage title="物料清单详情">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<EF:EFInput ename="inqu_status-0-materialId" type="hidden"/> <EF:EFInput ename="inqu_status-0-materialId" type="hidden"/>
...@@ -50,6 +54,9 @@ ...@@ -50,6 +54,9 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="productCode" required="true" cname="产品编号" /> <EF:EFColumn ename="productCode" required="true" cname="产品编号" />
<EF:EFColumn ename="productName" cname="产品名称" width="120" align="center" enable="false"/> <EF:EFColumn ename="productName" cname="产品名称" width="120" align="center" enable="false"/>
<EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="quantity" required="true" cname="数量"/> <EF:EFColumn ename="quantity" required="true" cname="数量"/>
<EF:EFColumn ename="singleWeight" required="true" format="{0:N3}" cname="单重(kg)"/> <EF:EFColumn ename="singleWeight" required="true" format="{0:N3}" cname="单重(kg)"/>
<EF:EFColumn enable="true" required="true" format="{0:N3}" ename="totalWeight" cname="总重(kg)"/> <EF:EFColumn enable="true" required="true" format="{0:N3}" ename="totalWeight" cname="总重(kg)"/>
......
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