|
|
|
@ -399,6 +399,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
return arr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$scope.loadOfflineDesc = function () {
|
|
|
|
|
$http.get('/static/data/client_offline_desc.json').then(function (resp) {
|
|
|
|
|
$scope.client_offline_select = resp.data;
|
|
|
|
@ -537,7 +538,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
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;
|
|
|
|
@ -566,7 +567,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
// alert("Please Locate Merchant's Location");
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
if ($scope.params.client_pay_type==''){
|
|
|
|
|
if ($scope.params.client_pay_type == '') {
|
|
|
|
|
alert('请选择商户支付场景')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -661,15 +662,15 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.isComplianceOfShortName = false;
|
|
|
|
|
$scope.isComplianceOfBusinessStructure = false;
|
|
|
|
|
var website = partner.data.company_website;
|
|
|
|
|
if (website!=null){
|
|
|
|
|
if (website.indexOf('http')!=0){
|
|
|
|
|
$scope.partner.company_website= 'http://'+angular.copy(website);
|
|
|
|
|
if (website != null) {
|
|
|
|
|
if (website.indexOf('http') != 0) {
|
|
|
|
|
$scope.partner.company_website = 'http://' + angular.copy(website);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$scope.decideCompliance = function (name) {
|
|
|
|
|
var keywords = ['education','financial' ,'train','immigrant','invest',
|
|
|
|
|
'律师咨询','会计事务所', '移民', '留学','娱乐','金融','地产','投资'];
|
|
|
|
|
for(var i = 0; i < keywords.length; i++){
|
|
|
|
|
var keywords = ['education', 'financial', 'train', 'immigrant', 'invest',
|
|
|
|
|
'律师咨询', '会计事务所', '移民', '留学', '娱乐', '金融', '地产', '投资'];
|
|
|
|
|
for (var i = 0; i < keywords.length; i++) {
|
|
|
|
|
if (name.indexOf(keywords[i]) != -1) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -698,12 +699,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
};
|
|
|
|
|
$scope.showFile();
|
|
|
|
|
$scope.passClient = function () {
|
|
|
|
|
if(!$scope.partner.wechat_institution_merchant_id){
|
|
|
|
|
if (!$scope.partner.wechat_institution_merchant_id) {
|
|
|
|
|
commonDialog.alert({title: 'info', content: 'HF Institution Merchant Id not Refresh', type: 'info'});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if ($scope.partner.enable_hf) {
|
|
|
|
|
if($scope.partner.hfindustry == null){
|
|
|
|
|
if ($scope.partner.hfindustry == null) {
|
|
|
|
|
alert("已开启HF支付通道,HF行业不可为空!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -741,7 +742,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
info.push('Business Structure');
|
|
|
|
|
}
|
|
|
|
|
title = 'Warning';
|
|
|
|
|
contentHtml = $sce.trustAsHtml('本次提交的商户[' + $scope.partner.company_name + '],<span style="color: red">'+ info.toString() +'</span>存在微信渠道不合规信息');
|
|
|
|
|
contentHtml = $sce.trustAsHtml('本次提交的商户[' + $scope.partner.company_name + '],<span style="color: red">' + info.toString() + '</span>存在微信渠道不合规信息');
|
|
|
|
|
choises = [{label: '取消', className: 'btn-danger', key: '2', dismiss: true},
|
|
|
|
|
{label: '确认提交', className: 'btn-success', key: '1'}];
|
|
|
|
|
content = '';
|
|
|
|
@ -774,8 +775,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
$scope.pass2GreenChannel = function () {
|
|
|
|
|
if(!$scope.partner.wechat_institution_merchant_id){
|
|
|
|
|
commonDialog.alert({title: 'info', content: 'Wechat Institution Merchant Id not Refresh', type: 'info'});
|
|
|
|
|
if (!$scope.partner.wechat_institution_merchant_id) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'info',
|
|
|
|
|
content: 'Wechat Institution Merchant Id not Refresh',
|
|
|
|
|
type: 'info'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
@ -830,7 +835,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
$scope.Export = function () {
|
|
|
|
|
var url = '/dev/' + $scope.partner.client_moniker +'/export/aggregate/agreepdf' ;
|
|
|
|
|
var url = '/dev/' + $scope.partner.client_moniker + '/export/aggregate/agreepdf';
|
|
|
|
|
return url;
|
|
|
|
|
}
|
|
|
|
|
$scope.uploadAgreeFile = function (file) {
|
|
|
|
@ -1080,7 +1085,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
if (!$scope.partner) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(!$state.is('partners.detail')){
|
|
|
|
|
if (!$state.is('partners.detail')) {
|
|
|
|
|
$scope.init.wechat_compliance = false;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -1102,7 +1107,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
if (!$scope.partner) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if(!$state.is('partners.detail')){
|
|
|
|
|
if (!$state.is('partners.detail')) {
|
|
|
|
|
$scope.init.local_merchant = false;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -1246,7 +1251,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
alert('suburb can not contain two and more continuous space characters');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if($scope.partner.partner_type == 'photo'){
|
|
|
|
|
if ($scope.partner.partner_type == 'photo') {
|
|
|
|
|
if (!$scope.partner.company_photo) {
|
|
|
|
|
alert('Shop Photo1 is necessary');
|
|
|
|
|
return;
|
|
|
|
@ -1284,7 +1289,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
// alert("Please Locate Merchant Location!");
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
if ($scope.params.client_pay_type==''){
|
|
|
|
|
if ($scope.params.client_pay_type == '') {
|
|
|
|
|
alert('请选择商户支付场景')
|
|
|
|
|
}
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker, $scope.partner).then(function () {
|
|
|
|
@ -1390,34 +1395,34 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog','$uibModal', '$sce', function ($scope, $http, $state, commonDialog,$uibModal, $sce) {
|
|
|
|
|
$scope.copyHfLink = function() {
|
|
|
|
|
var e=document.getElementById("cpbt");
|
|
|
|
|
app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog', '$uibModal', '$sce', function ($scope, $http, $state, commonDialog, $uibModal, $sce) {
|
|
|
|
|
$scope.copyHfLink = function () {
|
|
|
|
|
var e = document.getElementById("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'});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.copyYeepayLink = function() {
|
|
|
|
|
var e=document.getElementById("cpyeepay");
|
|
|
|
|
$scope.copyYeepayLink = function () {
|
|
|
|
|
var e = document.getElementById("cpyeepay");
|
|
|
|
|
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'});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
$scope.copyCBBankPayLink = function() {
|
|
|
|
|
var e=document.getElementById("cpcbbankpay");
|
|
|
|
|
$scope.copyCBBankPayLink = function () {
|
|
|
|
|
var e = document.getElementById("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'});
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
@ -1448,7 +1453,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
size: 'lg',
|
|
|
|
|
resolve: {
|
|
|
|
|
logs: ['$http', function ($http) {
|
|
|
|
|
return $http.get('/sys/partners/'+$scope.partner.client_moniker+'/get_sub_merchant_id_logs');
|
|
|
|
|
return $http.get('/sys/partners/' + $scope.partner.client_moniker + '/get_sub_merchant_id_logs');
|
|
|
|
|
}]
|
|
|
|
|
}
|
|
|
|
|
}).result.then(function () {
|
|
|
|
@ -1598,19 +1603,22 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
$scope.submitAlipaySubId = function () {
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_gms_json').then(function (resp) {
|
|
|
|
|
$scope.alipay_gms_json = resp.data;
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: '是否使用该商户的现有信息进件?'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
if ($scope.partner.business_structure == "Company"){
|
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms',{representative_id:""}).then(function () {
|
|
|
|
|
content: '是否使用该商户的现有信息进件?',
|
|
|
|
|
json:$scope.alipay_gms_json
|
|
|
|
|
}).then(function () {
|
|
|
|
|
if ($scope.partner.business_structure == "Company") {
|
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms', {representative_id: ""}).then(function () {
|
|
|
|
|
commonDialog.alert({title: 'Success', content: 'Alipay进件成功', type: 'success'});
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'});
|
|
|
|
|
})
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
commonDialog.inputText({title: '请输入商户身份证或护照号码'}).then(function (text) {
|
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms',{representative_id:text}).then(function () {
|
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipay_gms', {representative_id: text}).then(function () {
|
|
|
|
|
commonDialog.alert({title: 'Success', content: '提示:Alipay进件成功', type: 'success'});
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'});
|
|
|
|
@ -1618,6 +1626,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
$scope.queryAlipayGms = function () {
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipay_gms').then(function (resp) {
|
|
|
|
@ -1627,19 +1636,23 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
$scope.submitAlipayOnlineSubId = function () {
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: '是否使用该商户的现有信息进件?'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
commonDialog.inputText({title: '请输入商户身份证或护照号码'}).then(function (text) {
|
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms',{representative_id:text}).then(function () {
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/query/alipayOnline_gms_json').then(function (resp) {
|
|
|
|
|
$scope.alipayOnline_gms_json = resp.data;
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: '是否使用该商户的现有信息进件?',
|
|
|
|
|
json:$scope.alipayOnline_gms_json
|
|
|
|
|
}).then(function () {
|
|
|
|
|
commonDialog.inputText({title: '请输入商户身份证或护照号码'}).then(function (text) {
|
|
|
|
|
$http.post('/sys/partners/' + $scope.partner.client_moniker + '/register/alipayOnline_gms', {representative_id: text}).then(function () {
|
|
|
|
|
commonDialog.alert({title: 'Success', content: '提示:AlipayOnline进件成功', type: 'success'});
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: "进件失败:" + resp.data.message, type: 'error'});
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
$scope.queryAlipayOnlineGms = function () {
|
|
|
|
|
$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 () {
|
|
|
|
|
if (!$scope.paymentInfo) {
|
|
|
|
|
return;
|
|
|
|
@ -1701,9 +1726,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
|
|
|
|
|
var info = [];
|
|
|
|
|
$scope.decideCompliance = function (name) {
|
|
|
|
|
var keywords = ['education','financial' ,'train','immigrant','invest',
|
|
|
|
|
'律师咨询','会计事务所', '移民', '留学','娱乐','金融','地产','投资'];
|
|
|
|
|
for(var i = 0; i < keywords.length; i++){
|
|
|
|
|
var keywords = ['education', 'financial', 'train', 'immigrant', 'invest',
|
|
|
|
|
'律师咨询', '会计事务所', '移民', '留学', '娱乐', '金融', '地产', '投资'];
|
|
|
|
|
for (var i = 0; i < keywords.length; i++) {
|
|
|
|
|
if (name.indexOf(keywords[i]) != -1) {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -1712,17 +1737,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
};
|
|
|
|
|
$scope.getComplianceInfo = function () {
|
|
|
|
|
if ($scope.paymentInfo.company_name != null) {
|
|
|
|
|
if($scope.decideCompliance($scope.paymentInfo.company_name)) {
|
|
|
|
|
if ($scope.decideCompliance($scope.paymentInfo.company_name)) {
|
|
|
|
|
info.push('Company Name');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ($scope.paymentInfo.short_name != null) {
|
|
|
|
|
if($scope.decideCompliance($scope.paymentInfo.short_name)) {
|
|
|
|
|
info.push('Short Name');
|
|
|
|
|
if ($scope.decideCompliance($scope.paymentInfo.short_name)) {
|
|
|
|
|
info.push('Short Name');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ($scope.paymentInfo.business_structure != null) {
|
|
|
|
|
if($scope.decideCompliance($scope.paymentInfo.business_structure)) {
|
|
|
|
|
if ($scope.decideCompliance($scope.paymentInfo.business_structure)) {
|
|
|
|
|
info.push('Business Structure');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1743,7 +1768,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
&& $scope.paymentInfo.open_status == 5 && info.length > 0) {
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: "Warning",
|
|
|
|
|
contentHtml: $sce.trustAsHtml('本次提交的商户[' + $scope.partner.company_name + '],<span style="color: red">'+ info.toString() +'</span>存在微信渠道不合规信息')
|
|
|
|
|
contentHtml: $sce.trustAsHtml('本次提交的商户[' + $scope.partner.company_name + '],<span style="color: red">' + info.toString() + '</span>存在微信渠道不合规信息')
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$scope.saveChannel(channel);
|
|
|
|
|
})
|
|
|
|
@ -1792,16 +1817,16 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
if (!$scope.paymentInfo) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var channelLink = 'enable_'+channel+'_link';
|
|
|
|
|
var channelLink = 'enable_' + channel + '_link';
|
|
|
|
|
if (!$scope.init[channelLink]) {
|
|
|
|
|
$scope.init[channelLink] = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/'+channel, {allow: $scope.paymentInfo[channelLink]}).then(function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/' + channel, {allow: $scope.paymentInfo[channelLink]}).then(function () {
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Failed to change '+channelLink+' permission status',
|
|
|
|
|
title: 'Failed to change ' + channelLink + ' permission status',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
});
|
|
|
|
@ -1844,7 +1869,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
title: 'Confirm',
|
|
|
|
|
content: content
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$http.put('/sys/partners/'+ $scope.partner.client_moniker + '/cb_bankpay/'+ key +'/channel_id', {channel_id: channel}).then(function (resp) {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/cb_bankpay/' + key + '/channel_id', {channel_id: channel}).then(function (resp) {
|
|
|
|
|
commonDialog.alert({type: 'success', title: 'Success', content: '修改成功'});
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
|
}, function (resp) {
|
|
|
|
@ -1857,16 +1882,16 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
if (!$scope.paymentInfo) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var channelNotice = 'enable_'+channel+'_email_notice';
|
|
|
|
|
var channelNotice = 'enable_' + channel + '_email_notice';
|
|
|
|
|
if (!$scope.init[channelNotice]) {
|
|
|
|
|
$scope.init[channelNotice] = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/'+channel+'/email_notice', {allow: $scope.paymentInfo[channelNotice]}).then(function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/' + channel + '/email_notice', {allow: $scope.paymentInfo[channelNotice]}).then(function () {
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Failed to change '+channelNotice+' permission status',
|
|
|
|
|
title: 'Failed to change ' + channelNotice + ' permission status',
|
|
|
|
|
content: resp.data.message,
|
|
|
|
|
type: 'error'
|
|
|
|
|
});
|
|
|
|
@ -2090,9 +2115,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('clientSubMerchantIdLogCtrl', ['$scope', '$http', 'logs', function ($scope, $http, logs) {
|
|
|
|
|
$scope.logs = logs.data;
|
|
|
|
|
$scope.logs = logs.data;
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('partnerSubCtrl', ['$scope', '$http', '$uibModal', function ($scope, $http, $uibModal) {
|
|
|
|
|
$scope.toShow = false;
|
|
|
|
|
$scope.newSubClient = function () {
|
|
|
|
|
$uibModal.open({
|
|
|
|
|
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.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 () {
|
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/bank_account').then(function (resp) {
|
|
|
|
|
$scope.bankaccount = resp.data;
|
|
|
|
@ -2159,7 +2198,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: '启用收支分离模式清算将使消费者支付手续费模式失效,请确认是否切换?'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/surcharge_mode', {surcharge_mode:'distributed'}).then(function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/surcharge_mode', {surcharge_mode: 'distributed'}).then(function () {
|
|
|
|
|
commonDialog.alert({title: 'Success', content: '已切换为收支分离模式', type: 'success'});
|
|
|
|
|
$scope.partner.surcharge_mode = 'distributed';
|
|
|
|
|
$scope.getBalance();
|
|
|
|
@ -2167,12 +2206,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}else {
|
|
|
|
|
} else {
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: '请确认是否切换成净值清算模式?'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/surcharge_mode', {surcharge_mode:'balance'}).then(function () {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/surcharge_mode', {surcharge_mode: 'balance'}).then(function () {
|
|
|
|
|
commonDialog.alert({title: 'Success', content: '已切换为净值清算模式', type: 'success'});
|
|
|
|
|
$scope.partner.surcharge_mode = 'balance';
|
|
|
|
|
}, function (resp) {
|
|
|
|
@ -2213,7 +2252,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
if (!skipClearing) {
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: 'This operation will switch skip clearing status. Are you sure?'
|
|
|
|
|
content: 'This operation will switch skip clearing status. Are you sure?'
|
|
|
|
|
}).then(function () {
|
|
|
|
|
commonDialog.inputText({title: '请输入关闭跳过清算的原因'}).then(function (text) {
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {
|
|
|
|
@ -2224,7 +2263,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
} else {
|
|
|
|
|
commonDialog.confirm({
|
|
|
|
|
title: 'Warning',
|
|
|
|
|
content: 'This operation will switch skip clearing status. Are you sure?',
|
|
|
|
@ -2317,10 +2356,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
};
|
|
|
|
|
$scope.getRates();
|
|
|
|
|
$scope.saveBankAccount = function () {
|
|
|
|
|
if(isNaN($scope.bankaccount.account_no)){
|
|
|
|
|
if (isNaN($scope.bankaccount.account_no)) {
|
|
|
|
|
alert("Account No应输入数字!");
|
|
|
|
|
return;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
;
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/bank_account', $scope.bankaccount).then(function () {
|
|
|
|
|
$scope.getBankAccount();
|
|
|
|
|
}, function (resp) {
|
|
|
|
@ -2380,7 +2420,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
};
|
|
|
|
|
$scope.complianceChangeCheck();
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('surchargeAccountDetailCtrl', ['$scope','$http','balance','partner','transactions','commonDialog', function ($scope, $http, balance, partner, transactions,commonDialog) {
|
|
|
|
|
app.controller('surchargeAccountDetailCtrl', ['$scope', '$http', 'balance', 'partner', 'transactions', 'commonDialog', function ($scope, $http, balance, partner, transactions, commonDialog) {
|
|
|
|
|
$scope.surcharge = angular.copy(balance);
|
|
|
|
|
$scope.transactions = angular.copy(transactions.data);
|
|
|
|
|
$scope.partner = angular.copy(partner);
|
|
|
|
@ -2412,7 +2452,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.params = {};
|
|
|
|
|
}
|
|
|
|
|
$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.getBalance();
|
|
|
|
|
$scope.canAddDetail = false;
|
|
|
|
@ -2751,7 +2794,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
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;
|
|
|
|
@ -2765,7 +2808,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
// alert("Please Locate Merchant Location!");
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
if ($scope.partner.client_pay_type==''){
|
|
|
|
|
if ($scope.partner.client_pay_type == '') {
|
|
|
|
|
alert('请选择商户支付场景')
|
|
|
|
|
}
|
|
|
|
|
$http.post('/sys/partners/' + clientMoniker + '/sub_clients', $scope.partner).then(function () {
|
|
|
|
@ -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.pagination = {};
|
|
|
|
|
$scope.isAll = true;
|
|
|
|
|
$scope.isLevel3All = true;
|
|
|
|
|
$scope.clients = [$scope.partner];
|
|
|
|
|
$scope.showLevel3Clients = false;
|
|
|
|
|
|
|
|
|
|
$scope.today = new Date();
|
|
|
|
|
$scope.chooseToday = function () {
|
|
|
|
@ -2926,15 +2971,41 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.$on('order_refunded', function () {
|
|
|
|
|
$scope.loadTradeLogs();
|
|
|
|
|
});
|
|
|
|
|
$scope.chooseClient = function (clientId) {
|
|
|
|
|
if (clientId == 'all') {
|
|
|
|
|
$scope.chooseClient = function (client) {
|
|
|
|
|
if (client == 'all') {
|
|
|
|
|
$scope.params.client_ids = angular.copy($scope.clientIds);
|
|
|
|
|
$scope.isAll = true;
|
|
|
|
|
$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 {
|
|
|
|
|
$scope.chooseClientId = clientId;
|
|
|
|
|
$scope.params.client_ids = [clientId];
|
|
|
|
|
$scope.chooseClientId = client.client_id;
|
|
|
|
|
$scope.params.client_ids = [client.client_id];
|
|
|
|
|
$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();
|
|
|
|
|
};
|
|
|
|
@ -2947,6 +3018,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.clientIds = [];
|
|
|
|
|
$scope.clients.forEach(function (client) {
|
|
|
|
|
$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);
|
|
|
|
|
//console.log($rootScope.currentUser.client.clientList);
|
|
|
|
@ -2985,9 +3061,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
app.controller('partnerDeviceCtrl', ['$scope', '$http', 'orderService', 'commonDialog', 'refunder','$uibModal', function ($scope,$http, orderService, commonDialog, refunder,$uibModal) {
|
|
|
|
|
app.controller('partnerDeviceCtrl', ['$scope', '$http', 'orderService', 'commonDialog', 'refunder', '$uibModal', function ($scope, $http, orderService, commonDialog, refunder, $uibModal) {
|
|
|
|
|
|
|
|
|
|
$scope.pagination = {};
|
|
|
|
|
$scope.pagination = {};
|
|
|
|
|
/**
|
|
|
|
|
* 查看设备
|
|
|
|
|
* @param page
|
|
|
|
@ -3155,7 +3231,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('newDeviceDialogCtrl', ['$scope', '$http', 'clientMoniker', function ($scope, $http,clientMoniker) {
|
|
|
|
|
app.controller('newDeviceDialogCtrl', ['$scope', '$http', 'clientMoniker', function ($scope, $http, clientMoniker) {
|
|
|
|
|
$scope.save = function (form) {
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
|
if (form.$invalid) {
|
|
|
|
@ -3247,11 +3323,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
|
|
|
|
|
if ($scope.data.users.length == 0) {
|
|
|
|
|
$scope.errmsg = "请选择至少一位BD";
|
|
|
|
|
}
|
|
|
|
|
else if ($scope.data.start_date == undefined) {
|
|
|
|
|
} else if ($scope.data.start_date == undefined) {
|
|
|
|
|
$scope.errmsg = "执行开始日期不能为空";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
} else {
|
|
|
|
|
var isValid = true;
|
|
|
|
|
var total = 0;
|
|
|
|
|
$scope.data.users.forEach(function (e) {
|
|
|
|
@ -3591,7 +3665,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
detail: ['$http', '$stateParams', function ($http) {
|
|
|
|
|
return $http.get('/analysis/partner_card/' + client_id + '/settlement_logs/' + detail_id);
|
|
|
|
|
}],
|
|
|
|
|
detail_id:detail_id
|
|
|
|
|
detail_id: detail_id
|
|
|
|
|
},
|
|
|
|
|
size: 'lg'
|
|
|
|
|
});
|
|
|
|
@ -3659,7 +3733,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
detail: ['$http', '$stateParams', function ($http) {
|
|
|
|
|
return $http.get('/analysis/partner_card/' + client_id + '/settlement_logs/' + detail_id);
|
|
|
|
|
}],
|
|
|
|
|
detail_id:detail_id
|
|
|
|
|
detail_id: detail_id
|
|
|
|
|
},
|
|
|
|
|
size: 'lg'
|
|
|
|
|
});
|
|
|
|
@ -3667,17 +3741,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.chooseLast7Days();
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('managerSettlementDetailCtrl', ['$scope', 'detail','detail_id','$http', function ($scope, detail,detail_id,$http) {
|
|
|
|
|
app.controller('managerSettlementDetailCtrl', ['$scope', 'detail', 'detail_id', '$http', function ($scope, detail, detail_id, $http) {
|
|
|
|
|
$scope.ctrl = {channel: null};
|
|
|
|
|
$scope.show = true;
|
|
|
|
|
$scope.report = detail.data;
|
|
|
|
|
$scope.report.total_charge = Decimal.add($scope.report.total_charge,$scope.report.tax_amount).toFixed(2);
|
|
|
|
|
angular.forEach($scope.report.channels,function (e) {
|
|
|
|
|
e.total_charge = Decimal.add(e.tax_amount,e.total_charge).toFixed(2);
|
|
|
|
|
$scope.report.total_charge = Decimal.add($scope.report.total_charge, $scope.report.tax_amount).toFixed(2);
|
|
|
|
|
angular.forEach($scope.report.channels, function (e) {
|
|
|
|
|
e.total_charge = Decimal.add(e.tax_amount, e.total_charge).toFixed(2);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$scope.channelAndDayOfAnalysis = function () {
|
|
|
|
|
$http.get('/analysis/partner_card/settlement_logs/' + detail_id+'/analysis/'+$scope.ctrl.channel).then(function (resp) {
|
|
|
|
|
$http.get('/analysis/partner_card/settlement_logs/' + detail_id + '/analysis/' + $scope.ctrl.channel).then(function (resp) {
|
|
|
|
|
$scope.channelAndDayMap = resp.data;
|
|
|
|
|
$scope.index = 0;
|
|
|
|
|
})
|
|
|
|
@ -3969,7 +4043,7 @@ 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) {
|
|
|
|
|
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();
|
|
|
|
|
$scope.timezone = timezone.configs();
|
|
|
|
@ -3977,7 +4051,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
|
|
|
|
|
$scope.saveRpayAppliy = function (form) {
|
|
|
|
|
var merchantInfo = {};
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
|
if (form.$invalid) {
|
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
|
if (key.indexOf('$') < 0) {
|
|
|
|
@ -3986,13 +4060,13 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
|
if(item !=null) {
|
|
|
|
|
if(item.$name !=null) {
|
|
|
|
|
merchantInfo[key] = item.$modelValue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
|
if (item != null) {
|
|
|
|
|
if (item.$name != null) {
|
|
|
|
|
merchantInfo[key] = item.$modelValue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', merchantInfo).then(function (resp) {
|
|
|
|
|
$scope.apply_sub_merchant_id = resp.data;
|
|
|
|
@ -4015,17 +4089,17 @@ 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) {
|
|
|
|
|
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();
|
|
|
|
|
$scope.subMerchantInfo = angular.copy(subMerchantInfo);
|
|
|
|
|
if(!$scope.subMerchantInfo.abn){
|
|
|
|
|
if (!$scope.subMerchantInfo.abn) {
|
|
|
|
|
$scope.subMerchantInfo.abn = $scope.subMerchantInfo.acn;
|
|
|
|
|
}
|
|
|
|
|
var vouchers={};
|
|
|
|
|
var vouchers = {};
|
|
|
|
|
|
|
|
|
|
$scope.directors={};
|
|
|
|
|
$scope.executives={};
|
|
|
|
|
$scope.directors = {};
|
|
|
|
|
$scope.executives = {};
|
|
|
|
|
$scope.industry = '';
|
|
|
|
|
$scope.business_content = '';
|
|
|
|
|
var merchantInfo = {};
|
|
|
|
@ -4332,7 +4406,7 @@ 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) {
|
|
|
|
|
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();
|
|
|
|
|
$scope.subMerchantInfo = angular.copy(subMerchantInfo);
|
|
|
|
@ -4340,7 +4414,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
var merchantInfo = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.saveYeepayAdd = function (form) {
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
|
if (form.$invalid) {
|
|
|
|
@ -4380,17 +4453,17 @@ 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) {
|
|
|
|
|
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();
|
|
|
|
|
$scope.subMerchantInfo = angular.copy(subMerchantInfo);
|
|
|
|
|
if(!$scope.subMerchantInfo.abn){
|
|
|
|
|
if (!$scope.subMerchantInfo.abn) {
|
|
|
|
|
$scope.subMerchantInfo.abn = $scope.subMerchantInfo.acn;
|
|
|
|
|
}
|
|
|
|
|
var vouchers={};
|
|
|
|
|
var vouchers = {};
|
|
|
|
|
|
|
|
|
|
$scope.directors={};
|
|
|
|
|
$scope.executives={};
|
|
|
|
|
$scope.directors = {};
|
|
|
|
|
$scope.executives = {};
|
|
|
|
|
$scope.industry = '';
|
|
|
|
|
$scope.business_content = '';
|
|
|
|
|
var merchantInfo = {};
|
|
|
|
@ -4700,10 +4773,10 @@ 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.clientPermission = {client_moniker: $scope.partner.client_moniker};
|
|
|
|
|
$scope.loadPermissionList = function () {
|
|
|
|
|
var params = angular.copy($scope.clientPermission);
|
|
|
|
|
$http.get('/sys/permission/list',{params:params}).then(function (resp) {
|
|
|
|
|
$http.get('/sys/permission/list', {params: params}).then(function (resp) {
|
|
|
|
|
$scope.permissionList = resp.data;
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
@ -4713,16 +4786,16 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
$scope.switchValid = function (permission) {
|
|
|
|
|
$scope.clientPermission.isValid = permission.is_valid;
|
|
|
|
|
var params = angular.copy($scope.clientPermission);
|
|
|
|
|
$http.post('/sys/permission/'+permission.id,params).then(function (resp) {
|
|
|
|
|
},function (resp) {
|
|
|
|
|
$http.post('/sys/permission/' + permission.id, params).then(function (resp) {
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
$scope.init = function () {
|
|
|
|
|
var params = {client_moniker:$scope.partner.client_moniker};
|
|
|
|
|
$http.post('/sys/permission/init',params).then(function (resp) {
|
|
|
|
|
},function (resp) {
|
|
|
|
|
var params = {client_moniker: $scope.partner.client_moniker};
|
|
|
|
|
$http.post('/sys/permission/init', params).then(function (resp) {
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|