csh_payment_req_pay.lview 51.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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: qwm  
    $Date: 2013-5-22 上午11:10:19  
    $Revision: 1.0  
    $Purpose: 
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" customizationEnabled="true" trace="true">
    <a:init-procedure>
        <s:server-script import="con_print_path.js"><![CDATA[
            set_parameter_file_path();
        ]]></s:server-script>
        <a:model-query model="csh.CSH502.csh_bpm_branch_init" rootPath="branch_init_ds"/>
        <!-- <a:model-query autoCount="false" defaultWhereClause=" contract_id=${/parameter/@contract_id}" fetchAll="true" model="csh.CSH501.csh_payment_req_selected" rootPath="payment_req_selected"/> -->
        <a:model-query autoCount="false" defaultWhereClause=" document_category=&apos;PAYMENT_REQ&apos; and  enabled_flag=&apos;Y&apos;" fetchAll="true" model="hls.HLS003.hls_document_type" rootPath="payment_document_type"/>
        <a:model-query autoCount="false" defaultWhereClause=" enabled_flag=&apos;Y&apos;" fetchAll="true" model="gld.gld_exchangerate_types" rootPath="exchangerate_types"/>
        <a:model-query autoCount="false" defaultWhereClause=" payment_req_id=${/parameter/@payment_req_id}" fetchAll="true" model="csh.CSH502.csh_payment_req_pay_query" rootPath="csh_payment_req_pay_query"/>
        <a:model-query fetchAll="true" model="csh.CSH511.csh_transaction_default_exchange_rate_type" rootPath="default_exchange_rate_type_path"/>
        <a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true" model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
        <a:model-query fetchAll="true" model="gld.gld_exchangerate_type_lov" rootPath="exchangerate_type_path"/>
    </a:init-procedure>
    <a:view>
        <div/>
        <a:link id="csh_payment_content_link_id" model="csh.CSH502.csh_payment_create_content" modelaction="update"/>
        <a:link id="csh_payment_req_pay_query" url="${/request/@context_path}/modules/csh/CSH502/csh_payment_req_query.lview"/>
        <a:link id="csh_payment_req_pay_link_id" url="${/request/@context_path}/modules/csh/CSH502/csh_payment_req_pay.lsc"/>
        <a:link id="csh_payment_req_pay_bpm_link_id" url="${/request/@context_path}/modules/csh/CSH502/csh_payment_req_pay_bpm.lsc"/>
        <a:link id="get_period_name_id" model="csh.CSH511.csh_transaction_get_period_name" modelaction="query"/>
        <a:link id="get_exchange_rate_link_id" model="csh.CSH511.csh_transaction_get_exchange_rate" modelaction="query"/>
        <a:link id="con_doc_batch_create_link_id" url="${/request/@context_path}/modules/cont/CON500/con_doc_batch_create.lsc"/>
        <a:link id="con_doc_batch_create_job_link_id" url="${/request/@context_path}/modules/csh/CSH502/csh_atm_batch_download_pdf_job.lsc"/>
        <a:link id="csh_atm_batch_download_pdf_link_id" url="${/request/@context_path}/modules/csh/CSH502/csh_atm_batch_download_pdf.lsc"/>
33
        <script src="${/request/@context_path}/javascripts/calculate.js" type="text/javascript"/>
