Commit 681b2a2d authored by lizhe's avatar lizhe

展示报单历史

parent c98d510f
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: lz
$Date: 2024-06-03 11:12:31
$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[
with temp as
(select --pb.bp_category,
pb.bp_id,
pb.project_id,
hm.bp_name,
hm.bp_name_sp,
hm.legal_person,
hm.bp_category,
hm.id_card_no,
hm.id_no_sp,
hm.id_card_no_leg,
hm.social_code
from prj_project_bp pb, prj_project pp, hls_bp_master hm
where pp.project_id = pb.project_id
and pb.bp_id = hm.bp_id
and pp.business_type in ('LEASE', 'LEASEBACK')
and pb.bp_category in ('TENANT', 'GUARANTOR')),
con_temp as
(select cb.bp_id,
cc.project_id,
hm.bp_category,
hm.id_card_no,
hm.id_no_sp,
hm.id_card_no_leg,
hm.social_code
from con_contract cc, con_contract_bp cb, hls_bp_master hm
where cc.contract_id = cb.contract_id
and cb.bp_id = hm.bp_id
and cc.data_class = 'NORMAL'
and cc.business_type in ('LEASE', 'LEASEBACK')
and cb.bp_category in ('TENANT', 'GUARANTOR')
--项目中有的商业伙伴就没必要再匹配了 只有承租人变更 或者修数等需要匹配
and not exists (select 1
from prj_project_bp pb
where pb.project_id = cc.project_id
and pb.bp_id = cb.bp_id))
select * from (
select v.match_type,
v.bp_name,
v.id_no,
pp.project_id,
pp.wfl_instance_id,
pp.project_number,
pp.project_status,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'PRJ501_PRJ_STATUS'
AND v.code_value = pp.project_status) project_status_n,
(select hm.extra_nam
from hls_bp_master hm
where hm.bp_id = pp.invoice_agent_id) agent_extra_nam,
(select count(1)
from zj_wfl_approve_history_v zh
where zh.instance_id = pp.wfl_instance_id
and zh.action_type = '3') project_return_times,
cc.contract_id,
cc.contract_number,
cc.contract_status,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'CON500_CONTRACT_STATUS'
AND v.code_value = cc.contract_status) contract_status_n
from (
select distinct t.match_type,
t.project_id,
t.match_project_id,
t.bp_name,
nvl(t.id_card_no, t.social_code) id_no
from (select '自然人承租人' match_type,
temp1.project_id,
temp1.id_card_no,
temp1.bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, temp temp2
where temp1.project_id <> temp2.project_id
and temp1.project_id = ${@project_id}
and temp1.bp_category = 'TENANT'
and (temp1.id_card_no = temp2.id_card_no or
temp1.id_card_no = temp2.id_no_sp or
temp1.id_card_no = temp2.id_card_no_leg
/*or
temp1.id_no_sp = temp2.id_card_no or
temp1.id_no_sp = temp2.id_no_sp or
temp1.id_no_sp = temp2.id_card_no_leg or
temp1.id_card_no_leg = temp2.id_card_no or
temp1.id_card_no_leg = temp2.id_no_sp or
temp1.id_card_no_leg = temp2.id_card_no_leg or
temp1.social_code = temp2.social_code*/
)
union all
select '自然人承租人的配偶',
temp1.project_id,
-- temp1.id_card_no,
-- temp1.bp_name,
temp1.id_no_sp id_card_no,
temp1.bp_name_sp bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, temp temp2
where temp1.project_id <> temp2.project_id
and temp1.project_id = ${@project_id}
and temp1.bp_category = 'TENANT'
and (temp1.id_no_sp = temp2.id_card_no or
temp1.id_no_sp = temp2.id_no_sp or
temp1.id_no_sp = temp2.id_card_no_leg)
union all
select '法人承租人',
temp1.project_id,
-- temp1.id_card_no,
-- temp1.bp_name,
temp1.social_code id_card_no,
temp1.bp_name bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, temp temp2
where temp1.project_id <> temp2.project_id
and temp1.bp_category = 'TENANT'
and temp1.project_id = ${@project_id}
and (temp1.social_code = temp2.social_code)
union all
select '法人承租人的法定代表人',
temp1.project_id,
--temp1.id_card_no,
-- temp1.bp_name,
temp1.id_card_no_leg id_card_no,
temp1.legal_person bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, temp temp2
where temp1.project_id <> temp2.project_id
and temp1.bp_category = 'TENANT'
and temp1.project_id = ${@project_id}
and (temp1.id_card_no_leg = temp2.id_card_no or
temp1.id_card_no_leg = temp2.id_no_sp or
temp1.id_card_no_leg = temp2.id_card_no_leg)
union all
select '自然人担保人',
temp1.project_id,
temp1.id_card_no,
temp1.bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, temp temp2
where temp1.project_id <> temp2.project_id
and temp1.project_id = ${@project_id}
and temp1.bp_category = 'GUARANTOR'
and (temp1.id_card_no = temp2.id_card_no or
temp1.id_card_no = temp2.id_no_sp or
temp1.id_card_no = temp2.id_card_no_leg)
union all
select '自然人担保人的配偶',
temp1.project_id,
-- temp1.id_card_no,
-- temp1.bp_name,
temp1.id_no_sp id_card_no,
temp1.bp_name_sp bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, temp temp2
where temp1.project_id <> temp2.project_id
and temp1.project_id = ${@project_id}
and temp1.bp_category = 'GUARANTOR'
and (temp1.id_no_sp = temp2.id_card_no or
temp1.id_no_sp = temp2.id_no_sp or
temp1.id_no_sp = temp2.id_card_no_leg)
union all
select '法人担保人',
temp1.project_id,
--temp1.id_card_no,
--temp1.bp_name,
temp1.social_code id_card_no,
temp1.bp_name bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, temp temp2
where temp1.project_id <> temp2.project_id
and temp1.bp_category = 'GUARANTOR'
and temp1.project_id = ${@project_id}
and (temp1.social_code = temp2.social_code)
union all
select '法人担保人的法定代表人',
temp1.project_id,
--temp1.id_card_no,
-- temp1.bp_name,
temp1.id_card_no_leg id_card_no,
temp1.legal_person bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, temp temp2
where temp1.project_id <> temp2.project_id
and temp1.bp_category = 'GUARANTOR'
and temp1.project_id = ${@project_id}
and (temp1.id_card_no_leg = temp2.id_card_no or
temp1.id_card_no_leg = temp2.id_no_sp or
temp1.id_card_no_leg = temp2.id_card_no_leg)
-------------------------------------------------------合同匹配
union all
select '自然人承租人',
temp1.project_id,
temp1.id_card_no,
temp1.bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, con_temp temp2
where temp1.project_id <> temp2.project_id
and temp1.project_id = ${@project_id}
and temp1.bp_category = 'TENANT'
and (temp1.id_card_no = temp2.id_card_no or
temp1.id_card_no = temp2.id_no_sp or
temp1.id_card_no = temp2.id_card_no_leg)
union all
select '自然人承租人的配偶',
temp1.project_id,
-- temp1.id_card_no,
-- temp1.bp_name,
temp1.id_no_sp id_card_no,
temp1.bp_name_sp bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, con_temp temp2
where temp1.project_id <> temp2.project_id
and temp1.project_id = ${@project_id}
and temp1.bp_category = 'TENANT'
and (temp1.id_no_sp = temp2.id_card_no or
temp1.id_no_sp = temp2.id_no_sp or
temp1.id_no_sp = temp2.id_card_no_leg)
union all
select '法人承租人',
temp1.project_id,
-- temp1.id_card_no,
-- temp1.bp_name,
temp1.social_code id_card_no,
temp1.bp_name bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, con_temp temp2
where temp1.project_id <> temp2.project_id
and temp1.bp_category = 'TENANT'
and temp1.project_id = ${@project_id}
and (temp1.social_code = temp2.social_code)
union all
select '法人承租人的法定代表人',
temp1.project_id,
--temp1.id_card_no,
-- temp1.bp_name,
temp1.id_card_no_leg id_card_no,
temp1.legal_person bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, con_temp temp2
where temp1.project_id <> temp2.project_id
and temp1.bp_category = 'TENANT'
and temp1.project_id = ${@project_id}
and (temp1.id_card_no_leg = temp2.id_card_no or
temp1.id_card_no_leg = temp2.id_no_sp or
temp1.id_card_no_leg = temp2.id_card_no_leg)
union all
select '自然人担保人',
temp1.project_id,
temp1.id_card_no,
temp1.bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, con_temp temp2
where temp1.project_id <> temp2.project_id
and temp1.project_id = ${@project_id}
and temp1.bp_category = 'GUARANTOR'
and (temp1.id_card_no = temp2.id_card_no or
temp1.id_card_no = temp2.id_no_sp or
temp1.id_card_no = temp2.id_card_no_leg)
union all
select '自然人担保人的配偶',
temp1.project_id,
-- temp1.id_card_no,
-- temp1.bp_name,
temp1.id_no_sp id_card_no,
temp1.bp_name_sp bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, con_temp temp2
where temp1.project_id <> temp2.project_id
and temp1.project_id = ${@project_id}
and temp1.bp_category = 'GUARANTOR'
and (temp1.id_no_sp = temp2.id_card_no or
temp1.id_no_sp = temp2.id_no_sp or
temp1.id_no_sp = temp2.id_card_no_leg)
union all
select '法人担保人',
temp1.project_id,
--temp1.id_card_no,
--temp1.bp_name,
temp1.social_code id_card_no,
temp1.bp_name bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, con_temp temp2
where temp1.project_id <> temp2.project_id
and temp1.bp_category = 'GUARANTOR'
and temp1.project_id = ${@project_id}
and (temp1.social_code = temp2.social_code)
union all
select '法人担保人的法定代表人',
temp1.project_id,
--temp1.id_card_no,
-- temp1.bp_name,
temp1.id_card_no_leg id_card_no,
temp1.legal_person bp_name,
temp1.id_no_sp,
temp1.id_card_no_leg,
temp1.social_code,
temp2.project_id match_project_id,
temp2.id_card_no match_id_card_no,
temp2.id_no_sp match_id_no_sp,
temp2.id_card_no_leg match_id_card_no_leg,
temp2.social_code match_social_code
from temp temp1, con_temp temp2
where temp1.project_id <> temp2.project_id
and temp1.bp_category = 'GUARANTOR'
and temp1.project_id = ${@project_id}
and (temp1.id_card_no_leg = temp2.id_card_no or
temp1.id_card_no_leg = temp2.id_no_sp or
temp1.id_card_no_leg = temp2.id_card_no_leg)
) t
-- where t.project_id = 119992
) v,
prj_project pp,
con_contract cc
where pp.project_id = v.match_project_id
and pp.project_id = cc.project_id(+)
and cc.data_class(+) = 'NORMAL'
--------机号匹配
union all
select
'机号' match_type,
'' bp_name,
--nvl(pi.machine_number, pi.machine_number_70) id_no,
(select nvl(nvl(ppi.machine_number, ppi.machine_number_70),ppl.asset_num)
from prj_project pp,
prj_project_lease_item ppi,
prj_project_lease_item_list ppl
where pp.project_id = ppi.project_id
--and instr(nvl(pi.machine_number, pi.machine_number_70), '附件') = 0
and pp.project_id = ${@project_id}
and ppi.project_lease_item_id = ppl.project_lease_item_id(+)
and rownum = 1) id_no,--展示当前单据的
p.project_id,
p.wfl_instance_id,
p.project_number,
p.project_status,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'PRJ501_PRJ_STATUS'
AND v.code_value = p.project_status) project_status_n,
(select hm.extra_nam
from hls_bp_master hm
where hm.bp_id = p.invoice_agent_id) agent_extra_nam,
(select count(1)
from zj_wfl_approve_history_v zh
where zh.instance_id = p.wfl_instance_id
and zh.action_type = '3') project_return_times,
c.contract_id,
c.contract_number,
c.contract_status,
(SELECT v.code_value_name
FROM sys_code_values_v v
WHERE v.code = 'CON500_CONTRACT_STATUS'
AND v.code_value = c.contract_status) contract_status_n
from prj_project p, prj_project_lease_item pi, con_contract c
where p.project_id = pi.project_id
and p.project_id = c.project_id(+)
and p.project_id <> ${@project_id}
and c.data_class(+) = 'NORMAL'
and c.contract_status(+) not in ('CANCEL', 'REPUR', 'ET', 'TERMINATE')
And p.project_status <> 'CLOSED'
And nvl(p.secondary_lease, 'NO') = 'NO'
and (nvl(pi.machine_number, pi.machine_number_70) in
(select nvl(ppl.asset_num,
nvl(ppi.machine_number, ppi.machine_number_70))
from prj_project pp,
prj_project_lease_item ppi,
prj_project_lease_item_list ppl
where pp.project_id = ppi.project_id
--and instr(nvl(pi.machine_number, pi.machine_number_70), '附件') = 0
and pp.project_id = ${@project_id}
and ppi.project_lease_item_id = ppl.project_lease_item_id(+)) or
exists
(select 1
from con_contract_lease_item cl
where cl.contract_id = c.contract_id
--and instr(nvl(cl.machine_number, cl.machine_number_70), '附件') = 0
and nvl(cl.machine_number, cl.machine_number_70) in
(select nvl(ppl.asset_num,
nvl(ppi.machine_number, ppi.machine_number_70))
from prj_project pp,
prj_project_lease_item ppi,
prj_project_lease_item_list ppl
where pp.project_id = ppi.project_id
and pp.project_id = ${@project_id}
and ppi.project_lease_item_id =
ppl.project_lease_item_id(+))) or exists
(select 1
from prj_project_lease_item_list ppl
where ppl.project_lease_item_id = pi.project_lease_item_id
--and instr(ppl.asset_num, '附件') = 0
and ppl.asset_num in
(select nvl(ppl.asset_num,
nvl(ppi.machine_number, ppi.machine_number_70))
from prj_project pp,
prj_project_lease_item ppi,
prj_project_lease_item_list ppl
where pp.project_id = ppi.project_id
and pp.project_id = ${@project_id}
and ppi.project_lease_item_id =
ppl.project_lease_item_id(+))))
)tt order by tt.match_type desc ,tt.bp_name
]]></bm:query-sql>
</bm:operation>
</bm:operations>
<bm:query-fields>
<bm:query-field name="project_id" queryExpression="pp.project_id=${@project_id}"/>
</bm:query-fields>
</bm:model>
......@@ -12,6 +12,21 @@
replace(t1.service_url,
'modules/csh/CSH501/csh_payment_req.lview',
'modules/csh/CSH501/csh_payment_op_req.lview') as service_url_operat_payment
,zj_wfl_core_pkg.get_parameter_value(p_instance_id => t1.instance_id,
p_parameter_name => 'PROJECT_ID') PROJECT_ID
,(select sp.parameter_value
from zj_wfl_workflow_service zs,
zj_wfl_workflow_service_para zp,
zj_wfl_workflow_node_svc_para sp
where zs.service_name =
'modules/prj/PRJ501N/prj_project_maintain_wfl_new.lview'
and zp.service_id = zs.service_id
and sp.parameter_id = zp.service_para_id
and zp.parameter_code = 'show_project_history_flag'
and sp.source_type = 'DISPLAY'
and sp.node_id = t1.node_id
) show_project_history_flag
From (select zj_wfl_core_pkg.get_node_service_url(tt.record_id,
${/parameter/@url_type},
${/session/@user_id}) as service_url,tt.*
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: lz
$Date: 2024年6月3日10:54:19
$Revision: 1.0
$Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
<a:view package="leaf.ui.std" template="default">
<a:link id="prj_project_get_layout_code_link_id_return" model="cont.CON500.con_contract_get_layout_code"
modelaction="update"/>
<!-- <a:link id="zj_wfl_approve_history_link"-->
<!-- url="${/request/@context_path}/modules/zjwfl/zj_wfl_approve_history.lview"/>-->
<a:link id="zj_wfl_approve_history_link"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_history_return.lview"/>
<a:link id="car_modify_link_readonly_return"
url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain.lview"/>
<a:link id="${/parameter/@layout_code}con_contract_query_link_return"
url="${/request/@context_path}/modules/cont/CON3200/con_re_incept_modify.lview"/>
<script type="text/javascript"><![CDATA[
function project_history_render(value, record, name) {
if (name == 'project_return_times') {
return '<a href="javascript:project_return_history(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}
if (name == 'project_number' && value) {
return '<a href="javascript:open_project_modify_win(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}
if (name == 'contract_number' && value) {
return '<a href="javascript:open_contract_win(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
}
return value;
}
function project_return_history(record_id, ds_id) {
debugger;
var readOnly_flag = 'N';
var url = $('zj_wfl_approve_history_link').getUrl();
var record = $(ds_id).findById(record_id);
var param = record.data;
param['winId'] = 'zj_wfl_approve_history_link_winid';
var win = new Leaf.Window({
id: 'acr_invoice_apply_detail_link_winid',
params: {
instance_id: record.get('wfl_instance_id'),
reader_type: 'ADMIN'
},
url: url,
title: '退回历史',
fullScreen: true
});
}
function open_project_modify_win(record_id, ds_id) {
debugger;
var record = $(ds_id).findById(record_id);
var url;
maintain_type = 'READONLY';
param = record.data;
param['document_id'] = record.get('project_id');
param['function_usage'] = 'QUERY';
param['bp_class'] = 'NP';
param['maintain_type'] = maintain_type;
param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
param['function_code'] = 'PRJ501Q_H';
//PRJ501Q 匹配的是PROJECT_WFL_NP 与工作流页面是同一个布局,会报很多id重复的错
url = 'car_modify_link_readonly_return';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id_return', param, url, ds_id);
}
function open_contract_win(record_id, ds_id) {
debugger;
var record = $(ds_id).findById(record_id);
var param = record.data;
param['function_usage'] = 'QUERY';
param['function_code'] = 'CON3200Q';
param['maintain_type'] = 'QUERY';
param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
var url = '${/parameter/@layout_code}con_contract_query_link_return';
hls_doc_get_layout_code('prj_project_get_layout_code_link_id_return', param, url, ds_id);
}
]]></script>
<a:dataSets>
<a:dataSet id="project_historyDs" autoPageSize="true" autoQuery="true" selectable="true"
model="prj.PRJ501N.project_history_info"
queryUrl="${/request/@context_path}/autocrud/prj.PRJ501N.project_history_info/query?project_id=${/parameter/@project_id}"/>
</a:dataSets>
<a:screenBody>
<a:tabPanel height="450" marginWidth="30">
<a:tabs>
<a:tab prompt="历史报单记录" width="100">
<a:grid id="project_historyDs_grid" bindTarget="project_historyDs" height="360" marginWidth="30"
navBar="true">
<a:toolBar>
<a:button type="excel" text="导出"/>
</a:toolBar>
<a:columns>
<a:column name="match_type" prompt="当前报单匹配类型" width="120" align="center"/>
<a:column name="bp_name" prompt="商业伙伴名称" width="120" align="center"/>
<a:column name="id_no" prompt="证件号码/机号" width="120" align="center"/>
<a:column name="project_number" prompt="项目编号" width="120" align="center" renderer="project_history_render"/>
<a:column name="project_return_times" prompt="报单流程被退回次数" width="120" align="center"
renderer="project_history_render"/>
<a:column name="project_status_n" prompt="项目状态" width="120" align="center"/>
<a:column name="contract_number" prompt="合同编号" width="120" align="center" renderer="project_history_render"/>
<a:column name="contract_status_n" prompt="合同状态" width="120" align="center"/>
<a:column name="agent_extra_nam" prompt="所属代理店" width="120" align="center"/>
</a:columns>
</a:grid>
</a:tab>
</a:tabs>
</a:tabPanel>
</a:screenBody>
</a:view>
</a:screen>
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:c="leaf.application.action" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" trace="true">
<a:init-procedure>
<p:switch test="/parameter/@reader_type">
<!--
$Author:DJ
读者类型:
提交人
审批人
系统管理员
-->
<p:case value="SUBMITTER">
<a:model-query defaultWhereClause="t1.workflow_id = ${/parameter/@workflow_id}" model="zjwfl.zj_wfl_workflow" rootPath="approve_ht_workflow"/>
<a:model-query defaultWhereClause="t1.node_hide_approve_record = &apos;N&apos; and ${/model/approve_ht_workflow/record/@show_approve_history_flag} = &apos;Y&apos; and (${/model/approve_ht_workflow/record/@show_all_approve_ht_flag} = &apos;Y&apos; or t1.record_approve_count = t1.instance_approve_count)" fetchAll="true" model="zjwfl.ZJWFL1060.zj_wfl_approve_history_v" rootPath="approve_history_list"/>
</p:case>
<p:case value="APPROVER">
<a:model-query defaultWhereClause="t1.node_id = ${/parameter/@node_id}" model="zjwfl.zj_wfl_workflow_node_filter_node_id" rootPath="approve_ht_node"/>
<a:model-query defaultWhereClause="t1.node_hide_approve_record = &apos;N&apos; and ${/model/approve_ht_node/record/@show_approve_history_flag} = &apos;Y&apos; and (${/model/approve_ht_node/record/@show_all_approve_ht_flag} = &apos;Y&apos; or t1.record_approve_count = t1.instance_approve_count)" fetchAll="true" model="zjwfl.ZJWFL1060.zj_wfl_approve_history_v" rootPath="approve_history_list"/>
</p:case>
<p:case value="ADMIN">
<a:model-query fetchAll="true" model="zjwfl.ZJWFL1060.zj_wfl_approve_history_v" rootPath="approve_history_list"/>
</p:case>
</p:switch>
<a:model-query model="prj.PRJ600.is_prj_workflow" rootPath="is_prj_workflow"/>
<a:model-query fetchAll="true" model="zjwfl.zj_wfl_get_bp_category" rootPath="zjwfl_bp_category_history"/>
</a:init-procedure>
<a:view>
<a:link id="prj_attach_downloadfile_link_return" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="prj_attach_uploadfile_link_return" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="prj_attach_uploadonlyfile_link_return" url="${/request/@context_path}/uploadonlyFile.lview"/>
<!-- <a:link id="check_agent_link" model="zjwfl.ZJWFL1060.zj_wfl_check_agent_re" modelaction="update"/> -->
<style><![CDATA[
.cell_n{
white-space:normal;
}
]]></style>
<a:screen-include screen="modules/zjwfl/zj_wfl_common_javascript.lview"/>
<script type="text/javascript"><![CDATA[
if(document.getElementById('zj_wfl_approve_history_table_id_return_tb')){
document.getElementById('zj_wfl_approve_history_table_id_return_tb').style.display = 'none';
}
function render_action_type_desc(value, record, name) {
return f_zjwfl.getApproveImg(record.get('record_type'), value);
}
function open_downloadfile_win(rcpt_record_id) {
new Leaf.Window({
id: 'zj_wfl_approve_history_downloadfile_win',
url: $('prj_attach_downloadfile_link_return').getUrl() + '?table_name=ZJ_WFL_INSTANCE_NODE_RECIPIENT&header_id=' + rcpt_record_id,
title: '附件查看',
width: 850,
height: 400
});
}
function open_downloadfile_win_acr_reverse(instance_id) {
new Leaf.Window({
id: 'zj_wfl_approve_history_downloadfile_win',
url: $('prj_attach_uploadfile_link_return').getUrl() + '?table_name=ZJ_WFL_INSTANCE_ACR_REVERSE&header_id=' + instance_id,
title: '附件查看',
width: 850,
height: 400
});
}
function open_uploadfile_win(rcpt_record_id) {
new Leaf.Window({
id: 'zj_wfl_approve_history_downloadfile_win',
url: $('prj_attach_uploadfile_link_return').getUrl() + '?table_name=ZJ_WFL_INSTANCE_NODE_RECIPIENT&header_id=' + rcpt_record_id,
title: '附件查看',
width: 850,
height: 400
});
}
function open_uploadonlyfile_win(rcpt_record_id) {
new Leaf.Window({
id: 'zj_wfl_approve_history_downloadfile_win',
url: $('prj_attach_uploadonlyfile_link_return').getUrl() + '?table_name=ZJ_WFL_INSTANCE_NODE_RECIPIENT&header_id=' + rcpt_record_id,
title: '附件查看',
width: 850,
height: 400
});
}
function attachement_renderer(value, record, name) {
if (record.get('rcpt_record_id')) {
if(record.get('workflow_code') == 'DCFL_CSH_PAYMENT_REQ' &&
record.get('instance_status') == '10' &&
record.get('node_sequence_num') == '10'){
if(record.get('role_code') == '0014' && record.get('attach_count') == 0){
return '<a href="javascript:open_uploadonlyfile_win(' + record.get('rcpt_record_id') + ')">附件查看</a>';
}else if(record.get('role_code') == '0014' && record.get('attach_count') >0){
return '<a style="color:red" href="javascript:open_uploadonlyfile_win(' + record.get('rcpt_record_id') + ')">附件查看</a>';
}else if((record.get('role_code') == 'HAND'||record.get('role_code') =='0017') && record.get('attach_count') == 0) {
return '<a href="javascript:open_uploadfile_win(' + record.get('rcpt_record_id') + ')">附件查看</a>';
}else if((record.get('role_code') == 'HAND'||record.get('role_code') =='0017')&& record.get('attach_count') > 0){
return '<a style="color:red" href="javascript:open_uploadfile_win(' + record.get('rcpt_record_id') + ')">附件查看</a>';
}
}
if(record.get('workflow_code') == 'ACR_INVOICE_REVERSE_WFL'){
return '<a style="color:red" href="javascript:open_downloadfile_win_acr_reverse(' + record.get('instance_id') + ')">附件查看</a>';
}
if (record.get('attach_count') > 0) {
return '<a style="color:red" href="javascript:open_downloadfile_win(' + record.get('rcpt_record_id') + ')">附件查看</a>';
}
return '<a href="javascript:open_downloadfile_win(' + record.get('rcpt_record_id') + ')">附件查看</a>';
}
}
function prj_atm_renderer(value, record, name) {
if (record.get('rcpt_record_id')) {
return '<a href="javascript:open_prj_atm()">附件查看</a>';
}
}
function open_prj_atm() {
var url = $('prj_attach_downloadfile_link_return').getUrl() + '?table_name=ZJ_WFL_APPROVE_RECORD&header_id=' + ${/parameter/@instance_id};
new Leaf.Window({
url: url,
title: '${l:HLS.SUPPORTING_DOCUMENT}',
id: 'con504_attach_downloadfile_win',
width: 850,
height: 400
});
}
function check_agent_renderer(value, record, name) {
//
var agent_flag = record.get('agent_flag');
if(agent_flag == 'Y'){
return '<a>' + '<font color="#FF9900">' + value + '</font>' + '</a>';
}else{
return value;
}
//alert(rcpt_record_id);
// Leaf.request({
// url: $('check_agent_link').getUrl(),
// para: {
// rcpt_record_id: rcpt_record_id
// },
// success: function(res) { //
// var agent_flag = res.result.agent_flag;
// //alert(agent_flag);
// if (agent_flag == 'AGENT') {
// return '<a>' + '<font color="#FF9900">' + value + '</font>' + '</a>';
// }
// },
// scope: this
// });
}
]]></script>
<a:dataSets>
<a:dataSet id="approveHistoryDs_return">
<a:datas dataSource="/model/approve_history_list"/>
</a:dataSet>
<a:dataSet id="zjwfl_bp_category_history_ds_return">
<a:datas dataSource="/model/zjwfl_bp_category_history"/>
</a:dataSet>
</a:dataSets>
<a:screenBody>
<a:form marginWidth="30" padding="0">
<a:grid id="zj_wfl_approve_history_table_id_return" bindTarget="approveHistoryDs_return" marginWidth="30" marginHeight="300">
<a:columns>
<a:column name="create_date_fmt" prompt="审批时间" width="150"/>
<a:column name="action_type_desc" prompt="审批操作" renderer="render_action_type_desc" width="150"/>
<a:column name="comment_text" prompt="审批意见" width="600" editor="textArea_e_return"/>
<!--<a:column name="comment_text_out" prompt="审批意见" width="400"/>-->
<a:column name="node_desc" prompt="审批节点" width="200"/>
<a:column name="approver" prompt="审批人" renderer="check_agent_renderer" width="140" />
<a:placeHolder id="dynamicLineColumn_id"/>
<a:column name="attachement" align="center" prompt="附件查看" renderer="attachement_renderer" width="80"/>
</a:columns>
<a:editors>
<a:textArea id="textArea_e_return" readOnly="true" height="100"/>
</a:editors>
</a:grid>
</a:form>
</a:screenBody>
<script type="text/javascript"><![CDATA[
var record = $('zjwfl_bp_category_history_ds_return').getCurrentRecord();
if (record.get('bp_category') != 'EMPLOYEE') {
$('zj_wfl_approve_history_table_id_return').hideColumn('comment_text');
$('zj_wfl_approve_history_table_id_return').hideColumn('attachement');
}
if (record.get('role_code_name') == 'JF') {
$('zj_wfl_approve_history_table_id_return').hideColumn('comment_text');
$('zj_wfl_approve_history_table_id_return').hideColumn('comment_text_out');
$('zj_wfl_approve_history_table_id_return').hideColumn('attachement');
}
]]></script>
</a:view>
<a:view-config>
<c:create-config targetId="dynamicLineColumn_id">
<p:loop source="/model/is_prj_workflow">
<p:switch test="@prj_workflow">
<p:case value="Y">
<c:process-config>
<a:column name="attachement" align="center" prompt="附件查看" renderer="attachement_renderer" width="80"/>
</c:process-config>
</p:case>
</p:switch>
</p:loop>
</c:create-config>
</a:view-config>
</a:screen>
......@@ -350,6 +350,13 @@
</a:case>
<a:case value="*">
<a:screen-include screen="${/model/node_service_record/record/@service_url}&amp;winid=zj_wfl_approve_win&amp;instance_id=${/parameter/@instance_id}"/>
<a:switch test="/model/node_service_record/record/@show_project_history_flag">
<a:case value="Y">
<a:screen-include screen="modules/prj/PRJ501N/prj_project_history.lview?project_id=${/model/node_service_record/record/@project_id}"/>
</a:case>
</a:switch>
</a:case>
</a:switch>
</a:case>
......
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