Merge remote-tracking branch 'origin/develop' into develop

master
yixian 5 years ago
commit 98a8ea0e58

@ -9,7 +9,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>1.3.92</version> <version>1.3.93</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version> <jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>

@ -155,6 +155,9 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
if(tradeInTypes != null){ if(tradeInTypes != null){
return tradeInTypes; return tradeInTypes;
} }
if (params.containsKey("client_id")) {
clientManager.queryModifyClientIds(params.getInteger("client_id"), params);
}
List<JSONObject> res = transactionAnalysisMapper.getTradeAmountInTypes(params); List<JSONObject> res = transactionAnalysisMapper.getTradeAmountInTypes(params);
stringRedisTemplate.boundValueOps("tradeInTypes"+params.getString("org_id")+ params.getString("begin")).set(res.toString(), 5, TimeUnit.MINUTES); stringRedisTemplate.boundValueOps("tradeInTypes"+params.getString("org_id")+ params.getString("begin")).set(res.toString(), 5, TimeUnit.MINUTES);
return res; return res;
@ -323,6 +326,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
JSONObject mchConfig = merchantInfoProvider.getMchExtParams(partner.getIntValue("client_id")); JSONObject mchConfig = merchantInfoProvider.getMchExtParams(partner.getIntValue("client_id"));
params.put("hide_sub_mch", mchConfig.getBooleanValue("hide_sub_mch")); params.put("hide_sub_mch", mchConfig.getBooleanValue("hide_sub_mch"));
params.put("client_id", partner.getIntValue("client_id")); params.put("client_id", partner.getIntValue("client_id"));
clientManager.queryModifyClientIds(partner.getIntValue("client_id"), params);
JSONObject today = getTransJSONO(params); JSONObject today = getTransJSONO(params);
params.put("begin",DateUtils.addDays(params.getDate("begin"),-1)); params.put("begin",DateUtils.addDays(params.getDate("begin"),-1));
params.put("end",DateUtils.addDays(params.getDate("end"),-1)); params.put("end",DateUtils.addDays(params.getDate("end"),-1));
@ -450,6 +454,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
params.remove("client_ids"); params.remove("client_ids");
} }
params.put("client_id", partner.getIntValue("client_id")); params.put("client_id", partner.getIntValue("client_id"));
clientManager.queryModifyClientIds(partner.getIntValue("client_id"), params);
return customerAndOrdersStatisticsMapper.getSumCustomersAnalysis(params); return customerAndOrdersStatisticsMapper.getSumCustomersAnalysis(params);
} }
@ -619,6 +624,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
params.remove("client_ids"); params.remove("client_ids");
} }
params.put("client_id", partner.getIntValue("client_id")); params.put("client_id", partner.getIntValue("client_id"));
clientManager.queryModifyClientIds(partner.getIntValue("client_id"), params);
return customerAndOrdersStatisticsMapper.getAvgOrderAndCustomerStatistics(params); return customerAndOrdersStatisticsMapper.getAvgOrderAndCustomerStatistics(params);
} }
@ -633,6 +639,7 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
params.remove("client_ids"); params.remove("client_ids");
} }
params.put("client_id", partner.getIntValue("client_id")); params.put("client_id", partner.getIntValue("client_id"));
clientManager.queryModifyClientIds(partner.getInteger("client_id"), params);
return customerAndOrdersStatisticsMapper.getPartnerCustomerAndOrderStatistics(params); return customerAndOrdersStatisticsMapper.getPartnerCustomerAndOrderStatistics(params);
} }
} }

