ebank_ccb_transaction.lview 5 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: xuls  
    $Date: 2016-12-8 下午1:42:02  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true">
    <a:init-procedure/>
    <a:view>
        <a:link id="ccb301_create_ccb_document_link" model="ccb.ccb301.ctr_receivables_ccb" modelaction="execute"/>
        <a:link id="ccb301_create_acr_link" model="ccb.ccb301.create_acr_transaction" modelaction="execute"/>
        <a:link id="ccb301_create_transaction_link" model="ccb.ccb301.ccb_transaction_job" modelaction="execute"/>
        <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'], 'hls_ebank_ccb_transaction');
        var tra_ds_id = $(ds_id);
        var records = tra_ds_id.getSelected();
        if (records.length != 1) {
            Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
            return;
        }
        var record = records[0];
        var detail_mask = Ext.getBody();
        var confirm_win = Leaf.showConfirm('${l:PROMPT}', '是否确认生成生成代扣单', function() {
            Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
            Leaf.request({
                url: $('ccb301_create_ccb_document_link').getUrl(),
                para: {},
                success: function(res) {
                    parent.Leaf.SideBar.enable = true;
                    parent.Leaf.SideBar.show({
                        msg: '${l:HLS.SUBMIT_SUCCESS}',
                        duration: 2000
                    });
                    Leaf.Masker.unmask(detail_mask);
                },
                error: function(res) {
                    Leaf.Masker.unmask(detail_mask);
                },
                faliure: function() {
                    Leaf.Masker.unmask(detail_mask);
                },
                scope: this
            });
        }, function(res) {});
    }; /*创建交易事务*/
    window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
        var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_ebank_ccb_transaction');
        var tra_ds_id = $(ds_id);
        var detail_mask = Ext.getBody();
        var confirm_win = Leaf.showConfirm('${l:PROMPT}', '是否确认生成交易事务', function() {
            Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
            Leaf.request({
                url: $('ccb301_create_transaction_link').getUrl(),
                para: {},
                success: function(res) {
                    parent.Leaf.SideBar.enable = true;
                    parent.Leaf.SideBar.show({
                        msg: '${l:HLS.SUBMIT_SUCCESS}',
                        duration: 2000
                    });
                    tra_ds_id.query();
                    Leaf.Masker.unmask(detail_mask);
                },
                error: function(res) {
                    Leaf.Masker.unmask(detail_mask);
                },
                faliure: function() {
                    Leaf.Masker.unmask(detail_mask);
                },
                scope: this
            });
        }, function(res) {});
    }; /*创建收款*/
    window['${/parameter/@layout_code}_user_button3_layout_dynamic_click'] = function() {
        var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_ebank_ccb_transaction');
        var tra_ds_id = $(ds_id);
        var records = tra_ds_id.getSelected();
        if (records.length != 1) {
            Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
            return;
        }
        var record = records[0];
        var detail_mask = Ext.getBody();
        var confirm_win = Leaf.showConfirm('${l:PROMPT}', '是否确认创建收款', function() {
            Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
            Leaf.request({
                url: $('ccb301_create_acr_link').getUrl(),
                para: {
                    transaction_id : record.get('transaction_id')
                },
                success: function(res) {
                    parent.Leaf.SideBar.enable = true;
                    parent.Leaf.SideBar.show({
                        msg: '${l:HLS.SUBMIT_SUCCESS}',
                        duration: 2000
                    });
                    tra_ds_id.query();
                    Leaf.Masker.unmask(detail_mask);
                },
                error: function(res) {
                    Leaf.Masker.unmask(detail_mask);
                },
                faliure: function() {
                    Leaf.Masker.unmask(detail_mask);
                },
                scope: this
            });
        }, function(res) {});
    };
]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>