|
|
@@ -4,7 +4,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
$rootScope.active = 'vendor_material';
|
|
|
document.title = '卖家产品库-优软商城';
|
|
|
$scope.tab = 'material';
|
|
|
- $scope.standard_tab = $stateParams.standardParam ? $stateParams.standardParam : 'unstandard';
|
|
|
+ // $scope.standard_tab = $stateParams.standardParam ? $stateParams.standardParam : 'unstandard';
|
|
|
$scope.choosedIds = [];
|
|
|
$scope.showTip = true;
|
|
|
$scope.resultTip = true;
|
|
|
@@ -264,24 +264,23 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
* 切换标准/非标准
|
|
|
* @param isStandard
|
|
|
*/
|
|
|
- $scope.toggleStandard = function(isStandard) {
|
|
|
- if ($scope.standard_tab == 'matchResult') {
|
|
|
- $scope.lastMaterial = $scope.currenctMaterial;
|
|
|
- }
|
|
|
- $scope.standard_tab = isStandard;
|
|
|
- $scope.param.keyword = '';
|
|
|
- if ($scope.chooseAllPage) {
|
|
|
- $scope.chooseAllPage = false;
|
|
|
- }
|
|
|
- if (isStandard == 'standard')
|
|
|
- $scope.param.type = "standard";
|
|
|
- if (isStandard == 'unstandard')
|
|
|
- $scope.param.type = "nStandard";
|
|
|
- $scope.isBatch = false;
|
|
|
- $scope.param.count = 10;
|
|
|
- loadDataReload();
|
|
|
- }
|
|
|
- ;
|
|
|
+ // $scope.toggleStandard = function(isStandard) {
|
|
|
+ // if ($scope.standard_tab == 'matchResult') {
|
|
|
+ // $scope.lastMaterial = $scope.currenctMaterial;
|
|
|
+ // }
|
|
|
+ // $scope.standard_tab = isStandard;
|
|
|
+ // $scope.param.keyword = '';
|
|
|
+ // if ($scope.chooseAllPage) {
|
|
|
+ // $scope.chooseAllPage = false;
|
|
|
+ // }
|
|
|
+ // if (isStandard == 'standard')
|
|
|
+ // $scope.param.type = "standard";
|
|
|
+ // if (isStandard == 'unstandard')
|
|
|
+ // $scope.param.type = "nStandard";
|
|
|
+ // $scope.isBatch = false;
|
|
|
+ // $scope.param.count = 10;
|
|
|
+ // loadDataReload();
|
|
|
+ // };
|
|
|
|
|
|
var updateTagCount = function(item) {
|
|
|
Material.getCountOfProduct(item, {}, function(data) {
|
|
|
@@ -542,9 +541,9 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
selectAll: function() {
|
|
|
return $scope.chooseAllPage;
|
|
|
},
|
|
|
- standard_tab: function() {
|
|
|
- return $scope.standard_tab;
|
|
|
- },
|
|
|
+ // standard_tab: function() {
|
|
|
+ // return $scope.standard_tab;
|
|
|
+ // },
|
|
|
message: function() {
|
|
|
return $scope.$$nonProduct.deleteMessage;
|
|
|
},
|
|
|
@@ -794,7 +793,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
$scope.repeatList = data.data.repeatList;
|
|
|
$scope.haveRepeat = true;
|
|
|
// loadData();
|
|
|
- $scope.standard_tab = 'matchResult';
|
|
|
+ // $scope.standard_tab = 'matchResult';
|
|
|
} else {
|
|
|
$scope.haveRepeat = false;
|
|
|
$scope.matchSuccess = $scope.matchSuccess + 1;
|
|
|
@@ -903,34 +902,30 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
$scope.$$nonProduct.count = count;
|
|
|
$scope.param.count = $scope.$$nonProduct.count;
|
|
|
loadData();
|
|
|
- }
|
|
|
- ;
|
|
|
+ };
|
|
|
|
|
|
- $scope.toggleTab = function(status) {
|
|
|
- $scope.param.type = 'nStandard';
|
|
|
- $scope.param.count = $scope.$$nonProduct.count;
|
|
|
- if (status == 'matchResult') {
|
|
|
- $scope.currenctMaterial = $scope.lastMaterial;
|
|
|
- $scope.materialAll = {};
|
|
|
- } else {
|
|
|
- loadData();
|
|
|
- }
|
|
|
- $scope.standard_tab = status;
|
|
|
- }
|
|
|
- ;
|
|
|
+ // $scope.toggleTab = function(status) {
|
|
|
+ // $scope.param.type = 'nStandard';
|
|
|
+ // $scope.param.count = $scope.$$nonProduct.count;
|
|
|
+ // if (status == 'matchResult') {
|
|
|
+ // $scope.currenctMaterial = $scope.lastMaterial;
|
|
|
+ // $scope.materialAll = {};
|
|
|
+ // } else {
|
|
|
+ // loadData();
|
|
|
+ // }
|
|
|
+ // $scope.standard_tab = status;
|
|
|
+ // };
|
|
|
|
|
|
- $scope.closeResultFrame = function(status) {
|
|
|
- $scope.standard_tab = status;
|
|
|
- $scope.resultFrame = false;
|
|
|
- $scope.param.type = 'nStandard';
|
|
|
- loadData();
|
|
|
- }
|
|
|
- ;
|
|
|
+ // $scope.closeResultFrame = function(status) {
|
|
|
+ // $scope.standard_tab = status;
|
|
|
+ // $scope.resultFrame = false;
|
|
|
+ // $scope.param.type = 'nStandard';
|
|
|
+ // loadData();
|
|
|
+ // };
|
|
|
|
|
|
$scope.closeTip = function() {
|
|
|
$scope.resultTip = false;
|
|
|
- }
|
|
|
- ;
|
|
|
+ };
|
|
|
|
|
|
var loadSelectedData = function() {
|
|
|
$scope.materialAll = {};
|
|
|
@@ -950,7 +945,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
$scope.matchTotal = data.data.total;
|
|
|
$scope.matchSuccess = data.data.success;
|
|
|
$scope.matchFail = data.data.fail;
|
|
|
- $scope.standard_tab = 'matchResult';
|
|
|
+ // $scope.standard_tab = 'matchResult';
|
|
|
$scope.param.type = "nStandard";
|
|
|
loadData();
|
|
|
} else {
|
|
|
@@ -971,7 +966,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
$scope.matchTotal = data.data.total;
|
|
|
$scope.matchSuccess = data.data.success;
|
|
|
$scope.matchFail = data.data.fail;
|
|
|
- $scope.standard_tab = 'matchResult';
|
|
|
+ // $scope.standard_tab = 'matchResult'
|
|
|
$scope.batch = data.data.batch;
|
|
|
$scope.currenctMaterial = [];
|
|
|
loadSelectedData();
|
|
|
@@ -992,7 +987,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
$scope.matchTotal = data.data.total;
|
|
|
$scope.matchSuccess = data.data.success;
|
|
|
$scope.matchFail = data.data.fail;
|
|
|
- $scope.standard_tab = 'matchResult';
|
|
|
+ // $scope.standard_tab = 'matchResult';
|
|
|
$scope.param.type = "nStandard";
|
|
|
loadData();
|
|
|
} else {
|
|
|
@@ -1504,11 +1499,12 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
|
|
|
var init = function() {
|
|
|
$scope.param.keyword = '';
|
|
|
- if ($scope.standard_tab == 'standard') {
|
|
|
- $scope.param.type = "standard";
|
|
|
- } else if ($scope.standard_tab == 'unstandard') {
|
|
|
- $scope.param.type = "nStandard";
|
|
|
- }
|
|
|
+ // if ($scope.standard_tab == 'standard') {
|
|
|
+ // $scope.param.type = "standard";
|
|
|
+ // } else if ($scope.standard_tab == 'unstandard') {
|
|
|
+ // $scope.param.type = "nStandard";
|
|
|
+ // }
|
|
|
+ $scope.param.type = "all";
|
|
|
$scope.isBatch = false;
|
|
|
$scope.param.count = 10;
|
|
|
};
|
|
|
@@ -4156,7 +4152,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
]);
|
|
|
|
|
|
//批量删除信息
|
|
|
- app.register.controller('vendor_delete_ctrl', ['$scope', 'ids', 'Goods', 'Material', 'toaster', 'deleteMaterial', 'deleteGoods', 'selectAll', 'ProductServiceQuery', 'standard_tab', '$modalInstance', 'message', 'chooseTypePeople', function($scope, ids, Goods, Material, toaster, deleteMaterial, deleteGoods, selectAll, ProductServiceQuery, standard_tab, $modalInstance, message, chooseTypePeople) {
|
|
|
+ app.register.controller('vendor_delete_ctrl', ['$scope', 'ids', 'Goods', 'Material', 'toaster', 'deleteMaterial', 'deleteGoods', 'selectAll', 'ProductServiceQuery', '$modalInstance', 'message', 'chooseTypePeople', function($scope, ids, Goods, Material, toaster, deleteMaterial, deleteGoods, selectAll, ProductServiceQuery, $modalInstance, message, chooseTypePeople) {
|
|
|
$scope.deleteModal = true;
|
|
|
$scope.message = message;
|
|
|
|
|
|
@@ -4166,75 +4162,39 @@ define(['app/app', 'jquery-uploadify'], function(app) {
|
|
|
$scope.confirmDelete = function() {
|
|
|
if (deleteMaterial) {
|
|
|
if (selectAll) {
|
|
|
- if (standard_tab == 'standard') {
|
|
|
- if (chooseTypePeople === 'all') {
|
|
|
- Material.deleteStandardAll(null, null, function (data) {
|
|
|
- if (data.code != 1) {
|
|
|
- toaster.pop('error', '错误', data.message);
|
|
|
- } else {
|
|
|
- toaster.pop('success', '删除成功');
|
|
|
- $scope.deleteModal = false;
|
|
|
- $modalInstance.close(data);
|
|
|
- }
|
|
|
- }, function (response) {
|
|
|
- if (response.data.indexOf('系统') > -1 ){
|
|
|
- toaster.pop('error', '错误',response.data);
|
|
|
- return
|
|
|
- }
|
|
|
- toaster.pop('info', '提示', '信息删除中,请耐心等待!');
|
|
|
- });
|
|
|
- } else {
|
|
|
- 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);
|
|
|
- }
|
|
|
- }, function (response) {
|
|
|
- if (response.data.indexOf('系统') > -1 ){
|
|
|
- toaster.pop('error', '错误',response.data);
|
|
|
- return
|
|
|
- }
|
|
|
- toaster.pop('info', '提示', '信息删除中,请耐心等待!');
|
|
|
- });
|
|
|
- }
|
|
|
- } else {
|
|
|
if (chooseTypePeople === 'all') {
|
|
|
- Material.deleteUnstandardAll(null, null, function (data) {
|
|
|
- if (data.code != 1) {
|
|
|
- toaster.pop('error', '错误', data.message);
|
|
|
- } else {
|
|
|
- toaster.pop('success', '删除成功');
|
|
|
- $scope.deleteModal = false;
|
|
|
- $modalInstance.close(data);
|
|
|
- }
|
|
|
- }, function (response) {
|
|
|
- if (response.data.indexOf('系统') > -1 ){
|
|
|
- toaster.pop('error', '错误',response.data);
|
|
|
- return
|
|
|
- }
|
|
|
- toaster.pop('info', '提示', '信息删除中,请耐心等待!');
|
|
|
- });
|
|
|
+ Material.deleteUnstandardAll({isPerson: 0, type: 'all'}, function (data) {
|
|
|
+ if (data.code != 1) {
|
|
|
+ toaster.pop('error', '错误', data.message);
|
|
|
+ } else {
|
|
|
+ toaster.pop('success', '删除成功');
|
|
|
+ $scope.deleteModal = false;
|
|
|
+ $modalInstance.close(data);
|
|
|
+ }
|
|
|
+ }, function (response) {
|
|
|
+ if (response.data.indexOf('系统') > -1 ){
|
|
|
+ toaster.pop('error', '错误',response.data);
|
|
|
+ return
|
|
|
+ }
|
|
|
+ toaster.pop('info', '提示', '信息删除中,请耐心等待!');
|
|
|
+ });
|
|
|
} 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) {
|
|
|
- if (response.data.indexOf('系统') > -1 ){
|
|
|
- toaster.pop('error', '错误',response.data);
|
|
|
- return
|
|
|
- }
|
|
|
- toaster.pop('info', '提示', '信息删除中,请耐心等待!');
|
|
|
- });
|
|
|
+ Material.deleteUnstandardAll({isPerson: 1, type: 'all'}, function (data) {
|
|
|
+ if (data.code != 1) {
|
|
|
+ toaster.pop('error', '错误', data.message);
|
|
|
+ } else {
|
|
|
+ toaster.pop('success', '删除成功');
|
|
|
+ $scope.deleteModal = false;
|
|
|
+ $modalInstance.close(data);
|
|
|
+ }
|
|
|
+ }, function (response) {
|
|
|
+ if (response.data.indexOf('系统') > -1 ){
|
|
|
+ toaster.pop('error', '错误',response.data);
|
|
|
+ returns
|
|
|
+ }
|
|
|
+ toaster.pop('info', '提示', '信息删除中,请耐心等待!');
|
|
|
+ });
|
|
|
}
|
|
|
- }
|
|
|
} else {
|
|
|
if (!$scope.ids || $scope.ids.length == 0) {
|
|
|
toaster.pop('warning', '提示', '请选择要删除的信息');
|