Browse Source

送样单信息

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@694 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
suntg 11 years ago
parent
commit
96601268de

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

@@ -879,7 +879,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 			page : 1, 
 			count : 5,
 			sorting: {
-				proofingDelivery: 'desc'
+				proofingDate: 'desc'
             }
 		}, {
 			total : 0, 
@@ -919,6 +919,23 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 				
 			});
 		}
+		
+		$scope.getSend = function(proofing){
+			if( !proofing.send) {
+				proofing.getSendInfo = '加载中...';
+				PurcSample.getSend({id: proofing.id}, function(data){
+					if(data) {
+						proofing.getSendInfo = null;
+						proofing.send = data;
+					} else {
+						proofing.getSendInfo = '无送样信息';
+						proofing.send = '无送样信息';
+					}
+				}, function(response){
+					proofing.getSendInfo = '加载失败!';
+				});
+			}
+		};
 	});
 	
 	app.controller('SampleSendCtrl', function($scope, $modalInstance, sampleItem, PurcSample, $upload, toaster){

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

@@ -142,10 +142,10 @@ define([ 'ngResource'], function() {
 	}).factory('PurcApBill', function($resource) {
 		return $resource('sale/apBill/:id', {}, {
 		});
-	}).factory('PurcSample', function($resource, $upload) {
+	}).factory('PurcSample', function($resource) {
 		return $resource('sale/sample/:id', {}, {
 			getSend: {
-				url: 'sale/sample/:id/getSend',
+				url: 'sale/sample/:id/send',
 				method: 'GET',
 				params: {
 					id: 'id'