Commit ca6d5023 authored by lizhe's avatar lizhe

日立返还金相关修改

parent 7056617a
......@@ -4,7 +4,7 @@
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT *
SELECT vv.*,(select v.code_value_name value_name from sys_code_values_v v where v.code ='YES_NO' and v.code_value = vv.rl_flag) rl_flag_n
FROM (select t2.journal_line_id,
t2.journal_header_id,
cc.company_id,
......@@ -78,7 +78,15 @@
cc.termination_date,
cc.lease_channel,
t2.cf_direction,
t2.billing_status,
nvl(t2.billing_status,'NOT') billing_status,
(select v.code_value_name value_name from sys_code_values_v v where v.code ='CON_BILLING_STATUS' and v.code_value = nvl(t2.billing_status,'NOT')) billing_status_n,
case when acr_invoice_pkg.check_rl_cf_flag(cc.contract_id,t2.cf_item,t2.times)= 'Y' and
acr_invoice_pkg.check_rl_flag(cc.contract_id) = 'Y'
then
'Y'
else
''
end rl_flag,
t2.cf_status,
cc.business_type,
(SELECT bt.description
......@@ -324,7 +332,8 @@
<bm:query-field name="invoice_method" queryExpression="vv.invoice_method = ${@invoice_method}"/>
<bm:query-field name="division" queryExpression="vv.division = ${@division}"/>
<bm:query-field name="invoice_type" queryExpression="vv.invoice_type = ${@invoice_type}"/>
<bm:query-field name="rl_flag" queryExpression="vv.rl_flag = ${@rl_flag}"/>
<bm:query-field name="billing_status" queryExpression="vv.billing_status = ${@billing_status}"/>
</bm:query-fields>
<bm:data-filters>
<bm:data-filter enforceOperations="query" expression="vv.contract_status not in ('CANCEL')"/>
......
......@@ -37,9 +37,9 @@
<bm:field name="billing_object_name" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="contract_status" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="cf_status" databaseType="VARCHAR2" datatype="java.lang.String"/>
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE_N" prompt="发票种类"/>
<bm:field name="invoice_kind_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE"/>
<bm:field name="invoice_kind_type_n" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="INVOICE_KIND_TYPE_N" prompt="发票种类"/>
<bm:field name="rl_flag"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -56,12 +56,13 @@
where m.bp_id =t.bp_id) billing_object_name,
t.due_amount,
-- t.billing_amount,
/*-- t.billing_amount,
(case when cf.cf_item= 1 and cf.cf_status='BLOCK' then
t.received_amount-nvl(t.cf_billing_amount,0)
else
t.due_amount-nvl(t.cf_billing_amount,0)
end )billing_amount,
end )billing_amount,*/
t.billing_amount,
t.cf_billing_amount,
t.received_amount,
t.contract_id,
......@@ -101,6 +102,13 @@
from sys_code_values_v v
where v.code = 'ACR512_INVOICE_KIND_TYPE'
and v.code_value = t.invoice_kind_type) invoice_kind_type_n
, case when acr_invoice_pkg.check_rl_cf_flag(con.contract_id,cf.cf_item,cf.times)= 'Y' and
acr_invoice_pkg.check_rl_flag(con.contract_id) = 'Y'
then
'Y'
else
''
end rl_flag
from acr_invoice_create_tmp t,
con_contract_v con,
con_contract_cashflow_all_v cf,
......
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:fields>
<bm:field name="contract_id"/>
<bm:field name="contract_number" forDisplay="true" forQuery="true" prompt="HLS.CONTRACT_NUMBER"/>
<bm:field name="contract_name" forDisplay="true" forQuery="true" prompt="HLS.CONTRACT_NAME" displayWidth="350"/>
<bm:field name="bp_id_tenant"/>
<bm:field name="bp_name"/>
<bm:field name="bp_id_agent_level1"/>
<bm:field name="bp_id_agent_level1_n"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select *
from (select cc.contract_id,
cc.contract_number,
cc.contract_name,
cc.bp_id_agent_level1,
(SELECT hb.bp_name
FROM hls_bp_master hb
WHERE hb.bp_id = cc.bp_id_agent_level1) bp_id_agent_level1_n,
cc.bp_id_tenant,
(SELECT hb.bp_name
FROM hls_bp_master hb
WHERE hb.bp_id = cc.bp_id_tenant) bp_name
from con_contract cc
where cc.data_class = 'NORMAL'
and acr_invoice_pkg.check_rl_flag(cc.contract_id) = 'Y') t1
#WHERE_CLAUSE# #ORDER_BY_CLAUSE#
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field field="contract_number" queryOperator="like"/>
<!--<bm:query-field name="bp_id_agent_level1" queryExpression="((t1.bp_id_agent_level1=${@bp_id_agent_level1}) or exists (select 1 from con_contract_lease_item ccli,hls_lease_item hli where ccli.lease_item_id=hli.lease_item_id and hli.vender_id=${@bp_id_agent_level1} and t1.contract_id=ccli.contract_id))"/>-->
<bm:query-field field="bp_id_tenant" queryExpression="t1.bp_id_tenant=${@bp_id_tenant}" />
<bm:query-field name="contract_name" queryExpression="t1.contract_name like &apos;%&apos;||${@contract_name}||&apos;%&apos;"/>
</bm:query-fields>
</bm:model>
......@@ -100,6 +100,13 @@
<bm:field name="acc_confirmed_by"/>
<bm:field name="acc_confirmed_by_desc" expression="(select description from sys_user where user_id=t1.acc_confirmed_by)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_type_n" expression="(select v.code_value_name from sys_code_values_v v where v.code = 'RECEIPT_TYPE' and v.code_value =t1.receipt_type)" forInsert="false" forUpdate="false"/>
<bm:field name="receipt_sbo" forInsert="false" forUpdate="false" expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from csh_write_off cw, hls_journal_header h where cw.write_off_type = 'REFUND_ENTRY' and cw.csh_transaction_id = h.source_id and h.source_table = 'CSH_TRANSACTION' and t1.source_doc_type = cw.write_off_type and t1.source_doc_id = cw.write_off_id and exists (select 1 from hls_journal_detail d where h.journal_header_id = d.journal_header_id and cw.write_off_id = d.cashflow_id))"/>
<bm:field name="return_sbo" forInsert="false" forUpdate="false" expression="(select listagg(h.sbo_num, ',') WITHIN group(order by h.journal_num) from hls_journal_header h,csh_transaction ct where h.source_table = 'CSH_TRANSACTION' and h.source_id = ct.transaction_id and ct.return_from_csh_trx_id = t1.transaction_id and ct.returned_flag = 'RETURN')"/>
<bm:field name="tenant_account_id" forInsert="false" forUpdate="false" expression="(select cc.bank_account_id from con_contract cc where cc.contract_id = t1.ref_contract_id)"/>
<bm:field name="tenant_account_num" forInsert="false" forUpdate="false" expression="(select ha.bank_account_num from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:field name="tenant_account_name" forInsert="false" forUpdate="false" expression="(select ha.bank_account_name from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:field name="tenant_bank_name" forInsert="false" forUpdate="false" expression="(select ha.bank_full_name from con_contract cc,hls_bp_master_bank_account ha where cc.contract_id = t1.ref_contract_id and ha.bank_account_id = cc.bank_account_id)"/>
<bm:field name="return_date" forInsert="false" forUpdate="false" expression="(select listagg(to_char(ct.transaction_date,'yyyy-mm-dd'), ',') WITHIN group(order by ct.transaction_date) from csh_transaction ct where ct.return_from_csh_trx_id = t1.transaction_id and ct.returned_flag = 'RETURN')"/>
</bm:fields>
<bm:features>
<f:standard-who/>
......
......@@ -17,7 +17,22 @@
(select u.employee_name
from sys_user_v u
where u.user_id = r.created_by) user_desc,
t.transaction_num
t.transaction_num,
(SELECT listagg(h.sbo_num,',') within group (order by h.source_id)
from hls_journal_header h
WHERE r.return_transaction_id = h.source_id
and h.source_table = 'CSH_TRANSACTION') sbo_num,
(SELECT h.sbo_num
from csh_transaction ct, csh_write_off cw, hls_journal_header h
WHERE r.transaction_id = ct.transaction_id
and ct.source_doc_type = cw.write_off_type
and ct.source_doc_id = cw.write_off_id
and h.source_table = 'CSH_TRANSACTION'
and h.source_id = cw.csh_transaction_id
and exists (select 1
from hls_journal_detail d
where h.journal_header_id = d.journal_header_id
and cw.write_off_id = d.cashflow_id)) receipt_sbo_num
FROM csh_transaction_return r,
csh_transaction t
--hls_bp_master_bank_account v
......
......@@ -174,5 +174,6 @@
<bm:data-filter name="query" expression="(t1.transaction_type in ('ADVANCE_RECEIPT','RECEIPT',DECODE(${@cw_flag},'Y',NULL,DECODE(t1.source_type,NULL,NULL,'DEPOSIT'))) 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-filter name="position_code" expression="(((${@cw_flag} = 'Y') or (${@position_code} = '009' and t1.created_by != ${/session/@user_id} and (t1.paid_byother_flag = 'F' and t1.bp_category = 'TENANT' and t1.confirmed_flag != 'ACCAUDITED') or (${/session/@user_id} = 1)) or (${@position_code} = '014' and t1.created_by != ${/session/@user_id} and ((((t1.paid_byother_flag != 'F' or t1.bp_category != 'TENANT')) or t1.transaction_type = 'DEPOSIT') and t1.confirmed_flag != 'ACCAUDITED' and t1.created_by != ${/session/@user_id}) or (${/session/@user_id} = 1))))"/>
<bm:data-filter name="collection_classes" expression="(nvl(t1.collection_classes,'NON') != 'REFUND')"/>
</bm:data-filters>
</bm:model>
\ No newline at end of file
......@@ -759,6 +759,7 @@
and ccc.times > 1
and rownum = 1),
'否') cf_9_notfirsttime_exists_flag
,decode(acr_invoice_pkg.check_rl_flag(ct.contract_id), 'N', '否', 'Y', '是') rl_flag_n
FROM con_contract ct
WHERE ct.contract_status NOT IN ('CANCEL')
AND ct.data_class = 'NORMAL'
......@@ -838,7 +839,7 @@
<bm:field name="cf_9_exists_flag"/>
<bm:field name="cf_9_notfirsttime_exists_flag"/>
<bm:field name="secondary_lease_n"/>
<bm:field name="rl_flag_n"/>
</bm:fields>
<!-- <bm:query-fields>-->
<!-- <bm:query-field field="bp_id_tenant_n" queryExpression="t1.bp_id_tenant_n = ${@bp_id_tenant_n}"/>-->
......
......@@ -143,6 +143,13 @@
};
function onUpdate_selectedDs(ds,record,name,value,oldvalue){
if(name == 'billing_amount' && record.get('rl_flag') == 'Y'){
Leaf.showConfirm('提示', '此现金流为日立返还金现金流,请确认是否修改?', null, function() {
//record.set('billing_amount', oldvalue);
}, 400);
}
}
]]></script>
<style><![CDATA[
.item-radio-option {
......@@ -182,6 +189,7 @@
<a:event name="load" handler="onLoad_selectedDs"/>
<a:event name="select" handler="onSelect_selectedDs"/>
<a:event name="unselect" handler="unSelect_selectedDs"/>
<a:event name="update" handler="onUpdate_selectedDs"/>
</a:events>
</a:dataSet>
</a:dataSets>
......
......@@ -239,6 +239,7 @@
]]></script>
<a:dataSets>
<a:dataSet id="billing_status_ds" lookupCode="CON_BILLING_STATUS"/>
<a:dataSet id="acr510_bp_class" lookupCode="HLS211_BP_CLASS"/>
<a:dataSet id="taxpayer_type_ds" lookupCode="HLS211_TAXPAYER_TYPE"/>
<a:dataSet id="acr510_invoiceKindDs" lookupCode="ACR510_INVOICE_KIND"/>
......@@ -438,7 +439,12 @@
</a:mapping>
</a:field>
<a:field name="bp_id_agent_level1"/>
<a:field name="rl_flag"/>
<a:field name="rl_flag_n" displayField="code_value_name" options="overdue_status_ds"
returnField="rl_flag" valueField="code_value"/>
<a:field name="billing_status"/>
<a:field name="billing_status_n" displayField="code_value_name" options="billing_status_ds"
returnField="billing_status" valueField="code_value"/>
</a:fields>
<a:events>
<a:event name="update" handler="queryUpdateFunction"/>
......@@ -510,6 +516,10 @@
<a:comboBox bindTarget="allConditionDs" name="invoice_method_n" prompt="开票方式"/>
<a:comboBox bindTarget="allConditionDs" name="division_n" prompt="租赁物"/>
<a:comboBox bindTarget="allConditionDs" name="invoice_type_n" prompt="开票类型"/>
<a:comboBox bindTarget="allConditionDs" name="rl_flag_n" prompt="是否日立返还金"/>
</a:hBox>
<a:hBox>
<a:comboBox bindTarget="allConditionDs" name="billing_status_n" prompt="开票状态"/>
</a:hBox>
<!-- <a:formBody column="4" labelWidth="400">
<a:lov name="contract_number_from" bindTarget="allConditionDs" prompt="HLS.CONTRACT_NUMBER_FROM"/>
......@@ -577,7 +587,8 @@
<a:column name="invoice_method_n" prompt="开票方式" width="100"/>
<a:column name="division_n" prompt="租赁物" width="100"/>
<a:column name="write_off_flag_desc" width="100" align="center" prompt="核销标记" />
<a:column name="rl_flag_n" width="100" align="center" prompt="是否日立返还金" />
<a:column name="billing_status_n" width="100" align="center" prompt="开票状态" />
</a:columns>
</a:grid>
</a:tab>
......
......@@ -35,6 +35,8 @@
<a:link id="${/parameter/@layout_code}_contract_seal_link_id" url="${/request/@context_path}/modules/cont/CON301N/con_contract_finish_seal_info.lview"/>
<a:link id="con_contract_finish_print_link_id" url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_history_pdf_print.lsc"/>
<!-- <script src="${/request/@context_path}/javascripts/hap/dynamicStopAutoQuery.js" type="text/javascript"/>-->
<a:link id="rl_notice_print_link"
url="${/request/@context_path}/modules/cont/CON301N/rl_notice_print.lsc"/>
<script type="text/javascript"><![CDATA[
// stopDymanicAutoQuery('${/parameter/@layout_code}', 'G_CONTRACT_RESULT', 'con_contract');
......@@ -87,6 +89,12 @@
}
}
var role_code = '${/model/role_info/record/@role_code}';
if(role_code!="0008"&&role_code!="0017"&&role_code!="HAND") {
document.getElementById("CONTRACT_QUERY_ENTRANCE_user_button9").style.display = "none";
} else {
document.getElementById("CONTRACT_QUERY_ENTRANCE_user_button9").style.display = "";
}
});
function open_contract_win(ds_id, record_id) {
......@@ -269,6 +277,24 @@
//window.location.href='${/request/@context_path}/con/contract/conExportExcel?contractId='+record.get('contract_id');
};
//返还金通知打印
window['${/parameter/@layout_code}_user_button9_layout_dynamic_click'] = function () {
debugger;
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract');
var cur_record = $(ds_id).getSelected()[0];
var rl_flag = cur_record.get("rl_flag");
if(rl_flag == 'Y'){
var document_id = cur_record.get("contract_id");
var to_file_name = '返还租金通知'+ cur_record.get("contract_number") + '.docx'
var url = $('rl_notice_print_link').getUrl() + '?document_id=' + document_id + '&document_table=CON_RL_NOTICE&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON&to_file_name='+to_file_name;
window.open(href = url, target = "_blank");
}else if(rl_flag == 'N'){
Leaf.showMessage('提示', '请选择是日立为优质客户付租金的合同!');
return;
}
};
]]></script>
<a:screen-include
screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=CONTRACT&amp;function_code=CON501"/>
......
<?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>
<a:model-update model="hls.HLS811.hls_doc_file_templet_get_atm"/>
<s:server-script import="contract_print_path.js"><![CDATA[
importPackage(java.io);
importPackage(Packages.hls.plugin.docx4j);
importPackage(Packages.leaf.plugin.word2pdf);
importPackage(Packages.org.apache.commons.io);
//删除文件
function deleteFile(filePath) {
var file = new File(filePath);
if (file.exists()) {
file.delete();
}
}
//生成pdf
function wordToPdf(word_file_path,pdf_file_path) {
// word转pdf
var pdf_file_path_new = pdf_file_path + '.pdf';
var wordToPdf = new WordToPdf($instance('uncertain.ocm.IObjectRegistry'), "jacob-1.19-x64.dll");
wordToPdf.word2pdf(word_file_path, pdf_file_path_new);
//删除word文件
//deleteFile(word_file_path);
return pdf_file_path_new;
}
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 transfer(file_path, os) {
println(file_path);
var fis = new FileInputStream(file_path);
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 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_name, file_path) {
$ctx["__request_type__"] = 'file'; //to indicate this request is not a JSON_REQUEST
var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
resp.setHeader("Pragma", "No-cache");
resp.setHeader("Cache-Control", "no-cache, must-revalidate");
resp.setDateHeader("Expires", 0);
resp.setContentType("application/x-msdownload");
resp.setHeader("Content-disposition", "attachment; filename=" + encodeURI(file_name, 'UTF-8'));
var os = resp.getOutputStream();
//transfer(file_path, os);
write_os_to_file(file_path, os);
os.flush();
}
//按日期创建目录
function getDatePath() {
set_parameter_file_path();
var file_path = $ctx.parameter.pdf_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 collection_create_content() {
try {
var datePath = getDatePath();
FileUtils.forceMkdir(new File(datePath)); //根据日期创建目录
var attachment_batch_dl = $bm('hls.HLS811.hls_doc_file_templet_get_atm');
var result = attachment_batch_dl.queryAsMap({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table,
batch_flag: $ctx.parameter.batch_flag,
content_id: $ctx.parameter.content_id
});
var from_file_data = result.getChildren();
for (var i = 0;i < from_file_data.length;i++) {
if (!$ctx.parameter.file_path) {
set_parameter_file_path();
}
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;
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 + 'doc' + record_data.content_id;
copyFile(from_file_path, to_file_path);
try {
$bm('csh.CSH501.csh_transaction_return_print').update({
document_id: $ctx.parameter.document_id,
document_table: $ctx.parameter.document_table
});
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.toString(), 'COMMON');
} catch (e) {
raise_app_error(e);
}
// word转pdf
var pdf_file_path=to_file_path;
var outputfilepath = wordToPdf(to_file_path,pdf_file_path);
//var outputfilename= record_data.to_file_name +'.pdf';
var filename_str = record_data.to_file_name;
var outputfilename= filename_str.substr(0, filename_str.length - 5) +'.pdf';
var pdf_file = new File(outputfilepath);
var file_size = 0;
if (pdf_file.exists()) {
file_size = pdf_file.length();
}
$bm('hls.HLS811.hls_file_content_copy_update').update({
table_name: 'HLS_DOC_FILE_CONTENT',
content_id: record_data.content_id,
file_name: outputfilename.toString(),
file_path: outputfilepath.toString(),
source_type: $ctx.parameter.source_type
});
//var resp = $ctx['_instance.javax.servlet.http.HttpServletResponse'];
//HlsFileUtil.downloadFile(encodeURI(to_file_path,'utf-8'),encodeURI(to_file_name,'utf-8'),resp);
//print(outputfilepath.toString());
//print(outputfilename.toString());
download_file(outputfilename.toString(),outputfilepath.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>
......@@ -125,6 +125,20 @@
win.on('close', function() {});
};
//更新时调用
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function (ds, record, name, value, old_value, bp_seq) {
var return_ds = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_transaction_return');
if (return_ds == ds.id) {
if (name == 'return_bp_type' && value == 'OTHER') {
record.getField('return_bp_code').setRequired(true);
record.getField('bp_bank_account_name').setReadOnly(false);
}else if(name == 'return_bp_type' && value != 'OTHER'){
record.getField('return_bp_code').setRequired(false);
record.getField('bp_bank_account_name').setReadOnly(true);
}
}
};
]]></script>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
</a:view>
......
......@@ -10,6 +10,7 @@
<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 defaultWhereClause="t.code = &apos;CSH511_TRANSACTION_TYPE&apos; and t.code_value in (&apos;RECEIPT&apos;,&apos;ADVANCE_RECEIPT&apos;)" fetchAll="true" model="sys.sys_code_values_v" rootPath="transaction_type"/>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<a:link id="sys_service_welcome_link" url="${/request/@context_path}/welcome.lview"/>
......@@ -187,6 +188,13 @@
var bp_id = record.get('bp_id');
var remain_total_amount = record.get('remain_total_amount');
var bank_slip_num = record.get('bank_slip_num');
//20220412新增校验
var collection_classes = record.get('collection_classes');
var source_csh_trx_id = record.get('source_csh_trx_id');
if (collection_classes != 'REFUND' || Ext.isEmpty(source_csh_trx_id)){
Leaf.showMessage('提示','该功能只适用日立返还金退款');
return;
}
Leaf.request({
url: $('csh560_check_wfl_link').getUrl(),
para: {
......@@ -265,6 +273,7 @@
<a:dataSet id="posted_flag_ds" lookupCode="CSH510_POST_SELECT"/>
<a:dataSet id="returned_flag_ds" lookupCode="CSH510_RETURN_SELECT"/>
<a:dataSet id="reversed_flag_ds" lookupCode="CSH510_REVERSE_SELECT"/>
<a:dataSet id="ds_collection_classes_ds" lookupCode="DS_COLLECTION_CLASSES"/>
<a:dataSet id="csh_transaction_receipt_maintain_query_ds" autoCreate="true">
<a:fields>
<a:field name="payment_method_display" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
......@@ -382,6 +391,10 @@
<a:field name="currency_code_to"/>
<a:field name="transaction_category" defaultValue="BUSINESS"/>
<a:field name="write_off_flag"/>
<a:field name="collection_classes"/>
<a:field name="collection_classes_desc" options="ds_collection_classes_ds"
prompt="款项用途"
displayField="code_value_name" returnField="collection_classes" valueField="code_value"/>
</a:fields>
<a:events>
<a:event name="update" handler="csh510_receipt_maintain_update"/>
......@@ -423,8 +436,8 @@
<a:gridButton click="csh510_receipt_quit" text="HLS.EXIT"/> -->
<a:gridButton click="csh510_receipt_query" text="HLS.QUERY"/>
<a:gridButton click="csh510_receipt_reset" text="HLS.RESET"/>
<a:gridButton click="csh515_receipt_return" text="CSH515.CSH_REFUND" id="csh515_receipt_return"/>
<a:gridButton click="csh515_receipt_return_list" text="CSH515.CSH_REFUND_DETAILS"/>
<a:gridButton click="csh515_receipt_return" text="CSH515.CSH_REFUND" id="csh515_receipt_return_but"/>
<a:gridButton click="csh515_receipt_return_list" text="CSH515.CSH_REFUND_DETAILS" id="csh515_return_list_but"/>
</a:screenTopToolbar>
<a:form bindTarget="csh_transaction_receipt_write_off_query_ds" labelWidth="120" marginWidth="80"
title="收款退款" style="margin-left:20px">
......@@ -449,6 +462,8 @@
<!--对方账户账号-->
<a:lov name="bp_bank_account_num" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.YOUR_ACCOUNT_USERNAME"/>
<a:lov name="bp_name" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="CSH510.CSH_TRANSACTION.BUSINESS_PARTNER"/>
<a:textField name="contract_number" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="合同编号"/>
<a:comboBox name="collection_classes_desc" bindTarget="csh_transaction_receipt_maintain_query_ds" prompt="款项用途"/>
</a:fieldSet>
......@@ -460,7 +475,11 @@
<a:column name="receipt_type_n" align="center" prompt="CSH510.CSH_TRANSACTION.RECEIPT_TYPE" width="100"/>
<a:column name="transaction_amount" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_AMOUNT" renderer="Leaf.formatMoney" align="right"/>
<a:column name="transaction_date" prompt="CSH511.CSH_TRANSACTION.TRANSACTION_DATE" renderer="Leaf.formatDate" align="center"/>
<a:column name="return_date" prompt="退款日期" align="center"/>
<a:column name="can_returned_amount" prompt="可退款金额" renderer="Leaf.formatMoney" align="right"/>
<a:column name="contract_number" prompt="合同编号" width="120" align="center"/>
<a:column name="receipt_sbo" prompt="收款凭证SBO编号" width="120" align="center"/>
<a:column name="return_sbo" prompt="应付凭证SBO编号" width="120" align="center"/>
<a:column name="bp_name" prompt="HLS.BP_NAME" align="center"/>
<a:column name="bank_slip_num" prompt="银行流水号" align="center"/>
<a:column name="this_return_amount" prompt="退款中金额" align="right" renderer="Leaf.formatMoney"/>
......@@ -490,5 +509,16 @@
</a:grid>
</a:screenBody>
<a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
<script>
Leaf.onReady(function () {
// 会计担当(0014)不展示退款按钮
var role_code = '${/model/role_info/record/@role_code}';
if (role_code == '0009') {
if (document.getElementById('csh515_receipt_return_but')) {
document.getElementById('csh515_receipt_return_but').style.display = "none";
}
}
})
</script>
</a:view>
</a:screen>
......@@ -6,7 +6,9 @@
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:init-procedure/>
<a:init-procedure>
<a:model-query model="cont.CON620.get_sys_role" rootPath="role_info"/>
</a:init-procedure>
<a:view>
<div/>
<a:link id="csh_transaction_return_detail_link"
......@@ -36,10 +38,15 @@
$L.showWarningMessage("提示",'只能选择一条退款记录进行打印!');
return;
}
var cur_record = records[0];
if(Ext.isEmpty(cur_record.get('sbo_num'))||Ext.isEmpty(cur_record.get('receipt_sbo_num'))){
$L.showWarningMessage("提示",'SBO凭证号未生成,无法打印!');
return;
}
var templet_code = 'CSH_RETURN_INFO';
// var document_id = record.get('ast_car_insurance_records_id');
var url_l = $('assignment_agreement_print_link').getUrl() + '?document_id=' + records[0].get("return_id") + '&document_table=CSH_TRANSACTION_RETURN&file_path=${/parameter/@file_path}&batch_flag=Y&source_type=COMMON';
window.open(href = url_l, target = "_self");
window.open(href = url_l, target = "_blank");
}
function openWindow1(url) {
new Leaf.Window({
......@@ -83,7 +90,7 @@
<a:screenBody>
<a:screenTopToolbar>
<a:gridButton id="csh515_returned_list_back_id" click="csh515_returned_list_back" text="HLS.EXIT"/>
<a:gridButton id="csh515_returned_apply_print" click="csh_transaction_print" text="退款申请书打印"/>
<a:gridButton id="csh515_returned_apply_print" click="csh_transaction_print" text="退款申请书打印" />
</a:screenTopToolbar>
<a:grid bindTarget="csh_transaction_returned_list_ds" marginHeight="130" marginWidth="30" navBar="true">
<a:columns>
......@@ -104,5 +111,16 @@
</a:columns>
</a:grid>
</a:screenBody>
<script>
Leaf.onReady(function () {
// 债权内勤(0009), 宏菱管理员(0017),宏菱管理员(HAND) 才展示打印按钮
var role_code = '${/model/role_info/record/@role_code}';
if (!(role_code == '0009' || role_code =='0017' || role_code =='HAND')) {
if (document.getElementById('csh515_returned_apply_print')) {
document.getElementById('csh515_returned_apply_print').style.display = "none";
}
}
})
</script>
</a:view>
</a:screen>
\ No newline at end of file
......@@ -98,10 +98,22 @@
}
};
window['${/parameter/@layout_code}_on_layout_dynamic_grid_load'] = function(ds, record) {
//0017 宏菱管理员 HAND HAND管理员
var role_code = '${/model/user_name_path/record/@role_code}';
if(role_code == '0017' || role_code == 'HAND'){
record.getField('ref_n01').setReadOnly(false);
}else {
record.getField('ref_n01').setReadOnly(true);
}
};
//新增时调用(grid,table,gridBox)
window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_grid_add'] = function(ds, record, config_records, bp_seq) {
record.set("created_by_n",'${/model/user_name_path/record/@user_name}');
record.set("created_by",'${/session/@user_id}');
record.getField('ref_n01').setReadOnly(false);
};
//更新机型信息
......
......@@ -134,6 +134,7 @@
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');
if( Ext.isEmpty(record.get('journal_header_id'))){
record.set('je_company_id', 1);
record.set('je_company_id_n', '宏菱租赁');
record.set('currency_code', 'CNY');
......@@ -149,6 +150,7 @@
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"/>
......
......@@ -230,6 +230,7 @@
<a:column name="rental_12_pay_flag" align="center" prompt="是否已履约12期及以上" width="160"/>
<a:column name="cf_9_exists_flag" align="center" prompt="是否有违约金记录产生" width="160"/>
<a:column name="cf_9_notfirsttime_exists_flag" align="center" prompt="除第1期外是否有违约金记录产生" width="160"/>
<a:column name="rl_flag_n" align="center" prompt="是否日立返还金" width="100"/>
</a:columns>
</a:grid>
</a:tab>
......
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