con_litigation_entrance.lview 8.85 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
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
          trace="true">
    <a:view>
        <a:link id="con1030_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
                modelaction="update"/>
        <a:link id="litigation_entrance_detail" url="${/request/@context_path}/modules/cont/CON1030/con_litigation_entrance_detail.lview"/>
        <a:link id="litigation_agent_detail" url="${/request/@context_path}/modules/cont/CON1030/con_litigation_agent_detail.lview"/>
        <a:link id="litigation_authorize_agent" url="${/request/@context_path}/modules/cont/CON1030/con_litigation_authorize_agent.lview"/>
        <a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
        <a:link id="bp_agent_modify_link" url="${/request/@context_path}/modules/hls/HLS303/bp_agent_modify.lview"/>
        <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}_sms_query_link" url="${/request/@context_path}/modules/sys/SYS402/sys_sms_query.lview"/>
        <script type="text/javascript"><![CDATA[
        window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
            open_contract_win1();
        };

        window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
            open_contract_win2();
        };

        window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
            open_contract_win3();
        };

        function open_contract_win1() {
            var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_litigation');
            var param = {};
            param['function_code'] = 'CON1030A';
            param['maintain_type'] = 'INSERT';
            param['url_title'] = '起诉客户/被诉';
            param['winid'] = '${/parameter/@layout_code}_create_win_id'
            hls_doc_get_layout_code('con1030_get_layout_code_link_id', param, 'litigation_entrance_detail', ds_id);
        }

        function open_contract_win2() {
            var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_litigation');
            var param = {};
            param['function_code'] = 'CON1030B';
            param['maintain_type'] = 'INSERT';
            param['url_title'] = '起诉代理商';
            param['winid'] = '${/parameter/@layout_code}_create_win_id'
            hls_doc_get_layout_code('con1030_get_layout_code_link_id', param, 'litigation_agent_detail', ds_id);
        }

        function open_contract_win3() {
            var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_litigation');
            var param = {};
            param['function_code'] = 'CON1030C';
            param['maintain_type'] = 'INSERT';
            param['url_title'] = '授权代理商起诉';
            param['winid'] = '${/parameter/@layout_code}_create_win_id'
            hls_doc_get_layout_code('con1030_get_layout_code_link_id', param, 'litigation_authorize_agent', ds_id);
        }
        function open_contract_win_detail(ds_id, record_id) {
            var record = $(ds_id).findById(record_id);
            var param = record.data;
            param['function_code'] = 'CON301';
            param['function_usage'] = 'QUERY';
            param['maintain_type'] = 'QUERY';
            param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
            hls_doc_get_layout_code('con1030_get_layout_code_link_id', param, 'con_contract_modify_link', null);
        }

        function open_project_modify_win(record_id, ds_id) {

            var record = $(ds_id).findById(record_id);
            //项目类layout_code

            var maintain_type = 'QUERY';
            var param = record.data;
            param['litigation_id'] = record.get('litigation_id');
            param['function_code'] = 'CON1030A';
            param['function_usage'] = 'MODIFY';
            param['maintain_type'] = maintain_type;
            param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
            hls_doc_get_layout_code('con1030_get_layout_code_link_id', param, 'litigation_entrance_detail', ds_id);

        }

        function open_project_modify_win2(record_id, ds_id) {

            var record = $(ds_id).findById(record_id);
            //项目类layout_code

            var maintain_type = 'QUERY';
            var param = record.data;
            param['litigation_id'] = record.get('litigation_id');
            param['function_code'] = 'CON1030B';
            param['function_usage'] = 'MODIFY';
            param['maintain_type'] = maintain_type;
            param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
            hls_doc_get_layout_code('con1030_get_layout_code_link_id', param, 'litigation_agent_detail', ds_id);

        }

        function open_project_modify_win3(record_id, ds_id) {

            var record = $(ds_id).findById(record_id);
            //项目类layout_code

            var maintain_type = 'QUERY';
            var param = record.data;
            param['litigation_id'] = record.get('litigation_id');
            param['function_code'] = 'CON1030C';
            param['function_usage'] = 'MODIFY';
            param['maintain_type'] = maintain_type;
            param['url_title'] = '${l:HLS.PROJECT_MAITAIN}';
            hls_doc_get_layout_code('con1030_get_layout_code_link_id', param, 'litigation_authorize_agent', ds_id);

        }

        function bp_agent_renew(record_id) {
            var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_litigation');
            var record = $(ds_id).findById(record_id);
            var param = record.data;

            param['document_id'] = record.get('litigation_sourse_id');
            param['bp_id'] = record.get('litigation_sourse_id');
            param['function_code'] = 'HLS303R';
            param['function_usage'] = 'MODIFY';
            param['maintain_type'] = 'MODIFY';
            param['url_title'] = '代理商续约';
            hls_doc_get_layout_code('con1030_get_layout_code_link_id', param, 'bp_agent_modify_link', ds_id);
        }

        function sms_query(record_id, ds_id) {
            var record = $(ds_id).findById(record_id);
            url = $('${/parameter/@layout_code}${/parameter/@pre_layout}_sms_query_link').getUrl();
            var win = new Leaf.Window({
                id: 'open_sms_query_window',
                url: url,
                fullScreen: true
            });
            win.on('close', function () {
                record.ds.query();
            });
        }


        window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record, bp_seq) {
            var litigation_sourse =  record.get('litigation_sourse');
            if (name == 'cntrt_no' && value) {
                return '<a href="javascript:open_contract_win_detail(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
            }
            else if (name == 'litigation_number' && value) {
                if (litigation_sourse == 'CONTRACT') {
                    return '<a href="javascript:open_project_modify_win(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
                }
                else if(litigation_sourse == 'AGENT') {
                    return '<a href="javascript:open_project_modify_win2(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
                }
                else if(litigation_sourse == 'AGENT_CONTRACT') {
                    return '<a href="javascript:open_project_modify_win3(\'' + record.id + '\',\'' + record.ds.id + '\')">' + value + '</a>';
                }
            }
            // else if (name == 'call_record_query' && litigation_sourse == 'AGENT'){
            //     return '<a href="javascript:bp_agent_renew(' + record.id + ')">' + '功能链接' + '</a>';
            // }
            // else if (name == 'call_record_query' && (litigation_sourse == 'CONTRACT'||litigation_sourse == 'AGENT_CONTRACT')) {
            //     var link_function = 'call140_super_link_renderer';
            //     window['${/parameter/@bp_seq}${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
            //     return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.get('litigation_sourse_id') + '\',\'' + name + '\');">' + '功能链接' + '</a>';
            // }
            else if (name == 'sms_query' ){
                return '<a href="javascript:sms_query(\'' + record.id + '\',\'' + record.ds.id + '\');">' + '短信查询' + '</a>';
            }
            return value;
        };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>