交易流水,合伙人,监控,增加组织筛选

master
yuan 7 years ago
parent 9730e6be3d
commit cbcffe9a97

@ -8,7 +8,7 @@ import java.util.Date;
* Created by yixian on 2016-11-08. * Created by yixian on 2016-11-08.
*/ */
public interface ClientRatesAnalysisService { public interface ClientRatesAnalysisService {
JSONObject listAnalysisOfBDUsers(JSONObject manager, Integer orgId, Date beginDate, Date endDate); JSONObject listAnalysisOfBDUsers(JSONObject manager, String orgId,String orgIds, Date beginDate, Date endDate);
JSONObject listAllClientRates(Integer orgId, ClientRateQueryBean query); JSONObject listAllClientRates(Integer orgId, ClientRateQueryBean query);

@ -8,7 +8,7 @@ import java.util.List;
* Created by yishuqian on 27/02/2017. * Created by yishuqian on 27/02/2017.
*/ */
public interface OrgAnalysisService { public interface OrgAnalysisService {
List<JSONObject> getSalesAnalysis(JSONObject params); List<JSONObject> getSalesAnalysis(JSONObject params,JSONObject manager);
List<JSONObject> getPartnersSaleByOrgId(JSONObject params); List<JSONObject> getPartnersSaleByOrgId(JSONObject params);
} }

@ -6,11 +6,13 @@ import au.com.royalpay.payment.manage.analysis.mappers.ClientRatesAnalysisMapper
import au.com.royalpay.payment.manage.mappers.log.ClientReviewLogMapper; import au.com.royalpay.payment.manage.mappers.log.ClientReviewLogMapper;
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper; import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.organizations.core.OrgManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole; import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -40,20 +42,25 @@ public class ClientRatesAnalysisServiceImpl implements ClientRatesAnalysisServic
@Autowired(required = false) @Autowired(required = false)
private ClientRateAnalysisEventLoader[] eventLoaders; private ClientRateAnalysisEventLoader[] eventLoaders;
@Resource
private OrgManager orgManager;
@Override @Override
public JSONObject listAnalysisOfBDUsers(JSONObject manager, Integer orgId, Date beginDate, Date endDate) { public JSONObject listAnalysisOfBDUsers(JSONObject manager, String orgId, String orgIds,Date beginDate, Date endDate) {
if (manager.getIntValue("org_id") > 0) {
orgId = manager.getInteger("org_id");
}
JSONObject params = new JSONObject(); JSONObject params = new JSONObject();
if (orgId != null) { if (orgId != null) {
params.put("org_id", orgId); params.put("org_id", orgId);
} }
if (StringUtils.isNotEmpty(orgIds)) {
params.put("org_ids", orgIds);
}
if (ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) { if (ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
params.put("bd_group", manager.getString("manager_id")); params.put("bd_group", manager.getString("manager_id"));
} }
params.put("begin", beginDate); params.put("begin", beginDate);
params.put("end", endDate); params.put("end", endDate);
orgManager.checkOrgIds(manager,params);
JSONObject result = new JSONObject(); JSONObject result = new JSONObject();
List<JSONObject> bdAnalysis = clientRatesAnalysisMapper.analysisRatesForBDUsers(params); List<JSONObject> bdAnalysis = clientRatesAnalysisMapper.analysisRatesForBDUsers(params);
result.put("bds", bdAnalysis); result.put("bds", bdAnalysis);

@ -2,6 +2,7 @@ package au.com.royalpay.payment.manage.analysis.core.impls;
import au.com.royalpay.payment.manage.analysis.core.OrgAnalysisService; import au.com.royalpay.payment.manage.analysis.core.OrgAnalysisService;
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper; import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
import au.com.royalpay.payment.manage.organizations.core.OrgManager;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -16,9 +17,14 @@ public class OrgAnalysisServiceImp implements OrgAnalysisService {
@Resource @Resource
private TransactionAnalysisMapper transactionAnalysisMapper; private TransactionAnalysisMapper transactionAnalysisMapper;
@Resource
private OrgManager orgManager;
@Override @Override
public List<JSONObject> getSalesAnalysis(JSONObject params) { public List<JSONObject> getSalesAnalysis(JSONObject params,JSONObject manager) {
return transactionAnalysisMapper.getOrgTransactionAnalysis(params); orgManager.checkOrgIds(manager,params);
List<JSONObject> OrgTransaction = transactionAnalysisMapper.getOrgTransactionAnalysis(params);
return OrgTransaction;
} }
@Override @Override

@ -34,7 +34,8 @@ public class ClientRatesController {
@RequestMapping("/bd_users") @RequestMapping("/bd_users")
public JSONObject listAnalysisOfBDUsers(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, public JSONObject listAnalysisOfBDUsers(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
@RequestParam(name = "org_id", required = false) Integer orgId, @RequestParam(name = "org_id", required = false) String orgId,
@RequestParam(name = "org_ids", required = false) String orgIds,
@RequestParam String begin, @RequestParam String end) { @RequestParam String begin, @RequestParam String end) {
Date beginDate; Date beginDate;
try { try {
@ -48,7 +49,7 @@ public class ClientRatesController {
} catch (ParseException e) { } catch (ParseException e) {
throw new ParamInvalidException("end", "error.payment.valid.invalid_date_format"); throw new ParamInvalidException("end", "error.payment.valid.invalid_date_format");
} }
return clientRatesAnalysisService.listAnalysisOfBDUsers(manager, orgId, beginDate, endDate); return clientRatesAnalysisService.listAnalysisOfBDUsers(manager,orgId, orgIds, beginDate, endDate);
} }
@RequestMapping("/orgs/all") @RequestMapping("/orgs/all")

@ -23,7 +23,7 @@ public class OrgSaleAnalysisController {
@ManagerMapping(value = "/sales",role = {ManagerRole.DIRECTOR,ManagerRole.OPERATOR,ManagerRole.ADMIN,ManagerRole.FINANCIAL_STAFF}) @ManagerMapping(value = "/sales",role = {ManagerRole.DIRECTOR,ManagerRole.OPERATOR,ManagerRole.ADMIN,ManagerRole.FINANCIAL_STAFF})
public List<JSONObject> getSalesAnalysis(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public List<JSONObject> getSalesAnalysis(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(null); JSONObject params = analysis.toParams(null);
return orgAnalysisService.getSalesAnalysis(params); return orgAnalysisService.getSalesAnalysis(params,manager);
} }
@ManagerMapping(value = "/{org_id}/partners",role = {ManagerRole.DIRECTOR,ManagerRole.OPERATOR,ManagerRole.ADMIN,ManagerRole.FINANCIAL_STAFF}) @ManagerMapping(value = "/{org_id}/partners",role = {ManagerRole.DIRECTOR,ManagerRole.OPERATOR,ManagerRole.ADMIN,ManagerRole.FINANCIAL_STAFF})

@ -28,4 +28,6 @@ public interface OrgManager {
List<JSONObject> listAllOrg(); List<JSONObject> listAllOrg();
JSONObject checkOrg(JSONObject manager, JSONObject params); JSONObject checkOrg(JSONObject manager, JSONObject params);
JSONObject checkOrgIds(JSONObject manager, JSONObject params);
} }

@ -149,4 +149,41 @@ public class OrgManagerImpl implements OrgManager {
return params; return params;
} }
@Override
public JSONObject checkOrgIds(JSONObject manager, JSONObject params) {
if(params.getString("org_id") != null){
if(params.getString("org_ids") == null){
orgIds(params,manager);
}else {
params.put("org_id",params.getString("org_ids"));
params.remove("org_ids");
}
}else {
if(params.getString("org_ids") == null){
if(manager.getIntValue("org_id") > 0){
List<JSONObject> orgs = orgMapper.listOrgAndChild(manager.getIntValue("org_id"));
if (orgs.size()>1){
List<Integer> orgIds = orgs.stream().map(org->org.getIntValue("org_id")).collect(Collectors.toList());
params.put("org_ids",orgIds);
}else {
params.put("org_id",manager.getIntValue("org_id"));
}
}
}else {
params.put("org_id",params.getString("org_ids"));
params.remove("org_ids");
}
}
return params;
}
private void orgIds(JSONObject params,JSONObject manager){
List<JSONObject> orgs = orgMapper.listOrgAndChild(Integer.parseInt(params.getString("org_id")));
if (orgs.size()>1){
List<Integer> orgIds = orgs.stream().map(org->org.getIntValue("org_id")).collect(Collectors.toList());
params.put("org_ids",orgIds);
params.remove("org_id");
}else {
params.put("org_id",params.getString("org_id"));
}
}
} }

@ -37,6 +37,7 @@ public class TradeLogQuery {
private boolean onlyGroup = false; private boolean onlyGroup = false;
private int group_bd; private int group_bd;
private String org_id; private String org_id;
private String org_ids;
public JSONObject toParams(String timezone) { public JSONObject toParams(String timezone) {
JSONObject params = new JSONObject(); JSONObject params = new JSONObject();
@ -95,6 +96,10 @@ public class TradeLogQuery {
if (org_id != null && org_id != "ALL") { if (org_id != null && org_id != "ALL") {
params.put("org_id", org_id); params.put("org_id", org_id);
} }
if (StringUtils.isNotEmpty(org_ids)) {
params.put("org_ids", org_ids);
}
return params; return params;
} }
@ -226,4 +231,12 @@ public class TradeLogQuery {
public void setOrg_id(String org_id) { public void setOrg_id(String org_id) {
this.org_id = org_id; this.org_id = org_id;
} }
public String getOrg_ids() {
return org_ids;
}
public void setOrg_ids(String org_ids) {
this.org_ids = org_ids;
}
} }

@ -170,7 +170,7 @@ public class TradeLogServiceImpl implements TradeLogService {
@Override @Override
public JSONObject listAllTradeLogs(TradeLogQuery query, JSONObject manager) { public JSONObject listAllTradeLogs(TradeLogQuery query, JSONObject manager) {
JSONObject params = query.toParams(null); JSONObject params = query.toParams(null);
if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) { if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))&& !ManagerRole.ORG_MANAGER.hasRole(manager.getIntValue("role"))) {
params.put("bd_user", manager.getString("manager_id")); params.put("bd_user", manager.getString("manager_id"));
} }
if (query.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) { if (query.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
@ -180,7 +180,7 @@ public class TradeLogServiceImpl implements TradeLogService {
params.put("bd_group_bd", query.getGroup_bd()); params.put("bd_group_bd", query.getGroup_bd());
} }
} }
orgManager.checkOrg(manager,params); orgManager.checkOrgIds(manager,params);
PageList<JSONObject> logs = orderMapper.listOrders(params, new PageBounds(query.getPage(), query.getLimit(), Order.formString("create_time.desc"))); PageList<JSONObject> logs = orderMapper.listOrders(params, new PageBounds(query.getPage(), query.getLimit(), Order.formString("create_time.desc")));
JSONObject result = PageListUtils.buildPageListResult(logs); JSONObject result = PageListUtils.buildPageListResult(logs);
JSONObject analysis = orderMapper.analysisOrders(params); JSONObject analysis = orderMapper.analysisOrders(params);

@ -651,6 +651,9 @@
]]> ]]>
<if test="begin!=null">and t.transaction_time &gt;= #{begin}</if> <if test="begin!=null">and t.transaction_time &gt;= #{begin}</if>
<if test="end!=null">and t.transaction_time &lt;= #{end}</if> <if test="end!=null">and t.transaction_time &lt;= #{end}</if>
<if test="org_id!=null and org_ids==null">and o.org_id=#{org_id}</if>
<if test="org_ids!=null">and o.org_id in
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
GROUP BY o.org_id order by amount desc GROUP BY o.org_id order by amount desc
</select> </select>
<select id="getPartnersAmountByOrg" resultType="com.alibaba.fastjson.JSONObject"> <select id="getPartnersAmountByOrg" resultType="com.alibaba.fastjson.JSONObject">

