rsc_value_assessment.lview 11.5 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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: peter soong  
    $Date: 2014-08-27 16:33:57  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" trace="true">
    <a:view>
        <a:link id="pageLink_bpQueryScreen_welcome" url="${/request/@context_path}/welcome.lview"/>
        <a:link id="hls_bp_master_dynamic_update_link_id" url="${/request/@context_path}/modules/hls/HLS213/hls_bp_master_dynamic_update.lview"/>
        <a:link id="hls_bp_master_get_layout_code_link_id" model="hls.HLS213.hls_bp_master_get_layout_code" modelaction="update"/>
        <a:link id="rsc_value_assessment_submit_link" url="${/request/@context_path}/modules/rsc/RSC504/rsc_value_assessment_create.lview"/>
        <script type="text/javascript"><![CDATA[
            function bpQueryScreen_forward() {
                history.go(1);
            }
            
            function bpQueryScreen_back() {
                history.go(-1);
            }
            
            function bpQueryScreen_query() {
                $('bpQueryDs').query();
            }
            function bpQueryScreen_reset() {
                $('para_bpQueryDs').reset();
            }
            function bpQueryScreen_quit() {
                location.href = $('pageLink_bpQueryScreen_welcome').getUrl();
                parent.shMenu('show');
            }
            
            function construct_from_to() {
                var config = ['bp_code', 'bp_code_desc', 'search_term_1', 'search_term_2'];
                var pattern = ['_from', '_to'];
                var obj = {};
                for (var i = 0,
                    j = config.length;i < j;i++) {
                    for (var m = 0,
                        n = pattern.length;m < n;m++) {
                        obj[config[i] + pattern[m]] = config[i] + pattern[n - 1 - m];
                    }
                }
                return obj;
            }
            
            function onUpdate_para_bpQueryDs(ds, record, name, value, oldvalue) {
                var from_to = construct_from_to();
                var opposite_name = from_to[name];
                if (!Ext.isEmpty(opposite_name)) {
                    var opposite_value = record.get(opposite_name);
                    if (!Ext.isEmpty(value) && Ext.isEmpty(opposite_value)) {
                        record.set(opposite_name, value);
                    }
                }
            
            }
            
            function winOpen_bpMaintainScreen(id) {
                var current_record = $('bpQueryDs').findById(id);
                var param = current_record.data;
                hls214_param_set_value(param);
            }
            
            
            
            function hls214_param_set_value(param) {
                param['function_code'] = 'HLS306';
                param['function_usage'] = 'QUERY';
                param['url_title'] = '${l:HLS212.BP_MASTER_MAINTAIN}';
                param['master_type'] = 'READONLY';
                param['master_id'] = param['bp_id'];
                hls_doc_get_layout_code('hls_bp_master_get_layout_code_link_id', param, 'hls_bp_master_dynamic_update_link_id', 'bpQueryDs');
            }
            
            function render_bpQueryDs_grid(value, record, name) {
                if (name == 'bp_code') {
                    var bp_id = record.get('bp_id');
                    if (!Ext.isEmpty(bp_id) && !Ext.isEmpty(value)) {
                        return '<a href="javascript:winOpen_bpMaintainScreen(' + record.id + ');">' + value + '</a>';
                    }
                }
                return '';
            }
            
            function bpQueryScreen_inspect_asset_create() {
                var bp_id  = $('bpQueryDs').getCurrentRecord().get('bp_id');
                new Leaf.Window({
                    id: 'rsc_value_assessment_submit_id',
                    url: $('rsc_value_assessment_submit_link').getUrl() + '?bp_id_tenant=' + bp_id,
                    title: '价值评估创建',
                    fullScreen: true
                }).on('close', bpQueryScreen_query);
            
            }
        ]]></script>
        <a:screen-include screen="modules/hls/HLS213/hls_bp_master_get_layout_code.lview"/>
        <a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?master_type=BP&amp;function_code=HLS214"/>
        <a:dataSets>
            <a:dataSet id="enabled_flag_ds" lookupCode="ENABLED_STATUS"/>
            <a:dataSet id="bpClassDs" lookupCode="HLS211_BP_CLASS"/>
            <a:dataSet id="para_bpQueryDs" model="hls.HLS212.hls_bp_master_all_data_v">
                <a:fields>
                    <a:field name="bp_class_desc" displayField="code_value_name" options="bpClassDs" returnField="bp_class" valueField="code_value"/>
                    <a:field name="bp_class"/>
                    <a:field name="bp_type_desc" readOnly="true"/>
                    <a:field name="bp_type" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_type_v_for_lov?enabled_flag=Y" lovWidth="500" prompt="HLS_BP_TYPE.BP_TYPE" title="HLS_BP_TYPE.BP_TYPE">
                        <a:mapping>
                            <a:map from="description" to="bp_type_desc"/>
                            <a:map from="bp_type" to="bp_type"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_code_from" lovGridHeight="350" lovHeight="500" lovService="rsc.RSC504.hls_bp_master_for_lov" lovWidth="500" title="HLS.BP_TITLE">
                        <a:mapping>
                            <a:map from="bp_code" to="bp_code_from"/>
                        </a:mapping>
                    </a:field>
                    <!-- lovService="basic.hls_bp_master_v_for_lov" -->
                    <a:field name="bp_code_to" lovGridHeight="350" lovHeight="500" lovService="rsc.RSC504.hls_bp_master_for_lov" lovWidth="500" title="HLS.BP_TITLE">
                        <a:mapping>
                            <a:map from="bp_code" to="bp_code_to"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_name"/>
                    <!-- lovService="prj.PRJ501.prj_project_for_lov" -->
                    <a:field name="bp_project_number" lovGridHeight="350" lovHeight="500" lovService="rsc.RSC504.prj_project_for_lov" lovWidth="500" title="项目">
                        <a:mapping>
                            <a:map from="project_id" to="bp_project_id"/>
                            <a:map from="project_number" to="bp_project_number"/>
                            <a:map from="project_name" to="bp_project_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_project_id"/>
                    <a:field name="bp_project_name"/>
                    <!-- lovService="cont.CON500.con_contract_number_lov" -->
                    <a:field name="bp_contract_number" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="rsc.RSC504.con_contract_for_lov" lovWidth="500" title="HLS.CONTRACT_NUMBER">
                        <a:mapping>
                            <a:map from="contract_id" to="bp_contract_id"/>
                            <a:map from="contract_number" to="bp_contract_number"/>
                            <a:map from="contract_name" to="bp_contract_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="enabled_flag" defaultValue="Y"/>
                    <a:field name="enabled_flag_desc" displayField="code_value_name" options="enabled_flag_ds" prompt="HLS.ENABLED_FLAG" returnField="enabled_flag" valueField="code_value"/>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="onUpdate_para_bpQueryDs"/>
                </a:events>
            </a:dataSet>
            <a:dataSet id="bpQueryDs" autoPageSize="true" autoQuery="true" model="rsc.RSC504.rsc_value_assess" queryDataSet="para_bpQueryDs" queryUrl="${/request/@context_path}/autocrud/rsc.RSC504.rsc_value_assess/query?entry=LEASE_BP" selectable="true" selectionModel="single">
                <a:fields>
                    <a:field name="hls_bp_credit_apply_attach" defaultValue="附件"/>
                </a:fields>
                <!--   <a:events>
                    <a:event name="query" handler="aut_authority_list_validate_query"/>
                </a:events> -->
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <!-- <a:gridButton click="bpQueryScreen_back" text="HLS.BACK"/>
                <a:gridButton click="bpQueryScreen_forward" text="HLS.FORWARD"/> -->
                <a:gridButton click="bpQueryScreen_inspect_asset_create" text="创建"/>
                <a:gridButton click="bpQueryScreen_query" text="HLS.QUERY"/>
                <a:gridButton click="bpQueryScreen_reset" text="HLS.RESET"/>
                <a:gridButton click="bpQueryScreen_quit" text="HLS.EXIT"/>
            </a:screenTopToolbar>
            <a:form column="4" labelWidth="120" marginWidth="30" title="HLS.QUERY_TITLE">
                <a:lov name="bp_code_from" bindTarget="para_bpQueryDs" prompt="HLS.BP_CODE_FROM">
                    <a:events>
                        <a:event name="focus" handler="on_std_focus"/>
                    </a:events>
                </a:lov>
                <a:lov name="bp_code_to" bindTarget="para_bpQueryDs" prompt="HLS.BP_CODE_TO">
                    <a:events>
                        <a:event name="focus" handler="on_std_focus"/>
                    </a:events>
                </a:lov>
                <a:textField name="bp_name" bindTarget="para_bpQueryDs" prompt="HLS.BP_NAME"/>
                <a:textField name="extra_nam" bindTarget="para_bpQueryDs" prompt="HLS.SHORT_NAME"/>
                <!-- <a:lov name="bp_project_number" bindTarget="para_bpQueryDs" 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="bp_project_name" bindTarget="para_bpQueryDs" prompt="HLS.PROJECT_NAME"/>
                <a:lov name="bp_contract_number" bindTarget="para_bpQueryDs" prompt="HLS.CONTRACT_NUMBER">
                    <a:events>
                        <a:event name="focus" handler="function(object){on_std_focus(object,&apos;CONTRACT&apos;)}"/>
                    </a:events>
                </a:lov>
                <a:textField name="bp_contract_name" bindTarget="para_bpQueryDs" prompt="HLS.CONTRACT_NAME"/>
                <a:comboBox name="bp_class_desc" bindTarget="para_bpQueryDs" prompt="HLS_BP_MASTER.BP_CLASS"/> -->
            </a:form>
            <a:grid id="bpQueryDs_grid" bindTarget="bpQueryDs" marginHeight="250" marginWidth="30" navBar="true">
                <a:columns>
                    <a:column name="bp_code" renderer="render_bpQueryDs_grid" width="180"/>
                    <a:column name="bp_name" width="250"/>
                    <a:column name="extra_nam" prompt="HLS.SHORT_NAME" width="150"/>
                    <a:column name="bp_class_desc" width="120"/>
                    <a:column name="bp_type_desc" width="120"/>
                    <a:column name="bp_category_desc" width="120"/>
                    <a:column name="enabled_flag_desc" width="60"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>