prj_project_quotation_split.lview 5.12 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang  
    $Date: 2013-9-22 下午01:58:52  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:init-procedure>
        <a:model-query fetchAll="true" model="basic.hls_sys_time_default_value" rootPath="default_value_path"/>
    </a:init-procedure>
    <a:view>
        <a:link id="prj_project_quotation_split_detail_link_id" url="${/request/@context_path}/modules/prj/PRJ511/prj_project_quotation_split_detail.lview"/>
        <script type="text/javascript"><![CDATA[
        	function prj511_project_quotation_split(){
        	    if($('prj_project_quotation_split_ds').validate()){
        	       var record= $('prj_project_quotation_split_ds').getCurrentRecord();
        	       new Leaf.Window({
                        id: 'prj_project_quotation_split_detail_winid',
                        params: {
                           project_id: record.get('project_id'),
                           quotation_id:record.get('quotation_id'),
                           document_id:record.get('project_id'),
                           document_category:record.get('document_category')
                        },
                        url: $('prj_project_quotation_split_detail_link_id').getUrl(),
                        title: '${l:PRJ511.PRJ_QUOTATION_SPLIT}',
                        fullScreen: true,
                        draggable: true
                    });
        	    }
        	}
        	function on_quotation_split_ds_update(ds,record,name,value,oldvalue){
        	    if(name=='project_id'){
        	        if(value!=oldvalue){
        	            record.set('version','');
        	            record.set('quotation_date','');
	        	        var version_field=record.getField('version');
	        	        version_field.setLovPara('document_id',value);
	        	        version_field.setLovPara('document_category',record.get('document_category'));
        	        }
        	    }
        	}
		]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=PROJECT&amp;function_code=PRJ511"/>
        <a:dataSets>
            <a:dataSet id="prj_project_quotation_split_ds" autoCreate="true">
                <a:fields>
                    <a:field name="project_number" autoComplete="true" lovGridHeight="300" lovHeight="500" lovService="prj.PRJ511.prj_project_quotation_split_for_lov?split_status_flag=Y&amp;authorize_flag=${/model/default_value_path/record/@authority_flag}&amp;company_id=${/session/@company_id}&amp;trx_category=PROJECT" lovWidth="900" required="true" title="HLS.PROJECT_NUMBER">
                        <a:mapping>
                            <a:map from="document_category" to="document_category"/>
                            <a:map from="project_number" to="project_number"/>
                            <a:map from="project_name" to="project_name"/>
                            <a:map from="project_id" to="project_id"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="project_id"/>
                    <a:field name="document_category"/>
                    <a:field name="project_name" readOnly="true"/>
                    <a:field name="version" autoComplete="true" lovGridHeight="300" lovHeight="500" lovService="prj.PRJ511.prj_quotation_for_split" lovWidth="900" required="true" title="HLS.QUOTATION_VERSION">
                        <a:mapping>
                            <a:map from="quotation_id" to="quotation_id"/>
                            <a:map from="version" to="version"/>
                            <a:map from="quotation_date" to="quotation_date"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="quotation_id"/>
                    <a:field name="quotation_date" readOnly="true"/>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="on_quotation_split_ds_update"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:toolbarButton click="prj511_project_quotation_split" text="HLS.CREATE"/>
            </a:screenTopToolbar>
            <a:form column="2" title="PRJ511.PRJ_QUOTATION_SPLIT">
                <a:lov name="project_number" bindTarget="prj_project_quotation_split_ds" prompt="HLS.PROJECT_NUMBER">
                    <a:events>
                        <a:event name="focus" handler="function(object){on_std_focus(object,&apos;PROJECT&apos;)}"/>
                    </a:events>
                </a:lov>
                <a:textField name="project_name" bindTarget="prj_project_quotation_split_ds" prompt="HLS.PROJECT_NAME"/>
                <a:lov name="version" bindTarget="prj_project_quotation_split_ds" prompt="HLS.QUOTATION_VERSION"/>
                <a:datePicker name="quotation_date" bindTarget="prj_project_quotation_split_ds" prompt="HLS.CACULATE_DATE"/>
            </a:form>
        </a:screenBody>
    </a:view>
</a:screen>