con_commission_report.lview 2.52 KB
Newer Older
38823's avatar
38823 committed
1 2 3
<?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>
38823's avatar
38823 committed
4 5
        <a:link id="con1380_query_id" model="cont.CON1380.con1380_result_query_job" modelaction="execute"/>
        <a:link id="query_job" model="cont.CON1380.con1380_result_query_job" modelaction="update"/>
38823's avatar
38823 committed
6 7 8
        <script><![CDATA[
        $L.onReady(function(){
            debugger;
38823's avatar
38823 committed
9 10 11 12 13
            var headers_ds = $('${/parameter/@layout_code}_F_QUERY__ds');
            var record = headers_ds.getCurrentRecord();
            var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hlcm_monthly_report_temp');
            $(ds_id).setQueryParameter('commission_month',record.get('base_date'));
            $(ds_id).query();
38823's avatar
38823 committed
14 15
        });

38823's avatar
38823 committed
16 17
        //更新全量数据
        window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {
38823's avatar
38823 committed
18
            debugger;
38823's avatar
38823 committed
19 20 21 22
            var headers_ds = $('${/parameter/@layout_code}_F_QUERY__ds');
            var record = headers_ds.getAt(0);
            if (Ext.isEmpty(record.get('base_date'))) {
                $L.showMessage('提示', '基准日期必输,不能为空');
38823's avatar
38823 committed
23 24
                return;
            }
38823's avatar
38823 committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
            Leaf.showConfirm('${l:HLS.PROMPT}', '<font color="red">该任务需执行约30分钟,请耐心等待!</font></br></br><font color="red">【特别注意】任务发起后30分钟内请勿重复点击</font>', function () {
                Leaf.Masker.mask(Ext.getBody(), '${l:BEING_IMPLEMENTED}');
                Leaf.request({
                    url: $('con1380_query_id').getUrl(),
                    para: {
                        month: record.get('base_date')
                    },
                    success: function (res) {
                        Leaf.Masker.unmask(Ext.getBody());
                        Leaf.SideBar.show({
                            msg: '发起成功!',
                            duration: 2000
                        });
                    },
                    error: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    failure: function () {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    scope: this
                });
            }, null, 300, 150);
38823's avatar
38823 committed
48 49 50 51 52
        };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>