bp_agent_import.lview 8 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 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: lpc 9874  
    $Date: 2017/11/24 13:52:40  
    $Revision: 1.0  
    $purpose: 经销商创建  创建界面    
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure>
        <a:model-query model="hls.HLS303.hls_bp_agent_import_batch_id" rootPath="batch_id"/>
    </a:init-procedure>
    <a:view>
        <a:link id="bp_agent_link" url="${/request/@context_path}/modules/hls/HLS303/bp_agent_create.lview"/>
        <a:link id="import_save_link" model="hls.HLS303.save_data" modelaction="update"/>
        <a:link id="import_upload_link" url="${/request/@context_path}/modules/hls/HLS303/bp_agent_import_upload.lview"/>
        <script type="text/javascript"><![CDATA[
            function view() {
                parent._input_window.close();
            }
            
            // function loadData() {
                //
                // var win = new Leaf.Window({
                    // url: $('import_upload_link').getUrl(),
                    // params: {
                        // 'winid': ${/parameter/@winid},
                        // 'bp_id': ${/parameter/@bp_id},
                        // 'batch_id': ${/model/batch_id/record/@batch_id}
                    // },
                    // title: '导入',
                    // width: 420,
                    // height: 275
                // });
            // }
            
            function submitData() {

                var param = {};
                param['batch_id'] = ${/session/@session_id};
                param['bp_id'] = ${/parameter/@bp_id};
                Leaf.request({
                    url: $('import_save_link').getUrl(),
                    para: param,
                    success: function() {
                        Leaf.SideBar.show({
                            msg: '提交操作成功!',
                            duration: 2000
                        });
                        view();
                        //$('${/parameter/@winid}').close();
                    },
                    scope: this
                });
            }
        ]]></script>
        <a:dataSet id="modality_ds" lookupCode="AGENT_REBATE_MODALITY"/>
        <a:dataSets>
            <a:dataSet id="sale_ds" autoQuery="true" model="hls.HLS303.hls_bp_master_agent_sl_temp" queryUrl="${/request/@context_path}/autocrud/hls.HLS303.hls_bp_master_agent_sl_temp/query?batch_id=${/model/batch_id/record/@batch_id}"/>
        </a:dataSets>
        <a:dataSets>
            <a:dataSet id="rebate_ds" autoQuery="true" model="hls.HLS303.hls_bp_master_agent_rb_temp" queryUrl="${/request/@context_path}/autocrud/hls.HLS303.hls_bp_master_agent_rb_temp/query?batch_id=${/model/batch_id/record/@batch_id}">
                <a:field name="modality_n" displayField="code_value_name" options="modality_ds" readOnly="true" returnField="modality" valueField="code_value"/>
                <a:field name="modality"/>
            </a:dataSet>
        </a:dataSets>
        <a:dataSets>
            <a:dataSet id="loan_ds" autoQuery="true" model="hls.HLS303.hls_bp_master_agent_la_temp" queryUrl="${/request/@context_path}/autocrud/hls.HLS303.hls_bp_master_agent_la_temp/query?batch_id=${/model/batch_id/record/@batch_id}&amp;document_type=LOAN"/>
        </a:dataSets>
        <a:dataSets>
            <a:dataSet id="agent_loan_ds" autoQuery="true" model="hls.HLS303.hls_bp_master_agent_la_temp" queryUrl="${/request/@context_path}/autocrud/hls.HLS303.hls_bp_master_agent_la_temp/query?batch_id=${/model/batch_id/record/@batch_id}&amp;document_type=AGENT_LOAN"/>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <!-- <a:toolbarButton click="loadData" text="PROMPT.LOADDATA" width="80"/> -->
                <a:toolbarButton click="submitData" text="PROMPT.SUBMIT" width="80"/>
            </a:screenTopToolbar>
            <a:grid id="sale_grid" bindTarget="sale_ds" marginHeight="150" marginWidth="10" navBar="true">
                <a:columns>
                    <a:column name="statement_date" align="center" prompt="报表日期" width="120"/>
                    <a:column name="wholesale_task" align="center" prompt="批售任务" width="120"/>
                    <a:column name="wholesale_real_sales" align="center" prompt="批售实际" width="120"/>
                    <a:column name="wholesale_amount" align="center" prompt="批售金额(万元)" renderer="Leaf.formatMoney" width="180"/>
                    <a:column name="retail_task" align="center" prompt="零售任务" width="150"/>
                    <a:column name="retail_real_sales" align="center" prompt="零售实际" width="180"/>
                    <a:column name="retail_amount" align="center" prompt="零售金额(万元)" renderer="Leaf.formatMoney" width="180"/>
                    <a:column name="repair_sum" align="center" prompt="累计维修台数" width="180"/>
                    <a:column name="repair_amount" align="center" prompt="累计维修金额(万元)" renderer="Leaf.formatMoney" width="180"/>
                </a:columns>
            </a:grid>
            <a:grid id="rebate_grid" bindTarget="rebate_ds" marginHeight="150" marginWidth="10" navBar="true">
                <a:columns>
                    <a:column name="quarter" align="center" prompt="季度" width="120"/>
                    <a:column name="rebate_amount_vat" align="center" prompt="返利金额(含税)" renderer="Leaf.formatMoney" width="120"/>
                    <a:column name="modality_n" align="center" prompt="形式(现金/车辆)" width="120"/>
                    <a:column name="amount" align="center" prompt="金额(万元)" renderer="Leaf.formatMoney" width="180"/>
                    <a:column name="rebate_date" align="center" prompt="时间 " width="150"/>
                    <a:column name="note" align="center" prompt="备注" width="180"/>
                </a:columns>
            </a:grid>
            <a:grid id="loan_grid" bindTarget="loan_ds" marginHeight="150" marginWidth="10" navBar="true">
                <a:columns>
                    <a:column name="financial_org_name" align="center" prompt="金融机构名称" width="120"/>
                    <a:column name="credit_limit" align="center" prompt="授信额度(万元)" renderer="Leaf.formatMoney" width="120"/>
                    <a:column name="loan_amount" align="center" prompt="借款金额(万元)" renderer="Leaf.formatMoney" width="120"/>
                    <a:column name="loan_date_from" align="center" prompt="借款日期从" renderer="Leaf.formatDate" width="180"/>
                    <a:column name="loan_date_to" align="center" prompt="借款日期到" renderer="Leaf.formatDate" width="150"/>
                    <a:column name="loan_use" align="center" prompt="借款用途" width="180"/>
                    <a:column name="guarantee_condition" align="center" prompt="担保条件" width="180"/>
                </a:columns>
            </a:grid>
            <a:grid id="agent_loan_grid" bindTarget="agent_loan_ds" marginHeight="150" marginWidth="10" navBar="true">
                <a:columns>
                    <a:column name="bank_name" align="center" prompt="银行名" width="120"/>
                    <a:column name="credit_limit" align="center" prompt="授信额度(万元)" renderer="Leaf.formatMoney" width="120"/>
                    <a:column name="loan_amount" align="center" prompt="借款金额(万元)" renderer="Leaf.formatMoney" width="120"/>
                    <a:column name="loan_date_from" align="center" prompt="借款日期从" renderer="Leaf.formatDate" width="180"/>
                    <a:column name="loan_date_to" align="center" prompt="借款日期到" renderer="Leaf.formatDate" width="150"/>
                    <a:column name="loan_use" align="center" prompt="借款用途" width="180"/>
                    <a:column name="deposit_ratio" align="center" prompt="保证金比例" width="180"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>