Kaynağa Gözat

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

guq 7 yıl önce
ebeveyn
işleme
ebdf1f30b4

+ 3 - 3
applications/document/document-server/src/main/resources/mapper/ProductMapper.xml

@@ -464,7 +464,7 @@
         <result column="pw_amount" property="rc_amount" jdbcType="DOUBLE"/>
     </resultMap>
     <select id="selectReserveCost" resultMap="ProdReserveCostResultMap">
-        select * from productWH tab left join Product on pw_prodcode=pr_code left join warehouse on pw_whid=wh_id
+        select * from productWH tab left join Product on pw_prodid=pr_id left join warehouse on pw_whid=wh_id
         <where>
             <if test="con!=null">
                 ${con}
@@ -478,7 +478,7 @@
     </select>
     <select id="selectReserveCostByIgnoreWarehouse" resultMap="ProdReserveCostResultMap">
         select pr_code,pr_spec,pr_detail,pr_unit,sum(pw_onhand) pw_onhand,sum(pw_amount) pw_amount
-        from productWH tab left join Product on pw_prodcode=pr_code left join warehouse on pw_whid=wh_id
+        from productWH tab left join Product on pw_prodid=pr_id left join warehouse on pw_whid=wh_id
         <where>
             <if test="con!=null">
                 ${con}
@@ -493,7 +493,7 @@
     </select>
     <select id="selectCalculateFields" resultType="string">
         select   ${fields}
-        from productWH tab left join Product on pw_prodcode=pr_code left join warehouse on pw_whid=wh_id
+        from productWH tab left join Product on pw_prodid=pr_id left join warehouse on pw_whid=wh_id
         <where>
             <if test="con != null">
                 ${con}

+ 11 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java

@@ -274,16 +274,25 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
         String kind = verification.getVc_kind();
         subledger.setCompanyId(BaseContextHolder.getCompanyId());
         subledger.setSl_code(verification.getVc_code());
-        kind = transferKind(kind);
-        subledger.setSl_kind(kind);
+
         if(kind.equals("receipts_offset_receivable") || kind.equals("prepaid_offset_payable") ||
                 kind.equals("receivable_offset_payable")){
+
+            /*
+             ['receipts_offset_receivable', '预收冲应收'],
+                ['prepaid_offset_payable', '预付冲应付'],
+                ['receivable_offset_payable', '应收冲应付'],
+                ['receivable_to_receivable', '应收转应收'],
+                ['payable_to_payable', '应付转应付']
+             */
             subledger.setSl_custid(0);
             subledger.setSl_vendid(verification.getVc_vendid());
         }else{
             subledger.setSl_custid(verification.getVc_custid());
             subledger.setSl_vendid(0);
         }
+        kind = transferKind(kind);
+        subledger.setSl_kind(kind);
         Double amount1 = verification.getVc_amount1()==null?new Double(0):verification.getVc_amount1();
         Double amount2 = verification.getVc_amount2()==null?new Double(0):verification.getVc_amount2();
         subledger.setSl_date(verification.getVc_date());

+ 14 - 1
applications/money/money-server/src/main/resources/mapper/ProfitdetailMapper.xml

@@ -77,6 +77,19 @@ prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodino
 
 	<select id="selectCalculateFields" resultType="string">
 		SELECT ${fields}
+		FROM
+		(
+		SELECT
+		a.pi_custcode,
+		a.pi_custname,
+		a.cu_type,
+		a.cu_sellername,
+		a.saamount,
+		a.netamount,
+		a.costamount,
+		SUM(a.netamount - a.costamount) as profit,
+		(SUM(a.netamount - a.costamount)/IFNULL(netamount,SUM(netamount - costamount))) as profitpresent
+
 		FROM
 		(
 		SELECT
@@ -117,7 +130,7 @@ prodinout.companyid= prodiodetail.companyid and prodiodetail.companyid = prodino
 		a.pi_custcode,
 		a.pi_custname,
 		a.cu_type,
-		a.cu_sellername
+		a.cu_sellername)b
 	</select>
 
 </mapper>

+ 4 - 0
applications/purchase/purchase-dto/src/main/java/com/usoftchina/saas/purchase/dto/ProdIODetailDTO.java

@@ -87,6 +87,10 @@ public class ProdIODetailDTO extends CommonBaseDTO implements Serializable {
 
     private Long pd_ioid;
 
+    private String iocode;
+
+    private Integer iodetno;
+
     private ProductDTO productDTO;
 
 }

+ 4 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/ProdIODetail.java

@@ -82,6 +82,10 @@ public class ProdIODetail extends CommonBaseEntity implements Serializable {
 
     private Long pd_ioid;
 
+    private String iocode;
+
+    private Integer iodetno;
+
     private ProductDTO productDTO;
 
 }

+ 6 - 2
applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -43,6 +43,8 @@
     <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
     <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
     <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
+    <result column="iocode" jdbcType="VARCHAR" property="iocode" />
+    <result column="iodetno" jdbcType="INTEGER" property="iodetno" />
     <association property="productDTO" javaType="com.usoftchina.saas.document.dto.ProductDTO">
       <id column="pr_id" property="id"/>
       <result column="pr_code" property="pr_code"/>
@@ -644,8 +646,10 @@
 
 
   <select id="selectByFK" parameterType="long" resultMap="BaseResultMap">
-    select * from prodiodetail a left join product b on b.pr_id= a.pd_prodid and a.companyid = b.companyid
-    where pd_piid=#{id} order by pd_pdno
+    select pd.*,prod.*,iopd.pd_inoutno iocode,iopd.pd_pdno iodetno from prodiodetail pd
+     left join product prod on prod.pr_id= pd.pd_prodid and pd.companyid = prod.companyid
+     left join prodiodetail iopd on iopd.pd_id = pd.pd_ioid and iopd.companyid = pd.companyid
+    where pd.pd_piid=#{id} order by pd.pd_pdno
   </select>
 
   <delete id="deleteByFK" parameterType="java.lang.Long">

+ 5 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -287,6 +287,11 @@ public class SaleServiceImpl implements SaleService{
         if (null != code) {
             throw new BizException(BizExceptionCode.SALE_ALREADY_UNAUDIT);
         }
+        //单据状态为已关闭,无法审核
+        code = saleMapper.validateCloseStatus(id);
+        if (null != code) {
+            throw new BizException(BizExceptionCode.SALE_CLOSE.getCode(),String.format(BizExceptionCode.SALE_CLOSE.getMessage(),"反审核"));
+        }
         //检测出货状态为未出货
         Integer num = saleMapper.checkSendStatus(id);
         if (num > 0) {

+ 7 - 0
frontend/saas-web/app/view/core/form/field/ConMonthField.scss

@@ -0,0 +1,7 @@
+.x-conmonthfield > div > div > div > div > div:nth-child(1) > div > div {
+    border-right: none;
+    border-radius: 4px 0 0 4px;
+}
+.x-conmonthfield > div > div > div > div > div:nth-child(2) > div > div {
+    border-radius: 0 4px 4px 0;
+}

+ 2 - 1
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -213,7 +213,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                                 })
                                 if (type && d) {
                                     if(typeof c.mySummaryRenderer == 'function') {
-                                        c.summaryValue = c.mySummaryRenderer(grid, datas);
+                                        c.summaryValue = c.mySummaryRenderer(grid, c, datas);
                                     }else if (type == 'count') {
                                         c.summaryValue = Ext.util.Format.number(d[name], c.format || '0');
                                     } else if (typeof c.summaryRenderer == 'function') {
@@ -235,6 +235,7 @@ Ext.define('saas.view.core.report.ReportPanel', {
                             });
                             return datas;
                         } catch (e) {
+                            console.log(e);
                             saas.util.BaseUtil.showErrorToast(e.message);
                         }
                     },

+ 1 - 1
frontend/saas-web/app/view/home/Home.js

@@ -47,7 +47,7 @@ Ext.define('saas.view.home.Home', {
             xtype: 'month-sale',
             padding: '0 0 0 14',
         }, {
-            xtype: 'month-purchase',
+            xtype: 'profit-detail',
             padding: '0 0 0 14',
         }, {
             xtype: 'key-data',

+ 72 - 35
frontend/saas-web/app/view/home/HomeModel.js

@@ -87,41 +87,41 @@ Ext.define('saas.view.home.HomeModel', {
             }
         },
 
-        month_purchase: {
-            model: 'saas.model.chart.DataXY',
-            autoLoad: true,
-            proxy: {
-                type: 'ajax',
-                // url: 'http://192.168.253.58:8920/homePage/purchaseData?sixMonths=false',
-                url: '/api/commons/homePage/purchaseData?sixMonths=false',
-                timeout: 8000,
-                actionMethods: {
-                    read: 'GET'
-                },
-                reader: {
-                    type: 'json',
-                    rootProperty: 'data',
-                },
-                listeners: {
-                    exception: function(proxy, response, operation, eOpts) {
-                        var p = Ext.getCmp('month_purchase');
-                        p && p.setLoading(false);
-                    }
-                }
-            },
-            listeners: {
-                beforeload: function() {
-                    var p = Ext.getCmp('month_purchase');
-                        p && p.setLoading(true);
-                },
-                load: function(s, d) {
-                    var p = Ext.getCmp('month_purchase');
-                        p && p.setLoading(false);
-                    var sum = Ext.util.Format.number(s.sum('y'), '0.00') || 0;
-                    Ext.getCmp('home').getViewModel().set('month_purchase_amount', sum+'')
-                }
-            }
-        },
+        // month_purchase: {
+        //     model: 'saas.model.chart.DataXY',
+        //     autoLoad: true,
+        //     proxy: {
+        //         type: 'ajax',
+        //         // url: 'http://192.168.253.58:8920/homePage/purchaseData?sixMonths=false',
+        //         url: '/api/commons/homePage/purchaseData?sixMonths=false',
+        //         timeout: 8000,
+        //         actionMethods: {
+        //             read: 'GET'
+        //         },
+        //         reader: {
+        //             type: 'json',
+        //             rootProperty: 'data',
+        //         },
+        //         listeners: {
+        //             exception: function(proxy, response, operation, eOpts) {
+        //                 var p = Ext.getCmp('month_purchase');
+        //                 p && p.setLoading(false);
+        //             }
+        //         }
+        //     },
+        //     listeners: {
+        //         beforeload: function() {
+        //             var p = Ext.getCmp('month_purchase');
+        //                 p && p.setLoading(true);
+        //         },
+        //         load: function(s, d) {
+        //             var p = Ext.getCmp('month_purchase');
+        //                 p && p.setLoading(false);
+        //             var sum = Ext.util.Format.number(s.sum('y'), '0.00') || 0;
+        //             Ext.getCmp('home').getViewModel().set('month_purchase_amount', sum+'')
+        //         }
+        //     }
+        // },
 
         month_io: {
             fields: ['x', 'main', 'other'],
@@ -315,5 +315,42 @@ Ext.define('saas.view.home.HomeModel', {
                 }
             } 
         },
+
+        profit_detail: {
+            fields: ['x', 'y', 'z'],
+            autoLoad: true,
+            proxy: {
+                type: 'ajax',
+                // url: 'http://192.168.253.58:8560/api/commons/homePage/monthProfit',
+                url: '/api/commons/homePage/monthProfit',
+                timeout: 8000,
+                // header: {
+                //     Authorization: 'eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJnIiwiYXBwSWQiOiJ0cmFkZS1hcHAiLCJ1c2VySWQiOjM4LCJjb21wYW55SWQiOjIxLCJ1c2VyTmFtZSI6ImciLCJyZWFsTmFtZSI6Iue-pCIsImV4cCI6MTU0NjIyNTg5Mn0.oe6BmpVchOlL6PoR7UspHbThFEJ_HLlKTHBpV4P9wSA4YbL2Pv5sAah2U6M2q7nmu0J1DV5WwMaMClI19Us7n-8fSgNeQrl1IsVFO4sf5nSC3SrUJk0sraBq5dLAqONfAIj9qFOuyduL6tXkV2av5IfmikT1uMk8okTJKDtHj8U'
+                // },
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data',
+                },
+                listeners: {
+                    exception: function(proxy, response, operation, eOpts) {
+                        var p = Ext.getCmp('profit_detail');
+                        p && p.setLoading(false);
+                    }
+                }
+            },
+            listeners: {
+                beforeload: function() {
+                    var p = Ext.getCmp('profit_detail');
+                        p && p.setLoading(true);
+                },
+                load: function(s, d) {
+                    var p = Ext.getCmp('profit_detail');
+                        p && p.setLoading(false);
+                }
+            } 
+        },
     },
 });

+ 91 - 0
frontend/saas-web/app/view/home/charts/ProfitDetail.js

@@ -0,0 +1,91 @@
+Ext.define('saas.view.home.charts.ProfitDetail', {
+    extend: 'saas.view.core.chart.ChartBase',
+    xtype: 'profit-detail',
+
+    id: 'profit_detail',
+
+    bind: {
+        title: '毛利润分析(万元)'
+    },
+
+    initComponent: function() {
+        var me = this;
+
+        Ext.apply(me, {
+            items: [{
+                xtype: 'cartesian',
+                colors: [
+                    '#34BAF6'
+                ],
+                bind: {
+                    insetPadding: '{insetPadding}',
+                    store: '{profit_detail}',
+                },
+                axes: [{
+                    type: 'category',
+                    fields: ['x'],
+                    position: 'bottom',
+                    label: {
+                        fontSize: '12px',
+                        fillStyle: '#485465',
+                    },
+                    style: {
+                        fill: '#F7F8FA',
+                        strokeStyle: 'transparent'
+                    },
+                    renderer: me.onCategoryLabelRender
+                },{
+                    type: 'numeric',
+                    fields: ['y'],
+                    position: 'left',
+                    adjustByMajorUnit: true,
+                    grid: {
+                        even: {
+                            stroke: '#F7F8FA'
+                        },
+                        odd: {
+                            stroke: '#F7F8FA',
+                        }
+                    },
+                    label: {
+                        fontSize: '12px',
+                        fillStyle: '#485465',
+                        textAlign: 'end'
+                    },
+                    style: {
+                        fill: '#fff',
+                        strokeStyle: 'transparent'
+                    },
+                    minimum: 0
+                }],
+                series: [{
+                    type: 'bar',
+                    xField: 'x',
+                    yField: ['y'],
+                    bind: {
+                        style: {
+                            lineWidth: 0,
+                            strokeStyle: 'transparent',
+                            maxBarWidth: '{maxBarWidth}',
+                        },
+                    },
+                    tooltip: {
+                        trackMouse: true,
+                        renderer: me.onBarTipRender
+                    }
+                }]
+            }]
+        });
+
+        me.callParent(arguments);
+    },
+
+    onCategoryLabelRender: function(axis, label, layoutContent, lastLabel) {
+        return label.substr(0,2) + '...';
+    },
+
+    onBarTipRender: function (tooltip, record, item) {
+        tooltip.setHtml(record.get('x') + ': ' + record.get('y') + '万元');
+    },
+
+});

+ 1 - 1
frontend/saas-web/app/view/money/fundtransfer/FormPanel.js

@@ -39,7 +39,7 @@ Ext.define('saas.view.money.fundtransfer.FormPanel', {
         xtype : "detailGridField", 
         storeModel:'saas.model.money.FundTransfer',
         detnoColumn:  'ftd_detno',
-        deleteDetailUrl:'/api/money/fundtransfer/deleteItem',
+        deleteDetailUrl:'/api/money/fundtransfer/deleteDetail',
         columnWidth : 1,
         columns : [
             {

+ 1 - 0
frontend/saas-web/app/view/money/report/RecDetail.js

@@ -122,6 +122,7 @@ Ext.define('saas.view.money.report.RecDetail', {
                 return Ext.util.Format.number(v, format);
             },
             mySummaryRenderer: function(grid, column, datas) {
+                datas = datas || [];
                 var store = grid.store,
                 dataIndex = column.dataIndex,
                 groupField = store.getGroupField(),

+ 4 - 1
frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

@@ -314,18 +314,21 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
             {
                 text : "采购单明细id", 
                 dataIndex : "pd_orderid", 
+                ignore:true,
                 hidden:true
             },
             {
                 text : "采购单号", 
                 dataIndex : "pd_ordercode", 
-                width : 150.0
+                width : 150.0,
+                ignore:true,
             },{
                 text : "采购序号",
                 dataIndex : "pd_orderdetno", 
                 xtype : "numbercolumn",
                 width : 110.0,
                 format: '0',
+                ignore:true,
                 renderer: function(v) {
                     if(v) {
                         return Ext.util.Format.number(v, '0');

+ 17 - 44
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -67,7 +67,6 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     },{
         xtype : "textfield", 
         name : "pi_total", 
-        bind : "{pi_total}", 
         fieldLabel : "总额", 
         allowBlank : true,
         readOnly: true,
@@ -75,14 +74,12 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     }, {
         xtype : "hidden", 
         name : "pi_puid", 
-        bind : "{pi_puid}", 
         fieldLabel : "采购单id", 
         allowBlank : true, 
         columnWidth : 0.25
     },{
         xtype : "hidden", 
         name : "pi_pucode", 
-        bind : "{pi_pucode}", 
         fieldLabel : "采购单号", 
         allowBlank : true, 
         columnWidth : 0.25
@@ -177,29 +174,16 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                     var format = '0.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 }
-            },            
-            // {
-            //     text : "已转数", 
-            //     dataIndex : "pd_yqty", 
-            //     width : 120.0, 
-            //     xtype : "numbercolumn", 
-            //     format:'0',
-            //     items : null,
-            //     summaryType: 'sum'
-            // },
-            
-            {
+            }, {
                 text : "仓库id", 
                 dataIndex : "pd_whid", 
                 xtype : "numbercolumn",
                 hidden:true
-            },
-            {
+            }, {
                 text : "仓库编号", 
                 dataIndex : "pd_whcode",
                 hidden:true
-            }, 
-            {
+            }, {
                 text : "仓库", 
                 dataIndex : "pd_whname", 
                 width : 150.0, 
@@ -217,8 +201,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                     valueField : "value", 
                     xtype : "warehouseDbfindTrigger"
                 }
-            },
-            {
+            }, {
                 text : "单价",
                 xtype: 'numbercolumn', 
                 width : 110.0,
@@ -235,7 +218,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                     var format = '0,000.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 },
-            },{
+            }, {
                 text : "税率", 
                 xtype: 'numbercolumn',
                 dataIndex : "pd_taxrate", 
@@ -255,11 +238,6 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 xtype: 'numbercolumn',
                 dataIndex : "pd_ordertotal", 
                 width : 110.0, 
-                // editor : {
-                //     xtype : "numberfield",
-                //     decimalPrecision: 2,
-                //     editable : false
-                // },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
                     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -279,11 +257,6 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                 xtype: 'numbercolumn',
                 dataIndex : "pd_nettotal", 
                 width : 110.0, 
-                // editor : {
-                //     xtype : "numberfield",
-                //     decimalPrecision: 2,
-                //     editable : false
-                // },
                 renderer : function(v) {
                     var arr = (v + '.').split('.');
                     var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -297,21 +270,21 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
                     var format = '0,000.' + xr.join();
                     return Ext.util.Format.number(v, format);
                 }
-            },
-            {
-                text : "采购单明细id", 
-                dataIndex : "pd_orderid", 
+            }, {
+                text : "验收明细id", 
+                dataIndex : "pd_ioid", 
                 hidden:true
-            },
-            {
-                text : "采购单号", 
-                dataIndex : "pd_ordercode", 
-                width : 150.0
-            },{
-                text : "采购序号", 
-                dataIndex : "pd_orderdetno", 
+            }, {
+                text : "验收单号", 
+                dataIndex : "iocode", 
+                width : 150.0,
+                ignore:true
+            }, {
+                text : "验收序号", 
+                dataIndex : "iodetno", 
                 xtype : "numbercolumn", 
                 width : 110.0,
+                ignore:true,
                 renderer: function(v) {
                     if(v) {
                         return Ext.util.Format.number(v, '0');

+ 11 - 4
frontend/saas-web/app/view/sys/power/TreePanel.js

@@ -9,7 +9,7 @@ Ext.define('saas.view.sys.power.TreePanel', {
     initComponent: function () {
         var me = this;
         me.store = Ext.create('Ext.data.TreeStore', {
-            fields : ['name', 'id', 'description','code'],
+            fields : ['name', 'id', 'description','code','type'],
             autoLoad:false,
             root : {
                 text : 'Root',
@@ -26,7 +26,7 @@ Ext.define('saas.view.sys.power.TreePanel', {
             width: 28,
             iconCls: 'x-hidden icon x-fa fa-plus',
             getClass: function(v, meta, rec) {
-                if(rec.get('code')=='ROLE_ADMIN'){
+                if(rec.get('type')=='0'){
                     return 'x-hidden icon x-fa fa-key';
                 }else if(rec.get('leaf')){
                      return 'x-hidden icon x-fa fa-pencil';
@@ -43,7 +43,7 @@ Ext.define('saas.view.sys.power.TreePanel', {
             width: 36,
             iconCls: 'x-hidden icon x-fa fa-trash-o',
             getClass: function(v, meta, rec) {
-                if(rec.get('code')=='ROLE_ADMIN'){
+                if(rec.get('type')=='0'){
                     return '';
                 }else if(rec.get('leaf')){
                      return 'x-hidden icon x-fa fa-trash-o';
@@ -90,6 +90,12 @@ Ext.define('saas.view.sys.power.TreePanel', {
                 var grid = view.ownerCt.ownerCt.query('power-grid')[0];
                 grid.initId = id;
                 grid.store.load();
+                if(record.get('type')&&record.get('type')=='0'){
+                    grid.dockedItems.items[1].down('[name=savepower]').setDisabled(true)
+                }
+                if(record.get('type')&&record.get('type')=='1'){
+                    grid.dockedItems.items[1].down('[name=savepower]').setDisabled(false)
+                }
             }
         }
     },
@@ -108,6 +114,7 @@ Ext.define('saas.view.sys.power.TreePanel', {
                     for (let index = 0; index < _data.length; index++) {
                         var o = {
                             code:_data[index].code,
+                            type:_data[index].type,
                             id: _data[index].id,
                             text: _data[index].name,
                             name:_data[index].name,
@@ -151,7 +158,7 @@ Ext.define('saas.view.sys.power.TreePanel', {
         this.dialog.show();
     },
     deleteItem:function(rec){
-        if(rec&&(rec.get('code')=='ROLE_ADMIN'||!rec.get('leaf'))){
+        if(rec&&(rec.get('type')=='0'||!rec.get('leaf'))){
             return;
         }
         var me = this;