|
|
@@ -2412,7 +2412,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
|
|
|
// 复制订单
|
|
|
$scope.copyorder = function(id) {
|
|
|
- console.log(id);
|
|
|
PurchaseOrder.copyorder({id: id}, {}, function(data) {
|
|
|
console.log(data);
|
|
|
if(data.id) {
|
|
|
@@ -12775,7 +12774,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
|
* 购物车
|
|
|
*/
|
|
|
- app.controller('CartController', ['$scope', 'toaster', 'getCartList', 'ngTableParams', '$filter', 'BaseService', 'cartOperation', '$timeout', 'cartList', function($scope, toaster, getCartList, ngTableParams, $filter, BaseService, cartOperation, $timeout, cartList) {
|
|
|
+ app.controller('CartController', ['$scope', 'toaster', 'getCartList', 'ngTableParams', '$filter', 'BaseService', 'cartOperation', '$timeout', 'cartList', 'PurchaseOrder', function($scope, toaster, getCartList, ngTableParams, $filter, BaseService, cartOperation, $timeout, cartList, PurchaseOrder) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
$scope.active = 'all';
|
|
|
$scope.agreedText = '全部';
|
|
|
@@ -12943,6 +12942,18 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
toaster.pop('erroer', '提示', response.data);
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ // 复制订单
|
|
|
+ $scope.copyorder = function(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);
|
|
|
+ });
|
|
|
+ }
|
|
|
}]);
|
|
|
|
|
|
/**
|