Browse Source

对账新增联想词,客户筛选功能更新

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@9706 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 8 years ago
parent
commit
b579491e1f

+ 11 - 0
src/main/java/com/uas/platform/b2b/dao/VendorDao.java

@@ -101,4 +101,15 @@ public interface VendorDao extends JpaSpecificationExecutor<Vendor>, GenericRepo
 	 */
 	@Query("from Vendor v where v.myEnUU = :custEnUU and v.vendorEnterprise.enName = :enName")
 	public Vendor findByCustAndVendName(@Param("custEnUU") long custEnUU, @Param("enName") String enName);
+
+	/**
+	 * 按客户企业名称搜索(关键词)
+	 * 
+	 * @param vendEnUU
+	 * @param custEnUU
+	 * @param enName
+	 * @return
+	 */
+	@Query("from Vendor v where v.vendEnUU = :vendEnUU and v.myEnterprise.enName = :enName")
+	public Vendor findByVendAndCustName(@Param("vendEnUU") long vendEnUU, @Param("enName") String enName);
 }

+ 24 - 0
src/main/java/com/uas/platform/b2b/search/SearchController.java

@@ -479,6 +479,30 @@ public class SearchController {
 		return searchService.getSimilarVendors(keyword);
 	}
 
+	/**
+	 * 客户联想词
+	 * 
+	 * @param keyword
+	 * @return
+	 */
+	@RequestMapping(value = "/similarCustomers", method = RequestMethod.GET)
+	@ResponseBody
+	public List<Map<String, Object>> getSimilarCustomers(String keyword) {
+		return searchService.getSimilarCustomers(keyword);
+	}
+
+	/**
+	 * 类目联想词,点击返回类目信息
+	 * 
+	 * @param keyword
+	 * @return
+	 */
+	@RequestMapping(value = "/getCustyKeyword", method = RequestMethod.GET)
+	@ResponseBody
+	public Vendor getCustByKeyword(String keyword) {
+		return searchService.getCustByKeyword(keyword);
+	}
+
 	/**
 	 * 企业圈联想词
 	 * 

+ 16 - 0
src/main/java/com/uas/platform/b2b/search/SearchService.java

@@ -404,6 +404,14 @@ public interface SearchService {
 	 */
 	Vendor getVendorByEnname(String keyword);
 
+	/**
+	 * 客户联想词
+	 * 
+	 * @param keyword
+	 * @return
+	 */
+	public List<Map<String, Object>> getSimilarCustomers(String keyword);
+
 	List<Map<String, Object>> getSimilarVendors(String keyword);
 
 	/**
@@ -486,4 +494,12 @@ public interface SearchService {
 	 */
 	public Kind getKindByKeyword(String keyword);
 
+	/**
+	 * 点击关键词返回客户信息
+	 * 
+	 * @param keyword
+	 * @return
+	 */
+	public Vendor getCustByKeyword(String keyword);
+
 }

+ 29 - 0
src/main/java/com/uas/platform/b2b/search/SearchServiceImpl.java

@@ -1119,6 +1119,35 @@ public class SearchServiceImpl implements com.uas.platform.b2b.search.SearchServ
 		return vendors;
 	}
 
+	@Override
+	public Vendor getCustByKeyword(String keyword) {
+		return vendorDao.findByVendAndCustName(SystemSession.getUser().getEnterprise().getUu(), keyword);
+	}
+
+	@Override
+	public List<Map<String, Object>> getSimilarCustomers(String keyword) {
+		SPage<String> codePages = searchService.similar(keyword, Table_name.SEC$ENTERPRISES, SIMILAR_NUM, "en_name");
+		List<Vendor> contents = new ArrayList<Vendor>();
+		for (String code : codePages.getContent()) {
+			Vendor customer = vendorDao.findByVendAndCustName(SystemSession.getUser().getEnterprise().getUu(), code);
+			contents.add(customer);
+		}
+		List<Map<String, Object>> customers = new ArrayList<Map<String, Object>>();
+		for (Vendor customer : contents) {
+			Map<String, Object> temp = new HashMap<>();
+			if (customer != null) {
+				temp.put("id", customer.getId());
+				temp.put("custuu", customer.getMyEnUU());
+				temp.put("custName", customer.getMyEnterprise().getEnName());
+				temp.put("custShortName", customer.getMyEnterprise().getEnShortname());
+				temp.put("paymethod", customer.getPaymethod());
+				temp.put("apcheck", customer.getApcheck());
+				customers.add(temp);
+			}
+		}
+		return customers;
+	}
+
 	@Override
 	public SPage<UserSpaceDetail> searchUserSpaceDetailCheckIds(String keyword, PageParams pageParams)
 			throws Exception {

+ 58 - 335
src/main/webapp/resources/js/index/app.js

@@ -7714,7 +7714,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 	}]);
 	
 	//未对账单据列表
