Commit 435f2849 authored by niminmin's avatar niminmin

Merge branch 'feature/解约回购开发' into develop

parents c3f0d324 c45ffb9f
Pipeline #6650 canceled with stages
......@@ -113,7 +113,8 @@
(SELECT to_char(MIN(ccc.due_date),'yyyy-mm-dd')
FROM con_contract_cashflow ccc
WHERE ccc.contract_id = cc.contract_id
AND ccc.overdue_status = 'Y'
--AND ccc.overdue_status = 'Y'
AND ccc.due_date <=sysdate
AND ccc.cf_item = 1
AND ccc.write_off_flag <> 'FULL') min_overdue_date,
--营业已收租金
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
BEGIN
con_change_single_calc_pkg.calc_repo_cashflows(p_contract_id=>${@contract_id},
cus_con_contract_repo_pkg.calc_one_time_repo_cashflow(p_contract_id=>${@contract_id},
p_user_id=>${/session/@user_id});
END;
]]>
......
......@@ -10,6 +10,7 @@
<bm:parameter name="sum_unreceived_principal" dataType="java.lang.Double" input="false" output="true" outputPath="@sum_unreceived_principal"/>
<bm:parameter name="due_amount" dataType="java.lang.Double" input="false" output="true" outputPath="@due_amount"/>
<bm:parameter name="penalty" dataType="java.lang.Double" input="false" output="true" outputPath="@penalty"/>
<bm:parameter name="fund_possession_cost" dataType="java.lang.Double" input="false" output="true" outputPath="@fund_possession_cost"/>
</bm:parameters>
<bm:update-sql><![CDATA[
BEGIN
......@@ -22,6 +23,7 @@
p_sum_unreceived_principal => ${@sum_unreceived_principal},
p_due_amount => ${@due_amount},
p_penalty => ${@penalty},
p_fund_possession_cost =>${@fund_possession_cost},
p_user_id => ${/session/@user_id});
END;
]]>
......
......@@ -15,7 +15,8 @@
(SELECT sc.code_value_name
FROM sys_code_values_v sc
WHERE sc.code = 'CON500_CONTRACT_STATUS'
AND sc.code_value = t1.contract_status) contract_status_desc
AND sc.code_value = t1.contract_status) contract_status_desc,
t1.payment_deduction
from con_contract t1
where
t1.contract_status in ('INCEPT','NEW','ETING','REPURSING')
......@@ -44,6 +45,7 @@ select t.parent_company_id company_id
<bm:field name="contract_status_desc"/>
<bm:field name="dd_bank_account_num"/>
<bm:field name="dd_bank_account_name"/>
<bm:field name="payment_deduction"/>
</bm:fields>
<bm:query-fields>
<bm:query-field field="contract_id" queryOperator="="/>
......
......@@ -123,6 +123,7 @@ end;
p_user_id=>${/session/@user_id},
p_penalty_flag=>'Y'),
due_amount) from con_contract_cashflow where cashflow_id = t1.write_off_cashflow_id)" />
<bm:field name="payment_deduction" expression="(select payment_deduction from con_contract c where c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......
......@@ -53,7 +53,14 @@
t1.action_type,
t1.action_type_desc,
t1.record_type,
t1.comment_text,
decode(t1.workflow_code,'PROJECT_WFL', decode(t1.action_type,'1',
(case when
${/session/@role_id} in(2318,2319) then
'同意'
elsemodules/cont/CON620/con_contract_rent_dun_query.lview
t1.comment_text
end ),t1.comment_text),t1.comment_text) comment_text,
-- t1.comment_text,
t1.comment_text_out,
t1.record_id,
t1.seq_number,
......@@ -95,7 +102,14 @@
t1.action_type,
t1.action_type_desc,
t1.record_type,
t1.comment_text,
decode(t1.workflow_code,'PROJECT_WFL', decode(t1.action_type,'1',
(case when
${/session/@role_id} in(2318,2319) then
'同意'
else
t1.comment_text
end ),t1.comment_text),t1.comment_text) comment_text,
-- t1.comment_text,
t1.comment_text_out,
t1.record_id,
t1.seq_number,
......
......@@ -1463,7 +1463,7 @@
var userName;
if (res.success) {
var userImg = res.result.record.avatar;
userName = res.result.record.description;
userName = res.result.record.user_name;
document.getElementById('userName').innerHTML = userName;
if (!!userImg) jQuery('.user-avatar').attr('src', userImg);
document.getElementById('row-user-name-id').innerHTML = userName;
......
......@@ -162,6 +162,7 @@
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) { //查询权限
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
if (ds == $(ds_id)) {
//aut_authority_list_validate_query(ds, qpara);
var role_code='${/model/role_info/record/@role_code}';
......
......@@ -35,13 +35,13 @@
head_record.set('ccr_document_type_n','回款账户变更');
head_record.getField('ccr_document_type').setReadOnly(true);
head_record.getField('ccr_document_type_n').setReadOnly(true);
}else if(role_code=='0008'){
}else if(role_code=='0019'){
head_record.set('ccr_document_type','LEASE_CHAG');
head_record.set('ccr_document_type_n','承租人变更');
head_record.getField('ccr_document_type').setReadOnly(true);
head_record.getField('ccr_document_type_n').setReadOnly(true);
}
else if(role_code=='0019'){
else if(role_code=='0008'){
head_record.set('ccr_document_type','CUT_CHAG');
head_record.set('ccr_document_type_n','租金计划变更');
head_record.getField('ccr_document_type').setReadOnly(true);
......@@ -136,14 +136,14 @@
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
// if (ds == $(ds_id)) {
// aut_authority_list_validate_query(ds, qpara);
//
// }
if (ds == $(ds_id)) {
aut_authority_list_validate_query(ds, qpara);
}
};
]]></script>
<a:screen-include
screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON501"/>
screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON733"/>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
</a:screen>
......@@ -27,7 +27,7 @@
$(ds_con_id).query();
}
});
var calc_flag='Y';
var calc_flag='N';
//新增和加载时调用form
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
......@@ -35,16 +35,37 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
debugger;
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_BASE_01', 'con_contract_change_req');
if (ds == $(ds_id)) {
if(value!=old_value){
calc_flag='N';
record.set('calc_flag','N');
}
var ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_BASE_01', 'con_contract_change_req');
if (ds == $(ds_id)) {
if (name == 'et_fee') {
var et_total_amount=record.get('et_total_amount')||0;
var old_et_fee=old_value||0;
record.set('et_total_amount', plus(minus(et_total_amount,old_et_fee),value||0));
}
if (name == 'ccr_penalty') {
var et_total_amount=record.get('et_total_amount')||0;
var due_amount = record.get('penalty') || 0;
if (due_amount < value) {
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的罚息必须小于等于逾期罚息!');
setTimeout(function () {
record.set('ccr_penalty', 0);
}, 5);
return;
}
if (value < 0 || value == NaN || value == undefined) {
Leaf.showMessage('${l:HLS.PROMPT}', '调整后的罚息金额应大于等于0!');
setTimeout(function () {
record.set('ccr_penalty', 0);
}, 5);
return;
}
record.set('et_total_amount', plus(plus(plus(plus(record.get('et_due_amount')||0,record.get('et_fee')||0),record.get('residual_value')||0),record.get('overdue_amount')||0),value));
}
if (name == 'termination_date'&&value) {
// 根据结清日计算结清相关金额字段
......@@ -64,6 +85,7 @@
record.set('et_due_amount', res.result.et_due_amount);
record.set('overdue_amount', res.result.overdue_amount||0);
record.set('penalty', res.result.penalty||0);
record.set('ccr_penalty', res.result.penalty||0);
record.set('fund_possession_time', res.result.fund_possession_time);
record.set('fund_possession_cost', res.result.fund_possession_cost);
record.set('fund_possession_rate', res.result.fund_possession_rate);
......@@ -76,6 +98,7 @@
record.set('et_due_amount','');
record.set('overdue_amount', '');
record.set('penalty', '');
record.set('ccr_penalty', '');
record.set('fund_possession_time','');
record.set('fund_possession_cost','');
//record.set('fund_possession_rate','');
......@@ -88,6 +111,7 @@
record.set('et_due_amount','');
record.set('overdue_amount', '');
record.set('penalty', '');
record.set('ccr_penalty', '');
record.set('fund_possession_time','');
record.set('fund_possession_cost','');
//record.set('fund_possession_rate','');
......@@ -108,7 +132,7 @@
var case_type = '';
var document_type = '${/parameter/@document_type}';
var calc_session_id = req_record.get('calc_session_id');
calc_flag=req_record.get('calc_flag');
// window['${/parameter/@bp_seq}${/parameter/@layout_code}_lock_layout_dynamic_window']();
if ($(req_ds_id).validate($('${/parameter/@layout_code}_submit_approval').enable())) {
if (req_record.dirty) {
......@@ -221,8 +245,10 @@
calc_flag='Y';
//con_record.getField('ccr_start_times').setReadOnly(true);
var ca_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'G_QUOTATION_02', 'con_contract_cashflow');
if (ca_ds_id) {
var con_contract_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'F_BASE_01', 'con_contract_change_req');
if (ca_ds_id&&con_contract_ds_id) {
$(ca_ds_id).query();
$(con_contract_ds_id).query();
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_unlock_layout_dynamic_window']();
$('${/parameter/@layout_code}_user_button1').enable(); //按钮启用
......
......@@ -594,7 +594,6 @@
}
}
}
function csh_advance_edit_function(record, name) {
if ('${/parameter/@readOnly}' == 'Y') {
return;
......@@ -651,6 +650,17 @@
Leaf.showInfoMessage('提示', '请先分配核销金额再进行提交操作');
return;
}
// 以旧换新与三方协议合同的首付款不可进行电汇核销
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') {
cf_item_2_count = plus(cf_item_2_count,1);
}
}
if (cf_item_2_count>0) {
Leaf.showInfoMessage('提示', ' 首付款抵扣为“无”以外的合同,不可进行首付款电汇核销!');
return;
}
Leaf.showConfirm('提示', '确认提交复核吗', function () {
$('csh531n_write_off_submit_btn_id').disable();
......@@ -772,6 +782,7 @@
<a:map from="bp_id_tenant" to="write_off_bp_id"/>
<a:map from="bp_id_tenant_name" to="write_off_bp_name"/>
<a:map from="contract_status_desc" to="contract_status_desc"/>
<a:map from="payment_deduction" to="payment_deduction"/>
</a:mapping>
</a:field>
<a:field name="batch_id" defaultValue="${/parameter/@batch_id}"/>
......@@ -780,6 +791,7 @@
displayField="code_value_name" options="write_off_type_ds" returnField="write_off_type"
valueField="code_value"/>
<a:field name="write_off_bp_id"/>
<a:field name="payment_deduction"/>
<a:field name="write_off_classification_desc" prompt="核销分类"
options="ds_csh_write_off_classification_ds" returnField="write_off_classification"
valueField="code_value" displayField="code_value_name"/>
......
......@@ -36,6 +36,7 @@
rec.set('write_off_principal', record.get('unreceived_principal'));
rec.set('write_off_interest', record.get('unreceived_interest'));
rec.set('unreceived_amount', record.get('unreceived_amount'));
rec.set('payment_deduction', con_rec.get('payment_deduction'));
$('${/parameter/@lovid}').win.close();
}
......@@ -70,6 +71,7 @@
rec.set('unreceived_amount', cf_recs[0].get('unreceived_amount'));
rec.set('write_off_date',new Date().format('yyyy-mm-dd'));
rec.set('journal_date',new Date().format('yyyy-mm-dd'));
rec.set('payment_deduction', con_rec.get('payment_deduction'));
// rec.set('write_off_amount', cf_recs[0].get('unreceived_amount'));
for (var i = 1; i < cf_recs.length; i++) {
......
......@@ -385,7 +385,7 @@
return t2;
}
function onEditorupdate(ds, record, name, value, old_value, fromLoad) {
debugger;
if (record.get('lov_return_vcode') == 'N' && (record.get('validation_type') == 'COMBOBOX' || record.get('validation_type') == 'LOV') && name == 'column_value') {
return;
}
......
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