tre_reservation_confirm_detail.lview 4.39 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
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:link id="tre511_detail_attach_download_link" url="${/request/@context_path}/downloadFile.lview"/>
        <script type="text/javascript"><![CDATA[
            
            function atm_upload_renderer(value, record, name) {
                if (!Ext.isEmpty(record.get('reservation_id'))) {
                    var value_prompt  = '附件查看';
                    return '<a href="javascript:atm_upload_win(' + record.get('reservation_id') + ',\'' + record.get('status') + '\')">' + value_prompt + '</a>';
                }
            }
            
            function atm_upload_win(reservation_id, status) {
                var url = $('tre511_detail_attach_download_link').getUrl() + '?table_name=TRE_FUNDS_RESERVATION&header_id=' + reservation_id;

                new Leaf.Window({
                    url: url,
                    title: '${l:TRE510.ATTACHMENT_UPLOAD}',
                    id: 'tre_funds_reservation_win',
                    width: 850,
                    height: 400
                });
            }
            
            function reserveDs_query() {
                $('tre511_funds_reservation_detail_ds').query();
            }
            
            function reserveDs_quit(){
                $('${/parameter/@winid}').close();
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="tre_status_ds" lookupCode="RESERVE_STATUS"/>
            <a:dataSet id="tre511_funds_reservation_detail_ds" autoPageSize="true" autoQuery="true" fetchAll="true" model="tre.tre510.tre_funds_reservation_detail" queryUrl="${/request/@context_path}/autocrud/tre.tre510.tre_funds_reservation_detail/query?project_id=${/parameter/@project_id}&amp;status=RESERVED" selectable="true" selectionModel="single">
                <a:fields>
                    <a:field name="project_id"/>
                    <!-- <a:field name="contract_number" defaultValue="${/model/contract_path/record/@contract_number}"/> -->
                    <!-- <a:field name="contract_name" defaultValue="${/model/contract_path/record/@contract_name}"/> -->
                    <a:field name="bp_name"/>
                    <a:field name="reserve_amount"/>
                    <a:field name="paid_date"/>
                    <a:field name="document_number"/>
                    <a:field name="document_name"/>
                    <a:field name="status"/>
                    <a:field name="status_n" displayField="code_value_name" options="tre_status_ds" returnField="status" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <!-- <a:gridButton click="reserveDs_query" text="查询"/> -->
                <a:gridButton click="reserveDs_quit" text="关闭"/>
            </a:screenTopToolbar>
            <a:form/>
            <a:grid id="tre511_funds_reservation_detail_grid" bindTarget="tre511_funds_reservation_detail_ds" marginHeight="180" marginWidth="100" navBar="true">
                <a:columns>
                    <!-- <a:column name="contract_number" align="center" lock="true" prompt="放款编号" width="120"/> -->
                    <a:column name="document_number" lock="true" prompt="合同编号" width="120"/>
                    <a:column name="document_name" lock="true" prompt="合同名称" width="150"/>
                    <!-- <a:column name="contract_name" lock="true" prompt="项目名称" width="200"/> -->
                    <a:column name="bp_name" lock="true" prompt="承租人名称" width="180"/>
                    <a:column name="status_n" align="center" prompt="预约状态" width="80"/>
                    <a:column name="reserve_amount" align="right" prompt="预约金额" renderer="Leaf.formatMoney" width="120"/>
                    <a:column name="paid_date" align="center" prompt="用款日期" renderer="Leaf.formatDate" width="100"/>
                    <a:column name="reserve_note" prompt="用款事由" width="300"/>
                    <a:column name="description" prompt="说明" width="300"/>
                    <a:column name="attach_upload" align="center" prompt="附件" renderer="atm_upload_renderer"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>