解决单据明细删除的bug
This commit is contained in:
parent
70ecb4df75
commit
b39c4b0043
@ -1216,15 +1216,11 @@
|
||||
}
|
||||
},100);
|
||||
},
|
||||
//单行单列的点击事件
|
||||
onClickCell: function(index, field) {
|
||||
if (editIndex != index) {
|
||||
if (inOutService.endEditing()) {
|
||||
if(field == "op") {
|
||||
$(this).datagrid('deleteRow', index);
|
||||
var body =$("#depotHeadFM .datagrid-view2 .datagrid-body");
|
||||
var footer =$("#depotHeadFM .datagrid-view2 .datagrid-footer");
|
||||
inOutService.statisticsFun(body,0,0,0,footer,0);
|
||||
} else {
|
||||
if(field != "op") {
|
||||
$(this).datagrid('beginEdit', index);
|
||||
var ed = $(this).datagrid('getEditor', {index: index, field: field});
|
||||
if(ed){
|
||||
@ -1264,6 +1260,7 @@
|
||||
$('#materialData').datagrid('getRows')[editIndex]['AnotherDepotName'] = AnotherDepotName;
|
||||
}
|
||||
$('#materialData').datagrid('endEdit', editIndex);
|
||||
this.autoReckon();
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
@ -1568,10 +1565,6 @@
|
||||
if(tipInfo){
|
||||
if(tipInfo.code!=200){
|
||||
$.messager.alert('提示', tipInfo.msg, 'warning');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
self.autoReckon();
|
||||
}
|
||||
return;
|
||||
}
|
||||
$.messager.alert('提示','保存成功!','info');
|
||||
@ -1613,10 +1606,6 @@
|
||||
if(tipInfo){
|
||||
if(tipInfo.code!=200){
|
||||
$.messager.alert('提示', tipInfo.msg, 'warning');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
$('#materialData').datagrid('selectRow', i).datagrid('beginEdit', i);
|
||||
self.autoReckon();
|
||||
}
|
||||
return;
|
||||
}
|
||||
$.messager.alert('提示','保存成功!','info');
|
||||
|
||||
@ -619,6 +619,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
@ -604,6 +604,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
@ -605,6 +605,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
@ -625,6 +625,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
@ -618,6 +618,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
@ -750,6 +750,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
@ -879,6 +879,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
@ -706,6 +706,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
@ -766,6 +766,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
@ -801,6 +801,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
@ -792,6 +792,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
@ -750,6 +750,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
@ -956,6 +956,9 @@
|
||||
});
|
||||
data.footer = array;
|
||||
$("#materialData").datagrid('loadData',data);
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
inOutService.autoReckon();
|
||||
}
|
||||
$("#depotHeadFM .datagrid-view2 .datagrid-footer").find("[field='op'] img").hide();
|
||||
if(type === "add") {
|
||||
$("#depotHeadDlg #append").click(); //新增行
|
||||
|
||||
Loading…
Reference in New Issue
Block a user