Commit d3ee5c50 by liuyang

2024-10-14 批量派工、批量改派、全部派工、全部改派选择班组页面时,增加人员明细,显示当时班组的人员明细数据,如果有差异通知行政调整人员班组信息

parent 2a4e3b7c
package com.baosight.hggp.hg.sc.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.hg.constant.HGSqlConstant;
import com.baosight.hggp.hg.sc.constant.HgScSqlConstant;
import com.baosight.hggp.hg.sc.domain.HGSC007B;
import com.baosight.hggp.hg.xs.domain.User;
import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.hggp.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/10/14
* @description
*/
public class ServiceHGSC098A extends ServiceEPBase {
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HGSC007B().eiMetadata);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询
*
* @param inInfo
* @return
*/
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
if (!queryMap.isEmpty()){
inInfo = super.query(inInfo, HGSqlConstant.HgXsUser.QUERY_BY_ORG,new User());
}
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
}
...@@ -113,6 +113,15 @@ ...@@ -113,6 +113,15 @@
<isNotEmpty prepend=" AND " property="orgId"> <isNotEmpty prepend=" AND " property="orgId">
A.ORG_ID = #orgId# A.ORG_ID = #orgId#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="userName">
C.USER_NAME like concat('%', #userName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="mobile">
C.EMAIL like concat('%', #mobile#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="gender">
C.GENDER = #gender#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="orgIds"> <isNotEmpty prepend=" AND " property="orgIds">
A.ORG_ID IN <iterate close=")" open="(" conjunction="," property="orgIds">#orgIds[]#</iterate> A.ORG_ID IN <iterate close=")" open="(" conjunction="," property="orgIds">#orgIds[]#</iterate>
</isNotEmpty> </isNotEmpty>
......
...@@ -89,8 +89,8 @@ function assign() { ...@@ -89,8 +89,8 @@ function assign() {
JSColorbox.open({ JSColorbox.open({
href: "HGSC098?methodName=initLoad&inqu_status-0-companyCode=" + companyCode + "&inqu_status-0-productType=" + productType, href: "HGSC098?methodName=initLoad&inqu_status-0-companyCode=" + companyCode + "&inqu_status-0-productType=" + productType,
title: "<div style='text-align: center;'>选择组织</div>", title: "<div style='text-align: center;'>选择组织</div>",
width: "75%", width: "90%",
height: "75%", height: "90%",
callbackName: function (row) { callbackName: function (row) {
var info = new EiInfo() var info = new EiInfo()
info.set("ids", ids.join(',')); info.set("ids", ids.join(','));
...@@ -154,8 +154,8 @@ function assignAll() { ...@@ -154,8 +154,8 @@ function assignAll() {
JSColorbox.open({ JSColorbox.open({
href: "HGSC098?methodName=initLoad&inqu_status-0-companyCode=" + companyCode + "&inqu_status-0-productType=" + productType, href: "HGSC098?methodName=initLoad&inqu_status-0-companyCode=" + companyCode + "&inqu_status-0-productType=" + productType,
title: "<div style='text-align: center;'>选择组织</div>", title: "<div style='text-align: center;'>选择组织</div>",
width: "75%", width: "90%",
height: "75%", height: "90%",
callbackName: function (row) { callbackName: function (row) {
var info = initInquStatus(); var info = initInquStatus();
info.set("orderCode",orderCode); info.set("orderCode",orderCode);
...@@ -217,8 +217,8 @@ function assignChange() { ...@@ -217,8 +217,8 @@ function assignChange() {
JSColorbox.open({ JSColorbox.open({
href: "HGSC098?methodName=initLoad&inqu_status-0-companyCode=" + companyCode + "&inqu_status-0-productType=" + productType, href: "HGSC098?methodName=initLoad&inqu_status-0-companyCode=" + companyCode + "&inqu_status-0-productType=" + productType,
title: "<div style='text-align: center;'>改派订单</div>", title: "<div style='text-align: center;'>改派订单</div>",
width: "75%", width: "90%",
height: "75%", height: "90%",
callbackName: function (row) { callbackName: function (row) {
var info = new EiInfo() var info = new EiInfo()
info.set("ids", ids.join(',')); info.set("ids", ids.join(','));
...@@ -289,8 +289,8 @@ function assignChangeAll() { ...@@ -289,8 +289,8 @@ function assignChangeAll() {
JSColorbox.open({ JSColorbox.open({
href: "HGSC098?methodName=initLoad&inqu_status-0-companyCode=" + companyCode + "&inqu_status-0-productType=" + productType, href: "HGSC098?methodName=initLoad&inqu_status-0-companyCode=" + companyCode + "&inqu_status-0-productType=" + productType,
title: "<div style='text-align: center;'>改派订单</div>", title: "<div style='text-align: center;'>改派订单</div>",
width: "75%", width: "90%",
height: "75%", height: "90%",
callbackName: function (row) { callbackName: function (row) {
var info = initInquStatus(); var info = initInquStatus();
info.set("factoryCode", row.factoryCode); info.set("factoryCode", row.factoryCode);
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" showCount="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" showCount="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="160" align="center" /> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="160" align="center" />
<EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="createdTime" editType="date" <EF:EFColumn ename="createdTime" editType="date"
......
...@@ -9,6 +9,19 @@ $(function () { ...@@ -9,6 +9,19 @@ $(function () {
pageSizes: [10, 20, 50, 70, 100], pageSizes: [10, 20, 50, 70, 100],
}, },
columns: [{ columns: [{
field: "operator",
title: "班组人员",
template: function (item) {
if (!isBlank(item.groupCode)){
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showGroupUser(\''+ item.groupCode + '\')" >查看</a>';
}else {
message("未选择班组")
return "";
}
}
}, {
field: "groupName", field: "groupName",
attributes: { attributes: {
class: "i-input-readonly" class: "i-input-readonly"
...@@ -184,3 +197,17 @@ let deleteFunc = function () { ...@@ -184,3 +197,17 @@ let deleteFunc = function () {
} }
}); });
} }
/**
* 显示班组人员明细
*
* @param orderCode
*/
function showGroupUser(id) {
JSColorbox.open({
href: "HGSC098A?methodName=initLoad&inqu_status-0-orgId=" + id+"&efParentFormEname=HGSC098",
title: "<div style='text-align: center;'>班组人员明细</div>",
width: "90%",
height: "90%",
});
}
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
<EF:EFColumn ename="createdTime" cname="派工时间" enable="false" width="100" align="center" <EF:EFColumn ename="createdTime" cname="派工时间" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="quantity" cname="分派数量" format="{0:N3}" required="true"/> <EF:EFColumn ename="quantity" cname="分派数量" format="{0:N3}" required="true"/>
<EF:EFColumn ename="operator" cname="班组人员" enable="false" width="120" align="center" />
</EF:EFGrid> </EF:EFGrid>
<br/> <br/>
<span style='color: red;font-size: 13px;'>说明:厂区和生产组仅新增的时候可以编辑</span> <span style='color: red;font-size: 13px;'>说明:厂区和生产组仅新增的时候可以编辑</span>
......
...@@ -6,11 +6,24 @@ $(function () { ...@@ -6,11 +6,24 @@ $(function () {
pageable: { pageable: {
input: true, input: true,
numeric: false, numeric: false,
pageSize: 15, pageSize: 10,
position: 'top', position: 'top',
pageSizes: [15, 50, 100, 200] pageSizes: [10, 20, 50, 100, 200]
}, },
columns: [] columns: [{
field: "operator",
title: "班组人员",
template: function (item) {
if (!isBlank(item.groupCode)){
return '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showGroupUser(\''+ item.groupCode + '\')" >查看</a>';
}else {
message("未选择班组")
return "";
}
}
}]
} }
} }
$("#CONFIRM").on("click", function () { $("#CONFIRM").on("click", function () {
...@@ -42,3 +55,17 @@ $(window).load(function () { ...@@ -42,3 +55,17 @@ $(window).load(function () {
let query = function () { let query = function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
/**
* 显示班组人员明细
*
* @param orderCode
*/
function showGroupUser(id) {
JSColorbox.open({
href: "HGSC098A?methodName=initLoad&inqu_status-0-orgId=" + id+"&efParentFormEname=HGSC098",
title: "<div style='text-align: center;'>班组人员明细</div>",
width: "90%",
height: "90%",
});
}
\ No newline at end of file
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="120" align="center" /> <EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="120" align="center" />
<EF:EFColumn ename="groupCode" cname="组织编码" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="groupCode" cname="组织编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="groupName" cname="工作组" enable="false" width="120" align="center"/> <EF:EFColumn ename="groupName" cname="工作组" enable="false" width="120" align="center"/>
<EF:EFColumn ename="operator" cname="班组人员" enable="false" width="120" align="center" />
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
$(function () {
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 10,
pageSizes: [10, 20, 50, 100, 200],
},
columns: []
}
// 查询
$("#QUERY").on("click", query);
});
/**
* 初始化
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/10/14
Time: 11:15
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<EF:EFPage title="班组人员明细">
<EF:EFRegion id="inqu" title="查询条件">
<EF:EFInput ename="orgId" cname="生产订单ID" blockId="inqu_status" row="0" type="hidden"/>
<div class="row">
<EF:EFInput ename="userName" cname="人员姓名" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput ename="mobile" cname="手机号" blockId="inqu_status" row="0" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="数据集" fitHeight="true">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="userId" cname="人员ID" enable="false" width="120" align="center"/>
<EF:EFColumn ename="userName" cname="人员名称" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="gender" cname="性别" valueField="valueField" textField="textField"
columnTemplate="#=textField#" align="center">
<EF:EFCodeOption codeName="xservices.xs.sex"/>
</EF:EFComboColumn>
<EF:EFColumn ename="mobile" cname="手机号" enable="false" width="120" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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