|
|
|
@ -2,9 +2,9 @@
|
|
|
|
|
* partner info in partner client
|
|
|
|
|
* Created by yixian on 2016-07-03.
|
|
|
|
|
*/
|
|
|
|
|
define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBootstrap'], function (angular, Decimal) {
|
|
|
|
|
define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBootstrap'], function (angular, Decimal) {
|
|
|
|
|
'use strict';
|
|
|
|
|
var app = angular.module('partnerInfoApp', ['ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload','ui.bootstrap']);
|
|
|
|
|
var app = angular.module('partnerInfoApp', ['ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload', 'ui.bootstrap']);
|
|
|
|
|
app.config(['$stateProvider', function ($stateProvider) {
|
|
|
|
|
$stateProvider.state('basic', {
|
|
|
|
|
url: '/basic',
|
|
|
|
@ -73,7 +73,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
controller: 'clientDeviceCtrl'
|
|
|
|
|
})
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('clientPartnerDetailCtrl', ['$scope', '$http', 'partner','industryMap','businessStructuresMap','commonDialog','Upload','$state', function ($scope, $http, partner,industryMap,businessStructuresMap,commonDialog,Upload,$state) {
|
|
|
|
|
app.controller('clientPartnerDetailCtrl', ['$scope', '$http', 'partner', 'industryMap', 'businessStructuresMap', 'commonDialog', 'Upload', '$state', function ($scope, $http, partner, industryMap, businessStructuresMap, commonDialog, Upload, $state) {
|
|
|
|
|
$scope.business_structures = businessStructuresMap.configs();
|
|
|
|
|
$scope.industries = industryMap.configs();
|
|
|
|
|
$scope.partner = partner.data;
|
|
|
|
@ -156,7 +156,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
@ -170,7 +170,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
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 {
|
|
|
|
@ -214,7 +214,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
alert("Logo is necessary!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if($scope.partner.partner_type == 'photo'){
|
|
|
|
|
if ($scope.partner.partner_type == 'photo') {
|
|
|
|
|
if (!$scope.partner.company_photo) {
|
|
|
|
|
alert('Shop Photo1 is necessary');
|
|
|
|
|
return;
|
|
|
|
@ -226,11 +226,11 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var content = '';
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
@ -240,7 +240,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
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;
|
|
|
|
@ -282,20 +282,20 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
$scope.commitToCompliance = function () {
|
|
|
|
|
$http.get('/client/partner_info/compliance/files').then(function (resp) {
|
|
|
|
|
$scope.complianceFiles = resp.data;
|
|
|
|
|
if($scope.complianceFiles.client_id_file == null||$scope.complianceFiles.client_bank_file == null || $scope.complianceFiles.client_company_file == null){
|
|
|
|
|
if ($scope.complianceFiles.client_id_file == null || $scope.complianceFiles.client_bank_file == null || $scope.complianceFiles.client_company_file == null) {
|
|
|
|
|
commonDialog.alert({title: 'Message', content: '请前去完善合规资料,再进行提交!', type: 'info'});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if($scope.partner.business_structure == null ||$scope.partner.logo_url == null || $scope.partner.description == null ||($scope.partner.partner_type == 'website' && $scope.partner.company_website == null) || ($scope.partner.partner_type == 'photo'&&($scope.partner.store_photo == null || $scope.partner.company_photo == null))){
|
|
|
|
|
if ($scope.partner.business_structure == null || $scope.partner.logo_url == null || $scope.partner.description == null || ($scope.partner.partner_type == 'website' && $scope.partner.company_website == null) || ($scope.partner.partner_type == 'photo' && ($scope.partner.store_photo == null || $scope.partner.company_photo == null))) {
|
|
|
|
|
commonDialog.alert({title: 'Message', content: '请前去完善商户资料,再进行提交!', type: 'info'});
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(($scope.partner.business_structure == "Company" && $scope.partner.acn == null) || ($scope.partner.business_structure != "Company" && $scope.partner.abn == null)){
|
|
|
|
|
if (($scope.partner.business_structure == "Company" && $scope.partner.acn == null) || ($scope.partner.business_structure != "Company" && $scope.partner.abn == null)) {
|
|
|
|
|
commonDialog.alert({title: 'Message', content: '请前去完善商户资料,再进行提交!', type: 'info'});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(!$scope.partner.mail_confirm){
|
|
|
|
|
if (!$scope.partner.mail_confirm) {
|
|
|
|
|
commonDialog.alert({title: 'Message', content: '请验证邮箱后,再进行提交!', type: 'info'});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -309,7 +309,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
}).then(function (choice) {
|
|
|
|
|
$scope.submitted = true;
|
|
|
|
|
if (choice == 1) {
|
|
|
|
|
$http.post('/client/partner_info/complianceAudit').then(function (){
|
|
|
|
|
$http.post('/client/partner_info/complianceAudit').then(function () {
|
|
|
|
|
commonDialog.alert({title: 'Success', content: '已提交至合规,请耐心等待审核!', type: 'info'});
|
|
|
|
|
$state.reload();
|
|
|
|
|
}, function () {
|
|
|
|
@ -320,7 +320,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('clientPartnerEditCtrl', ['$scope', '$http', 'commonDialog','stateMap','countryMap','partner','$state','Upload',function ($scope, $http, commonDialog,stateMap,countryMap,partner,$state,Upload) {
|
|
|
|
|
app.controller('clientPartnerEditCtrl', ['$scope', '$http', 'commonDialog', 'stateMap', 'countryMap', 'partner', '$state', 'Upload', function ($scope, $http, commonDialog, stateMap, countryMap, partner, $state, Upload) {
|
|
|
|
|
$scope.partner = partner.data;
|
|
|
|
|
$scope.states = stateMap.configs();
|
|
|
|
|
$scope.countries = countryMap.configs();
|
|
|
|
@ -418,7 +418,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
@ -432,7 +432,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
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 {
|
|
|
|
@ -454,7 +454,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
alert("Logo is necessary!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if($scope.partner.partner_type == 'photo'){
|
|
|
|
|
if ($scope.partner.partner_type == 'photo') {
|
|
|
|
|
if (!$scope.partner.company_photo) {
|
|
|
|
|
alert('Shop Photo1 is necessary');
|
|
|
|
|
return;
|
|
|
|
@ -466,11 +466,11 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var content = '';
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
@ -480,7 +480,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
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;
|
|
|
|
@ -515,26 +515,26 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('clientResetPartnerPublicKeyDialogCtrl', ['$scope', '$http', 'gateway_sign', function ($scope, $http,gateway_sign) {
|
|
|
|
|
app.controller('clientResetPartnerPublicKeyDialogCtrl', ['$scope', '$http', 'gateway_sign', function ($scope, $http, gateway_sign) {
|
|
|
|
|
$scope.gateway_sign = angular.copy(gateway_sign);
|
|
|
|
|
$scope.uploadPublicKey = function (mch_public_key) {
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
|
$http.put('/client/partner_info/partner_public_key', {partner_public_key:mch_public_key}).then(function () {
|
|
|
|
|
$http.put('/client/partner_info/partner_public_key', {partner_public_key: mch_public_key}).then(function () {
|
|
|
|
|
$scope.$close();
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
$scope.errmsg = resp.data.message;
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('clientRefreshPlatformPublicKeyDialogCtrl', ['$scope', '$http', 'gateway_sign','commonDialog', function ($scope, $http,gateway_sign,commonDialog) {
|
|
|
|
|
app.controller('clientRefreshPlatformPublicKeyDialogCtrl', ['$scope', '$http', 'gateway_sign', 'commonDialog', function ($scope, $http, gateway_sign, commonDialog) {
|
|
|
|
|
$scope.gateway_sign = angular.copy(gateway_sign);
|
|
|
|
|
$scope.copyPublicKey = function() {
|
|
|
|
|
var e=document.getElementById("c-cpKey");
|
|
|
|
|
$scope.copyPublicKey = function () {
|
|
|
|
|
var e = document.getElementById("c-cpKey");
|
|
|
|
|
e.select();
|
|
|
|
|
var successful = document.execCommand("Copy");
|
|
|
|
|
if (successful) {
|
|
|
|
|
commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'});
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '您的浏览器不支持!请手动复制', type: 'error'});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
@ -957,25 +957,21 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.clientComplianceViewCommit= function () {
|
|
|
|
|
if(!$scope.file.client_agree_file)
|
|
|
|
|
{
|
|
|
|
|
$scope.clientComplianceViewCommit = function () {
|
|
|
|
|
if (!$scope.file.client_agree_file) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '请提交* Agreement', type: 'error'});
|
|
|
|
|
return;
|
|
|
|
|
}else if(!$scope.file.client_id_file)
|
|
|
|
|
{
|
|
|
|
|
commonDialog.alert({title: 'Error', content:'请提交* ID', type: 'error'});
|
|
|
|
|
} else if (!$scope.file.client_id_file) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '请提交* ID', type: 'error'});
|
|
|
|
|
return;
|
|
|
|
|
}else if(!$scope.file.client_bank_file)
|
|
|
|
|
{
|
|
|
|
|
} else if (!$scope.file.client_bank_file) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '请提交* bank statement', type: 'error'});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
else if(!$scope.file.client_company_file)
|
|
|
|
|
{
|
|
|
|
|
} else if (!$scope.file.client_company_file) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '请提交* Certificate of Registration', type: 'error'});
|
|
|
|
|
return;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: 'Are you sure commit for compliance audit?'
|
|
|
|
@ -1032,38 +1028,75 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('aggregateFileCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', function ($scope, $http, $rootScope, commonDialog, $state, Upload) {
|
|
|
|
|
$scope.signInfo = {};
|
|
|
|
|
|
|
|
|
|
$scope.aggregateFile = function () {
|
|
|
|
|
$http.get('/client/partner_info/aggregateFile/client_info').then(function (resp) {
|
|
|
|
|
$scope.aggregateFileInfo = resp.data;
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: '生成合同失败', content:"错误原因:"+resp.data.message+",请联系bd或客服", type: 'error'});
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: '生成合同失败',
|
|
|
|
|
content: "错误原因:" + resp.data.message + ",请联系BD或客服",
|
|
|
|
|
type: 'error'
|
|
|
|
|
});
|
|
|
|
|
var url = $state.href('basic.compliance_to_perfect');
|
|
|
|
|
window.open(url);
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.aggregateFile();
|
|
|
|
|
|
|
|
|
|
$scope.goBottom =function() {
|
|
|
|
|
window.scrollTo(0, document.documentElement.scrollHeight-document.documentElement.clientHeight);
|
|
|
|
|
$scope.goBottom = function () {
|
|
|
|
|
window.scrollTo(0, document.documentElement.scrollHeight - document.documentElement.clientHeight);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.submitContract =function(){
|
|
|
|
|
$scope.submitContract = function () {
|
|
|
|
|
$scope.goBottom();
|
|
|
|
|
$scope.confirmForSubmit();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.confirmForSubmit =function(){
|
|
|
|
|
$scope.confirmForSubmit = function () {
|
|
|
|
|
var Confirm = confirm("确认提交合同吗?")
|
|
|
|
|
if(Confirm)
|
|
|
|
|
{
|
|
|
|
|
alert(111111111);
|
|
|
|
|
if (Confirm) {
|
|
|
|
|
$scope.uploadSign();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.uploadSign = function () {
|
|
|
|
|
var sign = $('#img1').attr('src');
|
|
|
|
|
if ($scope.signInfo.fullName != null && $scope.signInfo.fullName != "" && sign != null && sign != "") {
|
|
|
|
|
var signFile = dataURLtoFile(sign, $scope.signInfo.fullName);
|
|
|
|
|
$scope.logoProgress = {value: 0};
|
|
|
|
|
Upload.upload({
|
|
|
|
|
url: '/client/partner_info/clientCompliance/' + $scope.aggregateFileInfo.client_moniker +'/commit_aggregate_file',
|
|
|
|
|
data: {file: signFile}
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
delete $scope.logoProgress;
|
|
|
|
|
$state.go('basic.compliance_to_perfect');
|
|
|
|
|
window.open(resp.data.file_value,'_blank');
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
delete $scope.logoProgress;
|
|
|
|
|
commonDialog.alert({title: 'Commit Aggregate File Fail', content: resp.data.message, type: 'error'})
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
$scope.logoProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
commonDialog.alert({title: 'Commit Fail', content: '请确认是否签名和已输入全名', type: 'error'})
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function dataURLtoFile(dataurl, filename) {//将base64转换为文件
|
|
|
|
|
var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],
|
|
|
|
|
bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);
|
|
|
|
|
while (n--) {
|
|
|
|
|
u8arr[n] = bstr.charCodeAt(n);
|
|
|
|
|
}
|
|
|
|
|
return new File([u8arr], filename, {type: mime});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.controller('clientPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog','$uibModal', function ($scope, $http, $state, commonDialog, $uibModal) {
|
|
|
|
|
app.controller('clientPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog', '$uibModal', function ($scope, $http, $state, commonDialog, $uibModal) {
|
|
|
|
|
$scope.paymentInfo = $scope.partner;
|
|
|
|
|
$scope.old_customer_surcharge_rate = angular.copy($scope.partner.customer_surcharge_rate);
|
|
|
|
|
$scope.qrConfig = {currency: 'AUD'};
|
|
|
|
@ -1072,13 +1105,13 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
switch_verify_ip: false
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.clientCopyHfLink = function() {
|
|
|
|
|
var e=document.getElementById("c-cpbt");
|
|
|
|
|
$scope.clientCopyHfLink = function () {
|
|
|
|
|
var e = document.getElementById("c-cpbt");
|
|
|
|
|
e.select();
|
|
|
|
|
var successful = document.execCommand("Copy");
|
|
|
|
|
if (successful) {
|
|
|
|
|
commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'});
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
@ -1099,7 +1132,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
}
|
|
|
|
|
$http.put('/client/partner_info/switch_gateway_v2', {enable_gateway_version2: $scope.paymentInfo.enable_gateway_version2}).then(function () {
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'failed to change Gateway Version',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
@ -1146,7 +1179,11 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).result.then(function () {
|
|
|
|
|
commonDialog.alert({title: 'Success!', content: 'Partner Public Key Upload Successfully', type: 'success'})
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success!',
|
|
|
|
|
content: 'Partner Public Key Upload Successfully',
|
|
|
|
|
type: 'success'
|
|
|
|
|
})
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
@ -1163,7 +1200,11 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).result.then(function () {
|
|
|
|
|
commonDialog.alert({title: 'Success!', content: 'RoyalPay Public Key Refresh Successfully', type: 'success'})
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success!',
|
|
|
|
|
content: 'RoyalPay Public Key Refresh Successfully',
|
|
|
|
|
type: 'success'
|
|
|
|
|
})
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
@ -1180,17 +1221,21 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).result.then(function () {
|
|
|
|
|
commonDialog.alert({title: 'Success!', content: 'Refund Password Changed Successfully', type: 'success'})
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success!',
|
|
|
|
|
content: 'Refund Password Changed Successfully',
|
|
|
|
|
type: 'success'
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.clientCopyCBBannkPayLink = function() {
|
|
|
|
|
var e=document.getElementById("c-cpcbbankpay");
|
|
|
|
|
$scope.clientCopyCBBannkPayLink = function () {
|
|
|
|
|
var e = document.getElementById("c-cpcbbankpay");
|
|
|
|
|
e.select();
|
|
|
|
|
var successful = document.execCommand("Copy");
|
|
|
|
|
if (successful) {
|
|
|
|
|
commonDialog.alert({title: 'Success', content: '已复制到剪切板!', type: 'success'});
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: '您的浏览器不支持!', type: 'error'});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
@ -1377,61 +1422,61 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
slidesPc.push({
|
|
|
|
|
image: '/static/images/hfpaylink_intro/pc_hf_pay_step1.png',
|
|
|
|
|
text: '第一次打开支付链接进行下单,第一步用微信扫码页面弹出的二维码,确认您的身份',
|
|
|
|
|
id:0
|
|
|
|
|
id: 0
|
|
|
|
|
});
|
|
|
|
|
slidesPc.push({
|
|
|
|
|
image: '/static/images/hfpaylink_intro/pc_hf_pay_step2.png',
|
|
|
|
|
text: '下一步,填写订单信息。注意订单金额货币单位是澳元(AUD)。请认真填写商品名称,否则可能导致交易不成功。填写完成,最后提交订单。',
|
|
|
|
|
id:1
|
|
|
|
|
id: 1
|
|
|
|
|
});
|
|
|
|
|
slidesPc.push({
|
|
|
|
|
image: '/static/images/hfpaylink_intro/pc_hf_pay_step3.png',
|
|
|
|
|
text: '页面显示支付二维码,使用相应的支付app进行扫码支付。如订单有误,请点击"返回上一步"修改订单。',
|
|
|
|
|
id:2
|
|
|
|
|
id: 2
|
|
|
|
|
});
|
|
|
|
|
slidesPc.push({
|
|
|
|
|
image: '/static/images/hfpaylink_intro/hf_pay_end.png',
|
|
|
|
|
text: '完成支付,跳转到支付成功页面。',
|
|
|
|
|
id:3
|
|
|
|
|
id: 3
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var addSlidePcBank = function () {
|
|
|
|
|
slidesPcBank.push({
|
|
|
|
|
image: '/static/images/hfpaylink_intro/pc_bank_hf_pay_step1.png',
|
|
|
|
|
text: '第一次打开支付链接进行下单,第一步用微信扫码页面弹出的二维码,确认您的身份',
|
|
|
|
|
id:0
|
|
|
|
|
id: 0
|
|
|
|
|
});
|
|
|
|
|
slidesPcBank.push({
|
|
|
|
|
image: '/static/images/hfpaylink_intro/pc_bank_hf_pay_step2.png',
|
|
|
|
|
text: '下一步,填写订单信息。注意订单金额货币单位是澳元(AUD)。请认真填写商品名称,否则可能导致交易不成功。填写完成,最后提交订单。',
|
|
|
|
|
id:1
|
|
|
|
|
id: 1
|
|
|
|
|
});
|
|
|
|
|
slidesPcBank.push({
|
|
|
|
|
image: '/static/images/hfpaylink_intro/pc_bank_hf_pay_step3.png',
|
|
|
|
|
text: '提交订单后,页面跳转到对应银行,请填写相关信息完成支付。',
|
|
|
|
|
id:2
|
|
|
|
|
id: 2
|
|
|
|
|
});
|
|
|
|
|
slidesPcBank.push({
|
|
|
|
|
image: '/static/images/hfpaylink_intro/hf_pay_end.png',
|
|
|
|
|
text: '完成支付,跳转到支付成功页面。',
|
|
|
|
|
id:3
|
|
|
|
|
id: 3
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var addSlideApp = function () {
|
|
|
|
|
slidesApp.push({
|
|
|
|
|
image: '/static/images/hfpaylink_intro/app_bank_hf_pay_step1.png',
|
|
|
|
|
text: '使用微信客户端,填写订单信息。注意订单金额货币单位是澳元(AUD)。请认真填写商品名称,否则可能导致交易不成功。填写完成,最后提交订单。',
|
|
|
|
|
id:0
|
|
|
|
|
id: 0
|
|
|
|
|
});
|
|
|
|
|
slidesApp.push({
|
|
|
|
|
image: '/static/images/hfpaylink_intro/app_bank_hf_pay_step2.png',
|
|
|
|
|
text: '提交订单后,页面跳转到汇付天下支付页面,请填写相关信息完成支付。',
|
|
|
|
|
id:1
|
|
|
|
|
id: 1
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
$scope.toPcFirst = function () {
|
|
|
|
|
$scope.reset();
|
|
|
|
|
if(!$scope.pcfirst) {
|
|
|
|
|
if (!$scope.pcfirst) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
addSlidePc();
|
|
|
|
@ -1439,7 +1484,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
};
|
|
|
|
|
$scope.toBankFirst = function () {
|
|
|
|
|
$scope.reset();
|
|
|
|
|
if(!$scope.bankfirst) {
|
|
|
|
|
if (!$scope.bankfirst) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
addSlidePcBank();
|
|
|
|
@ -1447,7 +1492,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
};
|
|
|
|
|
$scope.toAppFirst = function () {
|
|
|
|
|
$scope.reset();
|
|
|
|
|
if(!$scope.appfirst) {
|
|
|
|
|
if (!$scope.appfirst) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
addSlideApp();
|
|
|
|
@ -1489,8 +1534,8 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: 'Refresh Credential will expire the current one, ' +
|
|
|
|
|
'which will cause the current payment service disabled. ' +
|
|
|
|
|
'Are you sure going on?'
|
|
|
|
|
'which will cause the current payment service disabled. ' +
|
|
|
|
|
'Are you sure going on?'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/credential_code').then(function () {
|
|
|
|
|
$state.reload();
|
|
|
|
@ -1544,9 +1589,9 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('clientClearingConfigCtrl', ['$scope', '$http','$state','commonDialog', function ($scope, $http,$state,commonDialog) {
|
|
|
|
|
$scope.bankCtrl = {rate_name:'Wechat'};
|
|
|
|
|
$scope.init = {manual:false};
|
|
|
|
|
app.controller('clientClearingConfigCtrl', ['$scope', '$http', '$state', 'commonDialog', function ($scope, $http, $state, commonDialog) {
|
|
|
|
|
$scope.bankCtrl = {rate_name: 'Wechat'};
|
|
|
|
|
$scope.init = {manual: false};
|
|
|
|
|
$scope.getBankAccount = function () {
|
|
|
|
|
$http.get('/client/partner_info/bank_account').then(function (resp) {
|
|
|
|
|
$scope.bankaccount = resp.data;
|
|
|
|
@ -1563,32 +1608,32 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
$scope.manualSettle = function (manualSettle) {
|
|
|
|
|
if(!$scope.init.manual){
|
|
|
|
|
if (!$scope.init.manual) {
|
|
|
|
|
$scope.init.manual = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var waring_messsage;
|
|
|
|
|
if(manualSettle){
|
|
|
|
|
if (manualSettle) {
|
|
|
|
|
waring_messsage = "Open"
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
waring_messsage = "Close"
|
|
|
|
|
}
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Confirmation',
|
|
|
|
|
content: 'Are you sure to '+waring_messsage+'?',
|
|
|
|
|
}).then(function(){
|
|
|
|
|
$http.put('/client/partner_info/manual_settle?'+'manual_settle='+manualSettle).then(function (resp) {
|
|
|
|
|
},function (resp) {
|
|
|
|
|
content: 'Are you sure to ' + waring_messsage + '?',
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$http.put('/client/partner_info/manual_settle?' + 'manual_settle=' + manualSettle).then(function (resp) {
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error!', content: resp.data.message, type: 'error'})
|
|
|
|
|
})
|
|
|
|
|
},function () {
|
|
|
|
|
}, function () {
|
|
|
|
|
$state.reload();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
$scope.getRates();
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('clientSubPartnersCtrl', ['$scope', '$http','partner', function ($scope, $http,partner) {
|
|
|
|
|
app.controller('clientSubPartnersCtrl', ['$scope', '$http', 'partner', function ($scope, $http, partner) {
|
|
|
|
|
$scope.partner = partner.data;
|
|
|
|
|
$scope.loadSubPartners = function () {
|
|
|
|
|
$http.get('/client/partner_info/sub_partners').then(function (resp) {
|
|
|
|
@ -1604,7 +1649,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
};
|
|
|
|
|
$scope.loadSubPartners();
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('clientDeviceCtrl','newDive','newDeviceDialogCtrl', ['$scope', '$http', 'orderService', 'commonDialog', 'refunder','$filter', '$uibModal', function ($scope, $http, orderService, commonDialog, refunder,$filter,$uibModal) {
|
|
|
|
|
app.controller('clientDeviceCtrl', 'newDive', 'newDeviceDialogCtrl', ['$scope', '$http', 'orderService', 'commonDialog', 'refunder', '$filter', '$uibModal', function ($scope, $http, orderService, commonDialog, refunder, $filter, $uibModal) {
|
|
|
|
|
$scope.pagination = {};
|
|
|
|
|
$scope.params = {};
|
|
|
|
|
/**
|
|
|
|
@ -1710,8 +1755,6 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload','uiBoot
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
return app;
|
|
|
|
|
});
|
|
|
|
|