Commit 6e793bb3 authored by liyuan.chen's avatar liyuan.chen

保证金退款,项目新增附件上传

parent 3a81b600
......@@ -12,9 +12,11 @@
<bm:field name="authorized_user_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="AUTHORIZED_USER_ID" prompt="AUT_OWNER_USER_AUTHORIZE.AUTHORIZED_USER_ID"/>
<bm:field name="start_date" databaseType="DATE" datatype="java.util.Date" physicalName="START_DATE" prompt="AUT_OWNER_USER_AUTHORIZE.START_DATE"/>
<bm:field name="end_date" databaseType="DATE" datatype="java.util.Date" physicalName="END_DATE" prompt="AUT_OWNER_USER_AUTHORIZE.END_DATE"/>
<bm:field name="owner_user_desc" expression="(select description from sys_user_data_owner_v a where a.user_id=t1.owner_user_id)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="owner_user_desc" expression="(select description from sys_user_data_owner_v a where a.user_id=t1.owner_user_id)" forInsert="false" forUpdate="false"/>-->
<bm:field name="owner_user_desc" expression="(select user_name from sys_user_data_owner_v a where a.user_id=t1.owner_user_id)" forInsert="false" forUpdate="false"/>
<bm:field name="owner_employee_name" expression="(select employee_name from sys_user_data_owner_v a where a.user_id=t1.owner_user_id)" forInsert="false" forUpdate="false"/>
<bm:field name="authorized_user_desc" expression="(select description from sys_user_v a where a.user_id=t1.authorized_user_id)" forInsert="false" forUpdate="false"/>
<!--<bm:field name="authorized_user_desc" expression="(select description from sys_user_v a where a.user_id=t1.authorized_user_id)" forInsert="false" forUpdate="false"/>-->
<bm:field name="authorized_user_desc" expression="(select user_name from sys_user_v a where a.user_id=t1.authorized_user_id)" forInsert="false" forUpdate="false"/>
<bm:field name="authorized_employee_name" expression="(select employee_name from sys_user_v a where a.user_id=t1.authorized_user_id)" forInsert="false" forUpdate="false"/>
<bm:field name="ref_v01" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V01" prompt="AUT_OWNER_USER_AUTHORIZE.REF_V01"/>
<bm:field name="ref_v02" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="REF_V02" prompt="AUT_OWNER_USER_AUTHORIZE.REF_V02"/>
......
......@@ -12,14 +12,17 @@
]]></bm:update-sql>
</bm:operation>
<bm:operation name="update">
<bm:parameters>
<bm:parameter name="return_id" dataType="java.lang.Long" input="false" output="true" outputPath="/parameter/@return_id"/>
</bm:parameters>
<bm:update-sql><![CDATA[
begin
hlcm_cux_deposit_pkg.check_transaction_status_new(
p_transaction_id=>${@transaction_id},
p_user_id=>${/session/@user_id}
);
end;
]]></bm:update-sql>
begin
hlcm_cux_deposit_pkg.insert_transaction_return(p_transaction_id => ${@transaction_id},
p_user_id => ${/session/@user_id},
p_return_id => ${@return_id});
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="query">
<bm:query-sql><![CDATA[
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false" baseTable="CSH_DEPOSIT_CASHFLOW" alias="t">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
Select
t.deposit_cashflow_id,
t.return_id,
t.deposit_source_type,
t.transaction_id,
(Select c.transaction_num
From csh_transaction c
Where c.transaction_id = t.transaction_id) transaction_num,
to_char(t.transaction_date, 'yyyy-mm-dd') transaction_date,
t.transaction_amount,
t.transaction_deposit_amount,
t.contract_id,
(Select cc.contract_number
From con_contract cc
Where cc.contract_id = t.contract_id) contract_number,
t.creation_date,
t.created_by,
t.last_updated_by,
t.last_update_date,
(Select c.transaction_num
From csh_transaction c
Where c.transaction_id = t.source_csh_trx_id) source_transaction_num
From csh_deposit_cashflow t
#WHERE_CLAUSE#
order by t.transaction_date
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:data-filters>
<bm:data-filter name="query" expression="t.return_id = ${@return_id}"/>
</bm:data-filters>
<!--<bm:query-fields>
<bm:query-field name="return_id" queryExpression="t1.return_id = ${@return_id}"/>
</bm:query-fields>-->
</bm:model>
......@@ -103,10 +103,26 @@
<bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type"/>
<bm:field name="bp_id_telnet_code" expression="(select hb.bp_code from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_telnet_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_id_telnet_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_tenant)" forInsert="false" forUpdate="false"/>
<bm:field name="bp_name_n" expression="(select hb.bp_name from hls_bp_master hb,con_contract ct where ct.contract_id=t1.ref_contract_id and hb.bp_id=ct.bp_id_agent_level1)" forInsert="false" forUpdate="false"/>
<bm:field name="deposit_trans_type_desc" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'DEPOSIT_TRANS_TYPE' and v.code_value =t1.deposit_trans_type)" forInsert="false" forUpdate="false"/>
<bm:field name="approve_status" expression=" nvl(( hlcm_cux_deposit_pkg.get_transaction_status_new(p_transaction_id=>t1.transaction_id,p_user_id=>1) ),'正常')" forInsert="false" forUpdate="false"/>
<bm:field name="approve_status" expression=" nvl(( hlcm_cux_deposit_pkg.get_transaction_status_new(p_transaction_id=>t1.transaction_id,p_user_id=>1) ),'正常')" forInsert="false" forUpdate="false"/>
<bm:field name="left_amount" expression=" (Select (nvl(Sum(c.transaction_amount), 0) -
nvl(Sum(c.write_off_amount), 0) - nvl(Sum(c.returned_amount), 0) -
nvl(Sum((Select nvl(cr.return_amount, 0)
From csh_transaction_return cr
Where cr.transaction_id = c.transaction_id
And cr.status = 'APPROVING')),
0))
From csh_transaction c
Where c.company_id = ${/session/@company_id}
And c.ref_contract_id Is Not Null
And c.transaction_type = 'DEPOSIT'
And c.source_type Is Not Null
And c.ref_contract_id =
(Select c1.ref_contract_id
From csh_transaction c1
Where c1.transaction_id = t1.transaction_id) )" forInsert="false" forUpdate="false"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......
......@@ -3,53 +3,63 @@
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select * from (select cr.return_id,
to_char(cr.return_date,'yyyy-mm-dd') return_date,
cr.return_amount,
ct.period_name,
cr.opposite_band_na,
cr.bp_bank_account_num,
(select cp.description
from csh_payment_method cp
where cp.payment_method_id = ct.payment_method_id) payment_method_display,
ct.exchange_rate,
ct.bank_slip_num,
(select gc.currency_name
from gld_currency_vl gc
where gc.currency_code = ct.currency_code),
(select tv.type_name
from gld_exchangerate_types_vl tv
where tv.type_code = ct.exchange_rate_type),
(select a.bank_account_code
from csh_bank_account a
where a.bank_account_id = ct.bank_account_id) bank_account_code,
(select a.bank_account_name
from csh_bank_account a
where a.bank_account_id = ct.bank_account_id) bank_account_name,
(select a.bank_account_num
from csh_bank_account a
where a.bank_account_id = ct.bank_account_id) bank_account_num,
(select a.bank_account_code
from hls_bp_master_bank_account a
where a.bank_account_id = ct.bp_bank_account_id) bp_bank_account_code,
cr.bp_bank_account_name,
cr.notes description,
cr.csh_return_atm_id,
cr.csh_return_bp_id,
(select a.bp_name
from hls_bp_master a
where a.bp_id = cr.csh_return_bp_id) csh_return_bp_name,
(select hb.bp_code from hls_bp_master hb,con_contract cc where cc.contract_id=ct.ref_contract_id and hb.bp_id=cc.bp_id_tenant)bp_id_telnet_code,
(select hb.bp_name from hls_bp_master hb,con_contract cc where cc.contract_id=ct.ref_contract_id and hb.bp_id=cc.bp_id_tenant)bp_id_telnet_n,
(select cc.contract_number from con_contract cc where cc.contract_id = ct.ref_contract_id) contract_number,
(select a.bp_name
from hls_bp_master a
where a.bp_id = ct.bp_id) bp_agent_name
from csh_transaction ct, csh_transaction_return cr
where ct.transaction_id = cr.transaction_id
)v
select *
from (select
cr.return_id,
to_char(cr.return_date, 'yyyy-mm-dd') return_date,
cr.return_amount,
ct.period_name,
cr.opposite_band_na,
cr.bp_bank_account_num,
(select cp.description
from csh_payment_method cp
where cp.payment_method_id =
ct.payment_method_id) payment_method_display,
ct.exchange_rate,
ct.bank_slip_num,
(select gc.currency_name
from gld_currency_vl gc
where gc.currency_code = ct.currency_code),
(select tv.type_name
from gld_exchangerate_types_vl tv
where tv.type_code = ct.exchange_rate_type),
(select a.bank_account_code
from csh_bank_account a
where a.bank_account_id = ct.bank_account_id) bank_account_code,
(select a.bank_account_name
from csh_bank_account a
where a.bank_account_id = ct.bank_account_id) bank_account_name,
(select a.bank_account_num
from csh_bank_account a
where a.bank_account_id = ct.bank_account_id) bank_account_num,
(select a.bank_account_code
from hls_bp_master_bank_account a
where a.bank_account_id =
ct.bp_bank_account_id) bp_bank_account_code,
cr.bp_bank_account_name,
cr.notes description,
cr.csh_return_atm_id,
cr.csh_return_bp_id,
(select a.bp_name
from hls_bp_master a
where a.bp_id = cr.csh_return_bp_id) csh_return_bp_name,
(select hb.bp_code
from hls_bp_master hb, con_contract cc
where cc.contract_id = ct.ref_contract_id and hb.bp_id = cc.bp_id_tenant) bp_id_telnet_code,
(select hb.bp_name
from hls_bp_master hb, con_contract cc
where cc.contract_id = ct.ref_contract_id and hb.bp_id = cc.bp_id_tenant) bp_id_telnet_n,
(select cc.contract_number
from con_contract cc
where cc.contract_id = ct.ref_contract_id) contract_number,
(select a.bp_name
from hls_bp_master a
where a.bp_id = ct.bp_id) bp_agent_name,
nvl(cr.left_amount, 0) as left_amount
from csh_transaction ct, csh_transaction_return cr
where ct.transaction_id = cr.transaction_id
) v
#WHERE_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
......
......@@ -2,25 +2,25 @@
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="update">
<bm:parameters>
<bm:parameter name="return_id" dataType="java.lang.Long" input="false" output="true" outputPath="/parameter/@return_id"/>
</bm:parameters>
<bm:update-sql><![CDATA[
begin
hlcm_cux_deposit_pkg.execute_transaction_return(p_transaction_id=>${@transaction_id},
p_return_date=>to_date(${@return_date},'yyyy-mm-dd hh24:mi:ss'),
p_return_amount =>${@return_amount},
p_user_id =>${/session/@user_id},
p_return_id =>${@return_id},
p_bp_bank_account_name =>${@bp_bank_account_name},
p_opposite_band_na =>${@opposite_band_na},
p_bp_bank_account_num =>${@bp_bank_account_num},
p_description =>${@description},
p_csh_return_atm_id=>${@csh_return_atm_id},
p_csh_return_bp_id=>${@csh_return_bp_id}
);
hlcm_cux_deposit_pkg.execute_transaction_return(p_transaction_id =>${@transaction_id},
p_return_date =>to_date(${@return_date},
'yyyy-mm-dd hh24:mi:ss'),
p_return_amount =>${@return_amount},
p_user_id =>${/session/@user_id},
p_return_id =>${@return_id},
p_bp_bank_account_name =>${@bp_bank_account_name},
p_opposite_band_na =>${@opposite_band_na},
p_bp_bank_account_num =>${@bp_bank_account_num},
p_description =>${@description},
p_csh_return_atm_id =>${@csh_return_atm_id},
p_csh_return_bp_id =>${@csh_return_bp_id},
p_left_amount =>${@left_amount}
);
end;]]></bm:update-sql>
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="execute">
<bm:parameters>
......@@ -31,10 +31,11 @@
begin
CSH_TRANSACTION_WFL_PKG.DEPOSIT_RETURN_WORKFLOW_START
(
p_return_id=>${@return_id},
p_user_id=>${/session/@user_id}
p_return_id=>${@return_id},
p_user_id=>${/session/@user_id}
);
end;]]></bm:update-sql>
end;
]]></bm:update-sql>
</bm:operation>
<bm:operation name="query">
<bm:query-sql><![CDATA[
......
......@@ -118,7 +118,8 @@
<a:field name="owner_user_id" required="true"/>
<a:field name="owner_user_desc" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="basic.sys_user_data_owner_v_for_lov" lovWidth="500" prompt="AUT_OWNER_USER_AUTHORIZE.OWNER_USER_ID" required="true" title="选择单据所有者">
<a:mapping>
<a:map from="description" to="owner_user_desc"/>
<!--<a:map from="description" to="owner_user_desc"/>-->
<a:map from="user_name" to="owner_user_desc"/>
<a:map from="user_id" to="owner_user_id"/>
<a:map from="employee_name" to="owner_employee_name"/>
</a:mapping>
......@@ -128,7 +129,8 @@
<a:field name="authorized_user_id" required="true"/>
<a:field name="authorized_user_desc" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="basic.sys_user_for_lov" lovWidth="500" prompt="AUT_OWNER_USER_AUTHORIZE.AUTHORIZED_USER_ID" required="true" title="用户选择">
<a:mapping>
<a:map from="description" to="authorized_user_desc"/>
<!--<a:map from="description" to="authorized_user_desc"/>-->
<a:map from="user_name" to="authorized_user_desc"/>
<a:map from="employee_name" to="authorized_employee_name"/>
<a:map from="user_id" to="authorized_user_id"/>
</a:mapping>
......@@ -175,6 +177,7 @@
<a:grid id="aut_owner_user_authorize_result_ds_grid" bindTarget="aut_owner_user_authorize_result_ds" marginHeight="170" marginWidth="30" navBar="true">
<a:columns>
<a:column name="trx_category_desc" editorFunction="aut105trxCategoryFunction" prompt="AUT_OWNER_USER_AUTHORIZE.TRX_CATEGORY" width="140"/>
<!--<a:column name="owner_user_desc" editorFunction="aut105lovFunction" prompt="AUT_OWNER_USER_AUTHORIZE.OWNER_USER_ID" width="120"/>-->
<a:column name="owner_user_desc" editorFunction="aut105lovFunction" prompt="AUT_OWNER_USER_AUTHORIZE.OWNER_USER_ID" width="120"/>
<a:column name="owner_employee_name" prompt="EXP_EMPLOYEES.NAME" width="100"/>
<a:column name="authorized_user_desc" editorFunction="aut105lovFunction" prompt="AUT_OWNER_USER_AUTHORIZE.AUTHORIZED_USER_ID" width="120"/>
......
......@@ -60,6 +60,7 @@
var record = $('csh_transaction_deposit_return_maintain_ds').getCurrentRecord();
var transaction_id = $('csh_transaction_receipt_return_maintain_ds').getCurrentRecord().get('transaction_id');
var unwrite_off_amount = $('csh_transaction_receipt_return_maintain_ds').getCurrentRecord().get('unwrite_off_amount');
var return_id = record.get('return_id');
// if (record.validateRecord()){
if ($('csh_transaction_deposit_return_maintain_ds').validate()) {
// Leaf.Masker.mask(Ext.getBody());
......@@ -81,10 +82,12 @@
bp_bank_account_num: record.get('bp_bank_account_num'),
description: record.get('description'),
csh_return_atm_id: csh_return_atm_id,
csh_return_bp_id: record.get('csh_return_bp_id')
csh_return_bp_id: record.get('csh_return_bp_id'),
return_id: return_id,
left_amount: record.get('left_amount')
},
success: function (res) {
var return_id = res.result.return_id;
//var return_id = res.result.return_id;
Leaf.Masker.mask(Ext.getBody(), '正在提交退款工作流...');
Leaf.request({
url: $('csh560_start_wfl_link').getUrl(),
......@@ -144,6 +147,10 @@
}
function attach_renderer(value, record, name) {
return '<a href="javascript:upload_attachment_win();" style="color:red">' + '附件上传' + '</a>';
}
]]></script>
<a:dataSets>
......@@ -164,10 +171,12 @@
<a:field name="bp_bank_account_name" defaultValue="${/parameter/@bp_bank_account_name}"/>
<a:field name="opposite_band_na" defaultValue="${/parameter/@opposite_band_na}"/>
<a:field name="bp_bank_account_num" defaultValue="${/parameter/@bp_bank_account_num}"/>
<a:field name="return_id" defaultValue="${/parameter/@return_id}"/>
<a:field name="left_amount" defaultValue="${/parameter/@left_amount}"/>
</a:fields>
</a:dataSet>
<a:dataSet id="csh_deposit_cashflow_grid_ds" fetchAll="true" autoQuery="true" model="cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query" queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query/query?return_id=${/parameter/@return_id}"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
......@@ -180,10 +189,10 @@
prompt="经济业务发生日" renderer="Leaf.formatDate" width="180"/>
<a:numberField name="return_amount" allowDecimals="true" allowFormat="true" allowNegative="false"
bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="CSH515.CSH_REFUND_AMOUNT"/>
prompt="CSH515.CSH_REFUND_AMOUNT" width="170"/>
<a:numberField name="unwrite_off_amount" allowDecimals="true" allowFormat="true"
allowNegative="false" bindTarget="csh_transaction_receipt_return_maintain_ds"
prompt="剩余可用金额" readOnly="true" width="170" allowdecimals="false"/>
prompt="剩余可用金额" readOnly="true" width="170"/>
<a:lov name="csh_return_bp_name" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="退款用户" width="185"/>
</a:box>
......@@ -191,24 +200,25 @@
<a:textField name="contract_number" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="合同编号" readOnly="true" width="180"/>
<a:textField name="bp_id_telnet_code" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="承租人编码" readOnly="true"/>
prompt="承租人编码" readOnly="true" width="170"/>
<a:textField name="bp_id_telnet_n" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="承租人名称" readOnly="true" width="170"/>
<!-- <a:datePicker name="lasted_account_date" bindTarget="csh_transaction_deposit_return_maintain_ds"-->
<!-- <a:datePicker name="lasted_account_date" bindTarget="csh_transaction_deposit_return_maintain_ds"-->
<!-- prompt="最后一次入账时间" width="185" readOnly="true"/>-->
<a:numberField name="left_amount" allowDecimals="true" allowFormat="true"
allowNegative="false" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="合同剩余保证金" readOnly="true" width="185"/>
</a:box>
<a:box column="4" labelWidth="115">
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME" width="180"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME" width="170"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME" width="170"/>
<!--<a:numberField name="bp_bank_account_num" allowdecimals="false" bindTarget="csh_transaction_deposit_return_maintain_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME" width="170"/>-->
<a:hBox>
<a>附件上传:</a><a href="javascript:upload_attachment_win()" style="color:red"> 附件上传</a>
</a:hBox>
<a:label name="attach" bindTarget="csh_transaction_deposit_return_maintain_ds" renderer="attach_renderer" prompt="附件" width="185"/>
</a:box>
<a:box column="1">
<a:textArea name="description" bindTarget="csh_transaction_deposit_return_maintain_ds" prompt="备注"
......@@ -216,6 +226,20 @@
</a:box>
</a:form>
<a:grid id="csh_deposit_cashflow_grid_ds_id" bindTarget="csh_deposit_cashflow_grid_ds" marginHeight="200" marginWidth="80" navBar="true">
<!--<a:toolBar>
<a:button click="csh510_export" text="导出"/>
</a:toolBar>-->
<a:columns>
<a:column name="source_transaction_num" prompt="源单据编号" width="150" align="center"/>
<a:column name="transaction_amount" prompt="总额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="deposit_source_type" prompt="类型" width="110" align="center"/>
<a:column name="transaction_date" prompt="时间" align="center" renderer="Leaf.formatDate"/>
<a:column name="transaction_num" prompt="目标单据编号" width="150" align="center"/>
<a:column name="transaction_deposit_amount" prompt="分配金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="contract_number" prompt="合同编号" width="150" align="center"/>
</a:columns>
</a:grid>
</a:screenBody>
<script type="text/javascript"><![CDATA[
Leaf.onReady(init);
......
......@@ -38,10 +38,14 @@
var record = $('csh_transaction_return_wfl_ds').getCurrentRecord();
var return_id = record.get('return_id');
var file_name = "保证金退款-" + record.get('bp_agent_name') + "-" + record.get('return_amount') + "元";
var url_l = $('csh_deposit_return_history_print_link_id').getUrl() + '?document_id=' + return_id + '&file_name=' + file_name + '&document_table=CSH_DEPOSIT_TRANSACTION_RETURN&batch_flag=Y&source_type=common';
var url_l = $('csh_deposit_return_history_print_link_id').getUrl() + '?document_id=' + return_id + '&file_name=' + encodeURI(file_name) + '&document_table=CSH_DEPOSIT_TRANSACTION_RETURN&batch_flag=Y&source_type=common';
window.open(href = url_l, target = "_self");
}
function attach_renderer(value, record, name) {
return '<a href="javascript:upload_attachment_win();" style="color:red">' + '附件查看' + '</a>';
}
]]></script>
<a:dataSets>
<a:dataSet id="csh_transaction_return_wfl_ds" autoPageSize="true" autoQuery="true"
......@@ -49,6 +53,7 @@
queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.csh_transaction_return_query/query?return_id=${/parameter/@return_id}">
</a:dataSet>
<a:dataSet id="csh_deposit_cashflow_grid_ds" fetchAll="true" autoQuery="true" model="cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query" queryUrl="${/request/@context_path}/autocrud/cus_deposit.CUS_DEPOSIT106.csh_deposit_cashflow_query/query?return_id=${/parameter/@return_id}"/>
</a:dataSets>
<a:screenBody>
<a:screenTopToolbar>
......@@ -72,20 +77,23 @@
<a:textField name="contract_number" bindTarget="csh_transaction_return_wfl_ds"
prompt="合同编号" readOnly="true" width="180"/>
<a:textField name="bp_id_telnet_code" bindTarget="csh_transaction_return_wfl_ds"
prompt="承租人编码" readOnly="true"/>
prompt="承租人编码" readOnly="true" width="170"/>
<a:textField name="bp_id_telnet_n" bindTarget="csh_transaction_return_wfl_ds"
prompt="承租人名称" readOnly="true" width="170"/>
<!-- <a:datePicker name="lasted_account_date" bindTarget="csh_transaction_return_wfl_ds"-->
<!-- prompt="最后一次入账时间" width="185" readOnly="true"/>-->
prompt="承租人名称" readOnly="true" width="185"/>
<!--<a:datePicker name="lasted_account_date" bindTarget="csh_transaction_return_wfl_ds"-->
<!--prompt="最后一次入账时间" width="185" readOnly="true"/>-->
<a:numberField name="left_amount" allowDecimals="true" allowFormat="true"
allowNegative="false" bindTarget="csh_transaction_return_wfl_ds"
prompt="合同剩余保证金" readOnly="true" width="170"/>
</a:box>
<a:box column="4" labelWidth="115">
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_return_wfl_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME" readOnly="true" width="180"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_return_wfl_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME" readOnly="true"/>
prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME" readOnly="true" width="170"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_return_wfl_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME" readOnly="true" width="170"/>
<a href="javascript:upload_attachment_win()" style="color:red">附件查看</a>
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME" readOnly="true" width="185"/>
<a:label name="attach" bindTarget="csh_transaction_return_wfl_ds" renderer="attach_renderer" prompt="附件" width="170"/>
<!--<a:numberField name="return_amount" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_return_wfl_ds" prompt="CSH515.CSH_REFUND_AMOUNT" readOnly="true"/>-->
<!--<a:textField name="bank_slip_num" bindTarget="csh_transaction_return_wfl_ds" prompt="银行流水号" readOnly="true"/>-->
<!--<a:comboBox name="currency_name" bindTarget="csh_transaction_return_wfl_ds" prompt="HLS.CURRENCY" readOnly="true"/>-->
......@@ -107,6 +115,20 @@
<!--<a:textField name="description" bindTarget="csh_transaction_return_wfl_ds" prompt="HLS.NOTE" width="849" readOnly="true"/>-->
</a:box>
</a:form>
<a:grid id="csh_deposit_cashflow_grid_ds_id" bindTarget="csh_deposit_cashflow_grid_ds" marginHeight="200" marginWidth="80" navBar="true">
<!--<a:toolBar>
<a:button click="csh510_export" text="导出"/>
</a:toolBar>-->
<a:columns>
<a:column name="source_transaction_num" prompt="源单据编号" width="150" align="center"/>
<a:column name="transaction_amount" prompt="总额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="deposit_source_type" prompt="类型" width="110" align="center"/>
<a:column name="transaction_date" prompt="时间" align="center" renderer="Leaf.formatDate"/>
<a:column name="transaction_num" prompt="目标单据编号" width="150" align="center"/>
<a:column name="transaction_deposit_amount" prompt="分配金额" align="right" renderer="Leaf.formatMoney"/>
<a:column name="contract_number" prompt="合同编号" width="150" align="center"/>
</a:columns>
</a:grid>
</a:screenBody>
<script type="text/javascript"><![CDATA[
Leaf.onReady(init);
......
......@@ -134,14 +134,18 @@
para: {
transaction_id: record.get('transaction_id')
},
success: function () {
success: function (res) {
var return_id = res.result.return_id;
Leaf.Masker.unmask(Ext.getBody());
new Leaf.Window({
id: 'csh_transaction_deposit_link_winid',
params: {
return_id: return_id,
bp_bank_account_name: record.get('bp_bank_account_name'),
opposite_band_na: record.get('opposite_band_na'),
bp_bank_account_num: record.get('bp_bank_account_num'),
left_amount: record.get('left_amount'),
winId: 'csh_transaction_deposit_link_winid'
},
url: url,
......
......@@ -507,6 +507,7 @@
var test_ds_id2 = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_SPOUSE', 'hls_bp_master');
if (ds.id == f_bp_create_ds_id) {
debugger;
var hd_ds = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'F_BASIC', 'hls_bp_master');
record = $(hd_ds).getCurrentRecord();
if(record.get('bp_class')=='NP'){
......
......@@ -10,6 +10,7 @@
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ500D.sys_user_lv"
rootPath="user_name_path"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;0006&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
......@@ -342,6 +343,42 @@
}
}
function prj501n_upload_file_new(id, name, query_only) {
debugger;
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
/*if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY') {
if('${/model/role_flag_path/record/@sys_role_flag}' == 'Y') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}else{
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
} else {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}*/
if('${/model/role_flag_path/record/@sys_role_flag}' == 'Y') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}else{
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
}
function prj501n_bp_code_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
......@@ -388,10 +425,14 @@
//超链接渲染
window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
debugger;
var link_function = '';
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'prj501n_upload_file';
if(record.get('cdd_item') == 'ADD_ATTACH'){
link_function = 'prj501n_upload_file_new';
}
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attach_file_name') {
......
......@@ -10,6 +10,7 @@
<a:init-procedure>
<a:model-query defaultWhereClause="t1.user_id=${/session/@user_id}" model="prj.PRJ500D.sys_user_lv"
rootPath="user_name_path"/>
<a:model-query defaultWhereClause="v.role_id = ${/session/@role_id} and v.role_code in (&apos;0006&apos;)" model="zjwfl.sys_role_flag" rootPath="role_flag_path"/>
<s:server-script import="contract_print_path.js"><![CDATA[
$ctx.parameter.file_path = con_print_path['con_print_path'];
$ctx.parameter.tomcat_source = con_print_path['tomcat_source'];
......@@ -232,6 +233,43 @@
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
}
function prj501n_upload_file_new(id, name, query_only) {
debugger;
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
if (record.get('check_id')) {
var url;
/*if (query_only == 'Y' || '${/parameter/@function_usage}' == 'QUERY') {
if('${/model/role_flag_path/record/@sys_role_flag}' == 'Y') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}else{
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
} else {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}*/
if('${/model/role_flag_path/record/@sys_role_flag}' == 'Y') {
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_uploadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}else{
url = $('${/parameter/@layout_code}${/parameter/@pre_layout}prj500_cdd_downloadFile_id').getUrl() + '?table_name=PRJ_CDD_ITEM_CHECK&header_id=' + record.get('check_id');
}
var win = new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'prj500_cdd_uploadFile_screen_id',
width: 850,
height: 400
});
win.on('close', function () {
record.ds.query();
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
}
}
function prj501n_contract_number_renderer(id, name, query_only) {
var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
var param = {};
......@@ -265,6 +303,9 @@
window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
if (name == 'attachment') {
link_function = 'prj501n_upload_file';
if(record.get('cdd_item') == 'ADD_ATTACH'){
link_function = 'prj501n_upload_file_new';
}
return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
} else if (name == 'attach_file_name') {
......
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