Spencer Chang's avatar
Spencer Chang committed
34
        <script type="text/javascript"><![CDATA[
stone's avatar
stone committed
35

Spencer Chang's avatar
Spencer Chang committed
36 37 38 39 40 41 42 43 44 45
            function csh502_pay_lock_window() {
                Leaf.Masker.mask($('${/parameter/@winid}').wrap, '${l:HLS.EXECUTING}');
            }
            
            function csh502_pay_unlock_window() {
                Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
            }
            
            function csh502_payment_pay_submit() {
                var record = $('csh_payment_req_pay_ds').getCurrentRecord();
46 47 48 49 50
                var check_flag=true;
                var this_pay_agent_amount=record.get('this_pay_agent_amount');
                var this_pay_vender_amount=record.get('this_pay_vender_amount');
                var residual_agent_amount=record.get('residual_agent_amount');
                var residual_vender_amount=record.get('residual_vender_amount');
stone's avatar
stone committed
51
                var bank_account_num=record.get('bank_account_num');
52
                var pay_amount=plus(this_pay_agent_amount,this_pay_vender_amount);
stone's avatar
stone committed
53
                var identify_category='';
stone's avatar
stone committed
54 55 56 57
                if(!bank_account_num){
                    $L.showErrorMessage("提示",'请维护银行信息!');
                    return;
                }
stone's avatar
stone committed
58 59 60 61 62
                if(this_pay_agent_amount!=0&&this_pay_vender_amount!=0){
                    $L.showErrorMessage("提示",'每个只能选择代理店,厂商中的其中一个进行支付');
                    return;
                }
                if(this_pay_agent_amount==0&&this_pay_vender_amount==0){
stone's avatar
stone committed
63
                    $L.showErrorMessage("提示",'付款金额不能为0!');
stone's avatar
stone committed
64 65 66
                    return;
                }

67 68 69 70 71 72 73 74
                record.set('transaction_amount', pay_amount);
                //检验手动输入的金额必须小于应付金额
                if((this_pay_agent_amount>residual_agent_amount)||(this_pay_vender_amount>residual_vender_amount)){
                    $L.showErrorMessage("提示",'本次付代理店金额,厂商金额不能超过未付金额!');
                    check_flag=false;
                }

                if (record.validateRecord(true)&&check_flag){
stone's avatar
stone committed
75

Spencer Chang's avatar
Spencer Chang committed
76
                    ajax_flag = 'Y';
stone's avatar
stone committed
77
                    //锁屏
Spencer Chang's avatar
Spencer Chang committed
78 79 80 81
                    csh502_pay_lock_window();
                    var param = record.data;
                    var saveData = [];
                    var pre_line_records = $('${/parameter/@lnds_id}').getSelected();
stone's avatar
stone committed
82

Spencer Chang's avatar
Spencer Chang committed
83 84
                    for (var i = 0;i < pre_line_records.length;i++) {
                        var pre_line_record = pre_line_records[i];
stone's avatar
stone committed
85 86 87 88 89 90 91 92 93 94
                        //由于每次只有代理店或者厂商进行付款,进行判断,银行账号取金额不为0的付款对象,默认为代理店

                        if(this_pay_vender_amount>0) {
                            var agent_bank_account=pre_line_record.get('vender_bank_account_id');
                            pre_line_record.set('bp_bank_account_id',agent_bank_account);
                            identify_category='VENDER';
                        }else{
                            pre_line_record.set('bp_category','AGENT');
                            identify_category='AGENT';
                        }
Spencer Chang's avatar
Spencer Chang committed
95 96 97
                        pre_line_record.set('_status', 'insert');
                        pre_line_record.set('type', 'PAYMENT_REQ_PAYMENT');
                        pre_line_record.set('id', pre_line_record.get('payment_req_ln_id'));
98 99 100 101 102 103 104 105 106 107 108 109 110 111
                        pre_line_record.set('amt', pay_amount);
                        pre_line_record.set('transaction_date', record.get('transaction_date'));
                        pre_line_record.set('internal_period_num', record.get('internal_period_num'));
                        pre_line_record.set('period_name', record.get('period_name'));
                        pre_line_record.set('exchange_rate', record.get('exchange_rate'));
                        pre_line_record.set('payment_description', record.get('payment_description'));
                        pre_line_record.set('cashflow_id', record.get('cashflow_id'));
                        pre_line_record.set('bank_slip_num', record.get('bank_slip_num'));
                        pre_line_record.set('payment_method_id', record.get('payment_method_id'));
                        pre_line_record.set('merge_flag', record.get('merge_flag'));
                        pre_line_record.set('this_pay_agent_amount',this_pay_agent_amount );
                        pre_line_record.set('this_pay_vender_amount',this_pay_vender_amount );
                        pre_line_record.set('bank_flag','Y' );
                        //付款行临时表
Spencer Chang's avatar
Spencer Chang committed
112 113 114 115 116
                        saveData.push(pre_line_record.data);
                    }
                    param['payment_req_id'] = pre_line_records[0].get('payment_req_id');
                    param['payment_req_ln_id'] = pre_line_records[0].get('payment_req_ln_id');
                    param['merge_flag'] = 'N';
stone's avatar
stone committed
117
                    param['bp_category'] =identify_category;
Spencer Chang's avatar
Spencer Chang committed
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 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393
                    param['details'] = saveData;
                    Leaf.showConfirm('${l:PROMPT_MESSAGE}', '确定提交?', function okFun() {
                        Leaf.request({
                            url: $('csh_payment_req_pay_link_id').getUrl(),
                            para: param,
                            success: function(res) {
                                Leaf.SideBar.show({
                                    msg: '${l:HLS.SUBMIT_SUCCESS}',
                                    duration: 2000
                                });
                                csh502_pay_unlock_window();
                                csh502_payment_pay_back();
                            },
                            failure: function() {
                                csh502_pay_unlock_window();
                            },
                            error: function() {
                                csh502_pay_unlock_window();
                            },
                            scope: this
                        });
                    }, function cacelFun() {
                        csh502_pay_unlock_window();
                    });
            
                }
            }
            
            function csh502_create_pdf1() {
                lock_current_window();
                Leaf.request({
                    url: $('csh_payment_content_link_id').getUrl(),
                    para: {
                        contract_id: '${/parameter/@contract_id}'
                    },
                    success: function(res) {
                        unlock_current_window();
                    },
                    error: function() {
                        unlock_current_window();
                    },
                    failure: function() {
                        unlock_current_window();
                    },
                    scope: this
                });
            }
            
            function csh502_create_pdf2() {
                lock_current_window();
                Leaf.request({
                    url: $('con_doc_batch_create_job_link_id').getUrl(),
                    para: {
                        contract_id: '${/parameter/@contract_id}',
                        file_path: '${/parameter/@file_path}',
                        batch_flag: 'Y'
                    },
                    success: function(res) {
                        Leaf.SideBar.enable = true;
                        Leaf.SideBar.show({
                            msg: '生成完毕',
                            duration: 2000
                        });
                        unlock_current_window();
                    },
                    error: function() {
                        unlock_current_window();
                    },
                    failure: function() {
                        unlock_current_window();
                    },
                    scope: this
                });
            }
            
            function csh502_create_pdf3() {
                lock_current_window();
                Leaf.request({
                    url: $('csh_payment_content_link_id').getUrl(),
                    para: {
                        contract_id: '${/parameter/@contract_id}'
                    },
                    success: function(res) {
                        // Leaf.request({
                        // url: $('con_doc_batch_create_link_id').getUrl(),
                        // para: {
                        // contract_id: '${/parameter/@contract_id}',
                        // file_path: '${/parameter/@file_path}',
                        // batch_flag: 'Y'
                        // },
                        // success: function(res) {
                        // Leaf.request({
                        // url: $('csh_atm_batch_download_pdf_link_id').getUrl(),
                        // para: {
                        // contract_id: '${/parameter/@contract_id}'
                        // },
                        // success: function(res) {
                        // Leaf.SideBar.enable = true;
                        // Leaf.SideBar.show({
                        // msg: '生成完毕',
                        // duration: 2000
                        // });
                        // unlock_current_window();
                        // },
                        // error: function() {
                        // unlock_current_window();
                        // },
                        // failure: function() {
                        // unlock_current_window();
                        // },
                        // scope: this
                        // });
                        // },
                        // error: function() {
                        // unlock_current_window();
                        // },
                        // failure: function() {
                        // unlock_current_window();
                        // },
                        // scope: this
                        // });
                        Leaf.request({
                            url: $('con_doc_batch_create_job_link_id').getUrl(),
                            para: {
                                contract_id: '${/parameter/@contract_id}',
                                file_path: '${/parameter/@file_path}',
                                batch_flag: 'Y'
                            },
                            success: function(res) {
                                Leaf.SideBar.enable = true;
                                Leaf.SideBar.show({
                                    msg: '生成完毕',
                                    duration: 2000
                                });
                                unlock_current_window();
                            },
                            error: function() {
                                unlock_current_window();
                            },
                            failure: function() {
                                unlock_current_window();
                            },
                            scope: this
                        });
                    },
                    error: function() {
                        unlock_current_window();
                    },
                    failure: function() {
                        unlock_current_window();
                    },
                    scope: this
                });
            }
            
            function csh502_payment_pay_bpm_submit() {
                var record = $('csh_payment_req_pay_ds').getCurrentRecord();
                if (record.validateRecord(true)) {
                    ajax_flag = 'Y';
                    csh502_pay_lock_window();
                    var param = record.data;
                    var saveData = [];
                    var pre_line_records = $('${/parameter/@lnds_id}').getSelected();
                    for (var i = 0;i < pre_line_records.length;i++) {
                        var pre_line_record = pre_line_records[i];
                        pre_line_record.set('_status', 'insert');
                        pre_line_record.set('type', 'PAYMENT_REQ_PAYMENT');
                        pre_line_record.set('id', pre_line_record.get('payment_req_ln_id'));
                        pre_line_record.set('amt', pre_line_record.get('pay_amount') || 0);
                        saveData.push(pre_line_record.data);
                    }
                    param['payment_req_id'] = pre_line_records[0].get('payment_req_id');
                    param['payment_req_ln_id'] = pre_line_records[0].get('payment_req_ln_id');
                    param['merge_flag'] = 'N';
                    param['details'] = saveData;
                    Leaf.showConfirm('${l:PROMPT_MESSAGE}', '确定提交?', function okFun() {
                        Leaf.request({
                            url: $('csh_payment_req_pay_bpm_link_id').getUrl(),
                            para: param,
                            success: function(res) {
                                Leaf.SideBar.show({
                                    msg: '${l:HLS.SUBMIT_SUCCESS}',
                                    duration: 2000
                                });
                                csh502_pay_unlock_window();
                                csh502_payment_pay_back();
                            },
                            failure: function() {
                                csh502_pay_unlock_window();
                            },
                            error: function() {
                                csh502_pay_unlock_window();
                            },
                            scope: this
                        });
                    }, function cacelFun() {
                        csh502_pay_unlock_window();
                    });
            
                }
            }
            
            function csh502_payment_pay_back() {
                $('${/parameter/@winid}').close();
            }
            
            function csh502_payment_pay_reset() {
                $('csh_payment_req_pay_ln_ds').setQueryParameter('payment_req_id', '${/parameter/@payment_req_id}');
                $('csh_payment_req_pay_ln_ds').query();
                //load_complete();
            }
            
            function execute_exchange_rate_type(ds) {
                var record = ds.getCurrentRecord();
                record.getField('bp_bank_account_code').setLovPara('bp_id', record.get('bp_id'));
                var value = record.get('currency_code');
                var functional_currency_code = '${/model/default_exchange_rate_type_path/record/@functional_currency_code}';
                record.getField('bank_account_code').setLovPara('currency_code', value);
                record.set('functional_currency_code', functional_currency_code);
                record.set('exchange_rate', '');
                record.set('exchange_rate_type', '');
                record.set('rate_method_code', '');
                record.set('exchange_rate_type_display', '');
                record.set('exchange_rate_quotation', '');
                if (value == functional_currency_code) {
                    record.getField('exchange_rate_type_display').setRequired(false);
                    record.getField('exchange_rate_type').setReadOnly(true);
                    record.getField('exchange_rate_type_display').setReadOnly(true);
                    record.getField('exchange_rate').setReadOnly(true);
                    record.set('exchange_rate', 1);
                } else {
                    record.set('exchange_rate_type', '${/model/fnd_financial_option_path/record/@default_exchange_rate_type}');
                    record.set('rate_method_code', '${/model/fnd_financial_option_path/record/@rate_method_code}');
                    record.set('exchange_rate_type_display', '${/model/fnd_financial_option_path/record/@exchange_rate_type_display}');
                    record.getField('exchange_rate_type_display').setRequired(true);
                    record.getField('exchange_rate_type_display').setReadOnly(false);
                }
            }
            
            function on_csh_payment_req_pay_ds_add(ds) {
                var pre_ln_ds = $('${/parameter/@lnds_id}'),
                    pre_hd_ds = $('${/parameter/@hdds_id}');
                var current_bp_bank_account_id = '';
                var pre_ln_records = pre_ln_ds.getSelected();
                var pre_hd_record = pre_hd_ds.getCurrentRecord();
                var current_record = ds.getCurrentRecord();
                var sum_pay_amount = 0;
                var sum_residual_amount = 0;
                for (var i = 0;i < pre_ln_records.length;i++) {
                    var pre_ln_record = pre_ln_records[i];
                    sum_pay_amount = plus(sum_pay_amount, pre_ln_record.get('pay_amount') || 0);
                    sum_residual_amount = plus(sum_residual_amount, pre_ln_record.get('residual_amount') || 0);
                    if (!current_bp_bank_account_id && pre_ln_record.get('bp_bank_account_id')) {
                        current_bp_bank_account_id = pre_ln_record.get('bp_bank_account_id');
                    }
                    if (current_bp_bank_account_id && pre_ln_record.get('bp_bank_account_id') && current_bp_bank_account_id != pre_ln_record.get('bp_bank_account_id')) {
                        current_record.getField('bp_bank_account_code').setReadOnly(true);
                    }
                }
                current_record.set('transaction_amount', sum_pay_amount);
                current_record.set('residual_amount', sum_residual_amount);
                current_record.set('bp_id', pre_ln_records[0].get('bp_id'));
                current_record.set('bp_name', pre_ln_records[0].get('bp_name'));
                current_record.set('functional_currency_code', '${/model/default_exchange_rate_type_path/record/@functional_currency_code}');
                current_record.set('currency_code', pre_ln_records[0].get('currency_code'));
                current_record.set('currency_name', pre_ln_records[0].get('currency_name')); /* current_record.set('transaction_date', pre_hd_record.get('req_date'));  modified by Harry 9952 2017/1/23 */
                if (!'${/parameter/@loan_date}') {
                    var date = new Date();
                    current_record.set('transaction_date', Leaf.formatDate(date));
                }
                execute_exchange_rate_type(ds);
            }
            
            
            function on_csh_payment_req_pay_ds_update(ds, record, name, value, oldvalue) {
                var handling_charge = record.get('handling_charge');
394
             /*   console.log(record);*/
Spencer Chang's avatar
Spencer Chang committed
395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
                if (Ext.isEmpty(handling_charge)) {
                    handling_charge = 0;
                }
                if (name == 'currency_code') {
                    if (value != oldvalue) {
                        record.set('exchange_rate', '');
                        record.set('exchange_rate_type', '');
                        record.set('rate_method_code', '');
                        record.set('exchange_rate_type_display', '');
                        record.set('exchange_rate_quotation', '');
                        if (oldvalue != null && oldvalue != '') {
                            record.set('transaction_amount', '');
                            record.set('transaction_functional_amount', '');
                            record.set('handling_charge', '');
                        }
                    }
                    if (value == record.get('functional_currency_code')) {
                        record.getField('exchange_rate_type_display').setRequired(false);
                        record.getField('exchange_rate_type').setReadOnly(true);
                        record.getField('exchange_rate_type_display').setReadOnly(true);
                        record.getField('exchange_rate').setReadOnly(true);
                        record.set('exchange_rate', 1);
                    } else {
                        record.set('exchange_rate_type', '${/model/fnd_financial_option_path/record/@default_exchange_rate_type}');
                        record.set('rate_method_code', '${/model/fnd_financial_option_path/record/@rate_method_code}');
                        record.set('exchange_rate_type_display', '${/model/fnd_financial_option_path/record/@exchange_rate_type_display}');
                        record.getField('exchange_rate_type_display').setRequired(true);
                        record.getField('exchange_rate_type_display').setReadOnly(false);
                    }
                } else if (name == 'rate_method_code') {
                    record.set('exchange_rate_quotation', '');
426
                    record.set('exchange_rate', '1');
Spencer Chang's avatar
Spencer Chang committed
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447
            
                    if (value == 'PERIOD' || value == 'DAILY' || value == 'FIXED') {
                        record.getField('exchange_rate').setReadOnly(true);
                        record.set('exchange_rate', '');
                        getExchangeRate({
                            fromCur: record.get('functional_currency_code'),
                            toCur: record.get('currency_code'),
                            exchangeRateType: record.get('exchange_rate_type'),
                            exchangeDate: record.get('transaction_date'),
                            periodName: record.get('period_name')
                        });
                    } else {
                        record.getField('exchange_rate').setReadOnly(false);
                        record.set('exchange_rate', '');
                    }
                } else if (name == 'exchange_rate') {
                    if (record.get('exchange_rate') != null && record.get('exchange_rate') != '') {
                        setfunctionamount(record);
                    } else {
                        record.set('transaction_functional_amount', '');
                    }
stone's avatar
stone committed
448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463
                }else if(name=='this_pay_agent_amount'||name=='this_pay_vender_amount'){

                   var agent_amount= record.get('this_pay_agent_amount');
                   var  vender_amount= record.get('this_pay_vender_amount');
                   if(agent_amount&&vender_amount){
                       $('csh_payment_req_pay_ds').getAt(0).set('transaction_amount',agent_amount+vender_amount)
                   }else if(agent_amount){
                       $('csh_payment_req_pay_ds').getAt(0).set('transaction_amount',agent_amount)
                   }else if(vender_amount){
                       $('csh_payment_req_pay_ds').getAt(0).set('transaction_amount',vender_amount)
                   }else{
                       $('csh_payment_req_pay_ds').getAt(0).set('transaction_amount',0)
                   }



Spencer Chang's avatar
Spencer Chang committed
464 465 466 467 468 469 470 471 472
                } else if (name == 'handling_charge') {
                    if (value === 0 && record.get('zero_amounts_allowed') == 'N') {
                        Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
                    }
                    if (record.get('currency_code') == record.get('functional_currency_code')) {
                        record.set('transaction_functional_amount', value + record.get('transaction_amount'));
                    } else {
                        setfunctionamount(record);
                    }
473
                } /*else if (name == 'transaction_amount') {
Spencer Chang's avatar
Spencer Chang committed
474 475 476 477 478 479 480 481
                    if (value === 0 && record.get('zero_amounts_allowed') == 'N') {
                        Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
                    }
                    if (record.get('currency_code') == record.get('functional_currency_code')) {
                        record.set('transaction_functional_amount', value + handling_charge);
                    } else {
                        setfunctionamount(record);
                    }
482
                } */else if (name == 'transaction_date') {
Spencer Chang's avatar
Spencer Chang committed
483
                    showPeriod(record);
484 485 486 487 488 489 490 491 492 493 494 495 496 497
                }/*else if(name='this_pay_agent_amount'&&value){
                    if(record.get('this_pay_vender_amount')){

                    }

                }*//*else if(name='this_pay_vender_amount'){
                    var agent_amount=record.get('this_pay_agent_amount');
                    alert(agent_amount);
                    if(agent_amount){
                        alert(value+agent_amount)
                        record.set('transaction_amount',value+agent_amount);
                    }

                }*/ else if (name == 'precision') {
Spencer Chang's avatar
Spencer Chang committed
498 499 500 501 502 503
                    record.getField('transaction_amount').setPropertity('decimalprecision', value);
                    record.getField('transaction_functional_amount').setPropertity('decimalprecision', value);
                    record.getField('handling_charge').setPropertity('decimalprecision', value);
                    if (record.get('transaction_amount') || record.get('transaction_amount') == 0 || record.get('handling_charge')) {
                        setfunctionamount(record);
                    }
stone's avatar
stone committed
504 505
                } /*else if (name == 'bank_account_id') {

Spencer Chang's avatar
Spencer Chang committed
506 507 508
                    if (record.get('zero_amounts_allowed') == 'N' && record.get('transaction_amount') === 0) {
                        Leaf.showMessage('${l:PROMPT}', '${l:CSH510.ZERO_AMOUNTS_ALLOWED}');
                    }
stone's avatar
stone committed
509
                }*/
Spencer Chang's avatar
Spencer Chang committed
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597
            }
            
            function showPeriod(record) {
                var r_date = record.get('transaction_date');
                r_date = Leaf.formatDate(r_date);
                Leaf.request({
                    url: $('get_period_name_id').getUrl(),
                    para: {
                        p_date: r_date
                    },
                    success: function(res) {
                        if (res) {
                            var period_name = res.result.record.period_name,
                                internal_period_num = res.result.record.internal_period_num;
                            if (period_name) {
                                record.set('period_name', period_name);
                                record.set('internal_period_num', internal_period_num);
                            } else {
                                record.set('period_name', '');
                                record.set('internal_period_num', '');
                            }
                        }
                    },
                    scope: this
                });
            }
            
            function getExchangeRate(param) {
            
                Leaf.request({
                    url: $('get_exchange_rate_link_id').getUrl(),
                    para: {
                        from_currency: param.fromCur,
                        to_currency: param.toCur,
                        exchange_date: param.exchangeDate,
                        exchange_period_name: param.periodName,
                        exchange_rate_type: param.exchangeRateType
                    },
                    success: setRateAndQuotation,
                    scope: this
                });
            }
            
            function setRateAndQuotation(res) {
                var record = $('csh_payment_req_pay_ds').getCurrentRecord();
                if (Ext.isDefined(res.result.record.exchange_rate)) {
                    record.set('exchange_rate', res.result.record.exchange_rate);
                }
                if (Ext.isDefined(res.result.record.exchange_rate_quotation)) {
                    record.set('exchange_rate_quotation', res.result.record.exchange_rate_quotation);
                } else {
                    record.set('exchange_rate_quotation', 'DIRECT QUOTATION');
                }
            }
            
            function setfunctionamount(record) {
                var quotation = record.get('exchange_rate_quotation');
                var a = record.get('transaction_amount');
                var b = record.get('exchange_rate');
                var c = record.get('handling_charge');
                if (Ext.isEmpty(c)) {
                    c = 0;
                }
                a = a + c;
                if (Ext.isDefined(a) && Ext.isDefined(b)) {
                    if (quotation == 'DIRECT QUOTATION') {
                        record.set('transaction_functional_amount', parseFloat((a / b).toFixed(record.get('precision') || 2)));
                    } else {
                        record.set('transaction_functional_amount', parseFloat((a * b).toFixed(record.get('precision') || 2)));
                    }
                }
            }
            
            function lock_current_window() {
                Leaf.Masker.mask($('${/parameter/@winid}').wrap, '${l:HLS.EXECUTING}');
            }
            
            function unlock_current_window() {
                Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
            }
            
            Leaf.onReady(function() {
                //
                // if ('${/parameter/@first_repayment_flag}' == 'Y') {
                // ds.getField('first_payment_date').setRequired(true);
                // } else {
                // ds.getField('first_payment_date').setRequired(false);
                // }
598
               /*console.log('${/parameter}');*/
stone's avatar
stone committed
599
               // var lnds='${/parameter/@lnds_id}';
stone's avatar
stone committed
600 601 602 603 604 605 606 607 608 609 610 611 612 613 614
                //根据前面的是代理店还是厂商,来判断此次可以手动输入的是代理店还是厂商
                var pre_line_records = $('${/parameter/@lnds_id}').getSelected();
                var pre_line_record=pre_line_records[0];
                //代理店不为空
                if(pre_line_record.get('bp_bank_account_id')==undefined){
                     $('agent_num').hide();
                     $('agent_id').hide();
                     $('bank_account_ds').hideColumn('this_pay_agent_amount');
                }
                if(pre_line_record.get('vender_bank_account_id')==undefined){
                    $('vender_id').hide();
                    $('vender_num').hide();
                    $('bank_account_ds').hideColumn('this_pay_vender_amount');
                }

Spencer Chang's avatar
Spencer Chang committed
615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697
                var date = new Date();
                if ('${/parameter/@loan_date}') {
                    r_date = (('${/parameter/@loan_date}').match(/\d{4}.\d{1,2}.\d{1,2}/mg).toString()).replace(/[^0-9]/mg, '-');
                } else {
                    r_date = ((Leaf.formatDate(date)).match(/\d{4}.\d{1,2}.\d{1,2}/mg).toString()).replace(/[^0-9]/mg, '-');
                }
                Leaf.request({
                    url: $('get_period_name_id').getUrl(),
                    para: {
                        p_date: r_date
                    },
                    success: function(res) {
                        if (res) {

                            var ds = $('csh_payment_req_pay_ds');
                            var record = ds.getAll();
                            var period_name = res.result.record.period_name,
                                internal_period_num = res.result.record.internal_period_num;
                            if (period_name) {
                                record[0].set('period_name', period_name);
                                record[0].set('internal_period_num', internal_period_num);
                            } else {
                                record[0].set('period_name', '');
                                record[0].set('internal_period_num', '');
                            }
                        }
                    },
                    scope: this
                });
            
            });
            
            function rendererDay(cell, date, text, currentMonth) {
                //
                var today = new Date();
                if (date.getDate() != '5' && date.getDate() != '10' && date.getDate() != '15' && date.getDate() != '20' && date.getDate() != '25' && date.getDate() != '30') {
                    cell.disabled = 'true';
                }
                return text;
            }
            
            // function rendererDay(cell, date, text, currentMonth) {
            // var today = new Date();
            // if (date < new Date(today.getFullYear(), today.getMonth(), today.getDate())) {
            // cell.disabled = true;
            // }
            // return text;
            // }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="payment_method_ds">
                <a:datas dataSource="/model/payment_method_path"/>
            </a:dataSet>
            <a:dataSet id="exchangerate_type_ds">
                <a:datas dataSource="/model/exchangerate_type_path"/>
            </a:dataSet>
            <a:dataSet id="csh_payment_req_pay_ds" autoCreate="true">
                <a:fields>
                    <!-- <a:field name="branch_code" defaultValue="${/parameter/@branch_code}" required="true"/> -->
                    <a:field name="city_code" defaultValue="${/model/branch_init_ds/record/@city_code}"/>
                    <a:field name="branch_code" defaultValue="${/model/branch_init_ds/record/@branch_code}"/>
                    <a:field name="bank_name" defaultValue="${/model/branch_init_ds/record/@bank_name}"/>
                    <a:field name="bank_full_name" defaultValue="${/model/branch_init_ds/record/@branch_name}" lovGridHeight="300" lovHeight="500" lovService="csh.CSH502.hls_sap_branch_lov" lovWidth="530" title="支行">
                        <a:mapping>
                            <a:map from="city_code" to="city_code"/>
                            <a:map from="branch_code" to="branch_code"/>
                            <a:map from="bank_name" to="bank_name"/>
                            <a:map from="branch_name" to="bank_full_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="bp_code" lovGridHeight="300" lovHeight="500" lovService="csh.CSH501.csh_payment_bp_for_lov?bp_id=${/model/payment_req_selected/record/@tenant_bp_id}" lovWidth="530" required="false" title="CSH502.CSH_PAYMENT_OBJ">
                        <a:mapping>
                            <a:map from="bp_code" to="bp_code"/>
                            <a:map from="bp_name" to="bp_name"/>
                            <a:map from="bp_id" to="bp_id"/>
                            <a:map from="bp_category" to="bp_category"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="exchange_rate_type_display" displayField="type_name" options="exchangerate_type_ds" readOnly="false" returnField="exchange_rate_type" valueField="type_code">
                        <a:mapping>
                            <a:map from="type_code" to="exchange_rate_type"/>
                            <a:map from="rate_method_code" to="rate_method_code"/>
                        </a:mapping>
698 699 700
                    </a:field>
                    <a:field name="this_pay_agent_amount">

Spencer Chang's avatar
Spencer Chang committed
701 702 703 704 705
                    </a:field>
                    <a:field name="transaction_date" defaultValue="${/parameter/@loan_date}" required="true"/>
                    <a:field name="exchange_rate_type"/>
                    <a:field name="exchange_rate" readOnly="true" required="false"/>
                    <a:field name="rate_method_code"/>
stone's avatar
stone committed
706
                    <a:field name="transaction_amount" readOnly="true"/>
Spencer Chang's avatar
Spencer Chang committed
707 708 709 710 711
                    <a:field name="transaction_functional_amount" readOnly="true" required="true"/>
                    <a:field name="precision" defaultValue="2"/>
                    <a:field name="zero_amounts_allowed" defaultValue="N"/>
                    <a:field name="currency_code" defaultValue="CNY"/>
                    <a:field name="currency_name" defaultValue="人民币"/>
712
                    <a:field name="bank_account_id"/>
Spencer Chang's avatar
Spencer Chang committed
713
                    <a:field name="bank_account_name"/>
714
                    <a:field name="bank_account_num" autoComplete="true" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="csh.CSH101.csh_bank_account_lov" lovWidth="850" required="true" title="CSH511.BANK_ACCOUNT_CODE">
Spencer Chang's avatar
Spencer Chang committed
715 716 717 718 719
                        <a:mapping>
                            <a:map from="precision" to="precision"/>
                            <a:map from="zero_amounts_allowed" to="zero_amounts_allowed"/>
                            <a:map from="bank_account_id" to="bank_account_id"/>
                            <a:map from="bank_account_num" to="bank_account_num"/>
720
                            <a:map from="bank_account_id" to="bank_account_id"/>
Spencer Chang's avatar
Spencer Chang committed
721 722 723 724
                            <a:map from="bank_account_name" to="bank_account_name"/>
                            <a:map from="bank_account_code" to="bank_account_code"/>
                            <a:map from="currency_code" to="currency_code"/>
                            <a:map from="currency_name" to="currency_name"/>
725
                            <a:map from="bank_branch_name" to="bank_branch_name"/>
Spencer Chang's avatar
Spencer Chang committed
726 727
                        </a:mapping>
                    </a:field>
stone's avatar
stone committed
728
                   <!-- <a:field name="bp_bank_account_code" autoComplete="true" autoCompleteField="bank_account_num" lovGridHeight="350" lovHeight="550" lovLabelWidth="90" lovService="basic.hls_bp_master_bank_account_v_for_lov?enabled_flag=Y&amp;bp_enabled_flag=Y" lovWidth="580" title="CSH511.BANK_ACCOUNT_CODE">
Spencer Chang's avatar
Spencer Chang committed
729 730 731 732 733 734
                        <a:mapping>
                            <a:map from="bank_account_id" to="bp_bank_account_id"/>
                            <a:map from="bank_account_num" to="bp_bank_account_num"/>
                            <a:map from="bank_account_name" to="bp_bank_account_name"/>
                            <a:map from="bank_account_code" to="bp_bank_account_code"/>
                        </a:mapping>
stone's avatar
stone committed
735
                    </a:field>-->
Spencer Chang's avatar
Spencer Chang committed
736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759
                    <a:field name="payment_method_display" defaultValue="银行转账" displayField="description" options="payment_method_ds" returnField="payment_method_id" valueField="payment_method_id"/>
                    <a:field name="payment_method_id" defaultValue="10"/>
                    <a:field name="payment_req_id" defaultValue="${/parameter/@payment_req_id}"/>
                    <!-- <a:field name="first_contract_day" readOnly="true" defaultValue="${/parameter/@first_contract_day}"/> -->
                    <a:field name="period_name"/>
                    <!-- <a:field name="first_payment_date" required="false"/> -->
                </a:fields>
                <a:events>
                    <a:event name="add" handler="on_csh_payment_req_pay_ds_add"/>
                    <a:event name="update" handler="on_csh_payment_req_pay_ds_update"/>
                    <!-- <a:event name="load" handler="on_csh_payment_req_pay_ds_load" /> -->
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <!-- <a:gridButton click="csh502_payment_pay_bpm_submit" text="BPM付款"/> -->
                <a:gridButton click="csh502_payment_pay_back" text="HLS.BACK"/>
                <a:gridButton click="csh502_payment_pay_submit" text="CSH502.CSH_PAY"/>
                <!--                 <a:gridButton click="csh502_create_pdf1" text="pdf测试1"/>
                <a:gridButton click="csh502_create_pdf2" text="pdf测试2"/>
                <a:gridButton click="csh502_create_pdf3" text="pdf测试3"/> -->
                <!-- <a:gridButton click="csh502_payment_pay_reset" text="HLS.RESET"/> -->
            </a:screenTopToolbar>
760
            <a:form labelWidth="180" title="CSH502.CSH_PAYMENT_REQ_PAY">
Spencer Chang's avatar
Spencer Chang committed
761
                <a:box column="4">
762
                  <!--  <a:textField name="bp_name" bindTarget="csh_payment_req_pay_ds" prompt="CSH501.CSH_PAYMENT_OBJ_NAME" readOnly="true" width="150"/>-->
stone's avatar
stone committed
763 764 765 766
                    <a:textField id="agent_num" name="bp_bank_account_name" bindTarget="csh_payment_req_pay_ds" prompt="付款代理商对象" readOnly="true" width="150"/>
                    <a:textField  id="agent_id" name="bp_bank_account_num" bindTarget="csh_payment_req_pay_ds" prompt="付款代理商账号" readOnly="true" width="150"/>
                    <a:textField id="vender_id" name="vender_bank_account_id" bindTarget="csh_payment_req_pay_ds" prompt="付款厂商对象" readOnly="true" width="150"/>
                    <a:textField id="vender_num" name="vender_bank_account_num" bindTarget="csh_payment_req_pay_ds" prompt="付款厂商账号" readOnly="true" width="150"/>
767 768 769 770
                </a:box>
                <a:box column="4">
                    <a:textField name="contract_number" bindTarget="csh_payment_req_pay_ds" prompt="合同编号" readOnly="true" width="150"/>
                    <a:textField name="cf_description" bindTarget="csh_payment_req_pay_ds" prompt="应付项目" readOnly="true" width="150"/>
stone's avatar
stone committed
771 772
                    <a:numberField name="residual_agent_amount" bindTarget="csh_payment_req_pay_ds" prompt="未付代理店金额" readOnly="true" width="150" renderer="Leaf.formatMoney"/>
                    <a:numberField name="residual_vender_amount" bindTarget="csh_payment_req_pay_ds" prompt="未付厂商金额" readOnly="true" width="150" renderer="Leaf.formatMoney"/>
773 774 775 776
<!--                    <a:numberField name="amount_paid" bindTarget="csh_payment_req_pay_ds" prompt="本次付款金额" readOnly="true" width="150" renderer="Leaf.formatMoney"/>-->
               </a:box>
                <a:box column="2">
                    <a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="本次付款金额" width="150"/>
stone's avatar
stone committed
777
                    <a:textField name="period_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.ACCOUNT_PERIOD_NAME" readOnly="true"/>
778 779 780 781 782 783 784 785 786 787 788 789 790
                    <a:datePicker name="transaction_date" bindTarget="csh_payment_req_pay_ds" prompt="CSH502.CSH_PAY_DATE" width="150"/>
                </a:box>
                   <!-- <a:box column="4">
                        <a:lov name="bp_bank_account_code" bindTarget="csh_payment_req_pay_ds" prompt="对方账户"/>
                        <a:textField name="bp_bank_account_num" bindTarget="csh_payment_req_pay_ds" prompt="对方账号" readOnly="true"/>
                       &lt;!&ndash; <a:lov name="bank_account_code" bindTarget="csh_payment_req_pay_ds" prompt="付款账户" width="150"/>
                        <a:textField name="bank_account_num" bindTarget="csh_payment_req_pay_ds" prompt="HLS.BANK_ACCOUNT_NUM" readOnly="true" width="150"/>&ndash;&gt;
                        &lt;!&ndash; <a:textField name="bank_account_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.BANK_ACCOUNT_NAME" readOnly="true" width="428"/> &ndash;&gt;
                    </a:box>-->

                    <a:box column="1">
                        <a:textField name="payment_description" bindTarget="csh_payment_req_pay_ds" prompt="HLS.COMMENT" width="849"/>
                    </a:box>
Spencer Chang's avatar
Spencer Chang committed
791 792 793 794 795 796 797
                    <!-- <a:textField name="cf_description" bindTarget="csh_payment_req_pay_ds" prompt="CSH501.CSH_PAYMENT_PRJ" readOnly="true" width="150"/> -->
                    <!-- <a:numberField name="residual_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="CSH501.CSH_RESIDUAL_AMOUNT" readOnly="true" width="150"/>-->
                    <!-- <a:textField name="currency_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.CURRENCY" readOnly="true" width="150"/> -->
                    <!-- <a:textField name="branch_code" bindTarget="csh_payment_req_pay_ds" prompt="SAP支行编号" readOnly="true" width="150"/> -->
                    <!-- <a:comboBox name="exchange_rate_type_display" bindTarget="csh_payment_req_pay_ds" prompt="HLS.EXCHANGE_RATE_TYPE_DESC" width="150"/> -->
                    <!-- <a:numberField name="due_amount" bindTarget="csh_payment_req_pay_ds" prompt="CSH502.CSH_PAYMENT_AMOUNT" readOnly="true" width="150"/>
                    <a:datePicker name="due_date" bindTarget="csh_payment_req_pay_ds" prompt="CSH501.CSH_DUE_DATE" readOnly="true" width="150"/> -->
798 799 800 801

                <!-- <a:numberField name="handling_charge" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="HLS.HANDLING_CHARGE" width="150"/> -->
                 <!--   <a:numberField name="transaction_functional_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="HLS.FUNCTIONAL_AMOUNT" readOnly="true" width="150"/>
                    &lt;!&ndash; <a:comboBox name="exchange_rate_type_display" bindTarget="csh_payment_req_pay_ds" prompt="HLS.EXCHANGE_RATE_TYPE_DESC" width="150"/> &ndash;&gt;
Spencer Chang's avatar
Spencer Chang committed
802
                    <a:textField name="bank_slip_num" bindTarget="csh_payment_req_pay_ds" prompt="CSH511.CSH_TRANSACTION.BANK_SLIP_NUM"/>
803 804


Spencer Chang's avatar
Spencer Chang committed
805 806 807 808 809 810 811 812 813 814
                <a:box column="4">
                    <a:textField name="bp_bank_account_name" bindTarget="csh_payment_req_pay_ds" prompt="对方账户名" readOnly="true" width="382"/>
                    <a:textField name="bank_account_name" bindTarget="csh_payment_req_pay_ds" prompt="HLS.BANK_ACCOUNT_NAME" readOnly="true" width="382"/>
                </a:box>
                <a:box column="4">
                    <a:textField name="bank_branch_name" bindTarget="csh_payment_req_pay_ds" prompt="银行分行名称" readOnly="true" width="382"/>
                    <a:comboBox name="payment_method_display" bindTarget="csh_payment_req_pay_ds" prompt="HLS.PAYMENT_METHOD"/>
                    <a:numberField name="exchange_rate" allowNegative="false" bindTarget="csh_payment_req_pay_ds" decimalPrecision="-1" prompt="HLS.EXCHANGE_RATE" readOnly="true" width="150"/>
                </a:box>
                <a:box column="4">
815 816 817
                    &lt;!&ndash; <a:textField name="first_contract_day" bindTarget="csh_payment_req_pay_ds" prompt="首次支付表日期末位" readOnly="true"/> &ndash;&gt;
                    &lt;!&ndash; <a:datePicker name="first_payment_date" bindTarget="csh_payment_req_pay_ds" dayRenderer="rendererDay" prompt="首期还款日" width="150"/> &ndash;&gt;
                </a:box>-->
Spencer Chang's avatar
Spencer Chang committed
818 819 820 821 822 823 824 825
                <!-- <a:box column="4">
                    <a:numberField name="transaction_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="CSH502.CSH_PAYMENT_AMOUNT" width="150"/>
                    <a:numberField name="handling_charge" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="HLS.HANDLING_CHARGE" width="150"/>
                    <a:numberField name="transaction_functional_amount" allowDecimals="true" allowFormat="true" bindTarget="csh_payment_req_pay_ds" prompt="HLS.FUNCTIONAL_AMOUNT" readOnly="true" width="150"/>
                    <a:comboBox name="exchange_rate_type_display" bindTarget="csh_payment_req_pay_ds" prompt="HLS.EXCHANGE_RATE_TYPE_DESC" width="150"/>
                    <a:textField name="bank_slip_num" bindTarget="csh_payment_req_pay_ds" prompt="CSH511.CSH_TRANSACTION.BANK_SLIP_NUM"/>
                    <div/>
                </a:box> -->
826

Spencer Chang's avatar
Spencer Chang committed
827
            </a:form>
828 829 830 831 832 833 834 835 836 837 838 839 840 841
            <a:grid id="bank_account_ds" bindTarget="csh_payment_req_pay_ds" height="200">

                <a:columns>
                    <a:column name="bank_account_num" prompt="银行账号" editor="lov_editor" width="150"/>
                    <a:column name="bank_branch_name" prompt="银行名称" width="150"/>
                    <a:column name="bank_account_name" prompt="账户名" width="150"/>
                    <a:column name="this_pay_agent_amount" prompt="本次付代理店金额" editor="number_editor" width="150" renderer="Leaf.formatMoney" align="right"/>
                    <a:column name="this_pay_vender_amount" prompt="本次付厂商金额" editor="number_editor" width="150" renderer="Leaf.formatMoney" align="right"/>
                </a:columns>
                <a:editors>
                    <a:lov id="lov_editor"/>
                    <a:numberField id="number_editor"/>
                </a:editors>
            </a:grid>
Spencer Chang's avatar
Spencer Chang committed
842 843 844 845
            <script type="text/javascript"><![CDATA[
            	    $('csh_payment_req_pay_ds').getAt(0).set('bp_bank_account_num','${/parameter/@bp_bank_account_num}');
            	    $('csh_payment_req_pay_ds').getAt(0).set('bp_bank_account_code','${/parameter/@bp_bank_account_code}');
            	    $('csh_payment_req_pay_ds').getAt(0).set('bp_bank_account_name','${/parameter/@bp_bank_account_name}');
846 847 848 849 850 851 852 853 854 855
                    $('csh_payment_req_pay_ds').getAt(0).set('bp_bank_account_id','${/parameter/@bp_bank_account_id}');
                    $('csh_payment_req_pay_ds').getAt(0).set('vender_bank_account_id','${/parameter/@vender_bank_account_id}');
                    $('csh_payment_req_pay_ds').getAt(0).set('vender_bank_account_num','${/parameter/@vender_bank_account_num}');
            	    $('csh_payment_req_pay_ds').getAt(0).set('contract_number','${/parameter/@contract_number}');
            	    $('csh_payment_req_pay_ds').getAt(0).set('cf_description','${/parameter/@cf_description}');
            	    $('csh_payment_req_pay_ds').getAt(0).set('residual_agent_amount','${/parameter/@residual_agent_amount}');
            	    $('csh_payment_req_pay_ds').getAt(0).set('residual_vender_amount','${/parameter/@residual_vender_amount}');
            	    $('csh_payment_req_pay_ds').getAt(0).set('this_pay_agent_amount',0);
            	    $('csh_payment_req_pay_ds').getAt(0).set('this_pay_vender_amount',0);

Spencer Chang's avatar
Spencer Chang committed
856 857 858 859
            ]]></script>
        </a:screenBody>
    </a:view>
</a:screen>