Commit 7d24d4da authored by 陆正友's avatar 陆正友

Merge remote-tracking branch 'origin/remote_dev' into remote_dev

parents 3f62e16b b423df57
......@@ -58,7 +58,12 @@
<!-- <bm:query-field name="due_date_to" queryExpression="t.due_date between nvl(to_date(${@due_date_from},'yyyy-mm-dd'),t.due_date) and to_date(${@due_date_to},'yyyy-mm-dd')"/>-->
<bm:query-field name="cf_item" queryExpression="t.cf_item = ${@cf_item}"/>
<bm:query-field name="deposit_flag"
queryExpression="((nvl(${@deposit_flag},'N') = 'Y' and cf_item in (1,8,9,200,11,250)) or (nvl(${@deposit_flag},'N') = 'N'))"/>
queryExpression="((nvl(${@deposit_flag},'N') = 'Y' and cf_item in (1,8,9,200,11,250)) or (nvl(${@deposit_flag},'N') = 'N') or
(cf_item in (1, 8, 9, 200, 11, 250, 2) and
(select cc.division
from con_contract cc
where cc.contract_id = t.contract_id) in
(10, 91)) )"/>
<bm:query-field name="due_date_from"
queryExpression="due_date &gt;= to_date(${@due_date_from},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field name="due_date_to"
......
......@@ -141,6 +141,7 @@
from csh_transaction tt
where tt.transaction_type = 'DEPOSIT'
and tt.ref_contract_id is null
and tt.reversed_flag='N'
and tt.confirmed_flag not in
('ACCAUDITING', 'NEW', 'CT_REJECTED')
and (nvl(tt.transaction_amount, 0) - nvl(tt.write_off_amount, 0) -
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false" baseTable="CSH_DEPOSIT_CASHFLOW" alias="t">
<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 nvl(ccli.machine_number,ccli.machine_number_70)
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,
to_char(ccc.due_date,'yyyy-mm-dd') due_date,
--收款日
to_char(t.transaction_date,'yyyy-mm-dd') 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,
to_char(cwo.write_off_date,'yyyy-mm-dd') 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,
c.BUSINESS_TYPE,
(select hbt.DESCRIPTION
from hls_business_type hbt
where hbt.BUSINESS_TYPE = c.BUSINESS_TYPE) BUSINESS_TYPE_N,
c.large_balance,
(select v.code_value_name
from sys_code_values_v v
where v.code = 'SECONDARY_LEASE'
and v.code_value = c.large_balance) large_balance_n,
c.branch_code,
(Select v.code_value_name
From sys_code_values_v v
Where v.code = 'BRANCH_CODE_SZMP'
And v.code_enabled_flag = 'Y'
And v.code_value_enabled_flag = 'Y'
And v.code_value = c.branch_code) branch_code_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'
--modify by 18938 I-7158
And ccc.cf_status in ('RELEASE','BLOCK')
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>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="query" expression="t.contract_id = ${@ref_contract_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 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:query-fields>
<bm:query-field name="return_id" queryExpression="t1.return_id = ${@return_id}"/>
</bm:query-fields>-->
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select decode(v.con_num, 0, 'N', 'Y') statusFlag
from (select (select count(1)
from con_contract t1
where t1.data_class in ('NORMAL', 'CHANGE_REQ')
and t1.ec_sign_type in ('INITIATE', 'SIGNING')
and t1.sign_type = 'ELE_SIGN'
and ((${@account_type} in ('LP', 'AG') and exists
(select 1
from con_contract_bp cb, hls_bp_master hb
where cb.bp_id = hb.bp_id
and cb.contract_id = t1.contract_id
and hb.social_code = ${@organization_id}) and
exists
(select 1
from con_contract_ele_signer cs
where cs.id_no = ${@id_no}
and cs.contract_id = t1.contract_id)))) con_num
from dual) v
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="statusFlag"/>
</bm:fields>
</bm:model>
......@@ -6,7 +6,7 @@ var add_datafilters = [
},
{
name:'contract_status',
expression:"t1.contract_status not in ('CLOSED','CANCEL')"
expression:"t1.contract_status not in ('CLOSED','CANCEL','PENDING')"
},
{
name: 'sign_contract_status',
......
......@@ -128,6 +128,15 @@
// Leaf.showErrorMessage('${l:PROMPT}', '当前合同暂不能进行此项变更!');
// return;
//}
if (record.get('business_type') == 'LEASEBACK' && record.get('bp_class') == 'NP' && record.get('division') != 70 && record.get('division') != 92&& ccr_document_type == 'CCR_BEFORE_SIGN') {
Leaf.showMessage('${l:PROMPT}', '此类业务尚未开放电子签约功能,不能发起签约前变更');
return;
}
if (record.get('division') == 91 && record.get('business_type') == 'LEASEBACK' && ccr_document_type == 'CCR_BEFORE_SIGN') {
Leaf.showMessage('${l:PROMPT}', '此类业务尚未开放电子签约功能,不能发起签约前变更');
return;
}
Leaf.showConfirm('特别注意', '<span style="color: #ff0000; ">该操作将导致合同在变更期间无法进行后续操作,请谨慎操作!!!如果需要取消变更,请一定点击取消变更按钮!!!</span>', function () {
var contract = record.get('contract_id');
......
......@@ -104,54 +104,7 @@
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
}else if(transaction_type == 'DEPOSIT'){
//保证金抵扣时无合同按照收款的校验来判断 18083 2023/8/22
if(Ext.isEmpty('${/parameter/@ref_contract_id}')||'${/parameter/@ref_contract_id}' == 'undefined'){
if (all.length != records.length) {
Leaf.showInfoMessage("提示", "该现金事务不支持部分反冲");
return;
}
for (var i = 0; i < records.length; i++) {
records[i].set('reversed_date', head_record.get('reversed_date'));
records[i].set('description', head_record.get('description'));
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
}else{
var gld_batch_id = records[0].get('gld_batch_id');
for (var i = 0; i < records.length; i++) {
if (records[i].get('gld_batch_id') != gld_batch_id) {
Leaf.showInfoMessage("提示", "请选择同一批次号的记录反冲!");
return;
}
records[i].set('reversed_date', head_record.get('reversed_date'));
records[i].set('description', head_record.get('description'));
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
//同批次未勾选的
var allR = $('csh_transaction_receipt_write_off_reverse_detail_result_ds').getAll();
var unR = [];
for (var i = 0; i < allR.length; i++) {
if (records.indexOf(allR[i]) === -1) {
unR.push(allR[i]);
}
}
for (var i = 0; i < unR.length; i++) {
if (unR[i].get('gld_batch_id') == gld_batch_id) {
Leaf.showInfoMessage("提示", "请选择全部同一批次号的记录反冲!");
return;
}
//校验必须先核销批次较大的 18083 2023/8/23
for (var j = 0; j < records.length; j++) {
if (unR[i].get('gld_batch_id')>records[j].get('gld_batch_id')) {
Leaf.showInfoMessage("提示", "此现金事务下存在核销批次较大的批次,请先反冲!");
return;
}
}
}
}
}else {
}else {
var gld_batch_id = records[0].get('gld_batch_id');
for (var i = 0; i < records.length; i++) {
if (records[i].get('gld_batch_id') != gld_batch_id) {
......
......@@ -683,7 +683,7 @@
// 以旧换新与三方协议合同的首付款不可进行电汇核销
var cf_item_2_count=0;
for (var i = 0; i < interfaceRs.length; i++) {
if ((interfaceRs[i].get('payment_deduction')=='TRADE_IN'||interfaceRs[i].get('payment_deduction')=='TRI_AGREEMENT')&&interfaceRs[i].get('write_off_cf_item')=='2') {
if ((interfaceRs[i].get('payment_deduction')=='TRADE_IN'||interfaceRs[i].get('payment_deduction')=='TRI_AGREEMENT'||interfaceRs[i].get('payment_deduction')=='DOWN_PAYMENT_DEDUCTION')&&interfaceRs[i].get('write_off_cf_item')=='2') {
cf_item_2_count = plus(cf_item_2_count,1);
}
}
......
......@@ -220,6 +220,10 @@
</a:dataSet>
<a:dataSet id="csh_deposit_cashflow_grid_ds" fetchAll="true" autoQuery="true" model="cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query" queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query/query?return_id=${/parameter/@return_id}"/>
<a:dataSet id="csh_write_off_report_grid_ds" fetchAll="false" autoQuery="true"
model="cus_deposit.CUS_DEPOSIT106.con_contract_cashflow_query"
queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.con_contract_cashflow_query/query?ref_contract_id=${/parameter/@ref_contract_id}"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
......@@ -287,6 +291,25 @@
<a:column name="contract_number" prompt="合同编号" width="150" align="center"/>
</a:columns>
</a:grid>
<!--业务冲销-->
<a:grid id="csh_write_off_report_grid_ds_id" bindTarget="csh_write_off_report_grid_ds" marginHeight="200" marginWidth="80" navBar="true">
<a:columns>
<a:column name="extra_nam" prompt="代理店简称" width="100" align="center"/>
<a:column name="contract_number" prompt="合同编号" align="center"/>
<a:column name="bp_name" prompt="承租人名称" width="150" align="center"/>
<a:column name="total_amount" prompt="合同总额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="times" prompt="回数" width="80" align="center"/>
<a:column name="due_date" prompt="预定支付日" align="center" renderer="Leaf.formatDate"/>
<a:column name="due_amount" prompt="应收金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="cf_item_n" prompt="应收项目" width="100" align="center"/>
<a:column name="transaction_type" prompt="收款类型" width="100" align="center"/>
<a:column name="transaction_date" prompt="实际收款日" align="center" renderer="Leaf.formatDate"/>
<a:column name="write_off_date" prompt="核销日期" align="center" renderer="Leaf.formatDate"/>
<a:column name="received_amount" prompt="实收金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="unreceived_amount" prompt="未收金额" align="right" renderer="Leaf.formatMoney"/>
</a:columns>
</a:grid>
</a:screenBody>
<script type="text/javascript"><![CDATA[
Leaf.onReady(init);
......
......@@ -141,6 +141,9 @@
</a:events>
</a:dataSet>
<a:dataSet id="csh_deposit_cashflow_grid_ds" fetchAll="true" autoQuery="true" model="cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query" queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query/query?return_id=${/parameter/@return_id}"/>
<a:dataSet id="csh_write_off_report_grid_ds" fetchAll="false" autoQuery="true"
model="cus_deposit.CUS_DEPOSIT106.con_contract_cashflow_query"
queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.con_contract_cashflow_query/query?ref_contract_id=${/parameter/@ref_contract_id}"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
......@@ -223,6 +226,24 @@
<a:column name="contract_number" prompt="合同编号" width="150" align="center"/>
</a:columns>
</a:grid>
<!--业务冲销-->
<a:grid id="csh_write_off_report_grid_ds_id" bindTarget="csh_write_off_report_grid_ds" marginHeight="200" marginWidth="80" navBar="true">
<a:columns>
<a:column name="extra_nam" prompt="代理店简称" width="100" align="center"/>
<a:column name="contract_number" prompt="合同编号" align="center"/>
<a:column name="bp_name" prompt="承租人名称" width="150" align="center"/>
<a:column name="total_amount" prompt="合同总额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="times" prompt="回数" width="80" align="center"/>
<a:column name="due_date" prompt="预定支付日" align="center" renderer="Leaf.formatDate"/>
<a:column name="due_amount" prompt="应收金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="cf_item_n" prompt="应收项目" width="100" align="center"/>
<a:column name="transaction_type" prompt="收款类型" width="100" align="center"/>
<a:column name="transaction_date" prompt="实际收款日" align="center" renderer="Leaf.formatDate"/>
<a:column name="write_off_date" prompt="核销日期" align="center" renderer="Leaf.formatDate"/>
<a:column name="received_amount" prompt="实收金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="unreceived_amount" prompt="未收金额" align="right" renderer="Leaf.formatMoney"/>
</a:columns>
</a:grid>
</a:screenBody>
<script type="text/javascript"><![CDATA[
Leaf.onReady(init);
......
......@@ -146,6 +146,7 @@
opposite_band_na: record.get('opposite_band_na'),
bp_bank_account_num: record.get('bp_bank_account_num'),
left_amount: record.get('left_amount'),
ref_contract_id: record.get('ref_contract_id'),
winId: 'csh_transaction_deposit_link_winid'
},
url: url,
......
......@@ -512,7 +512,11 @@
var bank_record = $(bank_ds_id).getAll();
var file_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_cdd_item_doc_ref');
var file_record = $(file_ds_id).getAll();
if(bank_record.length>0){
var bank_flag=true;
//校验银行账户必须与商业伙伴名称一致 18083 2023/9/5
var bp_name=head_record.get('bp_name');
var bank_flag1=true;
if(bank_record.length>0){
var flag = true;
for(var i=0;i<bank_record.length;i++){
var full_name=bank_record[i].get('bank_full_name');
......@@ -523,10 +527,18 @@
flag = false;
}
}
if(flag == false){
if(!Leaf.isEmpty(bank_record[i].get('bank_account_name'))&&bank_record[i].get('bank_account_name')!=bp_name){
var bank_flag1 = false;
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return false;
}
if(bank_flag1 == false){
Leaf.showErrorMessage('${l:PROMPT}', '银行账户户名必须与商业伙伴名称一致');
return false;
}
}
}
//新增校验,承租人(法人)和担保人(法人)商业伙伴的创建,银行账号信息都是要必填(为电子签约做准备)
......
......@@ -89,7 +89,22 @@
var address_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_address');
var records_addr = $(address_ds_id).getAll();
//新增校验,承租人(法人)和担保人(法人)商业伙伴的创建,银行账号信息都是要必填(为电子签约做准备)
//校验银行账户名必须与商业伙伴名称一致 18083 2023/9/5
var bp_name=bp_record.get('bp_name');
var bank_flag =true;
if(bank_record.length>0){
for(var i=0;i<bank_record.length;i++){
if(!Leaf.isEmpty(bank_record[i].get('bank_account_name'))&&bank_record[i].get('bank_account_name')!=bp_name){
bank_flag = false;
}
}
}
if(bank_flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '银行账户户名必须与商业伙伴名称一致');
return false;
}
//新增校验,承租人(法人)和担保人(法人)商业伙伴的创建,银行账号信息都是要必填(为电子签约做准备)
if(bp_record.get('bp_class') == 'ORG'){
if(bp_record.get('bp_type')=='TENANT' || bp_record.get('bp_type')=='GUTA_ORG'){
if(bank_record.length==0){
......
......@@ -81,7 +81,8 @@
var bank_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master_bank_acc_req');
var bank_record = $(bank_ds_id).getAll();
var flag = true;
var bp_name=bp_record.get('bp_name');
var bank_flag =true;
//新增校验,承租人(法人)和担保人(法人)商业伙伴的创建,银行账号信息都是要必填(为电子签约做准备)
if(bp_record.get('bp_class') == 'ORG'){
if(bp_record.get('bp_type')=='TENANT' || bp_record.get('bp_type')=='GUTA_ORG'){
......@@ -121,14 +122,20 @@
flag = false;
}
}
if(!Leaf.isEmpty(bank_record[i].get('bank_account_name'))&&bank_record[i].get('bank_account_name')!=bp_name){
var bank_flag = false;
}
}
}
if(flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '请填写支行全称(例如:上海浦东发展银行外高桥保税区支行)');
return false;
}
if(bp_record.get('bp_type')=='THIRD_PARTY'){
if(bank_flag == false){
Leaf.showErrorMessage('${l:PROMPT}', '银行账户户名必须与商业伙伴名称一致');
return false;
}
if(bp_record.get('bp_type')=='THIRD_PARTY'){
var flag = true;
if (bank_record.length <=0){
Leaf.showErrorMessage('${l:PROMPT}', '第三方必填[银行帐户信息],请在银行帐户信息新增!');
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:ns1="leaf.application.action" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script import="app/app_login_check.js"><![CDATA[
function con_bp_master_query() {
var statusFlag_map;
var statusFlag;
try {
var statusFlag_query = $bm('wx.WX100.con_contract_status_query_new');
statusFlag_map = statusFlag_query.queryAsMap({
id_no:$ctx.parameter.idNo,
account_type:$ctx.parameter.accountType,
organization_id:$ctx.parameter.organizationId
});
var statusFlag_details = statusFlag_map.getChildren();
statusFlag = statusFlag_details[0].statusFlag;
$ctx.parameter.return_status = '0';
$ctx.parameter.return_message = '执行成功';
} catch (e) {
$ctx.success = "false";
$ctx.parameter.return_status = '1';
$ctx.parameter.return_message = String(e);
statusFlag = 'Y'
}
//返回结果
var result = {
code: $ctx.parameter.return_status,
message: $ctx.parameter.return_message,
statusFlag: statusFlag
};
$ctx.parameter.json = JSON.stringify(result);
}
if ($ctx.parameter.return_status != 'E' && $ctx.parameter.return_status != 'TIMEOUT') {
con_bp_master_query();
}
]]></s:server-script>
</a:init-procedure>
<a:service-output output="/parameter/@json"/>
</a:service>
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