ap_invoice_import.lview 2.69 KB
Newer Older
1 2 3 4 5 6
<?xml version="1.0" encoding="UTF-8"?>
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true"
          trace="true">
    <a:view>
        <a:link id="hn9040_project_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code"
                modelaction="update"/>
7 8
        <a:link id="ap_invoice_import_detail_link"
                url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_detail.lview"/>
niminmin's avatar
niminmin committed
9 10
        <a:link id="ap_invoice_import_detail_wfl_link"
                url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_detail_wfl.lview"/>
25484's avatar
25484 committed
11 12
        <a:link id="ap_invoice_import_scanning_link"
                url="${/request/@context_path}/modules/acp/ACP522/ap_invoice_import_scanning.lview"/>
13
        <script><![CDATA[
14
        window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
25484's avatar
25484 committed
15 16 17 18 19 20
            var url = $('ap_invoice_import_scanning_link').getUrl();
            var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'acp_invoice_ln');
            Leaf.Window({
                id: 'ap_invoice_import_scanning',
                url: url,
                title:'发票导入',
niminmin's avatar
niminmin committed
21
                width: 300,
25484's avatar
25484 committed
22 23 24 25
                height:140
            }).on('close', function() {
                $(ds_id).query();
            });
26 27
        };

28
        //超链接渲染
25484's avatar
25484 committed
29
        window['${/parameter/@bp_seq}${/parameter/@layout_code}_dynamic_link_renderer'] = function (value, record, name, config_record, bp_seq) {debugger;
30
            if(name == 'contract_number'){
25484's avatar
25484 committed
31
                return '<a href="javascript:ap_invoice_import_detail(\'' + record.id + '\',\'' + record.ds.id + '\');">' + value + '</a>';
32
            }
33
        };
34

stone's avatar
stone committed
35
        function ap_invoice_import_detail(record_id,ds_id){
niminmin's avatar
niminmin committed
36
            debugger;
25484's avatar
25484 committed
37 38
            var record = $(ds_id).findById(record_id);
            var param = record.data;
niminmin's avatar
niminmin committed
39 40 41 42 43 44 45
            if(record.get('confirmation_status')=='APPROVING'||record.get('confirmation_status')=='APPROVED'){
                param['function_usage'] = 'QUERY';
                param['function_code'] = 'ACP522WFL';
            }else{
                param['function_usage'] = 'MODIFY';
                param['function_code'] = 'ACP522I';
            }
25484's avatar
25484 committed
46 47
            param['contract_id'] = record.get('contract_id');
            param['url_title'] = '进项发票详情';
niminmin's avatar
niminmin committed
48
            hls_doc_get_layout_code('hn9040_project_get_layout_code_link_id', param, 'ap_invoice_import_detail_link', ds_id,'AP_INVOICE_IMPORT_DETAIL');
25484's avatar
25484 committed
49 50 51 52 53 54
        }





55
        ]]></script>
56 57 58
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>