Просмотр исходного кода

企业圈UI简单设计,增加删除供应商、客户的功能

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@8168 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 8 лет назад
Родитель
Сommit
48eb112a01

+ 11 - 0
src/main/java/com/uas/platform/b2b/controller/PurcOrderController.java

@@ -53,4 +53,15 @@ public class PurcOrderController {
 	public Vendor getCustomerInfo(@PathVariable Long custuu) {
 		return purcOrderService.getCustomerInfo(custuu);
 	}
+
+	/**
+	 * 解除供应商客户关系
+	 * 
+	 * @param id
+	 */
+	@RequestMapping(value = "/relieve/{id}", method = RequestMethod.DELETE)
+	@ResponseBody
+	private void relieve(@PathVariable Long id) {
+		purcOrderService.relieve(id);
+	}
 }

+ 7 - 0
src/main/java/com/uas/platform/b2b/service/PurcOrderService.java

@@ -30,4 +30,11 @@ public interface PurcOrderService {
 	 */
 	public Vendor getCustomerInfo(Long custuu);
 
+	/**
+	 * 解除客户、供应商关系
+	 * 
+	 * @param id
+	 */
+	public void relieve(Long id);
+
 }

+ 232 - 2
src/main/webapp/resources/js/index/app.js

@@ -466,6 +466,25 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
             url : '/inquiryList/:id',
             templateUrl : "static/tpl/index/baseInfo/inquiryItem_detail.html",
             controller : 'PublicInquiryListDetailCtrl'
