|
|
|
@ -399,6 +399,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return arr;
|
|
|
|
return arr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$scope.loadOfflineDesc = function () {
|
|
|
|
$scope.loadOfflineDesc = function () {
|
|
|
|
$http.get('/static/data/client_offline_desc.json').then(function (resp) {
|
|
|
|
$http.get('/static/data/client_offline_desc.json').then(function (resp) {
|
|
|
|
$scope.client_offline_select = resp.data;
|
|
|
|
$scope.client_offline_select = resp.data;
|
|
|
|
@ -775,7 +776,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.pass2GreenChannel = function () {
|
|
|
|
$scope.pass2GreenChannel = function () {
|
|
|
|
if (!$scope.partner.wechat_institution_merchant_id) {
|
|
|
|
if (!$scope.partner.wechat_institution_merchant_id) {
|
|
|
|
commonDialog.alert({title: 'info', content: 'Wechat Institution Merchant Id not Refresh', type: 'info'});
|
|
|
|
commonDialog.alert({
|
|
|
|
|
|
|
|
title: 'info',
|
|
|
|
|
|
|
|
content: 'Wechat Institution Merchant Id not Refresh',
|
|
|
|
|
|
|
|
type: 'info'
|
|
|
|
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
commonDialog.confirm({
|
|
|
|
commonDialog.confirm({
|
|
|
|
@ -1598,9 +1603,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.submitAlipaySubId = function () {
|
|
|
|
$scope.submitAlipaySubId = function () {
|
|
|
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_gms_json').then(function (resp) {
|
|
|
|
|
|
|
|
$scope.alipay_gms_json = resp.data;
|
|
|
|
commonDialog.confirm({
|
|
|
|
commonDialog.confirm({
|
|
|
|
title: 'Warning',
|
|
|
|
title: 'Warning',
|
|
|
|
content: '是否使用该商户的现有信息进件?'
|
|
|
|
content: '是否使用该商户的现有信息进件?',
|
|
|
|
|
|
|
|
json:$scope.alipay_gms_json
|
|
|
|
}).then(function () {
|
|
|
|
}).then(function () {
|
|
|
|
if ($scope.partner.business_structure == "Company") {
|
|
|
|
if ($scope.partner.business_structure == "Company") {
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms', {representative_id: ""}).then(function () {
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms', {representative_id: ""}).then(function () {
|
|
|
|
@ -1618,6 +1626,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.queryAlipayGms = function () {
|
|
|
|
$scope.queryAlipayGms = function () {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_gms').then(function (resp) {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_gms').then(function (resp) {
|
|
|
|
@ -1627,9 +1636,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$scope.submitAlipayOnlineSubId = function () {
|
|
|
|
$scope.submitAlipayOnlineSubId = function () {
|
|
|
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipayOnline_gms_json').then(function (resp) {
|
|
|
|
|
|
|
|
$scope.alipayOnline_gms_json = resp.data;
|
|
|
|
commonDialog.confirm({
|
|
|
|
commonDialog.confirm({
|
|
|
|
title: 'Warning',
|
|
|
|
title: 'Warning',
|
|
|
|
content: '是否使用该商户的现有信息进件?'
|
|
|
|
content: '是否使用该商户的现有信息进件?',
|
|
|
|
|
|
|
|
json:$scope.alipayOnline_gms_json
|
|
|
|
}).then(function () {
|
|
|
|
}).then(function () {
|
|
|
|
commonDialog.inputText({title: '请输入商户身份证或护照号码'}).then(function (text) {
|
|
|
|
commonDialog.inputText({title: '请输入商户身份证或护照号码'}).then(function (text) {
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms', {representative_id: text}).then(function () {
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms', {representative_id: text}).then(function () {
|
|
|
|
@ -1640,6 +1652,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.queryAlipayOnlineGms = function () {
|
|
|
|
$scope.queryAlipayOnlineGms = function () {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipayOnline_gms').then(function (resp) {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipayOnline_gms').then(function (resp) {
|
|
|
|
@ -1660,7 +1673,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.init = {jsapi: false, gateway: false, offline: false, refund: false,common_sub_merchant_id:false, channel: {},gateway_alipay_online:false,hf_Link:false,enable_hf_email_notice:false,enable_yeepay_link:false,enable_yeepay_email_notice:false};
|
|
|
|
$scope.init = {
|
|
|
|
|
|
|
|
jsapi: false,
|
|
|
|
|
|
|
|
gateway: false,
|
|
|
|
|
|
|
|
offline: false,
|
|
|
|
|
|
|
|
refund: false,
|
|
|
|
|
|
|
|
common_sub_merchant_id: false,
|
|
|
|
|
|
|
|
channel: {},
|
|
|
|
|
|
|
|
gateway_alipay_online: false,
|
|
|
|
|
|
|
|
hf_Link: false,
|
|
|
|
|
|
|
|
enable_hf_email_notice: false,
|
|
|
|
|
|
|
|
enable_yeepay_link: false,
|
|
|
|
|
|
|
|
enable_yeepay_email_notice: false
|
|
|
|
|
|
|
|
};
|
|
|
|
$scope.switchCommonSubMerchantId = function () {
|
|
|
|
$scope.switchCommonSubMerchantId = function () {
|
|
|
|
if (!$scope.paymentInfo) {
|
|
|
|
if (!$scope.paymentInfo) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
@ -2093,6 +2118,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.logs = logs.data;
|
|
|
|
$scope.logs = logs.data;
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
app.controller('partnerSubCtrl', ['$scope', '$http', '$uibModal', function ($scope, $http, $uibModal) {
|
|
|
|
app.controller('partnerSubCtrl', ['$scope', '$http', '$uibModal', function ($scope, $http, $uibModal) {
|
|
|
|
|
|
|
|
$scope.toShow = false;
|
|
|
|
$scope.newSubClient = function () {
|
|
|
|
$scope.newSubClient = function () {
|
|
|
|
$uibModal.open({
|
|
|
|
$uibModal.open({
|
|
|
|
templateUrl: '/static/payment/partner/templates/add_sub_partner_dialog.html',
|
|
|
|
templateUrl: '/static/payment/partner/templates/add_sub_partner_dialog.html',
|
|
|
|
@ -2142,11 +2168,24 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
})
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.showClient = function (sub_client) {
|
|
|
|
|
|
|
|
if ($scope.sub_client_id == sub_client.client_id) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$scope.client_monikers = sub_client.level3Clients;
|
|
|
|
|
|
|
|
$scope.sub_client_id = sub_client.client_id;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog', '$sce', function ($scope, $rootScope, $http, $uibModal, commonDialog, $sce) {
|
|
|
|
app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog', '$sce', function ($scope, $rootScope, $http, $uibModal, commonDialog, $sce) {
|
|
|
|
$scope.bankCtrl = {edit: true, rate_name: 'Wechat'};
|
|
|
|
$scope.bankCtrl = {edit: true, rate_name: 'Wechat'};
|
|
|
|
$scope.init = {skip_clearing:false,tax_in_surcharge:false,customer_tax_free:false,allow_surcharge_credit:false};
|
|
|
|
$scope.init = {
|
|
|
|
|
|
|
|
skip_clearing: false,
|
|
|
|
|
|
|
|
tax_in_surcharge: false,
|
|
|
|
|
|
|
|
customer_tax_free: false,
|
|
|
|
|
|
|
|
allow_surcharge_credit: false
|
|
|
|
|
|
|
|
};
|
|
|
|
$scope.getBankAccount = function () {
|
|
|
|
$scope.getBankAccount = function () {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/bank_account').then(function (resp) {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/bank_account').then(function (resp) {
|
|
|
|
$scope.bankaccount = resp.data;
|
|
|
|
$scope.bankaccount = resp.data;
|
|
|
|
@ -2320,7 +2359,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
if (isNaN($scope.bankaccount.account_no)) {
|
|
|
|
if (isNaN($scope.bankaccount.account_no)) {
|
|
|
|
alert("Account No应输入数字!");
|
|
|
|
alert("Account No应输入数字!");
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
;
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/bank_account', $scope.bankaccount).then(function () {
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/bank_account', $scope.bankaccount).then(function () {
|
|
|
|
$scope.getBankAccount();
|
|
|
|
$scope.getBankAccount();
|
|
|
|
}, function (resp) {
|
|
|
|
}, function (resp) {
|
|
|
|
@ -2412,7 +2452,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.params = {};
|
|
|
|
$scope.params = {};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$scope.save = function () {
|
|
|
|
$scope.save = function () {
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/account/save', {amount:$scope.params.amount,remark:$scope.params.remark}).then(function (resp) {
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/account/save', {
|
|
|
|
|
|
|
|
amount: $scope.params.amount,
|
|
|
|
|
|
|
|
remark: $scope.params.remark
|
|
|
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
$scope.getTransactions();
|
|
|
|
$scope.getTransactions();
|
|
|
|
$scope.getBalance();
|
|
|
|
$scope.getBalance();
|
|
|
|
$scope.canAddDetail = false;
|
|
|
|
$scope.canAddDetail = false;
|
|
|
|
@ -2853,7 +2896,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.params = {status: 'PAID', channel: 'ALL', textType: 'all', datefrom: new Date(), dateto: new Date()};
|
|
|
|
$scope.params = {status: 'PAID', channel: 'ALL', textType: 'all', datefrom: new Date(), dateto: new Date()};
|
|
|
|
$scope.pagination = {};
|
|
|
|
$scope.pagination = {};
|
|
|
|
$scope.isAll = true;
|
|
|
|
$scope.isAll = true;
|
|
|
|
|
|
|
|
$scope.isLevel3All = true;
|
|
|
|
$scope.clients = [$scope.partner];
|
|
|
|
$scope.clients = [$scope.partner];
|
|
|
|
|
|
|
|
$scope.showLevel3Clients = false;
|
|
|
|
|
|
|
|
|
|
|
|
$scope.today = new Date();
|
|
|
|
$scope.today = new Date();
|
|
|
|
$scope.chooseToday = function () {
|
|
|
|
$scope.chooseToday = function () {
|
|
|
|
@ -2926,15 +2971,41 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.$on('order_refunded', function () {
|
|
|
|
$scope.$on('order_refunded', function () {
|
|
|
|
$scope.loadTradeLogs();
|
|
|
|
$scope.loadTradeLogs();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$scope.chooseClient = function (clientId) {
|
|
|
|
$scope.chooseClient = function (client) {
|
|
|
|
if (clientId == 'all') {
|
|
|
|
if (client == 'all') {
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
$scope.isAll = true;
|
|
|
|
$scope.isAll = true;
|
|
|
|
$scope.chooseClientId = '';
|
|
|
|
$scope.chooseClientId = '';
|
|
|
|
|
|
|
|
$scope.showLevel3Clients = false;
|
|
|
|
|
|
|
|
} else if (client.level3Clients) {
|
|
|
|
|
|
|
|
$scope.chooseClientId = client.client_id;
|
|
|
|
|
|
|
|
$scope.showLevel3Clients = true;
|
|
|
|
|
|
|
|
$scope.level3Clients = client.level3Clients;
|
|
|
|
|
|
|
|
$scope.isAll = false;
|
|
|
|
|
|
|
|
$scope.level3ClientIds = [];
|
|
|
|
|
|
|
|
$scope.level3ClientIds.push(client.client_id);
|
|
|
|
|
|
|
|
client.level3Clients.forEach(function (client) {
|
|
|
|
|
|
|
|
$scope.level3ClientIds.push(client.client_id);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$scope.chooseLevel3Client("all");
|
|
|
|
|
|
|
|
return;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$scope.chooseClientId = clientId;
|
|
|
|
$scope.chooseClientId = client.client_id;
|
|
|
|
$scope.params.client_ids = [clientId];
|
|
|
|
$scope.params.client_ids = [client.client_id];
|
|
|
|
$scope.isAll = false;
|
|
|
|
$scope.isAll = false;
|
|
|
|
|
|
|
|
$scope.showLevel3Clients = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$scope.loadTradeLogs();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.chooseLevel3Client = function (client) {
|
|
|
|
|
|
|
|
if (client == 'all') {
|
|
|
|
|
|
|
|
$scope.params.client_ids = angular.copy($scope.level3ClientIds);
|
|
|
|
|
|
|
|
$scope.isLevel3All = true;
|
|
|
|
|
|
|
|
$scope.chooseLevel3ClientId = '';
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$scope.chooseLevel3ClientId = client.client_id;
|
|
|
|
|
|
|
|
$scope.params.client_ids = [client.client_id];
|
|
|
|
|
|
|
|
$scope.isLevel3All = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$scope.loadTradeLogs();
|
|
|
|
$scope.loadTradeLogs();
|
|
|
|
};
|
|
|
|
};
|
|
|
|
@ -2947,6 +3018,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.clientIds = [];
|
|
|
|
$scope.clientIds = [];
|
|
|
|
$scope.clients.forEach(function (client) {
|
|
|
|
$scope.clients.forEach(function (client) {
|
|
|
|
$scope.clientIds.push(client.client_id);
|
|
|
|
$scope.clientIds.push(client.client_id);
|
|
|
|
|
|
|
|
if (client.level3Clients) {
|
|
|
|
|
|
|
|
client.level3Clients.forEach(function (level3Client) {
|
|
|
|
|
|
|
|
$scope.clientIds.push(level3Client.client_id);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
//console.log($rootScope.currentUser.client.clientList);
|
|
|
|
//console.log($rootScope.currentUser.client.clientList);
|
|
|
|
@ -3247,11 +3323,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
|
|
|
|
|
|
|
if ($scope.data.users.length == 0) {
|
|
|
|
if ($scope.data.users.length == 0) {
|
|
|
|
$scope.errmsg = "请选择至少一位BD";
|
|
|
|
$scope.errmsg = "请选择至少一位BD";
|
|
|
|
}
|
|
|
|
} else if ($scope.data.start_date == undefined) {
|
|
|
|
else if ($scope.data.start_date == undefined) {
|
|
|
|
|
|
|
|
$scope.errmsg = "执行开始日期不能为空";
|
|
|
|
$scope.errmsg = "执行开始日期不能为空";
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
else {
|
|
|
|
|
|
|
|
var isValid = true;
|
|
|
|
var isValid = true;
|
|
|
|
var total = 0;
|
|
|
|
var total = 0;
|
|
|
|
$scope.data.users.forEach(function (e) {
|
|
|
|
$scope.data.users.forEach(function (e) {
|
|
|
|
@ -4340,7 +4414,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
var merchantInfo = {};
|
|
|
|
var merchantInfo = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.saveYeepayAdd = function (form) {
|
|
|
|
$scope.saveYeepayAdd = function (form) {
|
|
|
|
$scope.errmsg = null;
|
|
|
|
$scope.errmsg = null;
|
|
|
|
if (form.$invalid) {
|
|
|
|
if (form.$invalid) {
|
|
|
|
|