|
|
|
@ -80,6 +80,15 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
"value": "494"
|
|
|
|
|
}
|
|
|
|
|
];
|
|
|
|
|
var removeClientPayDesc = function (items, key) {
|
|
|
|
|
for (var i = 0; i < items.length; i++) {
|
|
|
|
|
var item = items[i];
|
|
|
|
|
if (item.indexOf(key)>=0) {
|
|
|
|
|
items.splice(items.indexOf(item), 1);
|
|
|
|
|
i = i - 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var app = angular.module('partnerManageApp', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch', 'ui.select', 'ngFileUpload']);
|
|
|
|
|
app.config(['$stateProvider', function ($stateProvider) {
|
|
|
|
|
$stateProvider.state('partners', {
|
|
|
|
@ -383,14 +392,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
var resetClientPayDescByTpey = function (type) {
|
|
|
|
|
type = parseInt(type);
|
|
|
|
|
if (type == 1) {
|
|
|
|
|
while (parseInt($scope.partner.client_pay_desc[0]) < 6) {
|
|
|
|
|
$scope.partner.client_pay_desc.splice(0, 1);
|
|
|
|
|
}
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc, '10');
|
|
|
|
|
}
|
|
|
|
|
if (type == 2) {
|
|
|
|
|
while (parseInt($scope.partner.client_pay_desc[$scope.partner.client_pay_desc.length-1]) > 5) {
|
|
|
|
|
$scope.partner.client_pay_desc.splice($scope.partner.client_pay_desc.length-1, 1);
|
|
|
|
|
}
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc, '20');
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -424,6 +429,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
var $idx = $scope.partner.client_pay_desc.indexOf(type);
|
|
|
|
|
if ($idx >= 0) {
|
|
|
|
|
if (type == '203') {
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc,'2030')
|
|
|
|
|
}
|
|
|
|
|
$scope.partner.client_pay_desc.splice($idx, 1);
|
|
|
|
|
} else {
|
|
|
|
|
$scope.partner.client_pay_desc.push(type);
|
|
|
|
@ -624,18 +632,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
alert('请选择商户支付方式')
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('1') >= 0 && $scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
var fristDesc = $scope.partner.client_pay_desc[0];
|
|
|
|
|
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
|
|
|
|
|
if (parseInt(fristDesc) > 5 || parseInt(lastDesc) < 6) {
|
|
|
|
|
alert("请检查线上/线下支付场景是否已选择支付方式")
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('1') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('10') < 0) {
|
|
|
|
|
alert("请检查线上支付场景是否已选择支付方式");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.client_pay_desc.indexOf('8') >= 0) {
|
|
|
|
|
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
|
|
|
|
|
if (parseInt(lastDesc) < 10) {
|
|
|
|
|
alert("请检查线下支付是否已选择收银系统类型")
|
|
|
|
|
if ( $scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('20') < 0) {
|
|
|
|
|
alert("请检查线下支付场景是否已选择支付方式");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('203') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('2030') < 0) {
|
|
|
|
|
alert("请检查线下支付是否已选择收银系统类型");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1203,14 +1214,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
var resetClientPayDescByTpey = function (type) {
|
|
|
|
|
type = parseInt(type);
|
|
|
|
|
if (type == 1) {
|
|
|
|
|
while (parseInt($scope.partner.client_pay_desc[0]) < 6) {
|
|
|
|
|
$scope.partner.client_pay_desc.splice(0, 1);
|
|
|
|
|
}
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc, '10');
|
|
|
|
|
}
|
|
|
|
|
if (type == 2) {
|
|
|
|
|
while (parseInt($scope.partner.client_pay_desc[$scope.partner.client_pay_desc.length-1]) > 5) {
|
|
|
|
|
$scope.partner.client_pay_desc.splice($scope.partner.client_pay_desc.length-1, 1);
|
|
|
|
|
}
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc, '20');
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var compare = function (x, y) {
|
|
|
|
@ -1237,6 +1244,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.toggleClientPayDesc = function (type) {
|
|
|
|
|
var $idx = $scope.partner.client_pay_desc.indexOf(type);
|
|
|
|
|
if ($idx >= 0) {
|
|
|
|
|
if (type == '203') {
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc,'2030')
|
|
|
|
|
}
|
|
|
|
|
$scope.partner.client_pay_desc.splice($idx, 1);
|
|
|
|
|
} else {
|
|
|
|
|
$scope.partner.client_pay_desc.push(type);
|
|
|
|
@ -1367,36 +1377,29 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
if (!origin_referrer_id && $scope.partner.referrer_id) {
|
|
|
|
|
content = 'Update partner info successfully,But You Had add new Referrer,Please Change the BD Commission Proportion!';
|
|
|
|
|
}
|
|
|
|
|
// if ($scope.partner.client_pay_type =='online' || $scope.partner.client_pay_type =='all') {
|
|
|
|
|
// if (!$scope.partner.online_website && !$scope.partner.online_public_account && !$scope.partner.online_mini_program && !$scope.partner.online_app) {
|
|
|
|
|
// alert('线上支付场景至少填写一种方式');
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// if(!window.frames['merchant_detail'].merchant_location){
|
|
|
|
|
// alert("Please Locate Merchant Location!");
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
if ($scope.partner.client_pay_type.length == 0) {
|
|
|
|
|
if ($scope.partner.client_pay_type.length==0) {
|
|
|
|
|
alert('请选择商户支付场景')
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.client_pay_desc.length == 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.length==0) {
|
|
|
|
|
alert('请选择商户支付方式')
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('1') >= 0 && $scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
var fristDesc = $scope.partner.client_pay_desc[0];
|
|
|
|
|
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
|
|
|
|
|
if (parseInt(fristDesc) > 5 || parseInt(lastDesc) < 6) {
|
|
|
|
|
alert("请检查线上/线下支付场景是否已选择支付方式")
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('1') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('10') < 0) {
|
|
|
|
|
alert("请检查线上支付场景是否已选择支付方式");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.client_pay_desc.indexOf('8') >= 0) {
|
|
|
|
|
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
|
|
|
|
|
if (parseInt(lastDesc) < 10) {
|
|
|
|
|
alert("请检查线下支付是否已选择收银系统类型")
|
|
|
|
|
if ( $scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('20') < 0) {
|
|
|
|
|
alert("请检查线下支付场景是否已选择支付方式");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('203') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('2030') < 0) {
|
|
|
|
|
alert("请检查线下支付是否已选择收银系统类型");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2597,7 +2600,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('newRateDialogCtrl', ['$scope', '$http', 'rate', 'sys_common_rate', 'clientMoniker', function ($scope, $http, rate, sys_common_rate, clientMoniker) {
|
|
|
|
|
$scope.rate = angular.copy(rate);
|
|
|
|
|
$scope.sysRateConfig = angular.copy(sys_common_rate.data);
|
|
|
|
@ -2801,14 +2803,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
var resetClientPayDescByTpey = function (type) {
|
|
|
|
|
type = parseInt(type);
|
|
|
|
|
if (type == 1) {
|
|
|
|
|
while (parseInt($scope.partner.client_pay_desc[0]) < 6) {
|
|
|
|
|
$scope.partner.client_pay_desc.splice(0, 1);
|
|
|
|
|
}
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc, '10');
|
|
|
|
|
}
|
|
|
|
|
if (type == 2) {
|
|
|
|
|
while (parseInt($scope.partner.client_pay_desc[$scope.partner.client_pay_desc.length-1]) > 5) {
|
|
|
|
|
$scope.partner.client_pay_desc.splice($scope.partner.client_pay_desc.length-1, 1);
|
|
|
|
|
}
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc, '20');
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -2836,6 +2834,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.toggleClientPayDesc = function (type) {
|
|
|
|
|
var $idx = $scope.partner.client_pay_desc.indexOf(type);
|
|
|
|
|
if ($idx >= 0) {
|
|
|
|
|
if (type == '203') {
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc,'2030')
|
|
|
|
|
}
|
|
|
|
|
$scope.partner.client_pay_desc.splice($idx, 1);
|
|
|
|
|
} else {
|
|
|
|
|
$scope.partner.client_pay_desc.push(type);
|
|
|
|
@ -3013,18 +3014,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
alert('请选择商户支付方式')
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('1') >= 0 && $scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
var fristDesc = $scope.partner.client_pay_desc[0];
|
|
|
|
|
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
|
|
|
|
|
if (parseInt(fristDesc) > 5 || parseInt(lastDesc) < 6) {
|
|
|
|
|
alert("请检查线上/线下支付场景是否已选择支付方式")
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('1') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('10') < 0) {
|
|
|
|
|
alert("请检查线上支付场景是否已选择支付方式");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ( $scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('20') < 0) {
|
|
|
|
|
alert("请检查线下支付场景是否已选择支付方式");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.client_pay_desc.indexOf('8') >= 0) {
|
|
|
|
|
var lastDesc = $scope.partner.client_pay_desc[($scope.partner.client_pay_desc.length - 1)];
|
|
|
|
|
if (parseInt(lastDesc) < 10) {
|
|
|
|
|
alert("请检查线下支付是否已选择收银系统类型")
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('203') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('2030') < 0) {
|
|
|
|
|
alert("请检查线下支付是否已选择收银系统类型");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -3449,7 +3453,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('newDeviceDialogCtrl', ['$scope', '$http', 'clientMoniker', function ($scope, $http, clientMoniker) {
|
|
|
|
|
$scope.save = function (form) {
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
@ -3469,8 +3472,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.controller('partnerChooseBDUserDialogCtrl', ['$scope', '$http', '$filter', 'partner', 'bdUsers', 'type', function ($scope, $http, $filter, partner, bdUsers, type) {
|
|
|
|
|
$scope.bdUsers = bdUsers.data;
|
|
|
|
|
$scope.data = {};
|
|
|
|
@ -3959,7 +3960,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
};
|
|
|
|
|
$scope.chooseLast7Days();
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('managerSettlementDetailCtrl', ['$scope', 'detail', 'detail_id', '$http', function ($scope, detail, detail_id, $http) {
|
|
|
|
|
$scope.ctrl = {channel: null};
|
|
|
|
|
$scope.show = true;
|
|
|
|
@ -4215,7 +4215,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('applyRpaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', 'businessStructuresMap', '$filter', 'commonDialog', 'timezone', function ($scope, $http, $uibModal, $state, subMerchantInfo, businessStructuresMap, $filter, commonDialog, timezone) {
|
|
|
|
|
$scope.subMerchantInfo = angular.copy(subMerchantInfo);
|
|
|
|
|
$scope.business_structures = businessStructuresMap.configs();
|
|
|
|
@ -4261,7 +4260,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('applyYeepaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', 'yeepayIndustryMap', 'yeepayBusinessContentMap', '$filter', 'commonDialog', 'Upload', function ($scope, $http, $uibModal, $state, subMerchantInfo, yeepayIndustryMap, yeepayBusinessContentMap, $filter, commonDialog, Upload) {
|
|
|
|
|
$scope.yeepay_industries = yeepayIndustryMap.configs();
|
|
|
|
|
$scope.yeepay_business_contents = yeepayBusinessContentMap.configs();
|
|
|
|
@ -4578,7 +4576,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('addYeepaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', 'yeepayIndustryMap', 'yeepayBusinessContentMap', '$filter', 'commonDialog', 'Upload', function ($scope, $http, $uibModal, $state, subMerchantInfo, yeepayIndustryMap, yeepayBusinessContentMap, $filter, commonDialog, Upload) {
|
|
|
|
|
$scope.yeepay_industries = yeepayIndustryMap.configs();
|
|
|
|
|
$scope.yeepay_business_contents = yeepayBusinessContentMap.configs();
|
|
|
|
@ -4625,7 +4622,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('updateYeepaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', 'yeepayIndustryMap', 'yeepayBusinessContentMap', '$filter', 'commonDialog', 'Upload', 'subMerchantId', function ($scope, $http, $uibModal, $state, subMerchantInfo, yeepayIndustryMap, yeepayBusinessContentMap, $filter, commonDialog, Upload, subMerchantId) {
|
|
|
|
|
$scope.yeepay_industries = yeepayIndustryMap.configs();
|
|
|
|
|
$scope.yeepay_business_contents = yeepayBusinessContentMap.configs();
|
|
|
|
@ -4943,8 +4939,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.controller('permissionClientCtrl', ['$scope', '$http', '$uibModal', '$state', '$filter', 'commonDialog', function ($scope, $http, $uibModal, $state, $filter, commonDialog) {
|
|
|
|
|
$scope.clientPermission = {client_moniker: $scope.partner.client_moniker};
|
|
|
|
|
$scope.loadPermissionList = function () {
|
|
|
|
|