+        }).state('baseInfo.vendorInfo', {
+            url : '/enume/vendorInfo',
+            templateUrl : "static/tpl/index/baseInfo/vendorsInfo.html",
+            controller : 'VendorsInfoCtrl'
+        }).state('baseInfo.customerInfo', {
+            url : '/enume/customerInfo',
+            templateUrl : "static/tpl/index/baseInfo/customersInfo.html",
+            controller : 'CustomersInfoCtrl'
+        }).state('baseInfo.enume', {
+            url : '/enume',
+            templateUrl : "static/tpl/index/baseInfo/vendorAndCustomer.html",
+        }).state('baseInfo.partner', {
+            url : '/partner',
+            templateUrl : "static/tpl/index/baseInfo/addPartners.html",
+            controller : 'AddPartnersCtrl'
+        }).state('baseInfo.partner_searchresult', {
+            url : '/search?keyword=',
+            templateUrl : "static/tpl/index/baseInfo/searchresult.html",
+            controller : 'EnterpriseSearchCtrl'
         }).state('qc', {
             url : "/qc",
             views : {
@@ -9766,7 +9785,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 	/**
 	 * 我的供应商
 	 */
-	app.controller('PurcVendorCtrl', ['$scope', 'Vendor', 'BaseService','AuthenticationService', 'ngTableParams', '$modal','toaster', '$rootScope', function($scope, Vendor, BaseService, AuthenticationService,ngTableParams,$modal, toaster, $rootScope){
+	app.controller('PurcVendorCtrl', ['$scope', 'Vendor', 'BaseService','AuthenticationService', 'ngTableParams', '$modal','toaster', '$rootScope', 'VendorInfo', function($scope, Vendor, BaseService, AuthenticationService,ngTableParams,$modal, toaster, $rootScope, VendorInfo){
 		BaseService.scrollBackToTop();
 		// 搜索框回车
 		$scope.onSearch = function(keyword) {
@@ -12870,5 +12889,216 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
         // };
     }]);
 
-        return app;
+    // 基础资料客户详情
+    app.controller('CustomersInfoCtrl', ['$scope', 'VendorService', 'BaseService','AuthenticationService', 'ngTableParams', '$modal','toaster', 'VendorInfo', function($scope, VendorService, BaseService, AuthenticationService,ngTableParams,$modal, toaster, VendorInfo){
+		BaseService.scrollBackToTop();
+		$scope.status = 'customer';
+		$scope.userInfoResult = true;
+		AuthenticationService.getAuthentication().success(function(data) {
+			$scope.loading = false;
+			$scope.thisUser = data;
+		});
+		$scope.customerParams = new ngTableParams({
+			page : 1,
+			count : 10
+		}, {
+			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.totalCount = page.totalElement;
+				}, function(response){
+					$scope.loading = false;
+					toaster.pop('error', '数据加载失败', response.data);
+				});
+			}
+		});
+		
+		// 搜索框回车
+  		$scope.onSearch = function(keyword) {
+  			$scope.customerParams.page(1);
+  			$scope.customerParams.reload();
+  			$scope.tip = keyword;
+  		};
+  		
+  		// 查看详情
+		$scope.viewDetail = function(id) {
+			console.log(id);
+			window.location.hash = "#/sale/customer/" + id;
+		}
+
+		// 取消合作关系
+		$scope.relieve = function(id) {
+			VendorInfo.relieve({id: id}, {}, function(data) {
+				toaster.pop('success', '提示', '取消合作关系成功');
+				$scope.customerParams.page(1);
+	  			$scope.customerParams.reload();
+			}, function(response) {
+				toaster.pop('error', '提示', response.data);
+			});
+		}
+		
+	}]);
+    
+    // 基础资料供应商
+    app.controller('VendorsInfoCtrl', ['$scope', 'Vendor', 'BaseService','AuthenticationService', 'ngTableParams', '$modal','toaster', '$rootScope', 'VendorInfo', function($scope, Vendor, BaseService, AuthenticationService,ngTableParams,$modal, toaster, $rootScope, VendorInfo){
+		BaseService.scrollBackToTop();
+		$scope.status = 'vendor';
+		// 搜索框回车
+		$scope.onSearch = function(keyword) {
+			$scope.keyword = keyword;
+			$scope.customerParams.page(1);
+			$scope.customerParams.reload();
+		};
+		
+		$scope.customerParams = new ngTableParams({
+			page : 1, 
+			count : 10
+		}, {
+			total : 0, 
+			counts: [5, 10, 25, 50],
+			getData : function($defer, params) {
+				$scope.loading = true;
+				var pageParams = params.url();
+				pageParams.keyword = $scope.keyword;
+				Vendor.getVendor.call(null, BaseService.parseParams(pageParams), function(page){
+					$scope.loading = false;
+					if(page) {
+						params.total(page.totalElements);
+						$scope.total = page.totalElement;
+						$defer.resolve(page.content);
+					}
+					$scope.totalCount = page.totalElements;
+				}, function(response){
+					$scope.loading = false;
+					toaster.pop('error', '数据加载失败', response.data);
+				});
+			}
+		});
+		
+		// 查看供应商详情
+		$scope.VendorDetail = function(id, uu) {
+			$rootScope.vendorId = id;
+			$rootScope.vendoruu = uu;
+			window.location.hash = "#/purc/vendor/"+$rootScope.vendorId;
+		}
+		
+		// 向企业购买
+		$scope.purcByEn = function(businessCode) {
+			$rootScope.businessCode = businessCode;
+			window.location.hash = "#/purc/addOrder";
+		}
+		
+		// 取消合作关系
+		$scope.relieve = function(id) {
+			VendorInfo.relieve({id: id}, {}, function(data) {
+				toaster.pop('success', '提示', '取消合作关系成功');
+				$scope.customerParams.page(1);
+				$scope.customerParams.reload();
+			}, function(response) {
+				toaster.pop('error', '提示', response.data);
+			});
+		}
+		
+	}]);
+
+    // 企业圈搜索界面
+    app.controller('AddPartnersCtrl', ['$scope', '$rootScope', function($scope, $rootScope) {
+    	$scope.onSearch = function(keyword) {
+    		$rootScope.enterpriseKeyword = keyword;
+    		window.location.hash = "#/baseInfo/search?keyword=" + $rootScope.enterpriseKeyword;
+    	}
+	}]);
+    
+    // 企业圈搜索结果
+    app.controller('EnterpriseSearchCtrl', ['$scope', 'getAccountUserSpace', 'ngTableParams', '$filter', 'BaseService', 'toaster', 'AddPartner', '$rootScope', function($scope, getAccountUserSpace, ngTableParams, $filter, BaseService, toaster, AddPartner, $rootScope) {
+		BaseService.scrollBackToTop();
+		$scope.active = 'all';
+		$scope.agreedText = '全部';
+		$scope.dateZoneText = '一个月内';
+		$scope.condition = {dateZone: 1};
+		$scope.currency = Symbol.currency;//将币别转化为对应的符号
+		$scope.changeAgreed = function(agreed) {
+			$scope.condition.agreed = agreed;
+			$scope.agreedText = typeof agreed == 'undefined' ? '全部' : (agreed == 1 ? '已同意' : '不同意');
+			$scope.condition.$agreedOpen = false;
+		};
+		$scope.changeDateZone = function(zone) {
+			$scope.condition.dateZone = zone;
+			$scope.dateZoneText = typeof zone == 'undefined' ? '半年前' : (zone == 1 ? '一个月内' : '半年内');
+			$scope.condition.$dateZoneOpen = false;
+			getDateCondition(zone, $scope.condition);
+			$scope.tableParams.reload();
+		};
+		$scope.setActive = function(state) {
+			if($scope.active != state) {
+				$scope.active = state;
+				if($scope.tableParams.page() == 1)
+					$scope.tableParams.reload();
+				else
+					$scope.tableParams.page(1);
+			}
+		};
+		var getService = function() {
+			return getAccountUserSpace;
+		};
+		
+		$scope.tableParams = new ngTableParams({
+			page : 1, 
+			count : 5,
+			sorting: {
+            }
+		}, {
+			total : 0, 
+			counts: [5, 10, 25, 50],
+			getData : function($defer, params) {
+				$scope.loading = true;
+				var pageParams = params.url();
+				pageParams.keyword = $rootScope.enterpriseKeyword;
+				$scope.tip = $rootScope.enterpriseKeyword;
+				getService()[getState($scope.active)].call(null, BaseService.parseParams(pageParams), function(page) {
+					$scope.loading = false;
+					if(page) {
+						params.total(page.totalElement);
+						$defer.resolve(page.content);
+						$scope.keywordXls = angular.copy(pageParams.keyword);//保存当前取值的关键词
+					}
+				}, function(response) {
+					$scope.loading = false;
+					toaster.pop('error', '数据加载失败', response.data);
+				});
+			}
+		});
+
+		// 搜索框回车
+		$scope.onSearch = function() {
+			$scope.tableParams.page(1);
+			$scope.tableParams.reload();
+		};
+		
+		// 添加合作关系
+		$scope.addPartner = function(name, businessCode) {
+			AddPartner.addPartner({name: name, businessCode: businessCode}, {}, function(data) {
+				if(data.success) {
+					toaster.pop("success", '添加成功', data.success);
+				}
+				if(data.error) {
+					toaster.pop("error", '添加失败', data.error);
+				}
+			}, function(response) {
+				toaster.pop('error','失败',response.data);
+			});
+		}
+		
+		$scope.status = 'enList';
+	}]);
+    return app;
 });

+ 4 - 0
src/main/webapp/resources/js/index/services/Purc.js

@@ -747,6 +747,10 @@ define([ 'ngResource'], function() {
 			customerInfo: {
 				url: 'purchase/customerInfo/:custuu',
 				method: 'GET'
+			},
+			relieve: {
+				url: 'purchase/relieve/:id',
+				method: 'DELETE'
 			}
 		});
 	}]).factory('ShipAddress', ['$resource', function($resource){

+ 11 - 0
src/main/webapp/resources/tpl/index/baseInfo/addPartners.html

@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+	<input type="search" ng-model="keyword" ng-search="onSearch(keyword)" placeholder="输入企业名称、简称搜索" />
+	<a ng-click="onSearch(keyword)">搜索</a>
+</body>
+</html>

+ 142 - 0
src/main/webapp/resources/tpl/index/baseInfo/customersInfo.html

@@ -0,0 +1,142 @@
+<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;
+}
+.pane .pane-header{
+	border-radius: 0px 0 0px 0px;
+	box-shadow: 0 0 3px #ccc;
+	background: linear-gradient(to top, #e7e7e7 0%,#ffffff 100%);
+	height: 40px;
+	font-size: 14px;
+	line-height: 40px;
+}
+.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: #d32526 2px solid;
+}
+#customer-tab .form-horizontal .form-control{
+	height: 36px;
+	line-height: 36px;
+	border: #327ebe 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: #327ebe;
+	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;
+}
+.form-horizontal #topSearch{
+	font-size: 16px;
+	line-height: 55px;
+}
+</style>
+<div ng-include src="'static/tpl/index/baseInfo/vendorAndCustomer.html'"></div>
+<div class="loading in" ng-class="{'in': loading}">
+	<i></i>
+</div>
+<div class="pane base-info" style="max-height: 900px;overflow-y: auto; overflow-x: hidden;" id="customer-tab">
+	<div class="pub-com_head">
+		<span>客户资料</span>
+		<div class="p-right">
+			<a href="vendor/customer/xls" target="_self" class="text-simple bule"><i class="fa fa-file-excel-o 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>
+					单据{{::totalCount}}条
+				</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" ng-bind="::customer.myEnterprise.enName"></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/>
+								<a title="新增" style="color: #327ebe;" ng-click="addUserInfo(customer)"><!--<i class="fa fa-plus-circle fa-lg">-->分配</i></a>
+								<a ng-click="relieve(customer.id)">取消合作关系</a>
+							</div>
+						</td>
+					</tr>
+			</tbody>
+		</table>
+		</div>
+	</div>
+</div>

