ui improve for settle_tasks

master
yixian 4 years ago
parent b33e8d5f12
commit 86eb49834e

@ -566,7 +566,7 @@ margin-bottom: 10%;"/>
</li>
<li ui-sref-active="active"
ng-if="('settleTasks'|withModule)&&((currentUser.org_id==null)||((currentUser.org_id==1)&&('1000000000'|withRole))) && roleNow !='compliance'">
<a ui-sref="estimateAnalysis" ui-sref-opts="{reload:true}">
<a ui-sref="estimateAnalysis">
<i class="fa fa fa-money"></i> <span>清算任务|Settle Tasks</span>
</a>
</li>

@ -40,6 +40,12 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
if (!$scope.currentTasks) {
$scope.currentTasks = [];
}
} else {
if (!ctrl.update_task) {
ctrl.update_task = $interval(function () {
$scope.checkProgressStatus();
})
}
}
let finished = $scope.progress.finished_sequence;
if ($scope.currentTasks && finished) {
@ -149,7 +155,12 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}, function (resp) {
commonDialog.alert({type: 'error', title: 'Error', content: resp.data.message})
})
}
};
$scope.$on('$destroy', function () {
if (ctrl.update_task) {
$interval.cancel(ctrl.update_task)
}
})
}]);
app.controller('batchAddMerchantsDialogCtrl', ['$scope', '$http', function ($scope, $http) {

@ -983,7 +983,7 @@
</a>
</div>
<div ng-if="('settleReport'|withModule) && (role !='compliance')" class="col-sm-2 col-xs-6">
<a ui-sref="analysis_report.settle_report" ui-sref-opts="{reload:true}">
<a ui-sref="analysis_report.settle_report">
<div class="description-block">
<img src="/static/images/main_menu/settle_report.png"/>
<div class="description-text">

Loading…
Cancel
Save