<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qwm  
    $Date: 2013-8-29 下午4:36:37  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure>
        <a:model-query autoCount="false" fetchAll="true" model="basic.hls_sys_time_default_value" rootPath="hls_sys_time_default_value_query"/>
    </a:init-procedure>
    <a:view>
        <div/>
        <script type="text/javascript"><![CDATA[
            function csh502_payment_close() {
                //
                
                var record = $('csh_payment_req_queryDs').getCurrentRecord();
                if (record.validateRecord(true)) {
                    var saveData = [];
                    record.set('_status', 'insert');
                    saveData.push(record.data);
                    Leaf.showConfirm('${l:HLS.PROMPT}', '确定关闭?', function okFun() {
                        Leaf.request({
                            url: '${/request/@context_path}/autocrud/csh.CSH502.csh_payment_req_close/batch_update',
                            para: saveData,
                            success: function(res) {
                                Leaf.SideBar.show({
                                    msg: '${l:HLS.SUBMIT_SUCCESS}',
                                    duration: 2000
                                });
                                $('${/parameter/@winId}').close();
                                $('csh_payment_req_queryDs').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 click="csh502_payment_close" text="CSH502.CSH_CONFIRM_CLOSE"/>
            </a:screenTopToolbar>
            <a:form>
                <a:box>
                    <a:datePicker name="closed_date" bindTarget="csh_payment_req_queryDs" prompt="CSH502.CLOSED_DATE" width="100"/>
                </a:box>
                <a:box>
                    <a:textArea name="closed_note" bindTarget="csh_payment_req_queryDs" prompt="CSH502.CLOSED_NOTE" width="450"/>
                </a:box>
            </a:form>
        </a:screenBody>
        <script type="text/javascript"><![CDATA[
        Leaf.onReady(init);
        function init() {

           var record = $('csh_payment_req_queryDs').getCurrentRecord();
           record.set('closed_date', '${/model/hls_sys_time_default_value_query/record/@now_time}');	
                    
                
        }
          
          
          
        ]]></script>
    </a:view>
</a:screen>