+ 3 - 7
src/main/webapp/resources/tpl/index/baseInfo/enMenu.html

@@ -3,17 +3,13 @@
 		<div class="col-xs-6">
 			<div class="btn-group btn-group-sm btn-group-justified">
 				<div class="btn-group btn-group-sm">
-					<a type="button" class="btn btn-default btn-line" ui-sref="baseInfo.enterpriseList"
-						ng-class="{'btn-info':status=='enList'}" >企业列表</a>
+					<a type="button" class="btn btn-default btn-line" ui-sref="baseInfo.vendorInfo"
+						ng-class="{'btn-info':status=='vendorInfo'}" >合作伙伴</a>
 				</div>
 				<div class="btn-group btn-group-sm">
 					<a type="button" class="btn btn-default btn-line" ui-sref="baseInfo.myRequest"
-						ng-class="{'btn-info':status=='send'}" >合作伙伴<!-- (<em>5</em>) --></a>
+						ng-class="{'btn-info':status=='send'}" >新的合作伙伴<!-- (<em>5</em>) --></a>
 				</div>
-				<!-- <div class="btn-group btn-group-sm">
-					<a type="button" class="btn btn-default btn-line" ui-sref="baseInfo.myPartners"
-						ng-class="{'btn-info':status=='news'}" >伙伴动态</a>
-				</div> -->
 			</div>
 		</div>
 	</div>

