|
|
@@ -22,8 +22,6 @@ define([ 'app/app' ], function(app) {
|
|
|
$state.go('buyer_order');
|
|
|
}
|
|
|
|
|
|
- $scope.purKind = $rootScope.userInfo.enterprises ? false : true;//应付账户的类别, 默认是企业
|
|
|
- $scope.saleKind = false;//应收账户的类别,默认是企业
|
|
|
var ids=SessionService.get("ids");
|
|
|
|
|
|
var page = Number(SessionService.get("page")) || 1;
|
|
|
@@ -169,27 +167,28 @@ define([ 'app/app' ], function(app) {
|
|
|
|
|
|
//根据单选框的状态,提取不同的数据
|
|
|
var getBuyAccount = function() {
|
|
|
- if(!$scope.purKind) {
|
|
|
- bankInfoService.getBuyEnterpriseBank('', function(data) {
|
|
|
- $scope.buyAccountInfos = resolveData(data);
|
|
|
- angular.forEach($scope.buyAccountInfos, function(buyAccountInfo) {
|
|
|
- buyAccountInfo.filterAccount = hideBankFilter(buyAccountInfo.number);
|
|
|
- });
|
|
|
- $scope.buyAccount = getOriginalData($scope.buyAccountInfos);
|
|
|
- }, function(error) {
|
|
|
- toaster.pop('error', '错误', '提取企业账户信息失败');
|
|
|
- });
|
|
|
- }else {
|
|
|
- bankInfoService.getBuyPersonalBank('', function(data) {
|
|
|
- $scope.buyAccountInfos = resolveData(data);
|
|
|
- angular.forEach($scope.buyAccountInfos, function(buyAccountInfo) {
|
|
|
- buyAccountInfo.filterAccount = hideBankFilter(buyAccountInfo.number);
|
|
|
- });
|
|
|
- $scope.buyAccount = getOriginalData($scope.buyAccountInfos);
|
|
|
- }, function(error) {
|
|
|
- toaster.pop('error', '错误', '提取个人账户信息失败');
|
|
|
+ bankInfoService.getBuyEnterpriseBank('', function(data) {
|
|
|
+ $scope.buyAccountInfos = resolveData(data);
|
|
|
+ angular.forEach($scope.buyAccountInfos, function(buyAccountInfo) {
|
|
|
+ buyAccountInfo.filterAccount = hideBankFilter(buyAccountInfo.number);
|
|
|
});
|
|
|
- }
|
|
|
+ $scope.buyAccount = getOriginalData($scope.buyAccountInfos);
|
|
|
+ }, function(error) {
|
|
|
+ toaster.pop('error', '错误', '提取企业账户信息失败');
|
|
|
+ });
|
|
|
+ // if(!$scope.purKind) {
|
|
|
+
|
|
|
+ // }else {
|
|
|
+ // bankInfoService.getBuyPersonalBank('', function(data) {
|
|
|
+ // $scope.buyAccountInfos = resolveData(data);
|
|
|
+ // angular.forEach($scope.buyAccountInfos, function(buyAccountInfo) {
|
|
|
+ // buyAccountInfo.filterAccount = hideBankFilter(buyAccountInfo.number);
|
|
|
+ // });
|
|
|
+ // $scope.buyAccount = getOriginalData($scope.buyAccountInfos);
|
|
|
+ // }, function(error) {
|
|
|
+ // toaster.pop('error', '错误', '提取个人账户信息失败');
|
|
|
+ // });
|
|
|
+ // }
|
|
|
};
|
|
|
|
|
|
//开始时,就获取账户信息
|
|
|
@@ -197,45 +196,46 @@ define([ 'app/app' ], function(app) {
|
|
|
|
|
|
//获取管理平台账户信息
|
|
|
var getSellerAccount = function() {
|
|
|
- if(!$scope.saleKind) {
|
|
|
- bankInfoService.getAdminEnterAccount('', function(data) {
|
|
|
- $scope.saleAccountInfos = resolveData(data);
|
|
|
- angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
|
|
|
- saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
|
|
|
- });
|
|
|
- $scope.saleAccount = getOriginalData($scope.saleAccountInfos);
|
|
|
- }, function(res) {
|
|
|
- toaster.pop('error', '错误', '获取卖家企业账户信息失败');
|
|
|
- });
|
|
|
- }else {
|
|
|
- bankInfoService.getAdminPersAccount('', function(data) {
|
|
|
- $scope.saleAccountInfos = resolveData(data);
|
|
|
- angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
|
|
|
- saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
|
|
|
- });
|
|
|
- $scope.saleAccount = getOriginalData($scope.saleAccountInfos);
|
|
|
- }, function(res) {
|
|
|
- toaster.pop('error', '错误', '获取卖家个人账户信息失败');
|
|
|
+ bankInfoService.getAdminEnterAccount('', function(data) {
|
|
|
+ $scope.saleAccountInfos = resolveData(data);
|
|
|
+ angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
|
|
|
+ saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
|
|
|
});
|
|
|
- }
|
|
|
+ $scope.saleAccount = getOriginalData($scope.saleAccountInfos);
|
|
|
+ }, function(res) {
|
|
|
+ toaster.pop('error', '错误', '获取卖家企业账户信息失败');
|
|
|
+ });
|
|
|
+ // if(!$scope.saleKind) {
|
|
|
+
|
|
|
+ // }else {
|
|
|
+ // bankInfoService.getAdminPersAccount('', function(data) {
|
|
|
+ // $scope.saleAccountInfos = resolveData(data);
|
|
|
+ // angular.forEach($scope.saleAccountInfos, function(saleAccountInfo) {
|
|
|
+ // saleAccountInfo.filterAccount = hideBankFilter(saleAccountInfo.number);
|
|
|
+ // });
|
|
|
+ // $scope.saleAccount = getOriginalData($scope.saleAccountInfos);
|
|
|
+ // }, function(res) {
|
|
|
+ // toaster.pop('error', '错误', '获取卖家个人账户信息失败');
|
|
|
+ // });
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
getSellerAccount();
|
|
|
|
|
|
- $scope.set = function(data, isBuy) {
|
|
|
- if(isBuy) {
|
|
|
- if(!angular.equals($scope.purKind, data)) {
|
|
|
- $scope.purKind = data;
|
|
|
- getBuyAccount();
|
|
|
- }
|
|
|
- }else {
|
|
|
- if(!angular.equals($scope.saleKind, data)) {
|
|
|
- $scope.saleKind = data;
|
|
|
- getSellerAccount();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- };
|
|
|
+ // $scope.set = function(data, isBuy) {
|
|
|
+ // if(isBuy) {
|
|
|
+ // if(!angular.equals($scope.purKind, data)) {
|
|
|
+ // $scope.purKind = data;
|
|
|
+ // getBuyAccount();
|
|
|
+ // }
|
|
|
+ // }else {
|
|
|
+ // if(!angular.equals($scope.saleKind, data)) {
|
|
|
+ // $scope.saleKind = data;
|
|
|
+ // getSellerAccount();
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // };
|
|
|
|
|
|
// 搜索框内容转换成大写
|
|
|
var t;
|
|
|
@@ -393,10 +393,10 @@ define([ 'app/app' ], function(app) {
|
|
|
toaster.pop('info', '提示', '请选择卖家账户');
|
|
|
return ;
|
|
|
}
|
|
|
- if(!$scope.transferTime) {
|
|
|
- toaster.pop('info', '提示', '请选择付款日期');
|
|
|
- return ;
|
|
|
- }
|
|
|
+ // if(!$scope.transferTime) {
|
|
|
+ // toaster.pop('info', '提示', '请选择付款日期');
|
|
|
+ // return ;
|
|
|
+ // }
|
|
|
if(!$scope.imageUrl){
|
|
|
toaster.pop('info', '提示', '请选择付款截图');
|
|
|
return ;
|