|
|
@@ -10081,6 +10081,20 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.previewShow = false;
|
|
|
}
|
|
|
|
|
|
+ //删除
|
|
|
+ $scope.deleteById = function(id) {
|
|
|
+ GetProductInfo.deleteById({id: id}, function(data) {
|
|
|
+ if(data.error) {
|
|
|
+ toaster.pop("error", "提示", data.error);
|
|
|
+ } else {
|
|
|
+ toaster.pop("success", "提示", "删除成功");
|
|
|
+ window.location.href = "#/sale/prodList";
|
|
|
+ }
|
|
|
+ }), function(response) {
|
|
|
+ toaster.pop("error", "删除失败", response.data);
|
|
|
+ };
|
|
|
+ };
|
|
|
+
|
|
|
$scope.submit = function(prodInfo) {
|
|
|
$scope.prodInfo.isSale = 1;
|
|
|
var file = $scope.myFiles, file = file && file.length > 0 ? file[0] : null;// 可以不传附件
|
|
|
@@ -15845,6 +15859,20 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.previewShow = false;
|
|
|
}
|
|
|
|
|
|
+ //删除
|
|
|
+ $scope.deleteById = function(id) {
|
|
|
+ GetProductInfo.deleteById({id: id}, function(data) {
|
|
|
+ if(data.error) {
|
|
|
+ toaster.pop("error", "提示", data.error);
|
|
|
+ } else {
|
|
|
+ toaster.pop("success", "提示", "删除成功");
|
|
|
+ window.location.href = "#/purc/prodList";
|
|
|
+ }
|
|
|
+ }), function(response) {
|
|
|
+ toaster.pop("error", "删除失败", response.data);
|
|
|
+ };
|
|
|
+ }
|
|
|
+
|
|
|
$scope.submit = function(prodInfo) {
|
|
|
$scope.prodInfo.isPurchase = 1;
|
|
|
var file = $scope.myFiles, file = file && file.length > 0 ? file[0] : null;// 可以不传附件
|