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

四个出入库单的页面,增加hover框框的颜色对比度

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

+ 419 - 0
src/main/webapp/resources/js/index/app.js

@@ -93,6 +93,18 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			url : "/notice",
 			templateUrl : "static/tpl/index/sale/notice.html",
 			controller: 'SaleNoticeCtrl'
+		}).state('sale.send', {
+			url : "/send",
+			templateUrl : "static/tpl/index/sale/send.html",
+			controller: 'SaleSendCtrl'
+		}).state('sale.accept', {
+			url : "/accept",
+			templateUrl : "static/tpl/index/sale/accept.html",
+			controller: 'SaleAcceptCtrl'
+		}).state('sale.returns', {
+			url : "/returns",
+			templateUrl : "static/tpl/index/sale/returns.html",
+			controller: 'SaleReturnsCtrl'
 		}).state('user', {
 			url : "/user",
 			views : {
@@ -113,6 +125,18 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 					templateUrl : "static/tpl/index/qc/right.html"
 				}
 			}
+		}).state('qc.badIn', {
+			url : "/badIn",
+			templateUrl : "static/tpl/index/qc/badIn.html",
+			controller: 'SaleBadInCtrl'
+		}).state('qc.badOut', {
+			url : "/badOut",
+			templateUrl : "static/tpl/index/qc/badOut.html",
+			controller: 'SaleBadOutCtrl'
+		}).state('qc.MRB', {
+			url : "/MRB",
+			templateUrl : "static/tpl/index/qc/MRB.html",
+			controller: 'SaleMRBCtrl'
 		}).state('fa', {
 			url : "/fa",
 			views : {
@@ -125,6 +149,21 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			}
 		});
 	});
+	
+	/**
+	 * 表示符号
+	 */
+	app.factory('Symbol', function(){
+		return {
+			currency: function(cur) {
+				if(cur == 'RMB') return '¥';
+				else if(cur == 'USD') return '$';
+				else if(cur == 'EUR') return '€';
+				else return cur;
+			}
+		};
+	});
+	
 	app.controller('MyCtrl', function($scope, $rootScope) {
 		$rootScope.$on('$locationChangeSuccess', function(evt, newUrl) {
 			var routeState = newUrl.substr(newUrl.indexOf('#/') + 2);
@@ -680,6 +719,386 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.
 			}
 		};
 	});
