<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: 34291
    $Date: 2022-11-16 10:18:01
    $Revision: 1.0
    $Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:view>
        <a:link id="pageLink_node_approve_history" url="${/request/@context_path}/modules/hls/HLS801/zj_wfl_monitoring_node_approve_history.lview"/>
        <a:screen-include screen="modules/zjwfl/zj_wfl_common_javascript.lview"/>
        <script><![CDATA[

        function winOpen_approve_history(instance_id) {
            new Leaf.Window({
                id: 'node_approve_history_win',
                url: $('pageLink_node_approve_history').getUrl(),
                params: {
                    instance_id: instance_id,
                    show_hide: 'Y'
                },
                title: '单据明细',
                fullScreen: true
            });

        }

        function render_monitorDs_grid(value, record, name) {
            if(name=='approve_history')
            {
                return '<a href="javascript:winOpen_approve_history(' + record.get('instance_id') + ');">' + '明细' + '</a>';
            }
            else if(name=='instance_status_desc')
            {
                return f_zjwfl.getStatusImg(record.get('instance_status'),value);
            }
        }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="monitorDs" autoPageSize="true" autoQuery="true" queryUrl="${/request/@context_path}/autocrud/hls.HLS801.zj_wfl_monitoring_query/query?date=${/parameter/@date}"/>
        </a:dataSets>
        <a:screenBody>
            <a:grid id="monitorDs_grid" bindTarget="monitorDs" marginHeight="180" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="instance_id" align="right" prompt="实例ID" width="60"/>
                    <a:column name="instance_status_desc" prompt="状态" renderer="render_monitorDs_grid" width="100"/>
                    <a:column name="workflow_desc" autoAdjust="false" prompt="工作流描述" showTitle="true" width="100"/>
                    <a:column name="document_info" autoAdjust="false" prompt="单据信息" showTitle="true" width="250"/>
                    <a:column name="current_seq" align="right" prompt="节点序号" width="60"/>
                    <a:column name="current_node_desc" autoAdjust="false" prompt="当前节点" showTitle="true" width="280"/>
                    <a:column name="last_approve_date" align="center" prompt="上一节点审批时间" width="130"/>
                    <a:column name="company_info" autoAdjust="false" prompt="公司信息" showTitle="true" width="120"/>
                    <a:column name="approve_user_code" autoAdjust="false" prompt="当前审批人代码" showTitle="true" width="150"/>
                    <a:column name="approve_user_name" autoAdjust="false" prompt="当前审批人姓名" showTitle="true" width="150"/>
                    <a:column name="approve_history" align="center" prompt="明细" renderer="render_monitorDs_grid" width="50"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
