Pārlūkot izejas kodu

【前台】+【对账单 送货工厂字段】

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@4134 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
aof 10 gadi atpakaļ
vecāks
revīzija
cfa83f9a9a

+ 12 - 1
src/main/webapp/resources/js/index/app.js

@@ -3714,6 +3714,17 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 		$scope.dateZoneText = '不限';
 		$scope.condition = {dateZone: -1};
 		$scope.currency = Symbol.currency;//将币别转化为对应的符号
+		$scope.active = 'todo';
+		//状态
+		$scope.setActive = function (state){
+			if($scope.active != state) {
+				$scope.active = state;
+				if($scope.tableParams.page() == 1)
+					$scope.tableParams.reload();
+				else
+					$scope.tableParams.page(1);
+			}
+		};
 		$scope.changeDateZone = function(zone) {
 			$scope.condition.dateZone = zone;
 			$scope.dateZoneText = typeof zone == 'undefined' ? '半年前' : (zone == -1 ? '不限' : (zone == 1 ? '一个月内' : '半年内'));
@@ -3739,7 +3750,7 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
 				pageParams.keyword = $scope.keyword;
 				pageParams.searchFilter.fromDate = $scope.condition.dateFrom ? $scope.condition.dateFrom.getTime() : null;
 				pageParams.searchFilter.endDate = $scope.condition.dateTo ? $scope.condition.dateTo.getTime() : null;
-				FaApCheck.getAllApCheck(BaseService.parseParams(pageParams), function(page){
+				FaApCheck[getState($scope.active )](BaseService.parseParams(pageParams), function(page){
 					$scope.loading = false;
 					if(page) {
 						params.total(page.totalElements);

+ 23 - 2
src/main/webapp/resources/js/index/services/Fa.js

@@ -58,8 +58,29 @@ define([ 'ngResource'], function() {
 			updateStatus: {
 				url: 'sale/apCheck/updateStatus'
 			},
-			getAllApCheck: {
-				url: 'sale/apCheck/getAllCheck'
+//			getAllApCheck: {
+//				url: 'sale/apCheck/getAllCheck'
+//			},
+//			getTodoApCheck: {
+//				url: 'sale/apCheck/',
+//				params: {
+//					_state: 'todo'
+//				}
+//			},
+			getTodo: {
+				params: {
+					_state: 'todo'
+				}
+			},
+			getDone: {
+				params: {
+					_state: 'done'
+				}
+			},
+			getEnd: {
+				params: {
+					_state: 'end'
+				}
 			},
 			cancel: {
 				url: 'sale/apCheck/cancel'

+ 27 - 3
src/main/webapp/resources/tpl/index/fa/apCheck.html

@@ -95,8 +95,32 @@
 
 	<div class="condition block">
 		<div class="row">
-		<div class="col-xs-2"><a class="text-simple append" ui-sref="fa.apCheckList"><big><i class="fa fa-plus-square"></i> 新增对账单</big></a></div>
-			<div class="col-xs-6">
+			<div class="col-xs-2"><a class="text-simple append" ui-sref="fa.apCheckList"><big><i class="fa fa-plus-square"></i> 新增对账单</big></a></div>
+			<div class="col-xs-4">
+				<div class="btn-group btn-group-sm btn-group-justified">
+					<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 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>
+					</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>
+					</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>
+					</div>
+				</div>
+			</div>
+		</div>
+		<div class="row" style="margin-top : 20px">
+			<div class="col-xs-8">
 				<div class="search">
 					<div class="form-group form-group-sm has-feedback">
 						<input type="search" class="form-control input-sm" ng-model="keyword" ng-search="onSearch()" placeholder="输入商品、客户名称或单据流水号搜索" /><span
@@ -168,7 +192,7 @@
 			</form>
 		</div>
 	</div>
-	<div ng-if="tableParams.total() == 0" class="row">
+	<div ng-if="active=='all' && tableParams.total() == 0" class="row">
 		<div class="col-xs-12 col-xs-offset-3">
 			<h3 class="text-simple"><i class="fa fa-spinner"></i> &nbsp;您还未生成对账单,请立即新增对账</h3>
 		</div>

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

@@ -163,13 +163,13 @@
 				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="70px;">{{check.custName}}</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="60px;">{{check.piDate | date:'yyyy-MM-dd' }}</td>
+			<td width="62px;">{{check.piDate | date:'yyyy-MM-dd' }}</td>
 			<td width="73px;">{{check.receiveName}}</td>
-			<td width="60px;">{{check.orderCode}}</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>
@@ -177,7 +177,7 @@
 			<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="61px;">{{(check.orderPrice || 0)*(check.thisCheckQty || 0) | number:2}}</td>
+			<td width="60px;">{{(check.orderPrice || 0)*(check.thisCheckQty || 0) | number:2}}</td>
 		</tr>
 		</table>
 		</div>