Merge branch 'new_partner_dashboard' into develop

master
eason.qian 7 years ago
commit 08f873e30a

@ -50,4 +50,8 @@ public interface DashboardService {
void generateCustomersAndOrdersStatistics(Date analysisDate);
JSONObject getOrderAndCustomerPerDay(JSONObject partner,AnalysisBean partnerAnalysisBean);
List<JSONObject> getStatisticsCustomersAndOrdersInDays(JSONObject partner, AnalysisBean partnerAnalysisBean);
}

@ -7,6 +7,7 @@ import au.com.royalpay.payment.manage.analysis.core.DashboardService;
import au.com.royalpay.payment.manage.analysis.mappers.ClientAnalysisMapper;
import au.com.royalpay.payment.manage.analysis.mappers.CustomerAndOrdersStatisticsMapper;
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.ExchangeRateMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
@ -16,6 +17,7 @@ import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.commons.lang3.time.DurationFormatUtils;
import org.slf4j.Logger;
@ -23,6 +25,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -54,6 +57,11 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
@Resource
private ExchangeRateMapper exchangeRateMapper;
@Resource
private TransactionMapper transactionMapper;
@Override
public JSONObject getCommonAnalysis1(JSONObject params) {
JSONObject res = transactionAnalysisMapper.getClientTransaction(params);
@ -231,22 +239,30 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
}
JSONObject res = new JSONObject();
params.put("client_id", partner.getIntValue("client_id"));
JSONObject today = getTransJSONO(params);
params.put("begin",DateUtils.addDays(params.getDate("begin"),-1));
params.put("end",DateUtils.addDays(params.getDate("end"),-1));
JSONObject yes = getTransJSONO(params);
res.put("today",today);
res.put("yes",yes);
res.put("not_settled", new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params)));
res.put("trade_amount_rise",yes.getBigDecimal("trade_amount").compareTo(BigDecimal.ZERO)>0 ? (today.getBigDecimal("trade_amount").subtract(yes.getBigDecimal("trade_amount"))).divide(yes.getBigDecimal("trade_amount"), 4, BigDecimal.ROUND_HALF_UP):BigDecimal.ZERO);
res.put("trade_count_rise", yes.getIntValue("trade_count") > 0 ? (today.getBigDecimal("trade_count").subtract(yes.getBigDecimal("trade_count"))).divide(yes.getBigDecimal("trade_count"), 4, BigDecimal.ROUND_HALF_UP) : 0);
res.put("customers_rise", yes.getIntValue("customers") > 0 ? (today.getBigDecimal("customers").subtract(yes.getBigDecimal("customers"))).divide(yes.getBigDecimal("customers"), 4, BigDecimal.ROUND_HALF_UP) : 0);
params.remove("begin");
params.remove("end");
List<JSONObject> logs = transactionMapper.listSettlementLogTotal(params);
res.put("latest_settle",logs.isEmpty()?BigDecimal.ZERO:logs.get(0).getBigDecimal("income"));
return res;
}
private JSONObject getTransJSONO(JSONObject params){
JSONObject res = new JSONObject();
JSONObject object = transactionAnalysisMapper.getClientTransaction(params);
res.put("trade_amount", object.getBigDecimal("trade_amount"));
res.put("trade_count", object.getIntValue("trade_count"));
res.put("refund_amount", object.getBigDecimal("refund_amount"));
res.put("not_settled", transactionAnalysisMapper.analysisNotSettled(params));
res.put("pre_amount", transactionAnalysisMapper.analysisPreAmount(params));
List<JSONObject> topOrders = transactionAnalysisMapper.getTopOrders(params, new PageBounds(1, 1, Order.formString("aud_fee.desc")));
if (!topOrders.isEmpty()) {
res.put("top_amount_order", topOrders.get(0));
}
res.put("total_customers", transactionAnalysisMapper.countCustomers(params));
res.put("new_customers", transactionAnalysisMapper.countNewCustomers(params));
res.put("old_customers", transactionAnalysisMapper.countOldCustomers(params));
res.put("customers", transactionAnalysisMapper.countCustomers(params));
return res;
}
@Override
public List<JSONObject> getTradeAnalysisInHours(JSONObject partner, AnalysisBean partnerAnalysisBean) {
String timezone = partner.getJSONObject("client").getString("timezone");
@ -457,4 +473,32 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT
resp.put("aliOnline_order_count",transactionAnalysisMapper.getPlatformAmount(params).getIntValue("order_count"));
return resp;
}
@Override
public JSONObject getOrderAndCustomerPerDay(JSONObject partner, AnalysisBean partnerAnalysisBean) {
String timezone = partner.getJSONObject("client").getString("timezone");
JSONObject params = partnerAnalysisBean.toParams(timezone);
try {
clientManager.validateClients(partner.getIntValue("client_id"), params);
} catch (Exception e) {
logger.error("Dashboard analysis request including not permission client_id");
params.remove("client_ids");
}
params.put("client_id", partner.getIntValue("client_id"));
return customerAndOrdersStatisticsMapper.getAvgOrderAndCustomerStatistics(params);
}
@Override
public List<JSONObject> getStatisticsCustomersAndOrdersInDays(JSONObject partner, AnalysisBean partnerAnalysisBean) {
String timezone = partner.getJSONObject("client").getString("timezone");
JSONObject params = partnerAnalysisBean.toParams(timezone);
try {
clientManager.validateClients(partner.getIntValue("client_id"), params);
} catch (Exception e) {
logger.error("Dashboard analysis request including not permission client_id");
params.remove("client_ids");
}
params.put("client_id", partner.getIntValue("client_id"));
return customerAndOrdersStatisticsMapper.getPartnerCustomerAndOrderStatistics(params);
}
}

@ -2,13 +2,15 @@ package au.com.royalpay.payment.manage.analysis.web;
import au.com.royalpay.payment.manage.analysis.beans.AnalysisBean;
import au.com.royalpay.payment.manage.analysis.core.DashboardService;
import au.com.royalpay.payment.manage.analysis.core.PartnerCardDashboardService;
import au.com.royalpay.payment.manage.logview.beans.ClientLoginLogQueryBean;
import au.com.royalpay.payment.manage.management.clearing.core.CleanService;
import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
import au.com.royalpay.payment.manage.signin.core.ClientLoginLogRepository;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.tools.CommonConsts;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@ -22,6 +24,12 @@ public class PartnerDashboardController {
@Resource
private DashboardService dashboardService;
@Resource
private PartnerCardDashboardService partnerCardDashboardService;
@Resource
private CleanService cleanService;
@PartnerMapping("/common_analysis")
public JSONObject commonAnalysis(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, AnalysisBean partnerAnalysisBean) {
return dashboardService.getCommonAnalysis(partner,partnerAnalysisBean);
@ -34,11 +42,22 @@ public class PartnerDashboardController {
@PartnerMapping("/fee_analysis")
public List<JSONObject> tradeInDays(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner,AnalysisBean partnerAnalysisBean) {
return dashboardService.getTradeAnalysisInDays(partner,partnerAnalysisBean);
return dashboardService.getStatisticsCustomersAndOrdersInDays(partner,partnerAnalysisBean);
}
@PartnerMapping("/customers")
public List<JSONObject> customersInDays(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner,AnalysisBean partnerAnalysisBean) {
return dashboardService.getCustomersAndOrdersInDays(partner,partnerAnalysisBean);
}
@PartnerMapping("/trans_type_analysis")
public List<JSONObject> getTransTypesAnalysis(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner,AnalysisBean partnerAnalysisBean) {
JSONObject params = partnerAnalysisBean.toParams("timezone");
params.put("client_id",partner.getString("client_id"));
return dashboardService.getTradeInTypes(params);
}
@PartnerMapping("/avg_order_customer")
public JSONObject getAvgOrderAndCustomer(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner,AnalysisBean partnerAnalysisBean) {
return dashboardService.getOrderAndCustomerPerDay(partner,partnerAnalysisBean);
}
}

@ -95,7 +95,7 @@
<![CDATA[
SELECT sum(s.customers) customers,sum(s.orders) orders,sum(s.new_customers) new_customers,
sum(s.old_customers) old_customers,sum(s.total) total, sum(s.total)/sum(s.customers) single_amount,
date_format(s.date,'%d/%m/%Y') trade_date
date_format(s.date,'%Y-%m-%d') trade_date
FROM statistics_customer_order s
LEFT JOIN sys_clients c ON c.client_id = s.client_id and c.is_valid=1
]]>
@ -192,9 +192,21 @@
<![CDATA[
SELECT AVG(total) total,avg(orders) orders,avg(single_amount)single_amount,avg(customers) customers,avg(new_customers) new_customers,avg(old_customers)old_customers
FROM statistics_customer_order where client_id = #{client_id}
FROM statistics_customer_order s
]]>
<where>
<if test="client_ids!=null">
AND s.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 s.client_id=#{client_id}
</if>
<if test="begin!=null">and s.date &gt;= #{begin}</if>
<if test="end!=null">and s.date &lt; #{end}</if>
</where>
</select>

@ -202,7 +202,15 @@
INNER JOIN pmt_orders o ON o.order_id = l.order_id
WHERE (l.transaction_type = 'Credit' or l.refund_id is not null)
]]>
<if test="client_id!=null">AND l.client_id = #{client_id}</if>
<if test="client_ids!=null">
AND l.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 l.client_id=#{client_id}
</if>
<if test="begin!=null">and o.create_time &gt;= #{begin}</if>
<if test="end!=null">and o.create_time &lt;= #{end}</if>
<if test="org_id!=null and org_ids==null">and l.org_id=#{org_id}</if>

