Commit 0e6e1ba0 by yukang

Merge branch 'dev' of https://gitlab.baocloud.cn/bggf/smart/hp-smart into dev

parents 47a3711e f346785e
......@@ -137,7 +137,7 @@ public class ServiceHPSC001 extends ServiceBase {
eiInfo.setStatus(EiConstant.STATUS_SUCCESS);
eiInfo.setMsg("删除成功!");
return eiInfo;
return query(eiInfo);
}
......
......@@ -112,7 +112,7 @@
A.FILE_PATH1 as "filePath1", <!-- 文件地址1 -->
A.INVENT_RECORD_ID as "inventRecordId", <!-- 存货档案ID -->
CONCAT(
format((ifnull( A.ACTUAL_COMPLETION_NUM , 0 ) / ifnull(A.TOTAL_WT, 0 ) * 100),2)
format((ifnull( A.ACTUAL_COMPLETION_TOTAL_WT , 0 ) / ifnull(A.TOTAL_WT, 0 ) * 100),2)
,'%') AS "cutSchedule",
B.PRDT_NAME AS "prdtName",
B.PART_NAME AS "partName"
......@@ -233,7 +233,7 @@
SELECT
<include refid="column2"/>
FROM ${hpjxSchema}.T_HPSC006 A LEFT JOIN ${hpjxSchema}.T_HPSC005 B ON A.PROJ_CODE=B.PROJ_CODE
AND A.PRODUCTION_ORDER_NO=B.PROD_ORDER_NO
AND A.PRODUCTION_ORDER_NO=B.PROD_ORDER_NO WHERE 1=1
<include refid="condition" />
<include refid="order" />
</select>
......
......@@ -4,6 +4,11 @@ $(function () {
resultGrid.dataSource.page(1);
});
$("#DELETE").on("click", function () {
alert(1);
return false;
});
IPLATUI.EFGrid.result = {
......@@ -29,6 +34,24 @@ $(function () {
}
}
],
onSave: function (e) {
// 阻止默认请求,使用自定义保存
e.preventDefault();
saveFunc();
},
onDelete: function (e) {
// 阻止默认请求,使用自定义删除
e.preventDefault();
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
}
}
});
......@@ -38,7 +61,8 @@ function check(id, auditStatus) {
inEiInfo.set("result-0-status", auditStatus);
EiCommunicator.send('HPSC001', 'check', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
//NotificationUtil(response.msg);
message("提交成功,已生成项目档案");
resultGrid.dataSource.page(1);
},
onFail(errorMessage, status, e) {
......@@ -50,3 +74,79 @@ function check(id, auditStatus) {
}
);
}
/**
* 保存
*/
function saveFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let projType= item.get("projType");
let projName= item.get("projName");
let princ1= item.get("princ1");
let princ2= item.get("princ2");
if(projType===""){
message("选中的第"+(index+1)+"行\"项目类型\",不能为空!");
flag = false;
return false;
}
if(projName===""){
message("选中的第"+(index+1)+"行\"项目名称\",不能为空!");
flag = false;
return false;
}
if(princ1===""){
message("选中的第"+(index+1)+"行\"项目负责人\",不能为空!");
flag = false;
return false;
}
if(princ2===""){
message("选中的第"+(index+1)+"行\"客户负责人\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC001", "insert", true);
}
});
}
}
/**
* 删除
*/
function deleteFunc() {
let rows = resultGrid.getCheckedRows();
if (rows.length < 1) {
message("请选择数据");
return;
}
let flag = true;
$.each(rows, function(index, item) {
let status= item.get("status");
if(status==="1"){
message("选中的第"+(index+1)+"行记录未提交,不能删除!");
flag = false;
return false;
}
});
if(flag){
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"删除\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC001", "delete", true);
}
});
}
}
function query() {
resultGrid.dataSource.page(1);
}
......@@ -39,6 +39,7 @@
<EF:EFColumn ename="factoryName" cname="厂区名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="prdtName" cname="部件名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="partName" cname="零件名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventName" cname="材料名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="orgName" cname="生产组名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="planCompletionDate" cname="计划完成日期" enable="false" width="120" align="center"/>
<EF:EFColumn enable="false" ename="cutSchedule" cname="下料进度" format="{0:N2}" width="80" readonly="true" align="center"/>
......
......@@ -21,6 +21,10 @@
</div>
<div class="row">
<EF:EFInput ename="detail-0-material" cname="材质" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-totalWt" cname="总量" colWidth="4" readonly="true"/>
<EF:EFInput ename="detail-0-actualCompletionTotalWt" cname="完成重量" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="detail-0-cutSchedule" cname="下料进度" format="{0:N2}" colWidth="4" readonly="true"/>
<EF:EFSelect ename="detail-0-status" cname="状态" colWidth="4" readonly="true">
<EF:EFOption label="计划中" value="0"/>
......
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