|
|
@@ -7945,7 +7945,7 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
/**
|
|
|
* 新增采购单
|
|
|
*/
|
|
|
- app.controller('PurcNewOrderCtrl',['$scope', '$modal', 'toaster', '$filter', 'addtoCart', '$rootScope', 'VendorInfo', 'ngTableParams', 'BaseService', 'Product', 'newPurcOrder', 'cartOperation', 'ShipAddress', 'Vendor', function($scope, $modal, toaster, $filter, addtoCart, $rootScope, VendorInfo, ngTableParams, BaseService, Product, newPurcOrder, cartOperation, ShipAddress, Vendor) {
|
|
|
+ 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) {
|
|
|
|
|
|
// 获取收货地址列表
|
|
|
ShipAddress.shipAddList({}, function(data) {
|
|
|
@@ -7953,6 +7953,12 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
$scope.order.shipadd = $scope.ships[0];
|
|
|
});
|
|
|
|
|
|
+ // 获取地址信息
|
|
|
+ $http.get('resources/citydata/city.json', {"Accept": "application/json;charset=utf-8", "Accept-Charset":"charset=utf-8"
|
|
|
+ }).then(function(response) {
|
|
|
+ $scope.provinces = response.data;
|
|
|
+ });
|
|
|
+
|
|
|
$scope.order = {
|
|
|
date : new Date(),
|
|
|
cust : {
|
|
|
@@ -8167,7 +8173,6 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
}
|
|
|
}
|
|
|
addtoCart.save({}, $scope.order, function(data){
|
|
|
- console.log($scope.order);
|
|
|
$scope.loading = false;
|
|
|
toaster.pop('success', '成功', '保存成功');
|
|
|
window.location.hash = '#/purc/cart/'+data.id;
|
|
|
@@ -8320,6 +8325,13 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
* 我的供应商
|
|
|
*/
|
|
|
app.controller('PurcVendorCtrl', ['$scope', 'Vendor', 'BaseService','AuthenticationService', 'ngTableParams', '$modal','toaster', '$rootScope', function($scope, Vendor, BaseService, AuthenticationService,ngTableParams,$modal, toaster, $rootScope){
|
|
|
+ // 搜索框回车
|
|
|
+ $scope.onSearch = function(keyword) {
|
|
|
+ $scope.keyword = keyword;
|
|
|
+ $scope.customerParams.page(1);
|
|
|
+ $scope.customerParams.reload();
|
|
|
+ };
|
|
|
+
|
|
|
$scope.customerParams = new ngTableParams({
|
|
|
page : 1,
|
|
|
count : 10
|
|
|
@@ -8328,7 +8340,9 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
counts: [5, 10, 25, 50],
|
|
|
getData : function($defer, params) {
|
|
|
$scope.loading = true;
|
|
|
- Vendor.getVendor(BaseService.parseParams(params.url()), function(page){
|
|
|
+ var pageParams = params.url();
|
|
|
+ pageParams.keyword = $scope.keyword;
|
|
|
+ Vendor.getVendor.call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
$scope.loading = false;
|
|
|
if(page) {
|
|
|
params.total(page.totalElements);
|
|
|
@@ -8353,6 +8367,7 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
$rootScope.businessCode = businessCode;
|
|
|
window.location.hash = "#/purc/addOrder";
|
|
|
}
|
|
|
+
|
|
|
}]);
|
|
|
|
|
|
/**
|