con_contract_report.lview 3.19 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 62
<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: zhangxing5129  
    $Date: 2014-8-1 下午02:44:52  
    $Revision: 1.0  
    $Purpose: 合同维护
-->
<a:screen xmlns:a="http://www.leaf-framework.org/application" customizationEnabled="true" dynamiccreateenabled="true" trace="true">
    <a:view>
        <a:link id="con_contract_get_layout_code_link_id" model="cont.CON500.con_contract_get_layout_code" modelaction="update"/>
        <a:link id="${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check" url="${/request/@context_path}/modules/zjwfl/zj_wfl_approve_history_check.lview"/>
        <a:link id="con_contract_modify_link" url="${/request/@context_path}/modules/cont/CON505/con_contract_modify.lview"/>
        <script type="text/javascript"><![CDATA[
			window['${/parameter/@layout_code}_user_button1_layout_dynamic_click'] = function() {
				$('CONTRACT_QUERY_DETAIL_G_QUERY_con_contract_layout_grid_id')._export('xls','DISCOUNT_AMOUNT');
            };
            
            //单据跟踪
            window['${/parameter/@layout_code}_user_button2_layout_dynamic_click'] = function() {

                // var prj_project_ds_id = get_dsid_by_basetable(window['${/parameter/@layout_code}_layoutDataSetList'], 'prj_project');
                // var records = $('prj_project_ds_id').getSelected();
                var ds = $('CONTRACT_QUERY_DETAIL_G_QUERY_con_contract_ds');
                var records = ds.getSelected();
                if (records.length != 1) {
                    Leaf.showMessage('提示', '请选择一条数据!');
                    return;
                }
                var instance_id = records[0].get('wfl_instance_id');
                var win = new Leaf.Window({
                    id: 'history_check',
                    url: $('${/parameter/@layout_code}${/parameter/@pre_layout}zj_wfl_approve_history_check').getUrl(),
                    params: {
                        instance_id:instance_id
                    },
                    title: '单据历史查看',
                    height: 500,
                    width: 860,
                    fullScreen: true
                });
            };
            
            function open_contract_win(ds_id, record_id) {
                var record = $(ds_id).findById(record_id);
                var param = record.data;
                param['function_code'] = 'CON301';
                /* param['function_usage'] = 'QUERY'; */
                param['maintain_type'] = 'UPDATE';
                param['url_title'] = '${l:CON301.CONTRACT_DETAIL}';
                hls_doc_get_layout_code('con_contract_get_layout_code_link_id', param, 'con_contract_modify_link', null);
            }
            
            window['${/parameter/@layout_code}_dynamic_link_renderer'] = function(value, record, name, config_record) {
                if (name == 'contract_number' && value) {
                    return '<a href="javascript:open_contract_win(\'' + record.ds.id + '\',\'' + record.id + '\')">' + value + '</a>';
                }
                return value;
            };
        ]]></script>
        <a:screen-include screen="modules/cont/CON500/con_contract_get_layout_code.lview"/>
    </a:view>
</a:screen>