gld_journal_reverse_confirm.lview 3.79 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qwm  
    $Date: 2013-5-30 上午10:39:03  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view package="leaf.ui.std" template="default">
        <div/>
        <a:link id="csh_payment_reverse_query" url="${/request/@context_path}/modules/csh/CSH503/csh_payment_reverse.lview"/>
        <!-- <a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/> -->
        <a:link id="gld_journal_reverse_link_id" model="hls.HLS301.gld_journal_reverse_confirm" modelaction="batch_update"/>
        <script type="text/javascript"><![CDATA[
           function gld_journal_reverse(){
                   var record = $('hls_journal_header_result_ds').getCurrentRecord();
               if (record.validateRecord()){
                  
                  // alert(record.get('reverse_date'));
                  //alert(record.get('internal_period_num'));
                   var saveData = [];
                    record.set('_status', 'execute');
                    saveData.push(record.data);
                    Leaf.showConfirm('${l:HLS.PROMPT}', '${l:CSH514.REVERSE_SURE}', function okFun() {
                        Leaf.request({
                            url: $('gld_journal_reverse_link_id').getUrl(),
                            para: saveData,
                            success: function(res) {
                                Leaf.SideBar.show({
                                    msg: '${l:HLS.SUBMIT_SUCCESS}',
                                    duration: 2000
                                });
                                //window.location.href = $('csh_payment_reverse_query').getUrl();
                                $('${/parameter/@winId}').close();
                                $('hls_journal_header_result_ds').query();
                            },
                            failure: function() {
                                Leaf.Masker.unmask(Ext.getBody());
                            },
                            error: function() {
                                Leaf.Masker.unmask(Ext.getBody());
                            },
                            scope: this
                        });
                    });
                   
               }
           }
           
           
        ]]></script>
        <a:dataSets/>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton id="gld_journal_reverse_id" click="gld_journal_reverse" text="CSH502.REVERSE"/>
            </a:screenTopToolbar>
            <a:form>
                <a:box column="2">
                    <a:datePicker name="reverse_date" bindTarget="hls_journal_header_result_ds" prompt="CSH502.REVERSE_DATE" width="150"/>
                    <a:lov name="reverse_period_name" bindTarget="hls_journal_header_result_ds" prompt="GLD_PERIODS.PERIOD_NAME" width="150"/>
                </a:box>
            </a:form>
        </a:screenBody>
        <script type="text/javascript"><![CDATA[
        Leaf.onReady(init);
        function init() {
            var record = $('hls_journal_header_result_ds').getCurrentRecord();
                   /*  record.getField('bp_name').setReadOnly(true);
                    record.getField('amount').setReadOnly(true);
                    record.getField('currency_code').setReadOnly(true);
                    record.getField('transaction_date').setReadOnly(true);
                    record.set('description','反冲');
                    record.getField('reverse_period_name').setReadOnly(true);
                    record.set('reverse_date' ,Leaf.formatDate(new Date()));  */
                    
                
        }
          
          
          
        ]]></script>
    </a:view>
</a:screen>