csh_write_off_assigns.lview 35.4 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
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" trace="true">
    <a:init-procedure>
        <a:model-query fetchAll="true" model="basic.get_sys_default_time" rootPath="sys_default_time"/>
        <a:model-query fetchAll="true" model="csh.CSH531N.csh_transaction" rootPath="csh_transaction_path"/>
        <a:model-query defaultWhereClause="v.code=&apos;DS_CSH_WRITE_OFF_CLASSIFICATION&apos; and v.ref_v03=&apos;PRE&apos;" fetchAll="true" model="basic.sys_code_default_value" rootPath="sys_code_default_value_path"/>
    </a:init-procedure>
    <a:view>
        <a:link id="csh532n_csh_assigns_confirm_link" model="csh.CSH532N.csh_assigns_confirm" modelaction="update"/>
        <a:link id="transaction_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
        <script type="text/javascript"><![CDATA[
        function csh532d_lock_current_window(){
            Leaf.Masker.mask($('${/parameter/@winid}').wrap, '${l:HLS.EXECUTING}');
        }

        function csh532d_unlock_current_window(){
            Leaf.Masker.unmask($('${/parameter/@winid}').wrap);
        }
        function init() {
            var batch_status = '${/parameter/@batch_status}';
            if (batch_status == 'SUBMIT') {
                $('csh_grid_add_bt').setVisible(false);
                $('csh_grid_delete_bt').setVisible(false);
                $('csh_grid_save_bt').setVisible(false);
                $('csh_write_off_grid').hideColumn('left_amount');
                $('csh_write_off_grid').hideColumn('left_principal');
                $('csh_write_off_grid').hideColumn('left_interest');
            } else {
                $('csh_grid_add_bt').setVisible(true);
                $('csh_grid_delete_bt').setVisible(true);
                $('csh_grid_save_bt').setVisible(true);
            }
        }

        // function csh_write_off_add(){
        //     var record = $('csh_write_off_assigns_ds').create();
        //     record.set('csh_bank_slip_num','${/parameter/@csh_bank_slip_num}');
        //     $('csh_write_off_grid').showEditorByRecord(record);
        // }

        function csh_edit_function(record, name) {
            var batch_status = '${/parameter/@batch_status}';
            var write_off_type = record.get('write_off_type');
            if (batch_status == 'SUBMIT') {
                return;
            } else {
                if (name == 'contract_number') {
                    if (write_off_type != 'DEPOSIT_POOL_CREDIT') {
                        return 'csh_write_off_grid_lv';
                    }

                }
                if (name == 'write_off_type_desc') {
                    return 'csh_write_off_grid_cb';
                }
                // if (name == 'write_off_bp_name') {
                //     return 'csh_write_off_grid_lv';
                // }
                if (name == 'write_off_times') {
                    if (write_off_type == 'RECEIPT_CREDIT') {
                        return 'csh_write_off_grid_lv';
                    }
                }
                if (name == 'write_off_amount' || name == 'write_off_principal' || name == 'write_off_interest') {
                    return 'csh_write_off_grid_nf';
                }
                if (name == 'write_off_date') {
                    return 'csh_write_off_grid_dp';
                }
                if (name == 'agent_id_desc') {
                    if (write_off_type == 'DEPOSIT_POOL_CREDIT') {
                        return 'csh_write_off_grid_lv';
                    }
                }
                if (name == 'write_off_classification_desc') {
                    return 'csh_write_off_grid_cb';
                }
                return;
            }
        }

        function summaryRenderer(datas, name) {
            var sum = 0;
            var sum_2 = 0;
            for (var i = 0; i < datas.length; i++) {
                record = datas[i];
                if (name == "write_off_amount") {
                    var t_1 = record.get("write_off_amount");
                    var t_2 = parseFloat(t_1);
                    if (!isNaN(t_2)) {
                        sum += t_2;
                    }
                }
                if (name == "unreceived_amount") {
                    var n_1 = record.get("unreceived_amount");
                    var n_2 = parseFloat(n_1);
                    if (!isNaN(n_2)) {
                        sum_2 += n_2;
                    }
                }
            }
            if (name == "csh_bank_slip_num") {
                return '<div align="right">合计:</div>';
            }
            if (name == "unreceived_amount") {
                return '<font color="red">' + Leaf.formatNumber(sum_2, 2) + '</font>';
            }
            if (name == "write_off_amount") {
                return '<font color="red">' + Leaf.formatNumber(sum, 2) + '</font>';
            }
        }

        function csh531_load_fun(ds){
            var records = ds.getAll();
            for(var i=0;i<records.length;i++){
                record.getField('write_off_times').setLovPara('contract_id', records[i].get('contract_id'));
            }
        }

        function csh531_update_fun(ds, record, name, value, oldValue) {

            if (name == 'write_off_amount') {
                var left_amount = record.get('left_amount');
                var left_principal = record.get('left_principal');
                var left_interest = record.get('left_interest');
                var x_amount;
                if (value) {
                    if (value <= left_interest) {
                        record.set('write_off_interest', value);
                        record.set('write_off_principal', null);
                    } else if (value > left_interest) {
                        record.set('write_off_interest', left_interest);
                        x_amount = value - left_interest;
                        record.set('write_off_principal', x_amount);
                    }
                } else {
                    record.set('write_off_interest', null);
                    record.set('write_off_principal', null);
                }
            }
            if (name == 'write_off_type') {
                if (value != oldValue) {
                    //收款核销
                    if (value == 'RECEIPT_CREDIT') {
                        record.getField('contract_number').setRequired(true);

                        record.getField('write_off_times').setReadOnly(false);
                        record.getField('write_off_times').setRequired(false);

                    } else {
                        record.getField('write_off_times').setRequired(false);
                        record.getField('write_off_times').setReadOnly(true);
                    }
                    //收款核销预收款
                    if (value == 'RECEIPT_ADVANCE_RECEIPT') {
                        record.getField('contract_number').setRequired(true);

                        record.set('agent_id_desc', '');
                        record.set('agent_id', '');
                        record.set('write_off_times', '');
                        record.set('write_off_cf_item', '');
                        record.set('write_off_cf_item_desc', '');
                        record.set('write_off_cashflow_id', '');
                        record.set('due_date', '');

                        record.set('write_off_principal', '');
                        record.set('write_off_interest', '');
                        record.set('left_amount', '');
                        record.set('left_principal', '');
                        record.set('left_interest', '');
                    }
                    //核销为保证金池
                    if (value == 'DEPOSIT_POOL_CREDIT') {
                        record.getField('contract_number').setRequired(false);

                        record.getField('agent_id_desc').setReadOnly(false);
                        record.getField('agent_id_desc').setRequired(true);

                        record.set('contract_number', '');
                        record.set('contract_name', '');
                        record.set('contract_id', '');
                        record.set('write_off_bp_id', '');
                        record.set('write_off_bp_name', '');

                        record.set('write_off_times', '');
                        record.set('write_off_cf_item', '');
                        record.set('write_off_cf_item_desc', '');
                        record.set('write_off_cashflow_id', '');
                        record.set('due_date', '');

                        record.set('write_off_principal', '');
                        record.set('write_off_interest', '');
                        record.set('left_amount', '');
                        record.set('left_principal', '');
                        record.set('left_interest', '');
                    } else {
                        record.getField('agent_id_desc').setRequired(false);
                        record.getField('agent_id_desc').setReadOnly(true);
                    }
                }
            }
            if (name == 'contract_id') {
                record.getField('write_off_times').setLovPara('contract_id', value);
            }
        }

        function csh531_wf_amount_validate(record, name, value) {
            var batch_status = '${/parameter/@batch_status}';
            if (batch_status == 'SUBMIT') {
                return true;
            } else {
                if (record.get('write_off_type') == 'RECEIPT_CREDIT') {
                    if (value > record.get('left_amount')) {
                        return '分配金额不能大于剩余金额';
                    }
                }
            }
            return true;
        }

        function csh532n_csh_assigns_confirm(){
            var ds = $('csh_write_off_assigns_ds');

            if (ds.validate()) {
                if (ds.isModified()) {
                    Leaf.showErrorMessage('提示', '请先保存后再点击预核销!');
                    return;
                }
                Leaf.showConfirm('提示', '该操作会覆盖预核销结果,是否确认?', function () {
                    csh532d_lock_current_window();
                    var record = ds.getCurrentRecord();
                    Leaf.request({
                        url: $('csh532n_csh_assigns_confirm_link').getUrl(),
                        para: {
                            transaction_id: record.get('transaction_id')
                        },
                        success: function () {
                            csh532d_unlock_current_window();
                            $('csh_write_off_assigns_ds').query();
                            $('csh_write_off_interface_ds').query();
                        },
                        failure: function () {
                            csh532d_unlock_current_window();
                        },
                        error: function () {
                            csh532d_unlock_current_window();
                        },
                        scope: this
                    });
                });
            }
        }

        function attachment_upload() {

            if ('${/parameter/@transaction_id}') {
                //
                // ds = $('csh_transaction_receipt_head_ds');
                // record = ds.getCurrentRecord();
                // var header_id = record.get('transaction_id');
                var header_id = '${/parameter/@transaction_id}';
                var url = $('transaction_uploadFile_id').getUrl() + '?table_name=CSH_TRANSACTION&header_id=' + header_id;
                var win = new Leaf.Window({
                    url: url,
                    title: '${l:HLS.SUPPORTING_DOCUMENT}',
                    id: 'transaction_uploadFile_winid',
                    width: 850,
                    height: 400
                });
                win.on('close', function () {
                    window.location.href = $('csh_transaction_receipt_id').getUrl();
                    // var url = $('csh_transaction_receipt_id').getUrl();
                    // Leaf.go(url);
                });
            } else {
                Leaf.showMessage('${l:HLS.PROMPT}', '请先保存!');
                return;
            }
        }

        function csh531n_save() {
            $('csh_transaction_receipt_write_off_detail_head_ds').submit();
        }


        ]]></script>
        <a:dataSets>
            <!--<a:dataSet id="ds_csh_write_off_classification_ds" lookupCode="DS_CSH_WRITE_OFF_CLASSIFICATION"/>-->
            <a:dataSet id="ds_csh_write_off_classification_ds" >
                <a:datas dataSource="/model/sys_code_default_value_path"/>
            </a:dataSet>

            <a:dataSet id="write_off_cf_item_ds" autoQuery="true" model="csh.CSH531N.hls_cashflow_item_v"/>
            <a:dataSet id="write_off_type_ds" autoQuery="true" model="csh.CSH531N.write_off_type_cb"/>
            <a:dataSet id="csh_transaction_receipt_write_off_detail_head_ds" model="csh.CSH531N.csh_transaction">
                <a:datas dataSource="/model/csh_transaction_path"/>
                <a:fields>
                    <!--  <a:field name="write_off_date" defaultValue="${/model/sys_default_value/record/@now_time}" required="true"/> -->
                    <a:field name="write_off_date" />
                    <a:field name="ref_contract_num" readOnly="true"/>
                    <a:field name="bank_slip_num" readOnly="true"/>
                    <a:field name="bp_code" readOnly="true"/>
                    <a:field name="bp_category" readOnly="true"/>
                    <a:field name="bp_category_n" readOnly="true"/>
                    <a:field name="transaction_num" readOnly="true"/>
                    <a:field name="currency_name" readOnly="true"/>
                    <a:field name="bp_name" readOnly="true"/>
                    <a:field name="transaction_amount" readOnly="true"/>
                    <a:field name="returned_amount" readOnly="true"/>
                    <a:field name="write_off_amount" readOnly="true"/>
                    <a:field name="unwrite_off_amount" readOnly="true"/>
                    <a:field name="csh_bp_name" readOnly="true"/>
                    <a:field name="bank_account_name" readOnly="true"/>
                    <a:fidld name="transaction_date" readOnly="true"/>
                    <a:field name="bp_bank_account_name" readOnly="true"/>
                    <a:field name="bp_bank_account_num" readOnly="true"/>
                    <a:field name="write_off_flag_desc" readOnly="true"/>
                    <a:field name="review_status_desc" readOnly="true"/>
                    <a:field name="bank_account_num" readOnly="true"/>
                    <a:field name="approving_return_amount" readOnly="true"/>
                    <a:field/>
                    <a:field name="ref_v01"/>
                </a:fields>

            </a:dataSet>
            <a:dataSet id="csh_write_off_assigns_ds" autoQuery="true" fetchAll="true" model="csh.CSH532N.csh_write_off_assigns" queryUrl="${/request/@context_path}/autocrud/csh.CSH532N.csh_write_off_assigns/query?transaction_id=${/parameter/@transaction_id}" selectable="true">
                <a:fields>
                    <a:field name="company_id" defaultValue="${/parameter/@company_id}"/>
                    <a:field name="write_off_date" required="true" defaultValue="${/parameter/@transaction_date}"/>
                    <a:field name="journal_date"  required="true" datatype="date" defaultValue="${/model/sys_default_time/record/@now_date}"/>
                    <a:field name="write_off_period_name" defaultValue="${/parameter/@period_name}"/>
                    <a:field name="write_off_period_num" defaultValue="${/parameter/@internal_period_num}"/>
                    <a:field name="check_flag" defaultValue="Y"/>
                    <a:field name="record_type" defaultValue="MANUAL"/>
                    <a:field name="write_off_times"/>
                    <a:field name="write_off_amount" required="true" validator="csh531_wf_amount_validate"/>
                    <a:field name="due_date"/>
                    <a:field name="unreceived_amount"/>
                    <a:field name="write_off_cashflow_id"/>
                    <a:field name="contract_id"/>
                    <a:field name="transaction_id"  defaultValue="${/parameter/@transaction_id}"/>
                    <a:field name="trx_number" defaultValue="${/parameter/@transaction_num}"/>
                    <a:field name="trx_interface_id" defaultValue="${/parameter/@transaction_id}"/>
                    <a:field name="contract_number" prompt="HLS.CONTRACT_NUMBER"  required="true" autoComplete="true" lovAutoQuery="true" lovGridHeight="300" lovHeight="450" lovService="csh.CSH531N.csh_con_contract_lov" lovWidth="450" title="合同号选择">
                        <a:mapping>
                            <a:map from="contract_number" to="contract_number"/>
                            <a:map from="contract_name" to="contract_name"/>
                            <a:map from="contract_id" to="contract_id"/>
                            <a:map from="bp_id_tenant" to="write_off_bp_id"/>
                            <a:map from="bp_id_tenant_name" to="write_off_bp_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="write_off_times" lovHeight="780" lovUrl="${/request/@context_path}/modules/csh/CSH531N/csh_write_off_ref_contract.lview" lovWidth="900" title="合同选择">
                        <a:mapping>
                            <!--<a:map from="contract_id" to="contract_id"/>-->
                            <!--<a:map from="contract_number" to="contract_number"/>-->
                            <!--<a:map from="contract_name" to="contract_name"/>-->
                            <a:map from="times" to="write_off_times"/>
                            <a:map from="cf_item" to="write_off_cf_item"/>
                            <a:map from="cf_item_desc" to="write_off_cf_item_desc"/>
                            <a:map from="left_amount" to="write_off_amount"/>
                            <a:map from="due_date" to="due_date"/>
                            <!-- <a:map from="unreceived_amount" to="unreceived_amount"/> -->
                            <a:map from="cashflow_id" to="write_off_cashflow_id"/>
                            <a:map from="left_principal" to="write_off_principal"/>
                            <a:map from="left_interest" to="write_off_interest"/>
                            <a:map from="left_amount" to="left_amount"/>
                            <a:map from="left_principal" to="left_principal"/>
                            <a:map from="left_interest" to="left_interest"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="batch_id" defaultValue="${/parameter/@batch_id}"/>
                    <a:field name="write_off_type" required="true" defaultValue="RECEIPT_CREDIT"/>
                    <a:field name="write_off_type_desc"  displayField="code_value_name" options="write_off_type_ds" returnField="write_off_type" valueField="code_value"/>
                    <a:field name="write_off_bp_id"/>
                    <!--<a:field name="write_off_bp_name" autoComplete="true" autoCompleteField="true" lovAutoQuery="true" lovGridHeight="300" lovHeight="450" lovService="csh.CSH531N.hls_bp_master" lovWidth="500" title="分配对象选择">-->
                    <!--<a:mapping>-->
                    <!--<a:map from="bp_id" to="write_off_bp_id"/>-->
                    <!--<a:map from="bp_name" to="write_off_bp_name"/>-->
                    <!--</a:mapping>-->
                    <!--</a:field>-->
                    <a:field name="write_off_classification"/>
                    <a:field name="write_off_classification_desc" required="true" options="ds_csh_write_off_classification_ds" returnField="write_off_classification" valueField="code_value" displayField="code_value_name"/>
                    <a:field name="write_off_cf_item" readOnly="true"/>
                    <a:field name="write_off_cf_item_desc" displayField="cf_item_desc" options="write_off_cf_item_ds" returnField="write_off_cf_item" valueField="cf_item"/>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="csh531_update_fun"/>
                    <!--<a:event name="load" handler="csh531_load_fun"/>-->
                </a:events>
            </a:dataSet>

            <a:dataSet id="csh_write_off_interface_ds" autoQuery="true" fetchAll="true" model="csh.CSH531N.csh_write_off_interface" queryUrl="${/request/@context_path}/autocrud/csh.CSH531N.csh_write_off_interface/query?trx_interface_id=${/parameter/@transaction_id}" selectable="true">
                <a:fields>
                    <a:field name="company_id" defaultValue="${/parameter/@company_id}"/>
                    <a:field name="write_off_date" prompt="核销基准日期" required="true" defaultValue="${/parameter/@transaction_date}"/>
                    <a:field name="write_off_period_name" defaultValue="${/parameter/@period_name}"/>
                    <a:field name="write_off_period_num" defaultValue="${/parameter/@internal_period_num}"/>
                    <a:field name="check_flag" defaultValue="Y"/>
                    <a:field name="record_type" defaultValue="MANUAL"/>
                    <a:field name="write_off_times"/>
                    <a:field name="write_off_amount" required="true" validator="csh531_wf_amount_validate"/>
                    <a:field name="due_date"/>
                    <a:field name="unreceived_amount"/>
                    <a:field name="write_off_cashflow_id"/>
                    <a:field name="contract_id"/>
                    <a:field name="trx_interface_id" defaultValue="${/parameter/@transaction_id}"/>
                    <a:field name="contract_number" prompt="HLS.CONTRACT_NUMBER"  autoComplete="true" lovAutoQuery="true" lovGridHeight="300"  lovHeight="480" lovService="csh.CSH531N.csh_con_contract_lov" lovWidth="800" title="合同号选择">
                        <a:mapping>
                            <a:map from="contract_number" to="contract_number"/>
                            <a:map from="contract_name" to="contract_name"/>
                            <a:map from="contract_id" to="contract_id"/>
                            <a:map from="bp_id_tenant" to="write_off_bp_id"/>
                            <a:map from="bp_id_tenant_name" to="write_off_bp_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="write_off_times" lovHeight="780" lovUrl="${/request/@context_path}/modules/csh/CSH531N/csh_write_off_ref_contract.lview" lovWidth="900" title="合同选择">
                        <a:mapping>
                            <!--<a:map from="contract_id" to="contract_id"/>-->
                            <!--<a:map from="contract_number" to="contract_number"/>-->
                            <!--<a:map from="contract_name" to="contract_name"/>-->
                            <a:map from="times" to="write_off_times"/>
                            <a:map from="cf_item" to="write_off_cf_item"/>
                            <a:map from="cf_item_desc" to="write_off_cf_item_desc"/>
                            <a:map from="left_amount" to="write_off_amount"/>
                            <a:map from="due_date" to="due_date"/>
                            <!-- <a:map from="unreceived_amount" to="unreceived_amount"/> -->
                            <a:map from="cashflow_id" to="write_off_cashflow_id"/>
                            <a:map from="left_principal" to="write_off_principal"/>
                            <a:map from="left_interest" to="write_off_interest"/>
                            <a:map from="left_amount" to="left_amount"/>
                            <a:map from="left_principal" to="left_principal"/>
                            <a:map from="left_interest" to="left_interest"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="batch_id" defaultValue="${/parameter/@batch_id}"/>
                    <a:field name="write_off_type" required="true" defaultValue="RECEIPT_CREDIT"/>
                    <a:field name="write_off_type_desc"   displayField="code_value_name" options="write_off_type_ds" returnField="write_off_type" valueField="code_value"/>
                    <a:field name="write_off_bp_id"/>
                    <!--<a:field name="write_off_bp_name" autoComplete="true" autoCompleteField="true" lovAutoQuery="true" lovGridHeight="300" lovHeight="450" lovService="csh.CSH531N.hls_bp_master" lovWidth="500" title="分配对象选择">-->
                    <!--<a:mapping>-->
                    <!--<a:map from="bp_id" to="write_off_bp_id"/>-->
                    <!--<a:map from="bp_name" to="write_off_bp_name"/>-->
                    <!--</a:mapping>-->
                    <!--</a:field>-->
