Commit 61f94a4e authored by 38823's avatar 38823

茂甲控制保证金测试问题修复

parent 71b9de55
...@@ -14,6 +14,9 @@ ...@@ -14,6 +14,9 @@
</bm:operation> </bm:operation>
<bm:operation name="insert"> <bm:operation name="insert">
<bm:parameters>
<bm:parameter name="margin_check_id" dataType="java.lang.Long" input="false" output="true"/>
</bm:parameters>
<bm:update-sql><![CDATA[ <bm:update-sql><![CDATA[
begin begin
margin_check_req_pkg.margin_check_save( margin_check_req_pkg.margin_check_save(
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" <a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true"
dynamiccreateenabled="true" trace="true"> dynamiccreateenabled="true" trace="true">
<a:init-procedure><a:model-query model="csh.CSH531F.csh_transaction_recoi_check_wfl" rootPath="wfl_status"/> <a:init-procedure>
<a:model-query model="csh.CSH531F.csh_transaction_recoi_check_wfl" rootPath="wfl_status"/>
<a:model-query model="csh.CSH531F.csh_transaction_recoi_check_query" rootPath="margin_check"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/> <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
...@@ -48,43 +50,44 @@ ...@@ -48,43 +50,44 @@
// 提交审批 // 提交审批
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { // window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
var ds_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds'; // var ds_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
var record= $(ds_id).getSelected()[0]; // var record= $(ds_id).getSelected()[0];
var marginId=record.get('margin_check_id'); // var marginId=record.get('margin_check_id');
var wflStatus=record.data.wfl_status; // var wflStatus=record.data.wfl_status;
if(wflStatus == 'APPROVING' || wflStatus == 'APPROVED' || wflStatus == 'REJECT'){ // if(wflStatus == 'APPROVING' || wflStatus == 'APPROVED' || wflStatus == 'REJECT'){
Leaf.showErrorMessage('提示', '只有新建的单据才可以提交审批'); // Leaf.showErrorMessage('提示', '只有新建的单据才可以提交审批');
return false; // return false;
} // }
Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS.ARE_YOU_SURE_TO_SUBMIT}', function() { // Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS.ARE_YOU_SURE_TO_SUBMIT}', function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); // window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({ // Leaf.request({
url: $('${/parameter/@layout_code}_csh531_margin_check_submit_link_id').getUrl(), // url: $('${/parameter/@layout_code}_csh531_margin_check_submit_link_id').getUrl(),
para: { // para: {
margin_check_id: marginId, // margin_check_id: marginId,
}, // },
success: function(res) { // success: function(res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close(); // $('${/parameter/@winid}').close();
Leaf.SideBar.show({ // Leaf.SideBar.show({
msg: '操作成功', // msg: '操作成功',
duration: 200 // duration: 200
}); // });
}, // },
failure: function() { // failure: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, // },
error: function() { // error: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); // window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}, // },
scope: this // scope: this
}); // });
}); // });
} // }
//自定义保存 //自定义提交审批保存
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
debugger;
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = 'MARGIN_CHECK_F_QUERY_csh_margin_check_ds'; var ds_id = 'MARGIN_CHECK_F_QUERY_csh_margin_check_ds';
var ds_result_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds'; var ds_result_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
...@@ -101,27 +104,52 @@ ...@@ -101,27 +104,52 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} }
if($(ds_result_id)){ if($(ds_result_id)){
var record=$(ds_result_id).getAll(); var record=$(ds_result_id).getAll();
if (record.length != 1) {
for (var i = 0; i < record.length; i++) { for (var i = 0; i < record.length; i++) {
if (record[i].get('wfl_status') == 'NEW' || record[i].get('wfl_status') == 'APPROVING') { if (record[i].get('wfl_status') == 'APPROVING') {
Leaf.showErrorMessage('提示', '当前系统中已有新建/审批中单据,请审批结束后再新建'); Leaf.showErrorMessage('提示', '当前系统中已有审批中单据,请审批结束后再提交审批');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} }
} }
}
} }
Leaf.request({ Leaf.request({
url: $('${/parameter/@layout_code}_csh531_margin_check_save_link_id').getUrl(), url: $('${/parameter/@layout_code}_csh531_margin_check_save_link_id').getUrl(),
para: params, para: params,
success: function(res) { success: function(res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.SideBar.show({ debugger;
msg: '操作成功', Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS.ARE_YOU_SURE_TO_SUBMIT}', function() {
duration: 200 window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var marginCheckId=res.result.margin_check_id;
Leaf.request({
url: $('${/parameter/@layout_code}_csh531_margin_check_submit_link_id').getUrl(),
para: {
margin_check_id: marginCheckId,
},
success: function(res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@winid}').close();
Leaf.SideBar.show({
msg: '操作成功',
duration: 200
});
},
failure: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this
});
}); });
// Leaf.SideBar.show({
// msg: '操作成功',
// duration: 200
// });
var ds_result_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds'; var ds_result_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
$(ds_result_id).query(); $(ds_result_id).query();
$(ds_id).query(); $(ds_id).query();
......
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