Commit fed5b746 authored by 38823's avatar 38823

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

parent 6cf8b312
......@@ -28,9 +28,16 @@
<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
SELECT Mar_After_Status 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
AND t.Margin_Check_Id = T1.Margin_Check_Id) Mar_After_Status_n
FROM Csh_Margin_Check t
WHERE t.Wfl_Status = 'APPROVED'
AND Rownum = 1
ORDER BY t.Creation_Date DESC
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
......@@ -2,34 +2,29 @@
<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 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[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
]]></s:server-script>
<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"/>
<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<a:link id="${/parameter/@layout_code}_submit_approval_link" model="cont.CON632.con_collection_callback_wfl" modelaction="update"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>
<script src="${/request/@context_path}/javascripts/jquery-1.6.4.min.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
jQuery.noConflict();
Ext.ux.Lightbox.register('a[ref=img]', true);
$L.onReady(function () {
debugger;
if("${/parameter/@function_usage}" == 'QUERY'){
$jq('#${/parameter/@layout_code}_user_button1').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';
$(ds_query_id).setQueryParameter('margin_check_id',marginCheckId);
$(ds_query_id).query();
$(ds_result_id).setQueryParameter('margin_check_id',marginCheckId);
$(ds_result_id).query();
}
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){
if('${/model/wfl_status/record/@mar_status}' == '' || '${/model/wfl_status/record/@mar_status}' == undefined){
record.set('mar_before_status','Y');
record.set('mar_before_status_n','打开');
}
......@@ -42,16 +37,20 @@
// 提交审批
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
debugger;
//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 record1= $(ds_id).getSelected();
var marginId=record1[0].data.margin_check_id;
var wflStatus=record1[0].data.wfl_status;
if(wflStatus == 'NEW' || wflStatus == 'APPROVING'){
var ds_query_id = 'MARGIN_CHECK_F_QUERY_csh_margin_check_ds';
var record= $(ds_id).getSelected()[0];
var record_query = $(ds_query_id).getCurrentRecord();
var marginId=record.get('margin_check_id');
var wflStatus=record.get('wflStatus');
if(wflStatus == 'APPROVING'){
Leaf.showErrorMessage('提示', '必须审批通过后才可以再提交审批');
return false;
}
if(wflStatus == 'APPROVED'){
Leaf.showErrorMessage('提示','已经审批通过的单据不能重复提交');
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({
......@@ -83,7 +82,6 @@
//保存前调用
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){
......@@ -104,7 +102,6 @@
// 保存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){
......
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