Browse Source

导航配置调整

zhuth 7 years ago
parent
commit
91dc07fbfb

+ 8 - 273
frontend/saas-web/app/view/main/Navigation.js

@@ -12,280 +12,15 @@ Ext.define('saas.view.main.Navigation', {
         var me = this;
         var me = this;
         var view = new Ext.DataView({
         var view = new Ext.DataView({
             store: Ext.create('Ext.data.Store', {
             store: Ext.create('Ext.data.Store', {
+                autoLoad: true,
                 fields: ['text', 'iconCls'],
                 fields: ['text', 'iconCls'],
-                data: [{
-                    text: '采购',
-                    iconCls: 'x-fa fa-shopping-basket',
-                    items: [{
-                        text: '制单',
-                        items: [{
-                                id: 'purchase',
-                                text: '采购单',
-                                addType: 'purchase-purchase-formpanel',
-                                viewType: 'purchase-purchase-querypanel'
-                            }, {
-                                id: 'purchaseIn',
-                                text: '采购验收单',
-                                addType: 'purchase-purchasein-formpanel',
-                                viewType: 'purchase-purchasein-querypanel'
-                            }, {
-                                id: 'purchaseOut',
-                                text: '采购验退单',
-                                addType: 'purchase-purchaseout-formpanel',
-                                viewType: 'purchase-purchaseout-querypanel'
-                            }, {
-                                id: 'inquiry',
-                                text: '采购询价单',
-                                addType: 'purchase-inquiry-formpanel',
-                                viewType: 'purchase-inquiry-querypanel'
-                            }
-                            // ,{
-                            //     id: 'form1',
-                            //     text: '测试-采购单明细界面',
-                            //     addType: 'test-order-formpanel'
-                            // }, {
-                            //     id: 'myform',
-                            //     text: '测试-明细界面',
-                            //     addType: 'test-myform-formpanel'
-                            // }, {
-                            //     id: 'myquerytest',
-                            //     text: '测试-采购单查询界面',
-                            //     viewType: 'test-query-querypanel',
-                            // }
-                        ]
-                    }, {
-                        text: '报表',
-                        items: [{
-                            text: '采购明细表'
-                        }, {
-                            text: '采购付款一览表'
-                        }]
-                    }]
-                }, {
-                    text: '销售',
-                    iconCls: 'x-fa fa-shopping-cart',
-                    items: [{
-                        text: '制单',
-                        items: [{
-                            id: 'sale',
-                            text: '销售订单',
-                            addType: 'sale-sale-formpanel',
-                            viewType: 'sale-sale-querypanel'
-                        }, {
-                            id: 'saleOut',
-                            text: '销售出货单',
-                            addType: 'sale-saleout-formpanel',
-                            viewType: 'sale-saleout-querypanel'
-                        }, {
-                            id: 'saleIn',
-                            text: '销售退货单',
-                            addType: 'sale-salein-formpanel',
-                            viewType: 'sale-salein-querypanel'
-                        }, {
-                            id: 'saleToPur',
-                            text: '以销定购',
-                            addType: 'sale-saletopur-formpanel',
-                            viewType: 'sale-saletopur-querypanel'
-                        }]
-                    }, {
-                        text: '报表',
-                        items: [{
-                            text: '销售明细表'
-                        }, {
-                            text: '销售收款一览表'
-                        }, {
-                            text: '销售利润表'
-                        }]
-                    }]
-                }, {
-                    text: '库存',
-                    iconCls: 'x-fa fa-shopping-cart',
-                    items: [{
-                        text: '制单',
-                        items: [{
-                            id: 'appropriationInOut',
-                            text: '调拨单',
-                            addType: 'stock-appropriationinout-formpanel',
-                            viewType: 'stock-appropriationinout-querypanel'
-                        }, {
-                            id: 'make',
-                            text: '制造单',
-                            addType: 'stock-make-formpanel',
-                            viewType: 'stock-make-querypanel'
-                        }, {
-                            id: 'otherIn',
-                            text: '其它入库单',
-                            addType: 'stock-otherin-formpanel',
-                            viewType: 'stock-otherin-querypanel'
-                        }, {
-                            id: 'otherOut',
-                            text: '其它出库单',
-                            addType: 'stock-otherout-formpanel',
-                            viewType: 'stock-otherout-querypanel'
-                        }, {
-                            id: 'inventory',
-                            text: '盘点单',
-                            addType: 'stock-inventory-formpanel',
-                            viewType: 'stock-inventory-querypanel'
-                        }]
-                    }, {
-                        text: '报表',
-                        items: [{
-                            text: '物料出入库明细表'
-                        }, {
-                            text: '物料收发汇总表'
-                        }, {
-                            text: '物料库存数量金额表'
-                        }]
-                    }]
-                }, {
-                    text: '资金',
-                    iconCls: 'x-fa fa-shopping-cart',
-                    items: [{
-                        text: '制单',
-                        items: [{
-                            id: 'payBalance',
-                            text: '付款单',
-                            addType: 'money-paybalance-formpanel',
-                            viewType: 'money-paybalance-querypanel'
-                        }, {
-                            id: 'recBbalance',
-                            text: '收款单',
-                            addType: 'money-recbalance-formpanel',
-                            viewType: 'money-recbalance-querypanel'
-                        }, {
-                            id: 'verification',
-                            text: '核销单',
-                            addType: 'money-verification-formpanel',
-                            viewType: 'money-verification-querypanel'
-                        }, {
-                            id: 'othReceipts',
-                            text: '其它收支单',
-                            addType: 'money-othreceipts-formpanel',
-                            viewType: 'money-othreceipts-querypanel'
-                        }, {
-                            id: 'fundTransfer',
-                            text: '资金转存',
-                            addType: 'money-fundtransfer-formpanel',
-                            viewType: 'money-fundtransfer-querypanel'
-                        }]
-                    }, {
-                        text: '报表',
-                        items: [{
-                            text: '供应商对账单'
-                        }, {
-                            text: '应付账款明细表'
-                        }, {
-                            text: '客户对账单'
-                        }, {
-                            text: '应收款明细表'
-                        }, {
-                            text: '资金账户余额表'
-                        }]
-                    }]
-                }, {
-                    text: '资料',
-                    iconCls: 'x-fa fa-book',
-                    items: [{
-                            text: '基础资料',
-                            items: [{
-                                    text: '客户资料',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                },
-                                {
-                                    text: '供应商管理',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                },
-                                {
-                                    text: '商品管理',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                },
-                                {
-                                    text: '仓库管理',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                },
-                                {
-                                    text: '职员管理',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                },
-                                {
-                                    text: '账户管理',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                },
-                                {
-                                    text: '发货地址管理',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                },
-                                {
-                                    text: '新手导航',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                }
-                            ]
-                        },
-                        {
-                            text: '辅助资料',
-                            items: [{
-                                    text: '客户类别',
-                                    viewType: 'document-kind',
-                                    leaf: true
-                                },
-                                {
-                                    text: '供应商类别',
-                                    viewType: 'document-kind',
-                                    leaf: true
-                                },
-                                {
-                                    text: '商品类别',
-                                    viewType: 'document-kind',
-                                    leaf: true
-                                },
-                                {
-                                    text: '支出类别',
-                                    viewType: 'document-kind',
-                                    leaf: true
-                                },
-                                {
-                                    text: '收入类别',
-                                    viewType: 'document-kind',
-                                    leaf: true
-                                },
-                                {
-                                    text: '计量单位',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                },
-                                {
-                                    text: '结算方式',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                },
-                                {
-                                    text: '辅助属性',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                },
-                                {
-                                    text: '客户物料编码',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                },
-                                {
-                                    text: '单据编码规则',
-                                    viewType: 'mainlist',
-                                    leaf: true
-                                }
-                            ]
-                        }
-                    ]
-                }]
+                proxy: {
+                    type: 'ajax',
+                    url: 'resources/json/navigation.json',
+                    reader: {
+                        type: 'json'
+                    }
+                }
             }),
             }),
             tpl: new Ext.XTemplate('<ul class="x-navlist">',
             tpl: new Ext.XTemplate('<ul class="x-navlist">',
                 '<tpl for=".">',
                 '<tpl for=".">',

+ 239 - 0
frontend/saas-web/resources/json/navigation.json

@@ -0,0 +1,239 @@
+[{
+    "text": "采购",
+    "iconCls": "x-fa fa-shopping-basket",
+    "items": [{
+        "text": "制单",
+        "items": [{
+            "id": "purchase",
+            "text": "采购单",
+            "addType": "purchase-purchase-formpanel",
+            "viewType": "purchase-purchase-querypanel"
+        }, {
+            "id": "purchaseIn",
+            "text": "采购验收单",
+            "addType": "purchase-purchasein-formpanel",
+            "viewType": "purchase-purchasein-querypanel"
+        }, {
+            "id": "purchaseOut",
+            "text": "采购验退单",
+            "addType": "purchase-purchaseout-formpanel",
+            "viewType": "purchase-purchaseout-querypanel"
+        }, {
+            "id": "inquiry",
+            "text": "采购询价单",
+            "addType": "purchase-inquiry-formpanel",
+            "viewType": "purchase-inquiry-querypanel"
+        }]
+    }, {
+        "text": "报表",
+        "items": [{
+            "text": "采购明细表"
+        }, {
+            "text": "采购付款一览表"
+        }]
+    }]
+}, {
+    "text": "销售",
+    "iconCls": "x-fa fa-shopping-cart",
+    "items": [{
+        "text": "制单",
+        "items": [{
+            "id": "sale",
+            "text": "销售订单",
+            "addType": "sale-sale-formpanel",
+            "viewType": "sale-sale-querypanel"
+        }, {
+            "id": "saleOut",
+            "text": "销售出货单",
+            "addType": "sale-saleout-formpanel",
+            "viewType": "sale-saleout-querypanel"
+        }, {
+            "id": "saleIn",
+            "text": "销售退货单",
+            "addType": "sale-salein-formpanel",
+            "viewType": "sale-salein-querypanel"
+        }, {
+            "id": "saleToPur",
+            "text": "以销定购",
+            "addType": "sale-saletopur-formpanel",
+            "viewType": "sale-saletopur-querypanel"
+        }]
+    }, {
+        "text": "报表",
+        "items": [{
+            "text": "销售明细表"
+        }, {
+            "text": "销售收款一览表"
+        }, {
+            "text": "销售利润表"
+        }]
+    }]
+}, {
+    "text": "库存",
+    "iconCls": "x-fa fa-shopping-cart",
+    "items": [{
+        "text": "制单",
+        "items": [{
+            "id": "appropriationInOut",
+            "text": "调拨单",
+            "addType": "stock-appropriationinout-formpanel",
+            "viewType": "stock-appropriationinout-querypanel"
+        }, {
+            "id": "make",
+            "text": "制造单",
+            "addType": "stock-make-formpanel",
+            "viewType": "stock-make-querypanel"
+        }, {
+            "id": "otherIn",
+            "text": "其它入库单",
+            "addType": "stock-otherin-formpanel",
+            "viewType": "stock-otherin-querypanel"
+        }, {
+            "id": "otherOut",
+            "text": "其它出库单",
+            "addType": "stock-otherout-formpanel",
+            "viewType": "stock-otherout-querypanel"
+        }, {
+            "id": "inventory",
+            "text": "盘点单",
+            "addType": "stock-inventory-formpanel",
+            "viewType": "stock-inventory-querypanel"
+        }]
+    }, {
+        "text": "报表",
+        "items": [{
+            "text": "物料出入库明细表"
+        }, {
+            "text": "物料收发汇总表"
+        }, {
+            "text": "物料库存数量金额表"
+        }]
+    }]
+}, {
+    "text": "资金",
+    "iconCls": "x-fa fa-shopping-cart",
+    "items": [{
+        "text": "制单",
+        "items": [{
+            "id": "payBalance",
+            "text": "付款单",
+            "addType": "money-paybalance-formpanel",
+            "viewType": "money-paybalance-querypanel"
+        }, {
+            "id": "recBbalance",
+            "text": "收款单",
+            "addType": "money-recbalance-formpanel",
+            "viewType": "money-recbalance-querypanel"
+        }, {
+            "id": "verification",
+            "text": "核销单",
+            "addType": "money-verification-formpanel",
+            "viewType": "money-verification-querypanel"
+        }, {
+            "id": "othReceipts",
+            "text": "其它收支单",
+            "addType": "money-othreceipts-formpanel",
+            "viewType": "money-othreceipts-querypanel"
+        }, {
+            "id": "fundTransfer",
+            "text": "资金转存",
+            "addType": "money-fundtransfer-formpanel",
+            "viewType": "money-fundtransfer-querypanel"
+        }]
+    }, {
+        "text": "报表",
+        "items": [{
+            "text": "供应商对账单"
+        }, {
+            "text": "应付账款明细表"
+        }, {
+            "text": "客户对账单"
+        }, {
+            "text": "应收款明细表"
+        }, {
+            "text": "资金账户余额表"
+        }]
+    }]
+}, {
+    "text": "资料",
+    "iconCls": "x-fa fa-book",
+    "items": [{
+        "text": "基础资料",
+        "items": [{
+            "text": "客户资料",
+            "viewType": "mainlist",
+            "leaf": true
+        }, {
+            "text": "供应商管理",
+            "viewType": "mainlist",
+            "leaf": true
+        }, {
+            "text": "商品管理",
+            "viewType": "mainlist",
+            "leaf": true
+        }, {
+            "text": "仓库管理",
+            "viewType": "mainlist",
+            "leaf": true
+        }, {
+            "text": "职员管理",
+            "viewType": "mainlist",
+            "leaf": true
+        }, {
+            "text": "账户管理",
+            "viewType": "mainlist",
+            "leaf": true
+        }, {
+            "text": "发货地址管理",
+            "viewType": "mainlist",
+            "leaf": true
+        }, {
+            "text": "新手导航",
+            "viewType": "mainlist",
+            "leaf": true
+        }]
+    }, {
+        "text": "辅助资料",
+        "items": [{
+            "text": "客户类别",
+            "viewType": "document-kind",
+            "leaf": true
+        }, {
+            "text": "供应商类别",
+            "viewType": "document-kind",
+            "leaf": true
+        }, {
+            "text": "商品类别",
+            "viewType": "document-kind",
+            "leaf": true
+        }, {
+            "text": "支出类别",
+            "viewType": "document-kind",
+            "leaf": true
+        }, {
+            "text": "收入类别",
+            "viewType": "document-kind",
+            "leaf": true
+        }, {
+            "text": "计量单位",
+            "viewType": "mainlist",
+            "leaf": true
+        }, {
+            "text": "结算方式",
+            "viewType": "mainlist",
+            "leaf": true
+        }, {
+            "text": "辅助属性",
+            "viewType": "mainlist",
+            "leaf": true
+        }, {
+            "text": "客户物料编码",
+            "viewType": "mainlist",
+            "leaf": true
+        }, {
+            "text": "单据编码规则",
+            "viewType": "mainlist",
+            "leaf": true
+        }]
+    }]
+}]