Commit d632a0d2 authored by Darming's avatar Darming

Merge branch 'feature/write_off_ref' into develop

parents 2b6eb97b ef1fff96
......@@ -114,7 +114,7 @@
<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 name="confirmed" queryExpression="(${@confirmed} = 'Y' and t1.confirmed_flag in ('ACCAUDITED','ACCAUDITING'))"/>
<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}"/>
......
......@@ -52,7 +52,7 @@ select t.parent_company_id company_id
queryExpression="due_date &lt;= to_date(${@due_date_to},&apos;yyyy-mm-dd&apos;)"/>
<bm:query-field field="dd_bank_account_num" queryOperator="="/>
<bm:query-field field="dd_bank_account_name" queryOperator="="/>
<bm:query-field name="bp_id_tenant" queryExpression="t.bp_id = ${@bp_id}"/>
<bm:query-field name="bp_id" queryExpression="t.bp_id_tenant = ${@bp_id}"/>
<bm:query-field name="bp_name" queryExpression="t.bp_name like '%' || ${@bp_name} || '%'"/>
</bm:query-fields>
</bm:model>
......@@ -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','009') and p.ENABLED_FLAG = 'Y'
and p.position_code in ('014','009') and p.ENABLED_FLAG = 'Y'
]]>
</bm:query-sql>
</bm:operation>
......
......@@ -170,6 +170,6 @@
<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="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-filter name="position_code" expression="(((${@position_code} = '009' and t1.bp_category = 'TENANT' and t1.paid_byother_flag = 'N') or (${@position_code} = '014' and t1.bp_category != 'TENANT') or (${@position_code} = '014' 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
......@@ -90,7 +90,7 @@
},
scope: this
});
})
},function(){$('csh509_csh_trx_bank_business_confirm').enable();})
}
......@@ -100,11 +100,17 @@
$('csh509_csh_trx_bank_business_confirm').disable();
//根据身份判断所选择的数据是否可以确认
var datas = $('csh_transaction_receipt_maintain_result_ds').selected;
if(datas.length == 0){
Leaf.showInfoMessage("提示","请先选择数据");
$('csh509_csh_trx_bank_business_confirm').enable();
return;
}
var updateData = [];
for (var i = 0; i < datas.length; i++) {
var confirmed_flag = datas[i].get('confirmed_flag');
if (confirmed_flag != 'ACCAUDITING' && confirmed_flag != 'DEBTAUDITING') {
$L.showInfoMessage("提示", '请选择确认中的收款单据');
$('csh509_csh_trx_bank_business_confirm').enable();
return;
}
//
......@@ -127,7 +133,7 @@
// }
//保存要修改的数据
//岗位
confirmed_by = '00321';
confirmed_by = '014';
updateData.push({
transaction_id: datas[i].get('transaction_id'),
wanted_confirmed_flag: 'ACCAUDITED',
......@@ -531,7 +537,11 @@
</a:dataSet>
<a:dataSet id="write_off_flag_ds" lookupCode="WRITE_OFF_FLAG"/>
<a:dataSet id="confirmed_flag_ds" lookupCode="CONFIRMED_FLAG">
<a:dataSet id="confirmed_flag_ds">
<a:datas>
<a:record code_value="ACCAUDITING" code_value_name="收款确认中"/>
<a:record code_value="ACCAUDITED" code_value_name="收款已确认"/>
</a:datas>
</a:dataSet>
<a:dataSet id="payment_method_ds">
<a:datas dataSource="/model/payment_method_path"/>
......@@ -615,7 +625,8 @@
</a:mapping>
</a:field>
<a:field name="confirmed_flag_desc" options="confirmed_flag_ds" valueField="code_value"
displayField="code_value_name" returnField="confirmed_flag"/>
displayField="code_value_name" returnField="confirmed_flag" defaultValue="收款确认中"/>
<a:field name="confirmed_flag" defaultValue="ACCAUDITING"/>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds"
returnField="payment_method_id" valueField="payment_method_id"/>
<a:field name="bp_name_from" lovGridHeight="350" lovHeight="500"
......@@ -810,7 +821,7 @@
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:comboBox name="confirmed_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.BILL_STATUS"/>
prompt="单据审批状态"/>
<!-- <a:comboBox name="write_off_flag_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"/>-->
<a:comboBox name="collection_classes_n" bindTarget="csh_transaction_receipt_maintain_query_ds"
prompt="CSH510.CSH_TRANSACTION.PURPOSE_OF_FUNDS"/>
......@@ -843,10 +854,10 @@
<a:column name="bp_name" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER" align="center"/>
<a:column name="bank_slip_num" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" align="center"/>
<a:column name="description" prompt="CSH510.CSH_TRANSACTION.DESCRIPTION" align="center"/>
<a:column name="confirmed_flag_desc" prompt="CSH510.CSH_TRANSACTION.BILL_STATUS"
align="center"/>
<a:column name="written_off_flag_desc" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"
<a:column name="confirmed_flag_desc" prompt="单据审批状态"
align="center"/>
<!-- <a:column name="written_off_flag_desc" prompt="CSH510.CSH_TRANSACTION.WRITTEN_OFF_STATUS"-->
<!-- align="center"/>-->
<a:column prompt="CSH510.CSH_TRANSACTION.MY_ACCOUNT" align="center">
<a:column prompt="CSH510.CSH_TRANSACTION.ACCOUNT_NAME" name="bank_account_name"
align="center"/>
......
......@@ -487,7 +487,7 @@
<a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.BANK_CASH_CODE" readOnly="true"/>
<a:comboBox name="paid_byother_flag_n" prompt="代付" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_head_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER" readOnly="true"/>
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" prompt="款项分类" readOnly="true"/>
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_head_ds" prompt="款项用途" readOnly="true"/>
</a:box>
<a:hBox style="width:800px">
<a:textField width="350" name="description" bindTarget="csh_transaction_receipt_head_ds" readOnly="true"/>
......
......@@ -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);
......
......@@ -411,7 +411,7 @@
<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"
<a:field name="bp_name" required="true" 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"/>
......@@ -567,7 +567,7 @@
<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"/>
prompt="款项用途"/>
</a:box>
<a:hBox style="width:800px">
<a:textField width="350" name="description" bindTarget="csh_transaction_receipt_head_ds"/>
......
......@@ -82,23 +82,49 @@
var receipt_type = '${/parameter/@receipt_type}';
var paid_byother_flag = '${/parameter/paid_byother_flag}';
var bp_category = '${/parameter/bp_category}';
if (receipt_type == 'WITHHOLD') { //划扣
var transaction_type = head_record.get('transaction_type');
// if (receipt_type == 'WITHHOLD') { //划扣
// if (all.length != records.length) {
// Leaf.showInfoMessage("提示", "该现金事务不支付部分反冲");
// return;
// }
// } else {
// if (paid_byother_flag == 'F' && bp_category == 'TENANT') {
// Leaf.showInfoMessage("提示", "该现金事务不支付部分反冲");
// return;
// }
// }
if (transaction_type == 'RECEIPT') {
if (all.length != records.length) {
Leaf.showInfoMessage("提示", "该现金事务不支付部分反冲");
return;
}
} else {
if (paid_byother_flag == 'F' && bp_category == 'TENANT') {
Leaf.showInfoMessage("提示", "该现金事务不支付部分反冲");
return;
}
}
var gld_batch_id = records[0].get('gld_batch_id');
for (var i = 0; i < records.length; i++) {
if (records[i].get('gld_batch_id') != gld_batch_id) {
Leaf.showInfoMessage("提示", "请选择同一批次号的记录反冲!");
return;
}
records[i].set('reversed_date', head_record.get('reversed_date'));
records[i].set('description', head_record.get('description'));
records[i].set('_status', 'update');
saveData.push(records[i].data);
}
//同批次未勾选的
var allR = $('csh_transaction_receipt_write_off_reverse_detail_result_ds').getAll();
var unR = [];
for (var i = 0; i < allR.length; i++) {
if (records.indexOf(allR[i]) === -1) {
unR.push(allR[i]);
}
}
for (var i = 0; i < unR.length; i++) {
if(unR[i].get('gld_batch_id') == gld_batch_id){
Leaf.showInfoMessage("提示", "请选择全部同一批次号的记录反冲!");
return;
}
}
//区别批量核销和单笔核销
var url;
......
......@@ -335,17 +335,19 @@
function csh531n_open_write_off_detail(id, readOnly) {
var ds = $('csh531n_sap_bankflow_info_result_ds');
var record = ds.findById(id);
var bp_category = record.get('bp_category');
var paid_byother_flag = record.get('paid_byother_flag');
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';
} else {
if(paid_byother_flag == 'Y'){
depositDisplayFlag = 'Y';
}
}
if (confirmed_flag == 'WF_APPROVING'){
interfaceQueryFlag = 'Y';
......@@ -384,7 +386,7 @@
var text = '';
var status = record.get('confirmed_flag');
var write_off_flag = record.get('write_off_flag');
var readOnly = 'Y';
var readOnly = 'N';
if ((status == 'WF_APPROVING' || status == 'WF_APPROVED') && write_off_flag != 'FULL') {
readOnly = 'Y';
}
......
......@@ -57,7 +57,7 @@
}
}
} else {
if ('${/parameter/@interfaceQueryFlag}' == 'Y') {
if ('${/parameter/@interfaceQueryFlag}' == 'N') {
if ('${/parameter/@approval_flag}' == 'Y') {
$('csh531n_write_off_btn_id').setVisible(true);
} else {
......@@ -640,7 +640,7 @@
<a:field name="trx_interface_id" defaultValue="${/parameter/@transaction_id}"/>
<a:field name="contract_number" prompt="合同编号" autoComplete="true" lovAutoQuery="true"
lovHeight="850"
lovUrl="${/request/@context_path}/modules/csh/CSH531N/csh_write_off_ref_contract.lview"
lovUrl="${/request/@context_path}/modules/csh/CSH531N/csh_write_off_ref_contract.lview?bp_id=${/model/csh_transaction_path/record/@bp_id}"
lovWidth="1350" title="合同号选择">
<a:mapping>
<a:map from="contract_number" to="contract_number"/>
......
......@@ -83,7 +83,8 @@
<a:dataSet id="csh_query_con_ds" autoCreate="true">
<a:fields>
<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:fields>
</a:dataSet>
<a:dataSet id="csh_query_cf_ds" autoCreate="true">
......@@ -116,7 +117,7 @@
</a:screenTopToolbar>
<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="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:datePicker name="due_date_to" bindTarget="csh_query_cf_ds" prompt="CSH531.DATE_TO"/>
<a:comboBox name="cf_item_desc" bindTarget="csh_query_cf_ds" prompt="CSH531.CF_ITEM"/>
......
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