Commit 8d3d72de authored by Darming's avatar Darming

[fix]bugs

parent 503dbb91
...@@ -10,10 +10,11 @@ ...@@ -10,10 +10,11 @@
contract_id, contract_id,
to_char(due_date,'yyyy-mm-dd') due_date, to_char(due_date,'yyyy-mm-dd') due_date,
due_amount, due_amount,
principal,
interest,
principal - nvl(received_principal,0) unreceived_principal, principal - nvl(received_principal,0) unreceived_principal,
interest - nvl(received_interest,0) unreceived_interest, interest - nvl(received_interest,0) unreceived_interest,
due_amount - nvl(received_amount,0) unreceived_amount, due_amount - nvl(received_amount,0) unreceived_amount
decode(cf_item,1,due_amount-nvl(received_amount,0)) unreceived_rental
from con_contract_cashflow t from con_contract_cashflow t
#WHERE_CLAUSE# #WHERE_CLAUSE#
order by times, due_date order by times, due_date
...@@ -24,6 +25,8 @@ ...@@ -24,6 +25,8 @@
<bm:field name="contract_id"/> <bm:field name="contract_id"/>
<bm:field name="cashflow_id"/> <bm:field name="cashflow_id"/>
<bm:field name="times"/> <bm:field name="times"/>
<bm:field name="principal"/>
<bm:field name="interest"/>
<bm:field name="cf_item"/> <bm:field name="cf_item"/>
<bm:field name="cf_item_desc"/> <bm:field name="cf_item_desc"/>
<bm:field name="due_date"/> <bm:field name="due_date"/>
...@@ -31,7 +34,6 @@ ...@@ -31,7 +34,6 @@
<bm:field name="unreceived_principal"/> <bm:field name="unreceived_principal"/>
<bm:field name="unreceived_interest"/> <bm:field name="unreceived_interest"/>
<bm:field name="unreceived_amount"/> <bm:field name="unreceived_amount"/>
<bm:field name="unreceived_rental"/>
</bm:fields> </bm:fields>
<bm:query-fields> <bm:query-fields>
<bm:query-field name="contract_id" queryExpression="t.contract_id = ${@contract_id}"/> <bm:query-field name="contract_id" queryExpression="t.contract_id = ${@contract_id}"/>
......
...@@ -17,4 +17,7 @@ ...@@ -17,4 +17,7 @@
<bm:features> <bm:features>
<f:standard-who xmlns:f="leaf.database.features"/> <f:standard-who xmlns:f="leaf.database.features"/>
</bm:features> </bm:features>
<bm:query-fields>
<bm:query-field name="write_off_cf_item" queryExpression="(${@write_off_cf_item} = 'Y' and cf_item in (1,2,8,9,200,250))"/>
</bm:query-fields>
</bm:model> </bm:model>
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
</bm:operation> </bm:operation>
</bm:operations> </bm:operations>
<bm:fields> <bm:fields>
<bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" forDisplay="true" forQuery="true" physicalName="BP_ID" prompt="用户ID"/> <bm:field name="bp_id" databaseType="NUMBER" datatype="java.lang.Long" forDisplay="false" forQuery="false" physicalName="BP_ID" prompt="用户ID"/>
<bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="BP_NAME" prompt="户名称"/> <bm:field name="bp_name" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="BP_NAME" prompt="户名称"/>
<bm:field name="id_card_no" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" physicalName="ID_CARD_NO" prompt="身份证号"/> <bm:field name="id_card_no" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" physicalName="ID_CARD_NO" prompt="身份证号"/>
</bm:fields> </bm:fields>
<bm:query-fields > <bm:query-fields >
......
...@@ -13,7 +13,30 @@ ...@@ -13,7 +13,30 @@
} }
function griddbclick(grid, record, row, name) { function griddbclick(grid, record, row, name) {
$('${/parameter/@lovid}').commit(record); var ds = $('csh_write_off_interface_ds');
var con_rec = $('csh_lov_con_contract_ds').getCurrentRecord();
var rec = ds.getCurrentRecord();
rec.set('contract_id', con_rec.get('contract_id'));
rec.set('contract_number', con_rec.get('contract_number'));
rec.set('bp_tenant_name', con_rec.get('bp_name'));
rec.set('write_off_bp_name', con_rec.get('bp_name'));
rec.set('write_off_bp_id', con_rec.get('bp_id_tenant'));
rec.set('bp_id_tenant', con_rec.get('bp_id_tenant'));
rec.set('write_off_cf_item_desc', record.get('cf_item_desc'));
rec.set('write_off_cashflow_id', record.get('cashflow_id'));
rec.set('write_off_cf_item', record.get('cf_item'));
rec.set('write_off_times', record.get('times'));
rec.set('left_principal', record.get('unreceived_principal'));
rec.set('left_interest', record.get('unreceived_interest'));
rec.set('left_amount', record.get('unreceived_amount'));
rec.set('due_amount', record.get('due_amount'));
rec.set('principal', record.get('principal'));
rec.set('interest', record.get('interest'));
rec.set('due_date', record.get('due_date'));
rec.set('write_off_principal', record.get('unreceived_principal'));
rec.set('write_off_interest', record.get('unreceived_interest'));
rec.set('unreceived_amount', record.get('unreceived_amount'));
$('${/parameter/@lovid}').win.close();
} }
function csh_write_off_confirmed() { function csh_write_off_confirmed() {
...@@ -37,28 +60,35 @@ ...@@ -37,28 +60,35 @@
rec.set('write_off_times', cf_recs[0].get('times')); rec.set('write_off_times', cf_recs[0].get('times'));
rec.set('left_principal', cf_recs[0].get('unreceived_principal')); rec.set('left_principal', cf_recs[0].get('unreceived_principal'));
rec.set('left_interest', cf_recs[0].get('unreceived_interest')); rec.set('left_interest', cf_recs[0].get('unreceived_interest'));
rec.set('left_amount', cf_recs[0].get('unreceived_rental')); rec.set('left_amount', cf_recs[0].get('unreceived_amount'));
rec.set('due_amount', cf_recs[0].get('due_amount'));
rec.set('principal', cf_recs[0].get('principal'));
rec.set('interest', cf_recs[0].get('interest'));
rec.set('due_date', cf_recs[0].get('due_date'));
rec.set('write_off_principal', cf_recs[0].get('unreceived_principal')); rec.set('write_off_principal', cf_recs[0].get('unreceived_principal'));
rec.set('write_off_interest', cf_recs[0].get('unreceived_interest')); rec.set('write_off_interest', cf_recs[0].get('unreceived_interest'));
rec.set('unreceived_amount', cf_recs[0].get('unreceived_amount')); rec.set('unreceived_amount', cf_recs[0].get('unreceived_amount'));
rec.set('write_off_amount',cf_recs[0].get('unreceived_amount')); // rec.set('write_off_amount', cf_recs[0].get('unreceived_amount'));
for (var i = 1; i < cf_recs.length; i++) { for (var i = 1; i < cf_recs.length; i++) {
//copy... //copy...
debugger;
var newRecord = new Leaf.Record({...rec.data}); var newRecord = new Leaf.Record({...rec.data});
newRecord.ds = rec.ds; newRecord.ds = rec.ds;
newRecord.set('write_off_cf_item_desc', cf_recs[i].get('cf_item_desc')); newRecord.set('write_off_cf_item_desc', cf_recs[i].get('cf_item_desc'));
newRecord.set('write_off_cf_item', cf_recs[i].get('cf_item')); newRecord.set('write_off_cf_item', cf_recs[i].get('cf_item'));
newRecord.set('write_off_times', cf_recs[i].get('times')); newRecord.set('write_off_times', cf_recs[i].get('times'));
newRecord.set('write_off_cashflow_id',cf_recs[i].get('cashflow_id')); newRecord.set('due_date', cf_recs[i].get('due_date'));
newRecord.set('write_off_cashflow_id', cf_recs[i].get('cashflow_id'));
newRecord.set('unreceived_amount', cf_recs[i].get('unreceived_amount')); newRecord.set('unreceived_amount', cf_recs[i].get('unreceived_amount'));
newRecord.set('interest', cf_recs[i].get('interest'));
newRecord.set('principal', cf_recs[i].get('principal'));
newRecord.set('due_amount', cf_recs[i].get('due_amount'));
newRecord.set('left_principal', cf_recs[i].get('unreceived_principal')); newRecord.set('left_principal', cf_recs[i].get('unreceived_principal'));
newRecord.set('left_interest', cf_recs[i].get('unreceived_interest')); newRecord.set('left_interest', cf_recs[i].get('unreceived_interest'));
newRecord.set('left_amount', cf_recs[i].get('unreceived_rental')); newRecord.set('left_amount', cf_recs[i].get('unreceived_amount'));
newRecord.set('write_off_principal', cf_recs[i].get('unreceived_principal')); newRecord.set('write_off_principal', cf_recs[i].get('unreceived_principal'));
newRecord.set('write_off_interest', cf_recs[i].get('unreceived_interest')); newRecord.set('write_off_interest', cf_recs[i].get('unreceived_interest'));
newRecord.set('write_off_amount',cf_recs[i].get('unreceived_amount')); // newRecord.set('write_off_amount', cf_recs[i].get('unreceived_amount'));
ds.add(newRecord); ds.add(newRecord);
} }
...@@ -79,11 +109,12 @@ ...@@ -79,11 +109,12 @@
]]></script> ]]></script>
<a:dataSets> <a:dataSets>
<a:dataSet id="csh_lov_cf_item_ds" autoQuery="true" model="csh.CSH531N.hls_cashflow_item_v"/> <a:dataSet id="csh_lov_cf_item_ds" autoQuery="true" model="csh.CSH531N.hls_cashflow_item_v"
queryUrl="${/request/@context_path}/autocrud/csh.CSH531N.hls_cashflow_item_v/query?write_off_cf_item=Y"/>
<a:dataSet id="csh_query_con_ds" autoCreate="true"> <a:dataSet id="csh_query_con_ds" autoCreate="true">
<a:fields> <a:fields>
<a:field name="contract_number"/> <a:field name="contract_number"/>
<!-- <a:field name="bp_name"/>--> <a:field name="bp_name"/>
<a:field name="bp_id" defaultValue="${/parameter/@bp_id}"/> <a:field name="bp_id" defaultValue="${/parameter/@bp_id}"/>
</a:fields> </a:fields>
</a:dataSet> </a:dataSet>
...@@ -117,10 +148,10 @@ ...@@ -117,10 +148,10 @@
</a:screenTopToolbar> </a:screenTopToolbar>
<a:form column="5" labelWidth="180" width="1100" title="HLS.QUERY_TITLE"> <a:form column="5" labelWidth="180" width="1100" title="HLS.QUERY_TITLE">
<a:textField name="contract_number" bindTarget="csh_query_con_ds" prompt="HLS.CONTRACT_NUMBER"/> <a:textField name="contract_number" bindTarget="csh_query_con_ds" prompt="HLS.CONTRACT_NUMBER"/>
<!-- <a:textField name="bp_name" bindTarget="csh_query_con_ds" prompt="客户名"/>--> <a:textField name="bp_name" bindTarget="csh_query_con_ds" prompt="客户名"/>
<a:datePicker name="due_date_from" bindTarget="csh_query_cf_ds" prompt="CSH531.DATE_FROM"/> <a:comboBox name="cf_item_desc" bindTarget="csh_query_cf_ds" prompt="CSH531.CF_ITEM"/>
<a:datePicker name="due_date_to" bindTarget="csh_query_cf_ds" prompt="CSH531.DATE_TO"/> <a:datePicker name="due_date_from" bindTarget="csh_query_cf_ds" prompt="支付日从"/>
<!-- <a:comboBox name="cf_item_desc" bindTarget="csh_query_cf_ds" prompt="CSH531.CF_ITEM"/>--> <a:datePicker name="due_date_to" bindTarget="csh_query_cf_ds" prompt="支付日到"/>
</a:form> </a:form>
<a:hBox> <a:hBox>
<a:vBox> <a:vBox>
...@@ -139,21 +170,23 @@ ...@@ -139,21 +170,23 @@
<a:columns> <a:columns>
<a:column name="times" prompt="HLS.TIMES" align="center" width="60"/> <a:column name="times" prompt="HLS.TIMES" align="center" width="60"/>
<a:column name="cf_item_desc" prompt="HLS.CF_ITEM_DESC" align="center" width="80"/> <a:column name="cf_item_desc" prompt="HLS.CF_ITEM_DESC" align="center" width="80"/>
<a:column name="due_date" prompt="还款日" renderer="Leaf.formatDate" width="80" align="center"/> <a:column name="due_date" prompt="支付日" renderer="Leaf.formatDate" width="80"
<a:column name="due_amount" align="right" prompt="应还金额" renderer="Leaf.formatMoney" align="center"/>
width="120"/> <a:column name="due_amount" align="right" prompt="应收金额" renderer="Leaf.formatMoney"
<a:column prompt="营业"> width="110"/>
<a:column name="principal" align="right" prompt="应收本金" renderer="Leaf.formatMoney"
width="110"/>
<a:column name="interest" align="right" prompt="应收利息" renderer="Leaf.formatMoney" width="110"/> <!-- <a:column prompt="营业">-->
<a:column name="unreceived_amount" prompt="未收金额" align="right"
renderer="Leaf.formatMoney" width="110"/>
<a:column name="unreceived_principal" prompt="未收本金" align="right" <a:column name="unreceived_principal" prompt="未收本金" align="right"
renderer="Leaf.formatMoney" width="120"/> renderer="Leaf.formatMoney" width="110"/>
<a:column name="unreceived_interest" prompt="未收利息" align="right" <a:column name="unreceived_interest" prompt="未收利息" align="right"
renderer="Leaf.formatMoney" width="120"/> renderer="Leaf.formatMoney" width="110"/>
<a:column name="unreceived_rental" prompt="未收租金" align="right"
renderer="Leaf.formatMoney" width="120"/>
</a:column>
</a:columns> </a:columns>
<!-- <a:events>--> <a:events>
<!-- <a:event name="dblclick" handler="griddbclick"/>--> <a:event name="dblclick" handler="griddbclick"/>
<!-- </a:events>--> </a:events>
</a:grid> </a:grid>
</a:vBox> </a:vBox>
</a:hBox> </a:hBox>
......
...@@ -215,14 +215,16 @@ ...@@ -215,14 +215,16 @@
<a:field name="session_id" defaultValue="${/session/@session_id}"/> <a:field name="session_id" defaultValue="${/session/@session_id}"/>
<a:field name="deadline_date" required="true"/> <a:field name="deadline_date" required="true"/>
<a:field name="deadline_date_to" required="true"/> <a:field name="deadline_date_to" required="true"/>
<a:field name="currency_name" displayField="currency_name" options="hls_currency_ds" required="true" returnField="currency_code" valueField="currency_code"/> <a:field name="currency_code" defaultValue="CNY"/>
<a:field name="currency_name" readOnly="true" defaultValue="人民币" displayField="currency_name" options="hls_currency_ds" required="true" returnField="currency_code" valueField="currency_code"/>
<a:field name="payment_method_display" displayField="code_value_name" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/> <a:field name="payment_method_display" displayField="code_value_name" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/>
<!-- <a:field name="payment_method_display" defaultValue="ABC" displayField="code_value_name" readOnly="true" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/> --> <!-- <a:field name="payment_method_display" defaultValue="ABC" displayField="code_value_name" readOnly="true" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/> -->
<!-- <a:field name="payment_method_display_n" defaultValue="农行代扣" displayField="code_value_name" readOnly="true" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/> --> <!-- <a:field name="payment_method_display_n" defaultValue="农行代扣" displayField="code_value_name" readOnly="true" options="hls_acr_payment_method_ds" required="true" returnField="payment_method" valueField="code_value"/> -->
<a:field name="customer_type_display" displayField="code_value_name" options="hls_customer_type_ds" required="true" returnField="customer_type" valueField="code_value"/> <a:field name="customer_type_display" displayField="code_value_name" options="hls_customer_type_ds" required="true" returnField="customer_type" valueField="code_value"/>
<a:field name="customer_name_display" lovGridHeight="300" lovHeight="450" lovWidth="550" readOnly="true"/> <a:field name="customer_name_display" lovGridHeight="300" lovHeight="450" lovWidth="550" readOnly="true"/>
<a:field name="limit_amount" validator="amountValidator"/> <a:field name="limit_amount" validator="amountValidator"/>
<a:field name="generate_rules_display" displayField="code_value_name" options="hls_generate_rules_ds" required="true" returnField="generate_rules" valueField="code_value"/> <a:field name="generate_rules_display" readOnly="true" defaultValue="汇总" displayField="code_value_name" options="hls_generate_rules_ds" required="true" returnField="generate_rules" valueField="code_value"/>
<a:field name="generate_rules" defaultValue="N"/>
<a:field name="contract_number"/> <a:field name="contract_number"/>
</a:fields> </a:fields>
<a:events> <a:events>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
if (document.getElementById('importFile').value){ if (document.getElementById('importFile').value){
var fileName = document.getElementById('importFile').value; var fileName = document.getElementById('importFile').value;
var fileType = fileName.substr(fileName.lastIndexOf(".")); var fileType = fileName.substr(fileName.lastIndexOf("."));
if (fileType != '.xls' && fileType != '.xlsx'){ if (fileType != '.xls' && fileType != '.xlsx' && fileType != '.csv'){
Leaf.showErrorMessage('错误','导入文件非Excel,请重新选择文件!'); Leaf.showErrorMessage('错误','导入文件非Excel,请重新选择文件!');
} else { } else {
document.getElementById('importForm').submit(); document.getElementById('importForm').submit();
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
<a:link id="hls_acr_ebank_enter_link" url="${/request/@context_path}/modules/hls_acr/HLS_ACR5040/hls_acr_ebank_input.lview"/> <a:link id="hls_acr_ebank_enter_link" url="${/request/@context_path}/modules/hls_acr/HLS_ACR5040/hls_acr_ebank_input.lview"/>
<script><![CDATA[ <script><![CDATA[
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
debugger;
var payment_method = '${/parameter/@payment_method}'; var payment_method = '${/parameter/@payment_method}';
var title = ''; var title = '';
if (payment_method == 'ABC'){ if (payment_method == 'ABC'){
...@@ -36,7 +35,10 @@ ...@@ -36,7 +35,10 @@
title: title, title: title,
width: 420, width: 420,
height: 275 height: 275
}).on('close', function() {}); }).on('close', function() {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_acr_ebank_output_ln_temp');
$(ds_id).query();
});
}; };
window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
window['${/parameter/@layout_code}_lock_layout_dynamic_window'](); window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
...@@ -63,8 +65,10 @@ ...@@ -63,8 +65,10 @@
}); });
}; };
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
window.location.href = $('hls_acr_ebank_enter_link').getUrl()+ '?layout_code=' + 'HLS_ACR5030_HEADER' + '&function_code=HLS_ACR5040'; // window.location.href = $('hls_acr_ebank_enter_link').getUrl()+ '?layout_code=' + 'HLS_ACR5030_HEADER' + '&function_code=HLS_ACR5040';
$('${/parameter/@winid}').close();
}; };
window['${/parameter/@layout_code}_upload_layout_dynamic_click'] = function() { window['${/parameter/@layout_code}_upload_layout_dynamic_click'] = function() {
var p_sourcetype = 'hls_acr_ebank_input'; var p_sourcetype = 'hls_acr_ebank_input';
var p_pkvalue = '${/session/@session_id}'; var p_pkvalue = '${/session/@session_id}';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment