Browse Source

新建超级后台项目文件,完成静态页面开发

wangcz 8 years ago
parent
commit
c085bbb3cf

+ 2 - 0
src/main/webapp/WEB-INF/views/normal/adminWithNav.html

@@ -152,6 +152,8 @@
 					class="fa fa-flag"></i><span> 品牌映射维护</span></a></li>
 			<li class="nav-node"><a href="#/store/company"><i
 					class="fa fa-flag"></i><span> 寄售管理</span></a></li>
+			<li class="nav-node"><a href="#/manage"><i
+					class="fa fa-flag"></i><span> 产品管理</span></a></li>
 			<li class="nav-node"><a href="#/store/list"><i
 					class="fa fa-flag"></i><span> 店铺管理</span></a></li>
 			<li class="nav-node"><a href="#/store/application"><i

+ 13 - 7
src/main/webapp/resources/js/admin/app.js

@@ -1,4 +1,4 @@
- define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage'], function(angularAMD) {
+ define([ 'angularAMD', 'ui.router', 'ui-bootstrap', 'ui-form', 'ngLocal', 'ngTable', 'ngSanitize', 'ngDraggable', 'common/services', 'common/directives', 'common/query/brand', 'common/query/address', 'common/query/return' , 'common/query/change' ,'common/query/component', 'common/query/order', 'common/query/purchase', 'common/query/invoice', 'common/query/property', 'common/query/kind', 'common/query/property', 'common/query/receipt', 'common/query/logistics' ,'angular-toaster', 'ui-jquery', 'jquery-uploadify','common/query/dateParse' , 'common/query/bankTransfer' ,'common/query/bankInfo', 'common/query/urlencryption', 'common/query/bill', 'common/query/makerDemand', 'common/query/goods', 'common/query/validtime', 'file-upload','file-upload-shim', 'common/query/slideImage', 'common/query/kindAdvice', 'common/query/responseLogistics', 'common/query/search','common/directives/dynamicInput', 'common/query/auditorMail', 'common/query/tradeBasicProperties', 'common/query/exchangeRate', 'common/query/tradeDeliveryDelayTime', 'common/query/payment', 'common/query/kindContrast', 'common/query/crawlTask', 'common/query/afterSale', 'common/query/refund', 'common/query/messageBoard', 'common/query/logisticsPort', 'common/query/storeInfo', 'common/query/cms', 'common/query/help', 'common/query/commonCount', 'common/module/store_admin_violations_module', 'common/query/internalMessage','common/query/user','common/query/secQuestion','common/query/keyWord','common/query/logUsage', 'treeControl'], function(angularAMD) {
 	'use strict';
 
 	 /**
@@ -8,7 +8,7 @@
 		 return this.length > 0 ? this[this.length - 1] : null;
 	 };
 
-	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices']);
+	var app = angular.module('myApp', [ 'ui.router', 'ui.bootstrap', 'ui.form', 'ng.local', 'ngTable', 'ngSanitize', 'ngDraggable', 'common.services', 'common.directives', 'brandServices', 'addressServices', 'returnServices', 'changeServices', 'componentServices', 'orderServices', 'purchaseServices', 'invoiceServices', 'propertyServices', 'receiptServices', 'logisticsServices', 'common.query.kind', 'toaster','ui.jquery' ,'dateparseServices', 'bankInfo' , 'bankTransfer', 'urlencryptionServices', 'billServices', 'makerDemand', 'goodsServices', 'validtimeServices', 'angularFileUpload', 'slideImageService', 'common.query.kindAdvice', 'responseLogisticsService', 'searchService', 'ngDynamicInput', 'ReviewerEmailInfoService', 'tradeBasicPropertiesServices', 'exchangeRateModule', 'tradeDeliveryDelayTimeModule', 'PaymentService', 'kindContrastServices', 'crawlTaskServices', 'afterSaleService', 'refundModule', 'messageBoardServices', 'logisticsPortService', 'storeInfoServices', 'cmsService', 'helpServices', 'commonCountServices', 'tool.directives', 'StoreAdminViolationsModule', 'internalMessageServices','common.query.user','secQuestionServices','keyWordServices','logUsageServices', 'treeControl']);
 	app.init = function() {
 		angularAMD.bootstrap(app);
 	};
@@ -263,11 +263,17 @@
 			controller : 'BrandMaintenanceCtrl',
 			controllerUrl : 'app/controllers/BrandMaintenanceCtrl'
 		})).state('brand_map', angularAMD.route({
-			// 品牌映射维护
-			url: '/brand/map',
-			templateUrl : 'static/view/admin/product/brand_map.html',
-			controller : 'BrandMapCtrl',
-			controllerUrl : 'app/controllers/product/brandMapCtrl'
+            // 品牌映射维护
+            url: '/brand/map',
+            templateUrl: 'static/view/admin/product/brand_map.html',
+            controller: 'BrandMapCtrl',
+            controllerUrl: 'app/controllers/product/brandMapCtrl'
+        })).state('manage', angularAMD.route({
+			// 产品管理
+			url: '/manage',
+			templateUrl : 'static/view/admin/product/productManage.html',
+			controller : 'productManageCtrl',
+			controllerUrl : 'app/controllers/product/productManageCtrl'
 		})).state('store_company_list', angularAMD.route({
 			// 寄售管理
 			url: '/store/company',

+ 9 - 0
src/main/webapp/resources/js/admin/controllers/product/productManageCtrl.js

@@ -0,0 +1,9 @@
+define(['app/app'], function(app) {
+    'use strict';
+    app.register.controller('productManageCtrl', ['$scope', '$modal', 'toaster', 'ngTableParams', 'treeControl', function($scope, $modal, toaster, ngTableParams, treeControl) {
+        $scope.treedata = createSubTree(3, 4, "");
+        $scope.showSelected = function(sel) {
+            $scope.selectedNode = sel;
+        };
+    }])
+})

+ 2 - 0
src/main/webapp/resources/js/admin/main.js

@@ -6,6 +6,7 @@ require.config({
 		'lib' : 'lib',
 		'common' : 'js/common',
 		'angular' : 'lib/angular/angular.min',
+		'tree-control' : 'lib/angular/angular-tree-control',
 		'ngResource' : 'lib/angular/angular-resource.min',
 		'angularAMD' : 'lib/angular/angularAMD',
 		'ui-bootstrap' : 'lib/angular/ui-bootstrap-tpls.min',
@@ -58,6 +59,7 @@ require.config({
 			'deps' : [ 'angular' ]
 		},
 		'ngAnimate' : ['angular'],
+		'treeControl': ['angular'],
 		'bootstrap' : ['jquery'],
 		'jquery-uploadify' : [ 'jquery' ],
 		'jquery-summernote' : ['jquery', 'bootstrap'],

+ 445 - 0
src/main/webapp/resources/lib/angular/angular-tree-control.js

@@ -0,0 +1,445 @@
+/* commonjs package manager support (eg componentjs) */
+if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){
+  module.exports = 'treeControl';
+}
+(function ( angular ) {
+    'use strict';
+
+    function createPath(startScope) {
+        return function path() {
+            var _path = [];
+            var scope = startScope;
+            var prevNode;
+            while (scope && scope.node !== startScope.synteticRoot) {
+                if (prevNode !== scope.node)
+                    _path.push(scope.node);
+                prevNode = scope.node;
+                scope = scope.$parent;
+            }
+            return _path;
+        }
+    }
+
+    function ensureDefault(obj, prop, value) {
+        if (!obj.hasOwnProperty(prop))
+            obj[prop] = value;
+    }
+
+    function defaultIsLeaf(node, $scope) {
+        return !node[$scope.options.nodeChildren] || node[$scope.options.nodeChildren].length === 0;
+    }
+
+    function shallowCopy(src, dst) {
+        if (angular.isArray(src)) {
+            dst = dst || [];
+
+            for (var i = 0; i < src.length; i++) {
+                dst[i] = src[i];
+            }
+        } else if (angular.isObject(src)) {
+            dst = dst || {};
+
+            for (var key in src) {
+                if (hasOwnProperty.call(src, key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
+                    dst[key] = src[key];
+                }
+            }
+        }
+
+        return dst || src;
+    }
+    function defaultEquality(a, b,$scope) {
+        if (!a || !b)
+            return false;
+        a = shallowCopy(a);
+        a[$scope.options.nodeChildren] = [];
+        b = shallowCopy(b);
+        b[$scope.options.nodeChildren] = [];
+        return angular.equals(a, b);
+    }
+
+    function defaultIsSelectable() {
+        return true;
+    }
+
+    function ensureAllDefaultOptions($scope) {
+        ensureDefault($scope.options, "multiSelection", false);
+        ensureDefault($scope.options, "nodeChildren", "children");
+        ensureDefault($scope.options, "dirSelectable", "true");
+        ensureDefault($scope.options, "injectClasses", {});
+        ensureDefault($scope.options.injectClasses, "ul", "");
+        ensureDefault($scope.options.injectClasses, "li", "");
+        ensureDefault($scope.options.injectClasses, "liSelected", "");
+        ensureDefault($scope.options.injectClasses, "iExpanded", "");
+        ensureDefault($scope.options.injectClasses, "iCollapsed", "");
+        ensureDefault($scope.options.injectClasses, "iLeaf", "");
+        ensureDefault($scope.options.injectClasses, "label", "");
+        ensureDefault($scope.options.injectClasses, "labelSelected", "");
+        ensureDefault($scope.options, "equality", defaultEquality);
+        ensureDefault($scope.options, "isLeaf", defaultIsLeaf);
+        ensureDefault($scope.options, "allowDeselect", true);
+        ensureDefault($scope.options, "isSelectable", defaultIsSelectable);
+    }
+    
+    angular.module( 'treeControl', [] )
+        .constant('treeConfig', {
+            templateUrl: null
+        })
+        .directive( 'treecontrol', ['$compile', function( $compile ) {
+            /**
+             * @param cssClass - the css class
+             * @param addClassProperty - should we wrap the class name with class=""
+             */
+            function classIfDefined(cssClass, addClassProperty) {
+                if (cssClass) {
+                    if (addClassProperty)
+                        return 'class="' + cssClass + '"';
+                    else
+                        return cssClass;
+                }
+                else
+                    return "";
+            }
+            
+            
+            
+            return {
+                restrict: 'EA',
+                require: "treecontrol",
+                transclude: true,
+                scope: {
+                    treeModel: "=",
+                    selectedNode: "=?",
+                    selectedNodes: "=?",
+                    expandedNodes: "=?",
+                    onSelection: "&",
+                    onNodeToggle: "&",
+                    options: "=?",
+                    orderBy: "=?",
+                    reverseOrder: "@",
+                    filterExpression: "=?",
+                    filterComparator: "=?"
+                },
+                controller: ['$scope', '$templateCache', '$interpolate', 'treeConfig', function ($scope, $templateCache, $interpolate, treeConfig) {
+                    
+                    $scope.options = $scope.options || {};
+                    
+                    ensureAllDefaultOptions($scope);
+                  
+                    $scope.selectedNodes = $scope.selectedNodes || [];
+                    $scope.expandedNodes = $scope.expandedNodes || [];
+                    $scope.expandedNodesMap = {};
+                    for (var i=0; i < $scope.expandedNodes.length; i++) {
+                        $scope.expandedNodesMap["a"+i] = $scope.expandedNodes[i];
+                    }
+                    $scope.parentScopeOfTree = $scope.$parent;
+
+
+                    function isSelectedNode(node) {
+                        if (!$scope.options.multiSelection && ($scope.options.equality(node, $scope.selectedNode , $scope)))
+                            return true;
+                        else if ($scope.options.multiSelection && $scope.selectedNodes) {
+                            for (var i = 0; (i < $scope.selectedNodes.length); i++) {
+                                if ($scope.options.equality(node, $scope.selectedNodes[i] , $scope)) {
+                                    return true;
+                                }
+                            }
+                            return false;
+                        }
+                    }
+
+                    $scope.headClass = function(node) {
+                        var liSelectionClass = classIfDefined($scope.options.injectClasses.liSelected, false);
+                        var injectSelectionClass = "";
+                        if (liSelectionClass && isSelectedNode(node))
+                            injectSelectionClass = " " + liSelectionClass;
+                        if ($scope.options.isLeaf(node, $scope))
+                            return "tree-leaf" + injectSelectionClass;
+                        if ($scope.expandedNodesMap[this.$id])
+                            return "tree-expanded" + injectSelectionClass;
+                        else
+                            return "tree-collapsed" + injectSelectionClass;
+                    };
+
+                    $scope.iBranchClass = function() {
+                        if ($scope.expandedNodesMap[this.$id])
+                            return classIfDefined($scope.options.injectClasses.iExpanded);
+                        else
+                            return classIfDefined($scope.options.injectClasses.iCollapsed);
+                    };
+
+                    $scope.nodeExpanded = function() {
+                        return !!$scope.expandedNodesMap[this.$id];
+                    };
+
+                    $scope.selectNodeHead = function() {
+                        var transcludedScope = this;
+                        var expanding = $scope.expandedNodesMap[transcludedScope.$id] === undefined;
+                        $scope.expandedNodesMap[transcludedScope.$id] = (expanding ? transcludedScope.node : undefined);
+                        if (expanding) {
+                            $scope.expandedNodes.push(transcludedScope.node);
+                        }
+                        else {
+                            var index;
+                            for (var i=0; (i < $scope.expandedNodes.length) && !index; i++) {
+                                if ($scope.options.equality($scope.expandedNodes[i], transcludedScope.node , $scope)) {
+                                    index = i;
+                                }
+                            }
+                            if (index !== undefined)
+                                $scope.expandedNodes.splice(index, 1);
+                        }
+                        if ($scope.onNodeToggle) {
+                            var parentNode = (transcludedScope.$parent.node === transcludedScope.synteticRoot)?null:transcludedScope.$parent.node;
+                            var path = createPath(transcludedScope);
+                            $scope.onNodeToggle({node: transcludedScope.node, $parentNode: parentNode, $path: path,
+                              $index: transcludedScope.$index, $first: transcludedScope.$first, $middle: transcludedScope.$middle,
+                              $last: transcludedScope.$last, $odd: transcludedScope.$odd, $even: transcludedScope.$even, expanded: expanding});
+
+                        }
+                    };
+
+                    $scope.selectNodeLabel = function( selectedNode){
+                        var transcludedScope = this;
+                        if(!$scope.options.isLeaf(selectedNode, $scope) && (!$scope.options.dirSelectable || !$scope.options.isSelectable(selectedNode))) {
+                            // Branch node is not selectable, expand
+                            this.selectNodeHead();
+                        }
+                        else if($scope.options.isLeaf(selectedNode, $scope) && (!$scope.options.isSelectable(selectedNode))) {
+                            // Leaf node is not selectable
+                            return;
+                        }
+                        else {
+                            var selected = false;
+                            if ($scope.options.multiSelection) {
+                                var pos = -1;
+                                for (var i=0; i < $scope.selectedNodes.length; i++) {
+                                    if($scope.options.equality(selectedNode, $scope.selectedNodes[i] , $scope)) {
+                                        pos = i;
+                                        break;
+                                    }
+                                }
+                                if (pos === -1) {
+                                    $scope.selectedNodes.push(selectedNode);
+                                    selected = true;
+                                } else {
+                                    $scope.selectedNodes.splice(pos, 1);
+                                }
+                            } else {
+                                if (!$scope.options.equality(selectedNode, $scope.selectedNode , $scope)) {
+                                    $scope.selectedNode = selectedNode;
+                                    selected = true;
+                                }
+                                else {
+                                    if ($scope.options.allowDeselect) {
+                                        $scope.selectedNode = undefined;
+                                    } else {
+                                        $scope.selectedNode = selectedNode;
+                                        selected = true;
+                                    }
+                                }
+                            }
+                            if ($scope.onSelection) {
+                                var parentNode = (transcludedScope.$parent.node === transcludedScope.synteticRoot)?null:transcludedScope.$parent.node;
+                                var path = createPath(transcludedScope)
+                                $scope.onSelection({node: selectedNode, selected: selected, $parentNode: parentNode, $path: path,
+                                  $index: transcludedScope.$index, $first: transcludedScope.$first, $middle: transcludedScope.$middle,
+                                  $last: transcludedScope.$last, $odd: transcludedScope.$odd, $even: transcludedScope.$even});
+                            }
+                        }
+                    };
+
+                    $scope.selectedClass = function() {
+                        var isThisNodeSelected = isSelectedNode(this.node);
+                        var labelSelectionClass = classIfDefined($scope.options.injectClasses.labelSelected, false);
+                        var injectSelectionClass = "";
+                        if (labelSelectionClass && isThisNodeSelected)
+                            injectSelectionClass = " " + labelSelectionClass;
+
+                        return isThisNodeSelected ? "tree-selected" + injectSelectionClass : "";
+                    };
+
+                    $scope.unselectableClass = function() {
+                        var isThisNodeUnselectable = !$scope.options.isSelectable(this.node);
+                        var labelUnselectableClass = classIfDefined($scope.options.injectClasses.labelUnselectable, false);
+                        return isThisNodeUnselectable ? "tree-unselectable " + labelUnselectableClass : "";
+                    };
+
+                    //tree template
+                    $scope.isReverse = function() {
+                      return !($scope.reverseOrder === 'false' || $scope.reverseOrder === 'False' || $scope.reverseOrder === '' || $scope.reverseOrder === false);
+                    };
+
+                    $scope.orderByFunc = function() {
+                      return $scope.orderBy;
+                    };
+//                    return "" + $scope.orderBy;
+
+                    var templateOptions = {
+                        orderBy: $scope.orderBy ? " | orderBy:orderByFunc():isReverse()" : '',
+                        ulClass: classIfDefined($scope.options.injectClasses.ul, true),
+                        nodeChildren:  $scope.options.nodeChildren,
+                        liClass: classIfDefined($scope.options.injectClasses.li, true),
+                        iLeafClass: classIfDefined($scope.options.injectClasses.iLeaf, false),
+                        labelClass: classIfDefined($scope.options.injectClasses.label, false)
+                    };
+
+                    var template;
+                    var templateUrl = $scope.options.templateUrl || treeConfig.templateUrl;
+
+                    if(templateUrl) {
+                        template = $templateCache.get(templateUrl);
+                    }
+
+                    if(!template) {
+                        template =
+                            '<ul {{options.ulClass}} >' +
+                            '<li ng-repeat="node in node.{{options.nodeChildren}} | filter:filterExpression:filterComparator {{options.orderBy}}" ng-class="headClass(node)" {{options.liClass}}' +
+                            'set-node-to-data>' +
+                            '<i class="tree-branch-head" ng-class="iBranchClass()" ng-click="selectNodeHead(node)"></i>' +
+                            '<i class="tree-leaf-head {{options.iLeafClass}}"></i>' +
+                            '<div class="tree-label {{options.labelClass}}" ng-class="[selectedClass(), unselectableClass()]" ng-click="selectNodeLabel(node)" tree-transclude></div>' +
+                            '<treeitem ng-if="nodeExpanded()"></treeitem>' +
+                            '</li>' +
+                            '</ul>';
+                    }
+
+                    this.template = $compile($interpolate(template)({options: templateOptions}));
+                }],
+                compile: function(element, attrs, childTranscludeFn) {
+                    return function ( scope, element, attrs, treemodelCntr ) {
+
+                        scope.$watch("treeModel", function updateNodeOnRootScope(newValue) {
+                            if (angular.isArray(newValue)) {
+                                if (angular.isDefined(scope.node) && angular.equals(scope.node[scope.options.nodeChildren], newValue))
+                                    return;
+                                scope.node = {};
+                                scope.synteticRoot = scope.node;
+                                scope.node[scope.options.nodeChildren] = newValue;
+                            }
+                            else {
+                                if (angular.equals(scope.node, newValue))
+                                    return;
+                                scope.node = newValue;
+                            }
+                        });
+
+                        scope.$watchCollection('expandedNodes', function(newValue, oldValue) {
+                            var notFoundIds = 0;
+                            var newExpandedNodesMap = {};
+                            var $liElements = element.find('li');
+                            var existingScopes = [];
+                            // find all nodes visible on the tree and the scope $id of the scopes including them
+                            angular.forEach($liElements, function(liElement) {
+                                var $liElement = angular.element(liElement);
+                                var liScope = {
+                                    $id: $liElement.data('scope-id'),
+                                    node: $liElement.data('node')
+                                };
+                                existingScopes.push(liScope);
+                            });
+                            // iterate over the newValue, the new expanded nodes, and for each find it in the existingNodesAndScopes
+                            // if found, add the mapping $id -> node into newExpandedNodesMap
+                            // if not found, add the mapping num -> node into newExpandedNodesMap
+                            angular.forEach(newValue, function(newExNode) {
+                                var found = false;
+                                for (var i=0; (i < existingScopes.length) && !found; i++) {
+                                    var existingScope = existingScopes[i];
+                                    if (scope.options.equality(newExNode, existingScope.node , scope)) {
+                                        newExpandedNodesMap[existingScope.$id] = existingScope.node;
+                                        found = true;
+                                    }
+                                }
+                                if (!found)
+                                    newExpandedNodesMap['a' + notFoundIds++] = newExNode;
+                            });
+                            scope.expandedNodesMap = newExpandedNodesMap;
+                        });
+
+//                        scope.$watch('expandedNodesMap', function(newValue) {
+//
+//                        });
+
+                        //Rendering template for a root node
+                        treemodelCntr.template( scope, function(clone) {
+                            element.html('').append( clone );
+                        });
+                        // save the transclude function from compile (which is not bound to a scope as apposed to the one from link)
+                        // we can fix this to work with the link transclude function with angular 1.2.6. as for angular 1.2.0 we need
+                        // to keep using the compile function
+                        scope.$treeTransclude = childTranscludeFn;
+                    };
+                }
+            };
+        }])
+        .directive("setNodeToData", ['$parse', function($parse) {
+            return {
+                restrict: 'A',
+                link: function($scope, $element, $attrs) {
+                    $element.data('node', $scope.node);
+                    $element.data('scope-id', $scope.$id);
+                }
+            };
+        }])
+        .directive("treeitem", function() {
+            return {
+                restrict: 'E',
+                require: "^treecontrol",
+                link: function( scope, element, attrs, treemodelCntr) {
+                    // Rendering template for the current node
+                    treemodelCntr.template(scope, function(clone) {
+                        element.html('').append(clone);
+                    });
+                }
+            };
+        })
+        .directive("treeTransclude", function () {
+            return {
+                controller: ['$scope',function ($scope) {
+                    ensureAllDefaultOptions($scope);
+                }],
+
+                link: function(scope, element, attrs, controller) {
+                    if (!scope.options.isLeaf(scope.node, scope)) {
+                        angular.forEach(scope.expandedNodesMap, function (node, id) {
+                            if (scope.options.equality(node, scope.node , scope)) {
+                                scope.expandedNodesMap[scope.$id] = scope.node;
+                                scope.expandedNodesMap[id] = undefined;
+                            }
+                        });
+                    }
+                    if (!scope.options.multiSelection && scope.options.equality(scope.node, scope.selectedNode , scope)) {
+                        scope.selectedNode = scope.node;
+                    } else if (scope.options.multiSelection) {
+                        var newSelectedNodes = [];
+                        for (var i = 0; (i < scope.selectedNodes.length); i++) {
+                            if (scope.options.equality(scope.node, scope.selectedNodes[i] , scope)) {
+                                newSelectedNodes.push(scope.node);
+                            }
+                        }
+                        scope.selectedNodes = newSelectedNodes;
+                    }
+
+                    // create a scope for the transclusion, whos parent is the parent of the tree control
+                    scope.transcludeScope = scope.parentScopeOfTree.$new();
+                    scope.transcludeScope.node = scope.node;
+                    scope.transcludeScope.$path = createPath(scope);
+                    scope.transcludeScope.$parentNode = (scope.$parent.node === scope.synteticRoot)?null:scope.$parent.node;
+                    scope.transcludeScope.$index = scope.$index;
+                    scope.transcludeScope.$first = scope.$first;
+                    scope.transcludeScope.$middle = scope.$middle;
+                    scope.transcludeScope.$last = scope.$last;
+                    scope.transcludeScope.$odd = scope.$odd;
+                    scope.transcludeScope.$even = scope.$even;
+                    scope.$on('$destroy', function() {
+                        scope.transcludeScope.$destroy();
+                    });
+
+                    scope.$treeTransclude(scope.transcludeScope, function(clone) {
+                        element.empty();
+                        element.append(clone);
+                    });
+                }
+            };
+        });
+})( angular );

+ 10 - 0
src/main/webapp/resources/view/admin/modal/manage/ManageSoldOut.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+
+</body>
+</html>

+ 10 - 0
src/main/webapp/resources/view/admin/modal/manage/manageAudit.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+
+</body>
+</html>

+ 10 - 0
src/main/webapp/resources/view/admin/modal/manage/manageCheckPhoto.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+
+</body>
+</html>

+ 10 - 0
src/main/webapp/resources/view/admin/modal/manage/manageNotAudit.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+
+</body>
+</html>

+ 10 - 0
src/main/webapp/resources/view/admin/modal/manage/moreInfo_modal.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+
+</body>
+</html>

+ 10 - 0
src/main/webapp/resources/view/admin/modal/manage/productsExport_modal.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+
+</body>
+</html>

+ 10 - 0
src/main/webapp/resources/view/admin/modal/manage/viewLog_modal.html

@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <title>Title</title>
+</head>
+<body>
+
+</body>
+</html>

+ 343 - 0
src/main/webapp/resources/view/admin/product/productManage.html

@@ -0,0 +1,343 @@
+<div id="manage">
+    <div class="container-fluid">
+        <div class="manage-form">
+            <div class="form-top">
+                <div class="form-inline">
+                    <div class="form-group form-group-sm">
+                        <label class="control-label">
+                            关键字:
+                            <input class="form-control width140" type="text" placeholder="商家/类目/型号/品牌等">
+                        </label>
+                    </div>
+                    <div class="form-group form-group-sm">
+                        <label class="control-label">
+                            商家:
+                            <input class="form-control width140" type="text" placeholder="商家ID/商家名称">
+                        </label>
+                    </div>
+                    <div class="form-group form-group-sm">
+                        <label class="control-label">
+                            在售状态:
+                            <select name="" id="1" class="form-control width88">
+                                <option value="">全部</option>
+                            </select>
+                        </label>
+                    </div>
+                    <div class="form-group form-group-sm">
+                        <label class="control-label">
+                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;币种:
+                            <select name="" id="2" class="form-control width60">
+                                <option value="">全部</option>
+                            </select>
+                        </label>
+                    </div>
+                    <div class="form-group form-group-sm">
+                        <label class="control-label">
+                            拆包售卖:
+                            <select name="" id="3" class="form-control width88">
+                                <option value="">全部</option>
+                            </select>
+                        </label>
+                    </div>
+                    <div class="form-group form-group-sm">
+                        <label class="control-label">
+                            审核状态:
+                            <select name="" id="4" class="form-control width60">
+                                <option value="">全部</option>
+                            </select>
+                        </label>
+                    </div>
+                </div>
+                <div class="form-inline">
+                    <div class="form-group form-group-sm">
+                        <label class="control-label">
+                            &nbsp;&nbsp;&nbsp;类目:
+                            <treecontrol class="tree-dark"
+                                         tree-model="treedata"
+                                         on-selection="showSelected(node)">
+                                label: {{node.label}} ({{node.id}})
+                            </treecontrol>
+                        </label>
+                    </div>
+                    <div class="form-group form-group-sm">
+                        <label class="control-label">
+                            品牌:
+                            <input type="text" placeholder="品牌中英文名称" class="form-control width140">
+                        </label>
+                    </div>
+                    <div class="form-group form-group-sm">
+                        <label class="control-label">
+                            在售数量:
+                            <select name="" id="6" class="form-control width88">
+                                <option value="">全部</option>
+                            </select>
+                        </label>
+                    </div>
+                    <div class="form-group form-group-sm">
+                        <label class="control-label">
+                            销售方式:
+                            <select name="" id="7" class="form-control width60">
+                                <option value="">全部</option>
+                            </select>
+                        </label>
+                    </div>
+                    <div class="form-group form-group-sm">
+                        <label class="control-label">
+                            产品类型:
+                            <select name="" id="8" class="form-control width88">
+                                <option value="">全部</option>
+                            </select>
+                        </label>
+                    </div>
+                    <div class="form-group form-group-sm">
+                        <label class="control-label">
+                            图片类型:
+                            <select name="" id="9" class="form-control width88">
+                                <option value="">全部</option>
+                            </select>
+                        </label>
+                    </div>
+                    <div class="form-group form-group-sm">
+                        <button>搜索</button>
+                    </div>
+                    <div class="form-group form-group-sm">
+                        <button>产品导出</button>
+                    </div>
+                </div>
+            </div>
+            <div class="form-bottom">
+                <button>批量下架</button>
+                <button>更多信息</button>
+                <label>
+                    <input type="checkbox">合并相同产品
+                </label>
+            </div>
+        </div>
+        <div class="manage-table">
+           <table class="table">
+               <thead>
+               <tr>
+                   <th width="80">
+                       <label>
+                           <input type="checkbox">全选
+                       </label>
+                   </th>
+                   <th width="100">操作</th>
+                   <th width="130">商家名称</th>
+                   <th width="150">产品信息</th>
+                   <th width="80">封装</th>
+                   <th width="100">梯度</th>
+                   <th width="60">单价</th>
+                   <th width="80">交期(天)</th>
+                   <th width="100">在售状态</th>
+                   <th width="100">在售数量</th>
+                   <th width="100">库存总数</th>
+                   <th width="80">销售方式</th>
+                   <th width="100">产品图片</th>
+               </tr>
+               </thead>
+               <tbody>
+               <tr>
+                   <td>
+                       <input type="checkbox">
+                   </td>
+                   <td>
+                       <button>详情</button>
+                       <button>审核</button>
+                       <br/>
+                       <button style="margin-left:-1px;">日志</button>
+                       <button>下架</button>
+                   </td>
+                   <td>
+                       <span>深圳华商龙safdsafda小亲和力</span>
+                   </td>
+                   <td>
+                       <p>类目:<span>****</span></p>
+                       <p>型号:<span>****</span></p>
+                       <p>品牌:<span>****</span></p>
+                   </td>
+                   <td>
+                       -
+                   </td>
+                   <td>
+                       <p>1-33</p>
+                       <p>1-555</p>
+                       <p>1-5555555</p>
+                   </td>
+                   <td>
+                       <span>2521230</span>
+                   </td>
+                   <td>
+                       <span>5-5</span>
+                   </td>
+                   <td>
+                       <span>上架</span>
+                   </td>
+                   <td>
+                       <span>454646465</span>
+                   </td>
+                   <td>
+                       <span>5646546</span>
+                   </td>
+                   <td>
+                       <span>自营</span>
+                   </td>
+                   <td>
+                       <img src="static/img/user/images/shop_home.png">
+                   </td>
+               </tr>
+               </tbody>
+           </table>
+       </div>
+    </div>
+</div>
+<style>
+    #manage input[type=checkbox]{
+        position:relative;
+        top:3px;
+        left:-3px;
+    }
+    .manage-form{
+        height:158px;
+        background: #fff;
+        border-radius:5px;
+    }
+    .manage-form .form-top{
+        padding-top:15px;
+    }
+    .manage-form .form-top .form-inline{
+        display: inline-block;
+        width:1470px;
+        margin-bottom:10px;
+    }
+    .manage-form .form-top .form-group{
+        display: inline-block;
+        margin:0 18px;
+    }
+    .manage-form .form-top label{
+        text-align: right;
+        font-size: 14px;
+        color:#666;
+    }
+    .manage-form .form-top label input{
+        display: inline-block;
+        height:25px;
+        line-height: 25px;
+        padding:0 2px;
+        margin:0;
+    }
+    .manage-form .form-top label select{
+        display: inline-block;
+        height:25px;
+        line-height: 25px;
+        padding:0 2px;
+        margin:0;
+    }
+    .manage-form .form-top label .width140{
+        padding:0 2px;
+        width:140px;
+    }
+    .manage-form .form-top label .width88{
+        width:88px;
+    }
+    .manage-form .form-top label .width60{
+        width:60px;
+    }
+    .manage-form .form-bottom{
+        margin-top:32px;
+    }
+    .manage-form  button{
+        border-radius:3px;
+        border:none;
+        line-height: 25px;
+        padding:0 15px;
+        font-size: 14px;
+        color:#fff;
+        background: #49afea;
+    }
+    .manage-form .form-bottom button{
+        margin:0 18px;
+    }
+    .manage-table{}
+    .manage-table table{
+        table-layout: fixed;
+        font-size: 14px;
+        color:#666;
+        border-collapse:separate;
+        border-spacing:0 5px;
+    }
+    .manage-table table thead tr{
+        height:50px;
+        line-height: 50px;
+        background: #f5f5f5;
+    }
+    .manage-table table thead tr label{
+        margin:0;
+    }
+    .manage-table table thead th{
+        text-align: center;
+        border:none;
+    }
+    .manage-table table thead th:first-child{
+        text-align: left;
+        padding-left:20px;
+    }
+    .manage-table table tbody{}
+    .manage-table table tbody tr{
+        height:72px;
+        margin-bottom:10px;
+        background: #fff;
+    }
+    .manage-table table tbody tr:hover{
+        position:relative;
+        top:2px;
+        left:2px;
+        cursor:pointer;
+        box-shadow:0 0 10px #e0e0e0;
+        background: #fff;
+    }
+    .manage-table table tbody td{
+        border:none;
+        vertical-align: middle;
+        text-align: center;
+    }
+    .manage-table table tbody td:first-child{
+        text-align: left;
+        padding-left:20px;
+    }
+    .manage-table table tbody td:nth-child(2){
+        padding:0;
+    }
+    .manage-table table tbody td:nth-child(3) span{
+        display:block;
+        overflow: hidden;
+        text-overflow:ellipsis ;
+        white-space: nowrap;
+    }
+    .manage-table table tbody td p{
+        margin:0;
+        font-size: 14px;
+        line-height: 18px;
+    }
+    .manage-table table tbody td p span{
+        margin:0;
+        font-size: 14px;
+        line-height: 18px;
+    }
+    .manage-table table tbody td button{
+        padding:0 8px;
+        margin:2px;
+        line-height: 18px;
+        height:20px;
+        border:1px solid #35a6e8;
+        border-radius:3px;
+        font-size: 12px;
+        color:#666;
+        background: #fff;
+    }
+    .manage-table table tbody td button:hover{
+        background: #35a6e8;
+        cursor:pointer;
+        color:#fff;
+    }
+</style>