hls_bp_master_taxpayer.lview 2.92 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
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
<?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="${/parameter/@layout_code}_hls214n_uploadFile_id" url="${/request/@context_path}/uploadFile.lview"/>
        <a:link id="${/parameter/@layout_code}_hls214n_submit_tax_req_link" model="hls.HLS223.submit_bp_taxpayer_request" modelaction="update"/>
        <script type="text/javascript"><![CDATA[
            window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
                var bp_id = '${/parameter/@bp_id}';
                if (!bp_id) {
                    return;
                }
                var url = $('${/parameter/@layout_code}_hls214n_uploadFile_id').getUrl() + '?table_name=HLS_BP_MASTER&header_id=' + bp_id;
                var win = new Leaf.Window({
                    url: url,
                    title: '${l:ATM.UPLOAD_ATTACHMENT}',
                    id: '${/parameter/@layout_code}_hls214n_uploadFile_screen_id',
                    width: 850,
                    height: 400
                });
            };
            window['${/parameter/@layout_code}_submit_approval_layout_dynamic_click'] = function() {

                var bp_id = '${/parameter/@bp_id}';
                if (!bp_id) {
                    return;
                }
                Leaf.Masker.mask(Ext.getBody(), '${l:HLS.EXECUTING}');
                Leaf.request({
                    url: '${/request/@context_path}/autocrud/hls.HLS223.submit_bp_taxpayer_request/update',
                    para: {
                        bp_id: '${/parameter/@bp_id}'
                    },
                    success: function(res) {
                        Leaf.Masker.unmask(Ext.getBody());
                        parent.Leaf.SideBar.enable = true;
                        parent.Leaf.SideBar.show({
                            msg: '${l:HLS.SUBMIT_SUCCESS}',
                            duration: 2000
                        });
                        $('${/parameter/@query_ds}').query();
                        $('${/parameter/@winid}').close();
                    },
                    failure: function() {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    error: function() {
                        Leaf.Masker.unmask(Ext.getBody());
                    },
                    scope: this
                });
            };
            //更新时调用
            window['${/parameter/@bp_seq}${/parameter/@layout_code}_on_layout_dynamic_update'] = function(ds, record, name, value, old_value, bp_seq) {
            	var ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'hls_bp_master');
            	if (ds.id==ds_id){
            	    record.set('billing_status','NEW');
            	}
               };
        ]]></script>
    </a:view>
</a:screen>