export_journal_data.lview 18.7 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 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: 6590 Richen.Xu 
    $Date: 2015-5-15 下午4:45:49  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application">
    <a:init-procedure>
        <a:model-query defaultWhereClause="t1.document_category = &apos;JE&apos;" fetchAll="true" model="basic.hls_document_type_for_lov" queryOrderBy="document_type desc" rootPath="hls1001_document_type_path"/>
    </a:init-procedure>
    <a:view package="leaf.ui.std" template="default">
        <script type="text/javascript"><![CDATA[
	function query()
	{
	    $('hls1001_journal_data').query();
	}
	
	function reset()
	{
	    $('hls1001_journal_query_ds').reset();
	}
	
	function hls1001_journal_grid_excel(){
	    Leaf.showConfirm('提示','您确定要导出以下所有数据吗',function(){
	        
	        $('hls_1001_journal_grid')._export('xls','凭证接口字段');
	        
		    var recs = $('hls1001_journal_data').getAll();
		    for(var i=0;i<recs.length;i++){
		        recs[i].set('_status','update',false);
		    }
		    $('hls1001_journal_data').submit();
		    
	    });
	}
	
	function hls1001_onSubmitSuccess(ds,res){
	    $('hls1001_journal_data').query();
	}
	
	// function hls1001_journal_go_back(){
	    // $('export_journal_window').close();
	// }
	]]></script>
        <a:dataSets>
            <a:dataSet id="hls1001_post_gl_status_ds" lookupCode="SUBSYSTEM_POST_GL_FLAG"/>
            <a:dataSet id="hls1001_export_flag_ds" lookupCode="HLS_EXPORT_FLAG"/>
            <a:dataSet id="hls1001_document_type_ds">
                <a:datas dataSource="/model/hls1001_document_type_path"/>
            </a:dataSet>
            <a:dataSet id="hls1001_journal_query_ds">
                <a:fields>
                    <a:field name="journal_num"/>
                    <a:field name="category_code_desc" displayField="description" options="hls1001_document_type_ds" returnField="category_code" valueField="document_type"/>
                    <a:field name="journal_date_from"/>
                    <a:field name="journal_date_to"/>
                    <a:field name="total_amount_dr_from"/>
                    <a:field name="total_amount_dr_to"/>
                    <a:field name="period_name"/>
                    <a:field name="external_journal_num"/>
                    <a:field name="bp_id_tenant"/>
                    <a:field name="bp_id_tenant_desc" lovGridHeight="350" lovHeight="550" lovService="basic.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="500">
                        <a:mapping>
                            <a:map from="bp_name" to="bp_id_tenant_desc"/>
                            <a:map from="bp_id" to="bp_id_tenant"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="source_table"/>
                    <a:field name="reference1"/>
                    <a:field name="je_transaction_code"/>
                    <a:field name="je_transaction_desc" lovGridHeight="420" lovHeight="550" lovPageSize="20" lovService="gld.GLD104.gld_je_transaction_for_lov" lovWidth="500">
                        <a:mapping>
                            <a:map from="je_transaction_code" to="je_transaction_code"/>
                            <a:map from="je_transaction_desc" to="je_transaction_desc"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="post_gl_status" defaultValue="N"/>
                    <a:field name="post_gl_status_desc" defaultValue="未过账" displayField="code_value_name" options="hls1001_post_gl_status_ds" returnField="post_gl_status" valueField="code_value"/>
                    <a:field name="responsibility_center_name_from" lovHeight="500" lovLabelWidth="100" lovService="fnd.FND2110.fnd_responsibility_centers_lov" lovWidth="550" title="HLS.RESPONSIBILITY_CENTER_NAME">
                        <a:mapping>
                            <a:map from="responsibility_center_id" to="responsibility_center_id"/>
                            <a:map from="responsibility_center_code" to="responsibility_center_code_from"/>
                            <a:map from="responsibility_center_name" to="responsibility_center_name_from"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="responsibility_center_name_to" lovHeight="500" lovLabelWidth="100" lovService="fnd.FND2110.fnd_responsibility_centers_lov" lovWidth="550" title="HLS.RESPONSIBILITY_CENTER_NAME">
                        <a:mapping>
                            <a:map from="responsibility_center_code" to="responsibility_center_code_to"/>
                            <a:map from="responsibility_center_name" to="responsibility_center_name_to"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="account_code_from" autoComplete="true" lovHeight="500" lovLabelWidth="100" lovService="hls.HLS301.hls_journal_account_for_lov" lovWidth="500" title="HLS530.ACCOUNT_NAME">
                        <a:mapping>
                            <a:map from="account_code" to="account_code_from"/>
                            <a:map from="description" to="account_name_from"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="account_code_to" autoComplete="true" lovHeight="500" lovLabelWidth="100" lovService="hls.HLS301.hls_journal_account_for_lov" lovWidth="500" title="HLS530.ACCOUNT_NAME">
                        <a:mapping>
                            <a:map from="account_code" to="account_code_to"/>
                            <a:map from="description" to="account_name_to"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="company_short_name" lovHeight="500" lovLabelWidth="100" lovService="fnd.fnd_companies_lov" lovWidth="550" title="HLS530.JOURNAL_COMPANY">
                        <a:mapping>
                            <a:map from="company_id" to="je_company_id"/>
                            <a:map from="company_short_name" to="company_short_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="currency_name" lovHeight="500" lovLabelWidth="100" lovService="basic.gld_currency_v_lov" lovWidth="550">
                        <a:mapping>
                            <a:map from="currency_code" to="currency_code"/>
                            <a:map from="currency_name" to="currency_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="export_flag_n" displayField="code_value_name" options="hls1001_export_flag_ds" returnField="export_flag" valueField="code_value"/>
                </a:fields>
            </a:dataSet>
            <a:dataSet id="hls1001_journal_data" model="hls.HLS1001.export_journal_data" queryDataSet="hls1001_journal_query_ds">
                <a:fields>
                    <a:field name="export_flag" checkedValue="Y" defaultValue="N" readOnly="true" uncheckedValue="N"/>
                </a:fields>
                <a:events>
                    <a:event name="submitsuccess" handler="hls1001_onSubmitSuccess"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <!-- <a:toolbarButton click="hls1001_journal_go_back" text="HLS.EXIT"/> -->
                <a:toolbarButton click="reset" text="HLS.RESET"/>
                <a:toolbarButton click="query" text="HLS.QUERY"/>
                <a:toolbarButton click="hls1001_journal_grid_excel" text="导出"/>
            </a:screenTopToolbar>
            <a:form column="5" labelSeparator=" " labelWidth="100" marginWidth="30" title="HAP_QUERY_TITLE">
                <a:lov name="account_code_from" bindTarget="hls1001_journal_query_ds" prompt="HLS530.ACCOUNT_NAME_FROM"/>
                <a:lov name="account_code_to" bindTarget="hls1001_journal_query_ds" prompt="HLS530.ACCOUNT_NAME_TO"/>
                <a:lov name="responsibility_center_name_from" bindTarget="hls1001_journal_query_ds" prompt="HLS530.RESPONSIBILITY_CENTER_NAME_FROM"/>
                <a:lov name="responsibility_center_name_to" bindTarget="hls1001_journal_query_ds" prompt="HLS530.RESPONSIBILITY_CENTER_NAME_TO"/>
                <a:lov name="company_short_name" bindTarget="hls1001_journal_query_ds" prompt="HLS530.JOURNAL_COMPANY"/>
                <a:datePicker name="journal_date_from" bindTarget="hls1001_journal_query_ds" prompt="HLS530.JOURNAL_DATE_FROM"/>
                <a:datePicker name="journal_date_to" bindTarget="hls1001_journal_query_ds" prompt="HLS530.JOURNAL_DATE_TO"/>
                <a:numberField name="total_amount_dr_from" allowFormat="true" bindTarget="hls1001_journal_query_ds" prompt="HLS530.TOTAL_AMOUNT_DR_FROM"/>
                <a:numberField name="total_amount_dr_to" allowFormat="true" bindTarget="hls1001_journal_query_ds" prompt="HLS530.TOTAL_AMOUNT_DR_TO"/>
                <a:textField name="journal_num" bindTarget="hls1001_journal_query_ds" prompt="HLS530.JOURNAL_NUM"/>
                <a:textField name="project_name" bindTarget="hls1001_journal_query_ds" prompt="HLS.PROJECT_NAME"/>
                <a:lov name="je_transaction_desc" bindTarget="hls1001_journal_query_ds" prompt="HLS530.JE_TRANSACTION"/>
                <a:lov name="currency_name" bindTarget="hls1001_journal_query_ds" prompt="HLS.CURRENCY"/>
                <a:lov name="bp_id_tenant_desc" bindTarget="hls1001_journal_query_ds" prompt="HLS.TENANT_CODE"/>
                <a:comboBox name="post_gl_status_desc" bindTarget="hls1001_journal_query_ds" prompt="HLS530.IS_POSTED"/>
                <a:comboBox name="export_flag_n" bindTarget="hls1001_journal_query_ds" prompt="导出状态"/>
            </a:form>
            <a:grid id="hls_1001_journal_grid" bindTarget="hls1001_journal_data" marginHeight="255" marginWidth="20" navBar="true">
                <a:columns>
                    <a:column name="export_flag" editor="hls1001_cb" forExport="false" lock="true" prompt="已导出"/>
                    <a:column name="period_year" lock="true" prompt="会计年" width="60"/>
                    <a:column name="period_num" lock="true" prompt="会计期间" width="60"/>
                    <a:column name="journal_date" lock="true" prompt="制单日期" width="80"/>
                    <a:column name="journal_type" lock="true" prompt="凭证类别" width="50"/>
                    <a:column name="journal_num" lock="true" prompt="凭证号" width="100"/>
                    <a:column name="created_by_n" lock="true" prompt="制单人" width="60"/>
                    <a:column name="document" prompt="所附单据数"/>
                    <a:column name="note1" prompt="备注1"/>
                    <a:column name="note2" prompt="备注2"/>
                    <a:column name="account_id_n" prompt="科目编码"/>
                    <a:column name="line_description" prompt="摘要"/>
                    <a:column name="settle_method" prompt="结算方式编码"/>
                    <a:column name="bill_num" prompt="票据号"/>
                    <a:column name="bill_date" prompt="票据日期"/>
                    <a:column name="currency_code_n" prompt="币种名称"/>
                    <a:column name="rate" prompt="汇率"/>
                    <a:column name="price" prompt="单价"/>
                    <a:column name="dr_num" prompt="借方数量"/>
                    <a:column name="cr_num" prompt="贷方数量"/>
                    <a:column name="amount_dr" prompt="原币借方"/>
                    <a:column name="amount_cr" prompt="原币贷方"/>
                    <a:column name="amount_fuc_dr" prompt="借方金额" renderer="Leaf.formatMoney"/>
                    <a:column name="amount_fuc_cr" prompt="贷方金额" renderer="Leaf.formatMoney"/>
                    <a:column name="responsibility_center_code" prompt="部门编码"/>
                    <a:column name="em_code" prompt="职员编码"/>
                    <a:column name="ref_v05" prompt="客户编码"/>
                    <a:column name="ref_v10" prompt="供应商编码"/>
                    <a:column name="project_item_code" prompt="项目大类编码"/>
                    <a:column name="project_number" prompt="项目编码"/>
                    <a:column name="salesman" prompt="业务员"/>
                    <a:column name="define_1" prompt="自定义项1"/>
                    <a:column name="define_2" prompt="自定义项2"/>
                    <a:column name="define_3" prompt="自定义项3"/>
                    <a:column name="define_4" prompt="自定义项4"/>
                    <a:column name="define_5" prompt="自定义项5"/>
                    <a:column name="define_6" prompt="自定义项6"/>
                    <a:column name="define_7" prompt="自定义项7"/>
                    <a:column name="define_8" prompt="自定义项8"/>
                    <a:column name="define_9" prompt="自定义项9"/>
                    <a:column name="define_10" prompt="自定义项10"/>
                    <a:column name="define_11" prompt="自定义项11"/>
                    <a:column name="define_12" prompt="自定义项12"/>
                    <a:column name="define_13" prompt="自定义项13"/>
                    <a:column name="define_14" prompt="自定义项14"/>
                    <a:column name="define_15" prompt="自定义项15"/>
                    <a:column name="define_16" prompt="自定义项16"/>
                    <a:column name="cash_flow_item" prompt="现金流量项目"/>
                    <a:column name="cash_flow_dr" prompt="现金流量借方金额"/>
                    <a:column name="cash_flow_cr" prompt="现金流量贷方金额"/>
                </a:columns>
                <a:editors>
                    <a:checkBox id="hls1001_cb"/>
                </a:editors>
            </a:grid>
        </a:screenBody>
        <script type="text/javascript"><![CDATA[
        
        	Leaf.onReady(function(){
        	    if(!Leaf.isEmpty('${/parameter/@export_flag}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('export_flag','${/parameter/@export_flag}');
        	        $('hls1001_journal_query_ds').getAt(0).set('export_flag_n',decodeURI(decodeURI('${/parameter/@export_flag_n}')));
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@journal_num}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('journal_num','${/parameter/@journal_num}');
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@account_code_from}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('account_code_from','${/parameter/@account_code_from}');
        	        $('hls1001_journal_query_ds').getAt(0).set('account_name_from',decodeURI(decodeURI('${/parameter/@account_name_from}')));
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@account_code_to}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('account_code_to','${/parameter/@account_code_to}');
        	        $('hls1001_journal_query_ds').getAt(0).set('account_name_to',decodeURI(decodeURI('${/parameter/@account_name_to}')));
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@responsibility_center_code_to}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('responsibility_center_code_to','${/parameter/@responsibility_center_code_to}');
        	        $('hls1001_journal_query_ds').getAt(0).set('responsibility_center_name_to',decodeURI(decodeURI('${/parameter/@responsibility_center_name_to}')));
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@responsibility_center_code_from}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('responsibility_center_code_from','${/parameter/@responsibility_center_code_from}');
        	        $('hls1001_journal_query_ds').getAt(0).set('responsibility_center_name_from',decodeURI(decodeURI('${/parameter/@responsibility_center_name_from}')));
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@je_company_id}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('je_company_id','${/parameter/@je_company_id}');
        	        $('hls1001_journal_query_ds').getAt(0).set('company_short_name',decodeURI(decodeURI('${/parameter/@company_short_name}')));
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@journal_date_from}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('journal_date_from','${/parameter/@journal_date_from}');
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@journal_date_to}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('journal_date_to','${/parameter/@journal_date_to}');
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@total_amount_dr_from}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('total_amount_dr_from','${/parameter/@total_amount_dr_from}');
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@total_amount_dr_to}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('total_amount_dr_to','${/parameter/@total_amount_dr_to}');
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@project_name}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('project_name',decodeURI(decodeURI('${/parameter/@project_name}')));
        	    }
               
               	if(!Leaf.isEmpty('${/parameter/@je_transaction_code}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('je_transaction_code','${/parameter/@je_transaction_code}');
        	        $('hls1001_journal_query_ds').getAt(0).set('je_transaction_desc',decodeURI(decodeURI('${/parameter/@je_transaction_desc}')));
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@currency_code}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('currency_code','${/parameter/@currency_code}');
        	        $('hls1001_journal_query_ds').getAt(0).set('currency_name',decodeURI(decodeURI('${/parameter/@currency_name}')));
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@bp_id_tenant}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('bp_id_tenant','${/parameter/@bp_id_tenant}');
        	        $('hls1001_journal_query_ds').getAt(0).set('bp_id_tenant_desc',decodeURI(decodeURI('${/parameter/@bp_id_tenant_desc}')));
        	    }
        	    
        	    if(!Leaf.isEmpty('${/parameter/@post_gl_status}')){
        	        $('hls1001_journal_query_ds').getAt(0).set('post_gl_status','${/parameter/@post_gl_status}');
        	        $('hls1001_journal_query_ds').getAt(0).set('post_gl_status_desc',decodeURI(decodeURI('${/parameter/@post_gl_status_desc}')));
        	    }
        	    
        	    $('hls1001_journal_data').query();
        	});
        
        ]]></script>
    </a:view>
</a:screen>