Browse Source

确认送样加载中

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@1122 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
suntg 10 years ago
parent
commit
1bbbde320e

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

@@ -1626,6 +1626,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 		
 		//确认送样
 		$scope.ok = function (form) {
+			$scope.loading = true;
 			var files = form.attachFile.$viewValue, file = files && files.length > 0 ? files[0] : null;
 			$upload.upload({
 				url: 'sale/sample/' + $scope.sampleItem.id + '/send',
@@ -1635,8 +1636,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
 					json: $scope.sampleItem.sampleSend
 				}
 			}).success(function(data){
+				$scope.loading = false;
 				$modalInstance.close('success');
 			}).error(function(data){
+				$scope.loading = false;
 				toaster.pop('danger', '错误', data);
 			});
   		};

+ 3 - 0
src/main/webapp/resources/tpl/index/sale/sample.html

@@ -361,6 +361,9 @@
 </table>
 </div>
 	<script type="text/ng-template" id="sendModal.html">
+		<div class="loading in" ng-class="{'in': loading}">
+			<i></i>
+		</div>
         <div class="modal-header">
             <h3 class="modal-title">送样</h3>
         </div>