Commit 69bea29a by 宋祥

1.fixBug:物料清单已派工时不能删除

2.新增物料计划提交不生效问题修复
parent 8af6de4c
...@@ -38,4 +38,16 @@ public class CommonConstant { ...@@ -38,4 +38,16 @@ public class CommonConstant {
public static final String DAY = "DAY"; public static final String DAY = "DAY";
} }
/**
* 常用字段常量
*
* @author:songx
* @date:2024/2/22,15:33
*/
public static class Field {
// DETAIL
public static final String DETAIL = "detail";
}
} }
...@@ -72,5 +72,19 @@ public class HPConstant { ...@@ -72,5 +72,19 @@ public class HPConstant {
// 其他 // 其他
public static final String QT = "QT"; public static final String QT = "QT";
} }
/**
* 计划状态常量
*
* @author:songx
* @date:2024/2/22,13:57
*/
public static class planStatus {
// 计划中
public static final Integer S_0 = 0;
// 生产中
public static final Integer S_1 = 1;
}
} }
...@@ -217,6 +217,20 @@ public class HPSqlConstant { ...@@ -217,6 +217,20 @@ public class HPSqlConstant {
} }
/** /**
* HPSC003 SQL名称定义
*
* @author:songx
* @date:2024/2/5,10:16
*/
public class HPSC003 {
// 修改状态
public static final String UPDATE_STATUS = "HPSC003.updateStatus";
// 修改时间
public static final String UPDATE_DATE = "HPSC003.updateDate";
}
/**
* HPSC004 SQL名称定义 * HPSC004 SQL名称定义
* *
* @author:songx * @author:songx
...@@ -226,8 +240,14 @@ public class HPSqlConstant { ...@@ -226,8 +240,14 @@ public class HPSqlConstant {
// 锁 // 锁
public static final String LOCK = "HPSC004.lock"; public static final String LOCK = "HPSC004.lock";
// 更新时间完工情况 // 根据材料号删除
public static final String DELETE_BY_MAT = "HPSC004.deleteByMat";
// 更新计划完工情况
public static final String UPDATE_PLAN_DATE = "HPSC004.updatePlanDate";
// 更新实际完工情况
public static final String UPDATE_COMPLETE = "HPSC004.updateComplete"; public static final String UPDATE_COMPLETE = "HPSC004.updateComplete";
// 更新订单号
public static final String UPDATE_PROD_ORDER_NO = "HPSC004.updateProdOrderNo";
} }
/** /**
......
...@@ -81,7 +81,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -81,7 +81,7 @@ public class ServiceHPSC005A extends ServiceBase {
public EiInfo save(EiInfo inInfo) { public EiInfo save(EiInfo inInfo) {
try { try {
Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail"); Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail");
String prodOrderNo = MapUtils.getString(detailMap, "productionOrderNo"); String prodOrderNo = MapUtils.getString(detailMap, "prodOrderNo");
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 生产任务号 // 生产任务号
List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo"); List<String> prodTaskNos = ObjectUtils.listKey(resultRows, "prodTaskNo");
...@@ -121,7 +121,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -121,7 +121,7 @@ public class ServiceHPSC005A extends ServiceBase {
* @param fSc005a * @param fSc005a
*/ */
private void add(HPSC005 dbSc005, HPSC005A fSc005a) { private void add(HPSC005 dbSc005, HPSC005A fSc005a) {
String prodOrderNo = dbSc005.getProductionOrderNo(); String prodOrderNo = dbSc005.getProdOrderNo();
// 数据校验 // 数据校验
AssertUtils.isEmpty(fSc005a.getFactoryCode(), "请选择厂区"); AssertUtils.isEmpty(fSc005a.getFactoryCode(), "请选择厂区");
AssertUtils.isEmpty(fSc005a.getOrgNo(), "请选择生产组"); AssertUtils.isEmpty(fSc005a.getOrgNo(), "请选择生产组");
...@@ -145,7 +145,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -145,7 +145,7 @@ public class ServiceHPSC005A extends ServiceBase {
* @param mapSc005a * @param mapSc005a
*/ */
private void modify(HPSC005 dbSc005, HPSC005A fSc005a, Map<String, HPSC005A> mapSc005a) { private void modify(HPSC005 dbSc005, HPSC005A fSc005a, Map<String, HPSC005A> mapSc005a) {
String prodOrderNo = dbSc005.getProductionOrderNo(); String prodOrderNo = dbSc005.getProdOrderNo();
// 数据校验 // 数据校验
HPSC005A dbSc005a = mapSc005a.get(fSc005a.getProdTaskNo()); HPSC005A dbSc005a = mapSc005a.get(fSc005a.getProdTaskNo());
AssertUtils.isGt(dbSc005a.getCompleteNum(), fSc005a.getNum(), AssertUtils.isGt(dbSc005a.getCompleteNum(), fSc005a.getNum(),
...@@ -168,7 +168,7 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -168,7 +168,7 @@ public class ServiceHPSC005A extends ServiceBase {
public EiInfo delete(EiInfo inInfo) { public EiInfo delete(EiInfo inInfo) {
try { try {
Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail"); Map detailMap = EiInfoUtils.getFirstRow(inInfo, "detail");
String prodOrderNo = MapUtils.getString(detailMap, "productionOrderNo"); String prodOrderNo = MapUtils.getString(detailMap, "prodOrderNo");
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows(); List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
for (Map resultRow : resultRows) { for (Map resultRow : resultRows) {
HPSC005A fSc005a = new HPSC005A(); HPSC005A fSc005a = new HPSC005A();
...@@ -220,14 +220,15 @@ public class ServiceHPSC005A extends ServiceBase { ...@@ -220,14 +220,15 @@ public class ServiceHPSC005A extends ServiceBase {
// 校验主订单是否已分派 // 校验主订单是否已分派
HPSC005 dbSc005 = HPSCTools.HpSc005.getById(Long.parseLong(orderId)); HPSC005 dbSc005 = HPSCTools.HpSc005.getById(Long.parseLong(orderId));
AssertUtils.isTrue(!ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005.getStatus()), AssertUtils.isTrue(!ProdOrderStatusEnum.NOT_ASSIGN.getCode().equals(dbSc005.getStatus()),
String.format("生产订单[%s]已分派,不能在进行批量分派,请检查!", dbSc005.getProductionOrderNo())); String.format("生产订单[%s]已分派,不能在进行批量分派,请检查!", dbSc005.getProdOrderNo()));
HPSC005A newSc005a = new HPSC005A();
// 更新订单主表数量 // 更新订单主表数量
HPSCTools.checkAssignedNum(dbSc005.getProductionOrderNo(), dbSc005.getNum()); HPSCTools.checkAssignedNum(dbSc005.getProdOrderNo(), dbSc005.getNum());
// 写入子表数据 // 写入子表数据
HPSC005A newSc005a = new HPSC005A();
newSc005a.setProdTaskNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PROD_TASK_NO, newSc005a.setProdTaskNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PROD_TASK_NO,
new String[]{dbSc005.getProductionOrderNo()})); new String[]{dbSc005.getProdOrderNo()}));
newSc005a.setProdOrderNo(dbSc005.getProductionOrderNo()); newSc005a.setProdOrderNo(dbSc005.getProdOrderNo());
newSc005a.setNum(dbSc005.getNum()); newSc005a.setNum(dbSc005.getNum());
newSc005a.setTotalWt(newSc005a.getNum().multiply(dbSc005.getUnitWt())); newSc005a.setTotalWt(newSc005a.getNum().multiply(dbSc005.getUnitWt()));
newSc005a.setOrgNo(dbPz011.getGroupCode()); newSc005a.setOrgNo(dbPz011.getGroupCode());
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap namespace="HPSC003"> <sqlMap namespace="HPSC003">
<sql id="condition"> <sql id="condition">
...@@ -59,6 +59,13 @@ ...@@ -59,6 +59,13 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<!-- 公共修改字段 -->
<sql id="updateRevise">
UPDATED_BY = #updatedBy#, <!-- 修改人 -->
UPDATED_NAME = #updatedName#, <!-- 修改人名称 -->
UPDATED_TIME = #updatedTime# <!-- 修改时间 -->
</sql>
<select id="query" parameterClass="java.util.HashMap" <select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hpjx.hp.sc.domain.HPSC003"> resultClass="com.baosight.hpjx.hp.sc.domain.HPSC003">
SELECT SELECT
...@@ -195,12 +202,17 @@ ...@@ -195,12 +202,17 @@
UPDATE hpjx.T_HPSC003 UPDATE hpjx.T_HPSC003
SET SET
PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 --> PLAN_COMPLETION_DATE = #planCompletionDate#, <!-- 计划完成日期 -->
UPDATED_BY = #updatedBy#, <!-- 更新人 --> <include refid="updateRevise"/>
UPDATED_TIME = #updatedTime# <!-- 更新时间 --> WHERE PLAN_INFO_NO = #planInfoNo#
WHERE
COMPANY_CODE = #companyCode#
AND PROJ_CODE = #projCode#
AND PLAN_INFO_NO = #planInfoNo#
</update> </update>
<!-- 修改状态 -->
<update id="updateStatus">
UPDATE hpjx.T_HPSC003
SET
STATUS = #status#,
<include refid="updateRevise"/>
WHERE ID = #id#
</update>
</sqlMap> </sqlMap>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
A.ID as "id", A.ID as "id",
A.PROJ_CODE as "projCode", <!-- 项目编码 --> A.PROJ_CODE as "projCode", <!-- 项目编码 -->
A.PROJ_NAME as "projName", <!-- 项目名称 --> A.PROJ_NAME as "projName", <!-- 项目名称 -->
A.PRODUCTION_ORDER_NO as "productionOrderNo", <!-- 生产订单号 --> A.PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
A.PRDT_CODE as "prdtCode", <!-- 部件编码 --> A.PRDT_CODE as "prdtCode", <!-- 部件编码 -->
A.PRDT_NAME as "prdtName", <!-- 部件名称 --> A.PRDT_NAME as "prdtName", <!-- 部件名称 -->
A.PRDT_SPEC as "prdtSpec", A.PRDT_SPEC as "prdtSpec",
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
A.ID = #id# A.ID = #id#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo"> <isNotEmpty prepend=" AND " property="prodOrderNo">
A.PRODUCTION_ORDER_NO LIKE CONCAT('%', #productionOrderNo#, '%') A.PROD_ORDER_NO LIKE CONCAT('%', #prodOrderNo#, '%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode"> <isNotEmpty prepend=" AND " property="projCode">
A.PROJ_CODE = #projCode# A.PROJ_CODE = #projCode#
......
...@@ -3,22 +3,21 @@ package com.baosight.hpjx.hp.sc.tools; ...@@ -3,22 +3,21 @@ package com.baosight.hpjx.hp.sc.tools;
import com.baosight.hpjx.core.dao.DaoBase; import com.baosight.hpjx.core.dao.DaoBase;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPSqlConstant; import com.baosight.hpjx.hp.constant.HPSqlConstant;
import com.baosight.hpjx.hp.kc.domain.HPKC001; import com.baosight.hpjx.hp.sc.domain.HPSC001;
import com.baosight.hpjx.hp.kc.domain.HPKC003; import com.baosight.hpjx.hp.sc.domain.HPSC002;
import com.baosight.hpjx.hp.kc.domain.HPKC005; import com.baosight.hpjx.hp.sc.domain.HPSC003;
import com.baosight.hpjx.hp.kc.domain.HPKC010; import com.baosight.hpjx.hp.sc.domain.HPSC004;
import com.baosight.hpjx.hp.pz.domain.HPPZ004; import com.baosight.hpjx.hp.sc.domain.HPSC005;
import com.baosight.hpjx.hp.sc.domain.*; import com.baosight.hpjx.hp.sc.domain.HPSC005A;
import com.baosight.hpjx.hp.sc.domain.HPSC005B;
import com.baosight.hpjx.hp.sc.domain.HPSC006;
import com.baosight.hpjx.hp.sc.domain.HPSC007;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.DateUtils; import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtils; import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.exception.PlatException;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -131,7 +130,7 @@ public class HPSCTools { ...@@ -131,7 +130,7 @@ public class HPSCTools {
* @param prdtCode * @param prdtCode
* @return * @return
*/ */
public static HPSC002 get(String prdtCode) { public static HPSC002 getByPrdt(String prdtCode) {
AssertUtils.isEmpty(prdtCode, "部件编码不能为空"); AssertUtils.isEmpty(prdtCode, "部件编码不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("prdtCode", prdtCode); queryMap.put("prdtCode", prdtCode);
...@@ -139,6 +138,35 @@ public class HPSCTools { ...@@ -139,6 +138,35 @@ public class HPSCTools {
AssertUtils.isNull(results, String.format("部件编码[%s]信息不存在", prdtCode)); AssertUtils.isNull(results, String.format("部件编码[%s]信息不存在", prdtCode));
return results.get(0); return results.get(0);
} }
/**
* 查询节点
*
* @param id
* @return
*/
public static HPSC002 get(Long id) {
AssertUtils.isNull(id, "节点ID不能为空");
Map queryMap = new HashMap();
queryMap.put("id", id);
List<HPSC002> results = DaoBase.getInstance().query("HPSC002.queryEntityByParentPrtdCode", queryMap);
AssertUtils.isNull(results, String.format("节点ID[%s]信息不存在", id));
return results.get(0);
}
/**
* 查询叶子节点
*
* @param parentId
* @return
*/
public static List<HPSC002> queryByParent(String parentId) {
AssertUtils.isEmpty(parentId, "节点ID不能为空");
Map queryMap = new HashMap();
queryMap.put("parentId", parentId);
return DaoBase.getInstance().query("HPSC002.queryEntityByParentPrtdCode", queryMap);
}
} }
/** /**
...@@ -163,6 +191,48 @@ public class HPSCTools { ...@@ -163,6 +191,48 @@ public class HPSCTools {
AssertUtils.isNull(results, String.format("物料ID[%s]信息不存在", id)); AssertUtils.isNull(results, String.format("物料ID[%s]信息不存在", id));
return results.get(0); return results.get(0);
} }
/**
* 查询
*
* @param matId 物料ID
* @return
*/
public static HPSC003 queryByMat(Long matId) {
AssertUtils.isNull(matId, "物料ID不能为空");
Map queryMap = new HashMap();
queryMap.put("matId", matId);
List<HPSC003> results = DaoBase.getInstance().query(HPSC003.QUERY, queryMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 修改状态
*
* @param id
* @param status
*/
public static void updateStatus(Long id, Integer status) {
AssertUtils.isNull(id, "节点ID不能为空");
Map map = new HashMap();
map.put("id", id);
map.put("status", status);
DaoUtils.update(HPSqlConstant.HPSC003.UPDATE_STATUS, map);
}
/**
* 修改计划完成时间
*
* @param planInfoNo
* @param planCompletionDate
*/
public static void updateDate(String planInfoNo, String planCompletionDate) {
AssertUtils.isNull(planInfoNo, "计划号不能为空");
Map map = new HashMap();
map.put("planInfoNo", planInfoNo);
map.put("planCompletionDate", planCompletionDate);
DaoUtils.update(HPSqlConstant.HPSC003.UPDATE_DATE, map);
}
} }
/** /**
...@@ -204,6 +274,21 @@ public class HPSCTools { ...@@ -204,6 +274,21 @@ public class HPSCTools {
} }
/** /**
* 根据材料号删除
*
* @param matId
* @return
*/
public static void deleteByMat(Long matId) {
if (matId == null) {
return;
}
Map queryMap = new HashMap();
queryMap.put("matId", matId);
DaoBase.getInstance().update(HPSqlConstant.HPSC004.DELETE_BY_MAT, queryMap);
}
/**
* 查询 * 查询
* *
* @param prodOrderNo * @param prodOrderNo
...@@ -212,11 +297,38 @@ public class HPSCTools { ...@@ -212,11 +297,38 @@ public class HPSCTools {
public static HPSC004 get(String prodOrderNo) { public static HPSC004 get(String prodOrderNo) {
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空"); AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("productionOrderNo", prodOrderNo); queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap); List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单号[%s]信息不存在", prodOrderNo)); AssertUtils.isNull(results, String.format("生产订单号[%s]信息不存在", prodOrderNo));
return results.get(0); return results.get(0);
} }
/**
* 查询
*
* @param matId 物料ID
* @return
*/
public static HPSC004 queryByMat(Long matId) {
AssertUtils.isNull(matId, "物料ID不能为空");
Map queryMap = new HashMap();
queryMap.put("matId", matId);
List<HPSC004> results = DaoBase.getInstance().query(HPSC004.QUERY, queryMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
/**
* 根据父级ID查询
*
* @param parentId
* @return
*/
public static List<HPSC004> queryByParent(String parentId) {
AssertUtils.isNull(parentId, "计划ID不能为空");
Map queryMap = new HashMap();
queryMap.put("parentId", parentId);
return DaoBase.getInstance().query(HPSC004.QUERY, queryMap);
}
} }
/** /**
...@@ -327,7 +439,7 @@ public class HPSCTools { ...@@ -327,7 +439,7 @@ public class HPSCTools {
public static HPSC005 get(String prodOrderNo) { public static HPSC005 get(String prodOrderNo) {
AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空"); AssertUtils.isEmpty(prodOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap(); Map queryMap = new HashMap();
queryMap.put("productionOrderNo", prodOrderNo); queryMap.put("prodOrderNo", prodOrderNo);
List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap); List<HPSC005> results = DaoBase.getInstance().query(HPSC005.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", prodOrderNo)); AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", prodOrderNo));
return results.get(0); return results.get(0);
...@@ -474,8 +586,6 @@ public class HPSCTools { ...@@ -474,8 +586,6 @@ public class HPSCTools {
/** /**
* 更新已完成数量 * 更新已完成数量
* *
* @param prodTaskNo
* @param completeNum
*/ */
public static void updateCompleteNum(Long id, BigDecimal actualCompletionNum,BigDecimal actualCompletionTotalWt, public static void updateCompleteNum(Long id, BigDecimal actualCompletionNum,BigDecimal actualCompletionTotalWt,
Integer status, String actualCompletionDate) { Integer status, String actualCompletionDate) {
......
...@@ -214,7 +214,10 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils { ...@@ -214,7 +214,10 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils {
if (StringUtils.isBlank(dateTime)) { if (StringUtils.isBlank(dateTime)) {
return dateTime; return dateTime;
} }
return dateTime.replaceAll("-", "").replaceAll(":", "").replaceAll(" ", ""); return dateTime.replaceAll("-", "")
.replaceAll("/", "")
.replaceAll(":", "")
.replaceAll(" ", "");
} }
} }
...@@ -192,7 +192,7 @@ $(function () { ...@@ -192,7 +192,7 @@ $(function () {
*/ */
onDelete: function (e) { onDelete: function (e) {
// 不向后台保存 // 不向后台保存
console.log(e) console.log("DELETE -> ", e)
var tree = $("#materialTree").data("kendoTreeView"); var tree = $("#materialTree").data("kendoTreeView");
var inInfo = new EiInfo(); var inInfo = new EiInfo();
EiCommunicator.send("HPSC002", "queryTreeNode", inInfo, {//传入参数 EiCommunicator.send("HPSC002", "queryTreeNode", inInfo, {//传入参数
...@@ -213,7 +213,6 @@ $(function () { ...@@ -213,7 +213,6 @@ $(function () {
field: "operator", field: "operator",
title: "操作", title: "操作",
template: function (item) { template: function (item) {
console.log(item)
let auditStatus = item.status; let auditStatus = item.status;
let lv = item.lv let lv = item.lv
let template = ''; let template = '';
......
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
<EF:EFGrid blockId="result" autoDraw="override" checkMode="single"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="single">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="level" cname="层级" hidden="true"/> <EF:EFColumn ename="level" cname="层级" hidden="true"/>
<EF:EFColumn enable="false" ename="projCode" cname="项目编码"/> <EF:EFColumn enable="false" ename="projCode" cname="项目编码" hidden="true"/>
<EF:EFColumn enable="false" ename="projName" cname="项目名称"/> <EF:EFColumn enable="false" ename="projName" cname="项目名称" hidden="true"/>
<%--<EF:EFComboColumn cname="部件类型" ename="prdtType" width="90" align="center" required="true" <%--<EF:EFComboColumn cname="部件类型" ename="prdtType" width="90" align="center" required="true"
columnTemplate="#=textField#" columnTemplate="#=textField#"
itemTemplate="#=textField#" itemTemplate="#=textField#"
...@@ -107,4 +107,4 @@ ...@@ -107,4 +107,4 @@
let ctx="${ctx}"; let ctx="${ctx}";
</script> </script>
<script src="${ctx}/HP/SC/HPSC002.js"></script> <script src="${ctx}/HP/SC/HPSC002.js"></script>
\ No newline at end of file
$(function () { $(function () {
$("#QUERY").on("click", function () { $("#QUERY").on("click", query);
query();
});
IPLATUI.EFGrid = { IPLATUI.EFGrid = {
"result" : { "result": {
pageable: { pageable: {
pageSize: 20, pageSize: 20,
pageSizes: [10, 20, 50, 70, 100], pageSizes: [10, 20, 50, 70, 100],
}, },
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){ template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + 'onclick="showUploadFile(' + item.matId + ')" >附件清单</a>';
+ 'onclick="showUploadFile(' + item.matId + ')" >附件清单</a>'; }
} if (auditStatus == 0) {
if (auditStatus == 0) { template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" '
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' + +
'onclick="check(' + item.id + ',1)" >提交</a>'; 'onclick="check(' + item.id + ',1)" >提交</a>';
} }
/*else { /*else {
template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' + template += '<a hidden="hidden" style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',0)" >撤回</a>'; 'onclick="check(' + item.id + ',0)" >撤回</a>';
}*/ }*/
return template; return template;
} }
}, }, {
{ field: "planCompletionDate",
field: "planCompletionDate", template: function (item) {
template: function (item){ let auditStatus = item.status;
let auditStatus = item.status; let template = '';
let template = ''; if (auditStatus == 1) {
if (auditStatus == 1){ template += 'this.blur();';
template += 'this.blur();'; }
} return template;
return template; }
} }],
} onSuccess: function (e) {
], if (e.eiInfo.extAttr.methodName == 'update'
onSuccess: function (e) { || e.eiInfo.extAttr.methodName == 'insert') {
if(e.eiInfo.extAttr.methodName == 'update' query();
||e.eiInfo.extAttr.methodName == 'insert'){ }
query(); },
} onRowClick: function (e) {
}, var block = detailGrid.getEiBlock();
onRowClick : function(e) { if (block != null) {
var block = detailGrid.getEiBlock(); block.setRows([]);
if (block != null) { detailGrid.setEiBlock(block);
block.setRows([]); }
detailGrid.setEiBlock(block); var info = new EiInfo()
} var parentId = e.model['planInfoNo'];
var info = new EiInfo() info.set("parentId", parentId);
var parentId = e.model['planInfoNo']; EiCommunicator.send("HPSC004", "queryDetail", info, {
info.set("parentId",parentId); onSuccess: function (ei) {//返回结果集
EiCommunicator.send("HPSC004","queryDetail",info,{ detailGrid.setEiInfo(ei);
onSuccess:function(ei){//返回结果集 }, onFail: function (ei) {
detailGrid.setEiInfo(ei); }
},onFail:function(ei){} }, {async: false});
},{async:false}); },
}, },
},
"detail":{ "detail":{
toolbarConfig: { toolbarConfig: {
// hidden: false, // true时,不显示功能按钮,但保留setting导出按钮 // hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
...@@ -103,7 +98,7 @@ $(function () { ...@@ -103,7 +98,7 @@ $(function () {
var btnNode = $(this); var btnNode = $(this);
//禁用按钮 //禁用按钮
btnNode.attr("disabled", true); btnNode.attr("disabled", true);
IPLAT.submitNode($("#HPSC003"), "HPSC003", "updateHPSC0004", { IPLAT.submitNode($("#HPSC003"), "HPSC003", "updatePlanDetail", {
onSuccess: function (ei) { onSuccess: function (ei) {
if (ei["status"] == -1) { if (ei["status"] == -1) {
NotificationUtil(ei, "error"); NotificationUtil(ei, "error");
...@@ -126,7 +121,6 @@ $(function () { ...@@ -126,7 +121,6 @@ $(function () {
btnNode.attr("disabled", false); btnNode.attr("disabled", false);
} }
}); });
}, },
afterEdit: function (e) { afterEdit: function (e) {
if (e.field === "planCompletionDate") { if (e.field === "planCompletionDate") {
...@@ -141,24 +135,20 @@ $(function () { ...@@ -141,24 +135,20 @@ $(function () {
} }
} }
}, },
columns: [ columns: [{
{ field: "operator",
field: "operator", title: "操作",
title: "操作", template: function (item) {
template: function (item) { let filePath1 = item.filePath1;
let filePath1 = item.filePath1; let template = '';
let template = ''; if (filePath1) {
if (filePath1) { template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>';
+ 'onclick="showUploadFile(' + filePath1 + ')" >附件清单</a>'; }
} return template
return template }
} }]
}
],
} }
} }
//部件类型下拉联动 //部件类型下拉联动
...@@ -223,7 +213,7 @@ function check(id, auditStatus) { ...@@ -223,7 +213,7 @@ function check(id, auditStatus) {
} }
else { else {
// 提交通过,生成 // 提交通过,生成
EiCommunicator.send('HPSC003', 'checkHPSC0003', inEiInfo, { EiCommunicator.send('HPSC003', 'submitPlan', inEiInfo, {
onSuccess(response) { onSuccess(response) {
NotificationUtil(response.msg); NotificationUtil(response.msg);
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
...@@ -272,8 +262,9 @@ function check(id, auditStatus) { ...@@ -272,8 +262,9 @@ function check(id, auditStatus) {
} }
let query = function () { let query = function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
function check_time(model,rows){ function check_time(model,rows){
......
...@@ -4,21 +4,12 @@ ...@@ -4,21 +4,12 @@
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %> <%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/> <c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
<%-- <link rel="stylesheet" href="${ctx}/css/simulatedOperation.css"/>--%>
</head>
<EF:EFPage title="生产计划">
<EF:EFRegion id="inqu" title="查询条件" align-item="center"><%-- type="query" efRegionShowClear="true" efRegionSave="true"--%>
<div class="row" > <%-- blockId="inqu_status" --%> <EF:EFPage title="生产计划">
<EF:EFRegion id="inqu" title="查询条件" align-item="center">
<div class="row" >
<EF:EFInput blockId="inqu_status" ename="projCode" colWidth="3" cname="项目编号:" /> <EF:EFInput blockId="inqu_status" ename="projCode" colWidth="3" cname="项目编号:" />
<EF:EFInput blockId="inqu_status" ename="projName" colWidth="3" cname="项目名称:" /> <EF:EFInput blockId="inqu_status" ename="projName" colWidth="3" cname="项目名称:" />
<%--<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 ename="inqu_status-0-prdtCode" cname="部件名称" filter="contains" required="false" colWidth="3" <EF:EFSelect ename="inqu_status-0-prdtCode" cname="部件名称" filter="contains" required="false" colWidth="3"
template="#=textField#" valueTemplate="#=valueField#" defaultValue="请选择"> template="#=textField#" valueTemplate="#=valueField#" defaultValue="请选择">
<EF:EFOption label="请选择" value=""/> <EF:EFOption label="请选择" value=""/>
...@@ -32,7 +23,6 @@ ...@@ -32,7 +23,6 @@
<EF:EFOption label="已提交" value="1"/> <EF:EFOption label="已提交" value="1"/>
</EF:EFSelect> </EF:EFSelect>
</div> </div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</EF:EFRegion> </EF:EFRegion>
<EF:EFRegion id="result" title="基本信息"> <EF:EFRegion id="result" title="基本信息">
...@@ -48,8 +38,8 @@ ...@@ -48,8 +38,8 @@
<EF:EFColumn enable="false" ename="prdtName" cname="部件名称" readonly="true"/> <EF:EFColumn enable="false" ename="prdtName" cname="部件名称" readonly="true"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/> <EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/> <EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" editType="date" dateFormat="yyyy/MM/dd" width="150" <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" width="150" editType="date"
required='true'/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required='true'/>
<EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" readonly="true"/> <EF:EFColumn enable="false" ename="schedule" cname="生产完工进度" format="{0:N2}" readonly="true"/>
<EF:EFComboColumn enable="false" ename="status" cname="状态"> <EF:EFComboColumn enable="false" ename="status" cname="状态">
<EF:EFOption label="未提交" value="0"/> <EF:EFOption label="未提交" value="0"/>
...@@ -73,24 +63,18 @@ ...@@ -73,24 +63,18 @@
<EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零部件名称"/> <EF:EFColumn enable="false" ename="prdtName" readonly="true" cname="零部件名称"/>
<EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/> <EF:EFColumn enable="false" ename="spec" cname="规格" readonly="true"/>
<EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/> <EF:EFColumn enable="false" ename="remark" cname="备注" readonly="true"/>
<%-- <EF:EFComboColumn enable="false" ename="delStatus" cname="状态">--%>
<%-- <EF:EFOption label="已删除" value="0"/>--%>
<%-- <EF:EFOption label="启用" value="1"/>--%>
<%-- </EF:EFComboColumn>--%>
<EF:EFColumn enable="false" ename="num" readonly="true" cname="数量"/> <EF:EFColumn enable="false" ename="num" readonly="true" cname="数量"/>
<EF:EFColumn enable="false" ename="unitWt" readonly="true" cname="单重"/> <EF:EFColumn enable="false" ename="unitWt" readonly="true" cname="单重"/>
<EF:EFColumn ename="totalWt" cname="总重" enable="false"/> <EF:EFColumn ename="totalWt" cname="总重" enable="false"/>
<EF:EFColumn ename="planCommentDate" required='true' cname="计划开始时间" editType="date" dateFormat="yyyy/MM/dd" width="150"/> <EF:EFColumn ename="planCommentDate" required='true' cname="计划开始时间" width="150" editType="date"
<EF:EFColumn ename="planCompletionDate" required='true' cname="计划结束时间" editType="date" dateFormat="yyyy/MM/dd" width="150"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="actualCompletionDate" cname="完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150" <EF:EFColumn ename="planCompletionDate" required='true' cname="计划结束时间" width="150" editType="date"
enable="false"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="actualCompletionDate" cname="完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150"
enable="false"/>
<EF:EFColumn enable="false" ename="actualCompletionNum" cname="完成数量" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionNum" cname="完成数量" readonly="true"/>
<EF:EFColumn enable="false" ename="actualCompletionUnitWt" cname="完成总重" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionUnitWt" cname="完成总重" readonly="true"/>
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/> <EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HP/SC/HPSC003.js"></script>
...@@ -19,7 +19,7 @@ $(function () { ...@@ -19,7 +19,7 @@ $(function () {
field: "operator", field: "operator",
template: function (item) { template: function (item) {
let status = item.status; let status = item.status;
let prodOrderNo = item.productionOrderNo; let prodOrderNo = item.prodOrderNo;
let filePath1 = item.filePath1; let filePath1 = item.filePath1;
let template = ''; let template = '';
// 非全部派工时展示拆单派工按钮 // 非全部派工时展示拆单派工按钮
...@@ -49,7 +49,7 @@ function query() { ...@@ -49,7 +49,7 @@ function query() {
/** /**
* 拆单派工 * 拆单派工
* *
* @param productionOrderNo * @param prodOrderNo
*/ */
function tearAssign(prodOrderNo) { function tearAssign(prodOrderNo) {
JSColorbox.open({ JSColorbox.open({
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<EF:EFPage title="生产订单"> <EF:EFPage title="生产订单">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput cname="生产订单号" blockId="inqu_status" ename="productionOrderNo" row="0" colWidth="3"/> <EF:EFInput cname="生产订单号" blockId="inqu_status" ename="prodOrderNo" row="0" colWidth="3"/>
<EF:EFInput cname="项目号" blockId="inqu_status" ename="projCode" row="0" colWidth="3"/> <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="projName" row="0" colWidth="3"/>
<EF:EFInput cname="部件名称" blockId="inqu_status" ename="prdtName" row="0" colWidth="3"/> <EF:EFInput cname="部件名称" blockId="inqu_status" ename="prdtName" row="0" colWidth="3"/>
...@@ -39,14 +39,15 @@ ...@@ -39,14 +39,15 @@
<EF:EFColumn ename="prdtSpec" 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="partName" cname="零件名称" enable="false" width="120" align="center"/>
<EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="120" align="center"/> <EF:EFColumn ename="partSpec" cname="零件规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"/> <EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"
editType="date" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']"/>
<EF:EFColumn ename="assignedNum" cname="已派工数量" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="assignedNum" cname="已派工数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="num" cname="计划数量" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="num" cname="计划数量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="totalWt" cname="计划重量" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="totalWt" cname="计划重量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="remark" cname="部件备注" enable="false"/> <EF:EFColumn ename="remark" cname="部件备注" enable="false"/>
<EF:EFColumn ename="remark1" cname="零件备注" enable="false"/> <EF:EFColumn ename="remark1" cname="零件备注" enable="false"/>
<EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/> <EF:EFColumn ename="projCode" cname="项目号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="140" align="center"/> <EF:EFColumn ename="prodOrderNo" cname="生产订单号" enable="false" width="140" align="center"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" 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:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
</EF:EFGrid> </EF:EFGrid>
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-projCode" 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"/> <EF:EFInput ename="detail-0-projName" cname="项目名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-productionOrderNo" cname="生产订单号" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-prodOrderNo" cname="生产订单号" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/> <EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
......
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