Commit 5a9e776e authored by gzj34291's avatar gzj34291

滞纳金导出

parent 8db3d770
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: gzj
$Date: 2022-06-10
$Revision: 1.0
$Purpose:
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
select nvl(sum(cp.due_amount),0) all_amount from CON_CONTRACT_PENALTY_INFO_LV cp
where cp.copy_contract_id = ${@copy_contract_id}
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:fields>
<bm:field name="all_amount"></bm:field>
</bm:fields>
</bm:model>
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm" needAccessControl="false">
<bm:operations>
<bm:operation name="query">
<bm:query-sql><![CDATA[
SELECT * FROM ( SELECT cr.record_id,
cr.penalty_batch_number, --批次号
(SELECT t1.contract_number
FROM con_contract t1
WHERE t1.contract_id = t.contract_id) contract_number,
(SELECT hbm.extra_nam
FROM hls_bp_master hbm
WHERE hbm.bp_id =
(SELECT t1.bp_id_agent_level1
FROM con_contract t1
WHERE t1.contract_id = t.contract_id)) bp_name_agent,
(SELECT bp_name
FROM hls_bp_master hbm
WHERE hbm.bp_id =
(SELECT bp_id_tenant
FROM con_contract t1
WHERE t1.contract_id = t.contract_id)) bp_name_tenant,
t.breach_type,
(SELECT scv.code_value_name
FROM sys_code_values_v scv
WHERE scv.code = 'BREACH_TYPE'
AND scv.code_value = t.breach_type) breach_type_n, --违约金类型
to_char(nvl(t.base_date, sysdate),'yyyy-mm-dd') base_date, --基准日
t.reduce_amount_total, --减免总金额
(select t1.description
from sys_user t1
where t1.user_id = cr.created_by) created_by_n, --创建人
cr.creation_date,
cr.status,
(SELECT v.code_value_name value_name
FROM sys_code_values_v v
WHERE v.code = 'CASE_STATUS'
AND v.code_value = cr.status) status_n
FROM con_contract_case_record cr, con_contract_penalty_reduce t
WHERE cr.document_table = 'CON_CONTRACT_PENALTY_REDUCE'
and cr.record_id = t.record_id
)t
where (t.penalty_batch_number = ${/parameter/@penalty_batch_number} or ${/parameter/@penalty_batch_number} = 'undefined' or ${/parameter/@penalty_batch_number} is null)
and (t.created_by_n = ${/parameter/@created_by_n} or ${/parameter/@created_by_n} = 'undefined' or ${/parameter/@created_by_n} is null)
and (t.status = ${/parameter/@status} or ${/parameter/@status} = 'undefined' or ${/parameter/@status} is null)
and (trunc(t.creation_date) >= to_date(${/parameter/@creationdate_from}, 'yyyy-mm-dd') or ${/parameter/@creationdate_from} = 'undefined' or to_date(${/parameter/@creationdate_from},'yyyy-mm-dd') is null)
and (trunc(t.creation_date) <= to_date(${/parameter/@creationdate_to},'yyyy-mm-dd') or ${/parameter/@creationdate_to} = 'undefined' or to_date(${/parameter/@creationdate_to},'yyyy-mm-dd') is null)
]]></bm:query-sql>
</bm:operation>
</bm:operations>
</bm:model>
\ No newline at end of file
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<script src="${/request/@context_path}/javascripts/jquery-1.6.4.min.js" type="text/javascript"/> <script src="${/request/@context_path}/javascripts/jquery-1.6.4.min.js" type="text/javascript"/>
<a:link id="${/parameter/@layout_code}_contract_penalty_modify_link" <a:link id="${/parameter/@layout_code}_contract_penalty_modify_link"
url="${/request/@context_path}/modules/cont/CON1020/contract_penalty_reduction_create.lview"/> url="${/request/@context_path}/modules/cont/CON1020/contract_penalty_reduction_create.lview"/>
<a:link id="con_penalty_reduction_link_id" url="${/request/@context_path}/modules/cont/CON1021/penalty_reduction_excel.lsc"/>
<script type="text/javascript"><![CDATA[ <script type="text/javascript"><![CDATA[
jQuery.noConflict(); jQuery.noConflict();
...@@ -65,11 +66,51 @@ ...@@ -65,11 +66,51 @@
param['winid'] = '${/parameter/@layout_code}_maintain_win_id' param['winid'] = '${/parameter/@layout_code}_maintain_win_id'
hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}_contract_penalty_modify_link', ds_id); hls_doc_get_layout_code('${/parameter/@layout_code}_con_contract_get_layout_code_link_id', param, '${/parameter/@layout_code}_contract_penalty_modify_link', ds_id);
} }
function timeChange(dateStr) {
date = new Date(dateStr);
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
month = (month < 10 ? "0" + month : month);
day = (day < 10 ? "0" + day : day);
var mydate = (year.toString() + '-' + month.toString()+'-'+day.toString());
return mydate;
};
function download_penalty_reduction(){
var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_contract_case_record');
var records = $(ds_id).getAll();
var query_ds_id = 'CON_PENALTY_REDUCTION_QUERY_F_QUERY__ds';
var query_record = $(query_ds_id).getCurrentRecord();
var penalty_batch_number= query_record.get('penalty_batch_number');
var created_by_n= query_record.get('created_by_n');
var status= query_record.get('status');
var creationdate_from= query_record.get('creationdate_from');
var creationdate_to= query_record.get('creationdate_to');
if(!Leaf.isEmpty(creationdate_from)){
creationdate_from = timeChange(creationdate_from);
}else{
creationdate_from ='';
}
if(!Leaf.isEmpty(creationdate_to)){
creationdate_to = timeChange(creationdate_to);
}else {
creationdate_to ='';
}
// alert(creationdate_from);
var url_l = $('con_penalty_reduction_link_id').getUrl() + '?penalty_batch_number=' + penalty_batch_number+'&created_by_n='+created_by_n+'&status='+status+'&creationdate_from='+creationdate_from+'&creationdate_to='+creationdate_to;
var OpenWindow = window.open(href = url_l, target = "_blank");
}
window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () { window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
open_contract_win123(); open_contract_win123();
}; };
//导出
window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
download_penalty_reduction();
};
//超链接渲染 //超链接渲染
window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) { window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {
......
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script"
xmlns:dr="leaf.plugin.excelreport" trace="true">
<a:init-procedure>
<a:model-query fetchAll="true" model="cont.CON1020.con_penalty_query" rootPath="/model/con_penalty_query"/>
<dr:excel-report enableTask="false" filename="滞纳金减免详细内容.xlsx">
<dr:styles>
<dr:cell-style name="cell1" align="ALIGN_CENTER" borderbottom="BORDER_THIN" borderleft="BORDER_THIN" borderright="BORDER_THIN" bordertop="BORDER_THIN" vertical="VERTICAL_BOTTOM">
<dr:font bold="false" fontName="宋体" height="10"/>
</dr:cell-style>
<dr:cell-style name="cell4" align="ALIGN_RIGHT" borderbottom="BORDER_THIN" borderleft="BORDER_THIN" borderright="BORDER_THIN" bordertop="BORDER_THIN" vertical="VERTICAL_BOTTOM">
<dr:font bold="false" fontName="Arial" height="10"/>
</dr:cell-style>
<dr:cell-style name="cell3" align="ALIGN_LEFT" borderbottom="BORDER_THIN" borderleft="BORDER_THIN" borderright="BORDER_THIN" bordertop="BORDER_THIN" vertical="VERTICAL_BOTTOM">
<dr:font bold="false" fontName="宋体" height="10"/>
</dr:cell-style>
<dr:cell-style name="cell2" align="ALIGN_CENTER" borderbottom="BORDER_THIN" borderleft="BORDER_THIN" borderright="BORDER_THIN" bordertop="BORDER_THIN" vertical="VERTICAL_BOTTOM">
<dr:font bold="false" fontName="微软雅黑" height="11" />
</dr:cell-style>
<dr:cell-style name="header" align="ALIGN_CENTER" borderbottom="BORDER_THIN" borderright="BORDER_THIN" bordertop="BORDER_THIN" cell_style_id="2" foregroundcolor="BLACK" vertical="VERTICAL_BOTTOM">
<dr:font bold="true" cell_style_id="2" fontname="微软雅黑" height="11"/>
</dr:cell-style>
</dr:styles>
<dr:sheets>
<dr:sheet name="滞纳金减免详情表" autoSizeColumns="0,1,2,3,4,5,6,7,8" displayGridlines="true">
<dr:dynamic-content cell="A" row="1" dataModel="/model/con_penalty_query" >
<dr:columns>
<dr:table-column cellStyle="cell2" field="penalty_batch_number" titlestyle="header" type="Number" title="批次号"/>
<dr:table-column cellStyle="cell2" field="contract_number" titlestyle="header" type="Number" title="合同号"/>
<dr:table-column cellStyle="cell2" field="bp_name_agent" titlestyle="header" type="content" title="代理店简称"/>
<dr:table-column cellStyle="cell2" field="bp_name_tenant" titlestyle="header" type="content" title="客户名称"/>
<dr:table-column cellStyle="cell2" field="breach_type_n" titlestyle="header" type="content" title="违约金类型"/>
<dr:table-column cellStyle="cell2" field="reduce_amount_total" titlestyle="header" type="Number" title="减免总金额"/>
<dr:table-column cellStyle="cell2" field="base_date" titlestyle="header" type="Number" title="基准日"/>
<dr:table-column cellStyle="cell2" field="created_by_n" titlestyle="header" title="创建人"/>
<dr:table-column cellStyle="cell2" field="status_n" titlestyle="header" type="content" title="状态"/>
</dr:columns>
</dr:dynamic-content>
</dr:sheet>
</dr:sheets>
</dr:excel-report>
</a:init-procedure>
</a:service>
\ No newline at end of file
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