Commit c909673e authored by Darming's avatar Darming

[refactor]bug调整

parent 8431cb75
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
t.collection_classes, t.collection_classes,
t.bp_id, t.bp_id,
t.paid_byother_flag, 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, FROM fnd_interface_headers hd,
fnd_interface_lines li, fnd_interface_lines li,
......
...@@ -635,7 +635,7 @@ ...@@ -635,7 +635,7 @@
<a:field name="currency_code_to"/> <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="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="not_reversed_flag_r" defaultValue="NOT"/>
<a:field name="receipt_type"/> <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"/> <a:field name="receipt_type_des" displayField="code_value_name" options="receipt_type_ds" returnField="receipt_type" valueField="code_value"/>
......
...@@ -7,8 +7,8 @@ ...@@ -7,8 +7,8 @@
--> -->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true"> <a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure> <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 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:init-procedure>
<a:view> <a:view>
<a:link id="hls_journal_manual_create_link_id" url="${/request/@context_path}/modules/hls/HLS530/manual_journal_create.lview"/> <a:link id="hls_journal_manual_create_link_id" url="${/request/@context_path}/modules/hls/HLS530/manual_journal_create.lview"/>
...@@ -19,19 +19,11 @@ ...@@ -19,19 +19,11 @@
<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_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="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="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_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}/transfer_voucher.lsc"/>
<a:link id="transfer_voucher_link" url="${/request/@context_path}/modules/interface/INTERFACE_KINGDEE/kingdee_importvoucher_interface.lsc"/> <a:link id="hls301_send_data" url="${/request/@context_path}/modules/hls/HLS301/hls_journal_send.lsc"/>
<a:link id="kingdee_interface_logs_id" url="${/request/@context_path}/modules/hls/HLS530/kingdee_interface_logs.lview"/> <a:link id="hls301_send_bp_to_sbo" model="hls.HLS301.hls_bp_post_to_sbo" modelaction="update"/>
<a:link id="hls_journal_close_link" model="hls.HLS530.hls_journal_close" modelaction="batch_update"/> <script><![CDATA[
<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';
}
}
//查询按钮 //查询按钮
function hls301_journal_query() { function hls301_journal_query() {
...@@ -49,6 +41,18 @@ ...@@ -49,6 +41,18 @@
parent.shMenu('show'); 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() { function construct_from_to() {
var config = ['responsibility_center_code', 'responsibility_center_name', 'account_code', 'account_name']; var config = ['responsibility_center_code', 'responsibility_center_name', 'account_code', 'account_name'];
var pattern = ['_from', '_to']; var pattern = ['_from', '_to'];
...@@ -82,7 +86,6 @@ ...@@ -82,7 +86,6 @@
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
param['maintain_type'] = 'UPDATE'; param['maintain_type'] = 'UPDATE';
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}'; 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'); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_manual_create_link_id');
} }
...@@ -103,7 +106,6 @@ ...@@ -103,7 +106,6 @@
param['function_usage'] = 'MODIFY'; param['function_usage'] = 'MODIFY';
param['maintain_type'] = maintain_type; param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS530.JOURNAL_LINE_MODIFY}'; 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'); hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_manual_create_link_id');
} }
...@@ -162,6 +164,7 @@ ...@@ -162,6 +164,7 @@
}); });
transfer_ref_flag = 'Y'; transfer_ref_flag = 'Y';
//hls301_journal_query(); //hls301_journal_query();
}, },
failure: function() { failure: function() {
f_hls.winNoMask(); f_hls.winNoMask();
...@@ -173,69 +176,9 @@ ...@@ -173,69 +176,9 @@
}); });
} }
// function hls301_journal_post() { function hls301_journal_post() {
// var url=$('test_link').getUrl(); debugger;
// if(0){ var url = $('test_link').getUrl();
// 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) { if (0) {
Leaf.showMessage('${l:HLS.PROMPT}', '请先传递凭证辅助段'); Leaf.showMessage('${l:HLS.PROMPT}', '请先传递凭证辅助段');
} else { } else {
...@@ -244,53 +187,41 @@ ...@@ -244,53 +187,41 @@
var records = ds.getSelected(); var records = ds.getSelected();
if (records.length == 0) { if (records.length == 0) {
f_hls.winNoMask(); f_hls.winNoMask();
Leaf.showMessage('${l:HLS.PROMPT}', '请选择一条数据');
return; return;
} }
var datas = []; var datas = [];
for (var i = 0;i < records.length;i++) { 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 = {}; var obj = {};
obj['journal_id'] = records[i].get('journal_header_id'); obj['journal_id'] = records[i].get('journal_header_id');
obj['_status'] = 'update'; obj['_status'] = 'update';
datas[i] = obj; 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.showConfirm('提示', '确定导入凭证到金蝶吗?', function() {
Leaf.request({ Leaf.request({
url: $('check_link').getUrl(), url: $('check_link').getUrl(),
para: datas, para: datas,
success: function(res) { success: function(res) {
Leaf.request({ Leaf.request({
url: url, url: url,
para: datas, para: datas,
success: function(res) { success: function(res) {
f_hls.winNoMask(); f_hls.winNoMask();
Leaf.SideBar.show({ Leaf.SideBar.show({
msg: '${l:HLS.SUBMIT_SUCCESS}', msg: '${l:HLS.SUBMIT_SUCCESS}',
duration: 2000 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(); hls301_journal_query();
});
}, },
failure: function() { failure: function() {
f_hls.winNoMask(); f_hls.winNoMask();
...@@ -300,6 +231,7 @@ ...@@ -300,6 +231,7 @@
}, },
scope: this scope: this
}); });
}, },
failure: function() { failure: function() {
f_hls.winNoMask(); f_hls.winNoMask();
...@@ -309,60 +241,9 @@ ...@@ -309,60 +241,9 @@
}, },
scope: this scope: this
}); });
}, function() {
f_hls.winNoMask();
});
}
}
//凭证关闭
function hls_journal_close() {
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++) {
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
});
}, function() {
f_hls.winNoMask();
});
} }
function journal_submit_unpost(datas) { function journal_submit_unpost(datas) {
...@@ -408,6 +289,145 @@ ...@@ -408,6 +289,145 @@
function on_loan_journal_header_query(ds, qpara) { function on_loan_journal_header_query(ds, qpara) {
qpara['gld_flag'] = 'N'; qpara['gld_flag'] = 'N';
} }
function hls301_bp_send() {
Leaf.showConfirm('提示', '商业伙伴(项目已创建合同)同步至SBO,(上限400)您确定继续吗?', function() {
lock_current_window();
Leaf.request({
url: $('hls301_send_bp_to_sbo').getUrl(),
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 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;
}
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;
}
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);
}
/* 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> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<a:dataSets> <a:dataSets>
...@@ -428,7 +448,7 @@ ...@@ -428,7 +448,7 @@
<a:field name="period_name"/> <a:field name="period_name"/>
<a:field name="external_journal_num"/> <a:field name="external_journal_num"/>
<a:field name="bp_id_tenant"/> <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:mapping>
<a:map from="bp_name" to="bp_id_tenant_desc"/> <a:map from="bp_name" to="bp_id_tenant_desc"/>
<a:map from="bp_id" to="bp_id_tenant"/> <a:map from="bp_id" to="bp_id_tenant"/>
...@@ -489,7 +509,7 @@ ...@@ -489,7 +509,7 @@
<a:event name="update" handler="onUpdate_para_journalQueryDs"/> <a:event name="update" handler="onUpdate_para_journalQueryDs"/>
</a:events> </a:events>
</a:dataSet> </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:fields>
<a:field name="post_gl_log" readOnly="true"/> <a:field name="post_gl_log" readOnly="true"/>
</a:fields> </a:fields>
...@@ -501,17 +521,17 @@ ...@@ -501,17 +521,17 @@
<a:screenBody> <a:screenBody>
<a:screenTopToolbar> <a:screenTopToolbar>
<a:screenTitle/> <a:screenTitle/>
<!-- <a:toolbarButton click="hls301_journal_exit" text="HLS.EXIT"/> --> <a:toolbarButton click="hls301_journal_exit" text="HLS.EXIT"/>
<a:toolbarButton click="hls301_journal_query" text="HLS.QUERY"/>
<a:toolbarButton click="hls301_journal_reset" text="HLS.RESET"/> <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 click="hls301_journal_new" text="手工创建"/>
<a:toolbarButton id="hls301_journal_post_ref_id" click="hls_journal_post_kingdee" text="凭证传输"/> <a:toolbarButton click="hls301_journal_send" text="凭证传输"/>
<a:toolbarButton id="hls301_journal_close_id" click="hls_journal_close" text="凭证关闭"/> <a:toolbarButton click="hls301_bp_send" text="商业伙伴传输"/>
<!-- <a:toolbarButton id="hls301_journal_post_ref_id" click="hls301_journal_post_ref" 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_post" text="HLS530.JOURNAL_POST_GL"/> -->
<!-- <a:toolbarButton click="hls301_journal_unpost" text="HLS530.JOURNAL_UNPOST_GL"/> --> <!-- <a:toolbarButton click="hls301_journal_unpost" text="HLS530.JOURNAL_UNPOST_GL"/> -->
</a:screenTopToolbar> </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: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: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"/> <!-- <a:lov name="account_code_from" bindTarget="hls_journal_header_query" prompt="HLS530.ACCOUNT_NAME_FROM"/>
...@@ -522,13 +542,13 @@ ...@@ -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_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: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="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: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="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="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:textField name="reference1" bindTarget="hls_journal_header_query" prompt="HLS530.REFERENCE1"/> -->
</a:form> </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:columns>
<a:column name="journal_num" lock="true" prompt="HLS530.JOURNAL_NUM" renderer="hls301_journal_num_render" width="120"/> <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"/> <a:column name="js_company_short_name" prompt="HLS530.JOURNAL_COMPANY" width="90"/>
...@@ -540,7 +560,10 @@ ...@@ -540,7 +560,10 @@
<a:column name="je_transaction_desc" prompt="HLS530.JE_TRANSACTION" width="150"/> <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="description" prompt="HLS530.JOURNAL_DESCRIPTION" width="220"/>
<a:column name="post_gl_status_desc" align="center" prompt="HLS.STATUS" width="100"/> <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:column name="post_gl_log" editor="hls530_textArea_id" prompt="金蝶日志" width="200"/> -->
</a:columns> </a:columns>
<a:editors> <a:editors>
......
...@@ -11,58 +11,8 @@ ...@@ -11,58 +11,8 @@
<a:view> <a:view>
<a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/> <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_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"/> <a:link id="get_document_type_id" model="csh.CSH511.get_document_type" modelaction="update"/>
<script src="${/request/@context_path}/javascripts/jquery-1.6.4.min.js" type="text/javascript"/> <script><![CDATA[
<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) { 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 journal_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_journal_header');
...@@ -71,21 +21,21 @@ ...@@ -71,21 +21,21 @@
var je_records = $(detail_ds_id).getAll(); var je_records = $(detail_ds_id).getAll();
var sum_dr = 0; var sum_dr = 0;
var sum_cr = 0; var sum_cr = 0;
for (var i = 0;i < je_records.length;i++) { for (var i=0;i<je_records.length;i++){
var je_record = je_records[i]; var je_record = je_records[i];
if (!isNaN(je_record.get('amount_dr'))) { if(!isNaN(je_record.get('amount_dr'))){
sum_dr = plus(sum_dr, je_record.get('amount_dr')); sum_dr = (Number(sum_dr) + Number(je_record.get('amount_dr'))).toFixed(2);
} }
if (!isNaN(je_record.get('amount_cr'))) { if(!isNaN(je_record.get('amount_cr'))){
sum_cr = plus(sum_cr, je_record.get('amount_cr')); sum_cr = (Number(sum_cr) + Number(je_record.get('amount_cr'))).toFixed(2);
} }
} }
var check_flag = false; var check_flag = false;
if ((sum_dr != sum_cr) && (sum_dr != 0)) { if((sum_dr != sum_cr)&&(sum_dr != 0)){
Leaf.showMessage('提示', '借贷总额必须相等'); Leaf.showMessage('提示','借贷总额必须相等');
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
return false; return false;
} else { }else{
if (journal_record.get('journal_num')) { if (journal_record.get('journal_num')) {
return true; return true;
} }
...@@ -119,11 +69,32 @@ ...@@ -119,11 +69,32 @@
window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) { window['${/parameter/@layout_code}_on_layout_dynamic_submitsuccess'] = function(ds, record, res, bp_seq) {
window['${/parameter/@layout_code}_unlock_layout_dynamic_window'](); 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 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(); $(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) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
if (name == 'journal_date') { if(name=='journal_date'){
var journal_date = record.get('journal_date'); var journal_date = record.get('journal_date');
journal_date = Leaf.formatDate(journal_date); journal_date = Leaf.formatDate(journal_date);
Leaf.request({ Leaf.request({
...@@ -134,10 +105,10 @@ ...@@ -134,10 +105,10 @@
success: periodname, success: periodname,
scope: this scope: this
}); });
} else if (name == 'amount_dr') { }else if(name=='amount_dr'){
record.set('amount_fuc_dr', value); record.set('amount_fuc_dr',value);
} else if (name == 'amount_cr') { }else if(name=='amount_cr'){
record.set('amount_fuc_cr', value); record.set('amount_fuc_cr',value);
} }
}; };
...@@ -147,7 +118,7 @@ ...@@ -147,7 +118,7 @@
if (res) { if (res) {
var period_name = res.result.record.period_name; var period_name = res.result.record.period_name;
var period_year = res.result.record.period_year; var period_year = res.result.record.period_year;
var period_num = res.result.record.period_num; var period_num = res.result.record.period_name.substring(5, 7);
var internal_period_num = res.result.record.internal_period_num; var internal_period_num = res.result.record.internal_period_num;
var period_set_code = res.result.record.period_set_code; var period_set_code = res.result.record.period_set_code;
journal_record1.set('period_name', period_name); journal_record1.set('period_name', period_name);
...@@ -160,32 +131,22 @@ ...@@ -160,32 +131,22 @@
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_form_add_and_load'] = function(ds, record, config_records, bp_seq) { 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 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', 1);
record.set('je_company_id_n', '宏菱融资租赁(上海)有限公司'); 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', 'CNY');
record.set('currency_code_n', '人民币') 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('exchange_rate', 1);
record.set('reversed_flag', 'N'); record.set('reversed_flag', 'N');
record.set('source_table', 'HLS_JOURNAL_HEADER'); record.set('source_table', 'hls_journal_header');
record.set('company_id', 1); 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();
};
]]></script> ]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/> <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view> </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