Commit 551db213 authored by lizhe's avatar lizhe

会计担当付款流程结束允许上传附件

parent 7084cb12
......@@ -35,6 +35,8 @@
<bm:field name="wfl_show_all_approve_ht" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="WFL_SHOW_ALL_APPROVE_HT" prompt="ZJ_WFL_APPROVE_HISTORY_V.WFL_SHOW_ALL_APPROVE_HT"/>
<bm:field name="attach_count" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ATTACH_COUNT" prompt="ATTACH_COUNT"/>
<bm:field name="agent_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="AGENT_FLAG" prompt="AGENT_FLAG"/>
<bm:field name="instance_status"/>
<bm:field name="role_code"/>
</bm:fields>
<bm:operations>
<bm:operation name="query">
......@@ -89,7 +91,10 @@
) attach_count,
(select u.bp_category
from sys_user u
where u.user_id = ${/session/@user_id}) bp_category
where u.user_id = ${/session/@user_id}) bp_category,
(select zi.status from zj_wfl_workflow_instance zi
where zi.instance_id = t1.instance_id) instance_status,
(select sr.role_code from sys_role sr where sr.role_id = ${/session/@role_id}) role_code
FROM
zj_wfl_approve_history_v t1
WHERE
......@@ -144,7 +149,10 @@
) attach_count,
(select u.bp_category
from sys_user u
where u.user_id = ${/session/@user_id}) bp_category
where u.user_id = ${/session/@user_id}) bp_category,
(select zi.status from zj_wfl_workflow_instance zi
where zi.instance_id = t1.instance_id) instance_status,
(select sr.role_code from sys_role sr where sr.role_id = ${/session/@role_id}) role_code
FROM
zj_wfl_approve_history_v t1
WHERE
......@@ -184,7 +192,9 @@
NULL AS wfl_show_approve_ht,
NULL AS wfl_show_all_approve_ht,
NULL AS attach_count,
NULL AS bp_category
NULL AS bp_category,
zw.STATUS instance_status,
(select sr.role_code from sys_role sr where sr.role_id = ${/session/@role_id}) role_code
FROM zj_wfl_workflow_instance zw
WHERE zw.instance_id = ${@instance_id}
......
......@@ -26,6 +26,8 @@
</a:init-procedure>
<a:view>
<a:link id="prj_attach_downloadfile_link" url="${/request/@context_path}/downloadFile.lview"/>
<a:link id="prj_attach_uploadfile_link" url="${/request/@context_path}/uploadFile.lview"/>
<a:link id="prj_attach_uploadonlyfile_link" 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{
......@@ -48,9 +50,45 @@
height: 400
});
}
function open_uploadfile_win(rcpt_record_id) {
new Leaf.Window({
id: 'zj_wfl_approve_history_downloadfile_win',
url: $('prj_attach_uploadfile_link').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').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('attach_count') > 0) {
return '<a style="color:red" href="javascript:open_downloadfile_win(' + record.get('rcpt_record_id') + ')">附件查看</a>';
}
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: niujiaqing1265 $
$Date: 2010/11/30 06:14:58 $
$Revision: 1.8 $
$Purpose: 系统级描述
-->
<a:screen xmlns:c="leaf.application.action" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<a:model-query model="sys.sys_enable_image_system_query" rootPath="enable_image_system_flag"/>
<p:switch test="/model/enable_image_system_flag/record/@enable_image_system">
<p:case value="Y">
<a:model-query model="img.img_attachment_url" rootPath="att_url"/>
<a:model-query model="img.img_document_num_query" rootPath="doc_info"/>
<a:model-execute model="db.img_pkg.add_doc_to_interface"/>
<a:model-query model="img.img_upload_seqid_query" rootPath="upload"/>
<a:model-execute model="db.img_pkg.add_img_upload_control"/>
<a:model-query model="img.img_download_seqid_query" rootPath="download"/>
<a:model-execute model="db.img_pkg.add_img_download_control"/>
</p:case>
</p:switch>
</a:init-procedure>
<a:view package="leaf.ui.std" template="default">
<!--<link href="${/request/@context_path}/css/lightbox.css" rel="stylesheet" type="text/css"/>
<script src="${/request/@context_path}/javascripts/lightbox.js" type="text/javascript"/>-->
<script type="text/javascript"><![CDATA[
function selectTabFun(tab,tabIndex){
if(tabIndex == 0){
reloadUpload();
}else if (tabIndex == 1){
reloadDownload();
}
}
function reloadUpload(){
document.getElementById('upload_att').src = '${/model/att_url/record/@img_attachment_url}?type=1&barcode=${/model/doc_info/record/@document_number}&seqid=${/model/upload/record/@upload_seqid}&IMGTYPE=${/model/doc_info/record/@img_type}&IMGNAME=${/model/doc_info/record/@img_name}&CURRENTIMGTYPE=${/model/doc_info/record/@current_img_type}&CURRENTIMGNAME=${/model/doc_info/record/@current_img_name}&_csrf=${/session/@_csrf.token}';
}
function reloadDownload(){
document.getElementById('download_att').src = '${/model/att_url/record/@img_attachment_url}?type=2&barcode=${/model/doc_info/record/@document_number}&seqid=${/model/download/record/@download_seqid}&IMGTYPE=${/model/doc_info/record/@img_type}&IMGNAME=${/model/doc_info/record/@img_name}&CURRENTIMGTYPE=${/model/doc_info/record/@current_img_type}&CURRENTIMGNAME=${/model/doc_info/record/@current_img_name}&_csrf=${/session/@_csrf.token}';
}
//Ext.ux.Lightbox.register('a[ref=img]', true);
]]></script>
<a:screenBody>
<a:switch test="/model/enable_image_system_flag/record/@enable_image_system">
<a:case value="N">
<div style="width:800px">
<a:switch test="/parameter/@useSubFolder">
<a:case value="Y">
<a:upload buttonWidth="75" fileType="*.*" pkvalue="${/parameter/@header_id}" showDelete="false" sourcetype="${/parameter/@table_name}" text="附件上传" uploadurl="${/request/@context_path}/atm_upload_unUseSubFolder.lsc"/>
</a:case>
<a:case value="*">
<a:upload buttonWidth="75" fileType="*.*" pkvalue="${/parameter/@header_id}" showDelete="false" sourcetype="${/parameter/@table_name}" text="附件上传" uploadurl="${/request/@context_path}/atm_upload.lsc"/>
</a:case>
</a:switch>
<br/>
</div>
</a:case>
<a:case value="Y">
<a:tabPanel height="380" width="580">
<a:tabs>
<a:tab prompt="附件上传">
<iframe id="upload_att" frameborder="no" height="345" src="${/model/att_url/record/@img_attachment_url}?type=1&amp;barcode=${/model/doc_info/record/@document_number}&amp;seqid=${/model/upload/record/@upload_seqid}&amp;IMGTYPE=${/model/doc_info/record/@img_type}&amp;IMGNAME=${/model/doc_info/record/@img_name}&amp;CURRENTIMGTYPE=${/model/doc_info/record/@current_img_type}&amp;CURRENTIMGNAME=${/model/doc_info/record/@current_img_name}&amp;_csrf=${/session/@_csrf.token}" style="broder:none;margin:0;padding:0;" width="570"/>
</a:tab>
<a:tab prompt="附件查看">
<iframe id="download_att" frameborder="no" height="345" src="${/model/att_url/record/@img_attachment_url}?type=2&amp;barcode=${/model/doc_info/record/@document_number}&amp;seqid=${/model/download/record/@download_seqid}&amp;IMGTYPE=${/model/doc_info/record/@img_type}&amp;IMGNAME=${/model/doc_info/record/@img_name}&amp;CURRENTIMGTYPE=${/model/doc_info/record/@current_img_type}&amp;CURRENTIMGNAME=${/model/doc_info/record/@current_img_name}&amp;_csrf=${/session/@_csrf.token}" style="broder:none;margin:0;padding:0;" width="570"/>
</a:tab>
</a:tabs>
<a:events>
<a:event name="select" handler="selectTabFun"/>
</a:events>
</a:tabPanel>
</a:case>
</a:switch>
</a:screenBody>
</a:view>
</a:screen>
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