Browse Source

财务对账->应收对账单->新增对账单增加加客户物料名称、客户规格型号属性展示,增加按加客户物料名称、客户规格型号搜索,页面进行调整

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

+ 1 - 1
src/main/java/com/uas/platform/b2b/service/impl/ErpProdIODetailServiceImpl.java

@@ -52,7 +52,7 @@ public class ErpProdIODetailServiceImpl implements ErpProdIODetailService {
 	public List<ErpProdIODetail> findXlsApChecks(List<Long> filter, String keyword, Long fromDate, Long endDate) {
 		Long enUu = SystemSession.getUser().getEnterprise().getUu();
 		String sql = "select p.pi_inoutno inOutNo,p.pd_detno detno ,p.pi_class piClass, p.pd_ordercode orderCode, p.pd_orderdetno  orderDetno,"
-				+ " p.pd_prodcode prodCode, p.pr_title prodTitle,p.pd_qty qty, p.pi_date piDate, p.pd_orderprice  orderPrice, p.pi_currency currency, p.pd_taxrate taxrate, p.whname whname, p.pd_ycheckqty yCheckQty,"
+				+ " p.pd_prodcode prodCode, p.pr_spec prodSpec, p.pr_title prodTitle,p.pd_qty qty, p.pi_date piDate, p.pd_orderprice  orderPrice, p.pi_currency currency, p.pd_taxrate taxrate, p.whname whname, p.pd_ycheckqty yCheckQty,"
 				+ " p.pd_thischeckqty thisCheckQty, p.custuu custUu, p.custname custName, p.enuu enUu, p.sourceid sourceId, p.pi_sourcetable sourceTable, p.pi_rate rate, p.pi_receivecode receiveCode,"
 				+ " p.pi_receivename receiveName , p.pd_factory factory, p.sendcode sendcode from erp$prodiodetail p where enuu = ?";
 		if (!StringUtils.isEmpty(keyword)) {

+ 128 - 10
src/main/webapp/resources/js/index/app.js

@@ -1,6 +1,6 @@
-define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'service/Make', 'service/Fa', 'service/Account', 'service/Alert', 'ui.router', 'ui.bootstrap' , 'file-upload', 'ngSanitize'], function() {
+define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'service/Make', 'service/Fa', 'service/Account', 'service/Alert', 'service/CheckTel', 'ui.router', 'ui.bootstrap', 'file-upload', 'ngSanitize'], function() {
 	'use strict';
-	var app = angular.module('myApp', [ 'toaster', 'angularCharts', 'ngTable', 'ui.router', 'common.services', 'PurcServices', 'MakeServices', 'FaServices', 'AccountServices', 'AlertServices', 'ui.bootstrap', 'angularFileUpload', 'ngSanitize']);
+	var app = angular.module('myApp', [ 'toaster', 'angularCharts', 'ngTable', 'ui.router', 'common.services', 'PurcServices', 'MakeServices', 'FaServices', 'AccountServices', 'AlertServices', 'ui.bootstrap', 'angularFileUpload', 'ngSanitize', 'CheckTelModule']);
 	app.init = function() {
 		angular.bootstrap(document, [ 'myApp' ]);
 	};
@@ -470,9 +470,35 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			$scope.routeState = routeState || 'home';
 		});
 	}]);
