Commit 567ae8c9 by liuyang

2024/03/20 1.首页页面显示模式改为单页展示

           2.用工登记添加工时
           3.组织机构添加综合组
parent 29fa244e
...@@ -10,6 +10,7 @@ public enum OrgTypeEnum { ...@@ -10,6 +10,7 @@ public enum OrgTypeEnum {
DEPT("dept", "部门"), DEPT("dept", "部门"),
PROD_GROUP("prodGroup", "生产组"), PROD_GROUP("prodGroup", "生产组"),
CUT_GROUP("cutGroup", "下料组"), CUT_GROUP("cutGroup", "下料组"),
SYN_GROUP("synGroup", "综合组"),
; ;
private String code; private String code;
......
...@@ -40,6 +40,7 @@ public class HPPZ014 extends DaoEPBase { ...@@ -40,6 +40,7 @@ public class HPPZ014 extends DaoEPBase {
public static final String FIELD_USER_ID = "userId"; /* 用户ID*/ public static final String FIELD_USER_ID = "userId"; /* 用户ID*/
public static final String FIELD_USER_NAME = "userName"; /* 用户名称*/ public static final String FIELD_USER_NAME = "userName"; /* 用户名称*/
public static final String FIELD_REG_DATE = "regDate"; /* 登记日期*/ public static final String FIELD_REG_DATE = "regDate"; /* 登记日期*/
public static final String FIELD_MAN_HOUR = "manHour"; /* 工时*/
public static final String COL_ID = "ID"; public static final String COL_ID = "ID";
public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/ public static final String COL_COMPANY_CODE = "COMPANY_CODE"; /* 企业编码*/
...@@ -59,6 +60,7 @@ public class HPPZ014 extends DaoEPBase { ...@@ -59,6 +60,7 @@ public class HPPZ014 extends DaoEPBase {
public static final String COL_USER_ID = "USER_ID"; /* 用户ID*/ public static final String COL_USER_ID = "USER_ID"; /* 用户ID*/
public static final String COL_USER_NAME = "USER_NAME"; /* 用户名称*/ public static final String COL_USER_NAME = "USER_NAME"; /* 用户名称*/
public static final String COL_REG_DATE = "REG_DATE"; /* 登记日期*/ public static final String COL_REG_DATE = "REG_DATE"; /* 登记日期*/
public static final String COL_MAN_HOUR = "MAN_HOUR"; /* 工时*/
public static final String QUERY = "HPPZ014.query"; public static final String QUERY = "HPPZ014.query";
public static final String COUNT = "HPPZ014.count"; public static final String COUNT = "HPPZ014.count";
...@@ -84,6 +86,7 @@ public class HPPZ014 extends DaoEPBase { ...@@ -84,6 +86,7 @@ public class HPPZ014 extends DaoEPBase {
private String userId = " "; /* 用户ID*/ private String userId = " "; /* 用户ID*/
private String userName = " "; /* 用户名称*/ private String userName = " "; /* 用户名称*/
private String regDate; /* 登记日期*/ private String regDate; /* 登记日期*/
private Long manHour;
/** /**
* initialize the metadata. * initialize the metadata.
...@@ -164,6 +167,12 @@ public class HPPZ014 extends DaoEPBase { ...@@ -164,6 +167,12 @@ public class HPPZ014 extends DaoEPBase {
eiColumn.setDescName("登记日期"); eiColumn.setDescName("登记日期");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_MAN_HOUR);
eiColumn.setType("N");
eiColumn.setFieldLength(20);
eiColumn.setDescName("工时");
eiMetadata.addMeta(eiColumn);
} }
...@@ -462,6 +471,15 @@ public class HPPZ014 extends DaoEPBase { ...@@ -462,6 +471,15 @@ public class HPPZ014 extends DaoEPBase {
public void setRegDate(String regDate) { public void setRegDate(String regDate) {
this.regDate = regDate; this.regDate = regDate;
} }
public Long getManHour() {
return manHour;
}
public void setManHour(Long manHour) {
this.manHour = manHour;
}
/** /**
* get the value from Map. * get the value from Map.
* *
...@@ -488,6 +506,7 @@ public class HPPZ014 extends DaoEPBase { ...@@ -488,6 +506,7 @@ public class HPPZ014 extends DaoEPBase {
setUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USER_ID)), userId)); setUserId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USER_ID)), userId));
setUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USER_NAME)), userName)); setUserName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_USER_NAME)), userName));
setRegDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REG_DATE)), regDate)); setRegDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_REG_DATE)), regDate));
setManHour(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_MAN_HOUR)), manHour));
} }
/** /**
...@@ -515,6 +534,7 @@ public class HPPZ014 extends DaoEPBase { ...@@ -515,6 +534,7 @@ public class HPPZ014 extends DaoEPBase {
map.put(FIELD_USER_ID, StringUtils.toString(userId, eiMetadata.getMeta(FIELD_USER_ID))); map.put(FIELD_USER_ID, StringUtils.toString(userId, eiMetadata.getMeta(FIELD_USER_ID)));
map.put(FIELD_USER_NAME, StringUtils.toString(userName, eiMetadata.getMeta(FIELD_USER_NAME))); map.put(FIELD_USER_NAME, StringUtils.toString(userName, eiMetadata.getMeta(FIELD_USER_NAME)));
map.put(FIELD_REG_DATE, StringUtils.toString(regDate, eiMetadata.getMeta(FIELD_REG_DATE))); map.put(FIELD_REG_DATE, StringUtils.toString(regDate, eiMetadata.getMeta(FIELD_REG_DATE)));
map.put(FIELD_MAN_HOUR, StringUtils.toString(manHour, eiMetadata.getMeta(FIELD_MAN_HOUR)));
return map; return map;
} }
......
...@@ -206,4 +206,22 @@ public class ServiceHPPZ014 extends ServiceBase { ...@@ -206,4 +206,22 @@ public class ServiceHPPZ014 extends ServiceBase {
return inInfo; return inInfo;
} }
@OperationLogAnnotation(operModul = "用工登记", operType = "修改", operDesc = "修改操作")
@Override
public EiInfo update(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) {
HPPZ014 fPz014 = new HPPZ014();
fPz014.fromMap(resultRow);
DaoUtils.update(HPPZ014.UPDATE, fPz014);
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据修改成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "修改失败");
}
return inInfo;
}
} }
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
GROUP_NAME as "groupName", <!-- 生产组名称 --> GROUP_NAME as "groupName", <!-- 生产组名称 -->
USER_ID as "userId", <!-- 用户ID --> USER_ID as "userId", <!-- 用户ID -->
USER_NAME as "userName", <!-- 用户名称 --> USER_NAME as "userName", <!-- 用户名称 -->
REG_DATE as "regDate" <!-- 登记日期 --> REG_DATE as "regDate", <!-- 登记日期 -->
MAN_HOUR as "manHour" <!-- 工时 -->
</sql> </sql>
<sql id="condition"> <sql id="condition">
...@@ -77,6 +78,9 @@ ...@@ -77,6 +78,9 @@
<isNotEmpty prepend=" AND " property="regDate"> <isNotEmpty prepend=" AND " property="regDate">
REG_DATE = #regDate# REG_DATE = #regDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="manHour">
MAN_HOUR = #manHour#
</isNotEmpty>
</sql> </sql>
<sql id="customCondition"> <sql id="customCondition">
...@@ -163,6 +167,7 @@ ...@@ -163,6 +167,7 @@
<delete id="update"> <delete id="update">
UPDATE ${hpjxSchema}.T_HPPZ014 UPDATE ${hpjxSchema}.T_HPPZ014
SET SET
MAN_HOUR = #manHour#,
<include refid="updateRevise"/> <include refid="updateRevise"/>
WHERE ID = #id# WHERE ID = #id#
</delete> </delete>
......
...@@ -53,8 +53,8 @@ public class ServiceXSOG0801A extends ServiceEPBase { ...@@ -53,8 +53,8 @@ public class ServiceXSOG0801A extends ServiceEPBase {
if (CommonConstant.Field.ROOT.equals(parentOrgId)) { if (CommonConstant.Field.ROOT.equals(parentOrgId)) {
condition = String.format(" ITEM_CODE = '%s'", OrgTypeEnum.FACTORY.getCode()); condition = String.format(" ITEM_CODE = '%s'", OrgTypeEnum.FACTORY.getCode());
} else { } else {
condition = String.format(" ITEM_CODE IN ('%s', '%s', '%s')", OrgTypeEnum.DEPT.getCode(), condition = String.format(" ITEM_CODE IN ('%s', '%s', '%s', '%s')", OrgTypeEnum.DEPT.getCode(),
OrgTypeEnum.PROD_GROUP.getCode(), OrgTypeEnum.CUT_GROUP.getCode()); OrgTypeEnum.PROD_GROUP.getCode(), OrgTypeEnum.CUT_GROUP.getCode(),OrgTypeEnum.SYN_GROUP.getCode());
} }
List<Map> orgTypes = CodeValueTools.getCodeValues(CodesetConstant.XsOg.ORG_TYPE, condition); List<Map> orgTypes = CodeValueTools.getCodeValues(CodesetConstant.XsOg.ORG_TYPE, condition);
inInfo.addBlock("orgTypeBlock").addRows(orgTypes); inInfo.addBlock("orgTypeBlock").addRows(orgTypes);
......
...@@ -171,6 +171,7 @@ ...@@ -171,6 +171,7 @@
$("#new-window-view").css("display", "none"); $("#new-window-view").css("display", "none");
$("#tab-view").css("display", "none"); $("#tab-view").css("display", "none");
} }
$(".fa-files-o").click()
}; };
......
...@@ -183,6 +183,7 @@ let checkIn = function () { ...@@ -183,6 +183,7 @@ let checkIn = function () {
let checkInCallback = function (regDate) { let checkInCallback = function (regDate) {
let inInfo = new EiInfo(); let inInfo = new EiInfo();
inInfo.set("main-0-regDate", regDate); inInfo.set("main-0-regDate", regDate);
inInfo.set("main-0-manHour","8")
JSUtils.submitGridsData("result", "HPPZ014", "checkIn", false, JSUtils.submitGridsData("result", "HPPZ014", "checkIn", false,
function (res) { function (res) {
if (res.status > -1) { if (res.status > -1) {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<EF:EFSelect cname="部门类型" blockId="inqu_status" ename="groupType" row="0" colWidth="3" filter="contains" <EF:EFSelect cname="部门类型" blockId="inqu_status" ename="groupType" row="0" colWidth="3" filter="contains"
defultValue=""> defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="xs.og.orgType" condition="ITEM_CODE IN ('prodGroup', 'cutGroup')"/> <EF:EFCodeOption codeName="xs.og.orgType" condition="ITEM_CODE IN ('prodGroup', 'cutGroup','synGroup')"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="生产部门" blockId="inqu_status" ename="groupCode" row="0" colWidth="3" filter="contains"> <EF:EFSelect cname="生产部门" blockId="inqu_status" ename="groupCode" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="groupType" cname="部门类型" width="80" align="center" required="true"> <EF:EFComboColumn ename="groupType" cname="部门类型" width="80" align="center" required="true">
<EF:EFCodeOption codeName="xs.og.orgType" condition="ITEM_CODE IN ('prodGroup', 'cutGroup')"/> <EF:EFCodeOption codeName="xs.og.orgType" condition="ITEM_CODE IN ('prodGroup', 'cutGroup', 'synGroup')"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="groupCode" cname="生产部门" width="120" align="center" required="true"/> <EF:EFColumn ename="groupCode" cname="生产部门" width="120" align="center" required="true"/>
<EF:EFComboColumn ename="gender" cname="性别" width="80" align="center" required="true" readonly="true" <EF:EFComboColumn ename="gender" cname="性别" width="80" align="center" required="true" readonly="true"
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<EF:EFSelect cname="部门类型" blockId="inqu_status" ename="groupType" row="0" colWidth="3" filter="contains" <EF:EFSelect cname="部门类型" blockId="inqu_status" ename="groupType" row="0" colWidth="3" filter="contains"
defultValue=""> defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="xs.og.orgType" condition="ITEM_CODE IN ('prodGroup', 'cutGroup')"/> <EF:EFCodeOption codeName="xs.og.orgType" condition="ITEM_CODE IN ('prodGroup', 'cutGroup', 'synGroup')"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="生产部门" blockId="inqu_status" ename="groupCode" row="0" colWidth="3" filter="contains"> <EF:EFSelect cname="生产部门" blockId="inqu_status" ename="groupCode" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFComboColumn ename="groupType" cname="部门类型" enable="false" width="80" align="center"> <EF:EFComboColumn ename="groupType" cname="部门类型" enable="false" width="80" align="center">
<EF:EFCodeOption codeName="xs.og.orgType" condition="ITEM_CODE IN ('prodGroup', 'cutGroup')"/> <EF:EFCodeOption codeName="xs.og.orgType" condition="ITEM_CODE IN ('prodGroup', 'cutGroup', 'synGroup')"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="groupName" cname="生产部门" enable="false" width="120" align="center"/> <EF:EFColumn ename="groupName" cname="生产部门" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="groupCode" cname="生产部门" enable="false" width="110" align="center" hidden="true"> <EF:EFComboColumn ename="groupCode" cname="生产部门" enable="false" width="110" align="center" hidden="true">
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
<EF:EFCodeOption codeName="xservices.xs.sex"/> <EF:EFCodeOption codeName="xservices.xs.sex"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="mobile" cname="联系方式" enable="false" width="120" align="center"/> <EF:EFColumn ename="mobile" cname="联系方式" enable="false" width="120" align="center"/>
<EF:EFColumn ename="manHour" cname="工时(小时)" enable="true" width="120" align="center"/>
<EF:EFColumn cname="创建人" ename="createdName" enable="false" align="center"/> <EF:EFColumn cname="创建人" ename="createdName" enable="false" align="center"/>
<EF:EFColumn cname="创建时间" ename="createdTime" enable="false" width="140" align="center" <EF:EFColumn cname="创建时间" ename="createdTime" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"/>
......
var pageOffset = 1; //当前主页数
$(function () { $(function () {
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
...@@ -11,7 +11,7 @@ $(function () { ...@@ -11,7 +11,7 @@ $(function () {
columns: [{ columns: [{
field: "operator", field: "operator",
template: function (item) { template: function (item) {
console.log(item) //console.log(item)
let auditStatus = item.status; let auditStatus = item.status;
let template = ''; let template = '';
if (item.matId != null) { if (item.matId != null) {
...@@ -40,6 +40,18 @@ $(function () { ...@@ -40,6 +40,18 @@ $(function () {
return template; return template;
} }
}], }],
/**
* 翻页事件,点翻页按钮,输入页数跳转时触发
* @param e 事件对象
* e.sender Grid对象
* e.page 期望翻到的页数
*/
page: function (e) {
// 禁止翻页
//e.preventDefault();
pageOffset = e.page;
console.log(e.page);
},
onSave: function (e) { onSave: function (e) {
// 阻止默认请求,使用自定义保存 // 阻止默认请求,使用自定义保存
e.preventDefault(); e.preventDefault();
...@@ -87,6 +99,12 @@ $(function () { ...@@ -87,6 +99,12 @@ $(function () {
btnNode.attr("disabled", true); btnNode.attr("disabled", true);
saveDetail(btnNode); saveDetail(btnNode);
}, },
onSuccess: function (e) {
if (e.eiInfo.extAttr.methodName == 'update'
|| e.eiInfo.extAttr.methodName == 'insert') {
query();
}
},
columns: [{ columns: [{
field: "operator", field: "operator",
title: "操作", title: "操作",
...@@ -261,8 +279,9 @@ function autoProductionschedulCallback1 () { ...@@ -261,8 +279,9 @@ function autoProductionschedulCallback1 () {
JSColorbox.close(); JSColorbox.close();
} }
let query = function () { let query = function (page) {
resultGrid.dataSource.page(1); let offset = page!=undefined?page:1;
resultGrid.dataSource.page(offset);
} }
function check_time(model,rows){ function check_time(model,rows){
...@@ -346,10 +365,12 @@ function saveDetail(btn) { ...@@ -346,10 +365,12 @@ function saveDetail(btn) {
if(flag) { if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () { ok: function () {
JSUtils.submitGridsData("detail", "HPSC003", "updatePlanDetail", true); let reslu = JSUtils.submitGridsData("detail", "HPSC003", "updatePlanDetail", true);
console.log("修改保存:"+reslu);
//释放禁用按钮 //释放禁用按钮
btn.attr("disabled", false); btn.attr("disabled", false);
query(); query(pageOffset)
} }
}); });
} }
......
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