Commit 35808f49 authored by stone's avatar stone

【fix】租金催收功能修改

parent 85fecbe0
...@@ -37,7 +37,12 @@ ...@@ -37,7 +37,12 @@
<!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>-->
<bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/> <bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>-->
<bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item=1 AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos;) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item=1 AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos;)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/> <bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos;)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_total" expression="(select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_principal" expression="(select sum(nvl(ccc.principal,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos;)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_interest" expression="(select sum(nvl(ccc.interest,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_received_interest" expression="(select sum(nvl(ccc.received_interest,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_received_penalty" expression="(nvl((select sum(nvl(ccc.received_amount,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item=9),0))" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_agent_desc"/> <bm:field name="bp_id_agent_desc"/>
<bm:field name="business_type_n"/> <bm:field name="business_type_n"/>
<bm:field name="division_n"/> <bm:field name="division_n"/>
...@@ -73,7 +78,7 @@ ...@@ -73,7 +78,7 @@
<bm:query-field field="bp_id_agent_desc" queryExpression="bp_id_agent_desc like upper(&apos;%&apos;||${@bp_id_agent_desc}||&apos;%&apos;)"/> <bm:query-field field="bp_id_agent_desc" queryExpression="bp_id_agent_desc like upper(&apos;%&apos;||${@bp_id_agent_desc}||&apos;%&apos;)"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:field name="is_terminate" expression="((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item = 1 AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos;) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item = 1 AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos;)) = 0"/> <bm:field name="is_terminate" expression="(SELECT ccc.write_off_flag from con_contract_cashflow ccc WHERE ccc.contract_id=t1.contract_id AND ccc.cf_item=8 AND ccc.cf_status=&apos;RELEASE&apos;)=&apos;FULL&apos;"/>
<bm:data-filter enforceOperations="query" expression="t1.contract_status in (&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;REPURING&apos;,&apos;TERMINATING&apos;) "/> <bm:data-filter enforceOperations="query" expression="t1.contract_status in (&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;REPURING&apos;,&apos;TERMINATING&apos;) "/>
<!-- <bm:data-filter enforceOperations="query" expression="t1.lease_end_date &lt;= sysdate"/> --> <!-- <bm:data-filter enforceOperations="query" expression="t1.lease_end_date &lt;= sysdate"/> -->
<bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/> <bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/>
......
...@@ -36,10 +36,15 @@ ...@@ -36,10 +36,15 @@
<!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="bp_vender" expression="(select bp_name from hls_bp_master where bp_id=t1.bp_id_vender and enabled_flag=&apos;Y&apos;)" forInsert="false" forUpdate="false"/>-->
<bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/> <bm:field name="lease_organization_desc" expression="(select description from hls_lease_organization where lease_organization = t1.lease_organization)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>--> <!--<bm:field name="owner_user_id_n" expression="(select description from sys_user where user_id = t1.created_by)" forInsert="false" forUpdate="false"/>-->
<bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item=1) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item=1)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/> <bm:field name="is_terminate" expression="(CASE WHEN ((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item&lt;&gt;0) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos;)) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_agent_desc"/> <bm:field name="bp_id_agent_desc"/>
<bm:field name="business_type_n"/> <bm:field name="business_type_n"/>
<bm:field name="division_n"/> <bm:field name="division_n"/>
<bm:field name="amount_total" expression="(select sum(ccc.due_amount) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_principal" expression="(select sum(nvl(ccc.principal,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos;)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_interest" expression="(select sum(nvl(ccc.interest,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_received_interest" expression="(select sum(nvl(ccc.received_interest,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and cf_item=1)" forInsert="false" forUpdate="false"/>
<bm:field name="amount_received_penalty" expression="(nvl((select sum(nvl(ccc.received_amount,0)) from con_contract_cashflow ccc where ccc.contract_id=t1.contract_id and ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item=9),0))" forInsert="false" forUpdate="false"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
...@@ -59,7 +64,7 @@ ...@@ -59,7 +64,7 @@
<bm:query-field field="bp_id_agent_desc" queryExpression="bp_id_agent_desc like upper(&apos;%&apos;||${@bp_id_agent_desc}||&apos;%&apos;)"/> <bm:query-field field="bp_id_agent_desc" queryExpression="bp_id_agent_desc like upper(&apos;%&apos;||${@bp_id_agent_desc}||&apos;%&apos;)"/>
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:field name="is_terminate" expression="((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item = 1) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item = 1)) = 0"/> <!-- <bm:field name="is_terminate" expression="((select sum(ccc.due_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item = 1) - (select sum(ccc.received_amount) from con_contract_cashflow ccc where contract_id = t1.contract_id and cf_item = 1)) = 0"/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t1.contract_status in (&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;ADING&apos;) "/>--> <!-- <bm:data-filter enforceOperations="query" expression="t1.contract_status in (&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;ADING&apos;) "/>-->
<!-- <bm:data-filter enforceOperations="query" expression="t1.lease_end_date &lt;= sysdate"/> --> <!-- <bm:data-filter enforceOperations="query" expression="t1.lease_end_date &lt;= sysdate"/> -->
<bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/> <bm:data-filter enforceOperations="query" expression="t1.data_class = &apos;NORMAL&apos;"/>
......
...@@ -70,19 +70,28 @@ ...@@ -70,19 +70,28 @@
} }
} }
function con560_con_contract_detail() { function con560_con_contract_detail() {
var records = $('con560_contract_result_ds').getSelected(); var records = $('con560_contract_result_ds').getSelected();
if (!records.length) { if (!records.length) {
Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录'); Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录');
return; return;
} }
//判断数据有没有修改 //判断数据有没有修改
var datas=$('con560_contract_result_ds').getJsonData(); var arrys=$('con560_contract_result_ds').data;
if(datas.length>0){ for(var i=0;i<arrys.length;i++){
$L.showInfoMessage("提示",'页面数据存在改动,请先保存数据!'); var dirty_flag=arrys[i].dirty;
return; if(dirty_flag){
$L.showInfoMessage("提示",'页面数据存在改动,请先保存数据!');
return;
}
} }
var TerminateData = []; var TerminateData = [];
debugger
for (var i = 0; i < records.length; i++) { for (var i = 0; i < records.length; i++) {
if(records[i].data.is_terminate=='否'){
$L.showInfoMessage("提示",'未收金额如果不为0不可进行合同结束');
return;
}
records[i].set('_status', 'update'); records[i].set('_status', 'update');
TerminateData.push(records[i].data); TerminateData.push(records[i].data);
} }
...@@ -260,16 +269,16 @@ ...@@ -260,16 +269,16 @@
marginWidth="30" navBar="true"> marginWidth="30" navBar="true">
<a:toolBar> <a:toolBar>
<a:button id="hn_atm_complement_atm_grid_save" click='save_et_date_btn' text="保存"/> <a:button id="hn_atm_complement_atm_grid_save" click='save_et_date_btn' icon="${/request/@context_path}/images/save.png" text="保存"/>
</a:toolBar> </a:toolBar>
<a:columns> <a:columns>
<a:column name="contract_number" lock="true" prompt="HLS.CONTRACT_NUMBER" <a:column name="contract_number" lock="true" prompt="HLS.CONTRACT_NUMBER"
renderer="con560_render_contractMaintainDs_grid" width="150"/> renderer="con560_render_contractMaintainDs_grid" width="100"/>
<a:column name="bp_name" prompt="HLS.TENANT_NAME" width="240"/> <a:column name="bp_name" prompt="HLS.TENANT_NAME" width="150"/>
<a:column name="inception_of_lease" prompt="起租日期" renderer="Leaf.formatDate" width="100"/> <a:column name="inception_of_lease" prompt="起租日期" renderer="Leaf.formatDate" width="100"/>
<!-- <a:column name="lease_end_date" prompt="合同预计结束日期" renderer="Leaf.formatDate" width="140"/>--> <!-- <a:column name="lease_end_date" prompt="合同预计结束日期" renderer="Leaf.formatDate" width="140"/>-->
<a:column name="is_terminate" prompt="租金是否结清" width="100"/> <a:column name="is_terminate" prompt="营业应收金额是否结清" width="100"/>
<a:column name="residual_value" align="right" prompt="留购价" renderer="Leaf.formatMoney" width="50"/> <a:column name="residual_value" align="right" prompt="留购价" renderer="Leaf.formatMoney" width="50"/>
<!--<a:column name="signing_user_id_n" prompt="签约人" width="100"/>--> <!--<a:column name="signing_user_id_n" prompt="签约人" width="100"/>-->
<!-- <a:column name="signing_date" prompt="签约时间" renderer="Leaf.formatDate" width="100"/>--> <!-- <a:column name="signing_date" prompt="签约时间" renderer="Leaf.formatDate" width="100"/>-->
...@@ -281,6 +290,11 @@ ...@@ -281,6 +290,11 @@
renderer="Leaf.formatMoney" width="120"/> renderer="Leaf.formatMoney" width="120"/>
<!--<a:column name="owner_user_id_n" prompt="出单人" width="60"/>--> <!--<a:column name="owner_user_id_n" prompt="出单人" width="60"/>-->
<a:column name="contract_status_desc" prompt="合同状态" width="80"/> <a:column name="contract_status_desc" prompt="合同状态" width="80"/>
<a:column name="amount_total" prompt="应收租金总额" width="80" renderer="Leaf.formatMoney"/>
<a:column name="amount_principal" prompt="应收本金总额" width="80" renderer="Leaf.formatMoney"/>
<a:column name="amount_interest" prompt="应收利息总额" width="80" renderer="Leaf.formatMoney"/>
<a:column name="amount_received_interest" prompt="已收利息总额" width="80" renderer="Leaf.formatMoney"/>
<a:column name="amount_received_penalty" prompt="已收违约金" width="80" renderer="Leaf.formatMoney"/>
<a:column name="et_date" prompt="合同结束日" width="80" editorFunction="date_editor_func" renderer="Leaf.formatDate"/> <a:column name="et_date" prompt="合同结束日" width="80" editorFunction="date_editor_func" renderer="Leaf.formatDate"/>
</a:columns> </a:columns>
<a:editors> <a:editors>
......
...@@ -220,6 +220,11 @@ ...@@ -220,6 +220,11 @@
renderer="Leaf.formatMoney" width="120"/> renderer="Leaf.formatMoney" width="120"/>
<!--<a:column name="owner_user_id_n" prompt="出单人" width="60"/>--> <!--<a:column name="owner_user_id_n" prompt="出单人" width="60"/>-->
<a:column name="contract_status_n" prompt="合同状态" width="80"/> <a:column name="contract_status_n" prompt="合同状态" width="80"/>
<a:column name="amount_total" prompt="应收租金总额" width="80" renderer="Leaf.formatMoney"/>
<a:column name="amount_principal" prompt="应收本金总额" width="80" renderer="Leaf.formatMoney"/>
<a:column name="amount_interest" prompt="应收利息总额" width="80" renderer="Leaf.formatMoney"/>
<a:column name="amount_received_interest" prompt="已收利息总额" width="80" renderer="Leaf.formatMoney"/>
<a:column name="amount_received_penalty" prompt="已收违约金" width="80" renderer="Leaf.formatMoney"/>
<a:column name="et_date" prompt="合同结束日" width="80" renderer="Leaf.formatDate"/> <a:column name="et_date" prompt="合同结束日" width="80" renderer="Leaf.formatDate"/>
</a:columns> </a:columns>
......
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