Browse Source

物料产品库修改完后确认

shenjj 7 years ago
parent
commit
2991b2e09c

+ 20 - 13
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialCtrl.js

@@ -4022,6 +4022,11 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       }
       window.open('vendor#/vendor_storage?storage_tab=outBound&ids=' + ids, '_top')
     }
+    // 物料修改确认按钮
+    $scope.updateMaterialSave = function () {
+      $scope.modifyResult = false
+      loadDataReload()
+    }
   }
   ]);
 
@@ -4030,25 +4035,25 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     $scope.actives = actives;
     $scope.kinds = [[], [], [], []];
     // 获取子类目
-    var getChildren = function(pid, deep) {
+    var getChildren = function (pid, deep) {
       KindAPI.getChildren({
         parentId: pid
-      }, function(data) {
+      }, function (data) {
         $scope.kinds[deep] = data;
-      }, function(response) {
+      }, function (response) {
         toaster.pop('error', '获取子类目失败', response.data);
       });
     };
 
     // 改变节点选中状态
-    var changeStatus = function(item, deep) {
+    var changeStatus = function (item, deep) {
       var actives = []
           , level = 0;
-      angular.forEach($scope.kinds, function(ks, i) {
+      angular.forEach($scope.kinds, function (ks, i) {
         if (i > deep) {
           $scope.kinds[i] = [];
         } else {
-          angular.forEach(ks, function(k, j) {
+          angular.forEach(ks, function (k, j) {
             if (i == deep) {
               if (k.id == item.id) {
                 $scope.kinds[i][j].$active = true;
@@ -4074,7 +4079,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     };
 
     // 节点点击后获取子类目,节点被选中
-    $scope.onItemClick = function(item, deep) {
+    $scope.onItemClick = function (item, deep) {
       changeStatus(item, deep);
       if (!item.isLeaf) {
         getChildren(item.id, deep + 1);
@@ -4096,18 +4101,18 @@ define(['app/app', 'jquery-uploadify'], function(app) {
 
     // 初始加载数据,获取第一层的类目
     if ($scope.actives) {
-      angular.forEach($scope.actives, function(v, k) {
+      angular.forEach($scope.actives, function (v, k) {
         KindAPI.getChildren({
           parentId: v.parentid
-        }, function(data) {
+        }, function (data) {
           $scope.kinds[k] = data;
-          angular.forEach($scope.kinds[k], function(kind, i) {
+          angular.forEach($scope.kinds[k], function (kind, i) {
             if (kind.id == v.id) {
               $scope.kinds[k][i].$active = true;
               $scope.actives[k] = $scope.kinds[k][i];
             }
           })
-        }, function(response) {
+        }, function (response) {
           toaster.pop('error', '获取子类目失败', response.data);
         });
       });
@@ -4116,13 +4121,13 @@ define(['app/app', 'jquery-uploadify'], function(app) {
     }
 
     // 取消
-    $scope.cancel = function() {
+    $scope.cancel = function () {
       $modalInstance.dismiss();
     }
     ;
 
     // 确认选择
-    $scope.check = function() {
+    $scope.check = function () {
       var a = {
         active: $scope.active,
         actives: $scope.actives
@@ -4130,7 +4135,9 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       $modalInstance.close(a);
     }
     ;
+
   }
+
   ]);
 
   //批量删除信息

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/vendor_material.html

@@ -1760,7 +1760,7 @@
 			<p><i class="fa fa-exclamation-circle"></i><span ng-bind="modifyData.success">583</span>个产品修改成功,</p>
 			<h5><span class="red" ng-bind="modifyData.filter">5</span>个产品修改失败!</h5>
 			<div>
-				<a ng-click="modifyResult=false">确定</a>
+				<a ng-click="updateMaterialSave">确定</a>
 				<span ng-if="modifyData.filter" ng-click="downloadExcel()">下载失败列表</span>
 				<form id="load-error" style="display: none;" method="get">
 					<input type="hidden" name="batch" ng-value="modifyData.batch">