+ 10 - 5
src/main/webapp/resources/tpl/index/baseInfo/myRequest.html

@@ -278,24 +278,29 @@
 		<div class="row">
 			<div class="col-xs-4">
 				<div class="btn-group btn-group-sm btn-group-justified">
-					<div class="btn-group btn-group-sm">
+					<!-- <div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
 							ng-class="{'btn-info':active=='all'}" ng-click="setActive('all')">全部</button>
-					</div>
+					</div> -->
 					<div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
-							ng-class="{'btn-info':active=='todo'}" ng-click="setActive('todo')">处理</button>
+							ng-class="{'btn-info':active=='todo'}" ng-click="setActive('todo')">处理</button>
 					</div>
 					<div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
-							ng-class="{'btn-info':active=='done'}" ng-click="setActive('done')">已通过</button>
+							ng-class="{'btn-info':active=='done'}" ng-click="setActive('done')">未标注</button>
 					</div>
 					<div class="btn-group btn-group-sm">
 						<button type="button" class="btn btn-default btn-line"
-							ng-class="{'btn-info':active=='end'}" ng-click="setActive('end')">未通过</button>
+							ng-class="{'btn-info':active=='end'}" ng-click="setActive('end')">不同意</button>
 					</div>
 				</div>
 			</div>
+			<div class="col-xs-4">
+				<div class="btn-group btn-group-sm">
+					<a href="#/baseInfo/partner">添加合作伙伴</a>
+				</div>
+			</div>
 	</div>
 </div>
 <div class="search-bg condition block">

