con_contract_reschedule_maintain.lview 11 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 171 172 173 174 175 176 177 178 179 180 181 182
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: LR  
    $Date: 2013-8-15 下午01:35:36  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true">
    <a:init-procedure>
        <a:model-query defaultWhereClause="t1.document_category=&apos;CHANGE_REQUEST&apos; and t1.document_type=&apos;RESCH_REQ&apos;" fetchAll="true" model="basic.hls_document_type_for_lov" rootPath="con712_hls_document_type_path"/>
    </a:init-procedure>
    <a:view>
        <a:link id="con712_contract_reschedule_main_update_link" url="${/request/@context_path}/modules/cont/CON712/con_contract_reschedule_update.lview"/>
        <script type="text/javascript"><![CDATA[
            function con712_con_contract_maintain_grid_reset() {
                $('con712_con_contract_maintain_query_ds').reset();
            }
            
            function con712_contract_maintain_query_ds_onUpdate(ds, record, name, value, oldValue) {
                if (name == 'batch_id_f') {
                    if (!Leaf.isEmpty(value) && Leaf.isEmpty(record.get('batch_id_t'))) {
                        record.set('batch_id_t', value);
                    }
                } else if (name == 'change_req_number_f') {
                    if (!Leaf.isEmpty(value) && Leaf.isEmpty(record.get('change_req_number_t'))) {
                        record.set('change_req_number_t', value);
                    }
                } else if (name == 'req_date_f') {
                    if (!Leaf.isEmpty(value) && Leaf.isEmpty(record.get('req_date_t'))) {
                        record.set('req_date_t', value);
                    }
                }
            }
            
            function con712_con_contract_maintain_detail() {
                var records = $('con712_con_contract_maintain_ds').getSelected();
                if (records.length != 1) {
                    Leaf.showMessage('${l:HLS.PROMPT}', '${l:HLS.SELECT_RECORD}');
                    return;
                } else {
                    var batch_id = records[0].get('batch_id');
                    con712_con_contract_maintain_detail_win(batch_id);
                }
            }
            
            function con712_con_contract_maintain_detail_win(batch_id) {
                new Leaf.Window({
                    id: 'con712_contract_reschedule_update_window',
                    url: $('con712_contract_reschedule_main_update_link').getUrl() + '?batch_id=' + batch_id,
                    params: null,
                    title: '${l:CON712.CONTRACT_RESCHEDULE_DETAIL}',
                    fullScreen: true
                });
            }
            
            function con712_con_contract_maintain_grid_render(value, record, name) {
                if (name == 'batch_id') {
                    return '<a href="javascript:con712_con_contract_maintain_detail_win(' + value + ')">' + value + '</a>';
                }
                return value;
            }
            
            function con712_con_contract_maintain_grid_query(){
                $('con712_con_contract_maintain_ds').query();
            }
            
        ]]></script>
        <a:dataSets>
            <a:dataSet id="con712_hls_document_type_ds">
                <a:datas dataSource="/model/con712_hls_document_type_path"/>
            </a:dataSet>
            <a:dataSet id="con712_change_req_status_ds" lookupCode="CON_CHANGE_REQ_STATUS"/>
            <a:dataSet id="con712_con_contract_maintain_query_ds" autoCreate="true">
                <a:fields>
                    <a:field name="project_number" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="prj.PRJ501.prj_project_for_lov" lovWidth="500" title="HLS.PROJECT_NUMBER">
                        <a:mapping>
                            <a:map from="project_number" to="project_number"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="contract_number" autoComplete="true" lovGridHeight="300" lovHeight="450" lovService="cont.CON500.con_contract_number_lov" lovWidth="500" title="HLS.CONTRACT_NUMBER">
                        <a:mapping>
                            <a:map from="contract_number" to="contract_number"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="document_type_desc" defaultValue="${/model/con712_hls_document_type_path/record/@description}" displayField="description" options="con712_hls_document_type_ds" returnField="document_type" valueField="document_type"/>
                    <a:field name="document_type" defaultValue="${/model/con712_hls_document_type_path/record/@document_type}"/>
                    <a:field name="req_status_desc" displayField="code_value_name" options="con712_change_req_status_ds" returnField="req_status" valueField="code_value"/>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="con712_contract_maintain_query_ds_onUpdate"/>
                </a:events>
            </a:dataSet>
            <a:dataSet id="con712_con_contract_maintain_ds" autoPageSize="true" autoQuery="true" model="cont.CON711.con_contract_change_req" queryDataSet="con712_con_contract_maintain_query_ds" selectable="true" selectionModel="single">
                <a:fields>
                    <a:field name="reschedule_fee" required="true"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:gridButton click="con712_con_contract_maintain_grid_query" text="HLS.QUERY"/>
                <a:gridButton click="con712_con_contract_maintain_grid_reset" text="HLS.RESET"/>
                <a:gridButton click="con712_con_contract_maintain_detail" text="CON712.CONTRACT_RESCHEDULE_DETAIL"/>
            </a:screenTopToolbar>
            <a:form column="4" labelSeparator=" " labelWidth="100" marginWidth="30" title="CON301.CONTRACT_QUERY">
                <a:lov name="project_number" bindTarget="con712_con_contract_maintain_query_ds" prompt="HLS.PROJECT_NUMBER">
                    <a:events>
                        <a:event name="enterdown" handler="con712_con_contract_maintain_grid_query"/>
                    </a:events>
                </a:lov>
                <a:textField name="project_name" bindTarget="con712_con_contract_maintain_query_ds" prompt="HLS.PROJECT_NAME">
                    <a:events>
                        <a:event name="enterdown" handler="con712_con_contract_maintain_grid_query"/>
                    </a:events>
                </a:textField>
                <a:numberField name="batch_id_f" allowDecimals="false" allowNegative="false" bindTarget="con712_con_contract_maintain_query_ds" prompt="CON712.BATCH_ID_F">
                    <a:events>
                        <a:event name="enterdown" handler="con712_con_contract_maintain_grid_query"/>
                    </a:events>
                </a:numberField>
                <a:numberField name="batch_id_t" allowDecimals="false" allowNegative="false" bindTarget="con712_con_contract_maintain_query_ds" prompt="CON712.BATCH_ID_T">
                    <a:events>
                        <a:event name="enterdown" handler="con712_con_contract_maintain_grid_query"/>
                    </a:events>
                </a:numberField>
                <a:lov name="contract_number" bindTarget="con712_con_contract_maintain_query_ds" prompt="HLS.CONTRACT_NUMBER">
                    <a:events>
                        <a:event name="enterdown" handler="con712_con_contract_maintain_grid_query"/>
                    </a:events>
                </a:lov>
                <a:textField name="contract_name" bindTarget="con712_con_contract_maintain_query_ds" prompt="HLS.CONTRACT_NAME">
                    <a:events>
                        <a:event name="enterdown" handler="con712_con_contract_maintain_grid_query"/>
                    </a:events>
                </a:textField>
                <a:textField name="change_req_number_f" bindTarget="con712_con_contract_maintain_query_ds" prompt="CON712.CHANGE_REQ_NUMBER_F">
                    <a:events>
                        <a:event name="enterdown" handler="con712_con_contract_maintain_grid_query"/>
                    </a:events>
                </a:textField>
                <a:textField name="change_req_number_t" bindTarget="con712_con_contract_maintain_query_ds" prompt="CON712.CHANGE_REQ_NUMBER_T">
                    <a:events>
                        <a:event name="enterdown" handler="con712_con_contract_maintain_grid_query"/>
                    </a:events>
                </a:textField>
                <a:datePicker name="req_date_f" bindTarget="con712_con_contract_maintain_query_ds" prompt="HLS.REQ_DATE_F">
                    <a:events>
                        <a:event name="enterdown" handler="con712_con_contract_maintain_grid_query"/>
                    </a:events>
                </a:datePicker>
                <a:datePicker name="req_date_t" bindTarget="con712_con_contract_maintain_query_ds" prompt="HLS.REQ_DATE_T">
                    <a:events>
                        <a:event name="enterdown" handler="con712_con_contract_maintain_grid_query"/>
                    </a:events>
                </a:datePicker>
                <a:comboBox name="req_status_desc" bindTarget="con712_con_contract_maintain_query_ds" prompt="HLS.REQ_STATUS_DESC">
                    <a:events>
                        <a:event name="enterdown" handler="con712_con_contract_maintain_grid_query"/>
                    </a:events>
                </a:comboBox>
                <a:comboBox name="document_type_desc" bindTarget="con712_con_contract_maintain_query_ds" prompt="CON711.DOCUMENT_TYPE_DESC">
                    <a:events>
                        <a:event name="enterdown" handler="con712_con_contract_maintain_grid_query"/>
                    </a:events>
                </a:comboBox>
            </a:form>
            <a:grid id="con712_con_contract_maintain_grid" bindTarget="con712_con_contract_maintain_ds" marginHeight="250" marginWidth="50" navBar="true">
                <a:columns>
                    <a:column name="batch_id" align="right" lock="true" prompt="CON711.BATCH_ID" renderer="con712_con_contract_maintain_grid_render" width="50"/>
                    <a:column name="change_req_number" prompt="CON711.CHANGE_REQ_NUMBER" width="130"/>
                    <a:column name="req_status_desc" prompt="HLS.REQ_STATUS_DESC" width="60"/>
                    <a:column name="document_type_desc" prompt="CON711.DOCUMENT_TYPE_DESC" width="100"/>
                    <a:column name="req_date" prompt="HLS.REQ_DATE" renderer="Leaf.formatDate" width="90"/>
                    <a:column name="contract_number" prompt="HLS.CONTRACT_NUMBER" width="120"/>
                    <a:column name="contract_name" prompt="HLS.CONTRACT_NAME" width="200"/>
                    <a:column name="project_number" prompt="HLS.PROJECT_NUMBER" width="120"/>
                    <a:column name="project_name" prompt="HLS.PROJECT_NAME" width="200"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>