Commit 47a3711e by yukang

优化相关问题

parent ca024e16
......@@ -26,6 +26,7 @@ public class HPSC002A extends DaoEPBase {
public static final String FIELD_DEP_CODE = "depCode"; /* 部门编码 预留*/
public static final String FIELD_MAT_ID = "matId"; /* 物料ID*/
public static final String FIELD_DOC_ID = "docId"; /* 文件ID*/
public static final String FIELD_DOC_NAME = "docName"; /* 文件名称*/
public static final String FIELD_CREATED_BY = "createdBy"; /* 创建人*/
public static final String FIELD_CREATED_NAME = "createdName"; /* 创建人名称*/
public static final String FIELD_CREATED_TIME = "createdTime"; /* 创建时间*/
......@@ -39,6 +40,7 @@ public class HPSC002A extends DaoEPBase {
public static final String COL_DEP_CODE = "DEP_CODE"; /* 部门编码 预留*/
public static final String COL_MAT_ID = "MAT_ID"; /* 物料ID*/
public static final String COL_DOC_ID = "DOC_ID"; /* 文件ID*/
public static final String COL_DOC_NAME = "DOC_NAME"; /* 文件文件*/
public static final String COL_CREATED_BY = "CREATED_BY"; /* 创建人*/
public static final String COL_CREATED_NAME = "CREATED_NAME"; /* 创建人名称*/
public static final String COL_CREATED_TIME = "CREATED_TIME"; /* 创建时间*/
......@@ -65,7 +67,7 @@ public class HPSC002A extends DaoEPBase {
private String updatedName = " "; /* 修改人名称*/
private String updatedTime = " "; /* 修改时间*/
private String bizType = " "; /* 业务类型*/
private String docName = " "; /* 文件名称*/
/**
* initialize the metadata.
*/
......@@ -93,6 +95,10 @@ public class HPSC002A extends DaoEPBase {
eiColumn.setDescName("文件ID");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_DOC_NAME);
eiColumn.setDescName("文件名称");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_CREATED_BY);
eiColumn.setDescName("创建人");
eiMetadata.addMeta(eiColumn);
......@@ -212,6 +218,22 @@ public class HPSC002A extends DaoEPBase {
this.docId = docId;
}
/**
* get the docName - 文件名称.
* @return the docName
*/
public String getDocName() {
return this.getDocName();
}
/**
* set the docName - 文件名称.
*
* @param docName - 文件名称
*/
public void setDocName(String docName) {
this.docName = docName;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
......@@ -336,6 +358,7 @@ public class HPSC002A extends DaoEPBase {
setDepCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DEP_CODE)), depCode));
setMatId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAT_ID)), matId));
setDocId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_ID)), docId));
setDocName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_DOC_NAME)), docName));
setCreatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_BY)), createdBy));
setCreatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_NAME)), createdName));
setCreatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_CREATED_TIME)), createdTime));
......@@ -357,6 +380,7 @@ public class HPSC002A extends DaoEPBase {
map.put(FIELD_DEP_CODE, StringUtils.toString(depCode, eiMetadata.getMeta(FIELD_DEP_CODE)));
map.put(FIELD_MAT_ID, StringUtils.toString(matId, eiMetadata.getMeta(FIELD_MAT_ID)));
map.put(FIELD_DOC_ID, StringUtils.toString(docId, eiMetadata.getMeta(FIELD_DOC_ID)));
map.put(FIELD_DOC_NAME, StringUtils.toString(docName, eiMetadata.getMeta(FIELD_DOC_NAME)));
map.put(FIELD_CREATED_BY, StringUtils.toString(createdBy, eiMetadata.getMeta(FIELD_CREATED_BY)));
map.put(FIELD_CREATED_NAME, StringUtils.toString(createdName, eiMetadata.getMeta(FIELD_CREATED_NAME)));
map.put(FIELD_CREATED_TIME, StringUtils.toString(createdTime, eiMetadata.getMeta(FIELD_CREATED_TIME)));
......
......@@ -55,15 +55,7 @@ public class ServiceHPSC002A extends ServiceEPBase {
if (CollectionUtils.isNotEmpty(dbSc002s) || CollectionUtils.isNotEmpty(HPSC006)) {
inInfo.set("inqu_status-0-bizType", queryMap.get("bizType"));
inInfo.set("inqu_status-0-matId", queryMap.get("id"));
if (bizType.equals("WL")) {
HPSC002 dbSc002 = dbSc002s.get(0);
inInfo.set("inqu_status-0-projName", dbSc002.getProjName());
inInfo.set("inqu_status-0-prdtName", dbSc002.getPrdtName());
} else if (bizType.equals("XL")) {
HPSC006 dbSc002 = HPSC006.get(0);
inInfo.set("inqu_status-0-projName", dbSc002.getProjName());
inInfo.set("inqu_status-0-prdtName", dbSc002.getInventName());
}
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC002A().eiMetadata);
}
} catch (PlatException e) {
......
......@@ -264,12 +264,14 @@ public class ExcelUtils {
HPSC002.fromMap((Map) arrayList.get(i));
//层级2
if (HPSC002.getLv() == 2 && HPSC002.getPrdtType() != 4) {
sb.append("导入失败:数据错误"+(i+1)+"条,层级关系错误,当前层级只能导入部件清单!!");
sb.append("导入失败:数据错误"+(i+1)+"条,层级关系错误,当前层级只能导入部件清单!!");
checkStatus = true;
} else if (HPSC002.getLv() == 3 && (HPSC002.getPrdtType() != 3 || HPSC002.getPrdtType() != 5)) {
sb.append("导入失败:数据错误"+(i+1)+"条,层级关系错误,当前层级只能导入零件或耗材清单!!");
} else if (HPSC002.getLv() == 3) {
if (!(HPSC002.getPrdtType() == 3 || HPSC002.getPrdtType() == 2)) {
sb.append("导入失败:数据错误第"+(i+1)+"条,层级关系错误,当前层级只能导入零件或耗材清单!!");
checkStatus = true;
}
}
//完善数据
HPSC002.setLeaf("1");
// 计算总重
......
......@@ -78,8 +78,8 @@ $(function () {
IPLATUI.EFGrid = {
result: {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 100,200],
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
loadComplete: function (grid) { // 在Grid加载完成后,才能给Grid上的按钮绑定事件
$("#SC02").on("click", function () {
......@@ -407,6 +407,8 @@ $(function () {
NotificationUtil({msg: ei.msg, detailMsg: ei.detailMsg}, "error");
} else {
NotificationUtil(ei.msg);
var tree = $("#materialTree").data("kendoTreeView");
setTimeout(function(){ tree.reload("root");}, 500);//更新树
query();
}
},
......
......@@ -66,6 +66,7 @@ function uploadFileCallback(docId) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-matId", $("#inqu_status-0-matId").val());
inEiInfo.set("result-0-docId", docId);
inEiInfo.set("result-0-bizType", $("#inqu_status-0-bizType").val());
EiCommunicator.send('HPSC002A', 'insert', inEiInfo, {
onSuccess(response) {
resultGrid.dataSource.page(1);
......
......@@ -8,13 +8,9 @@
<EF:EFPage title="附件清单">
<EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<EF:EFInput cname="业务类型" ename="bizType" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
......
......@@ -9,13 +9,7 @@
<EF:EFRegion id="inqu" title="查询区域" type="query">
<EF:EFInput cname="物料ID" ename="matId" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3" readonly="true"/>
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"
startName="createdDateFrom" endName="createdDateTo" row="0" role="date"
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">
</EF:EFDateSpan>
<EF:EFInput cname="文件名称" ename="docName" blockId="inqu_status" row="0" colWidth="3" />
</div>
</EF:EFRegion>
......
......@@ -7,6 +7,7 @@
<EF:EFPage title="下料登记">
<EF:EFRegion id="inqu" title="订单详情">
<EF:EFInput ename="detail-0-id" type="hidden"/>
<div class="row">
<EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/>
......@@ -16,6 +17,7 @@
<EF:EFInput ename="detail-0-partName" cname="零件名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-partName" cname="零部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-inventName" cname="材料名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="计划数量" colWidth="4" readonly="true"/>
</div>
......@@ -28,20 +30,33 @@
<EF:EFInput ename="detail-0-actualCompletionUnitWt" cname="完工重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-actualCompletionTotalWt" cname="完工重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-planCompletionDate" cname="计划完成日期" colWidth="4" readonly="true"/>
<EF:EFSelect ename="detail-0-status" cname="状态" colWidth="4" readonly="true">
<EF:EFOption label="下料中" value="0"/>
<EF:EFOption label="完工" value="1"/>
<EF:EFOption label="计划中" value="0"/>
<EF:EFOption label="生产中" value="1"/>
<EF:EFOption label="已完成" value="2"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="actualCompletionDate" required='true' cname="完成日期" editType="date" dateFormat="yyyy/MM/dd" />
<EF:EFPopupColumn ename="userId" cname="完成人" popupType="ServiceGrid"
popupTitle="人员信息" serviceName="HPXSUser" methodName="queryComboBox" resultId="user_block_id"
columnEnames="textField,valueField"
columnCnames="登录名称,用户名"
backFillColumnIds="textField,valueField"
backFillFieldIds="userName,userId"
valueField="valueField" textField="valueField"/>
<EF:EFColumn ename="userName" cname="完成名称" hidden="true"/>
<EF:EFColumn ename="actualCompletionDate" cname="完成日期" enable="false" hidden="true"/>
<EF:EFColumn ename="userId" cname="完成人" enable="false" align="center"/>
<EF:EFColumn ename="actualCompletionNum" cname="完成数量" format="{0:N3}" />
<EF:EFColumn ename="totalWt" cname="分派重量" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="actualCompletionTotalWt" cname="完成重量" enable="false" format="{0:N3}"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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