@ -1,4 +1,4 @@
<!DOCTYPE html>
<!--<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@ -22,22 +22,23 @@
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Tell the browser to be responsive to screen width -->
&lt;!&ndash; Tell the browser to be responsive to screen width &ndash;&gt;
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="static/css/new_partner_dashboard.css">
&lt;!&ndash; Bootstrap 3.3.5 &ndash;&gt;
<link rel="stylesheet" href="static/lib/bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">-->
&lt;!&ndash; Font Awesome &ndash;&gt;
&lt;!&ndash;<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">&ndash;&gt;
<link href="static/lib/font-awesome-4.6.3/css/font-awesome.min.css" rel="stylesheet">
<!-- Ionicons -->
&lt;!&ndash; Ionicons &ndash;&gt;
<link rel="stylesheet" href="static/lib/ioicons-2.0.1/css/ionicons.min.css">
<!-- Theme style -->
&lt;!&ndash; Theme style &ndash;&gt;
<link rel="stylesheet" href="static/lib/dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
&lt;!&ndash; AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. &ndash;&gt;
<link rel="stylesheet" href="static/lib/dist/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="static/css/common.css">
<style type="text/css">
@ -118,21 +119,21 @@ margin-bottom: 10%;"/>
</div>
<div class="wrapper royalpay" ng-if="currentUser!=null" ng-cloak>
<header class="main-header">
<!-- Logo -->
&lt;!&ndash; Logo &ndash;&gt;
<a href="#" class="logo logo-yedian shine">
<!-- mini logo for sidebar mini 50x50 pixels -->
&lt;!&ndash; mini logo for sidebar mini 50x50 pixels &ndash;&gt;
<span class="logo-mini"><img src="static/images/r_white_logo.svg"
style="max-height: 35px;margin-bottom: 8px;margin-left: 15%;"></span>
<!-- logo for regular state and mobile devices -->
&lt;!&ndash; logo for regular state and mobile devices &ndash;&gt;
<span class="logo-lg"><img src="static/images/rp_white_logo.svg"
style="max-height: 35px;margin-bottom: 8px;">
<!--<b>RoyalPay</b>-->
&lt;!&ndash;<b>RoyalPay</b>&ndash;&gt;
</span>
</a>
<!-- Header Navbar: style can be found in header.less -->
<!--顶部导航栏-->
&lt;!&ndash; Header Navbar: style can be found in header.less &ndash;&gt;
&lt;!&ndash;顶部导航栏&ndash;&gt;
<nav class="navbar navbar-static-top navbar-static-top-yedian" role="navigation">
<!-- Sidebar toggle button-->
&lt;!&ndash; Sidebar toggle button&ndash;&gt;
<a class="sidebar-toggle sidebar-tooggle-yedian" data-toggle="offcanvas" role="button"
ng-click="toggleHideSideBar()">
<span class="sr-only">Toggle navigation</span>
@ -141,12 +142,12 @@ margin-bottom: 10%;"/>
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<!--店长红包暂时关闭-->
<!--<li ui-sref-active="active" ng-if="(currentUser.role=='1' || currentUser.role=='2') && currentUser.client.approve_result==1" title="店长红包|Manager Welfare">-->
<!--<a ui-sref="partner_wechat">-->
<!--<img class="redpacket" src="static/images/red_packet.png">&lt;!&ndash;<span class="badge bg-yellow">店长红包|Manager Welfare</span>&ndash;&gt;-->
<!--</a>-->
<!--</li>-->
&lt;!&ndash;店长红包暂时关闭&ndash;&gt;
&lt;!&ndash;<li ui-sref-active="active" ng-if="(currentUser.role=='1' || currentUser.role=='2') && currentUser.client.approve_result==1" title="店长红包|Manager Welfare">&ndash;&gt;
&lt;!&ndash;<a ui-sref="partner_wechat">&ndash;&gt;
&lt;!&ndash;<img class="redpacket" src="static/images/red_packet.png">&lt;!&ndash;<span class="badge bg-yellow">店长红包|Manager Welfare</span>&ndash;&gt;&ndash;&gt;
&lt;!&ndash;</a>&ndash;&gt;
&lt;!&ndash;</li>&ndash;&gt;
<li ng-if="([1,2]|withRole)" ng-class="{'dropdown notifications-menu open':openRefundNotice,'dropdown notifications-menu':!openRefundNotice}">
<a href ng-click="toggleOpenRefundNotice()" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
<i class="fa fa-bell-o"></i>
@ -166,7 +167,7 @@ margin-bottom: 10%;"/>
<ul class="dropdown-menu">
<li class="header">You have {{notice.pagination.totalCount}} notifications,{{notice.unReadCounts}} unread.</li>
<li>
<!-- inner menu: contains the actual data -->
&lt;!&ndash; inner menu: contains the actual data &ndash;&gt;
<div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; max-height: 200px;"><ul class="menu" style="overflow: hidden; width: 100%;">
<li ng-repeat="n in notice.data.slice(0,4)">
<a href ng-click="showNotice(n)">
@ -185,17 +186,17 @@ margin-bottom: 10%;"/>
<i class="fa fa-wechat"></i> Bind WeChat
</a>
</li>
<!--<li class="user-menu">-->
<!--<a role="button" tooltip-placement="bottom" uib-tooltip-html="'1300-10-77-50 </br> info@royalpay.com.au'">-->
<!--<i class="fa fa-question-circle-o" aria-hidden="true"></i> Help-->
<!--</a>-->
<!--</li>-->
&lt;!&ndash;<li class="user-menu">&ndash;&gt;
&lt;!&ndash;<a role="button" tooltip-placement="bottom" uib-tooltip-html="'1300-10-77-50 </br> info@royalpay.com.au'">&ndash;&gt;
&lt;!&ndash;<i class="fa fa-question-circle-o" aria-hidden="true"></i> Help&ndash;&gt;
&lt;!&ndash;</a>&ndash;&gt;
&lt;!&ndash;</li>&ndash;&gt;
<li id="help" class="dropdown user user-menu" uib-dropdown>
<a href class="dropdown-toggle" uib-dropdown-toggle>
<i class="fa fa-question-circle-o" aria-hidden="true"></i> Support
</a>
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
<!-- User image -->
&lt;!&ndash; User image &ndash;&gt;
<li class="user-header user-header-yedian">
<img src="static/images/customer_service.jpg"
alt="Customer Service Qrcode">
@ -203,9 +204,9 @@ margin-bottom: 10%;"/>
Technical Support WeChat
</p>
</li>
<!-- Menu Footer-->
&lt;!&ndash; Menu Footer&ndash;&gt;
<li class="user-footer">
<!--Customer Service: <br/>-->
&lt;!&ndash;Customer Service: <br/>&ndash;&gt;
<i class="fa fa-phone" aria-hidden="true"></i> 1300-10-77-50 <br/>
<i class="fa fa-envelope-o" aria-hidden="true"></i> support@royalpay.com.au<br/>
<i class="fa fa-clock-o" aria-hidden="true"></i> Mon-Fri (9:00am-5:30pm)
@ -213,7 +214,7 @@ margin-bottom: 10%;"/>
</ul>
</li>
<!-- User Account: style can be found in dropdown.less -->
&lt;!&ndash; User Account: style can be found in dropdown.less &ndash;&gt;
<li class="dropdown user user-menu" uib-dropdown>
<a href class="dropdown-toggle" uib-dropdown-toggle>
<img ng-src="{{currentUser.client.logo_thumbnail||'static/images/rp_white_logo.svg'}}"
@ -224,7 +225,7 @@ margin-bottom: 10%;"/>
<span class="hidden-xs" style="font-size: smaller;font-weight: bolder;color: yellowgreen" ng-if="currentUser.client.approve_result==3">(认证中)</span>
</a>
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
<!-- User image -->
&lt;!&ndash; User image &ndash;&gt;
<li class="user-header user-header-yedian">
<img ng-src="{{currentUser.client.logo_url||'static/images/rp_white_logo.svg'}}"
alt="User Image">
@ -233,10 +234,10 @@ margin-bottom: 10%;"/>
{{currentUser.client.short_name}}
<small ng-bind="currentUser.display_name"></small>
<small style="color: lightcoral" ng-if="currentUser.client.approve_result==2">(expiration date:{{currentUser.auth_day}})</small>
<!--<a ui-sref="completePartnerInfo" role="button">Authentication</a>-->
&lt;!&ndash;<a ui-sref="completePartnerInfo" role="button">Authentication</a>&ndash;&gt;
</p>
</li>
<!-- Menu Footer-->
&lt;!&ndash; Menu Footer&ndash;&gt;
<li class="user-footer">
<div class="pull-left">
<a href class="btn btn-default btn-flat" title="Change Password"
@ -248,16 +249,16 @@ margin-bottom: 10%;"/>
</li>
</ul>
</li>
<!-- Control Sidebar Toggle Button -->
&lt;!&ndash; Control Sidebar Toggle Button &ndash;&gt;
</ul>
</div>
</nav>
</header>
<!--end:顶部导航栏-->
<!-- Left side column. contains the logo and sidebar -->
<!--左边栏-->
&lt;!&ndash;end:顶部导航栏&ndash;&gt;
&lt;!&ndash; Left side column. contains the logo and sidebar &ndash;&gt;
&lt;!&ndash;左边栏&ndash;&gt;
<aside class="main-sidebar" style="height: 100%;max-height: 100%;overflow: auto;padding-bottom: 50px;">
<!-- sidebar: style can be found in sidebar.less -->
&lt;!&ndash; sidebar: style can be found in sidebar.less &ndash;&gt;
<section class="sidebar">
<ul class="sidebar-menu">
@ -317,11 +318,11 @@ margin-bottom: 10%;"/>
<i class="fa fa-users" aria-hidden="true"></i> <span>Promotion Account</span>
</a>
</li>
<!-- <li ui-sref-active="active">
&lt;!&ndash; <li ui-sref-active="active">
<a ui-sref="sale">
<i class="fa fa-shopping-cart"></i> <span>Payment Logs</span>
</a>
</li>-->
</li>&ndash;&gt;
<li class="header nav-header" >Marketing</li>
<li ui-sref-active="active" >
<a ui-sref="partner_wechat">
@ -330,26 +331,26 @@ margin-bottom: 10%;"/>
</li>
<!--<li ui-sref-active="active">-->
<!--<a ui-sref="coupon">-->
<!--<i class="fa fa-ticket"></i> <span>Coupons</span>-->
<!--</a>-->
<!--</li>-->
<!--<li ui-sref-active="active">-->
<!--<a ui-sref="activity">-->
<!--<i class="fa fa-compass"></i> <span>Activities</span>-->
<!--</a>-->
<!--</li>-->
<!--<li ui-sref-active="active">-->
<!--<a ui-sref="cashiers">-->
<!--<i class="fa fa-credit-card"></i> <span>Members</span>-->
<!--</a>-->
<!--</li>-->
<!--<li ui-sref-active="active">-->
<!--<a ui-sref="services">-->
<!--<i class="fa fa-diamond"></i> <span>Services</span>-->
<!--</a>-->
<!--</li>-->
&lt;!&ndash;<li ui-sref-active="active">&ndash;&gt;
&lt;!&ndash;<a ui-sref="coupon">&ndash;&gt;
&lt;!&ndash;<i class="fa fa-ticket"></i> <span>Coupons</span>&ndash;&gt;
&lt;!&ndash;</a>&ndash;&gt;
&lt;!&ndash;</li>&ndash;&gt;
&lt;!&ndash;<li ui-sref-active="active">&ndash;&gt;
&lt;!&ndash;<a ui-sref="activity">&ndash;&gt;
&lt;!&ndash;<i class="fa fa-compass"></i> <span>Activities</span>&ndash;&gt;
&lt;!&ndash;</a>&ndash;&gt;
&lt;!&ndash;</li>&ndash;&gt;
&lt;!&ndash;<li ui-sref-active="active">&ndash;&gt;
&lt;!&ndash;<a ui-sref="cashiers">&ndash;&gt;
&lt;!&ndash;<i class="fa fa-credit-card"></i> <span>Members</span>&ndash;&gt;
&lt;!&ndash;</a>&ndash;&gt;
&lt;!&ndash;</li>&ndash;&gt;
&lt;!&ndash;<li ui-sref-active="active">&ndash;&gt;
&lt;!&ndash;<a ui-sref="services">&ndash;&gt;
&lt;!&ndash;<i class="fa fa-diamond"></i> <span>Services</span>&ndash;&gt;
&lt;!&ndash;</a>&ndash;&gt;
&lt;!&ndash;</li>&ndash;&gt;
<li class="header nav-header">Analysis</li>
@ -363,11 +364,11 @@ margin-bottom: 10%;"/>
<i class="fa fa-line-chart"></i> <span>Transaction Analysis</span>
</a>
</li>
<!-- <li ui-sref-active="active">
&lt;!&ndash; <li ui-sref-active="active">
<a ui-sref="marketinganalysis">
<i class="fa fa-pie-chart"></i> <span>Market Analysis</span>
</a>
</li>-->
</li>&ndash;&gt;
<li class="header nav-header" ng-if="currentUser.client.client_moniker=='PINE'">Integral Mall</li>
<li ui-sref-active="active" ng-if="currentUser.client.client_moniker=='PINE'">
<a ui-sref="couponcancellation">
@ -414,27 +415,600 @@ margin-bottom: 10%;"/>
<i class="fa fa-list-alt"></i> <span>Login History</span>
</a>
</li>
<!--<li ui-sref-active="active" ng-if="([1]|withRole) && currentUser.client.approve_result>0">-->
<!--<a ui-sref="completePartnerInfo">-->
<!--<i class="fa fa-file"></i> <span>Authentication</span>-->
<!--</a>-->
<!--</li>-->
&lt;!&ndash;<li ui-sref-active="active" ng-if="([1]|withRole) && currentUser.client.approve_result>0">&ndash;&gt;
&lt;!&ndash;<a ui-sref="completePartnerInfo">&ndash;&gt;
&lt;!&ndash;<i class="fa fa-file"></i> <span>Authentication</span>&ndash;&gt;
&lt;!&ndash;</a>&ndash;&gt;
&lt;!&ndash;</li>&ndash;&gt;
</ul>
</section>
<!-- /.sidebar -->
&lt;!&ndash; /.sidebar &ndash;&gt;
</aside>
&lt;!&ndash;END:左边栏&ndash;&gt;
&lt;!&ndash; Content Wrapper. Contains page content &ndash;&gt;
<div class="content-wrapper autoheight" ui-view>
</div>
&lt;!&ndash; /.content-wrapper &ndash;&gt;
&lt;!&ndash;<div class="navbar-fixed-top" ng-if="currentUser.client.approve_result==2" style="top: 40%;left: 91%;opacity: 0.9;transition: opacity 4s">&ndash;&gt;
&lt;!&ndash;<a ui-sref="completePartnerInfo" role="button" class="btn btn-danger">Authentication</a>&ndash;&gt;
&lt;!&ndash;</div>&ndash;&gt;
<footer class="main-footer">
<div class="pull-right hidden-xs">
<b>Easy BusinessEasy Pay</b>
</div>
<strong>Copyright © 2015-2017 <a href="http://www.royalpay.com.au">RoyalPay</a>.</strong> All rights
reserved.&nbsp;&nbsp;&nbsp;
<style>
/* Specify styling for tooltip contents */
.tooltip.customClass .tooltip-inner {
/*color: #880000;*/
/*background-color: #ffff66;*/
background-color: transparent;
/*box-shadow: 1px 1px 1px 1px rgba(0,0,0,.175);*/
}
/* Hide arrow */
.tooltip.customClass .tooltip-arrow {
display: none;
}
</style>
<span style="font-size: smaller"> ( <i class="fa fa-phone" aria-hidden="true"></i> 1300-10-77-50 |
<i class="fa fa-envelope-o" aria-hidden="true"></i> support@royalpay.com.au |
WeChat <i class="fa fa-qrcode" aria-hidden="true" tooltip-class="customClass" uib-tooltip-html="'<img src=static/images/customer_service.jpg>'"></i> )
</span>
</footer>
</div>
&lt;!&ndash; ./wrapper &ndash;&gt;
</body>
</html>-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<title>RoyalPay</title>
<meta name="format-detection" content="telephone=no">
<link rel="apple-touch-icon" sizes="57x57" href="ico/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="ico/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="ico/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="ico/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="ico/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="ico/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="ico/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="ico/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="ico/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="ico/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="ico/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="ico/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="ico/favicon-16x16.png">
<link rel="manifest" href="ico/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/new_partner_dashboard.css">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="static/lib/bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<!--<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">-->
<link href="static/lib/font-awesome-4.6.3/css/font-awesome.min.css" rel="stylesheet">
<!-- Ionicons -->
<link rel="stylesheet" href="static/lib/ioicons-2.0.1/css/ionicons.min.css">
<!-- Theme style -->
<link rel="stylesheet" href="static/lib/dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="static/lib/dist/css/skins/_all-skins.min.css">
<link rel="stylesheet" href="static/css/common.css">
<style type="text/css">
#topnav{
font-family:Arimo,sans-serif;
}
.ng-cloak, [ng-cloak] {
display: none !important;
}
@keyframes myfirst {
0% {
transform: rotateY(1deg);
}
100% {
transform: rotateY(90deg);
}
}
div.polaroid {
text-align: center;
}
div.rotate_left {
position: fixed;
width: 200px;
margin: 0 -100px;
top: 40%;
left: 50%;
z-index: 9999999;
}
.dh {
width: 30px;
animation: myfirst 1s linear 0s infinite alternate;
}
#help img{
z-index: 5;
height: 120px;
width: 120px;
border: 3px solid;
border-color: transparent;
}
@keyframes redpacket {
0% {
transform: rotate(0deg);
}
10% {
transform: rotate(0deg);
}
90% {
transform: rotate(0deg);
}
95% {
transform: rotate(-10deg);
}
100% {
transform: rotate(20deg);
}
}
.redpacket {
width: 25px;
margin-top: -10px;
animation: redpacket 1s cubic-bezier(0.96,-0.02, 0.92, 0.64) 0s infinite alternate;
}
</style>
<script type="text/javascript" src="static/lib/require.js" data-main="static/boot/index-boot"></script>
</head>
<body ng-controller="indexCtrl" class="skin-blue sidebar-mini"
>
<div class="polaroid" ng-if="currentUser==null">
<div class="rotate_left">
<img class="dh" src="static/images/r_logo.svg" alt="royalpay" style="width: 150px;height:150px;margin-top: 10%;
margin-bottom: 10%;"/>
<p style="color: #666">Easy BusinessEasy Pay</p>
</div>
</div>
<div class="wrapper royalpay" ng-if="currentUser!=null" ng-cloak>
<!--<header class="main-header">
&lt;!&ndash; Logo &ndash;&gt;
<a href="#" class="logo logo-yedian shine">
&lt;!&ndash; mini logo for sidebar mini 50x50 pixels &ndash;&gt;
<span class="logo-mini"><img src="static/images/r_white_logo.svg"
style="max-height: 35px;margin-bottom: 8px;margin-left: 15%;"></span>
&lt;!&ndash; logo for regular state and mobile devices &ndash;&gt;
<span class="logo-lg"><img src="static/images/rp_white_logo.svg"
style="max-height: 35px;margin-bottom: 8px;">
&lt;!&ndash;<b>RoyalPay</b>&ndash;&gt;
</span>
</a>
&lt;!&ndash; Header Navbar: style can be found in header.less &ndash;&gt;
&lt;!&ndash;顶部导航栏&ndash;&gt;
<nav class="navbar navbar-static-top navbar-static-top-yedian" role="navigation">
&lt;!&ndash; Sidebar toggle button&ndash;&gt;
<a class="sidebar-toggle sidebar-tooggle-yedian" data-toggle="offcanvas" role="button"
ng-click="toggleHideSideBar()">
<span class="sr-only">Toggle navigation</span>
</a>
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
&lt;!&ndash;店长红包暂时关闭&ndash;&gt;
&lt;!&ndash;<li ui-sref-active="active" ng-if="(currentUser.role=='1' || currentUser.role=='2') && currentUser.client.approve_result==1" title="店长红包|Manager Welfare">&ndash;&gt;
&lt;!&ndash;<a ui-sref="partner_wechat">&ndash;&gt;
&lt;!&ndash;<img class="redpacket" src="static/images/red_packet.png">&lt;!&ndash;<span class="badge bg-yellow">店长红包|Manager Welfare</span>&ndash;&gt;&ndash;&gt;
&lt;!&ndash;</a>&ndash;&gt;
&lt;!&ndash;</li>&ndash;&gt;
<li ng-if="([1,2]|withRole)" ng-class="{'dropdown notifications-menu open':openRefundNotice,'dropdown notifications-menu':!openRefundNotice}">
<a href ng-click="toggleOpenRefundNotice()" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
<i class="fa fa-bell-o"></i>
<span class="label label-warning" ng-if="refundNotice.counts>0">{{refundNotice.counts}}</span>
</a>
<ul class="dropdown-menu">
<li class="header"><a ui-sref="partner_refund">You have {{refundNotice.counts}} new refund to be audited</a></li>
<li class="footer"><a ui-sref="partner_refund">View all</a></li>
</ul>
</li>
<li ng-if="([1,2]|withRole)" ng-class="{'dropdown notifications-menu open':openNotice,'dropdown notifications-menu':!openNotice}">
<a href ng-click="toggleOpenNotice()" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
<i class="fa fa-envelope-o"></i>
<span class="label label-warning" ng-if="notice.unReadCounts>0">{{notice.unReadCounts}}</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have {{notice.pagination.totalCount}} notifications,{{notice.unReadCounts}} unread.</li>
<li>
&lt;!&ndash; inner menu: contains the actual data &ndash;&gt;
<div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; max-height: 200px;"><ul class="menu" style="overflow: hidden; width: 100%;">
<li ng-repeat="n in notice.data.slice(0,4)">
<a href ng-click="showNotice(n)">
<i ng-if="n.status=='0'" class="fa fa-commenting"></i>
{{n.title|limitTo:20}}<span style="font-size:smaller;float:right;right: 0" ng-bind="n.send_time|limitTo:10"></span>
</a>
</li>
</ul><div class="slimScrollBar" style="background: rgb(0, 0, 0); width: 3px; position: absolute; top: 0px; opacity: 0.4; display: none; border-radius: 7px; z-index: 99; right: 1px; height: 195.122px;"></div><div class="slimScrollRail" style="width: 3px; height: 100%; position: absolute; top: 0px; display: none; border-radius: 7px; background: rgb(51, 51, 51); opacity: 0.2; z-index: 90; right: 1px;"></div></div>
</li>
<li class="footer"><a ui-sref="partner_notice">View all</a></li>
</ul>
</li>
<li class="user-menu">
<a role="button" ng-click="userCheckIn()">
<i class="fa fa-wechat"></i> Bind WeChat
</a>
</li>
&lt;!&ndash;<li class="user-menu">&ndash;&gt;
&lt;!&ndash;<a role="button" tooltip-placement="bottom" uib-tooltip-html="'1300-10-77-50 </br> info@royalpay.com.au'">&ndash;&gt;
&lt;!&ndash;<i class="fa fa-question-circle-o" aria-hidden="true"></i> Help&ndash;&gt;
&lt;!&ndash;</a>&ndash;&gt;
&lt;!&ndash;</li>&ndash;&gt;
<li id="help" class="dropdown user user-menu" uib-dropdown>
<a href class="dropdown-toggle" uib-dropdown-toggle>
<i class="fa fa-question-circle-o" aria-hidden="true"></i> Support
</a>
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
&lt;!&ndash; User image &ndash;&gt;
<li class="user-header user-header-yedian">
<img src="static/images/customer_service.jpg"
alt="Customer Service Qrcode">
<p>
Technical Support WeChat
</p>
</li>
&lt;!&ndash; Menu Footer&ndash;&gt;
<li class="user-footer">
&lt;!&ndash;Customer Service: <br/>&ndash;&gt;
<i class="fa fa-phone" aria-hidden="true"></i> 1300-10-77-50 <br/>
<i class="fa fa-envelope-o" aria-hidden="true"></i> support@royalpay.com.au<br/>
<i class="fa fa-clock-o" aria-hidden="true"></i> Mon-Fri (9:00am-5:30pm)
</li>
</ul>
</li>
&lt;!&ndash; User Account: style can be found in dropdown.less &ndash;&gt;
<li class="dropdown user user-menu" uib-dropdown>
<a href class="dropdown-toggle" uib-dropdown-toggle>
<img ng-src="{{currentUser.client.logo_thumbnail||'static/images/rp_white_logo.svg'}}"
class="user-image user-img-yedian"
alt="User Image">
<span class="hidden-xs" ng-bind="currentUser.display_name"></span>
<span class="hidden-xs" style="font-size: smaller;font-weight: bolder;color: yellowgreen" ng-if="currentUser.client.approve_result==2">(未认证)</span>
<span class="hidden-xs" style="font-size: smaller;font-weight: bolder;color: yellowgreen" ng-if="currentUser.client.approve_result==3">(认证中)</span>
</a>
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
&lt;!&ndash; User image &ndash;&gt;
<li class="user-header user-header-yedian">
<img ng-src="{{currentUser.client.logo_url||'static/images/rp_white_logo.svg'}}"
alt="User Image">
<p>
{{currentUser.client.short_name}}
<small ng-bind="currentUser.display_name"></small>
<small style="color: lightcoral" ng-if="currentUser.client.approve_result==2">(expiration date:{{currentUser.auth_day}})</small>
&lt;!&ndash;<a ui-sref="completePartnerInfo" role="button">Authentication</a>&ndash;&gt;
</p>
</li>
&lt;!&ndash; Menu Footer&ndash;&gt;
<li class="user-footer">
<div class="pull-left">
<a href class="btn btn-default btn-flat" title="Change Password"
ng-click="changePwd()">Password</a>
</div>
<div class="pull-right">
<a href class="btn btn-default btn-flat" ng-click="logout()">Sign Out</a>
</div>
</li>
</ul>
</li>
&lt;!&ndash; Control Sidebar Toggle Button &ndash;&gt;
</ul>
</div>
</nav>
</header>-->
<header>
<div class="main-header">
<!-- Logo -->
<a href="#" class="logo logo-yedian shine">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><img src="static/images/r_white_logo.svg"
style="max-height: 35px;margin-bottom: 8px;margin-left: 15%;"></span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><img src="static/images/rp_white_logo.svg"
style="max-height: 35px;margin-bottom: 8px;">
<!--<b>RoyalPay</b>-->
</span>
</a>
<!-- Header Navbar: style can be found in header.less -->
<!--顶部导航栏-->
<nav class="navbar navbar-static-top navbar-static-top-yedian" role="navigation">
<!--Sidebar toggle button-->
<a class="sidebar-toggle sidebar-tooggle-yedian" data-toggle="offcanvas" role="button"
ng-click="hideSideBar=!hideSideBar">
<span class="sr-only">Toggle navigation</span>
</a>
<div class="navbar-custom-menu" >
<ul class="nav navbar-nav">
<li ng-if="([1,2]|withRole)" ng-class="{'dropdown notifications-menu open':openNotice,'dropdown notifications-menu':!openNotice}">
<a href ng-click="toggleOpenNotice()" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="true">
<i class="fa fa-envelope-o"></i>
<span class="label label-warning" ng-if="notice.unReadCounts>0">{{notice.unReadCounts}}</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have {{notice.pagination.totalCount}} notifications,{{notice.unReadCounts}} unread.</li>
<li>
<!-- inner menu: contains the actual data -->
<div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; max-height: 200px;"><ul class="menu" style="overflow: hidden; width: 100%;">
<li ng-repeat="n in notice.data.slice(0,4)">
<a href ng-click="showNotice(n)">
<i ng-if="n.status=='0'" class="fa fa-commenting"></i>
{{n.title|limitTo:20}}<span style="font-size:smaller;float:right;right: 0" ng-bind="n.send_time|limitTo:10"></span>
</a>
</li>
</ul><div class="slimScrollBar" style="background: rgb(0, 0, 0); width: 3px; position: absolute; top: 0px; opacity: 0.4; display: none; border-radius: 7px; z-index: 99; right: 1px; height: 195.122px;"></div><div class="slimScrollRail" style="width: 3px; height: 100%; position: absolute; top: 0px; display: none; border-radius: 7px; background: rgb(51, 51, 51); opacity: 0.2; z-index: 90; right: 1px;"></div></div>
</li>
<li class="footer"><a ui-sref="partner_notice">View all</a></li>
</ul>
</li>
<li class="user-menu">
<a role="button" ng-click="userCheckIn()">
<i class="fa fa-wechat"></i> Bind WeChat
</a>
</li>
<li id="help" class="dropdown user user-menu" uib-dropdown>
<a href class="dropdown-toggle" uib-dropdown-toggle>
<i class="fa fa-question-circle-o" aria-hidden="true"></i> Support
</a>
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
<!-- User image -->
<li class="user-header user-header-yedian">
<img src="static/images/customer_service.jpg"
alt="Customer Service Qrcode">
<p>
Technical Support WeChat
</p>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<!--Customer Service: <br/>-->
<i class="fa fa-phone" aria-hidden="true"></i> 1300-10-77-50 <br/>
<i class="fa fa-envelope-o" aria-hidden="true"></i> support@royalpay.com.au<br/>
<i class="fa fa-clock-o" aria-hidden="true"></i> Mon-Fri (9:00am-5:30pm)
</li>
</ul>
</li>
<!-- User Account: style can be found in dropdown.less -->
<li class="dropdown user user-menu" uib-dropdown>
<a href class="dropdown-toggle" uib-dropdown-toggle>
<img ng-src="{{currentUser.client.logo_thumbnail||'static/images/rp_white_logo.svg'}}"
class="user-image user-img-yedian"
alt="User Image">
<span class="hidden-xs" ng-bind="currentUser.display_name"></span>
<span class="hidden-xs" style="font-size: smaller;font-weight: bolder;color: yellowgreen" ng-if="currentUser.client.approve_result==2">(未认证)</span>
<span class="hidden-xs" style="font-size: smaller;font-weight: bolder;color: yellowgreen" ng-if="currentUser.client.approve_result==3">(认证中)</span>
</a>
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
<!-- User image -->
<li class="user-header user-header-yedian">
<img ng-src="{{currentUser.client.logo_url||'static/images/rp_white_logo.svg'}}"
alt="User Image">
<p>
{{currentUser.client.short_name}}
<small ng-bind="currentUser.display_name"></small>
<small style="color: lightcoral" ng-if="currentUser.client.approve_result==2">(expiration date:{{currentUser.auth_day}})</small>
<!--<a ui-sref="completePartnerInfo" role="button">Authentication</a>-->
</p>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href class="btn btn-default btn-flat" title="Change Password"
ng-click="changePwd()">Password</a>
</div>
<div class="pull-right">
<a href class="btn btn-default btn-flat" ng-click="logout()">Sign Out</a>
</div>
</li>
</ul>
</li>
<!-- Control Sidebar Toggle Button -->
</ul>
</div>
</nav>
</div>
<!-- end topbar-main -->
<!-- MENU Start -->
<!-- end navbar-custom -->
</header>
<div id="topnav" class="navbar-custom active" ng-class="{'ng-cloak':hideSideBar}">
<div class="container-fluid">
<div id="navigation" class="active" style="display: block;">
<!-- Navigation Menu-->
<ul class="navigation-menu">
<li class="has-submenu" ui-sref-active="active">
<a ui-sref="partner_dashboard"><i class="fa fa-dashboard"></i>Dashboard</a>
</li>
<li class="has-submenu" ng-class="{'open' : payment.active}" ui-sref-active="active">
<a ng-click="payment.active = !payment.active"><i class="fa fa-users"></i>Payment</a>
<ul class="submenu megamenu" ng-class="{'open' : payment.active}">
<li>
<ul >
<li>
<a ui-sref="transflow">
<!--<i class="fa fa-balance-scale"></i> -->Transactions
</a>
</li>
<li>
<a ui-sref="trade">
<!--<i class="fa fa-list-alt"></i> -->Orders
</a>
</li>
<li>
<a ui-sref="settlementlogs">
<!--<i class="fa fa-calendar"></i> -->Settlement
</a>
</li>
</ul>
</li>
<li ng-if="currentUser.client.client_moniker=='PINE' || currentUser.client.client_moniker=='LMEN'">
<ul>
<li>
<a ui-sref="cashiers">
<!--<i class="fa fa-users" aria-hidden="true"></i> -->Cashiers Management
</a>
</li>
</ul>
</li>
<li ng-if="([1,2]|withRole)">
<ul>
<li>
<a ui-sref="cashback">
<!--<i class="fa fa-users" aria-hidden="true"></i> -->Promotion Account
</a>
</li>
</ul>
</li>
</ul>
</li>
<li class="has-submenu" ng-class="{'open' : products.active}" ui-sref-active="active">
<a ng-click="products.active = !products.active"><i class="fa fa-balance-scale"></i>Products & Sale</a>
<ul class="submenu" ng-class="{'open' : products.active}">
<li>
<a ui-sref="goods">
<!--<i class="fa fa-shopping-bag"></i> -->Products
</a>
</li>
<li>
<a ui-sref="sale">
<!--<i class="fa fa-shopping-cart"></i>-->Sale
</a>
</li>
</ul>
</li>
<li class="has-submenu" ng-class="{'open' : analysis.active}" ui-sref-active="active">
<a ng-click="analysis.active = !analysis.active"><i class="fa fa-area-chart"></i>Analysis</a>
<ul class="submenu" ng-class="{'open' : analysis.active}">
<li>
<a ui-sref="customers_orders_analysis">
<!-- <i class="fa fa-bar-chart"></i></i> -->Customers Analysis
</a>
</li>
<li>
<a ui-sref="partner_trans_analysis">
<!--<i class="fa fa-line-chart"></i></i> -->Transaction Analysis
</a>
</li>
</ul>
</li>
<li class="has-submenu" ng-if="currentUser.client.client_moniker=='PINE'"
ng-class="{'open' : integral.active}" ui-sref-active="active">
<a ng-click="integral.active = !integral.active"><i class="fa fa-shopping-cart"></i>Integral Mall</a>
<ul class="submenu" ng-class="{'open' : integral.active}">
<li>
<a ui-sref="couponcancellation">
<!--<i class="fa fa-shopping-cart" aria-hidden="true"></i> -->Coupon Validate
</a>
</li>
</ul>
</li>
<li class="has-submenu last-elements" ng-class="{'open' : configuration.active}"
ui-sref-active="active">
<a ng-click="configuration.active = !configuration.active"><i class="fa fa-cog"></i>Configuration</a>
<ul class="submenu megamenu" ng-class="{'open' : configuration.active}">
<li>
<ul>
<li>
<a ui-sref="basic">
<!--<i class="fa fa-users"></i> -->Client Details
</a>
</li>
<li>
<a ui-sref="payment_materials">
<!--<i class="fa fa-file-image-o"></i> -->Marketing Materials
</a>
</li>
<li ng-if="[1]|withRole">
<a ui-sref="accounts">
<!--<i class="fa fa-users"></i> -->Accounts
</a>
</li>
<li ng-if="currentUser.client.has_children">
<a ui-sref="sub_partners">
<!-- <i class="fa fa-puzzle-piece"></i> -->Sub Partners
</a>
</li>
<li ng-if="[1]|withRole">
<a ui-sref="parameter">
<!--<i class="fa fa-gears"></i> -->Settings
</a>
</li>
<li ng-if="[1]|withRole">
<a ui-sref="devices">
<!--<i class="fa fa-mobile"></i>-->Devices
</a>
</li>
<li ng-click="showMyLoginLogs()">
<a role="button">
<!--<i class="fa fa-list-alt"></i> -->Login History
</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<!-- End navigation menu -->
</div> <!-- end #navigation -->
</div> <!-- end container -->
</div>
<!--end:顶部导航栏-->
<!-- Left side column. contains the logo and sidebar -->
<!--END:左边栏-->
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper autoheight" ui-view>
<div class="content-wrapper autoheight" style="margin-left: 0px" ui-view >
</div>
<!-- /.content-wrapper -->
<!--<div class="navbar-fixed-top" ng-if="currentUser.client.approve_result==2" style="top: 40%;left: 91%;opacity: 0.9;transition: opacity 4s">-->
<!--<a ui-sref="completePartnerInfo" role="button" class="btn btn-danger">Authentication</a>-->
<!--</div>-->
<footer class="main-footer">
<footer class="main-footer" style="margin-left: 0px">
<div class="pull-right hidden-xs">
<b>Easy BusinessEasy Pay</b>
</div>

