Pārlūkot izejas kodu

付款给卖家,校验账户修改。

yangc 8 gadi atpakaļ
vecāks
revīzija
1dbbc45f56

+ 8 - 4
src/main/webapp/resources/js/usercenter/controllers/forstore/buyer_transfer_ctrl.js

@@ -402,6 +402,7 @@ define([ 'app/app' ], function(app) {
 			// 平台账户
 			bankInfoService.getAdminEnterAccount('', function(data) {
 				$scope.saleAccountInfos = resolveData(data);
+				console.log($scope.saleAccountInfos);
 				angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
 					saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
 				});
@@ -612,6 +613,9 @@ define([ 'app/app' ], function(app) {
 							return;
 						}
 						imageArray.push($scope.imagesList[i].imageUrl);
+					} else if ($scope.type == "PAIDTOVENDOR" && $scope.imagesList[i].imageUrl == '') {
+						toaster.pop('info','提示','请输入付款金额对应的付款截图');
+						return;
 					}
 				}
 			}
@@ -626,6 +630,9 @@ define([ 'app/app' ], function(app) {
 				toaster.pop('info', '提示', '请选择买家账户');
 				return ;
 			}
+			if ($scope.type == 'PAIDTOVENDOR'){
+				$scope.saleAccount = $scope.salePerAccount;
+			}
 			if(angular.isUndefined($scope.saleAccount)||angular.equals("{}", angular.toJson($scope.saleAccount)) || $scope.saleAccount == null) {
 				toaster.pop('info', '提示', '请选择卖家账户');
 				return ;
@@ -669,10 +676,7 @@ define([ 'app/app' ], function(app) {
 				})
 				transfer.installmentDetailId = installmentDetailId;
 			};
-			if ($scope.type == 'PAIDTOVENDOR'){
-				$scope.saleAccount = $scope.salePerAccount;
-			}
-			// console.log($scope.saleAccount);
+
 			var buyAccount = angular.copy($scope.buyAccount);
 			var saleAccount = angular.copy($scope.saleAccount);
 			delete saleAccount.filterAccount;