<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: chenlingfeng
    $Date: 2017-7-14 上午10:06:32
    $Revision: 1.0
    $Purpose: 潜在客户
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:init-procedure>
        <a:model-query model="basic.sys_session_info" rootPath="mainPage_session_record"/>
        <a:model-query defaultWhereClause="t1.role_id=${/session/@role_id} and t1.company_id=${/session/@company_id}" fetchAll="true" model="hls.HLS109.hls_default_parameter" rootPath="hls_default_parameter_path"/>
    </a:init-procedure>
    <a:view>
        <script type="text/javascript"><![CDATA[
            function hls2103_query() {
                $("hls2103_chance_bp_detail_result_ds").query();
            }
            
            function hls2103_reset() {
                $('hls2103_chance_bp_detail_query_ds').reset();
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="hls211_bp_class_ds" lookupCode="HLS211_BP_CLASS"/>
            <a:dataSet id="hls2103_chance_bp_detail_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="interview_date_from"/>
                    <a:field name="interview_date_to"/>
                    <a:field name="chance_bp_name"/>
                    <a:field name="bp_class_desc" displayField="code_value_name" options="hls211_bp_class_ds" returnField="bp_class" valueField="code_value"/>
                    <a:field name="bp_class"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="hls2103_chance_bp_detail_result_ds" autoPageSize="true" autoQuery="true" model="hls.HLS2103.hn_chance_bp_interviews" queryDataSet="hls2103_chance_bp_detail_query_ds">
                <a:fields>
                    <a:field name="chance_bp_name"/>
                    <a:field name="chance_bp_id"/>
                    <a:field name="interviewer_user_id_n"/>
                    <a:field name="description" readOnly="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="hls2103_query" text="HLS.QUERY"/>
                <a:gridButton click="hls2103_reset" text="HLS.RESET"/>
            </a:screenTopToolbar>
            <a:form column="4" title="查询条件">
                <a:textField name="chance_bp_name" bindTarget="hls2103_chance_bp_detail_query_ds" prompt="客户名称"/>
                <a:comboBox name="bp_class_desc" bindTarget="hls2103_chance_bp_detail_query_ds" prompt="客户类型"/>
                <a:datePicker name="interview_date_from" bindTarget="hls2103_chance_bp_detail_query_ds" prompt="访谈时间从"/>
                <a:datePicker name="interview_date_to" bindTarget="hls2103_chance_bp_detail_query_ds" prompt="访谈时间到"/>
            </a:form>
            <a:grid id="hls2103_chance_bp_detail_result_grid" bindTarget="hls2103_chance_bp_detail_result_ds" marginHeight="200" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="chance_bp_name" prompt="客户名称" width="200"/>
                    <a:column name="bp_class_n" prompt="分类"/>
                    <a:column name="interview_name" prompt="访谈名称" width="200"/>
                    <a:column name="interviewee_name" prompt="访谈人员" width="150"/>
                    <a:column name="interview_date" prompt="访谈时间" renderer="Leaf.formatDate"/>
                    <a:column name="interview_location" prompt="访谈地点" width="150"/>
                    <a:column name="interviewer_user_id_n" prompt="创建人"/>
                    <a:column name="description" editor="grid_textArea" prompt="说明" width="300"/>
                </a:columns>
                <a:editors>
                    <a:textArea id="grid_textArea" height="200" width="300"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>
