Commit 242f2d64 authored by 21471731's avatar 21471731

租赁物导入调整10

parent af6c7120
...@@ -69,6 +69,7 @@ ...@@ -69,6 +69,7 @@
var records = record.getSelected(); var records = record.getSelected();
var datas= record.getAll(); var datas= record.getAll();
var len = records.length; var len = records.length;
var lens = datas.length;
if (len == 0) { if (len == 0) {
Leaf.showMessage('${l:PROMPT}','请选择一条记录!'); Leaf.showMessage('${l:PROMPT}','请选择一条记录!');
return; return;
...@@ -89,12 +90,12 @@ ...@@ -89,12 +90,12 @@
msg: '操作成功', msg: '操作成功',
duration: 2000 duration: 2000
}); });
if(datas.length==1){ var count=(lens-len);
$(ds_id).query(); if(count==0){
success_delete_after(count);
}else{ }else{
success_delete_after(); success_delete_after(count);
} }
}, },
error: function() { error: function() {
}, },
...@@ -104,15 +105,13 @@ ...@@ -104,15 +105,13 @@
}); });
}; };
function success_delete_after(){ function success_delete_after(count){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item_list'); var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project_lease_item_list');
var record = $(ds_id);
var data= record.getAt(0);
if(data!=null){
Leaf.request({ Leaf.request({
url: $('prj501N_lease_item_list_delete_link').getUrl(), url: $('prj501N_lease_item_list_delete_link').getUrl(),
para:{ para:{
project_lease_item_id:'${/parameter/@project_lease_item_id}' project_lease_item_id:'${/parameter/@project_lease_item_id}',
count:count
}, },
success: function() { success: function() {
$(ds_id).query(); $(ds_id).query();
...@@ -122,7 +121,7 @@ ...@@ -122,7 +121,7 @@
failure: function() {}, failure: function() {},
scope: this scope: this
}); });
}
} }
//保存 //保存
......
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