Commit 2010f86b by 971729

修改HPSC003

parent 57b86b96
...@@ -35,10 +35,10 @@ ...@@ -35,10 +35,10 @@
DOCUMENT_DATE = #documentDate# DOCUMENT_DATE = #documentDate#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="prodNo"> <isNotEmpty prepend=" AND " property="prodNo">
PROD_NO = #prodNo# PROD_NO LIKE ('%$prodNo$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="productionOrderNo"> <isNotEmpty prepend=" AND " property="productionOrderNo">
PRODUCTION_ORDER_NO = #productionOrderNo# PRODUCTION_ORDER_NO LIKE ('%$productionOrderNo$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode"> <isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode# WH_CODE = #whCode#
......
...@@ -155,7 +155,7 @@ public class ServiceHPSC003 extends ServiceBase { ...@@ -155,7 +155,7 @@ public class ServiceHPSC003 extends ServiceBase {
return eiInfo; return eiInfo;
} }
/** /**下·
* 根据ID获取详情 * 根据ID获取详情
* @param eiInfo * @param eiInfo
* @return * @return
......
...@@ -8,31 +8,34 @@ ...@@ -8,31 +8,34 @@
<EF:EFPage title="生产入库单"> <EF:EFPage title="生产入库单">
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFDatePicker ename="inqu_status-0-documentDate" cname="单据日期" colWidth="3" format="yyyy-MM-dd"
/> <EF:EFInput ename="inqu_status-0-productionOrderNo" cname="生产订单号" colWidth="3"/>
<EF:EFInput ename="inqu_status-0-prodNo" cname="生产入库单号" colWidth="3"/> <EF:EFInput ename="inqu_status-0-prodNo" cname="生产入库单号" colWidth="3"/>
<EF:EFDatePicker ename="inqu_status-0-documentDate" cname="单据日期" colWidth="3" format="yyyy-MM-dd"
/>
<EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains"> <EF:EFSelect cname="存货类型" ename="inqu_status-0-inventType" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="仓库名称" ename="inqu_status-0-whCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
</div> </div>
<div class="row"> <div class="row">
<EF:EFSelect cname="仓库名称" ename="inqu_status-0-whCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains" defultValue=""> <EF:EFSelect cname="存货名称" ename="inqu_status-0-inventCode" colWidth="3" filter="contains" defultValue="">
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0"> <%-- <EF:EFSelect cname="是否删除" ename="inqu_status-0-deleteFlag" colWidth="3" defaultValue="0">--%>
<EF:EFOption label="全部" value=""/> <%-- <EF:EFOption label="全部" value=""/>--%>
<EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/> <%-- <EF:EFCodeOption codeName="hpjx.hpjx.deleteFlag"/>--%>
</EF:EFSelect> <%-- </EF:EFSelect>--%>
<EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status" <%-- <EF:EFDateSpan startCname="创建日期(从)" endCname="至" blockId="inqu_status"--%>
startName="createdDateFrom" endName="createdDateTo" row="0" role="date" <%-- startName="createdDateFrom" endName="createdDateTo" row="0" role="date"--%>
format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true"> <%-- format="yyyy-MM-dd" ratio="3:3" satrtRatio="4:8" endRatio="4:8" readonly="true">--%>
</EF:EFDateSpan> <%-- </EF:EFDateSpan>--%>
</div> </div>
</EF:EFRegion> </EF:EFRegion>
......
...@@ -161,7 +161,7 @@ function check(id, auditStatus) { ...@@ -161,7 +161,7 @@ function check(id, auditStatus) {
onSuccess(ei) { onSuccess(ei) {
var model=ei.get("model"); var model=ei.get("model");
if(!model.planCompletionDate) { if(!model.planCompletionDate) {
NotificationUtil("审核失败!原因:基本息中计划完成日期未填写", "error"); NotificationUtil("审核失败!原因:基本息中计划完成日期未填写", "error");
return; return;
} else { } else {
//审核 //审核
...@@ -175,20 +175,34 @@ function check(id, auditStatus) { ...@@ -175,20 +175,34 @@ function check(id, auditStatus) {
if (count > 0) { if (count > 0) {
NotificationUtil("审核失败!原因:明细信息中有未填写的计划开始时间或计划结束时间", "error"); NotificationUtil("审核失败!原因:明细信息中有未填写的计划开始时间或计划结束时间", "error");
} else { } else {
//审核通过,生成 EiCommunicator.send('HPSC004','queryDetail',inEiInfo,{
EiCommunicator.send('HPSC003', 'checkHPSC0003', inEiInfo, { onSuccess(ei){
onSuccess(response) { var rows = ei.blocks.detail.rows;
NotificationUtil(response.msg); var res = check_time(model,rows);
resultGrid.dataSource.page(1); if (!res){
}, NotificationUtil("计划结束时间应该大于计划开始时间!", "error");
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
} }
}, else {
{ // 审核通过,生成
async: false EiCommunicator.send('HPSC003', 'checkHPSC0003', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
},
{
async: false
}
);
}
} }
); })
} }
} else { } else {
NotificationUtil("审核失败!未找到明细信息", "error"); NotificationUtil("审核失败!未找到明细信息", "error");
...@@ -219,3 +233,19 @@ function check(id, auditStatus) { ...@@ -219,3 +233,19 @@ function check(id, auditStatus) {
} }
function check_time(model,rows){
for (var i=0;i<rows.length;i++){
if (model.planInfoNo == rows[i][5]) {
var start_time = rows[i][22];
var end_time = rows[i][23];
if (end_time < start_time) {
return false;
}
}
}
return true;
}
\ No newline at end of file
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