|
|
@@ -961,6 +961,11 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
window.location.hash = "#/purc/addOrder";
|
|
|
}
|
|
|
|
|
|
+ $scope.PurcInquiry = function(businessCode, id){
|
|
|
+ $rootScope.prodId = id;
|
|
|
+ window.location.hash = "#/purc/purcinquiry/" + businessCode;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 邀请注册商务平台
|
|
|
*/
|
|
|
@@ -9787,6 +9792,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
item.unit = data.unit;
|
|
|
item.id = data.id;
|
|
|
$scope.order.orderItems.push(item);
|
|
|
+ $rootScope.prodId = null;// 清除掉prodId
|
|
|
}, function(response) {
|
|
|
|
|
|
});
|
|
|
@@ -13627,8 +13633,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
}]);
|
|
|
|
|
|
// 平台新增的询价单(指定一个供应商)
|
|
|
- app.controller('PurcInquiryNewCtrl', ['$scope', 'PurchaseInquiry', 'toaster', 'BaseService', '$upload', '$filter', '$modal', '$rootScope', 'ngTableParams', 'GetProductInfo', '$timeout', '$http', 'ShipAddress', '$stateParams', 'Vendor', 'Product', 'Search', 'ComponentActiveAPI', function($scope, PurchaseInquiry, toaster, BaseService, $upload, $filter, $modal, $rootScope, ngTableParams, GetProductInfo, $timeout, $http, ShipAddress, $stateParams, Vendor, Product, Search, ComponentActiveAPI) {
|
|
|
- BaseService.scrollBackToTop();
|
|
|
+ app.controller('PurcInquiryNewCtrl', ['$scope', 'PurchaseInquiry', 'toaster', 'BaseService', '$upload', '$filter', '$modal', '$rootScope', 'ngTableParams', 'GetProductInfo', '$timeout', '$http', 'ShipAddress', '$stateParams', 'Vendor', 'Product', 'Search', 'ComponentActiveAPI', 'VendorInfo', function($scope, PurchaseInquiry, toaster, BaseService, $upload, $filter, $modal, $rootScope, ngTableParams, GetProductInfo, $timeout, $http, ShipAddress, $stateParams, Vendor, Product, Search, ComponentActiveAPI, VendorInfo) {
|
|
|
$scope.active = 'all';
|
|
|
|
|
|
// 供应商信息
|
|
|
@@ -13872,23 +13877,35 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.inquiry.inquiryItems.push(
|
|
|
{ prodCode: null,
|
|
|
prodTitle: null,
|
|
|
- unit: null,
|
|
|
+ unit: 'PCS',
|
|
|
ibrand: null,
|
|
|
currency: 'RMB',
|
|
|
toDate: null});
|
|
|
};
|
|
|
//删除商品
|
|
|
- $scope.del = function(index) {
|
|
|
- $scope.inquiry.inquiryItems.splice(index, 1);
|
|
|
- };
|
|
|
- //删除商品
|
|
|
$scope.del = function(index) {
|
|
|
$scope.inquiry.inquiryItems.splice(index, 1);
|
|
|
};
|
|
|
|
|
|
+ // 搜索结果询价
|
|
|
+ if($rootScope.prodId) {
|
|
|
+ VendorInfo.getProdInfo({id: $rootScope.prodId}, {}, function(data) {
|
|
|
+ prod.prodCode = data.code;
|
|
|
+ prod.prodTitle = data.title;
|
|
|
+ prod.spec = data.spec;
|
|
|
+ prod.unit = data.unit;
|
|
|
+ prod.productId = data.id;
|
|
|
+ prod.inbrand = data.brand;
|
|
|
+ $scope.inquiry.inquiryItems.push(prod);
|
|
|
+ $rootScope.prodId = null;// 清除掉prodId
|
|
|
+ }, function(response) {
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
$scope.check = function(product) {
|
|
|
$scope.inquiry.inquiryItems.push({prodCode: product.code, prodTitle: product.title, spec: product.spec, unit: product.unit,
|
|
|
- currency: null, toDate: null, productId: product.id});
|
|
|
+ currency: null, toDate: null, productId: product.id, inbrand: product.brand});
|
|
|
}
|
|
|
|
|
|
$scope.getMinDate = function(item) {
|