+	/**
+	 * 发货单
+	 */
+	app.controller('SaleSendCtrl', function($scope, $rootScope, $filter, PurcChange, ngTableParams, toaster, BaseService, PurcChangeHis){
+		$rootScope.active = 'change';
+		$scope.active = 'todo';
+		$scope.agreedText = '全部';
+		$scope.dateZoneText = '一个月内';
+		$scope.condition = {dateZone: 1};
+		$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;
+		};
+		$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 $scope.condition.dateZone ? PurcChange : PurcChangeHis;
+		};
+		$scope.tableParams = new ngTableParams({
+			page : 1, 
+			count : 5,
+			sorting: {
+                date: 'desc' 
+            }
+		}, {
+			total : 0, 
+			counts: [5, 10, 25, 50],
+			getData : function($defer, params) {
+				$scope.loading = true;
+				getService()[getState($scope.active)].call(null, BaseService.parseParams(params.url()), function(page){
+					$scope.loading = false;
+					if(page) {
+						params.total(page.totalElements);
+						$defer.resolve(page.content);
+					}
+				});
+			}
+		});
+		
+		$scope.openDatePicker = function($event, item, openParam) {
+			$event.preventDefault();
+		    $event.stopPropagation();
+		    item[openParam] = !item[openParam];
+		};
+		
+		$scope.onReplyClick = function(change) {
+			if(change.agreed) {
+				var reply = {id: change.id, agreed: Number(change.$agreed), replyRemark: change.replyRemark};
+				$scope.loading = true;
+				PurcChange.reply({changeId: change.id}, reply, function(){
+					$scope.loading = false;
+					toaster.pop('info', '提示', '回复成功');
+					$scope.tableParams.reload();
+				}, function(response){
+					$scope.loading = false;
+					toaster.pop('error', '回复失败', response.data);
+				});
+			}
+		};
+	});
+	
+	/**
+	 * 客户采购验收
+	 */
+	app.controller('SaleAcceptCtrl', function($scope, $rootScope, $filter, PurcAccept, ngTableParams, toaster, BaseService, Symbol){
+		$rootScope.active = 'accept';
+		$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;
+		};
+		$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 PurcAccept;
+		};
+		
+		$scope.tableParams = new ngTableParams({
+			page : 1, 
+			count : 5,
+			sorting: {
+                date: 'desc' 
+            }
+		}, {
+			total : 0, 
+			counts: [5, 10, 25, 50],
+			getData : function($defer, params) {
+				$scope.loading = true;
+				getService()[getState($scope.active)].call(null, BaseService.parseParams(params.url()), function(page){
+					$scope.loading = false;
+					if(page) {
+						params.total(page.totalElements);
+						$defer.resolve(page.content);
+					}
+				});
+			}
+		});
+		
+		$scope.openDatePicker = function($event, item, openParam) {
+			$event.preventDefault();
+		    $event.stopPropagation();
+		    item[openParam] = !item[openParam];
+		};
+		
+	});
+	
+	/**
+	 * 客户采购验退
+	 */
+	app.controller('SaleReturnsCtrl', function($scope, $rootScope, $filter, PurcReturn, ngTableParams, toaster, BaseService, Symbol){
+		$rootScope.active = 'returns';
+		$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;
+		};
+		$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 PurcReturn;
+		};
+		$scope.tableParams = new ngTableParams({
+			page : 1, 
+			count : 5,
+			sorting: {
+                date: 'desc' 
+            }
+		}, {
+			total : 0, 
+			counts: [5, 10, 25, 50],
+			getData : function($defer, params) {
+				$scope.loading = true;
+				getService()[getState($scope.active)].call(null, BaseService.parseParams(params.url()), function(page){
+					$scope.loading = false;
+					if(page) {
+						params.total(page.totalElements);
+						$defer.resolve(page.content);
+					}
+				});
+			}
+		});
+		
+		$scope.openDatePicker = function($event, item, openParam) {
+			$event.preventDefault();
+		    $event.stopPropagation();
+		    item[openParam] = !item[openParam];
+		};
+		
+	});
+	
+	/**
+	 * 客户不良品入库
+	 */
+	app.controller('SaleBadInCtrl', function($scope, $rootScope, $filter, PurcBadIn, ngTableParams, toaster, BaseService, Symbol){
+		$rootScope.active = 'badIn';
+		$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;
+		};
+		$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 PurcBadIn;
+		};
+		$scope.tableParams = new ngTableParams({
+			page : 1, 
+			count : 5,
+			sorting: {
+                date: 'desc' 
+            }
+		}, {
+			total : 0, 
+			counts: [5, 10, 25, 50],
+			getData : function($defer, params) {
+				$scope.loading = true;
+				getService()[getState($scope.active)].call(null, BaseService.parseParams(params.url()), function(page){
+					$scope.loading = false;
+					if(page) {
+						params.total(page.totalElements);
+						$defer.resolve(page.content);
+					}
+				});
+			}
+		});
+		
+		$scope.openDatePicker = function($event, item, openParam) {
+			$event.preventDefault();
+		    $event.stopPropagation();
+		    item[openParam] = !item[openParam];
+		};
+		
+	});
+	
+	/**
+	 * 客户不良品出库
+	 */
+	app.controller('SaleBadOutCtrl', function($scope, $rootScope, $filter, PurcBadOut, ngTableParams, toaster, BaseService, Symbol){
+		$rootScope.active = 'badOut';
+		$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;
+		};
+		$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 PurcBadOut;
+		};
+		$scope.tableParams = new ngTableParams({
+			page : 1, 
+			count : 5,
+			sorting: {
+                date: 'desc' 
+            }
+		}, {
+			total : 0, 
+			counts: [5, 10, 25, 50],
+			getData : function($defer, params) {
+				$scope.loading = true;
+				getService()[getState($scope.active)].call(null, BaseService.parseParams(params.url()), function(page){
+					$scope.loading = false;
+					if(page) {
+						params.total(page.totalElements);
+						$defer.resolve(page.content);
+					}
+				});
+			}
+		});
+		
+		$scope.openDatePicker = function($event, item, openParam) {
+			$event.preventDefault();
+		    $event.stopPropagation();
+		    item[openParam] = !item[openParam];
+		};
+		
+	});
+	
+	/**
+	 * 客户MRB
+	 */
+	app.controller('SaleMRBCtrl', function($scope, $rootScope, $filter, PurcMRB, ngTableParams, toaster, BaseService, Symbol){
+		$rootScope.active = 'MRB';
+		$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;
+		};
+		$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 PurcMRB;
+		};
+		$scope.tableParams = new ngTableParams({
+			page : 1, 
+			count : 5,
+			sorting: {
+                date: 'desc' 
+            }
+		}, {
+			total : 0, 
+			counts: [5, 10, 25, 50],
+			getData : function($defer, params) {
+				$scope.loading = true;
+				getService()[getState($scope.active)].call(null, BaseService.parseParams(params.url()), function(page){
+					$scope.loading = false;
+					if(page) {
+						params.total(page.totalElements);
+						$defer.resolve(page.content);
+					}
+				});
+			}
+		});
+		
+		$scope.openDatePicker = function($event, item, openParam) {
+			$event.preventDefault();
+		    $event.stopPropagation();
+		    item[openParam] = !item[openParam];
+		};
+		
+	});
+	
 	/**
 	 * 计算时间差
 	 */

