|
|
@@ -11388,7 +11388,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
/**
|
|
|
* 新增采购单
|
|
|
*/
|
|
|
- app.controller('PurcNewOrderCtrl',['$scope', '$modal', 'toaster', '$filter', 'addtoCart', '$rootScope', 'VendorInfo', 'ngTableParams', 'BaseService', 'Product', 'newPurcOrder', 'cartOperation', 'ShipAddress', 'Vendor', '$http', function($scope, $modal, toaster, $filter, addtoCart, $rootScope, VendorInfo, ngTableParams, BaseService, Product, newPurcOrder, cartOperation, ShipAddress, Vendor, $http) {
|
|
|
+ app.controller('PurcNewOrderCtrl',['$scope', '$modal', 'toaster', '$filter', 'addtoCart', '$rootScope', 'VendorInfo', 'ngTableParams', 'BaseService', 'Product', 'newPurcOrder', 'cartOperation', 'ShipAddress', 'Vendor', '$http', '$window', function($scope, $modal, toaster, $filter, addtoCart, $rootScope, VendorInfo, ngTableParams, BaseService, Product, newPurcOrder, cartOperation, ShipAddress, Vendor, $http, $window) {
|
|
|
BaseService.scrollBackToTop();
|
|
|
// 每次进入时先清除掉rootScope下的venuu
|
|
|
$rootScope.venduu = null;
|
|
|
@@ -11679,6 +11679,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.loading = false;
|
|
|
toaster.pop('success', '成功', '保存成功');
|
|
|
window.location.hash = '#/purc/cart/'+data.id;
|
|
|
+ $window.location.reload();
|
|
|
}, function(response){
|
|
|
$scope.loading = false;
|
|
|
toaster.pop('error', '保存失败', response.data);
|
|
|
@@ -12743,7 +12744,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
return getCartList;
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
+ var getTodoCartCount = function() {
|
|
|
+ cartOperation.getTodoCartCount({}, function(data) {
|
|
|
+ $scope.countTodo = data.cartTodo;
|
|
|
+ });
|
|
|
+ };
|
|
|
+ getTodoCartCount();
|
|
|
$scope.tableParams = new ngTableParams({
|
|
|
page : 1,
|
|
|
count : 20,
|