+ 0 - 4
src/main/webapp/resources/tpl/index/baseInfo/newProdInfo.html

@@ -125,10 +125,6 @@
                     <div class="fl">交货周期:</div>
                     <div class="fr"><input type="text" ng-model="prodInfo.leadtime" placeholder="交货周期" style="cursor: pointer;" ng-pattern="/^\+?[1-9]\d*$/"></div>
                 </dd>
-                <dd>
-                    <div class="fl">交货提前期:</div>
-                    <div class="fr"><input type="text" ng-model="prodInfo.ltinstock" placeholder="交货提前期" style="cursor: pointer;" ng-pattern="/^\+?[1-9]\d*$/"></div>
-                </dd>
                 <dd>
                     <div class="fl">状态:</div>
                     <div class="fr">有效</div>

+ 0 - 4
src/main/webapp/resources/tpl/index/baseInfo/productDetail.html

@@ -125,10 +125,6 @@
                     <div class="fl">交货周期:</div>
                     <div class="fr"><input type="text" ng-model="prodInfo.leadtime" placeholder="交货周期" style="cursor: pointer;" ng-readonly="!prodInfo.$editing" ng-pattern="/^\+?[1-9]\d*$/"></div>
                 </dd>
-                <dd>
-                    <div class="fl">交货提前期:</div>
-                    <div class="fr"><input type="text" ng-model="prodInfo.ltinstock" placeholder="交货提前期" style="cursor: pointer;" ng-readonly="!prodInfo.$editing" ng-pattern="/^\+?[1-9]\d*$/"></div>
-                </dd>
                 <dd>
                     <div class="fl">状态:</div>
                     <div class="fr">有效</div>

+ 318 - 0
src/main/webapp/resources/tpl/index/baseInfo/searchresult.html

