Browse Source

应收对账单新增应付供应商名称和编号字段,增加应付供应商名称筛选功能,修改应付对账单列表界面筛选日期名称属性

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@2167 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
zhangzl 10 years ago
parent
commit
739eed3e48

+ 13 - 4
src/main/webapp/resources/js/index/app.js

@@ -3702,6 +3702,7 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 		$scope.getData = function(){
 			$scope.data = FaApCheck.getAll(function(data){
 			$scope.data = data;
+			console.log($scope.data);
 			angular.forEach($scope.data, function(item) {
 					item:{
 						$selected:true;
@@ -3734,13 +3735,17 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 		$scope.suuorname = '';
 		$scope.sdateFrom = '';
 		$scope.sdateTo = '';
+		$scope.vuuorname = '';
 		$scope.condition.uuorname = '';
 		$scope.condition.dateFrom = '';
-		$scope.condition.dateTo = '';		
+		$scope.condition.dateTo = '';
+		$scope.condition.venduuorname = '';
+		
 		$scope.searchOrder = function(check) {
 			$scope.condition.uuorname = $scope.suuorname;
 			$scope.condition.dateFrom = $scope.sdateFrom;
 			$scope.condition.dateTo = $scope.sdateTo;
+			$scope.condition.venduuorname = $scope.vuuorname;
 		}
 		
 		/**
@@ -3836,6 +3841,8 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 					sourceTable:'',
 					oldYCheckQty:'',
 					status: 0,
+					receiveCode:'',
+					receiveName:'',
 					prodCode:'',
 					taxrate: ''
 			};
@@ -3880,13 +3887,13 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 	  			if(check.qty > 0){
 	  				$scope.data.maxThisCheckQty = check.qty;
 	  				$scope.data.minThisCheckQty = 0;
-	  				if(check.qty - (check.yCheckQty || 0) < check.thisCheckQty  || check.thisCheckQty < 0 ){
+	  				if(check.qty - (check.yCheckQty || 0) < check.thisCheckQty  || check.thisCheckQty < 0 || check.thisCheckQty == 0){
 	  				$scope.validQty = false;
 	  				}
 	  			}else if(check.qty < 0){
 	  				$scope.data.maxThisCheckQty = 0;
 	  				$scope.data.minThisCheckQty = check.qty;
-	  				if(((-check.qty)-(-check.yCheckQty) < (-check.thisCheckQty)) || check.thisCheckQty > 0){
+	  				if(((-check.qty)-(-check.yCheckQty) < (-check.thisCheckQty)) || check.thisCheckQty > 0 || check.thisCheckQty == 0){
 	  					$scope.validQty = false;
 	  					$scope.loading = false;
 	  					toaster.pop('error','本次对账数量,填写有误!');
@@ -3921,6 +3928,9 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 				$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.sourceInfo.sourceId = check.sourceId;
@@ -3960,7 +3970,6 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 		if($scope.sameCust && $scope.validQty) {
 			updateYCheckQty();
 			$scope.saveApCheck();
-				
 			$modalInstance.close();			
 			}
 		}

+ 4 - 0
src/main/webapp/resources/tpl/index/fa/apCheck.html

@@ -117,7 +117,11 @@
 		<div class="more" ng-class="{'open': condition.$open}">
 			<form class="form-inline">
 			  <div class="form-group ">
+<<<<<<< .mine
+			    <label>对账日期:</label>
+=======
 			    <label>对帐日期:</label>
+>>>>>>> .r2166
 			    <div class="btn-group btn-menu" dropdown is-open="condition.$dateZoneOpen">
 				  <button type="button" dropdown-toggle style="width: 85px;" class="btn btn-default btn-xs dropdown-toggle">
 				    	{{dateZoneText}}<i class="fa fa-fw fa-angle-down icon-right"></i></span>

+ 30 - 18
src/main/webapp/resources/tpl/index/fa/apCheckList.html

@@ -79,17 +79,27 @@
 			<i></i>
 		</div>
   		<div class="row">
- 			<div class="col-xs-6">
+ 			<div class="col-xs-5">
  			<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="可用企业名称和UU号筛选">
+					<input ng-model="suuorname" type="search"  class="form-control input-sm" placeholder="可用企业名称筛选">
 				</div>
 			</form>
 			</div>
-			<div class="col-xs-2 col-xs-offset-4">
+ 			<div class="col-xs-5">
+ 			<form class="form-inline">
+ 				<div class="form-group ">
+					<label>应付供应商:</label>
+				</div> 			
+				<div class="form-group form-group-sm">
+					<input ng-model="vuuorname" type="search"  class="form-control input-sm" placeholder="可用企业名称筛选">
+				</div>
+			</form>
+			</div>
+			<div class="col-xs-2">
 				<button ng-click="searchOrder()">筛选</button> <button ng-click="createApCheck(check.$selected)">生成对账</button>			
 			</div>
 		</div>
@@ -135,23 +145,24 @@
 		</div>
 	<table width="99%" class="tableMargin">
 		<tr>
-		<table>
+		<table width="100%">
 		<tr class="thAlign">
 			<th width="40px;" class="checkboxSize"><input type="checkbox" name="checkbox" ng-model="checkboxes.checked" ng-click="checkAll()"></th>
 			<th width="80px;">本次对账数</th>
-			<th width="110px;">单据编号</th>
+			<th width="105px;">客户名称</th>
+			<th width="95px;">单据编号</th>
 			<th width="30px;">序号</td>
-			<th width="110px;">类型</th>
-			<th width="100px;">日期</th>
-			<th width="110px;">客户采购单号</th>
-			<th width="80px;">客户料号</th>
+			<th width="95px;">类型</th>
+			<th width="80px;">日期</th>
+			<th width="95px;">供应商名称</th>
+			<th width="100px;">客户采购单号</th>
+			<th width="70px;">客户料号</th>
 			<th width="50px;">数量</th>
 			<th width="50px;">单价</th>
 			<th width="50px;">币别</th>
 			<th width="50px;">税率</th>
 			<th width="80px;">金额</th>
 			<th width="80px;">本次对帐金额</th>
-			<th width="126px;">客户名称</th>
 			<th style="display:none;">客户UU</th>
 			<th style="display:none;">SOUR</br>CEID</th>
 			<th width="17px" style="border: none;"></th>
@@ -161,23 +172,24 @@
 		<tr>
 		<td>
 		<div style="overflow-y:scroll; width:100%;max-height:500px">			
-		<table>
-		<tr ng-repeat="check in data | orderBy: 'piDate': reverse=true" ng-if="((condition.dateFrom == '') || ((condition.dateFrom !== '') && (condition.dateFrom < check.piDate))) && ((condition.dateTo == '') || ((condition.dateTo !== '') && (condition.dateTo > check.piDate))) && ((condition.uuorname == '') || ((condition.uuorname !== '') && (condition.uuorname == check.custUu) || (condition.uuorname == check.custName)))">
+		<table width="100%">
+		<tr ng-repeat="check in data | orderBy: 'piDate': reverse=true" ng-if="((condition.dateFrom == '') || ((condition.dateFrom !== '') && (condition.dateFrom < check.piDate))) && ((condition.dateTo == '') || ((condition.dateTo !== '') && (condition.dateTo > check.piDate))) && ((condition.uuorname == '') || ((condition.uuorname !== '') && (condition.uuorname == check.custUu) || (condition.uuorname == check.custName))) && ((condition.venduuorname == '') ||((condition.venduuorname !== '') && (condition.venduuorname == check.receiveName)))">
 			<td width="40px;" 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="80px;"><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="110px;">{{check.inOutNo}}</td>
+			<td width="105px;">{{check.custName}}</td>
+			<td width="95px;">{{check.inOutNo}}</td>
 			<td width="30px;" align="center">{{check.detno}}</td>
-			<td width="110px;">{{check.piClass}}</td>
-			<td width="100px;">{{check.piDate|date:'yyyy-MM-dd'}}</td>
-			<td width="110px;">{{check.orderCode}}</td>
-			<td width="80px;">{{check.prodCode}}</td>
+			<td width="95px;">{{check.piClass}}</td>
+			<td width="80px;">{{check.piDate|date:'yyyy-MM-dd'}}</td>
+			<td width="95px;">{{check.receiveName}}</td>
+			<td width="100px;">{{check.orderCode}}</td>
+			<td width="70px;">{{check.prodCode}}</td>
 			<td width="50px;">{{check.qty}}</td>
 			<td width="50px;">{{check.orderPrice}}</td>
 			<td width="50px;">{{check.currency}}</td>
 			<td width="50px;" align="center">{{check.taxrate}}</td>
 			<td width="80px;">{{(check.qty || 0)*(check.orderPrice || 0) | number:2}}</td>
 			<td width="80px;">{{(check.orderPrice || 0)*(check.thisCheckQty || 0) | number:2}}</td>
-			<td width="126px;">{{check.custName}}</td>
 			<td style="display:none;">{{check.custUu}}</td>
 			<td style="display:none;">{{check.sourceId}}</td>		
 		</tr>

+ 4 - 1
src/main/webapp/resources/tpl/index/fa/apCheck_detail.html

@@ -119,6 +119,8 @@
 						<th>税率</th>
 						<th>对账数量</th>
 						<th>对账金额</th>
+						<th>应付供应商编号</th>
+						<th>应付供应商名称</th>
 					</tr>
 				</thead>
 				<tbody ng-repeat="item in data.items" style="text-align: center;">
@@ -132,6 +134,8 @@
 						<td ng-bind="item.taxrate"></td>
 						<td ng-bind="item.checkQty"></td>
 						<td ng-bind="item.amount | number:2"></td>
+						<td ng-bind="item.receiveCode"></td>
+						<td ng-bind="item.receiveName">YU128932-3</td>
 					</tr>
 				</tbody>
 			</table>
@@ -147,4 +151,3 @@
 		</div>
 	</div>
 </div>
-<!-- -->