@ -172,8 +172,6 @@
</if> </if>
</if> </if>
<if test="order_id!=null">and o.order_id=#{order_id}</if> <if test="order_id!=null">and o.order_id=#{order_id}</if>
<if test="org_ids!=null">and p.org_id in
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
<if test="trade_type!=null">and o.gateway in <if test="trade_type!=null">and o.gateway in
<foreach collection="trade_type" item="gateway" open="(" close=")" separator=",">#{gateway}</foreach> <foreach collection="trade_type" item="gateway" open="(" close=")" separator=",">#{gateway}</foreach>
</if> </if>

@ -357,7 +357,7 @@ margin-bottom: 10%;"/>
<li ui-sref-active="active" <li ui-sref-active="active"
ng-if="('org_sale'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)||('orgcommission'|withModule)"> ng-if="('org_sale'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1 ||('1000000000000'|withRole))||('orgcommission'|withModule)">
<a ui-sref="analysis_org" ui-sref-opts="{reload:true}"> <a ui-sref="analysis_org" ui-sref-opts="{reload:true}">
<i class="fa fa-hand-peace-o"></i> <span>合伙人|Partners Analysis</span> <i class="fa fa-hand-peace-o"></i> <span>合伙人|Partners Analysis</span>
</a> </a>

@ -27,6 +27,12 @@ define(['angular', 'echarts', 'jquery', 'uiRouter','./monitoring/analysis-monito
$scope.orgs = resp.data; $scope.orgs = resp.data;
}) })
}; };
$scope.loadOrgChild = function () {
var params = angular.copy($scope.params);
$http.get('/sys/orgs/orgChild',{params: params}).then(function (resp) {
$scope.orgs_child = resp.data;
})
};
$scope.loadBDUsers = function () { $scope.loadBDUsers = function () {
var params = angular.copy($scope.params); var params = angular.copy($scope.params);
params.begin = $filter('date')(params.begin, 'yyyyMMdd'); params.begin = $filter('date')(params.begin, 'yyyyMMdd');
@ -55,16 +61,20 @@ define(['angular', 'echarts', 'jquery', 'uiRouter','./monitoring/analysis-monito
$scope.$broadcast('days_range_changed'); $scope.$broadcast('days_range_changed');
$scope.loadBDUsers(); $scope.loadBDUsers();
}; };
if ($filter('withRole')('100') && !$filter('withRole')('1000000000')) { if ($filter('withRole')('100') && !$filter('withRole')('1000000000') && !$filter('withRole')('1000000000000')) {
$scope.chooseLastDays(30); $scope.chooseLastDays(30);
if($state.is('analysis_monitoring.client_rates')) { if($state.is('analysis_monitoring.client_rates')) {
$state.go('.bduser', {userId: $scope.currentUser.manager_id}); $state.go('.bduser', {userId: $scope.currentUser.manager_id});
} }
} else { } else {
$scope.chooseLastDays(30); $scope.chooseLastDays(30);
if($filter('withRole')('1000000000000') && $scope.currentUser.org_id){
$scope.loadOrgChild();
}
if (!$scope.currentUser.org_id) { if (!$scope.currentUser.org_id) {
$scope.loadOrgs(); $scope.loadOrgs();
} else { }
if(!($filter('withRole')('1000000000000') && $scope.currentUser.org_id) || $scope.currentUser.org_id){
$scope.params.org_id = $scope.currentUser.org_id; $scope.params.org_id = $scope.currentUser.org_id;
} }
} }
@ -86,7 +96,7 @@ define(['angular', 'echarts', 'jquery', 'uiRouter','./monitoring/analysis-monito
}]); }]);
app.controller('clientRateBDViewCtrl', ['$scope', '$http', '$filter', '$state', '$stateParams', '$uibModal', 'commonDialog', app.controller('clientRateBDViewCtrl', ['$scope', '$http', '$filter', '$state', '$stateParams', '$uibModal', 'commonDialog',
function ($scope, $http, $filter, $state, $stateParams, $uibModal, commonDialog) { function ($scope, $http, $filter, $state, $stateParams, $uibModal, commonDialog) {
if ($filter('withRole')('100') && !$filter('withRole')('1000000000') && $scope.currentUser.manager_id != $stateParams.userId) { if ($filter('withRole')('100') && !$filter('withRole')('1000000000') &&!$filter('withRole')('1000000000000')&& $scope.currentUser.manager_id != $stateParams.userId) {
$state.go('^.bduser', {userId: $scope.currentUser.manager_id}); $state.go('^.bduser', {userId: $scope.currentUser.manager_id});
} }
$scope.extParams = { $scope.extParams = {
@ -147,7 +157,7 @@ define(['angular', 'echarts', 'jquery', 'uiRouter','./monitoring/analysis-monito
}]); }]);
app.controller('clientRateOrgViewCtrl', ['$scope', '$http', '$filter', '$state', '$stateParams', '$uibModal', app.controller('clientRateOrgViewCtrl', ['$scope', '$http', '$filter', '$state', '$stateParams', '$uibModal',
function ($scope, $http, $filter, $state, $stateParams, $uibModal) { function ($scope, $http, $filter, $state, $stateParams, $uibModal) {
if ($scope.currentUser.org_id && $scope.currentUser.org_id != $stateParams.orgId) { if ($scope.currentUser.org_id && $scope.currentUser.org_id != $stateParams.orgId && !$filter('withRole')('1000000000000')) {
$state.go('^.org', {orgId: $scope.currentUser.org_id}); $state.go('^.org', {orgId: $scope.currentUser.org_id});
} }
$scope.extParams = { $scope.extParams = {

@ -54,8 +54,24 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./org/analysis-o
$scope.loadTransactionAmountInOrg(); $scope.loadTransactionAmountInOrg();
}; };
//$scope.params={'begin':'20160101','end':$filter('date')(new Date(), 'yyyyMMdd')}; //$scope.params={'begin':'20160101','end':$filter('date')(new Date(), 'yyyyMMdd')};
$scope.loadTransactionAmountInOrg = function () {
if (($scope.currentUser.role & parseInt('1000011', 2)) > 0 && !$scope.currentUser.org_id) {
$scope.showOrg = 'Organization';
$http.get('/sys/orgs', {params: {}}).then(function (resp) {
$scope.orgs = resp.data;
});
}
/*if(($scope.currentUser.role & parseInt('1000000000000', 2)) > 0 && $scope.currentUser.org_id){
$scope.showOrg = 'Organization';
$http.get('/sys/orgs/orgChild',{params: {}}).then(function (resp) {
$scope.orgs = resp.data;
})
}*/
$scope.loadTransactionAmountInOrg = function () {
$scope.future_loading = true;
var params = angular.copy($scope.params); var params = angular.copy($scope.params);
if (params.begin) { if (params.begin) {
params.begin = $filter('date')(params.begin, 'yyyyMMdd'); params.begin = $filter('date')(params.begin, 'yyyyMMdd');
@ -75,10 +91,23 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./org/analysis-o
$scope.legends[i] = resp.data[i].org_name; $scope.legends[i] = resp.data[i].org_name;
} }
$scope.partners_type_chart = chartParser.parse(tradeAmountInOrgConfig($scope.legends), $scope.orgAmounts); $scope.partners_type_chart = chartParser.parse(tradeAmountInOrgConfig($scope.legends), $scope.orgAmounts);
$scope.chooseOrg = resp.data[0].org_name; if($scope.orgAmounts.length >= 1){
loadPartnersByOrgId(resp.data[0].org_id); $scope.chooseOrg = resp.data[0].org_name;
loadPartnersByOrgId(resp.data[0].org_id);
}
$scope.future_loading = false;
}); });
}; };
$scope.chooseOrgId = function (org) {
if (org == 'all') {
delete $scope.params.org_id;
$scope.showOrg = 'All'
} else {
$scope.params.org_id = org.org_id;
$scope.showOrg = org.name;
}
$scope.loadTransactionAmountInOrg();
};
var tradeAmountInOrgConfig = function (legend) { var tradeAmountInOrgConfig = function (legend) {
return { return {
chart: { chart: {
@ -155,6 +184,7 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./org/analysis-o
} }
$scope.partnerSalesList[i] = item; $scope.partnerSalesList[i] = item;
} }
$scope.future_loading = false;
}); });
} }

@ -2,13 +2,13 @@
<div class="row"> <div class="row">
<div class="col-sm-12 analysis-nav"> <div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills"> <ul class="nav nav-pills">
<li ui-sref-active-eq="active" ng-if="('org_sale'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)"> <li ui-sref-active-eq="active" ng-if="('org_sale'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1 ||('1000000000000'|withRole))">
<a ui-sref="analysis_org.organlasis"><i class="fa fa-hand-peace-o"></i>合伙人销售量|City Partner Sale</a> <a ui-sref="analysis_org.organlasis"><i class="fa fa-hand-peace-o"></i>合伙人销售量|City Partner Sale</a>
</li> </li>
<li ui-sref-active-eq="active" ng-if="('orgcommission'|withModule)"> <li ui-sref-active-eq="active" ng-if="('orgcommission'|withModule)">
<a ui-sref="analysis_org.orgcommission"><i class="fa fa-users"></i></i>合伙人提成|City Partner Commissions</a> <a ui-sref="analysis_org.orgcommission"><i class="fa fa-users"></i></i>合伙人提成|City Partner Commissions</a>
</li> </li>
<li ui-sref-active-eq="active"> <li ui-sref-active-eq="active" ng-if="('org_sale'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)">
<a ui-sref="analysis_org.referrercommission"><i class="fa fa-users"></i></i>推荐人提成|Referrer Commissions</a> <a ui-sref="analysis_org.referrercommission"><i class="fa fa-users"></i></i>推荐人提成|Referrer Commissions</a>
</li> </li>

@ -11,11 +11,17 @@
<div class="panel panel-success"> <div class="panel panel-success">
<div class="panel-body"> <div class="panel-body">
<div class="form-inline"> <div class="form-inline">
<div class="btn-group" ng-if="!('analysis_monitoring.client_rates'|isState) && !('100'|withRole)"> <div class="btn-group" ng-if="!('analysis_monitoring.client_rates'|isState) && (!('100'|withRole) || ('1000000000000'|withRole))">
<a class="btn btn-default" ui-sref="analysis_monitoring.client_rates"><i class="fa fa-chevron-left"></i></a> <a class="btn btn-default" ui-sref="analysis_monitoring.client_rates"><i class="fa fa-chevron-left"></i></a>
</div> </div>
<div class="input-group" ng-if="('analysis_monitoring.client_rates'|isState) && !currentUser.org_id"> <div class="input-group" ng-if="('analysis_monitoring.client_rates'|isState) && !currentUser.org_id">
<select ng-model="params.org_id" ng-change="loadBDUsers()" class="form-control" ng-options="org.org_id as org.name for org in orgs"> <select ng-model="params.org_id" ng-change="params.org_ids = '';loadBDUsers();loadOrgChild()" class="form-control" ng-options="org.org_id as org.name for org in orgs">
<option value="">All</option>
</select>
</div>
<div class="input-group" ng-if="(('1000000000000'|withRole) && (orgs_child.length>1)) || (params.org_id && (orgs_child.length>1))">
<select ng-model="params.org_ids" ng-change="loadBDUsers()" class="form-control" ng-options="org.org_id as org.name for org in orgs_child">
<option value="">All</option> <option value="">All</option>
</select> </select>
</div> </div>
@ -47,7 +53,7 @@
</div> </div>
<div class="row"> <div class="row">
<div ng-class="{'col-sm-12':('analysis_monitoring.client_rates'|isState),'col-sm-3':!('analysis_monitoring.client_rates'|isState)}" <div ng-class="{'col-sm-12':('analysis_monitoring.client_rates'|isState),'col-sm-3':!('analysis_monitoring.client_rates'|isState)}"
ng-if="!(('100'|withRole) && !('1000000000'|withRole))"> ng-if="!(('100'|withRole) && !('1000000000'|withRole)) || ('1000000000000'|withRole)">
<div class="list-group list-group-hover-bold list-group-active-bold margin-bottom" ng-if="total"> <div class="list-group list-group-hover-bold list-group-active-bold margin-bottom" ng-if="total">
<a class="list-group-item" ui-sref=".org({orgId:params.org_id})" ui-sref-active="active" <a class="list-group-item" ui-sref=".org({orgId:params.org_id})" ui-sref-active="active"
ng-style="{'background-image':total.percentage==0?'':'linear-gradient(90deg,#dff0d8 '+total.percentage+'%,#fff 0%)'}"> ng-style="{'background-image':total.percentage==0?'':'linear-gradient(90deg,#dff0d8 '+total.percentage+'%,#fff 0%)'}">

@ -64,6 +64,18 @@
<a role="button" class="btn btn-default btn-sm" ng-click="thisYear()">This <a role="button" class="btn btn-default btn-sm" ng-click="thisYear()">This
Year</a> Year</a>
</div> </div>
<div uib-dropdown ng-if="orgs" class="btn-group">
<button id="single-button" type="button" class="btn btn-default"
uib-dropdown-toggle ng-disabled="disabled">
{{showOrg}} <span class="caret"></span>
</button>
<ul class="dropdown-menu" uib-dropdown-menu
aria-labelledby="single-button">
<li><a ng-click="chooseOrgId('all')">All</a></li>
<li ng-repeat="org in orgs"><a ng-click="chooseOrgId(org)">{{org.name}}</a>
</li>
</ul>
</div>
<button class="btn btn-success" type="button" ng-click="loadTransactionAmountInOrg()"> <button class="btn btn-success" type="button" ng-click="loadTransactionAmountInOrg()">
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
</button> </button>
@ -72,6 +84,38 @@
</div> </div>
</div> </div>
<!-- <div class="form-group col-xs-3 pull-right">
<div>
<div ng-if="orgs">
<select id="org-clild" class="form-control" ng-model="params.org_id"
ng-options="org.org_id as org.name group by org.type for org in orgs"
ng-change="params.org_ids = null;loadOrgs();loadTransactionAmountInOrg()">
<option value="">All</option>
</select>
</div>
<div ng-if="((orgs_child.length > 1) && ('1000011'|withRole)) || ((orgs_child.length > 0) && ('1000000000000'|withRole))">
<select id="org-select" class="form-control" ng-model="params.org_ids"
ng-options="org.org_id as org.name group by org.org_type for org in orgs_child"
ng-change="loadTransactionAmountInOrg();">
<option value="">All</option>
</select>
</div>
&lt;!&ndash; <div uib-dropdown class="btn-group">
<button id="single-button" type="button" class="btn btn-default"
uib-dropdown-toggle ng-disabled="disabled">
{{showOrg}} <span class="caret"></span>
</button>
<ul class="dropdown-menu" uib-dropdown-menu
aria-labelledby="single-button">
<li><a ng-click="chooseOrgFun('all')">All</a></li>
<li ng-repeat="org in orgs"><a ng-click="chooseOrgFun(org)">{{org.name}}</a>
</li>
</ul>
</div>&ndash;&gt;
</div>
</div>-->
</div> </div>
</div> </div>
</div> </div>
@ -80,8 +124,9 @@
<div class="row cen"> <div class="row cen">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="box"> <div class="box">
<loadingbar ng-if="future_loading"></loadingbar>
<div class="box-header with-border">交易分布</div> <div class="box-header with-border">交易分布</div>
<div class="box-body"> <div class="box-body" ng-if="orgAmounts.length">
<div class="row"> <div class="row">
<div class="col-sm-4 col-xs-12"> <div class="col-sm-4 col-xs-12">
<!--<p class="text-center">交易类型分布</p>--> <!--<p class="text-center">交易类型分布</p>-->

@ -10,30 +10,6 @@
</section> </section>
<section class="content"> <section class="content">
<div class="box box-warning"> <div class="box box-warning">
<!--<div class="box-body">-->
<!--<form class="form-horizontal" name="org_form" novalidate>-->
<!--<div class="form-group" ng-class="{'has-error':org_form.name.$invalid && org_form.name.$dirty}">-->
<!--<label class="control-label col-sm-2" for="org_name_input">Name *</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" ng-model="org.name" id="org_name_input" name="name" required>-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">Logo</label>-->
<!--<div class="col-sm-8">-->
<!--<p class="form-control-static">-->
<!--<button class="btn btn-primary" type="button" ngf-select="uploadLogo($file)"-->
<!--accept="image/*" ngf-max-size="1MB">-->
<!--<i class="fa fa-upload"></i> Upload-->
<!--</button>-->
<!--<uib-progressbar value="logoProgress.value" ng-if="logoProgress"></uib-progressbar>-->
<!--<img ng-src="{{org.logo}}" class="col-sm-3" ng-if="org.logo">-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
<!--<button class="btn btn-success col-sm-offset-2" ng-click="saveOrg()"><i class="fa fa-save"></i> Save</button>-->
<!--</form>-->
<!--</div>-->
<div class="box-body"> <div class="box-body">
<form class="form-horizontal" name="org_form" novalidate> <form class="form-horizontal" name="org_form" novalidate>
<div class="panel"> <div class="panel">
@ -95,8 +71,11 @@
ng-class="{'has-error':org_form.rate_value.$invalid && org_form.rate_value.$dirty}"> ng-class="{'has-error':org_form.rate_value.$invalid && org_form.rate_value.$dirty}">
<label class="control-label col-sm-2" for="rate_value_input">Rate *</label> <label class="control-label col-sm-2" for="rate_value_input">Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.rate_value" <div class="input-group">
id="rate_value_input" name="rate_value" max="100"> <input class="form-control" type="number" ng-model="org.rate_value"
id="rate_value_input" name="rate_value" max="100" min="0">
<span class="input-group-addon">%</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -106,8 +85,11 @@
ng-class="{'has-error':org_form.rate_value.$invalid && org_form.rate_value.$dirty}"> ng-class="{'has-error':org_form.rate_value.$invalid && org_form.rate_value.$dirty}">
<label class="control-label col-sm-2" for="rate_value_input_t">Rate *</label> <label class="control-label col-sm-2" for="rate_value_input_t">Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.rate_value" <div class="input-group">
id="rate_value_input_t" name="rate_value" max="100"> <input class="form-control" type="number" ng-model="org.rate_value"
id="rate_value_input_t" name="rate_value" max="100" min="0">
<span class="input-group-addon">%</span>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -116,8 +98,11 @@
ng-class="{'has-error':org_form.alipay_rate_value.$invalid && org_form.alipay_rate_value.$dirty}"> ng-class="{'has-error':org_form.alipay_rate_value.$invalid && org_form.alipay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="alipay_rate_value_input">Alipay rate *</label> <label class="control-label col-sm-2" for="alipay_rate_value_input">Alipay rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.alipay_rate_value" <div class="input-group">
id="alipay_rate_value_input" name="alipay_rate_value" max="100"> <input class="form-control" type="number" ng-model="org.alipay_rate_value"
id="alipay_rate_value_input" name="alipay_rate_value" max="100" min="0">
<span class="input-group-addon">%</span>
</div>
</div> </div>
</div> </div>
@ -125,8 +110,11 @@
ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}"> ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}">
<label class="control-label col-sm-2" for="wechat_rate_value_input">Wechat rate *</label> <label class="control-label col-sm-2" for="wechat_rate_value_input">Wechat rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.wechat_rate_value" <div class="input-group">
id="wechat_rate_value_input" name="wechat_rate_value" max="100"> <input class="form-control" type="number" ng-model="org.wechat_rate_value"
id="wechat_rate_value_input" name="wechat_rate_value" max="100" min="0">
<span class="input-group-addon">%</span>
</div>
</div> </div>
</div> </div>
@ -134,8 +122,12 @@
ng-class="{'has-error':org_form.bestpay_rate_value.$invalid && org_form.bestpay_rate_value.$dirty}"> ng-class="{'has-error':org_form.bestpay_rate_value.$invalid && org_form.bestpay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="bestpay_rate_value_input">Bestpay rate *</label> <label class="control-label col-sm-2" for="bestpay_rate_value_input">Bestpay rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.bestpay_rate_value" <div class="input-group">
id="bestpay_rate_value_input" name="bestpay_rate_value" max="100"> <input class="form-control" type="number" ng-model="org.bestpay_rate_value"
id="bestpay_rate_value_input" name="bestpay_rate_value" max="100"
min="0">
<span class="input-group-addon">%</span>
</div>
</div> </div>
</div> </div>
@ -143,8 +135,11 @@
ng-class="{'has-error':org_form.jd_rate_value.$invalid && org_form.jd_rate_value.$dirty}"> ng-class="{'has-error':org_form.jd_rate_value.$invalid && org_form.jd_rate_value.$dirty}">
<label class="control-label col-sm-2" for="jd_rate_value_input">JD Pay rate *</label> <label class="control-label col-sm-2" for="jd_rate_value_input">JD Pay rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.jd_rate_value" <div class="input-group">
id="jd_rate_value_input" name="jd_rate_value" max="100"> <input class="form-control" type="number" ng-model="org.jd_rate_value"
id="jd_rate_value_input" name="jd_rate_value" max="100" min="0">
<span class="input-group-addon">%</span>
</div>
</div> </div>
</div> </div>
@ -152,28 +147,37 @@
ng-class="{'has-error':org_form.alipayonline_rate_value.$invalid && org_form.alipayonline_rate_value.$dirty}"> ng-class="{'has-error':org_form.alipayonline_rate_value.$invalid && org_form.alipayonline_rate_value.$dirty}">
<label class="control-label col-sm-2" for="alipayonline_rate_value_input">Alipayonline Rate *</label> <label class="control-label col-sm-2" for="alipayonline_rate_value_input">Alipayonline Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.alipayonline_rate_value" <div class="input-group">
id="alipayonline_rate_value_input" name="alipayonline_rate_value" max="100"> <input class="form-control" type="number" ng-model="org.alipayonline_rate_value"
id="alipayonline_rate_value_input" name="alipayonline_rate_value"
max="100" min="0">
<span class="input-group-addon">%</span>
</div>
</div> </div>
</div> </div>
</div>
<div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_wechat_rate.$invalid && org_form.min_wechat_rate.$dirty}"> ng-class="{'has-error':org_form.min_wechat_rate.$invalid && org_form.min_wechat_rate.$dirty}">
<label class="control-label col-sm-2" for="min_wechat_rate_input">Min Wechat Rate *</label> <label class="control-label col-sm-2" for="min_wechat_rate_input">Min Wechat Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_wechat_rate" <div class="input-group">
id="min_wechat_rate_input" name="min_wechat_rate" max="100"> <input class="form-control form-control-float" type="number" ng-model="org.min_wechat_rate"
id="min_wechat_rate_input" name="min_wechat_rate" max="100" min="0">
<span class="input-group-addon">%</span>
</div>
</div> </div>
</div> </div>
</div>
<div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}"> ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipay_rate_input">Min Alipay Rate *</label> <label class="control-label col-sm-2" for="min_alipay_rate_input">Min Alipay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group">
<input class="form-control" type="number" ng-model="org.min_alipay_rate" <input class="form-control" type="number" ng-model="org.min_alipay_rate"
id="min_alipay_rate_input" name="min_alipay_rate" max="100" required> id="min_alipay_rate_input" name="min_alipay_rate" max="100" min="0" required>
<span class="input-group-addon">%</span>
</div>
</div> </div>
</div> </div>
@ -181,8 +185,13 @@
ng-class="{'has-error':org_form.min_bestpay_rate.$invalid && org_form.min_bestpay_rate.$dirty}"> ng-class="{'has-error':org_form.min_bestpay_rate.$invalid && org_form.min_bestpay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_bestpay_rate_input">Min Bestpay Rate *</label> <label class="control-label col-sm-2" for="min_bestpay_rate_input">Min Bestpay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_bestpay_rate" <div class="input-group">
id="min_bestpay_rate_input" name="min_bestpay_rate" max="100" required> <input class="form-control form-control-float" type="number"
ng-model="org.min_bestpay_rate"
id="min_bestpay_rate_input" name="min_bestpay_rate" max="100" min="0"
required>
<span class="input-group-addon">%</span>
</div>
</div> </div>
</div> </div>
@ -190,8 +199,11 @@
ng-class="{'has-error':org_form.min_jd_rate.$invalid && org_form.min_jd_rate.$dirty}"> ng-class="{'has-error':org_form.min_jd_rate.$invalid && org_form.min_jd_rate.$dirty}">
<label class="control-label col-sm-2" for="min_jd_rate_input">Min Jd Rate *</label> <label class="control-label col-sm-2" for="min_jd_rate_input">Min Jd Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_jd_rate" <div class="input-group">
id="min_jd_rate_input" name="min_jd_rate" max="100" required> <input class="form-control" type="number" ng-model="org.min_jd_rate"
id="min_jd_rate_input" name="min_jd_rate" max="100" min="0" required>
<span class="input-group-addon">%</span>
</div>
</div> </div>
</div> </div>
@ -199,14 +211,16 @@
ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}"> ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipayonline_rate_input">Min Alipayonline Rate *</label> <label class="control-label col-sm-2" for="min_alipayonline_rate_input">Min Alipayonline Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_alipayonline_rate" <div class="input-group">
id="min_alipayonline_rate_input" name="min_alipayonline_rate" max="100" required> <input class="form-control" type="number" ng-model="org.min_alipayonline_rate"
id="min_alipayonline_rate_input" name="min_alipayonline_rate" max="100"
min="0" required>
<span class="input-group-addon">%</span>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.contact_person.$invalid && org_form.contact_person.$dirty}"> ng-class="{'has-error':org_form.contact_person.$invalid && org_form.contact_person.$dirty}">
<label class="control-label col-sm-2" for="org_contact_person_input">Contact Person *</label> <label class="control-label col-sm-2" for="org_contact_person_input">Contact Person *</label>
@ -239,7 +253,6 @@
id="remark-input" maxlength="1000"></textarea> id="remark-input" maxlength="1000"></textarea>
</div> </div>
</div> </div>
</div>
<div class="btn-group margin-bottom margin-top"> <div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button" ng-click="saveOrg(org_form)">Save <button class="btn btn-success" type="button" ng-click="saveOrg(org_form)">Save
</button> </button>

