|
|
|
@ -83,7 +83,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
var removeClientPayDesc = function (items, key) {
|
|
|
|
|
for (var i = 0; i < items.length; i++) {
|
|
|
|
|
var item = items[i];
|
|
|
|
|
if (item.indexOf(key)>=0) {
|
|
|
|
|
if (item.indexOf(key) >= 0) {
|
|
|
|
|
items.splice(items.indexOf(item), 1);
|
|
|
|
|
i = i - 1;
|
|
|
|
|
}
|
|
|
|
@ -225,6 +225,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.exportPartnersExcel = function () {
|
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
|
var param_str = keys(params).map(function (key) {
|
|
|
|
|
var value = params[key];
|
|
|
|
|
if (angular.isDate(value)) {
|
|
|
|
|
value = $filter('date')(value, 'yyyy-MM-ddTHH:mm:ssZ')
|
|
|
|
|
}
|
|
|
|
|
return key + '=' + encodeURIComponent(value)
|
|
|
|
|
}).join('&');
|
|
|
|
|
window.open('/sys/partners/exporting_excel?'+param_str)
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*$scope.loadLocations = function () {
|
|
|
|
|
var params = angular.copy($scope.params);
|
|
|
|
|
$http.get('/sys/partners/merchant/list_locations', {params: params}).then(function (resp) {
|
|
|
|
@ -411,7 +423,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$scope.toggleClientPayType = function (type) {
|
|
|
|
|
if ($scope.partner.client_pay_type==null || $scope.partner.client_pay_type==undefined){
|
|
|
|
|
if ($scope.partner.client_pay_type == null || $scope.partner.client_pay_type == undefined) {
|
|
|
|
|
$scope.partner.client_pay_type = [];
|
|
|
|
|
}
|
|
|
|
|
var $idx = $scope.partner.client_pay_type.indexOf(type);
|
|
|
|
@ -424,13 +436,13 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.toggleClientPayDesc = function (type) {
|
|
|
|
|
if ($scope.partner.client_pay_desc==null || $scope.partner.client_pay_desc==undefined){
|
|
|
|
|
if ($scope.partner.client_pay_desc == null || $scope.partner.client_pay_desc == undefined) {
|
|
|
|
|
$scope.partner.client_pay_desc = [];
|
|
|
|
|
}
|
|
|
|
|
var $idx = $scope.partner.client_pay_desc.indexOf(type);
|
|
|
|
|
if ($idx >= 0) {
|
|
|
|
|
if (type == '203') {
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc,'2030')
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc, '2030')
|
|
|
|
|
}
|
|
|
|
|
$scope.partner.client_pay_desc.splice($idx, 1);
|
|
|
|
|
} else {
|
|
|
|
@ -544,7 +556,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.merchantIsValid = false;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$http.get('/sys/partners/init/check_code_isvalid',{params:{clientMoniker:code}}).then(function (response) {
|
|
|
|
|
$http.get('/sys/partners/init/check_code_isvalid', {params: {clientMoniker: code}}).then(function (response) {
|
|
|
|
|
$scope.merchantIsValid = response.data;
|
|
|
|
|
$scope.merchantCodeChecked = true;
|
|
|
|
|
});
|
|
|
|
@ -604,7 +616,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
alert("Logo is necessary!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('2')>=0) {
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
if (!$scope.partner.company_photo) {
|
|
|
|
|
alert('Shop Photo1 is necessary');
|
|
|
|
|
return;
|
|
|
|
@ -624,11 +636,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
@ -643,7 +655,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ( $scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('20') < 0) {
|
|
|
|
|
alert("请检查线下支付场景是否已选择支付方式");
|
|
|
|
|
return;
|
|
|
|
@ -1256,7 +1268,7 @@ 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')
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc, '2030')
|
|
|
|
|
}
|
|
|
|
|
$scope.partner.client_pay_desc.splice($idx, 1);
|
|
|
|
|
} else {
|
|
|
|
@ -1388,11 +1400,11 @@ 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.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;
|
|
|
|
|
}
|
|
|
|
@ -1402,7 +1414,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ( $scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('20') < 0) {
|
|
|
|
|
alert("请检查线下支付场景是否已选择支付方式");
|
|
|
|
|
return;
|
|
|
|
@ -1764,7 +1776,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: '是否使用该商户的现有信息进件?',
|
|
|
|
|
json:$scope.alipayOnline_gms_json
|
|
|
|
|
json: $scope.alipayOnline_gms_json
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms').then(function () {
|
|
|
|
|
commonDialog.alert({title: 'Success', content: '提示:AlipayOnline进件成功', type: 'success'});
|
|
|
|
@ -2256,8 +2268,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
app.controller('partnerSubCtrl', ['$scope', '$http', '$uibModal', function ($scope, $http, $uibModal) {
|
|
|
|
|
$scope.toShow = false;
|
|
|
|
|
$scope.init = {
|
|
|
|
|
child_each_refund : false,
|
|
|
|
|
sub_manage : false
|
|
|
|
|
child_each_refund: false,
|
|
|
|
|
sub_manage: false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.newSubClient = function () {
|
|
|
|
@ -2861,7 +2873,7 @@ 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')
|
|
|
|
|
removeClientPayDesc($scope.partner.client_pay_desc, '2030')
|
|
|
|
|
}
|
|
|
|
|
$scope.partner.client_pay_desc.splice($idx, 1);
|
|
|
|
|
} else {
|
|
|
|
@ -2957,7 +2969,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.merchantIsValid = false;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$http.get('/sys/partners/init/check_code_isvalid',{params:{clientMoniker:code}}).then(function (response) {
|
|
|
|
|
$http.get('/sys/partners/init/check_code_isvalid', {params: {clientMoniker: code}}).then(function (response) {
|
|
|
|
|
$scope.merchantIsValid = response.data;
|
|
|
|
|
$scope.merchantCodeChecked = true;
|
|
|
|
|
});
|
|
|
|
@ -3018,7 +3030,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
alert("Logo is necessary!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('2')>=0) {
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
if (!$scope.partner.company_photo) {
|
|
|
|
|
alert('Shop Photo1 is necessary');
|
|
|
|
|
return;
|
|
|
|
@ -3032,11 +3044,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
// 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;
|
|
|
|
|
}
|
|
|
|
@ -3046,7 +3058,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ( $scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
|
|
|
|
|
if ($scope.partner.client_pay_desc.join(',').indexOf('20') < 0) {
|
|
|
|
|
alert("请检查线下支付场景是否已选择支付方式");
|
|
|
|
|
return;
|
|
|
|
|