acr_invoice_confirm.lview 5.84 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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
    <a:view>
        <a:link id="general_import_upload_link" url="${/request/@context_path}/modules/acr/ACR520/acr_invoice_upload.lview"/>
        <script type="text/javascript"><![CDATA[
    	    function acr_invoice_confirm_ds_query(){
    	        $('acr_invoice_confirm_ds').query();
    	    }
    	    
    	    function acr_invoice_confirm_query_ds_reset(){
    	        $('acr_invoice_confirm_query_ds').reset();
    	    }
    	    
    	    function acr_invoice_confirm_import(){
    	        new Leaf.Window({
                    id: 'upload_window',
                    url: $('general_import_upload_link').getUrl(),
                    title: '导入',
                    width: 420,
                    height: 275
                });
    	    }
    	    
    	    function acr_invoice_confirm_export(){
    	        $('acr_invoice_confirm_grid')._export();
    	    }
    	    
    	    function acr_invoice_confirm_send_back(){
    	        var records = $('acr_invoice_confirm_ds').getSelected();
    	        for(i=0;i<records.length;i++){
    	            records[i].set('express_status','SENT_BACK');
    	            records[i].set('_status','update');
    	        }
    	        $('acr_invoice_confirm_ds').submit();
    	        $('acr_invoice_confirm_ds').query();
    	    }
    	    
    	    function acr_invoice_confirm(){
    	        var records = $('acr_invoice_confirm_ds').getSelected();
    	        for(i=0;i<records.length;i++){
    	            records[i].set('express_status','CONFIRM');
    	            records[i].set('_status','update');
    	        }
    	        $('acr_invoice_confirm_ds').submit();
    	        $('acr_invoice_confirm_ds').query();
    	    }
    	]]></script>
        <a:dataSets>
            <!-- <a:dataSet id="express_status_ds" loadData="true" lookupCode="ACR520_EXPESS_STATUS"/> -->
            <a:dataSet id="acr_invoice_confirm_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="search_term_1"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="acr_invoice_confirm_ds" autoPageSize="true" autoQuery="true" model="acr.ACR520.acr_invoice_confirm" queryDataSet="acr_invoice_confirm_query_ds" selectable="true" submitUrl="${/request/@context_path}/autocrud/acr.ACR520.acr_invoice_confirm/batch_update">
                <a:fields>
                    <a:field name="invoice_hd_id"/>
                    <a:field name="express_status"/>
                    <!-- <a:field name="express_status_n" displayField="code_value_name" options="express_status_ds" returnField="express_status" valueField="code_value"/> -->
                </a:fields>
                <a:events>
                    <a:event name="submit" handler="acr_invoice_confirm_ds_query"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="acr_invoice_confirm_ds_query" text="HAP_QUERY"/>
                <a:gridButton click="acr_invoice_confirm_query_ds_reset" text="HLS.RESET"/>
                <a:gridButton click="acr_invoice_confirm_import" text="HLS.IMPORT"/>
                <a:gridButton click="acr_invoice_confirm_export" text="HLS.EXPORT"/>
                <a:gridButton click="acr_invoice_confirm_send_back" text="ACR519.SEND_BACK"/>
                <a:gridButton click="acr_invoice_confirm" text="CONFIRM"/>
            </a:screenTopToolbar>
            <a:form column="4" marginWidth="50" title="ACR519.INVOICE_DELIVERY">
                <a:textField name="search_term_1" bindTarget="acr_invoice_confirm_query_ds" prompt="ACR.SEARCH_TERM_1"/>
                <a:textField name="invoice_number" bindTarget="acr_invoice_confirm_query_ds" prompt="ACR.INVOICE_NUMBER"/>
                <a:datePicker name="invoice_date_from" bindTarget="acr_invoice_confirm_query_ds" prompt="ACR519.INVOICE_DATE_FROM"/>
                <a:datePicker name="invoice_date_to" bindTarget="acr_invoice_confirm_query_ds" prompt="ACR519.INVOICE_DATE_TO"/>
                <a:textField name="bp_name" bindTarget="acr_invoice_confirm_query_ds" prompt="HLS.CUSTOMER_NAME"/>
                <a:numberField name="times" allowDecimals="false" bindTarget="acr_invoice_confirm_query_ds" prompt="HLS.TIMES"/>
                <a:numberField name="total_amount" bindTarget="acr_invoice_confirm_query_ds" prompt="ACR.TOTAL_AMOUNT"/>
            </a:form>
            <a:grid id="acr_invoice_confirm_grid" bindTarget="acr_invoice_confirm_ds" marginHeight="200" marginWidth="50" navBar="true">
                <a:columns>
                    <a:column name="search_term_1" prompt="ACR.SEARCH_TERM_1" width="120"/>
                    <a:column name="invoice_number" prompt="ACR.INVOICE_NUMBER" width="120"/>
                    <a:column name="invoice_date" prompt="ACR521.INVOICE_DATE" width="80"/>
                    <a:column name="bp_name" prompt="HLS.CUSTOMER_NAME" width="150"/>
                    <a:column name="times" align="center" prompt="ACR521.TENANCY_TERM" width="60"/>
                    <a:column name="total_amount" align="right" prompt="HLS.AMOUNT" renderer="Leaf.formatMoney" width="100"/>
                    <a:column name="express_status_n" align="center" prompt="HLS.STATUS" width="80"/>
                    <a:column name="fnc_handover_date" prompt="ACR520.FNC_RESEIPT_DATE" width="80"/>
                    <a:column name="invoice_delivery" align="center" prompt="ACR520.FNC_RECIPIENT"/>
                    <a:column name="invoice_submit_date" prompt="ACR.INVOICE_SUBMIT_DATE" width="80"/>
                    <a:column name="invoice_submitter_n" align="center" prompt="ACR.INVOICE_SUBMITTER"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>