Commit 0e970b3b authored by Darming's avatar Darming

Merge branch 'feature/write_off_ref' into develop

parents f85586df f8394798
......@@ -107,13 +107,14 @@
</bm:primary-key>
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<bm:data-filter name="query" expression="(t1.posted_flag in (&apos;N&apos;) and t1.transaction_type not in ('PAYMENT'))"/>
<bm:data-filter name="query" expression="(t1.transaction_type not in ('PAYMENT') and t1.reversed_flag = 'N')"/>
</bm:data-filters>
<bm:query-fields>
<bm:query-field field="confirmed_flag" queryExpression="t1.confirmed_flag =${@confirmed_flag}"/>
<bm:query-field field="write_off_flag" queryExpression="t1.write_off_flag =${@write_off_flag}"/>
<bm:query-field field="bp_bank_account_name" queryOperator="like"/>
<bm:query-field field="receipt_type" queryOperator="="/>
<bm:query-field name="confirmed" queryExpression="(${@confirmed} = 'Y' and t1.confirmed_flag not in ('NEW','CT_REJECTED'))"/>
<bm:query-field field="opposite_band_na" queryOperator="="/>
<bm:query-field name="transaction_num_from" queryExpression="t1.transaction_num &gt;= ${@transaction_num_from}"/>
<bm:query-field name="transaction_num_to" queryExpression="t1.transaction_num &lt;= ${@transaction_num_to}"/>
......@@ -133,7 +134,7 @@
<bm:query-field name="full_write_off_flag" queryExpression="t1.write_off_flag!=${@full_write_off_flag}"/>
<bm:query-field name="full_returned_flag" queryExpression="t1.returned_flag!=${@full_returned_flag}"/>
<bm:query-field name="not_write_off_flag" queryExpression="t1.write_off_flag!=${@not_write_off_flag}"/>
<bm:query-field name="not_reversed_flag_r" queryExpression="t1.reversed_flag!=${@not_reversed_flag_r}"/>
<!-- <bm:query-field name="not_reversed_flag_r" queryExpression="t1.reversed_flag!=${@not_reversed_flag_r}"/>-->
<bm:query-field name="bp_id_from" queryExpression="t1.bp_id&gt;=${@bp_id_from}"/>
<bm:query-field name="bp_id_to" queryExpression="t1.bp_id&lt;=${@bp_id_to}"/>
<bm:query-field field="write_off_flag" queryOperator="="/>
......
......@@ -52,6 +52,7 @@
t.transaction_amount,
t.collection_classes,
t.bp_id,
(select bp_name from hls_bp_master where bp_id = t.bp_id) bp_name,
t.paid_byother_flag,
t.csh_bank_account_id bank_account_id
......
......@@ -5,7 +5,7 @@
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="insert">
<bm:update-sql><![CDATA[
......
......@@ -5,7 +5,7 @@
<bm:query-sql><![CDATA[
select p.position_code, 'Y' approval_enbale
FROM exp_emp_user_e_v e, exp_org_position p where e.position_id = p.POSITION_ID and e.user_id = ${/session/@user_id}
and p.position_code in ('00321','00217') and p.ENABLED_FLAG = 'Y'
and p.position_code in ('00321','009') and p.ENABLED_FLAG = 'Y'
]]>
</bm:query-sql>
</bm:operation>
......
......@@ -169,7 +169,7 @@
<bm:data-filters>
<bm:data-filter name="query" expression="(t1.company_id=${/session/@company_id})"/>
<!-- <bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and t1.reversed_flag = 'N' and nvl(t1.deposit_flag,'N')='N' "/>-->
<bm:data-filter name="type" expression="t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and nvl(t1.deposit_flag,'N')='N' and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED') "/>
<bm:data-filter name="position_code" expression="(${@position_code} = '00217' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or (${@position_code} = '00321' and t1.bp_category != 'TENANT' and t1.paid_byother_flag != 'N') or (${/session/@user_id} = 1)" />
<bm:data-filter name="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT') and t1.returned_flag != 'FULL' and nvl(t1.deposit_flag,'N')='N' and t1.confirmed_flag in ('WF_APPROVING','ACCAUDITED','APPROVED','WF_REJECTED')) "/>
<bm:data-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or (${@position_code} = '00321' and t1.bp_category != 'TENANT') or (${@position_code} = '00321' and t1.paid_byother_flag != 'N') and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1))" />
</bm:data-filters>
</bm:model>
\ No newline at end of file
......@@ -667,7 +667,7 @@
<a:field name="transaction_amount_to"/>
<a:field name="posted_flag_display" displayField="code_value_name" options="posted_flag_ds"
returnField="posted_flag" valueField="code_value"/>
<a:field name="posted_flag" defaultValue="N"/>
<!-- <a:field name="posted_flag" defaultValue="N"/>-->
<a:field name="returned_flag_display" displayField="code_value_name" options="returned_flag_ds"
returnField="returned_flag" valueField="code_value"/>
<a:field name="reversed_flag_display" displayField="code_value_name" options="reversed_flag_ds"
......@@ -691,10 +691,11 @@
<a:field name="currency_name_from_display" displayField="currency_name" options="currency_ds"
returnField="currency_code_from" valueField="currency_code"/>
<a:field name="currency_code_from"/>
<a:field name="confirmed" defaultValue="Y"/>
<a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds"
returnField="currency_code_to" valueField="currency_code"/>
<a:field name="currency_code_to"/>
<a:field name="transaction_type" defaultValue="RECEIPT"/>
<!-- <a:field name="transaction_type" defaultValue="RECEIPT"/>-->
<a:field name="transaction_category" defaultValue="BUSINESS"/>
<a:field name="write_off_flag_desc" displayField="code_value_name" options="write_off_flag_ds"
returnField="write_off_flag" valueField="code_value"/>
......
......@@ -74,24 +74,28 @@
function csh511_receipt_save() {
var record=$('csh_transaction_receipt_head_ds').getAt(0);
Leaf.Masker.mask(Ext.getBody());
Leaf.request({
url: $('csh510_update_bp_info_link').getUrl(),
para: {
transaction_id: record.get('transaction_id'),
bp_id : record.get('bp_id'),
},
success: function(){
Leaf.SideBar.show({
msg: '操作成功',
duration: 2000
});
Leaf.Masker.unmask(Ext.getBody());
// $('csh510_update_bp_info_link').query();
$('csh_transaction_receipt_link_winid').close();
},
scope: this
});
// Leaf.Masker.mask(Ext.getBody());
// Leaf.request({
// url: $('csh510_update_bp_info_link').getUrl(),
// para: {
// transaction_id: record.get('transaction_id'),
// bp_id : record.get('bp_id'),
// },
// success: function(){
// Leaf.SideBar.show({
// msg: '操作成功',
// duration: 2000
// });
// Leaf.Masker.unmask(Ext.getBody());
// // $('csh510_update_bp_info_link').query();
// $('csh_transaction_receipt_link_winid').close();
// },
// scope: this
// });
$('csh511_receipt_save_id').disable();
$('csh_transaction_receipt_head_ds').submit();
$('csh511_receipt_save_id').enable();
$('csh_transaction_receipt_link_winid').close();
}
......@@ -422,7 +426,7 @@
<a:field name="bp_bank_account_num"/>
<a:field name="bp_bank_account_name" required="true"/>
<a:field name="bank_slip_num" required="true"/>
<a:field name="collection_classes_desc" required="true" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="collection_classes_desc" prompt="款项用途" required="true" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="paid_byother_flag_n" required="true" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/>
</a:fields>
<a:events>
......
......@@ -101,11 +101,11 @@
for(var i=0;i<datas.length;i=i+1) {
var confirmed_flag = datas[i].get('confirmed_flag');
var bp_name=datas[i].get('bp_name');
if(bp_name==''||bp_name==undefined){
$L.showInfoMessage("提示", '商业伙伴为空,不能提交', null, null);
$('csh510_csh_trx_bank_apply_new').enable();
return;
}
// if(bp_name==''||bp_name==undefined){
// $L.showInfoMessage("提示", '商业伙伴为空,不能提交', null, null);
// $('csh510_csh_trx_bank_apply_new').enable();
// return;
// }
//不是新增就报错
if (confirmed_flag != 'NEW' && confirmed_flag != undefined) {
$L.showInfoMessage("提示", '请选择单据为未提交的数据', null, null);
......@@ -131,7 +131,7 @@
success: function () {
unlock_current_window();
$('csh_transaction_receipt_maintain_result_ds').query();
Leaf.showMessage('${l:PROMPT}', '修改成功!');
Leaf.showMessage('${l:PROMPT}', '提交成功!');
//启用按钮
$('csh510_csh_trx_bank_apply_new').enable();
}, failure: function () {
......@@ -165,6 +165,7 @@
}).on('close', function() {
//按钮启用
$('csh510_csh_trx_bank_hand_add').enable();
$('csh_transaction_receipt_maintain_result_ds').query();
});
}
......@@ -262,7 +263,7 @@
}
function openWindow(url) {
new Leaf.Window({
var win = new Leaf.Window({
id: 'csh_transaction_receipt_link_winid',
params: {
winId: 'csh_transaction_receipt_link_winid'
......@@ -271,6 +272,9 @@
title: '${l:CSH510.CSH_RECEIPT_UPDATE}',
fullScreen: true
});
win.on('close',function(){
$('csh_transaction_receipt_maintain_result_ds').query();
});
}
function construct_from_to() {
......@@ -614,7 +618,7 @@
<a:field name="transaction_amount_from"/>
<a:field name="transaction_amount_to"/>
<a:field name="posted_flag_display" displayField="code_value_name" options="posted_flag_ds" returnField="posted_flag" valueField="code_value"/>
<a:field name="posted_flag" defaultValue="N"/>
<!-- <a:field name="posted_flag" defaultValue="N"/>-->
<a:field name="returned_flag_display" displayField="code_value_name" options="returned_flag_ds" returnField="returned_flag" valueField="code_value"/>
<a:field name="reversed_flag_display" displayField="code_value_name" options="reversed_flag_ds" returnField="reversed_flag" valueField="code_value"/>
<a:field name="period_name" lovGridHeight="300" lovHeight="500" lovService="gld.gld_period_lov" lovWidth="500" title="GLD_PERIODS.PERIOD_NAME">
......@@ -633,7 +637,7 @@
<a:field name="currency_code_from"/>
<a:field name="currency_name_to_display" displayField="currency_name" options="currency_ds" returnField="currency_code_to" valueField="currency_code"/>
<a:field name="currency_code_to"/>
<a:field name="transaction_type" defaultValue="RECEIPT"/>
<!-- <a:field name="transaction_type" defaultValue="RECEIPT"/>-->
<a:field name="transaction_category" defaultValue="BUSINESS"/>
<!-- <a:field name="write_off_flag_desc" displayField="code_value_name" options="write_off_flag_ds" returnField="write_off_flag" valueField="code_value"/>-->
<a:field name="not_reversed_flag_r" defaultValue="NOT"/>
......@@ -690,7 +694,7 @@
<a:gridButton click="csh510_csh_trx_bank_import" text="CSH510.CSH_TRANSACTION.RECEIVE_MONEY_IMPORT_BTN" id="csh510_csh_trx_bank_import"/>
<a:gridButton click="csh510_csh_trx_bank_hand_add" text="CSH510.CSH_TRANSACTION.MONEY_HAND_ADD_BTN" id="csh510_csh_trx_bank_hand_add"/>
<a:gridButton click="csh510_receipt_remove" text="收款取消"/>
<!-- <a:gridButton click="csh510_csh_trx_bank_apply_new" text="提交复核" id="csh510_csh_trx_bank_apply_new"/>-->
<a:gridButton click="csh510_csh_trx_bank_apply_new" text="提交复核" id="csh510_csh_trx_bank_apply_new"/>
<!-- <a:gridButton click="csh510_csh_trx_bank_drop" text="CSH510.CSH_TRANSACTION.DROP_BTN" id="csh510_csh_trx_bank_drop"/>-->
<a:gridButton click="csh510_receipt_reset" text="HLS.RESET"/>
<!-- <a:gridButton click="csh510_csh_transaction_batch_update" text="批量过账"/>-->
......
......@@ -150,13 +150,13 @@
<a:fields>
<a:field name="error_message" readOnly="true"/>
<a:field name="attribute_4" readOnly="true"/>
<a:field name="paid_byother_flag_desc" options="paid_byother_flag_ds"
<a:field name="paid_byother_flag_desc" required="true" options="paid_byother_flag_ds"
returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value"/>
<a:field name="paid_byother_flag" required="true"/>
<a:field name="collection_classes_desc" options="collection_classes_ds"
<a:field name="collection_classes_desc" required="true" options="collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="collection_classes"/>
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovLabelWidth="90" required="true"
<a:field name="bp_name" lovGridHeight="350" lovHeight="500" lovLabelWidth="90"
lovService="basic.hls_bp_master_v_for_lov" lovWidth="550" title="HLS.BP_TITLE">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
......
......@@ -337,14 +337,19 @@
var record = ds.findById(id);
var bp_category = record.get('bp_category');
var transaction_type = record.get('transaction_type');
var confirmed_flag = record.get('confirmed_flag');
var depositDisplayFlag = 'N';
var advanceDisplayFlag = 'N';
var interfaceQueryFlag = 'N';
if (bp_category == 'AGENT') {
depositDisplayFlag = 'Y';
}
if (transaction_type != 'ADVANCE_RECEIPT'){
advanceDisplayFlag = 'Y';
}
if (confirmed_flag == 'WF_APPROVING'){
interfaceQueryFlag = 'Y';
}
var approval_flag = '${/model/result_position/record/@approval_enbale}' || 'N';
var win = new Leaf.Window({
id: 'csh_write_off_window',
......@@ -361,6 +366,7 @@
bp_id: record.get('bp_id'),
advanceDisplayFlag: advanceDisplayFlag,
readOnly: readOnly,
interfaceQueryFlag: interfaceQueryFlag,
approval_flag: approval_flag,
winid: 'csh_write_off_window'
},
......@@ -378,7 +384,7 @@
var text = '';
var status = record.get('confirmed_flag');
var write_off_flag = record.get('write_off_flag');
var readOnly = 'N';
var readOnly = 'Y';
if ((status == 'WF_APPROVING' || status == 'WF_APPROVED') && write_off_flag != 'FULL') {
readOnly = 'Y';
}
......@@ -449,9 +455,10 @@
var record = $('csh531n_sap_bankflow_info_result_ds').getSelected()[0];
if (record) {
var write_off_flag = record.get('write_off_flag');
var readOnly = 'Y';
if (write_off_flag == 'NOT') {
readOnly = 'N';
var status = record.get('confirmed_flag');
var readOnly = 'N';
if ((status == 'WF_APPROVING' || status == 'WF_APPROVED') && write_off_flag != 'FULL') {
readOnly = 'Y';
}
csh531n_open_write_off_detail(record.id, readOnly);
} else {
......@@ -512,7 +519,6 @@
returnField="status" valueField="code_value"/>
<a:field name="collection_classes_desc" options="csh531n_ds_collection_classes_ds"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="transaction_type"/>
<a:field name="transaction_type_desc" options="csh_transaction_type_ds"
returnField="transaction_type" valueField="code_value" displayField="code_value_name"
defaultValue="收款"/>
......
......@@ -44,13 +44,25 @@
$('csh_write_off_grid').hideColumn('left_principal');
$('csh_write_off_grid').hideColumn('left_interest');
$('csh_write_off_grid').hideColumn('unreceived_amount');
$('csh_write_off_interface_ds').setQueryUrl('${/request/@context_path}/autocrud/csh.CSH531N.csh_write_off/query?transaction_id=${/parameter/@transaction_id}');
$('csh_write_off_interface_ds').query();
if ('${/parameter/@interfaceQueryFlag}' == 'N') {
$('csh_write_off_interface_ds').setQueryUrl('${/request/@context_path}/autocrud/csh.CSH531N.csh_write_off/query?transaction_id=${/parameter/@transaction_id}');
$('csh_write_off_interface_ds').query();
}else{
if ('${/parameter/@approval_flag}' == 'Y') {
$('csh531n_write_off_btn_id').setVisible(true);
} else {
$('csh531n_write_off_submit_btn_id').setVisible(true);
}
}
} else {
if ('${/parameter/@approval_flag}' == 'Y') {
$('csh531n_write_off_btn_id').setVisible(true);
} else {
$('csh531n_write_off_submit_btn_id').setVisible(true);
if ('${/parameter/@interfaceQueryFlag}' == 'Y') {
if ('${/parameter/@approval_flag}' == 'Y') {
$('csh531n_write_off_btn_id').setVisible(true);
} else {
$('csh531n_write_off_submit_btn_id').setVisible(true);
}
}
$('csh511_save_all_id').setVisible(true);
}
......@@ -91,13 +103,13 @@
return 'csh_write_off_grid_nf';
}
if (name == 'write_off_date' || name == 'journal_date') {
if(write_off_type == 'RECEIPT_CREDIT'){
if (write_off_type == 'RECEIPT_CREDIT') {
return 'csh_write_off_grid_dp';
}
if(write_off_type == 'RECEIPT_ADVANCE_RECEIPT'){
if (write_off_type == 'RECEIPT_ADVANCE_RECEIPT') {
return 'csh_transaction_advanced_grid_dp';
}
if(write_off_type == 'RECEIPT_DEPOSIT_POOL'){
if (write_off_type == 'RECEIPT_DEPOSIT_POOL') {
return 'csh_transaction_deposit_grid_dp';
}
}
......
......@@ -123,7 +123,7 @@
</a:form>
<a:hBox>
<a:vBox>
<a:grid bindTarget="csh_lov_con_contract_ds" width="450" id="csh_con_contract_ds" marginHeight="360"
<a:grid bindTarget="csh_lov_con_contract_ds" width="450" id="csh_con_contract_ds" marginHeight="120"
navBar="true">
<a:columns>
<a:column name="contract_number" align="center" prompt="HLS.CONTRACT_NUMBER" width="120"/>
......@@ -133,7 +133,7 @@
</a:grid>
</a:vBox>
<a:vBox>
<a:grid bindTarget="csh_write_off_lov_ds" marginHeight="360" id="csh_con_contract_cashflow_ds"
<a:grid bindTarget="csh_write_off_lov_ds" marginHeight="120" id="csh_con_contract_cashflow_ds"
width="800" navBar="true">
<a:columns>
<a:column name="times" prompt="HLS.TIMES" align="center" width="60"/>
......
......@@ -328,14 +328,14 @@
msg: '已提交请求',
duration: 3000
});
unlock_current_window();
lock_current_window2();
$('hls_journal_header_result_ds').query();
},
failure: function() {
unlock_current_window();
lock_current_window2();
},
error: function() {
unlock_current_window();
lock_current_window2();
},
scope: this
});
......
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