Commit c6345238 authored by 38823's avatar 38823

茂甲控制保证金上线页面完善

parent 06239775
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="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:view>
<a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="${/parameter/@layout_code}_csh531_margin_check_submit_link_id" model="csh.CSH531F.csh_transaction_recoi_check_wfl" modelaction="execute"/>
<a:link id="${/parameter/@layout_code}_csh531_margin_check_save_link_id" model="csh.CSH531F.csh_transaction_recoi_check_wfl" modelaction="insert"/>
<script type="text/javascript"><![CDATA[
$L.onReady(function () {
if("${/parameter/@function_usage}" == 'QUERY'){
if(document.getElementById('${/parameter/@layout_code}_user_button1')){
$jq('#${/parameter/@layout_code}_user_button1').hide();
}
if(document.getElementById('${/parameter/@layout_code}_user_button2')){
$jq('#${/parameter/@layout_code}_user_button2').hide();
}
var marginCheckId="${/parameter/@MARGIN_CHECK_ID}";
var ds_query_id= 'MARGIN_CHECK_F_QUERY_csh_margin_check_ds';
var ds_result_id= 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
if($(ds_query_id)){
$(ds_query_id).setQueryParameter('margin_check_id',marginCheckId);
$(ds_query_id).query();
}
if($(ds_result_id)){
$(ds_result_id).setQueryParameter('margin_check_id',marginCheckId);
$(ds_result_id).query();
}
}else{
var ds_result_id= 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
if($(ds_result_id)){
$(ds_result_id).query();
}
}
var ds_id= 'MARGIN_CHECK_F_QUERY_csh_margin_check_ds';
var record= $(ds_id).getCurrentRecord();
if(Ext.isEmpty('${/model/wfl_status/record/@mar_status}')){
record.set('mar_before_status','Y');
record.set('mar_before_status_n','打开');
}else {
record.set('mar_before_status','${/model/wfl_status/record/@mar_status}');
record.set('mar_before_status_n','${/model/wfl_status/record/@mar_after_status_n}');
}
});
//自定义提交审批保存
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
debugger;
window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id = 'MARGIN_CHECK_F_QUERY_csh_margin_check_ds';
var ds_result_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
var record=$(ds_id).getCurrentRecord();
var params = record.data;
var marAfterStatus= params.mar_after_status;
if(Ext.isEmpty(marAfterStatus)){
Leaf.showErrorMessage('提示', '修改后茂甲保证金校验状态不能为空!');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if (marAfterStatus == '${/model/wfl_status/record/@mar_status}') {
Leaf.showErrorMessage('提示', '请选择与修改前茂甲保证金校验不同的状态');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
if($(ds_result_id)){
var record=$(ds_result_id).getAll();
for (var i = 0; i < record.length; i++) {
if (record[i].get('wfl_status') == 'APPROVING') {
Leaf.showErrorMessage('提示', '当前系统中已有审批中单据,请审批结束后再提交审批');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
}
}
Leaf.showConfirm('${l:HLS.PROMPT}', '${l:HLS.ARE_YOU_SURE_TO_SUBMIT}', function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('${/parameter/@layout_code}_csh531_margin_check_save_link_id').getUrl(),
para: params,
success: function(res) {
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
debugger;
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
});
var ds_result_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
$(ds_result_id).query();
$(ds_id).query();
},
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
});
},function (){
debugger;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
});
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
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