Merge branch 'develop' into develop_app

# Conflicts:
#	src/main/java/au/com/royalpay/payment/manage/appclient/core/RetailAppService.java
#	src/main/java/au/com/royalpay/payment/manage/appclient/core/impls/RetailAppServiceImp.java
master
wangning 7 years ago
commit fe9d052c09

@ -27,6 +27,8 @@ import au.com.royalpay.payment.manage.mappers.system.ManagerCustomerRelationAlip
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.core.ClientConfigService;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.merchants.core.ClientModifySupport;
import au.com.royalpay.payment.manage.merchants.entity.impls.SwitchPermissionModify;
import au.com.royalpay.payment.manage.notice.beans.NoticeInfo;
import au.com.royalpay.payment.manage.notice.core.NoticeManage;
import au.com.royalpay.payment.manage.notice.core.NoticePartner;
@ -45,6 +47,7 @@ import au.com.royalpay.payment.tools.device.support.DeviceRegister;
import au.com.royalpay.payment.tools.env.PlatformEnvironment;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.exceptions.NotFoundException;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.locale.LocaleSupport;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
@ -160,6 +163,8 @@ public class RetailAppServiceImp implements RetailAppService {
private ClientConfigService clientConfigService;
@Resource
private ClientMapper clientMapper;
@Resource
private ClientModifySupport clientModifySupport;
private Map<String, AppMsgSender> senderMap = new HashMap<>();
private final String fileName[] = { "source_agree_file", "client_bank_file", "client_id_file", "client_agree_file", "client_company_file",
@ -270,8 +275,23 @@ public class RetailAppServiceImp implements RetailAppService {
@Override
public void changeSurchargeEnable(JSONObject device, UpdateSurchargeDTO updateSurchargeDTO) {
merchantInfoProvider.changeSurchargeEnable(device, updateSurchargeDTO);
JSONObject client = clientManager.getClientInfo(device.getIntValue("client_id"));
JSONObject account = clientAccountMapper.findById(device.getString("account_id"));
if(PartnerRole.getRole(account.getIntValue("role")) != PartnerRole.ADMIN){
throw new ForbiddenException("You have no permission");
}
if (client == null) {
throw new NotFoundException("Client not found, please check");
}
if (updateSurchargeDTO.getApiSurcharge() != null) {
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account,client.getString("client_moniker"),"api_surcharge",updateSurchargeDTO.getApiSurcharge()));
}
if (updateSurchargeDTO.getQrcodeSurcharge() != null) {
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account,client.getString("client_moniker"),"qrcode_surcharge",updateSurchargeDTO.getQrcodeSurcharge()));
}
if (updateSurchargeDTO.getRetailSurcharge() != null) {
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account,client.getString("client_moniker"),"retail_surcharge",updateSurchargeDTO.getRetailSurcharge()));
}
}
@Override
@ -358,27 +378,11 @@ public class RetailAppServiceImp implements RetailAppService {
@Override
public JSONObject getClientInfoRealtime(JSONObject device) {
JSONObject client = clientMapper.findClient(device.getIntValue("client_id"));
JSONObject result = new JSONObject();
result.put("company_phone",client.getString("company_phone"));
result.put("short_name",client.getString("short_name"));
result.put("company_name",client.getString("company_name"));
result.put("business_name",client.getString("business_name"));
result.put("business_structure",client.getString("business_structure"));
result.put("abn",client.getString("abn"));
result.put("acn",client.getString("acn"));
result.put("address",client.getString("address"));
result.put("suburb",client.getString("suburb"));
result.put("postcode",client.getString("postcode"));
result.put("state",client.getString("state"));
result.put("timezone",client.getString("timezone"));
result.put("contact_email",client.getString("contact_email"));
result.put("mail_confirm",client.getString("mail_confirm"));
result.put("contact_person",client.getString("contact_person"));
result.put("logo_url",client.getString("logo_url"));
result.put("store_photo",client.getString("store_photo"));
return result;
JSONObject clientWithConfig = clientManager.getClientInfo(device.getIntValue("client_id"));
clientWithConfig.putAll(clientConfigService.find(device.getIntValue("client_id")));
return clientWithConfig;
}
@Override
public JSONObject getClientInfoMe(JSONObject device) {
JSONObject result = new JSONObject();

@ -505,7 +505,7 @@ public class RetailAppController {
@RequestMapping(value = "/surcharge", method = RequestMethod.GET)
public JSONObject changeQRCodePaySurCharge(@ModelAttribute(RETAIL_DEVICE) JSONObject device) {
JSONObject client = retailAppService.getClientInfo(device);
JSONObject client = retailAppService.getClientInfoRealtime(device);
JSONObject result = new JSONObject();
result.put("qrcode_surcharge", client.getBooleanValue("qrcode_surcharge"));
result.put("retail_surcharge", client.getBooleanValue("retail_surcharge"));

@ -52,6 +52,7 @@ public class ClientPreApplyBean {
@NotEmpty(message = "codeKey can't be null")
private String codeKey;
private boolean agree;
private String nation_code;
public JSONObject insertObject() {
JSONObject res = (JSONObject) JSON.toJSON(this);
@ -225,4 +226,12 @@ public class ClientPreApplyBean {
public void setCodeKey(String codeKey) {
this.codeKey = codeKey;
}
public String getNation_code() {
return nation_code;
}
public void setNation_code(String nation_code) {
this.nation_code = nation_code;
}
}

@ -48,6 +48,8 @@ import java.util.HashSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import javax.annotation.PostConstruct;
@ -56,11 +58,9 @@ import javax.annotation.Resource;
import cn.yixblog.platform.http.HttpRequestGenerator;
import cn.yixblog.platform.http.HttpRequestResult;
@Service
public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
@Value("${royalpay.sms.appid:1400094878}")
private int appId;
@Value("${royalpay.sms.appkey:43390d81e20c5191c278fbf4cd275be2}")
@ -97,6 +97,8 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
private ClientConfigMapper clientConfigMapper;
@Resource
private PmtSubMerchantIdMapper pmtSubMerchantIdMapper;
private ThreadPoolExecutor pool = new ThreadPoolExecutor(1, 10, 5, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>());
@Resource
private StringRedisTemplate stringRedisTemplate;
@ -140,12 +142,11 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
if (StringUtils.isNotEmpty(value)) {
throw new BadRequestException("SMS has been sentPlease check your messages or try again in 3 minutes.");
}
JSONObject sysConfig = sysConfigManager.getSysConfig();
ArrayList<String> param = new ArrayList<>();
String registerClientCode = RandomStringUtils.random(6, false, true);
param.add("RoyalPay");
param.add(registerClientCode);
String expireMin = String.valueOf(sysConfig.getOrDefault("sms.verification.code.expire", 3));
String expireMin = "3";
param.add(expireMin);
try {
sender.sendWithParam(nationCode.trim(), phoneNumber, REGISTER_CLIENT_TEMPLID, param, "RoyalPay", "", "");
@ -158,14 +159,17 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
}
@Override
public void sendVerifyEmail(String address, int client_id,String username) {
public void sendVerifyEmail(String address, int client_id, String username) {
JSONObject client = clientManager.getClientInfo(client_id);
if (client == null) {
throw new BadRequestException("Merchant not found");
}
if (client.getBooleanValue("mail_confirm")) {
throw new BadRequestException("mail address has been verified");
}
String key = checkOrGenerateVerifyMailKey(address, null);
Context ctx = new Context();
ctx.setVariable("url", PlatformEnvironment.getEnv().concatUrl("/register/account/mail/" + address + "/verify/" + key + "/jump?username="+username));
ctx.setVariable("url", PlatformEnvironment.getEnv().concatUrl("/register/account/mail/" + address + "/verify/" + key + "/jump?username=" + username));
final String content = thymeleaf.process("mail/register_application", ctx);
SendMail sendMail = new SendMail();
Set<String> to = new HashSet<>();
@ -223,13 +227,13 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
}
@Override
public void checkAccountName(String contact_phone,String nation_code) {
public void checkAccountName(String contact_phone, String nation_code) {
nation_code = nation_code.trim();
if(!nation_code.startsWith("+")){
nation_code ="+"+nation_code;
if (!nation_code.startsWith("+")) {
nation_code = "+" + nation_code;
}
JSONObject account = clientAccountMapper.findByPhone(contact_phone,nation_code);
if (account != null){
JSONObject account = clientAccountMapper.findByPhone(contact_phone, nation_code);
if (account != null) {
throw new ForbiddenException("用户名已被注册");
}
}
@ -238,117 +242,125 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
@Transactional
public void saveOrUpdateApplyInfo(JSONObject applyInfo, String username) {
JSONObject apply = sysClientPreMapperMapper.findByUserName(username);
if (apply == null ){
if (apply == null) {
sysClientPreMapperMapper.save(applyInfo);
}else {
} else {
applyInfo.put("client_pre_apply_id", apply.getIntValue("client_pre_apply_id"));
applyInfo.put("update_time", new Date());
sysClientPreMapperMapper.update(applyInfo);
if(applyInfo.getBooleanValue("agree")){
if (applyInfo.getBooleanValue("agree")) {
applyerToClient(username);
}
}
}
private void applyerToClient(String username){
private void applyerToClient(String username) {
Date now = new Date();
JSONObject param = new JSONObject();
param.put("begin_time",DateFormatUtils.format(now,"YYYYMMdd"));
param.put("end_time",DateFormatUtils.format(DateUtils.addDays(now,1),"YYYYMMdd"));
param.put("agree",true);
List<JSONObject> existCount = sysClientPreMapperMapper.query(param);
if(existCount.size()>30){
param.put("begin_time", DateFormatUtils.format(now, "YYYYMMdd"));
param.put("end_time", DateFormatUtils.format(DateUtils.addDays(now, 1), "YYYYMMdd"));
param.put("agree", true);
List<JSONObject> existCount = sysClientPreMapperMapper.query(param);
if (existCount.size() > 30) {
throw new BadRequestException("New merchant over limit,Please contact us");
}
JSONObject apply = sysClientPreMapperMapper.findByUserName(username);
JSONObject sysConfig = sysConfigManager.getSysConfig();
String arr [] = sysConfig.getString("temp_sub_mch_id").split(",");
String tempSubMerchantId = arr[new Random().nextInt(arr.length) + 1];
String arr[] = sysConfig.getString("temp_sub_mch_id").split(",");
String tempSubMerchantId = arr[new Random().nextInt(arr.length)];
WeChatPayConfig.Merchant availableMerchant = mpPaymentApi.determineMerchant(tempSubMerchantId);
String clientMoniker = generateClientMoniker();
JSONObject sysClient = new JSONObject();
sysClient.put("company_name",apply.getString("company_name"));
sysClient.put("abn",apply.getString("abn"));
sysClient.put("short_name",apply.getString("short_name"));
sysClient.put("address",apply.getString("address"));
sysClient.put("suburb",apply.getString("suburb"));
sysClient.put("state",apply.getString("state"));
sysClient.put("postcode",apply.getString("postcode"));
sysClient.put("royalpayindustry",apply.getString("industry"));
sysClient.put("contact_person",apply.getString("contact_person"));
sysClient.put("contact_email",apply.getString("contact_email"));
sysClient.put("contact_phone",apply.getString("contact_phone"));
sysClient.put("company_phone",apply.getString("company_phone"));
sysClient.put("client_moniker",clientMoniker);
sysClient.put("create_time",new Date());
sysClient.put("source",4);
sysClient.put("approve_result",2);
sysClient.put("creator",0);
sysClient.put("industry",331);
sysClient.put("company_name", apply.getString("company_name"));
sysClient.put("abn", apply.getString("abn"));
sysClient.put("short_name", apply.getString("short_name"));
sysClient.put("address", apply.getString("address"));
sysClient.put("suburb", apply.getString("suburb"));
sysClient.put("state", apply.getString("state"));
sysClient.put("postcode", apply.getString("postcode"));
sysClient.put("royalpayindustry", apply.getString("industry"));
sysClient.put("contact_person", apply.getString("contact_person"));
sysClient.put("contact_email", apply.getString("contact_email"));
sysClient.put("contact_phone", apply.getString("contact_phone"));
sysClient.put("company_phone", apply.getString("company_phone"));
sysClient.put("client_moniker", clientMoniker);
sysClient.put("create_time", new Date());
sysClient.put("source", 4);
sysClient.put("org_id", 1);
sysClient.put("approve_result", 2);
sysClient.put("approve_time", new Date());
sysClient.put("creator", 0);
sysClient.put("business_name", apply.getString("short_name"));
sysClient.put("industry", 331);
sysClient.put("merchant_id", availableMerchant.getMerchantId());
sysClient.put("sub_merchant_id",tempSubMerchantId);
sysClient.put("common_sub_merchant_id",1);
sysClient.put("sub_merchant_id", tempSubMerchantId);
sysClient.put("common_sub_merchant_id", 1);
sysClient.put("skip_clearing", 1);
sysClient.put("country", "AUS");
sysClient.put("credential_code", RandomStringUtils.random(32, true, true));
clientMapper.save(sysClient);
int clientId = sysClient.getIntValue("client_id");
JSONObject sysAccount = new JSONObject();
sysAccount.put("username",apply.getString("username"));
sysAccount.put("display_name",apply.getString("username"));
sysAccount.put("username", apply.getString("username"));
sysAccount.put("display_name", apply.getString("username"));
String salt = PasswordUtils.newSalt();
sysAccount.put("salt", salt);
sysAccount.put("role", 1);
sysAccount.put("password_hash", PasswordUtils.hashPwd(apply.getString("password"), salt));
sysAccount.put("password_aes", PasswordUtils.encryptAESPwd(apply.getString("password")));
sysAccount.put("creator",0);
sysAccount.put("contact_phone",apply.getString("contact_phone"));
sysAccount.put("client_id",clientId);
sysAccount.put("create_time",new Date());
sysAccount.put("is_password_expired",0);
sysAccount.put("nation_code","+61");
sysAccount.put("creator", 0);
sysAccount.put("contact_phone", apply.getString("contact_phone"));
sysAccount.put("client_id", clientId);
sysAccount.put("create_time", new Date());
sysAccount.put("is_password_expired", 0);
sysAccount.put("nation_code", "+61");
clientAccountMapper.save(sysAccount);
JSONObject sysBank = new JSONObject();
sysBank.put("client_id",clientId);
sysBank.put("account_no",apply.getString("bank_no"));
sysBank.put("account_name",apply.getString("bank_name"));
sysBank.put("bsb_no",apply.getString("bsb_no"));
sysBank.put("client_id", clientId);
sysBank.put("account_no", apply.getString("bank_no"));
sysBank.put("account_name", apply.getString("bank_name"));
sysBank.put("bsb_no", apply.getString("bsb_no"));
JSONObject bankInfo = getBankInfo(apply.getString("bsb_no"));
sysBank.put("bank",bankInfo.getString("bank"));
sysBank.put("city",bankInfo.getString("city"));
sysBank.put("address",bankInfo.getString("address"));
sysBank.put("system",bankInfo.getString("system"));
sysBank.put("postcode",bankInfo.getString("postcode"));
sysBank.put("state",bankInfo.getString("state"));
sysBank.put("branch",bankInfo.getString("branch"));
sysBank.put("bank", bankInfo.getString("bank"));
sysBank.put("city", bankInfo.getString("city"));
sysBank.put("address", bankInfo.getString("address"));
sysBank.put("system", bankInfo.getString("system"));
sysBank.put("postcode", bankInfo.getString("postcode"));
sysBank.put("state", bankInfo.getString("state"));
sysBank.put("branch", bankInfo.getString("branch"));
clientBankAccountMapper.save(sysBank);
JSONObject clientConfig = new JSONObject();
clientConfig.put("client_id",clientId);
clientConfig.put("client_moniker",clientMoniker);
clientConfig.put("clean_days",apply.getIntValue("clean_days"));
clientConfig.put("common_sub_merchant_id",1);
clientConfig.put("client_id", clientId);
clientConfig.put("skip_clearing", 1);
clientConfig.put("client_moniker", clientMoniker);
clientConfig.put("clean_days", apply.getIntValue("clean_days"));
clientConfig.put("common_sub_merchant_id", 1);
clientConfigMapper.save(clientConfig);
JSONObject sysRate = new JSONObject();
sysRate.put("client_id",clientId);
sysRate.put("clean_days",apply.getIntValue("clean_days"));
sysRate.put("remark","自主申请");
sysRate.put("client_id", clientId);
sysRate.put("clean_days", apply.getIntValue("clean_days"));
sysRate.put("remark", "自主申请");
sysRate.put("create_time", new Date());
sysRate.put("update_time", new Date());
sysRate.put("active_time", DateFormatUtils.format(new Date(), "yyyy-MM-dd"));
sysRate.put("expiry_time", DateFormatUtils.format(DateUtils.addYears(new Date(),1), "yyyy-MM-dd"));
sysRate.put("expiry_time", DateFormatUtils.format(DateUtils.addYears(new Date(), 1), "yyyy-MM-dd"));
JSONObject rateConfig = clientManager.getSysRateConfig();
JSONObject chooseRate = new JSONObject();
if (apply.getIntValue("clean_days") == 1){
if (apply.getIntValue("clean_days") == 1) {
chooseRate = rateConfig.getJSONObject("t1");
}
if (apply.getIntValue("clean_days") == 2){
if (apply.getIntValue("clean_days") == 2) {
chooseRate = rateConfig.getJSONObject("t2");
}
if (apply.getIntValue("clean_days") == 3){
if (apply.getIntValue("clean_days") == 3) {
chooseRate = rateConfig.getJSONObject("t3");
}
sysRate.putAll(chooseRate);
@ -358,23 +370,25 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
configNewClientRate(sysRate, clientId, "AlipayOnline", "AlipayOnline");
configNewClientRate(sysRate, clientId, "Bestpay", "Bestpay");
configNewClientRate(sysRate, clientId, "jd", "JDpay");
try {
clientManager.getNewAggregateAgreeFile(clientMoniker,null,false);
} catch (Exception ignore) {
}
Runnable task2 = () -> {
try {
clientManager.getNewAggregateAgreeFile(clientMoniker, null, false);
} catch (Exception ignore) {
}
};
pool.execute(task2);
}
private String generateClientMoniker(){
private String generateClientMoniker() {
String clientMoniker = RandomStringUtils.random(4, true, true).toUpperCase();
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client != null){
if (client != null) {
generateClientMoniker();
}
return clientMoniker;
}
private void configNewClientRate(JSONObject config, int clientId, String channel, String rateKey) {
if (config.containsKey(rateKey)) {
JSONObject newConfig = new JSONObject();
@ -413,19 +427,19 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
LoginInfo loginInfo = new LoginInfo();
loginInfo.setLoginId(loginAccount.getString("userName"));
loginInfo.setPassword(loginAccount.getString("password"));
JSONObject account = signInAccountService.accountCheck(loginInfo);
JSONObject account = signInAccountService.clientLoginCheck(loginInfo);
JSONObject client = clientManager.getClientInfo(account.getIntValue("client_id"));
if (!address.equals(client.getString("contact_email"))) {
throw new BadRequestException(LocaleSupport.localeMessage("error.login.password"));
}
JSONObject record = new JSONObject();
record.put("client_id",client.getIntValue("client_id"));
record.put("mail_confirm",true);
record.put("client_id", client.getIntValue("client_id"));
record.put("mail_confirm", true);
clientMapper.update(record);
}
private String getRegisterClientRedisKey(String phoneNumber){
return REGISTER_CLIENT_PREFIX +phoneNumber;
private String getRegisterClientRedisKey(String phoneNumber) {
return REGISTER_CLIENT_PREFIX + phoneNumber;
}
private String getRegisterClientProcessRedisKey(String codeKey) {

@ -3,13 +3,9 @@ package au.com.royalpay.payment.manage.application.web;
import au.com.royalpay.payment.manage.application.beans.ClientPreApplyBean;
import au.com.royalpay.payment.manage.application.beans.ClientPreApplyStep1Bean;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.http.HttpUtils;
import com.alibaba.fastjson.JSONObject;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@ -20,7 +16,6 @@ import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
@RestController
@ -34,17 +29,6 @@ public class SimpleClientApplyController {
simpleClientApplyService.checkAccountName(phone,nation_code);
}
@RequestMapping(value = "/account/{codeKey}", method = RequestMethod.POST)
@ResponseBody
public void registerAccount(@PathVariable String codeKey, @RequestBody @Valid NewAccountBean accountBean, Errors errors, HttpServletResponse response) {
HttpUtils.handleValidErrors(errors);
simpleClientApplyService.verifyRegisterSMSCode(codeKey, accountBean.getContactPhone());
JSONObject account = simpleClientApplyService.newAccount(accountBean);
String statusKey = simpleClientApplyService.partnerSignIn(account);
HttpUtils.setCookie(response, CommonConsts.CODE_KEY, statusKey);
}
@RequestMapping(value = "/account/mail/{address}/verify/{codeKey}/jump", method = RequestMethod.GET)
public ModelAndView jumpVerifyMail(@PathVariable String codeKey, @PathVariable String address,@RequestParam String username) {
simpleClientApplyService.checkOrGenerateVerifyMailKey(address, codeKey);

@ -2,6 +2,8 @@ package au.com.royalpay.payment.manage.mappers.system;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
@ -20,5 +22,5 @@ public interface MailSendMapper {
void update(JSONObject record);
@AutoSql(type = SqlType.SELECT)
JSONObject find(String emailId, String contact_email);
JSONObject find(@Param("message_id") String message_id, @Param("mail_address")String mail_address);
}

@ -31,7 +31,7 @@ public class ClientRegisterInfo {
// @NotEmpty(message = "error.payment.valid.param_missing")
private String industry;
@JSONField(name = "alipayindustry")
@NotEmpty(message = "error.payment.valid.param_missing")
/* @NotEmpty(message = "error.payment.valid.param_missing")*/
private String alipayIndustry;
@JSONField(name = "company_photo")
private String companyPhoto;

@ -292,4 +292,8 @@ public interface ClientManager {
List<JSONObject> getClientSubMerchantIdLogs(String clientMoniker,JSONObject manager);
void applyToCompliance(String client_moniker, JSONObject account);
void sendVerifyEmail(JSONObject client,String accountId);
JSONObject getWithConfig(int client_id);
}

@ -11,6 +11,7 @@ import au.com.royalpay.payment.core.exceptions.InvalidShortIdException;
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.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.device.core.DeviceManager;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper;
import au.com.royalpay.payment.manage.mappers.log.ClientsOperationLogMapper;
@ -264,6 +265,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource
private ClientInfoCacheSupport clientInfoCacheSupport;
@Resource
private SimpleClientApplyService simpleClientApplyService;
@Resource
private MongoTemplate mongoTemplate;
@Resource
@ -702,7 +706,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (pass == 1) {
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "skip_clearing", false));
if (client.getIntValue("source") == 4) {
sendAuthInitEmail(manager, client);
List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(client.getIntValue("client_id"));
JSONObject account = accounts.get(0);
sendInitEmail(manager, client, account.getString("username"), "*****");
saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager);
} else if (checkGreenChannel && client.getIntValue("open_status") == 5) {
// 绿色通道通过后不发邮件
logger.info("PASS 绿色通道:" + clientMoniker);
@ -2238,7 +2245,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
file.put("file_id", existFile.getString("file_id"));
clientFilesMapper.update(file);
}
if (!renewal) {
if (!renewal && client.getIntValue("source")!=4) {
clientModifySupport.processClientModify(new OpenStatusModify(manager, clientMoniker, 2));
}
@ -2576,6 +2583,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
@Override
@Transactional
public void commitToCompliance(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
@ -2636,7 +2644,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
log.put("open_status_from", open_status_form);
}
log.put("open_status_to", open_status_to);
log.put("operator_id", manager.getString("manager_id"));
log.put("operator_id", StringUtils.isNotEmpty(manager.getString("manager_id"))?manager.getString("manager_id"):manager.getString("account_id"));
log.put("operator", manager.getString("display_name"));
log.put("create_time", new Date());
log.put("remark", remark);
@ -2845,6 +2853,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if(client.getInteger("approve_result")==null || client.getIntValue("approve_result")==4){
auditModify.setApprove_result(5);
}
if(client.getIntValue("source")==4){
auditModify.setApprove_result(5);
}
if (refuse_remark != null && !refuse_remark.isEmpty()) {
auditModify.setRefuse_remark(refuse_remark);
}
@ -3403,12 +3414,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException();
}
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
if (client.getInteger("open_status") == null) {
int countProduct = commoditiesMapper.checkProduct(client.getInteger("client_id"));
if (countProduct <= 0) {
throw new BadRequestException("The Merchant's Product is empty!");
}
}
// 提交合规启用银行、费率验证 add by Tayl0r 2017/06/13
JSONObject rate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat");
@ -3439,4 +3444,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
sendCommissionWechatMessage(client);
}
}
@Override
public void sendVerifyEmail(JSONObject client,String accountId) {
JSONObject clientAccount = clientAccountMapper.findById(accountId);
Assert.notNull(clientAccount);
simpleClientApplyService.sendVerifyEmail(client.getString("contact_email"),client.getIntValue("client_id"),clientAccount.getString("username"));
}
@Override
public JSONObject getWithConfig(int client_id) {
JSONObject clientWithConfig = getClientInfo(client_id);
clientWithConfig.putAll(clientConfigService.find(client_id));
return clientWithConfig;
}
}

@ -1,6 +1,9 @@
package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
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.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.merchants.core.ClientSignEventSupport;
@ -57,6 +60,9 @@ public class PartnerViewController {
@Resource
private ClientContractService clientContractService;
@Resource
private SimpleClientApplyService simpleClientApplyService;
@RequestMapping(method = RequestMethod.GET)
@RequirePartner
@ResponseBody
@ -385,4 +391,41 @@ public class PartnerViewController {
public void commitAudit(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.applyToCompliance(account.getString("client_moniker"),account);
}
@PartnerMapping(value = "/compliance/files", method = RequestMethod.GET)
@ResponseBody
public JSONObject complianceFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
return clientManager.getAuthFiles(null,account.getString("client_moniker"));
}
@PartnerMapping(value = "/verify/email", method = RequestMethod.PUT)
@ResponseBody
public void sendVerifyEmail(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.sendVerifyEmail(account.getJSONObject("client"),account.getString("account_id"));
}
@PartnerMapping(value = "/update/partnerInfo", method = RequestMethod.PUT)
@ResponseBody
public void updatePartnerInfo(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account,@RequestBody ClientRegisterInfo info) {
JSONObject client = account.getJSONObject("client");
if (client.getIntValue("approve_result") != 1 && client.getIntValue("source") == 4){
clientManager.updateClientRegisterInfo(null,account.getString("client_moniker"),info);
}else {
throw new BadRequestException("已通过审核,暂不能提交和修改");
}
}
@PartnerMapping(value = "/update/file", method = RequestMethod.PUT)
@ResponseBody
public void updateFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody ClientAuthFilesInfo filesInfo) {
JSONObject client = account.getJSONObject("client");
if (client.getIntValue("approve_result") != 1 && client.getIntValue("source") == 4){
JSONObject manager = new JSONObject();
manager.put("display_name","client");
clientManager.uploadAuthFiles(manager, account.getString("client_moniker"), filesInfo);
}else {
throw new BadRequestException("已通过审核,暂不能提交和修改");
}
}
}

@ -5,6 +5,7 @@ import au.com.royalpay.payment.manage.mappers.payment.TaskManualSettleMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.system.CalendarMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.settlement.core.ManualSettleSupport;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
@ -45,6 +46,8 @@ public class ManualSettleSupportImpl implements ManualSettleSupport {
private ClientAccountMapper clientAccountMapper;
@Resource
private CalendarMapper calendarMapper;
@Resource
private ClientManager clientManager;
@Override
public JSONObject requestManualSettle(Date settleTo, String accountId) {
@ -76,7 +79,7 @@ public class ManualSettleSupportImpl implements ManualSettleSupport {
@Override
public JSONObject findCurrentSettle(int clientId, boolean includingUnsettleData) {
JSONObject client = merchantInfoProvider.getClientInfo(clientId);
JSONObject client = clientManager.getWithConfig(clientId);
if (!client.getBooleanValue("manual_settle")) {
throw new ForbiddenException("Manual Settlement Not Enabled");
}

@ -52,7 +52,7 @@
<form action="" method="post">
<div class="form-group has-feedback">
<input type="text" id="userName" class="form-control" placeholder="User Names">
<input type="text" id="userName" class="form-control" placeholder="User Names" readonly="readonly">
<span class="glyphicon glyphicon-user form-control-feedback"></span>
</div>
@ -114,7 +114,7 @@
$("#bg").hide();
$("#show").hide();
alert("Succes");
location.href = 'index.html'
location.href = '/login.html';
},
error: function (jqXHR) {
$("#bg").hide();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

@ -786,7 +786,7 @@ margin-bottom: 10%;"/>
<ul class="dropdown-menu user-dropdown-menu" ng-cloak>
<!-- User image -->
<li class="user-header user-header-yedian">
<img src="static/images/customer_service.jpg"
<img src="static/images/customer_service2.jpg"
alt="Customer Service Qrcode">
<p>
Technical Support WeChat
@ -1048,7 +1048,7 @@ margin-bottom: 10%;"/>
</style>
<span style="font-size: smaller"> ( <i class="fa fa-phone" aria-hidden="true"></i> 1300-10-77-50 |
<i class="fa fa-envelope-o" aria-hidden="true"></i> support@royalpay.com.au |
WeChat <i class="fa fa-qrcode" aria-hidden="true" tooltip-class="customClass" uib-tooltip-html="'<img src=static/images/customer_service.jpg>'"></i> )
WeChat <i class="fa fa-qrcode" aria-hidden="true" tooltip-class="customClass" uib-tooltip-html="'<img src=static/images/customer_service2.jpg>'"></i> )
</span>
</footer>

@ -1,5 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"
xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@ -271,8 +272,8 @@
<div class="form-group has-feedback"
ng-class="{'has-error':accountForm.contact_email.$invalid && accountForm.contact_email.$dirty}">
<input class="form-control" ng-model="partner.contact_email" placeholder="Email address"
required maxlength="50" name="contact_email" ng-mouseleave="checkEmail()" ng-mousedown="trueEmail =false">
<input type="email" class="form-control" ng-model="partner.contact_email" placeholder="Email address"
required maxlength="50" name="contact_email" ng-mouseleave="checkParams()" ng-mousedown="trueEmail =false">
<div style="text-align: left" ng-if="trueEmail">
<p style="text-align: left;font-size: 12px;color: red">The mailbox is incorrect</p>
</div>
@ -282,15 +283,17 @@
<div class="form-group col-xs-12"
ng-class="{'has-error':accountForm.contact_phone.$invalid && accountForm.contact_phone.$dirty || name_exist}">
<div class="input-group">
<span class="input-group-addon">+61</span>
<span class="input-group-addon">{{partner.nation_code}}</span>
<input type="text" name="contact_phone" required ng-model="partner.contact_phone"
class="form-control" style="display: inline"
maxlength="15"
placeholder="Your Phone">
class="form-control" style="display: inline" onkeyup="value=value.replace(/[^\d]/g,'')"
placeholder="Your Phone" maxlength="11" ng-mouseleave="checkParams()" ng-mousedown="name_exist =false">
<button type="button" class="btn btn-success button_width" style="display:inline;height: 34px;float: right;border-radius: 0px"
title="发送验证码" ng-click="sendVerificationCode()"
ng-bind="description" ng-disabled="canClick"></button>
</div>
<div style="text-align: left" ng-if="name_exist">
<span style="text-align: left;font-size: 12px;" class="text-danger">The phone number has already existed</span>
</div>
<div style="text-align: left">
<span style="text-align: left;font-size: 12px;" class="text-info">phone number is also your login id</span>
</div>
@ -299,8 +302,9 @@
<div class="form-group has-feedback"
ng-class="{'has-error':accountForm.code.$invalid && accountForm.code.$dirty}">
<input class="form-control" type="number" ng-model="partner.phoneCodeKey" placeholder="Code"
required maxlength="10" name="code">
<input class="form-control" type="text" ng-model="partner.phoneCodeKey" placeholder="Verification Code"
onkeyup="value=value.replace(/[^\d]/g,'')"
required maxlength="6" name="code" ng-click="checkParams()">
</div>
<div class="form-group has-feedback"
@ -335,7 +339,7 @@
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.company_name.$invalid && companyForm.company_name.$dirty}">
<input type="text" class="form-control" ng-model="partner.company_name" name="company_name"
placeholder="Company Name" required maxlength="80">
placeholder="Company Name" required maxlength="80">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.abn.$invalid && companyForm.abn.$dirty}">
@ -345,17 +349,17 @@
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.short_name.$invalid && companyForm.short_name.$dirty}">
<input type="text" class="form-control" ng-model="partner.short_name" name="short_name"
placeholder="Merchant Name" required maxlength="80">
placeholder="Merchant Name" required maxlength="50">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.company_phone.$invalid && companyForm.company_phone.$dirty}">
<input type="text" class="form-control" ng-model="partner.company_phone" name="company_phone"
placeholder="Company phone" required maxlength="80">
placeholder="Company phone" required maxlength="20">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.address.$invalid && companyForm.address.$dirty}">
<textarea class="form-control" ng-model="partner.address" placeholder="Address"
name="address" required maxlength="100"></textarea>
name="address" required maxlength="200"></textarea>
</div>
<div class="form-group has-feedback"
@ -366,7 +370,7 @@
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.state.$invalid && companyForm.state.$dirty}">
<select class="form-control" name="state"
ng-model="partner.state"
ng-model="partner.state" maxlength="20"
id="state-input" required
ng-options="state.value as state.label for state in states">
<option value="">State</option>
@ -375,7 +379,7 @@
<div class="form-group has-feedback"
ng-class="{'has-error':companyForm.postcode.$invalid && companyForm.postcode.$dirty}">
<input class="form-control" ng-model="partner.postcode" placeholder="Postcode" required
maxlength="50" name="postcode">
maxlength="10" name="postcode">
</div>
<div class="row">
<div class="col-xs-12 margin-bottom">
@ -418,24 +422,32 @@
</div>
</form>
<form novalidate name="bankForm" action="" method="post" ng-show="chooseArray[2]">
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.account_name.$invalid && bankForm.account_name.$dirty}">
<input class="form-control" ng-model="partner.bank_name" placeholder="Account Name"
maxlength="50"
required name="account_name">
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.account_no.$invalid && bankForm.account_no.$dirty}">
<input class="form-control" ng-model="partner.bank_no" placeholder="Account No"
required
name="account_no">
<input type="text" class="form-control" ng-model="partner.bank_no" placeholder="Account No"
maxlength="20" onkeyup="value=value.replace(/[^\d]/g,'')"
name="account_no" required>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.account_name.$invalid && bankForm.account_name.$dirty}">
<input class="form-control" ng-model="partner.bank_name" placeholder="Account Name"
required name="account_name">
ng-class="{'has-error':(bankForm.re_account_no.$invalid && bankForm.re_account_no.$dirty) ||(partner.bank_no != partner.re_bank_no)}">
<input type="text" class="form-control" ng-model="partner.re_bank_no" placeholder="Confirm Account No"
required maxlength="20" onkeyup="value=value.replace(/[^\d]/g,'')"
name="re_account_no">
</div>
<div class="row">
<div class="form-group col-xs-12"
ng-class="{'has-error':bankForm.bsb_no.$invalid && bankForm.bsb_no.$dirty}">
<input class="form-control" ng-model="partner.bsb_no" placeholder="BSB No" required
name="bsb_no" style="width: 80%;display: inline">
maxlength="6" name="bsb_no" style="width: 80%;display: inline" onkeyup="value=value.replace(/[^\d]/g,'')">
<button type="button" class="btn btn-success" style="width:20%;display:inline;height: 34px;float: right;border-radius: 0px"
title="Search" ng-click="searchBankInfo(partner.bsb_no)">Search</button>
</div>
@ -451,29 +463,29 @@
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.address.$invalid && bankForm.address.$dirty}">
<p class="form-control-static">&nbsp; Address: <em>{{bankaccount.address}}</em></p>
<p class="form-control-static">&nbsp; <small>Address: &nbsp;<em>{{bankaccount.address}}</em></small></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.system.$invalid && bankForm.bank_system.$dirty}">
<p class="form-control-static">&nbsp; system: <em>{{bankaccount.system}}</em></p>
<p class="form-control-static">&nbsp; <small>system: &nbsp;<em>{{bankaccount.system}}</em></small></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.postcode.$invalid && bankForm.bank_postcode.$dirty}">
<p class="form-control-static">&nbsp; postcode: <em>{{bankaccount.postcode}}</em></p>
<p class="form-control-static">&nbsp; <small>postcode: &nbsp;<em>{{bankaccount.postcode}}</em></small></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.state.$invalid && bankForm.bank_state.$dirty}">
<p class="form-control-static">&nbsp; state: <em>{{bankaccount.state}}</em></p>
<p class="form-control-static">&nbsp; <small>state:&nbsp; <em>{{bankaccount.state}}</em></small></p>
</div>
<div class="form-group has-feedback"
ng-class="{'has-error':bankForm.branch.$invalid && bankForm.branch.$dirty}">
<p class="form-control-static">&nbsp; branch: <em>{{bankaccount.branch}}</em></p>
<p class="form-control-static">&nbsp; <small>branch: &nbsp;<em>{{bankaccount.branch}}</em></small></p>
</div>
</div>
<div class="row">
<div class="col-xs-12 margin-bottom">
<button type="button" class="btn btn-success btn-block btn-flat"
ng-click="saveApplyInfo(bankForm,3)" ng-disabled="bankForm.$invalid">Next
ng-click="saveApplyInfo(bankForm,3)" ng-disabled="bankForm.$invalid || (partner.bank_no != partner.re_bank_no)">Next
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"
@ -494,33 +506,33 @@
</div>
<div style="text-align: left" ng-if="showCleanDay">
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; WeChat Rate Value: <em>{{rate.wechat_rate_value}}%</em></p>
<p class="form-control-static">&nbsp; <small>WeChat Rate Value: &nbsp;{{rate.wechat_rate_value}}%</small></p>
</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; Alipay Rate Value(Retail): <em>{{rate.alipay_rate_value}}%</em></p>
<p class="form-control-static">&nbsp; <small>Alipay Rate Value(Retail): &nbsp;{{rate.alipay_rate_value}}%</small></p>
</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; Alipay Rate Value(Online): <em>{{rate.alipayonline_rate_value}}%</em></p>
<p class="form-control-static">&nbsp; <small>Alipay Rate Value(Online): &nbsp;{{rate.alipayonline_rate_value}}%</small></p>
</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; Bestpay Rate Value: <em>{{rate.bestpay_rate_value}}%</em></p>
<p class="form-control-static">&nbsp; <small>Bestpay Rate Value: &nbsp;{{rate.bestpay_rate_value}}%</small></p>
</div>
<div class="form-group has-feedback">
<p class="form-control-static">&nbsp; JD Rate Value: <em>{{rate.jd_rate_value}}%</em></p>
<p class="form-control-static">&nbsp; <small>JD Rate Value: &nbsp;{{rate.jd_rate_value}}%</small></p>
</div>
</div>
<div class="form-group has-feedback">
<div class="checkbox agree_left agree-text">
<label><input type="checkbox" ng-model="partner.agree" value="1">Agree to Terms & Conditions</label>
<label><input type="checkbox" ng-model="partner.agree" value="1"><a href="https://file.royalpay.com.au/open/2018/03/07/merchant_service20180307.pdf" target="_blank">Agree to Terms & Conditions</a></label>
</div>
</div>
<div class="row">
<div class="col-xs-12 margin-bottom">
<button type="button" class="btn btn-success btn-block btn-flat"
ng-click="saveApplyInfo(cleanForm,4)" ng-disabled="cleanForm.$invalid || !partner.agree" >Submit
ng-click="saveApplyInfo(cleanForm,4)" ng-disabled="cleanForm.$invalid || !partner.agree || submit" >Submit<span ng-if="submit" class="dotting"></span>
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"
@ -749,27 +761,27 @@
</div>
</form>-->
<form ng-show="chooseArray[4]">
<div class="success_img">
<img height="60" width="60" src="static/images/step/gou.png">
</div>
<div class="success_wrapper">
<div class="success_img">
<img height="40" width="40" src="static/images/step/gou.png">
</div>
<div class="success_text">
<div>恭喜注册成功</div>
<div class="success_text2">欢迎使用RoyalPay收单服务</div>
<div>Congratulations,
<br>your RoyalPay account has been registered successfully.</div>
</div>
</div>
<div class="success_content">
<div class="content_align">
<div>注意事项</div>
<p>1、需要完成 合规材料的提交具体请查看appxx菜单xx功能</p>
<p>2、在完成合规认证之前,不会对交易进行清算;</p>
<p>3、账户名和密码以及相关信息已发送至账户邮箱,请妥善保护自己的密码,及时进行修改。</p>
<div>Notice</div>
<p>1. As soon as you create a RoyalPay account, you can use all of RoyalPay's features, including accepting payments from customers.</p>
<p>2. Before you activate your account, RoyalPay will not execute settlement.Therefore, it is recommended that you submit your compliance materials as soon as possible.</p>
<p>3. If you have any questions, you can contact our customer service.</p>
</div>
<div class="row">
<div class="col-xs-12 margin-bottom2">
<div class="row" style=" margin-left: 100px; margin-right: 100px;">
<div class="col-xs-12">
<button type="button" id="login-btn7" class="btn btn-success btn-block btn-flat"
onclick="window.location.href='/login.html'">
{{seconds}}秒后,将跳转登录页, 或点击直接跳转登录页
After {{seconds}} seconds, the system will automatically jump to the login page.
</button>
<div>
<p ng-if="resError" style="padding: 6px 12px;font-size: 14px;"

@ -21,7 +21,7 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
$scope.loadCurrentUser = function () {
$http.get('/global/userstatus/current_partner').then(function (resp) {
$rootScope.currentUser = resp.data;
if ((resp.data.client.approve_result == 2 || resp.data.client.approve_result == 3) && resp.data.client.source == 4) {
/* if ((resp.data.client.approve_result == 2 || resp.data.client.approve_result == 3) && resp.data.client.source == 4) {
if (resp.data.wechat_openid == null) {
$scope.newPartnerGuide(resp.data);
} else {
@ -32,7 +32,7 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo
});
}
}
}*/
if ($rootScope.currentUser.is_password_expired) {
commonDialog.confirm({
title: 'Change Password!',

@ -95,7 +95,7 @@ body .progress_inner__step:before {
height: 30px;
color: #70afd0;
background: white;
line-height: 30px;
line-height: 26px;
border: 3px solid #a6cde2;
font-size: 12px;
top: 3px;
@ -116,6 +116,7 @@ body .progress_inner__step {
text-align: center;
position: relative;
}
body .progress_inner__step label {
padding-top: 50px;
top: -20px;
@ -351,15 +352,18 @@ body .progress_inner input[type="radio"] {
}
.success_img{
display: inline-block;
text-align: center;
margin-bottom: -5px;
}
.success_img img{
vertical-align: baseline;
vertical-align: top;
}
.success_text{
text-align: left;
display: inline-block;
margin-left: 14px;
}
.success_text2{
font-family: PingFangSC-Regular;
font-size: 15px;
@ -367,7 +371,7 @@ body .progress_inner input[type="radio"] {
letter-spacing: 0px;
}
.success_content{
margin-top: 50px;
margin-top: 30px;
font-family: PingFangSC-Regular;
font-size: 15px;
color: #8B919D;
@ -375,8 +379,9 @@ body .progress_inner input[type="radio"] {
}
.content_align{
margin:0 auto;
width:50%;
width:52%;
text-align:left;
margin-bottom: 40px;
}
.margin-bottom2{
margin-top: 120px;
@ -469,3 +474,22 @@ body .dis_before:nth-child(5):before {
}*/
.dotting {
display: inline-block; width: 18px; min-height: 4px;
padding-right: 3px;
border-left: 4px solid currentColor; border-right: 4px solid currentColor;
background-color: currentColor; background-clip: content-box;
box-sizing: border-box;
animation: dot 2s infinite step-start both;
}
.dotting:before { content: '.....'; } /* IE8 */
.dotting::before { content: ''; }
:root .dotting { margin-left: 3px; padding-left: 3px; } /* IE9+ */
@keyframes dot {
25% { border-color: transparent; background-color: transparent;} /* 0个点 */
50% { border-right-color: transparent; background-color: transparent; } /* 1个点 */
75% { border-right-color: transparent; } /* 2个点 */
}

@ -568,7 +568,8 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
}
}]);*/
app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser','clearingDetailService', function ($scope, $http, $filter, $uibModal,$timeout, chartParser,clearingDetailService) {
app.controller('partnerDashboardCtrl', ['$scope', '$http', '$filter', '$uibModal','$timeout', 'chartParser','clearingDetailService','commonDialog', function ($scope, $http, $filter, $uibModal,$timeout, chartParser,clearingDetailService,commonDialog) {
$scope.sendMailCount = 0;
$scope.scales = [
{
key: 'today',
@ -901,6 +902,7 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
$scope.getCurrentPartner = function () {
$http.get('/client/partner_info').then(function (resp) {
$scope.manual_settle = resp.data.manual_settle;
$scope.mail_confirm = resp.data.mail_confirm;
})
};
$scope.getCurrentPartner();
@ -910,190 +912,62 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct
controller: 'unSettledAmountHistoryDialogCtrl'
})
};
$scope.contactCustomerService = function () {
$uibModal.open({
templateUrl: 'static/dashboard/templates/dashboard_service_support.html',
controller: 'contactCustomerServiceDialogCtrl',
size: 'sm'
})
};
$scope.getClearingTransactions = function (client_id, detailId) {
clearingDetailService.clientClearingDetail(client_id, detailId, true)
};
}]);
app.controller('exchangeRateHistoryDialogCtrl', ['$scope', '$http', '$filter', 'chartParser', function ($scope, $http, $filter, chartParser) {
$scope.loadExchangeRateHistory = function (days) {
var endDate = new Date();
var startDate = new Date();
startDate.setDate(startDate.getDate() - days);
$http.get('/dashboard/system/exchange_rates', {
params: {
begin: $filter('date')(startDate, 'yyyyMMdd'),
end: $filter('date')(endDate, 'yyyyMMdd')
}
}).then(function (resp) {
handleRateHistoryChart(resp.data);
})
};
$scope.loadExchangeRateHistory(7);
var rateHistoryConfig = {
chart: {
tooltip: {
trigger: 'axis',
},
toolbox: {
show: true,
feature: {
mySeven: {
title: 'Last 7 Days',
show: true,
icon: 'path://M3.59-4.07L32.38-4.07L32.38 0.04Q22.25 25.11 17.19 46.34L10.65 46.34Q16.14 26.94 26.19 1.41L3.59 1.41L3.59-4.07Z',
onclick: function () {
$scope.loadExchangeRateHistory(7)
}
},
myThirty: {
title: 'Last 30 Days',
show: true,
icon: 'path://M12.52 17.02L16.10 17.02Q20.71 17.02 22.43 15.72Q25.66 13.23 25.66 8.23Q25.66-0.63 17.61-0.63Q10.93-0.63 9.42 6.93L3.73 6.93Q4.50 2.19 7.03-0.91Q10.90-5.51 17.61-5.51Q23.24-5.51 26.89-2.28Q31.22 1.52 31.22 8.02Q31.22 16.78 23.38 19.48Q32.84 23.14 32.84 32.81Q32.84 39.00 29.32 42.97Q25.10 47.79 17.72 47.79Q10.79 47.79 6.68 43.04Q3.66 39.56 3.02 33.44L8.93 33.44Q9.67 42.83 17.72 42.83Q21.45 42.83 23.98 40.72Q27.14 38.01 27.14 32.81Q27.14 21.63 16.10 21.63L12.52 21.63L12.52 17.02ZM54-5.51Q67.99-5.51 67.99 21.14Q67.99 47.79 54 47.79Q40.04 47.79 40.04 21.14Q40.04-5.51 54-5.51M46.97 33.65L59.84 4.30Q57.80-0.55 53.93-0.55Q45.95-0.55 45.95 21.14Q45.95 28.52 46.97 33.65M48.16 37.91Q50.13 42.83 54 42.83Q62.09 42.83 62.09 21.07Q62.09 13.86 61.07 8.66L48.16 37.91Z',
onclick: function () {
$scope.loadExchangeRateHistory(30)
}
}
$scope.checkStartGuidance = function () {
$http.get('/client/partner_info/compliance/files').then(function (resp) {
$scope.complianceFiles = resp.data;
if($scope.complianceFiles.client_id_file != null){
if($scope.complianceFiles.client_bank_file != null && $scope.complianceFiles.client_company_file != null){
$scope.toCommitFiles = true;
}
},
legend: {
data: ['Wechat', 'Alipay'],
bottom: 0,
height: '15%',
width: '80%',
left: '10%'
},
yAxis: {
type: 'value',
name: 'Exchange Rate',
min: 'auto'
}
},
xAxis: {
basic: {
type: 'category',
boundaryGap: false
},
key: 'date'
},
series: [
{
basic: {
name: 'Wechat',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0,
itemStyle : {
normal : {
color:'#09bb07',
lineStyle:{
color:'#09bb07'
}
}
}
},
column: {key: 'Wechat.exchange_rate'}
},
{
basic: {
name: 'Alipay',
type: 'line',
label: {normal: {show: true}},
showAllSymbols: true,
showSymbol: true,
yAxisIndex: 0,
itemStyle : {
normal : {
color:'#00c0ef',
lineStyle:{
color:'#00c0ef'
}
});
$http.get('/client/partner_info').then(function (resp) {
$scope.applyClient = resp.data;
if($scope.applyClient.logo_url != null && $scope.applyClient.description != null && $scope.applyClient.business_structure != null){
if(($scope.applyClient.store_photo != null && $scope.applyClient.company_photo != null) || $scope.applyClient.company_website != null){
if (($scope.applyClient.business_structure == "Company" && $scope.applyClient.acn != null) || $scope.applyClient.business_structure != 'Company' && $scope.applyClient.abn != null){
$scope.commitPartnerInfo = true;
}
}
},
column: {key: 'Alipay.exchange_rate'}
}
]
};
function handleRateHistoryChart(exchangeRates) {
$scope.rateHistory = chartParser.parse(rateHistoryConfig, exchangeRates);
}
}]);
app.controller('unSettledAmountHistoryDialogCtrl', ['$scope', '$http', '$filter','commonDialog', function ($scope, $http, $filter,commonDialog) {
$scope.params = {isAll:true};
$scope.settleParams = {};
$scope.unSettledAmountHistory = function () {
$http.get('/client/manual_settle/today').then(function (resp) {
$scope.currentSettle = resp.data;
$scope.settleParams = angular.copy($scope.currentSettle);
if($scope.currentSettle.settle_to){
$scope.params.isAll = false;
$scope.params.to_date = new Date($scope.currentSettle.settle_to);
}
$scope.params.maxData = $scope.currentSettle.unsettle[0].date_str;
$scope.source = resp.data.source;
$scope.approve_result = resp.data.approve_result;
})
};
$scope.unSettledAmountHistory();
$scope.changeIsAll = function () {
if($scope.params.isAll){
$scope.params.to_date = '';
$scope.settleParams = angular.copy($scope.currentSettle);
}else {
if($scope.currentSettle.settle_to){
$scope.params.to_date = new Date($scope.currentSettle.settle_to);
}else{
$scope.params.to_date = $scope.params.maxData;
}
}
};
$scope.$watch('params.to_date', function() {
$scope.settleParams = angular.copy($scope.currentSettle);
if($scope.params.to_date){
$scope.params.isAll=false;
$scope.to_date = $filter('date')($scope.params.to_date, 'yyyy-MM-dd');
var cashbackChoose = {};
var count = 0;
var total_settle_amount = 0.00;
angular.forEach($scope.currentSettle.unsettle, function (unsettle) {
if (new Date(unsettle.date_str).getTime() <= new Date($scope.to_date).getTime()) {
cashbackChoose[count] = unsettle;
if(unsettle.settle_amount != null){
total_settle_amount = decimal.add(unsettle.settle_amount,total_settle_amount).toFixed(2);
}
count++;
}
});
$scope.settleParams.unsettle = cashbackChoose;
$scope.settleParams.total_settle_amount = total_settle_amount;
}else {
$scope.params.isAll = true;
if($scope.currentUser.client.source == 4 && $scope.currentUser.client.approve_result != 1){
$scope.checkStartGuidance();
}
$scope.checkEmail = function () {
if($scope.mail_confirm){
commonDialog.alert({title: 'Message', content: '邮件已验证,请勿重复发送', type: 'info'});
return;
}
try {
$scope.$digest();
}catch (err){}
});
$scope.manualSettle = function () {
if($scope.currentSettle.locked){
alert("系统正好在执行清算任务,暂不能提现,请稍后再试!");
if($scope.sendMailCount >=1){
commonDialog.alert({title: 'Message', content: '邮件已发送,请勿重复点击', type: 'info'});
return;
}
$scope.settle_to = $scope.params.to_date || $scope.params.maxData;
$scope.settle_to = $filter('date')($scope.settle_to, 'yyyy-MM-dd');
$http.put('/client/manual_settle/today', {settle_to: $scope.settle_to}).then(function () {
commonDialog.alert({title: 'Success', content: 'Withdraw application has been submitted', type: 'success'});
$scope.$close();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
$http.put('/client/partner_info/verify/email').then(function (resp) {
$scope.sendMailCount = $scope.sendMailCount +1;
commonDialog.alert({title: 'Message', content: 'Verify that the message has been sent to your mailbox. Please complete the validation as soon as possible', type: 'info'});
})
}
}]);
app.controller('contactCustomerServiceDialogCtrl', ['$scope', '$http', function ($scope, $http) {
}]);
app.filter('abs', function () {
return function (value) {
return Math.abs(value);

@ -0,0 +1,8 @@
<div class="thumbnail">
<img src="static/images/customer_service2.jpg">
<div class="caption" style="padding-left: 20px">
<i class="fa fa-phone" aria-hidden="true"></i> 1300-10-77-50 <br/>
<i class="fa fa-envelope-o" aria-hidden="true"></i> support@royalpay.com.au<br/>
<i class="fa fa-clock-o" aria-hidden="true"></i> Mon-Fri (9:00am-5:30pm)
</div>
</div>

@ -180,8 +180,26 @@
.mini-stat-info span{
font-size: 18px;
}
</style>
.start_item{
line-height: 50px;
}
.start_ico{
display: inline-block;
line-height: 50px;
font-size: 30px;
vertical-align: middle;
color: #6fd088;
}
.start_text{
line-height: 50px;
display: inline-block;
vertical-align: baseline;
}
.text-gray{
color: grey !important;
}
</style>
<section class="content-header">
<h1>
Dashboard
@ -201,6 +219,90 @@
</ol>
</section>
<section class="content">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default" ng-if="source == 4 && approve_result != 1">
<div class="panel-heading">
<h3 class="panel-title"><em><small>Tips:</small></em> Started with RoyalPay</h3>
</div>
<div class="panel-body">
<div class="start_item col-sm-6 col-xs-12">
<div class="start_ico">
<i class="fa fa-check-circle" ng-if="mail_confirm"></i>
<i class="fa fa-dot-circle-o" ng-if="!mail_confirm"></i>
</div>
<div class="start_text" style="cursor: default">
<p ng-if="!mail_confirm"><a class="text-primary" ng-if="sendMailCount == 0">
<span ng-class="{'text-gray':mail_confirm,'text-primary':!mail_confirm}">&nbsp;Verify your email address <em class="text-info">{{currentUser.client.contact_email}}</em></span>
<i role="button" class="fa fa-paper-plane-o"
ng-click="checkEmail()"></i>
</a>
<a class="text-primary" ng-if="sendMailCount > 0">
<span ng-class="{'text-gray':mail_confirm,'text-primary':!mail_confirm}">&nbsp;Verify that the message has been sent to your mailbox. Please complete the validation as soon as possible</span>
</a>
</p>
<p ng-if="mail_confirm">
<a class="text-primary">
<span ng-class="{'text-gray':mail_confirm,'text-primary':!mail_confirm}">&nbsp;Your email address <em class="text-info">{{currentUser.client.contact_email}}</em> has been verified</span>
</a>
</p>
</div>
</div>
<div class="start_item col-sm-6 col-xs-12">
<div class="start_ico">
<i class="fa fa-check-circle" ng-if="commitPartnerInfo"></i>
<i class="fa fa-dot-circle-o" ng-if="!commitPartnerInfo"></i>
</div>
<div class="start_text">
<p ng-if="!commitPartnerInfo">&nbsp;
<a href="" ui-sref="basic" ng-class="{'text-gray':commitPartnerInfo,'text-primary':!commitPartnerInfo}">
Complete your company information
</a>
</p>
<p ng-if="commitPartnerInfo">&nbsp;
<a href="" ng-class="{'text-gray':commitPartnerInfo,'text-primary':!commitPartnerInfo}" ui-sref="basic">
Complete your company information
</a>
</p>
</div>
</div>
<div class="start_item col-sm-6 col-xs-12">
<div class="start_ico">
<i class="fa fa-check-circle" ng-if="toCommitFiles"></i>
<i class="fa fa-dot-circle-o" ng-if="!toCommitFiles"></i>
</div>
<div class="start_text">
<p>&nbsp;
<a href="" ng-class="{'text-gray':toCommitFiles,'text-primary':!toCommitFiles}" ui-sref="basic.compliance_files">
Submit materials required for compliance audits
</a>
</p>
</div>
</div>
<div class="start_item col-sm-6 col-xs-12">
<div class="start_ico">
<i class="fa fa-file-pdf-o"></i>
</div>
<div class="start_text">
<p>&nbsp;
<a href="https://www.royalpay.com.au/downloads/royalpay_user_guide.pdf"
target="_blank" class="text-primary">
Read the manual to learn more about using RoyalPay merchant system
</a>
</p>
</div>
</div>
<div class="col-sm-12">
<small style="color: grey">As soon as you create a RoyalPay account, you can use all of RoyalPay's features, including accepting payments from customers.
But before you activate your account, RoyalPay will not execute settlement.Therefore, it is recommended that you submit your compliance materials as soon as possible, and our compliance department will notify you when the audit is completed. If you have any questions, you can contact our<a href="" ng-click="contactCustomerService()"> customer service</a>.</small>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-3 col-sm-6 col-xs-12">
<div class="mini-stat clearfix bg-white">

@ -0,0 +1,189 @@
[
{
"children": [
{
"children": [],
"label": "机票",
"mccCode": "10001"
},
{
"children": [],
"label": "旅游行业",
"mccCode": "10002"
},
{
"children": [],
"label": "私人定制旅游",
"mccCode": "10003"
},
{
"children": [],
"label": "租车",
"mccCode": "10004"
},
{
"children": [],
"label": "巴士",
"mccCode": "10005"
}
],
"label": "旅游出行",
"mccCode": "1"
},
{
"children": [
{
"children": [],
"label": "饭店",
"mccCode": "20001"
},
{
"children": [],
"label": "奶茶店",
"mccCode": "20002"
},
{
"children": [],
"label": "烧烤",
"mccCode": "20003"
},
{
"children": [],
"label": "火锅",
"mccCode": "20004"
},
{
"children": [],
"label": "Coffee",
"mccCode": "20005"
},
{
"children": [],
"label": "酒吧",
"mccCode": "20006"
}
],
"label": "餐饮",
"mccCode": "2"
},
{
"children": [
{
"children": [],
"label": "公众号服务商",
"mccCode": "50001"
},
{
"children": [],
"label": "各种媒体类宣传",
"mccCode": "50002"
}
],
"label": "传媒",
"mccCode": "5",
"value": "{\"category\":\"SERVICE\",\"code\":\"7542\",\"description\":\"Car Washes\",\"parentCode\":\"S10\"}"
},
{
"children": [
{
"label": "超市",
"mccCode": "70001"
},
{
"children": [],
"label": "服装店",
"mccCode": "70002"
},
{
"children": [],
"label": "鞋店",
"mccCode": "70003"
},{
"children": [],
"label": "箱包",
"mccCode": "70005"
}
],
"label": "零售",
"mccCode": "7"
},
{
"children": [
{
"children": [],
"label": "桌游吧",
"mccCode": "80001"
},
{
"children": [],
"label": "网吧",
"mccCode": "80007"
}
],
"label": "休闲娱乐",
"mccCode": "8"
},
{
"children": [
{
"children": [],
"label": "摄影",
"mccCode": "90001"
},
{
"children": [],
"label": "通讯运营商",
"mccCode": "90003"
},
{
"children:":[],
"label":"软件服务",
"mccCode":"90005"
}
],
"label": "其他服务类",
"mccCode": "9"
},
{
"children": [
{
"children": [],
"label": "Hotel",
"mccCode": "100001"
},
{
"children": [],
"label": "Motel",
"mccCode": "100002"
}
],
"label": "酒店",
"mccCode": "10"
},
{
"children": [
{
"children": [],
"label": "代购",
"mccCode": "110001"
},
{
"children": [],
"label": "物流(大宗出口贸易)",
"mccCode": "110002"
},
{
"children": [],
"label": "红酒出口",
"mccCode": "110003"
},
{
"children": [],
"label": "综合电商",
"mccCode": "110004"
}
],
"label": "出口贸易",
"mccCode": "11"
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

@ -55,7 +55,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.states = angular.copy(stateMap);
$scope.countries = angular.copy(countryMap);
$scope.cleanDays = angular.copy(cleanDays);
$scope.seconds = 6;
$scope.seconds = 10;
$scope.canClick=false;
$scope.description = "Send Code";
$scope.partner = {nation_code:"+61"};
@ -64,13 +64,32 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.phone_code_timer=$interval(function () {}, 1000);
$scope.loadRoyalpayindustry = function () {
$http.get('/static/data/royalpayindustry.json').then(function (resp) {
$http.get('/static/data/rp_industry_apply.json').then(function (resp) {
$scope.royalpayindustry = resp.data;
})
};
$scope.loadRoyalpayindustry();
$scope.checkParams = function () {
if($scope.partner.contact_phone && $scope.partner.nation_code){
$http.get('/register/account/check?phone='+$scope.partner.contact_phone+'&nation_code='+$scope.partner.nation_code).then(function (resp) {
$scope.name_exist = false;
}, function (resp) {
if (resp.data.status == 403){
$scope.name_exist = true;
}
})
};
if($scope.partner.contact_email){
var reg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$");
if(!reg.test($scope.partner.contact_email)){
$scope.trueEmail = true;
}else {
$scope.trueEmail = false;
}
}
};
$scope.checkUserName = function (phone,nation_code) {
if(phone && nation_code){
$http.get('/register/account/check?phone='+phone+'&nation_code='+nation_code).then(function (resp) {
@ -137,7 +156,6 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
};
$scope.sendVerificationCode = function () {
$scope.initErrorMsg();
$scope.checkUserName($scope.partner.contact_phone,$scope.partner.nation_code)
$scope.sendPhoneCodeTime();
$http.post('/register/info/phone/'+ $scope.partner.contact_phone +'/verify?nation_code='+$scope.partner.nation_code).then(function (resp) {
}, function (resp) {
@ -156,7 +174,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
$scope.initErrorMsg();
if (bsb_no != null && bsb_no != "") {
$scope.showBankInfo = false;
$http.get('/register/info/bank/' + bsb_no).then(function (resp) {
$http.get('/register/info/bank/' + bsb_no+"?username="+$scope.partner.username+'&'+'codeKey='+$scope.partner.codeKey).then(function (resp) {
$scope.bankInfo = resp.data;
$scope.bankaccount.bank = $scope.bankInfo.bank;
$scope.bankaccount.city = $scope.bankInfo.city;
@ -240,6 +258,9 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl',
});
return;
}
if(index == 4){
$scope.submit = true;
}
$scope.initParam();
$http.post('/register/info/update/' + $scope.partner.username, $scope.partner).then(function (resp) {
if (index == 3) {

@ -19,6 +19,15 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct
url: '/payment',
templateUrl: '/static/payment/partner/templates/client_payment_info.html',
controller: 'clientPaymentInfoCtrl'
}).state('basic.compliance_files', {
url: '/{client_moniker}/compliance_files',
templateUrl: '/static/payment/partner/templates/client_compliance_files.html',
controller: 'clientComplianceFilesCtrl',
resolve: {
file: ['$http', function ($http) {
return $http.get('/client/partner_info/compliance/files');
}]
}
}).state('payment_materials', {
url: '/payment_materials',
templateUrl: '/static/payment/partner/templates/client_payment_materials.html',
@ -46,15 +55,365 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct
controller: 'clientDeviceCtrl'
})
}]);
app.controller('clientPartnerDetailCtrl', ['$scope', '$http', 'partner','industryMap', function ($scope, $http, partner,industryMap) {
app.controller('clientPartnerDetailCtrl', ['$scope', '$http', 'partner','industryMap','businessStructuresMap','commonDialog','Upload','$state', function ($scope, $http, partner,industryMap,businessStructuresMap,commonDialog,Upload,$state) {
$scope.business_structures = businessStructuresMap.configs();
$scope.industries = industryMap.configs();
$scope.partner = partner.data;
$scope.partner.partner_type = $scope.partner.website ? 'website' : 'photo';
$scope.uploadLogo = function (file) {
if (file != null) {
$scope.logoProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.logoProgress;
$scope.partner.logo_id = resp.data.fileid;
$scope.partner.logo_url = resp.data.url;
}, function (resp) {
delete $scope.logoProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.logoProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
};
$scope.uploadShopPhoto = function (file) {
if (file != null) {
$scope.shopPhotoProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.shopPhotoProgress;
$scope.partner.company_photo = resp.data.url;
}, function (resp) {
delete $scope.shopPhotoProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
};
$scope.uploadStorePhoto = function (file) {
if (file != null) {
$scope.storePhotoProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.storePhotoProgress;
$scope.partner.store_photo = resp.data.url;
}, function (resp) {
delete $scope.storePhotoProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
};
$scope.updatePartner = function (form) {
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
item.$dirty = true;
}
});
return;
}
if (!$scope.partner.logo_url) {
alert("Logo is necessary!");
return;
}
if($scope.partner.partner_type == 'photo'){
if (!$scope.partner.company_photo) {
alert('Shop Photo1 is necessary');
return;
}
if (!$scope.partner.store_photo) {
alert('Shop Photo2 is necessary');
return;
}
}
var content = '';
$http.put('/client/partner_info/update/partnerInfo', $scope.partner).then(function () {
if (content != '') {
commonDialog.alert({
title: 'Warning',
content: content,
type: 'error'
});
} else {
commonDialog.alert({
title: 'Success',
content: 'Update partner information successfully',
type: 'success'
});
}
$state.go('basic', {clientMoniker: $scope.partner.client_moniker}, {reload: true});
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
});
};
//修改邮箱
$scope.updateEmail = function () {
$http.put('/client/partner_info', $scope.partner).then(
$http.put('/client/partner_info/compliance_audit').then(
);
};
$scope.commitToCompliance = function () {
$http.get('/client/partner_info/compliance/files').then(function (resp) {
$scope.complianceFiles = resp.data;
if($scope.complianceFiles.client_id_file == null||$scope.complianceFiles.client_bank_file == null || $scope.complianceFiles.client_company_file == null){
commonDialog.alert({title: 'Message', content: '请前去完善合规资料,再进行提交!', type: 'info'});
return;
}
if($scope.partner.business_structure == null ||$scope.partner.logo_url == null || $scope.partner.description == null ||($scope.partner.partner_type == 'website' && $scope.partner.company_website == null) || ($scope.partner.partner_type == 'photo'&&($scope.partner.store_photo == null || $scope.partner.company_photo == null))){
commonDialog.alert({title: 'Message', content: '请前去完善商户资料,再进行提交!', type: 'info'});
return;
}
if(($scope.partner.business_structure == "Company" && $scope.partner.acn == null) || ($scope.partner.business_structure != "Company" && $scope.partner.abn == null)){
commonDialog.alert({title: 'Message', content: '请前去完善商户资料,再进行提交!', type: 'info'});
return;
}
if(!$scope.partner.mail_confirm){
commonDialog.alert({title: 'Message', content: '请验证邮箱后,再进行提交!', type: 'info'});
return;
}
commonDialog.confirm({
title: 'Commit to Compliance',
content: 'Are you sure to commit ' + $scope.partner.company_name + ' to compliance',
choises: [
{label: 'Submit', className: 'btn-success', key: 1},
{label: 'Cancel', className: 'btn-warning', key: 0, dismiss: true}
]
}).then(function (choice) {
$scope.submitted = true;
if (choice == 1) {
$http.post('/client/partner_info/compliance_audit').then(function (){
commonDialog.alert({title: 'Success', content: '已提交至合规,请耐心等待审核!', type: 'info'});
$state.reload();
}, function () {
$state.reload();
});
}
})
});
}
}]);
app.controller('clientComplianceFilesCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', 'file', function ($scope, $http, $rootScope, commonDialog, $state, Upload, file) {
$scope.file = file.data || {};
//audit files
$scope.uploadBankFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.bankFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.bankFileProgress;
$scope.file.file_bank_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
} else {
$scope.bankIsImage = true;
}
}, function (resp) {
delete $scope.bankFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.bankFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.agreeIsImage = true;
if ($scope.file.file_agreement_info && $scope.file.file_agreement_info.endsWith('pdf')) {
$scope.agreeIsImage = false;
}
$scope.bankIsImage = true;
if ($scope.file.file_bank_info && $scope.file.file_bank_info.endsWith('pdf')) {
$scope.bankIsImage = false;
}
$scope.companyIsImage = true;
if ($scope.file.file_company_info && $scope.file.file_company_info.endsWith('pdf')) {
$scope.companyIsImage = false;
}
$scope.applyIsImage = true;
if ($scope.file.file_apply_info && $scope.file.file_apply_info.endsWith('pdf')) {
$scope.applyIsImage = false;
}
$scope.idIsImage = true;
if ($scope.file.file_id_info && $scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
}
$scope.uploadCompanyFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.companyFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.companyFileProgress;
$scope.file.file_company_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_company_info.endsWith('pdf')) {
$scope.companyIsImage = false;
} else {
$scope.companyIsImage = true;
}
}, function (resp) {
delete $scope.companyFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.companyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
//上传ID信息
$scope.uploadIDFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.idFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.idFileProgress;
$scope.file.file_id_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_id_info.endsWith('pdf')) {
$scope.idIsImage = false;
} else {
$scope.idIsImage = true;
}
}, function (resp) {
delete $scope.idFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.idFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
//上传协议文件
$scope.uploadAgreementFile = function (file) {
if (file != null) {
if (file.size > 10 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过5MB请压缩后重试', type: 'error'})
} else {
$scope.agreementFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.agreementFileProgress;
$scope.file.file_agreement_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_agreement_info.endsWith('pdf')) {
$scope.agreeIsImage = false;
} else {
$scope.agreeIsImage = true;
}
}, function (resp) {
delete $scope.agreementFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.agreementFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
//上传申请表
$scope.uploadApplyFile = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.applyFileProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.applyFileProgress;
$scope.file.file_apply_info = resp.data.url;
$scope.updateFile();
if ($scope.file.file_apply_info.endsWith('pdf')) {
$scope.applyIsImage = false;
} else {
$scope.applyIsImage = true;
}
}, function (resp) {
delete $scope.applyFileProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.applyFileProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
/* $scope.downloadAsZip = function () {
var url = '/sys/partners/' + $scope.partner.client_moniker + '/download/complianceAsZIP';
return url;
};
*/
$scope.updateFile = function () {
$http.put('/client/partner_info/update/file', $scope.file).then(function () {
commonDialog.alert({
title: 'Success',
content: 'Upload Successful',
type: 'success'
});
$state.reload();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
})
};
function commitError() {
commonDialog.alert({
title: 'Error',
content: 'Missing file',
type: 'error'
});
};
$scope.commitPartner = function () {
if ($scope.file) {
if ($scope.file.file_bank_info != null && $scope.file.file_company_info != null && $scope.file.file_id_info != null && $scope.file_apply_info != null) {
$http.put('/client/partner_info/compliance_audit').then(function (resp) {
});
} else {
commitError();
}
} else {
commitError();
}
};
}]);
app.controller('clientPaymentInfoCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) {
$scope.paymentInfo = $scope.partner;
$scope.old_customer_surcharge_rate = angular.copy($scope.partner.customer_surcharge_rate);

@ -0,0 +1,154 @@
<style type="text/css">
img {
width: 100%;
}
</style>
<div class="panel panel-default">
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">* bank statement</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadBankFile($file)" ng-hide="currentUser.approve_result == 1">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_bank_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_bank_file}}" target="_blank"><i class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="bankFileProgress.value" ng-if="bankFileProgress"></uib-progressbar>
<a ng-if="bankIsImage" target="_blank" ng-href="{{file.client_bank_file}}">
<img ng-src="{{file.client_bank_file}}" class="col-sm-8"></a>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<p>Example请保证图片信息清晰可见,如下图</p>
<img class="col-sm-6" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/03/07/1488859920633_5ruVtDa30yY2ytBSDAAqxg0Ob2nreh.jpeg">
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Certificate of Registration</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadCompanyFile($file)" ng-hide="currentUser.approve_result == 1">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_company_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_company_file}}" target="_blank"><i class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="companyFileProgress.value" ng-if="companyFileProgress"></uib-progressbar>
<a ng-if="companyIsImage" ng-href="{{file.client_company_file}}" target="_blank">
<img ng-src="{{file.client_company_file}}" class="col-sm-8"></a>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<div class="col-sm-6">
<p>Example公司请提供以下文件图片</p>
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/03/07/1488865011738_mW91ylSb5V1NJYu8jxvBPGNN49Zyel.jpeg">
<!--<img class="col-sm-12" src="https://file.royalpay.com.au/open/2017/03/07/1488864017622_BppIfz1yhMeoF0Z49rHt2gZIfVOihA.jpeg">-->
</div>
<div class="col-sm-6">
<p>sole trade个体户),partnership合伙,trust信托请在http://abr.business.gov.au将查询结果截图上传</p>
<img class="col-sm-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/03/07/1488860564017_37spL6phUySM27oRtO4cQ7FOJblYJ6.jpeg">
</div>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* ID </label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadIDFile($file)" ng-hide="currentUser.approve_result == 1">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_id_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_id_file}}" target="_blank"><i class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="idFileProgress.value" ng-if="idFileProgress"></uib-progressbar>
<a ng-if="idIsImage" ng-href="{{file.client_id_file}}" target="_blank">
<img ng-src="{{file.client_id_file}}" class="col-sm-8"></a>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<div class="col-sm-6">
<p>Example请保证图片(护照或驾照)信息清晰可见,如下图</p>
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/06/29/1498725651779_OPiqOP1dGnTpaxPsCR3P9lVrp4384b.jpg">
</div>
<div class="col-sm-6">
<br/>
<br/>
<img class="col-sm-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/06/29/1498725678615_Bv2tzUtihY5U6YK9ScveXzKkVWOnrF.jpg">
</div>
</div>
</div>
</div>
<!-- <div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">* Agreement</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadAgreementFile($file)" ng-hide="currentUser.approve_result == 1">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_agree_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_agree_file}}" target="_blank"><i class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="agreementFileProgress.value" ng-if="agreementFileProgress"></uib-progressbar>
<a ng-if="agreeIsImage" target="_blank" ng-href="{{file.client_agree_file}}">
<img ng-src="{{file.client_agree_file}}" class="col-sm-8"></a>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<p>Example请保证图片信息清晰可见,如下图</p>
<img class="col-sm-6" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/06/15/1497454561900_5mf5KC4WGkXyFynv025JlTukAq8BqX.png">
</div>
</div>
</div>
</div>
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Application Form(optional)</label>
<div class="col-sm-4">
<div class="form-control-static" ng-if="currentUser." ng-hide="currentUser.approve_result == 1">
<button class="btn btn-primary" type="button"
ngf-select="uploadApplyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_apply_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_apply_file}}" target="_blank"><i class="fa fa-download"></i></a>
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i>
</div>
<uib-progressbar value="bankFileProgress.value" ng-if="applyFileProgress"></uib-progressbar>
<a ng-if="applyIsImage" target="_blank" ng-href="{{file.client_apply_file}}">
<img ng-src="{{file.client_apply_file}}" class="col-sm-8"></a>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<p>Example请保证图片信息清晰可见,如下图</p>
<img class="col-sm-6" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2017/06/15/1497454548133_uSn0TP2uQNLEfnMB57CMrxG2jTOWHG.png">
</div>
</div>
</div>
</div>-->
</div>
</div>
</div>
<!--<div class="margin-bottom margin-top">-->
<!--<button class="btn-group btn btn-success" type="button" ng-click="updateFile()">Save-->
<!--</button>-->
<!--</div>-->

@ -9,6 +9,22 @@
</section>
<div class="content">
<div class="box box-warning" ng-if="partner.source == 4&&partner.approve_result !=1">
<div class="box-header with-border">
<h3 class="box-title">
【Audit progress】-
<b ng-if="partner.source==4">
<span ng-if="partner.approve_result==2">Awaiting submission of compliance materials 等待提交合规材料</span>
<span ng-if="partner.approve_result==3">Waiting for compliance 等待合规审核</span>
<span ng-if="partner.approve_result==5">Refused 被打回 &nbsp;<small class="text-danger">({{partner.refuse_remark}})</small></span>
</b>
</h3>
<div class="btn-group pull-right" role="group" aria-label="..." ng-hide="partner.approve_result ==3 || partner.approve_result == 1">
<button ng-disabled="submitted" type="button" class="btn btn-danger" ng-click="commitToCompliance()">Commit to Compliance
</button>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="nav-tabs-custom">
@ -22,216 +38,468 @@
<li ui-sref-active="active">
<a ui-sref=".clearing_config">Clearing Config</a>
</li>
<li ui-sref-active="active" ng-show="partner.source==4">
<a ui-sref=".compliance_files">Compliance files</a>
</li>
</ul>
<div class="tab-content" ui-view>
<div ng-show="(partner.source == 4 && (partner.approve_result ==3 || partner.approve_result == 1) ) || partner.source != 4">
<div class="panel panel-default">
<div class="panel-heading">
Partner Basic Information
</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Partner Code</label>
<div class="panel panel-default">
<div class="panel-heading">
Partner Basic Information
</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Partner Code</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.client_moniker"></p>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.client_moniker"></p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Company Name</label>
<div class="form-group">
<label class="control-label col-sm-2">Company Name</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.company_name"></p>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.company_name"></p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Short Name</label>
<div class="form-group">
<label class="control-label col-sm-2">Short Name</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.short_name"></p>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.short_name"></p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Business Name</label>
<div class="form-group">
<label class="control-label col-sm-2">Business Name</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.business_name"></p>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.business_name"></p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Business Structure</label>
<div class="form-group">
<label class="control-label col-sm-2">Business Structure</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.business_structure|business_structure"></p>
<div class="col-sm-10">
<p class="form-control-static"
ng-bind="partner.business_structure|business_structure"></p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Logo</label>
<div class="col-sm-10">
<img class="col-sm-3 col-xs-5" ng-src="{{partner.logo_url}}">
<div class="form-group">
<label class="control-label col-sm-2">*Logo</label>
<div class="col-sm-10">
<img class="col-sm-3 col-xs-5" ng-src="{{partner.logo_url}}">
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">ABN</label>
<div class="form-group">
<label class="control-label col-sm-2">ABN</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.abn"></p>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.abn"></p>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.acn">
<label class="control-label col-sm-2">ACN</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.acn"></p>
<div class="form-group" ng-if="partner.acn">
<label class="control-label col-sm-2">ACN</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.acn"></p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Industry</label>
<div class="form-group">
<label class="control-label col-sm-2">Industry</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.industry|partner_industry"></p>
<div class="col-sm-10">
<p class="form-control-static"
ng-bind="partner.industry|partner_industry"></p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Sector</label>
<div class="form-group">
<label class="control-label col-sm-2">Sector</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.sector"></p>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.sector"></p>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.company_photo">
<label class="control-label col-sm-2">Shop Photo</label>
<div class="form-group" ng-if="partner.company_photo">
<label class="control-label col-sm-2">Shop Photo</label>
<div class="col-sm-3 col-xs-5"><em>1:</em>&nbsp;
<div>
<a class="thumbnail" target="_blank"
ng-href="{{partner.company_photo}}">
<img ng-src="{{partner.company_photo}}" style="max-height: 100px">
</a>
</div>
</div>
<div class="col-sm-10">
<div class="col-sm-3 col-xs-5">
<a class="thumbnail" target="_blank" ng-href="{{partner.company_photo}}">
<img ng-src="{{partner.company_photo}}">
</a>
<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}}">
<img ng-src="{{partner.store_photo}}" style="max-height: 100px">
</a>
</div>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.company_website">
<label class="control-label col-sm-2">Website</label>
<div class="form-group" ng-if="partner.company_website">
<label class="control-label col-sm-2">Website</label>
<div class="col-sm-10">
<a class="form-control-static" target="_blank" ng-bind="partner.company_website"
href="https://{{partner.company_website}}" ></a>
<div class="col-sm-10">
<a class="form-control-static" target="_blank"
ng-bind="partner.company_website"
href="https://{{partner.company_website}}"></a>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Service Phone</label>
<div class="form-group">
<label class="control-label col-sm-2">Service Phone</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.company_phone||'-'"></p>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.company_phone||'-'"></p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Description</label>
<div class="form-group">
<label class="control-label col-sm-2">*Description</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.description"></p>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.description"></p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Remark</label>
<div class="form-group">
<label class="control-label col-sm-2">Remark</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.remark"></p>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.remark"></p>
</div>
</div>
</div>
</div>
</div>
</div>
<!--end 商户基本资料-->
<div class="panel panel-default">
<div class="panel-heading">Partner Contact Information</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Contact Person</label>
<!--end 商户基本资料-->
<div class="panel panel-default">
<div class="panel-heading">Partner Contact Information</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<label class="control-label col-sm-2">Contact Person</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.contact_person"></p>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.contact_person"></p>
</div>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Phone</label>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Phone</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.contact_phone"></p>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.contact_phone"></p>
</div>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">E-mail</label>
<div class="col-sm-8">
<p class="form-control-static" ng-show="!ctrl.editEmail">
<span ng-if="!ctrl.editEmail" ng-bind="partner.contact_email"></span>
<a role="button" ng-click="ctrl.editEmail=true" ng-show="!ctrl.editEmail"><i class="fa fa-edit"></i></a>
</p>
<div class="input-group col-sm-8" ng-if="ctrl.editEmail">
<input type="text" class="form-control" ng-model="partner.contact_email"
title="partner contact_email">
<div class="input-group-btn">
<button class="btn btn-success" ng-click="updateEmail(1);ctrl.editEmail=false">
<i class="fa fa-check"></i>
</button>
</div>
<div class="input-group-btn">
<button class="btn btn-danger" ng-click="ctrl.editEmail=false">
<i class="fa fa-remove"></i>
</button>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">E-mail</label>
<div class="col-sm-8">
<p class="form-control-static" ng-show="!ctrl.editEmail">
<span ng-if="!ctrl.editEmail" ng-bind="partner.contact_email"></span>
<a role="button" ng-click="ctrl.editEmail=true"
ng-show="!ctrl.editEmail"><i class="fa fa-edit"></i></a>
</p>
<div class="input-group col-sm-8" ng-if="ctrl.editEmail">
<input type="text" class="form-control" ng-model="partner.contact_email"
title="partner contact_email">
<div class="input-group-btn">
<button class="btn btn-success"
ng-click="updateEmail(1);ctrl.editEmail=false">
<i class="fa fa-check"></i>
</button>
</div>
<div class="input-group-btn">
<button class="btn btn-danger" ng-click="ctrl.editEmail=false">
<i class="fa fa-remove"></i>
</button>
</div>
</div>
</div>
</div>
</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">
<!--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">
<label class="control-label col-sm-4">Address</label>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Address</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.address"></p>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.address"></p>
</div>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Suburb</label>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Suburb</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.suburb"></p>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.suburb"></p>
</div>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">PostCode</label>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">PostCode</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.postcode"></p>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.postcode"></p>
</div>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">State</label>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">State</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.state"></p>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.state"></p>
</div>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Counrty</label>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4">Counrty</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.country"></p>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.country"></p>
</div>
</div>
</div>
</div>
</div>
</div>
<div ng-show="partner.source == 4 && (partner.approve_result !=3 && partner.approve_result !=1)">
<form class="form-horizontal" novalidate name="partnerForm">
<div class="panel panel-default">
<div class="panel-heading">Partner Basic Information</div>
<div class="panel-body">
<div class="form-group">
<label class="control-label col-sm-2">* Partner Code</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.client_moniker"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Company Name</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.company_name"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Short Name</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.short_name"></p>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.business_name.$invalid && partnerForm.business_name.$dirty}">
<label class="control-label col-sm-2">Business Name</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.business_name"></p>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.business_structure.$invalid && partnerForm.business_structure.$dirty}">
<label class="control-label col-sm-2" for="business-structure-input">Business
Structure</label>
<div class="col-sm-8">
<select class="form-control" name="business_structure"
ng-model="partner.business_structure"
id="business-structure-input" required
ng-options="structure.value as structure.label for structure in business_structures">
<option value="">Please Choose</option>
</select>
</div>
</div>
<div class="form-group" ng-if="!partner.parent_client_id || ('00110'|withRole)">
<label class="control-label col-sm-2">*Logo</label>
<div class="col-sm-8">
<div class="form-control-static">
<button class="btn btn-success" type="button"
ngf-select="uploadLogo($file)"
accept="image/*" ngf-max-size="1MB">
<i class="fa fa-upload"></i> Upload Logo
</button>
</div>
<uib-progressbar value="logoProgress.value"
ng-if="logoProgress"></uib-progressbar>
<img ng-src="{{partner.logo_url}}" ng-if="partner.logo_url"
style="height: 100px;">
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.abn.$invalid && partnerForm.abn.$dirty}"
ng-if="partner.business_structure != 'Company'">
<label class="control-label col-sm-2" for="abn-input">ABN</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.abn" type="text" name="abn"
id="abn-input"
maxlength="20" required>
<div ng-messages="partnerForm.abn.$error" ng-if="partnerForm.abn.$dirty">
<p class="small text-danger" ng-message="required">Less Than 20
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.acn.$invalid && partnerForm.acn.$dirty}"
ng-if="partner.business_structure == 'Company'">
<label class="control-label col-sm-2" for="acn-input">ACN</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.acn" type="text" name="acn"
id="acn-input" maxlength="20" required>
<div ng-messages="partnerForm.acn.$error" ng-if="partnerForm.acn.$dirty">
<p class="small text-danger" ng-message="required">Less Than 20
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group" ng-if="!partner.parent_client_id || ('00110'|withRole)"
ng-class="{'has-error':partnerForm.partner_type.$invalid && partnerForm.partner_type.$dirty}">
<label class="control-label col-sm-2" for="partner-type-select">*
Photo/Website</label>
<div class="col-sm-8">
<select class="form-control" ng-model="partner.partner_type"
id="partner-type-select" required
name="partner_type">
<option value="">Please Choose</option>
<option value="photo">Photo</option>
<option value="website">Website</option>
</select>
<p class="small text-info">If the partner is a offline shop then a photo of
shop
is
required while an online store shall choose company website</p>
<p class="small text-info">
只要有可能产生线下交易商户静态码、POS就必须上传照片否则支付宝会禁止交易</p>
<div ng-messages="partnerForm.partner_type.$error"
ng-if="partnerForm.partner_type.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<div class="form-group"
ng-if="partner.partner_type == 'photo'">
<label class="control-label col-sm-2">* Shop Photo</label>
<div class="col-sm-5">
<div class="form-control-static"><em>1:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadShopPhoto($file)" accept="image/*"
ngf-max-size="2MB">
<i class="fa fa-upload"></i> Upload Shop Photo1
</button>
</div>
<uib-progressbar value="shopPhotoProgress.value"
ng-if="shopPhotoProgress"></uib-progressbar>
<img ng-src="{{partner.company_photo}}" ng-if="partner.company_photo"
class="thumbnail img-size col-sm-5">
</div>
<div class="col-sm-5">
<div class="form-control-static"><em>2:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadStorePhoto($file)" accept="image/*"
ngf-max-size="2MB">
<i class="fa fa-upload"></i> Upload Shop Photo2
</button>
</div>
<uib-progressbar value="storePhotoProgress.value"
ng-if="storePhotoProgress"></uib-progressbar>
<img ng-src="{{partner.store_photo}}" ng-if="partner.store_photo"
class="thumbnail img-size col-sm-5">
</div>
</div>
<div class="form-group"
ng-if="partner.partner_type == 'website'"
ng-class="{'has-error':partnerForm.company_website.$invalid && partnerForm.company_website.$dirty}">
<label class="control-label col-sm-2" for="company_website-input">*
Website</label>
<div class="col-sm-8">
<input type="text" name="company_website" class="form-control"
ng-model="partner.company_website"
id="company_website-input" required maxlength="200">
<div ng-messages="partnerForm.company_website.$error"
ng-if="partnerForm.company_website.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="required">Less Than 200
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Service Phone</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.company_phone||'-'"></p>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}">
<label class="control-label col-sm-2" for="desc-input">Description</label>
<div class="col-sm-8">
<textarea class="form-control" ng-model="partner.description"
name="description" id="desc-input" maxlength="200" required
placeholder="Tell me about your company and the main products you sell"></textarea>
<div ng-messages="partnerForm.description.$error"
ng-if="partnerForm.description.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 200
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Store 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="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button"
ng-click="updatePartner(partnerForm)">
Save
</button>
<a class="btn btn-danger" role="button" ui-sref="^"
ui-sref-opts="{reload:true}">Back</a>
</div>
</form>
</div>
</div>
<!--end 商户基本资料-->
</div>
</div>

@ -62,9 +62,9 @@
【目前状态】-
<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==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>
@ -106,7 +106,7 @@
<a ng-if="fileManager.source_agree_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{fileManager.source_agree_file}}" target="_blank"><i
class="fa fa-download"></i>下载合同</a>
<span style="padding-top: 10px" ng-if="partner.open_status != 5">
<span style="padding-top: 10px" ng-if="partner.open_status != 5" ng-hide="partner.source == 4">
<a ng-if="partner.open_status==2" role="button" type="button" class="btn btn-primary"
ng-click="notifyBD()">
<i class="fa fa-thumb-tack"></i> Notify BD</a>

@ -495,7 +495,7 @@
<td ng-bind="partner.short_name"></td>
<td ng-bind="partner.sub_merchant_id"></td>
<td ng-bind="partner.create_time"></td>
<td ng-class="{'bg-green':(partner.approve_result==2 && (partner.source==1 || partner.source==2)),'bg-red':((partner.open_status==1||partner.open_status==2||partner.open_status==4) && partner.approve_result!=3)||(partner.approve_result==3 && (!partner.open_status || partner.open_status==1))||(partner.approve_result==4 && !partner.open_status)||(partner.open_status==10)}">
<td ng-class="{'bg-green':(partner.approve_result==2 && (partner.source==1 || partner.source==2)),'bg-red':((partner.open_status==1||partner.open_status==2||partner.open_status==4) && partner.approve_result!=3)||(partner.approve_result==3 && (!partner.open_status || partner.open_status==1 || partner.open_status == 4))||(partner.approve_result==4 && !partner.open_status)||(partner.open_status==10)}">
<span ng-if="partner.approve_result==1 && partner.approve_time">通过({{partner.approve_time}})</span>
<span ng-if="!partner.open_status && !partner.approve_result && partner.approve_result!=5 && partner.source!=4">资料完善中</span>
<span ng-if="!partner.open_status && !partner.approve_result && partner.approve_result!=5 && partner.source==4">(自助开通)资料完善中</span>
@ -503,7 +503,7 @@
<span ng-if="partner.approve_result==0 && partner.approve_time">不通过({{partner.approve_time}})</span>
<span ng-if="partner.approve_result==5 && partner.approve_time && partner.refuse_remark">申请打回({{partner.refuse_remark|limitTo:15}})</span>
<span ng-if="(partner.open_status==1||partner.open_status==4) && partner.approve_result!=3"><i ng-if="partner.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true" title="被打回重新提交"></i>等待合规</span>
<span ng-if="partner.approve_result==3 && (!partner.open_status || partner.open_status==1)">自助开通(等待合规)</span>
<span ng-if="partner.approve_result==3 && (!partner.open_status || partner.open_status==4)">自助开通(等待合规)</span>
<span ng-if="partner.open_status==2">合同制作完成</span>
<span ng-if="partner.open_status==3 && partner.approve_result!=5">等待BD上传材料审核</span>
<span ng-if="partner.open_status==10">绿色通道申请中</span>

Loading…
Cancel
Save