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