Commit dece5d6a by liuyang

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

parents 67ff52c2 74296ed6
......@@ -401,6 +401,29 @@ public class ServiceHGPZ005 extends ServiceBase {
return inInfo;
}
@OperationLogAnnotation(operModul = "存货档案", operType = "修改", operDesc = "批量绑定流程")
public EiInfo updateFlowIds(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
Map<String,Object> map = EiInfoUtils.getFirstRow(inInfo);
List<Long> ids = (List<Long>) map.get("ids");
List<HGPZ005> hgpz005List = HGPZTools.HgPz005.getIds(ids);
Map flowMap = (Map) map.get("flow");
HGSJ002 hgsj002 = new HGSJ002();
hgsj002.fromMap(flowMap);
for (HGPZ005 hgpz005 : hgpz005List) {
hgpz005.setFlowId(hgsj002.getId());
DaoUtils.update(HGPZ005.UPDATE_FLOW_ID, hgpz005);
addHgpz005a(hgpz005,hgsj002);
}
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
/**
* 添加流程详情
* @param hppz005
......
......@@ -5,6 +5,10 @@ $(function() {
// 查询
$("#QUERY").on("click", query);
$("#BATCH_FLOW").on("click", function () {
showFlowDetail();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
......@@ -257,6 +261,7 @@ function showDetail(id) {
});
}
function showFlowDetail(id,inventCode,flowId) {
JSColorbox.open({
href: "HGPZ005B?methodName=initLoad&inqu_status-0-parentId=" + id+"&inqu_status-0-inventCode="+inventCode+"&inqu_status-0-flowId="+flowId,
......@@ -267,6 +272,26 @@ function showFlowDetail(id,inventCode,flowId) {
});
}
function showFlowDetail() {
let rows = resultGrid.getCheckedRows();
let selectIds = [];
saleIds.push(rows[i]['id']);
if (rows.length < 1) {
message("请选择数据")
return;
}
$.each(rows, function(index, item) {
selectIds.push(item.get("id"));
});
JSColorbox.open({
href: "HGPZ005B?methodName=initLoad&inqu_status-0-parentIds=" + selectIds,
title: "<div style='text-align: center;'>工艺流程</div>",
width: "75%",
height: "80%",
callbackName: cllback2
});
}
/**
* 回调
*/
......@@ -291,3 +316,28 @@ function cllback(result) {
async: false
});
}
/**
* 回调
*/
function cllback2(result) {
let inEiInfo = new EiInfo();
inEiInfo.set("inqu_status-0-ids", result.ids);
inEiInfo.set("inqu_status-0-flow", result.rows);
EiCommunicator.send('HGPZ005', 'updateFlowIds', inEiInfo, {
onSuccess(ei) {
if (ei.status == "-1") {
NotificationUtil({msg: ei.msg, detailMsg: ei.detailMsg}, "error");
} else {
NotificationUtil(ei.msg);
query();
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
});
}
\ No newline at end of file
......@@ -30,28 +30,29 @@ $(function (){
}
}
return dataItem['processCode'];
},
},{
field: "processClass",
template: function (dataItem) {
for (let i = 0; i < itemCodeBox.length; i++) {
if (itemCodeBox[i]['valueField'] === dataItem['processClass']) {
return itemCodeBox[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let eiInfo = new EiInfo();
eiInfo.set("inqu_status-0-companyCode", options.model["companyCode"]);
eiInfo.set("inqu_status-0-processCode", options.model["processCode"]);
eiInfo.set("serviceName", "HGPZ005A");
eiInfo.set("methodName", "queryEdcm01");
eiInfo.set("blockId", "item_code_box_block_id");
eiInfo.set("field", options.field);
refreshSelect(container,eiInfo);
}
}
// ,{
// field: "processClass",
// template: function (dataItem) {
// for (let i = 0; i < itemCodeBox.length; i++) {
// if (itemCodeBox[i]['valueField'] === dataItem['processClass']) {
// return itemCodeBox[i]['textField'];
// }
// }
// return "";
// },
// editor: function (container, options) {
// let eiInfo = new EiInfo();
// eiInfo.set("inqu_status-0-companyCode", options.model["companyCode"]);
// eiInfo.set("inqu_status-0-processCode", options.model["processCode"]);
// eiInfo.set("serviceName", "HGPZ005A");
// eiInfo.set("methodName", "queryEdcm01");
// eiInfo.set("blockId", "item_code_box_block_id");
// eiInfo.set("field", options.field);
// refreshSelect(container,eiInfo);
// }
// }
],
loadComplete: function(grid) {},
afterEdit:function (e) {},
......@@ -105,8 +106,8 @@ let save = function (btnNode) {
$.each(rows, function(index, item) {
let processCode= item.get("processCode");
let composingCoeff= item.get("composingCoeff");
let unitCoeff= item.get("unitCoeff");
let processClass= item.get("processClass");
// let unitCoeff= item.get("unitCoeff");
// let processClass= item.get("processClass");
if(isBlank(processCode)){
message("选中的第"+(index+1)+"行\"工序名称\",不能为空!");
flag = false;
......
......@@ -50,11 +50,11 @@
displayType="0" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数!"/>
<EF:EFColumn ename="unitCoeff" cname="单价系数" width="120" enable="true" format="{0:N3}" editType="text" hidden="true"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="processClass" cname="工序分类" width="120" enable="true" align="center" required="true" hidden="true"/>
<%-- <EF:EFColumn ename="unitCoeff" cname="单价系数" width="120" enable="true" format="{0:N3}" editType="text" hidden="true"--%>
<%-- displayType="0.000" sort="true" align="right"--%>
<%-- data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"--%>
<%-- data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>--%>
<%-- <EF:EFColumn ename="processClass" cname="工序分类" width="120" enable="true" align="center" required="true" hidden="true"/>--%>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......@@ -55,22 +55,23 @@ $(function (){
$("#result").on("click", function () {
let id = $("#inqu_status-0-parentId").val();
let inventCode = $("#inqu_status-0-inventCode").val();
let flowId = $("#inqu_status-0-flowId").val();
let ids = $("#inqu_status-0-parentIds").val();
// let inventCode = $("#inqu_status-0-inventCode").val();
// let flowId = $("#inqu_status-0-flowId").val();
let rows = resultGrid.getCheckedRows();
let flag = true;
$.each(rows, function(index, item) {
let id= item.get("id");
if(id == flowId){
message("当前选中的公司流程 ["+(item.get("factoryName"))+" - "+(item.get("flowName"))+"] 已经绑定,无法重复绑定!");
flag = false;
return false;
}
});
if (flag){
parent.JSColorbox.setValueCallback({"id":id,"inventCode":inventCode,"rows":rows[0]});
// let flag = true;
// $.each(rows, function(index, item) {
// let id= item.get("id");
// if(id == flowId){
// message("当前选中的公司流程 ["+(item.get("factoryName"))+" - "+(item.get("flowName"))+"] 已经绑定,无法重复绑定!");
// flag = false;
// return false;
// }
// });
// if (flag){
parent.JSColorbox.setValueCallback({"id":id,"ids":ids,"rows":rows[0]});
parent.JSColorbox.close();
}
// }
});
})
......
......@@ -21,8 +21,9 @@
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="flowName" cname="流程名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="parentId" cname="上级ID" colWidth="3" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="inventCode" cname="存货编码" colWidth="3" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="flowId" cname="流程ID" colWidth="3" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="parentIds" cname="上级IDS" colWidth="3" type="hidden"/>
<%-- <EF:EFInput blockId="inqu_status" row="0" ename="inventCode" cname="存货编码" colWidth="3" type="hidden"/>--%>
<%-- <EF:EFInput blockId="inqu_status" row="0" ename="flowId" cname="流程ID" colWidth="3" type="hidden"/>--%>
</div>
</EF:EFRegion>
......
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