|
|
@ -1733,6 +1733,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog', '$uibModal', '$sce', function ($scope, $http, $state, commonDialog, $uibModal, $sce) {
|
|
|
|
app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog', '$uibModal', '$sce', function ($scope, $http, $state, commonDialog, $uibModal, $sce) {
|
|
|
|
|
|
|
|
$scope.convertExtParams = [];
|
|
|
|
$scope.copyHfLink = function () {
|
|
|
|
$scope.copyHfLink = function () {
|
|
|
|
var e = document.getElementById("cpbt");
|
|
|
|
var e = document.getElementById("cpbt");
|
|
|
|
e.select();
|
|
|
|
e.select();
|
|
|
@ -1765,7 +1766,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.loadPartnerPaymentInfo = function () {
|
|
|
|
$scope.loadPartnerPaymentInfo = function () {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) {
|
|
|
|
|
|
|
|
$scope.extParams = {};
|
|
|
|
$scope.paymentInfo = resp.data;
|
|
|
|
$scope.paymentInfo = resp.data;
|
|
|
|
|
|
|
|
$scope.extParams = $scope.paymentInfo?JSON.parse($scope.paymentInfo.ext_params):null;
|
|
|
|
|
|
|
|
$scope.convertExtParams = $scope.extParamsEditFlags()
|
|
|
|
$scope.ctrl.editSubMerchant = false;
|
|
|
|
$scope.ctrl.editSubMerchant = false;
|
|
|
|
$scope.ctrl.editAliSubMerchant = false;
|
|
|
|
$scope.ctrl.editAliSubMerchant = false;
|
|
|
|
$scope.ctrl.editMaxOrderAmount = false;
|
|
|
|
$scope.ctrl.editMaxOrderAmount = false;
|
|
|
@ -1774,6 +1778,27 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.ctrl.editRefundCreditLine = false;
|
|
|
|
$scope.ctrl.editRefundCreditLine = false;
|
|
|
|
})
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
$scope.extParamsEditFlags = function(){
|
|
|
|
|
|
|
|
var paramList = []
|
|
|
|
|
|
|
|
if($scope.extParams != null){
|
|
|
|
|
|
|
|
for(var key in $scope.extParams){
|
|
|
|
|
|
|
|
var obj = {}
|
|
|
|
|
|
|
|
console.log(1)
|
|
|
|
|
|
|
|
if(typeof $scope.extParams[key] != 'boolean'){
|
|
|
|
|
|
|
|
obj.name = key;
|
|
|
|
|
|
|
|
obj.value = $scope.extParams[key];
|
|
|
|
|
|
|
|
obj.type = 'string';
|
|
|
|
|
|
|
|
obj.flag =false;
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
obj.name = key;
|
|
|
|
|
|
|
|
obj.value = $scope.extParams[key];
|
|
|
|
|
|
|
|
obj.type = 'boolean'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
paramList.push(obj)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return paramList;
|
|
|
|
|
|
|
|
};
|
|
|
|
$scope.qrConfig = {currency: 'AUD'};
|
|
|
|
$scope.qrConfig = {currency: 'AUD'};
|
|
|
|
$scope.reloadQRCode = function () {
|
|
|
|
$scope.reloadQRCode = function () {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/qrcode', {params: $scope.qrConfig}).then(function (resp) {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/qrcode', {params: $scope.qrConfig}).then(function (resp) {
|
|
|
@ -2462,6 +2487,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
})
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.extChangeParam = function(name,value){
|
|
|
|
|
|
|
|
var flag = true;
|
|
|
|
|
|
|
|
$scope.convertExtParams.forEach(function (params) {
|
|
|
|
|
|
|
|
if(params.name == name && value=='' && params.type == 'string'){
|
|
|
|
|
|
|
|
flag = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if(flag){
|
|
|
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/ext_config',{key:name,value:value}).then(function () {
|
|
|
|
|
|
|
|
$scope.loadPartnerPaymentInfo();
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
app.controller('clientSubMerchantIdLogCtrl', ['$scope', '$http', 'logs', function ($scope, $http, logs) {
|
|
|
|
app.controller('clientSubMerchantIdLogCtrl', ['$scope', '$http', 'logs', function ($scope, $http, logs) {
|
|
|
|
$scope.logs = logs.data;
|
|
|
|
$scope.logs = logs.data;
|
|
|
@ -2689,6 +2729,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.getBankAccount();
|
|
|
|
$scope.getBankAccount();
|
|
|
|
})
|
|
|
|
})
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.switchPreSettle = function (presettle) {
|
|
|
|
|
|
|
|
if (!$scope.init.enable_presettle) {
|
|
|
|
|
|
|
|
$scope.init.enable_presettle = true;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/presettle', {enable_presettle: presettle}).then(function (resp) {
|
|
|
|
|
|
|
|
$scope.getBankAccount();
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.customerTaxFree = function (customerTaxFree) {
|
|
|
|
$scope.customerTaxFree = function (customerTaxFree) {
|
|
|
|
if (!$scope.init.customer_tax_free) {
|
|
|
|
if (!$scope.init.customer_tax_free) {
|
|
|
|
$scope.init.customer_tax_free = true;
|
|
|
|
$scope.init.customer_tax_free = true;
|
|
|
|