Commit a54d3302 by yukang

处理相关BUG

parent 7bbe9a1e
......@@ -11,6 +11,7 @@ import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ011;
import com.baosight.hpjx.hp.pz.tools.HPPZTools;
import com.baosight.hpjx.hp.sc.domain.*;
import com.baosight.hpjx.hp.sc.tools.HPSCTools;
import com.baosight.hpjx.hp.xs.domain.Org;
import com.baosight.hpjx.hp.xs.tools.HPXSTools;
import com.baosight.hpjx.util.AssertUtils;
......@@ -141,6 +142,8 @@ public class ServiceHPSC006 extends ServiceBase {
}
DaoUtils.insert("HPSC006.insert",HPSC006);
}
//刷新
inInfo = this.refreshHPSC006(inInfo, productionOrderNo);
inInfo.setStatus(EiConstant.STATUS_SUCCESS);
inInfo.setMsg("新增成功!");
......@@ -152,9 +155,13 @@ public class ServiceHPSC006 extends ServiceBase {
logError("新增失败", e.getMessage());
return inInfo;
}
return query(inInfo);
return inInfo;
}
private EiInfo refreshHPSC006(EiInfo inInfo, String productionOrderNo) {
List<HPSC006> HPSC006 = HPSCTools.Hpsc006.get(productionOrderNo);
inInfo.addBlock(CommonConstant.Field.DETAIL).addRows(HPSC006);
return inInfo;
}
/**
* 修改操作.
*/
......
......@@ -137,18 +137,20 @@ public class HPSCTools {
//总量
int num2 = NumberUtils.toint(list2.get(0));
if (num1 == 0) {
//都已经提交
Map map4 = new HashMap();
map4.put("projCode",projCode);
map4.put("materialStatus",2);
DaoUtils.update("HPSC001.checkByProjCode",map4);
} else if (num1 > 0 && num1 < num2) {
// 部分提交
Map map4 = new HashMap();
map4.put("projCode",projCode);
map4.put("materialStatus",1);
DaoUtils.update("HPSC001.checkByProjCode",map4);
if (num2 > 0) {
if (num1 == 0) {
//都已经提交
Map map4 = new HashMap();
map4.put("projCode",projCode);
map4.put("materialStatus",2);
DaoUtils.update("HPSC001.checkByProjCode",map4);
} else if (num1 > 0 && num1 < num2) {
// 部分提交
Map map4 = new HashMap();
map4.put("projCode",projCode);
map4.put("materialStatus",1);
DaoUtils.update("HPSC001.checkByProjCode",map4);
}
}
}
......@@ -829,6 +831,21 @@ public class HPSCTools {
AssertUtils.isNull(results, String.format("生产下料ID[%s]信息不存在", id));
return results.get(0);
}
/**
* 查询
*
* @param prodOrderNo
* @return
*/
public static List<HPSC006> get(String productionOrderNo) {
AssertUtils.isEmpty(productionOrderNo, "生产订单号不能为空");
Map queryMap = new HashMap();
queryMap.put("productionOrderNo", productionOrderNo);
List<HPSC006> results = DaoBase.getInstance().query(HPSC006.QUERY, queryMap);
AssertUtils.isNull(results, String.format("生产订单[%s]信息不存在", productionOrderNo));
return results;
}
}
public static class Hpsc007 {
......
......@@ -20,7 +20,7 @@
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-spec" cname="规格" colWidth="3" filter="contains">
<EF:EFSelect ename="inqu_status-0-spec" cname="规格(MM)" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="spec_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
......@@ -30,7 +30,6 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFInput ename="inqu_result-0-hpsc006Id" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" autoFit="true" checkMode="row">
<EF:EFColumn ename="id" cname="库存ID" enable="false" width="60" align="center"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="false" width="10" align="center">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" />
</EF:EFComboColumn>
......@@ -42,7 +41,7 @@
blockName="invent_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventRecordId" cname="规格" enable="false" width="100" align="center"
<EF:EFComboColumn ename="inventRecordId" cname="规格(MM)" enable="false" width="100" align="center"
blockName="invent_spec_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
......@@ -50,8 +49,8 @@
<EF:EFColumn ename="applyRemark" cname="申请说明" width="150" editType="textarea" copy="true"/>
<EF:EFColumn ename="amount" cname="库存数量" enable="false" width="120" align="right" format="{0:N0}"
sumType="all"/>
<EF:EFColumn ename="unitWeight" cname="单量" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="库存重量" enable="false" width="120" align="right" format="{0:N3}"
<EF:EFColumn ename="unitWeight" cname="单量(KG)" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="库存重量(KG)" enable="false" width="120" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="150"/>
</EF:EFGrid>
......
......@@ -22,9 +22,11 @@ $(function () {
template: function (item) {
let auditStatus = item.status;
let template = '';
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',1)" >提交</a>';
if (auditStatus) {
if (auditStatus == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
'onclick="check(' + item.id + ',1)" >提交</a>';
}
}
// else if (auditStatus == 1) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;" ' +
......
......@@ -100,6 +100,7 @@ $(function () {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete'){
query();
refreshTree();
}
},
query: function () {
......@@ -396,8 +397,7 @@ $(function () {
NotificationUtil({msg: ei.msg, detailMsg: ei.detailMsg}, "error");
} else {
NotificationUtil(ei.msg);
var tree = $("#materialTree").data("kendoTreeView");
setTimeout(function(){ tree.reload("root");}, 500);//更新树
refreshTree();
query();
}
},
......@@ -492,6 +492,17 @@ $(window).load(function () {
let query = function () {
resultGrid.dataSource.page(1);
}
let refreshTree = function () {
//更新树
var tree = $("#materialTree").data("kendoTreeView");
var inInfo = new EiInfo();
EiCommunicator.send("HPSC002", "queryTreeNode", inInfo, {//传入参数
onSuccess: function (inInfo) {
tree.reload("root");//更新树
}
});
}
function openUploadFile(id) {
uploadFileWindow.open().center();
// rowId = id;
......
......@@ -169,6 +169,8 @@ function check(id, auditStatus,planInfoNo) {
EiCommunicator.send('HPSC003', 'submitPlan', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
console.log(response)
autoProductionschedul();
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
......@@ -216,6 +218,17 @@ function check(id, auditStatus,planInfoNo) {
}
/**
* 自动排产提示
*/
let autoProductionschedul = function () {
JSUtils.confirm(" 生产计划提交成功,已生成生产订单!是否自动排产? ", {
ok: function () {
console.log('1111')
}
});
}
let query = function () {
resultGrid.dataSource.page(1);
}
......
......@@ -15,13 +15,13 @@
</div>
<div class="row">
<EF:EFInput ename="detail-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-prdtLength" cname="部件长" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-prdtWidth" 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="部件厚" colWidth="4" readonly="true"/>
<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="部件重量" 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"/>
......@@ -31,24 +31,24 @@
<EF:EFInput ename="detail-0-partName" cname="零件名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-partLength" cname="零件长" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partWidth" cname="零件宽" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-partThick" cname="零件厚" colWidth="4" readonly="true"/>
<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="零件重量" 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-assignedNum" cname="派工数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="派工重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="派工重量(T)" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-unassignedNum" cname="剩余数量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-unTotalWt" 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"/>
<EF:EFInput ename="detail-0-actualCompletionTotalWt" cname="完成重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-actualCompletionTotalWt" cname="完成重量(T)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFDatePicker ename="detail-0-planCompletionDate" cname="计划完成日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
......@@ -68,7 +68,7 @@
<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="零件规格" blockId="result" ename="partSpec" 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"/>
......@@ -77,7 +77,7 @@
</div>--%>
<div class="row">
<EF:EFInput cname="任务数量" blockId="result" ename="num" row="0" colWidth="4" readonly="true"/>
<EF:EFInput cname="任务重量" blockId="result" ename="totalWt" row="0" colWidth="4" readonly="true"/>
<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"/>
</div>
<div class="row">
......
......@@ -456,8 +456,11 @@ function saveFunc() {
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("detail", "HPSC006", "insert", true);
query();
JSUtils.submitGridsData("detail", "HPSC006", "insert", true,
function (e) {
query();
detailGrid.setEiInfo(e);
});
}
});
}
......
......@@ -45,7 +45,7 @@
<EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" width="140" enable="false" readonly="false"/>
<EF:EFColumn ename="operator" cname="操作" width="200" enable="false" readonly="false"/>
<EF:EFColumn enable="false" ename="reqNum" cname="领料记录" width="80" align="center" readonly="true"/>
<%-- <EF:EFComboColumn cname="材料类型" ename="inventType" width="80" align="center" required="true" >--%>
......@@ -77,7 +77,7 @@
<EF:EFColumn ename="unitWt" format="{0:N3}" width="80" cname="单重(T)" maxLength="12" displayType="0.000"
data-regex="/^-?[0-9]{1,9}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置9位整数和3位小数!"/>
<EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" width="80" maxLength="12" displayType="0.000" cname="总重"/>
<EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" width="80" maxLength="12" displayType="0.000" cname="总重(T)"/>
<EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center" defaultValue=""
filter="contains" readonly="true">
......
......@@ -15,13 +15,13 @@
</div>
<div class="row">
<EF:EFInput ename="result-0-prdtName" cname="部件名称" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-prdtLength" cname="部件长" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-prdtWidth" cname="部件宽" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-prdtLength" cname="部件长(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-prdtWidth" cname="部件宽(MM)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-prdtThick" cname="部件厚" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-prdtThick" cname="部件厚(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-num" cname="部件数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-unitWt" cname="部件重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-unitWt" cname="部件重量(T)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-remark" cname="部件备注" colWidth="4" readonly="true"/>
......@@ -31,24 +31,24 @@
<EF:EFInput ename="result-0-partName" cname="零件名称" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-partLength" cname="零件长" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partWidth" cname="零件宽" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partThick" cname="零件厚" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partLength" cname="零件长(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partWidth" cname="零件宽(MM)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-partThick" cname="零件厚(MM)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-remark1" cname="零件备注" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-num" cname="零件数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-unitWt" cname="零件重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-unitWt" cname="零件重量(T)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-assignedNum" cname="派工数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-totalWt" cname="派工重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-totalWt" cname="派工重量(T)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-unassignedNum" cname="剩余数量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-unTotalWt" cname="剩余重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-unTotalWt" cname="剩余重量(T)" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-completeNum" cname="完成数量" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-actualCompletionTotalWt" cname="完成重量" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-actualCompletionTotalWt" cname="完成重量(T)" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFDatePicker ename="result-0-planCompletionDate" cname="计划完成日期" role="date" format="yyyy-MM-dd" parseFormats="['yyyyMMdd']" colWidth="4" readonly="true" />
......
......@@ -58,15 +58,15 @@
blockName="invent_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventRecordId" cname="规格" enable="false" width="120" align="center"
<EF:EFComboColumn ename="inventRecordId" cname="规格(MM)" enable="false" width="120" align="center"
blockName="invent_spec_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="amount" cname="数量" enable="false" format="{0:N0}" maxLength="20" width="100"
align="right"/>
<EF:EFColumn ename="unitWeight" cname="单重" enable="false" format="{0:N3}" maxLength="20" width="100"
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" format="{0:N3}" maxLength="20" width="100"
align="right"/>
<EF:EFColumn ename="weight" cname="重量" enable="false" format="{0:N3}" maxLength="20" width="100"
<EF:EFColumn ename="weight" cname="重量(KG)" enable="false" format="{0:N3}" maxLength="20" width="100"
align="right"/>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="100" align="center"/>
<EF:EFColumn ename="oldReqNo" cname="原领料单号" enable="false" width="140" align="center"/>
......
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