hls_sap_process_resend.lview 1.81 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: xuls  
    $Date: 2017-4-20 上午10:19:52  
    $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="hls535_sap_resend_link" model="hls.HLS535.submit_process_accounts" 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'], 'hls_sap_accounts_process');
        var process_ds = $(ds_id);
        var records = process_ds.getSelected();
        if (records.length < 1) {
            Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
            return;
        }
        var process_list = [];
        for (i = 0;i < records.length;i++) {
            var process_id = records[i].get('process_id');
            process_list.push({
                'process_id': process_id,
                '_status': 'update'
            });
        }
        Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
        Leaf.request({
            url: $('hls535_sap_resend_link').getUrl(),
            para: process_list,
            success: function() {
                process_ds.query();
                Leaf.Masker.unmask(Ext.getBody());
            },
            failure: function() {
                Leaf.Masker.unmask(Ext.getBody());
            },
            error: function() {
                Leaf.Masker.unmask(Ext.getBody());
            },
            scope: this
        });
    };
]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>