Commit 1ce3db97 authored by liyuan.chen's avatar liyuan.chen

回租文本,项目附件上传,回租查询条件,商业伙伴配偶问题

parent 6e793bb3
......@@ -3,73 +3,79 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from (
Select cwo.cashflow_id,
t.transaction_num,
cwo.write_off_id,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'RECEIPT_TYPE'
And v.code_value = t.receipt_type) transaction_type,
c.contract_id,
cwo.times,
ccc.cf_item,
(Select h.description
From hls_cashflow_item h
Where h.cf_item = ccc.cf_item) cf_item_n,
--代理店简称
(Select h.extra_nam
From hls_bp_master h
Where h.bp_id = c.bp_id_agent_level1) extra_nam,
--合同编号
c.contract_number,
--机号
(Select ccli.machine_number
From con_contract_lease_item ccli
Where ccli.contract_id = c.contract_id) machine_number,
--承租人编号,名称,身份证号
h.bp_code bp_id_tenant,
h.bp_name,
decode(h.bp_class, 'NP', h.id_card_no, h.social_code) id_card_no,
--合同总额
nvl(c.down_payment, 0) + nvl(c.total_rental, 0) total_amount,
ccc.due_date,
--收款日
t.transaction_date,
-- ccc.due_amount,
(ccc.due_amount - nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date <= cwo.creation_date),
0) + cwo.write_off_due_amount) As due_amount,
--t.transaction_num,
cwo.write_off_date,
--实收金额
cwo.write_off_due_amount received_amount,
select *
from (
Select
cwo.cashflow_id,
t.transaction_num,
cwo.write_off_id,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'RECEIPT_TYPE'
And v.code_value = t.receipt_type) transaction_type,
c.contract_id,
cwo.times,
ccc.cf_item,
(Select h.description
From hls_cashflow_item h
Where h.cf_item = ccc.cf_item) cf_item_n,
--代理店简称
(Select h.extra_nam
From hls_bp_master h
Where h.bp_id = c.bp_id_agent_level1) extra_nam,
--合同编号
c.contract_number,
--机号
(Select ccli.machine_number
From con_contract_lease_item ccli
Where ccli.contract_id = c.contract_id) machine_number,
--承租人编号,名称,身份证号
h.bp_code bp_id_tenant,
h.bp_name,
decode(h.bp_class, 'NP', h.id_card_no, h.social_code) id_card_no,
--合同总额
nvl(c.down_payment, 0) + nvl(c.total_rental, 0) total_amount,
ccc.due_date,
--收款日
t.transaction_date,
-- ccc.due_amount,
(ccc.due_amount - nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date <= cwo.creation_date),
0) + cwo.write_off_due_amount) As due_amount,
--t.transaction_num,
cwo.write_off_date,
--实收金额
cwo.write_off_due_amount received_amount,
(ccc.due_amount - nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date <= cwo.creation_date),
0)) As unreceived_amount
From con_contract_cashflow ccc,
con_contract c,
hls_bp_master h,
csh_write_off cwo,
csh_transaction t
Where cwo.cashflow_id = ccc.cashflow_id
And ccc.contract_id = c.contract_id
And cwo.csh_transaction_id = t.transaction_id
And nvl(cwo.reversed_flag, 'N') = 'N'
And h.bp_id = c.bp_id_tenant
And cwo.write_off_type In ('RECEIPT_CREDIT', 'DEPOSIT_CREDIT')
And ccc.cf_status = 'RELEASE'
And cwo.write_off_due_amount > 0
Order By c.contract_id,
ccc.times,
ccc.cf_item,
t.transaction_date,
cwo.write_off_id ) t
(ccc.due_amount - nvl((Select Sum(tn.write_off_due_amount)
From csh_write_off tn
Where tn.cashflow_id = cwo.cashflow_id
And tn.creation_date <= cwo.creation_date),
0)) As unreceived_amount,
c.BUSINESS_TYPE,
(select hbt.DESCRIPTION
from hls_business_type hbt
where hbt.BUSINESS_TYPE = c.BUSINESS_TYPE) BUSINESS_TYPE_N
From con_contract_cashflow ccc,
con_contract c,
hls_bp_master h,
csh_write_off cwo,
csh_transaction t
Where cwo.cashflow_id = ccc.cashflow_id
And ccc.contract_id = c.contract_id
And cwo.csh_transaction_id = t.transaction_id
And nvl(cwo.reversed_flag, 'N') = 'N'
And h.bp_id = c.bp_id_tenant
And cwo.write_off_type In ('RECEIPT_CREDIT', 'DEPOSIT_CREDIT')
And ccc.cf_status = 'RELEASE'
And cwo.write_off_due_amount > 0
Order By c.contract_id,
ccc.times,
ccc.cf_item,
t.transaction_date,
cwo.write_off_id) t
#WHERE_CLAUSE#
order by extra_nam, bp_id_tenant, contract_id,times,cf_item, due_amount desc, transaction_date,write_off_date
]]></bm:query-sql>
......@@ -85,6 +91,7 @@
<bm:query-field name="transaction_num" queryExpression="t.transaction_num like &apos;%&apos; || ${@transaction_num} || &apos;%&apos;"/>
<bm:query-field name="cf_item_n" queryExpression="t.cf_item_n like &apos;%&apos; || ${@cf_item_n} || &apos;%&apos;"/>
<bm:query-field name="extra_nam" queryExpression="t.extra_nam like &apos;%&apos; || ${@extra_nam} || &apos;%&apos;"/>
<bm:query-field name="business_type" queryExpression="t.business_type = ${@business_type}"/>
</bm:query-fields>
<bm:data-filters>
<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)))"/>
......
......@@ -363,12 +363,17 @@
'yyyy-mm-dd')),
p_date2 =>sysdate,
p_type =>'SMALL'),
p_user_id => -1) overdue_times_af
p_user_id => -1) overdue_times_af,
(select v.CODE_VALUE_NAME
from SYS_CODE_VALUES_V v
where v.CODE = 'CON500_CONTRACT_STATUS'
and v.CODE_VALUE = t.CONTRACT_STATUS
and v.CODE_ENABLED_FLAG = 'Y'
and v.CODE_VALUE_ENABLED_FLAG = 'Y') contract_status_n
FROM con_contract t, hls_bp_master h
WHERE t.data_class = 'NORMAL'
AND t.bp_id_agent_level1 = h.bp_id
AND (t.contract_status IN ('INCEPT',
'TERMINATING',
'ETING',
'REPURING',
......
......@@ -27,7 +27,7 @@
||'-'
||
(SELECT
t.project_number
ct.contract_number
FROM
con_contract ct,
prj_project t
......
......@@ -181,7 +181,8 @@
AND ccc.cf_status = 'RELEASE'
AND ccc.cf_item IN (1, 8, 250)
) total_due_amount,
cc.contract_status/*,
cc.contract_status,
cc.BUSINESS_TYPE/*,
(Select Count(1)
From con_contract_cashflow ccc
Where ccc.contract_id = cc.contract_id
......@@ -317,6 +318,7 @@
queryExpression="t1.business_due_amount &lt;= ${@business_due_amount_to}"/>
<bm:query-field name="owner_user_id" queryExpression="t1.owner_user_id = ${@owner_user_id}"/>
<bm:query-field name="lease_organization" queryExpression="t1.lease_organization = ${@lease_organization}"/>
<bm:query-field name="business_type_n" queryExpression="t1.business_type = ${@business_type}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="contract_status" enforceOperations="query"
......
......@@ -113,7 +113,7 @@
} catch (e) {
raise_app_error(e);
}
if (record_data.templet_code == 'FINANCE_LEASE_CONTRACT'||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_A4'||record_data.templet_code == 'BUSINESS_CONTRACT'||record_data.templet_code == 'BUSINESS_CONTRACT_XJ'||record_data.templet_code=='LEASE_EXCHANGE'||record_data.templet_code=='LEASE_EXCHANGE_GN'||record_data.templet_code=='FINANCE_LEASE_CONTRACT_EX'||record_data.templet_code=='BUSINESS_CONTRACT_GK'||record_data.templet_code == 'REPURCHASE_DEBT_OFFSET') {
if (record_data.templet_code == 'FINANCE_LEASE_CONTRACT'||record_data.templet_code == 'FINANCE_LEASE_CONTRACT_A4'||record_data.templet_code == 'BUSINESS_CONTRACT'||record_data.templet_code == 'BUSINESS_CONTRACT_XJ'||record_data.templet_code=='LEASE_EXCHANGE'||record_data.templet_code=='LEASE_EXCHANGE_GN'||record_data.templet_code=='FINANCE_LEASE_CONTRACT_EX'||record_data.templet_code=='BUSINESS_CONTRACT_GK'||record_data.templet_code == 'REPURCHASE_DEBT_OFFSET'||record_data.templet_code == 'CON_CONTRACT_LEASE_BACK'||record_data.templet_code == 'CON_CONTRACT_MORTGAGE') {
// word转pdf
var pdf_file_path=datePath+guid_file_name_tables[0].guid_file_name + 'con_' + record_data.content_id;
......
......@@ -332,6 +332,7 @@
<a:dataSet id="business_type_ds">
<a:datas>
<a:record code_value="LEASE" code_value_name="直租"/>
<a:record code_value="LEASEBACK" code_value_name="售后回租"/>
</a:datas>
</a:dataSet>
<a:dataSet id="CON601_lease_organization_name_ds" loadData="true"
......
......@@ -5,7 +5,7 @@
</a:init-procedure>
<a:view>
<a:link id="csh_payment_req_create_link" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_selected.lview"/>
<a:link id="csh_payment_req_history_print_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_history_print.lsc"/>
<a:link id="csh_payment_req_history_print_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_history_pdf_print.lsc"/>
<a:link id="get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="tre_loan_contact_cancel_change_link_id" model="lon.LON120.tre_loan_change_cancel" modelaction="update"/>
<a:link id="csh501_csh_payment_req_link1_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req.lview"/>
......
......@@ -123,7 +123,10 @@
try {
$bm('csh.CSH501.csh_transaction_return_print').update({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table
});
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id.toString(), 'COMMON');
} catch (e) {
......
......@@ -457,7 +457,7 @@
} else if (value.length == 18) {
new_id_card = record.get('id_card_no');
//自动带出籍贯
record.set('resident_addres', get_native_place(value));
//record.set('resident_addres', get_native_place(value));
record.set('date_of_birth', new Date(value.substr(6, 4) + '/' + value.substr(10, 2) + '/' + value.substr(12, 2)));
record.set('age', new Date().getFullYear() - value.substr(6, 4));
if (value.substr(16, 1) % 2 == 1) {
......@@ -485,8 +485,8 @@
new_id_card = record.get('id_card_no_leg');
record.set('resident_addres_sp', get_native_place(value));
record.set('date_of_birth', new Date(value.substr(6, 4) + '/' + value.substr(10, 2) + '/' + value.substr(12, 2)));
//record.set('resident_addres_sp', get_native_place(value));
record.set('date_of_birth_sp', new Date(value.substr(6, 4) + '/' + value.substr(10, 2) + '/' + value.substr(12, 2)));
record.set('age', new Date().getFullYear() - value.substr(6, 4));
if (value.substr(16, 1) % 2 == 1) {
record.set('gender', 'MALE');
......
......@@ -11,6 +11,7 @@
<!-- <a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ500D.sys_user_lv" rootPath="user_name_path"/> -->
<a:model-query fetchAll="true" model="hls.HLS303.hls_bp_agentemployee_id" rootPath="employee_id_path"/>
<a:model-query fetchAll="true" model="prj.PRJ500D.amount_check" rootPath="amount_check"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;HAND&apos;,&apos;0017&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<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'];
......@@ -270,6 +271,41 @@
}
}
function prj501n_upload_file_new(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
/*if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY') {
if('${/model/role_flag_path/record/@sys_role_flag}' == 'Y') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}else{
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
} else {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}*/
if('${/model/role_flag_path/record/@sys_role_flag}' == 'Y') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}else{
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
}
function prj501n_bp_code_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
......@@ -388,6 +424,9 @@
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'prj501n_upload_file';
if(record.get('cdd_item') == 'ADD_ATTACH'){
link_function = 'prj501n_upload_file_new';
}
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attach_file_name') {
if (value != null) {
......
......@@ -10,7 +10,7 @@
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ500D.sys_user_lv"
rootPath="user_name_path"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;0006&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;HAND&apos;,&apos;0017&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<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'];
......@@ -344,7 +344,6 @@
}
function prj501n_upload_file_new(id, name, query_only) {
debugger;
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
......@@ -425,7 +424,6 @@
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
debugger;
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
......
......@@ -10,7 +10,7 @@
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ500D.sys_user_lv"
rootPath="user_name_path"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;0006&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;HAND&apos;,&apos;0017&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<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'];
......@@ -235,7 +235,6 @@
}
function prj501n_upload_file_new(id, name, query_only) {
debugger;
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
......
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