acr_invoice_query.lviewbak 3.98 KB
Newer Older
lijingjing's avatar
lijingjing committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: LR  
    $Date: 2013-7-17 下午06:22:37  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
    <a:init-procedure><![CDATA[
    ]]></a:init-procedure>
    <a:view>
        <a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
        <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <a:link id="acr_invoice_account_link" model="acr.ACR310.acr_invoice_account" modelaction="execute"/>
        <script type="text/javascript"><![CDATA[
            function open_document_win(ds_id, record_id) {
                var record = $(ds_id).findById(record_id);
                var param = record.data;
                param['function_code'] = 'ACR513';
                param['function_usage'] = 'QUERY';
                param['maintain_type'] = 'UPDATE';
                param['url_title'] = '${l:ACR.INVOICE_DETAIL}';
                hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', ds_id);
            }
            
            window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
                if (name == 'document_number' && value) {
                    return '<a href="javascript:open_document_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
                }
                return value;
            };
            
            window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
                $('ACR310_RESULT_acr_invoice_hd_layout_grid_id')._export('xls', '应收发票查询');
            };
            
            
            
            window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {

                var tax_type_rate = $('ACR310_QUERY__ds').getAt(0).get('tax_type_rate');
                var product_name = $('ACR310_QUERY__ds').getAt(0).get('product_name');
                var invoice_kind = $('ACR310_QUERY__ds').getAt(0).get('invoice_kind');
                var vat_interface_status = $('ACR310_QUERY__ds').getAt(0).get('vat_interface_status');
                var invoice_date_from = $('ACR310_QUERY__ds').getAt(0).get('invoice_date_from');
                var invoice_date_to = $('ACR310_QUERY__ds').getAt(0).get('invoice_date_to');	
                Leaf.request({
                url: $('acr_invoice_account_link').getUrl(),
                para: {
                    tax_type_rate: tax_type_rate,
                    product_name: product_name,
                    invoice_kind: invoice_kind,
                    vat_interface_status: vat_interface_status,
                    invoice_date_from: invoice_date_from,
                    invoice_date_to: invoice_date_to
                },
                success: function() {
                	window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
                	$('ACR310_STAT_acr_invoice_hd_detail_all_ds').query();
                	$('ACR310_RESULT_acr_invoice_hd_ds').query();
                    },
                    failure: function() {
                        window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
                    },
                    error: function() {
                        window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
                    },
                    scope: this
                    });
            };
              window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
                    //异步打印
                    ds.setQueryParameter('__async__', 'Y');
                };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>