csh_deposit_manager.lview 32.3 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 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 394 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 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 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 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: Eugene Song
    $Date: 2018年8月24日14:28:51
    $Revision: 1.0
    $Purpose: 保证金管理
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure>
        <a:model-query defaultWhereClause="t1.enabled_flag=&apos;Y&apos;" fetchAll="true"
                       model="basic.csh_payment_method_for_lov" rootPath="payment_method_path"/>
    </a:init-procedure>

    <a:view>
        <a:link id="csh1000_deducate_detail_link"
                url="${/request/@context_path}/modules/csh/CSH710N/csh_deduction_detail_n.lview"/>
        <a:link id="csh_payment_req_create_link"
                url="${/request/@context_path}/modules/csh/CSH501/csh_payment_req_selected.lview"/>
        <a:link id="csh_deposit_detail_link"
                url="${/request/@context_path}/modules/csh/CSH1000/csh_deposit_source.lview"/>
        <a:link id="csh_deposit_agent_detail_link"
                url="${/request/@context_path}/modules/csh/CSH1000/csh_agent_deposit_source.lview"/>

        <!--<a:link id="csh_transaction_receipt_write_off_detail_link"
                url="${/request/@context_path}/modules/csh/CSH513/csh_transaction_receipt_write_off_detail.lview"/>-->
        <a:link id="csh_transaction_return_link"
                url="${/request/@context_path}/modules/csh/CSH1000/csh_deposit_return.lview"/>
        <a:link id="csh_deposit_pool_detail_link"
                url="${/request/@context_path}/modules/csh/CSH1000/csh_deposit_pool_source.lview"/>

        <a:link id="csh_transaction_receipt_write_off_detail_link"
                url="${/request/@context_path}/modules/csh/CSH531N/csh_write_off_interface.lview"/>


        <a:link id="csh560_check_wfl_link" model="csh.CSH560.return_workflow_start" modelaction="query"/>
        <a:link id="csh515_get_layout_link" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <a:link id="csh515_amount_return_link" url="${/request/@context_path}/modules/csh/CSH515/csh_amount_return.lview"/>

        <script type="text/javascript"><![CDATA[

        function csh_deposit_query() {
            $('csh_deposit_pool_ds').query();
            $('csh_deposit_ds').query();
            $('csh_agent_deposit_ds').query();
            $('csh_deposit_purpose_ds').query();
        }

        function csh_deposit_reset() {
            $('csh_deposit_pool_query_ds').reset();
            $('csh_deposit_query_ds').reset();
            $('csh_agent_deposit_query_ds').reset();
            $('csh_deposit_purpose_query_ds').reset();
        }

        function detail_function(value, record, name) {
            return '<a href="javascript:detail_window(' + record.get('outflow_id') + ',' + record.get('inflow_id') + ');">明细</a>';
        }


        function detail_window(outflow_id, inflow_id) {

            var win = new Leaf.Window({
                id: 'csh_deposit_detail_winid',
                params: {
                    outflow_id: outflow_id,
                    inflow_id: inflow_id,
                    winid: 'csh_deposit_detail_winid'
                },
                url: $('csh_deposit_detail_link').getUrl(),
                title: '来源用途明细',
                fullScreen: true
            });
            win.on('close', function () {
                csh_deposit_query();
            });

        }

        function agent_detail_function(value, record, name){
            return '<a href="javascript:agent_detail_window(' + record.get('outflow_id') + ',' + record.get('inflow_id') + ');">明细</a>';
        }

        function agent_detail_window(outflow_id, inflow_id) {

            var win = new Leaf.Window({
                id: 'csh_deposit_agent_detail_winid',
                params: {
                    outflow_id: outflow_id,
                    inflow_id: inflow_id,
                    winid: 'csh_deposit_agent_detail_winid'
                },
                url: $('csh_deposit_agent_detail_link').getUrl(),
                title: '来源用途明细',
                fullScreen: true
            });
            win.on('close', function () {
                csh_deposit_query();
            });

        }


        function deduction_function(value, record, name) {
            return '<a href="javascript:deduction_window(' + record.get('outflow_id') + ',\'' + record.get('bp_id') + '\',\'' + record.get('contract_number') + '\');">抵扣</a>';

        }

        function deduction_window(cashflow_id, bp_id, contract_number) {
            var win = new Leaf.Window({
                id: 'csh710n_deducate_detail_link',
                params: {
                    bp_id: bp_id,
                    contract_number: contract_number,
                    cashflow_id: cashflow_id,
                    winid: 'csh710n_deducate_detail_link'
                },
                url: $('csh1000_deducate_detail_link').getUrl(),
                title: '${l:CSH710.PAYMENT_DECUCATE}',
                fullScreen: true
            });
            win.on('close', function () {
                csh_deposit_query();
            });
        }


        function refund_function(value, record, name) {
            return '<a href="javascript:refund_window(' + record.get('outflow_id') + ');">退款</a>';
        }

        function refund_window(outflow_id) {

            var url = $('csh_payment_req_create_link').getUrl();
            var win = new Leaf.Window({
                url: url,
                params: {
                    winid: 'csh_payment_req_create_win_id',
                    outflow_id: outflow_id
                },
                title: '付款申请页面',
                id: 'csh_payment_req_create_win_id',
                fullScreen: true
            });
            win.on('close', function () {
                csh_deposit_query();
            });


        }


        function detail_pool_function(value, record, name) {
            return '<a href="javascript:detail_pool_window(' + record.get('transaction_id') + ');">明细</a>';
        }

        function detail_pool_window(transaction_id){
            var win = new Leaf.Window({
                id: 'csh_deposit_pool_detail_winid',
                params: {
                    transaction_id: transaction_id,
                    winid: 'csh_deposit_pool_detail_winid'
                },
                url: $('csh_deposit_pool_detail_link').getUrl(),
                title: '来源用途明细',
                fullScreen: true
            });
            win.on('close', function () {
                csh_deposit_query();
            });
        }


        function deduction_pool_function(value, record, name) {

            //url = $('csh_transaction_receipt_write_off_detail_link').getUrl() + '?transaction_id=' + record.get('transaction_id') + '&transaction_date=' + record.get('transaction_date') + '&bp_id1=${/parameter/@bp_id}' + '&transaction_type=' + record.get('transaction_type') + '&auto_filt_penalty=N&auto_filt_prinicipal_interest=Y&bp_limit_flag=${/parameter/@bp_limit_flag}';

            return '<a href="javascript:deduction_pool_window(\''  + record.id + '\');">抵扣</a>';
        }

        function deduction_pool_window(id) {




            /*var limit_flag = '${/parameter/@limit_flag}' || 'N';
            var limit2_flag = '${/parameter/@limit2_flag}' || 'N';
            new Leaf.Window({
                id: 'receipt_write_off_detail_link_winid',
                params: {
                    winId: 'receipt_write_off_detail_link_winid',
                    limit_flag: limit_flag,
                    limit2_flag: limit2_flag
                },
                url: url,
                title: '${l:CSH513.CSH_RECEIPT_WRITE_OFF}',
                fullScreen: true
            }).on('close', function () {
                csh_deposit_query();
            });*/


            var ds = $('csh_deposit_pool_ds');
            var record = ds.findById(id);

            var win = new Leaf.Window({
                id: 'receipt_write_off_detail_link_winid',
                params: {
                    transaction_id: record.get('transaction_id'),
                    bank_slip_num: record.get('bank_slip_num'),
                    company_id: record.get('company_id'),
                    transaction_date: Leaf.formatDate(record.get('transaction_date')),
                    internal_period_num: record.get('internal_period_num'),
                    period_name: record.get('period_name'),
                    bp_bank_account_num: record.get('bp_bank_account_num'),
                    bp_bank_account_name: record.get('bp_bank_account_name'),
                    bp_id: record.get('bp_id'),
                    winid: 'receipt_write_off_detail_link_winid'
                },
                url: $('csh_transaction_receipt_write_off_detail_link').getUrl(),
                title: '明细',
                fullScreen: true
            });

            win.on('close', function () {
                ds.query(ds.currentPage);
            });



        }

        function refund_pool_function(value, record, name) {

            return '<a href="javascript:refund_pool_window();">退款</a>';

        }

        function refund_pool_window() {

            /*new Leaf.Window({
                id: 'csh_transaction_return_window',
                url: $('csh_transaction_return_link').getUrl(),
                params: {
                    winId: 'csh_transaction_return_window'
                },
                title: '${l:CSH515.CSH_REFUND}',
                fullScreen: true
            });*/

            var record = $('csh_deposit_pool_ds').getCurrentRecord();
            var transaction_id = record.get('transaction_id');
            var returned_amount = record.get('returned_amount')||0;
            var write_off_amount = record.get('write_off_amount')||0;
            var transaction_amount = record.get('transaction_amount')||0;
            var bp_id = record.get('bp_id');
            var remain_total_amount = record.get('remain_total_amount');
            Leaf.request({
                url: $('csh560_check_wfl_link').getUrl(),
                para: {
                    bp_id: bp_id
                },
                success: function(res) {
                    var check_flag = res.result.record.check_flag;
                    if (check_flag == 'Y' || check_flag == 'D'){
                        Leaf.showMessage('提示','已经有工作流在审批中');
                    }else{
                        if (transaction_amount <=0){
                            Leaf.showMessage('提示','该笔收款没有金额可以被退还');
                            return;
                        }
                        var param = record.data;
                        param['function_code'] = 'CSH560R';
                        param['url_title'] = '收款退款';
                        param['bp_id'] = bp_id;
                        param['transaction_id'] = transaction_id;
                        param['write_off_amount'] = write_off_amount;
                        param['returned_amount'] = returned_amount;
                        param['transaction_amount'] = transaction_amount;
                        param['remain_total_amount'] = remain_total_amount;
                        param['winid'] = 'csh515_amount_return_winid';
                        hls_doc_get_layout_code('csh515_get_layout_link', param, 'csh515_amount_return_link', 'csh_deposit_pool_ds');
                    }
                },
                error: function(res) {
                },
                faliure: function() {
                },
                scope: this
            });










        }

        function onLoad_csh515_receipt_post(ds) {
            var record = ds.getCurrentRecord();
            if (record) {
                record.getField('bp_bank_account_code').setLovPara('bp_id', record.get('bp_id'));
            }
        }

        function csh_deposit_pool_import() {
            $('csh_deposit_pool')._export(null,'保证金池');
        }

        function bp_csh_deposit_import() {
            $('bp_csh_deposit')._export(null,'客户保证金');
        }

        function csh_agent_deposit_import() {
            $('csh_agent_deposit')._export(null,'代理商代付客户保证金');
        }

        function csh_deposit_purpose_import() {
            $('csh_deposit_purpose')._export(null,'保证金用途明细查询');
        }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="payment_method_ds">
                <a:datas dataSource="/model/payment_method_path"/>
            </a:dataSet>

            <a:dataSet id="deposit_type_ds">
                <a:datas>
                    <a:record code_value="保证金池" code_value_name="保证金池"/>
                    <a:record code_value="客户保证金" code_value_name="客户保证金"/>
                    <a:record code_value="代理商代付客户保证金" code_value_name="代理商代付客户保证金"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="write_off_type_ds_1">
                <a:datas>
                    <a:record code_value="(抵扣记录:保证金池核销债权)" code_value_name="(抵扣记录:保证金池核销债权)"/>
                    <a:record code_value="(退款记录:保证金池退款)" code_value_name="(退款记录:保证金池退款)"/>
                    <a:record code_value="核销为保证金池" code_value_name="核销为保证金池"/>
                    <a:record code_value="(抵扣记录:应付客户保证金的抵扣)" code_value_name="(抵扣记录:应付客户保证金的抵扣)"/>
                    <a:record code_value="(退款记录:应付客户保证金的支付)" code_value_name="(退款记录:应付客户保证金的支付)"/>
                    <a:record code_value="核销为客户保证金" code_value_name="核销为客户保证金"/>
                    <a:record code_value="(抵扣记录:代理商代付应付客户保证金的抵扣)" code_value_name="(抵扣记录:代理商代付应付客户保证金的抵扣)"/>
                    <a:record code_value="(退款记录:代理商代付应付客户保证金的支付)" code_value_name="(退款记录:代理商代付应付客户保证金的支付)"/>
                    <a:record code_value="核销为代理商代付客户保证金" code_value_name="核销为代理商代付客户保证金"/>
                </a:datas>
            </a:dataSet>
            <a:dataSet id="cf_item_ds">
                <a:datas>
                    <a:record code_value="51" code_value_name="保证金"/>
                    <a:record code_value="52" code_value_name="保证金退还"/>
                    <a:record code_value="508" code_value_name="代理商代付客户保证金"/>
                    <a:record code_value="509" code_value_name="代理商代付客户保证金退还"/>
                </a:datas>
            </a:dataSet>


            <a:dataSet id="csh_deposit_pool_query_ds">
                <a:fields>
                    <a:field name="agent_name"/>
                    <a:field name="agent_code"/>
                </a:fields>
            </a:dataSet>

            <a:dataSet id="csh_deposit_query_ds">
                <a:fields>
                    <a:field name="contract_number"/>
                    <a:field name="contract_name"/>
                </a:fields>
            </a:dataSet>


            <a:dataSet id="csh_agent_deposit_query_ds">
                <a:fields>
                    <a:field name="agent_name"/>
                    <a:field name="agent_code"/>
                    <a:field name="contract_number"/>
                    <a:field name="contract_name"/>
                </a:fields>
            </a:dataSet>

            <a:dataSet id="csh_deposit_purpose_query_ds">
                <a:fields>
                    <a:field name="deposit_type" displayField="code_value_name" options="deposit_type_ds"
                             returnField="deposit_type" valueField="code_value"/>
                    <a:field name="write_off_type" displayField="code_value_name" options="write_off_type_ds_1"
                             returnField="write_off_type" valueField="code_value"/>
                    <a:field name="cf_item_n" displayField="code_value_name" options="cf_item_ds" returnField="cf_item"
                             valueField="code_value"/>
                    <a:field name="cf_item"/>
                </a:fields>
            </a:dataSet>

            <!-- 保证金池 -->
            <a:dataSet id="csh_deposit_pool_ds" autoQuery="false" model="csh.CSH1000.csh_deposit_pool"
                       queryDataSet="csh_deposit_pool_query_ds" selectable="true">
                <a:fields>
                    <a:field name="payment_method_display" displayField="description" options="payment_method_ds"
                             returnField="payment_method_id" valueField="payment_method_id"/>
                    <a:field name="bank_account_code" autoComplete="true" autoCompleteField="bank_account_num"
                             lovGridHeight="350" lovHeight="550" lovLabelWidth="90"
                             lovService="csh.CSH101.csh_bank_account_lov" lovWidth="580"
                             title="CSH511.BANK_ACCOUNT_CODE">
                        <a:mapping>
                            <a:map from="precision" to="precision"/>
                            <a:map from="bank_account_id" to="bank_account_id"/>
                            <a:map from="bank_account_num" to="bank_account_num"/>
                            <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"/>
                        </a:mapping>
                    </a:field>
                    <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">
                        <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>
                    </a:field>
                </a:fields>
                <a:events>
                    <a:event name="load" handler="onLoad_csh515_receipt_post"/>
                </a:events>

            </a:dataSet>
            <!-- 客户保证金 -->
            <a:dataSet id="csh_deposit_ds" autoQuery="false" model="csh.CSH1000.csh_deposit"
                       queryDataSet="csh_deposit_query_ds" selectable="true">

            </a:dataSet>
            <!-- 代理商代付客户保证金 -->
            <a:dataSet id="csh_agent_deposit_ds" autoQuery="false" model="csh.CSH1000.csh_agent_deposit"
                       queryDataSet="csh_agent_deposit_query_ds"
                       selectable="true">

            </a:dataSet>
            <!-- 保证金用途 -->
            <a:dataSet id="csh_deposit_purpose_ds" autoQuery="false" model="csh.CSH1000.csh_deposit_purpose"
                       queryDataSet="csh_deposit_purpose_query_ds"
                       selectable="true">
                <a:fields>
                    <a:field name="write_off_date" datatype="date"/>
                </a:fields>
            </a:dataSet>


        </a:dataSets>

        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="csh_deposit_query" text="HLS.QUERY"/>
                <a:gridButton click="csh_deposit_reset" text="HLS.RESET"/>
            </a:screenTopToolbar>
            <a:tabPanel marginHeight="80" marginWidth="30">
                <a:tabs>
                    <a:tab prompt="保证金池" width="150">
                        <a:form column="4" marginWidth="90" title="查询条件">
                            <a:textField name="agent_name" bindTarget="csh_deposit_pool_query_ds" prompt="代理商名称"/>
                            <a:textField name="agent_code" bindTarget="csh_deposit_pool_query_ds" prompt="代理商编码"/>
                            <a:numberField name="balance_amount_from" bindTarget="csh_deposit_pool_query_ds" prompt="保证金池总余额从"/>
                            <a:numberField name="balance_amount_to" bindTarget="csh_deposit_pool_query_ds" prompt="保证金池总余额到"/>
                        </a:form>
                        <a:grid id = "csh_deposit_pool" bindTarget="csh_deposit_pool_ds" marginHeight="220" marginWidth="90" navBar="true">
                            <a:toolBar>
                                <a:button click="csh_deposit_pool_import" text="导出"/>
                            </a:toolBar>
                            <a:columns>
                                <a:column name="agent_name" prompt="代理商名称" width="200"/>
                                <a:column name="agent_code" prompt="代理商编码" width="150"/>
                                <a:column name="transaction_amount" prompt="发生总额" width="150" align="right"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="deduction_amount" prompt="抵扣总额" width="150"
                                          align="right" renderer="Leaf.formatMoney"/>
                                <a:column name="refund_amount" prompt="退款总额" width="150" align="right"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="balance_amount" prompt="保证金池总余额" width="150" align="right"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="balance_amount_5" prompt="5%余额" width="150" align="right"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="detail" align="center" prompt="来源用途明细" renderer="detail_pool_function"
                                          width="100"/>
                                <a:column name="deduction" align="center" prompt="抵扣操作"
                                          renderer="deduction_pool_function"
                                          width="100"/>
                                <a:column name="refund" align="center" prompt="退款操作" renderer="refund_pool_function"
                                          width="100"/>
                            </a:columns>
                        </a:grid>
                    </a:tab>

                    <a:tab prompt="客户保证金" width="150">
                        <a:form column="3" marginWidth="90" title="查询条件">
                            <a:textField name="agent_name" bindTarget="csh_deposit_query_ds" prompt="代理商名称"/>
                            <a:textField name="contract_number" bindTarget="csh_deposit_query_ds" prompt="合同编号"/>
                            <a:textField name="tenant_name" bindTarget="csh_deposit_query_ds" prompt="客户名称"/>
                            <a:numberField name="balance_amount_from" bindTarget="csh_deposit_query_ds" prompt="余额从"/>
                            <a:numberField name="balance_amount_to" bindTarget="csh_deposit_query_ds" prompt="余额到"/>
                        </a:form>
                        <a:grid id="bp_csh_deposit" bindTarget="csh_deposit_ds" marginHeight="220" marginWidth="90" navBar="true">
                            <a:toolBar>
                                <a:button click="bp_csh_deposit_import" text="导出"/>
                            </a:toolBar>
                            <a:columns>
                                <a:column name="contract_number" prompt="合同编号" width="150"/>
                                <a:column name="tenant_name" prompt="客户名称" width="250"/>
                                <a:column name="finance_amount" prompt="融资额" width="150" align="right"
                                          renderer="Leaf.formatMoney"/>0
                                <a:column name="agent_name" prompt="代理商" width="250"/>
                                <a:column name="deposit" prompt="发生总额" width="150" align="right"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="deduction_amount" prompt="抵扣总额" width="150"
                                          align="right" renderer="Leaf.formatMoney"/>
                                <a:column name="refund_amount" prompt="退款总额" width="150" align="right"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="balance_amount" prompt="余额" width="150" align="right"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="detail" align="center" prompt="来源用途明细" renderer="detail_function"
                                          width="100"/>
                                <a:column name="deduction" align="center" prompt="抵扣操作" renderer="deduction_function"
                                          width="100"/>
                                <a:column name="refund" align="center" prompt="退款操作" renderer="refund_function"
                                          width="100"/>
                            </a:columns>
                        </a:grid>
                    </a:tab>
                    <a:tab prompt="代理商代付客户保证金" width="150">
                        <a:form column="3" marginWidth="90" title="查询条件">
                            <a:textField name="agent_name" bindTarget="csh_agent_deposit_query_ds" prompt="代理商名称"/>
                            <a:textField name="contract_number" bindTarget="csh_agent_deposit_query_ds" prompt="合同编号"/>
                            <a:textField name="tenant_name" bindTarget="csh_agent_deposit_query_ds" prompt="客户名称"/>
                            <a:numberField name="balance_amount_from" bindTarget="csh_agent_deposit_query_ds" prompt="余额从"/>
                            <a:numberField name="balance_amount_to" bindTarget="csh_agent_deposit_query_ds" prompt="余额到"/>
                        </a:form>
                        <a:grid id="csh_agent_deposit" bindTarget="csh_agent_deposit_ds" marginHeight="220" marginWidth="90" navBar="true">
                            <a:toolBar>
                                <a:button click="csh_agent_deposit_import" text="导出"/>
                            </a:toolBar>
                            <a:columns>
                                <a:column name="contract_number" prompt="合同编号" width="150"/>
                                <a:column name="tenant_name" prompt="客户名称" width="250"/>
                                <a:column name="finance_amount" prompt="融资额" width="150" align="right"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="agent_name" prompt="代理商" width="250"/>
                                <a:column name="deposit" prompt="发生总额" width="150" align="right"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="deduction_amount" prompt="抵扣总额" width="150"
                                          align="right" renderer="Leaf.formatMoney"/>
                                <a:column name="refund_amount" prompt="退款总额" width="150" align="right"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="balance_amount" prompt="余额" width="150" align="right"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="detail" align="center" prompt="来源用途明细" renderer="agent_detail_function"
                                          width="100"/>
                                <a:column name="deduction" align="center" prompt="抵扣操作" renderer="deduction_function"
                                          width="100"/>
                                <a:column name="refund" align="center" prompt="退款操作" renderer="refund_function"
                                          width="100"/>
                            </a:columns>
                        </a:grid>
                    </a:tab>
                    <a:tab prompt="保证金用途明细查询" width="150">
                        <a:form column="4" marginWidth="90" title="查询条件">
                            <a:comboBox name="deposit_type" bindTarget="csh_deposit_purpose_query_ds" prompt="保证金类型"/>
                            <a:comboBox name="write_off_type" bindTarget="csh_deposit_purpose_query_ds" prompt="核销类型"/>
                            <a:textField name="contract_number" bindTarget="csh_deposit_purpose_query_ds"
                                         prompt="合同编号"/>
                            <a:textField name="agent_name" bindTarget="csh_deposit_purpose_query_ds" prompt="代理商名称"/>
                            <!--<a:datePicker name="write_off_date" bindTarget="csh_deposit_purpose_query_ds"
                                          prompt="核销日期"/>-->
                            <a:datePicker name="write_off_date_from" bindTarget="csh_deposit_purpose_query_ds"
                                          prompt="核销日期从"/>
                            <a:datePicker name="write_off_date_to" bindTarget="csh_deposit_purpose_query_ds"
                                          prompt="核销日期到"/>
                            <a:numberField name="write_off_due_amount" bindTarget="csh_deposit_purpose_query_ds"
                                           prompt="核销金额"/>
                            <a:textField name="bp_name" bindTarget="csh_deposit_purpose_query_ds" prompt="退款/核销对象"/>
                            <a:comboBox name="cf_item_n" bindTarget="csh_deposit_purpose_query_ds" prompt="现金流项目"/>
                        </a:form>
                        <a:grid id="csh_deposit_purpose" bindTarget="csh_deposit_purpose_ds" marginHeight="260" marginWidth="90" navBar="true">
                            <a:toolBar>
                                <a:button click="csh_deposit_purpose_import" text="导出"/>
                            </a:toolBar>
                            <a:columns>
                                <a:column name="deposit_type" prompt="保证金类型" width="100"/>
                                <a:column name="write_off_type" prompt="核销类型" width="200"/>
                                <a:column name="write_off_classification_n" align="center" prompt="核销分类" width="100"/>
                                <a:column name="agent_name" prompt="代理商名称" width="200"/>
                                <a:column name="write_off_date" prompt="核销日期" align="center"
                                          renderer="Leaf.formatDate"/>
                                <a:column name="write_off_due_amount" align="right" prompt="核销金额" width="150"
                                          renderer="Leaf.formatMoney"/>
                                <a:column name="bp_name" prompt="退款/核销对象" width="250"/>
                                <a:column name="contract_number" prompt="合同号" width="150"/>
                                <a:column name="times" prompt="期项" align="center" width="80"/>
                                <a:column name="cf_item_n" align="center" prompt="现金流项目" width="80"/>
                                <a:column name="description" prompt="核销备注" width="150"/>
                            </a:columns>
                        </a:grid>
                    </a:tab>
                </a:tabs>
            </a:tabPanel>
        </a:screenBody>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>

    </a:view>
</a:screen>