prj_project_bp_lov.lview 4.1 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ZLF 
    $Date: 2014-12-23 下午03:08:25  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
            function prj505_project_bp_close() {
                $('${/parameter/@lovid}').win.close();
            }
            
            function prj505_project_bp_query() {
                $('prj_project_bp_result_ds').query();
            }
            
            function prj505_project_bp_comfirm() {
                $('prj505_project_bp_comfirm_btn').disable();
                $('prj_project_bp_result_ds').setSubmitParameter('contract_seq', '${/parameter/@contract_seq}');
                $('prj_project_bp_result_ds').submit();
            }
            
            function prj505_project_guarantor_grid_editor(record, name) {
                if (record.get('contract_seq') != '${/parameter/@contract_seq}') {
                    return 'prj505_project_guarantor_grid_ck';
                }
                return '';
            }
            
            function prj_project_bp_result_ds_submitsuccess(ds) {
                $('prj_project_bp_result_ds').query();
                $('${/parameter/@lovid}').win.close();
            }
            
            function prj_project_bp_result_ds_submitfailed(ds) {
                $('prj505_project_bp_comfirm_btn').enable();
            }
            
            function prj_project_bp_result_ds_load(ds) {
                var records = ds.getAll();
                for (var i = 0;i<records.length;i++) {
                    records[i].set('check_flag','Y');
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="prj_project_bp_query_ds">
                <a:fields>
                    <a:field name="project_id" defaultValue="${/parameter/@project_id}"/>
                    <a:field name="default_contract_seq" defaultValue="${/parameter/@contract_seq}"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="prj_project_bp_result_ds" autoQuery="true" fetchAll="true" model="prj.PRJ501.prj_project_bp_lov_2" queryDataSet="prj_project_bp_query_ds">
                <a:fields>
                    <a:field name="check_flag" checkedValue="Y" defaultValue="N" readOnly="true" uncheckedValue="N"/>
                </a:fields>
                <a:events>
                    <a:event name="load" handler="prj_project_bp_result_ds_load"/>
                    <a:event name="submitsuccess" handler="prj_project_bp_result_ds_submitsuccess"/>
                    <a:event name="submitfailed" handler="prj_project_bp_result_ds_submitfailed"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton click="prj505_project_bp_close" text="HLS.CLOSE"/>
                <a:gridButton click="prj505_project_bp_query" text="HLS.QUERY"/>
                <a:gridButton id="prj505_project_bp_comfirm_btn" click="prj505_project_bp_comfirm" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:form column="2">
                <a:textField name="bp_name" bindTarget="prj_project_bp_query_ds" prompt="承租人名称"/>
                <!-- <a:numberField name="contract_seq" allowDecimals="false" allowNegative="false" bindTarget="prj_project_bp_query_ds" prompt="合同序号"/> -->
            </a:form>
            <a:grid id="prj505_project_guarantor_grid" bindTarget="prj_project_bp_result_ds" height="370" width="630">
                <a:columns>
                    <a:column name="bp_code" prompt="承租人代码" width="150"/>
                    <a:column name="bp_name" prompt="承租人名称" width="150"/>
                    <a:column name="check_flag" prompt="PRJ505.CHECKED" width="80"/>
                </a:columns>
                <a:editors>
                    <a:checkBox id="prj505_project_guarantor_grid_ck"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>