Commit fa0119cc authored by stone's avatar stone

[fix] 修复金税接口问题,修复授信审批人问题

parents 92207560 6c50cc9e
......@@ -12,7 +12,6 @@
begin
con_contract_closed_pkg.terminate_contract(
p_contract_id =>${@contract_id},
p_company_id =>${/session/@company_id},
p_user_id =>${/session/@user_id}
);
end;
......
......@@ -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 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}"/>
......@@ -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,8 +52,9 @@
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,
t.csh_bank_account_id bank_account_id
FROM fnd_interface_headers hd,
fnd_interface_lines li,
......
......@@ -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[
......
......@@ -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','00217') and p.ENABLED_FLAG = 'Y'
and p.position_code in ('014','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} = '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
......@@ -29,7 +29,7 @@
<script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
......
......@@ -123,6 +123,7 @@
<a:dataSets>
<a:dataSet id="receivedAmountDs" autoQuery="true" model="cont.CON560.con_contract_received_amount"/>
<a:dataSet id="unreceivedAmountDs" autoQuery="true" model="cont.CON560.con_contract_unreceived_amount"/>
<a:dataSet id="con560_contract_status_ds" lookupCode="CON500_CONTRACT_STATUS"/>
<a:dataSet id="con560_lease_organization_name_ds" loadData="true"
model="basic.hls_lease_organization_for_lov"/>
<a:dataSet id="con560_contract_query_ds" autoCreate="true">
......@@ -158,6 +159,11 @@
model="cont.CON560.con_contract_finish_for_query_wfl" queryDataSet="con560_contract_query_ds"
queryUrl="${/request/@context_path}/autocrud/cont.CON560.con_contract_finish_for_query_wfl/query?contract_id=${/parameter/@contract_id}"
selectable="true" selectionModel="single">
<a:fields>
<a:field name="contract_status_n" displayField="code_value_name"
options="con560_contract_status_ds" returnField="contract_status"
valueField="code_value"/>
</a:fields>
<a:events>
<a:event name="indexChange" handler="onIndexChange"/>
<a:event name="query" handler="aut_authority_list_validate_query"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script import="con_print_path.js"><![CDATA[
importPackage(java.io);
importPackage(Packages.hls.plugin.docx4j)
importPackage(Packages.org.apache.commons.io);
function RandomString(length) {   
var str = '';   
for (;str.length < length;str += Math.random().toString(36).substr(2));   
return str.substr(0, length); 
}
//删除文件
function deleteFile(filePath) {
var file = new File(filePath);
if (file.exists()) {
file.delete();
}
}
function copyFile(fOld, fNew) {
var fis = new java.io.FileInputStream(fOld);
var fos = new java.io.FileOutputStream(fNew);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 4);
var len = -1;
while ((len = fis.read(b)) != -1) {
fos.write(b, 0, len);
}
fis.close();
fos.close();
}
//按日期创建目录
function getDatePath() {
set_parameter_file_path();
var file_path = $ctx.parameter.file_path; //file_path = c:/hls_test_files/content_files/
var now = new Date()
y = now.getFullYear()
m = now.getMonth() + 1
m = m < 10 ? "0" + m : m
var datePath = file_path + y + "/" + m + "/";
return datePath; //datePath = d:/hls_test_files/fileupload/2018/04/
}
function write_os_to_file(file, os) {
var fis = new FileInputStream(file);
var b = new java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024 * 64);
var len = -1;
while ((len = fis.read(b)) != -1) {
os.write(b, 0, len);
}
fis.close();
}
function download_file(file_path, file_name) {
$ctx["__request_type__"] = 'file';
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'utf-8'));
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
try {
var os = resp.getOutputStream();
write_os_to_file(file_path, os);
//write_os_to_file(file_path+file_name, os);
os.flush();
} catch (e) {
$logger("server-script").severe(e.message);
}
}
function collection_create_content() {
try {
//第一步生成合同文本
$bm('cont.CON620.create_content_for_collection').update({
contract_id: $ctx.parameter.contract_id,
templet_code: $ctx.parameter.templet_code
});
//获取日期目录
set_parameter_file_path();
var datePath = getDatePath();
$ctx.parameter.batch_flag='Y';
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var from_file_data_map = $bm('cont.CON500.con_doc_file_templet_get_atm').queryAsMap({
contract_id: $ctx.parameter.contract_id,
batch_flag:$ctx.parameter.batch_flag,
});
var from_file_data = from_file_data_map.getChildren();
for (var i = 0;i < from_file_data.length;i++) {
var to_file_path = $ctx.parameter.file_path;
var record_data = from_file_data[i];
if (record_data.file_exists_flag != 'Y') {
var to_file_name = record_data.to_file_name + '.' + record_data.file_type_code || 'doc';
var from_file_path = record_data.file_path;
var guid_file_name_path = $bm('cont.CON500.con_contract_get_guid_file_name').queryAsMap();
var guid_file_name_tables = guid_file_name_path.getChildren();
to_file_path = datePath + guid_file_name_tables[0].guid_file_name + 'con' + record_data.content_id;
copyFile(from_file_path, to_file_path);
try {
var brwt = new BookmarksReplaceWithText($instance('leaf.database.service.IDatabaseServiceFactory'), $instance('uncertain.ocm.IObjectRegistry'), $ctx.getData());
brwt.replaceBookmarkFromContent(to_file_path.toString(), record_data.content_id);
} catch (e) {
raise_app_error(e);
}
$bm('cont.CON500.con_file_content_copy_update').update({
table_name: 'CON_CONTRACT_CONTENT',
content_id: record_data.content_id,
file_name: to_file_name.toString(),
file_path: to_file_path.toString()
});
var test=new File(to_file_path);
var test1=new File('D:'+to_file_path);
download_file(to_file_path.toString(),to_file_name.toString());
}
}
$ctx.parameter.return_status = 'S';
$ctx.parameter.return_message = '执行成功';
} catch (e) {
$ctx.success = "true";
$ctx.parameter.return_status = 'E';
$ctx.parameter.return_message = $ctx.get('/error/@message') || String(e);
raise_app_error(e);
}
var result = {
result: $ctx.parameter.return_status,
message: $ctx.parameter.return_message
};
$ctx.parameter.json = JSON.stringify(result);
}
if ($ctx.parameter.return_status != 'E' && $ctx.parameter.return_status != 'TIMEOUT') {
collection_create_content();
}
]]></s:server-script>
</a:init-procedure>
<a:service-output/>
</a:service>
......@@ -16,6 +16,8 @@
url="${/request/@context_path}/modules/cont/CON732/hls_ccr_modify_wfl_msg_detail.lview"/>
<a:link id="con_contract_change_req_link"
url="${/request/@context_path}/modules/cont/CON701/con_contract_et_print.lsc"/>
<a:link id="assignment_agreement_print_link"
url="${/request/@context_path}/modules/cont/CON732/hls_ccr_modify_assignment_agreement_print.lsc"/>
<script type="text/javascript"><![CDATA[
function open_contract_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
......@@ -128,6 +130,34 @@
window.open(url);
};
//生成权利义务转让协议书
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var prj_project_result_ds = $(ds_id);
var records = prj_project_result_ds.getSelected();
if (records.length != 1) {
Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
return false;
}
var record = records[0];
var ccr_document_type = record.get('ccr_document_type');
var req_status = record.get('req_status');
var contract_id = record.get('contract_id');
if (req_status != 'APPROVED') {
Leaf.showMessage('${l:PROMPT}', '只有审批通过的合同才能打印!');
return false;
}
if (ccr_document_type == 'LEASE_CHAG') {
var templet_code = 'ASSIGNMENT_AGREEMENT';
var url = $('assignment_agreement_print_link').getUrl() + '?contract_id=' + contract_id + '&templet_code=' + templet_code;
window.open(url, '_self');
}
if(ccr_document_type == 'ACC_CHAG'){
}
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) { //查询权限
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
if (ds == $(ds_id)) {
......
......@@ -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"
......@@ -667,7 +678,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 +702,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"/>
......@@ -809,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"/>
......@@ -842,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"/>
......
......@@ -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>
......
......@@ -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"/>
......
......@@ -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,9 +637,9 @@
<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="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"/>
<a:field name="receipt_type"/>
<a:field name="receipt_type_des" displayField="code_value_name" options="receipt_type_ds" returnField="receipt_type" valueField="code_value"/>
......@@ -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"/>
......
......@@ -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,15 +335,22 @@
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';
if (bp_category == 'AGENT') {
depositDisplayFlag = 'Y';
}
var interfaceQueryFlag = 'N';
if (transaction_type != 'ADVANCE_RECEIPT'){
advanceDisplayFlag = 'Y';
} else {
if(paid_byother_flag == 'Y'){
depositDisplayFlag = 'Y';
}
}
if (confirmed_flag == 'WF_APPROVING'){
interfaceQueryFlag = 'Y';
}
var approval_flag = '${/model/result_position/record/@approval_enbale}' || 'N';
var win = new Leaf.Window({
......@@ -361,6 +368,7 @@
bp_id: record.get('bp_id'),
advanceDisplayFlag: advanceDisplayFlag,
readOnly: readOnly,
interfaceQueryFlag: interfaceQueryFlag,
approval_flag: approval_flag,
winid: 'csh_write_off_window'
},
......@@ -449,9 +457,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 +521,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}' == 'N') {
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';
}
}
......@@ -628,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,14 +117,14 @@
</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"/>
</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 +134,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"/>
......
......@@ -31,12 +31,12 @@
// if(value=='AGENT' || value=='GUTA_ORG' || value=='VENDER'){
if(value=='GUTA_ORG'){
record.set('bp_class','ORG');
record.set('bp_class_n','企业');
record.set('bp_class_n','法人');
record.getField('bp_class_n').setReadOnly(true);
}
else if(value=='GUTA_NP'){
record.set('bp_class','NP');
record.set('bp_class_n','人');
record.set('bp_class_n','自然人');
record.getField('bp_class_n').setReadOnly(true);
}
else if(value=='TENANT'){
......
......@@ -18,7 +18,7 @@
url="${/request/@context_path}/modules/hls/HLS236/hls_bp_master_query_ccx_icinfo.lview"/>
<script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>
<script type="text/javascript"><![CDATA[
stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_BP_RESULT', 'hls_bp_master');
function open_bp_modify_win(ds_id, record_id) {
var record = $(ds_id).findById(record_id);
......
......@@ -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