Commit 2010f86b by 971729

修改HPSC003

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