-	app.controller('PurchaseApCheckListCtrl',['$scope', 'FaApCheck', 'toaster', '$state','$filter', '$modal', function($scope, FaApCheck, toaster, $state, $filter, $modal){
+	app.controller('PurchaseApCheckListCtrl',['$scope', 'FaApCheck', 'toaster', '$state','$filter', '$modal', 'Vendor', function($scope, FaApCheck, toaster, $state, $filter, $modal, Vendor){
 		$scope.data = [];// 列表数据
 		
 		$scope.condition = {
@@ -7727,20 +7727,41 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 		    item[openParam] = !item[openParam];
 		}
 		
+		// 客户联想词
+		 $scope.getSimilarCustomers = function(value) {
+	            if (value) {
+	                return Vendor.getSimilarCustomers({keyword : value}).$promise.then(function(data) {
+	                    return data.map(function(item) {
+	                        return item;
+	                    });
+	                });
+	            }
+	        };
+		    
+	        $scope.onAssociateCustomerClick = function(vendor) {
+	        	if(vendor.apcheck == 0) {
+	        		toaster.pop('info', '提示', '该客户暂未启用平台对账功能');
+	        		$scope.suuorname = '';
+	        	} else {
+	        		$scope.suuorname = vendor.custName;
+	        	}
+	        }
+	        
 		//查找客户
 		$scope.searchCust = function(suuorname) {
 			var modalInstance = $modal.open({
 				animation: true,
-				templateUrl: 'static/tpl/index/fa/custInfo.html',
+				templateUrl: 'static/tpl/index/fa/apcheck_customer.html',
 				controller: 'SearchCustInfoCtrl',
+				size: 'lg',
 				resolve: {
 					suuorname: function() {
 						return suuorname;
 					}
 				}
 			});
-			modalInstance.result.then(function(suuorname){
-				$scope.suuorname = suuorname;
+			modalInstance.result.then(function(customer){
+				$scope.suuorname = customer.myEnterprise.enName;
 			});
 			
 		}
@@ -8041,334 +8062,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 		}
 	}]);
 	
-	//货款调账
-	app.controller('PurchaseAdjustListCtrl',['$scope', 'FaApCheck', 'toaster', '$state','$filter', '$modal', 'ApbillAdjustment', function($scope, FaApCheck, toaster, $state, $filter, $modal, ApbillAdjustment){
-		$scope.data = [];// 列表数据
-		
-		$scope.condition = {
-			$fromOpened: false
-		}
-		
-		$scope.openDatePicker = function($event, item, openParam) {
-			$event.preventDefault();
-		    $event.stopPropagation();
-		    item[openParam] = !item[openParam];
-		}
-		
-		//查找客户
-		$scope.searchCust = function(suuorname) {
-			var modalInstance = $modal.open({
-				animation: true,
-				templateUrl: 'static/tpl/index/fa/custInfo.html',
-				controller: 'SearchCustInfoCtrl',
-				resolve: {
-					suuorname: function() {
-						return suuorname;
-					}
-				}
-			});
-			modalInstance.result.then(function(suuorname){
-				$scope.suuorname = suuorname;
-			});
-			
-		}
-		
-		// 点击筛选根据条件选择数据
-		$scope.suuorname = '';
-		// 默认本月
-		$scope.sdateTo = new Date();
-		$scope.sdateFrom = new Date($scope.sdateTo.getFullYear(), $scope.sdateTo.getMonth(), 1);
-		$scope.vuuorname = '';
-		$scope.factory = '';
-		$scope.prodTitle = '';
-		$scope.prodSpec = '';
-		$scope.condition.uuorname = '';
-		$scope.condition.dateFrom = '';
-		$scope.condition.dateTo = '';
-		$scope.condition.venduuorname = '';
-		$scope.condition.factory = '';
-		$scope.condition.prodTitle = '';
-		$scope.condition.prodSpec = '';
-		
-		$scope.searchOrder = function(check) {
-			$scope.data = [];
-			$scope.checkboxes.checked = false;
-			$scope.totalMoney = 0;
-			$scope.condition.uuorname = $scope.suuorname;
-			$scope.condition.factory = $scope.factory
-			$scope.condition.prodTitle = $scope.prodTitle;
-			$scope.condition.prodSpec = $scope.prodSpec;
-			$scope.condition.dateFrom = ($scope.sdateFrom || 0);
-			$scope.thisdatato = ($scope.sdateTo || 0);
-			if($scope.thisdatato != 0) {
-				$scope.condition.dateTo = (new Date($scope.thisdatato.valueOf() + 3600 * 12 * 1000) || 0);
-			} else {
-				$scope.condition.dateTo = ($scope.sdateTo || 0);
-			}
-			$scope.condition.venduuorname = $scope.vuuorname;
-			if($scope.condition.dateFrom != null || $scope.condition.dateTo != null || $scope.keywordXls != null) {
-				
-				$scope.fromDate =$scope.condition.dateFrom ?  $scope.condition.dateFrom.getTime() : null;
-				$scope.endDate = $scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null;
-				$scope.keywordXls = angular.copy(($scope.condition.uuorname == null ? "" : $scope.condition.uuorname)
-						+ "|"+ ($scope.condition.venduuorname == null ? "" : $scope.condition.venduuorname)
-						+ "|"+ ($scope.condition.factory == null ? "" : $scope.condition.factory)
-						+ "|"+ ($scope.condition.prodTitle == null ? "" : $scope.condition.prodTitle)
-						+ "|"+ ($scope.condition.prodSpec == null ? "" : $scope.condition.prodSpec));//保存当前取值的关键词
-				$scope.fromDateXls = angular.copy($scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null);//保存当前取值的起始日期
-				$scope.endDateXls = angular.copy($scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null);//保存当前取值的截止日期
-				if(!$scope.suuorname) {
-					toaster.pop('warning','提示', '请先选择客户');
-					document.getElementById('suuorname').focus();//光标默认在客户
-				} else {
-					$scope.loading = true;
-					ApbillAdjustment.adjustList({fromDate: $scope.fromDate, endDate: $scope.endDate, keyword:$scope.keywordXls}, function(data) {
-						if(data.length > 0) {
-							angular.forEach(data, function(item) {
-								item.$selected = true;
-							});
-							$scope.data = data;
-							$scope.checkboxes.checked = true;
-							$scope.getTotalMoney();
-						} else {
-							toaster.pop('info', '提示', '当前没有需要对账记录');
-						}
-						$scope.loading = false;
-					}, function(response) {
-						$scope.loading = false;
-						toaster.pop('error', '提示', response.data);
-					});
-				}
-			}
-			
-		}
-		
-		/**
-		 * 点击勾选框,选中要转应收对账单的订单
-		 * */
-		$scope.totalMoney = 0;	
-		$scope.checkboxes = {
-			checked : false
-		};
-	
-		// 点击勾选全部的复选框
-		$scope.checkAll = function(){
-			$scope.totalMoney = 0;
-			$scope.filteredData = $filter('filter')($scope.data, $scope.condition.prodTitle || $scope.condition.uuorname || $scope.condition.venduuorname ||  $scope.condition.prodSpec || $scope.condition.factory);
-			var uuorname = $scope.suuorname;			
-			var venduuorname = $scope.venduuorname;
-			var dateFrom = $scope.condition.dateFrom;
-			var dateTo = $scope.condition.dateTo;
-			var prodTitle = $scope.condition.prodTitle;
-			var prodSpec = $scope.condition.prodSpec;
-			var factory = $scope.condition.factory;
-			angular.forEach($scope.filteredData, function(item) {
-				if((item.orderdate >= dateFrom  || dateFrom == '') && (item.orderdate < dateTo  || dateTo == '')){
-					item.$selected = $scope.checkboxes.checked;
-					}
-				});
-			$scope.getTotalMoney();			
-		};
-		
-		//获取已选单据总金额
-		var total = true;
-		$scope.getTotalMoney = function(){
-			$scope.totalMoney = 0;
-				angular.forEach($scope.data, function(check) {
-						if(check.$selected){
-							$scope.totalMoney += (check.thischeckqty || 0)*(check.orderprice || 0);
-						}else{
-							$scope.totalMoney += 0;
-						}
-				});
-				
-		}
-		
-		// 点击其中一个明细的复选框
-		$scope.checkOne = function(check){
-			var result = true;
-			angular.forEach($scope.data, function(item) {
-				if(item.$selected != true){
-					result = false;
-					return;
-				}
-			});
-			$scope.checkboxes.checked = result;
-		};
-		
-		$scope.haveSelected = false;
-
-		//生成应收对账单
-		$scope.createApCheck = function(){
-			//保存应收对账单主记录字段
-			$scope.apCheck = {
-				custUu: '',
-				custName: '',
-				enUu: '',
-				apDate: '',
-				beginDate: '',
-				endDate: '',
-				checkStatus: '未对账',
-				checkAmount: 0,
-				currency: '',
-				rate: '',
-				items: []
-			};
-			//保存来源单据相关信息
-			var sourceInfos = [];
-				
-				
-			//所允许的本次对账最大最小数量	
-			$scope.data.maxThisCheckQty = 0;
-			$scope.data.minThisCheckQty = 0;	
-			
-			$scope.sameCust = true;
-			$scope.validQty = true;
-			$scope.loading = true;
-	
-			angular.forEach($scope.data, function(check) {
-			//保存应收对账单明细行数据
-			$scope.item = {
-					inoutno: '',
-					inoutnodetno: '',
-					orderCode: '',
-					orderClass: '',
-					orderDetno: '',
-					price: '',
-					checkQty: '',
-					amount: '',
-					sourceId:'',
-					sourceTable:'',
-					oldYCheckQty:'',
-					status: 0,
-					receiveCode:'',
-					receiveName:'',
-					prodCode:'',
-					prodTitle:'',
-					prodSpec:'',
-					taxrate: '',
-					sendcode: '',
-					whname: '',
-			};
-
-			//应收对账单明细行来源表信息
-			$scope.sourceInfo = {
-					sourceId: '',
-					sourceTable: '',
-					newYCheckQty: ''
-			};	
-	
-			//此次对账后新的已转数
-			$scope.newYCheckQty = 0;
-			if(check.$selected == true) {
-	  			$scope.apCheck.custName = check.custname;
-	  			$scope.apCheck.enUu = check.enuu;
-	  			$scope.apCheck.checkAmount += (check.thischeckqty || 0)*(check.orderprice || 0);
-				$scope.apCheck.apDate = check.date;
-				$scope.apCheck.rate = check.rate;
-				
-	  			//必须是同一家客户才能生成对账单,否则提示错误
-	  			if($scope.apCheck.custUu == ''){
-	  				$scope.apCheck.custUu = check.custuu;
-	  			}else if($scope.apCheck.custUu !== check.custuu){
-	  				$scope.sameCust = false;
-	  				$scope.loading = false;
-					toaster.pop('error', '请选择同一家客户');
-	  			}
-
-	  			//必须是相同币别才能生成对账单,否则提示错误
-	  			if($scope.apCheck.currency == ''){
-	  				$scope.apCheck.currency = check.currency;
-	  			}else if($scope.apCheck.currency !== check.currency){
-	  				$scope.sameCust = false;
-	  				$scope.loading = false;
-					toaster.pop('error', '请选择同一种币别');
-	  			}
-	  				
-	  			//本次对账数量必须小于总对账数量
-	  			if(check.qty > 0){
-	  				$scope.data.maxThisCheckQty = check.qty;
-	  				$scope.data.minThisCheckQty = 0;
-	  				if(check.qty - (check.ycheckqty || 0) < check.thischeckqty  || check.thischeckqty < 0 || check.thischeckqty == 0){
-	  				$scope.validQty = false;
-	  				$scope.loading = false;
-	  				toaster.pop('error','本次对账数量,填写有误!');	  				
-	  				}
-	  			}else if(check.qty < 0){
-	  				$scope.data.maxThisCheckQty = 0;
-	  				$scope.data.minThisCheckQty = check.qty;
-	  				if(((-check.qty)-(-check.ycheckQty) < (-check.thischeckQty)) || check.thischeckqty > 0 || check.thischeckqty == 0){
-	  					$scope.validQty = false;
-	  					$scope.loading = false;
-	  					toaster.pop('error','本次对账数量,填写有误!');
-	  					}
-	  			}
-	  					  				
-	  			//获取最小时间作为对账区间的起始时间
-	  			if($scope.apCheck.beginDate == ''){
-	  				$scope.apCheck.beginDate = check.date;
-	  			}else{
-					$scope.apCheck.beginDate = $scope.apCheck.beginDate>check.piDate? check.orderdate : $scope.apCheck.beginDate;
-	  			}
-	  				
-	  			//获取最大时间作为对账区间的截止时间
-	  			if($scope.apCheck.endDate == ''){
-	  				$scope.apCheck.endDate = check.date;
-	  			}else{
-					$scope.apCheck.endDate = $scope.apCheck.endDate<check.piDate? check.orderdate : $scope.apCheck.endDate;
-	  			}
-						
-	  			//应收对账单明细行数据
-	  			$scope.item.orderCode = check.ordercode;
-	  			$scope.item.orderClass = check.piClass;
-	  			$scope.item.orderDetno = check.orderdetno;
-	  			$scope.item.price = check.orderprice;
-	  			$scope.item.checkQty = check.thischeckqty;
-	  			$scope.item.amount = (check.thischeckqty || 0)*(check.orderprice || 0);
-				$scope.item.sourceId = check.id;
-				$scope.item.sourceTable = 'purc$apbilladjustment';
-				$scope.item.orderClass = '货款调账';
-				$scope.item.oldYCheckQty = check.ycheckqty;
-				$scope.item.prodCode = check.prodcode;
-				$scope.item.prodTitle = check.prodtitle;
-				$scope.item.prodSpec = check.prodspec;
-				$scope.item.inoutno = check.inoutno;
-				$scope.item.inoutnodetno = check.detno;
-				$scope.item.taxrate = check.taxrate;
-				$scope.item.receiveCode = check.receivecode;
-				$scope.item.receiveName = check.receivename;
-				$scope.item.sendcode = check.sendcode;
-				$scope.item.whname = check.whname;
-
-				//来源表相关信息	
-	  			$scope.sourceInfo.sourceId = check.id;
-				$scope.sourceInfo.sourceTable = 'purc$apbilladjustment';
-				$scope.sourceInfo.newYCheckQty = ((check.ycheckqty || 0) + check.thischeckqty);
-					
-				sourceInfos.push($scope.sourceInfo);
-	  			$scope.apCheck.items.push($scope.item);
-				$scope.haveSelected = true;
-			}
-		});
-			
-		//保存生成的应收对账单
-		$scope.saveApCheck = function(){
-			FaApCheck.saveApCheck({}, $scope.apCheck, function(data){
-				$scope.loading = false;				
-				toaster.pop('success', '成功', '生成应收对账成功');
-				$state.go('fa.apCheck_detail', {id: data.id}, {reload:true});					
-			}, function(response){
-				toaster.pop('error', '生成对账单失败', response.data);
-			})
-		};
-			
-		//如果是同一家客户,生成对账单的同时,关闭模态框
-		if($scope.sameCust && $scope.validQty) {
-			$scope.saveApCheck();
-		}
-		
-		}
-	}]);
 
 	// 企业信息设置
 	app.controller('EnterpriseCtrl', ['$scope', 'AccountEnterprise', 'toaster', '$state', '$modal', 'BaseService', 'ShipAddress', '$http', 'DeputyOrder', function($scope, AccountEnterprise, toaster, $state, $modal, BaseService, ShipAddress, $http, DeputyOrder){
@@ -12772,7 +12465,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 	/**
 	 * 财务对账时,企业进行筛选操作
 	 */
-	app.controller('SearchCustInfoCtrl', ['$scope', '$modalInstance', 'suuorname', 'FaApCheck', function($scope, $modalInstance, suuorname, FaApCheck) {
+	app.controller('SearchCustInfoCtrl', ['$scope', '$modalInstance', 'suuorname', 'FaApCheck', 'VendorService', 'ngTableParams', 'BaseService', function($scope, $modalInstance, suuorname, FaApCheck, VendorService, ngTableParams, BaseService) {
 		var getData = function(){
 			$scope.loading = true;
 		    FaApCheck.getAllCustomers(function(data) {
@@ -12783,8 +12476,38 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
 		
 		getData();
 		
-		$scope.select = function(suuorname) {
-			$modalInstance.close(suuorname);
+		$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.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.select = function(customer) {
+			$modalInstance.close(customer);
 		}
 		
 		$scope.close = function() {

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

@@ -751,6 +751,11 @@ define([ 'ngResource'], function() {
 				method: 'GET',
 				isArray: true
 			},
+			getSimilarCustomers: {
+				url: 'search/similarCustomers',
+				method: 'GET',
+				isArray: true
+			},
 			saveCustContact: {
 				url: 'vendor/saveCustomerContact',
 				method: 'POST'

+ 10 - 3
src/main/webapp/resources/tpl/index/fa/apCheckList.html

@@ -81,9 +81,16 @@
 					<div class="form-group form-group-sm has-feedback">
 						<input type="text" class="form-control input-sm" id="suuorname"
 							ng-model="suuorname" placeholder="选择对账客户"
-							ng-click="searchCust(suuorname)" autofocus /><span
-							class="form-control-feedback text-simple"><i
-							class="fa fa-search"></i></span>
+							ng-change="getSimilarCustomers(suuorname)" name="suuorname"
+								ng-focus="onFocus('suuorname')"
+								typeahead="vendor.custName for vendor in getSimilarCustomers($viewValue)"
+								autocomplete="off"
+								typeahead-on-select="onAssociateCustomerClick($item)"
+								spellcheck="false" style="width: 147px;"
+							 autofocus />
+						<a class="btn" ng-click="searchCust(suuorname)"
+							style="width: 40px; border: #bfbfbf 1px solid !important; border-radius: 0px; margin-left: -5px; margin-top: -3px;"><i
+							class="fa fa-search" aria-hidden="true"></i></a> </span>
 					</div>
 				</div>
 				<label class="col-sm-2 control-label">单据日期:</label>

+ 69 - 0
src/main/webapp/resources/tpl/index/fa/apcheck_customer.html

@@ -0,0 +1,69 @@
+<style>
+.headerline .content {
+	width: 200px;
+	font-size: 14px;
+}
+.modal-body {
+	min-height: 350px;
+}
+.modal {
+ 	top: 70px;
+}
+
+@media screen and (max-width: 1366px) {
+	.modal {
+ 		top: -20px;
+}
+}
+.form-horizontal .form-control{
+	border: #3578ba 1px solid;
+	height: 36px;
+	line-height: 36px;
+}
+</style>
+<div class="modal-body" style="padding-top: 0;">
+	<div class="modal-header" style="margin-bottom: 10px;">
+		<h3 class="modal-title">
+			<span>对账 - 选择客户</span>
+		</h3>
+	</div>
+	<form class="form-horizontal">
+		<div class="form-group" id="window-search">
+			<div class="col-md-2 col-sm-2"></div>
+			<div class="col-md-8 col-sm-8">
+				<input type="text" class="form-control input-sm"
+					required placeholder="输入供应商名称关键字查询" autofocus ng-model="keyword" ng-search="onSearch(keyword)">
+				<a class="btn input-group-addon" ng-click="onSearch(keyword)">搜索</a>
+			</div>
+		</div>
+	</form>
+	<table class="block table table-default table-striped table-bordered"
+		ng-table="customerParams">
+		<thead>
+			<tr class="header">
+				<th>UU</th>
+				<th>供应商名称</th>
+				<th>地址</th>
+				<td>启用对账</td>
+				<th>操作</th>
+			</tr>
+		</thead>
+		<tbody>
+			<tr ng-repeat="customer in $data">
+				<td class="text-center" >
+					<span ng-bind="::customer.myEnterprise.uu"></span>
+				</td>
+				<td class="text-center" >
+					<span ng-bind="::customer.myEnterprise.enName"></span>
+				</td>
+				<td class="text-center" >
+					<span ng-bind="::customer.myEnterprise.enAddress"></span>
+				</td>
+				<td><span ng-if="customer.apcheck != 0">启用</span>
+					<span ng-if="customer.apcheck == 0">未启用</span>
+				</td>
+				<td class="text-center"><a class="btn btn-sm" title="选择" href="javascript:void(0)" ng-click="select(customer)" style="text-decoration: none;" ng-disabled = "customer.apcheck == 0">选择</a></td>
+			</tr>
+		</tbody>
+	</table>
+</div>