Commit f8394798 authored by Darming's avatar Darming

[refactor] 核销改造

parent c909673e
......@@ -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"/>
......
......@@ -7,54 +7,60 @@
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
<a:init-procedure>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true"
model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
<a:model-query fetchAll="true" model="gld.gld_currency_vl" rootPath="currency"/>
<a:model-query fetchAll="true" model="gld.gld_exchangerate_type_lov" rootPath="exchangerate_type_path"/>
<a:model-query fetchAll="true" model="csh.CSH511.fnd_financial_option" rootPath="fnd_financial_option_path"/>
<a:model-query fetchAll="true" model="csh.CSH511.csh_transaction_default_exchange_rate_type" rootPath="default_exchange_rate_type_path"/>
<a:model-query fetchAll="true" model="csh.CSH511.csh_transaction_default_exchange_rate_type"
rootPath="default_exchange_rate_type_path"/>
</a:init-procedure>
<a:view>
<a:link id="hn2050_upload_win_link" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="csh_receipt_import_link" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt_impiort.lview"/>
<a:link id="csh_transaction_receipt_id" url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="get_exchange_rate_link_id" model="csh.CSH511.csh_transaction_get_exchange_rate" modelaction="query"/>
<a:link id="csh_receipt_import_link"
url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt_impiort.lview"/>
<a:link id="csh_transaction_receipt_id"
url="${/request/@context_path}/modules/csh/CSH511/csh_transaction_receipt.lview"/>
<a:link id="get_exchange_rate_link_id" model="csh.CSH511.csh_transaction_get_exchange_rate"
modelaction="query"/>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
<script type="text/javascript"><![CDATA[
var transaction_id='';
var transaction_id = '';
//附件上传
function upload_attachment_win() {
/* console.log(transaction_id)*/
var flag=true;
if(transaction_id==''){
$L.showInfoMessage("提示",'请先保存数据',null,null);
flag=false;
var flag = true;
if (transaction_id == '') {
$L.showInfoMessage("提示", '请先保存数据', null, null);
flag = false;
return;
}
//防止并发
if(flag){
var win = new Leaf.Window({
id: 'hn2050_upload_win',
url: $('hn2050_upload_win_link').getUrl(),
params: {
winid: 'hn2050_upload_win',
table_name: 'csh_transaction',
header_id: transaction_id
},
width: 900,
hight: 400
}).on('close', function() {
//record.ds.query();
});
}
if (flag) {
var win = new Leaf.Window({
id: 'hn2050_upload_win',
url: $('hn2050_upload_win_link').getUrl(),
params: {
winid: 'hn2050_upload_win',
table_name: 'csh_transaction',
header_id: transaction_id
},
width: 900,
hight: 400
}).on('close', function () {
//record.ds.query();
});
}
}
<!--增加重置功能-->
function csh511_receipt_reset(){
function csh511_receipt_reset() {
$('csh_transaction_receipt_head_ds').reset();
}
function csh511_receipt_import_and_write_off() {
new Leaf.Window({
url: $('csh_receipt_import_link').getUrl(),
......@@ -110,6 +116,7 @@
// window.location.href = $('csh_transaction_receipt_id').getUrl();
$('csh511_receipt_save').enable();
Leaf.Masker.unmask(Ext.getBody());
$('csh_trx_receipt_id').close();
},
failure: function () {
$('csh511_receipt_save').enable();
......@@ -121,7 +128,7 @@
},
scope: this
});
}else{
} else {
$('csh511_receipt_save').enable();
}
}
......@@ -169,7 +176,7 @@
record.set('exchange_rate_type', '${/model/fnd_financial_option_path/record/@default_exchange_rate_type}');
record.set('rate_method_code', '${/model/fnd_financial_option_path/record/@rate_method_code}');
record.set('exchange_rate_type_display', '${/model/fnd_financial_option_path/record/@exchange_rate_type_display}');
// record.getField('exchange_rate_type_display').setRequired(true);
// record.getField('exchange_rate_type_display').setRequired(true);
record.getField('exchange_rate_type_display').setReadOnly(false);
}
} else if (name == 'rate_method_code' || name == 'period_name') {
......@@ -220,6 +227,31 @@
if (record.get('zero_amounts_allowed') == 'N' && record.get('transaction_amount') === 0) {
Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
}
} else if (name == 'collection_classes') {
if (value == 'DEPOSIT') {
record.set('paid_byother_flag', 'F');
record.set('paid_byother_flag_n', '否');
record.set('transaction_type', 'DEPOSIT');
record.set('deposit_flag', 'Y');
record.getField('paid_byother_flag_n').setReadOnly(true);
} else {
record.getField('paid_byother_flag_n').setReadOnly(false);
}
} else if (name == 'paid_byother_flag') {
if (value == 'T') {
//代付非保证金类 --> 直接从银行过账到预收科目
if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT');
} else {
record.set('transaction_type', 'ADVANCE_RECEIPT');
}
} else if (value == 'F') {
if (record.get('collection_classes') == 'DEPOSIT') {
record.set('transaction_type', 'DEPOSIT');
} else {
record.set('transaction_type', 'RECEIPT');
}
}
}
}
......@@ -347,17 +379,18 @@
]]></script>
<a:dataSets>
<a:dataSet id="PAID_BYOTHER_FLAG_DS" lookupCode="PAID_BYOTHER_FLAG"/>
<!-- <a:dataSet id="payment_method_ds">
<a:datas dataSource="/model/payment_method_path"/>
</a:dataSet>-->
<!-- <a:dataSet id="payment_method_ds">
<a:datas dataSource="/model/payment_method_path"/>
</a:dataSet>-->
<!--<a:dataSet id="currency_ds">
<a:datas dataSource="/model/currency"/>
</a:dataSet>-->
<a:dataSet id="exchangerate_type_ds">
<a:datas dataSource="/model/exchangerate_type_path"/>
</a:dataSet>
<!-- <a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>-->
<a:dataSet id="csh_transaction_receipt_head_ds" autoCreate="true" loadData="true" model="csh.CSH511.csh_transaction">
<!-- <a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>-->
<a:dataSet id="csh_transaction_receipt_head_ds" autoCreate="true" loadData="true"
model="csh.CSH511.csh_transaction">
<a:fields>
<a:field name="transaction_date" required="true"/>
<a:field name="bank_slip_num" required="true"/>
......@@ -368,15 +401,18 @@
</a:field>-->
<!--<a:field name="internal_period_num"/>-->
<!--<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>-->
<a:field name="currency_name" displayField="currency_name" options="currency_ds" readOnly="true" required="true" returnField="currency_code" valueField="currency_code">
<a:field name="currency_name" displayField="currency_name" options="currency_ds" readOnly="true"
required="true" returnField="currency_code" valueField="currency_code">
<a:mapping>
<a:map from="precision" to="precision"/>
</a:mapping>
</a:field>
<a:field name="currency_code"/>
<a:field name="precision"/>
<a:field name="functional_currency_code" defaultValue="${/model/default_exchange_rate_type_path/record/@functional_currency_code}"/>
<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:field name="functional_currency_code"
defaultValue="${/model/default_exchange_rate_type_path/record/@functional_currency_code}"/>
<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"/>
<a:map from="bp_name" to="bp_name"/>
......@@ -396,7 +432,8 @@
</a:field> -->
<a:field name="bp_category_display" readOnly="true"/>
<a:field name="transaction_num" readOnly="true"/>
<a:field name="exchange_rate_type_display" displayField="type_name" options="exchangerate_type_ds" readOnly="true" returnField="exchange_rate_type" valueField="type_code">
<a:field name="exchange_rate_type_display" displayField="type_name" options="exchangerate_type_ds"
readOnly="true" returnField="exchange_rate_type" valueField="type_code">
<a:mapping>
<a:map from="type_code" to="exchange_rate_type"/>
<a:map from="rate_method_code" to="rate_method_code"/>
......@@ -407,7 +444,9 @@
<a:field name="rate_method_code"/>
<a:field name="transaction_amount" required="true"/>
<a:field name="transaction_functional_amount" readOnly="true"/>
<a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" required="true" title="CSH511.BANK_ACCOUNT_CODE">
<a:field name="bank_account_name" autoComplete="true" lovGridHeight="350" lovHeight="550"
lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850"
required="true" title="CSH511.BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="precision" to="precision"/>
<a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
......@@ -423,7 +462,9 @@
</a:mapping>
</a:field>
<a:field name="zero_amounts_allowed"/>
<a:field name="bp_bank_account_code" autoComplete="true" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="basic.hls_bp_master_bank_account_v_for_lov?enabled_flag=Y" lovWidth="580" title="CSH511.BP_BANK_ACCOUNT_CODE">
<a:field name="bp_bank_account_code" autoComplete="true" lovGridHeight="350" lovHeight="550"
lovLabelWidth="90" lovService="basic.hls_bp_master_bank_account_v_for_lov?enabled_flag=Y"
lovWidth="580" title="CSH511.BP_BANK_ACCOUNT_CODE">
<a:mapping>
<a:map from="bank_account_id" to="bp_bank_account_id"/>
<a:map from="bank_account_num" to="bp_bank_account_num"/>
......@@ -440,7 +481,8 @@
<a:map from="contract_id" to="ref_contract_id"/>
</a:mapping>
</a:field> -->
<a:field name="ref_contract_number" lovGridHeight="320" lovHeight="530" lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="800" title="合同编号">
<a:field name="ref_contract_number" lovGridHeight="320" lovHeight="530"
lovService="csh.CSH510.csh_transaction_contract_query" lovWidth="800" title="合同编号">
<a:mapping>
<a:map from="bp_id" to="bp_id"/>
<a:map from="bp_name" to="bp_name"/>
......@@ -453,8 +495,11 @@
</a:field>
<a:field name="bp_bank_account_num"/>
<a:field name="bp_bank_account_name" required="true"/>
<a:field name="collection_classes_desc" required="true" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS" options="ds_collection_classes_ds" displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
<a:field name="paid_byother_flag_n" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag" displayField="code_value_name" valueField="code_value" required="true"/>
<a:field name="collection_classes" 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="paid_byother_flag_n" options="PAID_BYOTHER_FLAG_DS" returnField="paid_byother_flag"
displayField="code_value_name" valueField="code_value" required="true"/>
</a:fields>
<a:events>
<a:event name="update" handler="onUpdate_csh511_receipt"/>
......@@ -508,56 +553,68 @@
<!--</a:box>-->
<!--</a:form>-->
<!--#删除表格头,添加fieldSet-->
<!-- <a:form title="收款信息" width="1200">-->
<!-- <a:form title="收款信息" width="1200">-->
<a:fieldSet title="CSH511.CSH_TRANSACTION.MANUAL_ADD">
<a:box column="3">
<a:datePicker name="transaction_date" bindTarget="csh_transaction_receipt_head_ds"/>
<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" allowNegative="false" bindTarget="csh_transaction_receipt_head_ds"/>
<!-- # 新增现金流字段,代付,商业伙伴,摘要字段-->
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" required="true"/>
<a:comboBox name="paid_byother_flag_n" prompt="代付" bindTarget="csh_transaction_receipt_head_ds" required="true"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/>
<a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true"
allowNegative="false" bindTarget="csh_transaction_receipt_head_ds"/>
<!-- # 新增现金流字段,代付,商业伙伴,摘要字段-->
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" required="true"/>
<a:comboBox name="paid_byother_flag_n" prompt="代付" bindTarget="csh_transaction_receipt_head_ds"
required="true"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH511.CSH_TRANSACTION.CLASS_DESC"/>
</a:box>
<a:hBox style="width:800px">
<a:textField width="350" name="description" bindTarget="csh_transaction_receipt_head_ds"/>
</a:hBox>
<!--#添加备注字段-->
<a:hBox style="width:800px">
<a:textField width="350" name="ref_v05" prompt="CSH511.CSH_TRANSACTION.STATEMENT" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField width="350" name="ref_v05" prompt="CSH511.CSH_TRANSACTION.STATEMENT"
bindTarget="csh_transaction_receipt_head_ds"/>
</a:hBox>
</a:fieldSet>
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
<!-- <a:comboBox name="currency_name" bindTarget="csh_transaction_receipt_head_ds"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
&lt;!&ndash;<a:textField name="banka" bindTarget="csh_transaction_receipt_head_ds" prompt="账户类型"/>&ndash;&gt;
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="分行名称"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:textField name="bank_account_type_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="账户类型"/>
&lt;!&ndash; <a:comboBox name="exchange_rate_type_display" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;
</a:box>-->
<!--删除下面的字段 currency_name,bank_account_name,banka,bank_branch_name,bank_account_num,bank_account_type_name,exchange_rate_type_display-->
<!-- <a:comboBox name="currency_name" bindTarget="csh_transaction_receipt_head_ds"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
&lt;!&ndash;<a:textField name="banka" bindTarget="csh_transaction_receipt_head_ds" prompt="账户类型"/>&ndash;&gt;
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="分行名称"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:textField name="bank_account_type_name" bindTarget="csh_transaction_receipt_head_ds" readOnly="true" prompt="账户类型"/>
&lt;!&ndash; <a:comboBox name="exchange_rate_type_display" bindTarget="csh_transaction_receipt_head_ds"/> &ndash;&gt;
</a:box>-->
<!--删除下面的两个box-->
<!-- <a:box column="4">
<a:textField name="description" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField name="purpose" bindTarget="csh_transaction_receipt_head_ds" prompt="用途"/>
</a:box>
<a:box column="4">
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="银行流水号"/>
<a:textField name="gsber" bindTarget="csh_transaction_receipt_head_ds" prompt="业务范围"/>
<a:textField name="sus_belnr" bindTarget="csh_transaction_receipt_head_ds" prompt="SAP凭证号"/>
</a:box>-->
<!-- </a:form>-->
<!--添加两方的账户信息和附件-->
<!--删除下面的两个box-->
<!-- <a:box column="4">
<a:textField name="description" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField name="purpose" bindTarget="csh_transaction_receipt_head_ds" prompt="用途"/>
</a:box>
<a:box column="4">
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="银行流水号"/>
<a:textField name="gsber" bindTarget="csh_transaction_receipt_head_ds" prompt="业务范围"/>
<a:textField name="sus_belnr" bindTarget="csh_transaction_receipt_head_ds" prompt="SAP凭证号"/>
</a:box>-->
<!-- </a:form>-->
<!--添加两方的账户信息和附件-->
<a:fieldSet title="CSH511.CSH_TRANSACTION.BANK_INFO">
<a:box column="3" labelWidth="100">
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME"/>
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME" readOnly="true"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME" readOnly="true"/>
<a:lov name="bank_account_name" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_NAME"/>
<a:textField name="bank_branch_name" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.MY_BANK_NAME" readOnly="true"/>
<a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT_USERNAME" readOnly="true"/>
<!--对方账户-->
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_NAME"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_BANK_NAME"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"
prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
</a:box>
</a:fieldSet>
<a:fieldSet title="CSH511.CSH_TRANSACTION.ATTACHMENT">
......@@ -568,13 +625,13 @@
</a:fieldSet>
<!-- <a:form title="对方账户信息" width="1200">
<a:box column="4">
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds" prompt="银行名称"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>
</a:box>
</a:form>-->
<!-- <a:form title="对方账户信息" width="1200">
<a:box column="4">
<a:textField name="bp_bank_account_name" bindTarget="csh_transaction_receipt_head_ds"/>
<a:textField name="opposite_band_na" bindTarget="csh_transaction_receipt_head_ds" prompt="银行名称"/>
<a:textField name="bp_bank_account_num" bindTarget="csh_transaction_receipt_head_ds"/>
</a:box>
</a:form>-->
</a:screenBody>
......
......@@ -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