prj_project_change_maintain.lview 18.9 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 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: chenlingfeng  
    $Date: 2017-12-12 17:00:20
    $Revision: 1.0  
    $Purpose: 变更维护
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure>
        <a:model-query fetchAll="true" model="prj.PRJ1000.prj_project_change_req_info" rootPath="prj_change_req_info"/>
    </a:init-procedure>
    <a:view>
        <a:link id="prj1000_prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <a:link id="prj1000_prj_project_modify_link" url="${/request/@context_path}/modules/prj/PRJ501N/prj_project_create_tree_n.lview"/>
        <a:link id="prj1000_conditions_uploadfile_link_id" url="${/request/@context_path}/uploadFile.lview"/>
        <a:link id="prj1000_conditions_downloadfile_link_id" url="${/request/@context_path}/downloadFile.lview"/>
        <a:link id="prj_project_bp_parameter_link" url="${/request/@context_path}/modules/prj/PRJ501/prj_project_bp_parameter.lview"/>
        <a:link id="prj1000_prj_project_change_req_info_link_id" model="prj.PRJ1000.prj_project_change_req_info" modelaction="execute"/>
        <a:link id="prj1000_prj_project_change_req_cancel_link_id" model="prj.PRJ1000.prj_project_change_req_info" modelaction="delete"/>
        <a:link id="prj1000_prj_change_req_back_link" url="${/request/@context_path}/modules/prj/PRJ1000/prj_project_change_req_create.lview"/>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
        <script type="text/javascript"><![CDATA[
            //var '${/parameter/@winid}' = '${/parameter/@winid}';
            
            function prj1000_onSubmitSuccess_doc(ds) {
                ds.query();
            }
            
            function prj1000_prj_change_req_save() {
                $('prj1000_prj_project_change_req_info_ds').submit();
            
            }
            
            function prj1000_prj_change_req_detail_unlock() {
                Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
            }
            
            function prj1000_prj_change_req_detail_lock() {
                Leaf.Masker.mask($('${/parameter/@winid}').wrap, '正在执行');
            }
            
            function prj1000_prj_change_req_exit() {
                //$('${/parameter/@winid}').close();
                location.href = $('prj1000_prj_change_req_back_link').getUrl();
                parent.shMenu('show');
            }
            
            function prj1000_project_submit_step() {
                prj1000_prj_change_req_detail_lock();
                var ds = $('prj1000_prj_project_change_req_info_ds');
                var record = ds.getCurrentRecord();
                Leaf.request({
                    url: $('prj1000_prj_project_change_req_info_link_id').getUrl(),
                    para: {
                        project_id: record.get('change_req_id'),
                        function_code: 'PRJ1000'
                    },
                    success: function(res) {
                        prj1000_prj_change_req_detail_unlock();
                        prj1000_prj_change_req_exit();
            
                    },
                    failure: function() {
                        prj1000_prj_change_req_detail_unlock();
                    },
                    error: function() {
                        prj1000_prj_change_req_detail_unlock();
                    },
                    scope: this
                });
            
            }
            
            
            
            function prj1000_prj_change_req_submit() {
                var ds = $('prj1000_prj_project_change_req_info_ds');
            
                if (!ds.validate()) {
                    return;
                }
                prj1000_prj_change_req_save();
                var record = ds.getCurrentRecord();
            
            
            
                var showtips = '确定<font color="red">所有资料已上传完毕</font>并提交吗?';
                var confirm_win = Leaf.showConfirm('${HLS.PROMPT}', showtips, function() {
            
                    prj1000_prj_change_req_detail_lock();
                    Leaf.request({
                        url: '${/request/@context_path}/autocrud/prj.PRJ501.credit_line_check/execute',
                        para: {
                            project_id: '${/parameter/@change_req_id}',
                            credit_check_point: 'SUBMIT_PROJECT',
                            document_type: 'PROJECT',
                            document_id: '${/parameter/@change_req_id}'
                        },
                        success: function(res) {
                            prj1000_prj_change_req_detail_unlock();
                            var level = res.result.result_level;
                            var result = res.result.result;
                            var result_msg = res.result.result_msg;
                            if (level >= 5) {
                                Leaf.showMessage(result, result_msg, function() {}, 300, 120);
                                return;
                            }
                            if (level <= 4 && level >= 2) {
                                Leaf.showMessage(result, result_msg, function() {
                                    prj1000_project_submit_step();
                                }, 300, 120);
                            } else {
                                prj1000_project_submit_step();
                            }
                        },
                        failure: function() {
                            prj1000_prj_change_req_detail_unlock();
                        },
                        error: function() {
                            prj1000_prj_change_req_detail_unlock();
                        },
                        scope: this
                    });
                });
            
            
            
            
            
            
            }
            
            function prj1000_prj_change_req_cancel() {
                var ds = $('prj1000_prj_project_change_req_info_ds');
            
            
                var record = ds.getCurrentRecord();
                Leaf.showConfirm('${l:PROMPT}', '您确定吗?', function() {
                    prj1000_prj_change_req_detail_lock();
            
                    Leaf.request({
                        url: $('prj1000_prj_project_change_req_cancel_link_id').getUrl(),
                        para: {
                            change_req_id: record.get('change_req_id')
                        },
                        success: function(res) {
                            prj1000_prj_change_req_detail_unlock();
                            prj1000_prj_change_req_exit();
            
                        },
                        failure: function() {
                            prj1000_prj_change_req_detail_unlock();
                        },
                        error: function() {
                            prj1000_prj_change_req_detail_unlock();
                        },
                        scope: this
                    });
                });
            }
            
            function open_project_modify_win() {
                //先保存
                prj1000_prj_change_req_save();
                
                var record = $('prj1000_prj_project_change_req_info_ds').getCurrentRecord();
                var maintain_type = 'UPDATE';
                var function_usage = 'MODIFY';
                var function_code = 'PRJ1000D';
                var param = {};
                param['document_id'] = record.get('project_id');//'${/parameter/@change_req_id}'
                param['company_id'] = record.get('company_id');
                param['business_type'] = record.get('business_type');
                param['project_id'] = record.get('project_id');
                param['function_code'] = function_code;
                param['function_usage'] = function_usage;
                param['maintain_type'] = maintain_type;
                param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
                param['winid'] = 'prj1000_prj_project_modify_winid';
                //param['layout_debugger_flag']='Y';
                param['cond_para2'] = record.get('hn_industry_classification');//'${/parameter/@hn_industry_classification}'
                param['wf_function_code'] = 'PRJ1000';
                hls_doc_get_layout_code('prj1000_prj_project_get_layout_code_link_id', param, 'prj1000_prj_project_modify_link', 'prj1000_prj_project_change_req_info_ds', null, null, null, 'prj1000_tab_refresh');
            }
            
            function tab_refresh(tab_id) {
                var current_tab = $(tab_id);
                for (var i = 0;i < current_tab.items.length;i++) {
                    current_tab.setURL(i, current_tab.items[i].ref);
                }
            }
            
            function prj1000_tab_refresh() {
                tab_refresh('prj_project_base_info_tab_id');
                tab_refresh('prj_project_quote_info_tab_id');
                tab_refresh('prj_project_bp_info_tab_id');
                tab_refresh('prj_project_lease_item_info_tab_id');
                tab_refresh('prj_project_cdd_item_info_tab_id');
            }
            
            function prj1000_modify_change_bp() {
                
                prj1000_prj_change_req_save();
                
                var ds_id = 'prj1000_prj_project_change_req_info_ds';
                var prj_project_result_ds = $(ds_id);
                var record = prj_project_result_ds.getAt(0);
            
                var win = new Leaf.Window({
                    id: 'prj_project_bp_parameter_window',
                    url: $('prj_project_bp_parameter_link').getUrl(),
                    params: {
                        project_id: record.get('project_id')
                    },
                    title: '${l:HLS.PROJECT_PARAMETER_UPDATE}',
                    width: 620,
                    height: 520
                });
            
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="prj1000_prj_project_change_req_info_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="change_req_id" defaultValue="${/parameter/@change_req_id}"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="prj1000_prj_project_change_req_info_ds" autoQuery="true" queryDataSet="prj1000_prj_project_change_req_info_query_ds" queryUrl="${/request/@context_path}/autocrud/prj.PRJ1000.prj_project_change_req_info/query?change_req_id=${/parameter/@change_req_id}" submitUrl="${/request/@context_path}/modules/prj/PRJ1000/prj_project_change_save.lsc">
                <a:fields>
                    <a:field name="description" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton click="prj1000_prj_change_req_exit" text="退出"/>
                <a:gridButton click="prj1000_prj_change_req_save" text="保存"/>
                <a:gridButton click="open_project_modify_win" text="维护项目变更信息"/>
                <a:gridButton click="prj1000_modify_change_bp" text="商业伙伴参数修改"/>
                <a:gridButton click="prj1000_prj_change_req_submit" text="提交审批"/>
                <a:gridButton click="prj1000_prj_change_req_cancel" text="撤销申请"/>
                <!--   <a:gridButton click="prj1000_tab_refresh" text="刷新"/> -->
            </a:screenTopToolbar>
            <a:tabPanel height="500" marginWidth="30">
                <a:tabs>
                    <a:tab prompt="变更申请信息" width="170">
                        <a:form marginWidth="50" title=" ">
                            <a:hBox labelWidth="120">
                                <a:textField name="project_name" bindTarget="prj1000_prj_project_change_req_info_ds" prompt="项目名称" readOnly="true" width="427"/>
                                <a:textField name="bp_name" bindTarget="prj1000_prj_project_change_req_info_ds" prompt="主承租人" readOnly="true" width="427"/>
                            </a:hBox>
                            <a:hBox labelWidth="120">
                                <a:datePicker name="req_date" bindTarget="prj1000_prj_project_change_req_info_ds" prompt="申请时间" readOnly="true" width="427"/>
                                <a:textField name="ccr_type_n" bindTarget="prj1000_prj_project_change_req_info_ds" prompt="变更类型" readOnly="true" width="427"/>
                            </a:hBox>
                            <a:hBox labelWidth="120">
                                <a:textField name="project_number" bindTarget="prj1000_prj_project_change_req_info_ds" prompt="项目编号" readOnly="true"/>
                                <a:textField name="employee_name" bindTarget="prj1000_prj_project_change_req_info_ds" prompt="项目经理" readOnly="true"/>
                                <a:textField name="lease_organization_desc" bindTarget="prj1000_prj_project_change_req_info_ds" prompt="业务部" readOnly="true"/>
                                <!--        <a:numberField name="finance_amount" bindTarget="prj1000_prj_project_change_req_info_ds" prompt="融资额" readOnly="true" renderer="Leaf.formatMoney"/>
 -->
                            </a:hBox>
                            <a:hBox labelWidth="120">
                                <a:textArea name="description" bindTarget="prj1000_prj_project_change_req_info_ds" height="120" prompt="变更说明" width="979"/>
                            </a:hBox>
                        </a:form>
                        <a:tabPanel id="prj_project_change_con_list_info_tab_id" height="400" marginWidth="50">
                            <a:tabs>
                                <a:tab prompt="需变更的合同" ref="${/request/@context_path}/modules/prj/PRJ1000/prj_project_change_con_list_info.lview?project_id=${/model/prj_change_req_info/record/@old_project_id}&amp;change_req_id=${/model/prj_change_req_info/record/@change_req_id}&amp;hn_industry_classification=${/model/prj_change_req_info/record/@hn_industry_classification}" width="100"/>
                            </a:tabs>
                        </a:tabPanel>
                    </a:tab>
                    <a:tab prompt="基本信息" width="170">
                        <a:tabPanel id="prj_project_base_info_tab_id" height="450" marginWidth="50">
                            <a:tabs>
                                <a:tab prompt="变更前" ref="${/request/@context_path}/modules/prj/PRJ1000/prj_project_base_info.lview?project_id=${/model/prj_change_req_info/record/@old_project_id}&amp;hn_industry_classification=${/model/prj_change_req_info/record/@hn_industry_classification}" width="100"/>
                                <a:tab prompt="变更后" ref="${/request/@context_path}/modules/prj/PRJ1000/prj_project_base_info.lview?project_id=${/model/prj_change_req_info/record/@change_req_id}&amp;hn_industry_classification=${/model/prj_change_req_info/record/@hn_industry_classification}" width="100"/>
                            </a:tabs>
                        </a:tabPanel>
                    </a:tab>
                    <a:tab prompt="报价信息" width="170">
                        <a:tabPanel id="prj_project_quote_info_tab_id" height="450" marginWidth="50">
                            <a:tabs>
                                <a:tab prompt="变更前" ref="${/request/@context_path}/modules/prj/PRJ1000/prj_project_quote_info.lview?project_id=${/model/prj_change_req_info/record/@old_project_id}&amp;hn_industry_classification=${/model/prj_change_req_info/record/@hn_industry_classification}" width="100"/>
                                <a:tab prompt="变更后" ref="${/request/@context_path}/modules/prj/PRJ1000/prj_project_quote_info.lview?project_id=${/model/prj_change_req_info/record/@change_req_id}&amp;hn_industry_classification=${/model/prj_change_req_info/record/@hn_industry_classification}" width="100"/>
                            </a:tabs>
                        </a:tabPanel>
                    </a:tab>
                    <a:tab prompt="商业伙伴信息" width="170">
                        <a:tabPanel id="prj_project_bp_info_tab_id" height="450" marginWidth="50">
                            <a:tabs>
                                <a:tab prompt="变更前" ref="${/request/@context_path}/modules/prj/PRJ1000/prj_project_bp_info.lview?project_id=${/model/prj_change_req_info/record/@old_project_id}&amp;hn_industry_classification=${/model/prj_change_req_info/record/@hn_industry_classification}" width="100"/>
                                <a:tab prompt="变更后" ref="${/request/@context_path}/modules/prj/PRJ1000/prj_project_bp_info.lview?project_id=${/model/prj_change_req_info/record/@change_req_id}&amp;hn_industry_classification=${/model/prj_change_req_info/record/@hn_industry_classification}" width="100"/>
                            </a:tabs>
                        </a:tabPanel>
                    </a:tab>
                    <a:tab prompt="租赁物/抵押物信息" width="170">
                        <a:tabPanel id="prj_project_lease_item_info_tab_id" height="450" marginWidth="50">
                            <a:tabs>
                                <a:tab prompt="变更前" ref="${/request/@context_path}/modules/prj/PRJ1000/prj_project_lease_item_info.lview?project_id=${/model/prj_change_req_info/record/@old_project_id}&amp;hn_industry_classification=${/model/prj_change_req_info/record/@hn_industry_classification}" width="100"/>
                                <a:tab prompt="变更后" ref="${/request/@context_path}/modules/prj/PRJ1000/prj_project_lease_item_info.lview?project_id=${/model/prj_change_req_info/record/@change_req_id}&amp;hn_industry_classification=${/model/prj_change_req_info/record/@hn_industry_classification}" width="100"/>
                            </a:tabs>
                        </a:tabPanel>
                    </a:tab>
                    <a:tab prompt="尽调报告及附件" width="170">
                        <a:tabPanel id="prj_project_cdd_item_info_tab_id" height="450" marginWidth="50">
                            <a:tabs>
                                <a:tab prompt="变更前" ref="${/request/@context_path}/modules/prj/PRJ1000/prj_project_cdd_item_info.lview?project_id=${/model/prj_change_req_info/record/@old_project_id}&amp;hn_industry_classification=${/model/prj_change_req_info/record/@hn_industry_classification}" width="100"/>
                                <a:tab prompt="变更后" ref="${/request/@context_path}/modules/prj/PRJ1000/prj_project_cdd_item_info.lview?project_id=${/model/prj_change_req_info/record/@change_req_id}&amp;hn_industry_classification=${/model/prj_change_req_info/record/@hn_industry_classification}" width="100"/>
                            </a:tabs>
                        </a:tabPanel>
                    </a:tab>
                </a:tabs>
            </a:tabPanel>
        </a:screenBody>
    </a:view>
</a:screen>