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"/>
......
......@@ -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" 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"/>
<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="款项用途"/>
</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>
......
......@@ -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"/>
......
......@@ -130,7 +130,7 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function (ds, record, config_records, bp_seq) {
if ((ds.id).indexOf('hls_bp_master') != -1) {
record.getField('cell_phone').setRequired(true);
//身份证验证
if (ds.fields.id_card_no) {
......@@ -146,97 +146,116 @@
var sp_identity_flag;
function id_card_no_validate(record, name, value) {
var id_type = record.get('id_type');
var card_type_sp = record.get('card_type_sp');
if (name == 'id_card_no') {
var bp_name = record.get('bp_name');
} else if (name == 'id_no_sp') {
bp_name = record.get('bp_name_sp');
}
if (!checkCard(value)) {
Leaf.showMessage('提示', '请输入正确格式的身份证!');
return '请输入正确格式的身份证';
} else {
card_identity_flag = 'N';
sp_identity_flag = 'N';
//
//由于中诚信测试环境只能测试张三,所以这里限定身份证号为张三的123456199001011233
// if(value=='123456199001011233'){
//
// var url1 = $('identity_query_link').getUrl();
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
/* Leaf.request({
url: url1,
para: {
id_card_no: value,//身份证号码
bp_name: bp_name
},
success: function (res) {
var resmsg_1 = res.result.resmsg_1;
if (resmsg_1 == '1') {
if (name == 'id_card_no') {
record.set('ccx_resmsg', '身份验证成功');
card_identity_flag = 'Y';
if (id_type == 'ID_CARD') {
var id_card_no = record.get('id_card_no');
if (!checkCard(id_card_no)) {
Leaf.showMessage('提示', '请输入正确格式的身份证!');
return '请输入正确格式的身份证';
} else {
card_identity_flag = 'N';
sp_identity_flag = 'N';
//由于中诚信测试环境只能测试张三,所以这里限定身份证号为张三的123456199001011233
//if(value=='123456199001011233'){
// var url1 = $('identity_query_link').getUrl();
// window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
/* Leaf.request({
url: url1,
para: {
id_card_no: value,//身份证号码
bp_name: bp_name
},
success: function (res) {
var resmsg_1 = res.result.resmsg_1;
if (resmsg_1 == '1') {
if (name == 'id_card_no') {
record.set('ccx_resmsg', '身份验证成功');
card_identity_flag = 'Y';
} else {
record.set('ccx_resmsg1', '身份验证成功');
sp_identity_flag = 'Y';
}
} else {
record.set('ccx_resmsg1', '身份验证成功');
sp_identity_flag = 'Y';
}
} else {
//个人身份验证
var url = $('Identity_ccx_link').getUrl();
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: url,
para: {
bp_name: bp_name,//姓名
id_card_no: value//身份证号码
},
success: function (res) {
var resmsg = res.result.resmsg;
if (name == 'id_card_no') {
record.set('ccx_resmsg', resmsg);
if (resmsg == '身份验证成功') {
card_identity_flag = 'Y';
}
} else {
record.set('ccx_resmsg1', resmsg);
if (resmsg == '身份验证成功') {
sp_identity_flag = 'Y';
//个人身份验证
var url = $('Identity_ccx_link').getUrl();
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: url,
para: {
bp_name: bp_name,//姓名
id_card_no: value//身份证号码
},
success: function (res) {
var resmsg = res.result.resmsg;
if (name == 'id_card_no') {
record.set('ccx_resmsg', resmsg);
if (resmsg == '身份验证成功') {
card_identity_flag = 'Y';
}
} else {
record.set('ccx_resmsg1', resmsg);
if (resmsg == '身份验证成功') {
sp_identity_flag = 'Y';
}
}
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this,
sync: true
});
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this,
sync: true
});*/
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this,
sync: true
});
}
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
scope: this,
sync: true
});*/
}
} else {
card_identity_flag = 'N';
sp_identity_flag = 'N';
}
if (card_type_sp == 'ID_CARD') {
var id_no_sp = record.get('id_no_sp');
if (!checkCard(id_no_sp)) {
Leaf.showMessage('提示', '请输入正确格式的身份证!');
return '请输入正确格式的身份证';
} else {
card_identity_flag = 'N';
sp_identity_flag = 'N'
}
} else {
card_identity_flag = 'N';
sp_identity_flag = 'N';
}
if (value.length == 18) {
record.set('date_of_birth', new Date(value.substr(6, 4) + '/' + value.substr(10, 2) + '/' + value.substr(12, 2)));
record.set('age', new Date().getFullYear() - value.substr(6, 4));
......@@ -279,51 +298,56 @@
//保存前调用,生成商机编号
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function (ds, record) {
//
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
debugger
var head_record = $(ds_id).getCurrentRecord();
var bp_class = head_record.get('bp_class');
var extra_nam = head_record.get('extra_nam');
var regax = /^[A-Z]+$/;
//alert('${/parameter/@unbrand}');
if (bp_class == 'NP') {
if (card_identity_flag == 'N' || sp_identity_flag == 'N') {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = false;
if (head_record.get('bp_code')) {
return true;
if (regax.test(extra_nam) && extra_nam.length == 3) {
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
var check_flag = false;
if (head_record.get('bp_code')) {
return true;
}
Leaf.request({
url: $('get_special_fields_link_id').getUrl(),
para: {
document_category: 'BP',
// document_type: head_record.get('bp_type'),
document_type: 'TENANT',
bp_class: head_record.get('bp_class'),
id_type: head_record.get('id_type'),
id_card_no: head_record.get('id_card_no'),
bp_info: head_record.get('bp_info'),
province_id: head_record.get('province_id'),
organization_code: head_record.get('organization_code'),
function_code: '${/parameter/@function_code}',
function_usage: '${/parameter/@function_usage}'
},
success: function (res) {
var document_number = res.result.document_number;
head_record.set('bp_code', document_number);
head_record.set('company_id', '${/session/@company_id}');
head_record.set('unbrand', '${/parameter/@unbrand}');
check_flag = true;
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '简称不合规!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
}
Leaf.request({
url: $('get_special_fields_link_id').getUrl(),
para: {
document_category: 'BP',
// document_type: head_record.get('bp_type'),
document_type: head_record.get('bp_type'),
bp_class: head_record.get('bp_class'),
id_type: head_record.get('id_type'),
id_card_no: head_record.get('id_card_no'),
bp_info: head_record.get('bp_info'),
province_id: head_record.get('province_id'),
organization_code: head_record.get('organization_code'),
function_code: '${/parameter/@function_code}',
function_usage: '${/parameter/@function_usage}'
},
success: function (res) {
var document_number = res.result.document_number;
head_record.set('bp_code', document_number);
head_record.set('company_id', '${/session/@company_id}');
head_record.set('unbrand', '${/parameter/@unbrand}');
check_flag = true;
},
error: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function () {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
} else {
Leaf.showMessage('${l:HLS.PROMPT}', '身份证校验未通过,不能保存!');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
......@@ -340,7 +364,7 @@
para: {
document_category: 'BP',
// document_type: head_record.get('bp_type'),
document_type: head_record.get('bp_type'),
document_type: 'TENANT',
bp_class: head_record.get('bp_class'),
id_type: head_record.get('id_type'),
id_card_no: head_record.get('id_card_no'),
......@@ -470,6 +494,13 @@
record.getField('parent_id_n').setReadOnly(true);
}
}
if (name == 'marital_status') {
if (value == '30') {
record.getField('bp_name_sp').setRequired(true);
// record.getField('card_type_sp').setRequired(true);
record.getField('id_no_sp').setRequired(true);
}
}
}
var hls_bp_master_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
......
......@@ -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
});
......
......@@ -7,8 +7,8 @@
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
<!-- <a:model-query fetchAll="true" model="hls.HLS530.get_batch_id" rootPath="batch_id_path"/> -->
<a:model-query defaultWhereClause="t1.document_category = &apos;JE&apos;" fetchAll="true" model="basic.hls_document_type_for_lov" queryOrderBy="document_type desc" rootPath="hls_document_type_path"/>
<a:model-query fetchAll="true" model="hls.HLS301.get_sbo_limit" rootPath="get_limit"/>
</a:init-procedure>
<a:view>
<a:link id="hls_journal_manual_create_link_id" url="${/request/@context_path}/modules/hls/HLS530/manual_journal_create.lview"/>
......@@ -19,122 +19,169 @@
<a:link id="hls_journal_post_to_gld_link" model="hls.HLS301.hls_journal_post_to_gld" modelaction="batch_update"/>
<a:link id="hls_journal_unpost_to_gld_link" model="hls.HLS301.hls_journal_unpost_to_gld" modelaction="batch_update"/>
<a:link id="check_link" url="${/request/@context_path}/modules/hls/HLS530/hls_journal_check.lsc"/>
<a:link id="test_link" url="${/request/@context_path}/test.lsc"/>
<a:link id="transfer_ref_link" url="${/request/@context_path}/transfer_ref.lsc"/>
<!-- <a:link id="transfer_voucher_link" url="${/request/@context_path}/transfer_voucher.lsc"/> -->
<a:link id="transfer_voucher_link" url="${/request/@context_path}/modules/interface/INTERFACE_KINGDEE/kingdee_importvoucher_interface.lsc"/>
<a:link id="kingdee_interface_logs_id" url="${/request/@context_path}/modules/hls/HLS530/kingdee_interface_logs.lview"/>
<a:link id="hls_journal_close_link" model="hls.HLS530.hls_journal_close" modelaction="batch_update"/>
<script type="text/javascript"><![CDATA[
function render_line(record, rowIndex) {
if (record.get('kingdee_head_flag') == 'N' || record.get('kingdee_line_assist_flag') == 'N') {
return 'background-color:#FFC0CB';
<a:link id="transfer_voucher_link" url="${/request/@context_path}/transfer_voucher.lsc"/>
<a:link id="hls301_send_data" url="${/request/@context_path}/modules/hls/HLS301/hls_journal_send.lsc"/>
<a:link id="hls301_send_bp_to_sbo" model="hls.HLS301.hls_bp_post_to_sbo" modelaction="update"/>
<script><![CDATA[
//查询按钮
function hls301_journal_query() {
$('hls_journal_header_result_ds').query();
}
//重置按钮
function hls301_journal_reset() {
$('hls_journal_header_query').reset();
}
//退出按钮
function hls301_journal_exit() {
location.href = $('welcome_link_id').getUrl();
parent.shMenu('show');
}
function lock_current_window() {
Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
}
function lock_current_window2(msg) {
Leaf.Masker.mask(Ext.getBody(), msg);
}
function unlock_current_window() {
Leaf.Masker.unmask(Ext.getBody());
}
function construct_from_to() {
var config = ['responsibility_center_code', 'responsibility_center_name', 'account_code', 'account_name'];
var pattern = ['_from', '_to'];
var obj = {};
for (var i = 0,
j = config.length;i < j;i++) {
for (var m = 0,
n = pattern.length;m < n;m++) {
obj[config[i] + pattern[m]] = config[i] + pattern[n - 1 - m];
}
}
//查询按钮
function hls301_journal_query() {
$('hls_journal_header_result_ds').query();
}
//重置按钮
function hls301_journal_reset() {
$('hls_journal_header_query').reset();
}
//退出按钮
function hls301_journal_exit() {
location.href = $('welcome_link_id').getUrl();
parent.shMenu('show');
}
function construct_from_to() {
var config = ['responsibility_center_code', 'responsibility_center_name', 'account_code', 'account_name'];
var pattern = ['_from', '_to'];
var obj = {};
for (var i = 0,
j = config.length;i < j;i++) {
for (var m = 0,
n = pattern.length;m < n;m++) {
obj[config[i] + pattern[m]] = config[i] + pattern[n - 1 - m];
}
}
return obj;
}
function onUpdate_para_journalQueryDs(ds, record, name, value, oldvalue) {
var from_to = construct_from_to();
var opposite_name = from_to[name];
if (!Ext.isEmpty(opposite_name)) {
var opposite_value = record.get(opposite_name);
if (!Ext.isEmpty(value) && Ext.isEmpty(opposite_value)) {
record.set(opposite_name, value);
}
return obj;
}
function onUpdate_para_journalQueryDs(ds, record, name, value, oldvalue) {
var from_to = construct_from_to();
var opposite_name = from_to[name];
if (!Ext.isEmpty(opposite_name)) {
var opposite_value = record.get(opposite_name);
if (!Ext.isEmpty(value) && Ext.isEmpty(opposite_value)) {
record.set(opposite_name, value);
}
}
function hls301_journal_new() {
var param = new Object();
param['function_code'] = 'HLS530';
param['document_category'] = 'JE';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}';
param['manual_flag'] = 'Y';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_manual_create_link_id');
}
function hls301_link_dynamic(reocrd_id, journal_header_id) {
var maintain_type = 'UPDATE';
var record = $('hls_journal_header_result_ds').findById(reocrd_id);
if (record.get('post_gl_status') == 'Y') {
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS530.JOURNAL_POST_GL_STATUS_IS_Y}');
return false;
}
var param = record.data;
param['currency'] = param['currency_code'];
param['function_code'] = 'HLS530';
param['document_id'] = journal_header_id;
param['document_category'] = 'JE';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}';
param['manual_flag'] = 'N';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_manual_create_link_id');
}
function hls301_journal_new() {
var param = new Object();
param['function_code'] = 'HLS530';
param['document_category'] = 'JE';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE';
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_manual_create_link_id');
}
function hls301_link_dynamic(reocrd_id, journal_header_id) {
var maintain_type = 'UPDATE';
var record = $('hls_journal_header_result_ds').findById(reocrd_id);
if (record.get('post_gl_status') == 'Y') {
Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS530.JOURNAL_POST_GL_STATUS_IS_Y}');
return false;
}
function hls301_journal_num_render(value, record, name) {
return '<a href="javascript:hls301_link_dynamic(' + record.id + ',' + record.get('journal_header_id') + ');">' + value + '</a>';
var param = record.data;
param['currency'] = param['currency_code'];
param['function_code'] = 'HLS530';
param['document_id'] = journal_header_id;
param['document_category'] = 'JE';
param['function_usage'] = 'MODIFY';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}';
hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_manual_create_link_id');
}
function hls301_journal_num_render(value, record, name) {
return '<a href="javascript:hls301_link_dynamic(' + record.id + ',' + record.get('journal_header_id') + ');">' + value + '</a>';
}
function journal_submit(datas) {
Leaf.request({
url: $('hls_journal_post_to_gld_link').getUrl(),
para: datas,
success: function(res) {
f_hls.winNoMask();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
$('hls_journal_header_result_ds').query();
},
failure: function() {
f_hls.winNoMask();
},
error: function() {
f_hls.winNoMask();
},
scope: this
});
}
var transfer_ref_flag = 'N';
function hls301_journal_post_ref() {
f_hls.winMask();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
f_hls.winNoMask();
return;
}
function journal_submit(datas) {
Leaf.request({
url: $('hls_journal_post_to_gld_link').getUrl(),
para: datas,
success: function(res) {
f_hls.winNoMask();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
$('hls_journal_header_result_ds').query();
},
failure: function() {
f_hls.winNoMask();
},
error: function() {
f_hls.winNoMask();
},
scope: this
});
var datas = [];
for (var i = 0;i < records.length;i++) {
var obj = {};
obj['journal_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
datas[i] = obj;
}
var transfer_ref_flag = 'N';
function hls301_journal_post_ref() {
Leaf.request({
url: $('transfer_ref_link').getUrl(),
para: datas,
success: function(res) {
f_hls.winNoMask();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
transfer_ref_flag = 'Y';
//hls301_journal_query();
},
failure: function() {
f_hls.winNoMask();
},
error: function() {
f_hls.winNoMask();
},
scope: this
});
}
function hls301_journal_post() {
debugger;
var url = $('test_link').getUrl();
if (0) {
Leaf.showMessage('${l:HLS.PROMPT}', '请先传递凭证辅助段');
} else {
f_hls.winMask();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
......@@ -148,158 +195,33 @@
obj['journal_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
datas[i] = obj;
if (records[i].get('je_transaction_code') == 'FIN_INCOME_RECOGNITION') {
// if(transfer_ref_flag == 'N'){
// Leaf.showMessage('${l:HLS.PROMPT}', '收入确认凭证请先传递凭证辅助段');
// f_hls.winNoMask();
// return;
// }
url = $('transfer_voucher_link').getUrl();
}
}
Leaf.request({
url: $('transfer_ref_link').getUrl(),
url: $('check_link').getUrl(),
para: datas,
success: function(res) {
f_hls.winNoMask();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
transfer_ref_flag = 'Y';
//hls301_journal_query();
},
failure: function() {
f_hls.winNoMask();
},
error: function() {
f_hls.winNoMask();
},
scope: this
});
}
// function hls301_journal_post() {
// var url=$('test_link').getUrl();
// if(0){
// Leaf.showMessage('${l:HLS.PROMPT}', '请先传递凭证辅助段');
// }else{
// f_hls.winMask();
// var ds = $('hls_journal_header_result_ds');
// var records = ds.getSelected();
// if (records.length == 0) {
// f_hls.winNoMask();
// return;
// }
// var datas = [];
// for (var i = 0;i < records.length;i++) {
// var obj = {};
// obj['journal_id'] = records[i].get('journal_header_id');
// obj['_status'] = 'update';
// datas[i] = obj;
// if(records[i].get('je_transaction_code')=='FIN_INCOME_RECOGNITION'){
// // if(transfer_ref_flag == 'N'){
// // Leaf.showMessage('${l:HLS.PROMPT}', '收入确认凭证请先传递凭证辅助段');
// // f_hls.winNoMask();
// // return;
// // }
// url =$('transfer_voucher_link').getUrl();
// }
// }
// Leaf.request({
// url: $('check_link').getUrl(),
// para: datas,
// success: function(res) {
// Leaf.request({
// url: url,
// para: datas,
// success: function(res) {
// f_hls.winNoMask();
// Leaf.SideBar.show({
// msg: '${l:HLS.SUBMIT_SUCCESS}',
// duration: 2000
// });
// hls301_journal_query();
// },
// failure: function() {
// f_hls.winNoMask();
// },
// error: function() {
// f_hls.winNoMask();
// },
// scope: this
// });
// },
// failure: function() {
// f_hls.winNoMask();
// },
// error: function() {
// f_hls.winNoMask();
// },
// scope: this
// });
// }}
function hls_journal_post_kingdee() {
var url = $('transfer_voucher_link').getUrl();
if (0) {
Leaf.showMessage('${l:HLS.PROMPT}', '请先传递凭证辅助段');
} else {
f_hls.winMask();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '请选择一条数据');
return;
}
var datas = [];
for (var i = 0;i < records.length;i++) {
//Check
if (records[i].get('kingdee_line_assist_flag') == 'N') {
f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '辅助账信息有误或缺失,请检查数据!');
return;
}
if (records[i].get('post_gl_status') == 'CLOSE') {
f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '所选凭证已经关闭,请重新选择!');
return;
}
var obj = {};
obj['journal_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
datas[i] = obj;
}
Leaf.showConfirm('提示', '确定导入凭证到金蝶吗?', function() {
Leaf.request({
url: $('check_link').getUrl(),
url: url,
para: datas,
success: function(res) {
Leaf.request({
url: url,
para: datas,
success: function(res) {
f_hls.winNoMask();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
var kingdee_url = $('kingdee_interface_logs_id').getUrl() + '?batch_id=' + res.result.batch_id_path.record[0].batch_id;
var win = new Leaf.Window({
url: kingdee_url,
title: '金蝶导入日志',
id: 'kingdee_interface_logs_winid',
width: 850,
height: 400
});
win.on('close', function() {
hls301_journal_query();
});
},
failure: function() {
f_hls.winNoMask();
},
error: function() {
f_hls.winNoMask();
},
scope: this
f_hls.winNoMask();
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
hls301_journal_query();
},
failure: function() {
f_hls.winNoMask();
......@@ -309,105 +231,203 @@
},
scope: this
});
}, function() {
},
failure: function() {
f_hls.winNoMask();
});
}
},
error: function() {
f_hls.winNoMask();
},
scope: this
});
}
//凭证关闭
function hls_journal_close() {
f_hls.winMask();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
}
function journal_submit_unpost(datas) {
Leaf.request({
url: $('hls_journal_unpost_to_gld_link').getUrl(),
para: datas,
success: function(res) {
f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '请选择一条数据');
return;
}
var datas = [];
for (var i = 0;i < records.length;i++) {
if (records[i].get('post_gl_status') == 'Y') {
f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '已过账凭证无法关闭,请重新选择!');
return;
}
if (records[i].get('post_gl_status') == 'CLOSE') {
f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '所选凭证已经关闭,无需重复操作!');
return;
}
var obj = {};
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update';
datas[i] = obj;
}
Leaf.showConfirm('提示', '确定关闭所选凭证吗?', function() {
Leaf.request({
url: $('hls_journal_close_link').getUrl(),
para: datas,
success: function(res) {
f_hls.winNoMask();
hls301_journal_query();
},
failure: function() {
f_hls.winNoMask();
},
error: function() {
f_hls.winNoMask();
},
scope: this
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
});
}, function() {
$('hls_journal_header_result_ds').query();
},
failure: function() {
f_hls.winNoMask();
});
},
error: function() {
f_hls.winNoMask();
},
scope: this
});
}
function hls301_journal_unpost() {
f_hls.winMask();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
f_hls.winNoMask();
return;
}
var datas = [];
for (var i = 0;i < records.length;i++) {
var obj = {};
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'execute';
datas[i] = obj;
}
function journal_submit_unpost(datas) {
journal_submit_unpost(datas);
}
function on_loan_journal_header_query(ds, qpara) {
qpara['gld_flag'] = 'N';
}
function hls301_bp_send() {
Leaf.showConfirm('提示', '商业伙伴(项目已创建合同)同步至SBO,(上限400)您确定继续吗?', function() {
lock_current_window();
Leaf.request({
url: $('hls_journal_unpost_to_gld_link').getUrl(),
para: datas,
success: function(res) {
f_hls.winNoMask();
url: $('hls301_send_bp_to_sbo').getUrl(),
success: function() {
Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000
msg: '提交成功',
duration: 3000
});
$('hls_journal_header_result_ds').query();
unlock_current_window();
//$('hls_journal_header_result_ds').query();
},
failure: function() {
f_hls.winNoMask();
unlock_current_window();
},
error: function() {
f_hls.winNoMask();
unlock_current_window();
},
scope: this
});
});
}
//手动传输凭证
function hls301_journal_send() {
var je_detail_count = 0;
var count = 0;
var batch_flag;
var records = $('hls_journal_header_result_ds').getSelected();
var limit = '${get_limit/record/@sbo_limit}';
var sbo_detail_limit = '${get_limit/record/@sbo_detail_limit}';
if (isNaN(limit)){
Leaf.showMessage('${l:HLS.PROMPT}', '传输上限获取失败,请联系管理员!');
return;
}
function hls301_journal_unpost() {
f_hls.winMask();
var ds = $('hls_journal_header_result_ds');
var records = ds.getSelected();
if (records.length == 0) {
f_hls.winNoMask();
if (records.length < 1) {
Leaf.showMessage('${l:HLS.PROMPT}', '请选择至少一条数据');
return;
}
var datas = [];
for (var i = 0;i < records.length;i++) {
if (records[i].get('post_gl_status') == 'Y' || records[i].get('post_gl_status') == 'PROCESSING') {
Leaf.showMessage('${l:HLS.PROMPT}', '该凭证已传输至SBO系统');
return;
}
var datas = [];
for (var i = 0;i < records.length;i++) {
var obj = {};
obj['journal_header_id'] = records[i].get('journal_header_id');
obj['_status'] = 'execute';
datas[i] = obj;
}
journal_submit_unpost(datas);
je_detail_count = Number(records[i].get('je_detail_count'));
count = je_detail_count + Number(count);
var data = {
journal_header_id: records[i].get('journal_header_id')
};
datas.push(data);
}
function on_loan_journal_header_query(ds, qpara) {
qpara['gld_flag'] = 'N';
/* if (count > limit) {
batch_flag = 'Y';
} else {
batch_flag = 'N';
} */
if (count > sbo_detail_limit) {
Leaf.showMessage('${l:HLS.PROMPT}', '选择的凭证总行数超过了能够传输的最大的数量' + sbo_detail_limit + '条,')
return;
}
batch_flag = 'Y'; // 全部修改为异步传输
var queryParams = new Object();
queryParams['details'] = datas;
queryParams['batch_flag'] = batch_flag;
/* if (count > limit) {
Leaf.showConfirm('提示', '由于凭证行数超过'+limit+'行,传输至SBO后不能立即得到返回结果,您确定继续吗?', function() { */
lock_current_window2('正在传送,请勿离开当前界面。。。');
Leaf.request({
url: $('hls301_send_data').getUrl(),
para: queryParams,
success: function() {
Leaf.SideBar.show({
msg: '已提交请求',
duration: 3000
});
unlock_current_window();
$('hls_journal_header_result_ds').query();
},
failure: function() {
unlock_current_window();
},
error: function() {
unlock_current_window();
},
scope: this
});
/* });
} else {
lock_current_window2('正在传送,请勿离开当前界面。。。');
Leaf.request({
url: $('hls301_send_data').getUrl(),
para: queryParams,
success: function() {
Leaf.SideBar.show({
msg: '已提交请求',
duration: 3000
});
unlock_current_window();
$('hls_journal_header_result_ds').query();
},
failure: function() {
unlock_current_window();
},
error: function() {
unlock_current_window();
},
scope: this
});
} */
}
function hls_journal_header_result_func(record, name) {
if (name == 'post_gl_log') {
return 'hls_journal_headers_grid_textArea_id';
}
return '';
}
function select_check_box(record) {
if (record.get('post_gl_status') == 'Y' || record.get('post_gl_status') == 'PROCESSING') {
return false;
} else if (record.get('post_gl_status') == 'FAILURE') {
return true;
}
if (record.get('je_transaction_code') == 'HL_PAYMENT_FEE_1') {
return true;
} else if (record.get('je_transaction_code') == 'HL_PAYMENT_FEE') {
return true;
} else {
return true;
}
}
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets>
......@@ -428,7 +448,7 @@
<a:field name="period_name"/>
<a:field name="external_journal_num"/>
<a:field name="bp_id_tenant"/>
<a:field name="bp_id_tenant_desc" lovGridHeight="350" lovHeight="550" lovService="basic.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="500">
<a:field name="bp_id_tenant_desc" lovGridHeight="400" lovHeight="550" lovService="hls.HLS301.hls_bp_master_v_for_lov" lovWidth="500">
<a:mapping>
<a:map from="bp_name" to="bp_id_tenant_desc"/>
<a:map from="bp_id" to="bp_id_tenant"/>
......@@ -489,7 +509,7 @@
<a:event name="update" handler="onUpdate_para_journalQueryDs"/>
</a:events>
</a:dataSet>
<a:dataSet id="hls_journal_header_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS301.hls_journal_header_v" queryDataSet="hls_journal_header_query" selectable="true">
<a:dataSet id="hls_journal_header_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS301.hls_journal_header_v" queryDataSet="hls_journal_header_query" selectFunction="select_check_box" selectable="true">
<a:fields>
<a:field name="post_gl_log" readOnly="true"/>
</a:fields>
......@@ -501,17 +521,17 @@
<a:screenBody>
<a:screenTopToolbar>
<a:screenTitle/>
<!-- <a:toolbarButton click="hls301_journal_exit" text="HLS.EXIT"/> -->
<a:toolbarButton click="hls301_journal_query" text="HLS.QUERY"/>
<a:toolbarButton click="hls301_journal_exit" text="HLS.EXIT"/>
<a:toolbarButton click="hls301_journal_reset" text="HLS.RESET"/>
<a:toolbarButton click="hls301_journal_query" text="HLS.QUERY"/>
<a:toolbarButton click="hls301_journal_new" text="手工创建"/>
<a:toolbarButton id="hls301_journal_post_ref_id" click="hls_journal_post_kingdee" text="凭证传输"/>
<a:toolbarButton id="hls301_journal_close_id" click="hls_journal_close" text="凭证关闭"/>
<a:toolbarButton click="hls301_journal_send" text="凭证传输"/>
<a:toolbarButton click="hls301_bp_send" text="商业伙伴传输"/>
<!-- <a:toolbarButton id="hls301_journal_post_ref_id" click="hls301_journal_post_ref" text="传辅助段"/> -->
<!-- <a:toolbarButton click="hls301_journal_post" text="HLS530.JOURNAL_POST_GL"/> -->
<!-- <a:toolbarButton click="hls301_journal_unpost" text="HLS530.JOURNAL_UNPOST_GL"/> -->
</a:screenTopToolbar>
<a:form column="5" labelSeparator=" " labelWidth="100" marginWidth="80" title="HAP_QUERY_TITLE">
<a:form column="5" labelSeparator=" " labelWidth="100" marginWidth="40" title="HAP_QUERY_TITLE">
<a:textField name="journal_num" bindTarget="hls_journal_header_query" prompt="HLS530.JOURNAL_NUM"/>
<a:comboBox name="merge_parent_flag_desc" bindTarget="hls_journal_header_query" prompt="合并凭证"/>
<!-- <a:lov name="account_code_from" bindTarget="hls_journal_header_query" prompt="HLS530.ACCOUNT_NAME_FROM"/>
......@@ -522,13 +542,13 @@
<a:numberField name="total_amount_dr_from" allowFormat="true" bindTarget="hls_journal_header_query" prompt="HLS530.TOTAL_AMOUNT_DR_FROM"/>
<a:numberField name="total_amount_dr_to" allowFormat="true" bindTarget="hls_journal_header_query" prompt="HLS530.TOTAL_AMOUNT_DR_TO"/>
<a:lov name="je_transaction_desc" bindTarget="hls_journal_header_query" prompt="HLS530.JE_TRANSACTION"/>
<a:lov name="bp_id_tenant_desc" bindTarget="hls_journal_header_query" prompt="HLS.TENANT_CODE"/>
<a:lov name="bp_id_tenant_desc" bindTarget="hls_journal_header_query" prompt="商业伙伴"/>
<a:comboBox name="post_gl_status_desc" bindTarget="hls_journal_header_query" prompt="HLS530.IS_POSTED"/>
<a:textField name="contract_number" bindTarget="hls_journal_header_query" prompt="合同编号"/>
<!-- <a:textField name="external_journal_num" bindTarget="hls_journal_header_query" prompt="HLS530.EXTERNAL_JOURNAL_NUM"/> -->
<!-- <a:textField name="reference1" bindTarget="hls_journal_header_query" prompt="HLS530.REFERENCE1"/> -->
</a:form>
<a:grid id="hls_journal_headers_grid" bindTarget="hls_journal_header_result_ds" marginHeight="280" marginWidth="80" navBar="true" >
<a:grid id="hls_journal_headers_grid" bindTarget="hls_journal_header_result_ds" marginHeight="250" marginWidth="40" navBar="true">
<a:columns>
<a:column name="journal_num" lock="true" prompt="HLS530.JOURNAL_NUM" renderer="hls301_journal_num_render" width="120"/>
<a:column name="js_company_short_name" prompt="HLS530.JOURNAL_COMPANY" width="90"/>
......@@ -540,7 +560,10 @@
<a:column name="je_transaction_desc" prompt="HLS530.JE_TRANSACTION" width="150"/>
<a:column name="description" prompt="HLS530.JOURNAL_DESCRIPTION" width="220"/>
<a:column name="post_gl_status_desc" align="center" prompt="HLS.STATUS" width="100"/>
<!-- <a:column name="external_journal_num" align="center" prompt="NC凭证号" width="100"/> -->
<a:column name="je_detail_count" prompt="凭证行数量" width="50"/>
<a:column name="sbo_num" align="center" prompt="SBO凭证号" width="100"/>
<a:column name="post_gl_log" editorFunction="hls_journal_header_result_func" prompt="传输信息" width="150"/>
<a:column name="sbo_req_number" align="center" prompt="SBO请求批次号" width="130"/>
<!--<a:column name="post_gl_log" editor="hls530_textArea_id" prompt="金蝶日志" width="200"/> -->
</a:columns>
<a:editors>
......
......@@ -7,185 +7,146 @@
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" dynamiccreateenabled="true" trace="true">
<a:init-procedure><![CDATA[
]]></a:init-procedure>
]]></a:init-procedure>
<a:view>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
<a:link id="get_new_journal_num_link_id" model="hls.HLS530.get_new_journal_number" modelaction="update"/>
<a:link id="get_kingdee_line_flag" model="hls.HLS301.get_kingdee_line_flag" modelaction="update"/>
<script src="${/request/@context_path}/javascripts/jquery-1.6.4.min.js" type="text/javascript"/>
<script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
<style type="text/css"><![CDATA[
.SelectBG{
background-color:#FFC0CB;
}
]]></style>
<script type="text/javascript"><![CDATA[
jQuery.noConflict();
var isLoaded = 'N';
// set单元格颜色 load事件无法实现效果
var check_isload = setInterval(function() {
//
if (isLoaded == 'N') {
var ids = $('${/parameter/@layout_code}_JE_LN_hls_journal_detail_ds');
var ref_ids = $('${/parameter/@layout_code}_JE_LN_REF1_hls_journal_detail_ds');
var idsRecord = ids.getAll();
var ref_idsRecord = ref_ids.getAll();
for (var i = 0;i < idsRecord.length;i++) {
var rowData = idsRecord[i];
var ids_rowData = idsRecord[i];
var kingdee_line_flag = ids_rowData.get('kingdee_line_flag');
//kingdee_line_flag为C代表金蝶支付表编号不为空,为B代表金蝶客户编号不为空
if (kingdee_line_flag == 'N' || kingdee_line_flag == 'C' || kingdee_line_flag == 'B') {
tr_id = '#${/parameter/@layout_code}_JE_LN_hls_journal_detail_layout_grid_id-u-' + rowData.id;
jQuery(tr_id).removeClass("row-selected").addClass('SelectBG');
}
}
for (var j = 0;j < ref_idsRecord.length;j++) {
var ref_rowData = ref_idsRecord[j];
kingdee_line_flag = ref_rowData.get('kingdee_line_flag');
//kingdee_line_flag为C代表金蝶支付表编号不为空,为B代表金蝶客户编号不为空
if (kingdee_line_flag == 'N') {
tr_ref_id = '#${/parameter/@layout_code}_JE_LN_REF1_hls_journal_detail_layout_grid_id_reference1_' + ref_rowData.id;
jQuery(tr_ref_id).removeClass("row-selected").addClass('SelectBG');
tr_ref_id_2 = '#${/parameter/@layout_code}_JE_LN_REF1_hls_journal_detail_layout_grid_id_reference3_' + ref_rowData.id;
jQuery(tr_ref_id_2).removeClass("row-selected").addClass('SelectBG');
} else if (kingdee_line_flag == 'C') {
tr_ref_id = '#${/parameter/@layout_code}_JE_LN_REF1_hls_journal_detail_layout_grid_id_reference3_' + ref_rowData.id;
jQuery(tr_ref_id).removeClass("row-selected").addClass('SelectBG');
} else if (kingdee_line_flag == 'B') {
tr_ref_id = '#${/parameter/@layout_code}_JE_LN_REF1_hls_journal_detail_layout_grid_id_reference1_' + ref_rowData.id;
jQuery(tr_ref_id).removeClass("row-selected").addClass('SelectBG');
}
}
} else {
clearInterval(check_isload);
}
}, 1000);
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
var journal_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
var detail_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_LN', 'hls_journal_detail');
var journal_record = $(journal_ds_id).getAt(0);
var je_records = $(detail_ds_id).getAll();
var sum_dr = 0;
var sum_cr = 0;
for (var i = 0;i < je_records.length;i++) {
var je_record = je_records[i];
if (!isNaN(je_record.get('amount_dr'))) {
sum_dr = plus(sum_dr, je_record.get('amount_dr'));
}
if (!isNaN(je_record.get('amount_cr'))) {
sum_cr = plus(sum_cr, je_record.get('amount_cr'));
}
<a:link id="get_document_type_id" model="csh.CSH511.get_document_type" modelaction="update"/>
<script><![CDATA[
window['${/parameter/@layout_code}_on_layout_dynamic_before_submit'] = function(ds, record) {
var journal_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
var detail_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_LN', 'hls_journal_detail');
var journal_record = $(journal_ds_id).getAt(0);
var je_records = $(detail_ds_id).getAll();
var sum_dr = 0;
var sum_cr = 0;
for (var i=0;i<je_records.length;i++){
var je_record = je_records[i];
if(!isNaN(je_record.get('amount_dr'))){
sum_dr = (Number(sum_dr) + Number(je_record.get('amount_dr'))).toFixed(2);
}
var check_flag = false;
if ((sum_dr != sum_cr) && (sum_dr != 0)) {
Leaf.showMessage('提示', '借贷总额必须相等');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false;
} else {
if (journal_record.get('journal_num')) {
return true;
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('get_new_journal_num_link_id').getUrl(),
para: {
document_category: '${/parameter/@document_category}',
document_type: record.get('document_type')
},
success: function(res) {
var document_number = res.result.document_number;
journal_record.set('journal_num', document_number);
check_flag = true;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
return check_flag;
if(!isNaN(je_record.get('amount_cr'))){
sum_cr = (Number(sum_cr) + Number(je_record.get('amount_cr'))).toFixed(2);
}
};
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
}
var check_flag = false;
if((sum_dr != sum_cr)&&(sum_dr != 0)){
Leaf.showMessage('提示','借贷总额必须相等');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var detail1_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_LN_REF1', 'hls_journal_detail');
$(detail1_ds_id).query();
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
if (name == 'journal_date') {
var journal_date = record.get('journal_date');
journal_date = Leaf.formatDate(journal_date);
Leaf.request({
url: $('get_period_name_id').getUrl(),
para: {
p_date: journal_date
},
success: periodname,
scope: this
});
} else if (name == 'amount_dr') {
record.set('amount_fuc_dr', value);
} else if (name == 'amount_cr') {
record.set('amount_fuc_cr', value);
}
};
function periodname(res) {
var journal_ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
var journal_record1 = $(journal_ds_id1).getAt(0);
if (res) {
var period_name = res.result.record.period_name;
var period_year = res.result.record.period_year;
var period_num = res.result.record.period_num;
var internal_period_num = res.result.record.internal_period_num;
var period_set_code = res.result.record.period_set_code;
journal_record1.set('period_name', period_name);
journal_record1.set('period_year', period_year);
journal_record1.set('period_num', period_num);
journal_record1.set('internal_period_num', internal_period_num);
journal_record1.set('period_set_code', period_set_code);
return false;
}else{
if (journal_record.get('journal_num')) {
return true;
}
window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
Leaf.request({
url: $('get_new_journal_num_link_id').getUrl(),
para: {
document_category: '${/parameter/@document_category}',
document_type: record.get('document_type')
},
success: function(res) {
var document_number = res.result.document_number;
journal_record.set('journal_num', document_number);
check_flag = true;
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
error: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
failure: function() {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
},
sync: true,
scope: this
});
return check_flag;
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
var bp_info_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
var manual_flag = '${/parameter/@manual_flag}';
if (manual_flag == 'Y') {
record.set('je_company_id', 1);
record.set('je_company_id_n', '宏菱融资租赁(上海)有限公司');
record.set('je_transaction_code', 'MANUAL');
record.set('je_transaction_code_n', '手工生成');
record.set('post_gl_status', 'N');
record.set('currency_code', 'CNY');
record.set('currency_code_n', '人民币')
record.set('exchange_rate', 1);
record.set('reversed_flag', 'N');
record.set('source_table', 'HLS_JOURNAL_HEADER');
record.set('company_id', 1);
}
};
//导出
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
var ds_id = '${/parameter/@layout_code}_JE_LN_hls_journal_detail_ds';
var ref_ds_id = '${/parameter/@layout_code}_JE_LN_REF1_hls_journal_detail_ds';
var grid_id = ds_id.replace('ds', 'layout_grid_id');
var ref_grid_id = ref_ds_id.replace('ds', 'layout_grid_id');
$(grid_id)._export();
$(ref_grid_id)._export();
};
};
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
var detail1_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_LN_REF1', 'hls_journal_detail');
var header_ds_id = get_dsid_by_tabcode_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'JE_HD', 'hls_journal_header');
$(detail1_ds_id).query();
var header_ds_record = $(header_ds_id).getAt(0);
var document_type = header_ds_record.get('document_type');
var journal_num = header_ds_record.get('journal_num');
if (!header_ds_record.get('post_gl_status')){
header_ds_record.set('post_gl_status', 'N');
}
header_ds_record.set('reversed_flag', 'N');
if (name = 'document_type') {
Leaf.request({
url: $('get_document_type_id').getUrl(),
para: {
document_type: document_type,
//journal_header_id: '${/parameter/@journal_header_id}',
journal_num: journal_num
},
success: periodname,
scope: this
});
}
};
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
if(name=='journal_date'){
var journal_date = record.get('journal_date');
journal_date = Leaf.formatDate(journal_date);
Leaf.request({
url: $('get_period_name_id').getUrl(),
para: {
p_date: journal_date
},
success: periodname,
scope: this
});
}else if(name=='amount_dr'){
record.set('amount_fuc_dr',value);
}else if(name=='amount_cr'){
record.set('amount_fuc_cr',value);
}
};
function periodname(res) {
var journal_ds_id1 = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
var journal_record1 = $(journal_ds_id1).getAt(0);
if (res) {
var period_name = res.result.record.period_name;
var period_year = res.result.record.period_year;
var period_num = res.result.record.period_name.substring(5, 7);
var internal_period_num = res.result.record.internal_period_num;
var period_set_code = res.result.record.period_set_code;
journal_record1.set('period_name', period_name);
journal_record1.set('period_year', period_year);
journal_record1.set('period_num', period_num);
journal_record1.set('internal_period_num', internal_period_num);
journal_record1.set('period_set_code', period_set_code);
}
}
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) {
var bp_info_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
record.set('je_company_id', 1);
record.set('je_company_id_n', '宏菱租赁');
record.set('currency_code', 'CNY');
record.set('currency_code_n', '人民币');
// record.set('je_transaction_code', 'MANUAL');
// record.set('je_transaction_code_n', '手工生成');
//record.set('post_gl_status', 'N');
if(!record.get('post_gl_status')){
record.set('post_gl_status', 'N');
}
record.set('exchange_rate', 1);
record.set('reversed_flag', 'N');
record.set('source_table', 'hls_journal_header');
record.set('company_id', 1);
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
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