Commit 6fd22896 authored by neo's avatar neo

[DEV] filter approval by org

parent 2778b27a
......@@ -123,25 +123,10 @@
if ($scope.checkedOrgs && _.keys($scope.checkedOrgs).length > 0) {
temp = _.filter(temp, function (i) {
return _.contains(_.values($scope.checkedOrgs), i.organizationName);
return _.contains(_.keys($scope.checkedOrgs), i.organizationId);
});
}
if (vatSessionService.year) {
if ($scope.serviceTypeId === enums.serviceType.VAT) {
temp = _.filter(temp, function (i) {
if (i.period == vatSessionService.month) {
return i;
}
});
}
else if ($scope.serviceTypeId === enums.serviceType.CIT) {
temp = _.filter(temp, function (i) {
return vatSessionService.year == i.year;
});
}
}
if ($scope.checkedRegions && $scope.checkedRegions.length > 0) {
temp = _.filter(temp, function (i) {
return _.contains(_.pluck($scope.checkedRegions, 'name'), i.region);
......@@ -152,12 +137,7 @@
return _.contains(_.pluck($scope.checkedStatus, 'name'), i.status);
});
}
if ($scope.searchKeyword !== undefined && $scope.searchKeyword.length > 0) {
temp = _.filter(temp, function (i) {
return (i.name.toUpperCase().indexOf($scope.searchKeyword.toUpperCase()) > -1 || i.organizationName.toUpperCase().indexOf($scope.searchKeyword.toUpperCase()) > -1);
// return $scope.selectedService.id == i.serviceTypeID
})
}
var counter = 0;
var setWarningToTrue = false;
......@@ -259,6 +239,39 @@
};
$scope.toggleItemSub = function (item, parent) {
// orgDisplay.showBusy();
if (item.isChecked) {
if (!item.dimensionId) {
$scope.checkedOrgs[item.id] = item.name;
} else {
item.subOrgs.forEach(function (org) {
$scope.checkedOrgs[org.id] = org.name;
org.isChecked = true;
});
}
} else {
if (!item.dimensionId) {
delete $scope.checkedOrgs[item.id];
} else {
item.subOrgs.forEach(function (org) {
org.isChecked = false;
delete $scope.checkedOrgs[org.id];
});
}
}
$scope.checkedIds = _.keys($scope.checkedOrgs);
if ($scope.serviceTypeId !== enums.serviceType.AssetsManage) {
$scope.query();
}
// orgDisplay.hideBusy();
};
$scope.changeDate = function (e) {
if (e && e.date) {
var isDateUpdated = false;
......
......@@ -2,17 +2,7 @@
<div class="app-overview-left">
<div class="group-operate-icon" style="margin-bottom: 5px;">
<span class="operate-icon left-first" title="机构" ng-click="dimensionOrgShow('','orgName')"><i
class="fa fa-sitemap fa-2x orgName" aria-hidden="true"></i></span><span class="operate-icon"
title="事业部"
ng-click="dimensionOrgShow('businessUnitID','businessUnitName')">
<i class="fa fa-bank fa-2x businessUnitName" aria-hidden="true"></i>
</span><span class="operate-icon" title="区域" ng-click="dimensionOrgShow('areaID','areaName')">
<i class="material-icons areaName">place</i>
</span><span class="operate-icon" title="机构层级" ng-click="dimensionOrgShow('structureID','structureName')">
<i class="fa fa-mortar-board fa-2x structureName"></i>
</span><span class="operate-icon" title="行业" ng-click="dimensionOrgShow('industryID','industryName')">
<i class="fa fa-bars fa-2x industryName" aria-hidden="true"></i>
</span>
class="fa fa-sitemap fa-2x orgName" aria-hidden="true"></i></span>
</div>
<perfect-scrollbar class="scroller" wheel-propagation="true" wheel-speed="1" min-scrollbar-length="20">
<div ui-tree data-drag-enabled="false">
......@@ -60,9 +50,7 @@
<span style="padding-right:10px;">提审中</span><span class="num-style">{{ongoingNum}}</span>
<span style="padding-right:10px;padding-left:20px;">通过</span><span
class="num-style">{{notBeginNum}}</span>
<span style="padding-right:10px;padding-left:20px;">未通过</span><span
class="num-style">{{completedNum}}</span>
<span style="padding-right:10px;padding-left:20px;">作废</span><span
<span style="padding-right:10px;padding-left:20px;">驳回</span><span
class="num-style">{{completedNum}}</span>
</div>
<div class="task-list">
......@@ -71,14 +59,6 @@
</div>
<div class="new-right-body">
<div class="right-header">
<div class="col-lg-3 col-md-3" style="padding-left:20px;">
<div class="search-container">
<input id="txtSmartSearch" class="search-input" type="text" value="" placeholder="提审人"
ng-model="searchKeyword" ng-change="smartSearch(false)"/><span
ng-class="(searchKeyword!==undefined && searchKeyword.length>0)? 'glyphicon glyphicon-remove input-group-addon search-icon':'glyphicon glyphicon-search input-group-addon search-icon'"
search ng-click="smartSearch(true)"></span>
</div>
</div>
<div class="overview-picker">
<input type="text" id="overviewDatepicker" class="datepicker vat-subheader" style="width:120px;"
readonly="readonly"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment