csh_payment_maintain.lview 6.59 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
<?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="csh_payment_req_create_link"
                url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_selected.lview"/>
        <a:link id="get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <a:link id="csh501_csh_payment_req_link_id"
                url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req.lview"/>
        <script type="text/javascript"><![CDATA[
        //                //新增
        //                window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
        //                    var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
        //                    var url = $('csh_payment_req_create_link').getUrl();
        //                    var win = new Leaf.Window({
        //                        url: url,
        //                        params: {
        //                            winid:'csh_payment_req_create_win_id'
        //                        },
        //                        title: '付款申请页面',
        //                        id: 'csh_payment_req_create_win_id',
        //                        fullScreen: true
        //                    });
        //                    win.on('close', function() {
        //                        $(ds_id).query();
        //                    });
        //                };
        //
        //                window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
        //                    var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'tre_loan_con_change_req');
        //                    var record = $(ds_id).getSelected();
        //                    var param = {};
        //                    param['function_code'] = 'LON120Q';
        //                    param['function_usage'] = 'QUERY';
        //                    param['loan_change_req_id'] = record[0].get('loan_change_req_id');
        //                    param['url_title'] = '融资合同变更';
        //                    param['winid'] = 'lon120_loan_change_create_winid';
        //                    hls_doc_get_layout_code('get_layout_code_link_id', param, 'loan_change_modify_link', ds_id);
        //                };
        //
        //                window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function () {
        //                    window['${/parameter/@layout_code}_lock_layout_dynamic_window']();
        //                    var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'tre_loan_con_change_req');
        //                    var record = $(ds_id).getSelected();
        //                    var loan_contract_id = record[0].get('loan_contract_id');
        //                    var loan_change_req_id = record[0].get('loan_change_req_id');
        //                    Leaf.request({
        //                        url: $('tre_loan_contact_cancel_change_link_id').getUrl(),
        //                        para: {
        //                            loan_contract_id: loan_contract_id,
        //                            loan_change_req_id: loan_change_req_id
        //                        },
        //                        success: function () {
        //                            window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
        //                        },
        //                        failure: function () {
        //                            window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
        //                        },
        //                        error: function () {
        //                            window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
        //                        },
        //                        scope: this
        //                    });
        //                };


        function detail_link(id, name, query_only) {

            var record = window['${/parameter/@layout_code}_hls_link_render_record'][id + '---' + name];
            var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'csh_payment_req_hd');
            var param = {};
            param['function_usage'] = 'UPDATE';
            param['payment_req_id'] = record.get('payment_req_id');
            param['document_category'] = record.get('document_category');
            param['business_type'] = record.get('business_type');
            param['contract_id'] = record.get('contract_id');
            param['contract_number'] = record.get('contract_number');
            param['division_n'] = record.get('division_n');
            param['contract_name'] = record.get('contract_name');
            param['division'] = record.get('division');
            param['first_contract_day'] = record.get('first_contract_day');
            if (record.get('business_type') == 'PAYMENT') {
                param['function_code'] = 'CSH501D';
            } else if (record.get('business_type') == 'PREPAYMENT') {
                param['function_code'] = 'CSH501_PRE_D';
            }
            param['winid'] = 'csh_payment_update_window';
            param['url_title'] = '付款申请';
            if (record.get('ln_cf_item') == 0) {
                param['cond_para1'] = 'PAYMENT';
            } else {
                param['cond_para1'] = 'OTHER';
            }

            hls_doc_get_layout_code('get_layout_code_link_id', param, 'csh501_csh_payment_req_link_id', ds_id,'${/parameter/@layout_code}');
        }


        window['${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record) {
            window['${/parameter/@layout_code}_hls_link_render_record'][record.id + '---' + name] = record;
            if (name == 'detail') {
                link_function = 'detail_link';
                if (record.get('contract_id')) {
                    return '<a href="javascript:window[\'' + link_function + '\'](\'' + record.id + '\',\'' + name + '\',\'' + config_record.get('query_only') + '\');">' + config_record.get('prompt') + '</a>';
                } else {
                    return '';
                }
            }
        };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>