|
|
@@ -152,11 +152,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
templateUrl : "static/tpl/index/purc/vendor_detail.html",
|
|
|
controller : 'PurcVendorDetailCtrl'
|
|
|
/* 客户指定招标列表 */
|
|
|
- }).state('sale.makeoutorder', {
|
|
|
+ }).state('purc.makeoutorder', {
|
|
|
url : "/makeoutorder",
|
|
|
templateUrl : "static/tpl/index/make/outorder.html",
|
|
|
controller: 'MakeOutOrderCtrl'
|
|
|
- }).state('sale.outorder_detail', {
|
|
|
+ }).state('purc.outorder_detail', {
|
|
|
url : "/makeoutorder/:id",
|
|
|
templateUrl : "static/tpl/index/make/outorder_detail.html",
|
|
|
controller: 'MakeOutOrderDetailCtrl'
|
|
|
@@ -357,6 +357,14 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
url : "/makereturns",
|
|
|
templateUrl : "static/tpl/index/make/returns.html",
|
|
|
controller: 'MakeReturnCtrl'
|
|
|
+ }).state('sale.makechange', {
|
|
|
+ url : "/makechange",
|
|
|
+ templateUrl : "static/tpl/index/make/change.html",
|
|
|
+ controller: 'MakeChangeCtrl'
|
|
|
+ }).state('sale.makechange_detail', {
|
|
|
+ url : "/makechange/:id",
|
|
|
+ templateUrl : "static/tpl/index/make/change_detail.html",
|
|
|
+ controller: 'MakeChangeDetailCtrl'
|
|
|
}).state('account', {
|
|
|
url : "/account",
|
|
|
views : {
|
|
|
@@ -496,14 +504,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
}).state('make.home', {
|
|
|
url : "/",
|
|
|
templateUrl : "static/tpl/index/make/index.html"
|
|
|
- }).state('make.change', {
|
|
|
- url : "/change",
|
|
|
- templateUrl : "static/tpl/index/make/change.html",
|
|
|
- controller: 'MakeChangeCtrl'
|
|
|
- }).state('make.change_detail', {
|
|
|
- url : "/change/:id",
|
|
|
- templateUrl : "static/tpl/index/make/change_detail.html",
|
|
|
- controller: 'MakeChangeDetailCtrl'
|
|
|
}).state('cs', {// 客户服务
|
|
|
url : "/cs",
|
|
|
views : {
|
|
|
@@ -8402,8 +8402,10 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
});
|
|
|
|
|
|
// 查看供应商详情
|
|
|
- $scope.VendorDetail = function(id) {
|
|
|
- console.log(id);
|
|
|
+ $scope.VendorDetail = function(id, uu) {
|
|
|
+ $rootScope.vendorId = id;
|
|
|
+ $rootScope.vendoruu = uu;
|
|
|
+ window.location.hash = "#/purc/vendor/"+$rootScope.vendorId;
|
|
|
}
|
|
|
|
|
|
// 向企业购买
|
|
|
@@ -8418,7 +8420,7 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
/**
|
|
|
* 供应商详情
|
|
|
*/
|
|
|
- app.controller('PurcVendorDetailCtrl', ['$scope', 'toaster', '$stateParams', 'Vendor', '$modal', function($scope, toaster, $stateParams, Vendor, $modal) {
|
|
|
+ app.controller('PurcVendorDetailCtrl', ['$scope', 'toaster', '$stateParams', 'Vendor', '$modal', 'Product', 'ngTableParams', 'BaseService', '$rootScope', function($scope, toaster, $stateParams, Vendor, $modal, Product, ngTableParams, BaseService, $rootScope) {
|
|
|
$scope.vendorContacts = [];
|
|
|
var loadData = function() {
|
|
|
Vendor.getVendorDetail({id: $stateParams.id}, {}, function(data) {
|
|
|
@@ -8428,6 +8430,7 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
+ loadData();
|
|
|
|
|
|
// 新增供应商联系人
|
|
|
$scope.addContact = function(uu) {
|
|
|
@@ -8481,7 +8484,34 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
|
}
|
|
|
- loadData();
|
|
|
+
|
|
|
+ // 供应商物料信息
|
|
|
+ $scope.tableParams = new ngTableParams({
|
|
|
+ page : 1,
|
|
|
+ count : 10
|
|
|
+ }, {
|
|
|
+ total : 0,
|
|
|
+ counts: [5, 10, 25, 50],
|
|
|
+ getData : function($defer, params) {
|
|
|
+ $scope.loading = true;
|
|
|
+ var pageParams = params.url();
|
|
|
+ pageParams.custUU = $scope.uu;
|
|
|
+ pageParams.keyword = $scope.keyword;
|
|
|
+ $scope.tip = $scope.keyword;
|
|
|
+ Product.get.call(null, BaseService.parseParams(pageParams), function(page){
|
|
|
+ $scope.loading = false;
|
|
|
+ if(page) {
|
|
|
+ params.total(page.totalElement);
|
|
|
+ $scope.total = page.totalElement;
|
|
|
+ $defer.resolve(page.content);
|
|
|
+ $scope.keywordXls = angular.copy($scope.keyword);//保存当前取值的关键词
|
|
|
+ }
|
|
|
+ }, function(response){
|
|
|
+ $scope.loading = false;
|
|
|
+ toaster.pop('error', '数据加载失败', response.data);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
}]);
|
|
|
|
|
|
/**
|