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

master
yixian 6 years ago
commit 59259a6c25

@ -2,6 +2,8 @@ package au.com.royalpay.payment.manage.customers.core;
import com.alibaba.fastjson.JSONObject;
import java.util.List;
/**
* Created by yuan on 2017/10/10.
*/
@ -21,4 +23,6 @@ public interface CouponValidateService {
JSONObject ctripCouponInfo(String coupon_log_id,int client_id,boolean is_expiry);
JSONObject ctripCouponLogNotice(String coupon_log_id,String order_id,String open_id,String status);
JSONObject getHalloweenOrderInfo(String customerId, String transactionDate);
}

@ -2,6 +2,8 @@ package au.com.royalpay.payment.manage.customers.core.impls;
import au.com.royalpay.payment.manage.customers.core.CouponValidateService;
import au.com.royalpay.payment.manage.mappers.customers.CustomerMembershipMapper;
import au.com.royalpay.payment.manage.mappers.payment.OrderMapper;
import au.com.royalpay.payment.manage.mappers.system.CustomerMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
@ -51,6 +53,12 @@ public class CouponValidateServiceImpl implements CouponValidateService {
@Resource
private ClientManager clientManager;
@Resource
private OrderMapper orderMapper;
@Resource
private CustomerMapper customerMapper;
@Override
public JSONObject getCoupon(JSONObject partner,int page,int limit) {
String timestamp = System.currentTimeMillis() + "";
@ -217,6 +225,65 @@ public class CouponValidateServiceImpl implements CouponValidateService {
return null;
}
@Override
public JSONObject getHalloweenOrderInfo(String customerId, String transactionDate) {
List<JSONObject> orderList = new ArrayList<>();
JSONObject relation = customerMapper.findCustomerBykangaId(customerId);
if (relation.containsKey("wechat_openid")) {
JSONObject param = new JSONObject();
param.put("customer_id", relation.getString("wechat_openid"));
param.put("transaction_date", transactionDate);
param.put("status", 5);
List<JSONObject> orderListWechat = orderMapper.listHalloweenActOrder(param);
if(orderListWechat!=null){
orderList.addAll(orderListWechat);
}
}
if (relation.containsKey("globalpay_openid")) {
JSONObject param = new JSONObject();
param.put("customer_id", relation.getString("globalpay_openid"));
param.put("transaction_date", transactionDate);
param.put("status", 5);
List<JSONObject> orderListGlobal = orderMapper.listHalloweenActOrder(param);
if(orderListGlobal!=null){
orderList.addAll(orderListGlobal);
}
}
// 获取万圣节活动当天支付成功的订单
JSONObject result = null;
if (orderList != null && orderList.size() > 0) {
result = new JSONObject();
result.put("orderList", orderList);
for (JSONObject order : orderList) {
String redpackOpenId = getRedpackId(order);
if (redpackOpenId != null) {
result.put("redpackOpenId", redpackOpenId);
break;
}
}
}
return result;
}
// 获取该笔订单的redpackOpenId
// TODO: 2018/10/28 有待商榷
private String getRedpackId(JSONObject order) {
String redpackOpenId = null;
String channel = order.getString("channel");
if ("Wechat".equals(channel)) {
JSONObject customerRelation = customerMapper.findCustomerByOpenId(order.getString("customer_id"));
if (customerRelation == null) {
customerRelation = customerMapper.findCustomerGlobalpayByOpenId(order.getString("customer_id"));
} else {
redpackOpenId = customerRelation.getString("redpack_openid");
if (customerRelation.getString("kanga_openid") == null) {
redpackOpenId = null;
}
}
}
return redpackOpenId;
}
private String signUrl(UriComponentsBuilder uriComponentsBuilder) {
String timestamp = System.currentTimeMillis() + "";
String base = CUSTOMER_APP_ID + timestamp + CUSTOMER_AUTH_CODE;

@ -0,0 +1,105 @@
package au.com.royalpay.payment.manage.customers.core.impls;
import au.com.royalpay.payment.core.events.AfterPaymentFinishEvent;
import au.com.royalpay.payment.manage.mappers.system.CustomerMapper;
import cn.yixblog.platform.http.HttpRequestGenerator;
import cn.yixblog.platform.http.HttpRequestResult;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.codec.digest.DigestUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.util.UriComponentsBuilder;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
@Service
public class CustomerHalloweenCountServiceImpl implements ApplicationListener<AfterPaymentFinishEvent> {
private Logger logger = LoggerFactory.getLogger(getClass());
@Value("${app.customer.host}")
private String CUSTOMER_HOST;
@Value("${customer.app.appid}")
private String CUSTOMER_APP_ID;
@Value("${customer.app.auth-code}")
private String CUSTOMER_AUTH_CODE;
@Resource
private CustomerMapper customerMapper;
@Override
public void onApplicationEvent(AfterPaymentFinishEvent event) {
final JSONObject order = event.getFinishedEvent().getOrder();
//判断是否是pine测试商户若不是则判断是否在活动时间
if (order.getIntValue("client_id") != 9) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
Date newDay = new Date();
try {
if (newDay.compareTo(sdf.parse("2018-10-31 00:00:00")) < 0) {
return;
}
if (newDay.compareTo(sdf.parse("2018-11-02 00:00:00")) > 0) {
return;
}
} catch (ParseException e) {
}
}
BigDecimal clearAmount = event.getFinishedEvent().getAudFee();
String channel = order.getString("channel");
if ("Wechat".equals(channel)) {
JSONObject customerRelation = customerMapper.findCustomerByOpenId(order.getString("customer_id"));
if (customerRelation == null) {
customerRelation = customerMapper.findCustomerGlobalpayByOpenId(order.getString("customer_id"));
}
if (customerRelation.getString("kanga_openid") == null) {
return;
}
afterPaymentAddHalloweenCount(customerRelation.getString("kanga_openid"), order.getString("order_id"), customerRelation.getString("redpack_openid"),channel, clearAmount);
}
if ("Alipay".equals(channel)) {
afterPaymentAddHalloweenCount(order.getString("customer_id"), order.getString("order_id"), "alipay",channel, clearAmount);
}
}
private void afterPaymentAddHalloweenCount(String id, String orderId,String redPackId, String channel, BigDecimal clearAmount) {
String timestamp = System.currentTimeMillis() + "";
String base = CUSTOMER_APP_ID + timestamp + CUSTOMER_AUTH_CODE;
String sign = DigestUtils.sha256Hex(base).toLowerCase();
String uri = UriComponentsBuilder.fromHttpUrl(CUSTOMER_HOST + "activity/halloween/payment/orders")
.queryParam("appid", CUSTOMER_APP_ID)
.queryParam("timestamp", timestamp)
.queryParam("sign", sign)
.queryParam("id", id)
.queryParam("orderId", orderId)
.queryParam("channel", channel)
.queryParam("amount", clearAmount)
.queryParam("redpackId", redPackId)
.toUriString();
if(clearAmount.compareTo(new BigDecimal("1.99"))<0){
return;
}
HttpRequestGenerator gen = new HttpRequestGenerator(uri, RequestMethod.POST);
try {
HttpRequestResult result = gen.execute();
if (result.isSuccess()) {
int statusCode = result.getStatusCode();
if (statusCode == 200) {
logger.info("万圣节活动次数添加成功");
}
}
} catch (Exception ignored) {
ignored.printStackTrace();
}
}
}

@ -10,6 +10,7 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* Created by yuan on 2017/10/10.
@ -40,4 +41,17 @@ public class CouponValidateController {
throw new BadRequestException("卡券核销失败");
}
}
/**
*
* @param customerId
* @param actDate
* @return
*/
@GetMapping(value = "/payment/halloween")
@ResponseBody
public JSONObject getHalloweenActOrderInfo(@RequestParam("customer_id") String customerId,
@RequestParam("act_date") String actDate) {
return couponVerificationService.getHalloweenOrderInfo(customerId, actDate);
}
}

@ -1,5 +1,7 @@
package au.com.royalpay.payment.manage.management.sysconfig.beans;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
/**
@ -8,6 +10,21 @@ import org.apache.commons.lang3.StringUtils;
public class FuncInfo {
private String name;
private String remark;
private boolean admin;
private boolean operator;
private boolean bd;
private boolean finacial;
private boolean servant;
private boolean accountmanager;
private boolean director;
private boolean sitemanager;
private boolean developer;
private boolean bdleader;
private boolean riskmanager;
private boolean guest;
private boolean orgmanager;
private boolean salesmanager;
private boolean datacontent;
public String getName() {
return StringUtils.isEmpty(name) ? null : name;
@ -24,4 +41,179 @@ public class FuncInfo {
public void setRemark(String remark) {
this.remark = remark;
}
public void setSalesmanager(boolean salesmanager) {
this.salesmanager = salesmanager;
}
public boolean isAdmin() {
return admin;
}
public boolean isBd() {
return bd;
}
public boolean isFinacial() {
return finacial;
}
public boolean isAccountmanager() {
return accountmanager;
}
public boolean isOperator() {
return operator;
}
public boolean isDeveloper() {
return developer;
}
public boolean isDirector() {
return director;
}
public boolean isServant() {
return servant;
}
public void setAccountmanager(boolean accountmanager) {
this.accountmanager = accountmanager;
}
public boolean isBdleader() {
return bdleader;
}
public boolean isSitemanager() {
return sitemanager;
}
public void setAdmin(boolean admin) {
this.admin = admin;
}
public void setBd(boolean bd) {
this.bd = bd;
}
public boolean isGuest() {
return guest;
}
public void setDeveloper(boolean developer) {
this.developer = developer;
}
public boolean isRiskmanager() {
return riskmanager;
}
public void setDirector(boolean director) {
this.director = director;
}
public void setBdleader(boolean bdleader) {
this.bdleader = bdleader;
}
public void setFinacial(boolean finacial) {
this.finacial = finacial;
}
public void setOperator(boolean operator) {
this.operator = operator;
}
public void setServant(boolean servant) {
this.servant = servant;
}
public void setGuest(boolean guest) {
this.guest = guest;
}
public void setRiskmanager(boolean riskmanager) {
this.riskmanager = riskmanager;
}
public void setSitemanager(boolean sitemanager) {
this.sitemanager = sitemanager;
}
public void setDatacontent(boolean datacontent) {
this.datacontent = datacontent;
}
public boolean isSalesmanager() {
return salesmanager;
}
public boolean isOrgmanager() {
return orgmanager;
}
public boolean isDatacontent() {
return datacontent;
}
public void setOrgmanager(boolean orgmanager) {
this.orgmanager = orgmanager;
}
public JSONObject initObject(JSONObject mod) {
mod.put("name", getName());
mod.put("remark", getRemark());
int role = 0;
if (admin) {
role |= ManagerRole.ADMIN.getMask();
}
if (operator) {
role |= ManagerRole.OPERATOR.getMask();
}
if (sitemanager) {
role |= ManagerRole.SITE_MANAGER.getMask();
}
if (bd) {
role |= ManagerRole.BD_USER.getMask();
}
if (finacial) {
role |= ManagerRole.FINANCIAL_STAFF.getMask();
}
if (servant) {
role |= ManagerRole.SERVANT.getMask();
}
if (accountmanager) {
role |= ManagerRole.ACCOUNT_MANAGER.getMask();
}
if (director) {
role |= ManagerRole.DIRECTOR.getMask();
}
if (developer) {
role |= ManagerRole.DEVELOPER.getMask();
}
if (bdleader){
role |= ManagerRole.BD_LEADER.getMask();
}
if (riskmanager){
role |= ManagerRole.RISK_MANAGER.getMask();
}
if (guest){
role |= ManagerRole.GUEST.getMask();
}
if (orgmanager){
role |= ManagerRole.ORG_MANAGER.getMask();
}
if (salesmanager) {
role |= ManagerRole.SALES_MANAGER.getMask();
}
if (datacontent) {
role |= ManagerRole.DATA_CONTENT.getMask();
}
mod.put("role", role);
return mod;
}
}

@ -68,6 +68,23 @@ public class PermissionManagerImpl implements PermissionManager {
Map<String, List<JSONObject>> moduleMap = new TreeMap<>();
List<JSONObject> noModule = new ArrayList<>();
for (JSONObject func : funcs) {
int role = func.getIntValue("role");
func.put("admin", ManagerRole.ADMIN.hasRole(role));
func.put("operator", ManagerRole.OPERATOR.hasRole(role));
func.put("bd", ManagerRole.BD_USER.hasRole(role));
func.put("finacial", ManagerRole.FINANCIAL_STAFF.hasRole(role));
func.put("servant", ManagerRole.SERVANT.hasRole(role));
// func.put("accountmanager", ManagerRole.ACCOUNT_MANAGER.hasRole(role));
func.put("director", ManagerRole.DIRECTOR.hasRole(role));
func.put("sitemanager", ManagerRole.SITE_MANAGER.hasRole(role));
func.put("developer", ManagerRole.DEVELOPER.hasRole(role));
func.put("bdleader", ManagerRole.BD_LEADER.hasRole(role));
func.put("riskmanager", ManagerRole.RISK_MANAGER.hasRole(role));
func.put("guest", ManagerRole.GUEST.hasRole(role));
// manager.put("orgmanager", ManagerRole.ORG_MANAGER.hasRole(role));
func.put("salesmanager", ManagerRole.SALES_MANAGER.hasRole(role));
// manager.put("datacontent", ManagerRole.DATA_CONTENT.hasRole(role));
String module = func.getString("module");
if (module == null) {
noModule.add(func);
@ -128,9 +145,7 @@ public class PermissionManagerImpl implements PermissionManager {
public void updateFuncInfo(String funcId, FuncInfo funcInfo) {
JSONObject update = new JSONObject();
update.put("func_id", funcId);
update.put("name", funcInfo.getName());
update.put("remark", funcInfo.getRemark());
permissionFunctionMapper.update(update);
permissionFunctionMapper.update(funcInfo.initObject(update));
}
@Override

@ -79,4 +79,8 @@ public interface OrderMapper {
List<JSONObject> listAnalysisClientCustomer(JSONObject params);
PageList<JSONObject> listTransactionsForApp(JSONObject params, PageBounds pageBounds);
JSONObject findOrderById(@Param("order_id") String orderId);
List<JSONObject> listHalloweenActOrder(JSONObject param);
}

@ -38,6 +38,8 @@ public interface ClientMapper {
PageList<JSONObject> listPartners(JSONObject params, PageBounds pagination);
PageList<JSONObject> comListPartners(JSONObject params, PageBounds pagination);
List<JSONObject> listClientsIdAndMoniker();

@ -46,6 +46,10 @@ public interface ClientRateMapper {
List<JSONObject> getAllExpiry(@Param("expiry_date")Date expiry_date);
List<JSONObject> getAllClientRateExpiryMerchants();
void postponeMerchantRateByClientId(int clientId);
JSONObject latestChannelCleanDays(@Param("rate_name")String rate_name, @Param("client_id")int client_id);
JSONObject latestExpiryConfig(@Param("client_id")int client_id,@Param("rate_name") String rate_name);

@ -28,4 +28,7 @@ public interface CustomerMapper {
@AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "wechat_openid like 'o32%'")
JSONObject findCustomerBykangaOpenid(@Param("kanga_openid") String openId);
@AutoSql(type = SqlType.SELECT)
JSONObject findCustomerBykangaId(@Param("kanga_openid") String openId);
}

@ -342,4 +342,13 @@ public interface ClientManager {
void updateAllPartnerPassword(String clientMoniker, List<String> emails);
void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject client);
/**
*
*
* @param clientId
*/
boolean postponeClientRate(int clientId, String clientMoniker,String nextYearExipryDate);
JSONObject comListPartnerSelection(JSONObject manager, PartnerQuery query);
}

@ -387,7 +387,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("contact_email", "******");
}
} else {
client.put("rate_editable", ManagerRole.ADMIN.hasRole(role) || ManagerRole.OPERATOR.hasRole(role));
client.put("rate_editable",ManagerRole.OPERATOR.hasRole(role));
}
}
List<JSONObject> children = clientMapper.listChildClients(client.getIntValue("client_id"));
@ -4029,6 +4029,50 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
});
}
@Override
@Transactional
public boolean postponeClientRate(int clientId, String clientMoniker, String nextYearExipryDate) {
try {
clientRateMapper.postponeMerchantRateByClientId(clientId);
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, clientMoniker, "tax_in_surcharge", false));
List<JSONObject> adminAccounts = clientAccountMapper.listAdminAccounts(clientId);
adminAccounts.forEach(o -> {
sendClientPostponeNotify(o, nextYearExipryDate);
});
logger.error("[{}]费率自动延期成功", clientMoniker);
return true;
} catch (Exception e) {
logger.error("[{}]费率自动延期失败", clientMoniker);
return false;
}
}
@Override
public JSONObject comListPartnerSelection(JSONObject manager, PartnerQuery query) {
JSONObject params = query.toJsonParam();
String tempSubMchId = sysConfigManager.getSysConfig().getString("temp_sub_mch_id");
String tempSubMchSource = sysConfigManager.getSysConfig().getString("temp_sub_mch_id_source");
tempSubMchSource = tempSubMchSource == null ? "" : tempSubMchSource;
if (query.isTempMchId()) {
params.put("temp_mch_id", tempSubMchId);
params.put("temp_mch_id_source", tempSubMchSource);
}
PageList<JSONObject> partners = clientMapper.comListPartners(params,
new PageBounds(query.getPage(), query.getLimit(), Order.formString("is_valid.desc,-approve_time.asc,create_time.desc")));
int authDays = PlatformEnvironment.getEnv().authDays();// 快速自助开通申请有效期
for (JSONObject partner : partners) {
String subMerchantId = partner.getString("sub_merchant_id");
if (subMerchantId != null && tempSubMchId != null && tempSubMchId.contains(subMerchantId)
&& !tempSubMchSource.contains(partner.getString("client_moniker"))) {
partner.put("temp_sub_merchant", true);
}
if (partner.getIntValue("approve_result") == 2) {
partner.put("expiry_time", DateUtils.addDays(partner.getDate("approve_time"), authDays));
partner.put("pass_timeout", DateUtils.addDays(partner.getDate("approve_time"), authDays).compareTo(new Date()) < 0);
}
}
return PageListUtils.buildPageListResult(partners);
}
private TemplateMessage initClientMessage(JSONObject client, String newExpiryDate, String wechatOpenid, String templateId) {

@ -585,4 +585,10 @@ public class PartnerManageController {
clientManager.subRpayMerchantApplication(clientMoniker, merchantInfo,manager);
}
@RequestMapping(value = "/compliance", method = RequestMethod.GET)
@RequireManager(role = { ManagerRole.OPERATOR})
public JSONObject lisPartnersByCompliance(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, PartnerQuery query) {
return clientManager.comListPartnerSelection(manager, query);
}
}

