Commit 66191c86 authored by taoruidan18083's avatar taoruidan18083

I-21941系统合同工作流结束优化调整

parent 8595ed1c
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<!--<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 ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item not in(0,40,911,9)) - (select sum(ccc.received_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 not in(0,40,911,9))) = 0 THEN &apos;是&apos; ELSE &apos;否&apos; END)" forInsert="false" forUpdate="false"/> <bm:field name="is_terminate" expression="(CASE WHEN (select nvl(sum(nvl(ccc.due_amount,0)),0)-nvl(sum(nvl(ccc.received_amount,0)),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 not in(0,40,911)) = 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_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_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_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"/>
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<bm:field name="is_sbo_zero" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="IS_SBO_ZERO" prompt="CON_CONTRACT.IS_SBO_ZERO"/> <bm:field name="is_sbo_zero" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="IS_SBO_ZERO" prompt="CON_CONTRACT.IS_SBO_ZERO"/>
<bm:field name="is_sbo_zero_desc"/> <bm:field name="is_sbo_zero_desc"/>
<bm:field name="amount_unreceived_penalty" forInsert="false" forUpdate="false"/> <bm:field name="amount_unreceived_penalty" forInsert="false" forUpdate="false"/>
<bm:field name="is_peanalty_flag" expression="(CASE WHEN (select nvl(sum(nvl(ccc.due_amount,0)) - sum(nvl(ccc.received_amount,0)),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 not in(0,40,911)) = (select nvl(sum(nvl(ccc.due_amount,0))-sum(nvl(ccc.received_amount,0)),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 in(9)) THEN &apos;Y&apos; ELSE &apos;N&apos; END)" forInsert="false" forUpdate="false"/>
</bm:fields> </bm:fields>
<bm:features> <bm:features>
<f:standard-who/> <f:standard-who/>
......
...@@ -36,10 +36,10 @@ ...@@ -36,10 +36,10 @@
<!--<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 ccc.contract_id = t1.contract_id AND ccc.cf_status&lt;&gt;&apos;BLOCK&apos; and ccc.cf_item not in(0,40,911,9)) - (select sum(ccc.received_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 not in(0,40,911,9))) = 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="is_terminate" expression="(CASE WHEN (select nvl(sum(nvl(ccc.due_amount,0)),0)-nvl(sum(nvl(ccc.received_amount,0)),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 not in(0,40,911)) = 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_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_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_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"/>
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
<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="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="is_sbo_zero" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="IS_SBO_ZERO" prompt="CON_CONTRACT.IS_SBO_ZERO"/> <bm:field name="is_sbo_zero" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="IS_SBO_ZERO" prompt="CON_CONTRACT.IS_SBO_ZERO"/>
<bm:field name="is_sbo_zero_desc"/> <bm:field name="is_sbo_zero_desc"/>
<bm:field name="sum_unreceived_penalty" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SUM_UNRECEIVED_PENALTY" prompt="CON_CONTRACT.SUM_UNRECEIVED_PENALTY"/> <bm:field name="sum_unreceived_penalty"/>
<bm:field name="breach_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BREACH_TYPE" prompt="CON_CONTRACT.BREACH_TYPE"/> <bm:field name="breach_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="BREACH_TYPE" prompt="CON_CONTRACT.BREACH_TYPE"/>
<bm:field name="breach_type_desc"/> <bm:field name="breach_type_desc"/>
<bm:field name="backgroud_description"/> <bm:field name="backgroud_description"/>
</bm:fields> </bm:fields>
......
...@@ -158,6 +158,8 @@ ...@@ -158,6 +158,8 @@
} }
} }
//新增逻辑经租与非经租分开校验
if(fl_records!=''){
//批量提交追加结零合同与非结零合同不能同时提交 //批量提交追加结零合同与非结零合同不能同时提交
for (var k = 0; k < records.length; k++) { for (var k = 0; k < records.length; k++) {
for (var m = k + 1; m < records.length; m++) { for (var m = k + 1; m < records.length; m++) {
...@@ -167,13 +169,28 @@ ...@@ -167,13 +169,28 @@
} }
} }
} }
for (var i = 0; i < records.length; i++) {
var TerminateData = []; if(records[i].data.is_terminate=='否' && records[i].data.is_peanalty_flag=='N'){
for (var i = 0; i < records.length; i++) { $L.showInfoMessage("提示",'未收金额如果不为0不可进行合同结束');
return;
}
}
}else if(op_records!=''){
//经租校验保持原逻辑
for (var i = 0; i < records.length; i++) {
if(records[i].data.is_terminate=='否'){ if(records[i].data.is_terminate=='否'){
$L.showInfoMessage("提示",'未收金额如果不为0不可进行合同结束'); $L.showInfoMessage("提示",'未收金额如果不为0不可进行合同结束');
return; return;
} }
}
}
var TerminateData = [];
for (var i = 0; i < records.length; i++) {
//if(records[i].data.is_terminate=='否' && records[i].data.is_peanalty_flag=='N'){
//$L.showInfoMessage("提示",'未收金额如果不为0不可进行合同结束');
//return;
// }
jQuery.each(seal_record.data, function(j, v){ jQuery.each(seal_record.data, function(j, v){
records[i].set( j , v ); records[i].set( j , v );
...@@ -384,6 +401,7 @@ ...@@ -384,6 +401,7 @@
<a:field name="contract_status_n" displayField="code_value_name" <a:field name="contract_status_n" displayField="code_value_name"
options="con560_contract_status_ds" returnField="contract_status" options="con560_contract_status_ds" returnField="contract_status"
valueField="code_value"/> valueField="code_value"/>
<a:field name="amount_unreceived_penalty" defaultValue="1"/>
<a:field name="amount_unreceived_penalty_n" options="QUERY_PEANLTY_FLAG_DS" <a:field name="amount_unreceived_penalty_n" options="QUERY_PEANLTY_FLAG_DS"
returnField="amount_unreceived_penalty" displayField="code_value_name" valueField="code_value" returnField="amount_unreceived_penalty" displayField="code_value_name" valueField="code_value"
defaultValue="0"/> defaultValue="0"/>
......
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