Commit eaf7429f authored by Darming's avatar Darming

Merge branch 'features/csh_write_off' into develop

parents 814b4b50 a2397a9a
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT t.attribute_1,
t.attribute_2,
t.attribute_3,
t.attribute_4,
t.attribute_5,
t.attribute_6,
t.attribute_7,
t.attribute_8,
TRIM(REPLACE(SUBSTR(t.attribute_9, 2), ',', '')) attribute_9,
t.attribute_10,
t.attribute_11,
t.attribute_12,
t.attribute_13,
t.attribute_14,
t.attribute_15,
TRIM(REPLACE(SUBSTR(t.attribute_16, 2), ',', '')) attribute_16
FROM
fnd_interface_lines t
WHERE
t.header_id =${@header_id} AND
t.line_number > 5
order by line_number
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
hls_ebank_abc_new_pkg.save_import_data(p_header_id => ${@header_id},
p_batch_id => ${@batch_id},
p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id});
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT
t.attribute_1,
t.attribute_2,
t.attribute_3,
t.attribute_4,
t.attribute_5,
t.attribute_6,
t.attribute_7,
t.attribute_8,
t.attribute_9,
t.attribute_10,
t.attribute_11,
t.attribute_12,
t.attribute_13,
t.attribute_14,
t.attribute_15
FROM
fnd_interface_lines t
WHERE
t.header_id = ${@header_id} AND
t.line_number > 0
]]></bm:query-sql>
</bm:operation>
<bm:operation name="update">
<bm:update-sql><![CDATA[
BEGIN
hls_ebank_ccb_new_pkg.save_import_data(p_header_id => ${@header_id},
p_batch_id => ${@batch_id},
p_company_id => ${/session/@company_id},
p_user_id => ${/session/@user_id},
p_transaction_date => to_date(${@transaction_date}, 'yyyy-mm-dd'));
END;
]]></bm:update-sql>
</bm:operation>
</bm:operations>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT c.contract_id,
ccc.cashflow_id,
c.contract_number,
to_char(ccc.due_date,'yyyy-mm-dd') due_date,
c.contract_name,
c.bp_id_tenant,
(select bp_id from sys_user where bp_category = 'AGENT' and user_id = c.OWNER_USER_ID) bp_id_agent,
(SELECT bp_name FROM hls_bp_master h WHERE c.bp_id_tenant = h.bp_id) bp_tenant_name,
ccc.times,
ccc.cf_item,
(SELECT description
FROM hls_cashflow_item
WHERE cf_item = ccc.cf_item) cf_item_desc,
c.pay_method,
(ccc.due_amount-nvl(ccc.received_amount,0)) due_amount,
(ccc.due_amount-nvl(ccc.received_amount,0)) manual_amount
FROM con_contract c, con_contract_cashflow ccc
#WHERE_CLAUSE#
order by contract_id,times,cf_item desc
]]>
</bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="pay_method" queryExpression="(c.pay_method = ${@pay_method})"/>
<bm:query-field name="due_date_from" queryExpression="(ccc.due_date &gt;= to_date(${@due_date_from},'yyyy-mm-dd'))"/>
<bm:query-field name="due_date_to" queryExpression="(ccc.due_date &lt;= to_date(${@due_date_to},'yyyy-mm-dd'))"/>
<bm:query-field name="contract_id" queryExpression="(c.contract_id = ${@contract_id})"/>
<bm:query-field name="cf_item" queryExpression="(ccc.cf_item = ${@cf_item})"/>
<bm:query-field name="bp_id_tenant" queryExpression="(bp_id_tenant = ${@bp_id_tenant})"/>
<bm:query-field name="bp_id_agent" queryExpression="(bp_id_agent = ${@bp_id_agent})"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter name="query"
expression="c.contract_id = ccc.contract_id and ccc.due_date &lt;= trunc(sysdate) and c.data_class = 'NORMAL' and ccc.write_off_flag != 'FULL' and c.contract_status in ('SIGN','INCEPT') and ccc.cf_status = 'RELEASE' and ccc.cf_direction = 'INFLOW' and c.pay_method is not null and ccc.cf_item in (1,9)"/>
<bm:data-filter name="query"
expression="not exists(select 1 from hls_ebank_batch_group g,hls_ebank_batch_ln l where g.status in ('NEW','DEAL') and g.group_id = l.group_id and l.cashflow_id = ccc.cashflow_id)"/>
</bm:data-filters>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<ns1:model xmlns:ns1="http://www.leaf-framework.org/schema/bm" alias="t1" extend="cont.CON500.con_contract" extendMode="reference" needAccessControl="false">
<ns1:fields>
<ns1:field name="contract_id" forInsert="true"/>
<ns1:field name="contract_number" displayWidth="218" forDisplay="true" forQuery="true" prompt="合同编号"/>
<ns1:field name="contract_name" displayWidth="218" forDisplay="true" forQuery="true" prompt="合同名称"/>
<ns1:field name="pay_method" forDisplay="false"/>
</ns1:fields>
<ns1:query-fields>
<ns1:query-field field="contract_number" queryOperator="like"/>
<ns1:query-field field="contract_name" queryOperator="like"/>
<ns1:query-field name="pay_method" queryExpression="(t1.pay_method = ${@pay_method})"/>
</ns1:query-fields>
<ns1:data-filters>
<ns1:data-filter name="query" enforceOperations="t1.due_date is not null"/>
</ns1:data-filters>
</ns1:model>
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: hc
$Date: 2015-8-13 上午10:30:25
$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 fnd_interface_headers_s.nextval header_id from dual
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
......@@ -16,7 +16,8 @@
cba.bank_account_name,
cb.bank_short_name,
cbb.bank_branch_name,
cba.currency_code
cba.currency_code,
(select code_value_name from sys_code_values_v where code = 'CURRENCY' and code_value = cba.currency_code and CODE_VALUE_ENABLED_FLAG = 'Y') currency_name
FROM csh_bank cb, csh_bank_branch cbb, csh_bank_account cba
WHERE cb.bank_id = cbb.bank_id
AND cba.bank_branch_id = cbb.bank_branch_id
......@@ -34,7 +35,8 @@
<bm:field name="bank_account_num" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" prompt="银行账户"/>
<bm:field name="bank_short_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" prompt="银行"/>
<bm:field name="bank_branch_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" prompt="支行名"/>
<bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" prompt="币种"/>
<bm:field name="currency_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="false" prompt="币种"/>
<bm:field name="currency_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" prompt="币种"/>
</bm:fields>
<bm:query-fields>
<bm:query-field name="bank_account_name" queryExpression="t1.bank_account_name like &apos;%&apos; || ${@bank_account_name} || &apos;%&apos; "/>
......
......@@ -30,12 +30,15 @@
(select a.bank_account_num from csh_bank_account a where a.bank_account_id = t1.bank_account_id)bank_account_num,
(select a.bank_account_name from csh_bank_account a where a.bank_account_id = t1.bank_account_id)bank_account_name,
(select a.currency_code from csh_bank_account a where a.bank_account_id = t1.bank_account_id)currency,
(select code_value_name from sys_code_values_v scv,csh_bank_account ca where code = 'CURRENCY' and ca.bank_account_id = t1.BANK_ACCOUNT_ID
and ca.currency_code = scv.code_value) currency_name,
(select v.code_value_name from sys_code_values_v v where v.code ='CCB600_EBANK_STATUS' and v.code_value = t1.status)status_desc,
(select sum(g.real_amount) from hls_ebank_batch_group g where g.batch_id = t1.batch_id and g.status = 'SUCCESS')total_real_amount,
(select count(1) from hls_ebank_batch_group g where g.batch_id = t1.batch_id and g.status = 'SUCCESS')total_success_count,
(select code_value_name from SYS_CODE_VALUES_V where code = 'PAY_METHODS' and code_value = t1.pay_method) pay_method_desc,
(select u.description
from sys_user u
......@@ -45,14 +48,13 @@
order by t.batch_date desc,t.batch_id desc
]]></bm:query-sql>
</bm:operation>
<bm:operation name="execute">
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
hls_ebank_batch_pkg.create_ebank_batch(
hls_ebank_batch_pkg.create_ebank_batch_new(
p_bank_account_id =>${@bank_account_id},
p_merger_rules =>${@merger_rules},
p_payment_amount_from =>${@payment_amount_from},
p_payment_amount_to =>${@payment_amount_to},
p_pay_method =>${@pay_method},
p_due_date =>to_date(${@due_date},'yyyy-mm-dd'),
p_user_id =>${/session/@user_id},
p_batch_id =>${@batch_id});
......@@ -79,6 +81,7 @@
<bm:field name="due_date" databaseType="DATE" datatype="java.util.Date"/>
<bm:field name="bank_name"/>
<bm:field name="bank_code"/>
<bm:field name="currency_name"/>
<bm:field name="bank_branch_name"/>
<bm:field name="bank_account_id"/>
<bm:field name="bank_account_num"/>
......@@ -92,6 +95,8 @@
<bm:field name="message"/>
<bm:field name="total_real_amount"/>
<bm:field name="total_success_count"/>
<bm:field name="pay_method"/>
<bm:field name="pay_method_desc"/>
<bm:field name="created_by_n"/>
</bm:fields>
<bm:query-fields>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: leaf Generator
$Date: Wed Oct 09 11:00:38 CST 2019
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:e="leaf.service.exception"
xmlns:o="leaf.database.local.oracle" xmlns:f="leaf.database.features" alias="t1"
baseTable="HLS_EBANK_BATCH_LN">
<bm:fields>
<bm:field name="ln_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="LN_ID"
prompt="HLS_EBANK_BATCH_LN.LN_ID"/>
<bm:field name="hd_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="HD_ID"
prompt="HLS_EBANK_BATCH_LN.HD_ID"/>
<bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID"
prompt="HLS_EBANK_BATCH_LN.BATCH_ID"/>
<bm:field name="group_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="GROUP_ID"
prompt="HLS_EBANK_BATCH_LN.GROUP_ID"/>
<bm:field name="cashflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CASHFLOW_ID"
prompt="HLS_EBANK_BATCH_LN.CASHFLOW_ID"/>
<bm:field name="amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AMOUNT"
prompt="HLS_EBANK_BATCH_LN.AMOUNT"/>
<bm:field name="manual_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="MANUAL_AMOUNT"
prompt="HLS_EBANK_BATCH_LN.MANUAL_AMOUNT"/>
<bm:field name="write_off_flag" databaseType="VARCHAR2" datatype="java.lang.String"
physicalName="WRITE_OFF_FLAG" prompt="HLS_EBANK_BATCH_LN.WRITE_OFF_FLAG"/>
<bm:field name="description" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DESCRIPTION"
prompt="HLS_EBANK_BATCH_LN.DESCRIPTION"/>
<bm:field name="contract_number" forInsert="false" forceUpdate="false" expression="(select contract_number from con_contract c,con_contract_cashflow cf where c.contract_id = cf.contract_id and cf.cashflow_id = t1.cashflow_id)"/>
<bm:field name="cf_item_desc" forInsert="false" forceUpdate="false" expression="(select description from hls_cashflow_item hi,con_contract_cashflow cc where hi.cf_item = cc.cf_item and cc.cashflow_id = t1.cashflow_id)"/>
<bm:field name="bp_tenant_name" forInsert="false" forceUpdate="false" expression="(select h.bp_name from hls_bp_master h,con_contract c,con_contract_cashflow cf where c.contract_id = cf.contract_id and cf.cashflow_id = t1.cashflow_id and c.bp_id_tenant = h.bp_id)"/>
<bm:field name="times" forceUpdate="false" forInsert="false" expression="(select times from con_contract_cashflow where cashflow_id = t1.cashflow_id)"/>
<bm:field name="due_date" forceUpdate="false" forInsert="false" expression="(select to_char(due_date,'yyyy-mm-dd') from con_contract_cashflow where cashflow_id = t1.cashflow_id)"/>
<bm:field name="due_amount" forceUpdate="false" forInsert="false" expression="(select due_amount - nvl(received_amount,0) from con_contract_cashflow where cashflow_id = t1.cashflow_id)"/>
</bm:fields>
<bm:query-fields>
<bm:query-field name="batch_id" queryExpression="t1.batch_id = ${@batch_id}"/>
</bm:query-fields>
<bm:primary-key>
<bm:pk-field name="ln_id"/>
</bm:primary-key>
<bm:features>
<f:standard-who xmlns:f="leaf.database.features"/>
<o:sequence-pk sequenceName="hls_ebank_batch_ln_s"/>
</bm:features>
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
begin
hls_ebank_batch_pkg.insert_hls_ebank_batch_ln_new(p_ln_id => hls_ebank_batch_ln_s.nextval,
p_hd_id => '',
p_manual_amount => ${@manual_amount},
p_batch_id => ${../../@batch_id},
p_cashflow_id => ${@cashflow_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="p_ln_id" dataType="java.lang.Long" input="false" output="true"
outputPath="/parameter/@p_ln_id"/>
</bm:parameters>
</bm:operation>
<bm:operation name="execute">
<bm:update-sql><![CDATA[
begin
hls_ebank_batch_pkg.contract_merge_by_rules(p_batch_id => ${@batch_id},
p_user_id => ${/session/@user_id});
end;
]]></bm:update-sql>
<bm:parameters>
<bm:parameter name="p_ln_id" dataType="java.lang.Long" input="false" output="true"
outputPath="/parameter/@p_ln_id"/>
</bm:parameters>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: leaf Generator
$Date: Thu Oct 10 13:51:22 CST 2019
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" xmlns:e="leaf.service.exception" xmlns:o="leaf.database.local.oracle" xmlns:f="leaf.database.features" alias="t1" baseTable="HLS_EBANK_BATCH_GROUP">
<bm:fields>
<bm:field name="group_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="GROUP_ID" prompt="HLS_EBANK_BATCH_GROUP.GROUP_ID"/>
<bm:field name="hd_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="HD_ID" prompt="HLS_EBANK_BATCH_GROUP.HD_ID"/>
<bm:field name="batch_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="BATCH_ID" prompt="HLS_EBANK_BATCH_GROUP.BATCH_ID"/>
<bm:field name="contract_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="CONTRACT_ID" prompt="HLS_EBANK_BATCH_GROUP.CONTRACT_ID"/>
<bm:field name="apply_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="APPLY_AMOUNT" prompt="HLS_EBANK_BATCH_GROUP.APPLY_AMOUNT"/>
<bm:field name="actual_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="ACTUAL_AMOUNT" prompt="HLS_EBANK_BATCH_GROUP.ACTUAL_AMOUNT"/>
<bm:field name="status" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="STATUS" prompt="HLS_EBANK_BATCH_GROUP.STATUS"/>
<bm:field name="real_amount" databaseType="NUMBER" datatype="java.lang.Long" physicalName="REAL_AMOUNT" prompt="HLS_EBANK_BATCH_GROUP.REAL_AMOUNT"/>
<bm:field name="res_code" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RES_CODE" prompt="HLS_EBANK_BATCH_GROUP.RES_CODE"/>
<bm:field name="res_msg" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="RES_MSG" prompt="HLS_EBANK_BATCH_GROUP.RES_MSG"/>
<bm:field name="interface_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="INTERFACE_ID" prompt="HLS_EBANK_BATCH_GROUP.INTERFACE_ID"/>
<bm:field name="receive_date" databaseType="DATE" datatype="java.util.Date" physicalName="RECEIVE_DATE" prompt="HLS_EBANK_BATCH_GROUP.RECEIVE_DATE"/>
<bm:field name="deal_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DEAL_FLAG" prompt="HLS_EBANK_BATCH_GROUP.DEAL_FLAG"/>
<bm:field name="bank_account_num" expression="(select bank_branch_num from con_contract where contract_id = t1.contract_id)" forInsert="false" forceUpdate="false"/>
<bm:field name="bank_account_name" expression="(select bank_account_name from con_contract where contract_id = t1.contract_id)" forInsert="false" forceUpdate="false"/>
<bm:field name="sequence_num" expression="(rownum)" forInsert="false" forceUpdate="false"/>
<bm:field name="abc_sequence_num" expression="(lpad(ROWNUM,'4','0'))" forceUpdate="false" forInsert="false"/>
<bm:field name="csh_bank_account_num" expression="(select bank_account_num from csh_bank_account cba,hls_ebank_batch heb where cba.bank_account_id = heb.bank_account_id and heb.batch_id = t1.batch_id)" forInsert="false" forceUpdate="false"/>
<bm:field name="csh_bank_account_name" expression="(select bank_account_name from csh_bank_account cba,hls_ebank_batch heb where cba.bank_account_id = heb.bank_account_id and heb.batch_id = t1.batch_id)" forInsert="false" forceUpdate="false"/>
<bm:field name="abc_pay_type" expression="7" defaultValue="7"/>
<bm:field name="abc_transaction_type" expression="1" defaultValue="1"/>
<bm:field name="abc_usage" expression="'代收用途'" defaultValue="代收用途"/>
<bm:field name="abc_fen_code" expression="'01'" defaultValue="01"/>
<bm:field name="abc_curr_flag" expression="0" defaultValue="0"/>
</bm:fields>
<bm:query-fields>
<bm:query-field name="batch_id" queryExpression="t1.batch_id = ${@batch_id}"/>
</bm:query-fields>
<bm:features>
<f:standard-who xmlns:f="leaf.database.features"/>
</bm:features>
</bm:model>
\ No newline at end of file
......@@ -76,6 +76,7 @@
<bm:field name="auto_filt_prinicipal_interest" expression="&apos;Y&apos;" forInsert="false" forUpdate="false" prompt="CSH513.AUTO_FILT_PRINICIPAL_INTEREST"/>
<bm:field name="returned_flag_desc" forInsert="false" forUpdate="false" prompt="CSH511.CSH_TRANSACTION.RETURNED_FLAG"/>
<bm:field name="receipt_type"/>
<bm:field name="paid_byother_flag"/>
<bm:field name="receipt_type_des" expression="(select v.code_value_name from sys_code_values_v v where v.code=&apos;RECEIPT_TYPE&apos; and v.code_value=t1.receipt_type)"/>
<bm:field name="ref_n01"/>
</bm:fields>
......
......@@ -96,7 +96,7 @@
t1.WRITE_OFF_DUE_AMOUNT write_off_amount,
t1.WRITE_OFF_PRINCIPAL,
t1.WRITE_OFF_INTEREST,
(select bp_name from hls_bp_master where bp_id = t1.bp_id) bp_tenant_name
(select bp_name from hls_bp_master h,con_contract c where h.bp_id = c.bp_id_tenant and c.contract_id = t1.contract_id) bp_tenant_name
from csh_write_off t1) t
#WHERE_CLAUSE#
]]></bm:query-sql>
......
......@@ -113,7 +113,7 @@ end;
<bm:field name="agent_id_desc" expression="(select hbm.bp_name from hls_bp_master hbm where hbm.bp_id = t1.agent_id)" forUpdate="false" forInsert="false"/>
<bm:field name="write_off_classification" lookupField="write_off_classification_desc" lookupCode="DS_CSH_WRITE_OFF_CLASSIFICATION" databaseType="VARCHAR2" datatype="java.lang.String" />
<bm:field name="write_off_classification_desc" forInsert="false" forUpdate="false"/>
<bm:field name="bp_tenant_name" expression="(select bp_name from hls_bp_master where bp_id = t1.write_off_bp_id)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_tenant_name" expression="(select bp_name from hls_bp_master h,con_contract c where h.bp_id = c.bp_id_tenant and c.contract_id = t1.contract_id)" forInsert="false" forUpdate="false"/>
<bm:field name="journal_date" databaseType="DATE" datatype="java.util.Date"/>
</bm:fields>
<bm:features>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<a:model-query model="ccb.CCB600.get_import_head_id" rootPath="header"/>
<a:import-excel header_id="${/model/header/record/@header_id}" separator=","
status_field="/parameter/@ImportSuccess" template_code="ABC_MANUAL_IMPORT"
user_id="${/session/@user_id}"/>
<!-- <a:model-query-->
<!-- defaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = &apos;ABC_MANUAL_IMPORT&apos;"-->
<!-- model="ccb.CCB503.ccb503_import_get_status" rootPath="status"/>-->
</a:init-procedure>
<a:view>
<a:link id="import_interface_write_off_link" model="ccb.CCB600.abc_import_ln" modelaction="update"/>
<script type="text/javascript"><![CDATA[
function backBtn() {
history.go(-1);
}
var import_flag = 0;
function import_confirm() {
$('import_confirm_id').disable();
var ds = $('abc_import_grid_ds');
record = ds.getAll();
if (import_flag == 0) {
for (i = 0;i < record.length;i++) {
if (record[i].get('status') == 'ERROR') {
Leaf.showMessage('${l:PROMPT}', '导入的数据存在错误,请查看错误信息!');
return;
}
}
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('import_interface_write_off_link').getUrl(),
para: {
header_number:'${/parameter/@header_number}',
header_id: '${/model/header/record/@header_id}',
batch_id: '${/parameter/@batch_id}'
},
scope: this,
success: function() {
import_flag = import_flag + 1;
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
},
error: function(){
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
}
});
} else {
Leaf.showMessage('${l:PROMPT}', '已导入的数据不能重复导入!');
return;
}
}
]]></script>
<a:dataSets>
<a:dataSet id="abc_import_grid_ds" autoPageSize="true" autoQuery="true" model="ccb.CCB600.abc_import_ln" queryUrl="${/request/@context_path}/autocrud/ccb.CCB600.abc_import_ln/query?header_id=${/model/header/record/@header_id}" selectable="true"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="backBtn" text="HLS.EXIT"/>
<a:gridButton id="import_confirm_id" click="import_confirm" text="确认导入"/>
</a:screenTopToolbar>
<a:grid bindTarget="abc_import_grid_ds" marginHeight="230" marginWidth="50" navBar="true">
<a:columns>
<a:column name="attribute_1" prompt="交易日期" renderer="Leaf.formatDate" />
<a:column name="attribute_2" prompt="记账日期" renderer="Leaf.formatDate" />
<a:column name="attribute_3" prompt="收款账号" />
<a:column name="attribute_4" prompt="批号" />
<a:column name="attribute_5" prompt="批量扣款账号" />
<a:column name="attribute_6" prompt="经销商代号" />
<a:column name="attribute_7" prompt="经销商名" />
<a:column name="attribute_8" prompt="户名" />
<a:column name="attribute_9" prompt="批量扣款金额" renderer="Leaf.formatMoney" />
<a:column name="attribute_10" prompt="输入员姓名" />
<a:column name="attribute_11" prompt="审核员姓名" />
<a:column name="attribute_12" prompt="路线结帐中心" />
<a:column name="attribute_13" prompt="备注" />
<a:column name="attribute_14" prompt="状态" />
<a:column name="attribute_15" prompt="错误描述" />
<a:column name="attribute_16" prompt="实际扣款金额" renderer="Leaf.formatMoney" />
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:view>
<script type="text/javascript"><![CDATA[
function saveClick() {
if (document.getElementById('general_importFile').value) {
var fileName = document.getElementById('general_importFile').value;
var fileType = fileName.substr(fileName.lastIndexOf("."));
if (fileType != '.xls' && fileType != '.xlsx' && fileType != '.csv') {
Leaf.showInfoMessage("提示",'请选择正确的导入文件!');
} else {
if ('${/parameter/@bank_type}' == 'ABC') {
$jq('#general_importForm').attr('action',
'${/request/@context_path}/modules/ccb/CCB600/abc_upload.lview?batch_id=${/parameter/@batch_id}&user_id=${/session/@user_id}&_csrf=${/session/@_csrf.token}');
} else if ('${/parameter/@bank_type}' == 'CCB') {
$jq('#general_importForm').attr('action',
'${/request/@context_path}/modules/ccb/CCB600/ccb_upload.lview?batch_id=${/parameter/@batch_id}&user_id=${/session/@user_id}&_csrf=${/session/@_csrf.token}');
}
document.getElementById('general_importForm').submit();
}
}
}
]]></script>
<a:dataSets>
<a:dataSet id="hcl032_label_ds" autoCreate="true">
<a:fields>
<a:field name="label2" defaultValue="1、请严格按照导入模板整理数据,检查必输项是否缺失。"/>
<a:field name="label3" defaultValue="2、目前仅支持 MS Excel。"/>
<a:field name="label4" defaultValue="3、执行导入前,请先关闭Excel文件。"/>
<a:field name="label6" defaultValue="4、导入完毕后,请在系统中核对数据。"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="注意事项" width="400">
<!--<a:label name="label1" bindTarget="label_ds" width="380"/>-->
<a:label name="label2" bindTarget="hcl032_label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label3" bindTarget="hcl032_label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label4" bindTarget="hcl032_label_ds" style="margin-left:10px;" width="380"/>
<a:label name="label6" bindTarget="hcl032_label_ds" style="margin-left:10px;" width="380"/>
</a:fieldSet>
<a:fieldSet style="margin-left:10px;margin-top:10px;" title="导入文件" width="400">
<form name="upload" id="general_importForm"
action="abc_upload.lview?batch_id=${/parameter/@batch_id}&amp;user_id=${/session/@user_id}&amp;_csrf=${/session/@_csrf.token}"
enctype="multipart/form-data" method="post">
<input name="CONTENT" id="general_importFile" style="margin-bottom:4px;width:250px;height:22px;"
type="file"/>
<input onclick="saveClick()" style="margin-left:10px;margin-top:10px;width:60px;" type="button"
value="导入"/>
</form>
</a:fieldSet>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<p:switch test="parameter/@_status">
<p:case value="insert">
<a:model-insert model="ccb.CCB600.hls_ebank_batch"/>
</p:case>
</p:switch>
<a:batch-apply sourcepath="/parameter/details">
<p:switch test="@current_parameter/@_status">
<p:case value="insert">
<a:model-insert model="ccb.CCB600.hls_ebank_batch_ln"/>
</p:case>
</p:switch>
</a:batch-apply>
<a:model-execute model="ccb.CCB600.hls_ebank_batch_ln"/>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<a:model-query model="ccb.CCB600.get_import_head_id" rootPath="header"/>
<a:import-excel header_id="${/model/header/record/@header_id}" separator=","
status_field="/parameter/@ImportSuccess" template_code="CCB_MANUAL_IMPORT"
user_id="${/session/@user_id}"/>
<!-- <a:model-query-->
<!-- defaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = &apos;CCB_MANUAL_IMPORT&apos;"-->
<!-- model="ccb.CCB503.ccb503_import_get_status" rootPath="status"/>-->
</a:init-procedure>
<a:view>
<a:link id="import_interface_write_off_link" model="ccb.CCB600.ccb_import_ln" modelaction="update"/>
<script type="text/javascript"><![CDATA[
function backBtn() {
history.go(-1);
}
var import_flag = 0;
function import_confirm() {
if(!$('ccb_form_ds').validate()){
return;
}
var transaction_date = $('ccb_form_ds').getCurrentRecord().get('transaction_date');
$('import_confirm_id').disable();
var ds = $('ccb_import_grid_ds');
record = ds.getAll();
if (import_flag == 0) {
for (i = 0;i < record.length;i++) {
if (record[i].get('status') == 'ERROR') {
Leaf.showMessage('${l:PROMPT}', '导入的数据存在错误,请查看错误信息!');
return;
}
}
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
Leaf.request({
url: $('import_interface_write_off_link').getUrl(),
para: {
/*'header_id': '${/parameter/@header_id}'*/
header_id: '${/model/header/record/@header_id}',
batch_id: '${/parameter/@batch_id}',
transaction_date: transaction_date
},
scope: this,
success: function() {
import_flag = import_flag + 1;
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
},
error: function(){
Leaf.Masker.unmask(Ext.getBody());
},
failure: function() {
Leaf.Masker.unmask(Ext.getBody());
}
});
} else {
Leaf.showMessage('${l:PROMPT}', '已导入的数据不能重复导入!');
return;
}
}
]]></script>
<a:dataSets>
<a:dataSet id="ccb_import_grid_ds" autoPageSize="true" autoQuery="true" model="ccb.CCB600.ccb_import_ln" queryUrl="${/request/@context_path}/autocrud/ccb.CCB600.ccb_import_ln/query?header_id=${/model/header/record/@header_id}" selectable="true"/>
</a:dataSets>
<a:dataSets>
<a:dataSet id="ccb_form_ds" autoCreate="true">
<a:fields>
<a:field name="transaction_date" required="true" prompt="建行划扣交易日期"/>
</a:fields>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<a:gridButton click="backBtn" text="HLS.EXIT"/>
<a:gridButton id="import_confirm_id" click="import_confirm" text="确认导入"/>
</a:screenTopToolbar>
<a:form column="1" labelWidth="120" marginWidth="30">
<a:datePicker name="transaction_date" bindTarget="ccb_form_ds" prompt="建行划扣交易日期"/>
</a:form>
<a:grid bindTarget="ccb_import_grid_ds" marginHeight="230" marginWidth="50" navBar="true">
<a:columns>
<a:column name="attribute_1" prompt="序号" width="80"/>
<a:column name="attribute_2" prompt="账号"/>
<a:column name="attribute_3" prompt="户名" width="150"/>
<a:column name="attribute_4" align="right" prompt="发起金额" renderer="Leaf.formatMoney"/>
<a:column name="attribute_5" align="right" prompt="成功金额" renderer="Leaf.formatMoney"/>
<a:column name="attribute_6" align="center" prompt="跨行标识"/>
<a:column name="attribute_7" align="center" prompt="行名" width="170"/>
<a:column name="attribute_8" align="center" prompt="行号" width="170"/>
<a:column name="attribute_9" align="center" prompt="多方协议号" width="150"/>
<a:column name="attribute_10" align="center" prompt="标识号" width="150"/>
<a:column name="attribute_11" align="center" prompt="摘要" width="150"/>
<a:column name="attribute_12" align="center" prompt="备注" width="150"/>
<a:column name="attribute_13" align="center" prompt="银行卡类型" width="150"/>
<a:column name="attribute_14" align="center" prompt="成功标志" width="150"/>
<a:column name="attribute_15" align="center" prompt="失败原因" width="150"/>
</a:columns>
</a:grid>
</a:screenBody>
</a:view>
</a:screen>
......@@ -11,8 +11,10 @@
<a:model-query fetchAll="true" model="csh.CSH510.csh_transaction_query" rootPath="csh_value"/>
</a:init-procedure>
<a:view>
<a:link id="csh_transaction_write_off_reverse_link_id" url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_write_off_reverse_new.lsc"/>
<a:link id="csh514_write_off_reverse_link_id" model="csh.CSH514.csh_transaction_write_off_reverse" modelaction="batch_update"/>
<a:link id="csh_transaction_write_off_reverse_link_id"
url="${/request/@context_path}/modules/csh/CSH514/csh_transaction_write_off_reverse_new.lsc"/>
<a:link id="csh514_write_off_reverse_link_id" model="csh.CSH514.csh_transaction_write_off_reverse"
modelaction="batch_update"/>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<script type="text/javascript"><![CDATA[
......@@ -23,12 +25,13 @@
if ($('csh_transaction_receipt_write_off_reverse_detail_head_ds').validate()) {
var head_record = $('csh_transaction_receipt_write_off_reverse_detail_head_ds').getAt(0);
var records = $('csh_transaction_receipt_write_off_reverse_detail_result_ds').getSelected();
var all = $('csh_transaction_receipt_write_off_reverse_detail_result_ds').getAll();
//var records = $('csh_transaction_receipt_write_off_reverse_detail_result_ds').getAll();
if (!records.length) {
Leaf.showMessage('${l:PROMPT}', '${l:CSH514.SELECT_REVERSE_RECORD}');
return;
}
if (records[0].get('history_flag') ==='Y') {
if (records[0].get('history_flag') === 'Y') {
Leaf.showConfirm('${l:PROMPT}', '该事务是历史事务,请检查是否进行了补生成凭证', function () {
var saveData = [];
for (var i = 0; i < records.length; i++) {
......@@ -72,10 +75,24 @@
Leaf.Masker.unmask(win_body);
return;
}, null, null);
},null)
}, null)
}else{
} else {
var saveData = [];
var receipt_type = '${/parameter/@receipt_type}';
var paid_byother_flag = '${/parameter/paid_byother_flag}';
var bp_category = '${/parameter/bp_category}';
if (receipt_type == 'WITHHOLD') { //划扣
if (all.length != records.length) {
Leaf.showInfoMessage("提示", "该现金事务不支付部分反冲");
return;
}
} else {
if (paid_byother_flag == 'F' && bp_category == 'TENANT') {
Leaf.showInfoMessage("提示", "该现金事务不支付部分反冲");
return;
}
}
for (var i = 0; i < records.length; i++) {
records[i].set('reversed_date', head_record.get('reversed_date'));
records[i].set('description', head_record.get('description'));
......@@ -177,9 +194,12 @@
<a:dataSets>
<a:dataSet id="csh_transaction_receipt_write_off_reverse_detail_head_ds" autoCreate="true">
<a:fields>
<a:field name="reversed_date" defaultValue="${/model/default_value/record/@now_time}" required="true"/>
<a:field name="reversed_period_name" defaultValue="${/model/default_value/record/@now_period_name}" readOnly="true" required="true"/>
<a:field name="transaction_date" defaultValue="${/model/csh_value/record/@transaction_date}" readOnly="true"/>
<a:field name="reversed_date" defaultValue="${/model/default_value/record/@now_time}"
required="true"/>
<a:field name="reversed_period_name" defaultValue="${/model/default_value/record/@now_period_name}"
readOnly="true" required="true"/>
<a:field name="transaction_date" defaultValue="${/model/csh_value/record/@transaction_date}"
readOnly="true"/>
<a:field name="description" defaultValue="${l:HLS.REVERSE}"/>
</a:fields>
<a:events>
......@@ -187,8 +207,10 @@
<a:event name="add" handler="on_write_off_reverse_detail_add"/>
</a:events>
</a:dataSet>
<a:dataSet id="csh_transaction_receipt_write_off_reverse_detail_result_ds" autoQuery="true" fetchAll="true" model="csh.CSH514.csh_write_off" pageSize="15"
queryUrl="${/request/@context_path}/autocrud/csh.CSH514.csh_write_off/query?csh_transaction_id=${/parameter/@transaction_id}&amp;reversed_flag=N&amp;reverse_detail_flag=Y" selectable="true">
<a:dataSet id="csh_transaction_receipt_write_off_reverse_detail_result_ds" autoQuery="true" fetchAll="true"
model="csh.CSH514.csh_write_off" pageSize="15"
queryUrl="${/request/@context_path}/autocrud/csh.CSH514.csh_write_off/query?csh_transaction_id=${/parameter/@transaction_id}&amp;reversed_flag=N&amp;reverse_detail_flag=Y"
selectable="true">
<a:fields>
<a:field name="due_date" datatype="java.util.Date"/>
</a:fields>
......@@ -200,19 +222,26 @@
<a:gridButton click="csh514_write_off_reverse" text="HLS.REVERSE"/>
</a:screenTopToolbar>
<a:form column="4" title="CSH514.CSH_WRITE_OFF_DETAIL">
<a:datePicker name="reversed_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="HLS.REVERSE_DATE"/>
<a:textField name="reversed_period_name" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="HLS.REVERSE_PERIOD"/>
<a:datePicker name="transaction_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="收款日期"/>
<a:textField name="description" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="HLS.NOTE" width="300"/>
<a:datePicker name="reversed_date" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.REVERSE_DATE"/>
<a:textField name="reversed_period_name"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.REVERSE_PERIOD"/>
<a:datePicker name="transaction_date"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds" prompt="收款日期"/>
<a:textField name="description" bindTarget="csh_transaction_receipt_write_off_reverse_detail_head_ds"
prompt="HLS.NOTE" width="300"/>
</a:form>
<a:grid id="csh_transaction_receipt_write_off_reverse_detail_grid_ds" bindTarget="csh_transaction_receipt_write_off_reverse_detail_result_ds" marginHeight="170" marginWidth="50" navBar="true">
<a:grid id="csh_transaction_receipt_write_off_reverse_detail_grid_ds"
bindTarget="csh_transaction_receipt_write_off_reverse_detail_result_ds" marginHeight="170"
marginWidth="50" navBar="true">
<a:columns>
<a:column name="write_off_type_name"/>
<a:column name="write_off_date" renderer="Leaf.formatDate"/>
<a:column name="csh_write_off_amount" renderer="Leaf.formatMoney"/>
<!-- <a:column name="cf_type_name" prompt="CSH513.CF_TYPE"/> -->
<a:column name="cf_item_name" prompt="CSH513.CF_TYPE"/>
<a:column name="times" prompt="期数"/>
<a:column name="times" prompt="期数"/>
<a:column name="write_off_due_amount" renderer="Leaf.formatMoney"/>
<a:column name="write_off_principal" renderer="Leaf.formatMoney"/>
<a:column name="write_off_interest" renderer="Leaf.formatMoney"/>
......
......@@ -370,7 +370,7 @@
var status = record.get('status');
var write_off_flag = record.get('write_off_flag');
var readOnly = 'Y';
if ((status == 'NEW' || status == 'RETURN') && write_off_flag == 'NOT') {
if ((status == 'NEW' || status == 'RETURN') && write_off_flag != 'FULL') {
readOnly = 'N';
}
if (name == 'csh531n_detail') {
......@@ -451,25 +451,31 @@
function csh531_new_reverse_write_off() {
var record = $('csh531n_sap_bankflow_info_result_ds').getSelected()[0];
if (record && record.get('write_off_flag') == 'FULL') {
Leaf.showConfirm("提示", "您确定反冲现金事务<span style='color:red'>" + record.get('transaction_num') + "</span>吗", function () {
Leaf.request({
url: $('csh_reverse_write_off_link').getUrl(),
para: record.data,
success: function () {
csh531n_unlock_current_window();
$('csh531n_sap_bankflow_info_result_ds').query();
}, failure: function () {
csh531n_unlock_current_window();
},
error: function () {
csh531n_unlock_current_window();
},
scope: this
});
});
var returned_amount = record.get('returned_amount') || 0;
if (returned_amount > 0) {
Leaf.showInfoMessage("提示", "该事务存在收款退款,不允许反冲");
} else {
Leaf.showInfoMessage("提示", "只能反冲已经核销的现金事务");
if (record && record.get('write_off_flag') != 'NOT') {
Leaf.showConfirm("提示", "您确定反冲现金事务<span style='color:red'>" + record.get('transaction_num') + "</span>吗", function () {
csh531n_lock_current_window();
Leaf.request({
url: $('csh_reverse_write_off_link').getUrl(),
para: record.data,
success: function () {
csh531n_unlock_current_window();
$('csh531n_sap_bankflow_info_result_ds').query();
}, failure: function () {
csh531n_unlock_current_window();
},
error: function () {
csh531n_unlock_current_window();
},
scope: this
});
});
} else {
Leaf.showInfoMessage("提示", "只能反冲已经核销的现金事务");
}
}
}
......@@ -489,7 +495,7 @@
<a:dataSet id="receipt_type_ds" lookupCode="RECEIPT_TYPE"/>
<a:dataSet id="csh_transaction_receipt_write_off_query_ds" autoCreate="true">
<a:fields>
<a:field name="write_off_flag" />
<a:field name="write_off_flag"/>
<a:field name="write_off_flag_desc" displayField="code_value_name" options="con_write_off_flag_ds"
returnField="write_off_flag" valueField="code_value"/>
<a:field name="status" displayField="code_value_name" options="status_ds"
......
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