|
|
@@ -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);
|
|
|
}
|
|
|
;
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
]);
|
|
|
|
|
|
//批量删除信息
|