修改‘合伙人提成’与‘BD提成’页面年份显示

master
yuan 7 years ago
parent 9da8529aa9
commit 345c48ca8c

@ -17,11 +17,18 @@
</div>
<div class="box box-default" ng-if="'1000'|withRole">
<div class="box-header">
<div uib-dropdown>
<!-- <div uib-dropdown>
<button class="btn btn-primary" uib-dropdown-toggle type="button" ng-bind="params.year"></button>
<ul class="dropdown-menu" uib-dropdown-menu role="menu">
<li ng-repeat="year in availableYears" role="menuitem"><a role="button" ng-click="getYearReports(year)" ng-bind="year"></a></li>
</ul>
</div>-->
<div ng-repeat="year in availableYears" style="display: inline">
<button class="btn btn-info"
ng-click="getYearReports(year)"
ng-bind="year"
ng-class="{'active':year == params.year}"
></button>
</div>
</div>
<div class="box-body">

@ -93,15 +93,17 @@ define(['angular','../../analysis/org/analysis-org'], function (angular) {
})
})
};
$scope.params = {year: new Date()};
$scope.availableYears = [new Date().getFullYear() - 1, new Date().getFullYear()];
$scope.params = {};
$scope.months = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
$scope.loadAvailableMonths = function () {
$http.get('/sys/citypartner_prizes/months', {params: {year: $scope.params.year.getFullYear()}}).then(function (resp) {
$scope.loadAvailableMonths = function (year) {
$scope.params.year = year;
$http.get('/sys/citypartner_prizes/months', {params: {year: $scope.params.year}}).then(function (resp) {
$scope.availableMonths = resp.data;
});
};
$scope.loadAvailableMonths();
$scope.loadAvailableMonths(new Date().getFullYear());
$scope.hasReport = function (mon) {
var has = false;
angular.forEach($scope.availableMonths, function (m) {
@ -115,7 +117,7 @@ define(['angular','../../analysis/org/analysis-org'], function (angular) {
if(mon){
$scope.params.month = mon;
}
var monthStr = $scope.params.year.getFullYear() + '-' + $scope.params.month;
var monthStr = $scope.params.year + '-' + $scope.params.month;
$state.go('analysis_org.commission.month', {monthStr: monthStr})
};

@ -16,10 +16,18 @@
</div>
<div class="box box-warning">
<div class="box-header">
<input type="text" class="hidden" uib-datepicker-popup="yyyy" ng-model="params.year" is-open="ctrl.viewyear"
<!--<input type="text" class="hidden" uib-datepicker-popup="yyyy" ng-model="params.year" is-open="ctrl.viewyear"
datepicker-options="{minMode: 'year'}" ng-change="loadAvailableMonths()"
placeholder="Select Year">
<span ng-bind="params.year.getFullYear()" ng-click="ctrl.viewyear=true"></span>
<span ng-bind="params.year.getFullYear()" ng-click="ctrl.viewyear=true"></span>-->
<div ng-repeat="year in availableYears" style="display: inline">
<button class="btn btn-info"
ng-click="loadAvailableMonths(year)"
ng-bind="year"
ng-class="{'active':year == params.year}"
></button>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12" ng-repeat="mon in availableMonths">

Loading…
Cancel
Save