ap_invoice_confirm.lview 1.84 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
        <a:link id="ap_invoice_confirm_link" model="acp.ACP523.ap_invoice_confirm" modelaction="update"/>
8
        <script><![CDATA[
25484's avatar
25484 committed
9
        //确认按钮
10
        window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function () {
25484's avatar
25484 committed
11 12 13 14 15 16 17 18 19 20 21 22
            var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'],'acp_invoice_ln');
            var records = $(ds_id).getSelected();
            if (records.length == 0) {
                Leaf.showMessage('${l:PROMPT}', '${l:HLS.SELECT_RECORD}');
                return;
            }
            var record = records[0];
            var imported_by = record.get('imported_by');
            if(imported_by == '${/session/@user_id}'){
                Leaf.showMessage('${l:PROMPT}', '导入人与确认人相同!');
                return false;
            }
23 24
            Leaf.request({
                url: $('ap_invoice_confirm_link').getUrl(),
25484's avatar
25484 committed
25 26 27 28
                para: {
                    contract_id: record.get('contract_id'),
                    invoice_line_id: record.get('invoice_line_id')
                },
29
                scope: this,
25484's avatar
25484 committed
30 31 32 33 34 35
                success: function () {
                    Leaf.SideBar.show({
                        msg: '确认成功',
                        duration: 2000
                    });
                    $(ds_id).query();
36 37 38 39
                }
            })

        };
40

41 42 43 44
            ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>