csh_payment_prerequisite_maintain.lview 9.6 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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: wujun  
    $Date: 2016年11月18日13:10:00
    $Revision: 1.0  
    $Purpose: 付款先决条件变更维护
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure/>
    <a:view>
        <a:link id="csh910_submit_condition_change_req_link" model="csh.CSH910.csh_submit_condition_change_req" modelaction="execute"/>
        <a:link id="csh910_cancle_condition_change_req_link" model="csh.CSH910.csh_cancel_condition_change_req" modelaction="execute"/>
        <a:link id="csh910_save_condition_change_req_link" model="csh.CSH910.csh_hn_payment_cond_change_req_query" modelaction="update"/>
        <a:link id="csh910_hn_payment_cond_change_req_back_turn_link" url="${/request/@context_path}/modules/csh/CSH910/csh_prerequisites_for_payment.lview"/>
        <script type="text/javascript"><![CDATA[
            Leaf.onReady(init);
            
            function init() {
                $('csh910_hn_payment_cond_change_req_maintain_query_ds').setQueryParameter('change_req_id', '${/parameter/@change_req_id}');
                $('csh910_hn_payment_cond_change_req_maintain_query_ds').query();
            }
            
            function csh910_hn_payment_cond_change_req_maintain_query() {
                $('csh910_hn_payment_cond_change_req_after_change_result_ds').query();
            }
            
            function csh910_hn_payment_cond_change_req_close() {
                location.href = $('csh910_hn_payment_cond_change_req_back_turn_link').getUrl();
                parent.shMenu('show');
            }
            
            function csh910_hn_payment_cond_change_req_submit() {
                Leaf.showConfirm('${l:PROMPT}', '您确定要提交审批吗?', function() {
                    var record = $('csh910_hn_payment_cond_change_req_ds').getAt(0);
                    Leaf.request({
                        url: $('csh910_submit_condition_change_req_link').getUrl(),
                        para: {
                            change_req_id: record.get('change_req_id')
                        },
                        success: function(res) {
                            location.href = $('csh910_hn_payment_cond_change_req_back_turn_link').getUrl();
                            parent.shMenu('show');
                        },
                        failure: function() {},
                        error: function() {},
                        scope: this
                    });
                });
                return;
            }
            
            function csh910_hn_payment_cond_change_req_cancle() {
                Leaf.showConfirm('${l:PROMPT}', '您确定撤销审批吗?', function() {
                    var record = $('csh910_hn_payment_cond_change_req_ds').getAt(0);
                    Leaf.request({
                        url: $('csh910_cancle_condition_change_req_link').getUrl(),
                        para: {
                            change_req_id: record.get('change_req_id')
                        },
                        success: function(res) {
                            location.href = $('csh910_hn_payment_cond_change_req_back_turn_link').getUrl();
                            parent.shMenu('show');
                        },
                        failure: function() {},
                        error: function() {},
                        scope: this
                    });
                });
                return;
            }
            
            function csh910_hn_payment_cond_change_req_save(){
                 var record = $('csh910_hn_payment_cond_change_req_maintain_query_ds').getAt(0);
                 Leaf.request({
                        url: $('csh910_save_condition_change_req_link').getUrl(),
                        para: {
                            change_req_id: record.get('change_req_id'),
                             description: record.get('description')
                        },
                        success: function(res) {
                             $('csh910_hn_payment_cond_change_req_after_change_result_ds').submit();
                        },
                        failure: function() {},
                        error: function() {},
                        scope: this
                    });
               
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="csh910_hn_payment_cond_change_req_ds" autoCreate="true">
                <a:fields>
                    <a:field name="change_req_id" defaultValue="${/parameter/@change_req_id}"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="csh910_hn_payment_cond_change_req_maintain_query_ds" model="csh.CSH910.csh_hn_payment_cond_change_req_query" queryDataSet="csh910_hn_payment_cond_change_req_ds">
                <a:fields>
                    <a:field name="change_req_number" readOnly="true"/>
                    <a:field name="req_date" datatype="date" readOnly="true"/>
                    <a:field name="bp_name" readOnly="true"/>
                    <a:field name="manager" readOnly="true"/>
                    <a:field name="contract_number" readOnly="true"/>
                    <a:field name="contract_name" readOnly="true"/>
                    <a:field name="description" required="true"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="csh910_hn_payment_cond_change_req_after_change_result_ds" autoQuery="true" model="csh.CSH910.hn_con_payment_conditions" queryDataSet="csh910_hn_payment_cond_change_req_ds" selectable="true">
                <a:fields>
                    <a:field name="confirm_flag" checkedValue="Y" uncheckedValue="N"/>
                    <a:field name="hd_id" defaultValue="${/parameter/@change_req_id}"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="csh910_hn_payment_cond_change_req_before_change_result_ds" autoQuery="true" model="csh.CSH910.csh_payment_prerequisite_maintain_before_change" queryDataSet="csh910_hn_payment_cond_change_req_ds" selectable="true">
                <a:fields>
                    <a:field name="confirm_flag" checkedValue="Y" uncheckedValue="N"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="csh910_hn_payment_cond_change_req_close" text="关闭"/>
                <a:gridButton click="csh910_hn_payment_cond_change_req_save" text="保存"/>
                <a:gridButton click="csh910_hn_payment_cond_change_req_submit" text="提交审批"/>
                <a:gridButton click="csh910_hn_payment_cond_change_req_cancle" text="撤销变更"/>
            </a:screenTopToolbar>
            <a:form column="1" labelWidth="120" marginWidth="50" title="变更信息">
                <a:hBox>
                    <a:textField name="change_req_number" bindTarget="csh910_hn_payment_cond_change_req_maintain_query_ds" prompt="变更编号"/>
                    <a:textField name="req_date" bindTarget="csh910_hn_payment_cond_change_req_maintain_query_ds" prompt="变更日期" renderer="Leaf.formatDate"/>
                    <a:textField name="bp_name" bindTarget="csh910_hn_payment_cond_change_req_maintain_query_ds" prompt="承租人名称" width="335"/>
                </a:hBox>
                <a:hBox>
                    <a:textField name="manager" bindTarget="csh910_hn_payment_cond_change_req_maintain_query_ds" prompt="项目经理"/>
                    <a:textField name="contract_number" bindTarget="csh910_hn_payment_cond_change_req_maintain_query_ds" prompt="支付表编号"/>
                    <a:textField name="contract_name" bindTarget="csh910_hn_payment_cond_change_req_maintain_query_ds" prompt="支付表名称" width="335"/>
                </a:hBox>
                <a:hBox>
                    <a:textArea name="description" bindTarget="csh910_hn_payment_cond_change_req_maintain_query_ds" height="50" prompt="变更说明" width="800"/>
                </a:hBox>
            </a:form>
            <a:tabPanel marginHeight="280" marginWidth="50">
                <a:tabs>
                    <a:tab prompt="变更后" width="110">
                        <a:grid id="csh910_hn_payment_cond_change_req_after_change_result_grid_id" bindTarget="csh910_hn_payment_cond_change_req_after_change_result_ds" marginHeight="320" marginWidth="80" navBar="true">
                            <a:toolBar>
                                <a:button type="add"/>
                                <a:button type="save"/>
                                <a:button type="delete"/>
                            </a:toolBar>
                            <a:columns>
                                <a:column name="description" editor="editor_tf" prompt="描述" showTitle="true" width="500"/>
                            </a:columns>
                            <a:editors>
                                <a:textField id="editor_tf"/>
                            </a:editors>
                        </a:grid>
                    </a:tab>
                    <a:tab prompt="变更前" width="110">
                        <a:grid id="csh910_hn_payment_cond_change_req_before_change_result_grid_id" bindTarget="csh910_hn_payment_cond_change_req_before_change_result_ds" marginHeight="320" marginWidth="80" navBar="true">
                            <a:columns>
                                <a:column name="description" prompt="描述" showTitle="true" width="500"/>
                            </a:columns>
                        </a:grid>
                    </a:tab>
                </a:tabs>
            </a:tabPanel>
        </a:screenBody>
    </a:view>
</a:screen>