@@ -0,0 +1,318 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+<style>
+.condition .more.open {
+	margin-top: 10px;
+	height: 36px;
+	opacity: 1;
+}
+
+.condition .more .form-group {
+	margin-bottom: 10px;
+}
+
+.enterprise-table .header>th {
+	height: 38px;
+	text-align: center;
+	background: #f5f5f5;
+	benterprise-top: 1px solid #e8e8e8;
+	benterprise-bottom: 1px solid #e8e8e8;
+}
+
+.enterprise-table .sep-row {
+	height: 10px;
+}
+
+.enterprise-table .selector {
+	vertical-align: middle;
+	margin: 0 0 2px 0;
+}
+
+.toolbar label {
+	margin-right: 10px;
+	margin-bottom: 0;
+}
+
+.toolbar .select_all {
+	margin: 0 6px 0 10px;
+	line-height: 20px;
+}
+
+.toolbar .btn {
+	-moz-benterprise-radius: 2px;
+	margin-right: 5px;
+	benterprise: 1px solid #dcdcdc;
+	benterprise-radius: 2px;
+	-webkit-benterprise-radius: 2px;
+}
+
+.enterprise-table .enterprise-hd {
+	background: #f5f5f5;
+	height: 40px;
+	line-height: 40px;
+}
+
+.enterprise-table .enterprise-hd td.first {
+	padding-left: 20px;
+}
+
+.enterprise-table .enterprise-hd .enterprise-main span {
+	margin-right: 8px;
+}
+
+.enterprise-table .enterprise-hd .enterprise-code {
+	font-style: normal;
+	font-family: verdana;
+}
+
+.enterprise-table .enterprise-hd .enterprise-sum {
+	padding: 0 5px;
+}
+
+.enterprise-table>tbody {
+	benterprise: 1px solid transparent;
+}
+
+.enterprise-table>tbody:hover {
+	benterprise-color: #56a022;
+	benterprise-width: 2px;
+}
+
+.enterprise-table .operates {
+	display: none;
+}
+
+.enterprise-table .operates i {
+	padding: 0 2px;
+}
+
+.enterprise-table>tbody:hover .operates {
+	display: block;
+}
+.enterprise-table>tbody:hover .operates-status {
+	display: none;
+}
+
+
+.enterprise-table .enterprise-bd {
+	benterprise-bottom: 1px solid #e6e6e6;
+}
+
+.enterprise-table .enterprise-bd>td {
+	padding: 10px 5px;
+	vertical-align: top;
+	position: relative;
+}
+
+.enterprise-table .enterprise-bd .product {
+	padding-left: 20px;
+}
+
+.enterprise-table .enterprise-bd .enterprise-number {
+	position: absolute;
+	top: -1px;
+	left: -1px;
+	width: 20px;
+	height: 20px;
+	line-height: 20px;
+	text-align: center;
+	background: #f5f5f5;
+	font-weight: 500;
+	benterprise: solid 1px #d5d5d5;
+	benterprise-radius: 0 0 10px 0;
+}
+
+.enterprise-table .enterprise-bd .enterprise-number.key {
+	background: #56a022;
+	color: #ffffff;
+}
+
+.unPrinted {
+	color: #56a022;
+}
+.view-slide-in{
+	/*margin-top: 20px;*/
+}
+.info-container .info:hover {
+	color: #CC3333;
+}
+.enterprise-hd .btn{
+	border-radius: 0;
+}
+/*	增加样式*/
+.view-slide-in .block{
+	background: #f5f5f5;
+}
+.view-slide-in .group-container{
+	background: #fff;
+}
+.view-slide-in .group-container .btn-group{
+	width: 160px;
+	border: none;
+	height: 45px;
+}
+.view-slide-in .group-container .btn-group .btn-info{
+	color: #d32526;
+	background: #fff;
+	border: none;
+}
+.view-slide-in .group-container .btn-group .btn{
+	border: none;
+	font-size: 16px;
+	font-family: "Microsoft YaHei", "微软雅黑";
+}
+.view-slide-in .group-container .btn-group .btn em{
+	color: #d32526;
+	font-style: inherit;
+}
+.view-slide-in .group-container .btn-group .btn:hover{
+	background: #fff;
+	color: #d32526;
+}
+.view-slide-in .group-container{
+	padding: 0;
+}
+.view-slide-in .search-bg{
+	margin-top: 15px;
+	margin-bottom: 15px;
+}
+#topSearch{
+	font-size: 18px;
+}
+.view-slide-in #topSearch .search-bg i{
+	color: #999;
+	margin-left: 10px;
+}
+.form-group-sm .form-control-feedback{
+	width: 85px;
+	height: 36px;
+	line-height: 36px;
+	color: #fff;
+	background: #327ebe;
+	text-align: center;
+	font-size: 14px;
+	cursor: pointer;
+}
+#topSearch .input-sm, .form-group-sm .form-control{
+	height: 36px;
+	line-height: 36px;
+	border: #327ebe 1px solid;
+	border-radius: 0px;
+	font-size: 14px;
+}
+.enterprise-table .company-list{
+	margin-bottom: 10px;
+}
+.enterprise-table .company-list,.enterprise-table .enterprise-hd{
+	background: #fff;
+	font-size: 16px;
+	height: 55px;
+	line-height: 55px;
+	border-bottom: #ddd 1px solid;
+}
+.enterprise-table .company-list,.enterprise-table .enterprise-bd{
+	border-bottom: #f5f5f5 20px solid;
+}
+.enterprise-table .enterprise-hd span:first-child{
+	margin-left: 20px;
+}
+.enterprise-table .product{
+	line-height: 25px;
+	font-size: 14px;
+}
+.enterprise-table .product span{
+	margin-right: 10px;
+}
+.grey01{
+	color: #969595;
+	font-size: 14px;
+	}
+.enterprise-table .btn{
+	border-radius: 0;
+	width: 94px;
+	height: 36px;
+	color: #fff;
+}
+.enterprise-table .btn01{
+	color: #327ebe;
+	background: #fff;
+	border: none;
+	font-size: 16px;
+	}
+.search-bg .input-group-addon{
+	width: 85px;
+	height: 36px;
+	display: inline-block;
+	background: #327ebe;
+	font-size: 16px;
+	text-align: center;
+	line-height: 36px;
+	color: #fff;
+	padding: 0;
+	border: none;
+	border-radius: 0;
+	position: absolute;
+	top: 0;
+	right: 0;
+}
+.search-bg .form-group{
+	position: relative;
+}
+</style>
+<div class="block" style="margin-left: -240px; width: 1170px;">
+<div class="loading in" ng-class="{'in': loading}">
+	<i></i>
+</div>
+<div class="search-bg condition block">
+		<div class="row">
+			<div id="topSearch" style="float: left">
+				<span class="text-muted"><i class="fa fa-search fa-lg"></i> 搜索"{{tip}}",为您找到结果:</span>
+				企业{{tableParams.total()}}家
+			</div>
+			<div class="col-xs-6" style="float: right">
+				<div class="search">
+					<div class="form-group form-group-sm has-feedback" dropdown auto-close="outsideClick" on-toggle="searchAdvance=open">
+						<input type="search" class="form-control input-sm" ng-model="keyword" ng-search="onSearch()" placeholder="输入企业名称、简称、管理员姓名进行搜索" />
+						<div id="searchContainer" class="dropdown-menu">
+						</div>
+						<a class="btn input-group-addon" ng-click="onSearch()">搜索</a>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+<table class="enterprise-table block" ng-table="tableParams">
+	<tbody ng-repeat="enterprise in $data" class="company-list">
+		<tr class="enterprise-hd" ng-dblclick="enterprise.$collapsed=!enterprise.$collapsed">
+			<td colspan="4"><span ng-bind="::enterprise.name" class="text-center"></span>(<span ng-bind="::enterprise.shortName"></span>)<img src="resources/img/logo/youruanrenzheng.png" id="logo" ng-if="enterprise.status == 313"></td>
+			<td width="200" class="grey01 text-center" ng-if="enterprise.status != 313">当前企业不是优软云用户</td>
+			<td width="200" class="grey01 text-center" ng-if="enterprise.status == 313">优软云用户</td>
+		</tr>
+		<tr class="enterprise-bd" ng-if="!enterprise.$collapsed ">
+			<td class="product" colspan="4">
+				<div class="">营业执照:<span ng-bind="::enterprise.businessCode" ></span></div>
+				<div class="">企业类型:<span class="text-muted" ng-bind="::enterprise.industry"></span></div>
+				<div class="">企业地址:<span class="text-muted" ng-bind="::enterprise.address"></span></div>
+				<div class="">
+					管理员:<span ng-bind="::enterprise.adminName"></span>
+					电话:<span ng-bind="::enterprise.adminTel"></span>
+					邮箱:<span ng-bind="::enterprise.adminEmail"></span>
+				</div>
+			</td>
+			<td width="100" class="text-center">
+				<a class="btn btn-primary" ng-click="addPartner(enterprise.name,enterprise.businessCode)" ng-if="enterprise.requestStatus==null||enterprise.requestStatus==310">合作伙伴</a>
+				<span class="btn label-info btn-primary" ng-if="enterprise.requestStatus==311 && enterprise.method==0">已收到申请</span>
+				<span class="btn01 btn label-info btn-primary" ng-if="enterprise.requestStatus==311 && enterprise.method==1">已发出申请</span>
+				<span class="btn label-info" ng-if="enterprise.requestStatus==313">已添加</span>
+			</td>
+		</tr>
+	</tbody>
+</table>
+</div>
+</body>
+</html>

