prj_project_create_entrance.lview 4.49 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei5743 
    $Date: 2014-10-8 下午1:13:25  
    $Revision: 1.0  
    $Purpose: 租赁申请创建入口
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
    <a:init-procedure>
        <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:model-query fetchAll="true" model="prj.PRJ500D.prj_project_get_4s" rootPath="4s_root_path"/>
        <a:model-query defaultWhereClause="t1.company_id=${/session/@company_id}" fetchAll="true" model="prj.PRJ500D.get_company_info" rootPath="company_info_path"/>
    </a:init-procedure>
    <a:view>
        <a:link id="prj_chance_create_link" url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create.lview"/>
        <a:link id="prj_project_create_manager_link" url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create_manager.lview"/>
        <a:link id="prj_project_create_special_link" url="${/request/@context_path}/modules/prj/PRJ500N/prj_project_create_special.lview"/>
        <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <script type="text/javascript"><![CDATA[
            //确定
            window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
                var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
                var record = $(ds_id).getCurrentRecord();
                if ($(ds_id).validate()) {
                    if(record.get('special_permit_flag')=='Y'){
                        //零售特批
                        record.set('function_code', 'PRJ500D_SPECIAL');
                        record.set('function_usage', 'CREATE');
                        record.set('document_category', 'PROJECT');
                        record.set('default_value_dsid', ds_id);
                        record.data['url_title'] = '租赁申请创建';
                        record.set('winid','prj_porject_create_win_id');
                         var param = record.data;
                        hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'prj_project_create_special_link');
                    }else if (record.get('lease_channel') == '02') {
                        //管理人员
                        record.set('function_code', 'PRJ500D');
                        record.set('function_usage', 'CREATE');
                        record.set('document_category', 'PROJECT');
                        record.set('default_value_dsid', ds_id);
                        record.data['url_title'] = '租赁申请创建';
                        record.set('winid','prj_porject_create_win_id');
                        var param = record.data;
                        hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'prj_project_create_manager_link');
                    } else {
                        record.set('function_code', 'PRJ500D');
                        record.set('function_usage', 'CREATE');
                        record.set('document_category', 'PROJECT');
                        record.set('default_value_dsid', ds_id);
                        record.data['url_title'] = '租赁申请创建';
                        var param = record.data;
                        record.set('winid','prj_porject_create_win_id');
                        hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'prj_chance_create_link');
                    }
                }
            };
            
               Leaf.onReady(function() {

                var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
                var head_record = $(ds_id).getAt(0);
                head_record.set('unit_id', '${/model/4s_root_path/record/@value_code}');
                head_record.set('unit_id_n', '${/model/4s_root_path/record/@value_name}');
                head_record.set('company_id', '${/model/company_info_path/record/@company_id}');
                head_record.set('company_id_n', '${/model/company_info_path/record/@company_short_name}');
            });
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>