Commit 7e2e6d90 by wancheng

0401优化

parent 388f77d3
...@@ -59,6 +59,14 @@ public enum DdynamicEnum { ...@@ -59,6 +59,14 @@ public enum DdynamicEnum {
"coefficient", "HPPZ006.queryComboBoxAll"), "coefficient", "HPPZ006.queryComboBoxAll"),
/** /**
* 模块:存货档案(ALL)
* 用途:存货档案下拉框
* 编写:wwl
*/
INVENT_SPEC_ALL_BLOCK_ID("invent_spec_all_block_id", "inventCode", "inventNameSpec","inventName","spec", "material", "unit", "length", "width", "thick",
"coefficient","id", "HPPZ006.queryComboBox"),
/**
* 模块:存货档案部件名称 * 模块:存货档案部件名称
* 用途:存货档案部件名称下拉框 * 用途:存货档案部件名称下拉框
* 编写:wwl * 编写:wwl
...@@ -362,6 +370,12 @@ public enum DdynamicEnum { ...@@ -362,6 +370,12 @@ public enum DdynamicEnum {
private String param5; private String param5;
private String param6; private String param6;
private String param7;
private String param8;
private String param9;
/** 数据源 */ /** 数据源 */
private final String dbSource; private final String dbSource;
...@@ -429,6 +443,23 @@ public enum DdynamicEnum { ...@@ -429,6 +443,23 @@ public enum DdynamicEnum {
this.dbSource = dbSource; this.dbSource = dbSource;
} }
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4,
String param5, String param6,String param7,String param8,String param9,String dbSource) {
this.blockId = blockId;
this.value = value;
this.text = text;
this.param1 = param1;
this.param2 = param2;
this.param3 = param3;
this.param4 = param4;
this.param5 = param5;
this.param6 = param6;
this.param7 = param7;
this.param8 = param8;
this.param9 = param9;
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String dbSource){ DdynamicEnum(String blockId, String value, String text, String dbSource){
this.blockId = blockId; this.blockId = blockId;
this.value = value; this.value = value;
...@@ -501,4 +532,28 @@ public enum DdynamicEnum { ...@@ -501,4 +532,28 @@ public enum DdynamicEnum {
public void setParam6(String param6) { public void setParam6(String param6) {
this.param6 = param6; this.param6 = param6;
} }
public String getParam7() {
return param7;
}
public void setParam7(String param7) {
this.param7 = param7;
}
public String getParam8() {
return param8;
}
public void setParam8(String param8) {
this.param8 = param8;
}
public String getParam9() {
return param9;
}
public void setParam9(String param9) {
this.param9 = param9;
}
} }
...@@ -53,6 +53,16 @@ public class HPConstants { ...@@ -53,6 +53,16 @@ public class HPConstants {
/** 前后台交互下拉框字段 字段名 dzg */ /** 前后台交互下拉框字段 字段名 dzg */
public static final String PARAM6_FIELD = "param6Field"; public static final String PARAM6_FIELD = "param6Field";
/** 前后台交互下拉框字段 字段名 dzg */
public static final String PARAM7_FIELD = "param7Field";
/** 前后台交互下拉框字段 字段名 dzg */
public static final String PARAM8_FIELD = "param8Field";
/** 前后台交互下拉框字段 字段名 dzg */
public static final String PARAM9_FIELD = "param9Field";
/** 前后台交互下拉框字段 字段名 dzg */ /** 前后台交互下拉框字段 字段名 dzg */
public static final String VALUE_FIELD = "valueField"; public static final String VALUE_FIELD = "valueField";
......
...@@ -83,6 +83,7 @@ public class HPKC011 extends DaoEPBase { ...@@ -83,6 +83,7 @@ public class HPKC011 extends DaoEPBase {
public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/ public static final String COL_FACTORY_CODE = "FACTORY_CODE"; /* 厂区编码*/
public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 工厂*/ public static final String COL_FACTORY_NAME = "FACTORY_NAME"; /* 工厂*/
public static final String QUERYKC = "HPKC011.queryKc";
public static final String QUERY = "HPKC011.query"; public static final String QUERY = "HPKC011.query";
public static final String COUNT = "HPKC011.count"; public static final String COUNT = "HPKC011.count";
public static final String INSERT = "HPKC011.insert"; public static final String INSERT = "HPKC011.insert";
......
...@@ -48,7 +48,7 @@ public class ServiceHPKC003 extends ServiceBase { ...@@ -48,7 +48,7 @@ public class ServiceHPKC003 extends ServiceBase {
@OperationLogAnnotation(operModul = "生产入库单",operType = "查询",operDesc = "初始化") @OperationLogAnnotation(operModul = "生产入库单",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), new HashMap<String,Object>(){{put("inventTypes",new String[]{"2","3"});}}, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.WH_RECORD_BLOCK_ID), new HashMap<String,Object>(){{put("inventTypes",new String[]{"3"});}}, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC003().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPKC003().eiMetadata);
......
...@@ -121,12 +121,12 @@ public class ServiceHPKC003A extends ServiceEPBase { ...@@ -121,12 +121,12 @@ public class ServiceHPKC003A extends ServiceEPBase {
AssertUtils.isGt(applyNum, subNum, String.format("任务号[%s]申请数量[%s]不能大于未入库的数量[%s]", AssertUtils.isGt(applyNum, subNum, String.format("任务号[%s]申请数量[%s]不能大于未入库的数量[%s]",
fSc005b.getProdTaskNo(), applyNum, subNum)); fSc005b.getProdTaskNo(), applyNum, subNum));
// 校验是否存在巡检单 // 校验是否存在巡检单
Map queryMap = new HashMap(); /* Map queryMap = new HashMap();
queryMap.put("prodTaskNo", fSc005b.getProdTaskNo()); queryMap.put("prodTaskNo", fSc005b.getProdTaskNo());
queryMap.put("status", CommonConstant.YesNo.NO_0); queryMap.put("status", CommonConstant.YesNo.NO_0);
List<HPZL001> dbZl001s = dao.query(HPZL001.QUERY, queryMap); List<HPZL001> dbZl001s = dao.query(HPZL001.QUERY, queryMap);
AssertUtils.isNotEmpty(dbZl001s, String.format("任务号[%s]存在未处理的质量巡检单,请先处理质量巡检单", AssertUtils.isNotEmpty(dbZl001s, String.format("任务号[%s]存在未处理的质量巡检单,请先处理质量巡检单",
fSc005b.getProdTaskNo())); fSc005b.getProdTaskNo()));*/
} }
// 生成入库单 // 生成入库单
for (Map row : resultRows) { for (Map row : resultRows) {
......
...@@ -65,7 +65,7 @@ public class ServiceHPKC004A extends ServiceEPBase { ...@@ -65,7 +65,7 @@ public class ServiceHPKC004A extends ServiceEPBase {
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, HPKC011.QUERY, new HPKC011()); inInfo = super.query(inInfo, HPKC011.QUERYKC, new HPKC011());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
......
...@@ -124,6 +124,22 @@ ...@@ -124,6 +124,22 @@
</dynamic> </dynamic>
</select> </select>
<select id="queryKc" resultClass="com.baosight.hpjx.hp.kc.domain.HPKC011">
SELECT <include refid="column"/>
FROM hpjx.T_HPKC011
WHERE 1=1 AND AMOUNT!=0
<include refid="condition"/>
<include refid="customCondition"/>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID DESC
</isEmpty>
</dynamic>
</select>
<select id="queryByCondition" resultClass="java.util.HashMap"> <select id="queryByCondition" resultClass="java.util.HashMap">
SELECT <include refid="column"/> SELECT <include refid="column"/>
FROM hpjx.T_HPKC011 FROM hpjx.T_HPKC011
......
...@@ -266,6 +266,24 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -266,6 +266,24 @@ public class ServiceHPPZ006 extends ServiceBase {
} }
/** /**
* 存货带规格下拉框
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "存货档案",operType = "查询",operDesc = "存货带规格下拉框")
public EiInfo queryComboBox(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_SPEC_ALL_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
}
return inInfo;
}
/**
* 单位下拉框 * 单位下拉框
* *
* @param inInfo * @param inInfo
......
...@@ -216,8 +216,17 @@ ...@@ -216,8 +216,17 @@
<select id="queryComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT SELECT DISTINCT
ID as "id", INVENT_CODE as "inventCode",
CONCAT(INVENT_CODE,'-',INVENT_NAME,'[',SPEC,']') as "inventName" INVENT_NAME as "inventName",
CONCAT(INVENT_NAME,'[',SPEC,']') as "inventNameSpec",
(CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END) AS "spec",
MATERIAL AS "material" , <!-- 材质 -->
UNIT AS "unit", <!-- 单位 -->
LENGTH AS "length" , <!-- 长 -->
WIDTH AS "width" , <!-- 宽 -->
THICK AS "thick" , <!-- 厚 -->
COEFFICIENT AS "coefficient" , <!-- 系数 -->
ID AS "id"
FROM hpjx.t_hppz006 FROM hpjx.t_hppz006
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS=1 AND STATUS=1
......
...@@ -207,6 +207,9 @@ public class HPPZTools { ...@@ -207,6 +207,9 @@ public class HPPZTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("whCode", whCode); queryMap.put("whCode", whCode);
List<HPPZ007> pz007s = DaoBase.getInstance().query(HPPZ007.QUERY, queryMap); List<HPPZ007> pz007s = DaoBase.getInstance().query(HPPZ007.QUERY, queryMap);
if(pz007s.size()==0){
pz007s = null;
}
AssertUtils.isNull(pz007s, String.format("仓库编码[%s]不存在", whCode)); AssertUtils.isNull(pz007s, String.format("仓库编码[%s]不存在", whCode));
return pz007s.get(0); return pz007s.get(0);
} }
......
...@@ -183,7 +183,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -183,7 +183,7 @@ public class ServiceHPSC002 extends ServiceBase {
BigDecimal num = hpsc002.getNum(); BigDecimal num = hpsc002.getNum();
BigDecimal unitWt = hpsc002.getUnitWt(); BigDecimal unitWt = hpsc002.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue())); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()/1000));
hpsc002.setDelStatus(CommonConstant.YesNo.NO_0.intValue()); hpsc002.setDelStatus(CommonConstant.YesNo.NO_0.intValue());
hpsc002.setTotalWt(totalWt); hpsc002.setTotalWt(totalWt);
...@@ -337,7 +337,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -337,7 +337,7 @@ public class ServiceHPSC002 extends ServiceBase {
BigDecimal num = hppz002.getNum(); BigDecimal num = hppz002.getNum();
BigDecimal unitWt = hppz002.getUnitWt(); BigDecimal unitWt = hppz002.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue())); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()/1000));
hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue()); hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue());
hppz002.setTotalWt(totalWt); hppz002.setTotalWt(totalWt);
...@@ -487,7 +487,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -487,7 +487,7 @@ public class ServiceHPSC002 extends ServiceBase {
BigDecimal num = hppz002.getNum(); BigDecimal num = hppz002.getNum();
BigDecimal unitWt = hppz002.getUnitWt(); BigDecimal unitWt = hppz002.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue())); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()/1000));
hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue()); hppz002.setDelStatus(CommonConstant.YesNo.NO_0.intValue());
hppz002.setTotalWt(totalWt); hppz002.setTotalWt(totalWt);
hppz002.setSpec(HPPZTools.HpPz006.jointSpec(hppz002.getLength(),hppz002.getWidth(),hppz002.getThick())); hppz002.setSpec(HPPZTools.HpPz006.jointSpec(hppz002.getLength(),hppz002.getWidth(),hppz002.getThick()));
......
...@@ -135,7 +135,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -135,7 +135,7 @@ public class ServiceHPSC006 extends ServiceBase {
BigDecimal num = hpsc006.getNum(); BigDecimal num = hpsc006.getNum();
BigDecimal unitWt = hpsc006.getUnitWt(); BigDecimal unitWt = hpsc006.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue())); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()/1000));
hpsc006.setInventSpec(HPPZTools.HpPz006.jointSpec(hpsc006.getInventLength(),hpsc006.getInventWidth(),hpsc006.getInventThick())); hpsc006.setInventSpec(HPPZTools.HpPz006.jointSpec(hpsc006.getInventLength(),hpsc006.getInventWidth(),hpsc006.getInventThick()));
hpsc006.setProjCode(projCode); hpsc006.setProjCode(projCode);
hpsc006.setProjName(projName); hpsc006.setProjName(projName);
...@@ -203,7 +203,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -203,7 +203,7 @@ public class ServiceHPSC006 extends ServiceBase {
BigDecimal num = HPSC006.getNum(); BigDecimal num = HPSC006.getNum();
BigDecimal unitWt = HPSC006.getUnitWt(); BigDecimal unitWt = HPSC006.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue())); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()/1000));
HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick())); HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick()));
HPSC006.setProjCode(projCode); HPSC006.setProjCode(projCode);
HPSC006.setProjName(projName); HPSC006.setProjName(projName);
...@@ -260,7 +260,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -260,7 +260,7 @@ public class ServiceHPSC006 extends ServiceBase {
BigDecimal num = HPSC006.getNum(); BigDecimal num = HPSC006.getNum();
BigDecimal unitWt = HPSC006.getUnitWt(); BigDecimal unitWt = HPSC006.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue())); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()/1000));
HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick())); HPSC006.setInventSpec(HPPZTools.HpPz006.jointSpec(HPSC006.getInventLength(),HPSC006.getInventWidth(),HPSC006.getInventThick()));
HPSC006.setProjCode(projCode); HPSC006.setProjCode(projCode);
HPSC006.setProjName(projName); HPSC006.setProjName(projName);
...@@ -404,7 +404,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -404,7 +404,7 @@ public class ServiceHPSC006 extends ServiceBase {
BigDecimal num = hpsc006.getNum(); BigDecimal num = hpsc006.getNum();
BigDecimal unitWt = hpsc006.getUnitWt(); BigDecimal unitWt = hpsc006.getUnitWt();
DecimalFormat decimalFormat = new DecimalFormat("#.000"); DecimalFormat decimalFormat = new DecimalFormat("#.000");
BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue())); BigDecimal totalWt = new BigDecimal(decimalFormat.format(num.multiply(unitWt).floatValue()/1000));
hpsc006.setInventSpec(HPPZTools.HpPz006.jointSpec(hpsc006.getInventLength(),hpsc006.getInventWidth(),hpsc006.getInventThick())); hpsc006.setInventSpec(HPPZTools.HpPz006.jointSpec(hpsc006.getInventLength(),hpsc006.getInventWidth(),hpsc006.getInventThick()));
hpsc006.setProjCode(projCode); hpsc006.setProjCode(projCode);
hpsc006.setProjName(projName); hpsc006.setProjName(projName);
......
...@@ -175,6 +175,9 @@ public class HPSCTools { ...@@ -175,6 +175,9 @@ public class HPSCTools {
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("projCode", projCode); queryMap.put("projCode", projCode);
List<HPSC001> results = DaoBase.getInstance().query("HPSC001.query", queryMap); List<HPSC001> results = DaoBase.getInstance().query("HPSC001.query", queryMap);
if(results.size()==0){
results = null;
}
AssertUtils.isNull(results, String.format("项目编码[%s]信息不存在", projCode)); AssertUtils.isNull(results, String.format("项目编码[%s]信息不存在", projCode));
return results.get(0); return results.get(0);
} }
......
...@@ -85,6 +85,9 @@ public class CommonMethod { ...@@ -85,6 +85,9 @@ public class CommonMethod {
row.put(HPConstants.PARAM4_FIELD, (tryValue.get(tableParam.getValue()) + HPConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam4()))); row.put(HPConstants.PARAM4_FIELD, (tryValue.get(tableParam.getValue()) + HPConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam4())));
row.put(HPConstants.PARAM5_FIELD, (tryValue.get(tableParam.getValue()) + HPConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam5()))); row.put(HPConstants.PARAM5_FIELD, (tryValue.get(tableParam.getValue()) + HPConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam5())));
row.put(HPConstants.PARAM6_FIELD, (tryValue.get(tableParam.getValue()) + HPConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam6()))); row.put(HPConstants.PARAM6_FIELD, (tryValue.get(tableParam.getValue()) + HPConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam6())));
row.put(HPConstants.PARAM7_FIELD, (tryValue.get(tableParam.getValue()) + HPConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam7())));
row.put(HPConstants.PARAM8_FIELD, (tryValue.get(tableParam.getValue()) + HPConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam8())));
row.put(HPConstants.PARAM9_FIELD, (tryValue.get(tableParam.getValue()) + HPConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam9())));
} else { } else {
row.put(HPConstants.TEXT_FIELD, String.valueOf(tryValue.get(tableParam.getText()))); row.put(HPConstants.TEXT_FIELD, String.valueOf(tryValue.get(tableParam.getText())));
row.put(HPConstants.PARAM1_FIELD, String.valueOf(tryValue.get(tableParam.getParam1()))); row.put(HPConstants.PARAM1_FIELD, String.valueOf(tryValue.get(tableParam.getParam1())));
...@@ -93,6 +96,9 @@ public class CommonMethod { ...@@ -93,6 +96,9 @@ public class CommonMethod {
row.put(HPConstants.PARAM4_FIELD, String.valueOf(tryValue.get(tableParam.getParam4()))); row.put(HPConstants.PARAM4_FIELD, String.valueOf(tryValue.get(tableParam.getParam4())));
row.put(HPConstants.PARAM5_FIELD, String.valueOf(tryValue.get(tableParam.getParam5()))); row.put(HPConstants.PARAM5_FIELD, String.valueOf(tryValue.get(tableParam.getParam5())));
row.put(HPConstants.PARAM6_FIELD, String.valueOf(tryValue.get(tableParam.getParam6()))); row.put(HPConstants.PARAM6_FIELD, String.valueOf(tryValue.get(tableParam.getParam6())));
row.put(HPConstants.PARAM7_FIELD, String.valueOf(tryValue.get(tableParam.getParam7())));
row.put(HPConstants.PARAM8_FIELD, String.valueOf(tryValue.get(tableParam.getParam8())));
row.put(HPConstants.PARAM9_FIELD, String.valueOf(tryValue.get(tableParam.getParam9())));
} }
resultRows.add(row); resultRows.add(row);
} }
......
...@@ -44,10 +44,12 @@ $(function() { ...@@ -44,10 +44,12 @@ $(function() {
field: "inventName", field: "inventName",
title: "存货名称", title: "存货名称",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) { for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['textField'] === dataItem['inventName']) { if (inventNameGlobalData[i]['textField'] === dataItem['inventName']) {
dataItem['inventCode'] = inventNameGlobalData[i]['valueField'] dataItem['inventCode'] = inventNameGlobalData[i]['valueField'];
return inventNameGlobalData[i]['textField']; dataItem['inventRecordId'] = inventNameGlobalData[i]['param9Field']
return inventNameGlobalData[i]['param1Field'];
} else { } else {
dataItem['inventCode'] = ''; dataItem['inventCode'] = '';
} }
...@@ -60,9 +62,9 @@ $(function() { ...@@ -60,9 +62,9 @@ $(function() {
inInfo.set("inqu_status-0-inventTypes", [1, 2]); inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-inventType", options.model["inventType"]); inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false); inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HPPZ004"); inInfo.set("serviceName", "HPPZ006");
inInfo.set("methodName", "queryComboBox"); inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "invent_name_block_id"); inInfo.set("blockId", "invent_spec_all_block_id");
inInfo.set("field", options.field); inInfo.set("field", options.field);
refreshInputSelect(container, inInfo); refreshInputSelect(container, inInfo);
} }
...@@ -119,6 +121,32 @@ $(function() { ...@@ -119,6 +121,32 @@ $(function() {
loadComplete: function (grid) { loadComplete: function (grid) {
// 此grid对象 // 此grid对象
grid.dataSource.bind("change", function(e) { grid.dataSource.bind("change", function(e) {
if (e.field == "inventName") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['textField'] === item.inventName) {
//dataItem['spec'] = inventNameGlobalData[i]['param2Field'];
/* dataItem['material'] = inventNameGlobalData[i]['param3Field'];
dataItem['unit'] = inventNameGlobalData[i]['param4Field'];
dataItem['length'] = inventNameGlobalData[i]['param5Field'];
dataItem['width'] = inventNameGlobalData[i]['param6Field'];
dataItem['thick'] = inventNameGlobalData[i]['param7Field'];
dataItem['coefficient'] = inventNameGlobalData[i]['param8Field'];
dataItem['inventRecordId'] = inventNameGlobalData[i]['param9Field'];*/
resultGrid.setCellValue(item, 'inventName', inventNameGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'spec', inventNameGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'material', inventNameGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'unit', inventNameGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'length', inventNameGlobalData[i]['param5Field']);
resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']);
resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']);
resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']);
resultGrid.refresh();
}
}
}
if (e.field == "spec") { if (e.field == "spec") {
var tr,index; var tr,index;
// 获取此model元素信息 // 获取此model元素信息
...@@ -196,9 +224,9 @@ let initInvent = function () { ...@@ -196,9 +224,9 @@ let initInvent = function () {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
// 1.原料,2.耗材 // 1.原料,2.耗材
inInfo.set("inqu_status-0-inventTypes", [1, 2]); inInfo.set("inqu_status-0-inventTypes", [1, 2]);
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, { EiCommunicator.send("HPPZ006", "queryComboBox", inInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows(); inventNameGlobalData = ei.getBlock("invent_spec_all_block_id").getMappedRows();
}, },
onFail: function (ei) { onFail: function (ei) {
} }
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/> <EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" hidden="true"/> <EF:EFColumn ename="inventCode" cname="存货编码" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" required="true" readonly="true"/> <EF:EFColumn ename="inventName" cname="存货名称" width="150" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" align="center" readonly="true" hidden="true"/> <EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" align="center" readonly="true" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" readonly="true"/> <EF:EFColumn ename="spec" cname="规格" width="120" align="center" readonly="true"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N0}" maxLength="20" width="100" align="right" <EF:EFColumn ename="amount" cname="数量" format="{0:N0}" maxLength="20" width="100" align="right"
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<EF:EFColumn ename="unitWt" format="{0:N3}" cname="单重(KG)" maxLength="15" displayType="0.000" <EF:EFColumn ename="unitWt" format="{0:N3}" cname="单重(KG)" maxLength="15" displayType="0.000"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/" data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!"/>
<EF:EFColumn ename="totalWt" cname="总重(KG)" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFComboColumn enable="false" ename="status" align="center" <EF:EFComboColumn enable="false" ename="status" align="center"
columnTemplate="#=textField#" optionLabel=" " columnTemplate="#=textField#" optionLabel=" "
itemTemplate="#=textField#" textField="textField" itemTemplate="#=textField#" textField="textField"
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<EF:EFColumn ename="num" width="80" cname="数量" maxLength="12" displayType="0.000" <EF:EFColumn ename="num" width="80" cname="数量" maxLength="12" displayType="0.000"
data-regex="/^-?[0-9]{1,9}$/" data-regex="/^-?[0-9]{1,9}$/"
data-errorprompt="请输入数字,该值最大可设置9位整数!"/> data-errorprompt="请输入数字,该值最大可设置9位整数!"/>
<EF:EFColumn ename="unitWt" format="{0:N3}" width="80" cname="单重(T)" maxLength="12" displayType="0.000" <EF:EFColumn ename="unitWt" format="{0:N3}" width="80" cname="单重(KG)" maxLength="12" displayType="0.000"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/" data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置9位整数和3位小数!"/> data-errorprompt="请输入数字,该值最大可设置9位整数和3位小数!"/>
<EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" width="80" maxLength="12" displayType="0.000" cname="总重(T)"/> <EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" width="80" maxLength="12" displayType="0.000" cname="总重(T)"/>
......
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