Darming's avatar
Darming committed
446
<!--                    <a:field name="write_off_classification_desc" prompt="核销分类" options="ds_csh_write_off_classification_ds" returnField="write_off_classification" valueField="code_value" displayField="code_value_name"/>-->
Spencer Chang's avatar
Spencer Chang committed
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
                    <a:field name="write_off_cf_item" readOnly="true"/>
                    <a:field name="write_off_cf_item_desc" displayField="cf_item_desc" options="write_off_cf_item_ds" returnField="write_off_cf_item" valueField="cf_item"/>
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
               <a:gridButton id="csh511_receipt_upload_id" click="attachment_upload" text="附件上传"/>
            </a:screenTopToolbar>
            <a:form title="CSH513.RECEIPT_WRITE_OFF" marginWidth="50">
                <a:box column="4" labelWidth="100">
                    <a:textField name="transaction_num" bindTarget="csh_transaction_receipt_write_off_detail_head_ds"/>
                    <a:textField name="bank_account_name" bindTarget="csh_transaction_receipt_write_off_detail_head_ds"/>
                    <a:textField name="bank_slip_num" bindTarget="csh_transaction_receipt_write_off_detail_head_ds"/>
                    <a:textField name="bank_account_num" bindTarget="csh_transaction_receipt_write_off_detail_head_ds"/>
                </a:box>
                <a:box column="4" labelWidth="100">
                    <a:numberField name="transaction_amount" allowFormat="true" bindTarget="csh_transaction_receipt_write_off_detail_head_ds"/>
                    <a:numberField name="returned_amount" allowFormat="true" bindTarget="csh_transaction_receipt_write_off_detail_head_ds" prompt="HLS.RETURNED_AMOUNT"/>
                    <a:numberField name="write_off_amount" allowFormat="true" bindTarget="csh_transaction_receipt_write_off_detail_head_ds" prompt="HLS.WRITEOFF_AMOUNT"/>
                    <a:numberField name="unwrite_off_amount" allowFormat="true" bindTarget="csh_transaction_receipt_write_off_detail_head_ds" prompt="CSH513.REMAINING_WRITEOFF_AMOUNT"/>
                </a:box>
                <a:box column="4" labelWidth="100">
                    <a:datePicker name="transaction_date" bindTarget="csh_transaction_receipt_write_off_detail_head_ds"/>
                    <a:textField name="csh_bp_name" prompt="收款对象" bindTarget="csh_transaction_receipt_write_off_detail_head_ds"/>
                    <a:textField name="bp_bank_account_name" prompt="对方账户" bindTarget="csh_transaction_receipt_write_off_detail_head_ds"/>
                    <a:textField name="bp_bank_account_num" prompt="对方账号" bindTarget="csh_transaction_receipt_write_off_detail_head_ds"/>
                </a:box>
                <a:box column="4" labelWidth="100">
                    <a:textField name="write_off_flag_desc" prompt="核销状态" bindTarget="csh_transaction_receipt_write_off_detail_head_ds"/>
                    <a:textField name="review_status_desc" prompt="分配状态" bindTarget="csh_transaction_receipt_write_off_detail_head_ds"/>
                    <a:textField name="description" bindTarget="csh_transaction_receipt_write_off_detail_head_ds" prompt="摘要" readOnly="true"/>
                    <a:numberField name="approving_return_amount" allowFormat="true" bindTarget="csh_transaction_receipt_write_off_detail_head_ds" prompt="审批中退款金额"/>
                </a:box>
                <a:box column="4" labelWidth="100">
                <a:textArea colspan="2" name="ref_v05" bindTarget="csh_transaction_receipt_write_off_detail_head_ds" prompt="备注" width="370"/>
                <a:gridButton click="csh531n_save" text="HLS.SAVE"/>
                </a:box>
                <!--<a:box column="2" labelWidth="100">-->
                <!--<a:textArea name="description" bindTarget="csh_transaction_receipt_write_off_detail_head_ds" prompt="摘要" readOnly="true" width="405"/>-->
                <!--</a:box>-->
            </a:form>
            <a:tabPanel height="500" marginWidth="50">
                <a:tabs >
                    <a:tab prompt="预核销" width="120">
                        <a:grid id="csh_write_off_assigns_grid" bindTarget="csh_write_off_assigns_ds" height="370"  marginWidth="100">
                            <a:toolBar>
                                <a:button id="csh_grid_add_bt" type="add"/>
                                <a:button id="csh_grid_delete_bt" type="delete"/>
                                <a:button id="csh_grid_save_bt" type="save"/>
                                <a:button di="csh_grid_submit_bt" text="预核销" click="csh532n_csh_assigns_confirm"/>
                            </a:toolBar>
                            <a:columns>
                                <!--<a:column name="csh_bank_slip_num" footerRenderer="summaryRenderer" prompt="CSH531.BANK_SLIP_NUM" width="120"/>-->
                                <!--<a:column name="write_off_type_desc" editorFunction="csh_edit_function" prompt="HLS.WRITE_OFF_TYPE" width="100"/>-->
                                <a:column name="contract_number" editorFunction="csh_edit_function" prompt="HLS.CONTRACT_NUMBER" width="120"/>
                                <a:column name="write_off_bp_name" editorFunction="csh_edit_function" prompt="CSH531.WRITE_OFF_BP_NAME" width="100"/>
                                <!--<a:column name="write_off_times" editorFunction="csh_edit_function" prompt="HLS.TIMES" width="80"/>-->
                                <!--<a:column name="write_off_cf_item_desc" editorFunction="csh_edit_function" prompt="CSH531.CF_ITEM" width="80"/>-->
                                <!--<a:column name="due_date" editorFunction="csh_edit_function" prompt="CSH531.WRITE_OFF_DATE" renderer="Leaf.formatDate" width="80"/>-->
                                <!--<a:column name="left_amount" align="right" footerRenderer="summaryRenderer" prompt="剩余金额" renderer="Leaf.formatMoney" width="120"/>-->
                                <!--&lt;!&ndash;<a:column name="left_principal" align="right" footerRenderer="summaryRenderer" prompt="剩余本金" renderer="Leaf.formatMoney" width="120"/>&ndash;&gt;-->
                                <!--<a:column name="left_interest" align="right" footerRenderer="summaryRenderer" prompt="剩余利息" renderer="Leaf.formatMoney" width="120"/>-->
