fix 隐藏后手续费支出和收入、月度充值

master
luoyang 6 years ago
parent 76b7d7a678
commit e589bdc437

@ -49,27 +49,6 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
})
};
$scope.getDetailByMonths();
$scope.surchargeAccountDetail = function (client_moniker,mon) {
$uibModal.open({
templateUrl: '/static/payment/surchargeaccount/templates/client_surcharge_account_dialog.html',
controller: 'accountDetailCtrl',
size: 'lg',
resolve: {
client_moniker: function () {
return client_moniker;
},
month: function () {
return mon;
},
transactions: ['$http', function ($http) {
return $http.get('/client/partner_info/' + client_moniker + '/account/transactions/date?date=' + mon);
}]
}
});
};
}]);
app.controller('surchargeAccountMonthCtrl', ['$scope', '$http', '$filter', '$timeout', '$uibModal', 'commonDialog', 'chartParser','$sce',
function ($scope, $http, $filter, $timeout, $uibModal, commonDialog, chartParser, $sce) {
@ -100,7 +79,7 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
};
$scope.surchargeAccountDetail = function (client_moniker,mon) {
$uibModal.open({
templateUrl: '/static/payment/surchargeaccount/templates/partner_surcharge_account_dialog.html',
templateUrl: '/static/payment/surchargeaccount/templates/partner_surcharge_account_month_dialog.html',
controller: 'accountDetailCtrl',
size: 'lg',
resolve: {
@ -145,11 +124,8 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
}]);
app.controller('accountDetailCtrl', ['$scope','$http','transactions','client_moniker','commonDialog','month', function ($scope, $http, transactions,client_moniker,commonDialog,month) {
$scope.transactions = angular.copy(transactions.data);
$scope.canAddDetail = false;
$scope.params = {};
$scope.month = angular.copy(month);
$scope.getBalance = function () {
$http.get('/sys/partners/' + client_moniker + '/surcharge_account').then(function (resp) {
$scope.surcharge = resp.data;
@ -157,33 +133,11 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
};
$scope.getBalance();
$scope.getTransactions = function () {
$http.get('/sys/partners/' + client_moniker + '/account/transactions/date?date=' + $scope.month).then(function (resp) {
$scope.transactions = resp.data;
});
}
$scope.addDetail = function () {
$scope.canAddDetail = true;
};
$scope.cancel = function () {
$scope.canAddDetail = false;
$scope.params = {};
}
$scope.save = function () {
$http.post('/sys/partners/' + client_moniker + '/account/save', {amount:$scope.params.amount,remark:$scope.params.remark}).then(function (resp) {
$scope.getTransactions();
$scope.getBalance();
$scope.canAddDetail = false;
$scope.params = {};
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
});
}
}]);

@ -47,8 +47,8 @@
<th>商户编号</th>
<th>Short Name</th>
<th>Total Surcharge</th>
<th>充值总额</th>
<th>支出总额</th>
<!--<th>充值总额</th>-->
<!--<th>支出总额</th>-->
<th>是否结清</th>
<!--<th>余额</th>-->
<th>操作</th>
@ -63,8 +63,8 @@
</td>
<td ng-bind="details.short_name" style="vertical-align:middle"></td>
<td ng-bind="details.total_surcharge | currency:'$'"></td>
<td ng-bind="details.credit_amount|currency:'$'" style="color: green;vertical-align:middle" ></td>
<td ng-bind="details.debit_amount|currency:'$'" style="color: red;vertical-align:middle"></td>
<!--<td ng-bind="details.credit_amount|currency:'$'" style="color: green;vertical-align:middle" ></td>-->
<!--<td ng-bind="details.debit_amount|currency:'$'" style="color: red;vertical-align:middle"></td>-->
<td style="vertical-align:middle">
<span ng-if="details.is_valid">已结清</span>
<span ng-if="!details.is_valid">未付款</span>

@ -0,0 +1,71 @@
<div class="modal-header">
<h4>Surcharge Account Detail{{partner.client_moniker?'('+partner.client_moniker+')':''}}</h4>
</div>
<div class="modal-body">
<div class="box box-warning">
<div class="box-body" style="font-size: 35px;text-align: right">
{{surcharge.balance|currency:'AUD'}}
</div>
</div>
<div class="box box-default">
<div class="box-header">Credits</div>
<div class="box-body">
<div class="table-responsive col-sm-12">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Num</th>
<th>Create Time</th>
<th>Amount</th>
<th>Remark</th>
<th>Operator</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in transactions|propsFilter:{type:'Credit'}:true">
<td>{{$index+1}}</td>
<td ng-bind="tr.create_time|date:'yyyy-MM-dd HH:mm:ss'"></td>
<td ng-bind="tr.amount|currency:'AUD'"></td>
<td ng-bind="tr.remark"></td>
<td ng-bind="tr.operator_displayname"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="box box-default">
<div class="box-header">Debits</div>
<div class="box-body">
<div class="table-responsive col-sm-12">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Num</th>
<th>Settle Date</th>
<th>Amount</th>
<th>Total Surcharge</th>
<th>Tax Amount</th>
<th>Remark</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in transactions|propsFilter:{type:'Debit'}:true">
<td>{{$index+1}}</td>
<td ng-bind="tr.settle_date|date:'yyyy-MM-dd'"></td>
<td ng-bind="tr.amount|currency:'AUD'"></td>
<td ng-bind="tr.total_surcharge|currency:'AUD'"></td>
<td ng-bind="tr.tax_amount|currency:'AUD'"></td>
<td>
{{tr.remark}}
<a ng-href="/sys/clean_logs/{{tr.client_id}}/settlement_logs/{{tr.clearing_detail_id}}/export" target="_blank" title="Download">
<i class="fa fa-download"></i>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
Loading…
Cancel
Save