con_collection_law_entrance.lview 4.01 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wangwei  
    $Date: 2016-12-20 上午9:04:27  
    $Revision: 1.0  
    $Purpose:诉讼入口界面 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" dynamiccreateenabled="true" trace="true">
    <a:view>
        <a:link id="prj_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <a:link id="con640_con_collection_law_detail_link_id" url="${/request/@context_path}/modules/cont/CON641/con_collection_law_detail.lview"/>
        <a:link id="con640_confirm_link_id" model="cont.CON641.con_collection_update_status" modelaction="update"/>
        <script type="text/javascript"><![CDATA[
            //诉讼明细
            window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
                var coll_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_collection');
                var record = $(coll_ds_id).getSelected()[0];
                param = {};
                param['col_id'] = record.get('col_id');
                if (record.get('document_status') == 'NEW' || record.get('document_status') == 'REJECT') {
                    param['function_code'] = 'CON641D';
                    param['function_usage'] = 'MODIFY';
                    param['maintain_type'] = 'UPDATE';
                } else {
                    param['function_code'] = 'CON641D_QUERY';
                    param['function_usage'] = 'READONLY';
                    param['maintain_type'] = 'QUERY';
                }
                param['url_title'] = '诉讼明细信息';
                param['winid'] = 'con641_con_collection_law_detail_winid';
                hls_doc_get_layout_code('prj_project_get_layout_code_link_id', param, 'con640_con_collection_law_detail_link_id', coll_ds_id);
            };
            //诉讼确认完成
            window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
                window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
                var coll_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'con_collection');
                var record = $(coll_ds_id).getSelected()[0];
                var status = record.get('document_status');
                if(status == 'APPROVED'){
                    window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
                    Leaf.showMessage('提示', '该单据已审批通过,请勿重复操作!');
                    return;
                }
                Leaf.showConfirm('提示', '确认诉讼完成?', function() {
                    Leaf.request({
                        url: $('con640_confirm_link_id').getUrl(),
                        para: {
                        col_id: record.get('col_id')
                        },
                        success: function(res) {
                            window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
                            Leaf.SideBar.show({
                                msg: '${l:HLS.SUBMIT_SUCCESS}',
                                duration: 2000
                            });
                            $(coll_ds_id).query();
                        },
                        failure: function() {
                            window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
                        },
                        error: function() {
                            window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
                        },
                        scope: this
                    });
            
                }, function() {
                    window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
                });
            
            
            
            };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>