Commit c85d2d39 by wancheng

物料清单前端校验优化

parent 927336c3
...@@ -95,7 +95,6 @@ public class ServiceHPSC002 extends ServiceBase { ...@@ -95,7 +95,6 @@ public class ServiceHPSC002 extends ServiceBase {
this.modify(hpsc002); this.modify(hpsc002);
} }
} }
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT); inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!"); inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) { } catch (Exception e) {
......
...@@ -109,13 +109,43 @@ ...@@ -109,13 +109,43 @@
</isNotEmpty> </isNotEmpty>
</sql> </sql>
<sql id="condition1">
<isNotEmpty prepend=" AND " property="id">
A.ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
A.PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
A.PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
A.PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
A.PRDT_NAME LIKE CONCAT('%', #prdtName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventRecordId">
A.INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
A.PROJ_NAME LIKE CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
A.STATUS = #status#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="lv">
A.LV = #lv#
</isNotEmpty>
</sql>
<sql id="order"> <sql id="order">
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="order"> <isNotEmpty property="order">
$order$ $order$
</isNotEmpty> </isNotEmpty>
<isEmpty property="order"> <isEmpty property="order">
ID DESC A.ID DESC
</isEmpty> </isEmpty>
</dynamic> </dynamic>
</sql> </sql>
...@@ -128,7 +158,7 @@ ...@@ -128,7 +158,7 @@
WHERE 1=1 WHERE 1=1
AND PARENT_ID NOT IN ('root') AND PARENT_ID NOT IN ('root')
AND DEL_STATUS = 0 AND DEL_STATUS = 0
<include refid="condition"/> <include refid="condition1"/>
<include refid="order"/> <include refid="order"/>
</select> </select>
......
...@@ -178,14 +178,7 @@ $(function () { ...@@ -178,14 +178,7 @@ $(function () {
onSave: function (e) { onSave: function (e) {
e.preventDefault(); e.preventDefault();
saveFunc(); saveFunc();
// 不向后台保存
var tree = $("#materialTree").data("kendoTreeView");
var inInfo = new EiInfo();
EiCommunicator.send("HPSC002", "queryTreeNode", inInfo, {//传入参数
onSuccess: function (inInfo) {
setTimeout(function(){ tree.reload("root");}, 500);//更新树
}
});
}, },
/** /**
* 点击Grid删除按钮时触发的事件 * 点击Grid删除按钮时触发的事件
...@@ -195,15 +188,7 @@ $(function () { ...@@ -195,15 +188,7 @@ $(function () {
onDelete: function (e) { onDelete: function (e) {
e.preventDefault(); e.preventDefault();
deleteFunc(); deleteFunc();
// 不向后台保存
console.log("DELETE -> ", e)
var tree = $("#materialTree").data("kendoTreeView");
var inInfo = new EiInfo();
EiCommunicator.send("HPSC002", "queryTreeNode", inInfo, {//传入参数
onSuccess: function (inInfo) {
tree.reload("root");//更新树
}
});
}, },
toolbarConfig: { toolbarConfig: {
hidden: false, // true时,不显示功能按钮,但保留setting导出按钮 hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
...@@ -506,6 +491,14 @@ $(window).load(function () { ...@@ -506,6 +491,14 @@ $(window).load(function () {
*/ */
let query = function () { let query = function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
//更新树
var tree = $("#materialTree").data("kendoTreeView");
var inInfo = new EiInfo();
EiCommunicator.send("HPSC002", "queryTreeNode", inInfo, {//传入参数
onSuccess: function (inInfo) {
tree.reload("root");//更新树
}
});
} }
function openUploadFile(id) { function openUploadFile(id) {
uploadFileWindow.open().center(); uploadFileWindow.open().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