Commit e75cf800 by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

parents 66c50f7d a1c85c59
...@@ -57,8 +57,16 @@ public enum DdynamicEnum { ...@@ -57,8 +57,16 @@ public enum DdynamicEnum {
*/ */
INVENT_ALL_BLOCK_ID("invent_all_block_id", "id", "spec", "material", "unit", "length", "width", "thick", INVENT_ALL_BLOCK_ID("invent_all_block_id", "id", "spec", "material", "unit", "length", "width", "thick",
"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";
......
...@@ -70,5 +70,7 @@ public class CommonConstant { ...@@ -70,5 +70,7 @@ public class CommonConstant {
public static final String PRODUCTTION_ORDER_NO = "productionOrderNo"; public static final String PRODUCTTION_ORDER_NO = "productionOrderNo";
// ROOT // ROOT
public static final String ROOT = "root"; public static final String ROOT = "root";
// 项目档案ID
public static final String PROJ_ID = "projId";
} }
} }
...@@ -39,6 +39,7 @@ public class HPDS002 extends DaoEPBase { ...@@ -39,6 +39,7 @@ public class HPDS002 extends DaoEPBase {
public static final String FIELD_REAL_PATH = "realPath"; /* 物理路径*/ public static final String FIELD_REAL_PATH = "realPath"; /* 物理路径*/
public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/ public static final String FIELD_BIZ_TYPE = "bizType"; /* 业务类型*/
public static final String FIELD_MAT_ID = "matId"; /* 业务类型*/ public static final String FIELD_MAT_ID = "matId"; /* 业务类型*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件标识*/ public static final String COL_DOC_ID = "DOC_ID"; /* 文件标识*/
...@@ -57,6 +58,7 @@ public class HPDS002 extends DaoEPBase { ...@@ -57,6 +58,7 @@ public class HPDS002 extends DaoEPBase {
public static final String COL_REAL_PATH = "REAL_PATH"; /* 物理路径*/ public static final String COL_REAL_PATH = "REAL_PATH"; /* 物理路径*/
public static final String COL_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/ public static final String COL_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/
public static final String COL_MAT_ID = "MAT_ID"; /* 业务类型*/ public static final String COL_MAT_ID = "MAT_ID"; /* 业务类型*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String QUERY = "HPDS002.query"; public static final String QUERY = "HPDS002.query";
public static final String COUNT = "HPDS002.count"; public static final String COUNT = "HPDS002.count";
...@@ -82,6 +84,7 @@ public class HPDS002 extends DaoEPBase { ...@@ -82,6 +84,7 @@ public class HPDS002 extends DaoEPBase {
private String realPath = " "; /* 物理路径*/ private String realPath = " "; /* 物理路径*/
private String bizType = " "; /* 业务类型*/ private String bizType = " "; /* 业务类型*/
private String matId = " "; /* 业务类型*/ private String matId = " "; /* 业务类型*/
private String depCode = " "; /* 部门编码 预留*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -162,6 +165,9 @@ public class HPDS002 extends DaoEPBase { ...@@ -162,6 +165,9 @@ public class HPDS002 extends DaoEPBase {
eiColumn.setDescName("物料ID"); eiColumn.setDescName("物料ID");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
} }
...@@ -439,6 +445,14 @@ public class HPDS002 extends DaoEPBase { ...@@ -439,6 +445,14 @@ public class HPDS002 extends DaoEPBase {
this.matId = matId; this.matId = matId;
} }
public String getDepCode() {
return depCode;
}
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -464,6 +478,7 @@ public class HPDS002 extends DaoEPBase { ...@@ -464,6 +478,7 @@ public class HPDS002 extends DaoEPBase {
setRealPath(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REAL_PATH)), realPath)); setRealPath(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REAL_PATH)), realPath));
setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType)); setBizType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_BIZ_TYPE)), bizType));
setMatId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MAT_ID)), matId)); setMatId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)),depCode));
} }
/** /**
...@@ -490,7 +505,7 @@ public class HPDS002 extends DaoEPBase { ...@@ -490,7 +505,7 @@ public class HPDS002 extends DaoEPBase {
map.put(FIELD_REAL_PATH, StringUtils.toString(realPath, eiMetadata.getMeta(FIELD_REAL_PATH))); map.put(FIELD_REAL_PATH, StringUtils.toString(realPath, eiMetadata.getMeta(FIELD_REAL_PATH)));
map.put(FIELD_BIZ_TYPE, StringUtils.toString(bizType, eiMetadata.getMeta(FIELD_BIZ_TYPE))); map.put(FIELD_BIZ_TYPE, StringUtils.toString(bizType, eiMetadata.getMeta(FIELD_BIZ_TYPE)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID))); map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DEP_CODE,StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
return map; return map;
} }
} }
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
BIZ_TYPE as "bizType", BIZ_TYPE as "bizType",
MAT_ID as "matId" MAT_ID as "matId"
FROM ${hpjxSchema}.TEUDM_TEMP WHERE 1=1 FROM ${hpjxSchema}.TEUDM_TEMP WHERE 1=1
<include refid="authCondition"/>
<include refid="condition" /> <include refid="condition" />
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
...@@ -128,6 +129,7 @@ ...@@ -128,6 +129,7 @@
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hpjxSchema}.TEUDM_TEMP WHERE 1=1 SELECT COUNT(*) FROM ${hpjxSchema}.TEUDM_TEMP WHERE 1=1
<include refid="authCondition"/>
<include refid="condition" /> <include refid="condition" />
</select> </select>
...@@ -197,15 +199,17 @@ ...@@ -197,15 +199,17 @@
ARCHIVE_FLAG, <!-- 同步标记 --> ARCHIVE_FLAG, <!-- 同步标记 -->
REAL_PATH, <!-- 物理路径 --> REAL_PATH, <!-- 物理路径 -->
BIZ_TYPE, BIZ_TYPE,
MAT_ID MAT_ID,
DEP_CODE
) )
VALUES (#companyCode#, #docId#, #dirId#, #docName#, #chgName#, #docSize#, #docTag#, #createdBy#, #createdName#, VALUES (#companyCode#, #docId#, #dirId#, #docName#, #chgName#, #docSize#, #docTag#, #createdBy#, #createdName#,
#createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #archiveFlag#, #realPath#, #bizType#, #matId#) #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #archiveFlag#, #realPath#, #bizType#, #matId#, #depCode#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM ${hpjxSchema}.TEUDM_TEMP WHERE DELETE FROM ${hpjxSchema}.TEUDM_TEMP WHERE
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
<include refid="authCondition"/>
<isNotEmpty prepend=" AND " property="docId"> <isNotEmpty prepend=" AND " property="docId">
DOC_ID = #docId# DOC_ID = #docId#
</isNotEmpty> </isNotEmpty>
...@@ -235,12 +239,14 @@ ...@@ -235,12 +239,14 @@
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 --> UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 --> UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
ARCHIVE_FLAG = #archiveFlag#, <!-- 同步标记 --> ARCHIVE_FLAG = #archiveFlag#, <!-- 同步标记 -->
REAL_PATH = #realPath# <!-- 物理路径 --> REAL_PATH = #realPath#, <!-- 物理路径 -->
BIZ_TYPE = #bizType# BIZ_TYPE = #bizType#,
MAT_ID = #matId# MAT_ID = #matId#,
DEP_CODE = #depCode#
WHERE WHERE
COMPANY_CODE = #companyCode# AND COMPANY_CODE = #companyCode# AND
DOC_ID = #docId# DOC_ID = #docId#
<include refid="condition" />
<isNotEmpty prepend=" AND " property="bizType"> <isNotEmpty prepend=" AND " property="bizType">
BIZ_TYPE = #bizType# BIZ_TYPE = #bizType#
</isNotEmpty> </isNotEmpty>
......
...@@ -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";
......
...@@ -200,7 +200,7 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -200,7 +200,7 @@ public class ServiceHPKC001 extends ServiceBase {
// 根据规格计算单重 // 根据规格计算单重
fKc001.setUnitWeight(HPPZTools.HpPz006.calcUnitWeight(fKc001.getInventRecordId())); fKc001.setUnitWeight(HPPZTools.HpPz006.calcUnitWeight(fKc001.getInventRecordId()));
// 计算总重 // 计算总重
fKc001.setWeight(fKc001.getAmount().multiply(fKc001.getUnitWeight())); fKc001.setWeight(fKc001.getAmount().multiply(fKc001.getUnitWeight()).divide(new BigDecimal("1000")));
} }
/** /**
......
...@@ -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
......
...@@ -264,6 +264,24 @@ public class ServiceHPPZ006 extends ServiceBase { ...@@ -264,6 +264,24 @@ public class ServiceHPPZ006 extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/**
* 存货带规格下拉框
*
* @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;
}
/** /**
* 单位下拉框 * 单位下拉框
......
...@@ -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);
} }
......
...@@ -2,10 +2,13 @@ package com.baosight.hpjx.hp.sc.service; ...@@ -2,10 +2,13 @@ package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation; import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum; import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.common.HPConstants;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils; import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.util.*; import com.baosight.hpjx.util.*;
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;
...@@ -38,6 +41,11 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -38,6 +41,11 @@ public class ServiceHPSC001 extends ServiceBase {
map.put("companyCode", UserSessionUtils.getCompanyCode()); map.put("companyCode", UserSessionUtils.getCompanyCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), map,true); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), map,true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null); CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
map.clear();
map.put("itemCode", "ITEM_CODE in ('4')");
CommonMethod.initBlock(inInfo,
Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID, DdynamicEnum.CODESET_CODE_BLOCK_ID), map,
false);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
...@@ -55,6 +63,7 @@ public class ServiceHPSC001 extends ServiceBase { ...@@ -55,6 +63,7 @@ public class ServiceHPSC001 extends ServiceBase {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC001.FIELD_DELIVERY_DATE, inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC001.FIELD_DELIVERY_DATE,
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC001.FIELD_DELIVERY_DATE))); DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC001.FIELD_DELIVERY_DATE)));
EiInfo outInfo = super.query(inInfo, "HPSC001.query", new HPSC001()); EiInfo outInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
outInfo.addBlock(HPConstants.BLOCK_DETAIL).addBlockMeta(new HPSC002().eiMetadata);
return outInfo; return outInfo;
} }
......
...@@ -14,6 +14,7 @@ import com.baosight.hpjx.hp.pz.tools.HPPZTools; ...@@ -14,6 +14,7 @@ import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.*; import com.baosight.hpjx.hp.sc.domain.*;
import com.baosight.hpjx.hp.sc.tools.HPSCTools; import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.*; import com.baosight.hpjx.util.*;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ProjectInfo; import com.baosight.iplat4j.core.ProjectInfo;
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;
...@@ -71,13 +72,27 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -71,13 +72,27 @@ public class ServiceHPSC002 extends ServiceBase {
@Override @Override
public EiInfo query(EiInfo inInfo) { public EiInfo query(EiInfo inInfo) {
try { try {
inInfo = super.query(inInfo, "HPSC002.query", new HPSC002()); inInfo = super.query(inInfo, HPSC002.QUERY, new HPSC002());
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
} }
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "物料清单",operType = "查询",operDesc = "查询明细detail")
public EiInfo queryDetail(EiInfo inInfo){
//添加返回到前台的块,块名和前台的对应
//HashMap params = new HashMap();
//params.put(HPSC002.FIELD_PROJ_CODE,inInfo.get(HPSC002.FIELD_PROJ_CODE));
//params.put(HPSC002.FIELD_LV,inInfo.get(HPSC002.FIELD_LV));
EiInfo outInfo = super.query(inInfo,HPSC002.QUERY,new HPSC002(),false,new HPSC002().eiMetadata,EiConstant.queryBlock,EiConstant.resultBlock,CommonConstant.Field.DETAIL);
//List list = dao.query(HPSC002.QUERY,params,0,-999999);
//outInfo.addBlock(CommonConstant.Field.DETAIL).addBlockMeta(new HPSC002().eiMetadata);
//outInfo.addBlock(CommonConstant.Field.DETAIL).addRows(list);
//outInfo.getBlock(CommonConstant.Field.DETAIL).set(EiConstant.limitStr, list.size());
return outInfo;
}
/** /**
* 查询操作物料清单选择校验. * 查询操作物料清单选择校验.
*/ */
...@@ -86,13 +101,13 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -86,13 +101,13 @@ public class ServiceHPSC002 extends ServiceBase {
try { try {
HashMap map = new HashMap(); HashMap map = new HashMap();
HPSC001 hpsc001 = HPSCTools.HpSc001.getId(inInfo.getString("id")); HPSC001 hpsc001 = HPSCTools.HpSc001.getId(inInfo.getString("id"));
map.put("projCode",hpsc001.getProjCode()); map.put(HPSC002.FIELD_PROJ_CODE,hpsc001.getProjCode());
List<HPSC002> results = this.dao.query("HPSC002.queryTree", map); List<HPSC002> results = this.dao.query("HPSC002.queryTree", map);
if (results.size()>1){ if (results.size()>1){
inInfo.setStatus(0); inInfo.setStatus(0);
}else{ }else{
inInfo.setStatus(1); inInfo.setStatus(1);
inInfo.set("projCode",hpsc001.getProjCode()); inInfo.set(HPSC002.FIELD_PROJ_CODE,hpsc001.getProjCode());
} }
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败"); LogUtils.setDetailMsg(inInfo, e, "查询失败");
...@@ -129,6 +144,35 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -129,6 +144,35 @@ public class ServiceHPSC002 extends ServiceBase {
} }
/** /**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "物料清单",operType = "保存",operDesc = "保存detil")
public EiInfo saveDetail(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(CommonConstant.Field.DETAIL).getRows();
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HPSC002 hpsc002 = new HPSC002();
hpsc002.fromMap(resultRows.get(i));
if (hpsc002.getId() == null || hpsc002.getId() == 0) {
hpsc002.setDeliveryDate(DateUtils.formatShort(hpsc002.getDeliveryDate()));
this.add(hpsc002);
} else {
this.modify(hpsc002);
}
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增操作. * 新增操作.
*/ */
public EiInfo add(HPSC002 hpsc002) { public EiInfo add(HPSC002 hpsc002) {
...@@ -139,7 +183,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -139,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);
...@@ -293,7 +337,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -293,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);
...@@ -443,7 +487,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -443,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()));
...@@ -522,6 +566,53 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -522,6 +566,53 @@ public class ServiceHPSC002 extends ServiceBase {
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "物料清单",operType = "删除",operDesc = "删除操作detail")
public EiInfo deleteDetail(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(CommonConstant.Field.DETAIL).getRows();
// 删除之前数据校验
for (Map resultRow : resultRows) {
HPSC002 fSc002 = new HPSC002();
fSc002.fromMap(resultRow);
// 存在子节点不能删除
List<HPSC002> dbSc002s = HPSCTools.HpSc002.queryByParent(fSc002.getId().toString());
AssertUtils.isNotEmpty(dbSc002s, String.format("部件[%s]已存在子节点不能删除", fSc002.getPrdtName()));
// 计划生产中不能删除
HPSC004 dbSc004 = HPSCTools.HpSc004.queryByMat(fSc002.getId());
HPSC005 HPSC005 = HPSCTools.HpSc005.queryByMat(fSc002.getId());
if (HPSC005 != null) {
HPSCTools.HpSc005.lock(HPSC005.getProdOrderNo());
AssertUtils.isTrue(HPSC005.getStatus() > 0,
String.format("部件[%s]已派工不能删除", fSc002.getPrdtName()));
}
}
// 删除数据
for (Map resultRow : resultRows) {
HPSC002 fSc002 = new HPSC002();
fSc002.fromMap(resultRow);
// 删除附件文件
delectDoc(fSc002.getId());
DaoUtils.update(HPSC002.DELETE, fSc002);
// 修改父级节点状态是叶子节点或非叶子节点
this.checkTreeNodeLeaf(fSc002.getParentId());
// 修改节点状态是叶子节点或非叶子节点
this.checkTreeNodeLeaf(fSc002.getId().toString());
// 同步删除生产计划
HPSCTools.HpSc003.deleteByMat(fSc002.getId());
HPSCTools.HpSc004.deleteByMat(fSc002.getId());
// 同步删除生产订单
HPSCTools.HpSc005.deleteByMat(fSc002.getId());
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
/** /**
* 前端校验,数据是否派工 * 前端校验,数据是否派工
* *
...@@ -575,7 +666,8 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -575,7 +666,8 @@ public class ServiceHPSC002 extends ServiceBase {
if(StringUtils.equals("$",pEname)){ if(StringUtils.equals("$",pEname)){
pEname = "root"; pEname = "root";
} }
Long projId = NumberUtils.toLong(inInfo.get("projId")); String proj = inInfo.get(CommonConstant.Field.PROJ_ID).toString();
Long projId = NumberUtils.toLong(proj.split("&")[0]);
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("pEname", pEname); queryMap.put("pEname", pEname);
if (projId != null) { if (projId != null) {
...@@ -718,6 +810,7 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -718,6 +810,7 @@ public class ServiceHPSC002 extends ServiceBase {
HPSC003 newSc003 = BeanUtils.copy(dbSc002, HPSC003.class); HPSC003 newSc003 = BeanUtils.copy(dbSc002, HPSC003.class);
newSc003.setPlanInfoNo(planNo); newSc003.setPlanInfoNo(planNo);
newSc003.setMatId(dbSc002.getId()); newSc003.setMatId(dbSc002.getId());
newSc003.setPlanCompletionDate(dbSc002.getDeliveryDate());
newSc003.setStatus(HPConstant.planStatus.S_0); newSc003.setStatus(HPConstant.planStatus.S_0);
DaoUtils.insert(HPSC003.INSERT, newSc003); DaoUtils.insert(HPSC003.INSERT, newSc003);
} else { } else {
...@@ -737,6 +830,8 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -737,6 +830,8 @@ public class ServiceHPSC002 extends ServiceBase {
newSc004.setParentId(planNo); newSc004.setParentId(planNo);
newSc004.setMatId(dbSc002Child.getId()); newSc004.setMatId(dbSc002Child.getId());
newSc004.setFilePath1(dbSc002Child.getId().toString()); newSc004.setFilePath1(dbSc002Child.getId().toString());
newSc004.setPlanCompletionDate(dbSc002Child.getDeliveryDate());
newSc004.setPlanCommentDate(dbSc002Child.getDeliveryDate());
newSc004.setDelStatus(CommonConstant.YesNo.NO_0); newSc004.setDelStatus(CommonConstant.YesNo.NO_0);
DaoUtils.insert(HPSC004.INSERT, newSc004); DaoUtils.insert(HPSC004.INSERT, newSc004);
} }
...@@ -841,4 +936,9 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -841,4 +936,9 @@ public class ServiceHPSC002 extends ServiceBase {
this.dao.delete(HPDS002.DELETE,map); this.dao.delete(HPDS002.DELETE,map);
} }
} }
public EiInfo queryList(EiInfo inInfo){
return super.query(inInfo,"HPSC002.queryList",new HPSC002(),false,new HPSC002().eiMetadata,EiConstant.queryBlock,EiConstant.resultBlock,CommonConstant.Field.DETAIL);
}
} }
...@@ -41,7 +41,7 @@ public class ServiceHPSC002A extends ServiceEPBase { ...@@ -41,7 +41,7 @@ public class ServiceHPSC002A extends ServiceEPBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
// 查询物料ID所对应的项目名称和部件名称 // 查询物料ID所对应的项目名称和部件名称
Map queryMap = EiInfoUtils.getFirstRow(inInfo); /* Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String bizType = inInfo.getString("inqu_status-0-bizType"); String bizType = inInfo.getString("inqu_status-0-bizType");
List<HPSC002> dbSc002s = new ArrayList<HPSC002>(); List<HPSC002> dbSc002s = new ArrayList<HPSC002>();
List<HPSC006> HPSC006 = new ArrayList<HPSC006>(); List<HPSC006> HPSC006 = new ArrayList<HPSC006>();
...@@ -52,8 +52,8 @@ public class ServiceHPSC002A extends ServiceEPBase { ...@@ -52,8 +52,8 @@ public class ServiceHPSC002A extends ServiceEPBase {
} }
if (CollectionUtils.isNotEmpty(dbSc002s) || CollectionUtils.isNotEmpty(HPSC006)) { if (CollectionUtils.isNotEmpty(dbSc002s) || CollectionUtils.isNotEmpty(HPSC006)) {
inInfo.set("inqu_status-0-bizType", queryMap.get("bizType")); inInfo.set("inqu_status-0-bizType", queryMap.get("bizType"));
inInfo.set("inqu_status-0-matId", queryMap.get("id")); inInfo.set("inqu_status-0-matId", queryMap.get("matId"));
} }*/
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002A().eiMetadata); inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002A().eiMetadata);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
......
...@@ -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);
......
...@@ -500,4 +500,15 @@ ...@@ -500,4 +500,15 @@
</isNotEmpty> </isNotEmpty>
</select> </select>
<select id="queryList" parameterClass="java.util.HashMap" resultClass="com.baosight.hpjx.hp.sc.domain.HPSC002">
SELECT
<include refid="column1"/>
FROM hpjx.t_hpsc002 A
LEFT JOIN hpjx.t_hpsc005 B on A.ID = B.MAT_ID
WHERE 1=1
AND DEL_STATUS = 0
<include refid="condition1"/>
<include refid="order"/>
</select>
</sqlMap> </sqlMap>
...@@ -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);
} }
......
...@@ -43,6 +43,7 @@ public class HPXS002 extends DaoEPBase { ...@@ -43,6 +43,7 @@ public class HPXS002 extends DaoEPBase {
public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/ public static final String FIELD_PROJ_NAME = "projName"; /* 项目名称*/
public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品类型*/ public static final String FIELD_PRDT_TYPE = "prdtType"; /* 产品类型*/
public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/ public static final String FIELD_PRDT_NAME = "prdtName"; /* 产品名称*/
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件标识*/ public static final String COL_DOC_ID = "DOC_ID"; /* 文件标识*/
...@@ -61,6 +62,7 @@ public class HPXS002 extends DaoEPBase { ...@@ -61,6 +62,7 @@ public class HPXS002 extends DaoEPBase {
public static final String COL_REAL_PATH = "REAL_PATH"; /* 物理路径*/ public static final String COL_REAL_PATH = "REAL_PATH"; /* 物理路径*/
public static final String COL_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/ public static final String COL_BIZ_TYPE = "BIZ_TYPE"; /* 业务类型*/
public static final String COL_MAT_ID = "MAT_ID"; /* 业务类型*/ public static final String COL_MAT_ID = "MAT_ID"; /* 业务类型*/
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String QUERY = "HPXS002.query"; public static final String QUERY = "HPXS002.query";
public static final String COUNT = "HPXS002.count"; public static final String COUNT = "HPXS002.count";
...@@ -89,6 +91,7 @@ public class HPXS002 extends DaoEPBase { ...@@ -89,6 +91,7 @@ public class HPXS002 extends DaoEPBase {
private String projName = " "; /* 项目名称*/ private String projName = " "; /* 项目名称*/
private Integer prdtType; /* 产品类型*/ private Integer prdtType; /* 产品类型*/
private String prdtName = " "; /* 产品名称*/ private String prdtName = " "; /* 产品名称*/
private String depCode = " "; /* 部门编码 预留*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -181,6 +184,10 @@ public class HPXS002 extends DaoEPBase { ...@@ -181,6 +184,10 @@ public class HPXS002 extends DaoEPBase {
eiColumn.setDescName("产品名称"); eiColumn.setDescName("产品名称");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DEP_CODE);
eiColumn.setDescName("部门编码 预留");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -481,6 +488,14 @@ public class HPXS002 extends DaoEPBase { ...@@ -481,6 +488,14 @@ public class HPXS002 extends DaoEPBase {
this.prdtName = prdtName; this.prdtName = prdtName;
} }
public String getDepCode() {
return depCode;
}
public void setDepCode(String depCode) {
this.depCode = depCode;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -509,6 +524,7 @@ public class HPXS002 extends DaoEPBase { ...@@ -509,6 +524,7 @@ public class HPXS002 extends DaoEPBase {
setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName)); setProjName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PROJ_NAME)), projName));
setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType)); setPrdtType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_PRDT_TYPE)), prdtType));
setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName)); setPrdtName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_PRDT_NAME)), prdtName));
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)),depCode));
} }
/** /**
...@@ -538,6 +554,7 @@ public class HPXS002 extends DaoEPBase { ...@@ -538,6 +554,7 @@ public class HPXS002 extends DaoEPBase {
map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME))); map.put(FIELD_PROJ_NAME, StringUtils.toString(projName, eiMetadata.getMeta(FIELD_PROJ_NAME)));
map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE))); map.put(FIELD_PRDT_TYPE, StringUtils.toString(prdtType, eiMetadata.getMeta(FIELD_PRDT_TYPE)));
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_DEP_CODE,StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
return map; return map;
} }
} }
...@@ -77,6 +77,21 @@ ...@@ -77,6 +77,21 @@
<isNotEmpty prepend=" AND " property="matId"> <isNotEmpty prepend=" AND " property="matId">
MAT_ID = #matId# MAT_ID = #matId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
</sql>
<sql id="authCondition">
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE=#companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE= #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depcodes[]#</iterate>
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
...@@ -97,7 +112,8 @@ ...@@ -97,7 +112,8 @@
A.CREATED_TIME as "createdTime", <!-- 记录创建时间 --> A.CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
A.REAL_PATH as "realPath", <!-- 物理路径 --> A.REAL_PATH as "realPath", <!-- 物理路径 -->
A.BIZ_TYPE as "bizType", A.BIZ_TYPE as "bizType",
A.MAT_ID as "matId" A.MAT_ID as "matId",
A.DEP_CODE as "depCode"
FROM ${hpjxSchema}.TEUDM_TEMP AS A FROM ${hpjxSchema}.TEUDM_TEMP AS A
INNER JOIN ${hpjxSchema}.T_HPSC002 AS B ON A.MAT_ID = B.ID AND A.COMPANY_CODE = B.COMPANY_CODE INNER JOIN ${hpjxSchema}.T_HPSC002 AS B ON A.MAT_ID = B.ID AND A.COMPANY_CODE = B.COMPANY_CODE
WHERE 1=1 WHERE 1=1
...@@ -122,6 +138,12 @@ ...@@ -122,6 +138,12 @@
<isNotEmpty prepend=" AND " property="createdDateTo"> <isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= #createdDateTo# A.CREATED_TIME &lt;= #createdDateTo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE= #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
A.DEP CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depcodes[]#</iterate>
</isNotEmpty>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -157,6 +179,12 @@ ...@@ -157,6 +179,12 @@
<isNotEmpty prepend=" AND " property="createdDateTo"> <isNotEmpty prepend=" AND " property="createdDateTo">
A.CREATED_TIME &lt;= #createdDateTo# A.CREATED_TIME &lt;= #createdDateTo#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
A.DEP_CODE= #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCodes">
A.DEP_CODE IN <iterate close=")" open="(" conjunction="," property="depCodes">#depcodes[]#</iterate>
</isNotEmpty>
</select> </select>
<!-- <!--
...@@ -225,15 +253,17 @@ ...@@ -225,15 +253,17 @@
ARCHIVE_FLAG, <!-- 同步标记 --> ARCHIVE_FLAG, <!-- 同步标记 -->
REAL_PATH, <!-- 物理路径 --> REAL_PATH, <!-- 物理路径 -->
BIZ_TYPE, BIZ_TYPE,
MAT_ID MAT_ID,
DEP_CODE
) )
VALUES (#companyCode#, #docId#, #dirId#, #docName#, #chgName#, #docSize#, #docTag#, #createdBy#, #createdName#, VALUES (#companyCode#, #docId#, #dirId#, #docName#, #chgName#, #docSize#, #docTag#, #createdBy#, #createdName#,
#createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #archiveFlag#, #realPath#, #bizType#, #matId#) #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #archiveFlag#, #realPath#, #bizType#, #matId#, #depCode#)
</insert> </insert>
<delete id="delete"> <delete id="delete">
DELETE FROM ${hpjxSchema}.TEUDM_TEMP WHERE DELETE FROM ${hpjxSchema}.TEUDM_TEMP WHERE
COMPANY_CODE = #companyCode# COMPANY_CODE = #companyCode#
<include refid="condition" />
<isNotEmpty prepend=" AND " property="docId"> <isNotEmpty prepend=" AND " property="docId">
DOC_ID = #docId# DOC_ID = #docId#
</isNotEmpty> </isNotEmpty>
...@@ -263,12 +293,14 @@ ...@@ -263,12 +293,14 @@
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 --> UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 --> UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
ARCHIVE_FLAG = #archiveFlag#, <!-- 同步标记 --> ARCHIVE_FLAG = #archiveFlag#, <!-- 同步标记 -->
REAL_PATH = #realPath# <!-- 物理路径 --> REAL_PATH = #realPath#, <!-- 物理路径 -->
BIZ_TYPE = #bizType# BIZ_TYPE = #bizType#,
MAT_ID = #matId# MAT_ID = #matId#,
DEP_CODE = #depCode#
WHERE WHERE
COMPANY_CODE = #companyCode# AND COMPANY_CODE = #companyCode# AND
DOC_ID = #docId# DOC_ID = #docId#
<include refid="condition" />
<isNotEmpty prepend=" AND " property="bizType"> <isNotEmpty prepend=" AND " property="bizType">
BIZ_TYPE = #bizType# BIZ_TYPE = #bizType#
</isNotEmpty> </isNotEmpty>
......
...@@ -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);
} }
......
...@@ -2443,20 +2443,33 @@ $(function () { ...@@ -2443,20 +2443,33 @@ $(function () {
} }
}); });
} }
if (loginName !== "admin"){ try {
var info = new EiInfo() if (loginName !== "admin"){
info.set("inqu_status-0-companyCode",loginName) var info = new EiInfo()
EiCommunicator.send("HPPZ009", "query", info, { info.set("inqu_status-0-companyCode",loginName)
onSuccess: function (ei) {//返回结果集 EiCommunicator.send("HPPZ009", "query", info, {
if (ei.blocks.result !== undefined){ onSuccess: function (ei) {//返回结果集
let results = ei.getBlock("result").getMappedRows() if (ei.blocks.result !== undefined){
let results = ei.getBlock("result").getMappedRows();
$("#sidebar img").attr("src",downloadHref(results[0].docIdPc,results[0].projectEnv)); if (results.length>0 && results[0].docIdPc.length>0){
let src = downloadHref(results[0].docIdPc,results[0].projectEnv)
let img=`<img src="${src}" style='width:200px;height:55px;background-image: none;'/>`;
$("#sidebar .sidebar-content .side-header").html(img);
//$("#sidebar .sidebar-content .side-header").attr("src",downloadHref(results[0].docIdPc,results[0].projectEnv));
}else {
$("#sidebar .sidebar-content .side-header").html("<span class=\"logo\"></span>");
}
}else {
$("#sidebar .sidebar-content .side-header").html("<span class=\"logo\"></span>");
}
}, onFail: function (ei) {
} }
}, {async: false});
}, onFail: function (ei) { }else {
} $("#sidebar .sidebar-content .side-header").html("<span class=\"logo\"></span>");
}, {async: false}); }
} catch (error) {
$("#sidebar .sidebar-content .side-header").html("<span class=\"logo\"></span>");
} }
}) })
......
...@@ -183,27 +183,27 @@ ...@@ -183,27 +183,27 @@
<div id="page-container" class="i-index-content sidebar-l sidebar-o side-scroll header-navbar-fixed"> <div id="page-container" class="i-index-content sidebar-l sidebar-o side-scroll header-navbar-fixed">
<input type="hidden" id="efSecurityToken" value="<%=efSecurityToken%>"/> <input type="hidden" id="efSecurityToken" value="<%=efSecurityToken%>"/>
<div id="sidebar"> <div id="sidebar">
<div class="sidebar-content"> <div class="sidebar-content">
<!-- Side Header --> <!-- Side Header -->
<div class="side-header"> <div class="side-header">
<img src="${ctx}/hpjx-logo.png" style="width:200px;height:55px;background-image: none;"/> <%-- <img src="${ctx}/hpjx-logo.png" style="width:200px;height:55px;background-image: none;"/>--%>
<%-- <span class="logo"></span>--%> <%--<span class="logo"></span>--%>
<%--<span class="projectType">[<%=projectTypeDesc%>]</span>--%> <%--<span class="projectType">[<%=projectTypeDesc%>]</span>--%>
</div> </div>
<!-- END Side Header --> <!-- END Side Header -->
<!-- Side Content --> <!-- Side Content -->
<div id="iplat-menu" class="side-content"> <div id="iplat-menu" class="side-content">
</div> </div>
<div id="side-toggle" class="side-content-toggle"> <div id="side-toggle" class="side-content-toggle">
<span class="hide-mini fa fa-thumb-tack"></span> <span class="hide-mini fa fa-thumb-tack"></span>
<span class="hide-normal fa fa-bars"></span> <span class="hide-normal fa fa-bars"></span>
</div>
<!-- END Side Content -->
</div> </div>
<!-- END Side Content -->
</div>
<!-- Sidebar Content --> <!-- Sidebar Content -->
</div> </div>
<div id="header-navbar"> <div id="header-navbar">
<ul class="nav-header pull-right"> <ul class="nav-header pull-right">
......
...@@ -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,13 +63,13 @@ ...@@ -63,13 +63,13 @@
</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"
required="true" readonly="true"/> required="true" readonly="true"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="总重(KG)" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="length" cname="长(MM)" width="80" align="right" format="{0:N3}" readonly="true"/> <EF:EFColumn ename="length" cname="长(MM)" width="80" align="right" format="{0:N3}" readonly="true"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="80" align="right" format="{0:N3}" readonly="true"/> <EF:EFColumn ename="width" cname="宽(MM)" width="80" align="right" format="{0:N3}" readonly="true"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="80" align="right" format="{0:N3}" readonly="true"/> <EF:EFColumn ename="thick" cname="厚(MM)" width="80" align="right" format="{0:N3}" readonly="true"/>
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
align="right"/> align="right"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" format="{0:N3}" maxLength="20" width="100" <EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" format="{0:N3}" maxLength="20" width="100"
align="right"/> align="right"/>
<EF:EFColumn ename="weight" cname="总重(KG)" enable="false" format="{0:N3}" maxLength="20" width="100" <EF:EFColumn ename="weight" cname="总重(T)" enable="false" format="{0:N3}" maxLength="20" width="100"
align="right"/> align="right"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="100" align="center"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="100" align="center"/>
<EF:EFColumn ename="oldReqNo" cname="原领料单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="oldReqNo" cname="原领料单号" enable="false" width="140" align="center"/>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<EF:EFColumn ename="width" cname="宽(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/> <EF:EFColumn ename="width" cname="宽(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/>
<EF:EFColumn ename="thick" cname="厚(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/> <EF:EFColumn ename="thick" cname="厚(MM)" enable="false" width="100" align="right" format="{0:N3}" hidden="true"/>
<EF:EFColumn ename="amount" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/> <EF:EFColumn ename="amount" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/>
<EF:EFColumn ename="unitWeight" cname="单重(T)" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFComboColumn ename="isPrint" cname="是否打印" width="80" align="center"> <EF:EFComboColumn ename="isPrint" cname="是否打印" width="80" align="center">
<EF:EFCodeOption codeName="hpjx.hpjx.isPrint"/> <EF:EFCodeOption codeName="hpjx.hpjx.isPrint"/>
......
...@@ -67,8 +67,8 @@ ...@@ -67,8 +67,8 @@
<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"
sumType="all" required="true" readonly="true"/> sumType="all" required="true" readonly="true"/>
<EF:EFColumn ename="unitWeight" cname="单重" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="总重" enable="false" width="120" align="right" format="{0:N3}" <EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="120" align="right" format="{0:N3}"
sumType="all"/> sumType="all"/>
<EF:EFColumn ename="length" cname="长" width="100" align="center" format="{0:N3}" required="false" <EF:EFColumn ename="length" cname="长" width="100" align="center" format="{0:N3}" required="false"
readonly="true"/> readonly="true"/>
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
<EF:EFColumn ename="amount" cname="数量" enable="false" format="{0:N0}" width="100" align="right" <EF:EFColumn ename="amount" cname="数量" enable="false" format="{0:N0}" width="100" align="right"
sumType="all"/> sumType="all"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" format="{0:N3}" width="100" align="right"/> <EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" format="{0:N3}" width="100" align="right"/>
<EF:EFColumn ename="weight" cname="总重(KG)" enable="false" format="{0:N3}" width="100" align="right" <EF:EFColumn ename="weight" cname="总重(T)" enable="false" format="{0:N3}" width="100" align="right"
sumType="all"/> sumType="all"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/> <EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
<EF:EFColumn ename="oldOuterNo" cname="原出库单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="oldOuterNo" cname="原出库单号" enable="false" width="140" align="center"/>
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<EF:EFColumn ename="unit" cname="单位" width="120" align="center" enable="false"/> <EF:EFColumn ename="unit" cname="单位" width="120" align="center" enable="false"/>
<EF:EFColumn ename="amount" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/> <EF:EFColumn ename="amount" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="总重(KG)" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时刻" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<EF:EFColumn ename="thick" cname="厚(MM)" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>--%> <EF:EFColumn ename="thick" cname="厚(MM)" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>--%>
<EF:EFColumn ename="prdtSpec" cname="规格" enable="false" width="150" align="center"/> <EF:EFColumn ename="prdtSpec" cname="规格" enable="false" width="150" align="center"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N0}" maxLength="20" width="90" align="right" required="true" enable="false"/> <EF:EFColumn ename="amount" cname="数量" format="{0:N0}" maxLength="20" width="90" align="right" required="true" enable="false"/>
<EF:EFColumn ename="unitWeight" cname="单重(T)" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/> <EF:EFColumn ename="unitWeight" cname="单重(KG)" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<EF:EFColumn ename="weight" cname="总重(T)" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/> <EF:EFColumn ename="weight" cname="总重(T)" format="{0:N3}" maxLength="20" width="90" align="right" enable="false"/>
<%--<EF:EFColumn ename="remark" cname="备注" width="120" align="center" enable="false"/>--%> <%--<EF:EFColumn ename="remark" cname="备注" width="120" align="center" enable="false"/>--%>
<EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdBy" cname="创建人" enable="false" width="100" align="center"/>
......
...@@ -10,17 +10,20 @@ $(function () { ...@@ -10,17 +10,20 @@ $(function () {
} }
}, },
onAdd: function (e) { onAdd: function (e) {
e.preventDefault() e.preventDefault();
$("#type").val("update") $("#type").val("insert")
$("#companyName").val(); $("#companyName").val("");
$("#loginPrefix").val(); $("#loginPrefix").val("");
$("#validFlag").val(); $("#validFlag").val(1);
$("#PCfileDocId").val(); $("#PCfileDocId").val("");
$("#APPfileDocId").val(); $("#APPfileDocId").val("");
$("#remark").val(); $("#remark").val("");
$("#id").val(); $("#id").val("");
$("#companyCode").val(); $("#companyCode").val("");
addCompany($("#insertGroup")) $("#insertGroup_wnd_title").text("新增企业管理");
clealImgLabel($("#app-img"));
clealImgLabel($("#pc-img"));
addCompany($("#insertGroup"));
}, },
onSave: function (e) { onSave: function (e) {
// 阻止后台保存请求,使用自定义保存 // 阻止后台保存请求,使用自定义保存
...@@ -41,6 +44,8 @@ $(function () { ...@@ -41,6 +44,8 @@ $(function () {
* e.tr tr, jquery * e.tr tr, jquery
*/ */
onRowClick: function (e) { onRowClick: function (e) {
let app = $("#app-img"),
pc = $("#pc-img");
$("#type").val("update"); $("#type").val("update");
$("#companyCode").val(e.model.companyCode); $("#companyCode").val(e.model.companyCode);
$("#companyName").val(e.model.companyName); $("#companyName").val(e.model.companyName);
...@@ -50,7 +55,10 @@ $(function () { ...@@ -50,7 +55,10 @@ $(function () {
$("#APPfileDocId").val(e.model.docIdApp); $("#APPfileDocId").val(e.model.docIdApp);
$("#remark").val(e.model.remark); $("#remark").val(e.model.remark);
$("#id").val(e.model.id); $("#id").val(e.model.id);
addCompany($("#insertGroup")) addImgLabel(app,e.model.docIdApp);
addImgLabel(pc,e.model.docIdPc);
$("#insertGroup_wnd_title").text("修改企业管理");
addCompany($("#insertGroup"));
/*WindowUtil({ /*WindowUtil({
"title": "", "title": "",
"content": "<div class='kendo-del-message'>" + e.row + "</div>" "content": "<div class='kendo-del-message'>" + e.row + "</div>"
...@@ -66,7 +74,6 @@ $(function () { ...@@ -66,7 +74,6 @@ $(function () {
// 删除 // 删除
$("#BTN_DELETE").on("click", deleteFunc); $("#BTN_DELETE").on("click", deleteFunc);
IPLATUI.EFUpload = { IPLATUI.EFUpload = {
docIdApp: { docIdApp: {
showFileList:false, showFileList:false,
...@@ -85,13 +92,9 @@ $(function () { ...@@ -85,13 +92,9 @@ $(function () {
return; return;
} }
$("#APPfileDocId").val(docId); $("#APPfileDocId").val(docId);
addImgLabel($("#app-img"),docId);
//$("#app-img").attr("src",downloadHref(docId));
NotificationUtil("附件上传成功"); NotificationUtil("附件上传成功");
//console.log($("#fileDocId").val())
//saveTemp(e);
/*try {
parent.JSColorbox.setValueCallback(e);
} catch (e){
}*/
}, },
}, },
docIdPc: { docIdPc: {
...@@ -111,13 +114,9 @@ $(function () { ...@@ -111,13 +114,9 @@ $(function () {
return; return;
} }
$("#PCfileDocId").val(docId); $("#PCfileDocId").val(docId);
addImgLabel($("#pc-img"),docId);
/*$("#pc-img").attr("src",downloadHref(docId));*/
NotificationUtil("附件上传成功"); NotificationUtil("附件上传成功");
//console.log($("#fileDocId").val())
//saveTemp(e);
/*try {
parent.JSColorbox.setValueCallback(e);
} catch (e){
}*/
}, },
} }
}; };
...@@ -269,36 +268,21 @@ $("#update").click(function () { ...@@ -269,36 +268,21 @@ $("#update").click(function () {
*/ */
function addCompanyCallback(e) { function addCompanyCallback(e) {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
/*let result = new EiInfo();
let docId = e.response.docId;
let docName = e.response.docName;
let docSize = e.response.docSize;
let docTag = e.response.docTag;
let docUrl = e.response.docUrl;
result.set("result-0-docId",docId);
result.set("result-0-docName",docName);
result.set("result-0-docSize",docSize);
result.set("result-0-docTag",docTag);
result.set("result-0-realPath",docUrl);
EiCommunicator.send("HPXS003", "insert", result, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
resultGrid.dataSource.page(1);
},
onFail: function (ei) {
// 发生异常
NotificationUtil("执行失败,原因[" + ei + "]", "error");
}
}, {
async: false
});*/
} }
function addImgLabel (id,docId) {
clealImgLabel(id);
if (isBlank(docId)){
return;
}
let src = downloadHref(docId)
let img=`<img src="${src}" style='width:200px;height:55px;background-image: none;'/>`;
id.html(img);
}
function clealImgLabel(id) {
id.html("");
}
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="single">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="docIdPc" cname="主键" hidden="true"/> <EF:EFColumn ename="docIdPc" cname="主键" hidden="true"/>
<EF:EFColumn ename="docIdApp" cname="主键" hidden="true"/> <EF:EFColumn ename="docIdApp" cname="主键" hidden="true"/>
...@@ -35,58 +35,62 @@ ...@@ -35,58 +35,62 @@
<span style='color: red;font-size: 13px;'>说明:新增企业时会同步新增企业管理员账户,账号和密码与企业编码相同</span> <span style='color: red;font-size: 13px;'>说明:新增企业时会同步新增企业管理员账户,账号和密码与企业编码相同</span>
</EF:EFRegion> </EF:EFRegion>
<EF:EFWindow id="insertGroup" top="100px" left="280px" width="38%" height="70%"> <EF:EFWindow id="insertGroup" title="企业管理" top="100px" left="280px" width="40%" height="70%">
<form> <form>
<div class="form-group row"> <div class="form-group row">
<label for="companyName" class="col-sm-2 col-form-label col-form-label-sm">企业名称</label> <label for="companyName" class="col-sm-2 col-form-label col-form-label-sm">企业名称</label>
<div class="col-sm-6"> <div class="col-sm-6">
<input type="text" class="form-control" id="companyName" required="required"> <input type="text" class="form-control" id="companyName" placeholder="企业名称" aria-label="企业名称" required="required">
</div>
</div> </div>
<div class="form-group row"> </div>
<label for="loginPrefix" class="col-sm-2 col-form-label col-form-label-sm">登录前缀</label> <div class="form-group row">
<div class="col-sm-6"> <label for="loginPrefix" class="col-sm-2 col-form-label col-form-label-sm">登录前缀</label>
<input type="text" class="form-control" id="loginPrefix"> <div class="col-sm-6">
</div> <input type="text" class="form-control" id="loginPrefix" placeholder="登录前缀" aria-label="登录前缀">
</div> </div>
<div class="form-group row"> </div>
<label for="validFlag" class="col-sm-2 col-form-label col-form-label-sm">是否启用</label> <div class="form-group row">
<div class="col-sm-6"> <label for="validFlag" class="col-sm-2 col-form-label col-form-label-sm">是否启用</label>
<select class="form-control" id="validFlag"> <div class="col-sm-6">
<option value="1"></option> <select class="form-control" id="validFlag">
<option value="0"></option> <option value="1"></option>
</select> <option value="0"></option>
</div> </select>
</div>
<div class="form-group row">
<label for="docIdPc" class="col-sm-2 col-form-label">PC端log</label>
<div class="col-sm-6">
<EF:EFUpload ename="docIdPc" cname="PC上传" docTag="hk_filePc" path="A"/>
<%--<input type="file" class="form-control" id="docIdPc">--%>
</div>
<input type="hidden" id="PCfileDocId" value="">
</div> </div>
<div class="form-group row"> </div>
<label for="docIdApp" class="col-sm-2 col-form-label">APP端log</label> <div class="form-group row">
<div class="col-sm-6"> <label for="docIdPc" class="col-sm-2 col-form-label">PC端log</label>
<EF:EFUpload ename="docIdApp" cname="APP上传" docTag="hk_fileApp" path="A"/> <div class="col-sm-6">
<%--<input type="file" class="form-control" accept="image/*" id="docIdApp">--%> <EF:EFUpload ename="docIdPc" cname="PC上传" docTag="hk_filePc" path="A"/>
<div class="side-header" id="pc-img" style="background-color: whitesmoke">
<img src="${ctx}/hpjx-logo.png" style="width:200px;height:55px;background-image: none;" alt="pc端log"/>
</div> </div>
<input type="hidden" id="APPfileDocId" value="">
</div> </div>
<div class="form-group row"> <input type="hidden" id="PCfileDocId" value="">
<label for="remark" class="col-sm-2 col-form-label col-form-label-sm">备注</label> </div>
<div class="col-sm-6"> <div class="form-group row">
<input type="text" class="form-control" id="remark"> <label for="docIdApp" class="col-sm-2 col-form-label">APP端log</label>
<div class="col-sm-6">
<EF:EFUpload ename="docIdApp" cname="APP上传" docTag="hk_fileApp" path="A"/>
<div class="side-header" id="app-img" style="background-color: whitesmoke">
<img src="${ctx}/hpjx-logo.png" style="width:200px;height:55px;background-image: none;" alt="app端log"/>
</div> </div>
</div> </div>
<input type="hidden" id="type" value="insert"> <input type="hidden" id="APPfileDocId" value="">
<input type="hidden" id="id" value=""> </div>
<input type="hidden" id="companyCode" value=""> <div class="form-group row">
<div class="form-group col-md-6 col-sm-6 col-sm-offset-9"> <label for="remark" class="col-sm-2 col-form-label col-form-label-sm">备注</label>
<button type="button" onclick="save()" class="btn btn-info">确认</button> <div class="col-sm-6">
<textarea id="remark" class="form-control" placeholder="备注" aria-label="备注"></textarea>
</div> </div>
</form> </div>
<input type="hidden" id="type" value="insert">
<input type="hidden" id="id" value="">
<input type="hidden" id="companyCode" value="">
<div class="form-group col-md-6 col-sm-6 col-sm-offset-9">
<button type="button" onclick="save()" class="btn btn-primary">确认</button>
</div>
</form>
</EF:EFWindow> </EF:EFWindow>
<EF:EFWindow id="updateGroup" top="100px" left="280px" width="58%" height="80%"> <EF:EFWindow id="updateGroup" top="100px" left="280px" width="58%" height="80%">
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
<EF:EFPage title="销售管理"> <EF:EFPage title="销售管理">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/> <EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/> <EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
...@@ -65,4 +64,43 @@ ...@@ -65,4 +64,43 @@
<EF:EFColumn ename="remark" cname="备注"/> <EF:EFColumn ename="remark" cname="备注"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="detail" title="明细信息">
<EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="lv" cname="层级" defaultValue="2" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" hidden="true"/>
<EF:EFColumn ename="parentId" cname="上级部件名称" enable="false" hidden="true"/>
<EF:EFColumn ename="parentPrdtName" cname="上级部件名称" enable="false" hidden="true"/>
<EF:EFColumn ename="status" cname="提交状态" enable="false" hidden="true"/>
<EF:EFColumn ename="pgStatus" cname="派工状态" enable="false" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center" hidden="true"/>
<EF:EFComboColumn ename="prdtType" cname="部件类型" align="center" required="true"
filter="contains" width="90" enable="false" hidden="true">
<EF:EFOptions blockId="codeset_code_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="prdtCode" cname="部件编码" hidden='true'/>
<EF:EFColumn ename="prdtName" cname="部件名称" width="140" align="center" maxLength="50" required="true"/>
<EF:EFColumn ename="length" cname="长(MM)" width="80" format="{0:N3}" maxLength="12" displayType="0.000"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置9位整数和3位小数!"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="80" format="{0:N3}" maxLength="12" displayType="0.000"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置9位整数和3位小数!"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="80" format="{0:N3}" maxLength="12" displayType="0.000"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置9位整数和3位小数!"/>
<EF:EFColumn ename="deliveryDate" cname="交货日期" width="100" editType="date" required='true' align="center"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="num" cname="数量" maxLength="15" displayType="0.000" format="{0:N0}" required="true"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/" defaultValue="0"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!"/>
<EF:EFColumn ename="unitWt" format="{0:N3}" cname="单重(T)" maxLength="15" displayType="0.000" required="true"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/" defaultValue="0" hidden = "true"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}" defaultValue="0" hidden="true"/>
<EF:EFColumn ename="remark" cname="备注" />
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage> </EF:EFPage>
...@@ -182,7 +182,9 @@ $(function () { ...@@ -182,7 +182,9 @@ $(function () {
item['prdtType'] = 3; item['prdtType'] = 3;
} }
//item['id'] = null //item['id'] = null
item['status'] = 0;
}); });
}, },
/** /**
* 点击Grid保存按钮时触发的事件 * 点击Grid保存按钮时触发的事件
...@@ -710,7 +712,7 @@ function openUploadFile(id) { ...@@ -710,7 +712,7 @@ function openUploadFile(id) {
*/ */
function showUploadFile(id) { function showUploadFile(id) {
JSColorbox.open({ JSColorbox.open({
href: "HPSC002A?methodName=initLoad&inqu_status-0-bizType=WL&inqu_status-0-id=" + id, href: "HPSC002A?methodName=initLoad&inqu_status-0-bizType=WL&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件清单</div>", title: "<div style='text-align: center;'>附件清单</div>",
width: "80%", width: "80%",
height: "80%", height: "80%",
...@@ -792,8 +794,8 @@ function saveFunc() { ...@@ -792,8 +794,8 @@ function saveFunc() {
flag = false; flag = false;
return; return;
} }
if(isBlank(unitWt)){ if(!isPositiveNumber(unitWt)){
message("选中的第"+(index+1)+"行\"单重\",不能为空!"); message("选中的第"+(index+1)+"行\"单重\"必须是大于0的数");
flag = false; flag = false;
return false; return false;
} }
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<EF:EFOption label="未提交" value="0"/> <EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/> <EF:EFOption label="已提交" value="1"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFInput ename="inqu_status-0-projId" hidden="true"/>
</div> </div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%> <%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion> </EF:EFRegion>
...@@ -43,7 +44,7 @@ ...@@ -43,7 +44,7 @@
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override"> <EF:EFGrid blockId="result" autoDraw="override">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="level" cname="层级" hidden="true"/> <EF:EFColumn ename="lv" cname="层级" hidden="true"/>
<EF:EFColumn enable="false" ename="pgStatus" hidden="true" cname="派工状态"/> <EF:EFColumn enable="false" ename="pgStatus" hidden="true" cname="派工状态"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" hidden="true"/> <EF:EFColumn ename="projCode" cname="项目编码" enable="false" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" hidden="true"/> <EF:EFColumn ename="projName" cname="项目名称" enable="false" hidden="true"/>
...@@ -69,12 +70,10 @@ ...@@ -69,12 +70,10 @@
<EF:EFColumn enable="false" ename="parentPrdtName" hidden="true" cname="上级部件名称"/> <EF:EFColumn enable="false" ename="parentPrdtName" hidden="true" cname="上级部件名称"/>
<EF:EFColumn ename="num" cname="数量" maxLength="15" displayType="0.000" format="{0:N0}" <EF:EFColumn ename="num" cname="数量" maxLength="15" displayType="0.000" format="{0:N0}"
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位小数!"/>
required="true"/> <EF:EFColumn ename="unitWt" format="{0:N3}" cname="单重(KG)" maxLength="15" displayType="0.000"
<EF:EFColumn ename="unitWt" format="{0:N3}" cname="单重(T)" 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位小数!"/>
required="true"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" 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=" "
......
...@@ -32,6 +32,7 @@ $(function () { ...@@ -32,6 +32,7 @@ $(function () {
$(window).load(function () { $(window).load(function () {
// 初始化查询 // 初始化查询
query(); query();
}); });
/** /**
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true" align="center" width="100" hidden="true"/> <EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true" align="center" width="100" hidden="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true" width="100"/> <EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true" width="100"/>
<EF:EFColumn ename="deliveryDate" cname="交货日期" width="100" align="center" enable="false" <EF:EFColumn ename="deliveryDate" cname="交货日期" width="100" align="center" enable="false"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" hidden="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" width="100" editType="date" <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" width="100" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required='true'/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required='true'/>
<EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" width="80" readonly="true" align="center"/> <EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" width="80" readonly="true" align="center"/>
...@@ -67,11 +67,11 @@ ...@@ -67,11 +67,11 @@
<EF:EFColumn enable="false" ename="spec" cname="规格" align="center" readonly="true"/> <EF:EFColumn enable="false" ename="spec" cname="规格" align="center" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/> <EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn enable="false" ename="num" readonly="true" width="80" align="right" cname="数量" format="{0:N0}"/> <EF:EFColumn enable="false" ename="num" readonly="true" width="80" align="right" cname="数量" format="{0:N0}"/>
<EF:EFColumn enable="false" ename="unitWt" readonly="true" width="80" align="right" cname="单重(T)"/> <EF:EFColumn enable="false" ename="unitWt" readonly="true" width="80" align="right" cname="单重(KG)"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" width="80" align="right" enable="false"/> <EF:EFColumn ename="totalWt" cname="总重(T)" width="80" align="right" enable="false"/>
<%--<EF:EFColumn ename="planCommentDate" required='true' cname="计划开始时间" width="100" editType="date" <%--<EF:EFColumn ename="planCommentDate" required='true' cname="计划开始时间" width="100" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>--%> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>--%>
<EF:EFColumn ename="planCompletionDate" required='true' cname="计划结束时间" width="100" editType="date" <EF:EFColumn ename="planCompletionDate" required='true' cname="计划完成日期" width="100" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="actualCompletionDate" cname="完成时间" editType="date" dateFormat="yyyy/MM/dd" width="100" <EF:EFColumn ename="actualCompletionDate" cname="完成时间" editType="date" dateFormat="yyyy/MM/dd" width="100"
enable="false"/> enable="false"/>
......
...@@ -391,7 +391,7 @@ function reqDetails(projCode) { ...@@ -391,7 +391,7 @@ function reqDetails(projCode) {
} }
function showUploadFile(id) { function showUploadFile(id) {
JSColorbox.open({ JSColorbox.open({
href: "HPSC002A?methodName=initLoad&inqu_status-0-bizType=XL&inqu_status-0-id=" + id, href: "HPSC002A?methodName=initLoad&inqu_status-0-bizType=XL&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件清单</div>", title: "<div style='text-align: center;'>附件清单</div>",
width: "80%", width: "80%",
height: "80%", height: "80%",
......
...@@ -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