|
@@ -2225,8 +2225,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- app.controller('PurcOrderCtrl', ['$scope', '$filter', 'PurcOrderItem', 'PurcOrder', 'ngTableParams', 'toaster', 'ReportService', 'BaseService', '$rootScope',
|
|
|
|
|
- function($scope, $filter, PurcOrderItem, PurcOrder, ngTableParams, toaster, ReportService, BaseService, $rootScope){
|
|
|
|
|
|
|
+ app.controller('PurcOrderCtrl', ['$scope', '$filter', 'PurcOrderItem', 'PurcOrder', 'ngTableParams', 'toaster', 'ReportService', 'BaseService', '$rootScope', 'PurchaseOrder',
|
|
|
|
|
+ function($scope, $filter, PurcOrderItem, PurcOrder, ngTableParams, toaster, ReportService, BaseService, $rootScope, PurchaseOrder){
|
|
|
BaseService.scrollBackToTop();
|
|
BaseService.scrollBackToTop();
|
|
|
if ($rootScope.active) {
|
|
if ($rootScope.active) {
|
|
|
$scope.active = $rootScope.active;
|
|
$scope.active = $rootScope.active;
|
|
@@ -2399,6 +2399,19 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.tableParams.page(1);
|
|
$scope.tableParams.page(1);
|
|
|
$scope.tableParams.reload();
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+ // 复制订单
|
|
|
|
|
+ $scope.copyorder = function(id) {
|
|
|
|
|
+ console.log(id);
|
|
|
|
|
+ PurchaseOrder.copyorder({id: id}, {}, function(data) {
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ if(data.id) {
|
|
|
|
|
+ window.location.hash = "#purc/cart/" + data.id;
|
|
|
|
|
+ }
|
|
|
|
|
+ }, function(response) {
|
|
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}]);
|
|
}]);
|
|
|
|
|
|
|
|
app.controller('PurcOrderDetailCtrl', ['$scope', '$stateParams', 'PurcOrder', 'PurcOrderItem', 'toaster', 'ReportService', function($scope, $stateParams, PurcOrder, PurcOrderItem, toaster, ReportService){
|
|
app.controller('PurcOrderDetailCtrl', ['$scope', '$stateParams', 'PurcOrder', 'PurcOrderItem', 'toaster', 'ReportService', function($scope, $stateParams, PurcOrder, PurcOrderItem, toaster, ReportService){
|
|
@@ -5197,8 +5210,8 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
if($stateParams.id)
|
|
if($stateParams.id)
|
|
|
window.location.reload();
|
|
window.location.reload();
|
|
|
else
|
|
else
|
|
|
-// window.location.hash = '#/sale/quotation/' + data.id;
|
|
|
|
|
- window.location.hash = '#/sale/quotation/list';
|
|
|
|
|
|
|
+ window.location.hash = '#/sale/quotation/' + data.id;
|
|
|
|
|
+// window.location.hash = '#/sale/quotation/list';
|
|
|
}, function(response){
|
|
}, function(response){
|
|
|
$scope.loading = false;
|
|
$scope.loading = false;
|
|
|
toaster.pop('error', '保存失败', response.data);
|
|
toaster.pop('error', '保存失败', response.data);
|
|
@@ -11074,16 +11087,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
toaster.pop('success', '提示', '产品添加成功');
|
|
toaster.pop('success', '提示', '产品添加成功');
|
|
|
$timeout(function() {
|
|
$timeout(function() {
|
|
|
//提交后跳转到详情页面,防止重复提交
|
|
//提交后跳转到详情页面,防止重复提交
|
|
|
-// window.location.href="#/sale/prodList/"+data.id;
|
|
|
|
|
- window.location.href="#/sale/prodList";
|
|
|
|
|
|
|
+ window.location.href="#/sale/prodList/"+data.id;
|
|
|
|
|
+// window.location.href="#/sale/prodList";
|
|
|
}, 500);
|
|
}, 500);
|
|
|
}
|
|
}
|
|
|
if(data.error) {
|
|
if(data.error) {
|
|
|
toaster.pop('error', '提示', data.error);
|
|
toaster.pop('error', '提示', data.error);
|
|
|
$timeout(function() {
|
|
$timeout(function() {
|
|
|
//提交后跳转到详情页面,防止重复提交
|
|
//提交后跳转到详情页面,防止重复提交
|
|
|
-// window.location.href="#/sale/prodList/"+data.id;
|
|
|
|
|
- window.location.href="#/sale/prodList";
|
|
|
|
|
|
|
+ window.location.href="#/sale/prodList/"+data.id;
|
|
|
|
|
+// window.location.href="#/sale/prodList";
|
|
|
}, 500);
|
|
}, 500);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -12964,9 +12977,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
cartOperation.deleteCartDetail({id: id}, {}, function(data) {
|
|
cartOperation.deleteCartDetail({id: id}, {}, function(data) {
|
|
|
if(data.success) {
|
|
if(data.success) {
|
|
|
toaster.pop('success', '提示', data.success);
|
|
toaster.pop('success', '提示', data.success);
|
|
|
- $timeout(function() {
|
|
|
|
|
- window.location.reload();
|
|
|
|
|
- },500);
|
|
|
|
|
|
|
+ loadData();
|
|
|
}
|
|
}
|
|
|
if(data.error) {
|
|
if(data.error) {
|
|
|
toaster.pop('error', '提示', data.error);
|
|
toaster.pop('error', '提示', data.error);
|
|
@@ -18020,16 +18031,16 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
toaster.pop('success', '提示', data.success);
|
|
toaster.pop('success', '提示', data.success);
|
|
|
$timeout(function() {
|
|
$timeout(function() {
|
|
|
//提交后跳转到详情页面,防止重复提交
|
|
//提交后跳转到详情页面,防止重复提交
|
|
|
-// window.location.href="#/sale/prodList/"+data.id;
|
|
|
|
|
- window.location.href="#/purc/product";
|
|
|
|
|
|
|
+ window.location.href="#/purc/prodList/"+data.id;
|
|
|
|
|
+// window.location.href="#/purc/product";
|
|
|
}, 500);
|
|
}, 500);
|
|
|
}
|
|
}
|
|
|
if(data.error) {
|
|
if(data.error) {
|
|
|
toaster.pop('error', '提示', data.error);
|
|
toaster.pop('error', '提示', data.error);
|
|
|
$timeout(function() {
|
|
$timeout(function() {
|
|
|
//提交后跳转到详情页面,防止重复提交
|
|
//提交后跳转到详情页面,防止重复提交
|
|
|
-// window.location.href="#/sale/prodList/"+data.id;
|
|
|
|
|
- window.location.href="#/purc/product";
|
|
|
|
|
|
|
+ window.location.href="#/purc/prodList/"+data.id;
|
|
|
|
|
+// window.location.href="#/purc/product";
|
|
|
}, 500);
|
|
}, 500);
|
|
|
}
|
|
}
|
|
|
|
|
|