Просмотр исходного кода

增加订单复制功能

git-svn-id: svn+ssh://10.10.101.21/source/platform/platform-b2b@10182 f3bf4e98-0cf0-11e4-a00c-a99a8b9d557d
hejq 8 лет назад
Родитель
Сommit
d15b77cd1a

+ 13 - 2
src/main/webapp/resources/js/index/app.js

@@ -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);
+  			});
+  		}
 	}]);
 	
 	/**

+ 1 - 1
src/main/webapp/resources/tpl/index/purc/cart_detail.html

@@ -86,7 +86,7 @@
 							<span> 
 								<select class="select01" ng-model="order.vendor"
 									ng-options="(contact.venduser + '' + contact.tel) for contact in contacts">
-										<option value="">{{order.venduser}}</option>
+										<option value="">{{order.venduser}}{{order.vendusertel}}</option>
 								</select> 
 								<a class="add-address" ng-if="order.vendUU != null" ng-click="addContact(venduu)">+增加联系人</a>
 							</span>