-	app.controller('AuthCtrl', ['$scope', '$window', 'AuthenticationService', 'toaster', 'BaseService', function($scope, $window, AuthenticationService, toaster, BaseService) {
+	app.controller('AuthCtrl', ['$scope', '$window', 'AuthenticationService', 'toaster', 'BaseService', '$modal', function($scope, $window, AuthenticationService, toaster, BaseService, $modal) {
 		$scope.isAuthed = AuthenticationService.isAuthed();		//AuthenticationService模块在common/下
-		$scope.userInfo = {};
+		
+		//手机号码格式验证
+		var checkTel = function(data){
+			var userTel = data.userTel;
+			$scope.checkResult = false;
+			var telephone = /^1[3|4|5|7|8]\d{9}$/;
+			if(!(telephone).test(userTel)){
+				var modalInstance = $modal.open({
+					animation: true,
+					templateUrl: 'static/tpl/index/account/checkTel.html',
+					controller: 'CheckTelCtrl',
+					backdrop: 'static', 
+					keyboard: false,
+					resolve: {
+						user: function(){
+							return data;
+						},
+					}
+				});
+				modalInstance.result.then(function(){
+				}, function(){
+					
+				});
+			} else {
+				$scope.checkResult = true;
+			}
+		};
 		AuthenticationService.getAuthentication().success(function(data) {
 			if(data.enterprises) {
 				data.enterprise = data.enterprises[data.enterprises.length - 1];
@@ -491,8 +517,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			if (data == null || !data.userUU) {
 				$scope.isAuthed = false;
 				$window.location.href = BaseService.getRootPath() + "/signin";
+			} else {
+				//跳转到手机号码验证
+				checkTel($scope.userInfo);
 			}
-		});
+	});
 		$scope.logout = function() {
 			AuthenticationService.logout().success(function() {
 				$window.location.href = BaseService.getRootPath() + "/signin";
@@ -2841,7 +2870,7 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 			$scope.last = function (){
 				$scope.barData = getPage($scope.barData.next,5);
 			}
-		}
+		};
 		/**
 		 * 更新外箱号
 		 */
@@ -3985,7 +4014,7 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 					$scope.ifShow = true;
 				}
 			})
-		}
+		};
 		
 		if($stateParams.id){
 			loadData();			
@@ -4106,15 +4135,20 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 		$scope.condition.dateTo = '';
 		$scope.condition.venduuorname = '';
 		$scope.condition.factory = '';
+		$scope.condition.prodTitle = '';
+		$scope.condition.prodSpec = '';
 		
 		$scope.searchOrder = function(check) {
 			angular.forEach($scope.data, function(item) {
 				$scope.checkboxes.checked = false;
 				item.$selected = false;
 			});
+			console.log($scope.data);
 			$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) {
@@ -4543,7 +4577,6 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 				toaster.pop('error', '失败', reponse.data);
 			});
 		};
-		
 		$scope.updatePassword = function(){
 			var modalInstance = $modal.open({
 				animation: true,
@@ -4570,7 +4603,8 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 			});
 			
 			modalInstance.result.then(function(){
-				
+				$scope.userTelSuccess = false;
+				$scope.userTelError = false;
 			}, function(){
 				
 			});
@@ -4614,7 +4648,7 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 						$scope.newUserForm.newUserTel.$setValidity('available', true);
 						$scope.userTelSuccess = true;
 						$scope.userTelError = false;
-					} else {
+					}else{
 						$scope.newUserForm.newUserTel.$setValidity('available', false);
 						$scope.userTelError = true;
 						$scope.userTelSuccess = false;
@@ -4758,6 +4792,89 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 		};
 	}]);
 	
