Commit ece82da3 by 宋祥

Merge branch 'dev-sx' of http://129.211.46.84:8800/platform/hg-smart into master-dc

parents eac7088a 72e7632e
...@@ -122,7 +122,7 @@ public enum DdynamicEnum { ...@@ -122,7 +122,7 @@ public enum DdynamicEnum {
* 用途:存货档案下拉框,带id名称等信息 * 用途:存货档案下拉框,带id名称等信息
* 编写: * 编写:
*/ */
PRODUCT_BLOCK_ID("product_block_id","inventCode","inventName","id","inventType","length","width","thick","inventTypeDetail", "spec","HGPZ005.queryProductComboBox"), PRODUCT_BLOCK_ID("product_block_id","inventCode","inventName","id","inventType","length","width","thick","inventTypeDetail", "spec","inventSource","HGPZ005.queryProductComboBox"),
/** /**
* 模块:存货档案(ALL) * 模块:存货档案(ALL)
* 用途:存货档案下拉框 * 用途:存货档案下拉框
......
...@@ -344,6 +344,19 @@ public class HGConstant { ...@@ -344,6 +344,19 @@ public class HGConstant {
/** /**
* *
* 产品来源
* @author:jhs
* @date:2024/10/25,15:18
*/
public static class InventSource {
// 加工
public static final Integer JG = 1;
// 外购
public static final Integer WG = 2;
}
/**
*
* 出库单数据来源 * 出库单数据来源
* @author:songx * @author:songx
* @date:2024/5/15,15:18 * @date:2024/5/15,15:18
......
...@@ -48,6 +48,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -48,6 +48,7 @@ public class HGPZ005 extends DaoEPBase {
public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/ public static final String FIELD_UPDATED_TIME = "updatedTime"; /* 更新时间*/
public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/ public static final String FIELD_DELETE_FLAG = "deleteFlag"; /* 是否删除0.否1.是*/
public static final String FIELD_FLOW_ID = "flowId"; public static final String FIELD_FLOW_ID = "flowId";
public static final String FIELD_INVENT_SOURCE = "inventSource"; /* 物料来源 1加工 2外购*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 帐套编码*/ public static final String COL_ACCOUNT_CODE = "ACCOUNT_CODE"; /* 帐套编码*/
...@@ -111,6 +112,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -111,6 +112,7 @@ public class HGPZ005 extends DaoEPBase {
private String updatedTime = " "; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private Integer deleteFlag = 0; /* 是否删除0.否1.是*/ private Integer deleteFlag = 0; /* 是否删除0.否1.是*/
private Long flowId = new Long(0); /*工艺流程ID*/ private Long flowId = new Long(0); /*工艺流程ID*/
private Integer inventSource; /* 物料来源 1加工 2外购*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -223,6 +225,10 @@ public class HGPZ005 extends DaoEPBase { ...@@ -223,6 +225,10 @@ public class HGPZ005 extends DaoEPBase {
eiColumn.setDescName("存货类型明细"); eiColumn.setDescName("存货类型明细");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_INVENT_SOURCE);
eiColumn.setDescName("物料来源 1加工 2外购");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -585,6 +591,14 @@ public class HGPZ005 extends DaoEPBase { ...@@ -585,6 +591,14 @@ public class HGPZ005 extends DaoEPBase {
this.inventTypeDetail = inventTypeDetail; this.inventTypeDetail = inventTypeDetail;
} }
public Integer getInventSource() {
return inventSource;
}
public void setInventSource(Integer inventSource) {
this.inventSource = inventSource;
}
/** /**
* 用于材料计划对比物料数据库是否存在不同,存在时就新录入一条 * 用于材料计划对比物料数据库是否存在不同,存在时就新录入一条
* @param o * @param o
...@@ -653,6 +667,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -653,6 +667,7 @@ public class HGPZ005 extends DaoEPBase {
setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag)); setDeleteFlag(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_DELETE_FLAG)), deleteFlag));
setFlowId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_FLOW_ID)), flowId)); setFlowId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_FLOW_ID)), flowId));
setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail)); setInventTypeDetail(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE_DETAIL)), inventTypeDetail));
setInventSource(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_SOURCE)), inventSource));
} }
/** /**
...@@ -685,6 +700,7 @@ public class HGPZ005 extends DaoEPBase { ...@@ -685,6 +700,7 @@ public class HGPZ005 extends DaoEPBase {
map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG))); map.put(FIELD_DELETE_FLAG, StringUtils.toString(deleteFlag, eiMetadata.getMeta(FIELD_DELETE_FLAG)));
map.put(FIELD_FLOW_ID, StringUtils.toString(flowId, eiMetadata.getMeta(FIELD_FLOW_ID))); map.put(FIELD_FLOW_ID, StringUtils.toString(flowId, eiMetadata.getMeta(FIELD_FLOW_ID)));
map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL))); map.put(FIELD_INVENT_TYPE_DETAIL,StringUtils.toString(inventTypeDetail, eiMetadata.getMeta(FIELD_INVENT_TYPE_DETAIL)));
map.put(FIELD_INVENT_SOURCE, StringUtils.toString(inventSource, eiMetadata.getMeta(FIELD_INVENT_SOURCE)));
return map; return map;
} }
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
UPDATED_NAME as "updatedName", <!-- 更新人名称 --> UPDATED_NAME as "updatedName", <!-- 更新人名称 -->
UPDATED_TIME as "updatedTime", <!-- 更新时间 --> UPDATED_TIME as "updatedTime", <!-- 更新时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 --> DELETE_FLAG as "deleteFlag", <!-- 是否删除0.否1.是 -->
FLOW_ID as "flowId" FLOW_ID as "flowId",
INVENT_SOURCE as "inventSource" <!-- 物料来源 1加工 2外购 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
<!-- 存货档案去除权限限制 <!-- 存货档案去除权限限制
...@@ -131,6 +132,9 @@ ...@@ -131,6 +132,9 @@
<isNotEmpty prepend=" AND " property="processCode"> <isNotEmpty prepend=" AND " property="processCode">
INVENT_CODE IN (SELECT INVENT_CODE FROM ${hggpSchema}.HGPZ005A WHERE PROCESS_CODE = #processCode#) INVENT_CODE IN (SELECT INVENT_CODE FROM ${hggpSchema}.HGPZ005A WHERE PROCESS_CODE = #processCode#)
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventSource">
INVENT_SOURCE = #inventSource#
</isNotEmpty>
</sql> </sql>
<select id="query" parameterClass="java.util.HashMap" resultClass="HGPZ005"> <select id="query" parameterClass="java.util.HashMap" resultClass="HGPZ005">
...@@ -178,9 +182,10 @@ ...@@ -178,9 +182,10 @@
UPDATED_NAME, <!-- 更新人名称 --> UPDATED_NAME, <!-- 更新人名称 -->
UPDATED_TIME, <!-- 更新时间 --> UPDATED_TIME, <!-- 更新时间 -->
DELETE_FLAG, <!-- 是否删除0.否1.是 --> DELETE_FLAG, <!-- 是否删除0.否1.是 -->
FLOW_ID FLOW_ID,
INVENT_SOURCE
) )
VALUES (#id#, #accountCode#, #depCode#, #inventType#, #inventTypeDetail#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #material#, #coefficient#, #unit#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#,#flowId#) VALUES (#id#, #accountCode#, #depCode#, #inventType#, #inventTypeDetail#, #inventCode#, #inventName#, #spec#, #length#, #width#, #thick#, #material#, #coefficient#, #unit#, #status#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#,#flowId#,#inventSource#)
<selectKey resultClass="java.lang.Long" keyProperty="id"> <selectKey resultClass="java.lang.Long" keyProperty="id">
SELECT MAX(ID) FROM ${hggpSchema}.HGPZ005 SELECT MAX(ID) FROM ${hggpSchema}.HGPZ005
</selectKey> </selectKey>
...@@ -214,7 +219,8 @@ ...@@ -214,7 +219,8 @@
UPDATED_NAME = #updatedName#, <!-- 更新人名称 --> UPDATED_NAME = #updatedName#, <!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#, <!-- 更新时间 --> UPDATED_TIME = #updatedTime#, <!-- 更新时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 --> DELETE_FLAG = #deleteFlag#, <!-- 是否删除0.否1.是 -->
FLOW_ID = #flowId# FLOW_ID = #flowId#,
INVENT_SOURCE = #inventSource#
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
...@@ -266,7 +272,8 @@ ...@@ -266,7 +272,8 @@
ifnull(THICK,0) as "thick", <!-- 厚 --> ifnull(THICK,0) as "thick", <!-- 厚 -->
STATUS as "status", STATUS as "status",
ifnull(COEFFICIENT,0) as "coefficient", <!-- 系数 --> ifnull(COEFFICIENT,0) as "coefficient", <!-- 系数 -->
INVENT_TYPE_DETAIL as "inventTypeDetail" INVENT_TYPE_DETAIL as "inventTypeDetail",
INVENT_SOURCE as "inventSource" <!-- 物料来源 1加工 2外购 -->
FROM ${hggpSchema}.HGPZ005 FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
...@@ -284,7 +291,7 @@ ...@@ -284,7 +291,7 @@
ORDER BY INVENT_CODE ORDER BY INVENT_CODE
</select> </select>
<select id="queryProductComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap"> <select id="queryProductComboBox" parameterClass="java.util.HashMap" resultClass="HGPZ005">
SELECT DISTINCT SELECT DISTINCT
a.ID as "id", a.ID as "id",
a.INVENT_TYPE as "inventType", a.INVENT_TYPE as "inventType",
...@@ -295,7 +302,8 @@ ...@@ -295,7 +302,8 @@
a.THICK as "thick", <!-- 厚 --> a.THICK as "thick", <!-- 厚 -->
b.PAR_INVENT_TYPE as "parInventType", b.PAR_INVENT_TYPE as "parInventType",
b.INVENT_TYPE_DETAIL as "inventTypeDetail", b.INVENT_TYPE_DETAIL as "inventTypeDetail",
a.SPEC as "spec" <!-- 规格 --> a.SPEC as "spec", <!-- 规格 -->
a.INVENT_SOURCE as "inventSource" <!-- 物料来源 1加工 2外购 -->
FROM ${hggpSchema}.HGPZ005 a FROM ${hggpSchema}.HGPZ005 a
left join ${hggpSchema}.hgpz004 b on a.INVENT_TYPE = b.INVENT_TYPE and b.STATUS=1 and b.DELETE_FLAG = 0 left join ${hggpSchema}.hgpz004 b on a.INVENT_TYPE = b.INVENT_TYPE and b.STATUS=1 and b.DELETE_FLAG = 0
WHERE a.DELETE_FLAG = 0 WHERE a.DELETE_FLAG = 0
...@@ -346,7 +354,8 @@ ...@@ -346,7 +354,8 @@
THICK AS "thick" , <!-- 厚 --> THICK AS "thick" , <!-- 厚 -->
COEFFICIENT AS "coefficient", <!-- 系数 --> COEFFICIENT AS "coefficient", <!-- 系数 -->
ID AS "id", ID AS "id",
INVENT_TYPE_DETAIL as "inventTypeDetail" INVENT_TYPE_DETAIL as "inventTypeDetail",
INVENT_SOURCE as "inventSource" <!-- 物料来源 1加工 2外购 -->
FROM ${hggpSchema}.HGPZ005 FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
AND STATUS = 1 AND STATUS = 1
......
...@@ -63,6 +63,8 @@ public class HGSC004A extends DaoEPBase { ...@@ -63,6 +63,8 @@ public class HGSC004A extends DaoEPBase {
public static final String FIELD_UNIT = "unit"; /* 单位*/ public static final String FIELD_UNIT = "unit"; /* 单位*/
public static final String FIELD_proj_code_prefix = "projCodePrefix"; /* 项目编码前缀*/ public static final String FIELD_proj_code_prefix = "projCodePrefix"; /* 项目编码前缀*/
public static final String FIELD_proj_name_prefix = "projNamePrefix"; /* 项目名称前缀*/ public static final String FIELD_proj_name_prefix = "projNamePrefix"; /* 项目名称前缀*/
public static final String FIELD_invent_source = "inventSource"; /* 物料来源 1加工 2外购*/
public static final String COL_id = "id"; /* 主键*/ public static final String COL_id = "id"; /* 主键*/
public static final String COL_company_code = "company_code"; /* 公司编码(预留)*/ public static final String COL_company_code = "company_code"; /* 公司编码(预留)*/
...@@ -160,6 +162,7 @@ public class HGSC004A extends DaoEPBase { ...@@ -160,6 +162,7 @@ public class HGSC004A extends DaoEPBase {
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 修改人名称*/ private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private Integer inventSource; /* 物料来源 1加工 2外购*/
@ExcelAnno(index = 4) @ExcelAnno(index = 4)
private String material = " "; /* 材质*/ private String material = " "; /* 材质*/
@ExcelAnno(index = 11) @ExcelAnno(index = 11)
...@@ -400,6 +403,10 @@ public class HGSC004A extends DaoEPBase { ...@@ -400,6 +403,10 @@ public class HGSC004A extends DaoEPBase {
eiColumn = new EiColumn(FIELD_proj_name_prefix); eiColumn = new EiColumn(FIELD_proj_name_prefix);
eiColumn.setDescName("项目名称缩写"); eiColumn.setDescName("项目名称缩写");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_invent_source);
eiColumn.setDescName("物料来源 1加工 2外购");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -959,6 +966,14 @@ public class HGSC004A extends DaoEPBase { ...@@ -959,6 +966,14 @@ public class HGSC004A extends DaoEPBase {
this.projNamePrefix = projNamePrefix; this.projNamePrefix = projNamePrefix;
} }
public Integer getInventSource() {
return inventSource;
}
public void setInventSource(Integer inventSource) {
this.inventSource = inventSource;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -1007,6 +1022,7 @@ public class HGSC004A extends DaoEPBase { ...@@ -1007,6 +1022,7 @@ public class HGSC004A extends DaoEPBase {
setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit)); setUnit(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_UNIT)), unit));
setProjCodePrefix(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_code_prefix)), projCodePrefix)); setProjCodePrefix(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_code_prefix)), projCodePrefix));
setProjNamePrefix(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_name_prefix)), projNamePrefix)); setProjNamePrefix(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_proj_name_prefix)), projNamePrefix));
setInventSource(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_invent_source)), inventSource));
} }
/** /**
...@@ -1056,6 +1072,7 @@ public class HGSC004A extends DaoEPBase { ...@@ -1056,6 +1072,7 @@ public class HGSC004A extends DaoEPBase {
map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT))); map.put(FIELD_UNIT, StringUtils.toString(unit, eiMetadata.getMeta(FIELD_UNIT)));
map.put(FIELD_proj_code_prefix, StringUtils.toString(projCodePrefix, eiMetadata.getMeta(FIELD_proj_code_prefix))); map.put(FIELD_proj_code_prefix, StringUtils.toString(projCodePrefix, eiMetadata.getMeta(FIELD_proj_code_prefix)));
map.put(FIELD_proj_name_prefix, StringUtils.toString(projNamePrefix, eiMetadata.getMeta(FIELD_proj_name_prefix))); map.put(FIELD_proj_name_prefix, StringUtils.toString(projNamePrefix, eiMetadata.getMeta(FIELD_proj_name_prefix)));
map.put(FIELD_invent_source, StringUtils.toString(inventSource, eiMetadata.getMeta(FIELD_invent_source)));
return map; return map;
} }
} }
...@@ -54,6 +54,7 @@ public class HGSC004B extends DaoEPBase { ...@@ -54,6 +54,7 @@ public class HGSC004B extends DaoEPBase {
public static final String FIELD_updated_by = "updatedBy"; /* 更新人*/ public static final String FIELD_updated_by = "updatedBy"; /* 更新人*/
public static final String FIELD_updated_name = "updatedName"; /* 修改人名称*/ public static final String FIELD_updated_name = "updatedName"; /* 修改人名称*/
public static final String FIELD_updated_time = "updatedTime"; /* 更新时间*/ public static final String FIELD_updated_time = "updatedTime"; /* 更新时间*/
public static final String FIELD_invent_source = "inventSource"; /* 物料来源 1加工 2外购*/
public static final String COL_id = "id"; /* 主键*/ public static final String COL_id = "id"; /* 主键*/
public static final String COL_material_detail_id = "material_detail_id"; /* 物料明细id*/ public static final String COL_material_detail_id = "material_detail_id"; /* 物料明细id*/
...@@ -126,6 +127,7 @@ public class HGSC004B extends DaoEPBase { ...@@ -126,6 +127,7 @@ public class HGSC004B extends DaoEPBase {
private String updatedBy = " "; /* 更新人*/ private String updatedBy = " "; /* 更新人*/
private String updatedName = " "; /* 修改人名称*/ private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 更新时间*/ private String updatedTime = " "; /* 更新时间*/
private Integer inventSource; /* 物料来源 1加工 2外购*/
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -319,7 +321,9 @@ public class HGSC004B extends DaoEPBase { ...@@ -319,7 +321,9 @@ public class HGSC004B extends DaoEPBase {
eiColumn.setDescName("更新时间"); eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_invent_source);
eiColumn.setDescName("物料来源 1加工 2外购");
eiMetadata.addMeta(eiColumn);
} }
/** /**
...@@ -793,7 +797,13 @@ public class HGSC004B extends DaoEPBase { ...@@ -793,7 +797,13 @@ public class HGSC004B extends DaoEPBase {
public void setThick(BigDecimal thick) { public void setThick(BigDecimal thick) {
this.thick = thick; this.thick = thick;
} }
public Integer getInventSource() {
return inventSource;
}
public void setInventSource(Integer inventSource) {
this.inventSource = inventSource;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -834,6 +844,7 @@ public class HGSC004B extends DaoEPBase { ...@@ -834,6 +844,7 @@ public class HGSC004B extends DaoEPBase {
setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_length)), length)); setLength(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_length)), length));
setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_width)), width)); setWidth(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_width)), width));
setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_thick)), thick)); setThick(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_thick)), thick));
setInventSource(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_invent_source)), inventSource));
} }
/** /**
...@@ -873,6 +884,7 @@ public class HGSC004B extends DaoEPBase { ...@@ -873,6 +884,7 @@ public class HGSC004B extends DaoEPBase {
map.put(FIELD_length, StringUtils.toString(length, eiMetadata.getMeta(FIELD_length))); map.put(FIELD_length, StringUtils.toString(length, eiMetadata.getMeta(FIELD_length)));
map.put(FIELD_width, StringUtils.toString(width, eiMetadata.getMeta(FIELD_width))); map.put(FIELD_width, StringUtils.toString(width, eiMetadata.getMeta(FIELD_width)));
map.put(FIELD_thick, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_thick))); map.put(FIELD_thick, StringUtils.toString(thick, eiMetadata.getMeta(FIELD_thick)));
map.put(FIELD_invent_source, StringUtils.toString(inventSource, eiMetadata.getMeta(FIELD_invent_source)));
return map; return map;
} }
......
...@@ -292,6 +292,8 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -292,6 +292,8 @@ public class ServiceHGSC004A extends ServiceBase {
// 全部提交后,发送计划 // 全部提交后,发送计划
Map<String,Object> mapA = new HashMap<>(); Map<String,Object> mapA = new HashMap<>();
mapA.put("materialId",hgsc004.getId()); mapA.put("materialId",hgsc004.getId());
//加工的才生成生产计划
mapA.put("inventSource", HGConstant.InventSource.JG);
hgsc004AList = dao.query(HGSC004A.QUERY_BY_MATERIAL_ID,mapA, 0, -999999); hgsc004AList = dao.query(HGSC004A.QUERY_BY_MATERIAL_ID,mapA, 0, -999999);
List<HGSC005A> hgsc005AList = new LinkedList<>(); List<HGSC005A> hgsc005AList = new LinkedList<>();
for(HGSC004A hgsc004A : hgsc004AList){ for(HGSC004A hgsc004A : hgsc004AList){
...@@ -337,12 +339,19 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -337,12 +339,19 @@ public class ServiceHGSC004A extends ServiceBase {
delHgsc005a.setTechFlowId(delHgpz005.getFlowId()); delHgsc005a.setTechFlowId(delHgpz005.getFlowId());
} }
HGSCTools.THGSC005A.delete(delHgsc005a); HGSCTools.THGSC005A.delete(delHgsc005a);
if(hgsc004A.getInventSource().intValue() == HGConstant.InventSource.JG){
//变更生产计划 //变更生产计划
HGSCTools.THGSC005A.update(hgsc005a); HGSCTools.THGSC005A.update(hgsc005a);
}else{ }else{
//如果是外购需要删除生产计划
HGSCTools.THGSC005A.delete(hgsc005a);
}
}else{
if(hgsc004A.getInventSource().intValue() == HGConstant.InventSource.JG){
hgsc005AList.add(hgsc005a); hgsc005AList.add(hgsc005a);
} }
} }
}
if(hgsc005AList != null && !hgsc005AList.isEmpty()){ if(hgsc005AList != null && !hgsc005AList.isEmpty()){
HGSCTools.THGSC005A.saveList(hgsc005AList); HGSCTools.THGSC005A.saveList(hgsc005AList);
} }
...@@ -420,7 +429,7 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -420,7 +429,7 @@ public class ServiceHGSC004A extends ServiceBase {
try { try {
List<DdynamicEnum> list = new ArrayList<>(); List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.PRODUCT_BLOCK_ID); list.add(DdynamicEnum.PRODUCT_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false); CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), true);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询存货档案失败"); LogUtils.setDetailMsg(inInfo, e, "查询存货档案失败");
} }
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
product_code as "productCode", <!-- 产品编号 --> product_code as "productCode", <!-- 产品编号 -->
product_name as "productName", <!-- 产品名称 --> product_name as "productName", <!-- 产品名称 -->
invent_type as "inventType", <!-- 档案类型 --> invent_type as "inventType", <!-- 档案类型 -->
invent_source as "inventSource", <!-- 物料来源 1加工 2外购 -->
spec as "spec", <!-- 规格 --> spec as "spec", <!-- 规格 -->
length as "length", <!-- 长 --> length as "length", <!-- 长 -->
width as "width", <!-- 宽 --> width as "width", <!-- 宽 -->
...@@ -145,6 +146,9 @@ ...@@ -145,6 +146,9 @@
<isNotEmpty prepend=" AND " property="thick"> <isNotEmpty prepend=" AND " property="thick">
thick = #thick# thick = #thick#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="inventSource">
invent_source = #inventSource#
</isNotEmpty>
</sql> </sql>
...@@ -220,6 +224,7 @@ ...@@ -220,6 +224,7 @@
a.product_code as "productCode", <!-- 产品编号 --> a.product_code as "productCode", <!-- 产品编号 -->
a.product_name as "productName", <!-- 产品名称 --> a.product_name as "productName", <!-- 产品名称 -->
a.invent_type as "inventType", <!-- 档案类型 --> a.invent_type as "inventType", <!-- 档案类型 -->
a.invent_source as "inventSource", <!-- 物料来源 1加工 2外购 -->
a.spec as "spec", a.spec as "spec",
a.length as "length", <!-- 长 --> a.length as "length", <!-- 长 -->
a.width as "width", <!-- 宽 --> a.width as "width", <!-- 宽 -->
...@@ -354,6 +359,7 @@ ...@@ -354,6 +359,7 @@
product_code, <!-- 产品编号 --> product_code, <!-- 产品编号 -->
product_name, <!-- 产品名称 --> product_name, <!-- 产品名称 -->
invent_type, <!-- 档案类型 --> invent_type, <!-- 档案类型 -->
invent_source, <!-- 物料来源 1加工 2外购 -->
product_status, <!-- 产品状态 0:未提交,1:已提交 --> product_status, <!-- 产品状态 0:未提交,1:已提交 -->
change_type, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 --> change_type, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity, <!-- 数量 --> quantity, <!-- 数量 -->
...@@ -374,7 +380,7 @@ ...@@ -374,7 +380,7 @@
) )
VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#, VALUES (#id#, #companyCode#, #companyName#, #depCode#, #depName#, #projCode#, #projName#,
#parentProdCode#, #parentProdName#,#leaf#,#sort#,#lv#, #materialId#, #productId#,#productType#, #parentProdCode#, #parentProdName#,#leaf#,#sort#,#lv#, #materialId#, #productId#,#productType#,
#productCode#, #productName#,#inventType#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#, #productCode#, #productName#,#inventType#,#inventSource#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #totalWeight#,
#approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#,
#updatedName#, #updatedTime#, #spec#, #length#, #width#, #thick#) #updatedName#, #updatedTime#, #spec#, #length#, #width#, #thick#)
<selectKey resultClass="java.lang.Long" keyProperty="id"> <selectKey resultClass="java.lang.Long" keyProperty="id">
...@@ -406,6 +412,7 @@ ...@@ -406,6 +412,7 @@
product_code = #productCode#, <!-- 产品编号 --> product_code = #productCode#, <!-- 产品编号 -->
product_name = #productName#, <!-- 产品名称 --> product_name = #productName#, <!-- 产品名称 -->
invent_type = #inventType#, <!-- 档案类型 --> invent_type = #inventType#, <!-- 档案类型 -->
invent_source = #inventSource#, <!-- 物料来源 1加工 2外购 -->
spec = #spec#, spec = #spec#,
length = #length#, <!-- 长 --> length = #length#, <!-- 长 -->
width = #width#, <!-- 宽 --> width = #width#, <!-- 宽 -->
......
...@@ -113,6 +113,7 @@ ...@@ -113,6 +113,7 @@
product_code as "productCode", <!-- 产品编号 --> product_code as "productCode", <!-- 产品编号 -->
product_name as "productName", <!-- 产品名称 --> product_name as "productName", <!-- 产品名称 -->
invent_type as "inventType", <!-- 档案类型 --> invent_type as "inventType", <!-- 档案类型 -->
invent_source as "inventSource", <!-- 物料来源 1加工 2外购 -->
product_type as "productType", <!-- 产品类别 --> product_type as "productType", <!-- 产品类别 -->
length as "length", <!-- 长 --> length as "length", <!-- 长 -->
width as "width", <!-- 宽 --> width as "width", <!-- 宽 -->
...@@ -166,6 +167,7 @@ ...@@ -166,6 +167,7 @@
product_name, <!-- 产品名称 --> product_name, <!-- 产品名称 -->
product_type, <!-- 产品类别 --> product_type, <!-- 产品类别 -->
invent_type, <!-- 档案类型 --> invent_type, <!-- 档案类型 -->
invent_source, <!-- 物料来源 1加工 2外购 -->
product_status, <!-- 产品状态 0:未提交,1:已提交 --> product_status, <!-- 产品状态 0:未提交,1:已提交 -->
change_type, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 --> change_type, <!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
quantity, <!-- 数量 --> quantity, <!-- 数量 -->
...@@ -185,7 +187,7 @@ ...@@ -185,7 +187,7 @@
) )
VALUES (#id#,#materialDetailId#, #productId#, #companyCode#, #companyName#, #depCode#, #depName#, VALUES (#id#,#materialDetailId#, #productId#, #companyCode#, #companyName#, #depCode#, #depName#,
#projCode#, #projName#, #parentProdCode#, #parentProdName#, #materialId#, #projCode#, #projName#, #parentProdCode#, #parentProdName#, #materialId#,
#productCode#, #productName#,#productType#,#inventType#, #productStatus#, #changeType#, #quantity#, #singleWeight#, #productCode#, #productName#,#productType#,#inventType#,#inventSource#, #productStatus#, #changeType#, #quantity#, #singleWeight#,
#totalWeight#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#, #totalWeight#, #approvalStatus#, #accountCode#, #createdBy#, #createdName#, #createdTime#,
#updatedBy#, #updatedName#, #updatedTime#, #length#, #width#, #thick#) #updatedBy#, #updatedName#, #updatedTime#, #length#, #width#, #thick#)
</insert> </insert>
...@@ -212,6 +214,7 @@ ...@@ -212,6 +214,7 @@
product_code = #productCode#, <!-- 产品编号 --> product_code = #productCode#, <!-- 产品编号 -->
product_name = #productName#, <!-- 产品名称 --> product_name = #productName#, <!-- 产品名称 -->
invent_type = #inventType#, <!-- 档案类型 --> invent_type = #inventType#, <!-- 档案类型 -->
invent_source = #inventSource#, <!-- 物料来源 1加工 2外购 -->
length = #length#, <!-- 长 --> length = #length#, <!-- 长 -->
width = #width#, <!-- 宽 --> width = #width#, <!-- 宽 -->
thick = #thick#, <!-- 厚 --> thick = #thick#, <!-- 厚 -->
......
...@@ -35,34 +35,34 @@ ...@@ -35,34 +35,34 @@
from hggp.hgsc004 h from hggp.hgsc004 h
join ( join (
select select
h.id , -- 主键 --> h.id , <!-- 主键 -->
h.company_code , -- 公司编码(预留) --> h.company_code , <!-- 公司编码(预留) -->
h.company_name , -- 公司名称(预留) --> h.company_name , <!-- 公司名称(预留) -->
h.proj_code , -- 项目编码(预留) --> h.proj_code , <!-- 项目编码(预留) -->
h.proj_name , -- 项目名称(预留) --> h.proj_name , <!-- 项目名称(预留) -->
h.parent_prod_code , -- 父节点-产品编码 --> h.parent_prod_code , <!-- 父节点-产品编码 -->
h.parent_prod_name , -- 父节点-产品名称 --> h.parent_prod_name , <!-- 父节点-产品名称 -->
h.material_id , -- 物料清单id --> h.material_id , <!-- 物料清单id -->
h.product_id , -- 产品id --> h.product_id , <!-- 产品id -->
h.product_type , -- 产品类别 --> h.product_type , <!-- 产品类别 -->
h.product_code , -- 产品编号 --> h.product_code , <!-- 产品编号 -->
h.product_name , -- 产品名称 --> h.product_name , <!-- 产品名称 -->
h.invent_type , -- 档案类型 --> h.invent_type , <!-- 档案类型 -->
h.spec , -- 规格 --> h.spec , <!-- 规格 -->
h.length , -- 长 --> h.length , <!-- 长 -->
h.width , -- 宽 --> h.width , <!-- 宽 -->
h.thick , -- 厚 --> h.thick , <!-- 厚 -->
h.quantity , -- 数量 --> h.quantity , <!-- 数量 -->
h.single_weight , -- 单重 --> h.single_weight , <!-- 单重 -->
h.total_weight , -- 总重 --> h.total_weight , <!-- 总重 -->
h.approval_status , -- 审批状态 0:待审;1:审核中;2:已审 --> h.approval_status , <!-- 审批状态 0:待审;1:审核中;2:已审 -->
h.leaf , -- 是否有叶子节点 --> h.leaf , <!-- 是否有叶子节点 -->
h.sort , -- 排序字段 --> h.sort , <!-- 排序字段 -->
h.lv , -- 层级 --> h.lv , <!-- 层级 -->
k.DEPOSIT_DATE , -- 入库日期 --> k.DEPOSIT_DATE , <!-- 入库日期 -->
k.INV_QTY , -- 数量 --> k.INV_QTY , <!-- 数量 -->
k.INV_UNIT_WEIGHT , -- 单重 --> k.INV_UNIT_WEIGHT , <!-- 单重 -->
k.INV_WEIGHT -- 重量 --> k.INV_WEIGHT <!-- 重量 -->
from hggp.hgsc004a h from hggp.hgsc004a h
left join hggp.hgkc003 k on h.company_code = k.COMPANY_CODE and h.proj_code = k.PROJ_CODE left join hggp.hgkc003 k on h.company_code = k.COMPANY_CODE and h.proj_code = k.PROJ_CODE
and h.product_code = k.PRDT_CODE and h.product_code = k.PRDT_CODE
...@@ -92,42 +92,42 @@ ...@@ -92,42 +92,42 @@
) ha on h.id = ha.material_id ) ha on h.id = ha.material_id
join ( join (
select select
h.id , -- 主键 --> h.id ,<!-- 主键 -->
h.company_code , -- 公司编码(预留) --> h.company_code ,<!-- 公司编码(预留) -->
h.company_name , -- 公司名称(预留) --> h.company_name ,<!-- 公司名称(预留) -->
h.proj_code , -- 项目编码(预留) --> h.proj_code ,<!-- 项目编码(预留) -->
h.proj_name , -- 项目名称(预留) --> h.proj_name ,<!-- 项目名称(预留) -->
h.parent_prod_code , -- 父节点-产品编码 --> h.parent_prod_code ,<!-- 父节点-产品编码 -->
h.parent_prod_name , -- 父节点-产品名称 --> h.parent_prod_name ,<!-- 父节点-产品名称 -->
h.material_id , -- 物料清单id --> h.material_id ,<!-- 物料清单id -->
h.product_id , -- 产品id --> h.product_id ,<!-- 产品id -->
h.product_type , -- 产品类别 --> h.product_type ,<!-- 产品类别 -->
h.product_code , -- 产品编号 --> h.product_code ,<!-- 产品编号 -->
h.product_name , -- 产品名称 --> h.product_name ,<!-- 产品名称 -->
h.invent_type , -- 档案类型 --> h.invent_type ,<!-- 档案类型 -->
h.spec , -- 规格 --> h.spec ,<!-- 规格 -->
h.length , -- 长 --> h.length ,<!-- 长 -->
h.width , -- 宽 --> h.width ,<!-- 宽 -->
h.thick , -- 厚 --> h.thick ,<!-- 厚 -->
h.quantity , -- 数量 --> h.quantity ,<!-- 数量 -->
h.single_weight , -- 单重 --> h.single_weight ,<!-- 单重 -->
h.total_weight , -- 总重 --> h.total_weight ,<!-- 总重 -->
h.approval_status , -- 审批状态 0:待审;1:审核中;2:已审 --> h.approval_status ,<!-- 审批状态 0:待审;1:审核中;2:已审 -->
h.leaf , -- 是否有叶子节点 --> h.leaf ,<!-- 是否有叶子节点 -->
h.sort , -- 排序字段 --> h.sort ,<!-- 排序字段 -->
h.lv , -- 层级 --> h.lv , <!-- 层级 -->
k.RECEIPT_DATE , -- 入库日期 --> k.RECEIPT_DATE ,<!-- 入库日期 -->
k.INV_QTY , -- 数量 --> k.INV_QTY ,<!-- 数量 -->
k.INV_WEIGHT -- 重量 --> k.INV_WEIGHT<!-- 重量 -->
from hggp.hgsc004a h from hggp.hgsc004a h
left join ( left join (
select select
k.COMPANY_CODE , k.COMPANY_CODE ,
k.PROJ_CODE , k.PROJ_CODE ,
k1.RECEIPT_DATE , -- 入库日期 --> k1.RECEIPT_DATE ,<!-- 入库日期 -->
k.INVENT_CODE , k.INVENT_CODE ,
sum(k.INV_QTY) as INV_QTY, -- 数量 --> sum(k.INV_QTY) as INV_QTY,<!-- 数量 -->
sum(k.INV_WEIGHT) as INV_WEIGHT -- 重量 --> sum(k.INV_WEIGHT) as INV_WEIGHT<!-- 重量 -->
from hggp.hgkc008a k from hggp.hgkc008a k
join hggp.hgkc008 k1 on k.RECEIVE_ID = k1.id join hggp.hgkc008 k1 on k.RECEIVE_ID = k1.id
where k.DELETE_FLAG = 0 where k.DELETE_FLAG = 0
......
...@@ -245,7 +245,7 @@ public class HGSCTools { ...@@ -245,7 +245,7 @@ public class HGSCTools {
* @return * @return
*/ */
public static HGSC001 getByCode(String code) { public static HGSC001 getByCode(String code) {
AssertUtils.isNull(code, "项目Code不能为空!"); AssertUtils.isEmpty(code, "项目Code不能为空!");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put(HGSC001.FIELD_proj_code, code); queryMap.put(HGSC001.FIELD_proj_code, code);
queryMap.put("notAuth", true); queryMap.put("notAuth", true);
...@@ -259,7 +259,7 @@ public class HGSCTools { ...@@ -259,7 +259,7 @@ public class HGSCTools {
* @return * @return
*/ */
public static HGSC001 queryByCode(String code) { public static HGSC001 queryByCode(String code) {
AssertUtils.isNull(code, "项目Code不能为空!"); AssertUtils.isEmpty(code, "项目Code不能为空!");
List<HGSC001> results = DaoBase.getInstance().query(HGSC001.QUERY, new HashMap<String, Object>() { List<HGSC001> results = DaoBase.getInstance().query(HGSC001.QUERY, new HashMap<String, Object>() {
{ {
put("projCode", code); put("projCode", code);
......
...@@ -300,6 +300,9 @@ ...@@ -300,6 +300,9 @@
type: 'category', type: 'category',
data: this.getByProcessWtList, data: this.getByProcessWtList,
axisLabel: { axisLabel: {
show:true,
fontSize: '10px',
interval: 0,
textStyle: { textStyle: {
color: '#ffffff' // 设置y轴标签字体颜色为白色 color: '#ffffff' // 设置y轴标签字体颜色为白色
} }
......
...@@ -42,6 +42,9 @@ ...@@ -42,6 +42,9 @@
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
filter="contains"> filter="contains">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="inventSource" cname="产品来源" width="80" enable="true" align="center" readonly="false" required="true">
<EF:EFCodeOption codeName="hggp.pz.inventSource"/>
</EF:EFComboColumn>
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/> <EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" required="true"/> <EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" required="true"/>
<EF:EFColumn ename="spec" cname="规格" width="140" align="center" maxLength="50"/> <EF:EFColumn ename="spec" cname="规格" width="140" align="center" maxLength="50"/>
......
...@@ -394,6 +394,7 @@ $(function () { ...@@ -394,6 +394,7 @@ $(function () {
resultGrid.setCellValue(e.items[0],"thick",productCodeBox[i]['param5Field']); resultGrid.setCellValue(e.items[0],"thick",productCodeBox[i]['param5Field']);
resultGrid.setCellValue(e.items[0],"productType",productCodeBox[i]['param6Field']); resultGrid.setCellValue(e.items[0],"productType",productCodeBox[i]['param6Field']);
resultGrid.setCellValue(e.items[0],"spec",productCodeBox[i]['param7Field']); resultGrid.setCellValue(e.items[0],"spec",productCodeBox[i]['param7Field']);
resultGrid.setCellValue(e.items[0],"inventSource",productCodeBox[i]['param8Field']);
} }
} }
} }
......
...@@ -57,6 +57,9 @@ ...@@ -57,6 +57,9 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="productCode" required="true" cname="产品编号" /> <EF:EFColumn ename="productCode" required="true" cname="产品编号" />
<EF:EFColumn ename="productName" cname="产品名称" width="120" align="center" enable="false"/> <EF:EFColumn ename="productName" cname="产品名称" width="120" align="center" enable="false"/>
<EF:EFComboColumn ename="inventSource" cname="产品来源" width="80" enable="false" align="center" readonly="false" required="true">
<EF:EFCodeOption codeName="hggp.pz.inventSource"/>
</EF:EFComboColumn>
<EF:EFColumn ename="spec" cname="规格" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/> <EF:EFColumn ename="spec" cname="规格" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/> <EF:EFColumn ename="length" cname="长(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/> <EF:EFColumn ename="width" cname="宽(MM)" width="100" align="right" format="{0:N2}" maxLength="10" enable="false"/>
......
...@@ -22,11 +22,11 @@ $(function () { ...@@ -22,11 +22,11 @@ $(function () {
let inventType = option.model['inventType']; let inventType = option.model['inventType'];
if (inventType){ if (inventType){
return _.filter(inventRecordBox, function (item) { return _.filter(inventRecordBox, function (item) {
return item["param3Field"]==inventType && item["param1Field"]=='1'; return item["param3Field"]==inventType;
}) })
}else { }else {
return _.filter(inventRecordBox, function (item) { return _.filter(inventRecordBox, function (item) {
return item["param1Field"]=='1'; return item;
}) })
} }
}, },
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
<style> <style>
table{ table{
border-color: #99d2ff; border-color: #99d2ff;
min-width: 100%;
} }
table tr{ table tr{
......
$(function () { $(function () {
let inInfo = new EiInfo();
$("#QUERY").on("click", () => { $("#QUERY").on("click", () => {
inInfo.set("inqu_status-0-companyCode",$("#inqu_status-0-companyCode").val());
inInfo.set("inqu_status-0-contractDate",$("#inqu_status-0-contractDate").val())
inInfo.set("inqu_status-0-contractCode",$("#inqu_status-0-contractCode").val())
inInfo.set("inqu_status-0-supCode",$("#inqu_status-0-supCode").val())
vue.onLoading() vue.onLoading()
}); });
...@@ -28,126 +24,165 @@ $(function () { ...@@ -28,126 +24,165 @@ $(function () {
return { return {
columns: [ columns: [
{ {
label:"委外加工单", label:"物料清单(一级物料)",
tableType:'th', tableType:'th',
colspan:9 colspan:12
}, },
{ {
label:"委外出库单", label:"生产入库单",
tableType:'th', tableType:'th',
colspan:3 colspan:4
}, },
{ {
label:"委外加工单", label:"物料清单(二级物料)",
tableType:'th', tableType:'th',
colspan:5 colspan:8
}, },
{ {
label:"委外入库单", label:"生产领料单",
tableType:'th', tableType:'th',
colspan:3 colspan:4
}, },
], ],
columns2:[ columns2:[
{ {
label:'公司编号',
value:'companyCode',
show: false
},
{
label:'公司名称', label:'公司名称',
value:'companyName' value:'companyName'
}, },
{ {
label:'委外加工日期', label:'项目编码',
value:'contractDate' value:'projCode'
}, },
{ {
label:'委外加工单号', label:'项目名称',
value:'contractCode' value:'projName'
}, },
{ {
label:'供应商名称', label:'产品编码',
value:'supName' value:'productCode'
}, },
{ {
label:'材料编码', label:'产品名称',
value:'lcinventCode' value:'productName'
}, },
{ {
label:'材料名称', label:'规格',
value:'lcinventName' value:'spec'
}, },
{ {
label:'材料规格', label:'长度',
value:'lcspec' value:'length'
}, },
{ {
label:'计划出库数量', label:'宽度',
value:'jhckQty' value:'width'
}, },
{ {
label:'计划出库重量', label:'厚度',
value:'jhckWeight' value:'thick'
}, },
{ {
label:'出库日期', label:'数量',
value:'outDate' value:'quantity'
}, },
{ {
label:'实际出库数量', label:'单重',
value:'sjckoutQty' value:'singleWeight'
}, },
{ {
label:'实际出库重量', label:'总重',
value:'sjckoutWeight' value:'totalWeight'
}, },
{ {
label:'成品编码', label:'入库日期',
value:'productCode' value:'depositDate'
}, },
{ {
label:'成品名称', label:'数量',
value:'productName' value:'invQty'
}, },
{ {
label:'成品规格', label:'单重',
value:'rkspec' value:'invUnitWeight'
}, },
{ {
label:'计划入库数量', label:'量',
value:'jhrkdepositQty' value:'invWeight'
}, },
{ {
label:'计划入库重量', label:'材料编码',
value:'jhrkdepositWeight' value:'clproductCode'
}, },
{ {
label:'入库日期', label:'材料名称',
value:'depositDate' value:'clproductName'
},
{
label:'规格',
value:'clspec'
}, },
{ {
label:'实际入库数量', label:'长度',
value:'actualQty' value:'cllength'
}, },
{ {
label:'实际入库重量', label:'宽度',
value:'depositWeight' value:'clwidth'
},
{
label:'厚度',
value:'clthick'
},
{
label:'数量',
value:'clquantity'
},
{
label:'总重',
value:'cltotalWeight'
},
{
label:'领料日期',
value:'receiptDate'
},
{
label:'数量',
value:'llinvQty'
},
{
label:'重量',
value:'llinvWeight'
},
{
label:'成材率',
value:'ccl'
} }
], ],
list:[] list:[]
} }
}, },
mounted(){ mounted(){
this.onLoading();
}, },
methods:{ methods:{
onLoading(){ onLoading(){
let that = this; let that = this;
IPLAT.EiCommunicator.send('HGSC012', 'query', inInfo, { let inInfo = new EiInfo();
inInfo.set("inqu_status-0-companyCode",$("#inqu_status-0-companyCode").val());
inInfo.set("inqu_status-0-contractDate",$("#inqu_status-0-projName").val())
inInfo.set("inqu_status-0-contractCode",$("#inqu_status-0-productName").val())
IPLAT.EiCommunicator.send('HGSC013', 'query', inInfo, {
onSuccess: (res) => { onSuccess: (res) => {
if(res.extAttr.result && res.extAttr.result.length){ if(res.extAttr.result && res.extAttr.result.length){
that.list = []; that.list = [];
let list = res.extAttr.result.map(item => { let list = res.extAttr.result.map(item => {
return { return {
...item, ...item,
contractDate: item.contractDate? dayjs(item.contractDate).format('YYYY-MM-DD'):'',
outDate: item.outDate? dayjs(item.outDate).format('YYYY-MM-DD'):'',
depositDate: item.depositDate? dayjs(item.depositDate).format('YYYY-MM-DD'):'' depositDate: item.depositDate? dayjs(item.depositDate).format('YYYY-MM-DD'):''
} }
}).map(item =>{ }).map(item =>{
...@@ -163,126 +198,77 @@ $(function () { ...@@ -163,126 +198,77 @@ $(function () {
}); });
let contractCodeObj = {} let contractCodeObj = {}
list.forEach(item =>{ list.forEach(item =>{
contractCodeObj[item.contractCode.value] = ''; let valStr = item.companyCode.value+item.projCode.value+item.clproductCode.value
contractCodeObj[valStr] = '';
}) })
let contractCodeList = Object.keys(contractCodeObj); let contractCodeList = Object.keys(contractCodeObj);
let arr1 = contractCodeList.map(val => { let arr1 = contractCodeList.map(val => {
let a = list.filter(val2 => val2.contractCode.value === val); let a = list.filter(val2 =>{
let val2Str = val2.companyCode.value+val2.projCode.value+val2.clproductCode.value
return val2Str === val
});
let obj2 ={} let obj2 ={}
a.forEach(item2 => { a.forEach(item2 => {
obj2[item2.lcinventCode.value] = ''; obj2[item2.productCode.value] = '';
}); });
let bList = Object.keys(obj2) let bList = Object.keys(obj2)
let Elist = bList.map(item3 => { let Elist = bList.map(item3 => {
let b = a.filter(val2 => val2.lcinventCode.value === item3); return a.filter(val2 => val2.productCode.value === item3);
return b;
}) })
if(Elist.length){ if(Elist.length){
let fList = []; let fList = [];
Elist.forEach(val4 => { Elist.forEach(val4 => {
if(val4.length){
let g = val4.map((val5,i4) => { let g = val4.map((val5,i4) => {
return { return {
...val5, ...val5,
lcinventCode:{ productCode:{
...val5.lcinventCode, ...val5.productCode,
rowspan: val4.length, rowspan: val4.length,
show: !i4 show: !i4
}, },
lcinventName:{ productName:{
...val5.lcinventName, ...val5.productName,
rowspan: val4.length, rowspan: val4.length,
show: !i4 show: !i4
}, },
lcspec:{ spec:{
...val5.lcspec, ...val5.spec,
rowspan: val4.length, rowspan: val4.length,
show: !i4 show: !i4
}, },
jhckQty:{ length:{
...val5.jhckQty, ...val5.length,
rowspan: val4.length, rowspan: val4.length,
show: !i4 show: !i4
}, },
jhckWeight:{ width:{
...val5.jhckWeight, ...val5.width,
rowspan: val4.length, rowspan: val4.length,
show: !i4 show: !i4
}, },
outDate:{ thick:{
...val5.outDate, ...val5.thick,
rowspan: val4.length, rowspan: val4.length,
show: !i4 show: !i4
}, },
sjckoutQty:{ quantity:{
...val5.sjckoutQty, ...val5.quantity,
rowspan: val4.length, rowspan: val4.length,
show: !i4 show: !i4
}, },
sjckoutWeight:{ singleWeight:{
...val5.sjckoutWeight, ...val5.singleWeight,
rowspan: val4.length, rowspan: val4.length,
show: !i4 show: !i4
}, },
} totalWeight:{
}) ...val5.totalWeight,
rowspan: val4.length,
show: !i4
let productCodeObj = {}
g.forEach(item3 =>{
productCodeObj[item3.productCode.value] = '';
})
let gList = Object.keys(productCodeObj)
let Hlist = gList.map(item4 => {
let d = g.filter(val7 => val7.productCode.value === item4);
return d.map((val6,i5) => {
return {
...val6,
productCode:{
...val6.productCode,
rowspan: d.length,
show: !i5
},
productName:{
...val6.productName,
rowspan: d.length,
show: !i5
},
rkspec:{
...val6.rkspec,
rowspan: d.length,
show: !i5
},
jhrkdepositQty:{
...val6.jhrkdepositQty,
rowspan: d.length,
show: !i5
},
jhrkdepositWeight:{
...val6.jhrkdepositWeight,
rowspan: d.length,
show: !i5
} }
} }
});
}) })
fList.push(...g)
let finalArr = []
Hlist.forEach(item6=>{
finalArr.push(...item6);
})
fList.push(...finalArr)
}
}) })
a = fList; a = fList;
} }
...@@ -295,18 +281,23 @@ $(function () { ...@@ -295,18 +281,23 @@ $(function () {
rowspan: a.length, rowspan: a.length,
show: !i3 show: !i3
}, },
contractDate:{ projCode:{
...val3.contractDate, ...val3.projCode,
rowspan: a.length, rowspan: a.length,
show: !i3 show: !i3
}, },
contractCode:{ projName:{
...val3.contractCode, ...val3.projName,
rowspan: a.length, rowspan: a.length,
show: !i3 show: !i3
}, },
supName:{ clproductCode:{
...val3.supName, ...val3.clproductCode,
rowspan: a.length,
show: !i3
},
clproductName:{
...val3.clproductName,
rowspan: a.length, rowspan: a.length,
show: !i3 show: !i3
} }
...@@ -316,8 +307,8 @@ $(function () { ...@@ -316,8 +307,8 @@ $(function () {
arr1.forEach(item=>{ arr1.forEach(item=>{
that.list.push(...item); that.list.push(...item);
}) })
}else{
that.list = []
} }
}, },
onFail: (err) => { onFail: (err) => {
...@@ -330,6 +321,12 @@ $(function () { ...@@ -330,6 +321,12 @@ $(function () {
} }
} }
}) })
$(window).load(function () {
// 查
vue.onLoading()
});
}); });
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<style> <style>
table{ table{
border-color: #99d2ff; border-color: #99d2ff;
min-width: 100%;
} }
table tr{ table tr{
...@@ -61,20 +62,16 @@ ...@@ -61,20 +62,16 @@
background-color: #eff8ff; background-color: #eff8ff;
} }
</style> </style>
<EF:EFPage title="委外执行加工表"> <EF:EFPage title="产品成材率">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains"> <EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/> <EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFDatePicker blockId="inqu_status" row="0" ename="contractDate" cname="委外加工日期" role="date" <%-- <EF:EFDatePicker blockId="inqu_status" row="0" ename="contractDate" cname="委外加工日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>--%>
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="contractCode" cname="委外加工单号" placeholder="模糊查询" colWidth="3"/> <EF:EFInput blockId="inqu_status" row="0" ename="productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="supCode" cname="供应商名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="sup_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
...@@ -96,14 +93,14 @@ ...@@ -96,14 +93,14 @@
</th> </th>
</tr> </tr>
<tr> <tr>
<th v-for="(item,k) in columns2" :key="k" > <th v-for="(item,k) in columns2" :key="k" v-if="k>0">
<span>{{item.label}}</span> <span>{{item.label}}</span>
</th> </th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(valObj,i) in list" :key="i"> <tr v-for="(valObj,i) in list" :key="i">
<td v-for="(item,k) in columns2" :key="k" v-if="valObj[item.value].show" :rowspan="valObj[item.value].rowspan" :class="i/2%1?'bg-blue':''"> <td v-for="(item,k) in columns2" :key="k" v-if="valObj[item.value].show && k>0" :rowspan="valObj[item.value].rowspan" :class="i/2%1?'bg-blue':''">
<span>{{valObj[item.value].value}}</span> <span>{{valObj[item.value].value}}</span>
</td> </td>
</tr> </tr>
......
...@@ -353,6 +353,6 @@ let preview = function () { ...@@ -353,6 +353,6 @@ let preview = function () {
* @param docName * @param docName
*/ */
let showPreview = function (docId, docType, docName) { let showPreview = function (docId, docType, docName) {
let fileId = IPLATUI.EFTree.categoryTree.selectTreeNode.fileId; let fileId = IPLATUI.EFTree.docTree.selectTreeNode.fileId;
addRecordWindow(fileId, docId, docType, docName); addRecordWindow(fileId, docId, docType, docName);
} }
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