修改单据模块编辑时列表中删除的方法
This commit is contained in:
@@ -1065,7 +1065,7 @@
|
|||||||
iconCls:'icon-remove',
|
iconCls:'icon-remove',
|
||||||
handler:function()
|
handler:function()
|
||||||
{
|
{
|
||||||
removeit(); //删除
|
batchDel(); //删除
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -2839,13 +2839,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//删除
|
//删除
|
||||||
function removeit(){
|
function batchDel(){
|
||||||
/**
|
/**
|
||||||
* 重写一下删除的逻辑
|
* 重写一下删除的逻辑
|
||||||
* 获取所有选中行,直接从列表中移除
|
* 获取所有选中行,直接从列表中移除
|
||||||
* 点击保存时,将需要后台删除的数据提交到服务器
|
* 点击保存时,将需要后台删除的数据提交到服务器
|
||||||
* **/
|
* **/
|
||||||
var materialData=$('#materialData');
|
var materialData=$('#materialData');
|
||||||
var row = materialData.datagrid('getChecked');
|
var row = materialData.datagrid('getChecked');
|
||||||
if(row.length == 0)
|
if(row.length == 0)
|
||||||
{
|
{
|
||||||
@@ -2864,6 +2864,12 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function removeit(){
|
||||||
|
if (editIndex == undefined) { return }
|
||||||
|
$('#materialData').datagrid('cancelEdit', editIndex)
|
||||||
|
.datagrid('deleteRow', editIndex);
|
||||||
|
editIndex = undefined;
|
||||||
|
}
|
||||||
//撤销
|
//撤销
|
||||||
function reject() {
|
function reject() {
|
||||||
$('#materialData').datagrid('rejectChanges');
|
$('#materialData').datagrid('rejectChanges');
|
||||||
|
|||||||
Reference in New Issue
Block a user