<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: ZLF  
    $Date: 2015-1-9 下午02:11:03  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:view>
        <a:link id="con504_contract_maintain_flag_update_link" model="cont.CON504.con_contract_maintain_flag_update" modelaction="execute"/>
        <script type="text/javascript"><![CDATA[
            function okbtn() {
                var reason=$('reject_reason_ds').getAt(0).get('contract_reject_reason');
                Leaf.showConfirm('提示','您确认拒绝？',function() {
					Leaf.request({
					    url:$('con504_contract_maintain_flag_update_link').getUrl(),
					    para: {
                            contract_id:'${/parameter/@contract_id}',
                            reject_reason:reason
                        },
                        success: function() {
                            Leaf.SideBar.show({
                                msg: '已拒绝',
                                duration: 2000
                            });
                            Leaf.go($('con_contract_content_confirm_link_1').getUrl());
                            $('con505_contract_result_ds').query();
                        },
                        scope: this
					});		
				});	
            }
            function window_close(){
            $('${/parameter/@winId}').close();
        }
            function returnok() {
                window_close();
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="reject_reason_ds" autoCreate="true">
                <a:fields>
                    <a:field name="contract_reject_reason"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:form column="1" style="margin-top:10px;margin-left:10px;">
                <a:textArea name="contract_reject_reason" bindTarget="reject_reason_ds" height="320" width="500"/>
            </a:form>
            <a:hBox style="margin-left:10px;margin-bottom:20px;">
                <a:button id="okbtnid" click="okbtn" text="PROMPT.OK"/>
                <a:button click="returnok" text="PROMPT.RETURN"/>
            </a:hBox>
            <script type="text/javascript"><![CDATA[
                // Leaf.onReady(function() {
                    // var record = $('reject_reason_ds').getAt(0);
                    // var contract_reject_reason;
                    // if('${/parameter/@name}'== 'verify_sql') {
                    	 // clob_validation_sql = $('${/parameter/@ds_name}').findById(${/parameter/@record_id}).get('verify_sql');
                    // }else if('${/parameter/@name}'== 'approve_sql') {
                         // clob_validation_sql = $('${/parameter/@ds_name}').findById(${/parameter/@record_id}).get('approve_sql');
                    // }else {
                         // clob_validation_sql = $('${/parameter/@ds_name}').findById(${/parameter/@record_id}).get('${/parameter/@name}');
                    // }
                    // record.set('clob_validation_sql', clob_validation_sql);
                // });
            ]]></script>
        </a:screenBody>
    </a:view>
</a:screen>