@ -79,7 +79,7 @@
<div class="form-group" ng-class="{'has-error':org_form.rate_value.$invalid && org_form.rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.rate_value.$invalid && org_form.rate_value.$dirty}">
<label class="control-label col-sm-2" for="rate_value_input">Rate *</label> <label class="control-label col-sm-2" for="rate_value_input">Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.rate_value" id="rate_value_input" name="rate_value" max="100"> <input class="form-control form-control-float" type="number" ng-model="org.rate_value" id="rate_value_input" name="rate_value" max="100" min="0">
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -89,7 +89,7 @@
<div class="form-group" ng-class="{'has-error':org_form.rate_value.$invalid && org_form.rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.rate_value.$invalid && org_form.rate_value.$dirty}">
<label class="control-label col-sm-2" for="rate_value_input_3">Rate *</label> <label class="control-label col-sm-2" for="rate_value_input_3">Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.rate_value" id="rate_value_input_3" name="rate_value" max="100"> <input class="form-control form-control-float" type="number" ng-model="org.rate_value" id="rate_value_input_3" name="rate_value" max="100" min="0">
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -98,7 +98,7 @@
<div class="form-group" ng-class="{'has-error':org_form.alipay_rate_value.$invalid && org_form.alipay_rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.alipay_rate_value.$invalid && org_form.alipay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="alipay_rate_value_input">Alipay Rate *</label> <label class="control-label col-sm-2" for="alipay_rate_value_input">Alipay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.alipay_rate_value" id="alipay_rate_value_input" name="alipay_rate_value" max="100"> <input class="form-control form-control-float" type="number" ng-model="org.alipay_rate_value" id="alipay_rate_value_input" name="alipay_rate_value" max="100" min="0">
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -106,7 +106,7 @@
<div class="form-group" ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}">
<label class="control-label col-sm-2" for="wechat_rate_value_input">Wechat Rate *</label> <label class="control-label col-sm-2" for="wechat_rate_value_input">Wechat Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.wechat_rate_value" id="wechat_rate_value_input" name="wechat_rate_value" max="100"> <input class="form-control form-control-float" type="number" ng-model="org.wechat_rate_value" id="wechat_rate_value_input" name="wechat_rate_value" max="100" min="0">
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -114,7 +114,7 @@
<div class="form-group" ng-class="{'has-error':org_form.bestpay_rate_value.$invalid && org_form.bestpay_rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.bestpay_rate_value.$invalid && org_form.bestpay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="bestpay_rate_value_input">Bestpay Rate *</label> <label class="control-label col-sm-2" for="bestpay_rate_value_input">Bestpay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.bestpay_rate_value" id="bestpay_rate_value_input" name="bestpay_rate_value" max="100"> <input class="form-control form-control-float" type="number" ng-model="org.bestpay_rate_value" id="bestpay_rate_value_input" name="bestpay_rate_value" max="100" min="0">
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -122,7 +122,7 @@
<div class="form-group" ng-class="{'has-error':org_form.jd_rate_value.$invalid && org_form.jd_rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.jd_rate_value.$invalid && org_form.jd_rate_value.$dirty}">
<label class="control-label col-sm-2" for="jd_rate_value_input">JD Pay Rate *</label> <label class="control-label col-sm-2" for="jd_rate_value_input">JD Pay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.jd_rate_value" id="jd_rate_value_input" name="jd_rate_value" max="100"> <input class="form-control form-control-float" type="number" ng-model="org.jd_rate_value" id="jd_rate_value_input" name="jd_rate_value" max="100" min="0">
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -130,7 +130,7 @@
<div class="form-group" ng-class="{'has-error':org_form.alipayonline_rate_value.$invalid && org_form.alipayonline_rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.alipayonline_rate_value.$invalid && org_form.alipayonline_rate_value.$dirty}">
<label class="control-label col-sm-2" for="alipayonline_rate_value_input">AlipayOnline Rate *</label> <label class="control-label col-sm-2" for="alipayonline_rate_value_input">AlipayOnline Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.alipayonline_rate_value" id="alipayonline_rate_value_input" name="alipayonline_rate_value" max="100"> <input class="form-control form-control-float" type="number" ng-model="org.alipayonline_rate_value" id="alipayonline_rate_value_input" name="alipayonline_rate_value" max="100" min="0">
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -142,16 +142,18 @@
ng-class="{'has-error':org_form.min_wechat_rate.$invalid && org_form.min_wechat_rate.$dirty}"> ng-class="{'has-error':org_form.min_wechat_rate.$invalid && org_form.min_wechat_rate.$dirty}">
<label class="control-label col-sm-2" for="min_wechat_rate_input">Min Wechat Rate *</label> <label class="control-label col-sm-2" for="min_wechat_rate_input">Min Wechat Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_wechat_rate" <input class="form-control form-control-float" type="number" ng-model="org.min_wechat_rate"
id="min_wechat_rate_input" name="min_wechat_rate" max="100"> id="min_wechat_rate_input" name="min_wechat_rate" max="100" min="0">
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}"> ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipay_rate_input">Min Alipay Rate *</label> <label class="control-label col-sm-2" for="min_alipay_rate_input">Min Alipay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_alipay_rate" <input class="form-control form-control-float" type="number" ng-model="org.min_alipay_rate"
id="min_alipay_rate_input" name="min_alipay_rate" max="100"> id="min_alipay_rate_input" name="min_alipay_rate" max="100" min="0">
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -159,8 +161,9 @@
ng-class="{'has-error':org_form.min_bestpay_rate.$invalid && org_form.min_bestpay_rate.$dirty}"> ng-class="{'has-error':org_form.min_bestpay_rate.$invalid && org_form.min_bestpay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_bestpay_rate_input">Min Bestpay Rate *</label> <label class="control-label col-sm-2" for="min_bestpay_rate_input">Min Bestpay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_bestpay_rate" <input class="form-control form-control-float" type="number" ng-model="org.min_bestpay_rate"
id="min_bestpay_rate_input" name="min_bestpay_rate" max="100"> id="min_bestpay_rate_input" name="min_bestpay_rate" max="100" min="0">
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -168,8 +171,9 @@
ng-class="{'has-error':org_form.min_jd_rate.$invalid && org_form.min_jd_rate.$dirty}"> ng-class="{'has-error':org_form.min_jd_rate.$invalid && org_form.min_jd_rate.$dirty}">
<label class="control-label col-sm-2" for="min_jd_rate_input">Min Jd Rate *</label> <label class="control-label col-sm-2" for="min_jd_rate_input">Min Jd Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_jd_rate" <input class="form-control form-control-float" type="number" ng-model="org.min_jd_rate"
id="min_jd_rate_input" name="min_jd_rate" max="100"> id="min_jd_rate_input" name="min_jd_rate" max="100" min="0">
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -177,8 +181,9 @@
ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}"> ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipayonline_rate_input">Min Alipayonline Rate *</label> <label class="control-label col-sm-2" for="min_alipayonline_rate_input">Min Alipayonline Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_alipayonline_rate" <input class="form-control form-control-float" type="number" ng-model="org.min_alipayonline_rate"
id="min_alipayonline_rate_input" name="min_alipayonline_rate" max="100"> id="min_alipayonline_rate_input" name="min_alipayonline_rate" max="100" min="0">
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div> </div>

