Commit de6cb920 authored by niminmin's avatar niminmin

Merge branch 'develop' of https://hel.hand-china.com/hlcm/leaf-hlcm into feature/发票修改

# Conflicts:
#	src/main/webapp/modules/acr/ACR514/acr_invoice_reverse.lview
parents 8445e5e4 e7500d20
......@@ -144,7 +144,6 @@
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: feng
$Date: 2013-9-11 下午15:13:20
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql>
<![CDATA[
select c.contract_id, c.contract_number, c.contract_name
from con_contract c
where c.data_class = 'NORMAL'
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="contract_number" forDisplay="true" forQuery="true" prompt="ACR310.CONTRACT_NUMBER"/>
<bm:field name="contract_name" forDisplay="true" forQuery="true" prompt="ACR310.CONTRACT_NAME"/>
<bm:field name="contract_id"/>
</bm:fields>
<!-- <bm:fields>-->
<!-- <bm:field name="contract_number" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="contract_number" prompt="ACR310.CONTRACT_NUMBER"/>-->
<!-- <bm:field name="contract_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="contract_name" prompt="ACR310.CONTRACT_NAME"/>-->
<!-- <bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="contract_id" />-->
<!-- </bm:fields>-->
<bm:query-fields>
<bm:query-field field="contract_number" queryOperator="like"/>
<bm:query-field field="contract_name" queryOperator="like"/>
</bm:query-fields>
</bm:model>
......@@ -11,12 +11,11 @@
begin
acp_invoice_import_pkg.acp_invoice_import(p_invoice_type => ${@invoice_type},
p_invoice_code => ${@invoice_code},
p_invoice_number => ${@invoice_number},
p_invoice_number=> ${@invoice_number},
p_net_amount => ${@net_amount},
p_invoice_date => ${@invoice_date},
p_last_updated_by => ${/session/@user_id},
p_contract_id => ${@contract_id},
p_invoice_line_id => ${@invoice_line_id});
p_user_id => ${/session/@user_id},
p_contract_id => ${@contract_id});
end;
]]>
</bm:update-sql>
......
......@@ -3,7 +3,11 @@
<bm:operations>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
ACP_INVOICE_IMPORT_PKG.ACP_INVOICE_CONFIRM(p_contract_id => ${@contract_id},
p_invoice_line_id => ${@invoice_line_id},
p_user_id => ${/session/@user_id});
END;
]]></bm:update-sql>
</bm:operation>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: ZLF
$Date: 2014-12-8 上午11:04:41
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false" >
<bm:fields>
<bm:field name="bp_code" displayWidth="200" forDisplay="true" forQuery="true" prompt="代理店编码"/>
<bm:field name="value_name" displayWidth="200" forDisplay="true" forQuery="true" prompt="代理店名称"/>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:update-sql><![CDATA[
SELECT
hbm.bp_id value_code,
hbm.bp_name value_name,
hbm.bp_code
FROM
hls_bp_master hbm
WHERE
hbm.enabled_flag = 'Y' AND
hbm.bp_category = 'AGENT'
]]></bm:update-sql>
<bm:query-sql><![CDATA[
select t1.*
from (SELECT hbm.bp_id value_code, hbm.bp_name value_name, hbm.bp_code
FROM hls_bp_master hbm
WHERE hbm.enabled_flag = 'Y'
AND hbm.bp_category = 'AGENT') t1
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</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>
......@@ -182,9 +182,11 @@
<bm:data-filters>
<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="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.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 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:model>
......@@ -14,7 +14,7 @@
FROM
sys_code_values_v v
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_value_enabled_flag = 'Y'
ORDER BY
......@@ -28,5 +28,7 @@
</bm:query-fields>
<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_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:model>
......@@ -25,6 +25,6 @@
</ns1:query-fields>
<ns1:data-filters>
<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:model>
......@@ -27,8 +27,8 @@
</bm:operations>
<bm:fields>
<bm:field name="user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="USER_ID"/>
<bm:field name="user_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="100" forDisplay="true" forQuery="true" physicalName="USER_NAME" prompt="用户编码" queryWidth="100"/>
<bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="100" forDisplay="true" forQuery="true" physicalName="DESCRIPTION" prompt="用户名称" queryWidth="100"/>
<bm:field name="user_name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="100" forDisplay="false" forQuery="false" physicalName="USER_NAME" prompt="用户编码" queryWidth="100"/>
<bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="100" forDisplay="false" forQuery="false" physicalName="DESCRIPTION" prompt="用户名称" queryWidth="100"/>
<bm:field name="employee_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="EMPLOYEE_ID"/>
<bm:field name="employee_code" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="100" forDisplay="true" forQuery="true" physicalName="EMPLOYEE_CODE" prompt="员工编码" queryWidth="100"/>
<bm:field name="name" databaseType="VARCHAR2" datatype="java.lang.String" displayWidth="100" forDisplay="true" forQuery="true" physicalName="NAME" prompt="员工姓名" queryWidth="100"/>
......@@ -36,8 +36,8 @@
</bm:fields>
<bm:query-fields>
<bm:query-field name="employee_code" queryExpression="e.employee_code like ${@employee_code}"/>
<bm:query-field name="user_name" queryExpression="su.user_name like ${@user_name}"/>
<bm:query-field name="description" queryExpression="su.description like ${@description}"/>
<!-- <bm:query-field name="user_name" queryExpression="su.user_name like ${@user_name}"/>
<bm:query-field name="description" queryExpression="su.description like ${@description}"/>-->
<bm:query-field name="name" queryExpression="e.name like ${@name}"/>
</bm:query-fields>
<bm:data-filters>
......
......@@ -36,6 +36,8 @@
<bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION" prompt="HLS.DESCRIPTION"/>
<bm:field name="total_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TOTAL_AMOUNT" prompt="ACR.TOTAL_AMOUNT"/>
<bm:field name="tax_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="TAX_AMOUNT" prompt="ACR.TAX_AMOUNT"/>
<bm:field name="return_tax_amount" databaseType="NUMBER" datatype="java.lang.Double" prompt="金税返回税额"/>
<bm:field name="dif_tax_amount" prompt="税额差"/>
<bm:field name="net_amount" databaseType="NUMBER" datatype="java.lang.Double" physicalName="NET_AMOUNT" prompt="不含税金额"/>
<bm:field name="currency" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY" prompt="HLS.CURRENCY"/>
<bm:field name="currency_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CURRENCY_DESC" prompt="HLS.CURRENCY_DESC"/>
......@@ -71,7 +73,7 @@
<bm:field name="invoice_kind" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND" prompt="ACR.INVOICE_KIND"/>
<bm:field name="invoice_kind_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_DESC" prompt="ACR.INVOICE_KIND_DESC"/>
<bm:field name="vat_interface_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VAT_INTERFACE_STATUS" prompt="ACR.VAT_INTERFACE_STATUS"/>
<bm:field name="vat_interface_status_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VAT_INTERFACE_STATUS_DESC" prompt="ACR.VAT_INTERFACE_STATUS_DESC"/>
<bm:field name="vat_interface_status_desc" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VAT_INTERFACE_STATUS_DESC" prompt="金税状态"/>
<bm:field name="vat_invoice_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VAT_INVOICE_CODE" prompt="ACR.VAT_INVOICE_CODE"/>
<bm:field name="vat_invoice_status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VAT_INVOICE_STATUS"/>
<bm:field name="vat_red_notice_num" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="VAT_RED_NOTICE_NUM"/>
......
......@@ -10,10 +10,11 @@
contract_id,
to_char(due_date,'yyyy-mm-dd') due_date,
due_amount,
principal,
interest,
principal - nvl(received_principal,0) unreceived_principal,
interest - nvl(received_interest,0) unreceived_interest,
due_amount - nvl(received_amount,0) unreceived_amount,
decode(cf_item,1,due_amount-nvl(received_amount,0)) unreceived_rental
due_amount - nvl(received_amount,0) unreceived_amount
from con_contract_cashflow t
#WHERE_CLAUSE#
order by times, due_date
......@@ -24,6 +25,8 @@
<bm:field name="contract_id"/>
<bm:field name="cashflow_id"/>
<bm:field name="times"/>
<bm:field name="principal"/>
<bm:field name="interest"/>
<bm:field name="cf_item"/>
<bm:field name="cf_item_desc"/>
<bm:field name="due_date"/>
......@@ -31,7 +34,6 @@
<bm:field name="unreceived_principal"/>
<bm:field name="unreceived_interest"/>
<bm:field name="unreceived_amount"/>
<bm:field name="unreceived_rental"/>
</bm:fields>
<bm:query-fields>
<bm:query-field name="contract_id" queryExpression="t.contract_id = ${@contract_id}"/>
......
......@@ -17,4 +17,7 @@
<bm:features>
<f:standard-who xmlns:f="leaf.database.features"/>
</bm:features>
<bm:query-fields>
<bm:query-field name="write_off_cf_item" queryExpression="(${@write_off_cf_item} = 'Y' and cf_item in (1,2,8,9,200,250))"/>
</bm:query-fields>
</bm:model>
......@@ -13,8 +13,8 @@
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" forDisplay="true" forQuery="true" physicalName="BP_ID" prompt="用户ID"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="BP_NAME" prompt="户名称"/>
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" forDisplay="false" forQuery="false" physicalName="BP_ID" prompt="用户ID"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="BP_NAME" prompt="户名称"/>
<bm:field name="id_card_no" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" physicalName="ID_CARD_NO" prompt="身份证号"/>
</bm:fields>
<bm:query-fields >
......
var override_queryfields = [
];
var add_datafilters = [ {
name : 'confirmation_status',
expression : "t1.confirmation_status is null"
} ];
add_datafilter();
override();
var override_queryfields = [
];
var add_datafilters = [ {
name : 'confirmation_status',
expression : "t1.confirmation_status is not null"
} ];
add_datafilter();
override();
......@@ -14,5 +14,17 @@ var add_datafilters = [
expression : "(exists (select 1 from aut_trx_user_authorize a1, aut_owner_user_authorize a2 where a1.trx_category = 'CONTRACT' and a1.trx_id = t1.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))))"
}
];
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();
\ No newline at end of file
......@@ -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();
\ No newline at end of file
......@@ -6,33 +6,44 @@
modelaction="update"/>
<a:link id="ap_invoice_import_detail_link"
url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_detail.lview"/>
<a:link id="ap_invoice_import_scanning_link"
url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_scanning.lview"/>
<script><![CDATA[
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var url = $('ap_invoice_import_scanning_link').getUrl();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln');
Leaf.Window({
id: 'ap_invoice_import_scanning',
url: url,
title:'发票导入',
width: 400,
height:140
}).on('close', function() {
$(ds_id).query();
});
};
function ap_invoice_import_detail(){
var param = {};
param['function_code'] = 'ACP522I';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['url_title'] = '进项发票导入';
hls_doc_get_layout_code('hn9040_project_get_layout_code_link_id', param, 'ap_invoice_import_detail_link');
}
//超链接渲染
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
var link_function = '';
var invoice_line_id = record.get('invoice_line_id');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
return '<a href="javascript:attachment_window_open(\'' + invoice_line_id + '\',\'' + record.id + '\',\'' + record.ds.id + '\');">' + '上传' + '</a>';
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {debugger;
if(name == 'contract_number'){
return '<a href="javascript:ap_invoice_import_detail(\'' + invoice_line_id + '\',\'' + record.id + '\',\'' + record.ds.id + '\');">' + value + '</a>';
return '<a href="javascript:ap_invoice_import_detail(\'' + record.id + '\',\'' + record.ds.id + '\');">' + value + '</a>';
}
};
function ap_invoice_import_detail(record_id,ds_id){debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_usage'] = 'MODIFY';
param['function_code'] = 'ACP522I';
param['contract_id'] = record.get('contract_id');
param['url_title'] = '进项发票详情';
hls_doc_get_layout_code('hn9040_project_get_layout_code_link_id', param, 'ap_invoice_import_detail_link', ds_id);
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
......@@ -2,31 +2,15 @@
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
trace="true">
<a:view>
<a:link id="ap_invoice_import_scanning_link"
url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_scanning.lview"/>
<script><![CDATA[
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var url = $('ap_invoice_import_scanning_link').getUrl();
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln');
var rs = $(ds_id).getSelected();
var contract_id = rs[0].get('contract_id');
var invoice_line_id = rs[0].get('invoice_line_id');
Leaf.Window({
id: 'ap_invoice_import_scanning',
url: url,
params: {
contract_id: contract_id,
invoice_line_id: invoice_line_id
},
title:'${l:HLS.SUPPORTING_DOCUMENT}',
width: 300,
height:100
}).on('close', function() {
$('AP_INVOICE_IMPORT_DETAIL_G_AP_acp_invoice_ln_ds').query();
Leaf.onReady(function () {
var acp_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln');
if ('${/parameter/@contract_id}') {
$(acp_ds_id).setQueryParameter('contract_id', '${/parameter/@contract_id}');
$(acp_ds_id).query();
}
});
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
......
......@@ -8,10 +8,10 @@
<script><![CDATA[
function invoice_inf_process(dataset, record, name, value, oldvalue) {
debugger;
var test = $('acp522_acp_invoice_import_ds').getAt(0).get('invoice');
var strs = new Array();
strs = test.split(',');
if(name == 'invoice') {
record.getField('invoice').setReadOnly(true);
var contract_id = record.get('contract_id');
var strs = value.split(',');
var invoice_type = strs[1];
var invoice_code = strs[2];
var invoice_number = strs[3];
......@@ -26,21 +26,32 @@
invoice_number: invoice_number,
net_amount: net_amount,
invoice_date: invoice_date,
contract_id: '${/parameter/@contract_id}',
invoice_line_id: '${/parameter/@invoice_line_id}'
contract_id: contract_id
},
success: function (res) {
success: function () {
Leaf.SideBar.show({
msg: '导入成功',
duration: 2000
});
},
$('ap_invoice_import_scanning').close()
);
},failure: function() {
record.getField('invoice').setReadOnly(false);
},
error: function() {
record.getField('invoice').setReadOnly(false);
},
scope: this
});
$('ap_invoice_import_scanning').close();
} else {
// $('acp600_acp_invoice_hd_ds').getAt(0).setReadOnly(true);
Leaf.showMessage('提示', '发票信息误!');
record.getField('invoice').setReadOnly(false);
}
}else {
if(value){
record.getField('invoice').setReadOnly(false);
}
}
}
......@@ -48,7 +59,16 @@
<a:dataSets>
<a:dataSet id="acp522_acp_invoice_import_ds">
<a:fields>
<a:field name="invoice" required="true"/>
<a:field name="invoice" required="true" readOnly="true"/>
<a:field name="contract_name" required="true" lovGridHeight="350" lovHeight="500" lovLabelWidth="100"
lovService="acp.ACP522.acp_import_contract_lov" lovWidth="520"
title="SELECT_CONTRACT">
<a:mapping>
<a:map from="contract_number" to="contract_number"/>
<a:map from="contract_name" to="contract_name"/>
<a:map from="contract_id" to="contract_id"/>
</a:mapping>
</a:field>
</a:fields>
<a:events>
<a:event name="update" handler="invoice_inf_process"/>
......@@ -57,7 +77,9 @@
</a:dataSets>
<a:screenBody>
<a:form title="请扫描发票二维码">
<a:textField name="invoice" width="270" bindTarget="acp522_acp_invoice_import_ds"/>
<a:lov name="contract_name" bindTarget="acp522_acp_invoice_import_ds" width="270" prompt="SELECT_CONTRACT"/>
<!-- <a:textField name="contract_number" bindTarget="acp522_acp_invoice_import_ds" width="270" prompt="SELECT_CONTRACT"/>-->
<a:textField name="invoice" width="270" bindTarget="acp522_acp_invoice_import_ds" prompt="扫描发票"/>
</a:form>
</a:screenBody>
</a:view>
......
......@@ -6,34 +6,38 @@
modelaction="update"/>
<a:link id="ap_invoice_confirm_link" model="acp.ACP523.ap_invoice_confirm" modelaction="update"/>
<script><![CDATA[
//确认按钮
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'acp_invoice_ln');
var records = $(ds_id).getSelected();
if (records.length == 0) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
return;
}
var record = records[0];
var imported_by = record.get('imported_by');
if(imported_by == '${/session/@user_id}'){
Leaf.showMessage('${l:PROMPT}', '导入人与确认人相同!');
return false;
}
Leaf.request({
url: $('ap_invoice_confirm_link').getUrl(),
para: {
contract_id: record.get('contract_id'),
invoice_line_id: record.get('invoice_line_id')
},
scope: this,
success: function (res) {
if (res.result.record) {
var datas = res.result.record.overdue_amount;
$jq("#con-overdue-week").append(formatCurrency(datas));
} else {
$jq("#con-overdue-week").append('¥3400.00');
}
success: function () {
Leaf.SideBar.show({
msg: '确认成功',
duration: 2000
});
$(ds_id).query();
}
})
};
//超链接渲染
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
//
var link_function = '';
var invoice_line_id = record.get('invoice_line_id');
window['${/parameter/@bp_seq}${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
return '<a href="javascript:attachment_window_open(\'' + invoice_line_id + '\',\'' + record.id + '\',\'' + record.ds.id + '\');">' + '上传' + '</a>';
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
......@@ -18,10 +18,30 @@
var win = $('acr_invoice_create_invoice');
win.close();
}
function colum_caculateTotal(data, name) {
var total = 0;
var length = data.length;
var value = 0;
for (var i = 0;i < length;i++) {
if (Ext.isEmpty(data[i].get(name))) {
value = 0;
} else {
value = data[i].get(name);
}
total = plus(total, value);
}
return '<font color=red>' + Leaf.formatMoney(total) + '</font>';
}
function sum_foot(data, name) {
if (name == 'billing_amount') {
return colum_caculateTotal(data, name);
}
}
function createScreen_create()
{
debugger;
var win = $('acr_invoice_create_invoice');
var ds=$('headDs');
if(!ds.validate(true))
......@@ -36,7 +56,6 @@
url: $('svcLink_create_invoice').getUrl(),
para: datas,
success: function(res) {
debugger;
createScreen_close();
contractDs_grid_query();
},
......@@ -130,7 +149,7 @@
<a:column name="due_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="received_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="cf_billing_amount" align="right" renderer="Leaf.formatMoney"/>
<a:column name="billing_amount" align="right" editor="selectedDs_grid_editor_nf" renderer="Leaf.formatMoney"/>
<a:column name="billing_amount" align="right" editor="selectedDs_grid_editor_nf" renderer="Leaf.formatMoney" footerRenderer="sum_foot"/>
</a:columns>
<a:editors>
<a:comboBox id="selectedDs_grid_editor_comb"/>
......@@ -149,8 +168,8 @@
<a:column name="project_number" width="150"/>
<a:column name="project_name" width="200"/>
<a:column name="last_received_date" renderer="Leaf.formatDate" width="80"/>
<a:column name="exchange_rate" align="right"/>
<a:column name="exchange_rate_type_desc"/>
<!-- <a:column name="exchange_rate" align="right"/>
<a:column name="exchange_rate_type_desc"/>-->
</a:columns>
</a:grid>
</a:tab>
......
......@@ -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="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="acr.ACR510.acr_bp_agent_ds" rootPath="bp_id_agent_ds"/>
-->
</a:init-procedure>
<a:view>
<a:link id="pageLink_select_cashflow" url="${/request/@context_path}/modules/acr/ACR510/acr_invoice_select_cashflow.lview"/>
......@@ -159,9 +161,9 @@
<a:dataSet id="billingMethodDs">
<a:datas dataSource="/model/billing_method_list"/>
</a:dataSet>
<a:dataSet id="bp_agent_ds">
<!-- <a:dataSet id="bp_agent_ds">
<a:datas dataSource="/model/bp_id_agent_ds"/>
</a:dataSet>
</a:dataSet>-->
<a:dataSet id="allConditionDs" autoCreate="true">
<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"/>
......@@ -186,7 +188,13 @@
<a:field name="project_name_from" readOnly="true"/>
<a:field name="project_name_to" readOnly="true"/>
<a:field name="contract_number"/>
<a:field name="invoice_title"/>
<!-- <a:field name="invoice_title"/>-->
<a:field name="invoice_title" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="basic.hls_bp_master_v_for_lov" lovWidth="600" title="承租人">
<a:mapping>
<a:map from="bp_code" to="invoice_title"/>
<a:map from="bp_name" to="invoice_title"/>
</a:mapping>
</a:field>
<a:field name="bp_code_tenant_from" lovGridHeight="300" lovHeight="450" lovLabelWidth="100" lovService="basic.hls_bp_master_v_for_lov" lovWidth="600" title="ACR510.FIELD.BP_CODE_TENANT_FROM">
<a:mapping>
<a:map from="bp_code" to="bp_code_tenant_from"/>
......@@ -234,7 +242,22 @@
<a:field name="prj_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="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:events>
<a:event name="update" handler="queryUpdateFunction"/>
......@@ -274,13 +297,21 @@
</a:screenTopToolbar>-
<a:queryForm id="condition_queryForm" bindTarget="allConditionDs" createSearchButton="false" resultTarget="contractDs">
<a:formToolBar labelWidth="100">
<a:lov name="invoice_title" bindTarget="allConditionDs" prompt="承租人"/>
<!--
<a:comboBox name="bill_object_bp_class_desc" bindTarget="allConditionDs" prompt="客户类型"/>
-->
<a:textField name="contract_number" bindTarget="allConditionDs" prompt="合同号"/>
<!--
<a:comboBox name="invoice_type_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:formToolBar>
<a:formBody column="4" labelWidth="400">
<!-- <a:formBody column="4" labelWidth="400">
<a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/>
<a:lov name="contract_number_to" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_TO_LANG"/>
<a:textField name="contract_name" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NAME"/>
......@@ -290,8 +321,8 @@
<a:textField name="bp_name" bindTarget="allConditionDs" prompt="HLS.TENANT_NAME"/>
<a:textField name="con_search_term_1" bindTarget="allConditionDs" prompt="合同号"/>
<a:textField name="project_number" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER"/>
<!-- <a:lov name="project_number_from" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER_FROM"/>
<a:lov name="project_number_to" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER_TO_LANG"/> -->
&lt;!&ndash; <a:lov name="project_number_from" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER_FROM"/>
<a:lov name="project_number_to" bindTarget="allConditionDs" prompt="HLS.PROJECT_NUMBER_TO_LANG"/> &ndash;&gt;
<a:comboBox name="billing_method_desc" bindTarget="allConditionDs" prompt="HLS.BILLING_RULE"/>
<a:textField name="con_search_term_2" bindTarget="allConditionDs" prompt="ACR.CONTRACT_NUM_CHECK_CODE"/>
<a:comboBox name="document_type_desc" bindTarget="allConditionDs" prompt="HLS.CONTRACT_TYPE"/>
......@@ -300,9 +331,9 @@
<a:datePicker name="lease_start_date_to" bindTarget="allConditionDs" prompt="HLS.LEASE_START_DATE_TO"/>
<a:comboBox name="division_n" bindTarget="allConditionDs" prompt="产品线"/>
<a:textField name="invoice_title" bindTarget="allConditionDs" prompt="承租人"/>
<!-- <a:datePicker name="termination_date_from" bindTarget="allConditionDs" prompt="结清日期从"/>
<a:datePicker name="termination_date_to" bindTarget="allConditionDs" prompt="结清日期到"/>-->
</a:formBody>
&lt;!&ndash; <a:datePicker name="termination_date_from" bindTarget="allConditionDs" prompt="结清日期从"/>
<a:datePicker name="termination_date_to" bindTarget="allConditionDs" prompt="结清日期到"/>&ndash;&gt;
</a:formBody>-->
</a:queryForm>
<a:tabPanel id="acr510n_detail_tabpanel_id" marginHeight="140" marginWidth="50">
<a:tabs>
......@@ -312,7 +343,7 @@
<!--<a:column name="invoice_type_desc" prompt="发票类型"/>-->
<!--<a:column name="object_taxpayer_type_desc" prompt="纳税人类型"/>-->
<a:column name="contract_number" lock="true" prompt="合同编号" width="150"/>
<a:column name="invoice_title" prompt="承租人"/>
<a:column name="invoice_title" prompt="开票对象名称"/>
<a:column name="bp_id_agent_level1" prompt="代理店"/>
<a:column name="times" align="right" lock="true" prompt="期数" width="40"/>
<a:column name="cf_item_desc" lock="true" prompt="应收项目"/>
......
......@@ -184,7 +184,7 @@
<a:dataSet id="acr512_invoice_query_ds">
<a:fields>
<a:field name="currency_name" displayField="currency_name" options="acr512_currency_ds" returnField="currency" valueField="currency_code"/>
<a:field name="invoice_kind" defaultValue="2"/>
<a:field name="invoice_kind" />
<a:field name="invoice_kind_desc" displayField="code_value_name" options="acr512_invoice_kind_ds" returnField="invoice_kind" valueField="code_value"/>
<a:field name="business_type_desc" displayField="business_type_desc" options="acr512_business_type_ds" returnField="business_type" valueField="business_type"/>
<a:field name="created_by_name" lovGridHeight="320" lovHeight="500" lovService="acr.ACR512.acr_invoice_sys_user_lov" lovWidth="500" title="开票人选择">
......
......@@ -115,6 +115,16 @@
}
function acr513_invoice_confirm() {
var records = $('acr513_invoice_result_ds').getSelected();
if (records.length != 1) {
Leaf.showMessage('提示', '请选择一条数据');
return;
}
if (records[0].get('created_by') == ' ${/session/@user_id}') {
Leaf.showMessage('提示', '确认人不能和开票人一样,请勿确认!');
return;
}
$('acr513_invoice_result_ds').submitSelected();
}
......
......@@ -296,7 +296,7 @@
<!--<div><![CDATA[${l:HLS.DOCUMENT_NUMBER_TO}]]></div>-->
<a:lov name="project_number_t" bindTarget="acr514_invoice_query_ds" prompt="申请编号到" width="135"/>
<a:comboBox name="business_type_desc" bindTarget="acr514_invoice_query_ds" prompt="HLS.BUSINESS_TYPE_DESC" width="135"/>
<a:comboBox name="currency_name" bindTarget="acr514_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/>
<a:comboBox name="currency_name" bindTarget="acr514_invoice_query_ds" prompt="HLS.CURRENCY" width="135"/>-->
</a:hBox>
<a:hBox labelSeparator="" labelWidth="120">
<a:textField name="invoice_number_f" bindTarget="acr514_invoice_query_ds" prompt="ACR.INVOICE_NUMBER_FROM" width="135"/>
......
......@@ -11,6 +11,9 @@
<a:model-query fetchAll="true" model="acr.ACR512.acr_invoice_business_type_list" rootPath="acr515_business_type_list"/>
</a:init-procedure>
<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_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"/>
......@@ -292,7 +295,26 @@
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>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
<a:dataSet id="acr515_invoiceKindDs" lookupCode="ACR510_INVOICE_KIND"/>
<a:dataSet id="acr515_invoiceStatusDs" lookupCode="ACR510_AR_INVOICE_STATUS"/>
......@@ -408,38 +430,39 @@
</a:hBox>
<a:hBox labelSeparator=" " labelWidth="100">
<a:numberField name="total_amount_f" allowFormat="true" bindTarget="acr515_invoiceVatParaDs" prompt="ACR.TOTAL_AMOUNT_FROM" width="150"/>
<div><![CDATA[${l:ACR.TOTAL_AMOUNT_TO}]]></div>
<a:numberField name="total_amount_t" allowFormat="true" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
<a:textField name="invoice_number_f" bindTarget="acr515_invoiceVatParaDs" prompt="ACR.INVOICE_NUMBER_FROM" width="150"/>
<div><![CDATA[${l:ACR.INVOICE_NUMBER_TO}]]></div>
<a:textField name="invoice_number_t" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
<a:datePicker name="accounting_date_f" bindTarget="acr515_invoiceVatParaDs" prompt="HLS.ACCOUNT_DATE_FROM" width="150"/>
<div><![CDATA[${l:HLS.ACCOUNT_DATE_TO}]]></div>
<a:datePicker name="accounting_date_t" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
<a:comboBox name="invoice_kind_desc" bindTarget="acr515_invoiceVatParaDs" width="150"/>
<a:lov name="created_by_name" bindTarget="acr515_invoiceVatParaDs" width="150"/>
</a:hBox>
<a:hBox labelSeparator=" " labelWidth="100">
<a:textField name="invoice_number_f" bindTarget="acr515_invoiceVatParaDs" prompt="ACR.INVOICE_NUMBER_FROM" width="150"/>
<div><![CDATA[${l:ACR.INVOICE_NUMBER_TO}]]></div>
<a:textField name="invoice_number_t" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
<a:hBox labelWidth="100">
<a:numberField name="total_amount_f" allowFormat="true" bindTarget="acr515_invoiceVatParaDs" prompt="发票金额从" width="150"/>
<div><![CDATA[${l:ACR.TOTAL_AMOUNT_TO}]]></div>
<a:numberField name="total_amount_t" allowFormat="true" bindTarget="acr515_invoiceVatParaDs" prompt="" width="150"/>
</a:hBox>
</a:form>
<a:grid id="acr515_invoiceVatDs_grid" bindTarget="acr515_invoiceVatDs" marginWidth="80" navBar="true" height="300">
<a:columns>
<a:column name="contract_number" width="120"/>
<a:column name="document_number" lock="true" width="120"/>
<a:column name="business_type_desc" width="80"/>
<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="billing_way_desc" width="80" prompt="开票方式"/>
<a:column name="invoice_kind_desc" width="100"/>
<a:column name="invoice_number" width="120"/>
<a:column name="vat_invoice_code" width="120"/>
<a:column name="invoice_date" renderer="Leaf.formatDate" width="100"/>
<a:column name="invoice_bp_code" width="100"/>
<a:column name="invoice_bp_name" autoAdjust="false" showTitle="true" width="150"/>
<a:column name="invoice_title" autoAdjust="false" footerRenderer="summaryRenderer" showTitle="true" width="150"/>
<a:column name="total_amount" align="right" footerRenderer="summaryRenderer" renderer="Leaf.formatMoney" width="100"/>
<a:column name="tax_amount" align="right" footerRenderer="summaryRenderer" renderer="Leaf.formatMoney" width="100"/>
<a:column name="return_tax_amount" align="right" footerRenderer="summaryRenderer" renderer="Leaf.formatMoney" width="100"/>
<a:column name="dif_tax_amount" align="right" footerRenderer="summaryRenderer" renderer="Leaf.formatMoney" width="100"/>
<a:column name="net_amount" align="right" footerRenderer="summaryRenderer" renderer="Leaf.formatMoney" width="100"/>
<a:column name="currency" width="80"/>
<a:column name="created_by_name" autoAdjust="false" showTitle="true" width="150"/>
......
......@@ -6,6 +6,8 @@
<a:link id="hls_acr_vat_import_shw_err_link" url="${/request/@context_path}/modules/acr/ACR515/hls_acr_vat_import_showerrors.lview"/>
<a:link id="acr515_check_import_link" model="acr.ACR515.check_vat_tmp" modelaction="execute"/>
<a:link id="acr515_confirm_import_link" model="acr.ACR515.hls_vat_confirm" modelaction="execute"/>
<a:link id="hls_acr_vat_exit_link" url="${/request/@context_path}/modules/acr/ACR515/acr_invoice_vat.lview"/>
<script><![CDATA[
//$('submitbtn').disable();
......@@ -25,7 +27,7 @@
success: function(args) {
$('submitbtn_id').enable();
},
scopr: this
scope: this
});
}
......@@ -56,6 +58,9 @@
height: 470
});
}
function exit() {
window.location.href = $('hls_acr_vat_exit_link').getUrl();
}
]]></script>
<a:dataSets>
<a:dataSet id="import_data_ds" autoQuery="true" fetchAll="true" model="acr.ACR515.hls_vat_import_tmp"/>
......@@ -66,6 +71,7 @@
<a:button click="checkbtn" text="校验"/>
<a:button id="submitbtn_id" click="submitbtn" text="确定"/>
<a:button click="showerrorbtn" text="显示错误信息"/>
<a:button click="exit" text="退出"/>
</a:hBox>
<a:grid bindTarget="import_data_ds" height="500" marginWidth="30">
<a:columns>
......
......@@ -179,6 +179,9 @@
function detail_link(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
var param = {};
param['payment_req_id'] = record.get('payment_req_id');
param['document_category'] = record.get('document_category');
......@@ -210,7 +213,7 @@
param['cond_para1'] = 'OTHER';
}
hls_doc_get_layout_code('get_layout_code_link_id', param, 'csh501_csh_payment_req_link1_id', '${/parameter/@layout_code}');
hls_doc_get_layout_code('get_layout_code_link_id', param, 'csh501_csh_payment_req_link1_id',ds_id,'${/parameter/@layout_code}');
}
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
......
......@@ -48,14 +48,19 @@
var this_pay_vender_amount=record.get('this_pay_vender_amount');
var residual_agent_amount=record.get('residual_agent_amount');
var residual_vender_amount=record.get('residual_vender_amount');
var bank_account_num=record.get('bank_account_num');
var pay_amount=plus(this_pay_agent_amount,this_pay_vender_amount);
var identify_category='';
if(!bank_account_num){
$L.showErrorMessage("提示",'请维护银行信息!');
return;
}
if(this_pay_agent_amount!=0&&this_pay_vender_amount!=0){
$L.showErrorMessage("提示",'每个只能选择代理店,厂商中的其中一个进行支付');
return;
}
if(this_pay_agent_amount==0&&this_pay_vender_amount==0){
$L.showErrorMessage("提示",'付款金额不能为!');
$L.showErrorMessage("提示",'付款金额不能为0!');
return;
}
......@@ -440,6 +445,22 @@
} else {
record.set('transaction_functional_amount', '');
}
}else if(name=='this_pay_agent_amount'||name=='this_pay_vender_amount'){
var agent_amount= record.get('this_pay_agent_amount');
var vender_amount= record.get('this_pay_vender_amount');
if(agent_amount&&vender_amount){
$('csh_payment_req_pay_ds').getAt(0).set('transaction_amount',agent_amount+vender_amount)
}else if(agent_amount){
$('csh_payment_req_pay_ds').getAt(0).set('transaction_amount',agent_amount)
}else if(vender_amount){
$('csh_payment_req_pay_ds').getAt(0).set('transaction_amount',vender_amount)
}else{
$('csh_payment_req_pay_ds').getAt(0).set('transaction_amount',0)
}
} else if (name == 'handling_charge') {
if (value === 0 && record.get('zero_amounts_allowed') == 'N') {
Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
......@@ -480,11 +501,12 @@
if (record.get('transaction_amount') || record.get('transaction_amount') == 0 || record.get('handling_charge')) {
setfunctionamount(record);
}
} else if (name == 'bank_account_id') {
} /*else if (name == 'bank_account_id') {
if (record.get('zero_amounts_allowed') == 'N' && record.get('transaction_amount') === 0) {
Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
}
}
}*/
}
function showPeriod(record) {
......@@ -681,7 +703,7 @@
<a:field name="exchange_rate_type"/>
<a:field name="exchange_rate" readOnly="true" required="false"/>
<a:field name="rate_method_code"/>
<a:field name="transaction_amount" readOnly="true" required="true"/>
<a:field name="transaction_amount" readOnly="true"/>
<a:field name="transaction_functional_amount" readOnly="true" required="true"/>
<a:field name="precision" defaultValue="2"/>
<a:field name="zero_amounts_allowed" defaultValue="N"/>
......
......@@ -631,7 +631,7 @@
</a:fieldSet>
</a:form>
<a:grid id="csh_transaction_receipt_write_off_grid_ds"
bindTarget="csh531n_sap_bankflow_info_result_ds" marginHeight="305" marginWidth="30"
bindTarget="csh531n_sap_bankflow_info_result_ds" marginHeight="210" marginWidth="30"
navBar="true">
<!-- <a:toolBar>-->
<!-- <a:button click="csh531_terminal_manager" text="终端号管理"/>-->
......
......@@ -643,7 +643,7 @@
</a:fieldSet>
</a:form>
<a:grid id="csh_transaction_receipt_write_off_grid_ds"
bindTarget="csh531n_sap_bankflow_info_result_ds" marginHeight="305" marginWidth="30"
bindTarget="csh531n_sap_bankflow_info_result_ds" marginHeight="210" marginWidth="30"
navBar="true">
<!-- <a:toolBar>-->
<!-- <a:button click="csh531_terminal_manager" text="终端号管理"/>-->
......
......@@ -13,7 +13,30 @@
}
function griddbclick(grid, record, row, name) {
$('${/parameter/@lovid}').commit(record);
var ds = $('csh_write_off_interface_ds');
var con_rec = $('csh_lov_con_contract_ds').getCurrentRecord();
var rec = ds.getCurrentRecord();
rec.set('contract_id', con_rec.get('contract_id'));
rec.set('contract_number', con_rec.get('contract_number'));
rec.set('bp_tenant_name', con_rec.get('bp_name'));
rec.set('write_off_bp_name', con_rec.get('bp_name'));
rec.set('write_off_bp_id', con_rec.get('bp_id_tenant'));
rec.set('bp_id_tenant', con_rec.get('bp_id_tenant'));
rec.set('write_off_cf_item_desc', record.get('cf_item_desc'));
rec.set('write_off_cashflow_id', record.get('cashflow_id'));
rec.set('write_off_cf_item', record.get('cf_item'));
rec.set('write_off_times', record.get('times'));
rec.set('left_principal', record.get('unreceived_principal'));
rec.set('left_interest', record.get('unreceived_interest'));
rec.set('left_amount', record.get('unreceived_amount'));
rec.set('due_amount', record.get('due_amount'));
rec.set('principal', record.get('principal'));
rec.set('interest', record.get('interest'));
rec.set('due_date', record.get('due_date'));
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'));
$('${/parameter/@lovid}').win.close();
}
function csh_write_off_confirmed() {
......@@ -37,28 +60,35 @@
rec.set('write_off_times', cf_recs[0].get('times'));
rec.set('left_principal', cf_recs[0].get('unreceived_principal'));
rec.set('left_interest', cf_recs[0].get('unreceived_interest'));
rec.set('left_amount', cf_recs[0].get('unreceived_rental'));
rec.set('left_amount', cf_recs[0].get('unreceived_amount'));
rec.set('due_amount', cf_recs[0].get('due_amount'));
rec.set('principal', cf_recs[0].get('principal'));
rec.set('interest', cf_recs[0].get('interest'));
rec.set('due_date', cf_recs[0].get('due_date'));
rec.set('write_off_principal', cf_recs[0].get('unreceived_principal'));
rec.set('write_off_interest', cf_recs[0].get('unreceived_interest'));
rec.set('unreceived_amount', cf_recs[0].get('unreceived_amount'));
rec.set('write_off_amount',cf_recs[0].get('unreceived_amount'));
// rec.set('write_off_amount', cf_recs[0].get('unreceived_amount'));
for (var i = 1; i < cf_recs.length; i++) {
//copy...
debugger;
var newRecord = new Leaf.Record({...rec.data});
newRecord.ds = rec.ds;
newRecord.set('write_off_cf_item_desc', cf_recs[i].get('cf_item_desc'));
newRecord.set('write_off_cf_item', cf_recs[i].get('cf_item'));
newRecord.set('write_off_times', cf_recs[i].get('times'));
newRecord.set('write_off_cashflow_id',cf_recs[i].get('cashflow_id'));
newRecord.set('due_date', cf_recs[i].get('due_date'));
newRecord.set('write_off_cashflow_id', cf_recs[i].get('cashflow_id'));
newRecord.set('unreceived_amount', cf_recs[i].get('unreceived_amount'));
newRecord.set('interest', cf_recs[i].get('interest'));
newRecord.set('principal', cf_recs[i].get('principal'));
newRecord.set('due_amount', cf_recs[i].get('due_amount'));
newRecord.set('left_principal', cf_recs[i].get('unreceived_principal'));
newRecord.set('left_interest', cf_recs[i].get('unreceived_interest'));
newRecord.set('left_amount', cf_recs[i].get('unreceived_rental'));
newRecord.set('left_amount', cf_recs[i].get('unreceived_amount'));
newRecord.set('write_off_principal', cf_recs[i].get('unreceived_principal'));
newRecord.set('write_off_interest', cf_recs[i].get('unreceived_interest'));
newRecord.set('write_off_amount',cf_recs[i].get('unreceived_amount'));
// newRecord.set('write_off_amount', cf_recs[i].get('unreceived_amount'));
ds.add(newRecord);
}
......@@ -79,11 +109,12 @@
]]></script>
<a:dataSets>
<a:dataSet id="csh_lov_cf_item_ds" autoQuery="true" model="csh.CSH531N.hls_cashflow_item_v"/>
<a:dataSet id="csh_lov_cf_item_ds" autoQuery="true" model="csh.CSH531N.hls_cashflow_item_v"
queryUrl="${/request/@context_path}/autocrud/csh.CSH531N.hls_cashflow_item_v/query?write_off_cf_item=Y"/>
<a:dataSet id="csh_query_con_ds" autoCreate="true">
<a:fields>
<a:field name="contract_number"/>
<!-- <a:field name="bp_name"/>-->
<a:field name="bp_name"/>
<a:field name="bp_id" defaultValue="${/parameter/@bp_id}"/>
</a:fields>
</a:dataSet>
......@@ -117,10 +148,10 @@
</a:screenTopToolbar>
<a:form column="5" labelWidth="180" width="1100" title="HLS.QUERY_TITLE">
<a:textField name="contract_number" bindTarget="csh_query_con_ds" prompt="HLS.CONTRACT_NUMBER"/>
<!-- <a:textField name="bp_name" bindTarget="csh_query_con_ds" prompt="客户名"/>-->
<a:datePicker name="due_date_from" bindTarget="csh_query_cf_ds" prompt="CSH531.DATE_FROM"/>
<a:datePicker name="due_date_to" bindTarget="csh_query_cf_ds" prompt="CSH531.DATE_TO"/>
<!-- <a:comboBox name="cf_item_desc" bindTarget="csh_query_cf_ds" prompt="CSH531.CF_ITEM"/>-->
<a:textField name="bp_name" bindTarget="csh_query_con_ds" prompt="客户名"/>
<a:comboBox name="cf_item_desc" bindTarget="csh_query_cf_ds" prompt="CSH531.CF_ITEM"/>
<a:datePicker name="due_date_from" bindTarget="csh_query_cf_ds" prompt="支付日从"/>
<a:datePicker name="due_date_to" bindTarget="csh_query_cf_ds" prompt="支付日到"/>
</a:form>
<a:hBox>
<a:vBox>
......@@ -139,21 +170,23 @@
<a:columns>
<a:column name="times" prompt="HLS.TIMES" align="center" width="60"/>
<a:column name="cf_item_desc" prompt="HLS.CF_ITEM_DESC" align="center" width="80"/>
<a:column name="due_date" prompt="还款日" renderer="Leaf.formatDate" width="80" align="center"/>
<a:column name="due_amount" align="right" prompt="应还金额" renderer="Leaf.formatMoney"
width="120"/>
<a:column prompt="营业">
<a:column name="due_date" prompt="支付日" renderer="Leaf.formatDate" width="80"
align="center"/>
<a:column name="due_amount" align="right" prompt="应收金额" renderer="Leaf.formatMoney"
width="110"/>
<a:column name="principal" align="right" prompt="应收本金" renderer="Leaf.formatMoney"
width="110"/>
<a:column name="interest" align="right" prompt="应收利息" renderer="Leaf.formatMoney" width="110"/> <!-- <a:column prompt="营业">-->
<a:column name="unreceived_amount" prompt="未收金额" align="right"
renderer="Leaf.formatMoney" width="110"/>
<a:column name="unreceived_principal" prompt="未收本金" align="right"
renderer="Leaf.formatMoney" width="120"/>
renderer="Leaf.formatMoney" width="110"/>
<a:column name="unreceived_interest" prompt="未收利息" align="right"
renderer="Leaf.formatMoney" width="120"/>
<a:column name="unreceived_rental" prompt="未收租金" align="right"
renderer="Leaf.formatMoney" width="120"/>
</a:column>
renderer="Leaf.formatMoney" width="110"/>
</a:columns>
<!-- <a:events>-->
<!-- <a:event name="dblclick" handler="griddbclick"/>-->
<!-- </a:events>-->
<a:events>
<a:event name="dblclick" handler="griddbclick"/>
</a:events>
</a:grid>
</a:vBox>
</a:hBox>
......
......@@ -297,7 +297,7 @@
if (count > limit) {
Leaf.showConfirm('提示', '由于凭证行数超过'+limit+'行,传输至SBO后不能立即得到返回结果,您确定继续吗?', function() {
//lock_current_window();
lock_current_window2('正在传送,请勿离开当前界面。。。');
Leaf.Masker.mask(Ext.getBody(),'正在传输...请勿离开当前界面...');
Leaf.request({
url: $('hls301_send_data').getUrl(),
para: queryParams,
......@@ -306,14 +306,14 @@
msg: '已提交请求',
duration: 3000
});
unlock_current_window();
Leaf.Masker.unmask(Ext.getBody());
$('hls_journal_header_result_ds').query();
},
failure: function() {
unlock_current_window();
Leaf.Masker.unmask(Ext.getBody());
},
error: function() {
unlock_current_window();
Leaf.Masker.unmask(Ext.getBody());
},
scope: this
});
......
......@@ -1292,6 +1292,7 @@
},
success: function() {
if('${/parameter/@document_category}'=='PROJECT'){
$('PROJECT_CREATE_NP_F_QUOTATION_N_prj_quotation_ds').query();
$('PROJECT_CREATE_NP_G_CASHFLOW_NS_prj_quotation_ds').query();
}else if('${/parameter/@document_category}'=='CONTRACT'){
$('CONTRACT_CREATE_INC_G_CASHFLOW_1_con_contract_cashflow_ds').query();
......
......@@ -215,14 +215,16 @@
<a:field name="session_id" defaultValue="${/session/@session_id}"/>
<a:field name="deadline_date" required="true"/>
<a:field name="deadline_date_to" required="true"/>
<a:field name="currency_name" displayField="currency_name" options="hls_currency_ds" required="true" returnField="currency_code" valueField="currency_code"/>
<a:field name="currency_code" defaultValue="CNY"/>
<a:field name="currency_name" readOnly="true" defaultValue="人民币" displayField="currency_name" options="hls_currency_ds" required="true" returnField="currency_code" valueField="currency_code"/>
<a:field name="payment_method_display" displayField="code_value_name" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/>
<!-- <a:field name="payment_method_display" defaultValue="ABC" displayField="code_value_name" readOnly="true" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/> -->
<!-- <a:field name="payment_method_display_n" defaultValue="农行代扣" displayField="code_value_name" readOnly="true" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/> -->
<a:field name="customer_type_display" displayField="code_value_name" options="hls_customer_type_ds" required="true" returnField="customer_type" valueField="code_value"/>
<a:field name="customer_name_display" lovGridHeight="300" lovHeight="450" lovWidth="550" readOnly="true"/>
<a:field name="limit_amount" validator="amountValidator"/>
<a:field name="generate_rules_display" displayField="code_value_name" options="hls_generate_rules_ds" required="true" returnField="generate_rules" valueField="code_value"/>
<a:field name="generate_rules_display" readOnly="true" defaultValue="汇总" displayField="code_value_name" options="hls_generate_rules_ds" required="true" returnField="generate_rules" valueField="code_value"/>
<a:field name="generate_rules" defaultValue="N"/>
<a:field name="contract_number"/>
</a:fields>
<a:events>
......
......@@ -8,7 +8,7 @@
if (document.getElementById('importFile').value){
var fileName = document.getElementById('importFile').value;
var fileType = fileName.substr(fileName.lastIndexOf("."));
if (fileType != '.xls' && fileType != '.xlsx'){
if (fileType != '.xls' && fileType != '.xlsx' && fileType != '.csv'){
Leaf.showErrorMessage('错误','导入文件非Excel,请重新选择文件!');
} else {
document.getElementById('importForm').submit();
......
......@@ -18,7 +18,6 @@
<a:link id="hls_acr_ebank_enter_link" url="${/request/@context_path}/modules/hls_acr/HLS_ACR5040/hls_acr_ebank_input.lview"/>
<script><![CDATA[
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
debugger;
var payment_method = '${/parameter/@payment_method}';
var title = '';
if (payment_method == 'ABC'){
......@@ -36,7 +35,10 @@
title: title,
width: 420,
height: 275
}).on('close', function() {});
}).on('close', function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_acr_ebank_output_ln_temp');
$(ds_id).query();
});
};
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
......@@ -63,8 +65,10 @@
});
};
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
window.location.href = $('hls_acr_ebank_enter_link').getUrl()+ '?layout_code=' + 'HLS_ACR5030_HEADER' + '&function_code=HLS_ACR5040';
// window.location.href = $('hls_acr_ebank_enter_link').getUrl()+ '?layout_code=' + 'HLS_ACR5030_HEADER' + '&function_code=HLS_ACR5040';
$('${/parameter/@winid}').close();
};
window['${/parameter/@layout_code}_upload_layout_dynamic_click'] = function() {
var p_sourcetype = 'hls_acr_ebank_input';
var p_pkvalue = '${/session/@session_id}';
......
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