Darming's avatar
Darming committed
510
<!--                                <a:column name="write_off_classification_desc" editorFunction="csh_edit_function" prompt="核销分类" />-->
Spencer Chang's avatar
Spencer Chang committed
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
                                <a:column name="write_off_date" align="center" editorFunction="csh_edit_function" renderer="Leaf.formatDate" prompt="核销基准日期" width="120"/>
                                <a:column name="write_off_amount" align="right" editorFunction="csh_edit_function" footerRenderer="summaryRenderer" prompt="CSH531.AMOUNT" renderer="Leaf.formatMoney" width="120"/>
                                <!--<a:column name="write_off_principal" align="right" prompt="分配本金" renderer="Leaf.formatMoney" width="120"/>-->
                                <!--<a:column name="write_off_interest" align="right" prompt="分配利息" renderer="Leaf.formatMoney" width="120"/>-->
                                <!--<a:column name="agent_id_desc" editorFunction="csh_edit_function" prompt="代理商"/>-->
                            </a:columns>
                            <a:editors>
                                <a:textField id="csh_write_off_grid_tf"/>
                                <a:numberField id="csh_write_off_grid_nf"  allowNegative="false" />
                                <a:datePicker id="csh_write_off_grid_dp"/>
                                <a:comboBox id="csh_write_off_grid_cb"/>
                                <a:lov id="csh_write_off_grid_lv"/>
                            </a:editors>
                        </a:grid>
                    </a:tab>
                    <a:tab prompt="预核销结果" width="120">
                        <a:grid id="csh_write_off_interface_grid" bindTarget="csh_write_off_interface_ds" height="370"   marginWidth="100">

                            <a:columns>
                                <!--<a:column name="csh_bank_slip_num" footerRenderer="summaryRenderer" prompt="CSH531.BANK_SLIP_NUM" width="120"/>-->
                                <a:column name="write_off_type_desc" prompt="HLS.WRITE_OFF_TYPE" width="100"/>
                                <a:column name="contract_number" prompt="HLS.CONTRACT_NUMBER" width="120"/>
                                <a:column name="write_off_bp_name" prompt="CSH531.WRITE_OFF_BP_NAME" width="100"/>
                                <a:column name="write_off_times" editorFunction="csh_edit_function" prompt="HLS.TIMES" width="80"/>
                                <a:column name="write_off_cf_item_desc" editorFunction="csh_edit_function" prompt="CSH531.CF_ITEM" width="80"/>
                                <a:column name="due_date" editorFunction="csh_edit_function" prompt="CSH531.WRITE_OFF_DATE" renderer="Leaf.formatDate" width="80"/>
                                <a:column name="left_amount" align="right" footerRenderer="summaryRenderer" prompt="剩余金额" renderer="Leaf.formatMoney" width="120"/>
                                <!--<a:column name="left_principal" align="right" footerRenderer="summaryRenderer" prompt="剩余本金" renderer="Leaf.formatMoney" width="120"/>-->
                                <!--<a:column name="left_interest" align="right" footerRenderer="summaryRenderer" prompt="剩余利息" renderer="Leaf.formatMoney" width="120"/>-->
Darming's avatar
Darming committed
540
<!--                                <a:column name="write_off_classification_desc" editorFunction="csh_edit_function" prompt="核销分类"/>-->
Spencer Chang's avatar
Spencer Chang committed
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558
                                <a:column name="write_off_date" align="center" editorFunction="csh_edit_function" renderer="Leaf.formatDate" prompt="核销基准日" width="120"/>
                                <a:column name="write_off_amount" align="right" editorFunction="csh_edit_function" footerRenderer="summaryRenderer" prompt="CSH531.AMOUNT" renderer="Leaf.formatMoney" width="120"/>
                                <!--<a:column name="write_off_principal" align="right" prompt="分配本金" renderer="Leaf.formatMoney" width="120"/>-->
                                <!--<a:column name="write_off_interest" align="right" prompt="分配利息" renderer="Leaf.formatMoney" width="120"/>-->
                                <!--<a:column name="agent_id_desc" editorFunction="csh_edit_function" prompt="代理商"/>-->
                            </a:columns>

                        </a:grid>
                    </a:tab>
                </a:tabs>
            </a:tabPanel>

        </a:screenBody>
        <script type="text/javascript"><![CDATA[
        Leaf.onReady(init);
        ]]></script>
    </a:view>
</a:screen>