Merge branch 'develop_app_0307' into develop

# Conflicts:
#	src/main/ui/manage.html
#	src/main/ui/static/menu/templates/main_menu.html
#	src/main/ui/static/payment/partner/partner-manage.js
master
luoyang 6 years ago
commit 78ff2e2df1

@ -0,0 +1,480 @@
package au.com.royalpay.payment.manage.appclient.beans;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateUtils;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
public class AppMerchantBean {
private final DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
private String textType;
private String searchText;
private String client_moniker;
private String state;
private String suburb;
private String short_name;
private String sub_merchant_id;
private String org_id;
private String org_ids;
private String bd;
private String business_structure;
private String industry;
private Integer clean_day;
private String bd_city;
private String surcharge_start_rate;
private String surcharge_end_rate;
private String create_start_time;
private String approve_start_time;
private String create_end_time;
private String approve_end_time;
private String transaction_start_time;
private String transaction_end_time;
private boolean approving = false;
private int page = 1;
private int limit = 10;
private boolean onlyMe = false;
private boolean tempMchId = false;
private boolean quickPass = false;
private boolean greenChannel = false;
private boolean greenChannelBdTodo = false;
private boolean pass = false;
private boolean completed_contract = false;
private boolean apply_to_back = false;
private boolean bd_upload_material = false;
private boolean is_valid = false;
private String merchant_id;
private int status;
public String getClient_moniker() {
return StringUtils.isEmpty(client_moniker) ? null : client_moniker;
}
public void setClient_moniker(String client_moniker) {
this.client_moniker = client_moniker;
}
public String getShort_name() {
return short_name;
}
public void setShort_name(String short_name) {
this.short_name = short_name;
}
public String getSub_merchant_id() {
return sub_merchant_id;
}
public void setSub_merchant_id(String sub_merchant_id) {
this.sub_merchant_id = sub_merchant_id;
}
public int getPage() {
return page;
}
public void setPage(int page) {
this.page = page;
}
public int getLimit() {
return limit;
}
public void setLimit(int limit) {
this.limit = limit;
}
public JSONObject toJsonParam() {
JSONObject param = new JSONObject();
if (StringUtils.isNotBlank(client_moniker)) {
param.put("client_moniker", getClient_moniker());
}
if (StringUtils.isNotBlank(short_name)) {
param.put("short_name", short_name);
}
if (StringUtils.isNotBlank(sub_merchant_id)) {
param.put("sub_merchant_id", sub_merchant_id);
}
if (StringUtils.isNotBlank(state)) {
param.put("state", state);
}
if (StringUtils.isNotBlank(suburb)) {
param.put("suburb", suburb);
}
if (StringUtils.isNotBlank(searchText)) {
param.put("search_text", searchText);
if (StringUtils.isNotBlank(textType)) {
param.put("text_type", textType);
} else {
param.put("text_type", "all");
}
}
if (approving) {
param.put("approving", true);
}
if (org_id != null) {
param.put("org_id", org_id);
}
if (org_ids != null) {
param.put("org_ids", org_ids);
}
if (StringUtils.isNotBlank(bd)) {
param.put("bd_user", bd);
}
if (quickPass){
param.put("quickPass",true);
}
if (greenChannel){
param.put("greenChannel",true);
}
if (business_structure!=null && !business_structure.equals("")){
param.put("business_structure",business_structure);
}
if (industry!=null && !industry.equals("")){
param.put("industry",industry);
}
if (bd_city!=null && !bd_city.equals("")){
param.put("bd_city",bd_city);
}
if (clean_day!=null){
param.put("clean_day",clean_day);
}
if (surcharge_start_rate!=null) {
param.put("surcharge_start_rate",surcharge_start_rate);
}
if (surcharge_end_rate!=null){
param.put("surcharge_end_rate",surcharge_end_rate);
}
if (transaction_start_time != null) {
try {
param.put("transaction_start_time", format.parse(transaction_start_time));
} catch (ParseException e) {
throw new ParamInvalidException("transaction_start_time", "error.payment.valid.invalid_date_format");
}
}
if (transaction_end_time != null) {
try {
param.put("transaction_end_time", DateUtils.addDays(format.parse(transaction_end_time), 1));
} catch (ParseException e) {
throw new ParamInvalidException("transaction_end_time", "error.payment.valid.invalid_date_format");
}
}
if (create_start_time != null) {
try {
param.put("create_start_time", format.parse(create_start_time));
} catch (ParseException e) {
throw new ParamInvalidException("create_start_time", "error.payment.valid.invalid_date_format");
}
}
if (create_end_time != null) {
try {
param.put("create_end_time", DateUtils.addDays(format.parse(create_end_time), 1));
} catch (ParseException e) {
throw new ParamInvalidException("create_end_time", "error.payment.valid.invalid_date_format");
}
}
if (approve_start_time != null) {
try {
param.put("approve_start_time", format.parse(approve_start_time));
} catch (ParseException e) {
throw new ParamInvalidException("approve_start_time", "error.payment.valid.invalid_date_format");
}
}
if (approve_end_time != null) {
try {
param.put("approve_end_time", DateUtils.addDays(format.parse(approve_end_time), 1));
} catch (ParseException e) {
throw new ParamInvalidException("approve_end_time", "error.payment.valid.invalid_date_format");
}
}
if (greenChannelBdTodo){
param.put("greenChannelBdTodo",true);
}
if (is_valid){
param.put("is_valid",true);
}
if (pass){
param.put("pass",true);
}
if (completed_contract){
param.put("completed_contract",true);
}
if (apply_to_back){
param.put("apply_to_back",true);
}
if (bd_upload_material){
param.put("bd_upload_material",true);
}
if (merchant_id != null){
param.put("merchant_id",merchant_id);
}
return param;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
public String getTextType() {
return textType;
}
public void setTextType(String textType) {
this.textType = textType;
}
public String getSearchText() {
return searchText;
}
public void setSearchText(String searchText) {
this.searchText = searchText;
}
public String getOrg_id() {
return org_id;
}
public void setOrg_id(String org_id) {
this.org_id = org_id;
}
public void setOnlyMe(boolean onlyMe) {
this.onlyMe = onlyMe;
}
public boolean getOnlyMe() {
return onlyMe;
}
public boolean isTempMchId() {
return tempMchId;
}
public void setTempMchId(boolean tempMchId) {
this.tempMchId = tempMchId;
}
public String getBusiness_structure() {
return business_structure;
}
public void setBusiness_structure(String business_structure) {
this.business_structure = business_structure;
}
public String getIndustry() {
return industry;
}
public void setIndustry(String industry) {
this.industry = industry;
}
public Integer getClean_day() {
return clean_day;
}
public void setClean_day(Integer clean_day) {
this.clean_day = clean_day;
}
public String getBd_city() {
return bd_city;
}
public void setBd_city(String bd_city) {
this.bd_city = bd_city;
}
public String getCreate_start_time() {
return create_start_time;
}
public void setCreate_start_time(String create_start_time) {
this.create_start_time = create_start_time;
}
public String getApprove_start_time() {
return approve_start_time;
}
public void setApprove_start_time(String approve_start_time) {
this.approve_start_time = approve_start_time;
}
public String getCreate_end_time() {
return create_end_time;
}
public void setCreate_end_time(String create_end_time) {
this.create_end_time = create_end_time;
}
public String getApprove_end_time() {
return approve_end_time;
}
public void setApprove_end_time(String approve_end_time) {
this.approve_end_time = approve_end_time;
}
public String getSurcharge_start_rate() {
return surcharge_start_rate;
}
public void setSurcharge_start_rate(String surcharge_start_rate) {
this.surcharge_start_rate = surcharge_start_rate;
}
public String getTransaction_start_time() {
return transaction_start_time;
}
public void setTransaction_start_time(String transaction_start_time) {
this.transaction_start_time = transaction_start_time;
}
public String getTransaction_end_time() {
return transaction_end_time;
}
public void setTransaction_end_time(String transaction_end_time) {
this.transaction_end_time = transaction_end_time;
}
public String getSurcharge_end_rate() {
return surcharge_end_rate;
}
public void setSurcharge_end_rate(String surcharge_end_rate) {
this.surcharge_end_rate = surcharge_end_rate;
}
public boolean isOnlyMe() {
return onlyMe;
}
public boolean isApproving() {
return approving;
}
public void setApproving(boolean approving) {
this.approving = approving;
}
public boolean isQuickPass() {
return quickPass;
}
public void setQuickPass(boolean quickPass) {
this.quickPass = quickPass;
}
public boolean isGreenChannel() {
return greenChannel;
}
public void setGreenChannel(boolean greenChannel) {
this.greenChannel = greenChannel;
}
public void setGreenChannelAndBDtodo(boolean bDTodo){
this.greenChannelBdTodo = bDTodo;
}
public void setIs_valid(boolean is_valid){
this.is_valid=is_valid;
}
public DateFormat getFormat() {
return format;
}
public boolean isGreenChannelBdTodo() {
return greenChannelBdTodo;
}
public void setGreenChannelBdTodo(boolean greenChannelBdTodo) {
this.greenChannelBdTodo = greenChannelBdTodo;
}
public boolean isPass() {
return pass;
}
public void setPass(boolean pass) {
this.pass = pass;
}
public boolean isCompleted_contract() {
return completed_contract;
}
public void setCompleted_contract(boolean completed_contract) {
this.completed_contract = completed_contract;
}
public boolean isApply_to_back() {
return apply_to_back;
}
public void setApply_to_back(boolean apply_to_back) {
this.apply_to_back = apply_to_back;
}
public boolean isBd_upload_material() {
return bd_upload_material;
}
public void setBd_upload_material(boolean bd_upload_material) {
this.bd_upload_material = bd_upload_material;
}
public boolean isIs_valid() {
return is_valid;
}
public String getOrg_ids() {
return org_ids;
}
public void setOrg_ids(String org_ids) {
this.org_ids = org_ids;
}
public void setBd(String bd) {
this.bd = bd;
}
public String getMerchant_id() {
return merchant_id;
}
public void setMerchant_id(String merchant_id) {
this.merchant_id = merchant_id;
}
public String getSuburb() {
return suburb;
}
public void setSuburb(String suburb) {
this.suburb = suburb;
}
public void setStatus(int status) {
this.status = status;
}
public int getStatus() {
return status;
}
}

@ -0,0 +1,79 @@
package au.com.royalpay.payment.manage.appclient.core;
import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean;
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.product.beans.ProductBean;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import com.alibaba.fastjson.JSONObject;
import java.util.Date;
import java.util.List;
import java.util.Map;
public interface ManageAppService {
void updateDevToken(JSONObject device, String devToken);
void updateDevTokenStatus(String devId, int status);
JSONObject getDevTokenByDevId(String dev_id);
void sign_out(JSONObject device);
void changeAccountPassword(JSONObject device, ChangePwdBean change, String manager_id);
List<JSONObject> getReferrerList(JSONObject device);
JSONObject registerClient(JSONObject device, ClientRegisterInfo registery);
void updateClientRegisterInfo(JSONObject device, String clientMoniker, ClientRegisterInfo info);
void disableClientRegisterInfo(JSONObject device, String clientMoniker);
JSONObject listPartners(JSONObject device, AppMerchantBean query);
JSONObject clientDetail(JSONObject device, String clientMoniker);
JSONObject clientBankAccount(JSONObject device, String clientMoniker);
void saveBankAccount(JSONObject device, String clientMoniker, BankAccountInfo bankAccount);
void newConfigRate(JSONObject device, String clientMoniker, JSONObject config);
void commitToGreenChannel(JSONObject device, String clientMoniker);
void commitToDoAgreeFile(JSONObject device, String clientMoniker);
void commitToCompliance(JSONObject device, String clientMoniker);
JSONObject getAuthFiles(JSONObject device, String clientMoniker);
void uploadAuthFiles(JSONObject device, String clientMoniker, ClientAuthFilesInfo filesInfo);
Map<String, List<JSONObject>> getRates(JSONObject device, String clientMoniker);
JSONObject getConfigRates(JSONObject device);
JSONObject getNewVersion(JSONObject device);
JSONObject getCommons(JSONObject device);
List<JSONObject> getOrgPrizeList(JSONObject device);
JSONObject getBdConfigKpi(JSONObject device);
List<JSONObject> getBdPrizeList(JSONObject device);
JSONObject getPrizeRulesUrl(JSONObject device);
JSONObject listProduct(JSONObject device, ProductBean productBean);
void saveProduct(JSONObject device, ProductBean productBean);
void updateProduct(JSONObject device, ProductBean productBean);
void deleteProduct(JSONObject device, String commodity_id);
}

@ -0,0 +1,433 @@
package au.com.royalpay.payment.manage.appclient.core.impls;
import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean;
import au.com.royalpay.payment.manage.appclient.core.ManageAppService;
import au.com.royalpay.payment.manage.bdprize.core.BDPrizeService;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDPrizeLogMapper;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDPrizeRecordMapper;
import au.com.royalpay.payment.manage.mappers.financial.FinancialPartnerCommissionMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientMapper;
import au.com.royalpay.payment.manage.mappers.system.ManageDeviceTokenMapper;
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.product.beans.ProductBean;
import au.com.royalpay.payment.manage.product.core.ClientProduct;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.manage.signin.core.ManagerAccountsService;
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
import au.com.royalpay.payment.tools.device.DeviceSupport;
import au.com.royalpay.payment.tools.device.ManageDeviceSupport;
import au.com.royalpay.payment.tools.device.support.DeviceRegister;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
import java.util.stream.Collectors;
@Service
public class ManageAppServiceImp implements ManageAppService {
@Resource
private ManageDeviceSupport manageDeviceSupport;
@Resource
private OrgMapper orgMapper;
@Resource
private ManagerMapper managerMapper;
@Resource
private ClientManager clientManager;
@Resource
private ClientMapper clientMapper;
@Resource
private SignInAccountService signInAccountService;
@Resource
private ManageDeviceTokenMapper manageDeviceTokenMapper;
@Resource
private FinancialBDPrizeRecordMapper financialBDPrizeRecordMapper;
@Resource
private FinancialBDPrizeLogMapper financialBDPrizeLogMapper;
@Resource
private FinancialPartnerCommissionMapper financialPartnerCommissionMapper;
@Resource
private BDPrizeService bdPrizeService;
@Resource
private FinancialBDConfigMapper financialBDConfigMapper;
@Resource
private ClientProduct clientProduct;
@Override
public void updateDevToken(JSONObject device, String devToken) {
manageDeviceSupport.updateDeviceMessageToken(device, devToken);
}
@Override
public void sign_out(JSONObject device) {
String clientType = device.getString("client_type");
DeviceRegister register = manageDeviceSupport.findRegister(clientType);
register.manageSignout(device);
}
@Override
public void changeAccountPassword(JSONObject device, ChangePwdBean change, String manager_id) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
// JSONObject client = signInAccountService.getClient(account_id);
if (!manager_id.equals(device.getString("manager_id"))) {
throw new ForbiddenException("You have no permission");
}
signInAccountService.changeManagerPassword(device, change);
updateDevTokenStatus(device.getString("dev_id"), 0);
}
@Override
public List<JSONObject> getReferrerList(JSONObject device) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
return orgMapper.listOrgs(1,new PageBounds());
}
@Override
public JSONObject registerClient(JSONObject device, ClientRegisterInfo registery) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
return clientManager.registerClient(null, registery, manager);
}
@Override
public void updateClientRegisterInfo(JSONObject device, String clientMoniker, ClientRegisterInfo info) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientManager.updateClientRegisterInfo(manager, clientMoniker, info);
}
@Override
public void disableClientRegisterInfo(JSONObject device, String clientMoniker) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientManager.disableClient(clientMoniker,manager);
}
@Override
public JSONObject listPartners(JSONObject device, AppMerchantBean query) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
switch (query.getStatus()) {
case 0:
query.setIs_valid(true);
break;
case 1:
query.setPass(true);
break;
case 2:
query.setApproving(true);
break;
case 3:
query.setCompleted_contract(true);
query.setBd_upload_material(true);
break;
case 4:
break;
case 5:
query.setApply_to_back(true);
break;
case 6:
query.setGreenChannel(true);
break;
case 7:
query.setQuickPass(true);
break;
}
query.setOnlyMe(true);
return clientManager.listClientsByApp(manager, query);
}
@Override
public JSONObject clientDetail(JSONObject device, String clientMoniker) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
return clientManager.clientDetail(manager, clientMoniker);
}
@Override
public JSONObject clientBankAccount(JSONObject device, String clientMoniker) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
return clientManager.listClientBankAccounts(manager, clientMoniker);
}
@Override
public void saveBankAccount(JSONObject device, String clientMoniker, BankAccountInfo bankAccount) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientManager.saveBankAccount(manager, clientMoniker, bankAccount);
}
@Override
public Map<String, List<JSONObject>> getRates(JSONObject device, String clientMoniker) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
List<JSONObject> rates = clientManager.clientRates(clientMoniker, true);
return rates.stream().collect(Collectors.groupingBy(e -> e.getString("rate_name"),HashMap::new,Collectors.toList()));
}
@Override
public JSONObject getConfigRates(JSONObject device) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
return clientManager.getSysRateConfig();
}
@Override
public void newConfigRate(JSONObject device, String clientMoniker, JSONObject config) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientManager.newConfigRate(manager, clientMoniker, config);
}
@Override
public void commitToGreenChannel(JSONObject device, String clientMoniker) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientManager.commitToGreenChannel(clientMoniker, manager);
}
@Override
public void commitToDoAgreeFile(JSONObject device, String clientMoniker) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientManager.commitToDoAgreeFile(clientMoniker, manager);
}
@Override
public void commitToCompliance(JSONObject device, String clientMoniker) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientManager.commitToCompliance(clientMoniker, manager);
}
@Override
public JSONObject getAuthFiles(JSONObject device, String clientMoniker) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
return clientManager.getAuthFiles(manager, clientMoniker);
}
@Override
public void uploadAuthFiles(JSONObject device, String clientMoniker, ClientAuthFilesInfo filesInfo) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientManager.uploadAuthFiles(manager, clientMoniker,filesInfo);
}
@Override
public void updateDevTokenStatus(String devId, int status) {
JSONObject devTokenObj = getDevTokenByDevId(devId);
if (devTokenObj != null) {
devTokenObj.put("is_valid", status);
manageDeviceTokenMapper.update(devTokenObj);
}
}
@Override
@Cacheable(value = ":manage_dev_message_token:", key = "#dev_id")
public JSONObject getDevTokenByDevId(String dev_id) {
return manageDeviceTokenMapper.findByDevId(dev_id);
}
@Override
public JSONObject getNewVersion(JSONObject device) {
String version = device.getString("version");
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
String newAppVersion = PlatformEnvironment.getEnv().getNewVersion(clientType);
Boolean isUpdate = PlatformEnvironment.getEnv().isAppUpdate(clientType);
String updateContent = PlatformEnvironment.getEnv().getAppUpdateContent(clientType);
int update_type = 0;// 0:不更新 1更新 2强制更新
String[] oldVersion = version.split("\\.");
String[] newVersion = newAppVersion.split("\\.");
JSONObject res = new JSONObject();
res.put("update_content", updateContent);
for (int i = 0; i < newVersion.length; i++) {
if (Integer.valueOf(newVersion[i]) > Integer.valueOf(oldVersion[i])) {
update_type = 1;
if (isUpdate) {
update_type = 2;
}
res.put("update_type", update_type);
return res;
} else if (Integer.valueOf(newVersion[i]) < Integer.valueOf(oldVersion[i])) {
res.put("update_type", update_type);
return res;
}
}
res.put("update_type", update_type);
return res;
}
@Override
public JSONObject getCommons(JSONObject device) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
JSONObject countBdClients = clientMapper.countBdApproveClients(manager.getString("manager_id"));
if (countBdClients == null) {
countBdClients = new JSONObject();
countBdClients.put("approving", 0);
countBdClients.put("pass", 0);
countBdClients.put("this_months_pass", 0);
}
JSONObject result;
switch (manager.getIntValue("org_id")) {
case 1:
result = bdCommons(manager);
break;
default:
result = orgCommons(manager);
break;
}
result.putAll(countBdClients);
return result;
}
private JSONObject bdCommons(JSONObject manager) {
Calendar monthCal = Calendar.getInstance();
monthCal.setTime(new Date());
monthCal.set(Calendar.MONTH, (monthCal.get(Calendar.MONTH) - 1));
Date date = monthCal.getTime();
JSONObject totalDetail = new JSONObject();
totalDetail.put("date", DateFormatUtils.format(date, "yyyy-MM"));
totalDetail.put("total_amount", BigDecimal.ZERO);
totalDetail.put("total_prize", BigDecimal.ZERO);
totalDetail.put("total_donation", BigDecimal.ZERO);
totalDetail.put("send_prize", BigDecimal.ZERO);
totalDetail.put("hold_prize", BigDecimal.ZERO);
totalDetail.put("last_punish", BigDecimal.ZERO);
JSONObject report = financialBDPrizeRecordMapper.getReport(DateFormatUtils.format(date, "yyyy-MM"));
if (report != null) {
totalDetail.putAll(financialBDPrizeLogMapper.findByReportAndBDTotal(report.getString("record_id"), manager.getString("manager_id")));
}
return totalDetail;
}
private JSONObject orgCommons(JSONObject manager) {
Calendar monthCal = Calendar.getInstance();
monthCal.setTime(new Date());
monthCal.set(Calendar.MONTH, (monthCal.get(Calendar.MONTH) - 1));
JSONObject total = financialPartnerCommissionMapper.findTotalByOrg(monthCal.get(Calendar.YEAR), monthCal.get(Calendar.MONTH)+1, manager.getString("org_id"));
if (total == null) {
total = new JSONObject();
total.put("total_amount", BigDecimal.ZERO);
total.put("total_prize", BigDecimal.ZERO);
}
total.put("date", DateFormatUtils.format(monthCal.getTime(), "yyyy-MM"));
return total;
}
@Override
public List<JSONObject> getOrgPrizeList(JSONObject device) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
List<JSONObject> orgPrizeList = financialPartnerCommissionMapper.getOrgPrizeList(manager.getString("org_id"));
for (JSONObject params : orgPrizeList) {
params.put("data", financialPartnerCommissionMapper.find(params.getIntValue("year"), params.getIntValue("month"), manager.getString("org_id")));
}
return orgPrizeList;
}
@Override
public JSONObject getBdConfigKpi(JSONObject device) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
return financialBDConfigMapper.getBDConfigById(manager.getString("manager_id"));
}
@Override
public List<JSONObject> getBdPrizeList(JSONObject device) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
List<JSONObject> listBdPrizeLogByOne = financialBDPrizeLogMapper.listBdPrizeLogByOne(manager.getString("manager_id"));
for (JSONObject log : listBdPrizeLogByOne) {
log.put("data", financialBDPrizeLogMapper.findReportByOne(log.getString("record_id"), manager.getString("manager_id")));
}
return listBdPrizeLogByOne;
}
@Override
public JSONObject getPrizeRulesUrl(JSONObject device) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
JSONObject result = new JSONObject();
if (manager.getIntValue("org_id") == 1) {
result.put("url", "http://192.168.0.49:9002/app/rules/bd");
} else {
result.put("url", "http://192.168.0.49:9002/app/rules/org");
}
return result;
}
@Override
public JSONObject listProduct(JSONObject device, ProductBean productBean) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
return clientProduct.listAllProduct(manager, productBean);
}
@Override
public void saveProduct(JSONObject device, ProductBean productBean) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientProduct.saveProduct(manager, productBean);
}
@Override
public void updateProduct(JSONObject device, ProductBean productBean) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientProduct.updateProduct(manager, productBean);
}
@Override
public void deleteProduct(JSONObject device, String commodity_id) {
String clientType = device.getString("client_type");
manageDeviceSupport.findRegister(clientType);
JSONObject manager = managerMapper.findById(device.getString("manager_id"));
clientProduct.deleteProduct(manager, commodity_id);
}
}

@ -0,0 +1,203 @@
package au.com.royalpay.payment.manage.appclient.web;
import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean;
import au.com.royalpay.payment.manage.appclient.core.ManageAppService;
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.PartnerQuery;
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
import au.com.royalpay.payment.manage.product.beans.ProductBean;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient;
import au.com.royalpay.payment.tools.device.manageadvise.AppClientController;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.http.HttpUtils;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;
@AppClientController
@RequestMapping("/api/v1.0/manage/app")
public class ManageAppController {
@Resource
private ManageAppService manageAppService;
@Resource
private AttachmentClient attachmentClient;
@RequestMapping(value = "/token", method = RequestMethod.PUT)
public void updateDevToken(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @RequestBody JSONObject token) {
manageAppService.updateDevToken(device, token.getString("devToken"));
}
@RequestMapping(value = "/sign_out", method = RequestMethod.PUT)
public void signOut(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.sign_out(device);
}
@RequestMapping(value = "/manager_password/{manager_id}", method = RequestMethod.PUT)
public void changePassword(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @PathVariable String manager_id,
@RequestBody @Valid ChangePwdBean change, Errors errors) {
HttpUtils.handleValidErrors(errors);
manageAppService.changeAccountPassword(device, change, manager_id);
}
@RequestMapping(value = "/referrer", method = RequestMethod.GET)
public List<JSONObject> getReferrerList(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getReferrerList(device);
}
@RequestMapping(value = "/attachment/files", method = RequestMethod.POST)
public JSONObject uploadImage(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @RequestParam MultipartFile file) throws Exception {
return attachmentClient.uploadFile(file, false);
}
@RequestMapping(value = "/merchant/register", method = RequestMethod.POST)
public JSONObject registerPartner(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @RequestBody @Valid ClientRegisterInfo registery,
Errors errors) {
HttpUtils.handleValidErrors(errors);
return manageAppService.registerClient(device, registery);
}
@RequestMapping(value = "/merchant/{clientMoniker}/update", method = RequestMethod.PUT)
public void updatePartnerInfo(@PathVariable String clientMoniker, @RequestBody ClientRegisterInfo info,
@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.updateClientRegisterInfo(device, clientMoniker, info);
}
@RequestMapping(value = "/merchant/{clientMoniker}/delete", method = RequestMethod.PUT)
public void disablePartnerInfo(@PathVariable String clientMoniker,
@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.disableClientRegisterInfo(device, clientMoniker);
}
@RequestMapping(value = "/merchants", method = RequestMethod.GET)
public JSONObject listPartners(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, AppMerchantBean query) {
return manageAppService.listPartners(device, query);
}
@RequestMapping(value = "/merchant/{clientMoniker}/detail", method = RequestMethod.GET)
public JSONObject getClientByMoniker(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.clientDetail(device, clientMoniker);
}
@RequestMapping(value = "/merchant/{clientMoniker}/bank_account", method = RequestMethod.GET)
public JSONObject getBankAccount(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.clientBankAccount(device, clientMoniker);
}
@RequestMapping(value = "/merchant/{clientMoniker}/bank_account", method = RequestMethod.PUT)
public void saveBankAccount(@PathVariable String clientMoniker, @RequestBody @Valid BankAccountInfo bankAccount, Errors errors,
@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
HttpUtils.handleValidErrors(errors);
manageAppService.saveBankAccount(device, clientMoniker, bankAccount);
}
@RequestMapping(value = "/merchant/{clientMoniker}/rates", method = RequestMethod.GET)
public Map<String,List<JSONObject>> getRates(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getRates(device, clientMoniker);
}
@RequestMapping(value = "/merchant/rate_config", method = RequestMethod.GET)
public JSONObject getConfigRates(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getConfigRates(device);
}
@RequestMapping(value = "/merchant/{clientMoniker}/rates", method = RequestMethod.POST)
public void newRate(@PathVariable String clientMoniker, @RequestBody JSONObject config, Errors errors,
@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
HttpUtils.handleValidErrors(errors);
manageAppService.newConfigRate(device, clientMoniker, config);
}
@RequestMapping(value = "/merchant/{clientMoniker}/compliance/green_channel", method = RequestMethod.PUT)
public void commitToGreenChannel(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.commitToGreenChannel(device, clientMoniker);
}
@RequestMapping(value = "/merchant/{clientMoniker}/make_agree_file", method = RequestMethod.PUT)
public void commitToDoAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.commitToDoAgreeFile(device, clientMoniker);
}
@RequestMapping(value = "/merchant/{clientMoniker}/to_compliance", method = RequestMethod.PUT)
public void commitToCompliance(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.commitToCompliance(device, clientMoniker);
}
@RequestMapping(value = "/merchant/{clientMoniker}/file", method = RequestMethod.GET)
public JSONObject getAuthFiles(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getAuthFiles(device, clientMoniker);
}
@RequestMapping(value = "/merchant/{clientMoniker}/file", method = RequestMethod.PUT)
public void uploadAuthFiles(@PathVariable String clientMoniker, @RequestBody ClientAuthFilesInfo filesInfo, @ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
manageAppService.uploadAuthFiles(device, clientMoniker, filesInfo);
}
@RequestMapping(value = "/version", method = RequestMethod.GET)
public JSONObject getAppVersion(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getNewVersion(device);
}
@RequestMapping(value = "/commons", method = RequestMethod.GET)
public JSONObject getCommons(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getCommons(device);
}
@RequestMapping(value = "/org_prize/list", method = RequestMethod.GET)
public List<JSONObject> getOrgPrizeList(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getOrgPrizeList(device);
}
@RequestMapping(value = "/bd/kpi", method = RequestMethod.GET)
public JSONObject getBdConfigKpi(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getBdConfigKpi(device);
}
@RequestMapping(value = "/bd/list", method = RequestMethod.GET)
public List<JSONObject> getBdPrizeList(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getBdPrizeList(device);
}
@RequestMapping(value = "/prize/rules", method = RequestMethod.GET)
public JSONObject getPrizeRulesUrl(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device) {
return manageAppService.getPrizeRulesUrl(device);
}
@RequestMapping(value = "/product/list", method = RequestMethod.GET)
public JSONObject listProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, ProductBean productBean) {
return manageAppService.listProduct(device, productBean);
}
@RequestMapping(value = "/product/save", method = RequestMethod.POST)
public void saveProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device,@RequestBody ProductBean productBean) {
manageAppService.saveProduct(device, productBean);
}
@RequestMapping(value = "/product/update", method = RequestMethod.PUT)
public void updateProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device,@RequestBody ProductBean productBean) {
manageAppService.updateProduct(device, productBean);
}
@RequestMapping(value = "/product/delete/{commodity_id}", method = RequestMethod.PUT)
public void deleteProduct(@ModelAttribute(CommonConsts.MANAGER_DEVICE) JSONObject device, @PathVariable String commodity_id) {
manageAppService.deleteProduct(device, commodity_id);
}
}

@ -5,8 +5,11 @@ import au.com.royalpay.payment.manage.appclient.core.RetailAppService;
import au.com.royalpay.payment.manage.signin.core.SignInStatusManager;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.device.DeviceSupport;
import au.com.royalpay.payment.tools.device.ManageDeviceSupport;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.http.HttpUtils;
import au.com.royalpay.payment.tools.locale.LocaleSupport;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.google.code.kaptcha.Producer;
@ -38,6 +41,8 @@ public class RetailValidationController {
@Resource
private DeviceSupport deviceSupport;
@Resource
private ManageDeviceSupport manageDeviceSupport;
@Resource
private RetailAppService retailAppService;
@RequestMapping(value = "/devices/{devType}/register", method = RequestMethod.POST)
@ -45,6 +50,11 @@ public class RetailValidationController {
return deviceSupport.register(devType, registeration);
}
@RequestMapping(value = "/devices/{devType}/manage/register", method = RequestMethod.POST)
public JSONObject manageRegister(@RequestBody String registeration, @PathVariable String devType) {
return manageDeviceSupport.register(devType, registeration);
}
@RequestMapping(value = "/sign_in_check", method = RequestMethod.POST)
public JSONObject signIn(@RequestBody @Valid RetailLoginInfo loginInfo, Errors errors) {
HttpUtils.handleValidErrors(errors);
@ -68,6 +78,35 @@ public class RetailValidationController {
return client;
}
@RequestMapping(value = "/manage/sign_in_check", method = RequestMethod.POST)
public JSONObject manageSignIn(@RequestBody @Valid RetailLoginInfo loginInfo, Errors errors) {
HttpUtils.handleValidErrors(errors);
String codeValue = signInStatusManager.getVerifyCode(loginInfo.getCaptchaKey());
if (codeValue == null) {
throw new BadRequestException("Verification code has expired");
}
if (!codeValue.equals(loginInfo.getVerifyCode())) {
throw new BadRequestException("Verification code is not correct");
} else {
signInStatusManager.deleteVerifyCodeKey(loginInfo.getCaptchaKey());
}
String signKey = signInStatusManager.managerSignIn(loginInfo.toLoginInfo());
JSONObject manager = signInStatusManager.getCurrentManager(signKey);
manager = JSON.parseObject(manager.toJSONString());
if (!ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
throw new BadRequestException(LocaleSupport.localeMessage("error.login.password"));
}
// if (loginInfo.getDevId() != null) {
// deviceSupport.validDeviceWithClient(manager, loginInfo.getDevId());
// }
manager.put("sign_key", signKey);
manager.remove("available_func_ids");
manager.remove("available_func_names");
manager.remove("modules");
manager.remove("module_names");
return manager;
}
@RequestMapping(value = "/wechat_app_signin", method = RequestMethod.POST)
public JSONObject partnerWechatAppSignIn(@RequestBody JSONObject data) {
JSONObject res = signInStatusManager.partnerWechatAppSignIn(data.getString("code"));

@ -0,0 +1,37 @@
package au.com.royalpay.payment.manage.dev.web;
import au.com.royalpay.payment.manage.bdprize.core.BDPrizeService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
@RestController
@RequestMapping("/app/rules")
public class MangerAppRulesController {
@Resource
private BDPrizeService bdPrizeService;
@RequestMapping(value = "/org", method = RequestMethod.GET)
public ModelAndView hrefOrgRules() {
ModelAndView view = new ModelAndView("app/org_prize_rules");
return view;
}
@RequestMapping(value = "/bd", method = RequestMethod.GET)
public ModelAndView hrefBdRules() {
ModelAndView view = new ModelAndView("app/bd_prize_rules");
return view;
}
@RequestMapping(value = "/bd/config", method = RequestMethod.GET)
public List<JSONObject> bdConfigRates() {
return bdPrizeService.getRateConfig();
}
}

@ -26,6 +26,8 @@ public interface FinancialBDConfigMapper {
List<JSONObject> listBDConfig();
JSONObject getBDConfigById(@Param("manager_id") String manager_id);
List<JSONObject> listGroupBds(@Param("bd_group") String bd_group);
BigDecimal getGroupAmount(@Param("bd_group") String bd_group, @Param("record_id") String record_id, @Param("channel") String channel);

@ -48,4 +48,16 @@ public interface FinancialBDPrizeLogMapper {
@AutoSql(type = SqlType.DELETE)
void clearLogsOfReport(@Param("record_id") String recordId);
@Select("select bpl.record_id,bpl.manager_id,bpl.bd_name,sum(bpl.total_amount) total_amount,sum(bpl.total_prize) total_prize,sum(bpl.total_donation) total_donation,sum(bpl.send_prize) send_prize,sum(bpl.hold_prize) hold_prize," +
"bpl.kpi_amount,bpr.`month` " +
"from financial_bd_prize_log bpl INNER JOIN financial_bd_prize_records bpr on bpl.record_id = bpr.record_id " +
"where bpl.manager_id= #{manager_id} " +
"and bpl.channel!='ALL' " +
"group by bpr.month " +
"ORDER BY bpr.month desc")
List<JSONObject> listBdPrizeLogByOne(@Param("manager_id") String manager_id);
@AutoSql(type = SqlType.SELECT)
List<JSONObject> findReportByOne(@Param("record_id") String recordId, @Param("manager_id") String managerId);
}

@ -8,6 +8,7 @@ import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
/**
@ -24,6 +25,10 @@ public interface FinancialPartnerCommissionMapper {
@AutoSql(type = SqlType.UPDATE)
void update(JSONObject commission);
List<JSONObject> getOrgPrizeList(@Param("org_id") String orgId);
List<JSONObject> getOrgPrizeDetail(@Param("org_id") String orgId,@Param("month") Date month);
List<Integer> listAvailableMonths(@Param("year") int year);
List<JSONObject> listWithOrgInfo(@Param("year") int year, @Param("month") int month);
@ -44,4 +49,6 @@ public interface FinancialPartnerCommissionMapper {
PageList<JSONObject> getClientExtractRecord(@Param("org_id") int orgId, PageBounds pageBounds);
JSONObject findTotalByOrg(@Param("year") int year, @Param("month") int month, @Param("org_id") String orgId);
}

@ -42,6 +42,8 @@ public interface ClientMapper {
PageList<JSONObject> listPartners(JSONObject params, PageBounds pagination);
PageList<JSONObject> listLessInfoPartners(JSONObject params, PageBounds pagination);
PageList<JSONObject> comListPartners(JSONObject params, PageBounds pagination);
List<JSONObject> listClientsIdAndMoniker();
@ -110,4 +112,7 @@ public interface ClientMapper {
List<JSONObject> findByrpayNotNull();
JSONObject countBdApproveClients(@Param("manager_id") String manager_id);
}

@ -0,0 +1,25 @@
package au.com.royalpay.payment.manage.mappers.system;
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* Created by yixian on 2016-09-12.
*/
@AutoMapper(tablename = "sys_manage_devices_token", pkName = "dev_token_id")
public interface ManageDeviceTokenMapper {
JSONObject findByDevId(@Param("dev_id") String devDevId);
@AutoSql(type = SqlType.UPDATE)
void update(JSONObject devInfo);
@AutoSql(type = SqlType.INSERT)
void save(JSONObject devTokenInfo);
}

@ -76,6 +76,10 @@ public class ClientRegisterInfo {
private String merchant_video_url;
@JSONField(name = "store_name")
private String storeName;
@NotEmpty(message = "error.payment.valid.param_missing")
private String client_pay_type;
@NotEmpty(message = "error.payment.valid.param_missing")
private String client_pay_desc;
public JSONObject insertObject() {
JSONObject res = (JSONObject) JSON.toJSON(this);
@ -386,4 +390,20 @@ public class ClientRegisterInfo {
public String getStoreName() {
return storeName;
}
public void setClient_pay_type(String client_pay_type) {
this.client_pay_type = client_pay_type;
}
public void setClient_pay_desc(String client_pay_desc) {
this.client_pay_desc = client_pay_desc;
}
public String getClient_pay_type() {
return client_pay_type;
}
public String getClient_pay_desc() {
return client_pay_desc;
}
}

@ -2,6 +2,7 @@ package au.com.royalpay.payment.manage.merchants.core;
import au.com.royalpay.payment.core.exceptions.EmailException;
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean;
import au.com.royalpay.payment.manage.merchants.beans.BankAccountInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRateConfig;
@ -16,6 +17,7 @@ import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
@ -47,6 +49,8 @@ public interface ClientManager {
JSONObject listClients(JSONObject manager, PartnerQuery query);
JSONObject listClientsByApp(JSONObject manager, AppMerchantBean query);
List<JSONObject> listPartners(JSONObject manager, PartnerQuery query);
@Transactional

@ -20,6 +20,7 @@ import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.core.utils.OrderExpiryRuleResolver;
import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper;
import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.appclient.beans.AppMerchantBean;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.device.core.DeviceManager;
import au.com.royalpay.payment.manage.management.sysconfig.core.impls.PermissionPartnerManagerImpl;
@ -545,6 +546,69 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return PageListUtils.buildPageListResult(partners);
}
@Override
public JSONObject listClientsByApp(JSONObject manager, AppMerchantBean query) {
JSONObject params = query.toJsonParam();
if (params.getString("org_id") != null) {
if (params.getString("org_ids") == null) {
orgIds(params, Integer.parseInt(params.getString("org_id")));
} else {
params.put("org_id", params.getString("org_ids"));
params.remove("org_ids");
}
}
JSONObject org = null;
if (params.getString("org_id") != null) {
org = orgMapper.findOne(params.getIntValue("org_id"));
if (org.getIntValue("type") == 1) {
params.put("referrer_id", org.getString("org_id"));
params.remove("org_id");
}
}
int orgId = manager.getIntValue("org_id");
if (orgId > 0) {
if (params.getString("org_ids") == null) {
JSONObject org2 = orgMapper.findOne(orgId);
if (org2.getString("parent_org_id") != null) {
params.put("org_id", orgId);
} else {
params.put("org_id", orgId);
orgIds(params, orgId);
}
} else {
params.put("org_id", params.getIntValue("org_ids"));
params.remove("org_ids");
}
}
if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
JSONObject bdConfig = financialBDConfigMapper.getBdConfig(manager.getString("manager_id"));
if (bdConfig != null) {
params.put("bd_group", bdConfig.getString("bd_group"));
List<JSONObject> listGroupBds = financialBDConfigMapper.listGroupBds(bdConfig.getString("bd_group"));
List<String> bdUserId = listGroupBds.stream().map(groupBd -> groupBd.getString("manager_id")).collect(Collectors.toList());
if (params.containsKey("bd_user")) {
if (!bdUserId.contains(params.getString("bd_user"))) {
params.remove("bd_user");
}
}
if (params.containsKey("org_ids")) {
params.remove("org_ids");
}
if (params.containsKey("org_id")) {
params.remove("org_id");
}
}
if (query.getOnlyMe()) {
params.put("bd_user", manager.getString("manager_id"));
}
}
PageList<JSONObject> partners = clientMapper.listLessInfoPartners(params,
new PageBounds(query.getPage(), query.getLimit(), Order.formString("is_valid.desc,-approve_time.asc,create_time.desc")));
int authDays = PlatformEnvironment.getEnv().authDays();// 快速自助开通申请有效期
return PageListUtils.buildPageListResult(partners);
}
private void orgIds(JSONObject params, int orgId) {
JSONObject param = new JSONObject();
param.put("parent_org_id", params.getString("org_id"));
@ -623,6 +687,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject clientConfig = new JSONObject();
clientConfig.put("client_id", partner.getIntValue("client_id"));
clientConfig.put("client_moniker", partner.getString("client_moniker"));
clientConfig.put("client_pay_type", partner.getString("client_pay_type"));
clientConfig.put("client_pay_desc", partner.get("client_pay_desc"));
clientConfigService.save(clientConfig);
permissionPartnerManagerImpl.permissionClientModuleSave(partner.getIntValue("client_id"), partner.getString("client_moniker"));
} catch (Exception e) {
@ -691,6 +758,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
clientMapper.update(updateInfo);
saveOrUpdateMailList(updateInfo, client);
JSONObject clientConfig = new JSONObject();
clientConfig.put("client_id", clientId);
clientConfig.put("client_moniker", client.getString("client_moniker"));
clientConfig.put("client_pay_type", updateInfo.getString("client_pay_type"));
clientConfig.put("client_pay_desc", updateInfo.get("client_pay_desc"));
clientConfigMapper.update(clientConfig);
clientInfoCacheSupport.clearClientCache(clientId);
}

@ -19,6 +19,24 @@
]]>
</select>
<select id="getBDConfigById" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT
m.manager_id,
m.display_name,
c.bd_level,
c.city,
c.get_prize,
c.bd_group,
c.kpi_amount,
m.is_valid
FROM sys_managers m
LEFT JOIN financial_bd_config c ON c.manager_id = m.manager_id
WHERE m.role & 4 > 0 AND (m.org_id = 1 OR m.org_id IS NULL)
AND m.manager_id=#{manager_id}
]]>
</select>
<select id="listGroupBds" resultType="com.alibaba.fastjson.JSONObject">
<![CDATA[
SELECT c.*

@ -1,6 +1,22 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.financial.FinancialPartnerCommissionMapper">
<select id="getOrgPrizeList" resultType="com.alibaba.fastjson.JSONObject">
SELECT record_id,org_id,`year`,`month`,SUM(gross_amount) gross_amount,SUM(total_charge) total_charge,
SUM(royalpay_charge) royalpay_charge,SUM(org_charge) org_charge,SUM(net_charge) net_charge,SUM(share_charge) share_charge
FROM financial_partner_commission
WHERE org_id = #{org_id}
GROUP BY `year`,`month`
ORDER BY `year` DESC,`month` DESC
</select>
<select id="getOrgPrizeDetail" resultType="com.alibaba.fastjson.JSONObject">
SELECT *
FROM financial_partner_commission
WHERE org_id = #{org_id}
AND
`year` = year(month)
AND `month` = month(month)
</select>
<select id="listAvailableMonths" resultType="java.lang.Integer">
SELECT DISTINCT `month`
FROM financial_partner_commission
@ -81,4 +97,12 @@
ORDER BY c.year DESC,c.month DESC
</select>
<select id="findTotalByOrg" resultType="com.alibaba.fastjson.JSONObject">
SELECT
SUM(gross_amount) total_amount,
SUM(org_charge) total_prize
FROM financial_partner_commission
WHERE org_id=#{org_id} AND year=#{year} AND month=#{month}
</select>
</mapper>

@ -154,6 +154,85 @@
<if test="is_valid">and c.is_valid=1</if>
</where>
</select>
<select id="listLessInfoPartners" resultType="com.alibaba.fastjson.JSONObject">
SELECT DISTINCT c.client_moniker,c.source,c.approve_result,c.short_name,c.company_phone,c.approve_time,c.create_time,c.open_status,c.address,c.state,c.suburb,c.is_valid,c.postcode,c.country,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="bd_group!=null">and c.client_id in
(SELECT b.client_id FROM sys_client_bd b
INNER JOIN financial_bd_config fb ON fb.manager_id=b.bd_id
where b.is_valid=1 and b.start_date&lt;=now() and (b.end_date is null or b.end_date &gt;= now())
AND (fb.bd_group=#{bd_group} or fb.manager_id=#{bd_group})
)
</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)
</if>
<if test="quickPass">
and c.source=4
</if>
<if test="greenChannel">
and ((c.source=1 or c.source=2) and c.approve_result=2 or c.open_status=10)
</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="pass">
and c.open_status = 5 AND c.approve_result = 1 AND c.approve_time IS NOT NULL
</if>
<if test="completed_contract">
and c.open_status IS NULL AND c.approve_result IS NULL AND c.source != 4
</if>
<if test="apply_to_back">
AND c.approve_result = 5 AND c.approve_time is NOT NULL
</if>
<if test="bd_upload_material">
AND c.open_status = 3 AND c.approve_result != 5
</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="is_valid">and c.is_valid=0</if>
</where>
</select>
<select id="comListPartners" resultType="com.alibaba.fastjson.JSONObject">
SELECT DISTINCT c.*,o.name org_name
FROM sys_clients c
@ -444,4 +523,15 @@
<select id="findByrpayNotNull" resultType="com.alibaba.fastjson.JSONObject">
select * FROM sys_clients WHERE rpay_enterprise_id != ''
</select>
<select id="countBdApproveClients" resultType="com.alibaba.fastjson.JSONObject">
SELECT SUM(IF(((approve_result=4 AND open_status IS NULL) OR (approve_result=3 AND open_status IS NULL) OR
open_status=1 OR open_status=2 OR open_status=4),1,0)) approving,
SUM(IF((open_status = 5 AND approve_result = 1 AND approve_time IS NOT NULL),1,0)) pass,
SUM(IF((YEAR(approve_time)=YEAR(now()) and MONTH(approve_time)=MONTH(now()) AND approve_result = 1 AND open_status = 5),1,0)) this_months_pass
FROM sys_clients
WHERE
<bind name="manager_id_pattern" value="'%'+manager_id+'%'"/>
bd_user LIKE #{manager_id_pattern} AND is_valid=1;
</select>
</mapper>

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="au.com.royalpay.payment.manage.mappers.system.ManageDeviceTokenMapper">
<select id="findByDevId" resultType="com.alibaba.fastjson.JSONObject">
SELECT * FROM sys_manage_devices_token where dev_id=#{dev_id} limit 1
</select>
</mapper>

@ -0,0 +1,97 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Title</title>
<link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript" src="//cdn.bootcss.com/angular.js/1.4.8/angular.min.js"></script>
<script type="text/javascript">
angular.module('bdRulesApp', []).controller('bdRulesCtrl', ['$scope', '$http', function ($scope, $http) {
$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%'}];
$http.get('/app/rules/bd/config').then(function (resp) {
$scope.bd_rate_configs = resp.data;
$scope.kpi_ranges = [];
var kpiStart = [];
angular.forEach($scope.bd_rate_configs, function (cfg) {
if (kpiStart.indexOf(cfg.kpi_range) < 0) {
kpiStart.push(cfg.kpi_range);
$scope.kpi_ranges.push(cfg);
}
})
})
}]);
</script>
</head>
<style>
.box-body ul {
margin: 0;
padding-left: 20px;
}
.box-body ul li {
margin-bottom: 15px;
}
.clear {
clear: both;
}
</style>
<body ng-app="bdRulesApp" ng-controller="bdRulesCtrl">
<div class="box box-info" style="margin: 25px">
<div class="box-body">
<h4>BD分级提成费率速查表</h4>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<tr>
<th>BD Level</th>
<th rowspan="2">KPI完成度</th>
<th colspan="2">Junior BD</th>
<th colspan="2">Intermediate BD</th>
<th colspan="2">Senior BD</th>
</tr>
<tr>
<th>费率</th>
<th>0.6-0.79</th>
<th>0.8-2.0</th>
<th>0.6-0.79</th>
<th>0.8-2.0</th>
<th>0.6-0.79</th>
<th>0.8-2.0</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="range in kpi_ranges">
<td ng-bind="'#'+($index+1)"></td>
<td ng-bind="(kpiRanges|filter:{value:range.kpi_range})[0].label"></td>
<td ng-repeat-start="level in [1,2,3] track by $index"
ng-bind="(bd_rate_configs|filter:{kpi_range:range.kpi_range,bd_level:level,rate_from:0.6})[0].prize_rate+'%'"></td>
<td ng-repeat-end
ng-bind="(bd_rate_configs|filter:{kpi_range:range.kpi_range,bd_level:level,rate_from:0.8})[0].prize_rate+'%'"></td>
</tr>
</tbody>
</table>
</div>
<h4>补充说明</h4>
<ul>
<li>按月度发放</li>
<li>每月发放总提成额度的60%剩余40%按照“年度考评分数比例”于每年年底即12 月25 日圣诞前发放</li>
<li>提前离职者40%提成不予发放</li>
<li>年度考评根据销管中心每月考评表打分制进行统计按照考评分数对应比例发放40%的占比部分扣下部分如果第二年考评超出一定评分110%可以补发同样如果年度考评分数超过100 分按照同比例发放</li>
<li>商户开通后连续 1 个月未产生流水的,上交主管,由主管重新分配</li>
<li>连续 2 个月不产生流水的商户,由销管部统一收回,重新分配</li>
<li>分配后的商户流水客户专员只能占一半</li>
<li>离职及调岗人员商户统一上交销管中心,由销管中心 leader 及跨境事业部总监相互协商及相互监督,按照公平公正的原则, 做出分配方案,并由总监确认后统一分配。调岗人员移交的商户,在移交后 1 个月内移交人员和接收人员平分该商家产生的提成,移交人员需配合接收人员做好商户对接和短期内的商户维护;
离职人员交接的商户提成,接收人员享受一半的提成,另一半作为跨境客服专员福利会基金</li>
<li>被客户投诉情况严重者,此商户由销管中心无条件收回重新分配</li>
<li>活动执行未传达到位且出现舞弊、徇私、懒惰等行为的,商户上交由销管中心统一分配</li>
<li>后期维护不及时,连续一个月不跟踪者,此商户上交销管中心,统一重新分配</li>
<li>以上分配,销管中心 leader 和跨境支付事业部商量好之后需做好方案后经 COO 审批方可执行</li>
</ul>
</div>
</div>
</body>
</html>

@ -0,0 +1,65 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Title</title>
<link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<style>
.box-body ul {
margin: 0;
padding-left: 20px;
}
.box-body ul li {
margin-bottom: 15px;
}
.clear {
clear: both;
}
</style>
<body>
<div style="margin: 25px">
<section class="content">
<div class="box box-info">
<div class="box-body container">
<div style="margin-left: -5px" class="box-row">
<h5 style="float:left">合伙人提成计算说明</h5>
<p style="float: right;color:#cccccc">2018-11-30更新</p>
<div class="clear"></div>
</div>
<div style="padding-left: 20px;margin-bottom: 20px">
合伙人提成算法:按照合伙人签约的商户下每笔订单计算合伙人提成,提成规则明细如下: &nbsp&nbsp
<span style="color:orange">(取整规则为四舍五入保留2位小数)</span>
</div>
<ul>
<li>单笔订单 :&nbsp&nbsp(单笔订单交易金额 * 商家签约费率)<span style="color:orange">取整</span> &nbsp&nbsp&nbsp -
&nbsp&nbsp单笔订单交易金额 * 组织成本费率)<span style="color:orange">取整</span> &nbsp&nbsp&nbsp
= &nbsp&nbsp&nbsp单笔订单合伙人提成
</li>
<li>总交易额 : &nbsp合伙人签约的商户累计交易额</li>
<li>平台手续费:合伙人签约的商户(单笔订单交易金额 * 组织成本费率)<span style="color:orange">取整</span> 累加</li>
<li>合伙人提成: 每笔订单合伙人提成累加</li>
</ul>
<div style="width:100%;background:#cccccc;height:1px;margin-bottom: 20px"></div>
<div style="padding-left: 20px;margin-bottom: 20px">如合伙人存在二级代理,可从二级代理的交易额中得到分润,分润规则如下:</div>
<ul>
<li>二级代理合伙人提成计算规则如同一级代理,分润从平台手续费中扣除。</li>
<li>如A合伙人与平台签约组织成本费率为1.5%A合伙人的二级代理B的签约组织成本费率为1.8%B的商户签约费率为3%</li>
<li>假设B当月只有一笔交易且交易额为1000总手续费为30平台手续费为18B合伙人提成为12。</li>
<li>计算A的分润时会将B的交易额1000 * A的组织成本费率 1.5% = 15A的分润就是 18-15=3而B合伙人平台手续费为15其中扣除3是A的分润</li>
</ul>
<h5>补充说明</h5>
<ul style="color:orange;font-size: 13px">
<li style="margin-bottom: 10px">退款成功的订单不计入合伙人提成内</li>
<li>当本月有合伙人手续费存在欠款时,无法下载汇款文件</li>
</ul>
</div>
</div>
</section>
</div>
</body>
</html>

@ -472,6 +472,11 @@ margin-bottom: 10%;"/>
<i class="fa fa-money"></i> <span>合同签约情况</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="surcharge_account_month">
<i class="fa fa-bell"></i> <span>后付费收款</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="rate_warnings">
<i class="fa fa-bell"></i> <span>签约到期预警</span>
@ -603,11 +608,6 @@ margin-bottom: 10%;"/>
<i class="fa fa-tv"></i> <span>商户欠款|Pre Refund</span>
</a>
</li>
<li ui-sref-active="active">
<a ui-sref="surcharge_account_month">
<i class="fa fa-bell"></i> <span>手续费账户月度统计</span>
</a>
</li>
</ul>
</li>

@ -45,6 +45,17 @@ define(['../app', 'jquery'], function (app, $) {
}
});
var offlineDesc = [];
$.ajax({
url: '/static/data/client_offline_desc.json',
method: 'GET',
async: false,
dataType: 'json',
success: function (data) {
offlineDesc = data;
}
});
app.filter('partner_state', ['stateMap', function (stateMap) {
return function (stateValue) {
@ -163,6 +174,29 @@ define(['../app', 'jquery'], function (app, $) {
}]);
app.filter('partner_offline_desc', ['$http', function ($http) {
return function (industryCode) {
var industryLabel = '';
angular.forEach(offlineDesc, function (category) {
if (category.value == industryCode) {
industryLabel = category.label;
}
angular.forEach(category.children, function (categoryChildren1) {
if (categoryChildren1.value == industryCode) {
industryLabel = categoryChildren1.label;
}
angular.forEach(categoryChildren1.children, function (categoryChildren2) {
if (categoryChildren2.value == industryCode) {
industryLabel = categoryChildren2.label;
}
});
});
});
return industryLabel;
}
}]);
app.filter('partner_sector', ['sectorMap', function (sectorMap) {
return function (sectorValue) {
var sectorLabel = '';

@ -2,12 +2,15 @@
<section class="content">
<div class="box box-info">
<div class="box-body">
<h4>合伙人提成计算说明</h4>
<div class="row">
<p style="float: left;font-size: 17px">合伙人提成计算说明</p>
<p style="float: right">2018-11-30更新</p>
</div>
<div class="row">
合伙人提成算法:按照合伙人签约的商户下每笔订单计算合伙人提成,提成规则明细如下: &nbsp&nbsp
<span style="color:red">(取整规则为四舍五入保留2位小数)</span>
</div>
<ul>
<li>2018-11-30更新</li>
<li>合伙人提成算法:按照合伙人签约的商户下每笔订单计算合伙人提成,提成规则明细如下: &nbsp&nbsp
<span style="color:red">(取整规则为四舍五入保留2位小数)</span>
</li>
<li>单笔订单 :&nbsp&nbsp(单笔订单交易金额 * 商家签约费率)<span style="font-size: 1px;color:red">取整</span> &nbsp&nbsp&nbsp - &nbsp&nbsp单笔订单交易金额 * 组织成本费率)<span style="font-size: 1px;color:red">取整</span> &nbsp&nbsp&nbsp
= &nbsp&nbsp&nbsp单笔订单合伙人提成</li>
<li>总交易额 : &nbsp合伙人签约的商户累计交易额</li>
@ -19,12 +22,9 @@
<li>如A合伙人与平台签约组织成本费率为1.5%A合伙人的二级代理B的签约组织成本费率为1.8%B的商户签约费率为3%</li>
<li>假设B当月只有一笔交易且交易额为1000总手续费为30平台手续费为18B合伙人提成为12。</li>
<li>计算A的分润时会将B的交易额1000 * A的组织成本费率 1.5% = 15A的分润就是 18-15=3而B合伙人平台手续费为15其中扣除3是A的分润</li>
</ul>
<h4>补充说明</h4>
<ul style="color:red">
<li >退款成功的订单不计入合伙人提成内</li>
<li>当本月有合伙人手续费存在欠款时,无法下载汇款文件</li>
</ul>
</div>

@ -0,0 +1,54 @@
[
{
"children": [
{
"children": [],
"label": "立牌",
"value": "qrcode"
},
{
"children": [],
"label": "POS",
"value": "pos"
}
],
"label": "门店",
"value": "1"
},
{
"children": [
{
"children": [],
"label": "ipos",
"value": "ipos"
},
{
"children": [],
"label": "银豹",
"value": "pospal"
},
{
"children": [],
"label": "aupos",
"value": "aupos"
},
{
"children": [],
"label": "其他",
"value": "other"
}
],
"label": "收银系统",
"value": "2"
},{
"children": [
{
"children": [],
"label": "无门店",
"value": "no-store"
}
],
"label": "其他",
"value": "3"
}
]

@ -334,6 +334,16 @@
</div>
</div>
<div class="col-sm-2 col-xs-6">
<a ui-sref="surcharge_account_month" ui-sref-opts="{reload:true}">
<div class="description-block">
<img src="/static/images/main_menu/compliance_warning.png"/>
<div class="description-text">
<span>后付费收款</span>
</div>
</div>
</a>
</div>
<div class="col-sm-2 col-xs-6">
<a ui-sref="rate_warnings" ui-sref-opts="{reload:true}">
@ -811,16 +821,6 @@
</div>
</a>
</div>
<div class="col-sm-2 col-xs-6">
<a ui-sref="surcharge_account_month" ui-sref-opts="{reload:true}">
<div class="description-block">
<img src="/static/images/main_menu/transaction_arrears_green.png"/>
<div class="description-text">
<span>手续费账户月度统计</span>
</div>
</div>
</a>
</div>
</div>
</div>
<div class="list-group" ng-if="role=='accountant' || role=='director' || ('1000000000'|withRole)">

@ -361,7 +361,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
}]);
app.controller('addPartnerCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone','businessStructuresMap', 'industryMap', 'stateMap', 'sectorMap', 'countryMap', function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, businessStructuresMap, industryMap, stateMap, sectorMap, countryMap) {
app.controller('addPartnerCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'businessStructuresMap', 'industryMap', 'stateMap', 'sectorMap', 'countryMap', function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, businessStructuresMap, industryMap, stateMap, sectorMap, countryMap) {
if ($scope.partner_application) {
$scope.partner = angular.copy($scope.partner_application);
delete $rootScope.partner_application;
@ -382,6 +382,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.bd_citys = angular.copy(bd_city_map);
$scope.params = {textType: 'all', org_name: 'ALL'};
$scope.onOfflineDescSelect = function (selectedItem) {
$scope.partner.offline_label = selectedItem.label;
$scope.partner.client_offline_desc = selectedItem.value;
};
function remove(arr, val) {
if (angular.isArray(arr)) {
for (var i = arr.length; i--;) {
@ -393,6 +399,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
return arr;
}
$scope.loadOfflineDesc = function () {
$http.get('/static/data/client_offline_desc.json').then(function (resp) {
$scope.client_offline_select = resp.data;
})
};
$scope.loadOfflineDesc();
var industries = angular.copy($scope.industries);
$scope.industries = remove(industries, 331);
@ -523,10 +535,20 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
})
}
// if ($scope.partner.client_pay_type =='online' || $scope.partner.client_pay_type =='all') {
// if (!$scope.partner.online_website && !$scope.partner.online_public_account && !$scope.partner.online_mini_program && !$scope.partner.online_app) {
// alert('线上支付场景至少填写一种方式');
// return;
// }
// }
// if(!window.frames['merchant_detail'].merchant_location){
// alert("Please Locate Merchant's Location");
// return;
// }
if ($scope.params.client_pay_type==''){
alert('请选择商户支付场景')
}
$http.post('/sys/partners', $scope.partner).then(function (resp) {
commonDialog.alert({title: 'Success', content: 'Register new partner successfully', type: 'success'});
$scope.updateMerchantLocation();
@ -1096,6 +1118,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
var origin_referrer_id = angular.copy($scope.partner.referrer_id);
$scope.partner.partner_type = $scope.partner.website ? 'website' : 'photo';
$scope.loadOfflineDesc = function () {
$http.get('/static/data/client_offline_desc.json').then(function (resp) {
$scope.client_offline_select = resp.data;
})
};
$scope.loadOfflineDesc();
$scope.onOfflineDescSelect = function (selectedItem) {
$scope.partner.offline_label = selectedItem.label;
$scope.partner.client_offline_desc = selectedItem.value;
};
$scope.listReferrers = function () {
$http.get('/sys/orgs/referrer').then(function (resp) {
$scope.referrers = resp.data;
@ -1198,10 +1232,19 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
if (!origin_referrer_id && $scope.partner.referrer_id) {
content = 'Update partner info successfully,But You Had add new Referrer,Please Change the BD Commission Proportion!';
}
// if ($scope.partner.client_pay_type =='online' || $scope.partner.client_pay_type =='all') {
// if (!$scope.partner.online_website && !$scope.partner.online_public_account && !$scope.partner.online_mini_program && !$scope.partner.online_app) {
// alert('线上支付场景至少填写一种方式');
// return;
// }
// }
// if(!window.frames['merchant_detail'].merchant_location){
// alert("Please Locate Merchant Location!");
// return;
// }
if ($scope.params.client_pay_type==''){
alert('请选择商户支付场景')
}
$http.put('/sys/partners/' + $scope.partner.client_moniker, $scope.partner).then(function () {
if (content != '') {
commonDialog.alert({
@ -4563,11 +4606,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}]);
app.filter('bdOrg', function () {
return function (bdUsers, org_id) {
if (org_id) {

@ -176,6 +176,27 @@
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Merchant Payment Scenario</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">
Merchant Payment Scenario Type</label>
<div class="col-sm-8">
<p class="form-control-static"
ng-bind="partner.client_pay_type">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Merchant Payment Scenario Description</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.client_pay_desc"></p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Alipay Information &nbsp; <em class="small"><b>(Optional)</b></em></div>
<div class="panel-body">

@ -28,7 +28,8 @@
width: 95%;
float: left;
}
.img-size{
.img-size {
height: 100px;
margin-left: 20px;
}
@ -39,7 +40,8 @@
<i ng-if="partner.parent_client_id" class="fa fa-sitemap" title="Sub Partner"></i>
<a class="text-primary" ng-if="'00001'|withRole" title="Mock Login"
ng-href="/global/userstatus/current_manager/clients/{{partner.client_moniker}}/auth" target="_blank"><i
class="fa fa-share"></i></a><span ng-if="partner.is_valid==0" ng-class="{pass_timeout:partner.is_valid==0}">(已禁用)</span>
class="fa fa-share"></i></a><span ng-if="partner.is_valid==0"
ng-class="{pass_timeout:partner.is_valid==0}">(已禁用)</span>
</h1>
<ol class="breadcrumb">
<li>
@ -61,24 +63,26 @@
style="color: green">(The Partner Using Green Channel Now!)</span>
【目前状态】-
<b ng-if="partner.source==4">
<span ng-if="!partner.approve_result">(自助申请)资料完善中</span>
<span ng-if="partner.approve_result==1">(自助申请)已开通</span>
<span ng-if="partner.approve_result==2">(自助申请)快速开通等待提交合规材料</span>
<span ng-if="partner.approve_result==3">(自助申请)待审核(材料已提交)</span>
<span ng-if="!partner.approve_result">(自助申请)资料完善中</span>
<span ng-if="partner.approve_result==1">(自助申请)已开通</span>
<span ng-if="partner.approve_result==2">(自助申请)快速开通等待提交合规材料</span>
<span ng-if="partner.approve_result==3">(自助申请)待审核(材料已提交)</span>
</b>
<b ng-if="partner.source!=4">
<span ng-if="!partner.open_status">资料完善中</span>
<span ng-if="partner.open_status==1">待审核(合同制作中)</span>
<span ng-if="partner.open_status==2">合同制作完成</span>
<span ng-if="partner.open_status==3">BD处理中</span>
<span ng-if="partner.open_status==4">待审核(合规文件已提交)</span>
<span ng-if="partner.open_status==5">通过</span>
<span ng-if="partner.open_status==0">不通过</span>
<span ng-if="partner.open_status==10">绿色通道申请中</span>
<span ng-if="!partner.open_status">资料完善中</span>
<span ng-if="partner.open_status==1">待审核(合同制作中)</span>
<span ng-if="partner.open_status==2">合同制作完成</span>
<span ng-if="partner.open_status==3">BD处理中</span>
<span ng-if="partner.open_status==4">待审核(合规文件已提交)</span>
<span ng-if="partner.open_status==5">通过</span>
<span ng-if="partner.open_status==0">不通过</span>
<span ng-if="partner.open_status==10">绿色通道申请中</span>
</b>
<span ng-if="partner.is_valid==0" ng-class="{pass_timeout:partner.is_valid==0}">(已禁用)</span>
</h3>
<button ng-if="!partner.is_valid" type="button" class="btn btn-success" style="float:right;" ng-click="revertClient()">Revert</button>
<button ng-if="!partner.is_valid" type="button" class="btn btn-success" style="float:right;"
ng-click="revertClient()">Revert
</button>
</div>
<div class="box-body" ng-if="partner.is_valid==1">
<div ng-if="partner.open_status != 5 && partner.open_status!=10">
@ -130,16 +134,22 @@
<small ng-repeat="log in partner.audit_logs">
<i class="fa fa-arrow-right" aria-hidden="true"></i>
<div class="btn-group-vertical">
<button type="button" class="btn btn-xs btn-primary" ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">{{log.remark}}</button>
<button type="button" class="btn btn-xs btn-primary" ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">{{log.operator}} | {{log.create_time}}</button>
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.remark}}
</button>
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.operator}} | {{log.create_time}}
</button>
</div>
</small>
</div>
</div>
</div>
</div>
<div> <a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{Export()}}">
<i class="fa fa-download" ></i>制作临时合同</a>
<div><a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{Export()}}">
<i class="fa fa-download"></i>制作临时合同</a>
</div>
<div class="box" ng-if="('100'|withRole) && partner.show_all_permission"
@ -200,8 +210,14 @@
<small ng-repeat="log in partner.audit_logs">
<i class="fa fa-arrow-right" aria-hidden="true" style="margin-top: 5px"></i>
<div class="btn-group-vertical" style="margin-top: 5px">
<button type="button" class="btn btn-xs btn-primary" ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">{{log.remark}}</button>
<button type="button" class="btn btn-xs btn-primary" ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">{{log.operator}} | {{log.create_time}}</button>
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.remark}}
</button>
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.operator}} | {{log.create_time}}
</button>
</div>
</small>
</div>
@ -235,7 +251,8 @@
<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1">
<a ui-sref=".accounts">Partner Accounts</a>
</li>
<li ui-sref-active="active" ng-if="partner.parent_client_id==null && partner.show_all_permission && partner.is_valid==1">
<li ui-sref-active="active"
ng-if="partner.parent_client_id==null && partner.show_all_permission && partner.is_valid==1">
<a ui-sref=".subpartners">Subpartners</a>
</li>
<li ui-sref-active="active" ng-if="false && partner.is_valid==1">
@ -257,7 +274,8 @@
<a ui-sref=".settlement({clientMoniker:partner.client_moniker})">Settlement</a>
</li>
<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1 && partner.surcharge_mode=='distributed'">
<li ui-sref-active="active"
ng-if="partner.show_all_permission && partner.is_valid==1 && partner.surcharge_mode=='distributed'">
<a ui-sref=".surcharge_account({clientMoniker:partner.client_moniker})">Surcharge Account</a>
</li>
@ -298,7 +316,8 @@
<a ui-sref="partners.detail({clientMoniker:partner.parent_client.client_moniker})"
ng-bind="partner.parent_client.client_moniker"></a>)
</span>
<span ng-if="partner.is_valid==0" ng-class="{pass_timeout:partner.is_valid==0}">(已禁用)</span>
<span ng-if="partner.is_valid==0"
ng-class="{pass_timeout:partner.is_valid==0}">(已禁用)</span>
</p>
</div>
</div>
@ -307,7 +326,8 @@
<div class="col-sm-10">
<p class="form-control-static pull-left" ng-bind="partner.company_name"></p>
<p class="form-control-static pull-left" ng-if="isComplianceOfCompanyName && partner.open_status"
<p class="form-control-static pull-left"
ng-if="isComplianceOfCompanyName && partner.open_status"
style="margin-left: 10px;font-weight: 700;color: red;">
注意:(微信渠道可能不合规)
</p>
@ -318,7 +338,8 @@
<div class="col-sm-10">
<p class="form-control-static pull-left" ng-bind="partner.short_name"></p>
<p class="form-control-static pull-left" ng-if="isComplianceOfShortName && partner.open_status"
<p class="form-control-static pull-left"
ng-if="isComplianceOfShortName && partner.open_status"
style="margin-left: 10px;font-weight: 700;color: red;">
注意:(微信渠道可能不合规)
</p>
@ -333,13 +354,14 @@
</div>
<div class="form-group">
<label class="control-label col-sm-2">Store Name</label>
<div class="col-sm-10">
<p class="form-control-static pull-left" ng-bind="partner.store_name"></p>
<p class="form-control-static pull-left" ng-if="isComplianceOfShortName && partner.open_status"
style="margin-left: 10px;font-weight: 700;color: red;">
注意:(微信渠道可能不合规)
</p>
</div>
<div class="col-sm-10">
<p class="form-control-static pull-left" ng-bind="partner.store_name"></p>
<p class="form-control-static pull-left"
ng-if="isComplianceOfShortName && partner.open_status"
style="margin-left: 10px;font-weight: 700;color: red;">
注意:(微信渠道可能不合规)
</p>
</div>
</div>
<div class="form-group">
@ -348,7 +370,8 @@
<div class="col-sm-10">
<p class="form-control-static pull-left"
ng-bind="partner.business_structure|business_structure"></p>
<p class="form-control-static pull-left" ng-if="isComplianceOfBusinessStructure && partner.open_status"
<p class="form-control-static pull-left"
ng-if="isComplianceOfBusinessStructure && partner.open_status"
style="margin-left: 10px;font-weight: 700;color: red;">
注意:(微信渠道可能不合规)
</p>
@ -399,7 +422,7 @@
<div class="col-sm-3 col-xs-5" ng-if="partner.store_photo"><em>2:</em>&nbsp;
<div>
<a class="thumbnail" target="_blank" ng-href="{{partner.store_photo}}" >
<a class="thumbnail" target="_blank" ng-href="{{partner.store_photo}}">
<img ng-src="{{partner.store_photo}}" style="max-height: 100px">
</a>
</div>
@ -470,7 +493,8 @@
<th>End Date</th>
<th>BD Name</th>
<th>Proportion</th>
<th ng-if="('00010'|withRole) || (('1000000000000'|withRole) && partner.show_all_permission)">Operation
<th ng-if="('00010'|withRole) || (('1000000000000'|withRole) && partner.show_all_permission)">
Operation
</th>
</tr>
</thead>
@ -501,9 +525,568 @@
</div>
</div>
<!--end 商户基本资料-->
<div class="panel panel-default">
<div class="panel-heading">Merchant Payment Scenario</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">
Merchant Payment Scenario Type</label>
<div class="col-sm-8">
<p class="form-control-static"
ng-bind="partner.client_pay_type">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Merchant Payment Scenario Description</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.client_pay_desc"></p>
</div>
</div>
<!--<div ng-if="partner.client_pay_type=='online' || partner.client_pay_type=='all'">-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--Website</label>-->
<!--<div class="col-sm-8">-->
<!--<p class="form-control-static"-->
<!--ng-bind="partner.online_website">-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--公众号名称</label>-->
<!--<div class="col-sm-8">-->
<!--<p class="form-control-static"-->
<!--ng-bind="partner.online_public_account">-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--Mini Program Name</label>-->
<!--<div class="col-sm-8">-->
<!--<p class="form-control-static"-->
<!--ng-bind="partner.online_mini_program">-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--APP Name</label>-->
<!--<div class="col-sm-8">-->
<!--<p class="form-control-static"-->
<!--ng-bind="partner.online_app">-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div ng-if="partner.client_pay_type=='offline' || partner.client_pay_type=='all'">-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">Offline Scene Of Merchants</label>-->
<!--<div class="col-sm-8">-->
<!--<p class="form-control-static"-->
<!--ng-bind="partner.client_offline_desc | partner_offline_desc">-->
<!--</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Alipay Information &nbsp;<em class="small"><b>(Optional)</b></em>
</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">
Business Hours</label>
<div class="col-sm-8">
<input type="text" class="form-control" ng-model="partner.business_hours">
<p class="small text-info">
eg:Monday-Friday 09:00-20:00,Saturday-Sunday 10:00-22:00</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">
Merchant Tag<em class="small">(Chinese)</em></label>
<div class="col-sm-8">
<input type="text" class="form-control" ng-model="partner.merchant_tag">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">
Merchant Introduction<em class="small">(Chinese)</em></label>
<div class="col-sm-8">
<textarea class="form-control"
ng-model="partner.merchant_introduction"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">
Video Introduction<br><em class="small">(youtube link)</em></label>
<div class="col-sm-8">
<input type="text" class="form-control"
ng-model="partner.merchant_video_url">
<p class="small text-info">eg:https://www.baidu.com</p>
</div>
</div>
</div>
</div>
</div>
<!--支付宝资料-->
<div class="panel panel-default">
<div class="panel-heading">Contact Information</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.contact_person.$invalid && partnerForm.contact_person.$dirty}">
<label class="control-label col-sm-2" for="contact_person-input">*
Contact Person
Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.contact_person"
required
name="contact_person"
id="contact_person-input" maxlength="50">
<div ng-messages="partnerForm.contact_person.$error"
ng-if="partnerForm.contact_person.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 50
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.contact_phone_p.$invalid && partnerForm.contact_phone_p.$dirty}">
<label class="control-label col-sm-2" for="contact-phone-p-input">*
Phone</label>
<!-- <div class="col-sm-8">
<input type="text" class="form-control" ng-model="partner.contact_phone" required
name="contact_phone" id="contact-phone-input" maxlength="20">
</div>
<div ng-messages="partnerForm.contact_phone.$error"
ng-if="partnerForm.contact_phone.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 20
Characters(including symbols and spaces)</p>
</div>-->
<div class="col-sm-2">
<div class="input-group">
<div class="input-group-addon">+</div>
<input class="form-control" required type="text"
ng-model="partner.contact_phone_c"
name="contact_phone_c" id="contact-phone-c-input"
maxlength="3" minlength="1"
placeholder="country code">
</div>
<div ng-messages="partnerForm.contact_phone_c.$error"
ng-if="partnerForm.contact_phone_c.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 20 Characters</p>
</div>
</div>
<div class="col-sm-2">
<input class="form-control" type="text"
ng-model="partner.contact_phone_a"
title="eg:3,当为手机号、服务电话时,可以不填"
name="contact_phone_a" id="contact-phone-a-input"
maxlength="2" placeholder="area code">
<div ng-messages="partnerForm.contact_phone_a.$error"
ng-if="partnerForm.contact_phone_a.$dirty">
<p class="small text-danger" ng-message="maxlength">Less
Than 2 Characters</p>
</div>
</div>
<div class="col-sm-4">
<input class="form-control" required type="text"
ng-model="partner.contact_phone_p"
name="contact_phone_p" id="contact-phone-p-input"
maxlength="11" placeholder="phone number">
<div ng-messages="partnerForm.contact_phone_p.$error"
ng-if="partnerForm.contact_phone_p.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 11 Characters</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.contact_email.$invalid && partnerForm.contact_email.$dirty}">
<label class="control-label col-sm-2" for="contact-email-id">*
E-mail</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.contact_email"
required
name="contact_email" id="contact-email-id"
maxlength="50">
</div>
<div ng-messages="partnerForm.contact_email.$error"
ng-if="partnerForm.contact_email.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 50
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
</div>
</div>
<!--end 商户联系资料-->
<div class="panel panel-default">
<div class="panel-heading">Address Information</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.address.$invalid && partnerForm.address.$dirty}">
<label class="control-label col-sm-4" for="address-input">*
Address</label>
<div class="col-sm-8">
<textarea class="form-control" ng-model="partner.address"
name="address"
id="address-input" maxlength="200" required></textarea>
<div ng-messages="partnerForm.address.$error"
ng-if="partnerForm.address.$dirty">
<p class="small text-danger" ng-message="maxlength">Less
Than 200
Characters(including symbols and spaces)</p>
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.suburb.$invalid && partnerForm.suburb.$dirty}">
<label class="control-label col-sm-4" for="suburb-input">*
Suburb</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.suburb"
name="suburb"
id="suburb-input" maxlength="50" required>
<div ng-messages="partnerForm.suburb.$error"
ng-if="partnerForm.suburb.$dirty">
<p class="small text-danger" ng-message="maxlength">Less
Than 50
Characters(including symbols and spaces)</p>
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
<!--</div>-->
<!--<select class="form-control" name="suburb" required ng-model="partner.suburb"-->
<!--id="suburb-input"-->
<!--ng-options="t2c.key as t2c.value for t2c in t2city_map">-->
<!--<option value="">Please Choose</option>-->
<!--</select>-->
<!--<div ng-messages="partnerForm.suburb.$error" ng-if="partnerForm.suburb.$dirty">-->
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
<!--</div>-->
</div>
</div>
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.postcode.$invalid && partnerForm.postcode.$dirty}">
<label class="control-label col-sm-4" for="postcode-input">*
PostCode</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.postcode"
name="postcode"
id="postcode-input" maxlength="10" required>
<div ng-messages="partnerForm.postcode.$error"
ng-if="partnerForm.postcode.$dirty">
<p class="small text-danger" ng-message="maxlength">Less
Than 10
Characters(including symbols and spaces)</p>
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.state.$invalid && partnerForm.state.$dirty}">
<label class="control-label col-sm-4" for="state-input">*
State</label>
<div class="col-sm-8">
<!--<input class="form-control" ng-model="partner.state" name="state" id="state-input"-->
<!--maxlength="20">-->
<!--<div ng-messages="partnerForm.state.$error" ng-if="partnerForm.state.$dirty">-->
<!--<p class="small text-danger" ng-message="maxlength">Less Than 20-->
<!--Characters(including symbols and spaces)</p>-->
<!--</div>-->
<select class="form-control" name="state" required
ng-model="partner.state"
id="state-input"
ng-options="state.value as state.label for state in states">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.state.$error"
ng-if="partnerForm.state.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.country.$invalid && partnerForm.country.$dirty}">
<label class="control-label col-sm-4" for="country-input">*
Country</label>
<div class="col-sm-8">
<input class="form-control"
ng-init="partner.country=partner.country||'AUS'"
ng-model="partner.country" name="country"
id="country-input" maxlength="20" required
placeholder="AUS" readonly="readonly">
<div ng-messages="partnerForm.country.$error"
ng-if="partnerForm.country.$dirty">
<p class="small text-danger" ng-message="maxlength">Less
Than 20
Characters(including symbols and spaces)</p>
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
<!--选择框-->
<!--<select class="form-control" name="country" required ng-model="partner.country"-->
<!--id="country-input"-->
<!--ng-options="country.value as country.label for country in countries">-->
<!--<option value="">Please Choose</option>-->
<!--</select>-->
<!--<div ng-messages="partnerForm.country.$error" ng-if="partnerForm.country.$dirty">-->
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
<!--</div>-->
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2"
for="tz-select">TimeZone</label>
<div class="col-sm-9">
<select class="form-control" name="timezone"
ng-model="partner.timezone"
id="tz-select"
ng-options="tz.key as tz.detail for tz in timezones">
</select>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" style="font-size: larger">Location
<span id="editmap" hidden>true</span>
<span id="add_view" hidden>true</span>
</div>
<div class="form-group">
<div class="embed-responsive" style="height: 300px;">
<iframe id="merchant_detail" name="merchant_detail" class="embed-responsive-item"
src="one_locations.html"></iframe>
</div>
</div>
</div>
<!--<div class="panel panel-info">
<div class="panel-heading">Alipay Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">
<label class="control-label col-sm-4"
for="alipay_category">*Category</label>
<div class="col-sm-8" >
<input class="form-control" id="alipay_category" required
name="alipay_category" readonly
ng-model="partner.alipay_category"
multi-level-select-popup="alipayMccCategory"
on-select="onAlipayMccSelect($selected)">
<div ng-messages="partnerForm.alipay_category.$error"
ng-if="partnerForm.alipay_category.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading" style="background:#62b900">wechat Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}">
<label class="control-label col-sm-2" for="industry-input">
*Industry</label>
<div class="col-sm-8">
<select class="form-control" name="industry"
ng-model="partner.industry"
id="industry-input" required
ng-options="industry.value as industry.label for industry in industries">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.industry.$error"
ng-if="partnerForm.industry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading" style="background:#d82d2d">JD Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.jdindustry.$invalid && partnerForm.jdindustry.$dirty}">
<label class="control-label col-sm-2" for="jdindustry-input">
*Industry</label>
<div class="col-sm-8">
<select class="form-control" name="jdindustry"
ng-model="partner.jdindustry"
id="jdindustry-input" required
ng-options="industry.value as industry.label for industry in jdindustry">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.jdindustry.$error"
ng-if="partnerForm.jdindustry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading" style="background:#f06010;color: #f6f6f6;">RoyalPay Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.royalpayindustry.$invalid && partnerForm.royalpayindustry.$dirty}">
<label class="control-label col-sm-2" for="royalpayindustry-input">
*Industry</label>
<div class="col-sm-8">
<select class="form-control" name="royalpayindustry"
ng-model="partner.royalpayindustry"
id="royalpayindustry-input" required
ng-options="industry.value as industry.label for industry in royalpayindustry">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.royalpayindustry.$error"
ng-if="partnerForm.royalpayindustry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>-->
<div class="panel panel-default">
<div class="panel-heading"
style="color: #333;background-color: #f5f5f5;border-color: #ddd;">
Industry
</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.royalpay_label.$invalid && partnerForm.royalpay_label.$dirty}">
<label class="control-label col-sm-2"
for="royalpayindustry">*RoyalPay Industry</label>
<div class="col-sm-8">
<input class="form-control" id="royalpayindustry" required
name="royalpayindustry" readonly
ng-model="partner.royalpayindustry|partner_royalpay_industry"
multi-level-select-popup="royalpayindustry"
on-select="onRoyalPayIndustrySelect($selected)">
<div ng-messages="partnerForm.royalpay_label.$error"
ng-if="partnerForm.royalpay_label.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.jdindustry.$invalid && partnerForm.jdindustry.$dirty}">
<label class="control-label col-sm-2" for="jdindustry-input">
*JDPay Industry</label>
<div class="col-sm-8">
<select class="form-control" name="jdindustry"
ng-model="partner.jdindustry"
id="jdindustry-input" required
ng-options="industry.value as industry.label for industry in jdindustry">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.jdindustryindustry.$error"
ng-if="partnerForm.jdindustryindustry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}">
<label class="control-label col-sm-2" for="industry-input">
*Wechat Industry</label>
<div class="col-sm-8">
<select class="form-control" name="industry"
ng-model="partner.industry"
id="industry-input" required
ng-options="industry.value as industry.label for industry in industries">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.industry.$error"
ng-if="partnerForm.industry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">
<label class="control-label col-sm-2"
for="alipay_category">*Alipay Category</label>
<div class="col-sm-8">
<input class="form-control" id="alipay_category" required
name="alipay_category" readonly
ng-model="partner.alipayindustry|partner_alipay_industry"
multi-level-select-popup="alipayMccCategory"
on-select="onAlipayMccSelect($selected)">
<div ng-messages="partnerForm.alipay_category.$error"
ng-if="partnerForm.alipay_category.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group" ng-if="('10'|withRole) || ('1'|withRole)">
<label class="control-label col-sm-2"
for="hf_category">HF Industry</label>
<div class="col-sm-8">
<input class="form-control" id="hf_category" required
name="hf_label" readonly
ng-model="partner.hfindustry|partner_hf_industry"
multi-level-select-popup="hfindustry"
on-select="onHfIndustrySelect($selected)">
</div>
</div>
</div>
</div>
</div>
<!--支付宝资料-->
<div class="panel panel-default">
<div class="panel-heading">Alipay Information &nbsp;<em class="small"><b>(Optional)</b></em></div>
<div class="panel-heading">Alipay Information &nbsp;<em class="small"><b>(Optional)</b></em>
</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
@ -561,13 +1144,16 @@
<div class="col-sm-8">
<p class="form-control-static">
<span ng-bind="partner.contact_email"></span>
<a ng-if="(partner.approve_result==1) || (partner.approve_result == 2 && (partner.source==1 || partner.source==2))" role="button"
<a ng-if="(partner.approve_result==1) || (partner.approve_result == 2 && (partner.source==1 || partner.source==2))"
role="button"
ng-click="resendApproveEmail()">
<i class="fa fa-envelope"></i> Resend Email
</a>
<span ng-if="('10'|withRole)">
<i style="cursor: pointer" ng-click="addSub()" ng-if="!partner.unsubscribe" class="fa fa-star text-yellow"></i>
<i style="cursor: pointer" ng-click="removeSub()" ng-if="partner.unsubscribe" class="fa fa-star-o text-yellow"></i>
<i style="cursor: pointer" ng-click="addSub()" ng-if="!partner.unsubscribe"
class="fa fa-star text-yellow"></i>
<i style="cursor: pointer" ng-click="removeSub()"
ng-if="partner.unsubscribe" class="fa fa-star-o text-yellow"></i>
</span>
</p>
</div>
@ -751,7 +1337,7 @@
<div class="form-group">
<label class="control-label col-sm-2">Alipay Category</label>
<div class="col-sm-10">
<p class="form-control-static industry-p"ng-if="partner.alipayindustry">
<p class="form-control-static industry-p" ng-if="partner.alipayindustry">
{{partner.alipayindustry|partner_alipay_industry}}
&nbsp;&nbsp;&nbsp;({{partner.alipayindustry}})
</p>
@ -763,7 +1349,7 @@
<div class="form-group" ng-if="partner.hfindustry&&(('10'|withRole) || ('1'|withRole))">
<label class="control-label col-sm-2">HF Industry</label>
<div class="col-sm-10">
<p class="form-control-static industry-p"ng-if="partner.hfindustry">
<p class="form-control-static industry-p" ng-if="partner.hfindustry">
{{partner.hfindustry| partner_hf_industry}}
&nbsp;&nbsp;&nbsp;({{partner.hfindustry}})
</p>

@ -362,6 +362,596 @@
</div>
</div>
<!--end 商户基本资料-->
<div class="panel panel-default">
<div class="panel-heading">Merchant Payment Scenario</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.client_pay_type.$invalid && partnerForm.client_pay_type.$dirty}">
<label class="control-label col-sm-2" for="client-pay-type-select">*
Merchant Payment Scenario Type</label>
<div class="col-sm-8">
<select class="form-control" ng-model="partner.client_pay_type"
id="client-pay-type-select"
name="client_pay_type">
<option value="">Please Choose</option>
<option value="all">All</option>
<option value="online">线上</option>
<option value="offline">线下</option>
</select>
<div ng-messages="partnerForm.client_pay_type.$error"
ng-if="partnerForm.client_pay_type.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.client_pay_desc.$invalid && partnerForm.client_pay_desc.$dirty}">
<label class="control-label col-sm-2" for="client-pay-desc-input">*
Merchant Payment Scenario Description</label>
<div class="col-sm-8">
<textarea class="form-control" required
ng-model="partner.client_pay_desc"
name="client_pay_desc" id="client-pay-desc-input"
maxlength="200"></textarea>
<p class="small text-info">
<i class="fa fa-info"></i> 例如线下场景门店立牌、POS、收银系统选择品牌名称【ipos、银豹、aupos、其他】、无门店</p>
<div ng-messages="partnerForm.client_pay_desc.$error"
ng-if="partnerForm.client_pay_desc.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 200
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<!--<div ng-if="partner.client_pay_type=='online' || partner.client_pay_type=='all'">-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--Website</label>-->
<!--<div class="col-sm-8">-->
<!--<input type="text" class="form-control"-->
<!--ng-model="partner.online_website">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--公众号名称</label>-->
<!--<div class="col-sm-8">-->
<!--<input type="text" class="form-control"-->
<!--ng-model="partner.online_public_account">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--Mini Program Name</label>-->
<!--<div class="col-sm-8">-->
<!--<input type="text" class="form-control"-->
<!--ng-model="partner.online_mini_program">-->
<!--</div>-->
<!--</div>-->
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-2">-->
<!--APP Name</label>-->
<!--<div class="col-sm-8">-->
<!--<input type="text" class="form-control"-->
<!--ng-model="partner.online_app">-->
<!--<p class="small text-info">-->
<!--<i class="fa fa-info"></i> 线上支付场景至少选择填一项</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--<div ng-if="partner.client_pay_type=='offline' || partner.client_pay_type=='all'">-->
<!--<div class="form-group"-->
<!--ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">-->
<!--<label class="control-label col-sm-2"-->
<!--for="client-offline-desc">*Offline Scene Of Merchants</label>-->
<!--<div class="col-sm-8">-->
<!--<input class="form-control" id="client-offline-desc" required-->
<!--name="client_offline" readonly-->
<!--ng-model="partner.client_offline_desc | partner_offline_desc"-->
<!--multi-level-select-popup="client_offline_select"-->
<!--on-select="onOfflineDescSelect($selected)">-->
<!--<div ng-messages="partnerForm.client_offline.$error"-->
<!--ng-if="partnerForm.client_offline.$dirty">-->
<!--<p class="small text-danger" ng-message="required">Required-->
<!--Field</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Alipay Information &nbsp;<em class="small"><b>(Optional)</b></em></div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">
Business Hours</label>
<div class="col-sm-8">
<input type="text" class="form-control" ng-model="partner.business_hours">
<p class="small text-info">
eg:Monday-Friday 09:00-20:00,Saturday-Sunday 10:00-22:00</p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">
Merchant Tag<em class="small">(Chinese)</em></label>
<div class="col-sm-8">
<input type="text" class="form-control" ng-model="partner.merchant_tag">
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">
Merchant Introduction<em class="small">(Chinese)</em></label>
<div class="col-sm-8">
<textarea class="form-control" ng-model="partner.merchant_introduction"></textarea>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">
Video Introduction<br><em class="small">(youtube link)</em></label>
<div class="col-sm-8">
<input type="text" class="form-control" ng-model="partner.merchant_video_url">
<p class="small text-info">eg:https://www.baidu.com</p>
</div>
</div>
</div>
</div>
</div>
<!--支付宝资料-->
<div class="panel panel-default">
<div class="panel-heading">Contact Information</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.contact_person.$invalid && partnerForm.contact_person.$dirty}">
<label class="control-label col-sm-2" for="contact_person-input">*
Contact Person
Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.contact_person"
required
name="contact_person"
id="contact_person-input" maxlength="50">
<div ng-messages="partnerForm.contact_person.$error"
ng-if="partnerForm.contact_person.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 50
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.contact_phone_p.$invalid && partnerForm.contact_phone_p.$dirty}">
<label class="control-label col-sm-2" for="contact-phone-p-input">*
Phone</label>
<!-- <div class="col-sm-8">
<input type="text" class="form-control" ng-model="partner.contact_phone" required
name="contact_phone" id="contact-phone-input" maxlength="20">
</div>
<div ng-messages="partnerForm.contact_phone.$error"
ng-if="partnerForm.contact_phone.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 20
Characters(including symbols and spaces)</p>
</div>-->
<div class="col-sm-2">
<div class="input-group">
<div class="input-group-addon">+</div>
<input class="form-control" required type="text"
ng-model="partner.contact_phone_c"
name="contact_phone_c" id="contact-phone-c-input"
maxlength="3" minlength="1"
placeholder="country code">
</div>
<div ng-messages="partnerForm.contact_phone_c.$error"
ng-if="partnerForm.contact_phone_c.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 20 Characters</p>
</div>
</div>
<div class="col-sm-2">
<input class="form-control" type="text"
ng-model="partner.contact_phone_a"
title="eg:3,当为手机号、服务电话时,可以不填"
name="contact_phone_a" id="contact-phone-a-input"
maxlength="2" placeholder="area code">
<div ng-messages="partnerForm.contact_phone_a.$error"
ng-if="partnerForm.contact_phone_a.$dirty">
<p class="small text-danger" ng-message="maxlength">Less
Than 2 Characters</p>
</div>
</div>
<div class="col-sm-4">
<input class="form-control" required type="text"
ng-model="partner.contact_phone_p"
name="contact_phone_p" id="contact-phone-p-input"
maxlength="11" placeholder="phone number">
<div ng-messages="partnerForm.contact_phone_p.$error"
ng-if="partnerForm.contact_phone_p.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 11 Characters</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.contact_email.$invalid && partnerForm.contact_email.$dirty}">
<label class="control-label col-sm-2" for="contact-email-id">*
E-mail</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.contact_email"
required
name="contact_email" id="contact-email-id"
maxlength="50">
</div>
<div ng-messages="partnerForm.contact_email.$error"
ng-if="partnerForm.contact_email.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 50
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
</div>
</div>
<!--end 商户联系资料-->
<div class="panel panel-default">
<div class="panel-heading">Address Information</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.address.$invalid && partnerForm.address.$dirty}">
<label class="control-label col-sm-4" for="address-input">*
Address</label>
<div class="col-sm-8">
<textarea class="form-control" ng-model="partner.address"
name="address"
id="address-input" maxlength="200" required></textarea>
<div ng-messages="partnerForm.address.$error"
ng-if="partnerForm.address.$dirty">
<p class="small text-danger" ng-message="maxlength">Less
Than 200
Characters(including symbols and spaces)</p>
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.suburb.$invalid && partnerForm.suburb.$dirty}">
<label class="control-label col-sm-4" for="suburb-input">*
Suburb</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.suburb"
name="suburb"
id="suburb-input" maxlength="50" required>
<div ng-messages="partnerForm.suburb.$error"
ng-if="partnerForm.suburb.$dirty">
<p class="small text-danger" ng-message="maxlength">Less
Than 50
Characters(including symbols and spaces)</p>
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
<!--</div>-->
<!--<select class="form-control" name="suburb" required ng-model="partner.suburb"-->
<!--id="suburb-input"-->
<!--ng-options="t2c.key as t2c.value for t2c in t2city_map">-->
<!--<option value="">Please Choose</option>-->
<!--</select>-->
<!--<div ng-messages="partnerForm.suburb.$error" ng-if="partnerForm.suburb.$dirty">-->
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
<!--</div>-->
</div>
</div>
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.postcode.$invalid && partnerForm.postcode.$dirty}">
<label class="control-label col-sm-4" for="postcode-input">*
PostCode</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.postcode"
name="postcode"
id="postcode-input" maxlength="10" required>
<div ng-messages="partnerForm.postcode.$error"
ng-if="partnerForm.postcode.$dirty">
<p class="small text-danger" ng-message="maxlength">Less
Than 10
Characters(including symbols and spaces)</p>
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.state.$invalid && partnerForm.state.$dirty}">
<label class="control-label col-sm-4" for="state-input">*
State</label>
<div class="col-sm-8">
<!--<input class="form-control" ng-model="partner.state" name="state" id="state-input"-->
<!--maxlength="20">-->
<!--<div ng-messages="partnerForm.state.$error" ng-if="partnerForm.state.$dirty">-->
<!--<p class="small text-danger" ng-message="maxlength">Less Than 20-->
<!--Characters(including symbols and spaces)</p>-->
<!--</div>-->
<select class="form-control" name="state" required
ng-model="partner.state"
id="state-input"
ng-options="state.value as state.label for state in states">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.state.$error"
ng-if="partnerForm.state.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.country.$invalid && partnerForm.country.$dirty}">
<label class="control-label col-sm-4" for="country-input">*
Country</label>
<div class="col-sm-8">
<input class="form-control"
ng-init="partner.country=partner.country||'AUS'"
ng-model="partner.country" name="country"
id="country-input" maxlength="20" required
placeholder="AUS" readonly="readonly">
<div ng-messages="partnerForm.country.$error"
ng-if="partnerForm.country.$dirty">
<p class="small text-danger" ng-message="maxlength">Less
Than 20
Characters(including symbols and spaces)</p>
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
<!--选择框-->
<!--<select class="form-control" name="country" required ng-model="partner.country"-->
<!--id="country-input"-->
<!--ng-options="country.value as country.label for country in countries">-->
<!--<option value="">Please Choose</option>-->
<!--</select>-->
<!--<div ng-messages="partnerForm.country.$error" ng-if="partnerForm.country.$dirty">-->
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
<!--</div>-->
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2"
for="tz-select">TimeZone</label>
<div class="col-sm-9">
<select class="form-control" name="timezone"
ng-model="partner.timezone"
id="tz-select"
ng-options="tz.key as tz.detail for tz in timezones">
</select>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading" style="font-size: larger">Location
<span id="editmap" hidden>true</span>
<span id="add_view" hidden>true</span>
</div>
<div class="form-group">
<div class="embed-responsive" style="height: 300px;">
<iframe id="merchant_detail" name="merchant_detail" class="embed-responsive-item"
src="one_locations.html"></iframe>
</div>
</div>
</div>
<!--<div class="panel panel-info">
<div class="panel-heading">Alipay Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">
<label class="control-label col-sm-4"
for="alipay_category">*Category</label>
<div class="col-sm-8" >
<input class="form-control" id="alipay_category" required
name="alipay_category" readonly
ng-model="partner.alipay_category"
multi-level-select-popup="alipayMccCategory"
on-select="onAlipayMccSelect($selected)">
<div ng-messages="partnerForm.alipay_category.$error"
ng-if="partnerForm.alipay_category.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading" style="background:#62b900">wechat Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}">
<label class="control-label col-sm-2" for="industry-input">
*Industry</label>
<div class="col-sm-8">
<select class="form-control" name="industry"
ng-model="partner.industry"
id="industry-input" required
ng-options="industry.value as industry.label for industry in industries">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.industry.$error"
ng-if="partnerForm.industry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading" style="background:#d82d2d">JD Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.jdindustry.$invalid && partnerForm.jdindustry.$dirty}">
<label class="control-label col-sm-2" for="jdindustry-input">
*Industry</label>
<div class="col-sm-8">
<select class="form-control" name="jdindustry"
ng-model="partner.jdindustry"
id="jdindustry-input" required
ng-options="industry.value as industry.label for industry in jdindustry">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.jdindustry.$error"
ng-if="partnerForm.jdindustry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading" style="background:#f06010;color: #f6f6f6;">RoyalPay Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.royalpayindustry.$invalid && partnerForm.royalpayindustry.$dirty}">
<label class="control-label col-sm-2" for="royalpayindustry-input">
*Industry</label>
<div class="col-sm-8">
<select class="form-control" name="royalpayindustry"
ng-model="partner.royalpayindustry"
id="royalpayindustry-input" required
ng-options="industry.value as industry.label for industry in royalpayindustry">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.royalpayindustry.$error"
ng-if="partnerForm.royalpayindustry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>-->
<div class="panel panel-default">
<div class="panel-heading" style="color: #333;background-color: #f5f5f5;border-color: #ddd;">
Industry
</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.royalpay_label.$invalid && partnerForm.royalpay_label.$dirty}">
<label class="control-label col-sm-2"
for="royalpayindustry">*RoyalPay Industry</label>
<div class="col-sm-8">
<input class="form-control" id="royalpayindustry" required
name="royalpayindustry" readonly
ng-model="partner.royalpayindustry|partner_royalpay_industry"
multi-level-select-popup="royalpayindustry"
on-select="onRoyalPayIndustrySelect($selected)">
<div ng-messages="partnerForm.royalpay_label.$error"
ng-if="partnerForm.royalpay_label.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.jdindustry.$invalid && partnerForm.jdindustry.$dirty}">
<label class="control-label col-sm-2" for="jdindustry-input">
*JDPay Industry</label>
<div class="col-sm-8">
<select class="form-control" name="jdindustry"
ng-model="partner.jdindustry"
id="jdindustry-input" required
ng-options="industry.value as industry.label for industry in jdindustry">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.jdindustryindustry.$error"
ng-if="partnerForm.jdindustryindustry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}">
<label class="control-label col-sm-2" for="industry-input">
*Wechat Industry</label>
<div class="col-sm-8">
<select class="form-control" name="industry"
ng-model="partner.industry"
id="industry-input" required
ng-options="industry.value as industry.label for industry in industries">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.industry.$error"
ng-if="partnerForm.industry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">
<label class="control-label col-sm-2"
for="alipay_category">*Alipay Category</label>
<div class="col-sm-8">
<input class="form-control" id="alipay_category" required
name="alipay_category" readonly
ng-model="partner.alipayindustry|partner_alipay_industry"
multi-level-select-popup="alipayMccCategory"
on-select="onAlipayMccSelect($selected)">
<div ng-messages="partnerForm.alipay_category.$error"
ng-if="partnerForm.alipay_category.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group" ng-if="('10'|withRole) || ('1'|withRole)">
<label class="control-label col-sm-2"
for="hf_category">HF Industry</label>
<div class="col-sm-8">
<input class="form-control" id="hf_category" required
name="hf_label" readonly
ng-model="partner.hfindustry|partner_hf_industry"
multi-level-select-popup="hfindustry"
on-select="onHfIndustrySelect($selected)">
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Alipay Information &nbsp; <em class="small"><b>(Optional)</b></em></div>
<div class="panel-body">

Loading…
Cancel
Save