Commit 906239cb authored by 高泉铭's avatar 高泉铭

[refactor] 划扣导入导出

parent a2ccdde1
<?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"/>
<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,15 +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_pay_method =>${@payment_method},
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});
......@@ -80,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"/>
......@@ -93,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
......@@ -206,7 +206,10 @@
<bm:field name="collection_classes_desc"
expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DS_COLLECTION_CLASSES' and v.code_value =t1.collection_classes)"
forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type"/>
<bm:field name="paid_byother_flag"/>
<bm:field name="exists_advance_flag" forceUpdate="false" forInsert="false" expression="nvl((select 'Y' from dual where exists(SELECT 1 FROM csh_transaction t WHERE t.source_csh_trx_id = t1.transaction_id AND transaction_type = 'ADVANCE_RECEIPT' AND confirmed_flag != 'CANCELLED')),'N')"/>
<bm:field name="exists_deposit_flag" forceUpdate="false" forInsert="false" expression="nvl((select 'Y' from dual where exists(SELECT 1 FROM csh_transaction t WHERE t.source_csh_trx_id = t1.transaction_id AND transaction_type = 'DEPOSIT' AND confirmed_flag != 'CANCELLED')),'N')"/>
<!--end-->
<!--add by lisitong-->
......
<?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>
......@@ -79,12 +79,9 @@
} else {
var saveData = [];
var receipt_type = '${/parameter/@receipt_tpye}';
var receipt_type = '${/parameter/@receipt_type}';
var paid_byother_flag = '${/parameter/paid_byother_flag}';
var bp_category = '${/parameter/bp_category}';
alert(receipt_type);
alert(paid_byother_flag);
alert(bp_category);
if (receipt_type == 'WITHHOLD') { //划扣
if (all.length != records.length) {
Leaf.showInfoMessage("提示", "该现金事务不支付部分反冲");
......
......@@ -25,12 +25,6 @@
function init() {
var record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var deposit_ds = $('csh_transaction_deposit_ds');
var advanced_ds = $('csh_transaction_advanced_ds');
if (advanced_ds.getAll().length == 0) {
}
if ('${/parameter/@depositDisplayFlag}' == 'Y') {
document.getElementById('write_off_deposit').style.display = 'block';
......@@ -325,7 +319,6 @@
function csh531_beforesubmit_fun(ds) {
var records = ds.getAll();
var total = 0;
debugger;
var head_record = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var unwrite_off_amount = head_record.get('unwrite_off_amount');
for (var i = 0; i < records.length; i++) {
......@@ -447,9 +440,20 @@
Leaf.showInfoMessage('提示', '核销总金额不能大于剩余可核销金额');
return false;
}
var receipt_type = header_rec.get('receipt_type');
var bp_category = header_rec.get('bp_category');
var paid_byother_flag = header_rec.get('paid_byother_flag');
if (type == 'WRITE_OFF') {
if (sum != header_rec.get('unwrite_off_amount')) {
Leaf.showInfoMessage('提示', '核销总金额不等于可核销金额');
var check_flag = 'N';
if (receipt_type == 'WITHHOLD') { //划扣
check_flag = 'Y';
} else {
if (paid_byother_flag == 'F' && bp_category == 'TENANT') {
check_flag = 'Y';
}
}
if (check_flag == 'Y' && sum != header_rec.get('unwrite_off_amount')) {
Leaf.showInfoMessage('提示', '核销总金额不等于可核销金额,该现金事务不支持部分核销!');
return false;
}
}
......@@ -471,6 +475,18 @@
return;
} else {
if (name == 'write_off_amount') {
var r = $('csh_transaction_receipt_write_off_detail_ds').getCurrentRecord();
var deposit_ds = $('csh_transaction_deposit_ds');
var advanced_ds = $('csh_transaction_advanced_ds');
var current_deposit_r = deposit_ds.getAt(0);
var current_advance_r = advanced_ds.getAt(0);
if(r.get('exists_deposit_flag') == 'Y' && current_deposit_r){
return;
}
if(r.get('exists_advance_flag') == 'Y' && current_advance_r){
return;
}
return 'csh_transaction_advanced_grid_nf';
}
}
......
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