master
yuan 8 years ago
parent 5f95e05c4c
commit f451ee4117

@ -1484,6 +1484,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}]); }]);
app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog', function ($scope, $rootScope, $http, $uibModal, commonDialog) { app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog', function ($scope, $rootScope, $http, $uibModal, commonDialog) {
$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};
$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;
@ -1501,17 +1502,30 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}); });
}; };
$scope.skipClearing = function (skipClearing) { $scope.skipClearing = function (skipClearing) {
if (!$scope.init.skip_clearing) {
$scope.init.skip_clearing = true;
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {skip_clearing: skipClearing}).then(function (resp) { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {skip_clearing: skipClearing}).then(function (resp) {
$scope.getBankAccount();
}); });
}; };
$scope.taxInSurcharge = function (taxInSurcharge) { $scope.taxInSurcharge = function (taxInSurcharge) {
if (!$scope.init.tax_in_surcharge) {
$scope.init.tax_in_surcharge = true;
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/tax_in_surcharge', {tax_in_surcharge: taxInSurcharge}).then(function (resp) { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/tax_in_surcharge', {tax_in_surcharge: taxInSurcharge}).then(function (resp) {
$scope.getBankAccount();
}) })
}; };
$scope.customerTaxFree = function (customerTaxFree) { $scope.customerTaxFree = function (customerTaxFree) {
if (!$scope.init.customer_tax_free) {
$scope.init.customer_tax_free = true;
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/customer_tax_free', {customer_tax_free: customerTaxFree}).then(function (resp) { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/customer_tax_free', {customer_tax_free: customerTaxFree}).then(function (resp) {
$scope.getBankAccount();
}) })
}; };
$scope.settleHours = [{value: undefined, label: 'Default(24:00, GMT+10)'}]; $scope.settleHours = [{value: undefined, label: 'Default(24:00, GMT+10)'}];

@ -32,11 +32,6 @@
height: 100px; height: 100px;
margin-left: 20px; margin-left: 20px;
} }
.star_position{
position: absolute;
right: 0px;
top: -1px;
}
</style> </style>
<section class="content-header"> <section class="content-header">
<h1> <h1>
@ -520,12 +515,7 @@
</div> </div>
</div> </div>
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
<label class="control-label col-sm-4">E-mail <label class="control-label col-sm-4">E-mail</label>
<span ng-if="('10'|withRole)">
<i style="cursor: pointer" ng-click="addSub()" ng-if="!partner.unsubscribe" class="fa fa-star text-yellow star_position"></i>
<i style="cursor: pointer" ng-click="removeSub()" ng-if="partner.unsubscribe" class="fa fa-star-o text-yellow star_position"></i>
</span>
</label>
<div class="col-sm-8"> <div class="col-sm-8">
<p class="form-control-static"> <p class="form-control-static">
@ -534,6 +524,10 @@
ng-click="resendApproveEmail()"> ng-click="resendApproveEmail()">
<i class="fa fa-envelope"></i> Resend Email <i class="fa fa-envelope"></i> Resend Email
</a> </a>
<span ng-if="('10'|withRole)">
<i style="cursor: pointer" ng-click="addSub()" ng-if="!partner.unsubscribe" class="fa fa-star text-yellow"></i>
<i style="cursor: pointer" ng-click="removeSub()" ng-if="partner.unsubscribe" class="fa fa-star-o text-yellow"></i>
</span>
</p> </p>
</div> </div>
</div> </div>

Loading…
Cancel
Save