+ 17 - 0
src/main/webapp/resources/tpl/index/baseInfo/vendorAndCustomer.html

@@ -0,0 +1,17 @@
+<div ng-include src="'static/tpl/index/baseInfo/enMenu.html'"></div>
+<div class="group-container condition block">
+	<div class="row">
+		<div class="col-xs-6">
+			<div class="btn-group btn-group-sm btn-group-justified">
+				<div class="btn-group btn-group-sm">
+					<a type="button" class="btn btn-default btn-line" ui-sref="baseInfo.vendorInfo"
+						ng-class="{'btn-info':status=='vendor'}" >供应商</a>
+				</div>
+				<div class="btn-group btn-group-sm">
+					<a type="button" class="btn btn-default btn-line" ui-sref="baseInfo.customerInfo"
+						ng-class="{'btn-info':status=='customer'}" >客户<!-- (<em>5</em>) --></a>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>

+ 139 - 0
src/main/webapp/resources/tpl/index/baseInfo/vendorsInfo.html

@@ -0,0 +1,139 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+	<meta charset="UTF-8"/>
+	<title>供应商列表</title>
+	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
+	<meta name="Keywords" content=""/>
+	<meta name="Description" content=""/>
+	<link rel="stylesheet" href="static/css/add.css "/>
+</head>
+<body>
+<style>
+.wrap table{
+	background-color: #fff;
+}
+
+.wrap table .table-hover {
+	border: 1px red solid;
+}
+#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: 12px;
+}
+#customer-tab tbody tr.header:hover{
+	border: none;
+}
+.pane-header{
+	/*border-radius: 0px 0 0px 0px;
+	box-shadow: 0 0 3px #ccc;
+	background: linear-gradient(to top, #e7e7e7 0%,#ffffff 100%);*/
+	height: 40px;
+	font-size: 14px;
+	line-height: 40px;}
+#customer-tab .pane-header th{
+	border-bottom: 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: 100px;
+	border-top: #e8e8e8 1px solid;
+	line-height: 100px;
+}
+#customer-tab tbody tr td{
+	text-align: center;
+	line-height: 20px;
+	vertical-align: inherit;
+	font-size: 14px;
+}
+#customer-tab tbody tr:hover{
+	border: #d32526 2px solid;
+}
+#customer-tab .com_title{
+	margin-bottom: 10px;
+}
+#customer-tab tbody tr td a{
+	color: #3578ba;
+}
+#customer-tab tbody tr td a:hover{
+	color: #d32526;
+}
+</style>
+<div ng-include src="'static/tpl/index/baseInfo/vendorAndCustomer.html'"></div>
+<link rel="stylesheet" href="static/css/public.css">
+<div class="pub-com_head">
+	<span>供应商资料</span>
+	<div class="p-right">
+	</div>
+</div>
+<div id="public">
+	<div class="condition block" style="padding: 10px 15px;">
+		<div class="search-bg condition block"  style="padding: 10px 15px;">
+			<div class="row">
+				<div id="topSearch" style="float: left">
+					<span class="text-muted f16"><i class="fa fa-search fa-lg"></i> 搜索"{{tip}}",为您找到结果:</span>
+					单据{{total}}条
+				</div>
+				<div class="col-xs-6">
+					<div class="search">
+						<div class="form-group form-group-sm has-feedback" dropdown auto-close="outsideClick" on-toggle="searchAdvance=open">
+							<input type="search" class="form-control input-sm" ng-model="keyword" ng-search="onSearch(keyword)" placeholder="输入企业名称、简称或申请人搜索"  style="width: 100%"/>
+							<a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
+						</div>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+<div class="wrap" id="customer-tab">
+	<div class="content">
+		<!--供应商列表-->
+		<table class="table  table-hover"
+			ng-table="customerParams">
+			<thead>
+				<tr class="pane-header">
+					<th width="180" class="text-center">企业名称</th>
+					<th width="120" class="text-center">简称</th>
+					<th width="200" class="text-center">地址</th>
+					<th width="100" class="text-center">联系人</th>
+					<th width="80" class="text-center">职位</th>
+					<th width="80" class="text-center">联系方式</th>
+					<th width="170" class="text-center">操作</th>
+				</tr>
+			</thead>
+			<tbody>
+					<tr ng-repeat="vendor in $data">
+						<td class="text-center" ng-bind="::vendor.vendorEnterprise.enName"></td>
+						<td class="text-center" ng-bind="::vendor.vendorEnterprise.enShortname"></td>
+						<td class="text-center" ng-bind="::vendor.vendorEnterprise.enAddress"></td>
+						<td class="text-center" ng-bind="::vendor.vendorUser.userName"></td>
+						<td ng-bind="::vendor.vendorUser.position"></td>
+						<td class="text-center" ng-bind="::vendor.vendorUser.userTel"></td>
+						<td class="text-center">
+							<a  href="#/purc/vendor/{{vendor.id}}">查看详情</a><br/>
+							<a ng-click="purcByEn(vendor.vendorEnterprise.enBussinessCode)">下达采购单</a>
+							<a ng-click="relieve(vendor.id)">取消合作关系</a>
+						</td>
+					</tr>
+			</tbody>
+		</table>
+	</div>
+</div>
+</body>
+</html>