@ -2,16 +2,8 @@
<section class="content-header">
<h1>
Cash Back Account
</h1>
<ol class="breadcrumb">
<li class="active"><i class="fa fa-dashboard"></i> Cash Back Account</li>
</ol>
</section>
<section class="content">
<div class="row margin-bottom">
<div class="col-xs-12">
<div class="btn-group pull-right" uib-dropdown ng-if="currentUser.client.has_children">
<button id="single-button" type="button" class="btn btn-primary" style="min-width: 100px"
<div class="btn-group" uib-dropdown ng-if="currentUser.client.has_children">
<button id="single-button" type="button" class="btn btn-sm btn-default"
uib-dropdown-toggle ng-disabled="disabled">
{{chooseShow}} <span class="caret"></span>
</button>
@ -20,8 +12,12 @@
<li ng-repeat="client in clients"><a ng-click="chooseClient(client)">{{client.short_name}}</a></li>
</ul>
</div>
</div>
</div>
</h1>
<ol class="breadcrumb">
<li class="active"><i class="fa fa-dashboard"></i> Cash Back Account</li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">

@ -0,0 +1,142 @@
mdi {
display: inline-block;
font: normal normal normal 24px/1 "Material Design Icons";
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
transform: translate(0, 0);
}
.mini-stat {
box-shadow: 1px 0 20px rgba(0, 0, 0, .05);
padding: 20px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
margin-bottom: 30px;
}
.mini-stat-info {
font-size: 14px;
padding-top: 2px;
}
.mini-stat-info span {
display: block;
font-size: 24px;
}
.f-24{
font-size: 24px;
}
.f-14{
font-size: 14px;
}
.bg-white {
background-color: #fff!important;
}
.bg-success {
background-color: #6fd088!important;
}
.bg-info {
background-color: #0097a7!important;
}
.bg-light {
background-color: #f8f9fa!important;
}
.mini-stat-icon {
width: 60px;
height: 60px;
display: inline-block;
line-height: 60px;
text-align: center;
font-size: 30px;
-webkit-border-radius: 100%;
-moz-border-radius: 100%;
border-radius: 100%;
float: left;
margin-right: 10px;
}
.bg-light {
background-color: #f8f9fa!important;
}
.card {
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #fff;
background-clip: border-box;
border: 1px solid rgba(0, 0, 0, .125);
border-radius: .25rem;
box-shadow: 1px 0 20px rgba(0,0,0,.05);
}
.text-right {
text-align: right!important;
}
.text-light {
color: #f8f9fa!important;
}
.m-b-30 {
margin-bottom: 30px;
}
.card-body {
-webkit-box-flex: 1;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
padding: 1.25rem;}
.header-title {
margin-bottom: 8px;
text-transform: uppercase;
letter-spacing: .02em;
font-size: 14px;
}
.mt-0, .my-0 {
margin-top: 0!important;
}
.m-t-20 {
margin-top: 20px;
}
.mb-0, .my-0 {
margin-bottom: 0!important;
}
.m-r-5 {
margin-right: 5px;
}
list-inline {
padding-left: 0;
list-style: none;
}
.widget-chart li {
width: 31.5%;
display: inline-block;
padding: 0;
}
.m-l-0{
margin-left: 0px;
}
@media (max-width: 991px){
#navigation {
position: absolute;
top: 0px;
left: 0;
right: 0;
display: none;
height: auto;
padding-bottom: 0;
overflow: auto;
border-top: 1px solid #e7e7e7;
border-bottom: 1px solid #e7e7e7;
background-color: #fff;
}
}
#topnav .navbar-custom {
background-color: #424858;
box-shadow: 0 1px 1px rgba(0,0,0,.1);
padding-left: 0;
}

