Commit 01b19ca4 by 宋祥

Merge branch 'dev-sx' of ssh://10.70.33.7:32359/smart/hp-smart into dev

 Conflicts:
	src/main/webapp/HP/PZ/HPPZ013.jsp
parents aeae1c07 de1c37a0
......@@ -4,6 +4,7 @@ import com.baosight.hpjx.core.constant.EPCodeConstant;
import com.baosight.hpjx.core.tools.ServletTools;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.ProjectInfo;
import com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext;
import com.baosight.xservices.xs.util.LoginUserDetails;
import org.springframework.web.servlet.HandlerInterceptor;
......@@ -29,6 +30,8 @@ public class MyHandlerInterceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object o) throws Exception {
try {
// 设置环境变量
request.setAttribute("projectEnv", ProjectInfo.getProjectEnv());
// 校验接口权限
boolean isInterfaceAuth = this.checkUserInterfaceAuth(request, response);
if (!isInterfaceAuth) {
......
......@@ -18,5 +18,9 @@
}
}
</script>
<script type="text/javascript">
let projectEnv = "${projectEnv}";
console.warn("projectEnv", projectEnv);
</script>
<script src="${ctx}/common/js/common.js"></script>
<script src="${ctx}/common/js/jsUtils.js"></script>
......@@ -16,6 +16,7 @@ spring.servlet.multipart.file-size-threshold =0
#\u9879\u76EE\u540D\u79F0
componentEname=hpjx
projectName=hpjx
moduleName=ep
projectEnv=dev
......
......@@ -76,7 +76,7 @@ $(function() {
dataItem['inventRecordId'] = '';
}
}
return dataItem['spec'];
return dataItem['spec'] == null ? "" : dataItem['spec'];
},
editor: function (container, options) {
let inInfo = new EiInfo();
......
......@@ -168,7 +168,7 @@ let checkIn = function () {
let checkInCallback = function (regDate) {
let inInfo = new EiInfo();
inInfo.set("main-0-regDate", regDate);
JSUtils.submitGridsData("result", "HPPZ014", "checkIn", true,
JSUtils.submitGridsData("result", "HPPZ014", "checkIn", false,
function (res) {
if (res.status > -1) {
// 关闭弹窗
......
......@@ -8,7 +8,7 @@
<EF:EFPage title="用工管理">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect cname="工厂" blockId="inqu_status" ename="factoryCode" row="0" colWidth="3" filter="contains">
<EF:EFSelect cname="厂区" blockId="inqu_status" ename="factoryCode" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
......@@ -40,7 +40,8 @@
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="userId" cname="工号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" width="110" align="center" defaultValue="" required="true"
<EF:EFColumn ename="userName" cname="姓名" width="120" align="center" required="true" readonly="true"/>
<EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center" defaultValue="" required="true"
filter="contains" readonly="true">
<EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
......@@ -49,7 +50,6 @@
<EF:EFCodeOption codeName="xs.og.orgType" condition="ITEM_CODE IN ('prodGroup', 'cutGroup')"/>
</EF:EFComboColumn>
<EF:EFColumn ename="groupCode" cname="生产部门" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="userName" cname="姓名" width="120" align="center" required="true" readonly="true"/>
<EF:EFComboColumn ename="gender" cname="性别" width="80" align="center" required="true" readonly="true"
valueField="valueField" textField="textField">
<EF:EFCodeOption codeName="xservices.xs.sex"/>
......
......@@ -39,6 +39,8 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="regDate" cname="登记日期" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="userId" cname="工号" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" enable="false" width="110" align="center">
<EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>
......@@ -55,8 +57,12 @@
<EF:EFCodeOption codeName="xservices.xs.sex"/>
</EF:EFComboColumn>
<EF:EFColumn ename="mobile" cname="联系方式" enable="false" width="120" align="center"/>
<EF:EFColumn ename="regDate" cname="登记日期" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn cname="创建人" ename="createdName" enable="false" align="center"/>
<EF:EFColumn cname="创建时间" ename="createdTime" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
<EF:EFColumn cname="修改人" ename="updatedName" enable="false" align="center"/>
<EF:EFColumn cname="修改时间" ename="updatedTime" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
......@@ -4,9 +4,9 @@ $(function () {
columns: [{
field: "operator",
template: function (item) {
let docId = item.docId;
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'href="' + IPLATUI.CONTEXT_PATH + '/EU/DM/EUDM06.jsp?docId=' + item.docId
+ '" >附件下载</a>';
+ 'href="' + downloadHref(docId) + '" >附件下载</a>';
return template;
}
}],
......
......@@ -64,7 +64,18 @@ function message(msg) {
title: "提示:",
content: "<div class='kendo-del-message'>" + msg + "</div>"
});
};
}
/**
* 文件下载路径
*
* @param docId
* @returns {string}
*/
function downloadHref(docId) {
return IPLATUI.CONTEXT_PATH + ("run" == projectEnv ? ('/docFileDownload/' + docId)
: ('/EU/DM/EUDM06.jsp?docId=' + docId));
}
/**
* 获取窗口宽度
......
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