loan_fee_modify.lview 3.58 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
<?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>submit_fee_status.lwm
        <a:link id="withdrawal_fee_status_link" model="lon.lon140.withdrawal_fee_status" modelaction="batch_update"/>
        <a:link id="submit_fee_status_link" model="lon.lon140.submit_fee_status" modelaction="batch_update"/>
        <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'], 'tre_con_deposit_fee');
            var records = $(ds_id).getSelected();
            if (records.length == 0) {
                Leaf.showMessage('${l:PROMPT}', '请选择一行数据');
                return;
            }
            var datas = [];
            for (var i = 0; i < records.length; i++) {
                var obj = {};
                obj['record_id'] = records[i].get('record_id');
                obj['_status'] = 'update';
                datas[i] = obj;
            }
            Leaf.request({
                url: $('submit_fee_status_link').getUrl(),
                para: datas,
                success: function (res) {
                    window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
                    Leaf.SideBar.show({
                        msg: '${l:HLS.SUBMIT_SUCCESS}',
                        duration: 2000
                    });
                    $(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
            });
        };
        //反冲
        window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function () {
            var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'tre_con_deposit_fee');
            var records = $(ds_id).getSelected();
            if (records.length == 0) {
                Leaf.showMessage('${l:PROMPT}', '请选择一行数据');
                return;
            }
            var datas = [];
            for (var i = 0; i < records.length; i++) {
                var obj = {};
                obj['record_id'] = records[i].get('record_id');
                obj['_status'] = 'update';
                datas[i] = obj;
            }
            Leaf.request({
                url: $('withdrawal_fee_status_link').getUrl(),
                para: datas,
                success: function (res) {
                    window['${/parameter/@layout_code}_unlock_layout_dynamic_window']();
                    Leaf.SideBar.show({
                        msg: '${l:HLS.SUBMIT_SUCCESS}',
                        duration: 2000
                    });
                    $(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
            });
        };

        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>