+ 0 - 270
src/main/webapp/resources/js/index/mobile.storage.app.js

@@ -1,270 +0,0 @@
-define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ui.router', 'ui.bootstrap' ], function() {
-	'use strict';
-	var app = angular.module('myApp', ['ngAnimate', 'toaster', 'ui.router', 'common.services', 'PurcServices', 'ui.bootstrap' ]);
-	app.init = function() {
-		angular.bootstrap(document, [ 'myApp' ]);
-	};
-	
-	app.config(function($stateProvider, $urlRouterProvider) {
-		$urlRouterProvider.otherwise('/index');
-		$stateProvider.state('index', {
-			url : "/index",
-			templateUrl : "static/tpl/index_mobile/storage/index.html"
-		}).state('input', {
-			url : "/input",
-			templateUrl : "static/tpl/index_mobile/storage/input.html"
-		}).state('inputOperation', {
-			url: '/input/:code',
-			templateUrl: 'static/tpl/index_mobile/storage/inputOperation.html'
-		}).state('upload', {
-			url: '/upload',
-			templateUrl: 'static/tpl/index_mobile/storage/needToUpload.html'
-		});
-	});
-	
-	app.factory('Symbol', function(){//符号
-		return {
-			currency: function(cur) {//把币别转换成对应的符号
-				if(cur == 'RMB') return '¥';
-				else if(cur == 'USD') return '$';
-				else if(cur == 'EUR') return '€';
-				else return cur;
-			}
-		};
-	}).factory('Ring', function(){//响铃,直接调用
-		return {
-			success: function(){
-				document.getElementById('successRing').play();
-			}, error: function(){
-				document.getElementById('errorRing').play();
-			}
-		}
-	}).factory('Online', function($rootScope){//在线状态,全局获取、设置
-		var status = {online: true};
-		return {
-			setOnline: function(value){
-				status.online = value;
-				$rootScope.$broadcast('online', value);
-			}, getOnline: function(){
-				return status.online;
-			}
-		}
-	});
-	
-	app.controller('IndexCtrl', function($scope, $rootScope){
-		//获取需要上传的数量
-		$scope.getNeedUpCount = function(){
-			var count = 0;
-			angular.forEach($rootScope.orders, function(value,key){
-				angular.forEach(value.orderItems, function(item, key){
-					if(item.replyCount) count += 1;//存在replyCount并且>0就需要上传
-				});
-			});
-			return count;
-		};
-		
-	});
-	
-	app.controller('StatusCtrl', function($scope, $http, Online){
-		$scope.status = {online: true};
-		
-		$scope.$watch('status.online', function(value){//检测用户手动切换在线状态
-			Online.setOnline(value);
-		});
-		
-		$scope.$on('online', function(data){//监听Service中的状态变化
-			$scope.status.online = Online.getOnline();
-		});
-	});
-	
-	app.controller('InputCtrl', function($scope, $http, $rootScope, $location, toaster, PurcOrder, Ring, Online){
-		$scope.orders = $rootScope.orders || [];
-		
-		var contains = function(array, element) {//根据ID判断数组是否包含某个元素
-			var result = false;
-			angular.forEach(array, function(value, key){
-				if(value.id == element.id) {//ID相等即包含
-					result = true; 
-					return result;
-				}
-			});
-			return result;
-		}
-		
-		$scope.getOrder = function(code) {//根据输入的单据id号获取下载单据信息
-			$scope.selectedId = code;
-			if(contains($scope.orders, {id: code})){//请求的单据id已经被下载在本地了
-				
-			} else {//请求的单据id未被下载在本地了,向服务器发送请求获取数据
-				PurcOrder.get({id: code}, function(data) {//获取成功
-					$scope.getError = false;
-					$scope.orders.push(data);
-					$rootScope.orders = $scope.orders;
-				}, function(response){//获取失败处理
-					$scope.errorCode = code;
-					$scope.getError = true;
-					setTimeout(function(){//2s后取消错误提示,好像没用。。。
-						$scope.getError = false;
-						$scope.errorCode = code;
-					}, 2000);
-				});
-			}
-			Ring.success();//提示成功响铃
-			$scope.batchCode = '';//重置输入框
-		};
-		
-		$scope.search = function($event, batchCode){//enter键触发事件
-			if($event.keyCode == 13) {//Enter事件
-				$scope.getOrder(batchCode);
-			}
-		};
-		
-		$scope.totalQty = function(order) {//获取当前单据还未扫描的物料数量
-			var result = 0;
-			angular.forEach(order.orderItems, function(value, key){
-				result += value.qty - value.replyQty;
-			});
-			return result;
-		};
-		
-		$scope.operate = function(order) {//跳转至对应的单据操作页面
-			$scope.selectedId = order.id;
-			$location.path('input/' + order.id);
-		};
-	});
-	
-	app.controller('InputOperationCtrl', function($scope, $http, $stateParams, $rootScope, toaster, Ring, PurcOrderItem, Online){
-		var getOrder = function(code) {//根据路径中的id号获取对应的单据
-			var result = null;
-			angular.forEach($rootScope.orders, function(value, key){
-				if(value.id == code) {
-					result = value;
-					return result;
-				}
-			});
-			return result;
-		};
-		
-		var containsProduct = function(id) {//判断物料Id是否包含于当前单据
-			var result = null;
-			angular.forEach($scope.order.orderItems, function(value, key){
-				if(value.product.id == id) {
-					result = value;
-					return result;
-				}
-			});
-			return result;
-		};
-		
-		$scope.order = getOrder($stateParams.code);
-		$scope.getOnline = Online.getOnline;
-		
-		$scope.scan = function(id){//扫描事件
-			$scope.noProduct = false;
-			$scope.overError = false;
-			$scope.operation += 1;
-			var item = containsProduct(id);
-			if(item){//是当前单据中对应的物料
-				item.operation = item.operation || 0;//明细操作数
-				item.opSuccess = item.opSuccess || 0;//明细操作成功数
-				item.opError = item.opError || 0;//明细操作失败数
-				if((item.replyQty||0) < item.qty){
-					item.operation += 1;
-					$scope.selectedId = item.id;//标识对应的明细
-					item.replyQty = item.replyQty || 0;
-					if(Online.getOnline()){//有网络连接
-						//向后台交互
-						PurcOrderItem.reply({orderItemId: item.id}, {delivery: new Date().getTime(), qty: 1, remark: '测试扫描技术'}, 
-						function(data){//请求成功
-							Ring.success();
-							item.replyQty += 1;
-							item.opSuccess += 1;
-						}, function(response){//请求发生错误
-							item.opError += 1;
-							if(response.status == 0) {//无网络错误
-								Ring.success();
-								item.replyQty += 1;
-								Online.setOnline(false);//修改网络状态
-								item.replyCount = item.replyCount || 0;
-								item.replyCount += 1;//添加属性并+1(作为需要上传的标志)
-							} else {//其他错误
-								Ring.error();
-							}
-						});
-					} else {//无网络连接,如无网络错误操作
-						item.replyCount = item.replyCount || 0;
-						item.replyCount += 1;
-					}
-				} else {//不是当前的物料
-					$scope.overError = true;
-				}
-			} else {
-				Ring.error();
-				$scope.selectedId = 0;
-				$scope.noProduct = true;
-			}
-			$scope.productCode = '';
-		};
-		
-		$scope.search = function($event, productCode){
-			if($event.keyCode == 13) {//Enter事件
-				$scope.scan(productCode);
-			}
-		};
-		
-		$scope.pecent = function(numerator, denominator){//输入分母分子获取对应的百分数
-			return ((numerator/denominator).toFixed(2) * 100);
-		};
-		
-		var c = null;
-		
-		$scope.test = function(){//启动测试
-			c = setInterval(function(){
-				$scope.scan(2003262);
-			}, 500);
-		};
-		
-		$scope.stopTest = function(){//停止测试
-			window.clearInterval(c);
-		};
-	});
-	
-	app.controller('UploadCtrl', function($scope, $rootScope, PurcOrderItem, Online){
-		$scope.upLoadItems = [];
-		
-		angular.forEach($rootScope.orders, function(value,key){//先去获取需要上传的Item(明细)
-			angular.forEach(value.orderItems, function(item, key){
-				if(item.replyCount) $scope.upLoadItems.push(item);
-			});
-		});
-		
-		$scope.upload = function(){//一键上传操作
-			$scope.netError = false;
-			angular.forEach($scope.upLoadItems, function(item, key){
-				if(Online.getOnline()) {//判断是否有网
-					item.loading = 'fa fa-spinner fa-spin';//正在上传
-					//上传回复,replyCount作为回复数
-					PurcOrderItem.reply({orderItemId: item.id}, {delivery: new Date().getTime(), qty: item.replyCount, remark: '测试离线后上传'}, 
-					function(data){
-						item.loading = 'fa fa-check-square';//上传成功
-						item.uploadOk = true;
-						item.replyCount = 0;
-					}, function(response){//请求发生错误
-						item.loading = 'fa fa-exclamation-triangle text-danger';//上传失败
-						if(response.status == 0) {//无网络错误
-							Online.setOnline(false);//修改网络状态
-							$scope.netError = true;
-						} else {//其他错误
-							console.log(response.data);
-						}
-					});
-				} else {
-					$scope.netError = true;//断网提示
-					return;
-				}
-			});
-		};
-	});
-	
-	return app;
-});

