Commit bea22f89 authored by lijingjing's avatar lijingjing

[fix] 销项发票bug修改以及合同签约查询条件修改

parent b48ea954
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- <bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false" >
$Author: ZLF <bm:fields>
$Date: 2014-12-8 上午11:04:41 <bm:field name="bp_code" displayWidth="200" forDisplay="true" forQuery="true" prompt="代理店编码"/>
$Revision: 1.0 <bm:field name="value_name" displayWidth="200" forDisplay="true" forQuery="true" prompt="代理店名称"/>
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm"> </bm:fields>
<bm:operations> <bm:operations>
<bm:operation name="query"> <bm:operation name="query">
<bm:update-sql><![CDATA[ <bm:query-sql><![CDATA[
SELECT select t1.*
hbm.bp_id value_code, from (SELECT hbm.bp_id value_code, hbm.bp_name value_name, hbm.bp_code
hbm.bp_name value_name, FROM hls_bp_master hbm
hbm.bp_code WHERE hbm.enabled_flag = 'Y'
FROM AND hbm.bp_category = 'AGENT') t1
hls_bp_master hbm
WHERE #WHERE_CLAUSE#
hbm.enabled_flag = 'Y' AND ]]></bm:query-sql>
hbm.bp_category = 'AGENT'
]]></bm:update-sql>
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:query-fields>
<bm:query-field field="bp_code" queryOperator="like" />
<bm:query-field field="value_name" queryOperator="like" />
</bm:query-fields>
</bm:model> </bm:model>
...@@ -182,9 +182,11 @@ ...@@ -182,9 +182,11 @@
<bm:data-filters> <bm:data-filters>
<bm:data-filter enforceOperations="query" expression="nvl(t2.billing_amount,0)&lt;t2.received_amount"/> <bm:data-filter enforceOperations="query" expression="nvl(t2.billing_amount,0)&lt;t2.received_amount"/>
<bm:data-filter enforceOperations="query" expression="t1.contract_id = t2.contract_id"/> <bm:data-filter enforceOperations="query" expression="t1.contract_id = t2.contract_id"/>
<bm:data-filter enforceOperations="query" expression="t2.cf_item in(&apos;1&apos;,&apos;8&apos;,&apos;9&apos;,&apos;10&apos;,&apos;12&apos;,&apos;13&apos;,&apos;200&apos;,&apos;912&apos;,&apos;913&apos;,&apos;301&apos;)"/> <bm:data-filter name="cf_item" enforceOperations="query" expression="t2.cf_item in(&apos;2&apos;,&apos;1&apos;,&apos;9&apos;,&apos;8&apos;,&apos;200&apos;,&apos;250&apos;)"/>
<bm:data-filter enforceOperations="query" expression="t2.write_off_flag != &apos;NOT&apos;"/> <bm:data-filter enforceOperations="query" expression="t2.write_off_flag != &apos;NOT&apos;"/>
<bm:data-filter enforceOperations="query" expression="t2.cf_status = &apos;RELEASE&apos;"/> <bm:data-filter enforceOperations="query" expression="t2.cf_status = &apos;RELEASE&apos;"/>
<bm:data-filter enforceOperations="query" expression="t2.billing_status != &apos;FULL&apos; and t2.cf_direction=&apos;INFLOW&apos;"/> <bm:data-filter enforceOperations="query" expression="t2.billing_status != &apos;FULL&apos; and t2.cf_direction=&apos;INFLOW&apos;"/>
<bm:data-filter name="contract_status" enforceOperations="query" expression="t1.contract_status in(&apos;NEW&apos;,&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;REPURING&apos;,&apos;CLOSED&apos;)"/>
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
FROM FROM
sys_code_values_v v sys_code_values_v v
WHERE WHERE
v.code in ('CON500_CONTRACT_STATUS','CON660_CONTRACT_STATUS') AND v.code in ('CON500_CONTRACT_STATUS') AND
v.code_enabled_flag = 'Y' AND v.code_enabled_flag = 'Y' AND
v.code_value_enabled_flag = 'Y' v.code_value_enabled_flag = 'Y'
ORDER BY ORDER BY
...@@ -28,5 +28,7 @@ ...@@ -28,5 +28,7 @@
</bm:query-fields> </bm:query-fields>
<bm:data-filters> <bm:data-filters>
<bm:data-filter name="code" expression="t1.code =decode(${@lease_channel},&apos;00&apos;,&apos;CON500_CONTRACT_STATUS&apos;,&apos;01&apos;,&apos;CON660_CONTRACT_STATUS&apos;,&apos;CON500_CONTRACT_STATUS&apos;)"/> <bm:data-filter name="code" expression="t1.code =decode(${@lease_channel},&apos;00&apos;,&apos;CON500_CONTRACT_STATUS&apos;,&apos;01&apos;,&apos;CON660_CONTRACT_STATUS&apos;,&apos;CON500_CONTRACT_STATUS&apos;)"/>
<bm:data-filter name="code_value" enforceOperations="query" expression="t1.code_value in(&apos;NEW&apos;,&apos;INCEPT&apos;,&apos;ETING&apos;,&apos;REPURING&apos;,&apos;CLOSED&apos;)"/>
</bm:data-filters> </bm:data-filters>
</bm:model> </bm:model>
...@@ -25,6 +25,6 @@ ...@@ -25,6 +25,6 @@
</ns1:query-fields> </ns1:query-fields>
<ns1:data-filters> <ns1:data-filters>
<ns1:data-filter name="enabled_flag" enforceOperations="query" expression="t1.enabled_flag=&apos;Y&apos;"/> <ns1:data-filter name="enabled_flag" enforceOperations="query" expression="t1.enabled_flag=&apos;Y&apos;"/>
<ns1:data-filter name="cf_item" enforceOperations="query" expression="t1.cf_item in(&apos;1&apos;,&apos;8&apos;,&apos;9&apos;,&apos;10&apos;,&apos;12&apos;,&apos;13&apos;,&apos;200&apos;,&apos;912&apos;,&apos;913&apos;,&apos;301&apos;)"/> <ns1:data-filter name="cf_item" enforceOperations="query" expression="t1.cf_item in(&apos;2&apos;,&apos;1&apos;,&apos;9&apos;,&apos;8&apos;,&apos;200&apos;,&apos;250&apos;)"/>
</ns1:data-filters> </ns1:data-filters>
</ns1:model> </ns1:model>
...@@ -14,4 +14,16 @@ var add_datafilters = [ ...@@ -14,4 +14,16 @@ var add_datafilters = [
} }
]; ];
var override_queryfields = [
{
name : 'contract_creation_date_from',
queryexpression : "trunc(t1.contract_creation_date) >= to_date(${@contract_creation_date_from},'yyyy-mm-dd')"
},
{
name : 'contract_creation_date_to',
queryexpression : "trunc(t1.contract_creation_date) <= to_date(${@contract_creation_date_to},'yyyy-mm-dd')"
}
];
override();
add_datafilter(); add_datafilter();
\ No newline at end of file
...@@ -5,7 +5,9 @@ ...@@ -5,7 +5,9 @@
<a:model-query defaultWhereClause="document_category=&apos;CONTRACT&apos;" fetchAll="true" model="basic.hls_document_type_v_lov" rootPath="contract_type_list"/> <a:model-query defaultWhereClause="document_category=&apos;CONTRACT&apos;" fetchAll="true" model="basic.hls_document_type_v_lov" rootPath="contract_type_list"/>
<a:model-query defaultWhereClause="t1.enabled_flag = &apos;Y&apos;" model="prj.PRJ505.con_billing_method" rootPath="billing_method_list"/> <a:model-query defaultWhereClause="t1.enabled_flag = &apos;Y&apos;" model="prj.PRJ505.con_billing_method" rootPath="billing_method_list"/>
<a:model-query fetchAll="true" model="basic.hls_lease_channel_for_lov" rootPath="acr510_lease_list"/> <a:model-query fetchAll="true" model="basic.hls_lease_channel_for_lov" rootPath="acr510_lease_list"/>
<!--
<a:model-query fetchAll="true" model="acr.ACR510.acr_bp_agent_ds" rootPath="bp_id_agent_ds"/> <a:model-query fetchAll="true" model="acr.ACR510.acr_bp_agent_ds" rootPath="bp_id_agent_ds"/>
-->
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="pageLink_select_cashflow" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_select_cashflow.lview"/> <a:link id="pageLink_select_cashflow" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_select_cashflow.lview"/>
...@@ -159,9 +161,9 @@ ...@@ -159,9 +161,9 @@
<a:dataSet id="billingMethodDs"> <a:dataSet id="billingMethodDs">
<a:datas dataSource="/model/billing_method_list"/> <a:datas dataSource="/model/billing_method_list"/>
</a:dataSet> </a:dataSet>
<a:dataSet id="bp_agent_ds"> <!-- <a:dataSet id="bp_agent_ds">
<a:datas dataSource="/model/bp_id_agent_ds"/> <a:datas dataSource="/model/bp_id_agent_ds"/>
</a:dataSet> </a:dataSet>-->
<a:dataSet id="allConditionDs" autoCreate="true"> <a:dataSet id="allConditionDs" autoCreate="true">
<a:fields> <a:fields>
<a:field name="bill_object_bp_class_desc" displayField="code_value_name" options="acr510_bp_class" returnField="bill_object_bp_class" valueField="code_value"/> <a:field name="bill_object_bp_class_desc" displayField="code_value_name" options="acr510_bp_class" returnField="bill_object_bp_class" valueField="code_value"/>
...@@ -240,7 +242,22 @@ ...@@ -240,7 +242,22 @@
<a:field name="prj_search_term_2"/> <a:field name="prj_search_term_2"/>
<a:field name="con_search_term_2"/> <a:field name="con_search_term_2"/>
<a:field name="document_type_desc" displayField="description" options="acr510_document_type_name_ds" returnField="document_type" valueField="document_type"/> <a:field name="document_type_desc" displayField="description" options="acr510_document_type_name_ds" returnField="document_type" valueField="document_type"/>
<!--
<a:field name="bp_id_agent_level1" displayField="value_name" options="bp_agent_ds" returnField="value_code" valueField="value_code"/> <a:field name="bp_id_agent_level1" displayField="value_name" options="bp_agent_ds" returnField="value_code" valueField="value_code"/>
-->
<!-- <a:field name="bp_id_agent_level1" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="acr.ACR510.acr_bp_agent_ds" lovWidth="600" title="代理店">
<a:mapping>
<a:map from="bp_code" to="bp_id_agent_level1"/>
<a:map from="bp_name" to="bp_id_agent_level1"/>
</a:mapping>
</a:field>-->
<a:field name="bp_id_agent_level1" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="acr.ACR510.acr_bp_agent_ds" lovWidth="600" title="代理店">
<a:mapping>
<a:map from="value_code" to="bp_id_agent_level1"/>
<a:map from="value_name" to="bp_id_agent_level1"/>
</a:mapping>
</a:field>
</a:fields> </a:fields>
<a:events> <a:events>
<a:event name="update" handler="queryUpdateFunction"/> <a:event name="update" handler="queryUpdateFunction"/>
...@@ -290,7 +307,7 @@ ...@@ -290,7 +307,7 @@
<a:comboBox name="invoice_type_desc" bindTarget="allConditionDs" prompt="发票类型"/> <a:comboBox name="invoice_type_desc" bindTarget="allConditionDs" prompt="发票类型"/>
--> -->
<a:comboBox name="contract_status_desc" bindTarget="allConditionDs" prompt="合同状态"/> <a:comboBox name="contract_status_desc" bindTarget="allConditionDs" prompt="合同状态"/>
<a:comboBox name="bp_id_agent_level1" bindTarget="allConditionDs" prompt="代理店"/> <a:lov name="bp_id_agent_level1" bindTarget="allConditionDs" prompt="代理店"/>
<a:lov name="cf_item_desc" bindTarget="allConditionDs" prompt="HLS.RECEIVE_PROJECT"/> <a:lov name="cf_item_desc" bindTarget="allConditionDs" prompt="HLS.RECEIVE_PROJECT"/>
</a:formToolBar> </a:formToolBar>
......
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
<a:model-query fetchAll="true" model="acr.ACR512.acr_invoice_business_type_list" rootPath="acr515_business_type_list"/> <a:model-query fetchAll="true" model="acr.ACR512.acr_invoice_business_type_list" rootPath="acr515_business_type_list"/>
</a:init-procedure> </a:init-procedure>
<a:view> <a:view>
<a:link id="acr513_invoice_readonly_page"
url="${/request/@context_path}/modules/cont/CON500/con_contract_update.lview"/> <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
<a:link id="bmLink_vat_pause_or_submit" model="acr.ACR515.acr_invoice_vat" modelaction="batch_update"/> <a:link id="bmLink_vat_pause_or_submit" model="acr.ACR515.acr_invoice_vat" modelaction="batch_update"/>
<a:link id="bmLink_vat_receive" model="acr.ACR515.acr_invoice_vat" modelaction="execute"/> <a:link id="bmLink_vat_receive" model="acr.ACR515.acr_invoice_vat" modelaction="execute"/>
<a:link id="acr515_update_post_link" url="${/request/@context_path}/modules/acr/ACR515/acr_invoice_insert_tmp.lsc"/> <a:link id="acr515_update_post_link" url="${/request/@context_path}/modules/acr/ACR515/acr_invoice_insert_tmp.lsc"/>
...@@ -292,7 +295,26 @@ ...@@ -292,7 +295,26 @@
return '<font color="red">' + Leaf.formatNumber(sum2 ,2)+ '</font>'; return '<font color="red">' + Leaf.formatNumber(sum2 ,2)+ '</font>';
} }
} }
function open_document_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_code'] = 'ACR513';
param['document_id'] = record.get('invoice_hd_id');
param['function_usage'] = 'QUERY';
param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'acr513_invoice_readonly_page', 'acr515_invoiceVatDs');
}
function acr512_document_number_render(value, record, name) {
if (name == 'document_number' && value) {
return '<a href="javascript:open_document_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
}
return value;
}
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets> <a:dataSets>
<a:dataSet id="acr515_invoiceKindDs" lookupCode="ACR510_INVOICE_KIND"/> <a:dataSet id="acr515_invoiceKindDs" lookupCode="ACR510_INVOICE_KIND"/>
<a:dataSet id="acr515_invoiceStatusDs" lookupCode="ACR510_AR_INVOICE_STATUS"/> <a:dataSet id="acr515_invoiceStatusDs" lookupCode="ACR510_AR_INVOICE_STATUS"/>
...@@ -429,7 +451,7 @@ ...@@ -429,7 +451,7 @@
<a:grid id="acr515_invoiceVatDs_grid" bindTarget="acr515_invoiceVatDs" marginWidth="80" navBar="true" height="300"> <a:grid id="acr515_invoiceVatDs_grid" bindTarget="acr515_invoiceVatDs" marginWidth="80" navBar="true" height="300">
<a:columns> <a:columns>
<a:column name="contract_number" width="120"/> <a:column name="contract_number" width="120"/>
<a:column name="document_number" lock="true" width="120"/> <a:column name="document_number" lock="true" width="120" renderer="acr512_document_number_render"/>
<a:column name="business_type_desc" width="80"/> <a:column name="business_type_desc" width="80"/>
<a:column name="billing_way_desc" width="80" prompt="开票方式"/> <a:column name="billing_way_desc" width="80" prompt="开票方式"/>
<a:column name="invoice_kind_desc" width="100"/> <a:column name="invoice_kind_desc" width="100"/>
......
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