@ -38,6 +38,8 @@ public class ManagerInfo {
private boolean riskmanager;
private boolean guest;
private boolean orgmanager;
private boolean salesmanager;
private boolean datacontent;
@JSONField(name = "org_id")
private Integer orgId;
@ -105,6 +107,12 @@ public class ManagerInfo {
if (orgmanager){
role |= ManagerRole.ORG_MANAGER.getMask();
}
if (salesmanager) {
role |= ManagerRole.SALES_MANAGER.getMask();
}
if (datacontent) {
role |= ManagerRole.DATA_CONTENT.getMask();
}
account.put("role", role);
if (insert) {
account.put("username", getUsername());
@ -273,4 +281,19 @@ public class ManagerInfo {
this.orgmanager = orgmanager;
}
public boolean isDatacontent() {
return datacontent;
}
public boolean isSalesmanager() {
return salesmanager;
}
public void setDatacontent(boolean datacontent) {
this.datacontent = datacontent;
}
public void setSalesmanager(boolean salesmanager) {
this.salesmanager = salesmanager;
}
}

@ -41,9 +41,9 @@ public class QueryManagerBean {
if(role.equals("10000")){
mask = ManagerRole.SERVANT.getMask();
}
if(role.equals("100000")){
mask = ManagerRole.ACCOUNT_MANAGER.getMask();
}
// if(role.equals("100000")){
// mask = ManagerRole.ACCOUNT_MANAGER.getMask();
// }
if(role.equals("1000000")){
mask = ManagerRole.DIRECTOR.getMask();
}
@ -62,9 +62,15 @@ public class QueryManagerBean {
if(role.equals("100000000000")){
mask = ManagerRole.GUEST.getMask();
}
if(role.equals("1000000000000")){
mask = ManagerRole.ORG_MANAGER.getMask();
// if(role.equals("1000000000000")){
// mask = ManagerRole.ORG_MANAGER.getMask();
// }
if(role.equals("10000000000000")){
mask = ManagerRole.SALES_MANAGER.getMask();
}
// if(role.equals("100000000000000")){
// mask = ManagerRole.DATA_CONTENT.getMask();
// }
if(mask != 0){
params.put("mask",mask);
}

@ -11,6 +11,8 @@ public interface SignInAccountService {
JSONObject getManager(String accountId);
void clearManager(String accountId);
JSONObject getClient(String accountId);
void clearAccountCache(String accountId);

@ -6,6 +6,7 @@ import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.manage.organizations.core.OrgManager;
import au.com.royalpay.payment.manage.signin.beans.ManagerInfo;
import au.com.royalpay.payment.manage.signin.core.ManagerAccountsService;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
@ -37,6 +38,8 @@ public class ManagerAccountServiceImpl implements ManagerAccountsService {
@Resource
private OrgManager orgManager;
@Resource
private SignInAccountService signInAccountService;
@Override
public PageList<JSONObject> listManagers(JSONObject loginManager,JSONObject params) {
@ -52,14 +55,17 @@ public class ManagerAccountServiceImpl implements ManagerAccountsService {
manager.put("bd", ManagerRole.BD_USER.hasRole(role));
manager.put("finacial", ManagerRole.FINANCIAL_STAFF.hasRole(role));
manager.put("servant", ManagerRole.SERVANT.hasRole(role));
manager.put("accountmanager", ManagerRole.ACCOUNT_MANAGER.hasRole(role));
// manager.put("accountmanager", ManagerRole.ACCOUNT_MANAGER.hasRole(role));
manager.put("director", ManagerRole.DIRECTOR.hasRole(role));
manager.put("sitemanager", ManagerRole.SITE_MANAGER.hasRole(role));
manager.put("developer", ManagerRole.DEVELOPER.hasRole(role));
manager.put("bdleader", ManagerRole.BD_LEADER.hasRole(role));
manager.put("riskmanager", ManagerRole.RISK_MANAGER.hasRole(role));
manager.put("guest", ManagerRole.GUEST.hasRole(role));
manager.put("orgmanager", ManagerRole.ORG_MANAGER.hasRole(role));
// manager.put("orgmanager", ManagerRole.ORG_MANAGER.hasRole(role));
manager.put("salesmanager", ManagerRole.SALES_MANAGER.hasRole(role));
// manager.put("datacontent", ManagerRole.DATA_CONTENT.hasRole(role));
}
return managers;
}
@ -102,6 +108,7 @@ public class ManagerAccountServiceImpl implements ManagerAccountsService {
}
obj.put("manager_id", userId);
managerMapper.update(obj);
signInAccountService.clearManager(userId);
}
@Override

@ -120,11 +120,21 @@ public class SignInAccountServiceImpl implements SignInAccountService, Applicati
manager.put("module_names", modules.keySet());
if((manager.getIntValue("role")& ManagerRole.SERVANT.getMask())>0){
JSONObject cs = sysCustomerServiceMapper.findByManagerId(accountId);
manager.put("onoff",cs.getBoolean("onoff"));
if (cs != null) {
manager.put("onoff", cs.getBoolean("onoff"));
} else {
manager.put("onoff", false);
}
}
return manager;
}
@Override
@CacheEvict(value = ":login:managers:", key = "''+#accountId")
public void clearManager(String accountId) {
}
@Override
@Cacheable(value = ":login:clients:", key = "''+#accountId")
public JSONObject getClient(String accountId) {

@ -69,6 +69,23 @@ public class PostponeClientTask {
});
}
@Scheduled(cron = "0 30 6 * * ?")
private void postponeMerchantRate() {
synchronizedScheduler.executeProcess("manage_task:postponeMerchantRate", 120_000, () -> {
String nextYearExipryDate = DateFormatUtils.format(DateUtils.addYears(new Date(), 1), "yyyy-MM-dd");
List<JSONObject> expiryRateMerchants = clientRateMapper.getAllClientRateExpiryMerchants();
StringBuilder merchantStrBuilder = new StringBuilder();
expiryRateMerchants.forEach(merchant -> {
if (clientManager.postponeClientRate(merchant.getIntValue("client_id"), merchant.getString("client_moniker"),nextYearExipryDate)) {
merchantStrBuilder.append(merchant.getString("client_moniker")).append("、");
}
});
merchantStrBuilder.deleteCharAt(merchantStrBuilder.length() - 1);
sendComplianceNotify(merchantStrBuilder, nextYearExipryDate);
});
}
private void sendComplianceNotify(StringBuilder sb, String newExpireDate) {
List<String> compliance = managerMapper.listOpenIdsOfCompliances();
compliance.forEach(p -> {
@ -76,8 +93,8 @@ public class PostponeClientTask {
TemplateMessage notice = initComplianceMessage(sb.toString(), newExpireDate, p, api.getTemplateId("client-postpone"));
api.sendTemplateMessage(notice);
});
}
private TemplateMessage initComplianceMessage(String clients, String newExpiryDate, String wechatOpenid, String templateId) {
TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null);
notice.put("first", "以下商户据合同费率已经自动延期1年", "#ff0000");

@ -483,7 +483,9 @@ public class TradeLogServiceImpl implements TradeLogService {
logs.stream().forEach(p -> {
String login_id = p.getString("login_id");
if (StringUtils.isNotEmpty(login_id)) {
p.put("order_detail", (StringUtils.isEmpty(p.getString("order_detail")) ? "" : p.getString("order_detail")) + "(alipay_id:" + login_id + ")");
p.put("order_detail", (StringUtils.isEmpty(p.getString("order_detail")) ? "" : login_id+":"+p.getString("order_detail")));
}else{
p.put("order_detail", (StringUtils.isEmpty(p.getString("order_detail")) ? "" : p.getString("order_detail")));
}
});
}

@ -738,5 +738,24 @@
<if test="clearing_status!=null">and t.clearing_status=#{clearing_status}</if>
</where>
</select>
</mapper>
<select id="listHalloweenActOrder" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT
o.order_id order_id,
o.currency,
o.channel,
o.customer_id,
format(t.clearing_amount,2) clearing_amount
FROM pmt_orders o
LEFT JOIN pmt_transactions t
ON t.order_id = o.order_id
WHERE t.refund_id IS NULL
AND t.transaction_type = 'Credit'
AND t.channel != 'System'
and o.transaction_date = #{transaction_date}
and o.status = #{status}
and o.customer_id = #{customer_id}
and t.clearing_amount >= 1.99
]]>
</select>
</mapper>

@ -64,6 +64,36 @@
WHEN 2 THEN 'Preauthorised'
END) clear_status,
o.order_detail,o.display_amount,o.channel,o.currency,o.pre_authorization,
CASE o.gateway
WHEN 0
THEN 'Retail In-Store'
WHEN 1
THEN 'Retail In-Store'
WHEN 2
THEN 'QR Code'
WHEN 3
THEN 'Online API'
WHEN 4
THEN 'WeChat HTML5'
WHEN 5
THEN 'Retail API'
WHEN 6
THEN 'Retail API'
WHEN 7
THEN 'QR Code'
WHEN 8
THEN 'Mobile H5'
WHEN 9
THEN 'Third Party Gateway'
WHEN 10
THEN 'APP'
WHEN 12
THEN 'MICROAPP'
WHEN 13
THEN 'Native QR Code'
WHEN 14
THEN 'Share Link'
END AS gateway,
CASE o.channel
WHEN 'Alipay' THEN ra.login_id
WHEN 'AlipayOnline' THEN ra.login_email
@ -926,4 +956,4 @@ select sum(if(temp.transaction_type='Credit',temp.clearing_amount*d.proportion,
order by period_start
</select>
</mapper>
</mapper>

@ -101,6 +101,75 @@
<bind name="suburb_pattern" value="'%'+suburb+'%'"/>
and c.suburb like #{suburb_pattern}
</if>
<if test="state!=null">
and c.state=#{state}
</if>
<if test="merchant_id!=null">
and c.merchant_id=#{merchant_id}
</if>
<if test="temp_mch_id!=null">
and locate(c.sub_merchant_id,#{temp_mch_id})&gt;0 and cc.skip_clearing=0 and
locate(c.client_moniker,#{temp_mch_id_source})&lt;=0
</if>
<if test="greenChannelBdTodo">
and ((c.source=1 or c.source=2) and c.approve_result=2 and (c.open_status is null or c.open_status=3))
</if>
<if test="search_text!=null">
<bind name="name_pattern" value="'%'+search_text+'%'"/>
<if test="text_type=='all'">
and (c.client_moniker=#{search_text} or c.short_name like #{name_pattern} or c.company_name like
#{name_pattern} or c.business_name like #{name_pattern} or c.remark like
#{name_pattern} or c.contact_email=#{search_text})
</if>
<if test="text_type=='client_moniker'">
and c.client_moniker=#{search_text}
</if>
<if test="text_type=='client_name'">
and c.short_name like #{name_pattern}
</if>
<if test="text_type=='company_name'">
and c.company_name like #{name_pattern}
</if>
<if test="text_type=='business_name'">
and c.business_name like #{name_pattern}
</if>
<if test="text_type=='contact_email'">
and c.contact_email = #{search_text}
</if>
<if test="text_type=='remark'">
and c.remark like #{name_pattern}
</if>
</if>
<if test="org_id!=null and org_ids==null">and c.org_id=#{org_id}</if>
<if test="org_ids!=null">and c.org_id in
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach>
</if>
<if test="referrer_id!=null">and c.referrer_id=#{referrer_id}</if>
<if test="is_valid">and c.is_valid=1</if>
</where>
</select>
<select id="comListPartners" resultType="com.alibaba.fastjson.JSONObject">
SELECT DISTINCT c.*,o.name org_name
FROM sys_clients c
inner join sys_client_config cc on cc.client_id = c.client_id
inner join sys_org o
on o.org_id=c.org_id
<if test="bd_user!=null">
INNER JOIN sys_client_bd d ON c.client_id = d.client_id AND d.bd_id = #{bd_user} and
date(d.start_date)&lt;= date(now()) and (d.end_date is null or date(d.end_date)&gt;= date(now())) and
d.is_valid=1
</if>
<where>
<if test="client_moniker !=null">c.client_moniker=#{client_moniker}</if>
<if test="sub_merchant_id!=null">and c.sub_merchant_id=#{sub_merchant_id}</if>
<if test="approving">
and ((c.approve_result=4 and c.open_status is null) or (c.approve_result=3 and c.open_status is null) or
c.open_status=1 or c.open_status=2 or c.open_status=4)
@ -170,6 +239,7 @@
<if test="is_valid">and c.is_valid=1</if>
</where>
</select>
<select id="passPartners" resultType="com.alibaba.fastjson.JSONObject">
SELECT
company_name,short_name,client_moniker,ali_sub_merchant_id,alipayindustry,address,suburb,state,postcode,business_hours,company_phone,merchant_introduction,logo_url,company_photo

@ -119,6 +119,43 @@
a.expiry_time < #{expiry_date}
]]>
</select>
<select id="getAllClientRateExpiryMerchants" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT DISTINCT
c.client_moniker,
c.client_id
FROM sys_clients c
LEFT JOIN sys_client_rates r
ON r.client_id = c.client_id
WHERE c.skip_clearing = 0
AND (c.approve_result = 1
OR (c.approve_result = 2
AND (c.source = 1
OR c.source = 2)))
AND c.is_valid = 1
AND (r.expiry_time = (SELECT
MAX(expiry_time)
FROM sys_client_rates r3
WHERE r3.client_id = c.client_id
AND r3.rate_name = r.rate_name)
AND r.expiry_time <= CURRENT_DATE()
OR r.client_rate_id IS NULL
)
]]>
</select>
<insert id="postponeMerchantRateByClientId" parameterType="int">
INSERT sys_client_rates (manager_id, client_id, rate_name, rate_value, transaction_fee, active_time, expiry_time, create_time, update_time, manager_name, clean_days, remark)
SELECT CONCAT('System-', CURRENT_DATE()),r.client_id,r.rate_name,r.rate_value,r.transaction_fee,DATE_ADD(r.expiry_time, INTERVAL 1 day),DATE_ADD(r.expiry_time, INTERVAL 1 year),NOW(), NOW(),
CONCAT('System-', CURRENT_DATE()),r.clean_days,'费率自动延期一年'
FROM sys_clients c
LEFT JOIN sys_client_rates r ON r.client_id = c.client_id
WHERE c.client_id = #{clientId} AND c.skip_clearing = 0 AND (c.approve_result = 1 OR (c.approve_result = 2 AND (c.source = 1 OR c.source = 2)))
AND c.is_valid = 1 AND (r.expiry_time = (SELECT MAX(expiry_time)FROM sys_client_rates r3
WHERE r3.client_id = c.client_id
AND r3.rate_name = r.rate_name)
AND CURRENT_DATE() >= r.expiry_time
OR r.client_rate_id IS NULL)
</insert>
<select id="latestConfig" resultType="com.alibaba.fastjson.JSONObject">
SELECT * FROM
sys_client_rates

@ -142,7 +142,7 @@
dataType: 'text',
success: function () {
var from = getUrlParam("f");
location.href = from ? decodeURIComponent(from) : 'manage.html'
location.href = from ? decodeURIComponent(from) : 'managev2.html'
},
error: function (jqXHR) {
alert(JSON.parse(jqXHR.responseText).message);
@ -185,7 +185,7 @@
url: '/global/userstatus/manager_signin_wechat_qrcode/' + codeId + '/check',
method: 'get',
success: function () {
location.href = '/manage.html'
location.href = '/managev2.html'
},
error: function () {
setTimeout(function () {

@ -70,6 +70,38 @@
.dh {
animation: myfirst 1s linear 0s infinite alternate;
}
.navbar-header a{
color: #FFF;
}
.navbar-header .active{
background-color: #FFF !important;
}
.navbar-header .active a{
color: #f06101 !important;
}
.navbar-header li {
float: left;
border: 1px solid #FFF;
padding: 3px 15px;
}
@media (min-width: 768px) {
.navbar-header {
list-style: none;
width: 245px;
/*position: absolute;*/
left: 0;
right: 0;
margin: 10px;
}
}
@media (max-width: 768px) {
.navbar-header {
list-style: none;
width: 245px;
margin: 10px;
}
}
</style>
<script type="text/javascript" src="static/lib/require.js" data-main="static/boot/manager-boot"></script>
<script type="text/javascript" src="/static/lib/jquery/jquery-2.1.4.min.js"></script>
@ -89,12 +121,12 @@ margin-bottom: 10%;"/>
ng-class="currentUser.org?(currentUser.org.banner_class||'fxplus'):'royalpay'">
<header class="main-header">
<!-- Logo -->
<!--Logo-->
<a href="#" class="logo logo-yedian shine" ng-if="!currentUser.org">
<!-- mini logo for sidebar mini 50x50 pixels -->
<!--mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><img src="static/images/r_white_logo.svg"
style="max-height: 35px;margin-left: 15%;"></span>
<!-- logo for regular state and mobile devices -->
<!--logo for regular state and mobile devices -->
<span class="logo-lg"><img src="static/images/rp_white_logo.svg"
style="max-height: 35px;">
<!--<b>RoyalPay</b>-->
@ -109,16 +141,27 @@ margin-bottom: 10%;"/>
style="max-height: 35px;margin-bottom: 8px;margin-right: 5px;"><b
ng-bind="currentUser.org.name"></b></span>
</a>
<!-- Header Navbar: style can be found in header.less -->
<!--Header Navbar: style can be found in header.less -->
<!--顶部导航栏-->
<nav class="navbar navbar-static-top navbar-static-top-yedian" role="navigation">
<!-- Sidebar toggle button-->
<!--Sidebar toggle button-->
<a class="sidebar-toggle sidebar-tooggle-yedian" data-toggle="offcanvas" role="button"
ng-click="toggleHideSideBar()">
<span class="sr-only">Toggle navigation</span>
</a>
<select class="navbar-header" style="height: 30px;border: 0;text-align: center;text-align-last:center;" ng-model="roleNow" ng-change="changeRole(roleNow)">
<option ng-repeat="x in role" value="{{x.value}}">{{x.module}}</option>
</select>
<div class="navbar-custom-menu">
<ul class="navbar-header" style="position: relative;left: 10%">
<li ui-sref-active="active" style="border-bottom-left-radius: 5px;border-top-left-radius: 5px;background-color: #FFF; ">
<a href="/manage.html" role="button" style="color:#f06101 !important;">v1</a>
</li>
<li ui-sref-active="active" style="border-bottom-right-radius: 5px;border-top-right-radius: 5px;">
<a href="/managev2.html" role="button">v2</a>
</li>
</ul>
<ul class="nav navbar-nav">
<li class="user-menu" ng-if="currentUser.onoff">
<a role="button" ng-click="customerService()">
@ -137,9 +180,11 @@ margin-bottom: 10%;"/>
<span class="label label-warning" ng-if="notifyCounts">{{notifyCounts}}</span>
</a>
<ul class="dropdown-menu">
<!--<li class="header">System notifications,please resolve it!</li>-->
<!--
<li class="header">System notifications,please resolve it!</li>
-->
<li>
<!-- inner menu: contains the actual data -->
<!--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>
<a ng-if="partner_application_new" ui-sref="partner_apply">
@ -158,7 +203,9 @@ margin-bottom: 10%;"/>
</ul>
</li>
<!-- User Account: style can be found in dropdown.less -->
<!--
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.org.logo||'static/images/r_white_logo.svg'}}"
@ -167,7 +214,7 @@ margin-bottom: 10%;"/>
<span class="hidden-xs" ng-bind="currentUser.display_name"></span>
</a>
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
<!-- User image -->
<!--User image-->
<li class="user-header user-header-yedian">
<img ng-src="{{currentUser.org.logo||'static/images/r_white_logo.svg'}}" class="img-circle"
alt="User Image">
@ -185,11 +232,11 @@ margin-bottom: 10%;"/>
ng-class="{'text-orange':!('1000'|withRole),'text-gray':('1000'|withRole)}"></i>
<i class="fa fa-tty" title="Service"
ng-class="{'text-orange':!('10000'|withRole),'text-gray':('10000'|withRole)}"></i>
<i class="fa fa-university" title="Account Manager"
ng-class="{'text-orange':!('100000'|withRole),'text-gray':('100000'|withRole)}"></i>
<!--<i class="fa fa-university" title="Account Manager"-->
<!--ng-class="{'text-orange':!('100000'|withRole),'text-gray':('100000'|withRole)}"></i>-->
<i class="fa fa-line-chart" title="Director"
ng-class="{'text-orange':!('1000000'|withRole),'text-gray':('1000000'|withRole)}"></i>
<i class="fa fa-map-o" title="Site Manager"
<i class="fa fa-map-o" title="Markting"
ng-class="{'text-orange':!('10000000'|withRole),'text-gray':('10000000'|withRole)}"></i>
<i class="fa fa-code" title="Developer"
ng-class="{'text-orange':!('100000000'|withRole),'text-gray':('100000000'|withRole)}"></i>
@ -197,12 +244,19 @@ margin-bottom: 10%;"/>
ng-class="{'text-orange':!('10000000000'|withRole),'text-gray':('10000000000'|withRole)}"></i>
<i class="fa fa-tripadvisor" title="GUEST"
ng-class="{'text-orange':!('100000000000'|withRole),'text-gray':('100000000000'|withRole)}"></i>
<i class="fa fa-user-plus" title="Org Manager"
ng-class="{'text-orange':!('1000000000000'|withRole),'text-gray':('1000000000000'|withRole)}"></i>
</small>
</p>
</li>
<!-- Menu Footer-->
<!--<i class="fa fa-user-plus" title="Org Manager"-->
<!--ng-class="{'text-orange':!('1000000000000'|withRole),'text-gray':('1000000000000'|withRole)}"></i>-->
<i class="fa fa-ticket" title="Sales Manager"
ng-class="{'text-orange':!('10000000000000'|withRole),'text-gray':('1000000000000'|withRole)}"></i>
<!--<i class="fa fa-save" title="Data content"-->
<!--ng-class="{'text-orange':!('100000000000000'|withRole),'text-gray':('1000000000000'|withRole)}"></i>-->
</small>
</p>
</li>
<!--
Menu Footer
-->
<li class="user-footer">
<div class="pull-left">
<a href class="btn btn-default btn-flat" ng-click="changePwd()">Change Password</a>
@ -213,7 +267,7 @@ margin-bottom: 10%;"/>
</li>
</ul>
</li>
<!-- Control Sidebar Toggle Button -->
<!--Control Sidebar Toggle Button -->
</ul>
</div>
</nav>
@ -222,79 +276,336 @@ margin-bottom: 10%;"/>
<!-- Left side column. contains the logo and sidebar -->
<!--左边栏-->
<aside class="main-sidebar" style="height: 100%;max-height: 100%;overflow: auto;padding-bottom: 50px;">
<!-- sidebar: style can be found in sidebar.less -->
<!--sidebar: style can be found in sidebar.less -->
<section class="sidebar">
<ul class="sidebar-menu">
<ul class="sidebar-menu" data-widget="tree">
<li ui-sref-active="active" ng-if="'dashboard'|withModule">
<li ui-sref-active="active" ng-if="roleNow!=null && 'dashboard'|withModule">
<a ui-sref="dashboard">
<i class="fa fa-dashboard"></i>
<span>控制台|Dashboard</span>
</a>
</li>
<li class="header nav-header" ng-if="'1011110'|withRole">支付结算|Payment</li>
<li ui-sref-active="active" ng-if="'partners'|withModule">
<a ui-sref="partners" ui-sref-opts="{reload:true}">
<i class="fa fa-sitemap"></i> <span>商户管理|Partner Manage</span>
</a>
</li>
<li ui-sref-active="active"
ng-if="('partnerapply'|withModule) && (currentUser.org_id==null||currentUser.org_id==1)">
<a ui-sref="partner_apply" ui-sref-opts="{reload:true}">
<i class="fa fa-envelope-o"></i> <span>自主申请|Partner Applies</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'tradelog'|withModule">
<a ui-sref="trade" ui-sref-opts="{reload:true}">
<i class="fa fa-list-alt"></i> <span>交易流水|Trades Logs</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'ordervalid'|withModule">
<a ui-sref="order_valid">
<i class="fa fa-balance-scale"></i> <span>交易对账|Order Validation</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'clearing'|withModule">
<a ui-sref="clearingLogs" ui-sref-opts="{reload:true}">
<i class="fa fa-line-chart"></i> <span>清算统计|Settlement Logs</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('clearing_org'|withModule) && currentUser.org_id>1">
<a ui-sref="clearingLogsForOrg" ui-sref-opts="{reload:true}">
<i class="fa fa-line-chart"></i> <span>清算记录|Settlement Logs</span>
</a>
<li class="menu-group" ng-if="roleNow!=null && roleNow!='administrator' && roleNow!='developer' && roleNow!='sitemanager'">
<p role="button" ng-class="{'active': Partner,'is-hide':hideSideBar}" ng-click="Partner = !Partner">
<span>商户管理|Merchant</span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active':Partner}">
<li ui-sref-active="active" ng-if="'partners'|withModule">
<a ui-sref="partners" ui-sref-opts="{reload:true}">
<i class="fa fa-sitemap"></i> <span>商户名录|Partner Directories</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'110'|withRole">
<a ui-sref="newPartners" ui-sref-opts="{reload:true}">
<i class="fa fa-plus"></i> <span>商户进件|New Partner</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'partner_analysis'|withModule">
<a ui-sref="partners_analysis" ui-sref-opts="{reload:true}">
<i class="fa fa-list-alt"></i> <span>商户统计|Merchants Data</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'clientrate'|withModule">
<a ui-sref="analysis_monitoring.client_rates" ui-sref-opts="{reload:true}">
<i class="fa fa-shopping-cart"></i> <span>商户活跃度</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('merchantAmount'|withModule)">
<a ui-sref="merchantAmountAnalysis" ui-sref-opts="{reload:true}">
<i class="fa fa-area-chart"></i> <span>商户交易额统计</span>
</a>
</li>
</ul>
</li>
<li class="menu-group" ng-if="roleNow!=null && roleNow!='administrator' && roleNow!='developer' && roleNow!='sitemanager'">
<p role="button" ng-class="{'active': Transaction,'is-hide':hideSideBar}" ng-click="Transaction = !Transaction">
<span>交易管理|Transaction</span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active':Transaction}">
<li ui-sref-active="active" ng-if="'tradelog'|withModule">
<a ui-sref="trade" ui-sref-opts="{reload:true}">
<i class="fa fa-list-alt"></i> <span>交易流水|Trades Logs</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('transAnalysis'|withModule)">
<a ui-sref="analysis_transanalysis" ui-sref-opts="{reload:true}">
<i class="fa fa-area-chart"></i> <span>交易数据|Transaction Data</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('dashboard'|withModule)">
<a ui-sref="analysis_gateway" ui-sref-opts="{reload:true}">
<i class="fa fa-area-chart"></i> <span>Gateway统计</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('refundAnalysisApp'|withModule)">
<a ui-sref="analysis_refundAnalysis" ui-sref-opts="{reload:true}">
<i class="fa fa-area-chart"></i> <span>退款统计|Refund Analysis</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('channels_Analysis'|withModule)">
<a ui-sref="analysis_channelsAnalysis" ui-sref-opts="{reload:true}">
<i class="fa fa-area-chart"></i> <span>支付通道|Channels Analysis</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('dashboard'|withModule)&&(currentUser.org_id==null)">
<a ui-sref="analysis_amountlsAnalysis" ui-sref-opts="{reload:true}">
<i class="fa fa-area-chart"></i> <span>交易金额分析</span>
</a>
</li>
</ul>
</li>
<li class="menu-group" ng-if="roleNow=='riskmanager'">
<p role="button" ng-class="{'active': Risk,'is-hide':hideSideBar}" ng-click="Risk = !Risk">
<span>风控管理|Risk</span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active':Risk}">
<li ui-sref-active="active">
<a ui-sref="analysis_monitoring.monitor" ui-sref-opts="{reload:true}">
<i class="fa fa-tv"></i> <span>交易成功率监控</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="analysis_monitoring.cheat" ui-sref-opts="{reload:true}">
<i class="fa fa-bell"></i> <span>风控点预警统计</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="analysis_monitoring.cheat_monitor" ui-sref-opts="{reload:true}">
<i class="fa fa-building"></i> <span>风控点配置|Cheat Monitor</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="analysis_monitoring.risk_manager" ui-sref-opts="{reload:true}">
<i class="fa fa-list-alt"></i> <span>风控记录|Risk Records</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="analysis_monitoring.attention" ui-sref-opts="{reload:true}">
<i class="fa fa-exclamation-triangle"></i> <span>黑名单|Risky Merchants</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="customerRankingAnalysis" ui-sref-opts="{reload:true}">
<i class="fa fa fa-male"></i> <span>消费排名|Risky Merchants</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'customer_analysis'|withModule">
<a ui-sref="customersAnalysisManage" ui-sref-opts="{reload:true}">
<i class="fa fa-bar-chart"></i> <span>消费者统计|Customer Analysis</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('10000000000'|withRole)">
<a ui-sref="refundReview" ui-sref-opts="{reload:true}">
<i class="fa fa-wrench"></i> <span>退款审核|Audit Refund</span>
</a>
</li>
</ul>
</li>
<li class="menu-group" ng-if="roleNow=='compliance'">
<p role="button" ng-class="{'active': Compliance,'is-hide':hideSideBar}" ng-click="Compliance = !Compliance">
<span>合规管理|Compliance</span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active':Compliance}">
<li ui-sref-active="active">
<a ui-sref="businessCompliance" ui-sref-opts="{reload:true}">
<i class="fa fa fa-eye"></i> <span>商户合规</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="contract">
<i class="fa fa-money"></i> <span>合同签约情况</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="rate_warnings">
<i class="fa fa-bell"></i> <span>签约到期预警</span>
</a>
</li>
<li ui-sref-active="active"
ng-if="('partnerapply'|withModule) && (currentUser.org_id==null||currentUser.org_id==1)">
<a ui-sref="partner_apply" ui-sref-opts="{reload:true}">
<i class="fa fa-envelope-o"></i> <span>自主申请|Partner Applies</span>
</a>
</li>
<li ui-sref-active="active"
ng-if="('partnerapply'|withModule) && (currentUser.org_id==null||currentUser.org_id==1)">
<a ui-sref="config_operation" ui-sref-opts="{reload:true}">
<i class="fa fa-edit"></i> <span>商户信息修改日志</span>
</a>
</li>
<li ui-sref-active="active"
ng-if="(currentUser.org_id==null||currentUser.org_id==1)">
<a ui-sref="devtools.aliforexcel" ui-sref-opts="{reload:true}">
<i class="fa fa-envelope"></i> <span>Alipay进件表格导出</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="manual_settle" ui-sref-opts="{reload:true}">
<i class="fa fa-balance-scale"></i> <span>商户手动清算</span>
</a>
</li>
</ul>
</li>
<li class="menu-group" ng-if="roleNow=='accountant' || roleNow=='director' || ('1000000000'|withRole)">
<p role="button" ng-class="{'active': Settlement,'is-hide':hideSideBar}" ng-click="Settlement = !Settlement">
<span>清算管理|Settlement</span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active':Settlement}">
<li ui-sref-active="active" ng-if="'ordervalid'|withModule">
<a ui-sref="order_valid">
<i class="fa fa-balance-scale"></i> <span>交易对账|Order Validation</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('clearing'|withModule) && (roleNow!='director')">
<a ui-sref="date_setting">
<i class="fa fa-balance-scale"></i> <span>清算日管理</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'clearing'|withModule">
<a ui-sref="clearingLogs" ui-sref-opts="{reload:true}">
<i class="fa fa-line-chart"></i> <span>清算统计|Settlement Logs</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('estimateAnalysisApp'|withModule)&&((currentUser.org_id==null)||((currentUser.org_id==1)&&('1000000000'|withRole)))">
<a ui-sref="estimateAnalysis" ui-sref-opts="{reload:true}">
<i class="fa fa fa-money"></i> <span>清算预估|Estimate</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'settleReport'|withModule">
<a ui-sref="analysis_report.settle_report" ui-sref-opts="{reload:true}">
<i class="fa fa fa-tv"></i> <span>清算月报</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('platformRevenue'|withModule) && (roleNow!='director')">
<a ui-sref="analysis_report.platformsettle" ui-sref-opts="{reload:true}">
<i class="fa fa fa-money"></i> <span>清算验证|Validation</span>
</a>
</li>
</ul>
</li>
<li class="menu-group" ng-if="roleNow=='accountant' || roleNow=='director'">
<p role="button" ng-class="{'active': Financial,'is-hide':hideSideBar}" ng-click="Financial = !Financial">
<span>财务管理|Financial </span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active':Financial}">
<li ui-sref-active="active" ng-if="'austrac'|withModule">
<a ui-sref="transreport" ui-sref-opts="{reload:true}">
<i class="fa fa-file-excel-o"></i> <span>Austrac Report</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'invoice'|withModule">
<a ui-sref="invoice" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>Partner Invoice</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'platformRevenue'|withModule">
<a ui-sref="analysis_report.platformrevenue" ui-sref-opts="{reload:true}">
<i class="fa fa-money"></i> <span>平台收支统计|Platform Revenue</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'wxSettlementsApp'|withModule">
<a ui-sref="analysis_report.wx_settlements" ui-sref-opts="{reload:true}">
<i class="fa fa-money"></i> <span>腾讯打款记录|Tencent Settlement</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('bdprize'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)">
<a ui-sref="analysis_bd.bd_prizes" ui-sref-opts="{reload:true}">
<i class="fa fa-usd"></i> <span>BD提成|BD Commissions</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="analysis_org.commission" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>合伙人提成</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('cashbackAnalysis'|withModule)">
<a ui-sref="cashbackAnalysis">
<i class="fa fa-gift"></i> <span>商户营销账户</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('contract'|withModule)">
<a ui-sref="manual_settle" ui-sref-opts="{reload:true}">
<i class="fa fa-balance-scale"></i> <span>商户手动清算</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('preRefund'|withModule)">
<a ui-sref="analysis_monitoring.pre_refund" ui-sref-opts="{reload:true}">
<i class="fa fa-tv"></i> <span>商户欠款|Pre Refund</span>
</a>
</li>
</ul>
</li>
<li class="menu-group" ng-if="roleNow=='sitemanager'">
<p role="button" ng-class="{'active': Promotion,'is-hide':hideSideBar}" ng-click="Promotion = !Promotion">
<span>营销活动管理|Promotion</span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active':Promotion}">
<li ui-sref-active="active" ng-if="'appAct'|withModule">
<a ui-sref="appAct">
<i class="fa fa-file-text-o"></i> <span>APP弹屏管理</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('encourage'|withModule)">
<a ui-sref="encourageAct">
<i class="fa fa-gift"></i> <span>鼓励金</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'settleDelay'|withModule">
<a ui-sref="settle_delay" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>周末费率减半活动</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'monDelay'|withModule">
<a ui-sref="mon_delay" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>余额增值活动</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'actChairty'|withModule">
<a ui-sref="act_chairty" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>半边天公益活动</span>
</a>
</li>
</ul>
</li>
<li ui-sref-active="active" ng-if="'austrac'|withModule">
<a ui-sref="transreport" ui-sref-opts="{reload:true}">
<i class="fa fa-file-excel-o"></i> <span>Austrac Report</span>
</a>
</li>
<!-- <li ui-sref-active="active" ng-if="'citypartner'|withModule">
<a ui-sref="citypartner_reg" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>City Partners</span>
</a>
</li>-->
<li ui-sref-active="active" ng-if="'1000'|withRole">
<a ui-sref="invoice" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>Partner Invoice</span>
</a>
</li>
<li class="header nav-header"
ng-if="('1011110'|withRole) || currentUser.org_id==null">营销服务|Promotion
</li>
<li ui-sref-active="active" ng-if="'appAct'|withModule">
<a ui-sref="appAct">
<i class="fa fa-file-text-o"></i> <span>活动管理|Activity Manage</span>
</a>
</li>
<!--
<li ui-sref-active="active" ng-if="('activities'|withModule) && (currentUser.org_id==1 || currentUser.org_id==null)">
<a ui-sref="activity.detail({act_id:'3'})" ui-sref-opts="{reload:true}">
@ -306,158 +617,224 @@ margin-bottom: 10%;"/>
<i class="fa fa-compass"></i> <span>店长行动参与情况</span>
</a>
</li>-->
<!--<li ui-sref-active="active" ng-if="('act_redpack'|withModule) && (currentUser.org_id==1 || currentUser.org_id==null)">-->
<!--<a ui-sref="act_partners" ui-sref-opts="{reload:true}">-->
<!--<i class="fa fa-compass"></i> <span>新费率签约情况</span>-->
<!--</a>-->
<!--</li>-->
<li ui-sref-active="active" ng-if="('encourage'|withModule)">
<a ui-sref="encourageAct">
<i class="fa fa-gift"></i> <span>鼓励金</span>
</a>
</li>
<!--<li ui-sref-active="active" ng-if="('act_customer_redpack'|withModule)">
<a ui-sref="customer_redpack">
<i class="fa fa-gift"></i> <span>红包返现</span>
</a>
</li>-->
<li ui-sref-active="active" ng-if="('cashbackAnalysis'|withModule)">
<a ui-sref="cashbackAnalysis">
<i class="fa fa-gift"></i> <span>商户营销账户</span>
</a>
</li>
<!-- <li ui-sref-active="active" ng-if="('funds'|withModule)">
<a ui-sref="funds">
<i class="fa fa-money"></i> <span>增值计划</span>
</a>
</li>-->
<li ui-sref-active="active" ng-if="'settleDelay'|withModule">
<a ui-sref="settle_delay" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>周末费率减半活动</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'monDelay'|withModule">
<a ui-sref="mon_delay" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>余额增值活动</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('1'|withRole)">
<a ui-sref="contract">
<i class="fa fa-money"></i> <span>合同签约情况</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'actChairty'|withModule">
<a ui-sref="act_chairty" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>半边天公益活动</span>
</a>
</li>
<li class="header nav-header" ng-if="('1000000000000'|withRole)">机构|Agent</li>
<li ui-sref-active="active" ng-if="('1000000000000'|withRole)">
<a ui-sref="analysis_agent" ui-sref-opts="{reload:true}">
<i class="fa fa-hand-peace-o"></i> <span>机构数据分析|Agent Analysis</span>
</a>
</li>
<li class="header nav-header" ng-if="('1011110'|withRole)|| currentUser.org_id==null">数据分析|Analysis</li>
<li ui-sref-active="active" ng-if="('transAnalysis'|withModule)||('dashboard'|withModule)||
('customer_analysis'|withModule)||
('customerRankingAnalysisApp'|withModule)||
('partner_analysis'|withModule)">
<a ui-sref="analysis_transaction" ui-sref-opts="{reload:true}">
<i class="fa fa-area-chart"></i> <span>交易|Transaction Analysis</span>
</a>
</li>
<li ui-sref-active="active"
ng-if="('bdsale'|withModule)||('bdprize'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)">
<a ui-sref="analysis_bd" ui-sref-opts="{reload:true}">
<i class="fa fa-hand-peace-o"></i> <span>BD|BD Analysis</span>
</a>
</li>
<li ui-sref-active="active"
ng-if="('org_sale'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1 ||('1000000000000'|withRole))||('orgcommission'|withModule)">
<a ui-sref="analysis_org" ui-sref-opts="{reload:true}">
<i class="fa fa-hand-peace-o"></i> <span>合伙人|Partners Analysis</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('clientrate'|withModule)||('monitor'|withModule)">
<a ui-sref="analysis_monitoring" ui-sref-opts="{reload:true}">
<i class="fa fa-shopping-cart"></i> <span>监控|Monitoring</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('settleReport'|withModule)||('platformRevenue'|withModule)">
<a ui-sref="analysis_report" ui-sref-opts="{reload:true}">
<i class="fa fa-tv"></i> <span>报表|Report</span>
</a>
</li>
<li class="header nav-header" ng-if="'0100001'|withRole">基础设置|Basic Settings</li>
<li ui-sref-active="active" ng-if="('10'|withRole)&&('merchantIdManage'|withModule)">
<a ui-sref="merchant_id_manage" ui-sref-opts="{reload:true}">
<i class="fa fa-sitemap"></i> <span>商户号管理</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'org'|withModule">
<a ui-sref="organizations" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>组织管理|Organizations</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'manager_accounts'|withModule">
<a ui-sref="managers" ui-sref-opts="{reload:true}">
<i class="fa fa-key"></i> <span>账号管理|Accounts</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'dev'|withModule">
<a ui-sref="devtools">
<i class="fa fa-cog"></i> <span>开发工具|DevTools</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'notice'|withModule">
<a ui-sref="notice">
<i class="fa fa-bell"></i> <span>通知群发|Notifications</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'log'|withModule">
<a ui-sref="logview">
<i class="fa fa-file-text-o"></i> <span>系统日志|System Logs</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'cms'|withModule">
<a ui-sref="cms">
<i class="fa fa-file-text-o"></i> <span>网站管理|Site Manage</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('10'|withRole)||('1000000'|withRole)||('10000000'|withRole)">
<a href="https://customer.royalpay.com.au/manage/sign_in" target="_blank">
<i class="fa fa-file-text-o"></i> <span>积分商城|Integral Mall</span>
</a>
</li>
<li ui-sref-active="active"
ng-if="('device'|withModule) && (currentUser.org_id==null||currentUser.org_id==1)">
<a ui-sref="device" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>设备管理|Devices</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'sysconfig'|withModule">
<a ui-sref="sysconfig">
<i class="fa fa-cog"></i> <span>系统参数设定|Settings</span>
</a>
<!--<li class="header nav-header" ng-if="('1000000000000'|withRole)">机构|Agent</li>-->
<!--<li ui-sref-active="active" ng-if="('1000000000000'|withRole)">-->
<!--<a ui-sref="analysis_agent" ui-sref-opts="{reload:true}">-->
<!--<i class="fa fa-hand-peace-o"></i> <span>机构数据分析|Agent Analysis</span>-->
<!--</a>-->
<!--</li>-->
<!--<li ui-sref-active="active" ng-if="('clearing_org'|withModule) && currentUser.org_id>1">-->
<!--<a ui-sref="clearingLogsForOrg" ui-sref-opts="{reload:true}">-->
<!--<i class="fa fa-line-chart"></i> <span>清算记录|Settlement Logs</span>-->
<!--</a>-->
<!--</li>-->
<li class="menu-group" ng-if="roleNow=='sitemanager'">
<p role="button" ng-class="{'active': Content,'is-hide':hideSideBar}" ng-click="Content = !Content">
<span>内容管理|Content</span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active':Content}">
<li ui-sref-active="active" ng-if="'notice'|withModule">
<a ui-sref="notice">
<i class="fa fa-bell"></i> <span>通知群发|Notifications</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'cms'|withModule">
<a ui-sref="cms">
<i class="fa fa-file-text-o"></i> <span>网站管理|Site Manage</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('10000000'|withRole)">
<a href="https://customer.royalpay.com.au/manage/sign_in" target="_blank">
<i class="fa fa-file-text-o"></i> <span>积分商城|Integral Mall</span>
</a>
</li>
</ul>
</li>
<li class="menu-group" ng-if="roleNow=='administrator'">
<p role="button" ng-class="{'active': Organization,'is-hide':hideSideBar}" ng-click="Organization = !Organization">
<span>组织架构|Organization</span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active': Organization}">
<li ui-sref-active="active" ng-if="'org'|withModule">
<a ui-sref="organizations" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>组织管理|Organizations</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'manager_accounts'|withModule">
<a ui-sref="product" ui-sref-opts="{reload:true}">
<i class="fa fa-shopping-cart"></i> <span>商品库管理</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'manager_accounts'|withModule">
<a ui-sref="managers" ui-sref-opts="{reload:true}">
<i class="fa fa-key"></i> <span>账号管理|Accounts</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'manager_accounts'|withModule">
<a ui-sref="servantsConfig" ui-sref-opts="{reload:true}">
<i class="fa fa-tty"></i> <span>客服管理|Service Accounts</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'sysconfig'|withModule">
<a ui-sref="permission" ui-sref-opts="{reload:true}">
<i class="fa fa-key"></i> <span>角色权限管理</span>
</a>
</li>
</ul>
</li>
<li class="menu-group" ng-if="roleNow=='bduser' || roleNow=='salesmanager' || roleNow=='director'">
<p role="button" ng-class="{'active': Performance,'is-hide':hideSideBar}" ng-click="Performance = !Performance">
<span>绩效管理|Performance</span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active':Performance}">
<li ui-sref-active="active" ng-if="'bdsale'|withModule">
<a ui-sref="analysis_bd.bdanalysis" ui-sref-opts="{reload:true}">
<i class="fa fa-hand-peace-o"></i> <span>BD销售量|BD Sale</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('bdprize'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)">
<a ui-sref="analysis_bd.bd_prizes" ui-sref-opts="{reload:true}">
<i class="fa fa-usd"></i> <span>BD提成|BD Commissions</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'10000000001000'|withRole">
<a ng-click="editRateConfig()" style="cursor: pointer">
<i class="fa fa-cog"></i> <span>BD绩效设置</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'10000000001000'|withRole">
<a ng-click="editBDLevels()" style="cursor: pointer">
<i class="fa fa-user"></i> <span>BD级别设置</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'clientrate'|withModule">
<a ui-sref="analysis_monitoring.client_rates" ui-sref-opts="{reload:true}">
<i class="fa fa-shopping-cart"></i> <span>商户活跃度</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('cashbackAnalysis'|withModule)">
<a ui-sref="cashbackAnalysis">
<i class="fa fa-gift"></i> <span>商户营销账户</span>
</a>
</li>
</ul>
</li>
<li class="menu-group" ng-if="(roleNow=='salesmanager') || (roleNow=='director')">
<p role="button" ng-class="{'active': cityPartner,'is-hide':hideSideBar}" ng-click="cityPartner = !cityPartner">
<span>合伙人管理|Partner</span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active':cityPartner}">
<li ui-sref-active="active"
ng-if="'citypartner'|withModule">
<a ui-sref="citypartner_reg" ui-sref-opts="{reload:true}">
<i class="fa fa-tv"></i> <span>合伙人申请</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'org'|withModule">
<a ui-sref="organizations" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>合伙人管理</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('org_sale'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1 ||('10000000000000'|withRole))">
<a ui-sref="analysis_org.organlasis" ui-sref-opts="{reload:true}">
<i class="fa fa-hand-peace-o"></i> <span>合伙人销售量|City Partner Sale</span>
</a>
</li>
<li ui-sref-active="active" ng-if="('orgcommission'|withModule)">
<a ui-sref="analysis_org.commission" ui-sref-opts="{reload:true}">
<i class="fa fa-hand-peace-o"></i> <span>合伙人提成</span>
</a>
</li>
</ul>
</li>
<li class="menu-group" ng-if="roleNow=='administrator'">
<p role="button" ng-class="{'active': Settings,'is-hide':hideSideBar}" ng-click="Settings = !Settings">
<span>配置管理|Basic Settings</span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active':Settings}">
<li ui-sref-active="active" ng-if="('merchantIdManage'|withModule)">
<a ui-sref="merchant_id_manage" ui-sref-opts="{reload:true}">
<i class="fa fa-sitemap"></i> <span>商户号管理</span>
</a>
</li>
<li ui-sref-active="active"
ng-if="('device'|withModule) && (currentUser.org_id==null||currentUser.org_id==1)">
<a ui-sref="device" ui-sref-opts="{reload:true}">
<i class="fa fa-users"></i> <span>设备管理|Devices</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'sysconfig'|withModule">
<a ui-sref="sysconfig">
<i class="fa fa-cog"></i> <span>系统参数设定|Settings</span>
</a>
</li>
</ul>
</li>
<li class="menu-group" ng-if="roleNow=='developer'">
<p role="button" ng-class="{'active': Developer,'is-hide':hideSideBar}" ng-click="Developer = !Developer">
<span>开发工具|Developer</span>
<span class="pull-right-container">
<i class="fa fa-angle-down pull-right"></i>
</span>
</p>
<ul class="sidebar-menu" ng-class="{'active':Developer}">
<li ui-sref-active="active" ng-if="('log'|withModule) || ('dev'|withModule)">
<a ui-sref="login_history">
<i class="fa fa-users"></i> <span>登录日志|Sign In History</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'log'|withModule">
<a ui-sref="logview">
<i class="fa fa-file-text-o"></i> <span>系统日志|System Logs</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'dev'|withModule">
<a ui-sref="devtools">
<i class="fa fa-cog"></i> <span>开发工具|DevTools</span>
</a>
</li>
<li ui-sref-active="active" ng-if="'log'|withModule">
<a ui-sref="logview.notify_logs" ui-sref-opts="{reload:true}">
<i class="fa fa-server"></i> <span>支付回调消息|Notify History</span>
</a>
</li>
</ul>
</li>
</ul>
@ -481,6 +858,7 @@ margin-bottom: 10%;"/>
</footer>
</div>
<script type="text/javascript" src="static/lib/dist/js/adminlte.min.js"></script>
<!-- ./wrapper -->
</body>
</html>

@ -0,0 +1,281 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<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">
<meta name="format-detection" content="telephone=no">
<meta charset="UTF-8">
<title>RoyalPay</title>
<!-- 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">
<!-- 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">
footer {
font-family: PingFang-SC-Regular;
font-size: 12px;
color: #FFFFFF;
letter-spacing: 0px;
padding-bottom: 2.3%;
}
.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 {
animation: myfirst 1s linear 0s infinite alternate;
}
.description-text {
margin-top: 5px;
/*width: 86px;*/
}
.navbar-header a{
color: #FFF;
}
.navbar-header .active{
background-color: #FFF !important;
}
.navbar-header .active a{
color: #f06101 !important;
}
.navbar-header li {
float: left;
border: 1px solid #FFF;
padding: 3px 15px;
}
@media (min-width: 768px) {
.navbar-header {
list-style: none;
width: 245px;
position: absolute;
left: 0;
right: 0;
margin: 10px auto;
}
}
@media (max-width: 768px) {
.navbar-header {
list-style: none;
width: 245px;
margin: 10px auto;
}
}
</style>
<script type="text/javascript" src="static/lib/require.js" data-main="static/boot/manager-bootv2"></script>
<script type="text/javascript" src="/static/lib/jquery/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="/static/lib/bootstrap/js/bootstrap.min.js"></script>
</head>
<body ng-controller="managerIndexCtrl" class="skin-blue sidebar-mini"
ng-class="{'sidebar-collapse':hideSideBar,'sidebar-open':hideSideBar}">
<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">To Be The Best QRCode Payment Service Provider!</p>
</div>
</div>
<div ng-if="currentUser!=null" ng-cloak
ng-class="currentUser.org?(currentUser.org.banner_class||'fxplus'):'royalpay'">
<header ng-if="headerDisplay" class="main-header">
<nav style="margin-left: 0px" class="navbar navbar-static-top navbar-static-top-yedian" role="navigation">
<!-- Logo -->
<a ui-sref="home" ng-click="headerCopyDisplay()" class="logo logo-yedian shine" ng-if="!currentUser.org">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"></span>
<!-- logo for regular state and mobile devices -->
<b>RoyalPay</b>
<b>|</b>
<b>{{roleNow}}</b>
</span>
</a>
<a ui-sref="home" ng-click="headerCopyDisplay()" class="logo logo-yedian shine" ng-if="currentUser.org">
<!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"></span>
<!-- logo for regular state and mobile devices -->
<span class="logo-lg"><b
ng-bind="currentUser.org.name"></b><b>|</b>
<b>{{roleNow}}</b></span>
</a>
<select class="navbar-header" style="position: relative;height: 30px;border: 0;text-align: center;text-align-last:center;" ng-model="roleName" ng-change="changeRole(roleName)">
<option ng-repeat="x in rolelist" value="{{x.value}}">{{x.module}}</option>
</select>
<ul class="navbar-header">
<li ui-sref-active="active" style="border-bottom-left-radius: 5px;border-top-left-radius: 5px;">
<a ui-sref="dashboard" role="button">Dashboard</a>
</li>
<li ui-sref-active="active" style="border-bottom-right-radius: 5px;border-top-right-radius: 5px;">
<a ui-sref="listMenu" role="button">Main Menu</a>
</li>
</ul>
<!--<div class="navbar-header">-->
<!--<a ui-sref="dashboard" role="button"-->
<!--style="border: 1px solid #FFF; color: #FFF;padding: 3px">Dashboard</a>-->
<!--<a ui-sref="listMenu({role:''})" ui-sref-opts="{reload:true}" role="button"-->
<!--style="border: 1px solid #FFF; color: #FFF;padding: 3px">Main Menu</a>-->
<!--</div>-->
<!-- Header Navbar: style can be found in header.less -->
<!--顶部导航栏-->
<div class="navbar-custom-menu">
<ul class="navbar-header" style="position: relative;left: 10%">
<li ui-sref-active="active" style="border-bottom-left-radius: 5px;border-top-left-radius: 5px;">
<a href="/manage.html" role="button">v1</a>
</li>
<li ui-sref-active="active" style="border-bottom-right-radius: 5px;border-top-right-radius: 5px;background-color: #FFF">
<a style="color: #f06101 !important;">v2</a>
</li>
</ul>
<ul class="nav navbar-nav">
<li class="user-menu" ng-if="currentUser.onoff">
<a role="button" ng-click="customerService()">
<i class="fa fa-wechat"></i> contact service
</a>
</li>
<li class="user-menu">
<a role="button" ng-click="managerBindWechat(true)">
<i class="fa fa-wechat"></i> Bind WeChat
</a>
</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.org.logo||'static/images/r_white_logo.svg'}}"
class="user-image user-img-yedian"
alt="User Image">
<span class="hidden-xs" ng-bind="currentUser.display_name"></span>
</a>
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
<!-- User image -->
<li class="user-header user-header-yedian">
<img ng-src="{{currentUser.org.logo||'static/images/r_white_logo.svg'}}"
class="img-circle"
alt="User Image">
<p>
{{currentUser.display_name}}
<small>
<i class="fa fa-user-secret" title="Administrator"
ng-class="{'text-orange':!('1'|withRole),'text-gray':('1'|withRole)}"></i>
<i class="fa fa-eye" title="Compliance"
ng-class="{'text-orange':!('10'|withRole),'text-gray':('10'|withRole)}"></i>
<i class="fa fa-crosshairs" title="BD User"
ng-class="{'text-orange':!('100'|withRole),'text-gray':('100'|withRole)}"></i>
<i class="fa fa-balance-scale" title="Accountant"
ng-class="{'text-orange':!('1000'|withRole),'text-gray':('1000'|withRole)}"></i>
<i class="fa fa-tty" title="Service"
ng-class="{'text-orange':!('10000'|withRole),'text-gray':('10000'|withRole)}"></i>
<!--<i class="fa fa-university" title="Account Manager"-->
<!--ng-class="{'text-orange':!('100000'|withRole),'text-gray':('100000'|withRole)}"></i>-->
<i class="fa fa-line-chart" title="Director"
ng-class="{'text-orange':!('1000000'|withRole),'text-gray':('1000000'|withRole)}"></i>
<i class="fa fa-map-o" title="Markting"
ng-class="{'text-orange':!('10000000'|withRole),'text-gray':('10000000'|withRole)}"></i>
<i class="fa fa-code" title="Developer"
ng-class="{'text-orange':!('100000000'|withRole),'text-gray':('100000000'|withRole)}"></i>
<i class="fa fa-user" title="Risk Manager"
ng-class="{'text-orange':!('10000000000'|withRole),'text-gray':('10000000000'|withRole)}"></i>
<i class="fa fa-tripadvisor" title="GUEST"
ng-class="{'text-orange':!('100000000000'|withRole),'text-gray':('100000000000'|withRole)}"></i>
<!--<i class="fa fa-user-plus" title="Org Manager"-->
<!--ng-class="{'text-orange':!('1000000000000'|withRole),'text-gray':('1000000000000'|withRole)}"></i>-->
<i class="fa fa-ticket" title="Sales Manager"
ng-class="{'text-orange':!('10000000000000'|withRole),'text-gray':('1000000000000'|withRole)}"></i>
<!--<i class="fa fa-save" title="Data content"-->
<!--ng-class="{'text-orange':!('100000000000000'|withRole),'text-gray':('1000000000000'|withRole)}"></i>-->
</small>
</p>
</li>
<!-- Menu Footer-->
<li class="user-footer">
<div class="pull-left">
<a href class="btn btn-default btn-flat" ng-click="changePwd()">Change 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>
</header>
<div class="content-wrapper" style="margin-left: 0;min-height: 890px" ui-view autoscroll="false" >
</div>
<footer ng-if="copyright" class="main-footer" style="margin-left: 0px">
<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.
</footer>
</div>
</body>
</html>

@ -2,9 +2,7 @@
<section class="content-header">
<h1>APP_ACTIVITY</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-sitemap">活动管理</i>
</li>
<li><i class="fa fa-dollar"></i>Promotion</li>
<li class="active">APP_ACTIVITY</li>
</ol>
</section>

@ -2,7 +2,7 @@
<h4>半边天公益活动</h4>
<ol class="breadcrumb">
<li>
<i class="fa fa-users"></i> Activity
<i class="fa fa-users"></i> Promotion
</li>
<li class="active">
Act Chairty

@ -2,7 +2,7 @@
<section class="content-header">
<h1>Encourage Money</h1>
<ol class="breadcrumb">
<li><i class="fa fa-gift"></i> Activities</li>
<li><i class="fa fa-gift"></i> Promotion</li>
<li class="active">Encourage Money</li>
</ol>
</section>

@ -1,15 +1,15 @@
<div class="content">
<div class="row">
<div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills">
<li ui-sref-active-eq="active" ng-if="'bdsale'|withModule">
<a ui-sref="analysis_bd.bdanalysis"><i class="fa fa-hand-peace-o"></i>BD销售量|BD Sale</a>
</li>
<li ui-sref-active-eq="active"
ng-if="('bdprize'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)">
<a ui-sref="analysis_bd.bd_prizes"><i class="fa fa-usd"></i></i>BD提成|BD Commissions</a>
</li>
</ul>
<!--<ul class="nav nav-pills">-->
<!--<li ui-sref-active-eq="active" ng-if="'bdsale'|withModule">-->
<!--<a ui-sref="analysis_bd.bdanalysis"><i class="fa fa-hand-peace-o"></i>BD销售量|BD Sale</a>-->
<!--</li>-->
<!--<li ui-sref-active-eq="active"-->
<!--ng-if="('bdprize'|withModule)&&(currentUser.org_id==null||currentUser.org_id==1)">-->
<!--<a ui-sref="analysis_bd.bd_prizes"><i class="fa fa-usd"></i></i>BD提成|BD Commissions</a>-->
<!--</li>-->
<!--</ul>-->
</div>
</div>
<div class="row">

@ -6,7 +6,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
var app = angular.module('channelsAnalysisApp', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch']);
var colors = ['#00c0ef', '#00a65a', '#ff851b', '#f39c12', '#d81b60', '#605ca8', '#dd4b39', '#008080', '#8B008B', '#D2691E', '#708090'];
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('analysis_transaction.channelsAnalysis', {
$stateProvider.state('analysis_channelsAnalysis', {
url: '/channelsAnalysis',
templateUrl: '/static/analysis/templates/channels_analysis.html',
controller: 'channelsCtrl'

@ -20,19 +20,17 @@ define(['angular', 'decimal', 'uiBootstrap', 'uiRouter', 'angularEcharts'], func
controller: ['$state', function ($state) {
$state.go('^')
}]
}).state('clearingLogs.date_setting', {
}).state('date_setting', {
url: '/date_setting',
template: '<div></div>',
onEnter: ['$uibModal', function ($uibModal) {
templateUrl: '/static/analysis/templates/settle_date_config.html',
/* onEnter: ['$uibModal', function ($uibModal) {
$uibModal.open({
templateUrl: '/static/analysis/templates/settle_date_config.html',
controller: 'settleDateConfigCtrl',
size: 'lg'
})
}],
controller: ['$state', function ($state) {
$state.go('^')
}]
}],*/
controller: 'settleDateConfigCtrl',
}).state('clearingLogs.settlementDetail', {
url: '/settles/{date}',
templateUrl: '/static/analysis/templates/settlement_detail.html',

@ -5,8 +5,8 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
'use strict';
var app = angular.module('customerRankingAnalysisApp', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('analysis_transaction.customerRankingAnalysis', {
url: '/customers',
$stateProvider.state('customerRankingAnalysis', {
url: '/analysis/transaction/customers',
templateUrl: '/static/analysis/templates/customer_analysis.html',
controller: 'customersListCtrl',
data: {label: 'Customers'}

@ -3,7 +3,7 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
var colors = ['#00c0ef', '#00a65a', '#ff851b', '#f39c12', '#d81b60', '#605ca8', '#dd4b39', '#008080', '#8B008B', '#D2691E', '#708090'];
var app = angular.module('customersAnalysisManage', ['ui.bootstrap', 'ui.router', 'ngEcharts']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('analysis_transaction.customers_analysis_manage', {
$stateProvider.state('customersAnalysisManage', {
url: '/analysis/customers',
templateUrl: '/static/analysis/templates/manage_customers_orders.html',
controller: 'customersAnalysisCtrl'

@ -3,8 +3,8 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
'use strict';
var app = angular.module('merchantAmount', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('analysis_transaction.merchantAmountAnalysis', {
url: '/amount',
$stateProvider.state('merchantAmountAnalysis', {
url: '/analysis/transaction/amount',
templateUrl: '/static/analysis/templates/merchant_amount_analysis.html',
controller: 'clientAmountListCtrl'
})

@ -2,7 +2,7 @@
<h4>余额增值活动</h4>
<ol class="breadcrumb">
<li>
<i class="fa fa-users"></i> Payment
<i class="fa fa-users"></i> Promotion
</li>
<li class="active">
MonDelay

@ -1,10 +1,10 @@
<!--<section class="content-header">-->
<!--<h1>交易监控</h1>-->
<!--<ol class="breadcrumb">-->
<!--<li><i class="fa fa-tv"></i> 数据分析</li>-->
<!--<li class="active">交易监控</li>-->
<!--</ol>-->
<!--</section>-->
<section class="content-header">
<h1>Trade Monitor</h1>
<ol class="breadcrumb">
<li><i class="fa fa-tv"></i> Risk Management</li>
<li class="active">Trade Monitor</li>
</ol>
</section>
<section class="content">
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">

@ -1,5 +1,6 @@
<div class="content">
<div class="row">
<!--
<div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills">
<li ui-sref-active-eq="active" ng-if="'clientrate'|withModule">
@ -19,12 +20,13 @@
<li ui-sref-active-eq="active" ng-if="('monitor'|withModule)&&(currentUser.org_id==null)">
<a ui-sref="analysis_monitoring.pre_refund"><i class="fa fa-tv"></i> <span>欠款|Pre Refund</span></a>
</li>
<li ui-sref-active-eq="active" ng-if="('RiskManagement'|withModule)&&(currentUser.org_id==null)">
<li ui-sref-active-eq="active" ng-if="('riskManagement'|withModule)&&(currentUser.org_id==null)">
<a ui-sref="analysis_monitoring.risk_manager"><i class="fa fa-tv"></i> <span>风控记录|Risk Records</span></a>
</li>
</ul>
</div>
-->
</div>
<div class="row">
<div class="col-sm-12">

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

@ -3,8 +3,8 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
var colors = ['#00c0ef', '#00a65a', '#ff851b', '#f39c12', '#d81b60', '#605ca8', '#dd4b39', '#008080', '#8B008B', '#D2691E', '#708090'];
var app = angular.module('partnersAnalysis', ['ui.bootstrap', 'ui.router', 'ngEcharts']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('analysis_transaction.partners_analysis', {
url: '/analysis/partners',
$stateProvider.state('partners_analysis', {
url: '/analysis/transaction/analysis/partners',
templateUrl: '/static/analysis/templates/partners_analysis.html',
controller: 'partnersAnalysisCtrl'
})
@ -404,7 +404,23 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
}
]
};
$scope.analysisClients = function () {
$http.get('/sys/partners/analysis').then(function (resp) {
$scope.analysis = resp.data;
})
};
if ($scope.currentUser.org_id == 1 || $scope.currentUser.org_id == null) {
$scope.analysisClients();
}
$scope.mapFrame = 'all_locations.html';
$scope.loadLocations = function () {
var params = angular.copy($scope.params);
$http.get('/sys/partners/merchant/list_locations', {params: params}).then(function (resp) {
$scope.locations = resp.data;
window.merchant_maps.initMap($scope.locations);
});
};
$scope.loadLocations();
}]);

@ -3,7 +3,7 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
var app = angular.module('refundAnalysisApp', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch']);
var colors = ['#00c0ef', '#00a65a', '#ff851b', '#f39c12', '#d81b60', '#605ca8', '#dd4b39', '#008080', '#8B008B', '#D2691E', '#708090'];
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('analysis_transaction.refundAnalysis', {
$stateProvider.state('analysis_refundAnalysis', {
url: '/refunds',
templateUrl: '/static/analysis/templates/refund_analysis.html',
controller: 'refundListCtrl'

@ -1,20 +1,20 @@
<div class="content">
<div class="row">
<div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills">
<li ui-sref-active-eq="active" ng-if="'settleReport'|withModule">
<a ui-sref="analysis_report.settle_report"><i class="fa fa-tv"></i>清算月报|Settlement Month Report</a>
</li>
<li ui-sref-active-eq="active" ng-if="'platformRevenue'|withModule">
<a ui-sref="analysis_report.platformrevenue"><i class="fa fa-money"></i>平台收支统计|Platform Revenue</a>
</li>
<li ui-sref-active-eq="active" ng-if="'wxSettlementsApp'|withModule">
<a ui-sref="analysis_report.wx_settlements"><i class="fa fa-money"></i>腾讯打款记录|Tencent Settlement</a>
</li>
<li ui-sref-active-eq="active" ng-if="'platformRevenue'|withModule">
<a ui-sref="analysis_report.platformsettle"><i class="fa fa-money"></i>清算验证|Settlement Validation</a>
</li>
</ul>
<!--<ul class="nav nav-pills">-->
<!--<li ui-sref-active-eq="active" ng-if="'settleReport'|withModule">-->
<!--<a ui-sref="analysis_report.settle_report"><i class="fa fa-tv"></i>清算月报|Settlement Month Report</a>-->
<!--</li>-->
<!--<li ui-sref-active-eq="active" ng-if="'platformRevenue'|withModule">-->
<!--<a ui-sref="analysis_report.platformrevenue"><i class="fa fa-money"></i>平台收支统计|Platform Revenue</a>-->
<!--</li>-->
<!--<li ui-sref-active-eq="active" ng-if="'wxSettlementsApp'|withModule">-->
<!--<a ui-sref="analysis_report.wx_settlements"><i class="fa fa-money"></i>腾讯打款记录|Tencent Settlement</a>-->
<!--</li>-->
<!--<li ui-sref-active-eq="active" ng-if="'platformRevenue'|withModule">-->
<!--<a ui-sref="analysis_report.platformsettle"><i class="fa fa-money"></i>清算验证|Settlement Validation</a>-->
<!--</li>-->
<!--</ul>-->
</div>
</div>
<div class="row">

@ -6,8 +6,8 @@ define(['angular', 'static/commons/commons', 'static/commons/angular-ueditor', '
var app = angular.module('estimateAnalysisApp', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch']);
var colors = ['#00c0ef', '#00a65a', '#ff851b', '#f39c12', '#d81b60', '#605ca8', '#dd4b39', '#008080', '#8B008B', '#D2691E', '#708090'];
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('analysis_transaction.estimateAnalysis', {
url: '/estimate',
$stateProvider.state('estimateAnalysis', {
url: '/analysis/transaction/estimate',
templateUrl: '/static/analysis/templates/settle_estimate_analysis.html',
controller: 'estimateCtrl'
})

@ -7,15 +7,15 @@
text-align: center;
}
</style>
<!--<section class="content-header">
<section class="content-header">
<h1>BD Sale</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Analysis
<i class="fa fa-list-alt"></i> Performance
</li>
<li class="active">BD Sales</li>
</ol>
</section>-->
</section>
<div class="content">
<div class="row">
<div class="col-sm-12">

@ -7,6 +7,15 @@
text-align: center;
}
</style>
<!--<section class="content-header">
<h1>Channels Analysis</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Analysis
</li>
<li class="active">Channels</li>
</ol>
</section>-->
<section class="content">
<div class="row">
<div class="col-sm-12">

@ -142,6 +142,13 @@
</div>
</div>
</section>-->
<section class="content-header">
<h1>Risk Records</h1>
<ol class="breadcrumb">
<li><i class="fa fa-tv"></i> Risk Management</li>
<li class="active">Risk Records</li>
</ol>
</section>
<section class="content">
<div class="box">
<div class="box-body">

@ -1,12 +1,10 @@
<!--<section class="content-header">-->
<!--<h1>商户活跃度统计</h1>-->
<!--<ol class="breadcrumb">-->
<!--<li>-->
<!--<i class="fa fa-shopping-cart"></i> Analysis-->
<!--</li>-->
<!--<li class="active">商户活跃度统计</li>-->
<!--</ol>-->
<!--</section>-->
<section class="content-header">
<h1>Risk Monitor</h1>
<ol class="breadcrumb">
<li><i class="fa fa-tv"></i> Risk Management</li>
<li class="active">Risk Monitor</li>
</ol>
</section>
<section class="content">
<div class="panel panel-success">
<div class="panel-body">

@ -12,13 +12,13 @@
<h1>Settlement logs</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Analysis
<i class="fa fa-list-alt"></i> Settlement
</li>
<li class="active">Settlement logs</li>
</ol>
</section>
<div class="content">
<div class="row margin-bottom">
<!--<div class="row margin-bottom">
<div class="col-sm-12">
<button class="btn btn-danger" type="button" ui-sref=".rate_warnings">
<i class="fa fa-bell"></i> Rate Expire Warnings
@ -27,7 +27,7 @@
<i class="fa fa-cog"></i> Settlement Date Config
</button>
</div>
</div>
</div>-->
<div class="box box-warning">
<div class="box-header">Settlement Dates</div>
<div class="box-body">

@ -1,17 +1,17 @@
<!--<section class="content-header">-->
<!--<h1>商户活跃度统计</h1>-->
<!--<ol class="breadcrumb">-->
<!--<li>-->
<!--<i class="fa fa-shopping-cart"></i> Analysis-->
<!--</li>-->
<!--<li class="active">商户活跃度统计</li>-->
<!--</ol>-->
<!--</section>-->
<section class="content-header">
<h1>Partner Active Rate</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-sitemap"></i> Partner Manage
</li>
<li class="active">Partner Active Rate</li>
</ol>
</section>
<section class="content">
<div class="panel panel-success">
<div class="panel-body">
<div class="form-inline">
<div class="btn-group" ng-if="!('analysis_monitoring.client_rates'|isState) && (!('100'|withRole) || ('1000000000000'|withRole))">
<div class="btn-group" ng-if="!('client_rates'|isState) && (!('100'|withRole) || ('1000000000000'|withRole))">
<a class="btn btn-default" ui-sref="analysis_monitoring.client_rates"><i class="fa fa-chevron-left"></i></a>
</div>
<div class="input-group" ng-if="('analysis_monitoring.client_rates'|isState) && !currentUser.org_id">

@ -1,12 +1,12 @@
<!--<section class="content-header">
<section class="content-header">
<h1>Customer Transaction Analysis</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-sitemap"></i> Analysis
<i class="fa fa-sitemap"></i> Risk Management
</li>
<li class="active">Customer</li>
<li class="active">Customer Transaction</li>
</ol>
</section>-->
</section>
<div class="content">
<div class="row">

@ -7,15 +7,15 @@
text-align: center;
}
</style>
<!--<section class="content-header">
<section class="content-header">
<h1>Customers Analysis</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Analysis
<i class="fa fa-sitemap"></i> Risk Management
</li>
<li class="active">Customers</li>
</ol>
</section>-->
</section>
<div class="content">
<div class="row">
<div class="col-sm-12">

@ -42,6 +42,15 @@
}
</style>
<section class="content-header">
<h1>Transaction Amount Analysis</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Partner Manage
</li>
<li class="active">Transaction Amount Analysis</li>
</ol>
</section>
<div class="content">
<div class="row">
<div class="col-sm-12">

@ -7,15 +7,15 @@
text-align: center;
}
</style>
<!--<section class="content-header">-->
<!--<h1>-->
<!--City Partner Sale-->
<!--</h1>-->
<!--<ol class="breadcrumb">-->
<!--<li class="active"><i class="fa fa-dashboard"></i> Analysis</li>-->
<!--<li class="active">City Partner Sale</li>-->
<!--</ol>-->
<!--</section>-->
<section class="content-header">
<h1>
City Partner Sale
</h1>
<ol class="breadcrumb">
<li class="active"><i class="fa fa-dashboard"></i> Analysis</li>
<li class="active">City Partner Sale</li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-sm-12">

@ -7,185 +7,228 @@
text-align: center;
}
</style>
<!--<section class="content-header">-->
<!--<h1>Partners Analysis</h1>-->
<!--<ol class="breadcrumb">-->
<!--<li>-->
<!--<i class="fa fa-list-alt"></i> Analysis-->
<!--</li>-->
<!--<li class="active">Partners</li>-->
<!--</ol>-->
<!--</section>-->
<div class="content">
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning" ng-if="'1000000000'|withRole">
<div class="box-header">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<!--<div class="form-group">-->
<!--<label class="control-label col-xs-4 col-sm-2" for="only-mine-search">-->
<!--My Group</label>-->
<!--<div class="col-xs-8 col-sm-4">-->
<!--<div class="checkbox-inline" style="bottom: 5px">-->
<!--<input type="checkbox" id="only-mine-search"-->
<!--ng-model="params.onlyGroup" ng-click="loadPartnersInTypes();doAnalysis()">-->
<div ui-view>
<section class="content-header">
<h1>Merchant statistics</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-sitemap"></i> Partner Manage
</li>
<li class="active">Merchant statistics</li>
</ol>
</section>
<div class="content">
<div class="row" ng-if="currentUser.org_id==1 || currentUser.org_id==null">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-aqua"><i class="ion ion-ios-people"></i></span>
<div class="info-box-content">
<span class="info-box-text">Waiting Compliance</span>
<a role="button"><span class="info-box-number">{{analysis.wp}}</span></a>
<small>其中自助开通:{{analysis.a_wp}}</small>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-green"><i class="ion ion-ios-people"></i></span>
<div class="info-box-content">
<span class="info-box-text">Pass</span>
<span class="info-box-number">{{analysis.pass}}</span>
<small>其中自助开通:{{analysis.z_pass+analysis.a_pass}}</small>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-red"><i class="ion ion-ios-people"></i></span>
<div class="info-box-content">
<span class="info-box-text">Temp SubMerchantID</span>
<a role="button"><span class="info-box-number" ng-bind="analysis.temp_submchid||0"></span></a>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="info-box">
<span class="info-box-icon bg-yellow"><i class="ion ion-ios-people"></i></span>
<div class="info-box-content">
<span class="info-box-text">自助开通</span>
<a role="button"><span class="info-box-number">{{analysis.quick_pass}}</span></a>
<small>waiting compliance:{{analysis.a_wp}}</small>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="box-solid">
<div class="box box-warning" ng-if="'1000000000'|withRole">
<div class="box-header">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<!--<div class="form-group">-->
<!--<label class="control-label col-xs-4 col-sm-2" for="only-mine-search">-->
<!--My Group</label>-->
<!--<div class="col-xs-8 col-sm-4">-->
<!--<div class="checkbox-inline" style="bottom: 5px">-->
<!--<input type="checkbox" id="only-mine-search"-->
<!--ng-model="params.onlyGroup" ng-click="loadPartnersInTypes();doAnalysis()">-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="form-group col-xs-12" ng-if="('1000000000'|withRole)">
<label class="control-label col-xs-4 col-sm-2"> My Group</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<input type="checkbox" id="only-mine-search"
ng-model="params.onlyGroup" ng-click="chooseBD('all')">
<span ng-if="params.onlyGroup">
|&nbsp;
<a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseBD('all')">All</a>
<label ng-repeat="sub in bd_group_bds">
|&nbsp;<a role="button"
ng-class="{'bg-primary':sub.manager_id==chooseBDId}"
ng-click="chooseBD(sub.manager_id)">{{sub.bd_name}}</a>&nbsp;
</label></span>
</p>
<div class="form-group col-xs-12" ng-if="('1000000000'|withRole)">
<label class="control-label col-xs-4 col-sm-2"> My Group</label>
<div class="col-sm-10 col-xs-8">
<p class="form-control-static">
<input type="checkbox" id="only-mine-search"
ng-model="params.onlyGroup" ng-click="chooseBD('all')">
<span ng-if="params.onlyGroup">
|&nbsp;
<a role="button" ng-class="{'bg-primary':isAll}"
ng-click="chooseBD('all')">All</a>
<label ng-repeat="sub in bd_group_bds">
|&nbsp;<a role="button"
ng-class="{'bg-primary':sub.manager_id==chooseBDId}"
ng-click="chooseBD(sub.manager_id)">{{sub.bd_name}}</a>&nbsp;
</label></span>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header pull-right">
<div class="btn-group" role="group">
<button type="button" class="btn btn-info" ng-click="display=false" ng-class="{'active':!display}">行业</button>
<button type="button" class="btn btn-info" ng-click="display=true" ng-class="{'active':display}">清算周期</button>
<div class="box box-warning">
<div class="box-header pull-right">
<div class="btn-group" role="group">
<button type="button" class="btn btn-info" ng-click="display=false" ng-class="{'active':!display}">行业</button>
<button type="button" class="btn btn-info" ng-click="display=true" ng-class="{'active':display}">清算周期</button>
</div>
</div>
</div>
<div class="box-body" ng-if="!display">
<div class="col-sm-12">
<div class="col-sm-6 col-xs-12">
<p class="text-center">各类型商家数量分布</p>
<div class="chart" style="height: 400px" echarts="partners_type_chart"
chart-setter="partner_type_chart($chart)"
ng-class="{nodata:partners_type_chart.nodata}"></div>
<div class="box-body" ng-if="!display">
<div class="col-sm-12">
<div class="col-sm-6 col-xs-12">
<p class="text-center">各类型商家数量分布</p>
<div class="chart" style="height: 400px" echarts="partners_type_chart"
chart-setter="partner_type_chart($chart)"
ng-class="{nodata:partners_type_chart.nodata}"></div>
</div>
<div class="col-sm-6 col-xs-12">
<p class="text-center">{{partners_type.partner_type}} 行业列表</p>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Type</th>
<th>Partners</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="partner in children">
<td ng-bind="partner.children_partner_type"></td>
<td ng-bind="partner.partner_counts"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-sm-6 col-xs-12">
<p class="text-center">{{partners_type.partner_type}} 行业列表</p>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Type</th>
<th>Partners</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="partner in children">
<td ng-bind="partner.children_partner_type"></td>
<td ng-bind="partner.partner_counts"></td>
</tr>
</tbody>
</table>
<div class="col-sm-12 col-xs-12" >
<label style="display: inline" ng-repeat="type in PartnerTypes | orderBy:'count_value':true">
<span ng-bind="type.partner_type" class="text-primary"></span>:
<span ng-bind="type.count_value" class="text-primary"></span> |
</label>
</div>
</div>
<div class="col-sm-12 col-xs-12" >
<label style="display: inline" ng-repeat="type in PartnerTypes | orderBy:'count_value':true">
<span ng-bind="type.partner_type" class="text-primary"></span>:
<span ng-bind="type.count_value" class="text-primary"></span> |
</label>
</div>
</div>
<div class="box-body" ng-if="display">
<div class="col-sm-12">
<div class="col-sm-6 col-xs-12">
<p class="text-center">商户清算周期分布</p>
<div class="chart" style="height: 300px" echarts="partners_settlement_chart"
chart-setter="partner_type_chart($chart)"
ng-class="{nodata:partners_settlement_chart.nodata}"></div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="text-center">
<p class="btn-group text-center" role="group">
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseAll()">All</button>
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseThirtyDays();">recent 30 days</button>
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseLastMonth();">Last Month</button>
</p>
<p></p>
<p>清算周期列表</p>
<div class="box-body" ng-if="display">
<div class="col-sm-12">
<div class="col-sm-6 col-xs-12">
<p class="text-center">商户清算周期分布</p>
<div class="chart" style="height: 300px" echarts="partners_settlement_chart"
chart-setter="partner_type_chart($chart)"
ng-class="{nodata:partners_settlement_chart.nodata}"></div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="text-center">
<p class="btn-group text-center" role="group">
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseAll()">All</button>
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseThirtyDays();">recent 30 days</button>
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseLastMonth();">Last Month</button>
</p>
<p></p>
<p>清算周期列表</p>
</div>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Clean Days</th>
<th>Partners</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="cycle in settlementCycle">
<td ng-bind="cycle.clean_days"></td>
<td ng-bind="cycle.client_count"></td>
</tr>
</tbody>
</table>
</div>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Clean Days</th>
<th>Partners</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="cycle in settlementCycle">
<td ng-bind="cycle.clean_days"></td>
<td ng-bind="cycle.client_count"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<div class="form-group col-xs-12 col-sm-12">
<label class="control-label col-xs-4 col-sm-2">Date Range</label>
<div class="col-sm-10">
<div class="form-control-static form-inline">
<div style="display: inline-block">
<input class="form-control" id="date-from-input"
ng-model="params.begin"
uib-datepicker-popup size="10" placeholder="From"
is-open="dateBegin.open" ng-click="dateBegin.open=true"
datepicker-options="{maxDate:params.end||today}">
</div>
~
<div style="display: inline-block">
<input class="form-control" id="date-to-input" ng-model="params.end"
uib-datepicker-popup size="10" placeholder="To"
is-open="dateTo.open" ng-click="dateTo.open=true"
datepicker-options="{minDate:params.begin,maxDate:today}">
</div>
<div class="box box-warning">
<div class="box-header">
<div class="row">
<div class="col-sm-12">
<div class="form-horizontal">
<div class="form-group col-xs-12 col-sm-12">
<label class="control-label col-xs-4 col-sm-2">Date Range</label>
<div class="col-sm-10">
<div class="form-control-static form-inline">
<div style="display: inline-block">
<input class="form-control" id="date-from-input"
ng-model="params.begin"
uib-datepicker-popup size="10" placeholder="From"
is-open="dateBegin.open" ng-click="dateBegin.open=true"
datepicker-options="{maxDate:params.end||today}">
</div>
~
<div style="display: inline-block">
<input class="form-control" id="date-to-input" ng-model="params.end"
uib-datepicker-popup size="10" placeholder="To"
is-open="dateTo.open" ng-click="dateTo.open=true"
datepicker-options="{minDate:params.begin,maxDate:today}">
</div>
<!--<div class="btn-group">-->
<!--<a role="button" class="btn btn-default btn-sm"-->
<!--ng-click="chooseToday()">Today</a>-->
<!--</div>-->
<!--<div class="btn-group">-->
<!--<a role="button" class="btn btn-default btn-sm"-->
<!--ng-click="chooseYesterday()">Yesterday</a>-->
<!--</div>-->
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseLast7Days()">Last 7 Days</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="thisMonth()">This Month</a>
<!--<div class="btn-group">-->
<!--<a role="button" class="btn btn-default btn-sm"-->
<!--ng-click="chooseToday()">Today</a>-->
<!--</div>-->
<!--<div class="btn-group">-->
<!--<a role="button" class="btn btn-default btn-sm"-->
<!--ng-click="chooseYesterday()">Yesterday</a>-->
<!--</div>-->
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="chooseLast7Days()">Last 7 Days</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="thisMonth()">This Month</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="lastMonth()">Last Month</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="thisYear()">This Year</a>
</div>
<button class="btn btn-success" type="button"
ng-click="doAnalysis()">
<i class="fa fa-search"></i>
</button>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="lastMonth()">Last Month</a>
</div>
<div class="btn-group">
<a role="button" class="btn btn-default btn-sm"
ng-click="thisYear()">This Year</a>
</div>
<button class="btn btn-success" type="button"
ng-click="doAnalysis()">
<i class="fa fa-search"></i>
</button>
</div>
</div>
</div>
@ -193,20 +236,31 @@
</div>
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header with-border">新增商户数量变化</div>
<div class="box-body">
<div class="chart" echarts="newPartnersHistory" style="height: 300px"
ng-class="{nodata:newPartnersHistory.nodata}"></div>
<div class="box box-warning">
<div class="box-header with-border">新增商户数量变化</div>
<div class="box-body">
<div class="chart" echarts="newPartnersHistory" style="height: 300px"
ng-class="{nodata:newPartnersHistory.nodata}"></div>
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header with-border">交易商户数量变化</div>
<div class="box-body">
<div class="chart" echarts="tradePartnersHistory" style="height: 300px"
ng-class="{nodata:tradePartnersHistory.nodata}"></div>
<div class="box box-warning">
<div class="box-header with-border">交易商户数量变化</div>
<div class="box-body">
<div class="chart" echarts="tradePartnersHistory" style="height: 300px"
ng-class="{nodata:tradePartnersHistory.nodata}"></div>
</div>
</div>
<div class="box box-warning">
<div class="box-header with-border">商户分布
<span style="float: right;font-size: 14px;">商户数量:{{locations.length}}</span>
</div>
<div class="box-body">
<div class="embed-responsive" style="height: 300px;">
<iframe class="embed-responsive-item" id="merchant_maps" name="merchant_maps" src="{{mapFrame}}"></iframe>
</div>
</div>
</div>
</div>
</div>

@ -1,12 +1,12 @@
<!--<section class="content-header">-->
<!--<h1>商户活跃度统计</h1>-->
<!--<ol class="breadcrumb">-->
<!--<li>-->
<!--<i class="fa fa-shopping-cart"></i> Analysis-->
<!--</li>-->
<!--<li class="active">商户活跃度统计</li>-->
<!--</ol>-->
<!--</section>-->
<section class="content-header">
<h1>Pre Refund</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Transaction
</li>
<li class="active">Pre Refund</li>
</ol>
</section>
<section class="content">
<div class="row">
<div class="box">

@ -7,6 +7,15 @@
text-align: center;
}
</style>
<!--<section class="content-header">
<h1>Refund Analysis</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Analysis
</li>
<li class="active">Refund</li>
</ol>
</section>-->
<div class="content">
<div class="content">
<div class="box-solid">

@ -1,17 +1,27 @@
<div class="modal-header"><h4>Clearing Plans</h4></div>
<div class="modal-body">
<div class="row">
<div class="col-xs-12">
<div royal-calendar month-change="loadMonthPlan($month)">
<div class="rc-full" style="font-size: 40px" ng-click="triggerDate(day)">
<i class="fa fa-check-circle text-green" ng-if="isDateOn(day)"></i>
<section class="content-header">
<h1>Clearing Plans</h1>
<ol class="breadcrumb">
<li><i class="fa fa-tv"></i> Settlement</li>
<li class="active">Clearing Plans</li>
</ol>
</section>
<section class="content">
<div class="panel panel-success">
<div class="modal-body">
<div class="row">
<div class="col-xs-12">
<div royal-calendar month-change="loadMonthPlan($month)">
<div class="rc-full" style="font-size: 40px" ng-click="triggerDate(day)">
<i class="fa fa-check-circle text-green" ng-if="isDateOn(day)"></i>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="button" ng-click="submitMonthPlan()">Submit Month Plan</button>
<!--<button class="btn btn-danger" type="button" ng-click="$dismiss()">Close</button>-->
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="button" ng-click="submitMonthPlan()">Submit Month Plan</button>
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Close</button>
</div>
</section>

@ -2,7 +2,7 @@
<h4>周末费率减半活动</h4>
<ol class="breadcrumb">
<li>
<i class="fa fa-users"></i> Payment
<i class="fa fa-users"></i> Promotion
</li>
<li class="active">
City Partners

@ -7,62 +7,109 @@
text-align: center;
}
</style>
<section class="content-header">
<h1>Settlement Estimate</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Settlement
</li>
<li class="active">Settlement Estimate</li>
</ol>
</section>
<div class="content">
<div class="content">
<div class="box-solid">
<!--<div class="content">-->
<div class="row">
<div class="col-sm-12">
<div class="col-sm-12">
<!--<div class="col-sm-12">-->
<!--<div class="box-header">Settlement Estimate</div>-->
<!--<h5></h5>-->
<loadingbar ng-if="future_loading"></loadingbar>
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12" ng-repeat="fut in future track by $index">
<div class="info-box" ng-if="fut.estimate_date">
<div>
<div class="info-box-icon bg-aqua" style="height: 100px" ng-bind="fut.estimate_date.substr(8,10)">
</div>
<div class="info-box-content">
<div>
<span class="text-bold">清算金额:</span>
<div>
<span>&nbsp;T+1: </span>
<span ng-bind="fut.t1|currency:'$'" class="text-green"></span>
</div>
<div>
<span>&nbsp;T+2: </span>
<span ng-bind="fut.t2|currency:'$'" class="text-green"></span>
</div>
<div>
<span>&nbsp;T+3: </span>
<span ng-bind="fut.t3|currency:'$'" class="text-green"></span>
</div>
<div class="box-solid">
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12" ng-repeat="fut in future track by $index">
<div class="info-box" ng-if="fut.estimate_date">
<div>
<div class="info-box-icon bg-aqua" style="height: 100px"
ng-bind="fut.estimate_date.substr(8,10)">
</div>
<div class="info-box-content">
<div>
<span>Total: </span>
<span ng-bind="fut.total|currency:'$'" class="text-green"></span>
<span class="text-bold">清算金额:</span>
<div>
<span>&nbsp;T+1: </span>
<span ng-bind="fut.t1|currency:'$'" class="text-green"></span>
</div>
<div>
<span>&nbsp;T+2: </span>
<span ng-bind="fut.t2|currency:'$'" class="text-green"></span>
</div>
<div>
<span>&nbsp;T+3: </span>
<span ng-bind="fut.t3|currency:'$'" class="text-green"></span>
</div>
<div>
<span>Total: </span>
<span ng-bind="fut.total|currency:'$'" class="text-green"></span>
</div>
</div>
</div>
<div class="box-header" style="border-top: solid #f06010 1px;"
ng-if="fut.settlementFee_1307485301||fut.settlementFee_1431999902||fut.settlementFee_1487387142||fut.settlementFee_0||fut.aliSettleFee_0">
<span class="text-bold">到账金额详情:</span>
</div>
<div class="box-body"
ng-if="fut.settlementFee_1307485301||fut.settlementFee_1431999902||fut.settlementFee_1487387142||fut.settlementFee_0||fut.aliSettleFee_0">
<p class="text-bold col-sm-12" align="left"
ng-if="fut.settlementFee_1307485301"><img
src="/static/images/wechatpay_sign.png"
uib-tooltip="Wechat Merchant ID: 1307485301"/>(1307485301)到账金额:<a
class="text-green"
ng-bind="fut.settlementFee_1307485301|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left"
ng-if="fut.settlementFee_1431999902"><img
src="/static/images/wechatpay_sign.png"
uib-tooltip="Wechat Merchant ID: 1431999902"/>(1431999902)到账金额:<a
class="text-green"
ng-bind="fut.settlementFee_1431999902|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left"
ng-if="fut.settlementFee_1487387142"><img
src="/static/images/wechatpay_sign.png"
uib-tooltip="Wechat Merchant ID: 1487387142"/>(1487387142)到账金额:<a
class="text-green"
ng-bind="fut.settlementFee_1487387142|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left" ng-if="fut.aliSettleFee_All">
<img src="/static/images/alipay_sign.png" uib-tooltip="AliPay"
alt="Alipay"/> 到账金额:<a class="text-green"
ng-bind="fut.aliSettleFee_All|currency:'AUD'"></a>
</p>
<p class="text-bold col-sm-12" align="left"
ng-if="fut.aliOnlineSettleFee_All"><img
src="/static/images/alipay_sign.png" uib-tooltip="AliPayOnline"
alt="AliPayOnline"/> 到账金额(AlipayOnline):<a class="text-green"
ng-bind="fut.aliOnlineSettleFee_All|currency:'AUD'"></a>
</p>
<p class="text-bold col-sm-12" align="left" ng-if="fut.hfSettleFee_All"><img
src="/static/images/hf_sign.png" uib-tooltip="Hf" alt="Hf"/> 到账金额:<a
class="text-green" ng-bind="fut.hfSettleFee_All|currency:'AUD'"></a>
</p>
<p class="text-bold col-sm-12" align="left" ng-if="fut.platformGetSettleFee"
style="color: #f06010"><img src="/static/images/r_logo.svg"
style="width: 20px;height: 20px;"
uib-tooltip="RoyalPay" alt="RoyalPay"/>
总到账金额:<a class="text-green"
ng-bind="fut.platformGetSettleFee|currency:'AUD'"></a></p>
</div>
<!-- /.box-body -->
</div>
<div class="box-header" style="border-top: solid #f06010 1px;" ng-if="fut.settlementFee_1307485301||fut.settlementFee_1431999902||fut.settlementFee_1487387142||fut.settlementFee_0||fut.aliSettleFee_0">
<span class="text-bold">到账金额详情:</span>
</div>
<div class="box-body" ng-if="fut.settlementFee_1307485301||fut.settlementFee_1431999902||fut.settlementFee_1487387142||fut.settlementFee_0||fut.aliSettleFee_0">
<p class="text-bold col-sm-12" align="left" ng-if="fut.settlementFee_1307485301"> <img src="/static/images/wechatpay_sign.png" uib-tooltip="Wechat Merchant ID: 1307485301" />(1307485301)到账金额:<a class="text-green" ng-bind="fut.settlementFee_1307485301|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left" ng-if="fut.settlementFee_1431999902"> <img src="/static/images/wechatpay_sign.png" uib-tooltip="Wechat Merchant ID: 1431999902"/>(1431999902)到账金额:<a class="text-green" ng-bind="fut.settlementFee_1431999902|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left" ng-if="fut.settlementFee_1487387142"> <img src="/static/images/wechatpay_sign.png" uib-tooltip="Wechat Merchant ID: 1487387142"/>(1487387142)到账金额:<a class="text-green" ng-bind="fut.settlementFee_1487387142|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left" ng-if="fut.aliSettleFee_All"> <img src="/static/images/alipay_sign.png" uib-tooltip="AliPay" alt="Alipay"/> 到账金额:<a class="text-green" ng-bind="fut.aliSettleFee_All|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left" ng-if="fut.aliOnlineSettleFee_All"> <img src="/static/images/alipay_sign.png" uib-tooltip="AliPayOnline" alt="AliPayOnline"/> 到账金额(AlipayOnline):<a class="text-green" ng-bind="fut.aliOnlineSettleFee_All|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left" ng-if="fut.hfSettleFee_All"> <img src="/static/images/hf_sign.png" uib-tooltip="Hf" alt="Hf"/> 到账金额:<a class="text-green" ng-bind="fut.hfSettleFee_All|currency:'AUD'"></a></p>
<p class="text-bold col-sm-12" align="left" ng-if="fut.platformGetSettleFee" style="color: #f06010"> <img src="/static/images/r_logo.svg" style="width: 20px;height: 20px;" uib-tooltip="RoyalPay" alt="RoyalPay"/> 总到账金额:<a class="text-green" ng-bind="fut.platformGetSettleFee|currency:'AUD'"></a></p>
</div>
<!-- /.box-body -->
<!-- /.box -->
</div>
<!-- /.box -->
</div>
</div>
</div>
</br>
</br>
<div ng-if="future.length > 0">
</br>
</br>
</div>
<div class="box-solid">
<div class="box box-warning">
<div class="box-header">
@ -77,12 +124,14 @@
<input class="form-control" id="date-from-input"
ng-model="params.start_date"
uib-datepicker-popup size="10" placeholder="From"
is-open="dateBegin.open" ng-click="dateBegin.open=true"
is-open="dateBegin.open"
ng-click="dateBegin.open=true"
datepicker-options="{maxDate:params.end_date||today}">
</div>
~
<div style="display: inline-block">
<input class="form-control" id="date-to-input" ng-model="params.end_date"
<input class="form-control" id="date-to-input"
ng-model="params.end_date"
uib-datepicker-popup size="10" placeholder="To"
is-open="dateTo.open" ng-click="dateTo.open=true"
datepicker-options="{minDate:params.start_date,maxDate:today}">
@ -124,39 +173,44 @@
</div>
</div>
</div>
<div class="box box-warning">
<div class="box-header with-border">清算金额趋势</div>
<div class="box-body">
<div class="chart" echarts="stChart" style="height: 300px"
ng-class="{nodata:stChart.nodata}"></div>
<div class="box box-warning">
<div class="box-header with-border">清算金额趋势</div>
<div class="box-body">
<div class="chart" echarts="stChart" style="height: 300px"
ng-class="{nodata:stChart.nodata}"></div>
</div>
</div>
</div>
<div class="box box-warning settle-forecast" >
<div class="box-header">Settlement Logs</div>
<div class="box-body">
<div royal-calendar month-change="loadMonthLog($month)">
<div ng-if="logArray[(day|date:'yyyy-MM-dd')]">
<span class="text-bold">总清算额:</span>
<span style="color: #f60;" ng-bind="logArray[(day|date:'yyyy-MM-dd')].total_amount|currency:'$'"></span>
<div>
<span class="text-bold">T+1 :</span>
<span style="color: #f60;" ng-bind="logArray[(day|date:'yyyy-MM-dd')].one_clean_amount|currency:'$'"></span>
</div>
<div>
<span class="text-bold">T+2 :</span>
<span style="color: #f60;" ng-bind="logArray[(day|date:'yyyy-MM-dd')].two_clean_amount|currency:'$'"></span>
</div>
<div>
<span class="text-bold">T+3 :</span>
<span style="color: #f60;" ng-bind="logArray[(day|date:'yyyy-MM-dd')].three_clean_amount|currency:'$'"></span>
<div class="box box-warning settle-forecast">
<div class="box-header">Settlement Logs</div>
<div class="box-body">
<div royal-calendar month-change="loadMonthLog($month)">
<div ng-if="logArray[(day|date:'yyyy-MM-dd')]">
<span class="text-bold">总清算额:</span>
<span style="color: #f60;"
ng-bind="logArray[(day|date:'yyyy-MM-dd')].total_amount|currency:'$'"></span>
<div>
<span class="text-bold">T+1 :</span>
<span style="color: #f60;"
ng-bind="logArray[(day|date:'yyyy-MM-dd')].one_clean_amount|currency:'$'"></span>
</div>
<div>
<span class="text-bold">T+2 :</span>
<span style="color: #f60;"
ng-bind="logArray[(day|date:'yyyy-MM-dd')].two_clean_amount|currency:'$'"></span>
</div>
<div>
<span class="text-bold">T+3 :</span>
<span style="color: #f60;"
ng-bind="logArray[(day|date:'yyyy-MM-dd')].three_clean_amount|currency:'$'"></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--</div>-->
<!--</div>-->
<!--</div>-->

@ -1,4 +1,12 @@
<section class="content-header">
<h1>Monthly report of liquidation</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-sitemap"></i> Settlement
</li>
<li class="active">Monthly report of liquidation</li>
</ol>
</section>
<section class="content">
<div class="box box-default">
<div class="box-header">

@ -1,4 +1,12 @@
<div class="modal-header">Rate Expire Warnings</div>
<section class="content-header">
<h1>Rate Expire Warnings</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-sitemap"></i> Compliance Management
</li>
<li class="active">Rate Expire Warnings</li>
</ol>
</section>
<div class="modal-body">
<div class="box box-danger">
<div class="box-header">费率已过期商户({{warning.no_rate.length}}家)</div>
@ -70,7 +78,4 @@
</table>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-danger" ng-click="$dismiss()">Close</button>
</div>

@ -7,15 +7,15 @@
text-align: center;
}
</style>
<!--<section class="content-header">-->
<!--<h1>Transaction Data</h1>-->
<!--<ol class="breadcrumb">-->
<!--<li>-->
<!--<i class="fa fa-list-alt"></i> Analysis-->
<!--</li>-->
<!--<li class="active">Transaction Data</li>-->
<!--</ol>-->
<!--</section>-->
<!--<section class="content-header">
<h1>Transaction Data</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Analysis
</li>
<li class="active">Transaction Data</li>
</ol>
</section>-->
<div class="content">
<div class="row">
<div style="text-align: right" class="col-sm-12">

@ -7,6 +7,15 @@
text-align: center;
}
</style>
<!--<section class="content-header">
<h1>Transaction Data</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Analysis
</li>
<li class="active">Transaction Data</li>
</ol>
</section>-->
<div class="content">
<div class="row">
<div style="text-align: right" class="col-sm-12">

@ -1,3 +1,12 @@
<!--<section class="content-header">
<h1>Transaction Amount Analysis</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-list-alt"></i> Analysis
</li>
<li class="active">Transaction Amount</li>
</ol>
</section>-->
<div class="content">
<div class="row">
<div class="col-sm-12">

@ -15,7 +15,7 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
{
key: 'day',
label: '按日统计',
sref:"analysis_transaction.transanalysis"
sref:"analysis_transanalysis"
},
{
key: 'month',

@ -3,7 +3,7 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
var colors = ['#00c0ef', '#00a65a', '#ff851b', '#f39c12', '#d81b60', '#605ca8', '#dd4b39', '#008080', '#8B008B', '#D2691E', '#708090'];
var app = angular.module('transAnalysis', ['ui.bootstrap', 'ui.router', 'ngEcharts']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('analysis_transaction.transanalysis', {
$stateProvider.state('analysis_transanalysis', {
url: '/analysis/transaction',
templateUrl: '/static/analysis/templates/trans_analysis.html',
controller: 'transAnalysisCtrl'
@ -15,7 +15,7 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
{
key: 'day',
label: '按日统计',
sref:"analysis_transaction.transanalysis"
sref:"analysis_transanalysis"
},
{
key: 'month',

@ -10,11 +10,11 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angul
url: '/analysis/transaction',
templateUrl: '/static/analysis/transaction/templates/analysis_transaction.html',
controller: 'analysisTransactionCtrl'
}).state('analysis_transaction.gateway', {
url: '/gateway',
}).state('analysis_gateway', {
url: '/analysis/transaction/gateway',
templateUrl: '/static/dashboard/templates/dashboard_gateway.html',
controller: 'gatewayTransCtrl'
}).state('analysis_transaction.amountlsAnalysis', {
}).state('analysis_amountlsAnalysis', {
url: '/amountRangeAnalysis',
templateUrl: '/static/analysis/templates/transaction_amount_Analysis.html',
controller: 'transactionAmountCtrl'
@ -159,7 +159,7 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts'], function (angul
}]);
app.controller('analysisTransactionCtrl', ['$scope','$state', function ($scope,$state) {
if($state.is('analysis_transaction')){
$state.go('.transanalysis');
$state.go('analysis_transanalysis');
}
}]);

@ -1,42 +1,44 @@
<div class="content">
<div class="row">
<div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills">
<li ui-sref-active-eq="active" ng-if="'transAnalysis'|withModule">
<a ui-sref="analysis_transaction.transanalysis"><i class="fa fa-area-chart"></i>交易数据|Transaction Data</a>
</li>
<li ui-sref-active-eq="active" ng-if="'partner_analysis'|withModule">
<a ui-sref="analysis_transaction.partners_analysis"><i class="fa fa-line-chart"></i></i>商户数|Merchants Data</a>
</li>
<li ui-sref-active="active" ng-if="'dashboard'|withModule">
<a ui-sref="analysis_transaction.gateway"><i class="fa fa-area-chart"></i>Gateway统计|Gateway Analysis</a>
</li>
<li ui-sref-active="active" ng-if="'customer_analysis'|withModule">
<!-- <li ui-sref-active-eq="active" ng-if="'transAnalysis'|withModule">
<a ui-sref="analysis_transanalysis"><i class="fa fa-area-chart"></i>交易数据|Transaction Data</a>
</li>-->
<!--<li ui-sref-active-eq="active" ng-if="'partner_analysis'|withModule">-->
<!--<a ui-sref="analysis_transaction.partners_analysis"><i class="fa fa-line-chart"></i></i>商户数|Merchants Data</a>-->
<!--</li>-->
<!-- <li ui-sref-active="active" ng-if="'dashboard'|withModule">
<a ui-sref="analysis_gateway"><i class="fa fa-area-chart"></i>Gateway统计|Gateway Analysis</a>
</li>-->
<!--<li ui-sref-active="active" ng-if="'customer_analysis'|withModule">
<a ui-sref="analysis_transaction.customers_analysis_manage"><i class="fa fa-bar-chart"></i>消费者统计|Customer Analysis</a>
</li>
<li ui-sref-active="active" ng-if="'customerRankingAnalysisApp'|withModule">
<a ui-sref="analysis_transaction.customerRankingAnalysis"><i class="fa fa-male"></i>消费排名|Customers Ranking</a>
</li>
<li ui-sref-active="active" ng-if="'refundAnalysisApp'|withModule">
<a ui-sref="analysis_transaction.refundAnalysis"><i class="fa fa-money"></i>退款统计|Refund Analysis</a>
</li>
<li ui-sref-active="active" ng-if="('estimateAnalysisApp'|withModule)&&(currentUser.org_id==null)">
<a ui-sref="analysis_transaction.estimateAnalysis"><i class="fa fa-money"></i>清算预估|Settlement Estimate</a>
</li>
<li ui-sref-active="active" ng-if="'channels_Analysis'|withModule">
<a ui-sref="analysis_transaction.channelsAnalysis"><i class="fa fa-area-chart"></i>支付通道|Channels Analysis</a>
</li>
</li>-->
<!--<li ui-sref-active="active" ng-if="'customerRankingAnalysisApp'|withModule">-->
<!--<a ui-sref="analysis_transaction.customerRankingAnalysis"><i class="fa fa-male"></i>消费排名|Customers Ranking</a>-->
<!--</li>-->
<!--<li ui-sref-active="active" ng-if="'refundAnalysisApp'|withModule">-->
<!--<a ui-sref="analysis_refundAnalysis"><i class="fa fa-money"></i>退款统计|Refund Analysis</a>-->
<!--</li>-->
<!--<li ui-sref-active="active" ng-if="('estimateAnalysisApp'|withModule)&&(currentUser.org_id==null)">-->
<!--<a ui-sref="analysis_transaction.estimateAnalysis"><i class="fa fa-money"></i>清算预估|Settlement Estimate</a>-->
<!--</li>-->
<!--<li ui-sref-active="active" ng-if="'channels_Analysis'|withModule">-->
<!--<a ui-sref="analysis_channelsAnalysis"><i class="fa fa-area-chart"></i>支付通道|Channels Analysis</a>-->
<!--</li>-->
<li ui-sref-active="active" ng-if="('dashboard'|withModule)&&(currentUser.org_id==null)">
<a ui-sref="analysis_transaction.amountlsAnalysis"><i class="fa fa-area-chart"></i>交易金额分析|Transaction Amount Analysis</a>
</li>
<!--<li ui-sref-active="active" ng-if="('dashboard'|withModule)&&(currentUser.org_id==null)">-->
<!--<a ui-sref="analysis_amountlsAnalysis"><i class="fa fa-area-chart"></i>交易金额分析|Transaction Amount Analysis</a>-->
<!--</li>-->
<li ui-sref-active="active" ng-if="('merchantAmount'|withModule) &&('1'|withRole) ">
<a ui-sref="analysis_transaction.merchantAmountAnalysis"><i class="fa fa-area-chart"></i>商户交易额</a>
</li>
<!--<li ui-sref-active="active" ng-if="('merchantAmount'|withModule) &&('1'|withRole) ">-->
<!--<a ui-sref="analysis_transaction.merchantAmountAnalysis"><i class="fa fa-area-chart"></i>商户交易额</a>-->
<!--</li>-->
</ul>
</div>
</div>
<div class="row">
<div class="col-sm-12">

@ -76,8 +76,8 @@ require(['angular', 'jquery'], function (angular, $) {
});
function boot(user) {
var paths = ['static/boot/managerMainApp', 'static/analysis/org/analysis-org', 'static/analysis/report/analysis-report', 'static/analysis/monitoring/analysis-monitoring', 'static/analysis/bd/analysis-bd'];
var moduleNames = ['managerMainApp', 'analysisTransaction', 'analysisBD', 'analysisOrg', 'analysisMonitoring', 'analysisReport'];
var paths = ['static/boot/managerMainApp', 'static/menu/managerMenu','static/analysis/org/analysis-org', 'static/analysis/report/analysis-report', 'static/analysis/monitoring/analysis-monitoring', 'static/analysis/bd/analysis-bd','static/analysis/trans-analysis'];
var moduleNames = ['managerMainApp', 'listMenuApp','analysisTransaction', 'analysisBD', 'analysisOrg', 'analysisMonitoring', 'analysisReport'];
window.currentUser = user;
angular.forEach(user.modules, function (mod) {
paths.push(mod.js_path);

@ -0,0 +1,90 @@
/**
* Created by yixian on 2016-06-29.
*/
require.config({
baseUrl: './',
waitSeconds: 30,
urlArgs: 'bust=' + new Date().getTime(),
paths: {
jquery: 'static/lib/jquery/jquery-2.1.4.min',
uiBootstrap: 'static/lib/angular-plugins/ui-bootstrap-tpls-1.2.4.min',
uiRouter: 'static/lib/angular-plugins/angular-ui-router.min',
angularChecklist: 'static/lib/angular-plugins/checklist-model',
angular: 'static/lib/angularjs/angular.min',
angularAnimate: 'static/lib/angularjs/angular-animate.min',
angularMessages: 'static/lib/angularjs/angular-messages.min',
angularSanitize: 'static/lib/angularjs/angular-sanitize.min',
angularLocale: 'static/lib/angularjs/angular-locale_zh-cn',
bootSwitch: 'static/lib/bootswitch/bootstrap-switch.min',
ngBootSwitch: 'static/lib/angular-plugins/angular-bootstrap-switch.min',
ngFileUpload: 'static/lib/ngfileupload/ng-file-upload.min',
holder: 'static/lib/holder/holder.min',
datetimePicker: 'static/lib/datetime-picker/datetime-picker.min',
colorpicker: 'static/lib/colorpicker/js/bootstrap-colorpicker-module.min',
qrcode: 'static/lib/jquery/jquery.qrcode.min',
sockjs: 'static/lib/websocket/sockjs.min',
stomp: 'static/lib/websocket/stomp.min',
uiSelect: 'static/lib/angular-plugins/select.min',
dragdrop: 'static/lib/angular-plugins/angular-drag-and-drop-lists.min',
echarts: 'static/lib/echarts/echarts.min',
ueditor: 'static/lib/ueditor/ueditor.all.min',
ueditorConfig: 'static/lib/ueditor/ueditor.config',
angularEcharts: 'static/commons/angular-echarts',
decimal: 'static/lib/decimal/decimal.min',
jstz: 'static/lib/timezone/jstz-1.0.4.min'
},
shim: {
'angular': {deps: ['jquery', 'decimal'], exports: 'angular'},
'angularLocale': ['angular'],
'uiBootstrap': ['angular', 'angularLocale'],
'uiRouter': ['angular'],
'uiSelect': ['angular', 'css!static/lib/angular-plugins/select.min'],
'angularAnimate': ['angular'],
'angularMessages': ['angular'],
'angularSanitize': ['angular'],
'ngFileUpload': ['angular'],
'angularChecklist': ['angular'],
'datetimePicker': ['angular'],
'ngBootSwitch': ['bootSwitch', 'angular'],
'bootSwitch': ['jquery', 'css!static/lib/bootswitch/bootstrap-switch.min'],
'qrcode': ['jquery'],
'colorpicker': ['angular', 'css!static/lib/colorpicker/css/colorpicker.min'],
'holder': ['jquery'],
'dragdrop': ['angular'],
'ueditor': ['ueditorConfig']
},
map: {
'*': {
'css': 'static/lib/css.min'
}
}
});
require(['angular', 'jquery'], function (angular, $) {
$.ajax({
url: '/global/userstatus/current_manager',
method: 'get',
dataType: 'json',
success: function (user) {
boot(user);
},
error: function (jqXHR) {
if (jqXHR.status == 403) {
location.href = 'm_login.html?f=' + encodeURIComponent(location.href);
}
}
});
function boot(user) {
var paths = ['static/boot/managerMainAppv2', 'static/menu/managerMenu','static/analysis/org/analysis-org', 'static/analysis/report/analysis-report', 'static/analysis/monitoring/analysis-monitoring', 'static/analysis/bd/analysis-bd','static/analysis/trans-analysis'];
var moduleNames = ['managerMainAppv2', 'listMenuApp','analysisTransaction', 'analysisBD', 'analysisOrg', 'analysisMonitoring', 'analysisReport'];
window.currentUser = user;
angular.forEach(user.modules, function (mod) {
paths.push(mod.js_path);
moduleNames.push(mod.js_module);
});
require(paths, function () {
angular.bootstrap(document.body, moduleNames)
})
}
});

@ -15,6 +15,7 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
}]);
app.controller('managerIndexCtrl', ['$scope', '$rootScope', '$http', '$log', '$timeout', '$interval', '$uibModal', '$filter', 'myLoginLogView', 'commonDialog',
function ($scope, $rootScope, $http, $log, $timeout, $interval, $uibModal, $filter, myLoginLogView, commonDialog) {
$http.get('/sysconfig/base').then(function (resp) {
$rootScope.sysParams = resp.data;
});
@ -66,6 +67,25 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
};
$scope.getManagerTodoNotices();
$scope.editRateConfig = function () {
$uibModal.open({
templateUrl: '/static/config/bdprize/templates/rate_config_dialog.html',
controller: 'bdRateConfigCtrl',
resolve: {
rates: function () {
return angular.copy($scope.bd_rate_configs);
}
}
}).result.then(function () {
$scope.loadRateConfigs();
})
};
$scope.editBDLevels = function () {
$uibModal.open({
templateUrl: '/static/config/bdprize/templates/bd_level_config_dialog.html',
controller: 'bdLevelConfigCtrl'
})
};
var connected;
$interval($scope.loadCurrentUser, 300000);
@ -182,6 +202,98 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
});
}
function hasRole() {
var rolenum;
switch (sessionStorage.getItem('role')) {
case "administrator":
rolenum = 1;
break;
case "bduser":
rolenum = 4;
break;
case "salesmanager":
rolenum = 8192;
break;
case "accountant":
rolenum = 8;
break;
case "sitemanager":
rolenum = 128;
break;
case "director":
rolenum = 64;
break;
case "developer":
rolenum = 256;
break;
case "compliance":
rolenum = 2;
break;
case "riskmanager":
rolenum = 1024;
break;
default:
break;
}
if ((window.currentUser.role & rolenum) >0) {
return true;
}else {
sessionStorage.removeItem('role');
return false;
}
}
var getRoleMenulist = function (role) {
var roleMenu = [];
if ((role & 1) >0){
roleMenu.push({'value':'administrator','module':'系统配置'});
}
if ((role & 2) >0){
roleMenu.push({'value':'compliance','module':'合规中心'});
}
if ((role & 4) >0){
roleMenu.push({'value':'bduser','module':"销售中心"});
}
if ((role & 8) >0){
roleMenu.push({'value':'accountant','module':"财务中心"});
}
if ((role & 64) >0){
roleMenu.push({'value':'director','module':"领导决策"});
}
if ((role & 128) >0){
roleMenu.push({'value':'sitemanager','module':"营销中心"});
}
if ((role & 256) >0){
roleMenu.push({'value':'developer','module':"开发中心"});
}
if ((role & 1024) >0){
roleMenu.push({'value':'riskmanager','module':"风控中心"});
}
if ((role & 2048) >0){
roleMenu.push({'value':'guest','module':"guest"});
}
if ((role & 8192) >0){
roleMenu.push({'value':'salesmanager','module':"销管中心"});
}
return roleMenu;
};
$scope.role = getRoleMenulist(window.currentUser.role);
if (sessionStorage.getItem('role') == null) {
sessionStorage.setItem('role',$scope.role[0].value);
}else {
hasRole();
}
$scope.roleNow = sessionStorage.getItem('role');
$scope.changeRole = function (index) {
sessionStorage.setItem('role',index);
};
}]);
app.controller('changePwdCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.formData = {};
@ -385,5 +497,67 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
altInputFormats: [],
ngModelOptions: {}
});
app.controller('bdRateConfigCtrl', ['$scope', '$http', 'rates', function ($scope, $http, rates) {
$scope.bdLevels = [{value: 1, label: 'Junior'}, {value: 2, label: 'Intermediate'}, {value: 3, label: 'Senior'}];
$scope.months = [{value: 1, label: '1-3 Months'}, {value: 2, label: '4-6 Months'}, {
value: 3,
label: '>=7 Months'
}];
$scope.kpiRanges = [{value: 1, label: '0-50%'}, {value: 2, label: '50%~80%'}, {value: 3, label: '80%~100%'},
{value: 4, label: '100%-120%'}, {value: 5, label: '>=120%'}];
$scope.clientRate = [{value: 0.6, label: '0.6-0.79'}, {value: 0.8, label: '0.8-2.0'}];
$scope.filter = {bd_level: 1,rate_from:0.6};
$scope.rates = rates;
$scope.submitRates = function () {
var validation = null;
$scope.errmsg = null;
angular.forEach($scope.rates, function (rate) {
if (isNaN(rate.prize_rate)) {
validation = {months: rate.time_range, bd_level: rate.bd_level};
$scope.errmsg = 'Rate Value is NaN';
}
if (rate.prize_rate > 1) {
validation = {months: rate.time_range, bd_level: rate.bd_level};
$scope.errmsg = 'Rate value shall no more than 1%';
}
if (rate.prize_rate < 0) {
validation = {months: rate.time_range, bd_level: rate.bd_level};
$scope.errmsg = 'Rate value shall be a positive value';
}
});
if (!validation) {
$http.put('/sys/bd_prize/config/rates', $scope.rates).then(function () {
$scope.$close();
}, function (resp) {
$scope.errmsg = resp.data.message;
})
}
}
}]);
app.controller('bdLevelConfigCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.getBDGroups = function () {
$http.get('/sys/manager_accounts/roles/bd_leader').then(function (resp) {
$scope.bdgroups = resp.data;
$scope.getBDLevels();
})
};
$scope.getBDGroups();
$scope.getBDLevels = function () {
$http.get('/sys/bd_prize/config/bd_levels').then(function (resp) {
$scope.bds = resp.data;
})
};
$scope.bdLevels = [{value: 1, label: 'Junior'}, {value: 2, label: 'Intermediate'}, {value: 3, label: 'Senior'}];
$scope.updateBDLevel = function (bdInfo) {
$http.put('/sys/bd_prize/config/bd_levels/' + bdInfo.manager_id, bdInfo).then(function () {
$scope.getBDGroups();
}, function (resp) {
$scope.errmsg = resp.data.message;
})
};
}]);
return app;
});

@ -0,0 +1,511 @@
/**
* Created by yixian on 2016-06-29.
*/
define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRouter', 'uiBootstrap', 'ngFileUpload', 'sockjs', 'stomp'], function (angular) {
'use strict';
var app = angular.module('managerMainAppv2', ['ngSanitize', 'ngAnimate', 'ngMessages', 'ui.router', 'ui.bootstrap', 'ngFileUpload']);
app.config(['$urlRouterProvider', '$httpProvider', function ($urlRouterProvider, $httpProvider) {
window.getRoleMenulist = function (role) {
var roleMenu = [];
if ((role & 1) >0){
roleMenu.push({'value':'administrator','module':'系统配置'});
}
if ((role & 2) >0){
roleMenu.push({'value':'compliance','module':'合规中心'});
}
if ((role & 4) >0){
roleMenu.push({'value':'bduser','module':"销售中心"});
}
if ((role & 8) >0){
roleMenu.push({'value':'accountant','module':"财务中心"});
}
if ((role & 64) >0){
roleMenu.push({'value':'director','module':"领导决策"});
}
if ((role & 128) >0){
roleMenu.push({'value':'sitemanager','module':"营销中心"});
}
if ((role & 256) >0){
roleMenu.push({'value':'developer','module':"开发中心"});
}
if ((role & 1024) >0){
roleMenu.push({'value':'riskmanager','module':"风控中心"});
}
if ((role & 2048) >0){
roleMenu.push({'value':'guest','module':"guest"});
}
if ((role & 8192) >0){
roleMenu.push({'value':'salesmanager','module':"销管中心"});
}
return roleMenu;
};
if (getRoleMenulist(window.currentUser.role).length>1) {
sessionStorage.setItem('roleNum','N');
$urlRouterProvider.otherwise(((window.currentUser.role & parseInt('100000', 2)) > 0) ? '/managers' : '/home');
}else {
sessionStorage.setItem('roleNum','1');
sessionStorage.setItem('role',getRoleMenulist(window.currentUser.role)[0].value);
$urlRouterProvider.otherwise(((window.currentUser.role & parseInt('100000', 2)) > 0) ? '/managers' : '/menu');
}
if (!$httpProvider.defaults.headers.get) {
$httpProvider.defaults.headers.get = {};
}
$httpProvider.defaults.headers.get['If-Modified-Since'] = 'Mon, 26 Jul 1997 05:00:00 GMT';
$httpProvider.defaults.headers.get['Cache-Control'] = 'no-cache';
$httpProvider.defaults.headers.get['Pragma'] = 'no-cache';
}]);
app.controller('managerIndexCtrl', ['$scope', '$state','$rootScope', '$http', '$log', '$timeout', '$interval', '$uibModal', '$filter', 'myLoginLogView', 'commonDialog',
function ($scope, $state,$rootScope, $http, $log, $timeout, $interval, $uibModal, $filter, myLoginLogView, commonDialog) {
$scope.rolelist = window.getRoleMenulist(window.currentUser.role);
$scope.roleNow = getroleNow();
$scope.roleName = sessionStorage.getItem('role');
$scope.changeRole = function (index) {
sessionStorage.setItem('role',index);
$scope.roleNow = getroleNow();
$state.go('listMenu',null,{
reload:true
});
};
if (sessionStorage.getItem('roleNum') =='N'){
if (window.location.hash == "" || window.location.hash == "#/home") {
$scope.headerDisplay = false;
$scope.copyright = false;
}else {
$scope.headerDisplay = true;
$scope.copyright = true;
}
}else {
$scope.headerDisplay = true;
$scope.copyright = true;
}
$scope.headerCopyDisplay = function () {
$scope.headerDisplay = false;
$scope.copyright = false;
};
$scope.headerShow = function (role) {
$scope.headerDisplay = true;
$scope.copyright = true;
sessionStorage.setItem('role',role);
$scope.roleNow = getroleNow();
$scope.roleName = sessionStorage.getItem('role');
};
function getroleNow() {
var roleNow = "";
switch (sessionStorage.getItem('role')) {
case "administrator":
roleNow = "系统配置";
break;
case "bduser":
roleNow = "销售中心";
break;
case "salesmanager":
roleNow = "销管中心";
break;
case "accountant":
roleNow = "财务中心";
break;
case "sitemanager":
roleNow = "营销中心";
break;
case "director":
roleNow = "领导决策";
break;
case "developer":
roleNow = "开发中心";
break;
case "compliance":
roleNow = "合规中心";
break;
case "riskmanager":
roleNow = "风控中心";
break;
default:
break;
}
return roleNow;
}
$http.get('/sysconfig/base').then(function (resp) {
$rootScope.sysParams = resp.data;
});
var stompClient = null;
$scope.loadCurrentUser = function () {
$http.get('/global/userstatus/current_manager').then(function (resp) {
$rootScope.currentUser = resp.data;
// connectWebSocket();
$scope.notifyCounts = 0;
if ($rootScope.currentUser.role & parseInt('110', 2)) {
$scope.loadPartnerApplyNotice();
if (window.currentUser.role & 10000000000) {
$scope.loadRefundNotice();
}
}
// if ($rootScope.currentUser.role ==2 || $rootScope.currentUser.role == 4){
// $scope.loadPartnerApplyNotice();
// }
if ($rootScope.currentUser.wx_openid == null) {
if ($filter('withRole')('100')) {
$scope.managerBindWechat('static');
} else {
$scope.managerBindWechat(true);
}
}
}, function (resp) {
if (resp.status == 403) {
location.href = 'm_login.html?f=' + encodeURIComponent(location.href);
}
})
};
$scope.loadCurrentUser();
$scope.getManagerTodoNotices = function () {
$http.get('/global/userstatus/manager_todo_notices').then(function (resp) {
if (resp.data.length) {
$uibModal.open({
controller: 'managerTodoNoticeCtrl',
templateUrl: '/static/boot/templates/manager_todo.html',
resolve: {
notices: function () {
return resp.data;
}
}
})
}
})
};
// $scope.getManagerTodoNotices();
var connected;
$interval($scope.loadCurrentUser, 300000);
function connectWebSocket() {
if (connected && stompClient) {
return;
}
var sock = new SockJS('/register');
stompClient = window.Stomp.over(sock);
stompClient.connect({}, function (frame) {
$log.debug('websocket connected:' + frame);
connected = true;
stompClient.subscribe('/app/common/page_events/' + $rootScope.currentUser.manager_id, function (msg) {
$log.debug('new event notice:' + msg.body);
var msgBody = JSON.parse(msg.body);
$scope.$broadcast(msgBody.event, msgBody.data);
});
}, function () {
$log.error('连接失败3秒后尝试重连');
connected = false;
$timeout(connectWebSocket, 3000);
})
};
connectWebSocket();
$scope.$on('manager_bind_success', function (evt, msg) {
if (msg.key == $scope.checkCode) {
$scope.checkModal != null && $scope.checkModal.close();
}
});
$scope.showMyLoginLogs = function () {
myLoginLogView.show();
};
$scope.toggleHideSideBar = function () {
$scope.hideSideBar = !$scope.hideSideBar;
};
$scope.showQrCode = function (data, backdrop) {
return $uibModal.open({
template: '<div style="width: 100%;padding: 10px;">请使用微信扫描<br><div style="width:100%" qrcode="url"></div><p class="text-center"><img class="img-circle img-bordered" style="width: 45px" ng-show="{{wx_headimg}}" ng-src="{{wx_headimg}}">{{wx_nickname}}</p></div>',
controller: ['$scope', 'data', function ($scope, data) {
$scope.url = data.url;
$scope.wx_headimg = data.wx_headimg;
$scope.wx_nickname = data.wx_nickname;
}],
size: 'sm',
resolve: {
data: function () {
return data;
}
},
keyboard: false,
backdrop: backdrop
})
};
$scope.logout = function () {
$http.put('/global/userstatus/manager_signout').then(function () {
location.href = '/m_login.html';
});
};
$scope.changePwd = function () {
$uibModal.open({
templateUrl: '/static/boot/templates/change_pwd_dialog.html',
controller: 'changePwdCtrl',
size: 'sm'
}).result.then(function () {
commonDialog.alert({title: '操作成功', content: '您成功修改了密码', type: 'success'})
})
};
$scope.currentUserHasRole = function (role) {
return ($scope.currentUser.role & role) > 0
};
$scope.loadPartnerApplyNotice = function () {
var params = {};
$http.get('/partners/application/notice', {params: params}).then(function (resp) {
$scope.partner_application_new = resp.data.counts;
if ($scope.partner_application_new) {
$scope.notifyCounts = $scope.notifyCounts + 1;
}
})
};
$scope.loadRefundNotice = function () {
$http.get('/api/payment/v1.0/refund/orders/notifyReview').then(function (resp) {
$scope.refundReviews = resp.data;
if ($scope.refundReviews) {
$scope.notifyCounts = $scope.notifyCounts + 1;
}
});
}
$scope.openNotice = false;
$scope.toggleOpenNotice = function () {
var openNotice = angular.copy($scope.openNotice);
$scope.openNotice = !openNotice;
};
$scope.managerBindWechat = function (backdrop) {
$http.post('/system/manager_wechat_binds').then(function (resp) {
$scope.checkCode = resp.data.bind_id;
if (resp.data.wx_nickname) {
backdrop = true;
}
$scope.checkModal = $scope.showQrCode(resp.data, backdrop);
// $scope.showQrCode(resp.data.url);
})
}
$scope.customerService = function () {
$http.put('/sys/openim/check').then(function (resp) {
window.open('/service_client.html?key='+resp.data.appkey+'&p='+resp.data.password+'&uid='+resp.data.user_id,'_blank');
});
}
}]);
app.controller('changePwdCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.formData = {};
$scope.submit = function (form) {
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') <= 0) {
item.$dirty = true;
$scope.errmsg = '请输入密码';
}
});
return;
}
// $scope.errmsg = null;
// if($scope.formData.pwd && $scope.formData.pwd.length < 8){
// $scope.errmsg = '密码必须大于8位';
// return;
// }
// var regex = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$/;
// if($scope.formData.pwd &&!regex.test($scope.formData.pwd)){
// $scope.errmsg = '密码需要由8-16位数字以及字母组成';
// return;
// }
if ($scope.formData.pwd != $scope.formData.repeatpwd) {
$scope.errmsg = '两次输入密码不一致';
return;
}
$scope.errmsg = null;
$http.put('/global/userstatus/manager_password', $scope.formData).then(function () {
$scope.$close();
}, function (resp) {
$scope.errmsg = resp.data.message;
})
}
}]);
app.controller('managerTodoNoticeCtrl', ['$scope', 'notices', function ($scope, notices) {
$scope.notices = notices;
}]);
app.controller('blankCtrl', ['$scope', function ($scope) {
}]);
app.factory('myLoginLogView', ['$uibModal', function ($uibModal) {
return {
show: function () {
$uibModal.open({
templateUrl: '/static/boot/templates/user_login_logs.html',
controller: ['$scope', '$http', function ($scope, $http) {
$scope.pagination = {};
$scope.getMyLoginLogs = function (page) {
var params = {page: page || $scope.pagination.page || 1};
$http.get('/global/userstatus/current_manager/login_logs', {params: params}).then(function (resp) {
$scope.pagination = resp.data.pagination;
$scope.loginLogs = resp.data.data;
})
};
$scope.getMyLoginLogs();
}]
})
}
}
}]);
app.filter('withRole', ['$rootScope', function ($rootScope) {
return function (roleCode) {
if (angular.isNumber(roleCode)) {
var code = roleCode;
} else {
code = parseInt(roleCode, 2);
}
return ($rootScope.currentUser.role & code) > 0
}
}]);
app.filter('withModule', ['$rootScope', function ($rootScope) {
return function (moduleName) {
return $rootScope.currentUser.module_names.indexOf(moduleName) >= 0;
}
}]);
app.filter('withFunc', ['$rootScope', function ($rootScope) {
return function (funcName) {
return $rootScope.currentUser.available_func_names.indexOf(funcName) >= 0;
}
}]);
app.filter('tradeStatus', function () {
return function (status) {
switch (status + '') {
case '0':
return 'Creating';
case '1':
return 'Failed Create Order';
case '2':
return 'Wait For Payment';
case '3':
return 'Closed';
case '4':
return 'Payment Failed';
case '5':
return 'Payment Successful';
case '6':
return 'Partial Refund';
case '7':
return 'Full Refund';
}
}
});
app.filter('refundStatus', function () {
return function (status) {
switch (status + '') {
case '0':
case'1':
return 'Submit Failed';
case '2':
return 'Submit Success';
case '3':
return 'Failed';
case '4':
return 'Success';
case '5':
return 'Change'
}
}
});
app.filter('tradeGateway', function () {
return function (gateway) {
switch (gateway + '') {
case '0':
return '线下扫码';
case '1':
return '线下扫码';
case '2':
return '商户静态码';
case '3':
return '线上网关';
case '4':
return 'JSAPI网关';
case '5':
return '线下网关';
case '6':
return '线下网关';
case '7':
return '商户静态码';
case '8':
return 'Mobile H5';
case '9':
return '第三方网关';
case '10':
return 'APP网关';
case '11':
return '账单码';
case '12':
return '小程序';
case '13':
return '原生二维码';
case '14':
return '账单链接'
}
}
});
app.constant('uiDatetimePickerConfig', {
dateFormat: 'yyyy-MM-dd HH:mm',
defaultTime: '00:00:00',
html5Types: {
date: 'yyyy-MM-dd',
'datetime-local': 'yyyy-MM-ddTHH:mm:ss.sss',
'month': 'yyyy-MM'
},
initialPicker: 'date',
reOpenDefault: false,
enableDate: true,
enableTime: true,
buttonBar: {
show: true,
now: {
show: true,
text: '现在'
},
today: {
show: true,
text: '今天'
},
clear: {
show: true,
text: '清空'
},
date: {
show: true,
text: '日期'
},
time: {
show: true,
text: '时间'
},
close: {
show: true,
text: '关闭'
}
},
closeOnDateSelection: true,
appendToBody: false,
altInputFormats: [],
ngModelOptions: {}
});
return app;
});

@ -3,7 +3,7 @@
<h1><span>营销返现数据分析</span></h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-sitemap"></i> Marketing
<i class="fa fa-sitemap"></i> Promotion
</li>
<li><a ui-sref="^">Promotion Account</a></li>
</ol>

@ -5,8 +5,8 @@ define(['angular'], function (angular) {
'use strict';
var app = angular.module('citypartner', ['ui.router']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('partner_apply.citypartner_reg', {
url: '/citypartner_registries',
$stateProvider.state('citypartner_reg', {
url: '/partner/apply/citypartner_registries',
templateUrl: '/static/citypartner/templates/citypartner_registers.html',
controller: 'citypartnerRegisterListCtrl'
})

@ -2,7 +2,7 @@
<h1>City Partners</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-users"></i> Payment
<i class="fa fa-users"></i> Framework
</li>
<li class="active">
City Partners

@ -2,7 +2,10 @@
<section class="content-header">
<h1>网站管理</h1>
<ol class="breadcrumb">
<li>网站管理</li>
<li>
<i class="fa fa-sitemap"></i> Content Management
</li>
<li class="active">网站管理</li>
</ol>
</section>
<section class="content">

@ -2,12 +2,12 @@
<section class="content-header">
<h1>BD Commissions</h1>
<ol class="breadcrumb">
<li><i class="fa fa-usd"></i> Analysis</li>
<li><i class="fa fa-usd"></i> Performance</li>
<li class="active">BD Commissions</li>
</ol>
</section>
<section class="content">
<div class="box box-danger" ng-if="'1000'|withRole">
<div class="box box-danger" ng-if="('10000000000000'|withRole)">
<div class="box-body">
<div class="box box-default">
<div class="box-body">
@ -31,7 +31,7 @@
<!--<button class="btn btn-primary" ng-click="editCommissionConfig()"><i class="fa fa-user"></i> Edit Commission Config</button>-->
</div>
</div>
<div class="box box-default" ng-if="'1000'|withRole">
<div class="box box-default" ng-if="('1000'|withRole) || ('1000000'|withRole) || ('10000000000000'|withRole)">
<div class="box-header">
<!-- <div uib-dropdown>
<button class="btn btn-primary" uib-dropdown-toggle type="button" ng-bind="params.year"></button>
@ -50,7 +50,7 @@
<div class="box-body">
<div class="row">
<div class="col-xs-2" ng-repeat="mon in months">
<a ng-if="hasReport(mon) && ('1000'|withRole)">
<a ng-if="hasReport(mon) && ('10000000000000'|withRole)">
<h2 ROLE="button" class="text-success" ui-sref=".month_report({month:mon})" ng-bind="mon.substring(5,7)"></h2>
<span class="fa fa-edit btn" ng-click="editCommissionConfig(mon)">Commission</span>
</a>

@ -2,9 +2,8 @@
<h1>支付宝进件表格导出</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-cog"></i> Basic Config
<i class="fa fa-cog"></i> Compliance Management
</li>
<li><a ui-sref="^">Dev Tools</a></li>
<li class="active">aliforexcel</li>
</ol>
</section>

@ -2,7 +2,7 @@
<h1>Wechat Settlements</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-flag"></i>Report
<i class="fa fa-dollar"></i>Financial
</li>
<li class="active">Wechat Settlements</li>
</ol>

@ -9,15 +9,15 @@ define(['angular', 'uiRouter'], function (angular) {
url: '/logs',
templateUrl: '/static/config/logview/templates/root.html',
controller: 'logviewRootCtrl'
}).state('logview.login_history', {
url: '/login',
}).state('login_history', {
url: '/logs/login',
templateUrl: '/static/config/logview/templates/login_log_root.html',
controller: 'loginLogRootCtrl'
}).state('logview.login_history.managers', {
}).state('login_history.managers', {
url: '/managers',
templateUrl: '/static/config/logview/templates/login_log_manager.html',
controller: 'managerLoginLogCtrl'
}).state('logview.login_history.client', {
}).state('login_history.client', {
url: '/clients',
templateUrl: '/static/config/logview/templates/login_log_clients.html',
controller: 'clientLoginLogCtrl'
@ -29,8 +29,8 @@ define(['angular', 'uiRouter'], function (angular) {
url: '/wechatMsg',
templateUrl: '/static/config/logview/templates/wechat_msg_log.html',
controller: 'wechatMsgLogCtrl'
}).state('logview.config_operation', {
url: '/config_operation',
}).state('config_operation', {
url: '/logs/config_operation',
templateUrl: '/static/config/logview/templates/config_opertaion_log.html',
controller: 'configOperationLogCtrl'
})
@ -38,7 +38,7 @@ define(['angular', 'uiRouter'], function (angular) {
app.controller('logviewRootCtrl', ['$scope', function ($scope) {
}]);
app.controller('loginLogRootCtrl', ['$scope', '$state', function ($scope, $state) {
if ($state.is('logview.login_history')) {
if ($state.is('login_history')) {
$state.go('.managers')
}
}]);

@ -1,11 +1,8 @@
<section class="content-header">
<h1>Config Operation Logs</h1>
<h1>Compliance Management</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-file-text-o"></i> Basic Config
</li>
<li>
<a ui-sref="^">Log Views</a>
<i class="fa fa-file-text-o"></i> Compliance Management
</li>
<li class="active">Config Operation Logs</li>
</ol>

@ -2,10 +2,7 @@
<h1>Notify Logs</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-file-text-o"></i> Basic Config
</li>
<li>
<a ui-sref="^">Log Views</a>
<i class="fa fa-file-text-o"></i> Transaction
</li>
<li class="active">Notify Logs</li>
</ol>

@ -11,10 +11,10 @@
<section class="content">
<div class="box">
<div class="box-body">
<a class="btn btn-app" role="button" ui-sref=".login_history">
<!-- <a class="btn btn-app" role="button" ui-sref=".login_history">
<i class="fa fa-users"></i>
Sign In History
</a>
</a>-->
<a class="btn btn-app" role="button" ui-sref=".notify_logs">
<i class="fa fa-server"></i>
Notify History
@ -23,10 +23,10 @@
<i class="fa fa-weixin"></i>
WeChat Messages
</a>
<a class="btn btn-app" role="button" ui-sref=".config_operation">
<i class="fa fa-edit"></i>
Config Operation
</a>
<!--<a class="btn btn-app" role="button" ui-sref=".config_operation">-->
<!--<i class="fa fa-edit"></i>-->
<!--Config Operation-->
<!--</a>-->
</div>
</div>
</section>

@ -12,7 +12,7 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
})
}]);
app.controller('managerListCtrl', ['$scope', '$http', '$filter','$uibModal', 'commonDialog', function ($scope, $http,$filter, $uibModal, commonDialog) {
$scope.params = {role:"111111111111"};
$scope.params = {role:"11111111111111"};
$scope.pagination = {};
$scope.listManagers = function (page) {
var params = angular.copy($scope.params);
@ -131,6 +131,7 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
}]);
app.controller('newManagerDialogCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.params = {};
$scope.manager = {};
if(($scope.currentUser.role & parseInt('1000000000000', 2)) > 0 && $scope.currentUser.org_id){
var params = angular.copy($scope.params);
params.org_id = $scope.currentUser.org_id;
@ -164,6 +165,7 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
$scope.manager.org_id = $scope.manager.org_id2;
}
delete $scope.manager.org_id2;
$http.post('/sys/manager_accounts', $scope.manager).then(function () {
$scope.$close();
}, function (resp) {

@ -2,7 +2,7 @@
<h1>Manager Accounts</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-key"></i> Basic Config
<i class="fa fa-key"></i> Framework
</li>
<li class="active">Manager Accounts</li>
</ol>
@ -29,14 +29,16 @@
<option value="100">BD User</option>
<option value="1000">Accountant</option>
<option value="10000">Service</option>
<option value="100000">Account Manager</option>
<!--<option value="100000">Account Manager</option>-->
<option value="1000000">Director</option>
<option value="10000000">Site Manager</option>
<option value="10000000">Markting</option>
<option value="100000000">Developer</option>
<option value="1000000000">BD Leader</option>
<option value="10000000000">Risk Manager</option>
<option value="100000000000">Guest</option>
<option value="1000000000000">Org Manager</option>
<!--<option value="1000000000000">Org Manager</option>-->
<option value="10000000000000">Sales Manager</option>
<!--<option value="100000000000000">Data Ccontent</option>-->
</select>
</div>
@ -104,14 +106,16 @@
<i class="fa fa-crosshairs" title="BD User" ng-class="{'text-green':manager.bd,'text-gray':!manager.bd}"></i>
<i class="fa fa-balance-scale" title="Accountant" ng-class="{'text-green':manager.finacial,'text-gray':!manager.finacial}"></i>
<i class="fa fa-tty" title="Service" ng-class="{'text-green':manager.sevant,'text-gray':!manager.servant}"></i>
<i class="fa fa-university" title="Account Manager" ng-class="{'text-green':manager.accountmanager,'text-gray':!manager.accountmanager}"></i>
<!--<i class="fa fa-university" title="Account Manager" ng-class="{'text-green':manager.accountmanager,'text-gray':!manager.accountmanager}"></i>-->
<i class="fa fa-line-chart" title="Director" ng-class="{'text-green':manager.director,'text-gray':!manager.director}"></i>
<i class="fa fa-map-o" title="Site Manager" ng-class="{'text-green':manager.sitemanager,'text-gray':!manager.sitemanager}"></i>
<i class="fa fa-map-o" title="Markting" ng-class="{'text-green':manager.sitemanager,'text-gray':!manager.sitemanager}"></i>
<i class="fa fa-code" title="Developer" ng-class="{'text-green':manager.developer,'text-gray':!manager.developer}"></i>
<i class="fa fa-male" title="BD Leader" ng-class="{'text-green':manager.bdleader,'text-gray':!manager.bdleader}"></i>
<i class="fa fa-user" title="Risk Manager" ng-class="{'text-green':manager.riskmanager,'text-gray':!manager.riskmanager}"></i>
<i class="fa fa-tripadvisor" title="GUEST" ng-class="{'text-green':manager.guest,'text-gray':!manager.guest}"></i>
<i class="fa fa-user-plus" title="Org Manager" ng-class="{'text-green':manager.orgmanager,'text-gray':!manager.orgmanager}"></i>
<!--<i class="fa fa-user-plus" title="Org Manager" ng-class="{'text-green':manager.orgmanager,'text-gray':!manager.orgmanager}"></i>-->
<i class="fa fa-ticket" title="Sales Manager" ng-class="{'text-green':manager.salesmanager,'text-gray':!manager.salesmanager}"></i>
<!--<i class="fa fa-save" title="Data Content" ng-class="{'text-green':manager.datacontent,'text-gray':!manager.datacontent}"></i>-->
</td>
<td>
<a role="button" class="text-bold text-primary" ng-click="modifyManager(manager)">Modify</a>

@ -63,14 +63,14 @@
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.servant" name="servant">Service
</label>
<label ng-if="!manager.admin && !manager.operator">
<input type="checkbox" ng-model="manager.accountmanager" name="accountmanager">Account Manager
</label>
<!--<label ng-if="!manager.admin && !manager.operator">-->
<!--<input type="checkbox" ng-model="manager.accountmanager" name="accountmanager">Account Manager-->
<!--</label>-->
<label>
<input type="checkbox" ng-model="manager.director" name="director">Director
</label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.sitemanager" name="sitemanager">Site Manager
<input type="checkbox" ng-model="manager.sitemanager" name="sitemanager">Markting
</label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.developer" name="developer">Developer
@ -81,9 +81,15 @@
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.riskmanager" name="riskmanager">Risk Manager
</label>
<label ng-if="('00001'|withRole)">
<!-- <label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.orgmanager" name="orgmanager">Org Manager
</label>-->
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.salesmanager" name="salesmanager">Sales Manager
</label>
<!-- <label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.datacontent" name="datacontent">Data Content
</label>-->
</p>
</div>
<div class="form-group" ng-if="isOrgModify&&!isModifyOrgManage">
@ -92,9 +98,9 @@
<label ng-if="!manager.admin && !manager.operator">
<input type="checkbox" ng-model="manager.bd" name="bd">BD User
</label>
<label ng-if="('00001'|withRole)">
<!-- <label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.orgmanager" name="orgmanager">Org Manager
</label>
</label>-->
</p>
</div>
<!-- <div class="form-group" ng-if="('1'|withRole) && !manager.admin && !manager.operator && !manager.sitemanager && orgs!=null">

@ -69,14 +69,14 @@
<label ng-if="('00001'|withRole) && !manager.admin && !manager.operator">
<input type="checkbox" ng-model="manager.servant" name="servant">Service
</label>
<label ng-if="!manager.admin && !manager.operator">
<input type="checkbox" ng-model="manager.accountmanager" name="accountmanager">Account Manager
</label>
<!--<label ng-if="!manager.admin && !manager.operator">-->
<!--<input type="checkbox" ng-model="manager.accountmanager" name="accountmanager">Account Manager-->
<!--</label>-->
<label>
<input type="checkbox" ng-model="manager.director" name="director">Director
</label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.sitemanager" name="sitemanager">Site Manager
<input type="checkbox" ng-model="manager.sitemanager" name="sitemanager">Markting
</label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.developer" name="developer">Developer
@ -90,9 +90,15 @@
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.guest" name="guest">Guest
</label>
<!--<label ng-if="('00001'|withRole)">-->
<!--<input type="checkbox" ng-model="manager.orgmanager" name="guest">Org Manager-->
<!--</label>-->
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.orgmanager" name="guest">Org Manager
<input type="checkbox" ng-model="manager.salesmanager" name="salesmanager">Sales Manager
</label>
<!--<label ng-if="('00001'|withRole)">-->
<!--<input type="checkbox" ng-model="manager.datacontent" name="datacontent">Data Content-->
<!--</label>-->
</p>
</div>
<div class="form-group" ng-if="!currentUser.org_id &&isOrg">
@ -101,13 +107,13 @@
<label ng-if="!manager.admin && !manager.operator">
<input type="checkbox" ng-model="manager.bd" name="bd">BD User
</label>
<label ng-if="('00001'|withRole)">
<!-- <label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.orgmanager" name="guest">Org Manager
</label>
</label>-->
</p>
</div>
<div class="form-group" ng-if="('1'|withRole) && !manager.admin && !manager.operator && orgs != null">
<div class="form-group" ng-if="('1'|withRole) && !manager.admin && !manager.operator && orgs != null && manager.bd">
<label class="control-label" for="org-select">Organization</label>
<select class="form-control" ng-model="manager.org_id" id="org-select"
ng-options="org.org_id as org.name for org in orgs"

@ -3,7 +3,7 @@
<h1>Notice Manage</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-sitemap"></i> Basic Config
<i class="fa fa-sitemap"></i> Content Management
</li>
<li class="active">Notice Manage</li>
</ol>

@ -42,8 +42,8 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
return $http.get('/sys/orgs/' + $stateParams.orgId);
}]
}
}).state('organizations.new', {
url: '/new_org',
}).state('newOrganizations', {
url: '/organizations/new_org',
templateUrl: '/static/config/organizations/templates/new_org.html',
controller: 'newOrgCtrl'
})
@ -369,7 +369,7 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
content: 'Creation of new organization succeeded',
type: 'success'
});
$state.go('^.detail',{orgId:resp.data.org_id},{reload:true});
$state.go('organizations.detail',{orgId:resp.data.org_id},{reload:true});
},function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})

@ -1,9 +1,9 @@
<section class="content-header">
<h1>New Organization</h1>
<ol class="breadcrumb">
<li><i class="fa fa-users"></i> Basic Config</li>
<li><i class="fa fa-users"></i> Framework</li>
<li>
<a ui-sref="^" ui-sref-opts="{reload:true}">Organizations</a>
<a ui-sref="organizations" ui-sref-opts="{reload:true}">Organizations</a>
</li>
<li class="active">New Organization</li>
</ol>
@ -304,7 +304,7 @@
<div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button" ng-click="saveOrg(org_form)">Save
</button>
<a class="btn btn-danger" role="button" ui-sref="^" ui-sref-opts="{reload:true}">Back</a>
<a class="btn btn-danger" role="button" ui-sref="organizations" ui-sref-opts="{reload:true}">Back</a>
</div>
<!--<button class="btn btn-success col-sm-offset-2" ng-click="update()"><i class="fa fa-save"></i> Update</button>-->
</form>

@ -11,7 +11,7 @@
<section class="content-header">
<h1 ng-bind="org.name"></h1>
<ol class="breadcrumb">
<li><i class="fa fa-users"></i> Basic Config</li>
<li><i class="fa fa-users"></i> Framework</li>
<li>
<a ui-sref="^" ui-sref-opts="{reload:true}">Organizations</a>
</li>

@ -27,7 +27,7 @@
<h1>Organizations</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-users"></i> Basic Config
<i class="fa fa-users"></i> Framework
</li>
<li class="active">Organizations</li>
</ol>
@ -114,7 +114,7 @@
</div>
</div>
<div class="col-xs-4 col-sm-6" style="text-align: right">
<a role="button" class="btn btn-success" type="button" ui-sref=".new"><i
<a role="button" class="btn btn-success" type="button" ui-sref="newOrganizations"><i
class="fa fa-plus"></i>
Add Organization</a>
</div>

@ -1,5 +1,12 @@
<section class="content-header">
<h1>City Partner Commissions</h1>
<ol class="breadcrumb">
<li><i class="fa fa-dollar"></i>Financial</li>
<li class="active">City Partner Commissions</li>
</ol>
</section>
<div class="content">
<div class="box box-default">
<div class="box box-default" ng-if="'10000000000000'|withRole">
<div class="box-body">
<div class="form-inline">
<div class="form-group">

@ -1,10 +1,10 @@
<!--<section class="content-header">-->
<!--<h1>Platform Revenue Report</h1>-->
<!--<ol class="breadcrumb">-->
<!--<li><i class="fa fa-dollar"></i>Analysis</li>-->
<!--<li class="active">Platform Revenue Report</li>-->
<!--</ol>-->
<!--</section>-->
<section class="content-header">
<h1>Platform Revenue Report</h1>
<ol class="breadcrumb">
<li><i class="fa fa-dollar"></i>Financial</li>
<li class="active">Platform Revenue Report</li>
</ol>
</section>
</br>
<div class="form-group col-sm-12">

@ -3,7 +3,7 @@
<h1>Settlement Validation</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-sitemap"></i> Payment
<i class="fa fa-sitemap"></i> Settlement
</li>
<li class="active">Settlement Validation</li>
</ol>

@ -13,15 +13,15 @@ define(['angular', 'uiRouter'], function (angular) {
url: '/basic',
templateUrl: '/static/config/sysconfigs/templates/basic.html',
controller: 'basicConfigCtrl'
}).state('sysconfig.permission', {
}).state('permission', {
url: '/permission',
templateUrl: '/static/config/sysconfigs/templates/permission_config.html',
controller: 'permissionConfigRootCtrl'
}).state('sysconfig.permission.functions', {
}).state('permission.functions', {
url: '/functions',
templateUrl: '/static/config/sysconfigs/templates/permission_functions.html',
controller: 'permissionFuncCtrl'
}).state('sysconfig.permission.modules', {
}).state('permission.modules', {
url: '/modules',
templateUrl: '/static/config/sysconfigs/templates/permission_modules.html',
controller: 'permissionModuleCtrl',
@ -34,7 +34,7 @@ define(['angular', 'uiRouter'], function (angular) {
url: '/mail',
templateUrl: '/static/config/sysconfigs/templates/mail_subscribe.html',
controller: 'mailSubscribeCtrl'
}).state('sysconfig.servantsConfig', {
}).state('servantsConfig', {
url: '/servantsConfig',
templateUrl: '/static/config/sysconfigs/templates/servants_config.html',
controller: 'servantsConfigCtrl'
@ -119,8 +119,8 @@ define(['angular', 'uiRouter'], function (angular) {
}
}]);
app.controller('permissionConfigRootCtrl', ['$scope', '$http', '$uibModal', function ($scope, $http, $uibModal) {
$scope.authorizeRole = function (roleMask) {
app.controller('permissionConfigRootCtrl', ['$scope', '$filter', '$http', '$uibModal','commonDialog', function ($scope, $filter, $http, $uibModal,commonDialog) {
/*$scope.authorizeRole = function (roleMask) {
$uibModal.open({
templateUrl: '/static/config/sysconfigs/templates/permission_authorize_dialog.html',
controller: 'permissionAuthorizeDialogCtrl',
@ -137,7 +137,47 @@ define(['angular', 'uiRouter'], function (angular) {
}
}
});
}
};*/
$scope.role = 1;
var roleParam = angular.copy($scope.role);
$scope.authorizeRole = function (roleMask) {
$scope.role = roleMask;
$http.get('/sys/permission/functions').then(function (resp) {
$scope.modules = resp.data;
});
$http.get('/sys/permission/roles/' + roleMask + '/functions').then(function (resp) {
$scope.authorized = resp.data;
});
};
$scope.submitAuthorize = function () {
commonDialog.confirm({
title: '修改角色接口权限',
content: '你确定修改当前角色接口权限吗?'
}).then(function () {
$http.put('/sys/permission/roles/' + $scope.role + '/functions', $scope.authorized).then(function () {
commonDialog.alert({title: 'Success', content: '修改成功.', type: 'success'})
}, function (resp) {
commonDialog.alert({type: 'error', title: 'Error', content: resp.data.message})
})
})
};
$scope.toggleAuthorize = function (func) {
var idx = $scope.authorized.indexOf(func.func_id);
if (idx >= 0) {
$scope.authorized.splice(idx, 1);
} else {
$scope.authorized.push(func.func_id);
}
};
$scope.moduleName = 'actChairty';
$scope.filterAuthorized = function (module) {
return module.module_name === $scope.moduleName;
};
$scope.switchModule = function (moduleName) {
$scope.moduleName = moduleName;
};
$scope.authorizeRole(roleParam);
}]);
app.controller('permissionAuthorizeDialogCtrl', ['$scope', '$http', 'authorized', 'modules', 'role',
function ($scope, $http, authorized, modules, role) {
@ -213,7 +253,14 @@ define(['angular', 'uiRouter'], function (angular) {
}).result.then(function () {
$scope.loadFunctions();
})
}
};
$scope.tabModuleName = 'no_module';
$scope.moduleTab = function(moduleName) {
$scope.tabModuleName = moduleName;
};
$scope.filterModFunctions = function (module) {
return module.module_name === $scope.tabModuleName;
};
}]
);
app.controller('permissionChooseModuleDialogCtrl', ['$scope', '$http', 'modules', function ($scope, $http, modules) {

@ -13,6 +13,54 @@
<label class="control-label" for="remark-input">Remark</label>
<input class="form-control" id="remark-input" ng-model="func.remark">
</div>
<div class="form-group">
<label class="control-label">Roles</label>
<p class="checkbox-inline checkbox">
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="func.admin" name="admin">Administrator
</label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="func.operator" name="operator">Compliance
</label>
<label>
<input type="checkbox" ng-model="func.bd" name="bd">BD User
</label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="func.finacial" name="finacial">Accountant
</label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="func.servant" name="servant">Service
</label>
<!--<label ng-if="!manager.admin && !manager.operator">-->
<!--<input type="checkbox" ng-model="manager.accountmanager" name="accountmanager">Account Manager-->
<!--</label>-->
<label>
<input type="checkbox" ng-model="func.director" name="director">Director
</label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="func.sitemanager" name="sitemanager">Markting
</label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="func.developer" name="developer">Developer
</label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="func.bdleader" name="bdleader">BD Leader
</label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="func.riskmanager" name="riskmanager">Risk Manager
</label>
<!-- <label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.orgmanager" name="orgmanager">Org Manager
</label>-->
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="func.salesmanager" name="salesmanager">Sales Manager
</label>
<!-- <label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.datacontent" name="datacontent">Data Content
</label>-->
</p>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" ng-click="modifyFunction()">Save</button>

@ -1,8 +1,16 @@
<style>
.isSelect{
color:#337ab7;
}
.tab-content a:hover {
color:#337ab7;
}
</style>
<section class="content-header">
<h1>Permission Config</h1>
<ol class="breadcrumb">
<li>
<a ui-sref="^"><i class="fa fa-cog"></i> System Config</a>
<a ui-sref="^"><i class="fa fa-cog"></i> Framework</a>
</li>
<li>Permission Config</li>
</ol>
@ -13,7 +21,7 @@
<div class="nav-tabs-custom">
<ul class="nav nav-tabs">
<li ui-sref-active-eq="active">
<a ui-sref="sysconfig.permission">Permissions</a>
<a ui-sref="permission">Permissions</a>
</li>
<li ui-sref-active="active">
<a ui-sref=".functions">Functions</a>
@ -23,54 +31,81 @@
</li>
</ul>
<div class="tab-content" ui-view>
<a class="btn btn-app" role="button" ng-click="authorizeRole('1')">
<a class="btn btn-app" ng-class="{'isSelect':role=='1'}" role="button" ng-click="authorizeRole('1')">
<i class="fa fa-user-secret"></i>
Administrator
</a>
<a class="btn btn-app" role="button" ng-click="authorizeRole('10')">
<a class="btn btn-app" ng-class="{'isSelect':role=='10'}" role="button" ng-click="authorizeRole('10')">
<i class="fa fa-eye"></i>
Compliance
</a>
<a class="btn btn-app" role="button" ng-click="authorizeRole('100')">
<a class="btn btn-app" ng-class="{'isSelect':role=='100'}" role="button" ng-click="authorizeRole('100')">
<i class="fa fa-crosshairs"></i>
BD User
</a>
<a class="btn btn-app" role="button" ng-click="authorizeRole('1000')">
<a class="btn btn-app" ng-class="{'isSelect':role=='1000'}" role="button" ng-click="authorizeRole('1000')">
<i class="fa fa-balance-scale"></i>
Accountant
</a>
<a class="btn btn-app" role="button" ng-click="authorizeRole('10000')">
<a class="btn btn-app" ng-class="{'isSelect':role=='10000'}" role="button" ng-click="authorizeRole('10000')">
<i class="fa fa-tty"></i>
Service
</a>
<a class="btn btn-app" role="button" ng-click="authorizeRole('100000')">
<i class="fa fa-university"></i>
Account Manager
</a>
<a class="btn btn-app" role="button" ng-click="authorizeRole('1000000')">
<!--<a class="btn btn-app" role="button" ng-click="authorizeRole('100000')">-->
<!--<i class="fa fa-university"></i>-->
<!--Account Manager-->
<!--</a>-->
<a class="btn btn-app" ng-class="{'isSelect':role=='1000000'}" role="button" ng-click="authorizeRole('1000000')">
<i class="fa fa-line-chart"></i>
Director
</a>
<a class="btn btn-app" role="button" ng-click="authorizeRole('10000000')">
<a class="btn btn-app" ng-class="{'isSelect':role=='10000000'}" role="button" ng-click="authorizeRole('10000000')">
<i class="fa fa-map-o"></i>
Site Manager
Markting
</a>
<a class="btn btn-app" role="button" ng-click="authorizeRole('100000000')">
<a class="btn btn-app" ng-class="{'isSelect':role=='100000000'}" role="button" ng-click="authorizeRole('100000000')">
<i class="fa fa-code"></i>
Developer
</a>
<a class="btn btn-app" role="button" ng-click="authorizeRole('1000000000')">
<a class="btn btn-app" ng-class="{'isSelect':role=='10000000000'}" role="button" ng-click="authorizeRole('10000000000')">
<i class="fa fa-user"></i>
Risk Manager
</a>
<a class="btn btn-app" role="button" ng-click="authorizeRole('100000000000')">
<a class="btn btn-app" ng-class="{'isSelect':role=='100000000000'}" role="button" ng-click="authorizeRole('100000000000')">
<i class="fa fa-tripadvisor"></i>
GUEST
</a>
<a class="btn btn-app" role="button" ng-click="authorizeRole('1000000000000')">
<i class="fa fa-user-plus"></i>
Org Manager
<!--<a class="btn btn-app" role="button" ng-click="authorizeRole('1000000000000')">-->
<!--<i class="fa fa-user-plus"></i>-->
<!--Org Manager-->
<!--</a>-->
<a class="btn btn-app" ng-class="{'isSelect':role=='10000000000000'}" role="button" ng-click="authorizeRole('10000000000000')">
<i class="fa fa-ticket"></i>
Sales Manager
</a>
<div class="box box-warning">
<div class="box-header with-border">权限
<button style="float: right;" class="btn btn-success" ng-click="submitAuthorize()">Submit</button>
</div>
<div class="box-body">
<div class="row">
<div class="col-sm-4 col-xs-1" style="height:800px;overflow-y:scroll;">
<a role="button" ng-class="{active:mod.module_name==moduleName}" ng-click="switchModule(mod.module_name)" class="list-group-item" ng-repeat="mod in modules.modules" ng-bind="mod.module_name+' - '+mod.remark"></a>
</div>
<div class="col-sm-8 col-xs-1">
<div ng-repeat="mod in modules.modules| filter:filterAuthorized">
<a role="button" class="list-group-item" ng-repeat="func in mod.funcs" ng-bind="func.func_id+(func.remark?'('+func.remark+')':'')"
ng-class="{active:authorized.indexOf(func.func_id)>=0}" ng-click="toggleAuthorize(func)">
</a>
</div>
</div>
</div>
</div>
</div>
<!--<a class="btn btn-app" role="button" ng-click="authorizeRole('100000000000000')">-->
<!--<i class="fa fa-save"></i>-->
<!--Data Content-->
<!--</a>-->
</div>
</div>
</div>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save