acp_invoice_update_query.lview 3.87 KB
Newer Older
Spencer Chang's avatar
Spencer Chang 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: LR  
    $Date: 2013-7-15 下午04:39:15  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
    <a:init-procedure><![CDATA[
    ]]></a:init-procedure>
    <a:view>
        <a:link id="acp_invoice_modify_link" url="${/request/@context_path}/modules/csh/CSH501/acp_invoice_update_maintain.lview"/>
        <script type="text/javascript"><![CDATA[
            function acp512_invoice_query() {
                $('acp512_invoice_result_ds').query();
            }
            function acp512_grid_update(invoice_hd_id,invoice_status) {
                var win = new Leaf.Window({
                    id: 'acp_invoice_modify_window',
                    url: $('acp_invoice_modify_link').getUrl(),
                    params: {
                        invoice_hd_id: invoice_hd_id,
                        invoice_status : invoice_status,
                        winId: 'acp_invoice_modify_window'
                    },
                    title: '应付发票信息',
                    fullScreen: true
                });
                win.on('close', function() {
                    $('acp512_invoice_result_ds').query();
                });
            }
            
            function acp512_document_number_render(value, record, name) {
                return '<a href="javascript:acp512_grid_update(' + record.get('invoice_hd_id') + ',\''+record.get('invoice_status')+'\')">' + value + '</a>';
            }
            
            // function acp512_invoice_delete() {
                // var records = $('acp512_invoice_result_ds').getSelected();
                // if (!records.length) {
                    // Leaf.showMessage('${l:PROMPT}', '请至少选择一条记录');
                    // return;
                // }                
                // $('acp512_invoice_update_grid_ds').remove();
            // }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="acp512_invoice_result_ds" autoQuery="true" fetchAll="true" queryUrl="${/request/@context_path}/autocrud/csh.CSH501.acp_invoice_update_query/query?cashflow_id=${/parameter/@cashflow_id}"/>
        </a:dataSets>
        <a:screenBody>
            <a:grid id="acp512_invoice_update_grid_ds" bindTarget="acp512_invoice_result_ds" marginHeight="60" marginWidth="30" navBar="true" showRowNumber="true">
                <a:columns>
                    <a:column name="document_number" lock="true" prompt="HLS.DOCUMENT_NUMBER" renderer="acp512_document_number_render" width="120"/>
                    <a:column name="contract_number" align="center" lock="true" prompt="HLS.CONTRACT_NUMBER" width="120"/>
                    <a:column name="invoice_kind_desc" prompt="ACR.INVOICE_KIND" width="100"/>
                    <a:column name="invoice_code" prompt="发票代码" width="100"/>
                    <a:column name="invoice_number" prompt="ACR.INVOICE_NUMBER" width="120"/>
                    <a:column name="invoice_date" align="center" prompt="ACR.INVOICE_DATE" width="80"/>
                    <a:column name="invoice_title" autoAdjust="false" prompt="ACR.INVOICE_TITLE" showTitle="true" width="150"/>
                    <a:column name="total_amount" align="right" prompt="ACR.TOTAL_AMOUNT" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="created_by_name" autoAdjust="false" prompt="发票录入人" showTitle="true" width="120"/>
                    <a:column name="invoice_status_desc" align="center" prompt="ACR.INVOICE_STATUS" width="80"/>
                    <a:column name="accounting_date" align="center" prompt="HLS.ACCOUNT_DATE" width="80"/>
                    <a:column name="invoice_bp_name" autoAdjust="false" prompt="HLS.CUSTOMER_NAME" showTitle="true" width="200"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>