+	// 登录手机号码验证
+	app.controller('CheckTelCtrl', ['$scope', '$modalInstance', 'user', 'AccountUser', 'AuthenticationService', 'SendCheckMsg', 'SessionService', '$timeout', function($scope, $modalInstance, user, AccountUser, AuthenticationService, SendCheckMsg, SessionService, $timeout){
+		$scope.user = user;
+		$scope.cancel = function(){
+			$modalInstance.close();
+		}
+		/*$scope.loading = false;
+		$scope.btnState = false;
+		$scope.clicks = 0;
+		var storage = window.localStorage;
+		//手机验证码定时器
+		$scope.msgInfoError = false;
+		var setBtnTimeDown = function(value) { 
+			if(value > 0) {
+				$scope.btnState = true;
+				$timeout(function() { 
+					$scope.$apply(function(){
+						storage.setItem("btnTimes", $scope.btnTimes);
+						$scope.btnTimes --;
+						value --;
+						setBtnTimeDown (value);
+					});
+				}, 500);
+			}else{
+				$scope.btnState = false;
+			}
+		};
+		if(storage.btnTimes > 1){
+			$scope.btnTimes = storage.btnTimes;
+			setBtnTimeDown(storage.btnTimes)
+		}else{
+			storage.removeItem("btnTimes");
+		}
+		$scope.updateTel = function(phoneCode, userTel, uu){
+			$scope.loading = true;
+			$scope.msgInfoError = false;
+			$scope.result = false;
+			//更新联系方式
+			AccountUser.updateWithCode({code: phoneCode, tel : userTel, uu: uu},{}, function(data){
+				$scope.loading = false;
+				$scope.msgInfoError2 = false;
+				$scope.result = true;
+				AuthenticationService.getAuthentication().success(function(data) {
+					$timeout(function(){
+						$modalInstance.dismiss();
+	    				window.location.reload();
+	    				}, 1000);
+				}).error(function(response) {
+					
+				});
+			}, function(response){
+				$scope.loading = false;
+				$scope.msgInfoError2 = response;
+			});	
+		};			
+		//获取验证码
+		$scope.getPhoneCode = function(userTel){
+			var timeInfo = 10;
+			$scope.clicks ++;
+			$scope.timeInfo = timeInfo;
+			if($scope.clicks >= 5){
+				$scope.errorloading = true;
+				$scope.msgInfoSuccess = false;
+				$scope.msgInfoError = false;
+			}else{
+				$scope.loading = true;
+				SendCheckMsg.sendMsgInfos({userTel: userTel},function(data){
+					$scope.loading = false;
+					$scope.msgInfoSuccess = data.success;
+					$scope.sendMsg = data;
+					$scope.btnTimes = 60;
+					setBtnTimeDown($scope.btnTimes);
+					$scope.msgInfoError = false;
+				},function(response){
+					console.log(response);
+					$scope.loading = false;
+					$scope.msgInfoError = false;
+					$scope.sendCheckMsg = false;
+					$scope.msgInfoSuccess = true;
+				});
+			}
+		};	*/
+	}]);
 	app.controller('RemoveVendorCtrl', ['$scope', '$modalInstance', 'user', 'AccountUser', 'toaster', function($scope, $modalInstance, user, AccountUser, toaster){
 		$scope.checkboxes = {
 				checked : false
@@ -5911,6 +6028,7 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 	app.controller('CustServeCtrl', ['$scope', 'Vendor', function($scope, Vendor){
 		Vendor.getServe(function(datas){
 			$scope.vendors = datas;
+			console.log($scope.Vender);
 			// 自动跳转
 			if(datas && datas.length == 1)
 				$scope.redirect(datas[0]);

+ 96 - 69
src/main/webapp/resources/tpl/index/fa/apCheckList.html

@@ -48,6 +48,9 @@
 		border-bottom:2px solid #A9A9A9;			
 	}
 	
+	.info {
+		overflow:scroll;
+	}
 </style>
 
 <div style="margin-right:20px;">
@@ -68,14 +71,6 @@
 						class="form-control-feedback text-simple"><i
 						class="fa fa-search"></i></span>
 				</div>
-<!-- 	 			<form class="form-inline">
-	 				<div class="form-group ">
-						<label>客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;户:</label>
-					</div> 			
-					<div class="form-group form-group-sm">
-						<input ng-model="suuorname" type="search"  class="form-control input-sm" placeholder="可用客户名称筛选">
-					</div>
-				</form> -->
 			</div>
 			<div class="col-xs-1">
 				<label>应付供应商:</label>
@@ -87,14 +82,6 @@
 						class="form-control-feedback text-simple"><i
 						class="fa fa-search"></i></span>
 				</div>
-			<!-- 		<form class="form-inline text-right">
-	 				<div class="form-group ">
-						<label>应付供应商:</label>
-					</div> 			
-					<div class="form-group form-group-sm">
-						<input ng-model="vuuorname" type="search"  style="margin-left: 2px;" class="input-sm form-control" placeholder="可用应付供应商名称筛选">
-					</div>
-				</form> -->
 			</div>
 			<div class="col-xs-1">
 				<label>送货工厂:</label>
@@ -107,6 +94,28 @@
 						class="fa fa-search"></i></span>
 				</div>
 			</div>
+			<div class="col-xs-1">
+				<label>物料名称:</label>
+			</div>
+			<div class="col-xs-3">
+				<div class="form-group form-group-sm has-feedback">
+					<input type="search" class="form-control input-sm"
+						ng-model="prodTitle" placeholder="请输入物料名称" /><span
+						class="form-control-feedback text-simple"><i
+						class="fa fa-search"></i></span>
+				</div>
+			</div>
+			<div class="col-xs-1">
+				<label>&nbsp;&nbsp;规&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格:</label>
+			</div>
+			<div class="col-xs-3">
+				<div class="form-group form-group-sm has-feedback">
+					<input type="search" class="form-control input-sm"
+						ng-model="prodSpec" placeholder="请输入物料规格" /><span
+						class="form-control-feedback text-simple"><i
+						class="fa fa-search"></i></span>
+				</div>
+			</div>
 		</div>
 		<div class="more">
 			<form class="form-inline">
@@ -163,60 +172,78 @@
 				</form>		
 			  </div>
 		</div>
-	<table width="960px" class="tableMargin">
-		<tr>
-		<table width="960px" class="table-bordered" style="margin-bottom: 0">
-		<tr class="thAlign">
-			<th width="36px;" class="checkboxSize"><input type="checkbox" name="checkbox" ng-model="checkboxes.checked" ng-click="checkAll()"></th>
-			<th width="91px;">本次对账数</th>
-			<th width="70px;">客户名称</th>
-			<th width="60px;">单据编号</th>
-			<th width="35px;">序号</td>
-			<th width="60px;">类型</th>
-			<th width="60px;">单据日期</th>
-			<th width="73px;">应付供应商名称</th>
-			<th width="60px;">客户采购单号</th>
-			<th width="65px;">客户料号</th>
-			<th width="65px;">送货工厂</th>
-			<th width="55px;">数量</th>
-			<th width="40px;">单价</th>
-			<th width="30px;">币别</th>
-			<th width="39px;">税率</th>
-			<th width="60px;">金额</th>
-			<th width="60px;">本次对帐金额</th>
-			<th width="17px" style="visibility: hidden;"></th>
-		</tr>
-		</table>
-		</tr>
-		<tr>
-		<td>
-		<div style="overflow-y:scroll; width:960px;max-height:500px">			
-		<table class="table table-bordered table-striped table-hover">
-		<tr ng-repeat="check in data | filter:condition.factory | filter:condition.uuorname |filter:condition.venduuorname |orderBy: 'piDate': reverse=true" 
-				ng-if="((condition.dateFrom == '') || ((condition.dateFrom !== '') && (condition.dateFrom <= check.piDate))) && ((condition.dateTo == '') || ((condition.dateTo !== '') && (condition.dateTo >= check.piDate)))" >
-			<td width="36px;" style="text-align: center" class="checkboxSize" n><input ng-model="check.$selected" name="checkbox" ng-click="checkOne(check)" ng-change="getTotalMoney()" type="checkbox"></td>
-			<td width="87px;"><input ng-model="check.thisCheckQty" type="number" max="data.maxThisCheckQty" min="data.minThisCheckQty" ng-change="getTotalMoney()" style="width:70px;" class=" input-sm"></td>
-			<td width="72px;">{{check.custName}}</td>
-			<td width="60px;">{{check.inOutNo}}</td>
-			<td width="35px;" align="center">{{check.detno}}</td>
-			<td width="60px;">{{check.piClass}}</td>
-			<td width="62px;">{{check.piDate | date:'yyyy-MM-dd' }}</td>
-			<td width="73px;">{{check.receiveName}}</td>
-			<td width="61px;">{{check.orderCode}}</td>
-			<td width="65px;">{{check.prodCode}}</td>
-			<td width="65px;">{{check.factory}}</td>
-			<td width="55px;">{{check.qty}}</td>
-			<td width="40px;">{{check.orderPrice}}</td>
-			<td width="30px;">{{check.currency}}</td>
-			<td width="39px;" align="center">{{check.taxrate}}</td>
-			<td width="60px;">{{(check.qty || 0)*(check.orderPrice || 0) | number:2}}</td>
-			<td width="60px;">{{(check.orderPrice || 0)*(check.thisCheckQty || 0) | number:2}}</td>
-		</tr>
-		</table>
+	<div class="info">
+			<table width="1400px" class="tableMargin">
+				<tr>
+					<table width="1400px" class="table-bordered"
+						style="margin-bottom: 0">
+						<tr class="thAlign">
+							<th width="36px;" class="checkboxSize"><input
+								type="checkbox" name="checkbox" ng-model="checkboxes.checked"
+								ng-click="checkAll()"></th>
+							<th width="100px;">本次对账数</th>
+							<th width="70px;">客户名称</th>
+							<th width="60px;">单据编号</th>
+							<th width="35px;">序号</th>
+							<th width="60px;">类型</th>
+							<th width="60px;">单据日期</th>
+							<th width="73px;">应付供应商名称</th>
+							<th width="60px;">客户采购单号</th>
+							<th width="65px;">客户料号</th>
+							<th width="65px;">客户物料名称</th>
+							<th width="65px;">客户规格型号</th>
+							<th width="65px;">送货工厂</th>
+							<th width="55px;">数量</th>
+							<th width="40px;">单价</th>
+							<th width="30px;">币别</th>
+							<th width="40px;">税率</th>
+							<th width="60px;">金额</th>
+							<th width="60px;">本次对帐金额</th>
+							<th width="17px" style="visibility: hidden;"></th>
+						</tr>
+					</table>
+				</tr>
+				<tr>
+					<td>
+						<div style="overflow-y: scroll; width: 1400px; max-height: 500px">
+							<table class="table table-bordered table-striped table-hover">
+								<tr
+									ng-repeat="check in data | filter:condition.factory | filter:condition.prodSpec | filter:condition.prodTitle | filter:condition.uuorname | filter:condition.venduuorname | orderBy: 'piDate': reverse=true"
+									ng-if="((condition.dateFrom == '') || ((condition.dateFrom !== '') && (condition.dateFrom <= check.piDate))) && ((condition.dateTo == '') || ((condition.dateTo !== '') && (condition.dateTo >= check.piDate)))">
+									<td width="36px;" style="text-align: center"
+										class="checkboxSize" n><input ng-model="check.$selected"
+										name="checkbox" ng-click="checkOne(check)"
+										ng-change="getTotalMoney()" type="checkbox"></td>
+									<td width="100px;"><input ng-model="check.thisCheckQty"
+										type="number" max="data.maxThisCheckQty"
+										min="data.minThisCheckQty" ng-change="getTotalMoney()"
+										style="width: 75px;" class=" input-sm text-center"></td>
+									<td width="70px;">{{check.custName}}</td>
+									<td width="60px;">{{check.inOutNo}}</td>
+									<td width="35px;" align="center">{{check.detno}}</td>
+									<td width="60px;">{{check.piClass}}</td>
+									<td width="60px;">{{check.piDate | date:'yyyy-MM-dd' }}</td>
+									<td width="73px;">{{check.receiveName}}</td>
+									<td width="60px;">{{check.orderCode}}</td>
+									<td width="65px;">{{check.prodCode}}</td>
+									<td width="65px;">{{check.prodTitle}}</td>
+									<td width="65px;">{{check.prodSpec}}</td>
+									<td width="65px;">{{check.factory}}</td>
+									<td width="55px;">{{check.qty}}</td>
+									<td width="40px;">{{check.orderPrice}}</td>
+									<td width="30px;">{{check.currency}}</td>
+									<td width="40px;" align="center">{{check.taxrate}}</td>
+									<td width="60px;">{{(check.qty || 0)*(check.orderPrice ||
+										0) | number:2}}</td>
+									<td width="60px;">{{(check.orderPrice ||
+										0)*(check.thisCheckQty || 0) | number:2}}</td>
+								</tr>
+							</table>
+						</div>
+					</td>
+				</tr>
+			</table>
 		</div>
-		</td>
-		</tr>
-	</table>
 	</div>
 	<div style="text-align: left;">
 		<div class="divid">总金额合计:{{totalMoney | number:2}}</div>