Commit 321ac87f by liuyang

2024-05-14 设备台账详情

parent a818f806
......@@ -192,7 +192,7 @@ public enum DdynamicEnum {
GROUP_CODE_BOX_BLOCK_ID("groupCodeBox_block_id","orgEname","orgCname","factoryCode","factoryName","companyCode","companyName","HGSB001.queryGroupCodeBox",
new HashMap<String,Object>(){{
put(HGSB001.FIELD_ACCOUNT_CODE, UserSessionUtils.getAccountCode());
put(HGSB001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
//put(HGSB001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
put("orgTypes",new String[]{OrgTypeEnum.COMPANY.getCode(),OrgTypeEnum.FACTORY.getCode()});
}}
),
......
......@@ -35,7 +35,7 @@
company_code = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
company_name = ('%$companyName#$')
company_name = ('%$companyName$')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
dep_code = #depCode#
......@@ -47,19 +47,19 @@
proj_code = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
proj_name = ('%$projName#$')
proj_name = ('%$projName$')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="personDepName">
person_dep_name = ('%$personDepName#$')
person_dep_name = ('%$personDepName$')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="personName">
person_name = ('%$personName#$')
person_name = ('%$personName$')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="personPhone">
person_phone = ('%$personPhone#$')
person_phone = ('%$personPhone$')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="personIdCard">
person_id_card = ('%$personIdCard#$')
person_id_card = ('%$personIdCard$')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
account_code = #accountCode#
......
......@@ -35,8 +35,8 @@ public class ServiceHGSJ002A extends ServiceEPBase {
//inInfo.setCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGPZ002A.FIELD_FLOW_CODE,inInfo.get("inqu_status-0-flowCode"));
String factoryCode = inInfo.getCell(EiConstant.queryBlock,ACConstants.ROW_CODE_0,HGSJ002A.FIELD_FACTORY_CODE).toString();
inInfo = super.query(inInfo, HGSJ002A.QUERY, new HGSJ002A());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID),null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROCESS_CODE_BLOCK_ID),
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROCESS_CODE_BLOCK_ID),null);
CommonMethod.initBlock(inInfo, Arrays.asList(),
new HashMap<String,Object>(){{
//put(HGSJ002A.FIELD_FACTORY_CODE,factoryCode);
put(HGSJ002A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);}}
......
......@@ -34,10 +34,7 @@ public class ServiceHGSJ003 extends ServiceEPBase {
public EiInfo initLoad(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGSJ003.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo, HGSJ003.QUERY, new HGSJ003());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID),null);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PROCESS_CODE_BLOCK_ID),
new HashMap<String,Object>(){{put(HGSJ003.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);}}
);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.PROCESS_CODE_BLOCK_ID),null);
return inInfo;
}
......@@ -83,15 +80,20 @@ public class ServiceHGSJ003 extends ServiceEPBase {
for (int i = 0; i < resultRows.size(); i++) {
HGSJ003 hgsj003 = new HGSJ003();
hgsj003.fromMap(resultRows.get(i));
// 设置规格
if (StringUtils.isBlank(hgsj003.getSpec())) {
hgsj003.setSpec(HGSJTools.Hgsj003.jointSpec(hgsj003.getLength(), hgsj003.getWidth(), hgsj003.getThick()));
}
// 去除空格
hgsj003.setSpec(StringUtils.trimToEmpty(hgsj003.getSpec()));
if (hgsj003.getId() == null || hgsj003.getId() == 0) {
// 设置规格
if (StringUtils.isBlank(hgsj003.getSpec())) {
hgsj003.setSpec(HGSJTools.Hgsj003.jointSpec(hgsj003.getLength(), hgsj003.getWidth(), hgsj003.getThick()));
}
// 去除空格
hgsj003.setSpec(StringUtils.trimToEmpty(hgsj003.getSpec()));
this.add(hgsj003);
} else {
// 设置规格
hgsj003.setSpec(HGSJTools.Hgsj003.jointSpec(hgsj003.getLength(), hgsj003.getWidth(), hgsj003.getThick()));
// 去除空格
hgsj003.setSpec(StringUtils.trimToEmpty(hgsj003.getSpec()));
this.modify(hgsj003);
}
}
......
......@@ -33,6 +33,10 @@ $(function () {
let auditStatus = item.deviceStatus;
let template = '';
if (item.companyCode && item.groupCode) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showDetail(' + item.id + ',\''+item.companyCode+'\',\''+item.companyName+'\',\''+item.groupCode+'\',\''+item.groupName+'\',' +
'\''+item.deviceType+'\',\''+item.deviceName+'\')" >台账详情</a>';
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="updateStatus(' + item.id + ',1)" >启用</a>';
......@@ -302,6 +306,20 @@ function updateStatus(id,deviceStatus) {
);
}
/**
* 显示详情
*/
function showDetail(id,companyCode,companyName,groupCode,groupName,deviceType,deviceName) {
let url = "HGSB001A?methodName=initLoad&inqu_status-0-companyCode="+companyCode+"&inqu_status-0-companyName="+companyName+"&inqu_status-0-groupCode="+groupCode+"&inqu_status-0-groupName="+groupName+"&inqu_status-0-deviceType="+deviceType+"&inqu_status-0-deviceName="+deviceName;
//window.open(url);
JSColorbox.open({
href: url,
title: "<div style='text-align: center;'>设备台账详情</div>",
width: "80%",
height: "80%",
});
}
function loadChange(grid,e,field) {
var cell_label = field,that = grid;
// locked 表示是否为固定列
......
......@@ -42,8 +42,7 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="accountCode" cname="账套" hidden="true"/>
<%--blockName="factoryCodeBox_block_id"--%>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="80" align="center"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center"/>
<EF:EFComboColumn ename="companyCode" cname="公司名称"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
......
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