<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <script type="text/javascript"><![CDATA[
			function fnd511_save_fun(){
			    $('fnd511_result_ds').submit();
			}
			function fnd511_query_fun(){
			    $('fnd511_result_ds').query();
			}
			
		]]></script>
        <a:dataSets>
            <a:dataSet id="fnd511_branch_company_ds" fetchAll="true" lookupCode="BRANCH_COMPANY"/>
            <a:dataSet id="fnd511_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="company_name" displayField="code_value_name" options="fnd511_branch_company_ds" returnField="company_code" valueField="code_value"/>
                    <a:field name="province_name" lovGridHeight="300" lovHeight="500" lovService="basic.fnd_province_for_lov" lovWidth="500" title="省份">
                        <a:mapping>
                            <a:map from="province_id" to="province_id"/>
                            <a:map from="description" to="province_name"/>
                        </a:mapping>
                    </a:field>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="fnd511_result_ds" autoPageSize="true" autoQuery="true" model="fnd.FND511.fnd_company_province" queryDataSet="fnd511_query_ds">
                <a:fields>
                    <a:field name="province_id_n" lovGridHeight="300" lovHeight="500" lovService="basic.fnd_province_for_lov" lovWidth="500" title="省份">
                        <a:mapping>
                            <a:map from="province_id" to="province_id"/>
                            <a:map from="description" to="province_id_n"/>
                        </a:mapping>
                    </a:field>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="fnd511_query_fun" text="HLS.QUERY"/>
                <a:gridButton click="fnd511_save_fun" text="HLS.SAVE"/>
            </a:screenTopToolbar>
            <a:form column="4" marginWidth="300" title="查询条件">
                <a:comboBox name="company_name" bindTarget="fnd511_query_ds" prompt="分公司"/>
                <a:lov name="province_name" bindTarget="fnd511_query_ds" prompt="省份"/>
            </a:form>
            <a:grid id="fnd511_result_gd" bindTarget="fnd511_result_ds" marginHeight="250" marginWidth="300" navBar="true">
                <a:columns>
                    <a:column name="company_name" prompt="分公司" width="200"/>
                    <a:column name="province_id_n" editor="fnd511_loved" prompt="省份" width="300"/>
                    <a:column name="signing_location" editor="fnd511_texted" prompt="签约地" width="400"/>
                    <a:column name="con_extra_code" editor="fnd511_texted" prompt="合同额外编码"/>
                </a:columns>
                <a:editors>
                    <a:lov id="fnd511_loved"/>
                    <a:textField id="fnd511_texted"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>