|
|
@@ -2817,31 +2817,27 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
$scope.confirmDelete = function () {
|
|
|
if(deleteMaterial) {
|
|
|
if(selectAll) {
|
|
|
- if(standard_tab == 'standard') {
|
|
|
+
|
|
|
Material.deleteStandardAll({isPerson: 1}, function (data) {
|
|
|
if(data.code != 1) {
|
|
|
toaster.pop('error','错误' ,data.message);
|
|
|
}else {
|
|
|
- toaster.pop('success', '删除成功');
|
|
|
- $scope.deleteModal = false;
|
|
|
- $modalInstance.close(data);
|
|
|
+ Material.deleteUnstandardAll({isPerson: 1}, function (data) {
|
|
|
+ if(data.code != 1) {
|
|
|
+ toaster.pop('error', '错误', data.message);
|
|
|
+ }else {
|
|
|
+ toaster.pop('success', '删除成功');
|
|
|
+ $scope.deleteModal = false;
|
|
|
+ $modalInstance.close(data);
|
|
|
+ }
|
|
|
+ }, function (response) {
|
|
|
+ toaster.pop('error', '错误', response.data);
|
|
|
+ });
|
|
|
}
|
|
|
}, function (response) {
|
|
|
toaster.pop('error', '错误', response.data);
|
|
|
});
|
|
|
- }else {
|
|
|
- Material.deleteUnstandardAll({isPerson: 1}, function (data) {
|
|
|
- if(data.code != 1) {
|
|
|
- toaster.pop('error', '错误', data.message);
|
|
|
- }else {
|
|
|
- toaster.pop('success', '删除成功');
|
|
|
- $scope.deleteModal = false;
|
|
|
- $modalInstance.close(data);
|
|
|
- }
|
|
|
- }, function (response) {
|
|
|
- toaster.pop('error', '错误', response.data);
|
|
|
- });
|
|
|
- }
|
|
|
+
|
|
|
}else {
|
|
|
if(!$scope.ids || $scope.ids.length == 0) {
|
|
|
toaster.pop('warning', '提示','请选择要删除的信息');
|