|
|
@@ -8945,9 +8945,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
id: null,
|
|
|
};
|
|
|
|
|
|
- // 获取供应商列表
|
|
|
- cartOperation.vendorInfo({}, function(data) {
|
|
|
- });
|
|
|
|
|
|
if($rootScope.businessCode) {
|
|
|
VendorInfo.getVendorInfo({businessCode: $rootScope.businessCode}, {}, function(data) {
|
|
|
@@ -8965,7 +8962,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
});
|
|
|
};
|
|
|
|
|
|
- // 查找客户
|
|
|
+ // 查找供应商
|
|
|
$scope.dbfindCust = function(){
|
|
|
var modalInstance = $modal.open({
|
|
|
templateUrl: 'static/tpl/index/purc/modal/purc_order_vendor.html',
|
|
|
@@ -9005,7 +9002,25 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
});
|
|
|
};
|
|
|
|
|
|
-
|
|
|
+ // 联想词 start
|
|
|
+ // 获取供应商
|
|
|
+ $scope.getSimilarVendors = function(value) {
|
|
|
+ console.log(value);
|
|
|
+ if (value) {
|
|
|
+ return Vendor.getSimilarVendors({keyword : value}).$promise.then(function(data) {
|
|
|
+ return data.map(function(item) {
|
|
|
+ return item;
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ $scope.onAssociateCmpClick = function(vendor, order) {
|
|
|
+ $scope.order.cust.uu = vendor.venduu;
|
|
|
+ $rootScope.venduu = $scope.order.cust.uu;
|
|
|
+ }
|
|
|
+ // 联想词 end
|
|
|
+
|
|
|
// $scope.order.orderItems.push(item);
|
|
|
if($rootScope.prodId) {
|
|
|
VendorInfo.getProdInfo({id: $rootScope.prodId}, {}, function(data) {
|