Commit c036452d by liuyang

2024-06-12 宏建添加项目档案,生产计划,生产订单,生产任务,生产报工单

parent 8198a183
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants;
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.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
/**
* @author LiuYang
* @version 1.0 2024/8/9
* @description 生产订单
*/
public class ServiceHPSC104 extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产订单",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID),
new HashMap<String,Object>(){});
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005().eiMetadata);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
inInfo.setStatus(500);
}
return inInfo;
}
/**
* 查询操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产订单",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC003.FIELD_DELIVERY_DATE,
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC003.FIELD_DELIVERY_DATE)));
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC003.FIELD_PLAN_COMPLETION_DATE,
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC003.FIELD_PLAN_COMPLETION_DATE)));
inInfo = super.query(inInfo, HPSC005.QUERY, new HPSC005());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
inInfo.setStatus(500);
}
return inInfo;
}
/**
* 项目下拉框
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产订单",operType = "查询",operDesc = "项目下拉框")
public EiInfo queryProjComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.PROJ_PROD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo));
return inInfo;
}
/**
* 生产组下拉框
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产订单",operType = "查询",operDesc = "生产组下拉框")
public EiInfo queryOrgComboBox(EiInfo inInfo) {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.ORG_PROD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo));
return inInfo;
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.sc.domain.HPSC005C;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.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.Arrays;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/8/9
* @description 生产订单详情
*/
public class ServiceHPSC104B extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "拆单派工",operType = "查询",operDesc = "生产订单-拆单派工C-初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String prodOrderNo = MapUtils.getString(queryMap, "prodOrderNo");
HPSC005C dbSc005 = HPSCTools.HpSc005.getDetails(prodOrderNo);
inInfo.addBlock("detail").addRow(dbSc005);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.SUB_INVENT_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005C().eiMetadata);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
inInfo.setStatus(500);
}
return inInfo;
}
/**
* 查询操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "拆单派工",operType = "查询",operDesc = "生产订单-拆单派工C-查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
Map queryRow = EiInfoUtils.getFirstRow(inInfo);
inInfo = super.query(inInfo, HPSC005C.QUERY, new HPSC005C());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
inInfo.setStatus(500);
}
return inInfo;
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.LogUtils;
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.Arrays;
/**
* @author LiuYang
* @version 1.0 2024/8/9
* @description 生产任务
*/
public class ServiceHPSC105 extends ServiceEPBase {
/**
* 画面初始化.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产任务",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.GROUP_RECORD_BLOCK_ID), null, false);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC005B().eiMetadata);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
inInfo.setStatus(500);
}
return inInfo;
}
/**
* 查询操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产任务",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPSC005B.QUERY, new HPSC005B());
} catch (Throwable e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
inInfo.setStatus(500);
}
return inInfo;
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.domain.HPSC005C;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.MapUtils;
import com.baosight.iplat4j.core.ei.EiBlock;
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.Map;
/**
* @author LiuYang
* @version 1.0 2024/8/9
* @description 生产任务详情
*/
public class ServiceHPSC105A extends ServiceEPBase {
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "生产任务详情",operType = "查询",operDesc = "生产订单-生产任务详情-初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String prodTaskNo = MapUtils.getString(queryMap, "prodTaskNo");
String prodOrderNo =prodTaskNo.substring(0,prodTaskNo.indexOf("-"));
HPSC005C dbSc005 = HPSCTools.HpSc005.getDetails(prodOrderNo);
inInfo.addBlock("detail").addRow(dbSc005);
HPSC005B dbSc005b = HPSCTools.HpSc005b.get(prodTaskNo);
EiBlock resultBlock = inInfo.addBlock(EiConstant.resultBlock);
resultBlock.addRow(dbSc005b);
resultBlock.addBlockMeta(new HPSC005B().eiMetadata);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.domain.HPSC106;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.util.*;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import com.baosight.iplat4j.core.util.DateUtils;
import com.baosight.iplat4j.ed.util.SequenceGenerator;
import org.springframework.beans.BeanUtils;
import java.math.BigDecimal;
import java.util.*;
/**
* @author LiuYang
* @version 1.0 2024/8/10
* @description 报工单添加弹框
*/
public class ServiceHPSC105B extends ServiceEPBase {
@OperationLogAnnotation(operModul = "生产报工", operType = "报工", operDesc = "初始化页面")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
String prodTaskNo = MapUtils.getString(queryMap, HPSC106.FIELD_prod_task_no);
HPSC005B dbSc005b = HPSCTools.HpSc005b.get(prodTaskNo);
HPSC106 hpsc106 = new HPSC106();
BeanUtils.copyProperties(dbSc005b,hpsc106);
List<HPSC106> hpsc106List = HPSCTools.Hpsc106.getByProdTaskNo(prodTaskNo);
hpsc106.setProdTaskNo(dbSc005b.getProdTaskNo());
hpsc106.setProdOrderNo(dbSc005b.getProdOrderNo());
hpsc106.setProjCode(dbSc005b.getProjCode());
hpsc106.setProjName(dbSc005b.getProjName());
hpsc106.setFactoryCode(dbSc005b.getFactoryCode());
hpsc106.setFactoryName(dbSc005b.getFactoryName());
hpsc106.setGroupCode(dbSc005b.getOrgNo());
hpsc106.setGroupName(dbSc005b.getOrgName());
hpsc106.setProductType(dbSc005b.getPartType());
hpsc106.setProductCode(dbSc005b.getPartCode());
hpsc106.setProductName(dbSc005b.getPartName());
hpsc106.setTaskQuantity(dbSc005b.getNum());
hpsc106.setTaskWeight(dbSc005b.getTotalWt());
hpsc106.setRegisteredQuantity(Optional.ofNullable(hpsc106List).orElse(new ArrayList<>()).stream().map(HPSC106::getQuantity).reduce(BigDecimal.ZERO, BigDecimal::add));
hpsc106.setRegisteredWeight(Optional.ofNullable(hpsc106List).orElse(new ArrayList<>()).stream().map(HPSC106::getTotalWeight).reduce(BigDecimal.ZERO, BigDecimal::add));
hpsc106.setUnregisterQuantity(dbSc005b.getNum().subtract(hpsc106.getRegisteredQuantity()));
hpsc106.setUnregisterWeight(dbSc005b.getTotalWt().subtract(hpsc106.getRegisteredWeight()));
hpsc106.setRegisterDate(DateUtils.toDateStr(new Date(), DateUtils.DATE10_PATTERN));
hpsc106.setId(null);
inInfo.addBlock(EiConstant.resultBlock).addRow(hpsc106);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "生产报工", operType = "报工", operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try{
Map resultMap = EiInfoUtils.getFirstRow(inInfo, EiConstant.resultBlock);
this.add(resultMap);
/*String docId = org.apache.commons.collections.MapUtils.getString(resultMap, HGSB004A.FIELD_DOC_ID);
if (StringUtils.isNotEmpty(docId)) {
String [] docIds = docId.split(",");
for (String docIdStr : docIds){
HGSC099 hgsc099 = new HGSC099();
hgsc099.setBizType("SCBG");
hgsc099.setDocId(docIdStr);
hgsc099.setMatId(hgsc008.getId());
DaoUtils.insert(HGSC099.INSERT, hgsc099);
}
}*/
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
public HPSC106 add(Map<String, Object> resultMap) {
String prodTaskNo = MapUtils.getString(resultMap, HPSC106.FIELD_prod_task_no);
HPSC005B dbSc005b = HPSCTools.HpSc005b.get(prodTaskNo);
HPSC106 hpsc106 = new HPSC106();
hpsc106.fromMap(resultMap);
//BeanUtils.copyProperties(dbSc005b,hpsc106);
cleanBaseInfo(hpsc106);
hpsc106.setProjCode(dbSc005b.getProjCode());
hpsc106.setProjName(dbSc005b.getProjName());
hpsc106.setFactoryCode(dbSc005b.getFactoryCode());
hpsc106.setFactoryName(dbSc005b.getFactoryName());
hpsc106.setProdTaskNo(dbSc005b.getProdTaskNo());
hpsc106.setProdOrderNo(dbSc005b.getProdOrderNo());
hpsc106.setRegisterDate(StringUtil.removeHorizontalLine(resultMap.get(HPSC106.FIELD_register_date).toString()));
//hgsc008.setTotalWeight(hgsc007.getSingleWeight().multiply(new BigDecimal(hpsc106.getQuantity())));
checkAddDate(hpsc106);
hpsc106.setWorkCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.HGSC008_WORK_CODE));
DaoUtils.insert(HPSC106.INSERT,hpsc106);
//HGZLTools.THGZL002.add(hpsc106);
return hpsc106;
}
public void cleanBaseInfo(HPSC106 hpsc106){
hpsc106.setCreatedBy(null);
hpsc106.setCreatedName(null);
hpsc106.setCreatedTime(null);
hpsc106.setUpdatedBy(null);
hpsc106.setUpdatedName(null);
hpsc106.setUpdatedTime(null);
hpsc106.setDepCode(null);
hpsc106.setId(null);
}
public void checkAddDate(HPSC106 hpsc106){
// List<String> orgIdList = UserSessionUtils.getOrgId();
// AssertUtils.isEmpty(hgsc008.getGroupCode(),"生产任务班组信息异常,请联系管理员!");
// AssertUtils.isTrue(!orgIdList.contains(hgsc008.getGroupCode()),"非当前任务生产组用户,无法报工此任务!");
AssertUtils.isNull(hpsc106.getQuantity(),"报工数量不能为空!");
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC106;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/8/10
* @description 报工单
*/
public class ServiceHPSC106 extends ServiceEPBase {
@OperationLogAnnotation(operModul = "生产报工单", operType = "查询", operDesc = "初始化页面")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC106().eiMetadata);
inInfo = super.query(inInfo, HPSC106.QUERY, new HPSC106());
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/*
* 查询*/
@OperationLogAnnotation(operModul = "生产报工单", operType = "查询", operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HPSC106.QUERY,new HPSC106() );
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
@Override
@OperationLogAnnotation(operModul = "生产报工单", operType = "删除", operDesc = "删除")
public EiInfo delete(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 销售单号
List<Long> ids = ObjectUtils.listKey(resultRows, HPSC106.FIELD_ID);
//checkDeleteDate(ids);
DaoUtils.update(HPSC106.BATCH_DELETE, new HashMap<String,Object>(){{put("ids",ids);}});
//HGZLTools.THGZL002.deleteByWorkIds(ids);
/*ids.forEach( id -> {
HGSCTools.THGSC099.deleteByMatId(id, HGConstant.FileBizType.SCBG);
})*/;
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据删除成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "删除失败");
}
return inInfo;
}
}
package com.baosight.hpjx.hp.sc.service;
import com.baosight.hpjx.aspect.annotation.OperationLogAnnotation;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.contants.ACConstants;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
import com.baosight.iplat4j.core.service.impl.ServiceEPBase;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
/**
* @author LiuYang
* @version 1.0 2024/8/8
* @description 宏建项目档案
*/
public class ServiceHPSC111 extends ServiceEPBase {
@OperationLogAnnotation(operModul = "项目档案",operType = "查询",operDesc = "初始化")
@Override
public EiInfo initLoad(EiInfo inInfo) {
try {
inInfo.setCell(EiConstant.queryBlock, 0, "status", 1);
inInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
Map map = new HashMap();
map.put("companyCode", UserSessionUtils.getCompanyCode());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.USER_BLOCK_ID), map,true);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.CUSTOMER_RECORD_BLOCK_ID), null);
inInfo.addBlock(EiConstant.resultBlock).addBlockMeta(new HPSC001().eiMetadata);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败");
}
return inInfo;
}
/**
* 查询操作.
*/
@OperationLogAnnotation(operModul = "项目档案",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
/* 调用EI查询方法.*/
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC001.FIELD_DELIVERY_DATE,
DateUtils.formatShort(inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HPSC001.FIELD_DELIVERY_DATE)));
inInfo.setCell(EiConstant.queryBlock, 0, "status", 1);
EiInfo outInfo = super.query(inInfo, "HPSC001.query", new HPSC001());
return outInfo;
}
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/8
Time: 18:03
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}"/>
<script>
let ctx="${ctx}";
</script>
<EF:EFPage title="物料清单">
<EF:EFRegion id="inqu" title="查询条件">
<EF:EFInput ename="inqu_status-0-projId" type="hidden"/>
<div class="row">
<%--<EF:EFSelect ename="inqu_status-0-prdtType" cname="部件类型" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFSelect>--%>
<EF:EFSelect cname="部件名称" ename="inqu_status-0-prdtCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<div id="splitter" class="i-fit-height" style="display: inline">
<div id="left-pane" class="i-fit-height" style="width: 20%;float:left;">
<EF:EFRegion id="projTree" title="BOM结构图" fitHeight="true">
<EF:EFTree id="materialTree"
valueField="label"
textField="text"
hasChildren="leaf"
serviceName="HPSC002"
methodName="queryTreeNode">
</EF:EFTree>
</EF:EFRegion>
</div>
<div id="right-pane" class="i-fit-height" style="width: 80%;float: right">
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="lv" cname="层级" hidden="true"/>
<EF:EFColumn enable="false" ename="pgStatus" hidden="true" cname="派工状态"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" hidden="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" hidden="true"/>
<EF:EFColumn ename="deliveryDate" cname="交货日期" enable="false" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="prdtType" cname="部件类型" align="center" required="true"
filter="contains" width="90" enable="false" hidden="true">
<EF:EFOptions blockId="codeset_code_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="prdtCode" cname="部件编码" hidden='true'/>
<EF:EFColumn ename="prdtName" cname="部件名称" width="140" align="center" maxLength="50"
required="true"/>
<EF:EFColumn ename="length" cname="长/φ(MM)" width="80" format="{0:N0}" maxLength="12" displayType="0"
data-regex="/^-?[0-9]{1,9}$/"
data-errorprompt="请输入数字,该值最大可设置9位整数!"/>
<EF:EFColumn ename="width" cname="宽(MM)" width="80" format="{0:N0}" maxLength="12" displayType="0"
data-regex="/^-?[0-9]{1,9}$/"
data-errorprompt="请输入数字,该值最大可设置9位整数!"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="80" format="{0:N0}" maxLength="12" displayType="0"
data-regex="/^-?[0-9]{1,9}$/"
data-errorprompt="请输入数字,该值最大可设置9位整数!"/>
<EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级部件名称"/>
<EF:EFColumn enable="false" ename="parentPrdtName" hidden="true" cname="上级部件名称"/>
<EF:EFColumn ename="num" cname="数量" maxLength="15" displayType="0.000"
data-regex="/^-?[0-9]{1,12}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和3位小数!"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="true" width="100" align="right" format="{0:N3}" sumType="all"
data-regex="/^-?[0-9]{1,12}([.][0-9])?$/"
data-errorprompt="请输入数字,该值最大可设置12位整数和1位小数!"/>
<EF:EFColumn ename="unitWt" format="{0:N1}" cname="单重(KG)" maxLength="15" displayType="0.0"
data-regex="/^-?[0-9]{1,12}([.][0-9])?$/" defaultValue="0.000" hidden="true"
data-errorprompt="请输入数字,该值最大可设置12位整数和1位小数!"/>
<EF:EFComboColumn enable="false" ename="status" align="center"
columnTemplate="#=textField#" optionLabel=" "
itemTemplate="#=textField#" textField="textField"
valueField="valueField" cname="提交状态">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
</EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注" />
</EF:EFGrid>
</EF:EFRegion>
</div>
</div>
<%-- EEDM8010页面加载时,不会加载EEDM6000 (lazyload="true") --%>
<%-- <EF:EFWindow id="uploadFile" url="${ctx}/web/HPSC099" lazyload="true" refresh="true">
</EF:EFWindow>
<EF:EFWindow id="openFile">
<EF:EFRegion id="upload" title="文件导入区">
<div id="button"></div>
<EF:EFUpload ename="fileUpload" cname="导入" docTag="HPSC002" path="upload"/>
</EF:EFRegion>
</EF:EFWindow>
<EF:EFWindow id="openFile">
<EF:EFRegion id="upload" title="文件导入区">
<div id="button"></div>
<EF:EFInput cname="上传文件" blockId="inqu_status" ename="file" row="0" type="file" colWidth="3"/>
</EF:EFRegion>
</EF:EFWindow>--%>
<EF:EFWindow id="uploadFile" url="${ctx}/web/HPSC097" lazyload="true" refresh="true"/>
</EF:EFPage>
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/9
Time: 10:28
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="查询条件" align-item="center">
<div class="row">
<%--<EF:EFInput cname="项目编号" blockId="inqu_status" ename="projCode" row="0" colWidth="3"/>--%>
<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" blockId="inqu_status" ename="prdtName" row="0" colWidth="3"/>
<%-- <EF:EFInput cname="生产计划单号" blockId="inqu_status" ename="planInfoNo" row="0" colWidth="3"/>--%>
<EF:EFDatePicker cname="交货日期" blockId="inqu_status" ename="deliveryDate" row="0" colWidth="3"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFDatePicker cname="计划完成日期" blockId="inqu_status" ename="planCompletionDate" row="0" colWidth="3"
format="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<%-- </div>--%>
<%-- <div class="row">--%>
<EF:EFSelect cname="状态" blockId="inqu_status" ename="status" row="0" colWidth="3" optionLabel="全部">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="基本信息">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<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="planInfoNo" cname="生产计划单号" readonly="true" hidden="true" width="100"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称" width="120" readonly="true"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFComboColumn ename="prdtType" cname="部件类型" hidden = 'true' width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="部件编码" readonly="true" hidden = "true" />
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称" readonly="true" width="120"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true" align="center" width="100" hidden="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true" width="100"/>
<EF:EFColumn ename="deliveryDate" cname="交货日期" width="100" align="center" enable="false"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" hidden="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" width="100" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required='true'/>
<EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" width="80" readonly="true" align="center"/>
<EF:EFComboColumn enable="false" ename="status" cname="状态" width="60" align="center">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="已提交" value="1"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
<EF:EFRegion id="detail" title="明细信息">
<EF:EFGrid blockId="detail" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="企业编码" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" hidden="true"/>
<EF:EFColumn ename="parentId" cname="父ID" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" align="center"/>
<EF:EFComboColumn ename="prdtType" cname="零件类型" width="90" align="center" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="prdtCode" cname="零件编码" hidden = "true"/>
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零件名称"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" align="center" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn enable="false" ename="num" readonly="true" width="80" align="right" cname="数量" format="{0:N0}%"/>
<EF:EFColumn enable="false" ename="unitWt" readonly="true" width="80" align="right" cname="单重(KG)" hidden="true"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" width="80" align="right" enable="false"/>
<%--<EF:EFColumn ename="planCommentDate" required='true' cname="计划开始时间" width="100" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>--%>
<EF:EFColumn ename="planCompletionDate" required='true' cname="计划完成日期" width="100" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="actualCompletionDate" cname="完成时间" editType="date" dateFormat="yyyy/MM/dd" width="100"
enable="false"/>
<EF:EFColumn enable="false" ename="actualCompletionNum" width="80" align="right" cname="完成数量" format="{0:N0}%" readonly="true"/>
<EF:EFColumn enable="false" ename="actualCompletionUnitWt" width="80" align="right" cname="完成总重(T)" readonly="true"/>
</EF:EFGrid>
</EF:EFRegion>
</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>
let ids = [];
$(function () {
// 查询
$("#QUERY").on("click", query);
// 拆单派工
// $("#TEAR_ASSIGN").on("click", tearAssign);
// 批量分派
$("#ASSIGN").on("click", assign);
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "operator",
template: function (item) {
let status = item.status;
let prodOrderNo = item.prodOrderNo;
let filePath1 = item.filePath1;
let template = '';
// 非全部派工时展示拆单派工按钮
if (status != 2) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="tearAssign(\'' + prodOrderNo + '\')" >拆单派工</a>';
}
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showGroupDetail(\'' + prodOrderNo + '\')" >任务详情</a>';
if (filePath1) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件</a>';
}
return template
}
},
{
field: "prodOrderNo",
template: function (item) {
let prodOrderNo = item.prodOrderNo;
let template = '';
template += '<a style="cursor: pointer;display: inline-flex" '
+' onclick="tearDetails(\'' + prodOrderNo + '\')" >' + prodOrderNo + '</a>';
return template
}
}
]
}
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
/**
* 拆单派工
*
* @param prodOrderNo
*/
function tearAssign(prodOrderNo) {
JSColorbox.open({
href: "HPSC104A?methodName=initLoad&inqu_status-0-prodOrderNo=" + prodOrderNo,
title: "<div style='text-align: center;'>拆单派工</div>",
width: "80%",
height: "90%",
callbackName: tearAssignCallback
});
}
/**
* 生产订单详情
*
* @param prodOrderNo
*/
function tearDetails(prodOrderNo) {
JSColorbox.open({
href: "HPSC104B?methodName=initLoad&inqu_status-0-prodOrderNo=" + prodOrderNo,
title: "<div style='text-align: center;'>生产订单详情</div>",
width: "80%",
height: "90%",
callbackName: tearAssignCallback
});
}
/**
* 拆单分派回调
*/
function tearAssignCallback() {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
/**
* 批量分派
*/
function assign() {
//重置全局变量
ids = [];
let rows = resultGrid.getCheckedRows()
if (rows.length < 1) {
message("请至少选择一条需要分派的数据");
return;
}
let factoryCodes = null;
rows.forEach(function (element) {
ids.push(element.id);
factoryCodes = element.factoryCode;
});
let flag = true;
$.each(rows, function(index, item) {
let factoryCode= item.get("factoryCode");
if(factoryCode != factoryCodes){
IPLAT.alert({
message : "选中的生产订单不上同一个工厂,无法分派!",
okFn : function(e) {
},
title : '错误'
});
flag = false;
return false;
}
});
if(flag) {
// groupType=1:仅查询生产组
JSColorbox.open({
href: "HPSC098?methodName=initLoad&inqu_status-0-orgType=prodGroup&inqu_status-0-factoryCode="+factoryCodes,
title: "<div style='text-align: center;'>选择组织</div>",
width: "70%",
height: "70%",
callbackName: function (row) {
var info = new EiInfo()
info.set("ids",ids.join(','));
info.set("factoryCode",row.factoryCode);
info.set("factoryName",row.factoryName);
info.set("groupCode",row.groupCode);
info.set("groupName",row.groupName);
EiCommunicator.send("HPSC104A", "assign", info, {
onSuccess: function (ei) {
if (ei["status"] == -1) {
NotificationUtil(ei, "error");
} else {
NotificationUtil({
msg: ei.msg
});
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
}, onFail: function (ei) {
}
}, {async: false});
}
});
}
}
/**
* 附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPSC002B?methodName=initLoad&inqu_status-0-bizType=WL&inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
/**
* 生产组详情
*
* @param let
*/
function showGroupDetail(prodOrderNo) {
window.open("HPSC105?methodName=initLoad&inqu_status-0-prodOrderNo=" + prodOrderNo)
}
$(window).load(function () {
// 查询
query();
});
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/9
Time: 16:08
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="查询条件">
<div class="row">
<EF:EFInput cname="生产订单号" blockId="inqu_status" ename="prodOrderNo" row="0" colWidth="3"/>
<EF:EFInput cname="项目名称" blockId="inqu_status" ename="projName" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" blockId="inqu_status" ename="prdtName" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" blockId="inqu_status" ename="partName" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFDatePicker cname="交货日期" blockId="inqu_status" ename="deliveryDate" row="0" colWidth="3"
format="yyyy-MM-dd"/>
<EF:EFDatePicker cname="计划完成日期" blockId="inqu_status" ename="planCompletionDate" row="0" colWidth="3"
format="yyyy-MM-dd"/>
<EF:EFSelect cname="状态" optionLabel="全部" blockId="inqu_status" ename="status" row="0" colWidth="3">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="部分派工" value="1"/>
<EF:EFOption label="全部派工" value="2"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" enable="false" width="170" locked="true" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="90" align="center">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="部分派工" value="1"/>
<EF:EFOption label="全部派工" value="2"/>
</EF:EFComboColumn>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFComboColumn ename="factoryCode" cname="工厂" blockName="factory_record_block_id"
columnTemplate="#=textField#" itemTemplate="#=textField#"
textField="textField" valueField="valueField"
maxLength="16" width="120" required="true"
align="center" filter="contains" sort="true">
</EF:EFComboColumn>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="120" align="center"/>
<%--<EF:EFColumn ename="prdtSpec" cname="部件规格" enable="false" width="120" align="center"/>--%>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="deliveryDate" cname="交货日期" width="100" align="center" enable="false"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="workDate" cname="派工时间" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="assignedNum" cname="派工数量" enable="false" width="80" align="right" format="{0:N0}%"/>
<EF:EFColumn ename="unassignedNum" cname="剩余数量" enable="false" width="80" align="right" format="{0:N0}%"/>
<EF:EFColumn ename="num" cname="数量" enable="false" width="80" align="right" format="{0:N0}%"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="80" align="right" format="{0:N3}"/>
<%--<EF:EFColumn ename="remark" cname="部件备注" enable="false"/>--%>
<EF:EFColumn ename="remark1" cname="零件备注" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="100" align="center" hidden="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
let factoryGroupGlobalData = [];
$(function () {
IPLATUI.EFGrid = {
"result" : {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "orgName",
attributes: {
class: "i-input-readonly"
}
}, {
field: "orgNo",
template: function (dataItem) {
for (let i = 0; i < factoryGroupGlobalData.length; i++) {
if (factoryGroupGlobalData[i]['valueField'] === dataItem['orgNo']) {
return factoryGroupGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-parentOrgId", options.model["factoryCode"]);
// 1:生产组
inInfo.set("inqu_status-0-orgType", 'prodGroup');
inInfo.set("serviceName", "HPXSOrg");
inInfo.set("methodName", "queryGroupComboBox");
inInfo.set("blockId", "group_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
},{
field: "workDate",
attributes: {
class: "i-input-readonly"
},
defaultValue: function () {
return currShortDate();
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
}
$("#QUERY").on("click", query);
downKeyUp();
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 生产组名称
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-orgType", 'prodGroup');
EiCommunicator.send("HPXSOrg", "queryGroupComboBox", inInfo, {
onSuccess: function (ei) {
factoryGroupGlobalData = ei.getBlock("group_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 查询
query();
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
/**
* 保存
*/
let save = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
for (let i = 0; i < rows.length; i++) {
/*if (isBlank(rows[i]['factoryCode'])) {
message("勾选的第" + (i + 1) + "行\"厂区\",不能为空");
return;
}*/
if (isBlank(rows[i]['orgNo'])) {
message("勾选的第" + (i + 1) + "行\"生产组\",不能为空");
return;
}
if (isBlank(rows[i]['totalWt'])) {
message("勾选的第" + (i + 1) + "行\"分派重量\",不能为空");
return;
}
if (Number(rows[i]['totalWt']) <= 0) {
message("勾选的第" + (i + 1) + "行\"分派重量\"必须是大于0");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC104A", "save", true);
}
});
}
/**
* 删除
*/
let deleteFunc = function () {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC104A", "delete", true);
}
});
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/9
Time: 16:13
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="inqu_status-0-prodOrderNo" cname="项目号" type="hidden"/>
<div class="row">
<EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-prodOrderNo" cname="生产订单号" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partName" cname="零件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-deliveryDate" cname="交货日期" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-planCompletionDate" cname="计划完成日期" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="计划数量" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFInput ename="detail-0-totalWt" cname="计划重量(T)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-assignedNum" cname="已派工数量" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFInput ename="detail-0-unassignedNum" cname="待派工数量" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFSelect ename="detail-0-status" cname="状态" colWidth="4" readonly="true">
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="部分派工" value="1"/>
<EF:EFOption label="全部派工" value="2"/>
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect ename="detail-0-factoryCode" cname="厂区" colWidth="4" readonly="true">
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row" isFloat="true">
<EF:EFColumn ename="id" cname="任务ID" enable="false" width="80" align="center"/>
<EF:EFColumn ename="prodTaskNo" cname="任务单号" enable="false" hidden="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>
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" align="center" hidden="true"/>--%>
<EF:EFComboColumn ename="orgNo" cname="生产组" width="110" align="center" defaultValue="" required="true"
filter="contains" readonly="true">
<EF:EFOptions blockId="group_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" align="center" hidden="true"/>
<EF:EFColumn ename="workDate" cname="派工时间" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<%--<EF:EFColumn ename="orgNo" cname="生产组代码" enable="false" hidden="true"/>--%>
<%--<EF:EFPopupColumn ename="orgName" cname="生产组" width="200" align="center" popupType="ServiceGrid"
popupTitle="生产组信息" serviceName="HPPZ011" methodName="queryComboBoxAll"
resultId="factory_group_ecord_block_id"
columnEnames="textField,param2Field"
columnCnames="厂区,生产组"
backFillColumnIds="param2Field,param1Field,valueField,textField"
backFillFieldIds="orgName,orgNo,factoryCode,factoryName"
valueField="textField" textField="textField" readonly="true" required="true"/>--%>
<%--<EF:EFColumn ename="factoryCode" cname="厂区编码" enable="false" hidden="true"/>
<EF:EFColumn ename="factoryName" cname="厂区" enable="false" align="center"/>--%>
<EF:EFColumn ename="num" cname="分派数量" format="{0:N0}%" defaultValue="100" required="true" enable="false"/>
<EF:EFColumn ename="totalWt" cname="分派重量(T)" enable="true" format="{0:N3}"/>
<EF:EFColumn ename="completeNum" cname="已完工数量" enable="false" format="{0:N0}%" defaultValue="0"/>
</EF:EFGrid>
<br/>
<span style='color: red;font-size: 13px;'>说明:厂区和生产组仅新增的时候可以编辑</span>
</EF:EFRegion>
</EF:EFPage>
let factoryGroupGlobalData = [];
$(function () {
IPLATUI.EFGrid = {
"result" : {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "orgName",
attributes: {
class: "i-input-readonly"
}
}, {
field: "orgNo",
template: function (dataItem) {
for (let i = 0; i < factoryGroupGlobalData.length; i++) {
if (factoryGroupGlobalData[i]['valueField'] === dataItem['orgNo']) {
return factoryGroupGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-factoryCode", options.model["factoryCode"]);
// 1:生产组
inInfo.set("inqu_status-0-groupType", 1);
inInfo.set("serviceName", "HPPZ011");
inInfo.set("methodName", "queryGroupComboBox");
inInfo.set("blockId", "group_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
e.preventDefault();
deleteFunc();
}
}
}
});
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/9
Time: 16:18
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="inqu_status-0-prodOrderNo" cname="项目号" type="hidden"/>
<div class="row">
<EF:EFInput ename="detail-0-productionOrderNo" cname="生产订单号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-prdtLength" cname="部件长(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-prdtWidth" cname="部件宽(MM)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtThick" cname="部件厚(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="部件数量" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFInput ename="detail-0-totalWt" cname="部件重量(T)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-remark" cname="部件备注" colWidth="4" readonly="true"/>
<EF:EFSelect ename="detail-0-partType" cname="零件类型" colWidth="4" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect>
<EF:EFInput ename="detail-0-partName" cname="零件名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-partLength" cname="零件长(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partWidth" cname="零件宽(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partThick" cname="零件厚(MM)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-remark1" cname="零件备注" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="零件数量" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFInput ename="detail-0-totalWt" cname="零件重量(T)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFDatePicker ename="detail-0-workDate" cname="派工时间" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
<EF:EFInput ename="detail-0-assignedNum" cname="派工数量" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFInput ename="detail-0-totalWt" cname="派工重量(T)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-unassignedNum" cname="剩余数量" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFInput ename="detail-0-unTotalWt" cname="剩余重量(T)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-completeNum" cname="完成数量" colWidth="4" readonly="true" format="{0:N0}%"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-actualCompletionTotalWt" cname="完成重量(T)" colWidth="4" readonly="true"/>
<EF:EFDatePicker ename="detail-0-deliveryDate" cname="交货日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
<EF:EFDatePicker ename="detail-0-planCompletionDate" cname="计划完成日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
<EF:EFDatePicker ename="detail-0-actualCompletionDate" cname="实际完成时间" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
</div>
</EF:EFRegion>
</EF:EFPage>
$(function () {
IPLATUI.EFGrid = {
"result" : {
pageable: {
pageSize: 15,
pageSizes: [15, 50, 70, 100],
},
columns: [{
field: "operator",
template: function (item) {
let filePath1 = item.filePath1;
let zlprodTaskNo = item.zlprodTaskNo;
let prodTaskNo = item.prodTaskNo;
let template = '';
if (filePath1) {
template+='<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="registerWork(\'' + prodTaskNo + '\')" >报工</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件</a>';
}
if (zlprodTaskNo) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showZlDetail(\'' + prodTaskNo + '\')" >质检单</a>';
}
return template
}
}, {
field: "prodTaskNo",
template: function (item) {
let prodTaskNo = item.prodTaskNo;
return '<a style="cursor: pointer;display: inline-flex" '
+ ' onclick="tearDetails(\'' + prodTaskNo + '\')" >' + prodTaskNo + '</a>';
}
}]
}
}
// 查询
$("#QUERY").on("click", query);
});
/**
* 页面加载时执行
*/
$(window).load(function () {
// 查询
query();
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
/**
* 附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPSC002B?methodName=initLoad&inqu_status-0-id=" + id,
title: "<div style='text-align: center;'>附件清单</div>",
width: "80%",
height: "80%",
});
}
/**
* 生产任务详情
*
* @param prodOrderNo
*/
function tearDetails(prodTaskNo) {
JSColorbox.open({
href: "HPSC105A?methodName=initLoad&inqu_status-0-prodTaskNo=" + prodTaskNo,
title: "<div style='text-align: center;'>生产任务详情</div>",
width: "80%",
height: "90%"
});
}
function registerWork(prodTaskNo) {
JSColorbox.open({
href: "HPSC105B?methodName=initLoad&inqu_status-0-prodTaskNo=" + prodTaskNo,
title: "<div style='text-align: center;'>报工</div>",
width: "70%",
height: "60%",
callbackName: registerWorkCallback
});
}
function registerWorkCallback(ei) {
if (ei.getStatus() >= 0) {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
}
function showZlDetail(prodTaskNo) {
window.open("HPZL001?methodName=initLoad&inqu_status-0-prodTaskNo=" + prodTaskNo)
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/9
Time: 16: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 cname="生产订单号" ename="prodOrderNo" blockId="inqu_status" row="0" colWidth="3" type="hidden"/>
<div class="row">
<EF:EFInput cname="生产任务号" ename="prodTaskNo" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="项目名称" ename="projName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" ename="prdtName" blockId="inqu_status" row="0" colWidth="3"/>
<EF:EFInput cname="零件名称" ename="partName" blockId="inqu_status" row="0" colWidth="3"/>
</div>
<div class="row">
<EF:EFSelect cname="工厂" ename="factoryCode" blockId="inqu_status" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="factory_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="生产组名称" ename="orgNo" blockId="inqu_status" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="group_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="childId" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="110" align="center"/>
<EF:EFColumn ename="prodTaskNo" cname="生产任务号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="100" align="center"/>
<%--<EF:EFColumn ename="remark1" cname="零件备注"/>--%>
<EF:EFColumn ename="deliveryDate" cname="交货日期" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="workDate" cname="派工时间" enable="false" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="completeNum" cname="完成数量" enable="false" width="100" align="right" format="{0:N0}%"/>
<EF:EFColumn ename="unCompleteNum" cname="剩余数量" enable="false" width="100" align="right" format="{0:N0}%"/>
<EF:EFColumn ename="num" cname="数量" enable="false" width="100" align="right" format="{0:N0}%"/>
<EF:EFColumn ename="totalWt" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="factoryName" cname="工厂" enable="false" width="140" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center" hidden="true"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center" hidden="true"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
let factoryGroupGlobalData = [];
$(function () {
IPLATUI.EFGrid = {
"result" : {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "orgName",
attributes: {
class: "i-input-readonly"
}
}, {
field: "orgNo",
template: function (dataItem) {
for (let i = 0; i < factoryGroupGlobalData.length; i++) {
if (factoryGroupGlobalData[i]['valueField'] === dataItem['orgNo']) {
return factoryGroupGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-factoryCode", options.model["factoryCode"]);
// 1:生产组
inInfo.set("inqu_status-0-groupType", 1);
inInfo.set("serviceName", "HPPZ011");
inInfo.set("methodName", "queryGroupComboBox");
inInfo.set("blockId", "group_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
}],
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
e.preventDefault();
save();
},
onDelete: function (e) {
// 阻止后台删除请求,使用自定义删除
e.preventDefault();
deleteFunc();
}
}
}
});
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/9
Time: 16:21
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="inqu_status-0-prodOrderNo" cname="项目号" type="hidden"/>
<div class="row">
<EF:EFInput ename="detail-0-productionOrderNo" cname="生产订单号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projCode" cname="项目号" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-prdtLength" cname="部件长(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-prdtWidth" cname="部件宽(MM)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtThick" cname="部件厚(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="部件数量" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFInput ename="detail-0-unitWt" cname="部件重量(T)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-remark" cname="部件备注" colWidth="4" readonly="true"/>
<EF:EFSelect ename="detail-0-partType" cname="零件类型" colWidth="4" readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect>
<EF:EFInput ename="detail-0-partName" cname="零件名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-partLength" cname="零件长(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partWidth" cname="零件宽(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partThick" cname="零件厚(MM)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-remark1" cname="零件备注" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-num" cname="零件数量" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFInput ename="detail-0-unitWt" cname="零件重量(T)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-assignedNum" cname="派工数量" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFInput ename="detail-0-totalWt" cname="派工重量(T)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unassignedNum" cname="剩余数量" colWidth="4" readonly="true" format="{0:N0}%"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-unTotalWt" cname="剩余重量(T)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-completeNum" cname="完成数量" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFInput ename="detail-0-actualCompletionTotalWt" cname="完成重量(T)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFDatePicker ename="detail-0-deliveryDate" cname="交货日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
<EF:EFDatePicker ename="detail-0-planCompletionDate" cname="计划完成日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
<EF:EFDatePicker ename="detail-0-actualCompletionDate" cname="实际完成时间" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
</div>
</EF:EFRegion>
<EF:EFRegion id="inqu" title="任务详情">
<div class="row">
<EF:EFInput cname="生产任务号" blockId="result" ename="prodTaskNo" row="0" colWidth="4" readonly="true"/>
<%-- <EF:EFInput cname="生产订单号" blockId="result" ename="prodOrderNo" row="0" colWidth="4" readonly="true"/>--%>
</div>
<%--<div class="row">
<EF:EFInput cname="项目号" blockId="result" ename="projCode" row="0" colWidth="4" readonly="true"/>
<EF:EFInput cname="项目名称" blockId="result" ename="projName" row="0" colWidth="4" readonly="true"/>
<EF:EFInput cname="部件名称" blockId="result" ename="prdtName" row="0" colWidth="4" readonly="true"/>
</div>--%>
<div class="row">
<EF:EFInput cname="部件名称" blockId="result" ename="prdtName" row="0" colWidth="4" readonly="true"/>
<EF:EFInput cname="零件名称" blockId="result" ename="partName" row="0" colWidth="4" readonly="true"/>
<EF:EFInput cname="零件规格(MM)" blockId="result" ename="partSpec" row="0" colWidth="4" readonly="true"/>
</div>
<%--<div class="row">
<EF:EFInput cname="零件长" blockId="result" ename="partLength" row="0" colWidth="4" readonly="true"/>
<EF:EFInput cname="零件宽" blockId="result" ename="partWidth" row="0" colWidth="4" readonly="true"/>
<EF:EFInput cname="零件厚" blockId="result" ename="partThick" row="0" colWidth="4" readonly="true"/>
</div>--%>
<div class="row">
<EF:EFInput cname="任务数量" blockId="result" ename="num" row="0" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFInput cname="任务重量(T)" blockId="result" ename="totalWt" row="0" colWidth="4" readonly="true"/>
<EF:EFInput cname="完成数量" blockId="result" ename="completeNum" row="0" colWidth="4" readonly="true" format="{0:N0}%"/>
</div>
<div class="row">
<EF:EFInput cname="剩余数量" blockId="result" ename="unCompleteNum" row="0" colWidth="4" readonly="true" format="{0:N0}%"/>
<EF:EFDatePicker cname="计划完成日期" blockId="result" ename="planCompletionDate" row="0" colWidth="4"
format="yyyy-MM-dd" readonly="true"/>
<EF:EFInput cname="工厂" blockId="result" ename="factoryName" row="0" colWidth="4" readonly="true"/>
<EF:EFInput cname="生产组名称" blockId="result" ename="orgName" row="0" colWidth="4" readonly="true"/>
</div>
</EF:EFRegion>
</EF:EFPage>
$(function () {
$("#result-0-quantity_textField").on('change',function () {
var quantity = $("#result-0-quantity_textField").val();
if(!isPositiveInteger(quantity)){
message("报工数量必须是大于0的正整数")
}
var taskWeight = $("#result-0-taskWeight_textField").val();
if(isPositiveNumber(taskWeight)) {
$("#result-0-totalWeight_textField").val((parseInt(taskWeight*(quantity/100))).toFixed(2));
$("#result-0-totalWeight").val((parseInt(taskWeight*(quantity/100))).toFixed(2))
}
})
/**
* 取消
*/
$('#cancel').on('click', function () {
// 关闭弹窗
parent.JSColorbox.close();
})
/**
* 保存*
*/
$("#btn_save").on("click",function(){
let quantity = $("#result-0-quantity_textField").val().split("%")[0];
let unregisterQuantity = $("#result-0-unregisterQuantity").val();
if(!isPositiveInteger(quantity)){
message("报工数量必须是大于0的正整数");
return ;
}
if (unregisterQuantity<quantity){
message("报工数量不能大于剩余数量");
return ;
}
if (quantity>100){
message("报工数量不能大于100%");
return ;
}
var registerDate = $("#result-0-registerDate").val();
if(!registerDate){
message("报工日期不能为空!");
return ;
}
$("#result-0-quantity_textField").val(quantity);
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("", "HPSC105B", "save", {isAlldata:true,onSuccessCallback:parent.registerWorkCallback});
}
});
});
});
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/9
Time: 23:03
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="报工">
<div class="row">
<EF:EFInput ename="result-0-prodTaskNo" cname="生产任务ID" type="hidden"/>
<EF:EFInput ename="result-0-productType" cname="产品类型" colWidth="4" type="hidden" readonly="true"/>
<EF:EFInput ename="result-0-productCode" cname="产品编码" colWidth="6" readonly="true"/>
<EF:EFInput ename="result-0-productName" cname="产品名称" colWidth="6" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-groupCode" cname="生产班组编码" type="hidden"/>
<EF:EFInput ename="result-0-groupName" cname="班组" colWidth="6" required="true" readonly="true"/>
<EF:EFDatePicker cname="报工日期" ename="result-0-registerDate" colWidth="6"
format="yyyy-MM-dd" required="true" readonly="false"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-taskQuantity" cname="任务数量" format="{0:0}%" editType="text" colWidth="6" readonly="true"/>
<EF:EFInput ename="result-0-taskWeight" cname="任务重量" format="{0:n2}" editType="text" colWidth="6" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-registeredQuantity" cname="已报工数量" format="{0:0}%" editType="text" colWidth="6" readonly="true"/>
<EF:EFInput ename="result-0-registeredWeight" cname="已报工重量" format="{0:n2}" editType="text" colWidth="6" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-unregisterQuantity" cname="剩余数量" format="{0:0}%" editType="text" colWidth="6" readonly="true"/>
<EF:EFInput ename="result-0-unregisterWeight" cname="剩余重量" format="{0:n2}" editType="text" colWidth="6" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-quantity" cname="报工数量" format="{0:0}%" editType="text" colWidth="6" required="true" />
<EF:EFInput ename="result-0-totalWeight" cname="报工重量" format="{0:n2}" editType="text" colWidth="6" readonly="true"/>
</div>
</EF:EFRegion>
<div class="row" style="display:flex;justify-content:center;">
<EF:EFButton ename="cancel" cname="取消" type="button" class="btn-center"/>
<EF:EFButton ename="btn_save" cname="保存" type="button" class="btn-center"/>
</div>
</EF:EFPage>
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [{
field: "operator",
template: function (item) {
let template = '';
template+='<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="showUploadFile(' + item.id + ')" >附件清单</a>';
return template;
}
}],
loadComplete: function(grid) {
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
});
/**
* 查询
*/
function query() {
resultGrid.dataSource.page(1);
}
$(window).load(function () {
// 查
query();
});
/**
* 显示附件清单
*
* @param id
*/
function showUploadFile(id) {
JSColorbox.open({
href: "HPSC099?methodName=initLoad&inqu_status-0-bizType=SCBG&inqu_status-0-matId=" + id,
title: "<div style='text-align: center;'>附件详情</div>",
width: "80%",
height: "80%",
});
}
\ No newline at end of file
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/9
Time: 23:01
To change this template use File | Settings | File Templates.
--%>
<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<%@ page import="com.baosight.iplat4j.core.web.threadlocal.UserSession" %>
<%
String loginName = UserSession.getLoginName();
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="loginName" value="<%=loginName%>" />
<EF:EFPage title="生产报工单">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="factoryName" cname="工厂区" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="workCode" cname="报工单号" placeholder="模糊查询" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="groupName" cname="生产组" placeholder="模糊查询" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" primaryKey="true" cname="内码" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="账套" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="120" align="center"/>
<EF:EFColumn ename="factoryName" cname="工厂区" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="workCode" cname="报工单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productCode" cname="产品编码" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="productName" cname="产品名称" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="groupName" cname="生产组" width="100" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="quantity" cname="数量" width="100" enable="false" format="{0:0}%" readonly="true" align="center"/>
<EF:EFColumn ename="totalWeight" cname="任务总重(KG)" width="100" enable="false" format="{0:n2}" readonly="true" align="center"/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
$(function () {
$("#QUERY").on("click", function () {
resultGrid.dataSource.page(1);
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
},
columns: [
{
field: "operator",
template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="jump(' + item.id + ')" >物料清单</a>';
return template;
}
}
],
}
});
function jump(id) {
var herf = ctx + "\\web\\" + "HPSC102?inqu_status-0-projId=" + id + "&efParentFormEname=HPSC111";
window.open(herf);
}
<%--
Created by IntelliJ IDEA.
User: 1
Date: 2024/8/8
Time: 17:41
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}"/>
<script>
var ctx = "${ctx}";
</script>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="项目档案">
<EF:EFRegion id="inqu" title="查询条件"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row"> <%-- blockId="inqu_status" row="0" --%>
<EF:EFInput ename="inqu_status-0-projCode" cname="项目编码" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-projName" cname="项目名称" colWidth="3"/>
<EF:EFSelect ename="inqu_status-0-projType" cname="项目类型" colWidth="3" filter="contains"
template="#=textField#" valueTemplate="#=textField#">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFSelect>
<EF:EFSelect cname="物料提交状态" optionLabel="全部" ename="inqu_status-0-materialStatus" colWidth="3">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="部分提交" value="1"/>
<EF:EFOption label="全部提交" value="2"/>
</EF:EFSelect>
<EF:EFSelect cname="项目负责人" ename="inqu_status-0-princ1" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="user_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="客户负责人" ename="inqu_status-0-princ2" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="customer_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFDatePicker ename="inqu_status-0-deliveryDate" cname="交货日期" role="date" enable="false" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="3"/>
</div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="100" align="center"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="false" width="120" align="center"/>
<EF:EFComboColumn ename="projType" cname="项目类型" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#">
<EF:EFCodeOption codeName="hpjx.hpsc.projType"/>
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/>
<EF:EFComboColumn ename="princ1" cname="项目负责人" width="120" align="center" required="true"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="princ2" cname="客户负责人" width="120" align="center" required="true"
blockName="customer_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="deliveryDate" cname="交货日期" width="100" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn ename="materialStatus" cname="物料提交状态" enable="false" width="100" align="center">
<EF:EFOption label="未提交" value="0"/>
<EF:EFOption label="部分提交" value="1"/>
<EF:EFOption label="全部提交" value="2"/>
</EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注" enable="false"/>
</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