Commit a0c18dc7 by liuyang

2024-05-17 存货档案功能优化

parent cb38f304
...@@ -16,7 +16,7 @@ $(function() { ...@@ -16,7 +16,7 @@ $(function() {
let template = ''; let template = '';
if (item.id){ if (item.id){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showFlowDetail(' + item.id + ',\''+item.inventCode+'\')" >工艺流程</a>'; + 'onclick="showFlowDetail(' + item.id + ',\''+item.inventCode+'\','+item.flowId+')" >工艺流程</a>';
if (item.flowId>0){ if (item.flowId>0){
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ')" >工艺流程详情</a>'; + 'onclick="showDetail(' + item.id + ')" >工艺流程详情</a>';
...@@ -223,9 +223,9 @@ function showDetail(id) { ...@@ -223,9 +223,9 @@ function showDetail(id) {
}); });
} }
function showFlowDetail(id,inventCode) { function showFlowDetail(id,inventCode,flowId) {
JSColorbox.open({ JSColorbox.open({
href: "HGPZ005B?methodName=initLoad&inqu_status-0-parentId=" + id+"&inqu_status-0-inventCode="+inventCode, href: "HGPZ005B?methodName=initLoad&inqu_status-0-parentId=" + id+"&inqu_status-0-inventCode="+inventCode+"&inqu_status-0-flowId="+flowId,
title: "<div style='text-align: center;'>工艺流程</div>", title: "<div style='text-align: center;'>工艺流程</div>",
width: "75%", width: "75%",
height: "80%", height: "80%",
......
...@@ -56,9 +56,21 @@ $(function (){ ...@@ -56,9 +56,21 @@ $(function (){
$("#result").on("click", function () { $("#result").on("click", function () {
let id = $("#inqu_status-0-parentId").val(); let id = $("#inqu_status-0-parentId").val();
let inventCode = $("#inqu_status-0-inventCode").val(); let inventCode = $("#inqu_status-0-inventCode").val();
let flowId = $("#inqu_status-0-flowId").val();
let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
parent.JSColorbox.setValueCallback({"id":id,"inventCode":inventCode,"rows":rows[0]}); let flag = true;
parent.JSColorbox.close(); $.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]});
parent.JSColorbox.close();
}
}); });
}) })
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<EF:EFInput blockId="inqu_status" row="0" ename="flowName" cname="流程名称" placeholder="模糊查询" colWidth="3"/> <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="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="inventCode" cname="存货编码" colWidth="3" type="hidden"/>
<EF:EFInput blockId="inqu_status" row="0" ename="flowId" cname="流程ID" colWidth="3" type="hidden"/>
</div> </div>
</EF:EFRegion> </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