File diff suppressed because it is too large Load Diff

@ -12,7 +12,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
controller: 'partnerDashboardCtrl'
})
}]);
app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser', function ($scope, $http, $filter, $uibModal,$timeout, chartParser) {
/*app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser', function ($scope, $http, $filter, $uibModal,$timeout, chartParser) {
$scope.params = {};
$scope.chooseShow = 'All';
$scope.clients = [$scope.currentUser.client];
@ -431,7 +431,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
}
},
legend: {
data: ['Wechat', 'Alipay'/*,'Bestpay'*/],
data: ['Wechat', 'Alipay'/!*,'Bestpay'*!/],
bottom: 0,
height: '15%',
width: '80%',
@ -442,7 +442,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
name: 'Exchange Rate',
min: 'auto'
}
/*color: colors*/
/!*color: colors*!/
},
xAxis: {
basic: {
@ -566,6 +566,538 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
}
}]);*/
app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser','clearingDetailService', function ($scope, $http, $filter, $uibModal,$timeout, chartParser,clearingDetailService) {
$scope.scales = [
{
key: 'today',
label: '今日',
params: function () {
return {
begin: $filter('date')(new Date(), 'yyyyMMdd'),
end: $filter('date')(new Date(), 'yyyyMMdd')
}
}
},
{
key: 'yesterday',
label: '昨日',
params: function () {
var date = new Date();
date = date.setDate(date.getDate() - 1);
return {
begin: $filter('date')(date, 'yyyyMMdd'),
end: $filter('date')(date, 'yyyyMMdd')
}
}
},
{
key: 'seven',
label: '近7日',
params: function () {
var date = new Date();
var end = $filter('date')(date, 'yyyyMMdd');
date = date.setDate(date.getDate() - 7);
return {
begin: $filter('date')(date, 'yyyyMMdd'),
end: end
}
}
},
];
$scope.params = {};
$scope.pagination = {};
$scope.clientMoniker = $scope.currentUser.client_moniker;
$scope.chooseShow = 'All';
$scope.clients = [$scope.currentUser.client];
if ($scope.currentUser.client.has_children) {
$scope.params.client_ids = [];
$http.get('/client/partner_info/sub_partners',$scope.req).then(function (resp) {
var clientList = resp.data;
clientList.forEach(function (client) {
$scope.clients.push(client);
});
$scope.clients.forEach(function (client) {
$scope.params.client_ids.push(client.client_id);
});
$scope.loadDashboard();
})
}
$scope.chooseClient = function (sub) {
$scope.params.client_ids = [];
if (sub == 'All') {
$scope.chooseShow = 'All';
$scope.clients.forEach(function (client) {
$scope.params.client_ids.push(client.client_id);
});
} else {
$scope.params.client_ids = [sub.client_id];
$scope.chooseShow = sub.short_name;
}
$scope.loadDashboard();
};
$scope.loadSettlementLogs = function (page) {
var params = {limit:10};
$http.get('/client/trans_flow/settlement/log', {params: angular.merge(params,$scope.params)}).then(function (resp) {
$scope.settlementLogs = resp.data.data;
});
};
$scope.loadDashboard = function () {
loadTransCommon();
getExchangeRate();
loadTradeAmountInTypes(angular.merge($scope.scales[2].params(),angular.copy($scope.params)));
loadFeeAnalysis(angular.merge($scope.scales[2].params(),angular.copy($scope.params)));
getOrderCustomerChartAnalysis(angular.merge($scope.scales[2].params(),angular.copy($scope.params)));
$scope.loadSettlementLogs(1);
};
if (!$scope.currentUser.client.has_children){
$scope.loadDashboard();
}
function loadTransCommon() {
var params = angular.copy($scope.params);
params = angular.merge(params, $scope.scales[0].params());
$http.get('/dashboard/partner/common_analysis',{params:params}).then(function (resp) {
$scope.transcommon = resp.data;
});
}
function getExchangeRate() {
$http.get('/dashboard/system/exchange_rates', {params: $scope.scales[0].params()}).then(function (resp) {
if (resp.data && resp.data.length > 0) {
$scope.wechat_rate = resp.data[0].Wechat.exchange_rate;
$scope.alipay_rate = resp.data[0].Alipay.exchange_rate;
$scope.exchange_date = resp.data[0].date.substr(0, 10);
}
});
}
function loadTradeAmountInTypes(params) {
var tradeInTypeConfig = {
chart: {
tooltip: {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
toolbox: {
show: true,
feature: {
mySeven: {
title: 'Last a week',
show: true,
icon: 'path://M3.59-4.07L32.38-4.07L32.38 0.04Q22.25 25.11 17.19 46.34L10.65 46.34Q16.14 26.94 26.19 1.41L3.59 1.41L3.59-4.07Z',
onclick: function () {
loadTradeAmountInTypes($scope.scales[2].params())
}
},
myThirty: {
title: 'Last a month',
show: true,
icon: 'path://M12.52 17.02L16.10 17.02Q20.71 17.02 22.43 15.72Q25.66 13.23 25.66 8.23Q25.66-0.63 17.61-0.63Q10.93-0.63 9.42 6.93L3.73 6.93Q4.50 2.19 7.03-0.91Q10.90-5.51 17.61-5.51Q23.24-5.51 26.89-2.28Q31.22 1.52 31.22 8.02Q31.22 16.78 23.38 19.48Q32.84 23.14 32.84 32.81Q32.84 39.00 29.32 42.97Q25.10 47.79 17.72 47.79Q10.79 47.79 6.68 43.04Q3.66 39.56 3.02 33.44L8.93 33.44Q9.67 42.83 17.72 42.83Q21.45 42.83 23.98 40.72Q27.14 38.01 27.14 32.81Q27.14 21.63 16.10 21.63L12.52 21.63L12.52 17.02ZM54-5.51Q67.99-5.51 67.99 21.14Q67.99 47.79 54 47.79Q40.04 47.79 40.04 21.14Q40.04-5.51 54-5.51M46.97 33.65L59.84 4.30Q57.80-0.55 53.93-0.55Q45.95-0.55 45.95 21.14Q45.95 28.52 46.97 33.65M48.16 37.91Q50.13 42.83 54 42.83Q62.09 42.83 62.09 21.07Q62.09 13.86 61.07 8.66L48.16 37.91Z',
onclick: function () {
var params = {};
var dt = new Date();
params.end = $filter('date')(dt, 'yyyyMMdd');
dt.setDate(dt.getDate() - 29);
params.begin = $filter('date')(dt, 'yyyyMMdd');
loadTradeAmountInTypes(params)
}
}
}
},
color: colors
},
series: [{
basic: {
name: '交易渠道', type: 'pie', itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
},
column: {key: 'aud_fee', name: 'gateway_label'}
}]
};
$http.get('/dashboard/partner/trans_type_analysis',{params:params}).then(function (resp) {
$scope.trade_type_chart = chartParser.parse(tradeInTypeConfig, resp.data);
});
}
function loadFeeAnalysis(params) {
var analysisConfig = {
chart: {
tooltip: {
trigger: 'axis',
formatter: '{b}:AUD {c}'
},
toolbox: {
show: true,
feature: {
mySeven: {
title: 'Last a week',
show: true,
icon: 'path://M3.59-4.07L32.38-4.07L32.38 0.04Q22.25 25.11 17.19 46.34L10.65 46.34Q16.14 26.94 26.19 1.41L3.59 1.41L3.59-4.07Z',
onclick: function () {
loadFeeAnalysis(angular.merge($scope.scales[2].params(),$scope.params));
}
},
myThirty: {
title: 'Last a month',
show: true,
icon: 'path://M12.52 17.02L16.10 17.02Q20.71 17.02 22.43 15.72Q25.66 13.23 25.66 8.23Q25.66-0.63 17.61-0.63Q10.93-0.63 9.42 6.93L3.73 6.93Q4.50 2.19 7.03-0.91Q10.90-5.51 17.61-5.51Q23.24-5.51 26.89-2.28Q31.22 1.52 31.22 8.02Q31.22 16.78 23.38 19.48Q32.84 23.14 32.84 32.81Q32.84 39.00 29.32 42.97Q25.10 47.79 17.72 47.79Q10.79 47.79 6.68 43.04Q3.66 39.56 3.02 33.44L8.93 33.44Q9.67 42.83 17.72 42.83Q21.45 42.83 23.98 40.72Q27.14 38.01 27.14 32.81Q27.14 21.63 16.10 21.63L12.52 21.63L12.52 17.02ZM54-5.51Q67.99-5.51 67.99 21.14Q67.99 47.79 54 47.79Q40.04 47.79 40.04 21.14Q40.04-5.51 54-5.51M46.97 33.65L59.84 4.30Q57.80-0.55 53.93-0.55Q45.95-0.55 45.95 21.14Q45.95 28.52 46.97 33.65M48.16 37.91Q50.13 42.83 54 42.83Q62.09 42.83 62.09 21.07Q62.09 13.86 61.07 8.66L48.16 37.91Z',
onclick: function () {
var params = {};
var dt = new Date();
params.end = $filter('date')(dt, 'yyyyMMdd');
dt.setDate(dt.getDate() - 29);
params.begin = $filter('date')(dt, 'yyyyMMdd');
loadFeeAnalysis(angular.merge(params,$scope.params));
}
}
}
},
yAxis: {
type: 'value',
name: 'Amount(AUD)'
},
color: colors
},
xAxis: {
basic: {
type: 'category',
boundaryGap: false
},
key: 'date'
},
series: [
{
basic: {type: 'line', label: {normal: {show: true}}, showAllSymbols: true},
column: {key: 'total'}
}
]
};
$http.get('/dashboard/partner/fee_analysis', {params: params}).then(function (resp) {
$scope.trade_line = chartParser.parse(analysisConfig, resp.data);
})
}
function getOrderCustomerChartAnalysis(params) {
$http.get('/dashboard/partner/avg_order_customer',{params:params}).then(function (resp) {
$scope.avgOrderAndCustomer = resp.data;
});
$http.get('/dashboard/partner/fee_analysis',{params:angular.merge(params,$scope.params)}).then(function (resp) {
var dates = [];
var new_customers = [];
var old_customers = [];
var total_amounts = [];
var orders = [];
resp.data.forEach(function (e) {
dates.push(e.date);
new_customers.push(e.new_customers);
old_customers.push(e.old_customers);
orders.push(e.orders);
total_amounts.push(e.total);
});
$scope.customersHistory = customersHistoryConfig(dates, old_customers, new_customers, orders);
});
}
var customersHistoryConfig = function (date, old_customers, new_customers, orders) {
return {
color: colors,
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
}
},
toolbox: {
show: true,
feature: {
mySeven: {
title: 'Last a week',
show: true,
icon: 'path://M3.59-4.07L32.38-4.07L32.38 0.04Q22.25 25.11 17.19 46.34L10.65 46.34Q16.14 26.94 26.19 1.41L3.59 1.41L3.59-4.07Z',
onclick: function () {
$scope.time_range = "Last a week";
getOrderCustomerChartAnalysis(angular.merge($scope.scales[2].params(),$scope.params))
}
},
myThirty: {
title: 'Last a month',
show: true,
icon: 'path://M12.52 17.02L16.10 17.02Q20.71 17.02 22.43 15.72Q25.66 13.23 25.66 8.23Q25.66-0.63 17.61-0.63Q10.93-0.63 9.42 6.93L3.73 6.93Q4.50 2.19 7.03-0.91Q10.90-5.51 17.61-5.51Q23.24-5.51 26.89-2.28Q31.22 1.52 31.22 8.02Q31.22 16.78 23.38 19.48Q32.84 23.14 32.84 32.81Q32.84 39.00 29.32 42.97Q25.10 47.79 17.72 47.79Q10.79 47.79 6.68 43.04Q3.66 39.56 3.02 33.44L8.93 33.44Q9.67 42.83 17.72 42.83Q21.45 42.83 23.98 40.72Q27.14 38.01 27.14 32.81Q27.14 21.63 16.10 21.63L12.52 21.63L12.52 17.02ZM54-5.51Q67.99-5.51 67.99 21.14Q67.99 47.79 54 47.79Q40.04 47.79 40.04 21.14Q40.04-5.51 54-5.51M46.97 33.65L59.84 4.30Q57.80-0.55 53.93-0.55Q45.95-0.55 45.95 21.14Q45.95 28.52 46.97 33.65M48.16 37.91Q50.13 42.83 54 42.83Q62.09 42.83 62.09 21.07Q62.09 13.86 61.07 8.66L48.16 37.91Z',
onclick: function () {
var params = {};
var dt = new Date();
params.end = $filter('date')(dt, 'yyyyMMdd');
dt.setDate(dt.getDate() - 29);
params.begin = $filter('date')(dt, 'yyyyMMdd');
$scope.time_range = "Last a month";
getOrderCustomerChartAnalysis(angular.merge(params,$scope.params))
}
}
}
},
legend: {
data: ['Old Customers', 'New Customers', 'Order Counts']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: [
{
type: 'category',
data: date
}
],
yAxis: [
{
type: 'value',
name: 'Customers'
}, {
type: 'value',
name: 'Orders'
}
],
series: [
{
name: 'Old Customers',
type: 'bar',
stack: 'customers',
data: old_customers
},
{
name: 'New Customers',
type: 'bar',
stack: 'customers',
data: new_customers
},
{
name: 'Order Counts',
type: 'line',
yAxisIndex: 1,
data: orders
}
]
};
};
$scope.displayExchangeRateHistory = function () {
$uibModal.open({
templateUrl: '/static/dashboard/templates/exchange_rate_history_dialog.html',
controller: 'exchangeRateHistoryDialogCtrl',
size: 'lg'
})
};
$scope.getCurrentPartner = function () {
$http.get('/client/partner_info').then(function (resp) {
$scope.manual_settle = resp.data.manual_settle;
})
};
$scope.getCurrentPartner();
$scope.toShowUnSettledDialog = function () {
$uibModal.open({
templateUrl: '/static/dashboard/templates/partner_dashboard_unsettled_dialog.html',
controller: 'unSettledAmountHistoryDialogCtrl'
})
};
$scope.getClearingTransactions = function (client_id, detailId) {
clearingDetailService.clientClearingDetail(client_id, detailId, true)
};
}]);
app.controller('exchangeRateHistoryDialogCtrl', ['$scope', '$http', '$filter', 'chartParser', function ($scope, $http, $filter, chartParser) {
$scope.loadExchangeRateHistory = function (days) {
var endDate = new Date();
var startDate = new Date();
startDate.setDate(startDate.getDate() - days);
$http.get('/dashboard/system/exchange_rates', {
params: {
begin: $filter('date')(startDate, 'yyyyMMdd'),
end: $filter('date')(endDate, 'yyyyMMdd')
}
}).then(function (resp) {
handleRateHistoryChart(resp.data);
})
};
$scope.loadExchangeRateHistory(7);
var rateHistoryConfig = {
chart: {
tooltip: {
trigger: 'axis',
},
toolbox: {
show: true,
feature: {
mySeven: {
title: 'Last 7 Days',
show: true,
icon: 'path://M3.59-4.07L32.38-4.07L32.38 0.04Q22.25 25.11 17.19 46.34L10.65 46.34Q16.14 26.94 26.19 1.41L3.59 1.41L3.59-4.07Z',
onclick: function () {
$scope.loadExchangeRateHistory(7)
}
},
myThirty: {
title: 'Last 30 Days',
show: true,
icon: 'path://M12.52 17.02L16.10 17.02Q20.71 17.02 22.43 15.72Q25.66 13.23 25.66 8.23Q25.66-0.63 17.61-0.63Q10.93-0.63 9.42 6.93L3.73 6.93Q4.50 2.19 7.03-0.91Q10.90-5.51 17.61-5.51Q23.24-5.51 26.89-2.28Q31.22 1.52 31.22 8.02Q31.22 16.78 23.38 19.48Q32.84 23.14 32.84 32.81Q32.84 39.00 29.32 42.97Q25.10 47.79 17.72 47.79Q10.79 47.79 6.68 43.04Q3.66 39.56 3.02 33.44L8.93 33.44Q9.67 42.83 17.72 42.83Q21.45 42.83 23.98 40.72Q27.14 38.01 27.14 32.81Q27.14 21.63 16.10 21.63L12.52 21.63L12.52 17.02ZM54-5.51Q67.99-5.51 67.99 21.14Q67.99 47.79 54 47.79Q40.04 47.79 40.04 21.14Q40.04-5.51 54-5.51M46.97 33.65L59.84 4.30Q57.80-0.55 53.93-0.55Q45.95-0.55 45.95 21.14Q45.95 28.52 46.97 33.65M48.16 37.91Q50.13 42.83 54 42.83Q62.09 42.83 62.09 21.07Q62.09 13.86 61.07 8.66L48.16 37.91Z',
onclick: function () {
$scope.loadExchangeRateHistory(30)
}
}
}
},
legend: {
data: ['Wechat', 'Alipay'],
bottom: 0,
height: '15%',
width: '80%',
left: '10%'
},
yAxis: {
type: 'value',
name: 'Exchange Rate',
min: 'auto'
}
},
xAxis: {
basic: {
type: 'category',
boundaryGap: false
},
key: 'date'
},
series: [
{
basic: {
name: 'Wechat',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0,
itemStyle : {
normal : {
color:'#09bb07',
lineStyle:{
color:'#09bb07'
}
}
}
},
column: {key: 'Wechat.exchange_rate'}
},
{
basic: {
name: 'Alipay',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0,
itemStyle : {
normal : {
color:'#00c0ef',
lineStyle:{
color:'#00c0ef'
}
}
}
},
column: {key: 'Alipay.exchange_rate'}
}
]
};
function handleRateHistoryChart(exchangeRates) {
$scope.rateHistory = chartParser.parse(rateHistoryConfig, exchangeRates);
}
}]);
app.controller('unSettledAmountHistoryDialogCtrl', ['$scope', '$http', '$filter','commonDialog', function ($scope, $http, $filter,commonDialog) {
$scope.params = {isAll:true};
$scope.settleParams = {};
$scope.unSettledAmountHistory = function () {
$http.get('/client/manual_settle/today').then(function (resp) {
$scope.currentSettle = resp.data;
$scope.settleParams = angular.copy($scope.currentSettle);
if($scope.currentSettle.settle_to){
$scope.params.isAll = false;
$scope.params.to_date = new Date($scope.currentSettle.settle_to);
}
$scope.params.maxData = $scope.currentSettle.unsettle[0].date_str;
})
};
$scope.unSettledAmountHistory();
$scope.changeIsAll = function () {
if($scope.params.isAll){
$scope.params.to_date = '';
$scope.settleParams = angular.copy($scope.currentSettle);
}else {
if($scope.currentSettle.settle_to){
$scope.params.to_date = new Date($scope.currentSettle.settle_to);
}else{
$scope.params.to_date = $scope.params.maxData;
}
}
};
$scope.$watch('params.to_date', function() {
$scope.settleParams = angular.copy($scope.currentSettle);
if($scope.params.to_date){
$scope.params.isAll=false;
$scope.to_date = $filter('date')($scope.params.to_date, 'yyyy-MM-dd');
var cashbackChoose = {};
var count = 0;
var total_settle_amount = 0.00;
angular.forEach($scope.currentSettle.unsettle, function (unsettle) {
if (new Date(unsettle.date_str).getTime() <= new Date($scope.to_date).getTime()) {
cashbackChoose[count] = unsettle;
if(unsettle.settle_amount != null){
total_settle_amount = decimal.add(unsettle.settle_amount,total_settle_amount).toFixed(2);
}
count++;
}
});
$scope.settleParams.unsettle = cashbackChoose;
$scope.settleParams.total_settle_amount = total_settle_amount;
}else {
$scope.params.isAll = true;
}
try {
$scope.$digest();
}catch (err){}
});
$scope.manualSettle = function () {
if($scope.currentSettle.locked){
alert("系统正好在执行清算任务,暂不能提现,请稍后再试!");
return;
}
$scope.settle_to = $scope.params.to_date || $scope.params.maxData;
$scope.settle_to = $filter('date')($scope.settle_to, 'yyyy-MM-dd');
$http.put('/client/manual_settle/today', {settle_to: $scope.settle_to}).then(function () {
commonDialog.alert({title: 'Success', content: 'Withdraw application has been submitted', type: 'success'});
$scope.$close();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
}
}]);
app.filter('abs', function () {
return function (value) {
return Math.abs(value);
}
});
return app;
});

@ -1,4 +1,5 @@
<!--
<section class="content-header">
<h1>
Dashboard
@ -26,17 +27,17 @@
ng-bind="scale.label" ng-click="switchScale(scale)" type="button"></button>
</div>
</div>
<!--<div class="col-xs-12" ng-if="currentUser.client.has_children">-->
<!--<div class="btn-group pull-right" uib-dropdown>-->
<!--<button id="single-button" type="button" class="btn btn-primary" uib-dropdown-toggle ng-disabled="disabled">-->
<!--{{choose}} <span class="caret"></span>-->
<!--</button>-->
<!--<ul class="dropdown-menu" uib-dropdown-menu aria-labelledby="single-button" style="min-width: 80px">-->
<!--<li><a href="#" ng-click="choose='all';chooseClient('All')">all</a></li>-->
<!--<li ng-repeat="client in clients"><a href="#" ng-click="choose=client.short_name;chooseClient(client.client_id)">{{client.short_name}}</a></li>-->
<!--</ul>-->
<!--</div>-->
<!--</div>-->
&lt;!&ndash;<div class="col-xs-12" ng-if="currentUser.client.has_children">&ndash;&gt;
&lt;!&ndash;<div class="btn-group pull-right" uib-dropdown>&ndash;&gt;
&lt;!&ndash;<button id="single-button" type="button" class="btn btn-primary" uib-dropdown-toggle ng-disabled="disabled">&ndash;&gt;
&lt;!&ndash;{{choose}} <span class="caret"></span>&ndash;&gt;
&lt;!&ndash;</button>&ndash;&gt;
&lt;!&ndash;<ul class="dropdown-menu" uib-dropdown-menu aria-labelledby="single-button" style="min-width: 80px">&ndash;&gt;
&lt;!&ndash;<li><a href="#" ng-click="choose='all';chooseClient('All')">all</a></li>&ndash;&gt;
&lt;!&ndash;<li ng-repeat="client in clients"><a href="#" ng-click="choose=client.short_name;chooseClient(client.client_id)">{{client.short_name}}</a></li>&ndash;&gt;
&lt;!&ndash;</ul>&ndash;&gt;
&lt;!&ndash;</div>&ndash;&gt;
&lt;!&ndash;</div>&ndash;&gt;
</div>
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
@ -75,10 +76,10 @@
<i class="fa fa-question-circle-o"
uib-tooltip="Total unsettled amount including transaction fee. Click it,show settlement logs."
uib-tooltip-enable="Total unsettled amount including transaction fee" aria-hidden="true"></i></a></span>
<!--<span class="info-box-number" ng-bind="analysis.not_settled|currency:'AUD '"></span>-->
&lt;!&ndash;<span class="info-box-number" ng-bind="analysis.not_settled|currency:'AUD '"></span>&ndash;&gt;
<span class="info-box-number"><label ng-bind="analysis.not_settled|currency:'AUD '"></label>
<!--<a role="button" ui-sref="settlementlogs"><label style="font-size: smaller;color: green">-->
<!--<i class="fa fa-info" aria-hidden="true" tooltip-placement="left-bottom" uib-tooltip="Click it,show settlement logs"></i></label></a>-->
&lt;!&ndash;<a role="button" ui-sref="settlementlogs"><label style="font-size: smaller;color: green">&ndash;&gt;
&lt;!&ndash;<i class="fa fa-info" aria-hidden="true" tooltip-placement="left-bottom" uib-tooltip="Click it,show settlement logs"></i></label></a>&ndash;&gt;
<a role="button" ng-click="toShowUnSettledDialog()" ng-if="manual_settle&&([1]|withRole)">
<i class="fa fa-info-circle" uib-tooltip="withdraw deposit" aria-hidden="true"></i></a>
<label ng-if="analysis.pre_amount != 0" style="font-size: smaller;color: grey">(preauthorised {{analysis.pre_amount}})</label>
@ -90,7 +91,7 @@
<div class="row">
<div class="col-sm-12">
<div class="box">
<!--<div class="box-header with-border"></div>-->
&lt;!&ndash;<div class="box-header with-border"></div>&ndash;&gt;
<div class="box-footer">
<div class="row">
@ -104,18 +105,18 @@
ng-if="analysis.top_amount_order"></p>
</div>
</div>
<!--<div class="col-sm-3 col-xs-6">-->
<!--<div class="description-block border-right" ng-click="displayCustomersAnalysis()"-->
<!--role="button" title="Click it,Display Customer Quantity History.">-->
<!--<p class="description-header text-bold">Customers</p>-->
<!--<p class="description-header text-green" ng-if="analysis.total_customers!=0">-->
<!--<label>{{analysis.total_customers}}</label> /-->
<!--<label>{{analysis.new_customers}}</label> /-->
<!--<label>{{analysis.old_customers}}</label>-->
<!--</p>-->
<!--<p class="description-text" ng-if="analysis.total_customers!=0">Total/New/Old</p>-->
<!--</div>-->
<!--</div>-->
&lt;!&ndash;<div class="col-sm-3 col-xs-6">&ndash;&gt;
&lt;!&ndash;<div class="description-block border-right" ng-click="displayCustomersAnalysis()"&ndash;&gt;
&lt;!&ndash;role="button" title="Click it,Display Customer Quantity History.">&ndash;&gt;
&lt;!&ndash;<p class="description-header text-bold">Customers</p>&ndash;&gt;
&lt;!&ndash;<p class="description-header text-green" ng-if="analysis.total_customers!=0">&ndash;&gt;
&lt;!&ndash;<label>{{analysis.total_customers}}</label> /&ndash;&gt;
&lt;!&ndash;<label>{{analysis.new_customers}}</label> /&ndash;&gt;
&lt;!&ndash;<label>{{analysis.old_customers}}</label>&ndash;&gt;
&lt;!&ndash;</p>&ndash;&gt;
&lt;!&ndash;<p class="description-text" ng-if="analysis.total_customers!=0">Total/New/Old</p>&ndash;&gt;
&lt;!&ndash;</div>&ndash;&gt;
&lt;!&ndash;</div>&ndash;&gt;
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right">
<p class="description-header text-bold">Customers</p>
@ -170,4 +171,217 @@
</div>
</div>
</div>
</section>-->
<style>
.card{
background-color: #fff;
}
.mini-stat-info span{
font-size: 18px;
}
</style>
<section class="content-header">
<h1>
Dashboard
<div class="btn-group" uib-dropdown ng-if="currentUser.client.has_children" style="padding-right: 15px">
<button id="single-button" type="button" class="btn btn-sm btn-default"
uib-dropdown-toggle ng-disabled="disabled">
{{chooseShow}} <span class="caret"></span>
</button>
<ul class="dropdown-menu" uib-dropdown-menu aria-labelledby="single-button" style="min-width: 80px">
<li><a ng-click="chooseClient('All')">All</a></li>
<li ng-repeat="client in clients"><a ng-click="chooseClient(client)">{{client.short_name}}</a></li>
</ul>
</div>
</h1>
<ol class="breadcrumb">
<li class="active"><i class="fa fa-dashboard"></i> Dashboard</li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="mini-stat clearfix bg-white">
<span class="mini-stat-icon bg-light"><i class="ion ion-social-usd text-danger"></i></span>
<div class="mini-stat-info text-right text-muted f-14">
<span class="info-box-number text-danger" style="font-size: 24px" ng-bind="transcommon.today.trade_amount|currency:'AUD'">15852</span>
TRADING VOLUME
</div>
<p class="mb-0 m-t-20 text-muted">Yesterday: {{transcommon.yes.trade_amount|currency:'AUD'}} <span class="pull-right" ng-class="{'text-red':transcommon.today.trade_amount<transcommon.yes.trade_amount}">
<i class="fa fa-caret-up m-r-5" ng-if="transcommon.today.trade_amount >=transcommon.yes.trade_amount"></i>
<i class="fa fa-caret-down m-r-5" ng-if="transcommon.today.trade_amount<transcommon.yes.trade_amount"></i>
{{transcommon.trade_amount_rise|abs|percentage:2}}</span></p>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="mini-stat clearfix bg-success">
<span class="mini-stat-icon bg-light"><i class="fa fa-shopping-cart text-success"></i></span>
<div class="mini-stat-info text-right text-white f-14">
<span class="counter text-white" style="font-size: 24px" ng-bind="transcommon.today.trade_count">956</span>
TRANSACTIONS
</div>
<p class="mb-0 m-t-20 text-light">Yesterday: {{transcommon.yes.trade_count}} <span class="pull-right" ng-class="{'text-red':transcommon.today.trade_count<transcommon.yes.trade_count}">
<i class="fa fa-caret-up m-r-5" ng-if="transcommon.today.trade_count >=transcommon.yes.trade_count"></i>
<i class="fa fa-caret-down m-r-5 " ng-if="transcommon.today.trade_count<transcommon.yes.trade_count"></i>
{{transcommon.trade_count_rise|abs|percentage:2}}</span></p>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="mini-stat clearfix bg-white">
<span class="mini-stat-icon bg-light"><i class="ion ion-person-stalker text-warning"></i></span>
<div class="mini-stat-info text-right text-muted f-14">
<span class="counter text-warning" style="font-size: 24px" ng-bind="transcommon.today.customers">5210</span>
Customers
</div>
<p class="mb-0 m-t-20 text-muted">Yesterday: {{transcommon.yes.customers}} <span class="pull-right" ng-class="{'text-red':transcommon.today.customers<transcommon.yes.customers}">
<i class="fa fa-caret-up m-r-5" ng-if="transcommon.today.customers >=transcommon.yes.customers"></i>
<i class="fa fa-caret-down m-r-5" ng-if="transcommon.today.customers<transcommon.yes.customers"></i>
{{transcommon.customers_rise|abs|percentage:2}}</span></p>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="mini-stat clearfix bg-info">
<span class="mini-stat-icon bg-light"><i class="glyphicon glyphicon-btc text-info"></i></span>
<div class="mini-stat-info text-right text-light f-14">
<span class="counter text-white" style="font-size: 24px">
{{transcommon.not_settled|currency:'AUD '}} <a role="button" ng-click="toShowUnSettledDialog()" ng-if="manual_settle&&([1]|withRole)">
<i class="fa fa-info-circle text-black" uib-tooltip="withdraw deposit" aria-hidden="true"></i></a>
</span>
UNSETTLED
</div>
<p class="mb-0 m-t-20 text-light">Latest settlement: {{transcommon.latest_settle|currency:'AUD '}}
</p>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="card m-b-30">
<div class="card-body">
<h4 class="mt-0 header-title">Transaction Trade Analysis</h4>
<ul class="list-inline widget-chart m-t-20 text-center"
ng-click="displayExchangeRateHistory()"
role="button" title="Click it,Display Exchange Rate History.">
<li>
<p class="text-muted m-b-0"><b>Exchange Rate</b></p>
</li>
<li>
<h6 class=""><b>{{wechat_rate}}</b></h6>
<p class="text-muted m-b-0"><img src="/static/images/wechatpay_sign.png"/> <b>Wechat</b></p>
</li>
<li>
<h6 class=""><b>{{alipay_rate}}</b></h6>
<p class="text-muted m-b-0"> <img src="/static/images/alipay_sign.png"/> <b>Alipay</b></p>
</li>
</ul>
<div class="box-body">
<div class="chart" echarts="trade_line" style="height: 300px"
ng-class="{nodata:trade_line.nodata}"></div>
</div>
</div>
</div>
</div>
<div class="col-md-6 col-sm-6 col-xs-12">
<div class="card m-b-30">
<div class="card-body">
<h4 class="mt-0 header-title">Customers Analysis</h4>
<ul class="list-inline widget-chart m-t-20 text-center di_flex">
<li ng-if="!time_range">
<p class="text-muted m-b-0"><b>Last a week</b></p>
</li>
<li ng-if="time_range">
<p class="text-muted m-b-0"><b>{{time_range}}</b></p>
</li>
<li>
<h6 class="">{{avgOrderAndCustomer.old_customers.toFixed(0)||0}}</h6>
<p class="text-muted m-b-0"><b>Avg Old Customers</b></p>
</li>
<li>
<h6 class="">{{avgOrderAndCustomer.new_customers.toFixed(0)||0}}</h6>
<p class="text-muted m-b-0"><b>Avg New Customers</b></p>
</li>
</ul>
<div class="row">
<div class="box-body">
<div class="chart" echarts="customersHistory" style="height: 300px"
ng-class="{nodata:customersHistory.nodata}"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="card m-b-30">
<div class="card-body">
<h4 class="mt-0 header-title">Trading distribution chart</h4>
<div class="row">
<div class="box-body">
<div class="chart" echarts="trade_time" style="height: 430px"
ng-class="{nodata:trade_time.nodata}"></div>
</div>
</div>
</div>
</div>
</div>
</div>-->
<div class="row">
<div class="col-md-8 col-sm-8 col-xs-12" >
<div class="card m-b-30">
<div class="card-body">
<h4 class="mt-0 m-b-15 header-title">
Settlement Logs
<a style="float: right" role="button" ui-sref="settlementlogs">+ more</a>
</h4>
<div class="table-responsive">
<table class="table table-hover mb-0">
<thead>
<tr>
<th>Date</th>
<th>Transaction Amount</th>
<th>to Merchant</th>
<th>Service Fee</th>
<th>Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="log in settlementLogs">
<td ng-bind="log.clearing_time|limitTo:10"></td>
<td ng-bind="log.total"></td>
<td ng-bind="log.income"></td>
<td ng-bind="log.fee"></td>
<td>
<a role="button" class="text-bold" ng-if="(log.clearing_time|limitTo:10) >= '2017-01-12'" ng-click="getClearingTransactions(log.client_id,log.clear_detail_id)" title="Detail">
<i class="fa fa-list-alt"></i>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-4 col-xs-12">
<div class="card m-b-30">
<div class="card-body">
<h4 class="mt-0 header-title">交易类型分布-交易量</h4>
<div class="chart" style="height: 400px" echarts="trade_type_chart"
ng-class="{nodata:trade_type_chart.nodata}"></div>
</div>
</div>
</div>
</div>
</section>
Loading…
Cancel
Save