Commit e6f982bd authored by liyuan.chen's avatar liyuan.chen

Merge branch 'feature/合同查询链接' into develop

parents 2f295d1b 84e62702
Pipeline #6204 canceled with stages
......@@ -63,24 +63,10 @@
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="t.session_id=${/session/@session_id}"/>
<bm:data-filter enforceOperations="query" expression="exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 WHERE a1.trx_category = 'CONTRACT' and a1.trx_id = t.contract_id AND trunc(sysdate) between a1.start_date AND nvl(a1.end_date, trunc(sysdate)) and a1.user_id = a2.owner_user_id AND a1.trx_category = a2.trx_category AND a2.authorized_user_id = ${/session/@user_id} AND trunc(sysdate) between a2.start_date and nvl(a2.end_date, trunc(sysdate)))"/>
<bm:data-filter name="query" expression="( decode(${/session/@user_id}, 10620, 1, 2) = 1
and exists (select 1 from hls_bp_master hb where hb.bp_code = t.bp_code_tenant
and hb.bp_code in ('C00010186',
'C00010185',
'C00010181',
'C00010174',
'C00010184',
'C00010182',
'C00010168',
'C00010191',
'C00010170',
'C00010188',
'C00010169',
'C00010197',
'C00010193',
'C00010189',
'C00010194',
'C00010171'))
or decode(${/session/@user_id}, 10620, 1, 2) = 2)"/>
<bm:data-filter enforceOperations="query" expression="( (decode(${/session/@user_id}, 10600, 1, 2) = 1
and exists (select 1 from con_contract c, hls_bp_master hb where c.contract_id = t.contract_id
and hb.bp_id = c.bp_id_agent_level1
and hb.bp_code in ('D00000028','D00000035','D00000016','D00000021','D00000039','D00000025','D00000034','D00000017','D00000018','D00000024','D00000032','D00000009','D00000012','D00000014','D00000015','D00000023')) )
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) )"/>
</bm:data-filters>
</bm:model>
......@@ -70,7 +70,14 @@
FROM gld_write_off gwo
WHERE gwo.reversed_flag = 'N'
AND gwo.contract_id = cc.contract_id
AND gwo.cf_item IN (1, 8, 250)),
AND gwo.cf_item IN (1, 8, 250)
And Exists
(Select 1
From con_contract_cashflow cn, csh_write_off cw
Where cw.write_off_id = gwo.csh_write_off_id
And cn.cashflow_id = cw.cashflow_id
And cn.cf_status = 'RELEASE'
And trunc(cn.due_date) <= trunc(Sysdate))),
0) account_due_amount,
contract_item_query_pkg.calc_business_overdue_times(p_contract_id => cc.contract_id,
......@@ -90,7 +97,13 @@
FROM csh_write_off cwo
WHERE cwo.reversed_flag = 'N'
AND cwo.contract_id = cc.contract_id
AND cwo.cf_item IN (1, 8, 250)),
AND cwo.cf_item IN (1, 8, 250)
And Exists
(Select 1
From con_contract_cashflow cn
Where cn.cashflow_id = cwo.cashflow_id
And cn.cf_status = 'RELEASE'
And trunc(cn.due_date) <= trunc(Sysdate))),
0) business_due_amount, --营业逾期总金额
(SELECT SUM(ccc.due_amount - nvl(ccc.received_amount, 0))
......@@ -162,8 +175,9 @@
FROM con_contract_cashflow ccw
WHERE ccw.contract_id = cc.contract_id
AND TRUNC(ccw.due_date)<=TRUNC(SYSDATE)
AND ccw.due_amount>ccw.received_amount
AND ccw.write_off_flag <> 'FULL')
AND ccw.due_amount>nvl(ccw.received_amount, 0)
AND ccw.write_off_flag <> 'FULL'
AND ccw.cf_direction = 'INFLOW')
AND ('Y' = 'Y' AND EXISTS
(SELECT 1
FROM aut_trx_user_authorize a1, aut_owner_user_authorize a2
......@@ -176,25 +190,10 @@
AND a2.authorized_user_id = ${/session/@user_id}
AND trunc(SYSDATE) BETWEEN a2.start_date AND
nvl(a2.end_date, trunc(SYSDATE))))
And ( (decode(${/session/@user_id}, 10620, 1, 2) = 1
And ( (decode(${/session/@user_id}, 10600, 1, 2) = 1
And exists (select 1 from hls_bp_master hb where hb.bp_id = cc.bp_id_agent_level1
And hb.bp_code in ('C00010186',
'C00010185',
'C00010181',
'C00010174',
'C00010184',
'C00010182',
'C00010168',
'C00010191',
'C00010170',
'C00010188',
'C00010169',
'C00010197',
'C00010193',
'C00010189',
'C00010194',
'C00010171')) )
or decode(${/session/@user_id}, 10620, 1, 2) = 2) ) t1
And hb.bp_code in ('D00000028','D00000035','D00000016','D00000021','D00000039','D00000025','D00000034','D00000017','D00000018','D00000024','D00000032','D00000009','D00000012','D00000014','D00000015','D00000023')) )
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) ) ) t1
#WHERE_CLAUSE#
......
......@@ -126,25 +126,10 @@
and ee.unit_id=(SELECT h.unit_id FROM hls_bp_master h WHERE h.bp_id=t1.bp_id)
and ${/session/@role_id} in (select v.role_id from sys_role_vl v where v.role_code in ('0018','0019')) ) )
or (${/session/@role_id} not in (select v.role_id from sys_role_vl v where v.role_code in ('0018','0019')) ))"/>
<bm:data-filter name="query" expression="( (decode(${/session/@user_id}, 10620, 1, 2) = 1
<bm:data-filter name="query" expression="( (decode(${/session/@user_id}, 10600, 1, 2) = 1
and exists (select 1 from hls_bp_master hb where hb.bp_id = t1.bp_id
and hb.bp_code in ('C00010186',
'C00010185',
'C00010181',
'C00010174',
'C00010184',
'C00010182',
'C00010168',
'C00010191',
'C00010170',
'C00010188',
'C00010169',
'C00010197',
'C00010193',
'C00010189',
'C00010194',
'C00010171')) )
or decode(${/session/@user_id}, 10620, 1, 2) = 2)"/>
and hb.bp_code in ('D00000028','D00000035','D00000016','D00000021','D00000039','D00000025','D00000034','D00000017','D00000018','D00000024','D00000032','D00000009','D00000012','D00000014','D00000015','D00000023')) )
or (decode(${/session/@user_id}, 10600, 1, 2) = 2) )"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field name="query_amount_flag" queryExpression="((${@query_amount_flag}='1' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >0) )or(${@query_amount_flag}='2' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) =0) )or (${@query_amount_flag}='3' and ((nvl(t1.transaction_amount,0)-nvl(t1.write_off_amount,0)-nvl(t1.returned_amount,0)) >=0)))"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: LR
$Date: 2013-8-13 上午10:30:25
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
<a:init-procedure><![CDATA[
]]>
</a:init-procedure>
<a:view>
<script type="text/javascript"><![CDATA[
]]></script>
<a:dataSets>
<a:dataSet id="seal_info_ds" autoQuery="true" model="cont.CON560.con_contract_seal_info" queryUrl="${/request/@context_path}/autocrud/cont.CON560.con_contract_seal_info/query?contract_id=${/parameter/@contract_id}">
<a:fields>
<a:field name="instruments_types" readOnly="true"/>
<a:field name="common_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="corporate_visa_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="legal_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="con_special_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="financial_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="supervisio_seal" readOnly="true" uncheckedValue="N" checkedValue="Y"/>
<a:field name="seal_number_n" readOnly="true"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:grid id="seal_info_ds_id" bindTarget="seal_info_ds" height="250" marginWidth="655" navBar="true">
<a:columns>
<a:column name="instruments_types" prompt="文书种类"/>
<a:column name="common_seal" prompt="公章" editor="seal_info_check_id"/>
<a:column name="corporate_visa_seal" prompt="法人签证章" editor="seal_info_check_id"/>
<a:column name="legal_seal" prompt="法人章" editor="seal_info_check_id"/>
<a:column name="con_special_seal" prompt="合同专用章" editor="seal_info_check_id"/>
<a:column name="financial_seal" prompt="财务章" editor="seal_info_check_id"/>
<a:column name="supervisio_seal" prompt="监管专用章" editor="seal_info_check_id"/>
<a:column name="seal_number_n" prompt="文书部数"/>
</a:columns>
<a:editors>
<a:checkBox id="seal_info_check_id"/>
</a:editors>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
\ No newline at end of file
......@@ -31,6 +31,8 @@
url="${/request/@context_path}/modules/cont/CON301N/con_contract_print.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<a:link id="${/parameter/@layout_code}_contract_seal_link_id" url="${/request/@context_path}/modules/cont/CON301N/con_contract_finish_seal_info.lview"/>
<a:link id="con_contract_finish_print_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_history_pdf_print.lsc"/>
<script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
......@@ -89,7 +91,34 @@
param['url_title'] = 'BS明细';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', ds_id);
}
function open_seal_win(record_id, ds_id) {
var record = $(ds_id).findById(record_id);
var win = new Leaf.Window({
id: 'con_contract_seal_win_id',
params: {
contract_id: record.get('contract_id'),
winid: 'con_contract_seal_win_id'
},
url: $('${/parameter/@layout_code}_contract_seal_link_id').getUrl(),
title: '用印信息',
width: 1300,
height: 350
});
}
function download_recovery(record_id, ds_id){
var record = $(ds_id).findById(record_id);
var contract_id = record.get('contract_id');
var url_l = $('con_contract_finish_print_link_id').getUrl() + '?document_id=' + contract_id + '&document_table=CON_CONTRACT_FINISH&batch_flag=Y&source_type=COMMON';
window.open(href = url_l, target = "_self");
}
function download_ownership(record_id, ds_id){
var record = $(ds_id).findById(record_id);
var contract_id = record.get('contract_id');
var url_l = $('con_contract_finish_print_link_id').getUrl() + '?document_id=' + contract_id + '&document_table=CON_CONTRACT_FINISH_LEASE&batch_flag=Y&source_type=COMMON';
window.open(href = url_l, target = "_self");
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
if (name == 'contract_number' && value) {
......@@ -101,6 +130,18 @@
if (name == 'bs_link') {
return '<a href="javascript:open_bs_Window(\'' + record.id + '\',\'' + record.ds.id + '\')">明细</a>';
}
if(record.get('contract_status') == 'TERMINATE'){
if(name == 'con_seal_link'){
return '<a href="javascript:open_seal_win(\'' + record.id + '\',\'' + record.ds.id + '\')">用印信息</a>';
}
if(name == 'rent_recovery_link'){
return '<a href="javascript:download_recovery(\'' + record.id + '\',\'' + record.ds.id + '\')">附件</a>';
}
if(name == 'ownership_link'){
return '<a href="javascript:download_ownership(\'' + record.id + '\',\'' + record.ds.id + '\')">附件</a>';
}
}
return value;
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
......
......@@ -29,7 +29,8 @@
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_cashflow');
var form_ds_id = '${/parameter/@layout_code}_F_QUERY__ds';
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}'); Leaf.request({
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('business_write_detail_link').getUrl(),
para: {},
success: function() {
......
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