|
|
@@ -10849,12 +10849,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
orderamount: 0,
|
|
|
usdpayment: 0
|
|
|
};
|
|
|
- // 费率
|
|
|
- DeputyOrder.vendorRate({}, function(data) {
|
|
|
- $scope.rate = data;
|
|
|
- }, function(response){
|
|
|
-
|
|
|
- });
|
|
|
|
|
|
$scope.deOrder.deputyOrderItems = [];
|
|
|
var item = {
|
|
|
@@ -10866,12 +10860,47 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
remark: null,
|
|
|
orderprice: null,
|
|
|
};
|
|
|
+ $scope.deOrder.deputyOrderItems.push(item);
|
|
|
+
|
|
|
// 代采企业列表
|
|
|
DeputyOrder.deputyEnterprise({}, function(data) {
|
|
|
$scope.deputyEnterprises = data;
|
|
|
$scope.deOrder.deputyuu = $scope.deputyEnterprises[0].deputyEnterprise.uu;
|
|
|
+ // 费率
|
|
|
+ DeputyOrder.vendorRate( {enuu: $scope.deOrder.deputyuu}, {}, function(data) {
|
|
|
+ $scope.rate = data;
|
|
|
+ }, function(response){
|
|
|
+
|
|
|
+ });
|
|
|
});
|
|
|
- $scope.deOrder.deputyOrderItems.push(item);
|
|
|
+
|
|
|
+ // 更新代采企业时更新费率
|
|
|
+ $scope.change = function(deputyuu) {
|
|
|
+ // 费率
|
|
|
+ DeputyOrder.vendorRate( {enuu: deputyuu}, {}, function(data) {
|
|
|
+ $scope.rate = data;
|
|
|
+ }, function(response){
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 查找付款企业
|
|
|
+ $scope.dbfindPayCompany = function(deputyuu) {
|
|
|
+ var modalInstance = $modal.open({
|
|
|
+ templateUrl: 'static/tpl/index/purc/modal/payCompany.html',
|
|
|
+ controller: 'DbfindDeputyPayCompanyCtrl',
|
|
|
+ size: 'lg',
|
|
|
+ resolve: {
|
|
|
+ deputyuu: function() {return deputyuu}
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ modalInstance.result.then(function(data) {
|
|
|
+ $scope.deOrder.paymentcomenname = data.enname;
|
|
|
+ $scope.deOrder.paycomaddress = data.address;
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
//增加商品
|
|
|
$scope.add = function(index) {
|
|
|
if($scope.deOrder.deputyOrderItems[index].prodcode == null) {
|
|
|
@@ -10932,7 +10961,6 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
});
|
|
|
|
|
|
modalInstance.result.then(function(data) {
|
|
|
- console.log(data);
|
|
|
$scope.deOrder.customer = data.vendorEnterprise.enName;
|
|
|
$scope.deOrder.legalrepresent = data.vendorUser.userName;
|
|
|
$scope.deOrder.enaddress = data.vendorEnterprise.enAddress;
|
|
|
@@ -11035,6 +11063,26 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$modalInstance.close(vendor);
|
|
|
}
|
|
|
}]);
|
|
|
+
|
|
|
+ // 代采企业付款企业
|
|
|
+ app.controller('DbfindDeputyPayCompanyCtrl', ['$scope', 'toaster', '$upload', '$modalInstance', 'deputyuu', 'DeputyOrder', 'BaseService', 'ngTableParams', function($scope, toaster, $upload, $modalInstance, deputyuu, DeputyOrder, BaseService, ngTableParams) {
|
|
|
+ $scope.prod = false;
|
|
|
+ BaseService.scrollBackToTop();
|
|
|
+ DeputyOrder.paycompanys({enuu: deputyuu}, {}, function(data) {
|
|
|
+ $scope.paycompanys = data;
|
|
|
+ }, function(response) {
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
+ });
|
|
|
+
|
|
|
+ $scope.cancel = function() {
|
|
|
+ $modalInstance.dismiss();
|
|
|
+ };
|
|
|
+
|
|
|
+ $scope.checkVendor = function(company) { // 直接选择
|
|
|
+ $modalInstance.close(company);
|
|
|
+ }
|
|
|
+ }]);
|
|
|
+
|
|
|
/**
|
|
|
* 代采订单批量导入
|
|
|
*/
|
|
|
@@ -11101,8 +11149,41 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
DeputyOrder.deputyEnterprise({}, function(data) {
|
|
|
$scope.deputyEnterprises = data;
|
|
|
$scope.deOrder.deputyuu = $scope.deputyEnterprises[0].deputyEnterprise.uu;
|
|
|
+ // 费率
|
|
|
+ DeputyOrder.vendorRate( {enuu: $scope.deOrder.deputyuu}, {}, function(data) {
|
|
|
+ $scope.rate = data;
|
|
|
+ }, function(response){
|
|
|
+
|
|
|
+ });
|
|
|
});
|
|
|
|
|
|
+ // 更新代采企业时更新费率
|
|
|
+ $scope.change = function(deputyuu) {
|
|
|
+ // 费率
|
|
|
+ DeputyOrder.vendorRate( {enuu: deputyuu}, {}, function(data) {
|
|
|
+ $scope.rate = data;
|
|
|
+ }, function(response){
|
|
|
+
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 查找付款企业
|
|
|
+ $scope.dbfindPayCompany = function(deputyuu) {
|
|
|
+ var modalInstance = $modal.open({
|
|
|
+ templateUrl: 'static/tpl/index/purc/modal/payCompany.html',
|
|
|
+ controller: 'DbfindDeputyPayCompanyCtrl',
|
|
|
+ size: 'lg',
|
|
|
+ resolve: {
|
|
|
+ deputyuu: function() {return deputyuu}
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ modalInstance.result.then(function(data) {
|
|
|
+ $scope.deOrder.paymentcomenname = data.enname;
|
|
|
+ $scope.deOrder.paycomaddress = data.address;
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
var getService = function() {
|
|
|
return DeputyOrder.getProdList;
|
|
|
};
|