ast_car_trailer_launch.lview 5.64 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ZLF  
    $Date: 2014-11-13 下午3:07:30  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:view>
        <a:link id="ast_car_trailer_link" url="${/request/@context_path}/modules/ast/AST505/ast_lease_item_maintance.lview"/>
        <a:link id="ast_car_trailer_submit_link" model="ast.AST505.ast_car_trailer" modelaction="insert"/>
        <script type="text/javascript"><![CDATA[
            function back() {
                if (!Leaf.isEmpty('${/parameter/@winid}')) {
                    $('${/parameter/@winid}').close();
                } else {
                    $('trailer_launch_window').close();
                }
            }
            
            function trailer_launch() {
                Leaf.showConfirm('确认', '您确定提交拖车申请吗?', function() {
            
                    Leaf.Masker.mask($('${/parameter/@winid}').wrap, '正在操作......');
                    var data = $('ast_car_trailer_result_ds_2').getCurrentRecord().data;
                    data['item_detail_id'] = $('con_item_info_ds_2').getCurrentRecord().get('item_detail_id');
            
                    Leaf.request({
                        url: $('ast_car_trailer_submit_link').getUrl(),
                        para: data,
                        scope: this,
                        success: function() {
                            Leaf.SideBar.show({
                                msg: '提交成功....',
                                duration: 3000
                            });
                            Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
                            $('${/parameter/@winid}').close();
                        },
                        error: function() {
                            Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
                        },
                        failure: function() {
                            Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
                        }
                    });
            
            
            
            
            
            
                });
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="con505_contract_result_ds" autoPageSize="true" autoQuery="true" model="ast.AST505.con_contract_dun_for_query" queryUrl="${/request/@context_path}/autocrud/ast.AST505.con_contract_dun_for_query/query?contract_id=${/parameter/@contract_id}"/>
            <a:dataSet id="con_item_info_ds_2" autoCreate="true" autoQuery="true" model="ast.AST505.con_contract_item_v" queryUrl="${/request/@context_path}/autocrud/ast.AST505.con_contract_item_v/query?contract_id=${/parameter/@contract_id}"/>
            <a:dataSet id="ast_car_trailer_result_ds_2" model="ast.AST505.ast_car_trailer">
                <a:fields>
                    <a:field name="estimate_amount" required="true"/>
                    <a:field name="trailer_reason" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="back" text="后退"/>
                <a:gridButton click="trailer_launch" text="提交"/>
            </a:screenTopToolbar>
            <a:form column="1" marginWidth="30" title="基本信息">
                <a:hBox>
                    <a:textField name="bp_name" bindTarget="con_item_info_ds_2" prompt="承租人" readOnly="true"/>
                    <a:textField name="item_frame_number" bindTarget="con_item_info_ds_2" prompt="车架号" readOnly="true"/>
                    <a:textField name="item_engine_number" bindTarget="con_item_info_ds_2" prompt="发动机号" readOnly="true"/>
                    <a:textField name="color_of_apprearance" bindTarget="con_item_info_ds_2" prompt="外观颜色" readOnly="true"/>
                </a:hBox>
                <a:hBox>
                    <a:numberField name="estimate_amount" bindTarget="ast_car_trailer_result_ds_2" prompt="拖车预估费" width="150"/>
                    <a:textField name="brand_dis" bindTarget="con_item_info_ds_2" prompt="品牌" readOnly="true"/>
                    <a:textField name="series_dis" bindTarget="con_item_info_ds_2" prompt="车系" readOnly="true"/>
                    <a:textField name="model_dis" bindTarget="con_item_info_ds_2" prompt="车型" readOnly="true"/>
                </a:hBox>
                <a:hBox>
                    <a:textField name="trailer_reason" bindTarget="ast_car_trailer_result_ds_2" prompt="拖车原因" width="850"/>
                </a:hBox>
            </a:form>
            <a:grid id="ast505_con_contract_grid_ds" bindTarget="con505_contract_result_ds" marginHeight="300" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="contract_number" align="center" lock="true" prompt="HLS.CONTRACT_NUMBER" width="150"/>
                    <a:column name="times" align="center" prompt="租赁期数" width="150"/>
                    <a:column name="due_date" align="center" prompt="预定收款日" renderer="Leaf.formatDate" width="150"/>
                    <a:column name="due_amount" align="right" prompt="预定收款金额" renderer="Leaf.formatMoney" width="120"/>
                    <a:column name="received_amount" align="right" prompt="已收款金额" renderer="Leaf.formatMoney" width="120"/>
                    <a:column name="balance_due_amount" align="right" prompt="未收款金额" renderer="Leaf.formatMoney" width="120"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>