@ -82,10 +82,7 @@ public interface ClientMapper {
@AdvanceSelect(addonWhereClause = "is_valid=1") @AdvanceSelect(addonWhereClause = "is_valid=1")
List<JSONObject> listChildClients(@Param("parent_client_id") int parentClientId); List<JSONObject> listChildClients(@Param("parent_client_id") int parentClientId);
@AutoSql(type = SqlType.SELECT) PageList<JSONObject> listChildClientsByPage(JSONObject params, PageBounds pageBounds);
@AdvanceSelect(addonWhereClause = "is_valid=1")
PageList<JSONObject> listChildClientsByPage(@Param("parent_client_id") int parentClientId, PageBounds pageBounds);
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid=1") @AdvanceSelect(addonWhereClause = "is_valid=1")

@ -173,7 +173,7 @@ public interface ClientManager {
List<JSONObject> listSubClients(JSONObject manager, String clientMoniker); List<JSONObject> listSubClients(JSONObject manager, String clientMoniker);
JSONObject listSubClientsByPage(JSONObject manager, String clientMoniker,int page); JSONObject listSubClientsByPage(JSONObject manager, String clientMoniker,String searchText, int page);
List<JSONObject> listSubClients(int clientId); List<JSONObject> listSubClients(int clientId);
@ -557,4 +557,5 @@ public interface ClientManager {
RSvcMchBean findSvcMchByAccountId(String accountId); RSvcMchBean findSvcMchByAccountId(String accountId);
void queryModifyClientIds(int clientId, JSONObject params);
} }

@ -2097,7 +2097,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if(mchConfig.getBooleanValue("hide_sub_mch")){ if(mchConfig.getBooleanValue("hide_sub_mch")){
return new ArrayList<>(); return new ArrayList<>();
} }
if (!mchConfig.getBooleanValue("disable_level3_mch")) { if (!mchConfig.getBooleanValue("disable_level3_mch") && listChildClients.size()<100) {
for (JSONObject partner : listChildClients) { for (JSONObject partner : listChildClients) {
List<JSONObject> clients = clientMapper.listChildClients(partner.getIntValue("client_id")); List<JSONObject> clients = clientMapper.listChildClients(partner.getIntValue("client_id"));
if (clients.size() > 0) { if (clients.size() > 0) {
@ -2111,9 +2111,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return listChildClients; return listChildClients;
} }
@Override @Override
public JSONObject listSubClientsByPage(JSONObject manager, String clientMoniker,int page) { public JSONObject listSubClientsByPage(JSONObject manager, String clientMoniker,String searchText, int page) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) { if (client == null) {
throw new InvalidShortIdException(); throw new InvalidShortIdException();
@ -2121,9 +2120,23 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkOrgPermission(manager, client); checkOrgPermission(manager, client);
PageBounds pageBounds; PageBounds pageBounds;
pageBounds= new PageBounds(page, 5, Order.formString("create_time.desc")); pageBounds= new PageBounds(page, 20, Order.formString("create_time.desc"));
JSONObject params = new JSONObject() {{
PageList<JSONObject> childClients = clientMapper.listChildClientsByPage(client.getIntValue("client_id"), pageBounds); put("parent_client_id", client.getIntValue("client_id"));
}};
if (StringUtils.isNotBlank(searchText)) {
params.put("search_text", searchText);
}
PageList<JSONObject> childClients = clientMapper.listChildClientsByPage(params, pageBounds);
for (JSONObject partner : childClients) {
List<JSONObject> clients = clientMapper.listChildClients(partner.getIntValue("client_id"));
if (clients.size() > 0) {
partner.put("level3Clients", clients);
clients.forEach(e -> {
e.put("parent_client_moniker", partner.getString("client_moniker"));
});
}
}
return PageListUtils.buildPageListResult(childClients); return PageListUtils.buildPageListResult(childClients);
} }
@ -2209,7 +2222,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new Exception("partner has no permission"); throw new Exception("partner has no permission");
} }
} }
} }
} }
} }
@ -2676,6 +2688,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client_ids != null) { if (client_ids != null) {
params.put("client_ids", Arrays.asList(client_ids)); params.put("client_ids", Arrays.asList(client_ids));
params.remove("client_id"); params.remove("client_id");
}else {
queryModifyClientIds(client.getIntValue("client_id"), params);
} }
PageList<JSONObject> devices = clientDeviceMapper.listClientDevices(params, new PageBounds(page, limit, Order.formString("create_time.desc"))); PageList<JSONObject> devices = clientDeviceMapper.listClientDevices(params, new PageBounds(page, limit, Order.formString("create_time.desc")));
return PageListUtils.buildPageListResult(devices); return PageListUtils.buildPageListResult(devices);
@ -2695,6 +2709,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client_ids != null) { if (client_ids != null) {
params.put("client_ids", Arrays.asList(client_ids)); params.put("client_ids", Arrays.asList(client_ids));
params.remove("client_id"); params.remove("client_id");
}else {
queryModifyClientIds(client.getIntValue("client_id"), params);
} }
List<JSONObject> deviceIds = clientDeviceMapper.listClientDeviceIds(params); List<JSONObject> deviceIds = clientDeviceMapper.listClientDeviceIds(params);
return new JSONObject() {{ return new JSONObject() {{
@ -3969,6 +3985,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
JSONObject params = query.toParams(timezone); JSONObject params = query.toParams(timezone);
params.put("client_id", client_id); params.put("client_id", client_id);
queryModifyClientIds(client_id, params);
PageList<JSONObject> logs = transactionMapper.listSettlementLog(params, PageList<JSONObject> logs = transactionMapper.listSettlementLog(params,
new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc"))); new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc")));
JSONObject result = PageListUtils.buildPageListResult(logs); JSONObject result = PageListUtils.buildPageListResult(logs);
@ -4011,6 +4028,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
JSONObject params = query.toParams(timezone); JSONObject params = query.toParams(timezone);
params.put("client_id", client_id); params.put("client_id", client_id);
queryModifyClientIds(client_id, params);
PageList<JSONObject> logs = transactionMapper.listSettlementLog(params, new PageBounds(query.getPage(), 10000, Order.formString("clearing_time.desc"))); PageList<JSONObject> logs = transactionMapper.listSettlementLog(params, new PageBounds(query.getPage(), 10000, Order.formString("clearing_time.desc")));
//Excel 多sheet导出 //Excel 多sheet导出
try (HSSFWorkbook workbook = new HSSFWorkbook()) { try (HSSFWorkbook workbook = new HSSFWorkbook()) {
@ -6621,6 +6639,26 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return svcMchBean; return svcMchBean;
} }
@Override
public void queryModifyClientIds(int clientId, JSONObject params) {
if (StringUtils.isBlank(params.getString("client_ids"))) {
String[] clientIds = getChildClientIds(clientId);
if (clientIds.length > 1) {
params.put("client_ids", clientIds);
}
}
}
private String[] getChildClientIds(int clientId) {
List<String> clientIds = new ArrayList<>();
List<JSONObject> childs = clientMapper.listChildClients(clientId);
clientIds.add(String.valueOf(clientId));
childs.forEach(p -> {
clientIds.add(p.getString("client_id"));
});
return clientIds.toArray(new String[]{});
}
private void clientApproveIdInfo(JSONObject params, JSONObject client) { private void clientApproveIdInfo(JSONObject params, JSONObject client) {
if (StringUtils.isBlank(params.getString("id_type"))) { if (StringUtils.isBlank(params.getString("id_type"))) {
params.remove("id_type"); params.remove("id_type");

@ -500,9 +500,11 @@ public class PartnerManageController {
return clientManager.listSubClients(manager, clientMoniker); return clientManager.listSubClients(manager, clientMoniker);
} }
@ManagerMapping(value = "/{clientMoniker}/sub_clients/{page}", method = RequestMethod.GET) @ManagerMapping(value = "/{clientMoniker}/sub_clients/page", method = RequestMethod.GET)
public JSONObject listSubClientsByPage(@PathVariable String clientMoniker,@PathVariable int page, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public JSONObject listSubClientsByPage(@PathVariable String clientMoniker,@RequestParam(defaultValue = "1") int page,
return clientManager.listSubClientsByPage(manager, clientMoniker,page); @RequestParam(required = false) String searchText,
@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.listSubClientsByPage(manager, clientMoniker,searchText,page);
} }
//创建子商户 //创建子商户

@ -348,6 +348,14 @@ public class PartnerViewController {
return clientManager.listSubClients(null, account.getString("client_moniker")); return clientManager.listSubClients(null, account.getString("client_moniker"));
} }
@PartnerMapping(value = "/sub_partners/page", method = RequestMethod.GET)
@ResponseBody
public JSONObject listSubPartnersByPage(@RequestParam(defaultValue = "1") int page,
@RequestParam(required = false) String searchText,
@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
return clientManager.listSubClientsByPage(null, account.getString("client_moniker"), searchText,page);
}
@PartnerMapping(value = "/devices", method = RequestMethod.GET, roles = PartnerRole.ADMIN) @PartnerMapping(value = "/devices", method = RequestMethod.GET, roles = PartnerRole.ADMIN)
@ResponseBody @ResponseBody
public JSONObject listClientDevices(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestParam(required = false) String remark, public JSONObject listClientDevices(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestParam(required = false) String remark,

@ -65,4 +65,5 @@ public interface TradeLogService {
void exportPDFSettlement(TradeLogQuery query, JSONObject partner, HttpServletResponse response); void exportPDFSettlement(TradeLogQuery query, JSONObject partner, HttpServletResponse response);
void exportExcelAllPartner(TradeLogQuery query, JSONObject partner, HttpServletResponse httpResponse) throws Exception; void exportExcelAllPartner(TradeLogQuery query, JSONObject partner, HttpServletResponse httpResponse) throws Exception;
} }

@ -157,6 +157,7 @@ public class TradeLogServiceImpl implements TradeLogService {
JSONObject params = query.toParams(timezone); JSONObject params = query.toParams(timezone);
clientManager.validateClients(client.getIntValue("client_id"), params); clientManager.validateClients(client.getIntValue("client_id"), params);
params.put("client_id", client.getIntValue("client_id")); params.put("client_id", client.getIntValue("client_id"));
clientManager.queryModifyClientIds(client.getIntValue("client_id"), params);
if (manager != null && manager.getInteger("org_id") != null) { if (manager != null && manager.getInteger("org_id") != null) {
params.put("org_id", manager.getIntValue("org_id")); params.put("org_id", manager.getIntValue("org_id"));
} }
@ -529,9 +530,12 @@ public class TradeLogServiceImpl implements TradeLogService {
String timezone = partner.getJSONObject("client").getString("timezone"); String timezone = partner.getJSONObject("client").getString("timezone");
JSONObject params = query.toParams(timezone); JSONObject params = query.toParams(timezone);
clientManager.validateClients(client_id, params); clientManager.validateClients(client_id, params);
clientManager.queryModifyClientIds(client_id, params);
params.put("client_id", client_id); params.put("client_id", client_id);
JSONObject mchConfig = merchantInfoProvider.getMchExtParams(partner.getIntValue("client_id")); JSONObject mchConfig = merchantInfoProvider.getMchExtParams(partner.getIntValue("client_id"));
params.put("hide_sub_mch", mchConfig.getBooleanValue("hide_sub_mch")); params.put("hide_sub_mch", mchConfig.getBooleanValue("hide_sub_mch"));
List<JSONObject> logs = transactionMapper.listTransFlow(params); List<JSONObject> logs = transactionMapper.listTransFlow(params);
TimeZoneUtils.switchTimeZone(logs, timezone, "create_time", "confirm_time", "transaction_time"); TimeZoneUtils.switchTimeZone(logs, timezone, "create_time", "confirm_time", "transaction_time");
Paginator paginator = new Paginator(query.getPage(), query.getLimit(), logs.size()); Paginator paginator = new Paginator(query.getPage(), query.getLimit(), logs.size());
@ -555,6 +559,7 @@ public class TradeLogServiceImpl implements TradeLogService {
JSONObject params = query.toParams(timezone); JSONObject params = query.toParams(timezone);
clientManager.validateClients(clientId, params); clientManager.validateClients(clientId, params);
params.put("client_id", clientId); params.put("client_id", clientId);
clientManager.queryModifyClientIds(clientId, params);
List<JSONObject> logs = transactionMapper.listTransFlow(params); List<JSONObject> logs = transactionMapper.listTransFlow(params);
TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy HH:mm:ss", Collections.singletonList("transaction_time")); TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy HH:mm:ss", Collections.singletonList("transaction_time"));
TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy", Collections.singletonList("clearing_time")); TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy", Collections.singletonList("clearing_time"));
@ -998,6 +1003,7 @@ public class TradeLogServiceImpl implements TradeLogService {
String timezone = partner.getJSONObject("client").getString("timezone"); String timezone = partner.getJSONObject("client").getString("timezone");
JSONObject params = query.toParams(timezone); JSONObject params = query.toParams(timezone);
params.put("client_id", clientId); params.put("client_id", clientId);
clientManager.queryModifyClientIds(clientId, params);
PageList<JSONObject> logs = transactionMapper.listSettlementLog(params, PageList<JSONObject> logs = transactionMapper.listSettlementLog(params,
new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc"))); new PageBounds(query.getPage(), query.getLimit(), Order.formString("clearing_time.desc")));
JSONObject result = PageListUtils.buildPageListResult(logs); JSONObject result = PageListUtils.buildPageListResult(logs);
@ -1031,6 +1037,7 @@ public class TradeLogServiceImpl implements TradeLogService {
} }
JSONObject params = query.toParams(timezone); JSONObject params = query.toParams(timezone);
params.put("client_id", clientId); params.put("client_id", clientId);
clientManager.queryModifyClientIds(clientId, params);
PageList<JSONObject> logs = transactionMapper.listSettlementLog(params, PageList<JSONObject> logs = transactionMapper.listSettlementLog(params,
new PageBounds(1, 100000000, Order.formString("clearing_time.desc"))); new PageBounds(1, 100000000, Order.formString("clearing_time.desc")));
try (HSSFWorkbook workbook = new HSSFWorkbook()) { try (HSSFWorkbook workbook = new HSSFWorkbook()) {
@ -1465,6 +1472,8 @@ public class TradeLogServiceImpl implements TradeLogService {
if (params.get("client_ids") == null) { if (params.get("client_ids") == null) {
params.put("client_id", partner.getJSONObject("client").getString("client_id")); params.put("client_id", partner.getJSONObject("client").getString("client_id"));
} }
clientManager.queryModifyClientIds(partner.getIntValue("client_id"), params);
List<JSONObject> clientOrderList = transactionMapper.getClientOrderByTransactionTime(params); List<JSONObject> clientOrderList = transactionMapper.getClientOrderByTransactionTime(params);
List<Integer> clientOrders = new ArrayList<>(clientOrderList.size()); List<Integer> clientOrders = new ArrayList<>(clientOrderList.size());
clientOrderList.parallelStream().forEach(p -> clientOrders.add(p.getInteger("clearing_order"))); clientOrderList.parallelStream().forEach(p -> clientOrders.add(p.getInteger("clearing_order")));
@ -1575,6 +1584,7 @@ public class TradeLogServiceImpl implements TradeLogService {
if (params.get("client_ids") == null) { if (params.get("client_ids") == null) {
params.put("client_id", partner.getJSONObject("client").getString("client_id")); params.put("client_id", partner.getJSONObject("client").getString("client_id"));
} }
clientManager.queryModifyClientIds(partner.getIntValue("client_id"), params);
List<JSONObject> clientOrderList = transactionMapper.getClientOrderByTransactionTime(params); List<JSONObject> clientOrderList = transactionMapper.getClientOrderByTransactionTime(params);
List<Integer> clientOrders = new ArrayList<>(clientOrderList.size()); List<Integer> clientOrders = new ArrayList<>(clientOrderList.size());
clientOrderList.parallelStream().forEach(p -> clientOrders.add(p.getInteger("clearing_order"))); clientOrderList.parallelStream().forEach(p -> clientOrders.add(p.getInteger("clearing_order")));
@ -1666,6 +1676,7 @@ public class TradeLogServiceImpl implements TradeLogService {
if (params.get("client_ids") == null) { if (params.get("client_ids") == null) {
params.put("client_id", client.getString("client_id")); params.put("client_id", client.getString("client_id"));
} }
clientManager.queryModifyClientIds(partner.getIntValue("client_id"), params);
List<JSONObject> clientOrderList = transactionMapper.getClientOrderByTransactionTime(params); List<JSONObject> clientOrderList = transactionMapper.getClientOrderByTransactionTime(params);
List<Integer> clientOrders = new ArrayList<>(clientOrderList.size()); List<Integer> clientOrders = new ArrayList<>(clientOrderList.size());
clientOrderList.parallelStream().forEach(p -> clientOrders.add(p.getInteger("clearing_order"))); clientOrderList.parallelStream().forEach(p -> clientOrders.add(p.getInteger("clearing_order")));
@ -1713,6 +1724,7 @@ public class TradeLogServiceImpl implements TradeLogService {
JSONObject params = query.toParams(timezone); JSONObject params = query.toParams(timezone);
clientManager.validateClients(clientId1, params); clientManager.validateClients(clientId1, params);
params.put("client_id", clientId1); params.put("client_id", clientId1);
clientManager.queryModifyClientIds(clientId1, params);
List<JSONObject> logs = transactionMapper.listTransFlow(params); List<JSONObject> logs = transactionMapper.listTransFlow(params);
TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy HH:mm:ss", Collections.singletonList("transaction_time")); TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy HH:mm:ss", Collections.singletonList("transaction_time"));
@ -1805,4 +1817,6 @@ public class TradeLogServiceImpl implements TradeLogService {
} }
} }
} }
} }

@ -2,15 +2,15 @@
spring.datasource.type = com.zaxxer.hikari.HikariDataSource spring.datasource.type = com.zaxxer.hikari.HikariDataSource
#数据源master #数据源master
spring.datasource.master.schema-name=royalpay_dev spring.datasource.master.schema-name=royalpay_production
spring.datasource.master.host=127.0.0.1:3306 spring.datasource.master.host=192.168.0.4:3306
spring.datasource.master.jdbc-url=jdbc:mysql://${spring.datasource.master.host}/${spring.datasource.master.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false spring.datasource.master.jdbc-url=jdbc:mysql://${spring.datasource.master.host}/${spring.datasource.master.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
spring.datasource.master.username=root spring.datasource.master.username=taylor
spring.datasource.master.password=root spring.datasource.master.password=taylor
#数据源salve #数据源salve
spring.datasource.slave.schema-name=royalpay_dev spring.datasource.slave.schema-name=royalpay_production
spring.datasource.slave.host=127.0.0.1:3306 spring.datasource.slave.host=192.168.0.4:3306
spring.datasource.slave.jdbc-url=jdbc:mysql://${spring.datasource.slave.host}/${spring.datasource.slave.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false spring.datasource.slave.jdbc-url=jdbc:mysql://${spring.datasource.slave.host}/${spring.datasource.slave.schema-name}?useUnicode=true&characterEncoding=utf8&useSSL=false
spring.datasource.slave.username=root spring.datasource.slave.username=taylor
spring.datasource.slave.password=root spring.datasource.slave.password=taylor

@ -359,8 +359,16 @@
SUM(t.clearing_amount) total SUM(t.clearing_amount) total
FROM pmt_transactions t FROM pmt_transactions t
WHERE t.channel='Settlement' WHERE t.channel='Settlement'
and t.client_id=#{client_id}
]]> ]]>
<if test="client_ids!=null">
AND t.client_id IN
<foreach collection="client_ids" open="(" close=")" separator="," item="client_id">
#{client_id}
</foreach>
</if>
<if test="client_ids==null and client_id != null">
and t.client_id=#{client_id}
</if>
<if test="from!=null">and t.transaction_time &gt;= #{from}</if> <if test="from!=null">and t.transaction_time &gt;= #{from}</if>
<if test="to!=null">and t.transaction_time &lt; #{to}</if> <if test="to!=null">and t.transaction_time &lt; #{to}</if>
</select> </select>

@ -555,6 +555,17 @@
and contact_email = #{contact_email} and contact_email = #{contact_email}
</if> </if>
</select> </select>
<select id="listChildClientsByPage" resultType="com.alibaba.fastjson.JSONObject">
select * from sys_clients
where
parent_client_id = #{parent_client_id}
and is_valid = 1
<if test="search_text!=null">
<bind name="name_pattern" value="'%'+search_text+'%'"/>
and (client_moniker=#{search_text} or short_name like #{name_pattern} or company_name like
#{name_pattern} or business_name like #{name_pattern} or contact_email=#{search_text})
</if>
</select>
<select id="listClientsWithTransactionsSettled" resultType="int"> <select id="listClientsWithTransactionsSettled" resultType="int">
select distinct t.client_id select distinct t.client_id
from pmt_transactions t from pmt_transactions t

@ -104,6 +104,9 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angul
} else { } else {
params.end = $filter('date')(new Date(), 'yyyyMMdd'); params.end = $filter('date')(new Date(), 'yyyyMMdd');
} }
if ($scope.chooseShow === 'All') {
delete params.client_ids;
}
$http.get('/dashboard/partner/customers', {params: params}).then(function (resp) { $http.get('/dashboard/partner/customers', {params: params}).then(function (resp) {
var dates = []; var dates = [];
var new_customers = []; var new_customers = [];
@ -118,7 +121,7 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angul
// $scope.customersHistory = chartParser.parse(customersHistoryConfig, resp.data.reverse()); // $scope.customersHistory = chartParser.parse(customersHistoryConfig, resp.data.reverse());
$scope.perCustomerTransactionHistory = chartParser.parse(perCustomerTransactionHistoryConfig, resp.data); $scope.perCustomerTransactionHistory = chartParser.parse(perCustomerTransactionHistoryConfig, resp.data);
//$scope.ordersHistory = chartParser.parse(ordersHistoryConfig, resp.data); //$scope.ordersHistory = chartParser.parse(ordersHistoryConfig, resp.data);
}) });
}; };
$scope.chooseLast7Days(); $scope.chooseLast7Days();

