<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: gaoyang
    $Date: 2013-12-3 上午11:18:39
    $Revision: 1.0
    $Purpose:
-->
<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="hls.HLS530.get_batch_id" rootPath="batch_id_path"/> -->
        <a:model-query defaultWhereClause="t1.document_category = &apos;JE&apos;" fetchAll="true"
                       model="basic.hls_document_type_for_lov" queryOrderBy="document_type desc"
                       rootPath="hls_document_type_path"/>
    </a:init-procedure>
    <a:view>
        <a:link id="welcome_link_id" url="${/request/@context_path}/welcome.lview"/>
        <a:link id="hls_journal_con_contract_update_link_id"
                url="${/request/@context_path}/modules/hls/HLS530/manual_journal_create.lview"/>
        <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
                modelaction="update"/>
        <a:link id="check_link" url="${/request/@context_path}/modules/hls/HLS530/hls_journal_check.lsc"/>
        <a:link id="test_link" url="${/request/@context_path}/test.lsc"/>
        <a:link id="export_jum_link" model="hls.HLS301.hls_journal_post_to_nc" modelaction="batch_update"/>
        <a:link id="gh_nc_je_log_link" url="${/request/@context_path}/modules/nc/NC100/hls_nc_bp_log_query.lview"/>
        <a:link id="hls_sap_transafer_link" model="sap.hls_sap_transfer" modelaction="batch_update"/>
        <a:link id="hls_sap_send_link" model="sap.submit_process_accounts" modelaction="batch_update"/>
        <a:link id="transfer_voucher_link"
                url="${/request/@context_path}/modules/interface/INTERFACE_KINGDEE/kingdee_importvoucher_interface.lsc"/>
        <a:link id="kingdee_interface_logs_id"
                url="${/request/@context_path}/modules/hls/HLS530/kingdee_interface_logs.lview"/>
        <a:link id="hls301_sap_eai_create_account_link"
                url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_CrAccount.lsc"/>
        <a:link id="hls301_sap_eai_reverse_account_link"
                url="${/request/@context_path}/modules/interface/INTERFACE_EAI/hls_sap_eai_ReAccount.lsc"/>
        <script type="text/javascript"><![CDATA[
        function render_line(record, rowIndex) {
            if (record.get('kingdee_head_flag') == 'N' || record.get('kingdee_line_assist_flag') == 'N') {
                return 'background-color:#FFC0CB';
            }
        }

        function lock_current_window() {
            Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
        }

        function unlock_current_window() {
            Leaf.Masker.unmask(Ext.getBody());
        }

        //查询按钮

        function hls301_journal_query() {
            $('hls_journal_header_result_ds').query();
        }

        //重置按钮

        function hls301_journal_reset() {
            $('hls_journal_header_query').reset();
        }

        //退出按钮

        function hls301_journal_exit() {
            location.href = $('welcome_link_id').getUrl();
            parent.shMenu('show');
        }

        function construct_from_to() {
            var config = ['responsibility_center_code', 'responsibility_center_name', 'account_code', 'account_name'];
            var pattern = ['_from', '_to'];
            var obj = {};
            for (var i = 0,
                     j = config.length; i < j; i++) {
                for (var m = 0,
                         n = pattern.length; m < n; m++) {
                    obj[config[i] + pattern[m]] = config[i] + pattern[n - 1 - m];
                }
            }
            return obj;
        }

        function onUpdate_para_journalQueryDs(ds, record, name, value, oldvalue) {
            var from_to = construct_from_to();
            var opposite_name = from_to[name];
            if (!Ext.isEmpty(opposite_name)) {
                var opposite_value = record.get(opposite_name);
                if (!Ext.isEmpty(value) && Ext.isEmpty(opposite_value)) {
                    record.set(opposite_name, value);
                }
            }

        }

        function hls301_link_dynamic(reocrd_id, journal_header_id) {

            var maintain_type = 'READONLY';
            var record = $('hls_journal_header_result_ds').findById(reocrd_id);


            var param = record.data;
            param['function_code'] = 'HLS301';
            param['document_id'] = journal_header_id;
            param['document_category'] = 'JE';
            param['function_usage'] = 'QUERY';
            param['maintain_type'] = maintain_type;
            param['url_title'] = '${l:HLS530.JOURNAL_LINE_QUERY}';
            hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'hls_journal_con_contract_update_link_id');
        }

        function hls_journal_post_kingdee() {
            var url = $('transfer_voucher_link').getUrl();
            if (0) {
                Leaf.showMessage('${l:HLS.PROMPT}', '请先传递凭证辅助段');
            } else {
                lock_current_window();
                var ds = $('hls_journal_header_result_ds');
                var records = ds.getSelected();
                if (records.length == 0) {
                    unlock_current_window();
                    Leaf.showMessage('${l:HLS.PROMPT}', '请选择一条数据');
                    return;
                }
                var datas = [];
                // var batch_id = ${/model/batch_id_path/record/@batch_id};
                for (var i = 0; i < records.length; i++) {
                    //Check
                    if (records[i].get('kingdee_line_assist_flag') == 'N') {
                        unlock_current_window();
                        Leaf.showMessage('${l:HLS.PROMPT}', '辅助账信息有误或缺失,请检查数据!');
                        return;
                    }

                    if (records[i].get('post_gl_status') == 'CLOSE') {
                        unlock_current_window();
                        Leaf.showMessage('${l:HLS.PROMPT}', '所选凭证已经关闭,请重新选择!');
                        return;
                    }
                    var obj = {};
                    obj['journal_id'] = records[i].get('journal_header_id');
                    obj['_status'] = 'update';
                    // obj['batch_id'] = batch_id;
                    datas[i] = obj;
                }
                Leaf.showConfirm('提示', '确定导入凭证到金蝶吗?', function () {
                    Leaf.request({
                        url: $('check_link').getUrl(),
                        para: datas,
                        success: function (res) {
                            Leaf.request({
                                url: url,
                                para: datas,
                                success: function (res) {
                                    unlock_current_window();
                                    Leaf.SideBar.show({
                                        msg: '${l:HLS.SUBMIT_SUCCESS}',
                                        duration: 2000
                                    });
                                    var kingdee_url = $('kingdee_interface_logs_id').getUrl() + '?batch_id=' + res.result.batch_id_path.record[0].batch_id;
                                    var win = new Leaf.Window({
                                        url: kingdee_url,
                                        title: '金蝶导入日志',
                                        id: 'kingdee_interface_logs_winid',
                                        width: 850,
                                        height: 400
                                    });
                                    win.on('close', function () {
                                        hls301_journal_query();
                                    });
                                },
                                failure: function () {
                                    unlock_current_window();
                                },
                                error: function () {
                                    unlock_current_window();
                                },
                                scope: this
                            });
                        },
                        failure: function () {
                            unlock_current_window();
                        },
                        error: function () {
                            unlock_current_window();
                        },
                        scope: this
                    });
                }, function () {
                    unlock_current_window();
                });
            }
        }

        function export_jum(journal_header_id) {
            Leaf.request({
                url: $('export_jum_link').getUrl(),
                para: {
                    journal_header_id: journal_header_id
                },
                success: function (res) {
                    $('hls_journal_header_result_ds').query();
                },
                failure: function () {
                    f_hls.winNoMask();
                },
                error: function () {
                    f_hls.winNoMask();
                },
                scope: this
            });
        }

        function journal_import(datas) {
            lock_current_window();
            Leaf.request({
                url: $('export_jum_link').getUrl(),
                para: datas,
                success: function (res) {
                    unlock_current_window();
                    $('hls_journal_header_result_ds').query();
                },
                failure: function () {
                    unlock_current_window();
                },
                error: function () {
                    unlock_current_window();
                },
                scope: this
            });
        }

        function hls301_journal_import() {
            var ds = $('hls_journal_header_result_ds');
            var records = ds.getSelected();
            if (records.length == 0) {
                Leaf.showMessage('提示', '请选择一条数据进行操作!');
                return;
            }
            var datas = [];
            for (var i = 0; i < records.length; i++) {
                var obj = {};
                obj['journal_header_id'] = records[i].get('journal_header_id');

                obj['_status'] = 'execute';
                datas[i] = obj;
            }
            journal_import(datas);
        }

        function hls301_journal_num_render(value, record, name) {
            if (name == 'journal_num') {
                return '<a href="javascript:hls301_link_dynamic(' + record.id + ',' + record.get('journal_header_id') + ');">' + value + '</a>';
            }
            if (name == 'export') {
                if (record.get('post_gl_status') != 'Y') {
                    return '<a href="javascript:export_jum(' + record.get('journal_header_id') + ');">' + '导入' + '</a>';
                }
            }
            if (name == 'nc_log') {
                if (record.get('result_id')) {
                    return '<a href="javascript:openLogPage(\'' + record.get('result_id') + '\')";>日志</a>';
                }
            }
        }

        function openLogPage(result_id) {
            new Leaf.Window({
                id: 'hls_nc_bp_log_window',
                url: $('gh_nc_je_log_link').getUrl() + '?result_id=' + result_id,
                title: '日志信息',
                height: 450,
                width: 700
            });
        }

        function on_loan_journal_header_query(ds, qpara) {
            qpara['gld_flag'] = 'N';
        }

        function select_check_box(record) {
            if (record.get('post_gl_status') == 'Y') {
                return false;
            } else {
                return true;
            }
        }

        function hls301_sap_transafer() {
            var detail_mask = Ext.getBody();
            var ds = $('hls_journal_header_result_ds');
            var records = ds.getSelected();
            if (records.length == 0) {
                return;
            }
            var datas = [];
            for (var i = 0; i < records.length; i++) {
                var obj = {};
                obj['journal_header_id'] = records[i].get('journal_header_id');
                obj['_status'] = 'update';
                datas[i] = obj;
            }
            Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
            Leaf.request({
                url: $('hls_sap_transafer_link').getUrl(),
                para: datas,
                success: function (res) {
                    Leaf.SideBar.show({
                        msg: '${l:HLS.SUBMIT_SUCCESS}',
                        duration: 2000
                    });
                    Leaf.Masker.unmask(detail_mask);
                },
                failure: function () {
                    Leaf.Masker.unmask(detail_mask);
                },
                error: function () {
                    Leaf.Masker.unmask(detail_mask);
                },
                scope: this
            });
        }

        function hls301_sap_send() {
            var detail_mask = Ext.getBody();
            var ds = $('hls_journal_header_result_ds');
            var records = ds.getSelected();
            if (records.length == 0) {
                return;
            }
            var datas = [];
            for (var i = 0; i < records.length; i++) {
                var obj = {};
                obj['journal_header_id'] = records[i].get('journal_header_id');
                obj['_status'] = 'update';
                datas[i] = obj;
            }
            Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');
            Leaf.request({
                url: $('hls_sap_send_link').getUrl(),
                para: datas,
                success: function (res) {
                    Leaf.SideBar.show({
                        msg: '${l:HLS.SUBMIT_SUCCESS}',
                        duration: 2000
                    });
                    $('hls_journal_header_result_ds').query($('hls_journal_header_result_ds').currentPage);
                    Leaf.Masker.unmask(detail_mask);
                },
                failure: function () {
                    Leaf.Masker.unmask(detail_mask);
                },
                error: function () {
                    Leaf.Masker.unmask(detail_mask);
                },
                scope: this
            });
        }

        function hls301_sap_post() {

            var detail_mask = Ext.getBody();
            var ds = $('hls_journal_header_result_ds');
            var records = ds.getSelected();

            if (records.length == 0) {
                unlock_current_window();
                Leaf.showMessage('${l:HLS.PROMPT}', '请选择一条数据');
                return;
            }

            //非反冲凭证
            var datas = [];
            //反冲凭证
            var re_datas = [];

            for (var i = 0; i < records.length; i++) {
                if (records[i].get('sap_belnr')) {
                    Leaf.showMessage('提示', '凭证 ' + records[i].get('journal_num') + ' 已传输SAP,请勿重复传输!');
                    return;
                }

                var obj = {};
                var re_obj = {};

                if (records[i].get('reversed_flag') == 'R' && records[i].get('reversed_19_flag') == 'Y') {

                    if (!records[i].get('re_sap_belnr')) {
                        Leaf.showMessage('提示', '请先传输反冲凭证 ' + records[i].get('journal_num') + ' 的原凭证 ' + records[i].get('re_journal_num'));
                        return;
                    }

                    re_obj['journal_header_id'] = records[i].get('journal_header_id');
                    re_obj['_status'] = 'update';
                    re_datas[i] = re_obj;

                } else {

                    obj['journal_header_id'] = records[i].get('journal_header_id');
                    obj['_status'] = 'update';
                    datas[i] = obj;

                }
            }

            Leaf.Masker.mask(detail_mask, '${l:HLS.EXECUTING}');

            Leaf.request({
                url: $('hls301_sap_eai_create_account_link').getUrl(),
                para: datas,
                success: function (res) {
                    if (re_datas.length > 0) {
                        Leaf.request({
                            url: $('hls301_sap_eai_reverse_account_link').getUrl(),
                            para: re_datas,
                            success: function (res) {
                                Leaf.SideBar.show({
                                    msg: '传输成功!',
                                    duration: 2000
                                });

                                $('hls_journal_header_result_ds').query($('hls_journal_header_result_ds').currentPage);
                                Leaf.Masker.unmask(detail_mask);

                                //将按钮设置为不可选择
                                $('hls301_sap_post_id').disable()
                                var t1 = window.setInterval(buttonChange, 5000);

                            },
                            failure: function () {
                                Leaf.Masker.unmask(detail_mask);
                            },
                            error: function () {
                                Leaf.Masker.unmask(detail_mask);
                            },
                            scope: this
                        });
                    } else {
                        Leaf.SideBar.show({
                            msg: '传输成功!',
                            duration: 2000
                        });

                        $('hls_journal_header_result_ds').query($('hls_journal_header_result_ds').currentPage);
                        Leaf.Masker.unmask(detail_mask);
                    }
                },
                failure: function () {
                    Leaf.Masker.unmask(detail_mask);
                },
                error: function () {
                    Leaf.Masker.unmask(detail_mask);
                },
                scope: this
            });


        }

        function buttonChange() {
            $('hls301_sap_post_id').enable();
            window.clearInterval(t1);
        }

        function hls301_export(){
            $('hls_journal_headers_grid')._export(null,'子系统凭证查询');
        }
        window['${/parameter/@layout_code}_on_layout_dynamic_grid_query'] = function (ds, qpara, bp_seq) {
            //异步打印
            ds.setQueryParameter('__async__', 'Y');
        };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
        <a:dataSets>
            <a:dataSet id="hls301_yes_no_ds" lookupCode="YES_NO"/>
            <a:dataSet id="hls_document_type_ds">
                <a:datas dataSource="/model/hls_document_type_path"/>
            </a:dataSet>
            <a:dataSet id="post_gl_status_ds" lookupCode="SUBSYSTEM_POST_GL_FLAG"/>
            <a:dataSet id="hls_journal_header_query">
                <a:fields>
                    <a:field name="journal_num"/>
                    <a:field name="category_code_desc" displayField="description" options="hls_document_type_ds"
                             returnField="category_code" valueField="document_type"/>

                    <a:field name="post_sap_desc" displayField="code_value_name" options="hls301_yes_no_ds"
                             returnField="post_sap" valueField="code_value"/>

                    <a:field name="journal_date_from" datatype="date"
                    defaultValue="${/model/sys_default_time/record/@month_first_day}"/>
                    <a:field name="journal_date_to"/>
                    <a:field name="total_amount_dr_from"/>
                    <a:field name="total_amount_dr_to"/>
                    <a:field name="period_name"/>
                    <a:field name="external_journal_num"/>
                    <a:field name="bp_id_tenant"/>
                    <a:field name="bp_id_tenant_desc" lovGridHeight="350" lovHeight="550"
                             lovService="basic.hls_bp_master_v_for_lov?bp_category=TENANT" lovWidth="500">
                        <a:mapping>
                            <a:map from="bp_name" to="bp_id_tenant_desc"/>
                            <a:map from="bp_id" to="bp_id_tenant"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="source_table"/>
                    <a:field name="reference1"/>
                    <a:field name="je_transaction_code"/>
                    <a:field name="je_transaction_desc" lovGridHeight="420" lovHeight="550" lovPageSize="20"
                             lovService="gld.GLD104.gld_je_transaction_for_lov" lovWidth="500">
                        <a:mapping>
                            <a:map from="je_transaction_code" to="je_transaction_code"/>
                            <a:map from="je_transaction_desc" to="je_transaction_desc"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="post_gl_status"/>
                    <a:field name="post_gl_status_desc" displayField="code_value_name" options="post_gl_status_ds"
                             returnField="post_gl_status" valueField="code_value"/>
                    <a:field name="responsibility_center_name_from" lovHeight="500" lovLabelWidth="100"
                             lovService="fnd.FND2110.fnd_responsibility_centers_lov" lovWidth="550"
                             title="HLS.RESPONSIBILITY_CENTER_NAME">
                        <a:mapping>
                            <a:map from="responsibility_center_id" to="responsibility_center_id"/>
                            <a:map from="responsibility_center_code" to="responsibility_center_code_from"/>
                            <a:map from="responsibility_center_name" to="responsibility_center_name_from"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="responsibility_center_name_to" lovHeight="500" lovLabelWidth="100"
                             lovService="fnd.FND2110.fnd_responsibility_centers_lov" lovWidth="550"
                             title="HLS.RESPONSIBILITY_CENTER_NAME">
                        <a:mapping>
                            <a:map from="responsibility_center_code" to="responsibility_center_code_to"/>
                            <a:map from="responsibility_center_name" to="responsibility_center_name_to"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="account_code_from" autoComplete="true" lovHeight="500" lovLabelWidth="100"
                             lovService="hls.HLS301.hls_journal_account_for_lov" lovWidth="500"
                             title="HLS530.ACCOUNT_NAME">
                        <a:mapping>
                            <a:map from="account_code" to="account_code_from"/>
                            <a:map from="description" to="account_name_from"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="account_code_to" autoComplete="true" lovHeight="600" lovLabelWidth="100"
                             lovUrl="${/request/@context_path}/modules/hls/HLS530/gld_company_account_tree.lview"
                             lovWidth="550" title="HLS530.ACCOUNT_NAME">
                        <a:mapping>
                            <a:map from="account_code" to="account_code_to"/>
                            <a:map from="description" to="account_name_to"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="company_short_name" lovHeight="500" lovLabelWidth="100"
                             lovService="fnd.fnd_companies_lov" lovWidth="550" title="HLS530.JOURNAL_COMPANY">
                        <a:mapping>
                            <a:map from="company_id" to="je_company_id"/>
                            <a:map from="company_short_name" to="company_short_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="currency_code" lovHeight="500" lovLabelWidth="100"
                             lovService="basic.gld_currency_v_lov" lovWidth="550">
                        <a:mapping>
                            <a:map from="currency_code" to="currency_code"/>
                            <a:map from="currency_name" to="currency_name"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="created_by_n" autoComplete="true" lovGridHeight="300" lovHeight="450"
                             lovService="basic.sys_user_for_lov" lovWidth="500"
                             title="员工选择">
                        <a:mapping>
                            <a:map from="description" to="created_by_n"/>
                            <a:map from="user_id" to="created_by"/>
                        </a:mapping>
                    </a:field>
                    <a:field name="contract_number"/>
                    <a:field name="external_journal_num"/>
                    <a:field name="merge_parent_flag_desc" defaultValue="否" displayField="code_value_name"
                             options="hls301_yes_no_ds" returnField="merge_parent_flag" valueField="code_value"/>
                    <a:field name="merge_parent_flag" defaultValue="N"/>
                    <a:field name="__async__"  defaultValue="Y" prompt="异步导出"/>
                </a:fields>
                <a:events>
                    <a:event name="update" handler="onUpdate_para_journalQueryDs"/>
                </a:events>
            </a:dataSet>
            <a:dataSet id="hls_journal_header_result_ds" autoPageSize="true" autoQuery="false"
                       model="hls.HLS301.hls_journal_header_v" queryDataSet="hls_journal_header_query"
                       selectFunction="select_check_box" selectable="true">
                <a:events>
                    <a:event name="query" handler="on_loan_journal_header_query"/>
                </a:events>
            </a:dataSet>
        </a:dataSets>
        <a:screenBody>
            <a:screenTopToolbar>
                <a:screenTitle/>
                <!-- <a:toolbarButton click="hls301_journal_exit" text="HLS.EXIT"/> -->
                <a:toolbarButton id="hls301_journal_query_id" click="hls301_journal_query" text="HLS.QUERY"/>
                <a:toolbarButton click="hls301_journal_reset" text="HLS.RESET"/>
                <!--<a:toolbarButton id="hls301_journal_post_ref_id" click="hls_journal_post_kingdee" text="凭证传输"/>-->
                <!--<a:toolbarButton click="hls301_journal_import" text="批量导入"/>
                <a:toolbarButton click="hls301_sap_transafer" text="转换为SAP凭证"/>
                <a:toolbarButton click="hls301_sap_send" text="发送SAP凭证"/> -->
                <a:toolbarButton id="hls301_sap_post_id" click="hls301_sap_post" text="传输SAP"/>
            </a:screenTopToolbar>
            <a:form column="4" labelSeparator=" " labelWidth="100" marginWidth="80" title="HAP_QUERY_TITLE">
                <!-- <a:lov name="account_code_from" bindTarget="hls_journal_header_query" prompt="HLS530.ACCOUNT_NAME_FROM"/>
                <a:lov name="account_code_to" bindTarget="hls_journal_header_query" prompt="HLS530.ACCOUNT_NAME_TO"/> -->
                <a:comboBox name="merge_parent_flag_desc" bindTarget="hls_journal_header_query" prompt="合并凭证"/>
                <a:lov name="je_transaction_desc" bindTarget="hls_journal_header_query" prompt="HLS530.JE_TRANSACTION"/>
                <!-- <a:lov name="responsibility_center_name_from" bindTarget="hls_journal_header_query" prompt="HLS530.RESPONSIBILITY_CENTER_NAME_FROM"/> -->
                <!-- <a:lov name="responsibility_center_name_to" bindTarget="hls_journal_header_query" prompt="HLS530.RESPONSIBILITY_CENTER_NAME_TO"/> -->
                <!-- <a:lov name="company_short_name" bindTarget="hls_journal_header_query" prompt="HLS530.JOURNAL_COMPANY"/> -->
                <a:datePicker name="journal_date_from" bindTarget="hls_journal_header_query"
                              prompt="HLS530.JOURNAL_DATE_FROM"/>
                <a:datePicker name="journal_date_to" bindTarget="hls_journal_header_query"
                              prompt="HLS530.JOURNAL_DATE_TO"/>
                <a:numberField name="total_amount_dr_from" allowFormat="true" bindTarget="hls_journal_header_query"
                               prompt="HLS530.TOTAL_AMOUNT_DR_FROM"/>
                <a:numberField name="total_amount_dr_to" allowFormat="true" bindTarget="hls_journal_header_query"
                               prompt="HLS530.TOTAL_AMOUNT_DR_TO"/>
                <!-- <a:textField name="project_name" bindTarget="hls_journal_header_query" prompt="HLS.PROJECT_NAME"/> -->
                <!-- <a:lov name="currency_code" bindTarget="hls_journal_header_query" prompt="HLS.CURRENCY"/> -->
                <a:lov name="bp_id_tenant_desc" bindTarget="hls_journal_header_query" prompt="HLS.TENANT_CODE"/>
                <a:comboBox name="post_sap_desc" bindTarget="hls_journal_header_query" prompt="是否传递sap"/>
                <!--<a:comboBox name="post_gl_status_desc" bindTarget="hls_journal_header_query" prompt="HLS530.IS_POSTED"/>-->
                <!-- <a:textField name="external_journal_num" bindTarget="hls_journal_header_query" prompt="HLS530.EXTERNAL_JOURNAL_NUM"/> -->
                <!-- <a:textField name="reference1" bindTarget="hls_journal_header_query" prompt="HLS530.REFERENCE1"/> -->
                <!--<a:textField name="contract_number" bindTarget="hls_journal_header_query" prompt="合同编号"/>-->
                <a:textField name="description" bindTarget="hls_journal_header_query"
                             prompt="HLS530.JOURNAL_DESCRIPTION"/>
                <a:textField name="journal_num" bindTarget="hls_journal_header_query" prompt="HLS530.JOURNAL_NUM"/>
                <a:textField name="sap_belnr" bindTarget="hls_journal_header_query" prompt="SAP凭证号"/>
                <a:lov name="created_by_n" bindTarget="hls_journal_header_query" prompt="制证人"/>
            </a:form>
            <a:grid id="hls_journal_headers_grid" bindTarget="hls_journal_header_result_ds" marginHeight="280"
                    marginWidth="80" navBar="true">
                <a:toolBar>
                    <a:button click="hls301_export" text="导出"/>
                </a:toolBar>
                <a:columns>
                    <a:column name="journal_num" lock="true" prompt="HLS530.JOURNAL_NUM"
                              renderer="hls301_journal_num_render" width="120"/>
                    <!--<a:column name="external_journal_num" align="center" prompt="金蝶凭证号" width="130"/>-->
                    <a:column name="sap_belnr" align="center" prompt="SAP凭证号" width="110"/>
                    <a:column name="js_company_short_name" prompt="HLS530.JOURNAL_COMPANY" width="90"/>
                    <a:column name="period_name" align="center" prompt="HLS530.PERIOD_NAME" width="80"/>
                    <a:column name="journal_date" align="center" prompt="HLS530.JOURNAL_DATE" renderer="Leaf.formatDate"
                              width="90"/>
                    <a:column name="currency_desc" align="center" prompt="HLS.CURRENCY" width="80"/>
                    <a:column name="total_amount_fuc_dr" align="right" prompt="金额" renderer="Leaf.formatMoney"
                              width="120"/>
                    <a:column name="je_transaction_desc" prompt="HLS530.JE_TRANSACTION" width="150"/>
                    <a:column name="post_gl_status_desc" align="center" prompt="HLS.STATUS" width="100"/>
                    <a:column name="description" prompt="HLS530.JOURNAL_DESCRIPTION" width="220"/>
                    <a:column name="created_by_n" prompt="制证人"/>
                    <a:column name="re_meg" prompt="凭证回传信息" width="300"/>

                    <!-- <a:column name="export" prompt="导入" width="50"  align="center"  renderer="hls301_journal_num_render"/> -->
                    <!-- <a:column name="nc_log" align="center" prompt="NC导入日志" renderer="hls301_journal_num_render" width="70"/> -->
                </a:columns>
            </a:grid>
        </a:screenBody>
    </a:view>
</a:screen>