Browse Source

Merge remote-tracking branch 'origin/release-201840-wangcz' into release-201840-wangcz

yuj 7 years ago
parent
commit
303904dbd5
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/main/webapp/resources/js/common/controllers/b2bCommonCtrls.js

+ 5 - 0
src/main/webapp/resources/js/common/controllers/b2bCommonCtrls.js

@@ -76,6 +76,10 @@ define([ 'app/app' ], function(app) {
         $scope.result = null;
         $scope.loading = false;
         $scope.upload = function () {
+            if (!$scope.myFiles) {
+                toaster.pop('info', '提示', '请先选择文件上传!');
+                return;
+            }
             $scope.loading = true;
             var file = $scope.myFiles[0];
             $upload.upload({
@@ -88,6 +92,7 @@ define([ 'app/app' ], function(app) {
                 $scope.success = $scope.result.success;
                 $scope.total = $scope.result.total;
                 $scope.alters = $scope.result.alters;
+                toaster.pop('success', '成功', '文件上传成功!');
             }).error(function (response) {
                 $scope.loading = false;
                 toaster.pop('error', response.data || response);