@ -216,7 +216,7 @@
<div class="form-group" ng-class="{'has-error':org_form.rate_value.$invalid && org_form.rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.rate_value.$invalid && org_form.rate_value.$dirty}">
<label class="control-label col-sm-2" for="rate_value_input">Rate *</label> <label class="control-label col-sm-2" for="rate_value_input">Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.rate_value" id="rate_value_input" name="rate_value" max="100"> <input class="form-control form-control-float" type="number" ng-model="org.rate_value" id="rate_value_input" name="rate_value" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -226,7 +226,7 @@
<div class="form-group" ng-class="{'has-error':org_form.rate_value.$invalid && org_form.rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.rate_value.$invalid && org_form.rate_value.$dirty}">
<label class="control-label col-sm-2" for="rate_value_input_3">Rate *</label> <label class="control-label col-sm-2" for="rate_value_input_3">Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.rate_value" id="rate_value_input_3" name="rate_value" max="100" readonly> <input class="form-control form-control-float" type="number" ng-model="org.rate_value" id="rate_value_input_3" name="rate_value" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -235,7 +235,7 @@
<div class="form-group" ng-class="{'has-error':org_form.alipay_rate_value.$invalid && org_form.alipay_rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.alipay_rate_value.$invalid && org_form.alipay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="alipay_rate_value_input">Alipay Rate *</label> <label class="control-label col-sm-2" for="alipay_rate_value_input">Alipay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.alipay_rate_value" id="alipay_rate_value_input" name="alipay_rate_value" max="100" readonly> <input class="form-control form-control-float" type="number" ng-model="org.alipay_rate_value" id="alipay_rate_value_input" name="alipay_rate_value" max="100" min="0"readonly>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -243,7 +243,7 @@
<div class="form-group" ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}">
<label class="control-label col-sm-2" for="wechat_rate_value_input">Wechat Rate *</label> <label class="control-label col-sm-2" for="wechat_rate_value_input">Wechat Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.wechat_rate_value" id="wechat_rate_value_input" name="wechat_rate_value" max="100" readonly> <input class="form-control form-control-float" type="number" ng-model="org.wechat_rate_value" id="wechat_rate_value_input" name="wechat_rate_value" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -251,7 +251,7 @@
<div class="form-group" ng-class="{'has-error':org_form.bestpay_rate_value.$invalid && org_form.bestpay_rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.bestpay_rate_value.$invalid && org_form.bestpay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="bestpay_rate_value_input">Bestpay Rate *</label> <label class="control-label col-sm-2" for="bestpay_rate_value_input">Bestpay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.bestpay_rate_value" id="bestpay_rate_value_input" name="bestpay_rate_value" max="100" readonly> <input class="form-control form-control-float" type="number" ng-model="org.bestpay_rate_value" id="bestpay_rate_value_input" name="bestpay_rate_value" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -259,7 +259,7 @@
<div class="form-group" ng-class="{'has-error':org_form.jd_rate_value.$invalid && org_form.jd_rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.jd_rate_value.$invalid && org_form.jd_rate_value.$dirty}">
<label class="control-label col-sm-2" for="jd_rate_value_input">JD Pay Rate *</label> <label class="control-label col-sm-2" for="jd_rate_value_input">JD Pay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.jd_rate_value" id="jd_rate_value_input" name="jd_rate_value" max="100" readonly> <input class="form-control form-control-float" type="number" ng-model="org.jd_rate_value" id="jd_rate_value_input" name="jd_rate_value" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -267,7 +267,7 @@
<div class="form-group" ng-class="{'has-error':org_form.alipayonline_rate_value.$invalid && org_form.alipayonline_rate_value.$dirty}"> <div class="form-group" ng-class="{'has-error':org_form.alipayonline_rate_value.$invalid && org_form.alipayonline_rate_value.$dirty}">
<label class="control-label col-sm-2" for="alipayonline_rate_value_input">AlipayOnline Rate *</label> <label class="control-label col-sm-2" for="alipayonline_rate_value_input">AlipayOnline Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.alipayonline_rate_value" id="alipayonline_rate_value_input" name="alipayonline_rate_value" max="100" readonly> <input class="form-control form-control-float" type="number" ng-model="org.alipayonline_rate_value" id="alipayonline_rate_value_input" name="alipayonline_rate_value" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -278,16 +278,18 @@
ng-class="{'has-error':org_form.min_wechat_rate.$invalid && org_form.min_wechat_rate.$dirty}"> ng-class="{'has-error':org_form.min_wechat_rate.$invalid && org_form.min_wechat_rate.$dirty}">
<label class="control-label col-sm-2" for="min_wechat_rate_input">Min Wechat Rate *</label> <label class="control-label col-sm-2" for="min_wechat_rate_input">Min Wechat Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_wechat_rate" <input class="form-control form-control-float" type="number" ng-model="org.min_wechat_rate"
id="min_wechat_rate_input" name="min_wechat_rate" max="10" readonly> id="min_wechat_rate_input" name="min_wechat_rate" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}"> ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipay_rate_input">Min Alipay Rate *</label> <label class="control-label col-sm-2" for="min_alipay_rate_input">Min Alipay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_alipay_rate" <input class="form-control form-control-float" type="number" ng-model="org.min_alipay_rate"
id="min_alipay_rate_input" name="min_alipay_rate" max="10" readonly> id="min_alipay_rate_input" name="min_alipay_rate" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -295,8 +297,9 @@
ng-class="{'has-error':org_form.min_bestpay_rate.$invalid && org_form.min_bestpay_rate.$dirty}"> ng-class="{'has-error':org_form.min_bestpay_rate.$invalid && org_form.min_bestpay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_bestpay_rate_input">Min Bestpay Rate *</label> <label class="control-label col-sm-2" for="min_bestpay_rate_input">Min Bestpay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_bestpay_rate" <input class="form-control form-control-float" type="number" ng-model="org.min_bestpay_rate"
id="min_bestpay_rate_input" name="min_bestpay_rate" max="10" readonly> id="min_bestpay_rate_input" name="min_bestpay_rate" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -304,8 +307,9 @@
ng-class="{'has-error':org_form.min_jd_rate.$invalid && org_form.min_jd_rate.$dirty}"> ng-class="{'has-error':org_form.min_jd_rate.$invalid && org_form.min_jd_rate.$dirty}">
<label class="control-label col-sm-2" for="min_jd_rate_input">Min Jd Rate *</label> <label class="control-label col-sm-2" for="min_jd_rate_input">Min Jd Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_jd_rate" <input class="form-control form-control-float" type="number" ng-model="org.min_jd_rate"
id="min_jd_rate_input" name="min_jd_rate" max="10" readonly> id="min_jd_rate_input" name="min_jd_rate" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
@ -313,8 +317,9 @@
ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}"> ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipayonline_rate_input">Min Alipayonline Rate *</label> <label class="control-label col-sm-2" for="min_alipayonline_rate_input">Min Alipayonline Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_alipayonline_rate" <input class="form-control form-control-float" type="number" ng-model="org.min_alipayonline_rate"
id="min_alipayonline_rate_input" name="min_alipayonline_rate" max="10" readonly> id="min_alipayonline_rate_input" name="min_alipayonline_rate" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div> </div>

