bp_agent_entrance.lview 10.8 KB
Newer Older
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhuxianfei
    $Date: 2017年11月28日 上午10:11:01
    $Revision: 1.0
    $Purpose:
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure/>
    <a:view>
        <a:link id="bp_agent_create_link" url="${/request/@context_path}/modules/hls/HLS303/bp_agent_create.lview"/>
        <a:link id="bp_agent_modify_link" url="${/request/@context_path}/modules/hls/HLS303/bp_agent_modify.lview"/>
        <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
                modelaction="update"/>
        <a:link id="first_add_agent_link_id" model="db.hls_bp_master_pkg.first_add_agent" modelaction="execute"/>
        <script type="text/javascript"><![CDATA[
        function bp_agent_query() {
            $('bp_agent_grid_result_ds').query();

        }

        function bp_agent_reset() {
            $('bp_agent_query_ds').reset();

        }

        function bp_agent_grid_update(record_id) {
            var record = $('bp_agent_grid_result_ds').findById(record_id);
            var param = record.data;

            param['document_id'] = record.get('bp_id');
            param['function_code'] = 'HLS303';
            param['function_usage'] = 'MODIFY';
            param['maintain_type'] = 'MODIFY';
            param['cdd_list_id'] = record.get('cdd_list_id');
            param['dsid'] = 'bp_agent_grid_result_ds';
            param['url_title'] = '代理店管理';
            param['bp_id'] = record.get('bp_id');
            // Leaf.request({
            //     url: $('first_add_agent_link_id').getUrl(),
            //     para: {
            //         bp_id: record.get('bp_id')
            //     },
            //     success: function(res) {
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'bp_agent_modify_link', 'bp_agent_grid_result_ds');
            //     },
            //     error: function() {},
            //     failure: function() {},
            //     sync: true,
            //     scope: this
            // });
        }

        function bp_agent_fin_query(record_id) {
            var record = $('bp_agent_grid_result_ds').findById(record_id);
            var bp_id = record.get('bp_id');
            new Leaf.Window({
                id: 'rsc_fin_statement_prj_all_query_winid',
                url: '${/request/@context_path}/modules/rsc/RSC303/rsc_fin_statement_prj_all_query.lview',
                params: {
                    bp_id: bp_id,
                    winid: 'rsc_fin_statement_prj_all_query_winid'
                },
                title: '${l:STATEMENTS_BUSINESS_DATA_IMPORT}',
                fullScreen: true,
                draggable: true
            });
        }

        function bp_agent_info(record_id) {
            var record = $('bp_agent_grid_result_ds').findById(record_id);
            var param = record.data;

            param['document_id'] = record.get('bp_id');
            param['function_code'] = 'HLS303F';
            param['function_usage'] = 'MODIFY';
            param['maintain_type'] = 'MODIFY';
            param['url_title'] = '代理店信息补充';
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'bp_agent_modify_link', 'bp_agent_grid_result_ds');
        }

        function bp_agent_renew(record_id) {
            var record = $('bp_agent_grid_result_ds').findById(record_id);
            var param = record.data;

            param['document_id'] = record.get('bp_id');
            param['function_code'] = 'HLS303R';
            param['function_usage'] = 'MODIFY';
            param['maintain_type'] = 'MODIFY';
            param['url_title'] = '代理店续约';
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'bp_agent_modify_link', 'bp_agent_grid_result_ds');
        }

        function bp_agent_fin_import(record_id) {
            var record = $('bp_agent_grid_result_ds').findById(record_id);
            var bp_id = record.get('bp_id');

            if (!bp_id) {
                return;
            }
            new Leaf.Window({
                id: 'rsc_fin_statement_prj_import_handle_winid',
                url: '${/request/@context_path}/modules/rsc/RSC303/rsc_fin_statement_prj_import_handle.lview',
                params: {
                    bp_id: bp_id,
                    winid: 'rsc_fin_statement_prj_import_handle_winid'
                },
                title: '${l:STATEMENTS_BUSINESS_DATA_IMPORT}',
                width: 950,
                height: 250
            });
        }

        function bp_agent_render(value, record, name) {
            if (name == 'bp_code') {
                return '<a href="javascript:bp_agent_grid_update(' + record.id + ')">' + value + '</a>';
            } else if (name == 'financial_statements') {
                return '<a href="javascript:bp_agent_fin_query(' + record.id + ')">' + '明细' + '</a>';
            } else if (name == 'agent_info') {
                return '<a href="javascript:bp_agent_info(' + record.id + ')">' + '信息补充' + '</a>';
            } else if (name == 'agent_renew') {
                return '<a href="javascript:bp_agent_renew(' + record.id + ')">' + '续约' + '</a>';
            } else if (name == 'financial_statements_import') {
                return '<a href="javascript:bp_agent_fin_import(' + record.id + ')">' + '导入' + '</a>';
            }
        }


        function bp_agent_add() {
            var param = {};
            param['function_code'] = 'HLS303';
            param['function_usage'] = 'MODIFY';
            param['maintain_type'] = 'MODIFY';
            //param['dsid'] = 'bp_agent_grid_result_ds';
Darming's avatar
Darming committed
135
            param['url_title'] = '代理店新增';
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
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'bp_agent_create_link');
        }


        function enterprise_certification_render(value, record, name) {
            return '<a href="javascript:open_certification(' + record.get("bp_id") + ');">' +'认证'+  '</a>';
        }

        function open_certification(bp_id) {
            $jq.ajax({
                url: '${/request/@context_path}/contract/signature/enterprise/certification',
                data: {
                    bpId: bp_id
                },
                type: 'get',
                success: function (datas) {
                    if (datas.success) {
                        var certUrl = datas.message;
                        window.open(certUrl, "", "width=1100, height=900, scrollbars=yes, toolbar=no, location=no, status=no, menubar=no");
                    } else {
                        Leaf.showErrorMessage('提示', '保存失败' + data.message);
                    }
                }
            })
        }

        function bp_agent_export() {
            $('bp_agent_grid')._export();
        }

        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
        <a:dataSets>
            <a:dataSet id="hls303_bp_agent_ds" lookupCode="BP_CATEGORY"/>
            <a:dataSet id="hls303_instance_status_ds" lookupCode="HLS303_WFL_STATUS"/>
            <a:dataSet id="hls303_agent_type_ds" lookupCode="HLS_AGENT_TYPE"/>
            <a:dataSet id="bp_agent_query_ds" model="hls.HLS303.hls_bp_master_asgent_modify">
                <a:fields>
                    <a:field name="bp_code" lovHeight="500" lovService="hls.HLS303.hls_bp_master_lov" lovWidth="700"
                             title="代理店选择">
                        <a:mapping>
                            <a:map from="bp_id" to="bp_id"/>
                            <a:map from="bp_code" to="bp_code"/>
                            <a:map from="bp_name" to="bp_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_category_n" displayField="code_value_name" options="hls303_bp_agent_ds"
                             returnField="code_value" valueField="code_value"/>
                    <a:field name="agent_type_n" displayField="code_value_name" options="hls303_agent_type_ds"
                             returnField="code_value" valueField="code_value"/>
                    <a:field name="agent_instance_status_n" displayField="code_value_name"
                             options="hls303_instance_status_ds" returnField="code_value" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="bp_agent_grid_result_ds" autoPageSize="true" autoQuery="true"
                       model="hls.HLS303.hls_bp_master_asgent_modify" queryDataSet="bp_agent_query_ds" selectable="true"
                       selectionModel="single">
                <a:fields>
                    <a:field name="enabled_flag" checkedValue="Y" uncheckedValue="N"/>
25484's avatar
25484 committed
195
                    <a:field name="sbo_bp_message" readOnly="true"/>
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="bp_agent_query" text="HLS.QUERY"/>
                <a:gridButton click="bp_agent_reset" text="HLS.RESET"/>
                <a:gridButton click="bp_agent_add" text="HLS.NEW"/>
                <a:gridButton click="bp_agent_export" text="导出"/>
            </a:screenTopToolbar>
            <a:form Width="1030" column="4" labelWidth="130" marginWidth="40" title="HAP_QUERY_TITLE">
                <a:lov name="bp_code" bindTarget="bp_agent_query_ds" prompt="代理店编码"/>
                <a:textField name="bp_name" bindTarget="bp_agent_query_ds" prompt="代理店名称"/>
                <a:textField name="extra_nam" bindTarget="bp_agent_query_ds" prompt="代理店简称"/>
            </a:form>
            <a:grid id="bp_agent_grid" bindTarget="bp_agent_grid_result_ds" marginHeight="190" marginWidth="40"
                    navBar="true">
                <a:columns>
                    <a:column name="bp_code" align="center" prompt="代理店编码" renderer="bp_agent_render" width="120"/>
                    <a:column name="bp_name" align="center" prompt="代理店名称" width="280"/>
                    <a:column name="extra_nam" align="center" prompt="代理店简称" width="130"/>
                    <a:column name="enabled_flag" align="center" prompt="代理店状态" width="100"/>
219
                    <a:column name="sbo_bp_message" align="left" prompt="SBO反馈信息" width="350"/>
Darming's avatar
Darming committed
220
<!--                    <a:column name="agent_instance_status_n" align="center" prompt="工作流状态" width="150"/>-->
221 222 223 224
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
Spencer Chang's avatar
Spencer Chang committed
225
</a:screen>