Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
ee7b5ad5
Commit
ee7b5ad5
authored
Feb 26, 2019
by
qiankunpingtai
Browse files
修改单据模块编辑时列表中删除的方法
parent
86b9ae90
Changes
1
Hide whitespace changes
Inline
Side-by-side
erp_web/js/pages/materials/in_out.js
View file @
ee7b5ad5
...
...
@@ -2840,10 +2840,29 @@
}
//删除
function removeit(){
if (editIndex == undefined) { return }
$('#materialData').datagrid('cancelEdit', editIndex)
.datagrid('deleteRow', editIndex);
editIndex = undefined;
/**
* 重写一下删除的逻辑
* 获取所有选中行,直接从列表中移除
* 点击保存时,将需要后台删除的数据提交到服务器
* **/
var materialData=$('#materialData');
var row = materialData.datagrid('getChecked');
if(row.length == 0)
{
$.messager.alert('删除提示','没有记录被选中!','info');
return;
}
if(row.length > 0)
{
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条单据信息吗?',function(r)
{
if (r) {
for(var i = 0 ;i < row.length;i++) {
materialData.datagrid('deleteRow',materialData.datagrid("getRowIndex",row[i]));
}
}
});
}
}
//撤销
function reject() {
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment