|
|
@@ -1688,6 +1688,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
toaster.pop('error', '您不是管理员,无权限分配用户!');
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ $scope.Quotation = function(uu, id) {
|
|
|
+ $rootScope.custuu = uu;
|
|
|
+ $rootScope.prodId = id;
|
|
|
+ window.location.hash = "#/sale/quotation/new";
|
|
|
+ }
|
|
|
}]);
|
|
|
|
|
|
app.controller('AddUserInfoCtrl', ['$scope', '$modalInstance', 'customer', 'AccountUser', 'toaster', function($scope, $modalInstance, customer, AccountUser, toaster){
|
|
|
@@ -3628,7 +3634,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
}]);
|
|
|
|
|
|
// Controller 主动报价 - 新增
|
|
|
- app.controller('SaleQuotationNewCtrl', ['$scope', '$stateParams', '$filter', 'ngTableParams', 'toaster', 'BaseService', '$modal', 'Quotation', function($scope, $stateParams, $filter, ngTableParams, toaster, BaseService, $modal, Quotation){
|
|
|
+ app.controller('SaleQuotationNewCtrl', ['$scope', '$stateParams', '$filter', 'ngTableParams', 'toaster', 'BaseService', '$modal', 'Quotation', 'VendorInfo', '$rootScope', function($scope, $stateParams, $filter, ngTableParams, toaster, BaseService, $modal, Quotation, VendorInfo, $rootScope){
|
|
|
BaseService.scrollBackToTop();
|
|
|
var staticItem = null;
|
|
|
|
|
|
@@ -3704,6 +3710,26 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+ // 赋值客户信息
|
|
|
+ if($rootScope.custuu) {
|
|
|
+ VendorInfo.customerInfo({custuu: $rootScope.custuu}, {}, function(data) {
|
|
|
+ $scope.item.quotation.cust = data.myEnterprise;
|
|
|
+ $scope.item.quotation.custUser = data.myUser;
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ // 赋值物料信息
|
|
|
+ if($rootScope.prodId) {
|
|
|
+ VendorInfo.getProdInfo({id: $rootScope.prodId}, {}, function(data) {
|
|
|
+ $scope.item.product.code = data.code;
|
|
|
+ $scope.item.product.title = data.title;
|
|
|
+ $scope.item.product.spec = data.spec;
|
|
|
+ $scope.item.product.unit = data.unit;
|
|
|
+ $scope.item.product.id = data.id;
|
|
|
+ }, function(response) {
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
// 查找客户物料
|
|
|
$scope.dbfindCustProd = function(){
|
|
|
if($scope.item.$editing) {
|