Commit 1824923f authored by 38823's avatar 38823

茂甲控制保证金打开关闭校验

parent f5c8db58
...@@ -12,6 +12,27 @@ ...@@ -12,6 +12,27 @@
end; end;
]]></bm:update-sql> ]]></bm:update-sql>
</bm:operation> </bm:operation>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
margin_check_req_pkg.margin_check_save(
p_sql_type => 'INSERT',
p_user_id =>${/session/@user_id},
p_margin_check_id => ${@margin_check_id},
p_mar_after_status => ${@mar_after_status}
);
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select nvl(mar_after_status,'Y') as mar_status,
(select code_value_name from sys_code_values_v,csh_margin_check t1 where code='MARGIN_CHECK_STATUS' and code_value = t1.MAR_AFTER_STATUS) mar_after_status_n
from (select t.mar_after_status from csh_margin_check t where t.wfl_status='APPROVED' order by t.creation_date desc) where rownum=1
]]></bm:query-sql>
</bm:operation>
</bm:operations> </bm:operations>
</bm:model> </bm:model>
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
dynamiccreateenabled="true" trace="true"> dynamiccreateenabled="true" trace="true">
<a:init-procedure> <a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/> <a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
<a:model-query model="csh.CSH531F.csh_transaction_recoi_check_wfl" rootPath="wfl_status"/>
<a:model-query model="cont.CON3200.get_user_employee_type" rootPath="employee_info"/> <a:model-query model="cont.CON3200.get_user_employee_type" rootPath="employee_info"/>
<a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="file_name_path"/> <a:model-query fetchAll="true" model="cont.CON500.con_contract_get_guid_file_name" rootPath="file_name_path"/>
<s:server-script import="contract_print_path.js"><![CDATA[ <s:server-script import="contract_print_path.js"><![CDATA[
...@@ -608,10 +609,16 @@ ...@@ -608,10 +609,16 @@
} }
if ($(ds_id).validate()) { if ($(ds_id).validate()) {
debugger; debugger;
if(record.get('division')=='70'&&record.get('write_off_amount')<record.get('customer_margin')){ if('${/model/wfl_status/record/@mar_status}' != 'Y'){
Leaf.showMessage('${l:PROMPT}', '铁甲业务需要保证金入账后才能起租'); if(record.get('division')=='70'&&record.get('write_off_amount')<record.get('customer_margin')){
return; Leaf.showMessage('${l:PROMPT}', '铁甲业务需要保证金入账后才能起租');
return;
}
} }
// if(record.get('division')=='70'&&record.get('write_off_amount')<record.get('customer_margin')){
// Leaf.showMessage('${l:PROMPT}', '铁甲业务需要保证金入账后才能起租');
// return;
// }
// if(record.get('division')=='92'&&record.get('write_off_amount')<record.get('customer_margin')){ // if(record.get('division')=='92'&&record.get('write_off_amount')<record.get('customer_margin')){
// Leaf.showMessage('${l:PROMPT}', '北京卡家业务需要保证金入账后才能起租'); // Leaf.showMessage('${l:PROMPT}', '北京卡家业务需要保证金入账后才能起租');
// return; // return;
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" dynamiccreateenabled="true" trace="true"> <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:init-procedure>
<a:model-query defaultWhereClause="t1.contract_lease_item_id = ${/parameter/@contract_lease_item_id}" fetchAll="true" model="cont.CON6323.con_collection_calc" rootPath="con_car_fee_path"/> <a:model-query defaultWhereClause="t1.contract_lease_item_id = ${/parameter/@contract_lease_item_id}" fetchAll="true" model="cont.CON6323.con_collection_calc" rootPath="con_car_fee_path"/>
<a:model-query model="csh.CSH531F.csh_transaction_recoi_check_wfl" rootPath="wfl_status"/>
<s:server-script import="contract_print_path.js"><![CDATA[ <s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path']; $ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source']; $ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
...@@ -18,55 +20,98 @@ ...@@ -18,55 +20,98 @@
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
jQuery.noConflict(); jQuery.noConflict();
Ext.ux.Lightbox.register('a[ref=img]', true); Ext.ux.Lightbox.register('a[ref=img]', true);
$L.onReady(function () { $L.onReady(function () {
debugger;
if("${/parameter/@function_usage}" == 'QUERY'){ if("${/parameter/@function_usage}" == 'QUERY'){
$jq('#${/parameter/@layout_code}_user_button1').hide(); $jq('#${/parameter/@layout_code}_user_button1').hide();
} }
var ds_id= 'MARGIN_CHECK_F_QUERY_csh_margin_check_ds';
var record= $(ds_id).getCurrentRecord();
var marAfterStatus = record.get('mar_before_status');
if(marAfterStatus == '' || marAfterStatus == undefined){
record.set('mar_before_status','Y');
record.set('mar_before_status_n','打开');
}
if('${/model/wfl_status/record/@mar_status}' != ''){
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() { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
debugger; debugger;
var root_ds = $('${/parameter/@layout_code}_virtual_ds');
if (root_ds) {
root_ds.submit();
//var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_margin_check','F_RESULT'); //var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_margin_check','F_RESULT');
var ds_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds'; var ds_id = 'MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
var ds_id1= 'MARGIN_CHECK_F_QUERY_csh_margin_check_ds'; var record1= $(ds_id).getSelected();
var record = $(ds_id).getSelected(); var marginId=record1[0].data.margin_check_id;
var record1= $(ds_id).getCurrentRecord(); var wflStatus=record1[0].data.wfl_status;
var marginId=record[0].data.margin_check_id; if(wflStatus == 'NEW' || wflStatus == 'APPROVING'){
var maStatus=record[0].data.mar_after_status; Leaf.showErrorMessage('提示', '必须审批通过后才可以再提交审批');
var wflStatus=record[0].data.wfl_status; return false;
if(wflStatus){} }
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();
console.log(res); console.log(res);
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
});
}); });
});
}
//保存前调用
var check_flag=true;
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
debugger;
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id='MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
if(ds.id == ds_id){
var record=$(ds_id).getAll();
if(check_flag == true){
for(var i=0;i<record.length;i++){
if(record[i].get('wfl_status')=='NEW' || record[i].get('wfl_status')=='APPROVING'){
Leaf.showErrorMessage('提示', '必须审批通过后才可以新建');
check_flag =false;
return false;
}
}
}
$(ds_id).query();
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
}
// 保存submitsuccess调用
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res) {
debugger;
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var ds_id='MARGIN_CHECK_F_RESULT_csh_margin_check_ds';
if(ds.id==ds_id){
$(ds_id).query();
} }
}; };
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view> </a:view>
......
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