Commit 2d9d1643 by 宋祥

Merge branch 'dev-sx' of http://git.pseer.com/platform/hp-smart into dev

parents 554e11c2 ad8ae226
...@@ -12,6 +12,8 @@ import com.baosight.hpjx.hp.sc.domain.HPSC004; ...@@ -12,6 +12,8 @@ import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.sc.domain.HPSC005; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.HPSC005B; import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.tools.HPSCTools; import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.hp.xs.domain.Org;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.BeanUtils; import com.baosight.hpjx.util.BeanUtils;
import com.baosight.hpjx.util.CommonMethod; import com.baosight.hpjx.util.CommonMethod;
...@@ -27,7 +29,6 @@ import com.baosight.iplat4j.core.ei.EiConstant; ...@@ -27,7 +29,6 @@ import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException; import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import com.baosight.iplat4j.core.service.soa.XLocalManager;
import com.baosight.iplat4j.core.web.threadlocal.UserSession; import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
...@@ -297,15 +298,18 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -297,15 +298,18 @@ public class ServiceHPSC003 extends ServiceBase {
*/ */
public EiInfo qrcodePlanDetail(EiInfo inInfo) { public EiInfo qrcodePlanDetail(EiInfo inInfo) {
try { try {
// EiInfo callInfo = new EiInfo();
// callInfo.set(EiConstant.serviceName, "");
// callInfo.set(EiConstant.methodName, "");
// XLocalManager.call(callInfo);
String planInfoNo = inInfo.getString(HPSC003.FIELD_PLAN_INFO_NO); String planInfoNo = inInfo.getString(HPSC003.FIELD_PLAN_INFO_NO);
AssertUtils.isNull(planInfoNo, "计划号不能为空"); AssertUtils.isNull(planInfoNo, "计划号不能为空");
// 查询计划主信息 // 查询计划主信息
HPSC003 dbSc003 = HPSCTools.HpSc003.getByNo(planInfoNo); HPSC003 dbSc003 = HPSCTools.HpSc003.getByNo(planInfoNo);
Map dbSc003Map = dbSc003.toMap(); Map dbSc003Map = dbSc003.toMap();
// 设置厂区名称
if (StringUtils.isNotBlank(dbSc003.getFactoryCode())) {
Org org = HPXSTools.XsOrg.get(dbSc003.getFactoryCode());
dbSc003Map.put("factoryName", org.getOrgCname());
} else {
dbSc003Map.put("factoryName", "");
}
// 查询计划明细信息 // 查询计划明细信息
this.buildPlanDetail(dbSc003Map); this.buildPlanDetail(dbSc003Map);
inInfo.set("planInfo", dbSc003Map); inInfo.set("planInfo", dbSc003Map);
......
...@@ -187,7 +187,7 @@ public class SqlMapDaoLogProxy extends SqlMapDao { ...@@ -187,7 +187,7 @@ public class SqlMapDaoLogProxy extends SqlMapDao {
*/ */
private void setCompanyCode(String name, Object parameters) { private void setCompanyCode(String name, Object parameters) {
// 需要过滤部分sql name,否则会形成死循环 // 需要过滤部分sql name,否则会形成死循环
String[] serviceFilter = {"HPXSUser"}; String[] serviceFilter = {"HPXSUser", "HPPZ009.query"};
if (StringUtils.startsWithAny(name, serviceFilter)) { if (StringUtils.startsWithAny(name, serviceFilter)) {
return; return;
} }
......
...@@ -39,6 +39,16 @@ $(function () { ...@@ -39,6 +39,16 @@ $(function () {
} }
return template; return template;
} }
}, {
field: "qrcodeDocId",
template: function (item) {
if (isBlank(item.qrcodeDocId)) {
return "";
} else {
return '<img src="' + downloadHref(item.qrcodeDocId) + '" width="20px" height="20px"'
+ ' onclick="imgClick(\'' + item.qrcodeDocId + '\')" />';
}
}
}], }],
/** /**
* 翻页事件,点翻页按钮,输入页数跳转时触发 * 翻页事件,点翻页按钮,输入页数跳转时触发
...@@ -410,3 +420,26 @@ function saveDetail(btn) { ...@@ -410,3 +420,26 @@ function saveDetail(btn) {
}); });
} }
} }
/**
* 图片放大
*/
let imgClick = function (docId) {
// 图片路径
$("#bigImg").attr("src", downloadHref(docId));
$("#bigImg").css({'width': 400});
// 图片淡入
$("#back-curtain").fadeIn("fast");
// 遮罩效果
$("#back-curtain").css({
'position': 'fixed',
'overflow-y': 'auto',
'width': '100%',
'height': '100%',
'z-index': '998'
}).show();
// 点击图片或遮罩,图片淡出
$("#back-curtain").on('click', function () {
$(this).fadeOut("fast");
});
}
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn enable="false" ename="qrcodeDocId" cname="二维码" width="50" align="center"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目号" readonly="true" hidden="true"/> <EF:EFColumn enable="false" ename="projCode" cname="项目号" readonly="true" hidden="true"/>
<EF:EFColumn enable="false" ename="planInfoNo" cname="生产计划单号" readonly="true" hidden="true" width="100"/> <EF:EFColumn enable="false" ename="planInfoNo" cname="生产计划单号" readonly="true" hidden="true" width="100"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称" width="120" readonly="true"/> <EF:EFColumn enable="false" ename="projName" cname="项目名称" width="120" readonly="true"/>
...@@ -86,3 +87,9 @@ ...@@ -86,3 +87,9 @@
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
<div id="back-curtain" style="position:fixed; top:0; left:0; background:rgba(0,0,0,0.5); z-index:998; width:100%;
display:none;display: flex; justify-content: center; align-items: center;">
<img id="bigImg" src=""/>
</div>
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