<?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>
