Commit ca516ba6 by wuwenlong

生产订单bugfix

parent 529e2e8f
...@@ -68,7 +68,7 @@ public class HGConstant { ...@@ -68,7 +68,7 @@ public class HGConstant {
//生产计划单 //生产计划单
public static final String HGSC005_PLAN_CODE = "HGSC005_PLAN_CODE"; public static final String HGSC005_PLAN_CODE = "HGSC005_PLAN_CODE";
//生产订单 //生产订单
public static final String HPSC006_ORDER_CODE = "HPSC006_ORDER_CODE"; public static final String HGSC006_ORDER_CODE = "HGSC006_ORDER_CODE";
//生产任务订单 //生产任务订单
public static final String PROD_TASK_NO = "PROD_TASK_NO"; public static final String PROD_TASK_NO = "PROD_TASK_NO";
//售后维修单号 //售后维修单号
......
...@@ -48,7 +48,7 @@ public class ServiceHGSC005A extends ServiceBase { ...@@ -48,7 +48,7 @@ public class ServiceHGSC005A extends ServiceBase {
} }
@OperationLogAnnotation(operModul = "生产计划详情", operType = "保存", operDesc = "保存计划详情") @OperationLogAnnotation(operModul = "生产计划详情", operType = "保存", operDesc = "保存计划详情")
public EiInfo save(EiInfo inInfo){ public EiInfo update(EiInfo inInfo){
try { try {
List<HGSC005A> hgsc005AList = MapUtils.toDaoEPBase(inInfo, HGSC005A.class); List<HGSC005A> hgsc005AList = MapUtils.toDaoEPBase(inInfo, HGSC005A.class);
// 数据校验 // 数据校验
...@@ -84,6 +84,8 @@ public class ServiceHGSC005A extends ServiceBase { ...@@ -84,6 +84,8 @@ public class ServiceHGSC005A extends ServiceBase {
HGSC005 hgsc005 = HGSCTools.THGSC005.queryByPlanCode(planCode); HGSC005 hgsc005 = HGSCTools.THGSC005.queryByPlanCode(planCode);
this.checkScheduleData(hgsc005); this.checkScheduleData(hgsc005);
int count = HGSCTools.THGSC005A.schedule(planCode); int count = HGSCTools.THGSC005A.schedule(planCode);
hgsc005.setIsSchedule(CommonConstant.YesNo.YES_1);
DaoUtils.update(HGSC005.UPDATE,hgsc005);
inInfo = this.query(inInfo); inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + count + "]条数据排产成功!"); inInfo.setMsg("操作成功!本次对[" + count + "]条数据排产成功!");
......
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
created_name = #createdName# created_name = #createdName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime"> <isNotEmpty prepend=" AND " property="createdTime">
created_time = #createdTime# date_format(created_time,'%Y-%m-%d') = #createdTime#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy"> <isNotEmpty prepend=" AND " property="updatedBy">
updated_by = #updatedBy# updated_by = #updatedBy#
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
$orderBy$ $orderBy$
</isNotEmpty> </isNotEmpty>
<isEmpty property="orderBy"> <isEmpty property="orderBy">
id asc id desc
</isEmpty> </isEmpty>
</dynamic> </dynamic>
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
created_name = #createdName# created_name = #createdName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime"> <isNotEmpty prepend=" AND " property="createdTime">
created_time = #createdTime# date_format(created_time,'%Y-%m-%d') = #createdTime#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy"> <isNotEmpty prepend=" AND " property="updatedBy">
updated_by = #updatedBy# updated_by = #updatedBy#
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
created_name = #createdName# created_name = #createdName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime"> <isNotEmpty prepend=" AND " property="createdTime">
created_time = #createdTime# date_format(created_time,'%Y-%m-%d') = #createdTime#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy"> <isNotEmpty prepend=" AND " property="updatedBy">
updated_by = #updatedBy# updated_by = #updatedBy#
......
...@@ -436,7 +436,7 @@ public class HGSCTools { ...@@ -436,7 +436,7 @@ public class HGSCTools {
public static HGSC006 constructObj(HGSC005 hgsc005){ public static HGSC006 constructObj(HGSC005 hgsc005){
HGSC006 hgsc006 = new HGSC006(); HGSC006 hgsc006 = new HGSC006();
hgsc006.setOrderCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HPSC006_ORDER_CODE)); hgsc006.setOrderCode(SequenceGenerator.getNextSequence(HGConstant.SequenceId.HGSC006_ORDER_CODE));
hgsc006.setMatId(hgsc005.getMatId()); hgsc006.setMatId(hgsc005.getMatId());
hgsc006.setPlanId(hgsc005.getId()); hgsc006.setPlanId(hgsc005.getId());
hgsc006.setCompanyCode(hgsc005.getCompanyCode()); hgsc006.setCompanyCode(hgsc005.getCompanyCode());
......
...@@ -29,11 +29,15 @@ ...@@ -29,11 +29,15 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="matId" cname="物料清单ID" hidden="true"/>
<EF:EFColumn ename="companyCode" cname="公司编码" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="160" align="center" /> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="160" align="center" />
<EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="createdTime" cname="生产计划日期" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="createdTime" cname="生产计划日期" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="planCode" cname="生产计划单号" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="planCode" cname="生产计划单号" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="finishDate" cname="交货日期" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="finishDate" cname="交货日期" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="finishRate" cname="生产完工进度" format="{0:0}%" editType="text" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="finishRate" cname="生产完工进度" format="{0:0}%" editType="text" enable="true" width="120" align="center" readOnly="true"/>
......
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
<EF:EFColumn ename="processName" cname="工序" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="processName" cname="工序" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="finishDate" cname="交货日期" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="finishDate" cname="交货日期" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="planStartDate" cname="计划开工日期" width="120" enable="true" align="center" editType="date" <EF:EFColumn ename="planStartDate" cname="计划开工日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
<EF:EFColumn ename="planEndDate" cname="计划完工日期" width="120" enable="true" align="center" editType="date" <EF:EFColumn ename="planEndDate" cname="计划完工日期" width="120" enable="true" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyy-MM-dd']" required="true"/>
<EF:EFColumn ename="quantity" cname="计划数量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="quantity" cname="计划数量" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="finishQuantity" cname="完成数量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="finishQuantity" cname="完成数量" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="unfinishQuantity" cname="未完成数量" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="unfinishQuantity" cname="未完成数量" width="120" enable="true" align="center" readOnly="true"/>
......
...@@ -15,7 +15,7 @@ $(function () { ...@@ -15,7 +15,7 @@ $(function () {
field: "operator", field: "operator",
template: function (item) { template: function (item) {
let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' + let template = '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" ' +
'onclick="showInfo(' + item.orderCode + ')" >计划详情</a>'; 'onclick="showInfo(\'' + item.orderCode + '\')" >计划详情</a>';
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>';
return template; return template;
......
...@@ -29,11 +29,12 @@ ...@@ -29,11 +29,12 @@
<EF:EFRegion id="result" title="记录集"> <EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="100" align="center" /> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="160" align="center" />
<EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="projCode" cname="项目编码" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="createdTime" cname="生产订单日期" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="createdTime" cname="生产订单日期" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="orderCode" cname="生产订单编号" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="orderCode" cname="生产订单编号" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFComboColumn ename="assignStatus" cname="派工状态" width="80" align="center" required="true" <EF:EFComboColumn ename="assignStatus" cname="派工状态" width="80" align="center" required="true"
readonly="true"> readonly="true">
......
...@@ -16,7 +16,7 @@ $(function () { ...@@ -16,7 +16,7 @@ $(function () {
let template = ""; let template = "";
if(item.unassignQuantity > 0 ){ if(item.unassignQuantity > 0 ){
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="separateAssign(\'' + item.id + '\')" >拆单派工</a>'; + 'onclick="separateAssign(\'' + item.orderCode + '\')" >拆单派工</a>';
} }
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="showTaskInfo(' + item.id + ')" >任务详情</a>'; 'onclick="showTaskInfo(' + item.id + ')" >任务详情</a>';
...@@ -99,8 +99,13 @@ function assign() { ...@@ -99,8 +99,13 @@ function assign() {
function separateAssign(id){ function separateAssign(id){
JSColorbox.open({
href: "HPSC006B?methodName=initLoad&inqu_status-0-orderCode=" + orderCode,
title: "<div style='text-align: center;'>拆单派工</div>",
width: "80%",
height: "90%",
callbackName: separateAssignCallback
});
} }
function showTaskInfo(orderDetailId) { function showTaskInfo(orderDetailId) {
...@@ -110,4 +115,16 @@ function showTaskInfo(orderDetailId) { ...@@ -110,4 +115,16 @@ function showTaskInfo(orderDetailId) {
// width: "90%", // width: "90%",
// height: "90%" // height: "90%"
// }); // });
} }
\ No newline at end of file
/**
* 拆单分派回调
*/
function separateAssignCallback(ei) {
if (ei.getStatus() >= 0) {
// 刷新列表
resultGrid.dataSource.page(1);
// 关闭弹窗
JSColorbox.close();
}
}
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="100" align="center" /> <EF:EFColumn ename="operator" cname="操作" locked="true" enable="true" width="100" align="center" />
<EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="companyName" cname="公司名称" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="createdTime" cname="生产订单日期" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="createdTime" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" cname="生产订单日期" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="orderCode" cname="生产订单编号" enable="true" width="120" align="center" readOnly="true"/> <EF:EFColumn ename="orderCode" cname="生产订单编号" enable="true" width="120" align="center" readOnly="true"/>
<EF:EFColumn ename="productCode" cname="产品编码" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="productCode" cname="产品编码" width="120" enable="true" align="center" readOnly="true"/>
<EF:EFColumn ename="productName" cname="产品名称" width="120" enable="true" align="center" readOnly="true"/> <EF:EFColumn ename="productName" cname="产品名称" width="120" enable="true" align="center" readOnly="true"/>
......
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();
}
}
}
});
<!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"/>
<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"/>
<EF:EFInput ename="detail-0-unitWt" 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"/>
<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"/>
<EF:EFInput ename="detail-0-unTotalWt" cname="剩余重量(T)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-completeNum" cname="完成数量" colWidth="4" readonly="true"/>
</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>
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