+ 0 - 35
src/main/webapp/resources/js/index/mobile.storage.main.js

@@ -1,35 +0,0 @@
-require.config({
-	baseUrl : 'static',
-	paths : {
-		'app' : 'js/index',
-		'angular' : 'lib/angular/angular',
-		'ngAnimate': 'lib/angular/angular-animate.min',
-		'toaster' : 'lib/angular/angular-toaster.min',
-		'd3' : 'lib/angular/d3.min',
-		'charts' : 'lib/angular/angular-charts.min',
-		'common' : 'js/common',
-		'service' : 'js/index/services',
-		'ui.router' : 'lib/angular/angular-ui-router.min',
-		'ui.bootstrap' : 'lib/angular/ui-bootstrap-tpls',
-		'ngTable' : 'lib/angular/ng-table',
-		'ngResource' : 'lib/angular/angular-resource.min'
-	},
-	shim : {
-		'angular' : {
-			'exports' : 'angular'
-		},
-		'ngAnimate' : ['angular'],
-		'ngResource' : ['angular'],
-		'toaster' : ['angular', 'ngAnimate'],
-		'charts' : ['angular', 'd3'],
-		'ui.router' : ['angular'],
-		'ui.bootstrap' : [ 'angular' ],
-		'ngTable' : {
-			'exports' : 'ngTable',
-			'deps' : [ 'angular' ]
-		}
-	}
-});
-require([ 'app/mobile.storage.app' ], function(app) {
-	app.init();
-});

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

@@ -121,6 +121,21 @@ define([ 'ngResource' ], function() {
 				isArray: true
 			}
 		});
+	}).factory('PurcAccept', function($resource) {
+		return $resource('sale/accept/:id', {}, {
+		});
+	}).factory('PurcReturn', function($resource) {
+		return $resource('sale/return/:id', {}, {
+		});
+	}).factory('PurcBadIn', function($resource) {
+		return $resource('sale/badIn/:id', {}, {
+		});
+	}).factory('PurcBadOut', function($resource) {
+		return $resource('sale/badOut/:id', {}, {
+		});
+	}).factory('PurcMRB', function($resource) {
+		return $resource('sale/MRB/:id', {}, {
+		});
 	}).factory('PurcOrderItemHis', function($resource) {
 		return $resource('sale/orders/history/items', {}, {
 			getTodo: {