Browse Source

引入b2b客户资料

yangc 8 years ago
parent
commit
082cd5ae1f

+ 293 - 84
src/main/webapp/resources/js/common/b2bServices.js

@@ -2,92 +2,301 @@ define([ 'angular', 'common/utils', 'big'], function(angular, utils) {
     'use strict';
     angular.module('common.b2bServices', [ 'common.utils', 'ngResource' ])
         .factory('SearchFilter', function() {
-        return {
-            /**
-             * 改变单据日期范围
-             */
-            getDateCondition: function (zone, condition) {
-                var fromDate = new Date();
-                var toDate = new Date();
-                //去除时分秒限制,dateFrom设置成0时0分0秒,dateTo设置成23时59分59秒
-                fromDate.setHours(0, 0, 0, 0);
-                toDate.setHours(23, 59, 59, 999);
-                if (zone == -1) { // 自定义时间,什么都不做
+            return {
+                /**
+                 * 改变单据日期范围
+                 */
+                getDateCondition: function (zone, condition) {
+                    var fromDate = new Date();
+                    var toDate = new Date();
+                    //去除时分秒限制,dateFrom设置成0时0分0秒,dateTo设置成23时59分59秒
+                    fromDate.setHours(0, 0, 0, 0);
+                    toDate.setHours(23, 59, 59, 999);
+                    if (zone == -1) { // 自定义时间,什么都不做
 
-                } else if (zone == 1) {
-                    fromDate.setMonth(fromDate.getMonth() - 1);
-                    condition.dateFrom = fromDate;
-                    condition.dateTo = toDate;
-                } else if (zone == 3) {
-                    fromDate.setMonth(fromDate.getMonth() - 3);
-                    condition.dateFrom = fromDate;
-                    condition.dateTo = toDate;
-                } else if (zone == 6) {
-                    fromDate.setMonth(fromDate.getMonth() - 6);
-                    condition.dateFrom = fromDate;
-                    condition.dateTo = toDate;
-                } else {
-                    condition.dateFrom = null;
-                    condition.dateTo = null;
+                    } else if (zone == 1) {
+                        fromDate.setMonth(fromDate.getMonth() - 1);
+                        condition.dateFrom = fromDate;
+                        condition.dateTo = toDate;
+                    } else if (zone == 3) {
+                        fromDate.setMonth(fromDate.getMonth() - 3);
+                        condition.dateFrom = fromDate;
+                        condition.dateTo = toDate;
+                    } else if (zone == 6) {
+                        fromDate.setMonth(fromDate.getMonth() - 6);
+                        condition.dateFrom = fromDate;
+                        condition.dateTo = toDate;
+                    } else {
+                        condition.dateFrom = null;
+                        condition.dateTo = null;
+                    }
+                    return condition;
+                },
+                /**
+                 * 改变单据交货日期范围
+                 */
+                getDeliveryCondition: function (zone, condition) {
+                    var date = new Date();
+                    if (zone == -1) {
+                        condition.deliveryFrom = null;
+                        condition.deliveryTo = null;
+                    } else if (zone == 1) {
+                        date.setMonth(date.getMonth() + 1);
+                        condition.deliveryTo = date;
+                        condition.deliveryFrom = new Date();
+                    } else if (zone == 2) {
+                        date.setMonth(date.getMonth() + 2);
+                        condition.deliveryTo = date;
+                        condition.deliveryFrom = new Date();
+                    }
+                    return condition;
+                },
+
+                /**
+                 * 将日期转化为整数日期
+                 */
+                getDateTime: function (date) {
+                    if (angular.isDate(date)) {
+                        return date.getTime();
+                    } else {
+                        return null;
+                    }
+                },
+
+                /**
+                 * 将date转成time
+                 *
+                 * @param date
+                 * @returns {string}
+                 */
+                formatDateTime: function (date) {
+                    var y = date.getFullYear();
+                    var m = date.getMonth() + 1;
+                    m = m < 10 ? ('0' + m) : m;
+                    var d = date.getDate();
+                    d = d < 10 ? ('0' + d) : d;
+                    var h = date.getHours();
+                    var minute = date.getMinutes();
+                    var sec = date.getSeconds();
+                    minute = minute < 10 ? ('0' + minute) : minute;
+                    return y + '-' + m + '-' + d+' '+h+':'+minute+':'+sec;
                 }
-                return condition;
-            },
-            /**
-             * 改变单据交货日期范围
-             */
-            getDeliveryCondition: function (zone, condition) {
-                var date = new Date();
-                if (zone == -1) {
-                    condition.deliveryFrom = null;
-                    condition.deliveryTo = null;
-                } else if (zone == 1) {
-                    date.setMonth(date.getMonth() + 1);
-                    condition.deliveryTo = date;
-                    condition.deliveryFrom = new Date();
-                } else if (zone == 2) {
-                    date.setMonth(date.getMonth() + 2);
-                    condition.deliveryTo = date;
-                    condition.deliveryFrom = new Date();
+            };
+        })
+        .factory('B2bCommerce', ['$resource', function($resource) {
+            return $resource('b2b/sale', {}, {
+                accessUrl : {
+                    url: 'b2b/sale/accessUrl',
+                    method: 'GET'
                 }
-                return condition;
-            },
-
-            /**
-             * 将日期转化为整数日期
-             */
-            getDateTime: function (date) {
-                if (angular.isDate(date)) {
-                    return date.getTime();
-                } else {
-                    return null;
+            });
+        }])
+        .factory('VendorService', ['$http', '$resource', 'BaseService', function($http, $resource, BaseService) {
+            var rootPath = BaseService.getRootPath();
+            return {
+                getCount: function(success) {
+                    var request = $http.get(rootPath + '/vendor/count');
+                    request.success(function(data) {
+                        success.call(null, data);
+                    });
+                },
+                customer: $resource('http://192.168.253.12:9000/b2b-test/vendor/customer/info/search', {}),
+                vendor: $resource('http://192.168.253.12:9000/b2b-test/vendor/info/search', {}),
+                userInfo: $resource('http://192.168.253.12:9000/b2b-test/vendor/userInfo/:uu', {}),
+                user: $resource('http://192.168.253.12:9000/b2b-test/vendor/user', {}),
+                exportXls: $resource('http://192.168.253.12:9000/b2b-test/vendor/customer/xls/permission', {})
+            };
+        }])
+        .factory('Vendor', ['$resource', function($resource){
+            return $resource('http://192.168.253.12:9000/b2b-test/purc/vendor/:id', {}, {
+                getServe: {
+                    // 调取使用uas系统的供应商信息
+                    url: 'http://192.168.253.12:9000/b2b-test/purc/vendor/serve',
+                    isArray: true
+                },
+                getVendor: {
+                    url: 'http://192.168.253.12:9000/b2b-test/vendor/info/search'
+                },
+                getServicer: {
+                    url: 'http://192.168.253.12:9000/b2b-test/vendor/servicer'
+                },
+                getVendorDetail: {
+                    url: 'http://192.168.253.12:9000/b2b-test/vendor/:id/info',
+                    method: 'GET'
+                },
+                getCustomerDetail: {
+                    url: 'http://192.168.253.12:9000/b2b-test/vendor/customer/:id/info',
+                    method: 'GET'
+                },
+                saveContact: {
+                    url: 'http://192.168.253.12:9000/b2b-test/vendor/savecontact',
+                    method: 'POST'
+                },
+                contacts: {
+                    url: 'http://192.168.253.12:9000/b2b-test/vendor/contacts/:venduu',
+                    method: 'GET',
+                    isArray: true
+                },
+                deleteContact: {
+                    url: 'http://192.168.253.12:9000/b2b-test/vendor/deleteContact/:id',
+                    method: 'DELETE'
+                },
+                getSimilarVendors: {
+                    url: 'http://192.168.253.12:9000/b2b-test/search/similarVendors',
+                    method: 'GET',
+                    isArray: true
+                },
+                getSimilarCustomers: {
+                    url: 'http://192.168.253.12:9000/b2b-test/search/similarCustomers',
+                    method: 'GET',
+                    isArray: true
+                },
+                saveCustContact: {
+                    url: 'http://192.168.253.12:9000/b2b-test/vendor/saveCustomerContact',
+                    method: 'POST'
+                },
+                custContacts: {
+                    url: 'http://192.168.253.12:9000/b2b-test/vendor/custContacts/:enuu',
+                    method: 'GET',
+                    isArray: true
+                },
+                getSimilarEnterprise: {
+                    url: 'http://192.168.253.12:9000/b2b-test/search/similarEnterprise',
+                    method: 'GET',
+                    isArray: true
+                },
+                vendorInfo: {
+                    url: 'http://192.168.253.12:9000/b2b-test/vendor/vendorInfo',
+                    method: 'GET'
+                },
+                enterpriseInfo: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/enterprise/info/:bussinessCode',
+                    method: 'GET'
+                },
+                setRead:{
+                    url: 'http://192.168.253.12:9000/b2b-test/vendor/customer/setRead',
+                    method: 'POST'
+                },
+                setVendorRead:{
+                    url: 'http://192.168.253.12:9000/b2b-test/vendor/vendor/setRead',
+                    method: 'POST'
                 }
-            },
-
-            /**
-             * 将date转成time
-             *
-             * @param date
-             * @returns {string}
-             */
-            formatDateTime: function (date) {
-                var y = date.getFullYear();
-                var m = date.getMonth() + 1;
-                m = m < 10 ? ('0' + m) : m;
-                var d = date.getDate();
-                d = d < 10 ? ('0' + d) : d;
-                var h = date.getHours();
-                var minute = date.getMinutes();
-                var sec = date.getSeconds();
-                minute = minute < 10 ? ('0' + minute) : minute;
-                return y + '-' + m + '-' + d+' '+h+':'+minute+':'+sec;
-            }
-        };
-    }).factory('B2bCommerce', ['$resource', function($resource) {
-        return $resource('b2b/sale', {}, {
-            accessUrl : {
-                url: 'b2b/sale/accessUrl',
-                method: 'GET'
-            }
-        });
-    }]);
+            });
+        }])
+        .factory('AccountUser', ['$resource', function($resource) {
+            return $resource('http://192.168.253.12:9000/b2b-test/account/user/:uu', {}, {
+                getAll: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user',
+                    method: 'GET'
+                },
+                findUsers: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/customer/:uu',
+                    method: 'POST',
+                    isArray: true
+                },
+                addUserToVendor: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/bindUserToVendor/:uu',
+                    method: 'POST'
+                },
+                transferUserToVendor: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/transferUserToVendor/:uu',
+                    method: 'POST'
+                },
+                transferMyDistribute: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/transferMyDistribute',
+                    method: 'POST'
+                },
+                findDistribute: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/findDistribute',
+                    method: 'GET',
+                    isArray: true
+                },
+                getDistribute: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/getDistribute/:custUU',
+                    method: 'GET'
+                },
+                getEnTransfer: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/getEnTransfer/:custUU',
+                    method: 'GET'
+                },
+                findVendor: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/findVendor/:uu',
+                    method: 'GET',
+                    isArray: true
+                },
+                findChooseVendor: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/removeVendor/:uu',
+                    method: 'GET',
+                    isArray: true
+                },
+                removeChooseVendor: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/removeVendor/:uu',
+                    method: 'POST',
+                    isArray: true
+                },
+                addVendor: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/addVendor/:uu',
+                    method: 'POST'
+                },
+                update: {
+                    method: 'PUT'
+                },
+                updateRole: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/update/role',
+                    method: 'POST'
+                },
+                checkPassword: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/checkPassword',
+                    method: 'GET'
+                },
+                updatePassword: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/updatePassword',
+                    method: 'POST'
+                },
+                telEnable: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/telEnable',
+                    method: 'GET'
+                },
+                emailEnable: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/emailEnable',
+                    method: 'GET'
+                },
+                findUsersByKeyword: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/info',
+                    method: 'GET',
+                    isArray: true
+                },
+                getUpdatePasswordUrl: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/getUrl',
+                    params: {
+                        "_operate": "updatePassword"
+                    },
+                    method: 'GET'
+                },
+                getCloudCenterUrl: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/user/getUrl',
+                    params: {
+                        "_operate": "cloudcenter"
+                    },
+                    method: 'GET'
+                }
+            });
+        }])
+        .factory('CurrentRole', ['$resource', function($resource) {
+            return $resource('http://192.168.253.12:9000/b2b-test/account/role', {}, {
+                //当前企业对应的角色是否是销售经理或管理员
+                roles: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/role/currentRole',
+                    method: 'GET'
+                },
+                isManager: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/role/isManager',
+                    method: 'GET'
+                },
+                isUser: {
+                    url: 'http://192.168.253.12:9000/b2b-test/account/role/isUser',
+                    method: 'GET'
+                }
+            })
+        }]);
 });

