prj_project_approved_query.lview 18 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 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: LR  
    $Date: 2013-8-23 上午10:00:27  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
    <a:init-procedure>
        <a:model-query defaultWhereClause="t1.code=&apos;PRJ501_PRJ_STATUS&apos; and t1.language=${/session/@lang} and t1.code_value in(&apos;RECONSIDER&apos;,&apos;CONTRACT_CREATED&apos;,&apos;APPROVED&apos;)" model="sys.sys_service_lookup_v" rootPath="prj505_prj_status_path"/>
        <a:model-query defaultWhereClause="t1.document_type in (&apos;PRJL&apos;,&apos;PRJLB&apos;)" fetchAll="true" model="basic.hls_document_type_v_lov" rootPath="document_type_rp"/>
    </a:init-procedure>
    <a:view>
        <a:link id="pageLink_projectQueryScreen_welcome" url="${/request/@context_path}/welcome.lview"/>
        <a:link id="pageLink_projectQueryScreen_update_project" url="${/request/@context_path}/modules/prj/PRJ501/prj_project_maintain.lview"/>
        <a:link id="bmLink_projectQueryScreen_change_project_status" model="prj.PRJ501.prj_project_update_status" modelaction="execute"/>
        <a:link id="bmLink_projectQueryScreen_project_submit" model="prj.PRJ501.prj_project_update_status" modelaction="update"/>
        <a:link id="prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <a:link id="prj_project_query_link_id" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_create_tree_n.lview"/>
        <a:link id="prj505_project_create_contract_link" url="${/request/@context_path}/modules/prj/PRJ505/prj_project_create_contract.lview"/>
        <a:link id="car_modify_link" url="${/request/@context_path}/modules/prj/PRJ505/prj_project_create_contract_detail.lview"/>
        <a:link id="car_modify_mananger_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_maintain_manager.lview"/>
        <a:screen-include screen="modules/prj/PRJ500/prj_project_get_layout_code.lview"/>
        <script type="text/javascript"><![CDATA[
            function projectQueryScreen_forward() {
                history.go(1);
            }
            
            function projectQueryScreen_back() {
                history.go(-1);
            }
            
            function projectQueryScreen_query() {
                $('projectQueryScreen_mainDs').query();
            }
            
            function projectQueryScreen_refresh() {
                var ds = $('projectQueryScreen_mainDs');
                ds.query(ds.currentPage);
            }
            
            function projectQueryScreen_save() {
                var ds = $('projectQueryScreen_mainDs');
                if (ds.validate()) {
                    ds.submit();
                }
            }
            
            function projectQueryScreen_quit() {
                location.href = $('pageLink_projectQueryScreen_welcome').getUrl();
                parent.shMenu('show');
            }
            
            function prj501_grid_update(reocrd_id, project_id, status) {
                var maintain_type = 'QUERY';
                var record = $('projectQueryScreen_mainDs').findById(reocrd_id);
                //项目类layout_code
                if (record.get('document_type') == 'PRJ') {
                    var param = record.data;
                    param['document_id'] = record.get('project_id');
                    param['bp_class'] = record.get('bp_class');
                    param['function_code'] = 'PRJ600Q';
                    param['function_usage'] = 'QUERY';
                    param['maintain_type'] = maintain_type;
                    param['url_title'] = '项目详细信息';
                    hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'prj_project_query_link_id', 'projectQueryScreen_mainDs');
                }
            }
            
            function open_project_modify_win(record_id, ds_id) {
                var record = $(ds_id).findById(record_id);
                //项目类layout_code
                var maintain_type = 'MODIFY';
                var param = record.data;
                param['document_id'] = record.get('project_id');
                param['function_code'] = 'PRJ505';
                param['function_usage'] = 'UPDATE';
                param['maintain_type'] = maintain_type;
                param['url_title'] = '支付表拆分';
                hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id);
            
            }
            
            function project_create_con(){
                var ds_id = 'projectQueryScreen_mainDs';
                var records = $(ds_id).getSelected();
                if (records.length == 0) {
                    Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
                    return;
                }
                var record = $(ds_id).getCurrentRecord();
                //项目类layout_code
                var maintain_type = 'MODIFY';
                var param = record.data;
                param['document_id'] = record.get('project_id');
                param['function_code'] = 'PRJ505';
                param['function_usage'] = 'UPDATE';
                param['maintain_type'] = maintain_type;
                param['url_title'] = '支付表拆分';
                hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'car_modify_link', ds_id);
                
            }
            
            function prj501_project_number_render(value, record, name) {
                // return '<a href="javascript:prj501_grid_update(' + record.id + ',' + record.get('project_id') + ',\'' + record.get('invoice_status') + '\');">' + value + '</a>';
                return '<a href="javascript:open_project_modify_win(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
            }
            
            function render_formatDate(value, record, name) {
                if (!Ext.isEmpty(value)) {
                    return value.parseDate('yyyy-mm-dd').format('yyyy-mm-dd');
                }
                return '';
            
            }
            
            function projectQueryScreen_create_con() {
                var records = $('projectQueryScreen_mainDs').getSelected();
                if (records.length != 1) {
                    return;
                } else {
                    new Leaf.Window({
                        id: 'prj505_project_create_contract_window',
                        url: $('prj505_project_create_contract_link').getUrl() + '?project_id=' + records[0].get('project_id'),
                        title: '${l:PRJ505.PROJECT_CREATE_CON}',
                        fullScreen: true
                    });
                }
            }
            
            function projectQueryScreen_create_con_open(project_id) {
                new Leaf.Window({
                    id: 'prj505_project_create_contract_window',
                    url: $('prj505_project_create_contract_link').getUrl() + '?project_id=' + project_id,
                    title: '${l:PRJ505.PROJECT_CREATE_CON}',
                    fullScreen: true
                });
            }
            
            function prj505_grid_details_render(value, record, name) {
                return '<a href="javascript:projectQueryScreen_create_con_open(' + record.get('project_id') + ')">${l:PRJ505.CON_CREATED_DETAIL}</a>';
            }
        ]]></script>
        <a:dataSets>
            <a:screen-include screen="modules/cont/CON500/con_contract_authority_list_validate.lview?document_category=PROJECT&amp;function_code=PRJ505"/>
            <a:dataSet id="employee_id_of_manager_n_ds" loadData="true" model="basic.exp_org_unit_manager_lov"/>
            <a:dataSet id="project_status_ds">
                <a:datas dataSource="/model/prj505_prj_status_path"/>
            </a:dataSet>
            <!-- <a:dataSet id="hls_document_type_ds">
                <a:datas dataSource="/model/document_type_rp"/>
            </a:dataSet> -->
            <!-- <a:dataSet id="hls_document_type_ds" loadData="true" model="basic.hls_document_type_v"/> -->
            <a:dataSet id="hls_document_type_ds" lookupCode="HLS_DOCUMENT_TYPE"/>
            <a:dataSet id="projectQueryScreen_organizationDs" loadData="true" model="basic.hls_lease_organization_for_lov"/>
            <a:dataSet id="projectQueryScreen_channelDs" loadData="true" model="basic.hls_lease_channel_for_lov"/>
            <a:dataSet id="projectQueryScreen_divisionDs" loadData="true" model="basic.hls_division_for_lov"/>
            <a:dataSet id="projectQueryScreen_paraDs">
                <a:fields>
                    <a:field name="bp_code" autoComplete="true" lovGridHeight="350" lovHeight="500" lovService="basic.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="500" title="HLS.BP_TITLE">
                        <a:mapping>
                            <a:map from="bp_code" to="bp_code"/>
                            <a:map from="bp_id" to="bp_id"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="project_number" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="prj.PRJ501.prj_project_for_lov" lovWidth="500" title="HLS.PROJECT_NUMBER">
                        <a:mapping>
                            <a:map from="project_number" to="project_number"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="chance_number" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="prj.PRJ401.prj_chance_lov" lovWidth="500" title="HLS.LEASE_CHANCE_CODE">
                        <a:mapping>
                            <a:map from="chance_number" to="chance_number"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="employee_id"/>
                    <a:field name="employee_name" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="basic.hls_salesman_v_for_lov" lovWidth="500" title="PRJ501.PRJ_PROJECT.EMPLOYEE_NAME">
                        <a:mapping>
                            <a:map from="employee_id" to="employee_id"/>
                            <a:map from="name" to="employee_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="unit_id"/>
                    <a:field name="unit_name" lovGridHeight="300" lovHeight="450" lovService="basic.exp_org_unit_name_lov" lovWidth="500" title="HLS.UNIT_NAME">
                        <a:mapping>
                            <a:map from="unit_id" to="unit_id"/>
                            <a:map from="unit_name" to="unit_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="lease_organization_n" displayField="description" options="projectQueryScreen_organizationDs" returnField="lease_organization" valueField="lease_organization"/>
                    <a:field name="lease_channel_n" displayField="description" options="projectQueryScreen_channelDs" returnField="lease_channel" valueField="lease_channel"/>
                    <a:field name="division_n" displayField="description" options="projectQueryScreen_divisionDs" returnField="division" valueField="division"/>
                    <!-- <a:field name="employee_id_of_manager_n" displayField="mgr_employee_name" options="employee_id_of_manager_n_ds" returnField="employee_id_of_manager" valueField="mgr_employee_id"/> -->
                    <a:field name="employee_id_of_manager"/>
                    <a:field name="employee_id_of_manager_n" lovGridHeight="400" lovHeight="550" lovService="prj.PRJ505.prj_project_unit_employee_lov" lovWidth="450">
                        <a:mapping>
                            <a:map from="value_code" to="employee_id_of_manager"/>
                            <a:map from="value_name" to="employee_id_of_manager_n"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="document_type_desc" displayField="code_value_name" options="hls_document_type_ds" returnField="document_type" valueField="code_value"/>
                    <!-- <a:field name="document_type_desc" displayField="document_type_desc" options="hls_document_type_ds" returnField="document_type" valueField="document_type">
                        <a:mapping>
                            <a:map from="business_type" to="business_type"/>
                            <a:map from="business_type_desc" to="business_type_n"/>
                        </a:mapping>
                    </a:field> -->
                    <a:field name="project_status" defaultValue="APPROVED"/>
                    <a:field name="project_status_dis" defaultValue="通过" displayField="code_value_name" options="project_status_ds" required="true" returnField="project_status" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="projectQueryScreen_mainDs" autoPageSize="true" autoQuery="true" model="prj.PRJ501.prj_project_v_for_project" queryDataSet="projectQueryScreen_paraDs" selectable="true" selectionModel="single">
                <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="projectQueryScreen_back" text="HLS.BACK"/>
                <a:gridButton click="projectQueryScreen_forward" text="HLS.FORWARD"/>
                <a:gridButton click="projectQueryScreen_quit" text="HLS.EXIT"/> -->
                <a:gridButton click="projectQueryScreen_query" text="HLS.QUERY"/>
                <a:gridButton click="project_create_con" text="支付表拆分"/>
                <a:gridButton click="projectQueryScreen_create_con" text="已创建信息"/>
            </a:screenTopToolbar>
            <a:form column="4" labelSeparator=" " labelWidth="120" marginWidth="40" title="HLS.QUERY_TITLE">
                <a:lov name="bp_code" bindTarget="projectQueryScreen_paraDs" prompt="HLS.TENANT_CODE">
                    <a:events>
                        <a:event name="focus" handler="function(object){on_std_focus(object,&apos;BP&apos;)}"/>
                    </a:events>
                </a:lov>
                <a:textField name="bp_name" bindTarget="projectQueryScreen_paraDs" prompt="HLS.TENANT_NAME"/>
                <a:datePicker name="creation_date_from" bindTarget="projectQueryScreen_paraDs" prompt="LCH501.QUERY_FIELD.CREATION_DATE_FROM"/>
                <a:datePicker name="creation_date_to" bindTarget="projectQueryScreen_paraDs" prompt="LCH501.QUERY_FIELD.CREATION_DATE_TO"/>
                <a:lov name="project_number" bindTarget="projectQueryScreen_paraDs" 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="projectQueryScreen_paraDs" prompt="HLS.PROJECT_NAME"/>
                <a:lov name="employee_name" bindTarget="projectQueryScreen_paraDs" prompt="HLS.SALES_EMPLOYEE"/>
                <!-- <a:comboBox name="lease_organization_n" bindTarget="projectQueryScreen_paraDs" prompt="HLS.LEASE_ORGANIZATION"/>
                <a:lov name="chance_number" bindTarget="projectQueryScreen_paraDs" prompt="HLS.LEASE_CHANCE_CODE">
                    <a:events>
                        <a:event name="focus" handler="function(object){on_std_focus(object,&apos;CHANCE&apos;)}"/>
                    </a:events>
                </a:lov>
                <a:lov name="employee_id_of_manager_n" bindTarget="projectQueryScreen_paraDs" prompt="HLS.EMPLOYEE_OF_MANAGER"/> -->
                <a:comboBox name="division_n" bindTarget="projectQueryScreen_paraDs" prompt="HLS.DIVISION_NAME"/>
                <!-- <a:comboBox name="lease_channel_n" bindTarget="projectQueryScreen_paraDs" prompt="HLS.LEASE_CHANNEL_NAME"/>
                <a:textField name="search_term_1" bindTarget="projectQueryScreen_paraDs" prompt="CON301.CON_CONTRACT_V.PRJ_SEARCH_TERM_1"/>
                <a:numberField name="search_term_2" bindTarget="projectQueryScreen_paraDs" prompt="CON301.CON_CONTRACT_V.PRJ_SEARCH_TERM_2"/>
                 -->
                <a:comboBox name="document_type_desc" bindTarget="projectQueryScreen_paraDs" prompt="HLS.PROJECT_TYPE"/>
                <a:comboBox name="project_status_dis" bindTarget="projectQueryScreen_paraDs" prompt="PRJ505.PROJECT_STATUS"/>
            </a:form>
            <a:grid id="projectQueryScreen_mainDs_grid" bindTarget="projectQueryScreen_mainDs" marginHeight="260" marginWidth="40" navBar="true">
                <a:columns>
                    <a:column name="project_number" align="center" prompt="HLS.PROJECT_NUMBER" renderer="prj501_project_number_render" width="120"/>
                    <a:column name="project_name" align="center" prompt="HLS.PROJECT_NAME" width="230"/>
                    <a:column name="bp_name" align="center" prompt="HLS.TENANT_NAME" width="180"/>
                    <!-- <a:column name="chance_number" prompt="HLS.LEASE_CHANCE_CODE" width="120"/> -->
                    <a:column name="document_type_desc" align="center" prompt="HLS.PROJECT_TYPE" width="100"/>
                    <a:column name="division_desc" align="center" prompt="HLS.DIVISION_NAME" width="150"/>
                    <a:column name="employee_name" align="center" prompt="HLS.SALES_EMPLOYEE" width="80"/>
                    <!-- <a:column name="lease_organization_desc" prompt="HLS.LEASE_ORGANIZATION" width="100"/> -->
                    <a:column name="creation_date" align="center" prompt="HLS.CREATION_DATE" renderer="render_formatDate" width="80"/>
                    <a:column name="project_status_desc" align="center" prompt="PRJ505.CURRENT_STATUS" width="80"/>
                    <a:column name="con_created_detail" align="center" prompt="PRJ505.CON_CREATED_DETAIL" renderer="prj505_grid_details_render" width="100"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>