Commit c486982b by liuyang

2024-04-09 报工管理功能调整

parent 397a1ce5
...@@ -4,6 +4,8 @@ import com.baosight.iplat4j.core.util.NumberUtils; ...@@ -4,6 +4,8 @@ import com.baosight.iplat4j.core.util.NumberUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baosight.iplat4j.core.ei.EiColumn; import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.core.data.DaoEPBase; import com.baosight.iplat4j.core.data.DaoEPBase;
import java.math.BigInteger;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import com.baosight.iplat4j.core.util.StringUtils; import com.baosight.iplat4j.core.util.StringUtils;
...@@ -33,6 +35,7 @@ public class HPSC008 extends DaoEPBase { ...@@ -33,6 +35,7 @@ public class HPSC008 extends DaoEPBase {
public static final String FIELD_PRDT_CODE = "prdtCode"; /* 产品代码*/ public static final String FIELD_PRDT_CODE = "prdtCode"; /* 产品代码*/
public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/ public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/
public static final String FIELD_WEIGHT = "weight"; /* 产量*/ public static final String FIELD_WEIGHT = "weight"; /* 产量*/
public static final String FIELD_WEIGHT_JH = "weightJh"; /* 产量*/
public static final String FIELD_REMARK = "remark"; /* 备注*/ public static final String FIELD_REMARK = "remark"; /* 备注*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0:否1.是*/ public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0:否1.是*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/ public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
...@@ -83,6 +86,7 @@ public class HPSC008 extends DaoEPBase { ...@@ -83,6 +86,7 @@ public class HPSC008 extends DaoEPBase {
private String prdtCode = " "; /* 产品代码*/ private String prdtCode = " "; /* 产品代码*/
private String prdtName = " "; /* 产品名称*/ private String prdtName = " "; /* 产品名称*/
private BigDecimal weight = new BigDecimal("0"); /* 产量*/ private BigDecimal weight = new BigDecimal("0"); /* 产量*/
private BigDecimal weightJh = new BigDecimal(BigInteger.ZERO); /*加焊产量*/
private String remark = " "; /* 备注*/ private String remark = " "; /* 备注*/
private Integer deleteFlag; /* 是否删除0:否1.是*/ private Integer deleteFlag; /* 是否删除0:否1.是*/
private String createdBy = " "; /* 创建人*/ private String createdBy = " "; /* 创建人*/
...@@ -143,7 +147,14 @@ public class HPSC008 extends DaoEPBase { ...@@ -143,7 +147,14 @@ public class HPSC008 extends DaoEPBase {
eiColumn.setType("N"); eiColumn.setType("N");
eiColumn.setScaleLength(3); eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20); eiColumn.setFieldLength(20);
eiColumn.setDescName("产量"); eiColumn.setDescName("组拼产量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_WEIGHT_JH);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("加焊产量");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_REMARK); eiColumn = new EiColumn(FIELD_REMARK);
...@@ -364,6 +375,15 @@ public class HPSC008 extends DaoEPBase { ...@@ -364,6 +375,15 @@ public class HPSC008 extends DaoEPBase {
public void setWeight(BigDecimal weight) { public void setWeight(BigDecimal weight) {
this.weight = weight; this.weight = weight;
} }
public BigDecimal getWeightJh() {
return weightJh;
}
public void setWeightJh(BigDecimal weightJh) {
this.weightJh = weightJh;
}
/** /**
* get the remark - 备注. * get the remark - 备注.
* @return the remark * @return the remark
...@@ -511,6 +531,7 @@ public class HPSC008 extends DaoEPBase { ...@@ -511,6 +531,7 @@ public class HPSC008 extends DaoEPBase {
setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode)); setPrdtCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_CODE)), prdtCode));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName)); setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName));
setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight)); setWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT)), weight));
setWeightJh(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_WEIGHT_JH)), weightJh));
setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark)); setRemark(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REMARK)), remark));
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy)); setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
...@@ -538,7 +559,8 @@ public class HPSC008 extends DaoEPBase { ...@@ -538,7 +559,8 @@ public class HPSC008 extends DaoEPBase {
map.put(FIELD_GROUP_TYPE, StringUtils.toString(groupType, eiMetadata.getMeta(FIELD_GROUP_TYPE))); map.put(FIELD_GROUP_TYPE, StringUtils.toString(groupType, eiMetadata.getMeta(FIELD_GROUP_TYPE)));
map.put(FIELD_PRDT_CODE, StringUtils.toString(prdtCode, eiMetadata.getMeta(FIELD_PRDT_CODE))); map.put(FIELD_PRDT_CODE, StringUtils.toString(prdtCode, eiMetadata.getMeta(FIELD_PRDT_CODE)));
map.put(FIELD_PRDT_NAME, StringUtils.toString(prdtName, eiMetadata.getMeta(FIELD_PRDT_NAME))); map.put(FIELD_PRDT_NAME, StringUtils.toString(prdtName, eiMetadata.getMeta(FIELD_PRDT_NAME)));
map.put(FIELD_WEIGHT, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT))); map.put(FIELD_WEIGHT, StringUtils.toString(weightJh, eiMetadata.getMeta(FIELD_WEIGHT_JH)));
map.put(FIELD_WEIGHT_JH, StringUtils.toString(weight, eiMetadata.getMeta(FIELD_WEIGHT)));
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_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG))); map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
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)));
......
...@@ -9,6 +9,7 @@ import com.baosight.hpjx.hp.sc.domain.HPSC010; ...@@ -9,6 +9,7 @@ import com.baosight.hpjx.hp.sc.domain.HPSC010;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.ErrorCodeUtils; import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.StringUtil; import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.hpjx.util.contants.ACConstants; import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -116,11 +117,13 @@ public class ServiceHPSC010 extends ServiceEPBase { ...@@ -116,11 +117,13 @@ public class ServiceHPSC010 extends ServiceEPBase {
Map<?, ?> map = list.get(i); Map<?, ?> map = list.get(i);
HPSC008 hpsc008 = new HPSC008(); HPSC008 hpsc008 = new HPSC008();
hpsc008.fromMap(map); hpsc008.fromMap(map);
weight = weight+hpsc008.getWeight().doubleValue(); weight = weight+hpsc008.getWeight().doubleValue()+hpsc008.getWeightJh().doubleValue();
} }
String registerDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_REGISTER_DATE);
hpxs010.fromMap(eiBlock.getRow(0)); hpxs010.fromMap(eiBlock.getRow(0));
hpxs010.setDeleteFlag(CommonConstant.YesNo.NO_0); hpxs010.setDeleteFlag(CommonConstant.YesNo.NO_0);
hpxs010.setWeight(BigDecimal.valueOf(weight)); hpxs010.setWeight(BigDecimal.valueOf(weight));
hpxs010.setRegisterDate(StringUtil.removeHorizontalLine(registerDate));
hpxs010.setUserCount(Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_USER_COUNT))); hpxs010.setUserCount(Long.valueOf(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_USER_COUNT)));
DaoUtils.insert(HPSC010.INSERT, hpxs010); DaoUtils.insert(HPSC010.INSERT, hpxs010);
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
......
...@@ -11,6 +11,7 @@ import com.baosight.hpjx.hp.sc.domain.HPSC096; ...@@ -11,6 +11,7 @@ import com.baosight.hpjx.hp.sc.domain.HPSC096;
import com.baosight.hpjx.hp.sc.domain.HPSC098; import com.baosight.hpjx.hp.sc.domain.HPSC098;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.ErrorCodeUtils; import com.baosight.hpjx.util.ErrorCodeUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.contants.ACConstants; import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiBlock; import com.baosight.iplat4j.core.ei.EiBlock;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -52,23 +53,24 @@ public class ServiceHPSC096 extends ServiceEPBase { ...@@ -52,23 +53,24 @@ public class ServiceHPSC096 extends ServiceEPBase {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("loginName", loginName); queryMap.put("loginName", loginName);
listFactoryCode = this.dao.query(HPSC096.QUERY_FACTORY_CODE,queryMap,EiConstant.defaultOffset,100); listFactoryCode = this.dao.query(HPSC096.QUERY_FACTORY_CODE,queryMap,EiConstant.defaultOffset,100);
List<Map> listProducTionType = this.dao.query(HPSC096.QUERY_PRODUCTION_TYPE,new HashMap<>()); //List<Map> listProducTionType = this.dao.query(HPSC096.QUERY_PRODUCTION_TYPE,new HashMap<>());
int rowNo = 0; int rowNo = 0;
int detrowNo = 0; int detrowNo = 0;
for (int i = 0; i < listFactoryCode.size(); i++) { for (int i = 0; i < listFactoryCode.size(); i++) {
if ("prodGroup".equals(listFactoryCode.get(i).get(HPSC096.FIELD_ORG_TYPE))) { if ("prodGroup".equals(listFactoryCode.get(i).get(HPSC096.FIELD_ORG_TYPE))) {
for (Map map : listProducTionType) {
rowNo++; rowNo++;
Map result = new HashMap(); Map result = new HashMap();
result.putAll(listFactoryCode.get(i)); result.putAll(listFactoryCode.get(i));
result.put(HPSC096.FIELD_GROUP_TYPE, map.get(HPSC096.FIELD_GROUP_TYPE)); result.put(HPSC008.FIELD_WEIGHT,0);
result.put(HPSC008.FIELD_WEIGHT_JH,0);
result.put(HPSC008.FIELD_GROUP_TYPE,1);
result.put("rowNo",rowNo); result.put("rowNo",rowNo);
//listFactoryCode.get(i).put(HPSC096.FIELD_GROUP_TYPE,listProducTionType.get(j).get(HPSC096.FIELD_GROUP_TYPE));
listResult.add(result); listResult.add(result);
}
}else if ("cutGroup".equals(listFactoryCode.get(i).get(HPSC096.FIELD_ORG_TYPE))){ }else if ("cutGroup".equals(listFactoryCode.get(i).get(HPSC096.FIELD_ORG_TYPE))){
Map detailMap = new HashMap(); Map detailMap = new HashMap();
detailMap.putAll(listFactoryCode.get(i)); detailMap.putAll(listFactoryCode.get(i));
detailMap.put(HPSC008.FIELD_WEIGHT,0);
detailMap.put(HPSC008.FIELD_WEIGHT_JH,0);
detailMap.put("rowNo",detrowNo); detailMap.put("rowNo",detrowNo);
listdetail.add(detailMap); listdetail.add(detailMap);
detrowNo++; detrowNo++;
...@@ -132,10 +134,12 @@ public class ServiceHPSC096 extends ServiceEPBase { ...@@ -132,10 +134,12 @@ public class ServiceHPSC096 extends ServiceEPBase {
List<Map> listResult = eiBlock.getRows(); List<Map> listResult = eiBlock.getRows();
listResult.addAll(inInfo.getBlock(CommonConstant.Field.DETAIL).getRows()); listResult.addAll(inInfo.getBlock(CommonConstant.Field.DETAIL).getRows());
String registerDate = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC010.FIELD_REGISTER_DATE);
HPSC008 hpxs008 = new HPSC008(); HPSC008 hpxs008 = new HPSC008();
for (i = 0; i < listResult.size(); i++) { for (i = 0; i < listResult.size(); i++) {
Map<?, ?> map = listResult.get(i); Map<?, ?> map = listResult.get(i);
hpxs008.fromMap(map); hpxs008.fromMap(map);
hpxs008.setRegisterDate(StringUtil.removeHorizontalLine(registerDate));
hpxs008.setDeleteFlag(CommonConstant.YesNo.NO_0); hpxs008.setDeleteFlag(CommonConstant.YesNo.NO_0);
for (Map map1:list) { for (Map map1:list) {
hpxs008.setRemark(map1.get(HPSC010.FIELD_ID).toString()); hpxs008.setRemark(map1.get(HPSC010.FIELD_ID).toString());
......
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
PRDT_CODE as "prdtCode", <!-- 产品代码 --> PRDT_CODE as "prdtCode", <!-- 产品代码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
WEIGHT as "weight", <!-- 产量 --> WEIGHT as "weight", <!-- 产量 -->
WEIGHT_JH as "weightJh",
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 --> DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
...@@ -124,6 +125,7 @@ ...@@ -124,6 +125,7 @@
PRDT_CODE as "prdtCode", <!-- 产品代码 --> PRDT_CODE as "prdtCode", <!-- 产品代码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
WEIGHT as "weight", <!-- 产量 --> WEIGHT as "weight", <!-- 产量 -->
WEIGHT_JH as "weightJh",
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 --> DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
...@@ -159,6 +161,7 @@ ...@@ -159,6 +161,7 @@
PRDT_CODE as "prdtCode", <!-- 产品代码 --> PRDT_CODE as "prdtCode", <!-- 产品代码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 --> PRDT_NAME as "prdtName", <!-- 产品名称 -->
WEIGHT as "weight", <!-- 产量 --> WEIGHT as "weight", <!-- 产量 -->
WEIGHT_JH as "weightJh",
REMARK as "remark", <!-- 备注 --> REMARK as "remark", <!-- 备注 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 --> DELETE_FLAG as "deleteFlag", <!-- 是否删除0:否1.是 -->
CREATED_BY as "createdBy", <!-- 创建人 --> CREATED_BY as "createdBy", <!-- 创建人 -->
...@@ -257,6 +260,7 @@ ...@@ -257,6 +260,7 @@
PRDT_CODE, <!-- 产品代码 --> PRDT_CODE, <!-- 产品代码 -->
PRDT_NAME, <!-- 产品名称 --> PRDT_NAME, <!-- 产品名称 -->
WEIGHT, <!-- 产量 --> WEIGHT, <!-- 产量 -->
WEIGHT_JH,
REMARK, <!-- 备注 --> REMARK, <!-- 备注 -->
DELETE_FLAG, <!-- 是否删除0:否1.是 --> DELETE_FLAG, <!-- 是否删除0:否1.是 -->
CREATED_BY, <!-- 创建人 --> CREATED_BY, <!-- 创建人 -->
...@@ -266,7 +270,7 @@ ...@@ -266,7 +270,7 @@
UPDATED_TIME, <!-- 修改人名称 --> UPDATED_TIME, <!-- 修改人名称 -->
UPDATED_NAME <!-- 修改时间 --> UPDATED_NAME <!-- 修改时间 -->
) )
VALUES (#id#, #companyCode#, #depCode#, #registerDate#, #factoryCode#, #groupCode#, #userId#, #groupType#, #prdtCode#, #prdtName#, #weight#, #remark#, #deleteFlag#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedTime#, #updatedName#) VALUES (#id#, #companyCode#, #depCode#, #registerDate#, #factoryCode#, #groupCode#, #userId#, #groupType#, #prdtCode#, #prdtName#, #weight#, #weightJh#, #remark#, #deleteFlag#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedTime#, #updatedName#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
...@@ -319,6 +323,7 @@ ...@@ -319,6 +323,7 @@
PRDT_CODE = #prdtCode#, <!-- 产品代码 --> PRDT_CODE = #prdtCode#, <!-- 产品代码 -->
PRDT_NAME = #prdtName#, <!-- 产品名称 --> PRDT_NAME = #prdtName#, <!-- 产品名称 -->
WEIGHT = #weight#, <!-- 产量 --> WEIGHT = #weight#, <!-- 产量 -->
WEIGHT_JH = #weightJh#,
REMARK = #remark#, <!-- 备注 --> REMARK = #remark#, <!-- 备注 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0:否1.是 --> DELETE_FLAG = #deleteFlag#, <!-- 是否删除0:否1.是 -->
CREATED_BY = #createdBy#, <!-- 创建人 --> CREATED_BY = #createdBy#, <!-- 创建人 -->
......
...@@ -60,18 +60,23 @@ ...@@ -60,18 +60,23 @@
maxLength="16" readonly="true" width="120" required="true" maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="groupType" cname="生产类型" <EF:EFComboColumn ename="groupType" cname="生产类型" hidden="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
maxLength="16" readonly="true" width="80" required="true" maxLength="16" readonly="true" width="80" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFCodeOption codeName="hpjx.hpjx.productionType" /> <EF:EFCodeOption codeName="hpjx.hpjx.productionType" />
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="prdtName" cname="产品" enable="false" width="160" align="center" required="true"/> <EF:EFColumn ename="prdtName" cname="生产内容" enable="false" width="160" align="center" required="true"/>
<EF:EFColumn ename="weight" cname="产量(T)" width="120" enable="false" format="{0:N3}" editType="text" <EF:EFColumn ename="weight" cname="组拼产量(T)" width="120" enable="false" format="{0:N2}" editType="text"
displayType="0.000" sort="true" align="right" displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" required="true" data-regex="/^-?[0-9]{1,16}([.][0-9]{1,2})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!" data-errorprompt="请输入数字,该值最大可设置17位整数和2位小数!"
/>
<EF:EFColumn ename="weightJh" cname="加焊产量(T)" width="120" enable="false" format="{0:N2}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,2})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置17位整数和2位小数!"
/> />
<%--<EF:EFColumn ename="remark" cname="备注" enable="true" width="200" align="center"/>--%> <%--<EF:EFColumn ename="remark" cname="备注" enable="true" width="200" align="center"/>--%>
</EF:EFGrid> </EF:EFGrid>
...@@ -101,7 +106,7 @@ ...@@ -101,7 +106,7 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFCodeOption codeName="hpjx.hpjx.productionType" /> <EF:EFCodeOption codeName="hpjx.hpjx.productionType" />
</EF:EFComboColumn>--%> </EF:EFComboColumn>--%>
<EF:EFColumn ename="prdtName" cname="产品" enable="false" width="160" align="center" required="true"/> <EF:EFColumn ename="prdtName" cname="下料内容" enable="false" width="160" align="center" required="true"/>
<%--<EF:EFColumn ename="weight" cname="产量(T)" width="120" enable="false" format="{0:N3}" editType="text" <%--<EF:EFColumn ename="weight" cname="产量(T)" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" required="true" data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" required="true"
......
$(function (){ $(function (){
var day1 = new Date();
day1.setTime(day1.getTime());
day1.setDate(day1.getDate());
var month = day1.getMonth() + 1;
var year = day1.getFullYear();
var day = day1.getDate();
var queryBlock = __eiInfo.getBlock("inqu_status").getMappedRows(); var queryBlock = __eiInfo.getBlock("inqu_status").getMappedRows();
//$(".row").children().attr("class", "col-md-3"); //$(".row").children().attr("class", "col-md-3");
$("#inqu").children().children().children().eq(0).hide(); $("#inqu").children().children().children().eq(0).hide();
...@@ -8,6 +16,15 @@ $(function (){ ...@@ -8,6 +16,15 @@ $(function (){
$("#detail").children().children().children().eq(0).hide(); $("#detail").children().children().children().eq(0).hide();
$("#detail").children().children().children().eq(1).hide(); $("#detail").children().children().children().eq(1).hide();
IPLATUI.EFDatePicker = {
"inqu_status-0-registerDate": {
start: "day",
depth: "day",
value:year+"-"+month+"-"+day
}
}
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
"result": { "result": {
pageable:false, pageable:false,
...@@ -28,7 +45,7 @@ $(function (){ ...@@ -28,7 +45,7 @@ $(function (){
+ 'onclick="deleteRow(' + item.rowNo + ')" >删除</a>'; + 'onclick="deleteRow(' + item.rowNo + ')" >删除</a>';
return template return template
} }
},{ }/*,{
field: "registerDate", field: "registerDate",
attributes: { attributes: {
class: "i-input-readonly" class: "i-input-readonly"
...@@ -36,7 +53,7 @@ $(function (){ ...@@ -36,7 +53,7 @@ $(function (){
defaultValue: function () { defaultValue: function () {
return currShortDate(); return currShortDate();
} }
}], }*/],
loadComplete: function(grid) { loadComplete: function(grid) {
$("#ef_grid_result .k-grid-toolbar").attr("style","display: none;"); $("#ef_grid_result .k-grid-toolbar").attr("style","display: none;");
//$("#delete").attr("style","display: none;"); //$("#delete").attr("style","display: none;");
...@@ -76,14 +93,6 @@ $(function (){ ...@@ -76,14 +93,6 @@ $(function (){
+ 'onclick="detailDeleteRow(' + item.rowNo + ')" >删除</a>'; + 'onclick="detailDeleteRow(' + item.rowNo + ')" >删除</a>';
return template return template
} }
},{
field: "registerDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
}], }],
} }
}; };
...@@ -106,6 +115,10 @@ $(function (){ ...@@ -106,6 +115,10 @@ $(function (){
return; return;
} }
let methodType = $("#inqu_status-0-methodType").val(); let methodType = $("#inqu_status-0-methodType").val();
let registerDate = $("#inqu_status-0-registerDate").val();
if (registerDate.length<=0){
registerDate = currShortDate()
}
let flag = true; let flag = true;
$.each(rows, function(index, item) { $.each(rows, function(index, item) {
let prdtName= item.get("prdtName"); let prdtName= item.get("prdtName");
...@@ -116,7 +129,13 @@ $(function (){ ...@@ -116,7 +129,13 @@ $(function (){
} }
let weight= item.get("weight"); let weight= item.get("weight");
if(isBlank(weight)){ if(isBlank(weight)){
message("选中的第"+(index+1)+"行\"产量(T)\",不能为空!"); message("选中的第"+(index+1)+"行\"组拼产量(T)\",不能为空!");
flag = false;
return false;
}
let weightJh= item.get("weightJh");
if(isBlank(weightJh)){
message("选中的第"+(index+1)+"行\"加焊产量(T)\",不能为空!");
flag = false; flag = false;
return false; return false;
} }
...@@ -126,6 +145,7 @@ $(function (){ ...@@ -126,6 +145,7 @@ $(function (){
ok: function () { ok: function () {
var info = new EiInfo(); var info = new EiInfo();
info.set("inqu_status-0-userCount",$("#inqu_status-0-userCount").val()); info.set("inqu_status-0-userCount",$("#inqu_status-0-userCount").val());
info.set("inqu_status-0-registerDate",registerDate);
info.addBlock(JSUtils.checkedRows2Block("result")); info.addBlock(JSUtils.checkedRows2Block("result"));
info.addBlock(JSUtils.checkedRows2Block("detail")) info.addBlock(JSUtils.checkedRows2Block("detail"))
EiCommunicator.send("HPSC010", methodType, info, { EiCommunicator.send("HPSC010", methodType, info, {
......
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/> <EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="remark" cname="上级ID" hidden="true"/> <EF:EFColumn ename="remark" cname="上级ID" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="registerDate" cname="登记日期" width="160" align="center" editType="date" readonly="true" <%--<EF:EFColumn ename="registerDate" cname="登记日期" width="160" align="center" editType="date" readonly="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>--%>
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_code_block_id" <EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_code_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
...@@ -32,19 +32,25 @@ ...@@ -32,19 +32,25 @@
maxLength="16" readonly="true" width="120" required="true" maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="prdtName" cname="生产内容" enable="true" width="160" align="center"/>
<EF:EFColumn ename="weight" cname="组拼产量(T)" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
/>
<EF:EFColumn ename="weightJh" cname="加焊产量(T)" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
/>
<EF:EFComboColumn ename="groupType" cname="生产类型" <EF:EFComboColumn ename="groupType" cname="生产类型"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField" hidden="true"
maxLength="16" readonly="true" width="80" required="true" maxLength="16" readonly="true" width="80" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFCodeOption codeName="hpjx.hpjx.productionType" /> <EF:EFCodeOption codeName="hpjx.hpjx.productionType" />
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="prdtName" cname="产品" enable="true" width="160" align="center"/> <EF:EFColumn ename="prdtName" cname="产品" enable="true" width="160" align="center" hidden="true"/>
<EF:EFColumn ename="weight" cname="产量(T)" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" defaultValue="0"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="detail" title="下料明细信息"> <EF:EFRegion id="detail" title="下料明细信息">
...@@ -52,8 +58,8 @@ ...@@ -52,8 +58,8 @@
<EF:EFColumn ename="rowNo" cname="行号" hidden="true"/> <EF:EFColumn ename="rowNo" cname="行号" hidden="true"/>
<EF:EFColumn ename="remark" cname="上级ID" hidden="true"/> <EF:EFColumn ename="remark" cname="上级ID" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="registerDate" cname="登记日期" width="160" align="center" editType="date" readonly="true" <%--<EF:EFColumn ename="registerDate" cname="登记日期" width="160" align="center" editType="date" readonly="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>--%>
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_code_block_id" <EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_code_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
...@@ -66,6 +72,7 @@ ...@@ -66,6 +72,7 @@
maxLength="16" readonly="true" width="120" required="true" maxLength="16" readonly="true" width="120" required="true"
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="prdtName" cname="下料内容" enable="true" width="160" align="center"/>
<EF:EFComboColumn ename="groupType" cname="下料类型" hidden="true" <EF:EFComboColumn ename="groupType" cname="下料类型" hidden="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField" textField="textField" valueField="valueField"
...@@ -73,17 +80,26 @@ ...@@ -73,17 +80,26 @@
align="center" filter="contains" sort="true"> align="center" filter="contains" sort="true">
<EF:EFCodeOption codeName="hpjx.hpjx.productionType" /> <EF:EFCodeOption codeName="hpjx.hpjx.productionType" />
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="prdtName" cname="产品" enable="true" width="160" align="center"/> <%--<EF:EFColumn ename="prdtName" cname="产品" enable="true" width="160" align="center"/>--%>
<EF:EFColumn ename="weight" cname="产量(T)" width="120" enable="true" format="{0:N3}" editType="text" <EF:EFColumn ename="weight" cname="产量(T)" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" hidden="true" defaultValue="0" displayType="0.000" sort="true" align="right" hidden="true" defaultValue="0"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20" data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!" data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
/> />
<EF:EFColumn ename="weightJh" cname="加焊产量(T)" width="120" enable="true" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right" hidden="true" defaultValue="0"
data-regex="/^-?[0-9]{1,16}([.][0-9]{1,3})?$/" maxLength="20"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"
/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="inqu"> <EF:EFRegion id="inqu">
<div class="row"> <div class="row">
<EF:EFInput cname="用工总人数" blockId="inqu_status" ename="userCount" row="0" type="number" colWidth="5" value="0"/> <EF:EFInput cname="用工总人数" blockId="inqu_status" ename="userCount" row="0"
type="number" colWidth="3" value="0" required="true"/>
<EF:EFDatePicker ename="inqu_status-0-registerDate" colWidth="3" cname="登记日期"
required="true" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFInput cname="" blockId="inqu_status" ename="methodType" row="0" colWidth="3" hidden="true"/> <EF:EFInput cname="" blockId="inqu_status" ename="methodType" row="0" colWidth="3" hidden="true"/>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
......
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