+ 6 - 0
src/main/webapp/resources/js/vendor/app.js

@@ -669,6 +669,12 @@ define([ 'angularAMD', 'ngLocal', 'common/services', 'common/directives', 'commo
             templateUrl: 'static/view/vendor/b2b/sale_send.html',
             controller: 'saleSendCtrl',
             controllerUrl: 'app/controllers/b2b/saleSendCtrl'
+		})).state('vendorBaseInfo', angularAMD.route({
+			url: '/baseInfo',
+			title: 'b2b客户资料',
+			templateUrl: 'static/view/vendor/b2b/sale/customer.html',
+			controller: 'CustomerCtrl',
+			controllerUrl: 'app/controllers/b2b/sale/saleCustomerCtrl'
 		}));
 	}]);
 

+ 195 - 0
src/main/webapp/resources/js/vendor/controllers/b2b/sale/saleCustomerCtrl.js

@@ -0,0 +1,195 @@
+define(['app/app'], function (app) {
+    "use strict";
+// 客户
+    app.register.controller('CustomerCtrl', ['$scope', 'VendorService', 'BaseService', 'AuthenticationService', 'ngTableParams', '$modal', 'toaster', 'Vendor', 'AccountUser', 'CurrentRole', function ($scope, VendorService, BaseService, AuthenticationService, ngTableParams, $modal, toaster, Vendor, AccountUser, CurrentRole) {
+        BaseService.scrollBackToTop();
+        $scope.userInfoResult = true;
+        AuthenticationService.getAuthentication().success(function (data) {
+            $scope.loading = false;
+            $scope.thisUser = data;
+        });
+        // 获取当前用户分配客户的操作权限
+        CurrentRole.roles({}, function (data) {
+            // 存在权限或者user表sys字段为1时
+            $scope.enabled =  data.count > 0 || $scope.thisUser.sys;
+        }, function (response) {
+
+        });
+        var getCustInfos = function (custuu) {
+            if (custuu) {
+                VendorService.userInfo.query({uu: custuu}, null, function (data) {
+                    $scope.custInfos = data;
+                    var getPage = function (page, size) {
+                        if ($scope.custInfos) {
+                            var result = {};
+                            result.totalCount = $scope.custInfos.length;
+                            result.content = $scope.custInfos.slice((page - 1) * size, page * size);
+                            if ($scope.custInfos.length % size == 0) {
+                                result.totalPage = ($scope.custInfos.length - $scope.custInfos.length % size) / size;
+                            } else {
+                                result.totalPage = ($scope.custInfos.length - $scope.custInfos.length % size) / size + 1;
+                            }
+                            result.first = page == 1;
+                            result.last = page == result.totalPage;
+                            result.page = page;
+                            result.next = page - 0 + 1;
+                            result.pre = page - 1;
+                            return result;
+                        }
+                    }
+                    $scope.userdata = getPage(1, 4);
+                    $scope.first = function () {
+                        $scope.userdata = getPage($scope.userdata.pre, 4);
+                    }
+                    $scope.last = function () {
+                        $scope.userdata = getPage($scope.userdata.next, 4);
+                    }
+                }, function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '数据加载失败', response.data);
+                });
+            }
+        }
+
+        // 分配用户
+        $scope.addUserInfo = function (customer) {
+            if (!$scope.enabled) {
+                toaster.pop('error', '您没有为当前客户分配用户的权限!');
+                return;
+            }
+            // 获取当前用户在当前企业是否被转移权限
+            AccountUser.getEnTransfer ({custUU: customer.myEnterprise.uu}, function(data) {
+                customer.enTransfer = data.result;
+                //是管理员,或者被转移了权限时
+                if ($scope.enabled || customer.enTransfer) {
+                    var modalInstance = $modal.open({
+                        animation: true,
+                        templateUrl: 'static/tpl/index/account/add_userInfo.html',
+                        controller: 'AddUserInfoCtrl',
+                        resolve: {
+                            customer: function () {
+                                return customer;
+                            }
+                        }
+                    });
+                    modalInstance.result.then(function (changed, checked) {
+                        if (changed) {
+                            if (checked)
+                                $scope.newUser.roles = checked;
+                            else
+                                loadUsers();
+                        }
+                    });
+
+                } else {
+                    toaster.pop('error', '您没有为当前客户分配用户的权限!');
+                }
+            });
+        };
+
+        // 转移权限
+        $scope.transferUserInfo = function (customer) {
+            customer.enDistribute = null;
+            if (!$scope.enabled) {
+                toaster.pop('error', '您没有转移当前客户权限的权限!');
+                return;
+            }
+            // 获取当前用户在当前企业是否被转移权限
+            AccountUser.getDistribute ({custUU: customer.myEnterprise.uu}, function(data) {
+                customer.enDistribute = data.result;
+                //是管理员,或者被分配时
+                if ($scope.enabled || customer.enDistribute) {
+                    var modalInstance = $modal.open({
+                        animation: true,
+                        templateUrl: 'static/tpl/index/account/transfer_userInfo.html',
+                        controller: 'TransferUserInfoCtrl',
+                        resolve: {
+                            customer: function () {
+                                return customer;
+                            }
+                        }
+                    });
+                    modalInstance.result.then(function (changed, checked) {
+                        if (changed) {
+                            if (checked)
+                                $scope.newUser.roles = checked;
+                            else
+                                loadUsers();
+                        }
+                    });
+
+                } else {
+                    toaster.pop('error', '您没有转移当前客户权限的权限!');
+                }
+            });
+        };
+
+        $scope.showUserInfo = function (customer, boo) {
+            $scope.custInfo = customer;
+            if (boo) {
+                getCustInfos(customer.myEnterprise.uu);
+                $scope.userInfoResult = true;
+            }
+        };
+
+        var getService = function () {
+            return VendorService;
+        };
+        $scope.customerParams = new ngTableParams({
+            page: 1,
+            count: 20
+        }, {
+            total: 0,
+            counts: [5, 10, 25, 50],
+            getData: function ($defer, params) {
+                $scope.loading = true;
+                var pageParams = params.url();
+                pageParams.keyword = $scope.keyword;
+                VendorService.customer.get(BaseService.parseParams(pageParams), function (page) {
+                    $scope.loading = false;
+                    if (page) {
+                        params.total(page.totalElement);
+                        $defer.resolve(page.content);
+                        $scope.keywordXls = pageParams.keyword;
+                    }
+                    $scope.totalCount = page.totalElement;
+                }, function (response) {
+                    $scope.loading = false;
+                    toaster.pop('error', '数据加载失败', response.data);
+                });
+            }
+        });
+
+        //设置消息已读
+        var setOrdersRead = function () {
+            var sourceId = [];
+            Vendor.setRead({}, sourceId, function (message) {
+                // $scope.getUnreadIds();
+            });
+        };
+        setOrdersRead();
+
+        // 搜索框回车
+        $scope.onSearch = function (keyword) {
+            $scope.customerParams.page(1);
+            $scope.customerParams.reload();
+            $scope.tip = keyword;
+        };
+
+        // 查看详情
+        $scope.viewDetail = function (id) {
+            window.location.hash = "#/sale/customer/" + id;
+        }
+
+        // 导出客户资料列表
+        $scope.exportXls = function () {
+            VendorService.exportXls.get({}, {}, function (data) {
+                if (data.success){
+                    window.location.href = 'vendor/customer/xls?keyword='+ ($scope.keywordXls || '');
+                }
+            }, function (response) {
+                toaster.pop('error', '数据加载失败', response.data);
+            });
+        }
+    }]);
+});

