Commit f3f747f1 by liuyang

Merge branch 'dev' of http://git.pseer.com:8800/platform/hg-smart into dev-ly

parents 2678361a 3f96edd4
...@@ -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)
* 用途:存货档案下拉框 * 用途:存货档案下拉框
......
...@@ -347,6 +347,19 @@ public class HGConstant { ...@@ -347,6 +347,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,10 +339,17 @@ public class ServiceHGSC004A extends ServiceBase { ...@@ -337,10 +339,17 @@ 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{
//如果是外购需要删除生产计划
HGSCTools.THGSC005A.delete(hgsc005a);
}
}else{ }else{
hgsc005AList.add(hgsc005a); if(hgsc004A.getInventSource().intValue() == HGConstant.InventSource.JG){
hgsc005AList.add(hgsc005a);
}
} }
} }
if(hgsc005AList != null && !hgsc005AList.isEmpty()){ if(hgsc005AList != null && !hgsc005AList.isEmpty()){
...@@ -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
......
...@@ -311,7 +311,7 @@ public class ServiceHGWD001D extends TreeService { ...@@ -311,7 +311,7 @@ public class ServiceHGWD001D extends TreeService {
List<Map> results = new ArrayList(); List<Map> results = new ArrayList();
String userId = UserSessionUtils.getLoginName(); String userId = UserSessionUtils.getLoginName();
// 查询项目来源 // 查询项目来源
HGSC001 dbSc001 = HGSCTools.Hgsc001.queryByCode(projCode); HGSC001 dbSc001 = HGSCTools.Hgsc001.getByCode(projCode);
// true:需要权限 // true:需要权限
boolean isSourceAuth = !ProjectSourceEnum.SPARE.getCode().equals(dbSc001.getProjectSource()); boolean isSourceAuth = !ProjectSourceEnum.SPARE.getCode().equals(dbSc001.getProjectSource());
Map queryMap = new HashMap(); Map queryMap = new HashMap();
......
...@@ -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"/>
......
...@@ -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{
......
...@@ -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>
......
...@@ -95,27 +95,23 @@ $(function () { ...@@ -95,27 +95,23 @@ $(function () {
IPLATUI.EFTree = { IPLATUI.EFTree = {
"categoryTree": { "categoryTree": {
query: function (inInfo, model) { query: function (inInfo, model) {
if (model == null) {
return inInfo;
}
let label = model.label;
// 选中树节点
selectTreeId(label);
// 设置选中节点
treeSelectClick(model);
inInfo.set("inqu_status-0-projCode", $("#inqu_status-0-projCode").val()); inInfo.set("inqu_status-0-projCode", $("#inqu_status-0-projCode").val());
return inInfo; return inInfo;
}, },
select: function (e) { select: function (e) {
var _data = this.dataItem(e.node); let nodeData = this.dataItem(e.node);
var labelValue = _data.label; // 设置选中节点
var typeValue = _data.type; treeSelectClick(nodeData);
const eNameValue = _data.ename;
setTreeNodeValue(_data);
$("[name = 'inqu_status-0-parentId']").val(labelValue);
$("[name = 'inqu_status-0-fileId']").val(eNameValue);
$("[name = 'inqu_status-0-leafLevel']").val(_data.leafLevel==null?0:_data.leafLevel);
$("[name = 'inqu_status-0-projCode']").val(_data.projCode);
$("[name = 'inqu_status-0-type']").val(typeValue);
$("[name = 'inqu_status-0-fileName']").val(_data.text);
$("[name = 'inqu_status-0-leafType']").val(_data.leafType);
resultGrid.dataSource.page(1);
// 编辑、删除树节点时,需要刷新的树节点 // 编辑、删除树节点时,需要刷新的树节点
$("[name = 'inqu_status-0-orgParentId']").val(_data.parentId); $("[name = 'inqu_status-0-orgParentId']").val(nodeData.parentId);
// 显示授权按钮
showAuthButton();
}, },
/*ROOT:{label: 'root',text: '组织机构'},*/ /*ROOT:{label: 'root',text: '组织机构'},*/
template: function (node) { template: function (node) {
...@@ -683,42 +679,27 @@ function expandTreeNodeList(tree, nodeIdList) { ...@@ -683,42 +679,27 @@ function expandTreeNodeList(tree, nodeIdList) {
} }
/** /**
* 选中对应的树节点
* @param tree
* @param treeOrgId
*/
const selectTreeNode = (tree, treeOrgId) => {
if (!tree || treeOrgId == null) {
return
}
setTimeout(() => {
let barDataItem = tree.dataSource.get(treeOrgId);
if (barDataItem) {
let barElement = tree.findByUid(barDataItem.uid);
// 刷新完成后选中对应的树节点
tree.select(barElement);
setTreeNodeValue(barDataItem);
} else {
selectTreeNode(tree, treeOrgId)
}
}, 100)
}
/**
* 设置树节点的值 * 设置树节点的值
* *
* @param nodeData * @param nodeData
*/ */
let setTreeNodeValue = function (nodeData) { let setTreeNodeValue = function (nodeData) {
IPLATUI.EFTree.categoryTree.selectTreeNode.fileId = nodeData.id; let leafLevel = nodeData.leafLevel == null ? 0 : nodeData.leafLevel;
IPLATUI.EFTree.categoryTree.selectTreeNode.fileId = nodeData.label;
IPLATUI.EFTree.categoryTree.selectTreeNode.parentId = nodeData.parentId; IPLATUI.EFTree.categoryTree.selectTreeNode.parentId = nodeData.parentId;
IPLATUI.EFTree.categoryTree.selectTreeNode.fileName = nodeData.text; IPLATUI.EFTree.categoryTree.selectTreeNode.fileName = nodeData.text;
IPLATUI.EFTree.categoryTree.selectTreeNode.companyCode = nodeData.companyCode; IPLATUI.EFTree.categoryTree.selectTreeNode.companyCode = nodeData.companyCode;
IPLATUI.EFTree.categoryTree.selectTreeNode.projCode = nodeData.projCode; IPLATUI.EFTree.categoryTree.selectTreeNode.projCode = nodeData.projCode;
IPLATUI.EFTree.categoryTree.selectTreeNode.leafLevel = nodeData.leafLevel; IPLATUI.EFTree.categoryTree.selectTreeNode.leafLevel = leafLevel;
IPLATUI.EFTree.categoryTree.selectTreeNode.leafType = nodeData.leafType; IPLATUI.EFTree.categoryTree.selectTreeNode.leafType = nodeData.leafType;
IPLATUI.EFTree.categoryTree.selectTreeNode.isAuth = nodeData.isAuth; IPLATUI.EFTree.categoryTree.selectTreeNode.isAuth = nodeData.isAuth;
$("[name = 'inqu_status-0-parentId']").val(nodeData.label);
$("[name = 'inqu_status-0-fileId']").val(nodeData.label);
$("[name = 'inqu_status-0-leafLevel']").val(leafLevel);
$("[name = 'inqu_status-0-projCode']").val(nodeData.projCode);
$("[name = 'inqu_status-0-type']").val(nodeData.Type);
$("[name = 'inqu_status-0-fileName']").val(nodeData.text);
$("[name = 'inqu_status-0-leafType']").val(nodeData.leafType);
} }
/** /**
...@@ -1097,3 +1078,51 @@ let isProjectManager = function (parentId) { ...@@ -1097,3 +1078,51 @@ let isProjectManager = function (parentId) {
} }
}, {async: false}) }, {async: false})
} }
/**
* 选中树节点
*
* @param treeId
*/
let selectTreeId = function (treeId) {
// 刷新树节点
const tree = $("#categoryTree").data("kendoTreeView");
// 选中的节点
selectTreeNode(tree, treeId);
}
/**
* 选中树节点
*
* @param tree
* @param treeId
*/
let selectTreeNode = (tree, treeId) => {
if (!tree || treeId == null) {
return
}
setTimeout(() => {
let barDataItem = tree.dataSource.get(treeId);
if (barDataItem) {
let barElement = tree.findByUid(barDataItem.uid);
// 刷新完成后选中对应的树节点
tree.select(barElement);
} else {
selectTreeNode(tree, treeId)
}
}, 300)
}
/**
* 树点击事件
*
* @param nodeData
*/
let treeSelectClick = function (nodeData) {
// 设置选择的树节点信息
setTreeNodeValue(nodeData);
// 显示授权按钮
showAuthButton();
// 刷新列表
query();
}
\ No newline at end of file
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