@ -104,6 +104,9 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angul
} else { } else {
params.end = $filter('date')(new Date(), 'yyyyMMdd'); params.end = $filter('date')(new Date(), 'yyyyMMdd');
} }
if ($scope.chooseShow === 'All') {
delete params.client_ids;
}
$http.get('/dashboard/partner/customers', {params: params}).then(function (resp) { $http.get('/dashboard/partner/customers', {params: params}).then(function (resp) {
$scope.transactionAmountHistory = chartParser.parse(transactionAmountHistoryConfig, resp.data.reverse()); $scope.transactionAmountHistory = chartParser.parse(transactionAmountHistoryConfig, resp.data.reverse());
$scope.ordersHistory = chartParser.parse(ordersHistoryConfig, resp.data); $scope.ordersHistory = chartParser.parse(ordersHistoryConfig, resp.data);

@ -651,8 +651,12 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
$scope.loadDashboard(); $scope.loadDashboard();
}; };
$scope.loadSettlementLogs = function (page) { $scope.loadSettlementLogs = function (page) {
var params = {limit:10}; var params = angular.copy($scope.params);
$http.get('/client/trans_flow/settlement/log', {params: angular.merge(params,$scope.params)}).then(function (resp) { params.limit = 10;
if ($scope.chooseShow = 'All') {
delete params.client_ids;
}
$http.get('/client/trans_flow/settlement/log', {params: params}).then(function (resp) {
$scope.settlementLogs = resp.data.data; $scope.settlementLogs = resp.data.data;
}); });
}; };
@ -671,6 +675,9 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
function loadTransCommon() { function loadTransCommon() {
var params = angular.copy($scope.params); var params = angular.copy($scope.params);
params = angular.merge(params, $scope.scales[0].params()); params = angular.merge(params, $scope.scales[0].params());
if ($scope.chooseShow === 'All') {
delete params.client_ids;
}
$http.get('/dashboard/partner/common_analysis',{params:params}).then(function (resp) { $http.get('/dashboard/partner/common_analysis',{params:params}).then(function (resp) {
$scope.transcommon = resp.data; $scope.transcommon = resp.data;
}); });
@ -733,6 +740,9 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
column: {key: 'aud_fee', name: 'gateway_label'} column: {key: 'aud_fee', name: 'gateway_label'}
}] }]
}; };
if ($scope.chooseShow === 'All') {
delete params.client_ids;
}
$http.get('/dashboard/partner/trans_type_analysis',{params:params}).then(function (resp) { $http.get('/dashboard/partner/trans_type_analysis',{params:params}).then(function (resp) {
$scope.trade_type_chart = chartParser.parse(tradeInTypeConfig, resp.data); $scope.trade_type_chart = chartParser.parse(tradeInTypeConfig, resp.data);
}); });
@ -792,6 +802,9 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
} }
] ]
}; };
if ($scope.chooseShow === 'All') {
delete params.client_ids;
}
$http.get('/dashboard/partner/fee_analysis', {params: params}).then(function (resp) { $http.get('/dashboard/partner/fee_analysis', {params: params}).then(function (resp) {
$scope.trade_line = chartParser.parse(analysisConfig, resp.data); $scope.trade_line = chartParser.parse(analysisConfig, resp.data);
}) })
@ -799,10 +812,17 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
function getOrderCustomerChartAnalysis(params) { function getOrderCustomerChartAnalysis(params) {
if ($scope.chooseShow === 'All') {
delete params.client_ids;
}
$http.get('/dashboard/partner/avg_order_customer',{params:params}).then(function (resp) { $http.get('/dashboard/partner/avg_order_customer',{params:params}).then(function (resp) {
$scope.avgOrderAndCustomer = resp.data; $scope.avgOrderAndCustomer = resp.data;
}); });
$http.get('/dashboard/partner/fee_analysis',{params:angular.merge(params,$scope.params)}).then(function (resp) { params = angular.merge(params, $scope.params);
if ($scope.chooseShow === 'All') {
delete params.client_ids;
}
$http.get('/dashboard/partner/fee_analysis',{params:params}).then(function (resp) {
var dates = []; var dates = [];
var new_customers = []; var new_customers = [];
var old_customers = []; var old_customers = [];

@ -2470,8 +2470,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}; };
$scope.loadSubClients = function (page) { $scope.loadSubClients = function (page) {
$scope.page = page || $scope.pagination.page || 1; var params = {};
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/'+$scope.page).then(function (resp) { params.page = page || $scope.pagination.page || 1;
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/page',{params : params}).then(function (resp) {
$scope.subPartners = resp.data.data; $scope.subPartners = resp.data.data;
$scope.pagination = resp.data.pagination; $scope.pagination = resp.data.pagination;
}); });
@ -3383,6 +3384,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.isLevel3All = true; $scope.isLevel3All = true;
$scope.clients = [$scope.partner]; $scope.clients = [$scope.partner];
$scope.showLevel3Clients = false; $scope.showLevel3Clients = false;
$scope.subClientTable1 = [$scope.partner];
$scope.subClientTable2 = [];
$scope.choseSubClientNow = 'chose';
$scope.more20ChoseSubClient = false;
$scope.subSearchText = '';
$scope.today = new Date(); $scope.today = new Date();
$scope.chooseToday = function () { $scope.chooseToday = function () {
@ -3450,6 +3456,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
delete params.gatewayChilds; delete params.gatewayChilds;
delete params.gatewayChild; delete params.gatewayChild;
} }
if ($scope.isAll) {
delete params.client_ids;
}
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/trade_logs', {params: params}).then(function (resp) { $http.get('/sys/partners/' + $scope.partner.client_moniker + '/trade_logs', {params: params}).then(function (resp) {
$scope.tradeLogs = resp.data.data; $scope.tradeLogs = resp.data.data;
$scope.pagination = resp.data.pagination; $scope.pagination = resp.data.pagination;
@ -3484,6 +3493,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}); });
$scope.chooseClient = function (client) { $scope.chooseClient = function (client) {
if (client == 'all') { if (client == 'all') {
$scope.choseSubClientNow = 'chose';
$scope.params.client_ids = angular.copy($scope.clientIds); $scope.params.client_ids = angular.copy($scope.clientIds);
$scope.isAll = true; $scope.isAll = true;
$scope.chooseClientId = ''; $scope.chooseClientId = '';
@ -3520,10 +3530,24 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
$scope.loadTradeLogs(); $scope.loadTradeLogs();
}; };
if ($scope.partner.has_children && !$scope.partner.hide_sub_mch) { $scope.searchSubClients = function (subSearchText,page) {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients').then(function (resp) { $scope.subClientTable1 = [$scope.partner];
var clientList = resp.data; $scope.subClientTable2 = [];
var params = {};
params.page = page || $scope.subClientPagination.page || 1;
if (subSearchText != '') {
$scope.subSearchText = subSearchText;
params.searchText = subSearchText;
}
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/page',{params: params}).then(function (resp) {
var clientList = resp.data.data;
$scope.subClientPagination = resp.data.pagination;
clientList.forEach(function (client) { clientList.forEach(function (client) {
if ($scope.subClientTable1.length < 11) {
$scope.subClientTable1.push(client);
}else {
$scope.subClientTable2.push(client);
}
$scope.clients.push(client); $scope.clients.push(client);
}); });
$scope.clientIds = []; $scope.clientIds = [];
@ -3536,12 +3560,27 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
}); });
$scope.params.client_ids = angular.copy($scope.clientIds); $scope.params.client_ids = angular.copy($scope.clientIds);
//console.log($rootScope.currentUser.client.clientList); });
};
if ($scope.partner.has_children && !$scope.partner.hide_sub_mch) {
$scope.searchSubClients('',1);
$scope.loadTradeLogs(1); $scope.loadTradeLogs(1);
})
} else { } else {
$scope.loadTradeLogs(1); $scope.loadTradeLogs(1);
} }
$scope.checkSubClientChoseShow = function (client) {
$scope.more20ChoseSubClient = !$scope.more20ChoseSubClient;
if (client != '') {
$scope.choseSubClientNow = client.short_name;
}
}
$scope.clickDisplayChoseDiv = function (event) {
$scope.more20ChoseSubClient = false;
}
$scope.choseDivStopPropagation = function (event) {
event.stopPropagation()
};
}]); }]);
app.controller('partnerPluginsCtrl', ['$scope', '$uibModal', function ($scope, $uibModal) { app.controller('partnerPluginsCtrl', ['$scope', '$uibModal', function ($scope, $uibModal) {
$scope.configRedpack = function () { $scope.configRedpack = function () {
@ -4355,15 +4394,27 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.isLevel3All = true; $scope.isLevel3All = true;
$scope.clinet = {}; $scope.clinet = {};
$scope.isAll = true; $scope.isAll = true;
$scope.initClientInfo = function(){ $scope.more20ChoseSubClient = false;
$http.get('/sys/partners/'+clientMoniker).then(function (resp) { $scope.choseSubClientNow = 'chose';
$scope.client = resp.data; $scope.searchSubClients = function (subSearchText,page) {
$scope.clients = [$scope.client];
if ($scope.client.has_children && !$scope.client.hide_sub_mch) { $scope.subClientTable1 = [$scope.partner];
$scope.params.client_ids = [$scope.client.client_id]; $scope.subClientTable2 = [];
$http.get('/sys/partners/'+clientMoniker+'/sub_clients').then(function (resp) { var params = {};
var clientList = resp.data; params.page = page || $scope.subClientPagination.page || 1;
if (subSearchText != '') {
$scope.subSearchText = subSearchText;
params.searchText = subSearchText;
}
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/sub_clients/page',{params: params}).then(function (resp) {
var clientList = resp.data.data;
$scope.subClientPagination = resp.data.pagination;
clientList.forEach(function (client) { clientList.forEach(function (client) {
if ($scope.subClientTable1.length < 11) {
$scope.subClientTable1.push(client);
}else {
$scope.subClientTable2.push(client);
}
$scope.clients.push(client); $scope.clients.push(client);
}); });
$scope.clientIds = []; $scope.clientIds = [];
@ -4376,8 +4427,25 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
}); });
$scope.params.client_ids = angular.copy($scope.clientIds); $scope.params.client_ids = angular.copy($scope.clientIds);
$scope.loadSettlementLogs(1); });
}) };
$scope.initClientInfo = function(){
$http.get('/sys/partners/'+clientMoniker).then(function (resp) {
$scope.client = resp.data;
$scope.clients = [$scope.client];
if ($scope.client.has_children && !$scope.client.hide_sub_mch) {
$scope.searchSubClients('',1);
$scope.params.dateto = new Date();
var day = new Date();
day.setDate(day.getDate() - 7);
$scope.params.datefrom = day;
$scope.chooseClient('all');
}else {
$scope.params.dateto = new Date();
var day = new Date();
day.setDate(day.getDate() - 7);
$scope.params.datefrom = day;
$scope.chooseClient('all');
} }
}); });
} }
@ -4396,7 +4464,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
params.dateto = $filter('date')(params.dateto, 'yyyyMMdd'); params.dateto = $filter('date')(params.dateto, 'yyyyMMdd');
url += connectSymbol + 'dateto=' + params.dateto; url += connectSymbol + 'dateto=' + params.dateto;
} }
if (params.client_ids){ if (params.client_ids && !$scope.isAll){
params.client_ids.forEach(function (i) { params.client_ids.forEach(function (i) {
url += connectSymbol + 'client_ids=' + i; url += connectSymbol + 'client_ids=' + i;
connectSymbol = '&'; connectSymbol = '&';
@ -4407,6 +4475,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.chooseClient = function (client) { $scope.chooseClient = function (client) {
if (client == 'all') { if (client == 'all') {
$scope.choseSubClientNow = 'chose';
$scope.params.client_ids = angular.copy($scope.clientIds); $scope.params.client_ids = angular.copy($scope.clientIds);
$scope.isAll = true; $scope.isAll = true;
$scope.chooseClientId = ''; $scope.chooseClientId = '';
@ -4477,6 +4546,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
params.page = page || $scope.pagination.page || 1; params.page = page || $scope.pagination.page || 1;
params.limit = 10; params.limit = 10;
if ($scope.isAll) {
delete params.client_ids;
}
$http.get('/sys/partners/' + clientMoniker + '/lists_settlements', {params: params}).then(function (resp) { $http.get('/sys/partners/' + clientMoniker + '/lists_settlements', {params: params}).then(function (resp) {
$scope.settlementLogs = resp.data.data; $scope.settlementLogs = resp.data.data;
$scope.padding = resp.data.padding; $scope.padding = resp.data.padding;
@ -4496,7 +4568,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
size: 'lg' size: 'lg'
}); });
}; };
$scope.chooseLast7Days();
$scope.checkSubClientChoseShow = function (client) {
$scope.more20ChoseSubClient = !$scope.more20ChoseSubClient;
if (client != '') {
$scope.choseSubClientNow = client.short_name;
}
}
$scope.clickDisplayChoseDiv = function (event) {
$scope.more20ChoseSubClient = false;
}
$scope.choseDivStopPropagation = function (event) {
event.stopPropagation()
};
}]); }]);
app.controller('partnerSurchargeAccountCtrl', ['$scope', '$uibModal', '$http', 'clientMoniker', '$filter', function ($scope, $uibModal, $http, clientMoniker, $filter) { app.controller('partnerSurchargeAccountCtrl', ['$scope', '$uibModal', '$http', 'clientMoniker', '$filter', function ($scope, $uibModal, $http, clientMoniker, $filter) {
$scope.params = {}; $scope.params = {};

@ -1930,9 +1930,14 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
}]); }]);
app.controller('clientSubPartnersCtrl', ['$scope', '$http', 'partner', function ($scope, $http, partner) { app.controller('clientSubPartnersCtrl', ['$scope', '$http', 'partner', function ($scope, $http, partner) {
$scope.partner = partner.data; $scope.partner = partner.data;
$scope.loadSubPartners = function () { $scope.pagination = {};
$http.get('/client/partner_info/sub_partners').then(function (resp) { $scope.params = {};
$scope.subPartners = resp.data; $scope.loadSubPartners = function (page) {
var params = angular.copy($scope.params);
params.page = page || $scope.pagination.page || 1;
$http.get('/client/partner_info/sub_partners/page',{params: params}).then(function (resp) {
$scope.subPartners = resp.data.data;
$scope.pagination = resp.data.pagination;
$scope.subPartners.forEach(function (client) { $scope.subPartners.forEach(function (client) {
if (client.level3Clients) { if (client.level3Clients) {
client.level3Clients.forEach(function (level3Client) { client.level3Clients.forEach(function (level3Client) {

@ -9,6 +9,17 @@
</section> </section>
<section class="content"> <section class="content">
<div class="row"> <div class="row">
<div class="row" style="margin-bottom: 30px;">
<div class="col-sm-4 col-xs-8" style="margin-left: 30%">
<input class="form-control" placeholder="Keyword"
ng-model="params.searchText">
</div>
<div class="col-sm-3">
<button class="btn btn-success" type="button" ng-click="loadSubPartners()">
<i class="fa fa-search"></i> Search
</button>
</div>
</div>
<div class="col-sm-12 table-responsive"> <div class="col-sm-12 table-responsive">
<table class="table table-bordered table-striped table-hover"> <table class="table table-bordered table-striped table-hover">
<thead> <thead>
@ -34,6 +45,24 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="box-footer" ng-if="subPartners.length" style="float: right;background-color: #efefef00;">
<uib-pagination class="pagination"
total-items="pagination.totalCount"
boundary-links="true"
ng-model="pagination.page"
items-per-page="pagination.limit"
max-size="10"
ng-change="loadSubPartners(pagination.page)"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">
Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}
</div>
</div>
</div>
</div> </div>
</div> </div>
</section> </section>

@ -1,4 +1,45 @@
<div class="row margin-bottom"> <style>
.white_content {
display: none;
position: absolute;
width: 80%;
height: 400px;
padding: 20px;
border: 1px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
.white_content::-webkit-scrollbar:vertical {
width: 11px;
}
/*定义滚动条高宽及背景
高宽分别对应横竖滚动条的尺寸*/
.white_content::-webkit-scrollbar
{
-webkit-appearance: none;
width:16px;
height:16px;
background-color:#F5F5F5;
}
/*定义滚动条轨道
内阴影+圆角*/
.white_content::-webkit-scrollbar-track
{
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3);
border-radius:10px;
background-color:#F5F5F5;
}
/*定义滑块
内阴影+圆角*/
.white_content::-webkit-scrollbar-thumb
{
border-radius:10px;
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);
background-color:#555;
}
</style>
<div class="row margin-bottom" ng-click="clickDisplayChoseDiv($event)">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group col-xs-12"> <div class="form-group col-xs-12">
@ -164,13 +205,110 @@
<div class="form-group col-xs-12" ng-if="partner.has_children && !partner.hide_sub_mch"> <div class="form-group col-xs-12" ng-if="partner.has_children && !partner.hide_sub_mch">
<label class="control-label col-xs-4 col-sm-2">Sub Partner</label> <label class="control-label col-xs-4 col-sm-2">Sub Partner</label>
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static" ng-if="clients.length<20">
<a role="button" ng-class="{'bg-primary':isAll}" ng-click="chooseClient('all')">All</a> <a role="button" ng-class="{'bg-primary':isAll}" ng-click="chooseClient('all')">All</a>
<label ng-repeat="sub in clients"> <label ng-repeat="sub in clients">
|&nbsp;<a role="button" ng-class="{'bg-primary':sub.client_id==chooseClientId}" |&nbsp;<a role="button" ng-class="{'bg-primary':sub.client_id==chooseClientId}"
ng-click="chooseClient(sub)">{{sub.short_name}}</a>&nbsp; ng-click="chooseClient(sub)">{{sub.short_name}}</a>&nbsp;
</label> </label>
</p> </p>
<p class="form-control-static" ng-if="clients.length>=20">
<a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseClient('all')">All</a>
<label ng-click="checkSubClientChoseShow('');choseDivStopPropagation($event)" style="cursor: pointer;">
<input ng-model="choseSubClientNow" style="border:none;cursor: pointer;" readonly>
</label>
</p>
<div id="light" class="white_content" ng-if="more20ChoseSubClient" style="display: block;" ng-click="choseDivStopPropagation($event)">
<div class="row">
<div class="form-group col-xs-12">
<div class="col-sm-8 col-xs-8">
<input class="form-control" placeholder="Keyword"
ng-model="subSearchText">
</div>
<div class="col-sm-3">
<button class="btn btn-success" type="button" ng-click="searchSubClients(subSearchText,1)">
<i class="fa fa-search"></i> Search
</button>
</div>
</div>
<div class="col-sm-12 table-responsive">
<div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px">
<thead>
<tr>
<th>Partner Code</th>
<th>Partner Name</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="subPartner in subClientTable1">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer">
{{subPartner.client_moniker}}
</td>
<td ng-bind="subPartner.short_name"></td>
<td>
<button role="button" class="btn btn-info" title="Add Search"
style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px">
<thead>
<tr>
<th>Partner Code</th>
<th>Partner Name</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="subPartner in subClientTable2">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer">
{{subPartner.client_moniker}}
</td>
<td ng-bind="subPartner.short_name"></td>
<td>
<button role="button" class="btn btn-info" title="Add Search"
style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-footer" ng-if="clients.length" style="float: right;">
<uib-pagination class="pagination"
total-items="subClientPagination.totalCount"
boundary-links="true"
ng-model="subClientPagination.page"
items-per-page="subClientPagination.limit"
max-size="10"
ng-change="searchSubClients('',subClientPagination.page)"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">
Total Records:{{subClientPagination.totalCount}};Total Pages:{{subClientPagination.totalPages}}
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" ng-click="checkSubClientChoseShow('')">Cancel</button>
</div>
</div>
</div> </div>
</div> </div>
<div class="form-group col-xs-12" ng-if="level3Clients && showLevel3Clients"> <div class="form-group col-xs-12" ng-if="level3Clients && showLevel3Clients">

@ -1,4 +1,45 @@
<div class="content"> <style>
.white_content {
display: none;
position: absolute;
width: 80%;
height: 400px;
padding: 20px;
border: 1px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
.white_content::-webkit-scrollbar:vertical {
width: 11px;
}
/*定义滚动条高宽及背景
高宽分别对应横竖滚动条的尺寸*/
.white_content::-webkit-scrollbar
{
-webkit-appearance: none;
width:16px;
height:16px;
background-color:#F5F5F5;
}
/*定义滚动条轨道
内阴影+圆角*/
.white_content::-webkit-scrollbar-track
{
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3);
border-radius:10px;
background-color:#F5F5F5;
}
/*定义滑块
内阴影+圆角*/
.white_content::-webkit-scrollbar-thumb
{
border-radius:10px;
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);
background-color:#555;
}
</style>
<div class="content" ng-click="clickDisplayChoseDiv($event)">
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="box-solid"> <div class="box-solid">
@ -53,7 +94,7 @@
<div class="form-group col-xs-12" ng-if="client.has_children && !client.hide_sub_mch"> <div class="form-group col-xs-12" ng-if="client.has_children && !client.hide_sub_mch">
<label class="control-label col-xs-4 col-sm-2">Sub Partner</label> <label class="control-label col-xs-4 col-sm-2">Sub Partner</label>
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static" ng-if="clients.length<20">
<a role="button" ng-class="{'bg-primary':isAll}" <a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseClient('all')">All</a> ng-click="chooseClient('all')">All</a>
<label ng-repeat="sub in clients"> <label ng-repeat="sub in clients">
@ -62,6 +103,103 @@
ng-click="chooseClient(sub)">{{sub.short_name}}</a>&nbsp; ng-click="chooseClient(sub)">{{sub.short_name}}</a>&nbsp;
</label> </label>
</p> </p>
<p class="form-control-static" ng-if="clients.length>=20">
<a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseClient('all')">All</a>
<label ng-click="checkSubClientChoseShow('');choseDivStopPropagation($event)" style="cursor: pointer;">
<input ng-model="choseSubClientNow" style="border:none;cursor: pointer;" readonly>
</label>
</p>
<div id="light" class="white_content" ng-if="more20ChoseSubClient" style="display: block;" ng-click="choseDivStopPropagation($event)">
<div class="row">
<div class="form-group col-xs-12">
<div class="col-sm-8 col-xs-8">
<input class="form-control" placeholder="Keyword"
ng-model="subSearchText">
</div>
<div class="col-sm-3">
<button class="btn btn-success" type="button" ng-click="searchSubClients(subSearchText,1)">
<i class="fa fa-search"></i> Search
</button>
</div>
</div>
<div class="col-sm-12 table-responsive">
<div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px">
<thead>
<tr>
<th>Partner Code</th>
<th>Partner Name</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="subPartner in subClientTable1">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer">
{{subPartner.client_moniker}}
</td>
<td ng-bind="subPartner.short_name"></td>
<td>
<button role="button" class="btn btn-info" title="Add Search"
style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px">
<thead>
<tr>
<th>Partner Code</th>
<th>Partner Name</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="subPartner in subClientTable2">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer">
{{subPartner.client_moniker}}
</td>
<td ng-bind="subPartner.short_name"></td>
<td>
<button role="button" class="btn btn-info" title="Add Search"
style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-footer" ng-if="clients.length" style="float: right;">
<uib-pagination class="pagination"
total-items="subClientPagination.totalCount"
boundary-links="true"
ng-model="subClientPagination.page"
items-per-page="subClientPagination.limit"
max-size="10"
ng-change="searchSubClients('',subClientPagination.page)"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">
Total Records:{{subClientPagination.totalCount}};Total Pages:{{subClientPagination.totalPages}}
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" ng-click="checkSubClientChoseShow('')">Cancel</button>
</div>
</div>
</div> </div>
</div> </div>
<button class="btn btn-success" type="button" ng-click="loadSettlementLogs(1)"> <button class="btn btn-success" type="button" ng-click="loadSettlementLogs(1)">

@ -25,12 +25,29 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.clients = [$scope.currentUser.client]; $scope.clients = [$scope.currentUser.client];
$scope.showLevel3Clients = false; $scope.showLevel3Clients = false;
$scope.isLevel3All = true; $scope.isLevel3All = true;
$scope.subClientTable1 = [$scope.currentUser.client];
$scope.subClientTable2 = [];
$scope.choseSubClientNow = 'chose';
$scope.subSearchText = '';
$scope.searchSubClients = function (subSearchText,page) {
if ($scope.currentUser.client.has_children && !$scope.currentUser.client.hide_sub_mch) { $scope.subClientTable1 = [$scope.currentUser.client];
$scope.params.client_ids = [$scope.currentUser.client.client_id]; $scope.subClientTable2 = [];
$http.get('/client/partner_info/sub_partners').then(function (resp) { var params = {};
var clientList = resp.data; params.page = page || $scope.subClientPagination.page || 1;
if (subSearchText != '') {
$scope.subSearchText = subSearchText;
params.searchText = subSearchText;
}
$http.get('/client/partner_info/sub_partners/page',{params: params}).then(function (resp) {
var clientList = resp.data.data;
$scope.subClientPagination = resp.data.pagination;
clientList.forEach(function (client) { clientList.forEach(function (client) {
if ($scope.subClientTable1.length < 11) {
$scope.subClientTable1.push(client);
}else {
$scope.subClientTable2.push(client);
}
$scope.clients.push(client); $scope.clients.push(client);
}); });
$scope.clientIds = []; $scope.clientIds = [];
@ -43,9 +60,8 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
} }
}); });
$scope.params.client_ids = angular.copy($scope.clientIds); $scope.params.client_ids = angular.copy($scope.clientIds);
}) });
} };
$scope.today = new Date(); $scope.today = new Date();
$scope.chooseToday = function () { $scope.chooseToday = function () {
$scope.params.datefrom = $scope.params.dateto = new Date(); $scope.params.datefrom = $scope.params.dateto = new Date();
@ -90,6 +106,9 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
params.dateto = $filter('date')(params.dateto, 'yyyyMMdd'); params.dateto = $filter('date')(params.dateto, 'yyyyMMdd');
} }
params.page = page || $scope.pagination.page || 1; params.page = page || $scope.pagination.page || 1;
if ($scope.isAll) {
delete params.client_ids;
}
$http.get('/client/trans_flow/settlement/log', {params: params}).then(function (resp) { $http.get('/client/trans_flow/settlement/log', {params: params}).then(function (resp) {
$scope.settlementLogs = resp.data.data; $scope.settlementLogs = resp.data.data;
$scope.pagination = resp.data.pagination; $scope.pagination = resp.data.pagination;
@ -110,7 +129,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
params.dateto = $filter('date')(params.dateto, 'yyyyMMdd'); params.dateto = $filter('date')(params.dateto, 'yyyyMMdd');
url += connectSymbol + 'dateto=' + params.dateto; url += connectSymbol + 'dateto=' + params.dateto;
} }
if (params.client_ids) { if (params.client_ids && !$scope.isAll) {
params.client_ids.forEach(function (i) { params.client_ids.forEach(function (i) {
url += connectSymbol + 'client_ids=' + i; url += connectSymbol + 'client_ids=' + i;
connectSymbol = '&'; connectSymbol = '&';
@ -118,7 +137,6 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
} }
return url; return url;
}; };
$scope.chooseLast7Days();
$scope.exportSettlementLogs = function (pattern) { $scope.exportSettlementLogs = function (pattern) {
let params = angular.copy($scope.params); let params = angular.copy($scope.params);
@ -138,7 +156,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
params.dateto = $filter('date')(params.dateto, 'yyyyMMdd'); params.dateto = $filter('date')(params.dateto, 'yyyyMMdd');
url += connectSymbol + 'dateto=' + params.dateto; url += connectSymbol + 'dateto=' + params.dateto;
} }
if (params.client_ids) { if (params.client_ids && !$scope.isAll) {
params.client_ids.forEach(function (i) { params.client_ids.forEach(function (i) {
url += connectSymbol + 'client_ids=' + i; url += connectSymbol + 'client_ids=' + i;
connectSymbol = '&'; connectSymbol = '&';
@ -157,6 +175,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.chooseClient = function (client) { $scope.chooseClient = function (client) {
if (client == 'all') { if (client == 'all') {
$scope.choseSubClientNow = 'chose';
$scope.params.client_ids = angular.copy($scope.clientIds); $scope.params.client_ids = angular.copy($scope.clientIds);
$scope.isAll = true; $scope.isAll = true;
$scope.chooseClientId = ''; $scope.chooseClientId = '';
@ -182,6 +201,21 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.loadSettlementLogs(1); $scope.loadSettlementLogs(1);
}; };
if ($scope.currentUser.client.has_children && !$scope.currentUser.client.hide_sub_mch) {
$scope.searchSubClients('',1);
$scope.params.dateto = new Date();
var day = new Date();
day.setDate(day.getDate() - 7);
$scope.params.datefrom = day;
$scope.chooseClient('all');
}else {
$scope.params.dateto = new Date();
var day = new Date();
day.setDate(day.getDate() - 7);
$scope.params.datefrom = day;
$scope.chooseClient('all');
}
$scope.chooseLevel3Client = function (client) { $scope.chooseLevel3Client = function (client) {
if (client == 'all') { if (client == 'all') {
$scope.params.client_ids = angular.copy($scope.level3ClientIds); $scope.params.client_ids = angular.copy($scope.level3ClientIds);
@ -198,6 +232,18 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.getClearingTransactions = function (client_id, detailId) { $scope.getClearingTransactions = function (client_id, detailId) {
clearingDetailService.clientClearingDetail(client_id, detailId, true) clearingDetailService.clientClearingDetail(client_id, detailId, true)
} }
$scope.checkSubClientChoseShow = function (client) {
$scope.more20ChoseSubClient = !$scope.more20ChoseSubClient;
if (client != '') {
$scope.choseSubClientNow = client.short_name;
}
}
$scope.clickDisplayChoseDiv = function (event) {
$scope.more20ChoseSubClient = false;
}
$scope.choseDivStopPropagation = function (event) {
event.stopPropagation()
};
}]); }]);
return app; return app;
}); });

@ -34,6 +34,45 @@
.line_height_ { .line_height_ {
line-height: 22px; line-height: 22px;
} }
.white_content {
display: none;
position: absolute;
width: 80%;
height: 400px;
padding: 20px;
border: 1px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
.white_content::-webkit-scrollbar:vertical {
width: 11px;
}
/*定义滚动条高宽及背景
高宽分别对应横竖滚动条的尺寸*/
.white_content::-webkit-scrollbar
{
-webkit-appearance: none;
width:16px;
height:16px;
background-color:#F5F5F5;
}
/*定义滚动条轨道
内阴影+圆角*/
.white_content::-webkit-scrollbar-track
{
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3);
border-radius:10px;
background-color:#F5F5F5;
}
/*定义滑块
内阴影+圆角*/
.white_content::-webkit-scrollbar-thumb
{
border-radius:10px;
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);
background-color:#555;
}
</style> </style>
<section class="content-header"> <section class="content-header">
<h1>Transactions</h1> <h1>Transactions</h1>
@ -44,7 +83,7 @@
<li class="active">Transactions</li> <li class="active">Transactions</li>
</ol> </ol>
</section> </section>
<div class="content"> <div class="content" ng-click="clickDisplayChoseDiv($event)">
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="box-solid"> <div class="box-solid">
@ -208,15 +247,113 @@
ng-if="currentUser.client.has_children && !currentUser.client.hide_sub_mch"> ng-if="currentUser.client.has_children && !currentUser.client.hide_sub_mch">
<label class="control-label col-xs-4 col-sm-2">Sub Partner</label> <label class="control-label col-xs-4 col-sm-2">Sub Partner</label>
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static" ng-if="clients.length<20">
<a role="button" ng-class="{'bg-primary':isAll}" <a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseClient('all')">All</a> ng-click="chooseClient('all')">All</a>
<label ng-repeat="sub in clients"> <label ng-repeat="sub in clients">
|&nbsp;<a role="button" |&nbsp;<a role="button"
ng-class="{'bg-primary':sub.client_id==chooseClientId}" ng-class="{'bg-primary':sub.client_id==chooseClientId}"
ng-click="chooseClient(sub)">{{sub.short_name}}</a>&nbsp; ng-click="chooseClient(sub)">{{sub.short_name}}</a>&nbsp;
</label> </label>
</p> </p>
<p class="form-control-static" ng-if="clients.length>=20">
<a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseClient('all')">All</a>
<label ng-click="checkSubClientChoseShow('');choseDivStopPropagation($event)" style="cursor: pointer;">
<input ng-model="choseSubClientNow" style="border:none;cursor: pointer;" readonly>
</label>
</p>
<div id="light" class="white_content" ng-if="more20ChoseSubClient" style="display: block;" ng-click="choseDivStopPropagation($event)">
<div class="row">
<div class="form-group col-xs-12">
<div class="col-sm-8 col-xs-8">
<input class="form-control" placeholder="Keyword"
ng-model="subSearchText">
</div>
<div class="col-sm-3">
<button class="btn btn-success" type="button" ng-click="searchSubClients(subSearchText,1)">
<i class="fa fa-search"></i> Search
</button>
</div>
</div>
<div class="col-sm-12 table-responsive">
<div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px">
<thead>
<tr>
<th>Partner Code</th>
<th>Partner Name</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="subPartner in subClientTable1">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer">
{{subPartner.client_moniker}}
</td>
<td ng-bind="subPartner.short_name"></td>
<td>
<button role="button" class="btn btn-info" title="Add Search"
style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px">
<thead>
<tr>
<th>Partner Code</th>
<th>Partner Name</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="subPartner in subClientTable2">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer">
{{subPartner.client_moniker}}
</td>
<td ng-bind="subPartner.short_name"></td>
<td>
<button role="button" class="btn btn-info" title="Add Search"
style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-footer" ng-if="clients.length" style="float: right;">
<uib-pagination class="pagination"
total-items="subClientPagination.totalCount"
boundary-links="true"
ng-model="subClientPagination.page"
items-per-page="subClientPagination.limit"
max-size="10"
ng-change="searchSubClients('',subClientPagination.page)"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">
Total Records:{{subClientPagination.totalCount}};Total Pages:{{subClientPagination.totalPages}}
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" ng-click="checkSubClientChoseShow('')">Cancel</button>
</div>
</div>
</div> </div>
</div> </div>
<div class="form-group col-xs-12" <div class="form-group col-xs-12"
@ -240,8 +377,6 @@
<button class="btn btn-success" type="button" ng-click="loadTradeLogs()"> <button class="btn btn-success" type="button" ng-click="loadTradeLogs()">
<i class="fa fa-search"></i> Search <i class="fa fa-search"></i> Search
</button> </button>
<!--<a ng-if="pagination.totalCount>0" class="btn btn-success" style="float: right"-->
<!--target="_blank" ng-href="{{export()}}">Export</a>-->
<div class="btn-group" uib-dropdown ng-if="pagination.totalCount>0" <div class="btn-group" uib-dropdown ng-if="pagination.totalCount>0"
style="float: right;right: 20px;"> style="float: right;right: 20px;">
<button id="single-button" type="button" class="btn btn-primary" <button id="single-button" type="button" class="btn btn-primary"
@ -258,7 +393,6 @@
Partner Detail)</a></li> Partner Detail)</a></li>
</ul> </ul>
</div> </div>
</div> </div>
</div> </div>
</div> </div>

@ -9,6 +9,45 @@
.alignCen,.alignCen th{ .alignCen,.alignCen th{
text-align: center; text-align: center;
} }
.white_content {
display: none;
position: absolute;
width: 80%;
height: 400px;
padding: 20px;
border: 1px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
.white_content::-webkit-scrollbar:vertical {
width: 11px;
}
/*定义滚动条高宽及背景
高宽分别对应横竖滚动条的尺寸*/
.white_content::-webkit-scrollbar
{
-webkit-appearance: none;
width:16px;
height:16px;
background-color:#F5F5F5;
}
/*定义滚动条轨道
内阴影+圆角*/
.white_content::-webkit-scrollbar-track
{
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3);
border-radius:10px;
background-color:#F5F5F5;
}
/*定义滑块
内阴影+圆角*/
.white_content::-webkit-scrollbar-thumb
{
border-radius:10px;
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);
background-color:#555;
}
</style> </style>
<section class="content-header"> <section class="content-header">
<h1>Settlement</h1> <h1>Settlement</h1>
@ -19,7 +58,7 @@
<li class="active">Settlement</li> <li class="active">Settlement</li>
</ol> </ol>
</section> </section>
<div class="content"> <div class="content" ng-click="clickDisplayChoseDiv($event)">
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="box-solid"> <div class="box-solid">
@ -74,7 +113,7 @@
<div class="form-group col-xs-12" ng-if="currentUser.client.has_children && !currentUser.client.hide_sub_mch"> <div class="form-group col-xs-12" ng-if="currentUser.client.has_children && !currentUser.client.hide_sub_mch">
<label class="control-label col-xs-4 col-sm-2">Sub Partner</label> <label class="control-label col-xs-4 col-sm-2">Sub Partner</label>
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static" ng-if="clients.length<20">
<a role="button" ng-class="{'bg-primary':isAll}" <a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseClient('all')">All</a> ng-click="chooseClient('all')">All</a>
<label ng-repeat="sub in clients"> <label ng-repeat="sub in clients">
@ -83,6 +122,103 @@
ng-click="chooseClient(sub)">{{sub.short_name}}</a>&nbsp; ng-click="chooseClient(sub)">{{sub.short_name}}</a>&nbsp;
</label> </label>
</p> </p>
<p class="form-control-static" ng-if="clients.length>=20">
<a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseClient('all')">All</a>
<label ng-click="checkSubClientChoseShow('');choseDivStopPropagation($event)" style="cursor: pointer;">
<input ng-model="choseSubClientNow" style="border:none;cursor: pointer;" readonly>
</label>
</p>
<div id="light" class="white_content" ng-if="more20ChoseSubClient" style="display: block;" ng-click="choseDivStopPropagation($event)">
<div class="row">
<div class="form-group col-xs-12">
<div class="col-sm-8 col-xs-8">
<input class="form-control" placeholder="Keyword"
ng-model="subSearchText">
</div>
<div class="col-sm-3">
<button class="btn btn-success" type="button" ng-click="searchSubClients(subSearchText,1)">
<i class="fa fa-search"></i> Search
</button>
</div>
</div>
<div class="col-sm-12 table-responsive">
<div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px">
<thead>
<tr>
<th>Partner Code</th>
<th>Partner Name</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="subPartner in subClientTable1">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer">
{{subPartner.client_moniker}}
</td>
<td ng-bind="subPartner.short_name"></td>
<td>
<button role="button" class="btn btn-info" title="Add Search"
style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px">
<thead>
<tr>
<th>Partner Code</th>
<th>Partner Name</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="subPartner in subClientTable2">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer">
{{subPartner.client_moniker}}
</td>
<td ng-bind="subPartner.short_name"></td>
<td>
<button role="button" class="btn btn-info" title="Add Search"
style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-footer" ng-if="clients.length" style="float: right;">
<uib-pagination class="pagination"
total-items="subClientPagination.totalCount"
boundary-links="true"
ng-model="subClientPagination.page"
items-per-page="subClientPagination.limit"
max-size="10"
ng-change="searchSubClients('',subClientPagination.page)"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">
Total Records:{{subClientPagination.totalCount}};Total Pages:{{subClientPagination.totalPages}}
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" ng-click="checkSubClientChoseShow('')">Cancel</button>
</div>
</div>
</div> </div>
</div> </div>
<div class="form-group col-xs-12" ng-if="level3Clients && showLevel3Clients"> <div class="form-group col-xs-12" ng-if="level3Clients && showLevel3Clients">

@ -78,6 +78,45 @@
.line_height_ { .line_height_ {
line-height: 22px; line-height: 22px;
} }
.white_content {
display: none;
position: absolute;
width: 80%;
height: 400px;
padding: 20px;
border: 1px solid orange;
background-color: white;
z-index:1002;
overflow: auto;
}
.white_content::-webkit-scrollbar:vertical {
width: 11px;
}
/*定义滚动条高宽及背景
高宽分别对应横竖滚动条的尺寸*/
.white_content::-webkit-scrollbar
{
-webkit-appearance: none;
width:16px;
height:16px;
background-color:#F5F5F5;
}
/*定义滚动条轨道
内阴影+圆角*/
.white_content::-webkit-scrollbar-track
{
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,0.3);
border-radius:10px;
background-color:#F5F5F5;
}
/*定义滑块
内阴影+圆角*/
.white_content::-webkit-scrollbar-thumb
{
border-radius:10px;
-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);
background-color:#555;
}
</style> </style>
<section class="content-header"> <section class="content-header">
<h1>Orders</h1> <h1>Orders</h1>
@ -88,7 +127,7 @@
<li class="active">Orders</li> <li class="active">Orders</li>
</ol> </ol>
</section> </section>
<div class="content"> <div class="content" ng-click="clickDisplayChoseDiv($event)">
<div class="callout callout-info" ng-repeat="order in alerts"> <div class="callout callout-info" ng-repeat="order in alerts">
<h4><span style="font-size: 22px">{{order.display_amount|currency:order.currency+' '}}</span> Paid <h4><span style="font-size: 22px">{{order.display_amount|currency:order.currency+' '}}</span> Paid
Success!</h4> Success!</h4>
@ -290,7 +329,7 @@
ng-if="currentUser.client.has_children && !currentUser.client.hide_sub_mch"> ng-if="currentUser.client.has_children && !currentUser.client.hide_sub_mch">
<label class="control-label col-xs-4 col-sm-2">Sub Partner</label> <label class="control-label col-xs-4 col-sm-2">Sub Partner</label>
<div class="col-sm-10 col-xs-8"> <div class="col-sm-10 col-xs-8">
<p class="form-control-static"> <p class="form-control-static" ng-if="clients.length<20">
<a role="button" ng-class="{'bg-primary':isAll}" <a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseClient('all')">All</a> ng-click="chooseClient('all')">All</a>
<label ng-repeat="sub in clients"> <label ng-repeat="sub in clients">
@ -301,6 +340,103 @@
&nbsp; &nbsp;
</label> </label>
</p> </p>
<p class="form-control-static" ng-if="clients.length>=20">
<a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseClient('all')">All</a>
<label ng-click="checkSubClientChoseShow('');choseDivStopPropagation($event)" style="cursor: pointer;">
<input ng-model="choseSubClientNow" style="border:none;cursor: pointer;" readonly>
</label>
</p>
<div id="light" class="white_content" ng-if="more20ChoseSubClient" style="display: block;" ng-click="choseDivStopPropagation($event)">
<div class="row">
<div class="form-group col-xs-12">
<div class="col-sm-8 col-xs-8">
<input class="form-control" placeholder="Keyword"
ng-model="subSearchText">
</div>
<div class="col-sm-3">
<button class="btn btn-success" type="button" ng-click="searchSubClients(subSearchText,1)">
<i class="fa fa-search"></i> Search
</button>
</div>
</div>
<div class="col-sm-12 table-responsive">
<div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px">
<thead>
<tr>
<th>Partner Code</th>
<th>Partner Name</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="subPartner in subClientTable1">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer">
{{subPartner.client_moniker}}
</td>
<td ng-bind="subPartner.short_name"></td>
<td>
<button role="button" class="btn btn-info" title="Add Search"
style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6" style="padding: 0 2px">
<table class="table table-bordered table-striped table-hover" style="padding: 6px">
<thead>
<tr>
<th>Partner Code</th>
<th>Partner Name</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="subPartner in subClientTable2">
<td ng-click="showClient(subPartner); toShow = !toShow" style="cursor:pointer">
{{subPartner.client_moniker}}
</td>
<td ng-bind="subPartner.short_name"></td>
<td>
<button role="button" class="btn btn-info" title="Add Search"
style="padding: 1px 6px;"
ng-click="chooseClient(subPartner);checkSubClientChoseShow(subPartner)">
<i class="fa fa-plus"></i>
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="box-footer" ng-if="clients.length" style="float: right;">
<uib-pagination class="pagination"
total-items="subClientPagination.totalCount"
boundary-links="true"
ng-model="subClientPagination.page"
items-per-page="subClientPagination.limit"
max-size="10"
ng-change="searchSubClients('',subClientPagination.page)"
previous-text="&lsaquo;"
next-text="&rsaquo;"
first-text="&laquo;"
last-text="&raquo;"></uib-pagination>
<div class="row">
<div class="col-xs-12">
Total Records:{{subClientPagination.totalCount}};Total Pages:{{subClientPagination.totalPages}}
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" ng-click="checkSubClientChoseShow('')">Cancel</button>
</div>
</div>
</div> </div>
</div> </div>
<div class="form-group col-xs-12" <div class="form-group col-xs-12"

@ -28,6 +28,10 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.dev_params = {client_type:'sunmi',limit:100}; $scope.dev_params = {client_type:'sunmi',limit:100};
$scope.clients = [$scope.currentUser.client]; $scope.clients = [$scope.currentUser.client];
$scope.showLevel3Clients = false; $scope.showLevel3Clients = false;
$scope.subClientTable1 = [$scope.currentUser.client];
$scope.subClientTable2 = [];
$scope.choseSubClientNow = 'chose';
$scope.subSearchText = '';
$scope.chooseToday = function () { $scope.chooseToday = function () {
@ -72,6 +76,9 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
if (params.dateto) { if (params.dateto) {
params.dateto = $filter('date')(params.dateto, 'yyyyMMdd'); params.dateto = $filter('date')(params.dateto, 'yyyyMMdd');
} }
if ($scope.isAll) {
delete params.client_ids;
}
params.page = page || $scope.pagination.page || 1; params.page = page || $scope.pagination.page || 1;
if(params.gateway){ if(params.gateway){
if((params.gateway.sort().toString()!=[0,1].toString()) && (params.gateway.sort().toString()!=[5,6].toString())){ if((params.gateway.sort().toString()!=[0,1].toString()) && (params.gateway.sort().toString()!=[5,6].toString())){
@ -183,6 +190,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}); });
$scope.chooseClient = function (client) { $scope.chooseClient = function (client) {
if (client == 'all') { if (client == 'all') {
$scope.choseSubClientNow = 'chose';
$scope.params.client_ids = angular.copy($scope.clientIds); $scope.params.client_ids = angular.copy($scope.clientIds);
$scope.isAll = true; $scope.isAll = true;
$scope.chooseClientId = ''; $scope.chooseClientId = '';
@ -235,12 +243,18 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.listDevices = function () { $scope.listDevices = function () {
var params = angular.copy($scope.dev_params) var params = angular.copy($scope.dev_params)
if ($scope.isAll) {
delete params.client_ids;
}
$http.get('/client/partner_info/devices', {params: params}).then(function (resp) { $http.get('/client/partner_info/devices', {params: params}).then(function (resp) {
$scope.devices = resp.data.data; $scope.devices = resp.data.data;
}) })
}; };
$scope.listDevicesIds = function () { $scope.listDevicesIds = function () {
var params = angular.copy($scope.params) var params = angular.copy($scope.params)
if ($scope.isAll) {
delete params.client_ids;
}
$http.get('/client/partner_info/device_ids',{params: params}).then(function (resp) { $http.get('/client/partner_info/device_ids',{params: params}).then(function (resp) {
$scope.deviceIds = resp.data.data; $scope.deviceIds = resp.data.data;
}) })
@ -278,10 +292,25 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.listDevices(); $scope.listDevices();
$scope.listDevicesIds(); $scope.listDevicesIds();
if ($scope.currentUser.client.has_children && !$scope.currentUser.client.hide_sub_mch) { $scope.searchSubClients = function (subSearchText,page) {
$http.get('/client/partner_info/sub_partners').then(function (resp) {
var clientList = resp.data; $scope.subClientTable1 = [$scope.currentUser.client];
$scope.subClientTable2 = [];
var params = {};
params.page = page || $scope.subClientPagination.page || 1;
if (subSearchText != '') {
$scope.subSearchText = subSearchText;
params.searchText = subSearchText;
}
$http.get('/client/partner_info/sub_partners/page',{params: params}).then(function (resp) {
var clientList = resp.data.data;
$scope.subClientPagination = resp.data.pagination;
clientList.forEach(function (client) { clientList.forEach(function (client) {
if ($scope.subClientTable1.length < 11) {
$scope.subClientTable1.push(client);
}else {
$scope.subClientTable2.push(client);
}
$scope.clients.push(client); $scope.clients.push(client);
}); });
$scope.clientIds = []; $scope.clientIds = [];
@ -294,12 +323,22 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
} }
}); });
$scope.params.client_ids = angular.copy($scope.clientIds); $scope.params.client_ids = angular.copy($scope.clientIds);
$scope.loadTradeLogs(1); });
$scope.listDevicesIds(); };
//console.log($rootScope.currentUser.client.clientList);
}) if ($scope.currentUser.client.has_children && !$scope.currentUser.client.hide_sub_mch) {
$scope.searchSubClients('',1);
$scope.params.dateto = new Date();
var day = new Date();
day.setDate(day.getDate() - 7);
$scope.params.datefrom = day;
$scope.chooseClient('all')
}else{ }else{
$scope.loadTradeLogs(1); $scope.params.dateto = new Date();
var day = new Date();
day.setDate(day.getDate() - 7);
$scope.params.datefrom = day;
$scope.chooseClient('all');
} }
$scope.fullReleasePreAuth = function (){ $scope.fullReleasePreAuth = function (){
@ -322,6 +361,18 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}) })
}); });
} }
$scope.checkSubClientChoseShow = function (client) {
$scope.more20ChoseSubClient = !$scope.more20ChoseSubClient;
if (client != '') {
$scope.choseSubClientNow = client.short_name;
}
}
$scope.clickDisplayChoseDiv = function (event) {
$scope.more20ChoseSubClient = false;
}
$scope.choseDivStopPropagation = function (event) {
event.stopPropagation()
};
}]); }]);
app.controller('IncrementalTradeLogCtrl', ['$scope', '$http', '$filter', '$timeout', 'partnerRefunder', 'orderService', 'commonDialog', app.controller('IncrementalTradeLogCtrl', ['$scope', '$http', '$filter', '$timeout', 'partnerRefunder', 'orderService', 'commonDialog',
@ -426,6 +477,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}); });
$scope.chooseClient = function (client) { $scope.chooseClient = function (client) {
if (client == 'all') { if (client == 'all') {
$scope.choseSubClientNow = 'chose';
$scope.params.client_ids = angular.copy($scope.clientIds); $scope.params.client_ids = angular.copy($scope.clientIds);
$scope.isAll = true; $scope.isAll = true;
$scope.chooseClientId = ''; $scope.chooseClientId = '';

@ -15,6 +15,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
app.controller('balanceListCtrl', ['$scope', '$http', '$filter', '$timeout', 'refunder', 'orderService','$sce', function ($scope, $http, $filter, $timeout, refunder,orderService,$sce) { app.controller('balanceListCtrl', ['$scope', '$http', '$filter', '$timeout', 'refunder', 'orderService','$sce', function ($scope, $http, $filter, $timeout, refunder,orderService,$sce) {
$scope.params = {textType: 'all'}; $scope.params = {textType: 'all'};
$scope.pagination = {}; $scope.pagination = {};
$scope.subClientPagination = {};
$scope.params.clearing_status = -1; $scope.params.clearing_status = -1;
$scope.params.channel = 'ALL' $scope.params.channel = 'ALL'
$scope.dev_params = {client_type:'sunmi',limit:100}; $scope.dev_params = {client_type:'sunmi',limit:100};
@ -22,9 +23,14 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.order_device_isAll = true; $scope.order_device_isAll = true;
$scope.params.trans_type = 0; $scope.params.trans_type = 0;
$scope.isAll = true; $scope.isAll = true;
$scope.more20ChoseSubClient = false;
$scope.clients = [$scope.currentUser.client]; $scope.clients = [$scope.currentUser.client];
$scope.params.client_ids = [$scope.currentUser.client.client_id]; $scope.params.client_ids = [$scope.currentUser.client.client_id];
$scope.showLevel3Clients = false; $scope.showLevel3Clients = false;
$scope.subClientTable1 = [$scope.currentUser.client];
$scope.subClientTable2 = [];
$scope.choseSubClientNow = 'chose';
$scope.subSearchText = '';
$scope.today = new Date(); $scope.today = new Date();
$scope.chooseToday = function () { $scope.chooseToday = function () {
@ -42,7 +48,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
var day = new Date(); var day = new Date();
day.setDate(day.getDate() - 7); day.setDate(day.getDate() - 7);
$scope.params.datefrom = day; $scope.params.datefrom = day;
$scope.chooseClient('all'); $scope.loadTradeLogs(1);
}; };
$scope.thisMonth = function () { $scope.thisMonth = function () {
$scope.params.dateto = new Date(); $scope.params.dateto = new Date();
@ -63,12 +69,18 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}; };
$scope.listDevices = function () { $scope.listDevices = function () {
var params = angular.copy($scope.dev_params) var params = angular.copy($scope.dev_params)
if ($scope.isAll) {
delete params.client_ids;
}
$http.get('/client/partner_info/devices', {params: params}).then(function (resp) { $http.get('/client/partner_info/devices', {params: params}).then(function (resp) {
$scope.devices = resp.data.data; $scope.devices = resp.data.data;
}) })
}; };
$scope.listDevicesIds = function () { $scope.listDevicesIds = function () {
var params = angular.copy($scope.params) var params = angular.copy($scope.params)
if ($scope.isAll) {
delete params.client_ids;
}
$http.get('/client/partner_info/device_ids',{params: params}).then(function (resp) { $http.get('/client/partner_info/device_ids',{params: params}).then(function (resp) {
$scope.deviceIds = resp.data.data; $scope.deviceIds = resp.data.data;
}) })
@ -104,8 +116,46 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}; };
$scope.listDevices(); $scope.listDevices();
$scope.listDevicesIds(); $scope.listDevicesIds();
$scope.searchSubClients = function (subSearchText,page) {
$scope.subClientTable1 = [$scope.currentUser.client];
$scope.subClientTable2 = [];
var params = {};
params.page = page || $scope.subClientPagination.page || 1;
if (subSearchText != '') {
$scope.subSearchText = subSearchText;
params.searchText = subSearchText;
}
$http.get('/client/partner_info/sub_partners/page',{params: params}).then(function (resp) {
var clientList = resp.data.data;
$scope.subClientPagination = resp.data.pagination;
clientList.forEach(function (client) {
if ($scope.subClientTable1.length < 11) {
$scope.subClientTable1.push(client);
}else {
$scope.subClientTable2.push(client);
}
$scope.clients.push(client);
});
$scope.clientIds = [];
$scope.clients.forEach(function (client) {
$scope.clientIds.push(client.client_id);
if (client.level3Clients) {
client.level3Clients.forEach(function (level3Client) {
$scope.clientIds.push(level3Client.client_id);
});
}
});
$scope.params.client_ids = angular.copy($scope.clientIds);
});
};
$scope.loadTradeLogs = function (page) { $scope.loadTradeLogs = function (page) {
var params = angular.copy($scope.params); var params = angular.copy($scope.params);
if ($scope.isAll) {
delete params.client_ids;
}
if (params.datefrom) { if (params.datefrom) {
params.datefrom = $filter('date')(params.datefrom, 'yyyyMMdd'); params.datefrom = $filter('date')(params.datefrom, 'yyyyMMdd');
} }
@ -124,6 +174,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
}; };
$scope.chooseClient = function (client) { $scope.chooseClient = function (client) {
if (client == 'all') { if (client == 'all') {
$scope.choseSubClientNow = 'chose';
$scope.params.client_ids = angular.copy($scope.clientIds); $scope.params.client_ids = angular.copy($scope.clientIds);
$scope.isAll = true; $scope.isAll = true;
$scope.chooseClientId = ''; $scope.chooseClientId = '';
@ -200,7 +251,7 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
url += connectSymbol + 'dev_id=' + params.dev_id; url += connectSymbol + 'dev_id=' + params.dev_id;
connectSymbol = '&' connectSymbol = '&'
} }
if (params.client_ids) { if (params.client_ids && !$scope.isAll) {
params.client_ids.forEach(function (i) { params.client_ids.forEach(function (i) {
url += connectSymbol + 'client_ids=' + i; url += connectSymbol + 'client_ids=' + i;
connectSymbol = '&'; connectSymbol = '&';
@ -223,25 +274,18 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
} }
if ($scope.currentUser.client.has_children && !$scope.currentUser.client.hide_sub_mch) { if ($scope.currentUser.client.has_children && !$scope.currentUser.client.hide_sub_mch) {
$http.get('/client/partner_info/sub_partners').then(function (resp) { $scope.searchSubClients('',1);
var clientList = resp.data; $scope.params.dateto = new Date();
clientList.forEach(function (client) { var day = new Date();
$scope.clients.push(client); day.setDate(day.getDate() - 7);
}); $scope.params.datefrom = day;
$scope.clientIds = []; $scope.chooseClient('all');
$scope.clients.forEach(function (client) {
$scope.clientIds.push(client.client_id);
if (client.level3Clients) {
client.level3Clients.forEach(function (level3Client) {
$scope.clientIds.push(level3Client.client_id);
});
}
});
$scope.params.client_ids = angular.copy($scope.clientIds);
$scope.chooseLast7Days();
})
}else { }else {
$scope.chooseLast7Days(); $scope.params.dateto = new Date();
var day = new Date();
day.setDate(day.getDate() - 7);
$scope.params.datefrom = day;
$scope.chooseClient('all');
} }
$scope.htmlToolst = function(){ $scope.htmlToolst = function(){
@ -264,6 +308,18 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.tradeLogs[i].htmlTooltip = $sce.trustAsHtml(tip); $scope.tradeLogs[i].htmlTooltip = $sce.trustAsHtml(tip);
} }
}; };
$scope.checkSubClientChoseShow = function (client) {
$scope.more20ChoseSubClient = !$scope.more20ChoseSubClient;
if (client != '') {
$scope.choseSubClientNow = client.short_name;
}
}
$scope.clickDisplayChoseDiv = function (event) {
$scope.more20ChoseSubClient = false;
}
$scope.choseDivStopPropagation = function (event) {
event.stopPropagation()
};
}]); }]);

Loading…
Cancel
Save