+ 165 - 0
src/main/webapp/resources/view/vendor/b2b/sale/customer.html

@@ -0,0 +1,165 @@
+<style>
+#customer-tab .header th,#customer-tab tbody tr.header,#customer-tab tbody tr.header th{
+	height: 38px;
+	text-align: center;
+	padding: 0;
+	line-height: 38px;
+	border-bottom-width: 0;
+	/*background: #f5f5f5;*/
+	border: none;
+	font-size: 14px;
+}
+#customer-tab tbody tr.header:hover{
+	border: none;
+}
+.table>tbody+tbody{
+	border-top: none;
+}
+#customer-tab tbody td{
+	border: none;
+}
+#customer-tab .pane-body{
+	padding: 0;
+}
+#customer-tab tbody tr{
+	background: none;
+	height: 80px;
+	border-top: #e8e8e8 1px solid;
+}
+#customer-tab tbody tr td{
+	text-align: center;
+	line-height: 20px;
+	vertical-align: inherit;
+	font-size: 14px;
+}
+#customer-tab tbody tr:hover{
+	border: #3f84f6 2px solid;
+}
+#customer-tab .form-horizontal .form-control{
+	height: 36px;
+	line-height: 36px;
+	border: #3f84f6 1px solid;
+	border-radius: 0px;
+	font-size: 14px;
+}
+#customer-tab .form-horizontal .form-group{
+	margin: 0;
+	padding: 10px 0;
+}
+#customer-tab .form-horizontal .form-group .input-group-addon{
+	width: 70px;
+	height: 36px;
+	display: inline-block;
+	background: #3f84f6;
+	font-size: 16px;
+	text-align: center;
+	line-height: 36px;
+	color: #fff;
+	padding: 0;
+	border: none;
+	border-radius: 0;
+	position: absolute;
+	top: 10px;
+	right: 0;
+}
+#customer-tab table tr td a{
+	color: #5078cb;
+}
+#customer-tab table tr td a:hover{
+	color: #d32526 !important;
+}
+.form-horizontal #topSearch{
+	font-size: 16px;
+	line-height: 55px;
+}
+#customer-tab table tr td a.color32{
+	color: #323232;
+}
+#customer-tab table thead th:hover{
+	background: none;
+}
+</style>
+<div class="loading in" ng-class="{'in': loading}">
+	<!--<i></i>-->
+	<div class="wrap">
+		<div class="outer"></div>
+	</div>
+</div>
+<div class="pane base-info" style="/*max-height: 900px;overflow-y: auto; overflow-x: hidden;*/" id="customer-tab">
+	<!--<div class="pane-header">
+		客户资料 (共{{::totalCount}}个)
+		<div class="pull-right">
+			<a href="vendor/customer/xls" target="_self" class="text-simple bule"><i class="fa fa-file-text fa-fw"></i>导出</a>
+		</div>
+	</div>-->
+	<div class="pub-com_head">
+		<span>客户资料</span>
+		<div class="p-right">
+			<a ng-click="exportXls()" target="_self" class="text-simple bule"><i class="fa fa-file-text fa-fw"></i>导出</a>
+		</div>
+	</div>
+	<form class="form-horizontal">
+		<div class="form-group">
+			<div class="col-md-6 col-sm-6">
+				<div id="topSearch" style="float: left">
+					<span class="text-muted"><i class="fa fa-search fa-lg"></i> 搜索"{{tip}}",为您找到结果:</span>
+					单据{{customerParams.total()}}条
+				</div>
+			</div>
+			<div class="col-md-6 col-sm-6">
+				<div class="form-group form-group-sm has-feedback">
+					<input type="search" class="form-control input-sm" ng-model="keyword" ng-search="onSearch()" placeholder="输入企业名称搜索" />
+               	 	<a class="btn  input-group-addon" ng-click="onSearch()">搜索</a>
+                </div>
+			</div>
+		</div>
+	</form>
+	<div class="pane-body">
+		<table class="table table-bordered table-striped table-hover"
+			ng-table="customerParams">
+			<thead>
+				<tr class="header">
+					<th width="80">UU</th>
+					<th width="180">客户名称</th>
+					<th width="180">地址</th>
+					<th width="80">客户联系人</th>
+					<th width="100">联系人电话</th>
+					<th width="80">我方联系人</th>
+					<th width="110">用户分配</th>
+				</tr>
+			</thead>
+			<tbody ng-repeat="customer in $data" ng-mouseenter="showUserInfo(customer,true)" ng-mouseleave="showUserInfo(customer,false)">
+					<tr>
+						<td class="text-center" ng-bind="::customer.myEnterprise.uu"></td>
+						<td class="text-center"><a ng-click="viewDetail(customer.id)" title="查看客户资料" ng-bind="::customer.myEnterprise.enName" class="color32 order-detail"></a></td>
+						<td class="text-center" ng-bind="::customer.myEnterprise.enAddress"></td>
+						<td class="text-center" ng-bind="::customer.myUser.userName"></td>
+						<td ng-bind="::customer.myUser.userTel"></td>
+						<td class="text-center" ng-bind="::customer.vendorUser.userName"></td>
+						<td class="text-center">
+								<!--<a title="展开" class="text-muted" ng-click="open(customer,$index)"><i class="fa fa-toggle-down fa-lg"></i></a>-->
+								<!--<a ng-click="viewDetail(customer.id)">查看详情</a><br/>-->
+								<div><a style="color: #3f84f6;" title="被分配的用户享有查看和操作权限" ng-click="addUserInfo(customer)"><!--<i class="fa fa-plus-circle fa-lg">-->分配</i></a></div>
+							<div><a style="color: #3f84f6;" title="被转移权限的用户可以分配权限给其他用户" ng-click="transferUserInfo(customer)"><!--<i class="fa fa-plus-circle fa-lg">-->转移</a></div>
+						</td>
+					</tr>
+			</tbody>
+			<tbody ng-if="$data.length === 0">
+			<tr>
+				<td colspan="7">
+					<div id="empty">
+						<div class="left_img">
+							<a href="http://www.ubtob.com/" target="_blank" title="优软云首页"><img src="static/img/empty/uas_empty.png"></a>
+							<a href="#/index" title="B2B商务首页">B2B 商务</a>
+						</div>
+						<div class="right_link">
+							<p>暂无对应的单据</p>
+							<a href="javascript:location.reload()">点击重新加载<i class="load_icon"></i></a>
+						</div>
+					</div>
+				</td>
+			</tr>
+			</tbody>
+		</table>
+	</div>
+</div>

+ 1 - 0
src/main/webapp/resources/view/vendor/left_nav.html

@@ -44,6 +44,7 @@
 	<span  ui-sref="vendor_index"><p ng-class="{'active' : active == 'index'}"><span>卖家中心</span></p></span>
 	<ul>
 		<div>
+			<li ng-class="{'active' : active == 'base_info'}"><span ui-sref="vendorBaseInfo">基础资料</span></li>
 			<li ng-class="{'active' : active == 'vendor_seek_purchase'}"><span ui-sref="vendorSeekPurchase">商机管理</span></li>
 			<li ng-class="{'active' : active == 'vendor_order'}"><span  ui-sref="vendor_order">销售订单</span></li>
 			<li ng-class="{'active' : active == 'vendor_logistics'}">