ccb_upload.lview 5.92 KB
Newer Older
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
<?xml version="1.0" encoding="UTF-8"?>

<a:screen xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
    <a:init-procedure>
        <a:model-query model="ccb.CCB600.get_import_head_id" rootPath="header"/>
        <a:import-excel header_id="${/model/header/record/@header_id}" separator=","
                        status_field="/parameter/@ImportSuccess" template_code="CCB_MANUAL_IMPORT"
                        user_id="${/session/@user_id}"/>
<!--        <a:model-query-->
<!--                defaultWhereClause="header_id=${/model/header/record/@header_id} and TEMPLATE_CODE = &apos;CCB_MANUAL_IMPORT&apos;"-->
<!--                model="ccb.CCB503.ccb503_import_get_status" rootPath="status"/>-->
    </a:init-procedure>
    <a:view>
        <a:link id="import_interface_write_off_link" model="ccb.CCB600.ccb_import_ln" modelaction="update"/>
        <script type="text/javascript"><![CDATA[
            function backBtn() {
                history.go(-1);
            }
            
            var import_flag = 0;
            
            function import_confirm() {
                if(!$('ccb_form_ds').validate()){
                    return;
                }
                var transaction_date = $('ccb_form_ds').getCurrentRecord().get('transaction_date');
                $('import_confirm_id').disable();
                var ds = $('ccb_import_grid_ds');
                record = ds.getAll();
                if (import_flag == 0) {
                    for (i = 0;i < record.length;i++) {
                        if (record[i].get('status') == 'ERROR') {
                            Leaf.showMessage('${l:PROMPT}', '导入的数据存在错误,请查看错误信息!');
                            return;
                        }
                    }
                    Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
                    Leaf.request({
                        url: $('import_interface_write_off_link').getUrl(),
                        para: {
                            /*'header_id': '${/parameter/@header_id}'*/
                            header_id: '${/model/header/record/@header_id}',
                            batch_id: '${/parameter/@batch_id}',
                            transaction_date: transaction_date
                        },
                        scope: this,
                        success: function() {
                            import_flag = import_flag + 1;
                            Leaf.SideBar.show({
                                msg: '操作成功',
                                duration: 2000
                            });
                            Leaf.Masker.unmask(Ext.getBody());
                        },
                        error: function(){
                            Leaf.Masker.unmask(Ext.getBody());
                        },
                        failure: function() {
                            Leaf.Masker.unmask(Ext.getBody());
                       }
                    });
                } else {
                    Leaf.showMessage('${l:PROMPT}', '已导入的数据不能重复导入!');
                    return;
                }
            }
        ]]></script>
        <a:dataSets>
            <a:dataSet id="ccb_import_grid_ds" autoPageSize="true" autoQuery="true" model="ccb.CCB600.ccb_import_ln" queryUrl="${/request/@context_path}/autocrud/ccb.CCB600.ccb_import_ln/query?header_id=${/model/header/record/@header_id}" selectable="true"/>
        </a:dataSets>
        <a:dataSets>
            <a:dataSet id="ccb_form_ds" autoCreate="true">
                <a:fields>
Darming's avatar
Darming committed
74
                    <a:field name="transaction_date" defaultValue="${/parameter/@due_date_to}" required="true" prompt="建行划扣截止日期"/>
75 76 77 78 79 80 81 82 83 84
                </a:fields>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <a:gridButton click="backBtn" text="HLS.EXIT"/>
                <a:gridButton id="import_confirm_id" click="import_confirm" text="确认导入"/>
            </a:screenTopToolbar>
            <a:form column="1" labelWidth="120" marginWidth="30">
Darming's avatar
Darming committed
85
                <a:datePicker name="transaction_date" readOnly="true" bindTarget="ccb_form_ds" prompt="建行划扣交易日期"/>
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
            </a:form>
            <a:grid bindTarget="ccb_import_grid_ds" marginHeight="230" marginWidth="50" navBar="true">
                <a:columns>
                    <a:column name="attribute_1" prompt="序号" width="80"/>
                    <a:column name="attribute_2" prompt="账号"/>
                    <a:column name="attribute_3" prompt="户名" width="150"/>
                    <a:column name="attribute_4" align="right" prompt="发起金额" renderer="Leaf.formatMoney"/>
                    <a:column name="attribute_5" align="right" prompt="成功金额" renderer="Leaf.formatMoney"/>
                    <a:column name="attribute_6" align="center" prompt="跨行标识"/>
                    <a:column name="attribute_7" align="center" prompt="行名" width="170"/>
                    <a:column name="attribute_8" align="center" prompt="行号" width="170"/>
                    <a:column name="attribute_9" align="center" prompt="多方协议号" width="150"/>
                    <a:column name="attribute_10" align="center" prompt="标识号" width="150"/>
                    <a:column name="attribute_11" align="center" prompt="摘要" width="150"/>
                    <a:column name="attribute_12" align="center" prompt="备注" width="150"/>
                    <a:column name="attribute_13" align="center" prompt="银行卡类型" width="150"/>
                    <a:column name="attribute_14" align="center" prompt="成功标志" width="150"/>
                    <a:column name="attribute_15" align="center" prompt="失败原因" width="150"/>
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>