con_asset_fee_detail.lview 3.89 KB
Newer Older
38823's avatar
38823 committed
1 2 3 4 5 6 7 8 9 10 11 12
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: 38823
    $Date: 2023-01-24
    $Revision: 1.0
    $purpose: 资产管理费报表明细
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script"
          customizationEnabled="true" dynamiccreateenabled="true" trace="true">
    <a:init-procedure>
    </a:init-procedure>
    <a:view>
38823's avatar
38823 committed
13
        <a:link id="csh_downloadFile_id" url="${/request/@context_path}/downloadFile.lview"/>
38823's avatar
38823 committed
14
        <script type="text/javascript"><![CDATA[
38823's avatar
38823 committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
        Leaf.onReady(function() {
            debugger;
                var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_write_off');
                $(ds_id).setQueryParameter('contract_id','${/parameter/@contract_id}');
                $(ds_id).query();
                if('${/parameter/@winid}' == 'open_asset_check_id'){
                    var gridId= 'CON_ASSET_FEE_DETAIL_ASSET_GRID_csh_write_off_layout_grid_id';
                    $(gridId).hideColumn('write_off_type_desc');
                    $(gridId).hideColumn('write_off_date');
                    $(gridId).hideColumn('write_off_amount');
                    $(gridId).hideColumn('payment_date');
                    $(gridId).hideColumn('payment_amount');
                    $(gridId).hideColumn('creade_by');
                }
        });
       //附件
        function upload_csh_file(id,record_id) {
            debugger;
            var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
            if(record_id == "undefined"){
                var url = $('csh_downloadFile_id').getUrl();
            }else {
                url = $('csh_downloadFile_id').getUrl() + '?table_name=CSH_PAYMENT_REQ_ASSET_HD&header_id=' + record_id;
            }
            var win = new Leaf.Window({
                url: url,
                title: '${l:HLS.SUPPORTING_DOCUMENT}',
                id: 'csh_attachment_uploadFile_id',
                width: 850,
                height: 400
            });
            win.on('close', function () {
                //record.ds.query();
            });
        }

        //发票附件
        function upload_invoice_file(id,record_id) {
            debugger;
            var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
            if(record_id == "undefined"){
                var url = $('csh_downloadFile_id').getUrl();
            }else {
                url = $('csh_downloadFile_id').getUrl() + '?table_name=HL_REQ_PAYMENT_ACP&header_id=' + record_id;
            }
            var win = new Leaf.Window({
                url: url,
                title: '${l:HLS.SUPPORTING_DOCUMENT}',
                id: 'invoice_attachment_uploadFile_id',
                width: 850,
                height: 400
            });
            win.on('close', function () {
                //record.ds.query();
            });
        }

        //超链接渲染
        window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
            var link_function = '';
            window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
            if(name == 'attachment'){
                link_function = 'upload_csh_file';
                return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + record.get('payment_req_id') + '\')">' + '附件'+ '</a>';
            }
            if(name == 'invoice_link'){
                link_function = 'upload_invoice_file';
                return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + record.get('payment_req_id') + '\')">' + '发票附件' + '</a>';
            }
        };
38823's avatar
38823 committed
85 86 87 88 89
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>