|
|
@@ -13620,9 +13620,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if (newvalue == '' || newvalue == null) {
|
|
|
toaster.pop('error', '提示', '修改的值不能为空');
|
|
|
} else {
|
|
|
+ $scope.loading = true;
|
|
|
Products.alterByBatch({parameter: $scope.parameter}, {}, function (data) {
|
|
|
+ $scope.loading = false;
|
|
|
$modalInstance.close(data);
|
|
|
}, function (response) {
|
|
|
+ $scope.loading = false;
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
}
|
|
|
@@ -21272,7 +21275,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 开启销售
|
|
|
$scope.unlock = function (id) {
|
|
|
+ $scope.loading = true;
|
|
|
Products.unlock({id: id}, {}, function (data) {
|
|
|
+ $scope.loading = false;
|
|
|
toaster.pop('success', '提示', '操作成功');
|
|
|
$scope.tableParams.reload();
|
|
|
}, function (response) {
|
|
|
@@ -21282,7 +21287,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 关闭销售
|
|
|
$scope.lock = function (id) {
|
|
|
+ $scope.loading = true;
|
|
|
Products.lock({id: id}, {}, function (data) {
|
|
|
+ $scope.loading = false;
|
|
|
toaster.pop('success', '提示', '操作成功');
|
|
|
$scope.tableParams.reload();
|
|
|
}, function (response) {
|
|
|
@@ -21292,7 +21299,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 开启购买
|
|
|
$scope.unlockPurc = function (id) {
|
|
|
+ $scope.loading = true;
|
|
|
Products.unlockPurc({id: id}, {}, function (data) {
|
|
|
+ $scope.loading = false;
|
|
|
toaster.pop('success', '提示', '操作成功');
|
|
|
$scope.tableParams.reload();
|
|
|
}, function (response) {
|
|
|
@@ -21302,7 +21311,9 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 关闭购买
|
|
|
$scope.lockPurc = function (id) {
|
|
|
+ $scope.loading = true;
|
|
|
Products.lockPurc({id: id}, {}, function (data) {
|
|
|
+ $scope.loading = false;
|
|
|
toaster.pop('success', '提示', '操作成功');
|
|
|
$scope.tableParams.reload();
|
|
|
}, function (response) {
|
|
|
@@ -21414,9 +21425,12 @@ define(['toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 转入我的产品库
|
|
|
$scope.addtoUser = function(id) {
|
|
|
+ $scope.loading = true;
|
|
|
prodUser.coverToUser({id: id}, {}, function(data) {
|
|
|
+ $scope.loading = false;
|
|
|
toaster.pop('success', '提示', '转入成功');
|
|
|
}, function(res) {
|
|
|
+ $scope.loading = false;
|
|
|
toaster.pop('error', '提示', '转入失败');
|
|
|
});
|
|
|
}
|