@ -56,7 +56,39 @@
<input class="form-control" placeholder="Keyword" ng-enter="loadTradeLogs(1)" <input class="form-control" placeholder="Keyword" ng-enter="loadTradeLogs(1)"
ng-model="params.searchText"> ng-model="params.searchText">
</div> </div>
<div class="col-sm-6 col-xs-8" ng-if="orgs.length>1 && currentUser.org_id">
<div class="col-sm-6 col-xs-8">
<div ng-if="orgs" class="col-sm-6">
<select id="org-clild" class="form-control" ng-model="params.org_id"
ng-options="org.org_id as org.name group by org.type for org in orgs"
ng-change="params.org_ids = '';loadOrgs();loadTradeLogs(1)">
<option value="">All</option>
</select>
</div>
<div ng-if="((orgs_child.length > 1) && ('1000011'|withRole))&&params.org_id || ((orgs_child.length > 0) && ('1000000000000'|withRole))" class="col-sm-6">
<select id="org-select" class="form-control" ng-model="params.org_ids"
ng-options="org.org_id as org.name group by org.org_type for org in orgs_child"
ng-change="loadTradeLogs(1)">
<option value="">All</option>
</select>
</div>
<!-- <div uib-dropdown class="btn-group">
<button id="single-button" type="button" class="btn btn-default"
uib-dropdown-toggle ng-disabled="disabled">
{{showOrg}} <span class="caret"></span>
</button>
<ul class="dropdown-menu" uib-dropdown-menu
aria-labelledby="single-button">
<li><a ng-click="chooseOrgFun('all')">All</a></li>
<li ng-repeat="org in orgs"><a ng-click="chooseOrgFun(org)">{{org.name}}</a>
</li>
</ul>
</div>-->
</div>
<!-- <div class="col-sm-6 col-xs-8" ng-if="orgs.length>1 && currentUser.org_id">
<label class="control-label col-xs-3 col-sm-4">Organization</label> <label class="control-label col-xs-3 col-sm-4">Organization</label>
<div class="col-xs-9 col-sm-8"> <div class="col-xs-9 col-sm-8">
<select id="org-clild" class="form-control" ng-model="params.org_id" <select id="org-clild" class="form-control" ng-model="params.org_id"
@ -65,7 +97,7 @@
<option value="">All</option> <option value="">All</option>
</select> </select>
</div> </div>
</div> </div>-->
</div> </div>
<div class="form-group col-xs-12"> <div class="form-group col-xs-12">
<label class="control-label col-xs-4 col-sm-2">Status</label> <label class="control-label col-xs-4 col-sm-2">Status</label>

@ -76,13 +76,22 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.params.datefrom = monthBegin; $scope.params.datefrom = monthBegin;
$scope.loadTradeLogs(1); $scope.loadTradeLogs(1);
}; };
if (($scope.currentUser.role & parseInt('1000011', 2)) > 0 && !$scope.currentUser.org_id) {
/* $scope.showOrg = 'Organization';*/
$http.get('/sys/orgs', {params: {}}).then(function (resp) {
$scope.orgs = resp.data;
});
}
$scope.loadOrgs = function () { $scope.loadOrgs = function () {
$http.get('/sys/orgs/orgChild').then(function (resp) { var params = angular.copy($scope.params);
$scope.orgs = resp.data; $http.get('/sys/orgs/orgChild',{params: params}).then(function (resp) {
$scope.orgs_child = resp.data;
}) })
}; };
$scope.loadOrgs(); if(($scope.currentUser.role & parseInt('1000000000000', 2)) > 0 && ($scope.currentUser.org_id != null)){
$scope.loadOrgs();
}
$scope.loadTradeLogs = function (page) { $scope.loadTradeLogs = function (page) {
var params = angular.copy($scope.params); var params = angular.copy($scope.params);

Loading…
Cancel
Save