Merge branch 'develop-card-compliance' into develop

master
luoyang 5 years ago
commit 2f07aadbef

@ -289,6 +289,12 @@ public class RetailAppServiceImp implements RetailAppService {
res.put("rate", paymentApi.channelApi("Wechat").queryExchangeRateDecimal(clientId)); res.put("rate", paymentApi.channelApi("Wechat").queryExchangeRateDecimal(clientId));
res.put("alipay_rate", paymentApi.channelApi("Alipay").queryExchangeRateDecimal(clientId)); res.put("alipay_rate", paymentApi.channelApi("Alipay").queryExchangeRateDecimal(clientId));
} }
params.put("channel", "system");
res.put("sys_not_settled", new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params)));
params.put("channel", "rpaypmt_card");
res.put("rpaypmt_card_not_settled", new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params)));
params.put("channel", "rpaypmt_dd");
res.put("rpaypmt_dd_not_settled", new BigDecimal(transactionAnalysisMapper.analysisNotSettled(params)));
return res; return res;
} }
@ -864,7 +870,7 @@ public class RetailAppServiceImp implements RetailAppService {
String clientType = device.getString("client_type"); String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType); deviceSupport.findRegister(clientType);
int clientId = device.getIntValue("client_id"); int clientId = device.getIntValue("client_id");
JSONObject client = clientManager.getClientInfo(clientId); JSONObject client = clientManager.getClientInfo(9);
String timezoneClient = client.getString("timezone"); String timezoneClient = client.getString("timezone");
if (timezoneClient != null && !timezone.isEmpty()) { if (timezoneClient != null && !timezone.isEmpty()) {
timezone = timezoneClient; timezone = timezoneClient;
@ -3110,6 +3116,10 @@ public class RetailAppServiceImp implements RetailAppService {
channels.add(cbBankPay); channels.add(cbBankPay);
} }
res.put("channels", channels); res.put("channels", channels);
if (res.containsKey("rate_value")) {
BigDecimal minRate = res.getBigDecimal("rate_value").add(new BigDecimal(0.01)).setScale(2, RoundingMode.DOWN);
res.put("customer_rage_title", (minRate.toPlainString() + "~" + res.getString("max_customer_surcharge_rate")));
}
return res; return res;
} }

@ -1,88 +1,39 @@
package au.com.royalpay.payment.manage.citypartner.core.impls; package au.com.royalpay.payment.manage.citypartner.core.impls;
import java.io.IOException;
import java.io.OutputStream;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.swing.plaf.basic.BasicScrollPaneUI;
import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper;
import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.*;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.alibaba.fastjson.JSONObject;
import au.com.royalpay.payment.manage.citypartner.beans.AgentCommissionAnalysis; import au.com.royalpay.payment.manage.citypartner.beans.AgentCommissionAnalysis;
import au.com.royalpay.payment.manage.citypartner.beans.CityPartnerCommissionAnalysis; import au.com.royalpay.payment.manage.citypartner.beans.CityPartnerCommissionAnalysis;
import au.com.royalpay.payment.manage.citypartner.beans.ReferrerCommissionAnalysis; import au.com.royalpay.payment.manage.citypartner.beans.ReferrerCommissionAnalysis;
import au.com.royalpay.payment.manage.citypartner.core.CityPartnerPrizeService; import au.com.royalpay.payment.manage.citypartner.core.CityPartnerPrizeService;
import au.com.royalpay.payment.manage.mappers.financial.FinancialAgentCommissionDetailMapper; import au.com.royalpay.payment.manage.mappers.financial.*;
import au.com.royalpay.payment.manage.mappers.financial.FinancialAgentCommissionMapper;
import au.com.royalpay.payment.manage.mappers.financial.FinancialPartnerCommissionDetailMapper;
import au.com.royalpay.payment.manage.mappers.financial.FinancialPartnerCommissionMapper;
import au.com.royalpay.payment.manage.mappers.financial.FinancialReferrerCommissionDetailMapper;
import au.com.royalpay.payment.manage.mappers.financial.FinancialReferrerCommissionMapper;
import au.com.royalpay.payment.manage.mappers.financial.FinancialSeniorPartnerCommissionDetailMapper;
import au.com.royalpay.payment.manage.mappers.financial.FinancialSeniorPartnerCommissionMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper; import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.system.OrgMapper; import au.com.royalpay.payment.manage.mappers.system.OrgMapper;
import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.env.SysConfigManager; import au.com.royalpay.payment.tools.env.SysConfigManager;
import au.com.royalpay.payment.tools.exceptions.BadRequestException; import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.exceptions.ServerErrorException; import au.com.royalpay.payment.tools.exceptions.ServerErrorException;
import au.com.royalpay.payment.tools.merchants.core.MerchantInfoProvider;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.time.DateUtils;
import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.usermodel.HSSFFont;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.*;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.OutputStream;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.*;
import java.util.Calendar; import java.util.stream.Collectors;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Resource;
/** /**
* Created by yixian on 2017-03-08. * Created by yixian on 2017-03-08.
@ -476,6 +427,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
BigDecimal total_surage = BigDecimal.ZERO; BigDecimal total_surage = BigDecimal.ZERO;
BigDecimal net_surage = BigDecimal.ZERO; BigDecimal net_surage = BigDecimal.ZERO;
BigDecimal royalpay_surage = BigDecimal.ZERO; BigDecimal royalpay_surage = BigDecimal.ZERO;
BigDecimal transaction_fee = BigDecimal.ZERO;
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
String channel = oneChannel.getKey(); String channel = oneChannel.getKey();
if ("hf".equals(oneChannel.getKey().toLowerCase()) || "yeepay".equals(oneChannel.getKey().toLowerCase()) || "lakalapay".equals(oneChannel.getKey().toLowerCase())) { if ("hf".equals(oneChannel.getKey().toLowerCase()) || "yeepay".equals(oneChannel.getKey().toLowerCase()) || "lakalapay".equals(oneChannel.getKey().toLowerCase())) {
@ -491,7 +443,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
for (JSONObject params : oneChannel.getValue()) { for (JSONObject params : oneChannel.getValue()) {
BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount"); BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount");
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback")); BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback")).subtract(params.getBigDecimal("transaction_fee"));
//增加货币判断 //增加货币判断
int i = currencyScale(params.getString("clearing_currency")); int i = currencyScale(params.getString("clearing_currency"));
total = total.add(tmpClearingAmount); total = total.add(tmpClearingAmount);
@ -499,11 +451,13 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
royalpay_surage = royalpay_surage.add(tmpClearingAmount.multiply(channelRate).setScale(i, RoundingMode.HALF_UP)); royalpay_surage = royalpay_surage.add(tmpClearingAmount.multiply(channelRate).setScale(i, RoundingMode.HALF_UP));
// net_surage = net_surage.add(getThirdPartyCharge(params.getString("channel"), params.getBigDecimal("clearing_amount"), channelCharge)); // net_surage = net_surage.add(getThirdPartyCharge(params.getString("channel"), params.getBigDecimal("clearing_amount"), channelCharge));
net_surage = net_surage.add(params.getBigDecimal("channel_surcharge")); net_surage = net_surage.add(params.getBigDecimal("channel_surcharge"));
transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee"));
} }
BigDecimal org_charge = total_surage.subtract(royalpay_surage); BigDecimal org_charge = total_surage.subtract(royalpay_surage);
json.put("channel", oneChannel.getKey()); json.put("channel", oneChannel.getKey());
json.put("gross_amount", total); json.put("gross_amount", total);
json.put("total_charge", total_surage); json.put("total_charge", total_surage);
json.put("transaction_fee", transaction_fee);
json.put("net_charge", net_surage); json.put("net_charge", net_surage);
json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value")); json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value"));
json.put("royalpay_charge", royalpay_surage); json.put("royalpay_charge", royalpay_surage);
@ -525,6 +479,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
BigDecimal net_surage = BigDecimal.ZERO; BigDecimal net_surage = BigDecimal.ZERO;
BigDecimal royalpay_surage = BigDecimal.ZERO; BigDecimal royalpay_surage = BigDecimal.ZERO;
BigDecimal share_surage = BigDecimal.ZERO; BigDecimal share_surage = BigDecimal.ZERO;
BigDecimal transaction_fee = BigDecimal.ZERO;
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
String channel = oneChannel.getKey(); String channel = oneChannel.getKey();
@ -534,7 +489,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
for (JSONObject params : oneChannel.getValue()) { for (JSONObject params : oneChannel.getValue()) {
BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount"); BigDecimal tmpClearingAmount = params.getBooleanValue("customer_surcharge") ? params.getBigDecimal("settle_amount") : params.getBigDecimal("clearing_amount");
BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback")); BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge").subtract(params.getBigDecimal("surcharge_cashback")).subtract(params.getBigDecimal("transaction_fee"));
//增加货币判断 //增加货币判断
int i = currencyScale(params.getString("clearing_currency")); int i = currencyScale(params.getString("clearing_currency"));
BigDecimal parent_surage = tmpClearingAmount.multiply(parentOrgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)).setScale(i, RoundingMode.HALF_UP); BigDecimal parent_surage = tmpClearingAmount.multiply(parentOrgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)).setScale(i, RoundingMode.HALF_UP);
@ -545,6 +500,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
//net_surage = net_surage.add(getThirdPartyCharge(params.getString("channel"), params.getBigDecimal("clearing_amount"), channelCharge)); //net_surage = net_surage.add(getThirdPartyCharge(params.getString("channel"), params.getBigDecimal("clearing_amount"), channelCharge));
net_surage = net_surage.add(params.getBigDecimal("channel_surcharge")); net_surage = net_surage.add(params.getBigDecimal("channel_surcharge"));
share_surage = share_surage.add(roy_surage.subtract(parent_surage)).setScale(i, RoundingMode.HALF_UP); share_surage = share_surage.add(roy_surage.subtract(parent_surage)).setScale(i, RoundingMode.HALF_UP);
transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee"));
} }
BigDecimal org_charge = total_surage.subtract(royalpay_surage); BigDecimal org_charge = total_surage.subtract(royalpay_surage);
@ -556,6 +512,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
json.put("partner_charge", royalpay_surage); json.put("partner_charge", royalpay_surage);
json.put("share_charge", share_surage); json.put("share_charge", share_surage);
json.put("org_charge", org_charge); json.put("org_charge", org_charge);
json.put("transaction_fee", transaction_fee);
json.put("commission_type", "1"); json.put("commission_type", "1");
json.put("create_time", new Date()); json.put("create_time", new Date());
amountByChannel.add(json); amountByChannel.add(json);
@ -579,6 +536,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
BigDecimal total_surage = BigDecimal.ZERO; BigDecimal total_surage = BigDecimal.ZERO;
BigDecimal net_surage = BigDecimal.ZERO; BigDecimal net_surage = BigDecimal.ZERO;
BigDecimal royalpay_surage = BigDecimal.ZERO; BigDecimal royalpay_surage = BigDecimal.ZERO;
BigDecimal transaction_fee = BigDecimal.ZERO;
Date datefrom = new Date(); Date datefrom = new Date();
Date dateto = new Date(); Date dateto = new Date();
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();
@ -617,6 +575,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
royalpay_surage = royalpay_surage.add(tmpClearingAmount.multiply(channelRate).setScale(i, RoundingMode.HALF_UP)); royalpay_surage = royalpay_surage.add(tmpClearingAmount.multiply(channelRate).setScale(i, RoundingMode.HALF_UP));
//net_surage = net_surage.add(getThirdPartyCharge(params.getString("channel"), params.getBigDecimal("clearing_amount"), channelCharge)); //net_surage = net_surage.add(getThirdPartyCharge(params.getString("channel"), params.getBigDecimal("clearing_amount"), channelCharge));
net_surage = net_surage.add(params.getBigDecimal("channel_surcharge")); net_surage = net_surage.add(params.getBigDecimal("channel_surcharge"));
transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee"));
} }
BigDecimal org_charge = total_surage.subtract(royalpay_surage); BigDecimal org_charge = total_surage.subtract(royalpay_surage);
if (channel.toLowerCase().equals("alipay_direct")) { if (channel.toLowerCase().equals("alipay_direct")) {
@ -642,6 +601,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
json.put("org_net_charge", net_surage); json.put("org_net_charge", net_surage);
} }
json.put("org_charge", org_charge); json.put("org_charge", org_charge);
json.put("transaction_fee", transaction_fee);
json.put("commission_type", "1"); json.put("commission_type", "1");
json.put("create_time", new Date()); json.put("create_time", new Date());
json.put("date_from", DateFormatUtils.format(datefrom, "yyyy-MM-dd")); json.put("date_from", DateFormatUtils.format(datefrom, "yyyy-MM-dd"));
@ -825,6 +785,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
temp.put("total_charge", 0); temp.put("total_charge", 0);
temp.put("royalpay_charge", 0); temp.put("royalpay_charge", 0);
temp.put("org_charge", 0); temp.put("org_charge", 0);
temp.put("transaction_fee", 0);
temp.put("share_charge", 0); temp.put("share_charge", 0);
temp.put("channel", channel.getString("channel")); temp.put("channel", channel.getString("channel"));
temp.put("net_charge", 0); temp.put("net_charge", 0);
@ -839,28 +800,8 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
mineCommission.put("share_charge", mineCommission.getBigDecimal("share_charge").subtract(channel.getBigDecimal("share_charge"))); mineCommission.put("share_charge", mineCommission.getBigDecimal("share_charge").subtract(channel.getBigDecimal("share_charge")));
financialPartnerCommissionMapper.update(mineCommission); financialPartnerCommissionMapper.update(mineCommission);
} }
channel.put("month", month);
channel.put("year", year);
channel.put("org_id", orgId);
//撤销agent表
// financialAgentCommissionMapper.save(channel);
} }
} }
//撤销agent表
// Map<Integer, List<JSONObject>> groupByClientMap = transactionDetail.stream().collect(Collectors.groupingBy(e -> e.getInteger("client_id")));
// for (Map.Entry<Integer, List<JSONObject>> oneClient : groupByClientMap.entrySet()) {
//
// JSONObject org = orgMapper.findOne(oneClient.getValue().get(0).getInteger("org_id"));
// Map<String, List<JSONObject>> groupByChannel = oneClient.getValue().stream().collect(Collectors.groupingBy(e -> e.getString("channel")));
//
// List<JSONObject> clientChannelAmount = clientChannelAmount(oneClient.getKey(),org, groupByChannel, channelCharge,year,month,2);
// for (JSONObject channel : clientChannelAmount) {
// financialAgentCommissionDetailMapper.save(channel);
// }
//
// }
} }
@Override @Override

@ -20,5 +20,5 @@ public interface ClientAuditProcessMapper {
int update(JSONObject partner); int update(JSONObject partner);
@AutoSql(SqlType.SELECT) @AutoSql(SqlType.SELECT)
PageList<JSONObject> getAuditLog(@Param("client_id") int client_id, PageBounds pagination); PageList<JSONObject> getAuditLog(@Param("client_id") int client_id, @Param("type") int type, PageBounds pagination);
} }

@ -52,6 +52,8 @@ public interface ClientFilesMapper {
JSONObject getSourceAgreeFilesByClientId(@Param("client_id") int clientId); JSONObject getSourceAgreeFilesByClientId(@Param("client_id") int clientId);
JSONObject getSourceCardAgreeFilesByClientId(@Param("client_id") int clientId,@Param("file_name")String file_name);
void deleteByClientAndFileId(@Param("file_id") String file_id); void deleteByClientAndFileId(@Param("file_id") String file_id);
void deleteAggreeByClientId(@Param("client_id") int file_id); void deleteAggreeByClientId(@Param("client_id") int file_id);

@ -1,6 +1,7 @@
package au.com.royalpay.payment.manage.mappers.system; package au.com.royalpay.payment.manage.mappers.system;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.yixsoft.support.mybatis.autosql.annotations.AdvanceSelect; import com.yixsoft.support.mybatis.autosql.annotations.AdvanceSelect;
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper; import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql; import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
@ -22,5 +23,5 @@ public interface ClientMWFilesMapper {
@AutoSql(SqlType.SELECT) @AutoSql(SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid = 1") @AdvanceSelect(addonWhereClause = "is_valid = 1")
List<JSONObject> findClientFile(@Param("client_id") int clientId); List<JSONObject> findClientFile(@Param("client_id") int clientId, PageBounds pageBounds);
} }

@ -53,6 +53,8 @@ public interface ClientRateMapper {
JSONObject latestChannelCleanDays(@Param("rate_name")String rate_name, @Param("client_id")int client_id); JSONObject latestChannelCleanDays(@Param("rate_name")String rate_name, @Param("client_id")int client_id);
JSONObject latestCardChannelCleanDays(@Param("rate_name")String rate_name, @Param("client_id")int client_id);
JSONObject latestExpiryConfig(@Param("client_id")int client_id,@Param("rate_name") String rate_name); JSONObject latestExpiryConfig(@Param("client_id")int client_id,@Param("rate_name") String rate_name);

@ -0,0 +1,19 @@
package au.com.royalpay.payment.manage.mappers.system;
import com.alibaba.fastjson.JSONObject;
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
import org.apache.ibatis.annotations.Param;
@AutoMapper(tablename = "sys_client_upay_profile", pkName = "client_id")
public interface SysClientUpayProfileMapper {
@AutoSql(SqlType.INSERT)
void save(JSONObject info);
@AutoSql(SqlType.UPDATE)
void update(JSONObject info);
@AutoSql(SqlType.SELECT)
JSONObject findInfo(@Param("client_id") int clientId);
}

@ -7,13 +7,20 @@ import org.apache.commons.lang3.StringUtils;
* Created by yishuqian on 07/03/2017. * Created by yishuqian on 07/03/2017.
*/ */
public class ClientMWAuthFilesInfo { public class ClientMWAuthFilesInfo {
private String upay_application_form; private String client_bank_file;
private String upay_agreement_file; private String client_company_file;
private String refund_exchange_policy;
private String upay_privacy_policy;
private String card_security_policy;
private String upay_promotional_offer;
private String upay_terms_conditions;
private String upay_offer_letter; private String upay_offer_letter;
private String upay_driver_license; private String upay_driver_license;
private String upay_residence_certificate; private String kyc_utility_bill_file;
private String upay_risk_level; private String upay_risk_level;
private String upay_risk_remark; private String upay_risk_remark;
private String upay_application_form;
private String upay_desc_file;
public JSONObject toJson(){ public JSONObject toJson(){
return (JSONObject)JSONObject.toJSON(this); return (JSONObject)JSONObject.toJSON(this);
@ -30,14 +37,6 @@ public class ClientMWAuthFilesInfo {
return params; return params;
} }
public String getUpay_agreement_file() {
return upay_agreement_file;
}
public String getUpay_application_form() {
return upay_application_form;
}
public String getUpay_driver_license() { public String getUpay_driver_license() {
return upay_driver_license; return upay_driver_license;
} }
@ -46,18 +45,6 @@ public class ClientMWAuthFilesInfo {
return upay_offer_letter; return upay_offer_letter;
} }
public void setUpay_agreement_file(String upay_agreement_file) {
this.upay_agreement_file = upay_agreement_file;
}
public void setUpay_application_form(String upay_application_form) {
this.upay_application_form = upay_application_form;
}
public String getUpay_residence_certificate() {
return upay_residence_certificate;
}
public String getUpay_risk_level() { public String getUpay_risk_level() {
return upay_risk_level; return upay_risk_level;
} }
@ -70,10 +57,6 @@ public class ClientMWAuthFilesInfo {
this.upay_offer_letter = upay_offer_letter; this.upay_offer_letter = upay_offer_letter;
} }
public void setUpay_residence_certificate(String upay_residence_certificate) {
this.upay_residence_certificate = upay_residence_certificate;
}
public String getUpay_risk_remark() { public String getUpay_risk_remark() {
return upay_risk_remark; return upay_risk_remark;
} }
@ -85,4 +68,84 @@ public class ClientMWAuthFilesInfo {
public void setUpay_risk_remark(String upay_risk_remark) { public void setUpay_risk_remark(String upay_risk_remark) {
this.upay_risk_remark = upay_risk_remark; this.upay_risk_remark = upay_risk_remark;
} }
public String getCard_security_policy() {
return card_security_policy;
}
public String getClient_bank_file() {
return client_bank_file;
}
public String getClient_company_file() {
return client_company_file;
}
public String getUpay_privacy_policy() {
return upay_privacy_policy;
}
public String getUpay_promotional_offer() {
return upay_promotional_offer;
}
public void setCard_security_policy(String card_security_policy) {
this.card_security_policy = card_security_policy;
}
public String getUpay_terms_conditions() {
return upay_terms_conditions;
}
public void setClient_bank_file(String client_bank_file) {
this.client_bank_file = client_bank_file;
}
public void setClient_company_file(String client_company_file) {
this.client_company_file = client_company_file;
}
public void setUpay_privacy_policy(String upay_privacy_policy) {
this.upay_privacy_policy = upay_privacy_policy;
}
public void setUpay_promotional_offer(String upay_promotional_offer) {
this.upay_promotional_offer = upay_promotional_offer;
}
public void setUpay_terms_conditions(String upay_terms_conditions) {
this.upay_terms_conditions = upay_terms_conditions;
}
public String getRefund_exchange_policy() {
return refund_exchange_policy;
}
public void setRefund_exchange_policy(String refund_exchange_policy) {
this.refund_exchange_policy = refund_exchange_policy;
}
public String getKyc_utility_bill_file() {
return kyc_utility_bill_file;
}
public void setKyc_utility_bill_file(String kyc_utility_bill_file) {
this.kyc_utility_bill_file = kyc_utility_bill_file;
}
public void setUpay_application_form(String upay_application_form) {
this.upay_application_form = upay_application_form;
}
public String getUpay_application_form() {
return upay_application_form;
}
public String getUpay_desc_file() {
return upay_desc_file;
}
public void setUpay_desc_file(String upay_desc_file) {
this.upay_desc_file = upay_desc_file;
}
} }

@ -112,8 +112,27 @@ public class ClientRegisterInfo {
private String client_pay_type; private String client_pay_type;
@NotEmpty(message = "error.payment.valid.param_missing") @NotEmpty(message = "error.payment.valid.param_missing")
private String client_pay_desc; private String client_pay_desc;
@JSONField(name = "it_contact_person_email")
private String itContactPersonEmail;
@JSONField(name = "acceptor_name")
private String acceptorName;
@JSONField(name = "expected_card_revenue")
private String expectCardRevenue;
@JSONField(name = "average_card_transaction")
private String averageCardTransaction;
@JSONField(name = "mw_industry")
private String mwIndustry;
@JSONField(name = "enable_international_card")
private boolean enableInternaltionCard;
@JSONField(name = "enable_cross_payment")
private boolean enableCrossPayment;
@JSONField(name = "enable_card_payment")
private boolean enableCardPayment;
public JSONObject insertObject() { public JSONObject insertObject() {
if (industry == null) {
setIndustry("331");
}
JSONObject res = (JSONObject) JSON.toJSON(this); JSONObject res = (JSONObject) JSON.toJSON(this);
if (client_apply_id==null){ if (client_apply_id==null){
res.remove("client_apply_id"); res.remove("client_apply_id");
@ -550,4 +569,68 @@ public class ClientRegisterInfo {
public void setMarketingWechatId(String marketingWechatId) { public void setMarketingWechatId(String marketingWechatId) {
this.marketingWechatId = marketingWechatId; this.marketingWechatId = marketingWechatId;
} }
public String getItContactPersonEmail() {
return itContactPersonEmail;
}
public void setItContactPersonEmail(String itContactPersonEmail) {
this.itContactPersonEmail = itContactPersonEmail;
}
public void setAcceptorName(String acceptorName) {
this.acceptorName = acceptorName;
}
public String getAcceptorName() {
return acceptorName;
}
public boolean isEnableInternaltionCard() {
return enableInternaltionCard;
}
public String getAverageCardTransaction() {
return averageCardTransaction;
}
public String getExpectCardRevenue() {
return expectCardRevenue;
}
public String getMwIndustry() {
return mwIndustry;
}
public void setAverageCardTransaction(String averageCardTransaction) {
this.averageCardTransaction = averageCardTransaction;
}
public void setEnableInternaltionCard(boolean enableInternaltionCard) {
this.enableInternaltionCard = enableInternaltionCard;
}
public void setExpectCardRevenue(String expectCardRevenue) {
this.expectCardRevenue = expectCardRevenue;
}
public void setMwIndustry(String mwIndustry) {
this.mwIndustry = mwIndustry;
}
public boolean isEnableCardPayment() {
return enableCardPayment;
}
public boolean isEnableCrossPayment() {
return enableCrossPayment;
}
public void setEnableCardPayment(boolean enableCardPayment) {
this.enableCardPayment = enableCardPayment;
}
public void setEnableCrossPayment(boolean enableCrossPayment) {
this.enableCrossPayment = enableCrossPayment;
}
} }

@ -51,6 +51,7 @@ public class PartnerQuery {
private boolean bd_upload_material = false; private boolean bd_upload_material = false;
private boolean is_valid = false; private boolean is_valid = false;
private String merchant_id; private String merchant_id;
private boolean card_approving = false;
public String getClient_moniker() { public String getClient_moniker() {
return StringUtils.isEmpty(client_moniker) ? null : client_moniker; return StringUtils.isEmpty(client_moniker) ? null : client_moniker;
@ -120,6 +121,9 @@ public class PartnerQuery {
if (approving) { if (approving) {
param.put("approving", true); param.put("approving", true);
} }
if(card_approving){
param.put("card_approving",true);
}
if (org_id != null) { if (org_id != null) {
param.put("org_id", org_id); param.put("org_id", org_id);
} }
@ -472,4 +476,12 @@ public class PartnerQuery {
public void setSuburb(String suburb) { public void setSuburb(String suburb) {
this.suburb = suburb; this.suburb = suburb;
} }
public boolean isCard_approving() {
return card_approving;
}
public void setCard_approving(boolean card_approving) {
this.card_approving = card_approving;
}
} }

@ -81,6 +81,9 @@ public interface ClientManager {
@Transactional(noRollbackFor = EmailException.class) @Transactional(noRollbackFor = EmailException.class)
void auditClient(JSONObject manager, String clientMoniker, int pass); void auditClient(JSONObject manager, String clientMoniker, int pass);
@Transactional(noRollbackFor = EmailException.class)
void auditCardClient(JSONObject manager, String clientMoniker, int pass);
@Transactional(noRollbackFor = EmailException.class) @Transactional(noRollbackFor = EmailException.class)
void auditClientGreenChannel(JSONObject manager, String clientMoniker); void auditClientGreenChannel(JSONObject manager, String clientMoniker);
@ -269,6 +272,8 @@ public interface ClientManager {
JSONObject getSourceAgreeFiles(JSONObject manage, String clientMoniker); JSONObject getSourceAgreeFiles(JSONObject manage, String clientMoniker);
JSONObject getSourceCardAgreeFiles(String clientMoniker, JSONObject manager, String fileName);
void deleteAuthFiles(String fileId); void deleteAuthFiles(String fileId);
void deleteAuthFilesByAdmin(String fileId); void deleteAuthFilesByAdmin(String fileId);
@ -297,8 +302,17 @@ public interface ClientManager {
void commitToCompliance(String clientMoniker, JSONObject manager); void commitToCompliance(String clientMoniker, JSONObject manager);
void commitToCardCompliance(String clientMoniker, JSONObject manager);
void commitToDoAgreeFile(String clientMoniker, JSONObject manager); void commitToDoAgreeFile(String clientMoniker, JSONObject manager);
/**
*
* @param clientMoniker
* @param manager
*/
void commitToDoCardAgreeFile(String clientMoniker, JSONObject manager);
void commitToGreenChannel(String clientMoniker, JSONObject manager); void commitToGreenChannel(String clientMoniker, JSONObject manager);
void changePaymentPage(JSONObject manager, String clientMoniker, String paypad_version); void changePaymentPage(JSONObject manager, String clientMoniker, String paypad_version);
@ -335,6 +349,8 @@ public interface ClientManager {
void refusePartner(String clientMoniker, JSONObject manager, String refuse_remark); void refusePartner(String clientMoniker, JSONObject manager, String refuse_remark);
void cardRefusePartner(String clientMoniker, JSONObject manager, String refuse_remark);
JSONArray getAllClientIds(int clientId); JSONArray getAllClientIds(int clientId);
void updateAppClient(JSONObject account, int client_id, AppClientBean appClientBean); void updateAppClient(JSONObject account, int client_id, AppClientBean appClientBean);
@ -375,6 +391,10 @@ public interface ClientManager {
void getAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception; void getAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;
void getAggregateCardAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;
void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal,String promotionalEffectiveDate,int promotionalPeriod) throws Exception;
void getNewAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception; void getNewAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception;
void temporaryExportPdf(String clientMoniker, JSONObject manager, HttpServletResponse httpResponse) throws Exception; void temporaryExportPdf(String clientMoniker, JSONObject manager, HttpServletResponse httpResponse) throws Exception;
@ -383,6 +403,8 @@ public interface ClientManager {
void completeAgree(String clientMoniker, JSONObject manager); void completeAgree(String clientMoniker, JSONObject manager);
void cardCompleteAgree(String clientMoniker, JSONObject manager);
void downloadComplianceZip(@PathVariable String clientMoniker, HttpServletResponse response) throws Exception; void downloadComplianceZip(@PathVariable String clientMoniker, HttpServletResponse response) throws Exception;
void downloadMWComplianceZip(@PathVariable String clientMoniker, HttpServletResponse response) throws Exception; void downloadMWComplianceZip(@PathVariable String clientMoniker, HttpServletResponse response) throws Exception;

@ -142,6 +142,7 @@ import java.security.InvalidParameterException;
import java.security.KeyPair; import java.security.KeyPair;
import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey; import java.security.interfaces.RSAPublicKey;
import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.List; import java.util.List;
import java.util.*; import java.util.*;
@ -183,6 +184,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Resource @Resource
private ClientIncrementalMapper clientIncrementalMapper; private ClientIncrementalMapper clientIncrementalMapper;
@Value("${client_card.account_reserve}")
private String cardAccountReserve;
@Value("${client_card.annual_rate}")
private String cardAnnualRate;
@Value("${app.redis.prefix}") @Value("${app.redis.prefix}")
private String redisPrefix; private String redisPrefix;
private ApplicationEventPublisher publisher; private ApplicationEventPublisher publisher;
@ -326,6 +332,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private RPayPaymentCardSvcApi rPayPaymentCardSvcApi; private RPayPaymentCardSvcApi rPayPaymentCardSvcApi;
@Resource @Resource
private RPayMerchantMapper rPayMerchantMapper; private RPayMerchantMapper rPayMerchantMapper;
@Resource
private SysClientUpayProfileMapper sysClientUpayProfileMapper;
@Resource @Resource
@ -336,6 +344,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private static final String CLIENT_AGREE_FILE = "client_agree_file"; private static final String CLIENT_AGREE_FILE = "client_agree_file";
private static final String CLIENT_COMPANY_FILE = "client_company_file"; private static final String CLIENT_COMPANY_FILE = "client_company_file";
private static final String CLIENT_APPLY_FILE = "client_apply_file"; private static final String CLIENT_APPLY_FILE = "client_apply_file";
//卡支付合同文件
private static final String LETTER_OF_OFFER_FILE="letter_of_offer_file";
private static final String PROMOTIONAL_OFFER_FILE="promotional_offer_file";
private static final String TERMS_AND_CONDITIONS_FILE="terms_and_conditions_file";
private static final List<String> tags = new ArrayList<>(); private static final List<String> tags = new ArrayList<>();
private static final String KYC_UTILITY_BILL_FILE = "kyc_utility_bill_file"; private static final String KYC_UTILITY_BILL_FILE = "kyc_utility_bill_file";
@ -433,6 +448,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientConfig.put("ext_params",client.getString("ext_params")); clientConfig.put("ext_params",client.getString("ext_params"));
} }
client.putAll(clientConfig); client.putAll(clientConfig);
JSONObject upayInfo = sysClientUpayProfileMapper.findInfo(client.getIntValue("client_id"));
if (upayInfo != null) {
client.putAll(upayInfo);
}
client.put("unsubscribe", mailUnsubMapper.findOneByClientMoniker(clientMoniker) == null ? false : true); client.put("unsubscribe", mailUnsubMapper.findOneByClientMoniker(clientMoniker) == null ? false : true);
client.put("show_all_permission", true); client.put("show_all_permission", true);
int role = manager != null ? manager.getIntValue("role") : 0; int role = manager != null ? manager.getIntValue("role") : 0;
@ -447,7 +466,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("show_all_permission", checkBDPermission > 0); client.put("show_all_permission", checkBDPermission > 0);
if (checkBDPermission > 0) { if (checkBDPermission > 0) {
JSONObject org = orgMapper.findOne(manager.getIntValue("org_id")); JSONObject org = orgMapper.findOne(manager.getIntValue("org_id"));
boolean bdRateEditable = client.getIntValue("approve_result") != 1 || org.getBooleanValue("rate_editable"); boolean bdRateEditable = client.getIntValue("approve_result") != 1 || org.getBooleanValue("rate_editable") ||
//开起信用卡支付申请并且申请结果不是null.新建 1.通过 4.BD已提交资料状态
( !clientConfig.getBoolean("enable_card_payment") && !client.containsKey("upay_approve_result") && client.getIntValue("upay_approve_result") !=1 && client.getIntValue("upay_approve_result") !=4);
client.put("rate_editable", bdRateEditable); client.put("rate_editable", bdRateEditable);
} else { } else {
client.put("company_phone", "******"); client.put("company_phone", "******");
@ -486,12 +507,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("min_customer_surcharge_rate", client.getBigDecimal("rate_value").add(new BigDecimal("0.1"))); client.put("min_customer_surcharge_rate", client.getBigDecimal("rate_value").add(new BigDecimal("0.1")));
} }
// 商户审核过程日志 // 商户跨境支付审核过程日志
PageList<JSONObject> audit_logs = clientAuditProcessMapper.getAuditLog(client.getIntValue("client_id"), PageList<JSONObject> audit_logs = clientAuditProcessMapper.getAuditLog(client.getIntValue("client_id"),1,
new PageBounds(Order.formString("create_time"))); new PageBounds(Order.formString("create_time")));
if (audit_logs != null && !audit_logs.isEmpty()) { if (audit_logs != null && !audit_logs.isEmpty()) {
client.put("audit_logs", audit_logs); client.put("audit_logs", audit_logs);
} }
//商户卡支付审核过程日志
PageList<JSONObject> audit_card_logs = clientAuditProcessMapper.getAuditLog(client.getIntValue("client_id"),2,
new PageBounds(Order.formString("create_time")));
if (audit_card_logs != null && !audit_card_logs.isEmpty()) {
client.put("audit_card_logs", audit_card_logs);
}
//HF支付链接二维码 //HF支付链接二维码
if (client.getString("hf_pay_url") != null) { if (client.getString("hf_pay_url") != null) {
@ -782,10 +809,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
partner.put("ali_sub_merchant_id", registery.getClientMoniker()); partner.put("ali_sub_merchant_id", registery.getClientMoniker());
partner.put("credential_code", RandomStringUtils.random(32, true, true)); partner.put("credential_code", RandomStringUtils.random(32, true, true));
partner.put("creator", manager.getString("manager_id")); partner.put("creator", manager.getString("manager_id"));
// if (manager.getIntValue("org_id") == 0) {
// throw new ForbiddenException("You were not belong to any organizations so that you cannot create new
// client");
// }
partner.put("org_id", manager.getIntValue("org_id")); partner.put("org_id", manager.getIntValue("org_id"));
if (StringUtils.isNotEmpty(registery.getLogoId())) { if (StringUtils.isNotEmpty(registery.getLogoId())) {
partner.put("logo_url", attachmentClient.getFileUrl(registery.getLogoId())); partner.put("logo_url", attachmentClient.getFileUrl(registery.getLogoId()));
@ -807,43 +830,24 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
//isRiskyMerchant(partner, null); //isRiskyMerchant(partner, null);
try { try {
clientMapper.save(partner); clientMapper.save(partner);
JSONObject clientConfig = new JSONObject(); JSONObject clientConfig = new JSONObject();
clientConfig.put("client_id", partner.getIntValue("client_id")); clientConfig.put("client_id", partner.getIntValue("client_id"));
clientConfig.put("client_moniker", partner.getString("client_moniker")); clientConfig.put("client_moniker", partner.getString("client_moniker"));
clientConfig.put("client_pay_type", partner.getString("client_pay_type")); clientConfig.put("client_pay_type", partner.getString("client_pay_type"));
clientConfig.put("client_pay_desc", partner.get("client_pay_desc")); clientConfig.put("client_pay_desc", partner.get("client_pay_desc"));
clientConfig.put("enable_cross_payment", partner.get("enable_cross_payment"));
clientConfig.put("enable_card_payment", partner.get("enable_card_payment"));
clientConfigService.save(clientConfig); clientConfigService.save(clientConfig);
permissionPartnerManagerImpl.permissionClientModuleSave(partner.getIntValue("client_id"), partner.getString("client_moniker")); permissionPartnerManagerImpl.permissionClientModuleSave(partner.getIntValue("client_id"), partner.getString("client_moniker"));
} catch (Exception e) { saveLegalAndMarketingInfo(partner);
throw new BadRequestException("error.partner.valid.dumplicate_client_moniker"); if (registery.isEnableCardPayment()) {
sysClientUpayProfileMapper.save(partner);
} }
try {
JSONObject representativeInfo = new JSONObject();
representativeInfo.put("client_id", partner.getIntValue("client_id"));
representativeInfo.put("representative_person", partner.getString("legal_representative_person"));
representativeInfo.put("phone", partner.getString("legal_representative_phone"));
representativeInfo.put("email", partner.getString("legal_representative_email"));
representativeInfo.put("job_title", partner.getString("legal_representative_job"));
representativeInfo.put("address", partner.getString("registered_address"));
representativeInfo.put("suburb", partner.getString("registered_suburb"));
representativeInfo.put("postcode", partner.getString("registered_postcode"));
representativeInfo.put("state", partner.getString("registered_state"));
representativeInfo.put("legal_representative_wechatid", partner.getString("legal_representative_wechatid"));
// marking联系人
representativeInfo.put("marketing_person", partner.getString("marketing_person"));
representativeInfo.put("marketing_phone", partner.getString("marketing_phone"));
representativeInfo.put("marketing_email", partner.getString("marketing_email"));
representativeInfo.put("marketing_job_title", partner.getString("marketing_job"));
representativeInfo.put("marketing_wechatid", partner.getString("marketing_wechatid"));
sysClientLegalPersonMapper.save(representativeInfo);
} catch (Exception e) { } catch (Exception e) {
throw new BadRequestException("error.partner.valid.dumplicate_client_moniker"); throw new BadRequestException("error.partner.valid.dumplicate_client_moniker");
} }
if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) { if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
JSONObject client_bd = new JSONObject(); JSONObject client_bd = new JSONObject();
client_bd.put("client_id", partner.getIntValue("client_id")); client_bd.put("client_id", partner.getIntValue("client_id"));
@ -917,6 +921,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
sysClientLegalPersonMapper.save(representativeInfo); sysClientLegalPersonMapper.save(representativeInfo);
} }
if (info.isEnableCardPayment()) {
JSONObject upay = sysClientUpayProfileMapper.findInfo(clientId);
if (upay == null) {
sysClientUpayProfileMapper.save(updateInfo);
}else {
upay.putAll(updateInfo);
sysClientUpayProfileMapper.update(upay);
}
}
int originReferrerId = client.getIntValue("referrer_id"); int originReferrerId = client.getIntValue("referrer_id");
int updateReferrerId = Integer.parseInt(info.getReferrer_id() == null ? "0" : info.getReferrer_id()); int updateReferrerId = Integer.parseInt(info.getReferrer_id() == null ? "0" : info.getReferrer_id());
if (originReferrerId == 0 && updateReferrerId != 0) { if (originReferrerId == 0 && updateReferrerId != 0) {
@ -932,6 +946,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
JSONObject clientConfig = new JSONObject(); JSONObject clientConfig = new JSONObject();
clientConfig.put("client_id", clientId); clientConfig.put("client_id", clientId);
clientConfig.put("client_moniker", client.getString("client_moniker")); clientConfig.put("client_moniker", client.getString("client_moniker"));
clientConfig.put("enable_cross_payment", updateInfo.getBooleanValue("enable_cross_payment"));
clientConfig.put("enable_card_payment", updateInfo.getBooleanValue("enable_card_payment"));
if (StringUtils.isNotBlank(updateInfo.getString("client_pay_type")) && StringUtils.isNotBlank(updateInfo.getString("client_pay_desc"))) { if (StringUtils.isNotBlank(updateInfo.getString("client_pay_type")) && StringUtils.isNotBlank(updateInfo.getString("client_pay_desc"))) {
clientConfig.put("client_pay_type", updateInfo.getString("client_pay_type")); clientConfig.put("client_pay_type", updateInfo.getString("client_pay_type"));
clientConfig.put("client_pay_desc", updateInfo.getString("client_pay_desc")); clientConfig.put("client_pay_desc", updateInfo.getString("client_pay_desc"));
@ -1179,24 +1195,55 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client.getIntValue("source") == 4 || client.getIntValue("source") == 5) { if (client.getIntValue("source") == 4 || client.getIntValue("source") == 5) {
List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(client.getIntValue("client_id")); List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(client.getIntValue("client_id"));
JSONObject account = accounts.get(0); JSONObject account = accounts.get(0);
sendInitEmail(client, account.getString("username"), "*****"); sendInitEmail(client, account.getString("username"), "*****", false);
// sendInitEmail(manager, client, account.getString("username"), "*****"); // sendInitEmail(manager, client, account.getString("username"), "*****");
saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager); saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager,1);
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "skip_clearing", false)); clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "skip_clearing", false));
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "common_sub_merchant_id", false)); clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "common_sub_merchant_id", false));
gatewayMerchantApply.notifyOrgMerchantStatus(client); gatewayMerchantApply.notifyOrgMerchantStatus(client);
} else if (checkGreenChannel && client.getIntValue("open_status") == 5) { } else if (checkGreenChannel && client.getIntValue("open_status") == 5) {
// 绿色通道通过后不发邮件 // 绿色通道通过后不发邮件
logger.info("PASS 绿色通道:" + clientMoniker); logger.info("PASS 绿色通道:" + clientMoniker);
saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager); saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager,1);
} else { } else {
initAdminUserAndSendEmail(manager, clientMoniker, client); initAdminUserAndSendEmail(manager, clientMoniker, client, false);
saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager); saveClientAuditProcess(client.getIntValue("client_id"), open_status, 5, "合规通过", manager,1);
} }
} }
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id")); clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
} }
@Override
public void auditCardClient(JSONObject manager, String clientMoniker, int pass) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
//检查商户是否进入平台黑名单
int clientId = client.getIntValue("client_id");
isRiskyMerchant(client, clientBankAccountMapper.clientBankAccounts(clientId).get(0));
JSONObject cardFlowInfo = sysClientUpayProfileMapper.findInfo(clientId);
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
Integer open_status_to = cardFlowInfo != null? cardFlowInfo.getIntValue("upay_open_status") : null;
cardFlowInfo.put("upay_open_status",5);
cardFlowInfo.put("upay_approve_result",1);
sysClientUpayProfileMapper.update(cardFlowInfo);
sendCardCommissionWechatMessage(client);// wxMessage
if (pass == 1) {
createKycAuthStatus(manager, client);
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, "skip_clearing", false));
List<JSONObject> accounts = clientAccountMapper.listAdminAccounts(clientId);
if (accounts != null && accounts.size() > 0) {
sendInitEmail(client, accounts.get(0).getString("username"), "*******", true);
}else {
initAdminUserAndSendEmail(manager, clientMoniker, client, true);
}
saveClientAuditProcess(client.getIntValue("client_id"), open_status_to, 5, "合规通过", manager,2);
}
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
}
private void createKycAuthStatus(JSONObject manager, JSONObject client) { private void createKycAuthStatus(JSONObject manager, JSONObject client) {
JSONObject compliance = clientComplianceCompanyMapper.findKycFileByClientId(client.getIntValue("client_id")); JSONObject compliance = clientComplianceCompanyMapper.findKycFileByClientId(client.getIntValue("client_id"));
if (compliance != null) { if (compliance != null) {
@ -1240,15 +1287,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new BadRequestException("该商户未设置微信 Sub Merchant ID!"); throw new BadRequestException("该商户未设置微信 Sub Merchant ID!");
} }
clientModifySupport.processClientModify(new GreenChannelModify(manager, clientMoniker, manager.getString("manager_id"))); clientModifySupport.processClientModify(new GreenChannelModify(manager, clientMoniker, manager.getString("manager_id")));
saveClientAuditProcess(client.getIntValue("client_id"), 10, 1, "绿色通道申请通过", manager); saveClientAuditProcess(client.getIntValue("client_id"), 10, 1, "绿色通道申请通过", manager,1);
sendCommissionWechatMessage(client); sendCommissionWechatMessage(client);
initAdminUserAndSendEmail(manager, clientMoniker, client); initAdminUserAndSendEmail(manager, clientMoniker, client, false);
} }
private void initAdminUserAndSendEmail(JSONObject manager, String clientMoniker, JSONObject client) { private void initAdminUserAndSendEmail(JSONObject manager, String clientMoniker, JSONObject client,boolean isUpayEmail) {
if (StringUtils.isEmpty(client.getString("sub_merchant_id"))) {
throw new BadRequestException("Sub Merchant ID Can't be null ");
}
String username = clientMoniker; String username = clientMoniker;
boolean duplicated = true; boolean duplicated = true;
String pwd = RandomStringUtils.random(8, true, true); String pwd = RandomStringUtils.random(8, true, true);
@ -1265,7 +1309,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
username += "0"; username += "0";
} }
} }
sendInitEmail(client, username.toLowerCase(), pwd); sendInitEmail(client, username.toLowerCase(), pwd, isUpayEmail);
// sendInitEmail(manager, client, username, pwd); // sendInitEmail(manager, client, username, pwd);
} }
@ -1291,16 +1335,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client.getIntValue("source") == 4) { if (client.getIntValue("source") == 4) {
JSONObject account = accounts.get(0); JSONObject account = accounts.get(0);
// sendInitEmail(manager, client, account.getString("username"), "*****"); // sendInitEmail(manager, client, account.getString("username"), "*****");
sendInitEmail(client, account.getString("username"), "*****"); sendInitEmail(client, account.getString("username"), "*****", false);
} else { } else {
if (accounts.size() == 0) { if (accounts.size() == 0) {
initAdminUserAndSendEmail(manager, clientMoniker, client); initAdminUserAndSendEmail(manager, clientMoniker, client, false);
} else { } else {
JSONObject account = accounts.get(0); JSONObject account = accounts.get(0);
String pwd = RandomStringUtils.random(8, true, true); String pwd = RandomStringUtils.random(8, true, true);
resetAccountPwd(manager, clientMoniker, account.getString("account_id"), pwd); resetAccountPwd(manager, clientMoniker, account.getString("account_id"), pwd);
// sendInitEmail(manager, client, account.getString("username"), pwd); // sendInitEmail(manager, client, account.getString("username"), pwd);
sendInitEmail(client, account.getString("username"), pwd); sendInitEmail(client, account.getString("username"), pwd, false);
} }
} }
} }
@ -1372,7 +1416,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}.start(); }.start();
} }
public void sendInitEmail(final JSONObject client, String username, String pwd) { public void sendInitEmail(final JSONObject client, String username, String pwd,boolean isUpayAuditPass) {
logger.debug("sending email after comply"); logger.debug("sending email after comply");
JSONObject model = new JSONObject(); JSONObject model = new JSONObject();
model.put("username", username); model.put("username", username);
@ -1422,16 +1466,30 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
mailService.sendEmail("Your RoyalPay Cross-border Payment has been set up", emails.isEmpty() ? "" : StringUtils.join(emails, ","), mailService.sendEmail("Your RoyalPay Cross-border Payment has been set up", emails.isEmpty() ? "" : StringUtils.join(emails, ","),
"", contentBd); "", contentBd);
JSONObject clientUpdate = new JSONObject(); JSONObject clientUpdate = new JSONObject();
if (isUpayAuditPass) {
clientUpdate.put("client_id", client.getIntValue("client_id"));
clientUpdate.put("upay_approve_email_send", 3);
clientUpdate.put("upay_approve_email_id", emailId);
sysClientUpayProfileMapper.update(clientUpdate);
}else {
clientUpdate.put("client_id", client.getIntValue("client_id")); clientUpdate.put("client_id", client.getIntValue("client_id"));
clientUpdate.put("approve_email_send", 3); clientUpdate.put("approve_email_send", 3);
clientUpdate.put("approve_email_id", emailId); clientUpdate.put("approve_email_id", emailId);
clientMapper.update(clientUpdate); clientMapper.update(clientUpdate);
}
} catch (Exception e) { } catch (Exception e) {
JSONObject clientUpdate = new JSONObject(); JSONObject clientUpdate = new JSONObject();
if (isUpayAuditPass) {
clientUpdate.put("client_id", client.getIntValue("client_id"));
clientUpdate.put("upay_approve_email_send", 0);
clientUpdate.put("upay_approve_email_id", null);
sysClientUpayProfileMapper.update(clientUpdate);
}else {
clientUpdate.put("client_id", client.getIntValue("client_id")); clientUpdate.put("client_id", client.getIntValue("client_id"));
clientUpdate.put("approve_email_send", 0); clientUpdate.put("approve_email_send", 0);
clientUpdate.put("approve_email_id", null); clientUpdate.put("approve_email_id", null);
clientMapper.update(clientUpdate); clientMapper.update(clientUpdate);
}
throw new EmailException("Email Sending Failed", e); throw new EmailException("Email Sending Failed", e);
} }
} }
@ -1605,7 +1663,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) { if (client == null) {
throw new InvalidShortIdException(); throw new InvalidShortIdException();
} }
clientModifySupport.processClientConfigModify(new SwitchPermissionModify(manager, clientMoniker, permissionKey, allow)); JSONObject upayProfileInfo = sysClientUpayProfileMapper.findInfo(client.getInteger("client_id"));
upayProfileInfo.put(permissionKey,allow);
sysClientUpayProfileMapper.update(upayProfileInfo);
} }
@Override @Override
@ -2094,6 +2154,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
configJson.put("manager_id", manager.getString("manager_id")); configJson.put("manager_id", manager.getString("manager_id"));
configJson.put("manager_name", manager.getString("username")); configJson.put("manager_name", manager.getString("username"));
configJson.put("update_time", new Date()); configJson.put("update_time", new Date());
if (StringUtils.equalsIgnoreCase("rpaypmt_card", config.getRateName())) {
JSONObject extParams = configJson.getJSONObject("ext_rates");
extParams.put("domestic_rate_value", config.getRateValue());
configJson.put("ext_rates", extParams.toJSONString());
}
clientRateMapper.updateConfig(configJson); clientRateMapper.updateConfig(configJson);
// if ("Rpay".equals(configJson.getString("rate_name"))) { // if ("Rpay".equals(configJson.getString("rate_name"))) {
// rpayApi.modifySurchargeConfig(client); // rpayApi.modifySurchargeConfig(client);
@ -3120,6 +3185,35 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
} }
@Override
@Transactional
public void getAggregateCardAgreeFile(String clientMoniker, JSONObject manager, boolean renewal){
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
exportLetterOfferPDF(clientMoniker,manager);
exportTermsConditionsPDF(clientMoniker,manager);
if (!renewal) {
JSONObject cardFlow = sysClientUpayProfileMapper.findInfo(client.getInteger("client_id"));
cardFlow.put("upay_open_status",2);
sysClientUpayProfileMapper.update(cardFlow);
}
if (manager != null) {
saveClientAuditProcess(client.getIntValue("client_id"), 1, 2, "Compliance合同制作中", manager,2);
}
}
@Override
@Transactional
public void getAggregateCardPromotionaAgreeFile(String clientMoniker, JSONObject manager, boolean renewal,String promotionalEffectiveDate,int promotionalPeriod) throws ParseException {
JSONObject client = clientMapper.findClientByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
exportPromotionalOfferPDF(clientMoniker,manager,promotionalEffectiveDate,promotionalPeriod);
}
@Override @Override
public void getNewAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception { public void getNewAggregateAgreeFile(String clientMoniker, JSONObject manager, boolean renewal) throws Exception {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -3317,7 +3411,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
if (manager != null) { if (manager != null) {
saveClientAuditProcess(client.getIntValue("client_id"), 1, 2, "Compliance合同制作中", manager); saveClientAuditProcess(client.getIntValue("client_id"), 1, 2, "Compliance合同制作中", manager,1);
} }
} }
} }
@ -3334,11 +3428,29 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
client.put("open_status", 3); client.put("open_status", 3);
clientModifySupport.processClientModify(new OpenStatusModify(manager, clientMoniker, 3)); clientModifySupport.processClientModify(new OpenStatusModify(manager, clientMoniker, 3));
saveClientAuditProcess(client.getIntValue("client_id"), 2, 3, "合同制作完成等待BD处理", manager); saveClientAuditProcess(client.getIntValue("client_id"), 2, 3, "合同制作完成等待BD处理", manager,1);
// sendAgreeFileMsgToBD(client,null); // sendAgreeFileMsgToBD(client,null);
sendCommissionWechatMessage(client); sendCommissionWechatMessage(client);
} }
@Override
public void cardCompleteAgree(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
List<JSONObject> existLeffterFiles = clientFilesMapper.findFileByClientAndType(client.getIntValue("client_id"), LETTER_OF_OFFER_FILE);
List<JSONObject> existConditionsFiles = clientFilesMapper.findFileByClientAndType(client.getIntValue("client_id"), TERMS_AND_CONDITIONS_FILE);
if (CollectionUtils.isEmpty(existLeffterFiles) && CollectionUtils.isEmpty(existConditionsFiles)) {
throw new BadRequestException("The Agree File is not Complete!");
}
JSONObject cardFlowInfo = sysClientUpayProfileMapper.findInfo(client.getInteger("client_id"));
cardFlowInfo.put("upay_open_status", 3);
sysClientUpayProfileMapper.update(cardFlowInfo);
saveClientAuditProcess(client.getIntValue("client_id"), 2, 3, "合同制作完成等待BD处理", manager,2);
sendCardCommissionWechatMessage(client);
}
@Override @Override
public void downloadComplianceZip(String clientMoniker, HttpServletResponse response) throws Exception { public void downloadComplianceZip(String clientMoniker, HttpServletResponse response) throws Exception {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -3385,7 +3497,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) { if (client == null) {
throw new InvalidShortIdException(); throw new InvalidShortIdException();
} }
List<JSONObject> files = clientMWAuthFilesInfo.findClientFile(client.getIntValue("client_id")); List<JSONObject> files = clientMWAuthFilesInfo.findClientFile(client.getIntValue("client_id"), new PageBounds(1, 999999, Order.formString("last_update_date.asc")));
if (files != null && files.size() > 0) { if (files != null && files.size() > 0) {
List<String> filePaths = new ArrayList<>(); List<String> filePaths = new ArrayList<>();
for (JSONObject file : files) { for (JSONObject file : files) {
@ -3591,7 +3703,12 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
int clientId = client.getIntValue("client_id"); int clientId = client.getIntValue("client_id");
params.put("client_id", client.getIntValue("client_id")); params.put("client_id", client.getIntValue("client_id"));
clientConfigMapper.update(params); JSONObject upayInfo = sysClientUpayProfileMapper.findInfo(clientId);
if (upayInfo == null) {
sysClientUpayProfileMapper.save(params);
}else {
sysClientUpayProfileMapper.update(params);
}
} }
@Override @Override
@ -3669,6 +3786,19 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
return sourceFile; return sourceFile;
} }
@Override
public JSONObject getSourceCardAgreeFiles(String clientMoniker, JSONObject manager, String fileName){
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
JSONObject sourceFile = clientFilesMapper.getSourceCardAgreeFilesByClientId(client.getIntValue("client_id"),fileName);
if (sourceFile != null) {
sourceFile.put(sourceFile.getString("file_name"), sourceFile.getString("file_value"));
}
return sourceFile;
}
@Override @Override
public JSONObject getAllAuthFiles(JSONObject manager, String clientMoniker) { public JSONObject getAllAuthFiles(JSONObject manager, String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);
@ -3709,7 +3839,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (client == null) { if (client == null) {
throw new InvalidShortIdException(); throw new InvalidShortIdException();
} }
List<JSONObject> clientFiles = clientMWAuthFilesInfo.findClientFile(client.getIntValue("client_id")); List<JSONObject> clientFiles = clientMWAuthFilesInfo.findClientFile(client.getIntValue("client_id"), new PageBounds(1,999999, Order.formString("last_update_date.asc")));
JSONObject fileJson = new JSONObject(); JSONObject fileJson = new JSONObject();
for (JSONObject file : clientFiles) { for (JSONObject file : clientFiles) {
fileJson.put(file.getString("file_name"), file.getString("file_value")); fileJson.put(file.getString("file_name"), file.getString("file_value"));
@ -3867,11 +3997,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
int clientId = client.getIntValue("client_id"); int clientId = client.getIntValue("client_id");
try { try {
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_APPLICATION_FORM.getFileName(), filesInfo.getUpay_application_form()); updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.CLIENT_BANK_FILE.getFileName(), filesInfo.getClient_bank_file());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_AGREEMENT_FILE.getFileName(), filesInfo.getUpay_agreement_file()); updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.CLIENT_COMPANY_FILE.getFileName(), filesInfo.getClient_company_file());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_OFFER_LETTER.getFileName(), filesInfo.getUpay_offer_letter());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_DRIVER_LICENSE.getFileName(), filesInfo.getUpay_driver_license()); updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_DRIVER_LICENSE.getFileName(), filesInfo.getUpay_driver_license());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_RESIDENCE_CERTIFICATE.getFileName(), filesInfo.getUpay_residence_certificate()); updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.REFUND_EXCHANGE_POLICY.getFileName(), filesInfo.getRefund_exchange_policy());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_PRIVACY_POLICY.getFileName(), filesInfo.getUpay_privacy_policy());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.CARD_SECURITY_POLICY.getFileName(), filesInfo.getCard_security_policy());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_OFFER_LETTER.getFileName(), filesInfo.getUpay_offer_letter());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_PROMOTIONAL_OFFER.getFileName(), filesInfo.getUpay_promotional_offer());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_TERMS_CONDITIONS.getFileName(), filesInfo.getUpay_terms_conditions());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.KYC_UTILITY_BILL_FILE.getFileName(), filesInfo.getKyc_utility_bill_file());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_APPLICATION_FORM.getFileName(), filesInfo.getUpay_application_form());
updateSysMWClientFiles(manager, clientId, UPayAuthFileEnum.UPAY_DESC_FILE.getFileName(), filesInfo.getUpay_desc_file());
} catch (Exception e) { } catch (Exception e) {
logger.error("上传合规文件失败", e); logger.error("上传合规文件失败", e);
} }
@ -3955,7 +4092,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
@Override @Override
@Transactional @Transactional
public void commitAuthFilesToCompliance(String clientMoniker, JSONObject account, String source) { public void commitAuthFilesToCompliance(String clientMoniker, JSONObject account, String source) {
@ -4534,14 +4670,53 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
client.put("open_status", 4); client.put("open_status", 4);
clientModifySupport.processClientModify(openStatusModify); clientModifySupport.processClientModify(openStatusModify);
saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "BD完成签字提交compliance审核", manager); saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "BD完成签字提交compliance审核", manager,1);
if (manager != null) { if (manager != null) {
// sendMessagetoCompliance(client, manager.getString("display_name")); // sendMessagetoCompliance(client, manager.getString("display_name"));
sendCommissionWechatMessage(client); sendCommissionWechatMessage(client);
} }
} }
private void saveClientAuditProcess(int client_id, Integer open_status_form, Integer open_status_to, String remark, JSONObject manager) { @Override
@Transactional
public void commitToCardCompliance(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
client.putAll(clientConfigService.find(client.getIntValue("client_id")));
if (manager != null && ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
int bdOperatClientRole = clientBDMapper.checkBDPermission(client.getIntValue("client_id"), manager.getString("manager_id"));
if (bdOperatClientRole <= 0) {
throw new ForbiddenException();
}
}
// 提交合规启用银行、费率验证 add by Tayl0r 2017/06/13
JSONObject rate = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "rpaypmt_card");
if (rate == null) {
throw new BadRequestException("The Partner's Rate is not config!");
}
List<JSONObject> clientFiles = clientFilesMapper.findClientFile(client.getIntValue("client_id"));
if (clientFiles == null || clientFiles.equals("")) {
throw new BadRequestException("The Compliance File Must Be Uploaded!");
}
JSONObject account = getBankAccountByClientId(client.getIntValue("client_id"));
if (account == null) {
throw new BadRequestException("The Partner's Bank Account is not config!");
}
JSONObject cardFlowInfo = sysClientUpayProfileMapper.findInfo(client.getInteger("client_id"));
int open_status_from = cardFlowInfo.getIntValue("upay_open_status");
cardFlowInfo.put("upay_approve_time",new Date());
cardFlowInfo.put("upay_approve_result",4);
cardFlowInfo.put("upay_open_status", 4);
sysClientUpayProfileMapper.update(cardFlowInfo);
saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "BD完成签字提交compliance审核", manager,2);
if (manager != null) {
sendCardCommissionWechatMessage(client);
}
}
private void saveClientAuditProcess(int client_id, Integer open_status_form, Integer open_status_to, String remark, JSONObject manager,int type) {
JSONObject log = new JSONObject(); JSONObject log = new JSONObject();
try { try {
log.put("client_id", client_id); log.put("client_id", client_id);
@ -4552,6 +4727,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
log.put("operator_id", StringUtils.isNotEmpty(manager.getString("manager_id")) ? manager.getString("manager_id") : manager.getString("account_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("operator", manager.getString("display_name"));
log.put("create_time", new Date()); log.put("create_time", new Date());
log.put("type",type);
log.put("remark", remark); log.put("remark", remark);
clientAuditProcessMapper.save(log); clientAuditProcessMapper.save(log);
} catch (Exception e) { } catch (Exception e) {
@ -4567,6 +4743,48 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
throw new InvalidShortIdException(); throw new InvalidShortIdException();
} }
client.putAll(clientConfigService.find(client.getIntValue("client_id"))); client.putAll(clientConfigService.find(client.getIntValue("client_id")));
beforeCommitToDoAgreeValid(client, manager,"Wechat");
OpenStatusModify openStatusModify = new OpenStatusModify(manager, clientMoniker, 1);
openStatusModify.setApprove_result(4);
openStatusModify.setApprove_time(new Date());
clientModifySupport.processClientModify(openStatusModify);
saveClientAuditProcess(client.getIntValue("client_id"), null, 1, "提交Card Payment Compliance制作合同", manager,1);
if (manager != null) {
// sendAgreeFileMsgtoCompliance(client, manager.getString("display_name"));
sendCommissionWechatMessage(client);
}
}
@Override
@Transactional
public void commitToDoCardAgreeFile(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
int clientId = client.getIntValue("client_id");
client.putAll(clientConfigService.find(clientId));
beforeCommitToDoAgreeValid(client, manager,"rpaypmt_card");
JSONObject surCharge = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "rpaypmt_card");
if (surCharge == null || surCharge.size() <= 0) {
throw new BadRequestException("The Partner's Rpaypmt Card Rate is not config!");
}
JSONObject cardFlowInfo = sysClientUpayProfileMapper.findInfo(clientId);
JSONObject cardFlow = new JSONObject(){{
put("client_id",clientId);
put("upay_approve_result",4);
put("upay_open_status",1);
put("upay_approve_time",new Date());
}};
sysClientUpayProfileMapper.update(cardFlow);
saveClientAuditProcess(client.getIntValue("client_id"), null, 1, "提交Compliance制作合同", manager,2);
}
private void beforeCommitToDoAgreeValid(JSONObject client, JSONObject manager, String channel) {
if (manager != null && ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) { if (manager != null && ManagerRole.BD_USER.hasRole(manager.getIntValue("role"))) {
int bdOperatClientRole = clientBDMapper.checkBDPermission(client.getIntValue("client_id"), manager.getString("manager_id")); int bdOperatClientRole = clientBDMapper.checkBDPermission(client.getIntValue("client_id"), manager.getString("manager_id"));
if (bdOperatClientRole <= 0) { if (bdOperatClientRole <= 0) {
@ -4574,7 +4792,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
} }
JSONObject surCharge = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), "Wechat"); JSONObject surCharge = merchantInfoProvider.clientCurrentRate(client.getIntValue("client_id"), new Date(), channel);
if (surCharge == null || surCharge.size() <= 0) { if (surCharge == null || surCharge.size() <= 0) {
throw new BadRequestException("The Partner's Rate is not config!"); throw new BadRequestException("The Partner's Rate is not config!");
} }
@ -4583,15 +4801,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (account == null || account.size() <= 0) { if (account == null || account.size() <= 0) {
throw new BadRequestException("The Partner's Bank Account is not config!"); throw new BadRequestException("The Partner's Bank Account is not config!");
} }
OpenStatusModify openStatusModify = new OpenStatusModify(manager, clientMoniker, 1);
openStatusModify.setApprove_result(4);
openStatusModify.setApprove_time(new Date());
clientModifySupport.processClientModify(openStatusModify);
saveClientAuditProcess(client.getIntValue("client_id"), null, 1, "提交Compliance制作合同", manager);
if (manager != null) {
// sendAgreeFileMsgtoCompliance(client, manager.getString("display_name"));
sendCommissionWechatMessage(client);
}
} }
@Override @Override
@ -4623,7 +4832,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
openStatusModify.setApprove_result(4); openStatusModify.setApprove_result(4);
openStatusModify.setApprove_time(new Date()); openStatusModify.setApprove_time(new Date());
clientModifySupport.processClientModify(openStatusModify); clientModifySupport.processClientModify(openStatusModify);
saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 10, "提交绿色通道申请Compliance审核", manager); saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 10, "提交绿色通道申请Compliance审核", manager,1);
if (manager != null) { if (manager != null) {
// sendGreenChannelMessagetoCompliance(client, manager.getString("display_name")); // sendGreenChannelMessagetoCompliance(client, manager.getString("display_name"));
sendCommissionWechatMessage(client); sendCommissionWechatMessage(client);
@ -4913,7 +5122,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (refuse_remark != null && !refuse_remark.isEmpty()) { if (refuse_remark != null && !refuse_remark.isEmpty()) {
auditModify.setRefuse_remark(refuse_remark); auditModify.setRefuse_remark(refuse_remark);
} }
saveClientAuditProcess(client.getIntValue("client_id"), open_status, client.getInteger("open_status"), "打回," + refuse_remark, manager); saveClientAuditProcess(client.getIntValue("client_id"), open_status, client.getInteger("open_status"), "打回," + refuse_remark, manager,1);
clientModifySupport.processClientModify(auditModify); clientModifySupport.processClientModify(auditModify);
try { try {
@ -4938,6 +5147,55 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
} }
@Override
public void cardRefusePartner(String clientMoniker, JSONObject manager, String refuse_remark) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
Integer clientId = client.getInteger("client_id");
JSONObject cardFlowInfo = sysClientUpayProfileMapper.findInfo(clientId);
Integer open_status = null;
if(null != cardFlowInfo){
open_status = cardFlowInfo.getIntValue("upay_open_status");
if (open_status == 1) {
cardFlowInfo.put("upay_open_status",null);
} else {
cardFlowInfo.put("upay_open_status",open_status - 1);
}
if ( cardFlowInfo.getIntValue("upay_approve_result") == 4 || client.getIntValue("source") == 4) {
cardFlowInfo.put("upay_approve_result",5);
}
if (refuse_remark != null && !refuse_remark.isEmpty()) {
cardFlowInfo.put("upay_refuse_remark",refuse_remark);
}
}else{
cardFlowInfo.put("upay_open_status",null);
}
saveClientAuditProcess(client.getIntValue("client_id"), open_status, cardFlowInfo.getIntValue("open_status"), "打回," + refuse_remark, manager,2);
sysClientUpayProfileMapper.update(cardFlowInfo);
try {
if (client.getIntValue("source") == 4) {
String contact_phone = client.getString("contact_phone");
if (contact_phone.startsWith("+61")) {
ArrayList<String> param = new ArrayList<>();
param.add(refuse_remark);
try {
smsSender.getSender().sendWithParam("61", contact_phone.replace("+61", ""), REFUSE_CLIENT_TEMPLID, param, "RoyalPay", "", "");
} catch (Exception ignore) {
throw new ServerErrorException("Phone number is wrong :" + contact_phone);
}
}
}
if (client.getIntValue("source") == 5) {
gatewayMerchantApply.notifyOrgMerchantStatus(client);
}
} catch (Exception e) {
logger.error("RefusePartnerError=======:" + clientMoniker + "," + e.getMessage());
}
}
@Override @Override
@Cacheable(value = ":all_clients:", key = "''+#clientId") @Cacheable(value = ":all_clients:", key = "''+#clientId")
public JSONArray getAllClientIds(int clientId) { public JSONArray getAllClientIds(int clientId) {
@ -5455,6 +5713,94 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
private void sendCardCommissionWechatMessage(JSONObject client) {
String bd_user_name = client.getString("bd_user_name");
String client_moniker = "[" + client.getString("client_moniker") + "]";
String short_name = client.getString("short_name");
JSONObject cardFlowInfo = sysClientUpayProfileMapper.findInfo(client.getInteger("client_id"));
if(null == cardFlowInfo){
return;
}
if (cardFlowInfo.getIntValue("upay_open_status") == 1) {
List<JSONObject> complianceList = managerMapper.getOnlyCompliance();
if (complianceList != null && complianceList.size() > 0) {
for (JSONObject compliance : complianceList) {
String wxopenid = compliance.getString("wx_openid");
try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), "BD申请制作信用卡支付合同" + client_moniker,
bd_user_name, "制作卡支付合同申请", "BD申请制作" + short_name + "的卡支付合同");
paymentApi.sendTemplateMessage(msg);
} catch (WechatException e) {
logger.error("Wechat Message Error,open_status=1" + e.getMessage());
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=1,openid=" + wxopenid));
}
}
}
return;
}
if (cardFlowInfo.getIntValue("upay_open_status") == 3) {
List<JSONObject> bds = clientBDMapper.listClientBDInfoAvailable(client.getIntValue("client_id"), new Date());
for (JSONObject bd : bds) {
String wxopenid = bd.getString("wx_openid");
if (wxopenid != null) {
try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "信用卡支付合同制作完成",
"Compliance", "合规材料", "上传完整合规材料,商户:" + short_name);
paymentApi.sendTemplateMessage(msg);
} catch (WechatException e) {
logger.error("Wechat Message Error,open_status=3" + e.getMessage());
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=3,openid=" + wxopenid));
}
}
}
return;
}
if (cardFlowInfo.getIntValue("upay_open_status") == 4) {
if (client.getIntValue("source") == 4 && !StringUtils.isNotEmpty(bd_user_name)) {
bd_user_name = "自助开通商户";
}
List<JSONObject> complianceList = managerMapper.getOnlyCompliance();
if (complianceList != null && complianceList.size() > 0) {
for (JSONObject compliance : complianceList) {
String wxopenid = compliance.getString("wx_openid");
try {
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
TemplateMessage msg = initSendCommissionTemplate(wxopenid, paymentApi.getTemplateId("commission"), client_moniker + "信用卡卡支付合规材料已提交",
bd_user_name, "审核材料", "已提交合规材料,等待审核");
paymentApi.sendTemplateMessage(msg);
} catch (WechatException e) {
logger.error("Wechat Message Error,open_status=1" + e.getMessage());
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=1,openid=" + wxopenid));
} catch (Exception e) {
logger.error("Wechat Message Error,open_status=1" + e.getMessage());
}
}
}
return;
}
if (cardFlowInfo.getIntValue("upay_open_status") == 5) {
List<JSONObject> bds = clientBDMapper.listClientBDInfoAvailable(client.getIntValue("client_id"), new Date());
for (JSONObject bd : bds) {
String wxopenid = bd.getString("wx_openid");
if (wxopenid != null) {
try {
TemplateMessage msg = initTaskFinishTemplate(wxopenid, client_moniker + "已正式开通", "Card Payment Compliance审核通过", "");
MpWechatApi paymentApi = mpWechatApiProvider.getNewPaymentApi();
paymentApi.sendTemplateMessage(msg);
} catch (WechatException e) {
logger.error("Wechat Message Error,open_status=5" + e.getMessage());
publisher.publishEvent(new WechatExceptionEvent(this, e, "Audit,open_status=5,openid=" + wxopenid));
}
}
}
return;
}
}
@Override @Override
@Cacheable(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker") @Cacheable(value = ":all_sub_merchant_id_applices:", key = "#clientMoniker")
public List<JSONObject> listSubMerchantIdApplys(JSONObject manager, String clientMoniker) { public List<JSONObject> listSubMerchantIdApplys(JSONObject manager, String clientMoniker) {
@ -6061,7 +6407,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
} }
client.put("open_status", 4); client.put("open_status", 4);
clientModifySupport.processClientModify(openStatusModify); clientModifySupport.processClientModify(openStatusModify);
saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "自助开通商户提交compliance审核", client_account); saveClientAuditProcess(client.getIntValue("client_id"), open_status_from, 4, "自助开通商户提交compliance审核", client_account,1);
if (params != null) { if (params != null) {
params.put("display_name", client_account.getString("display_name")); params.put("display_name", client_account.getString("display_name"));
@ -6993,4 +7339,195 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id")); clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
} }
private void exportLetterOfferPDF(String clientMoniker,JSONObject manage) {
JSONObject info = convertClientLetterOfferInfo(clientMoniker);
String pdfPath = this.getClass().getClassLoader().getResource("").getPath() + "/templates/pdf/letter_of_offer.pdf";
String fileName = clientMoniker + "_Letter_of_Offer.pdf";
publishExcelCardPDFFile(clientMoniker,manage,fileName, pdfPath, info,LETTER_OF_OFFER_FILE);
}
private JSONObject convertClientLetterOfferInfo(String clientMoniker) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
//合规状态
if (client.getIntValue("approve_result") != 1 && client.getIntValue("approve_result") == 3) {
throw new BadRequestException("The merchant failed the audit!");
}
//获取数据源
int clientId = client.getInteger("client_id");
JSONObject clientRate = merchantInfoProvider.clientCurrentRate(clientId, new Date(), "rpaypmt_card");
if (clientRate == null) {
throw new BadRequestException("rpaypmt_card rate Not configured");
}
JSONObject cardRate = clientRate.getJSONObject("ext_rates");
JSONObject bankAccountInfo = clientBankAccountMapper.clientBankAccounts(clientId).get(0);
JSONObject upayProfileInfo = sysClientUpayProfileMapper.findInfo(clientId);
JSONObject legalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(clientId);
//装在数据
JSONObject info = new JSONObject();
info.put("down_date", convertDateEnglish(new Date()));//下载文件日期
info.put("bussiness_name", (client.containsKey("business_name")?client.getString("business_name"):legalInfo.getString("representative_person")) + " "+client.getString("abn"));//商圈类型
info.put("partner_address", client.getString("address"));//商家店铺地址
info.put("partner_country", client.getString("country"));//国家
info.put("partner_state", client.getString("state"));//洲
info.put("partner_bussiness_name", client.getString("business_name"));//商户商用名称
info.put("clean_days", client.getInteger("clean_days"));//T+规则清算天数
info.put("partner_industry_mcc", upayProfileInfo.getString("mw_industry"));//信用卡注册商户行业编码
info.put("legal_bussiness", legalInfo.getString("representative_person") + " AS " + (client.containsKey("business_name")?client.getString("business_name"):legalInfo.getString("representative_person")) + " ABN " + client.getString("abn"));//拼接规则:法人名 AS 商用名称 ABD 编码
info.put("annual_rate",cardAnnualRate);//年费率
info.put("cost_per_transaction", clientRate.getString("transaction_fee"));//每次交易成本
info.put("domestic_fee", cardRate.getString("domestic_rate_value"));//国内服务费
info.put("international_fee", cardRate.getString("overseas_rate_value"));//国际服务费
BigDecimal reserve = (upayProfileInfo.getBigDecimal("expected_card_revenue").multiply(new BigDecimal(0.005)).setScale(0, RoundingMode.HALF_UP));
info.put("account_reserve", reserve.compareTo(new BigDecimal(200)) <= 0 ? new BigDecimal(200).toPlainString() : reserve.toPlainString());//账户储备金
//银行账号信息
info.put("account_name", bankAccountInfo.getString("account_name"));//
info.put("bsb", bankAccountInfo.getString("bsb_no"));
info.put("account_no", bankAccountInfo.getString("account_no"));
info.put("card_acceptor_name", upayProfileInfo.getString("acceptor_name"));
return info;
}
private void exportPromotionalOfferPDF(String clientMoniker,JSONObject manager,String promotionalEffectiveDate,int promotionalPeriod) throws ParseException {
Date date = DateUtils.parseDate(promotionalEffectiveDate,"yyyy-MM-dd");
JSONObject info = convertPromotionalOfferInfo(clientMoniker,convertDateEnglish(date),promotionalPeriod);
String pdfPath = this.getClass().getClassLoader().getResource("").getPath() + "/templates/pdf/promotional_offer.pdf";
String fileName = clientMoniker + "_Promotional_Offer.pdf";
publishExcelCardPDFFile(clientMoniker,manager,fileName, pdfPath, info,PROMOTIONAL_OFFER_FILE);
}
private JSONObject convertPromotionalOfferInfo(String clientMoniker,String promotionalEffectiveDate,int promotionalPeriod) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
//合规状态
if (client.getIntValue("approve_result") != 1 && client.getIntValue("approve_result") == 3) {
throw new BadRequestException("The merchant failed the audit!");
}
int clientId = client.getInteger("client_id");
JSONObject clientRate = merchantInfoProvider.clientCurrentRate(clientId, new Date(), "rpaypmt_card");
if (clientRate == null) {
throw new BadRequestException("rpaypmt_card rate Not configured");
}
JSONObject cardRate = clientRate.getJSONObject("ext_rates");
JSONObject legalInfo = sysClientLegalPersonMapper.findRepresentativeInfo(clientId);
JSONObject info = new JSONObject();
info.put("down_date", convertDateEnglish(new Date()));//下载文件日期
info.put("bussiness_name", (client.containsKey("business_name")?client.getString("business_name"):legalInfo.getString("representative_person")) + " "+client.getString("abn"));//商圈类型
info.put("partner_address", client.getString("address"));//商家店铺地址
info.put("partner_country", client.getString("country"));//国家
info.put("partner_state", client.getString("state"));//洲
info.put("partner_bussiness_name", client.getString("business_name"));//商户商用名称
info.put("legal_bussiness", legalInfo.getString("representative_person") + " AS " + (client.containsKey("business_name")?client.getString("business_name"):legalInfo.getString("representative_person")) + " ABN " + client.getString("abn"));//拼接规则:法人名 AS 商用名称 ABD 编码
info.put("domestic_fee", cardRate.getString("domestic_rate_value"));//国内服务费
info.put("international_fee", cardRate.getString("overseas_rate_value"));//国际服务费
info.put("promotional_effective_date", promotionalEffectiveDate);
info.put("promotional_period", promotionalPeriod);
return info;
}
private void exportTermsConditionsPDF(String clientMoniker,JSONObject manage) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
if (client.getIntValue("approve_result") != 1 && client.getIntValue("approve_result") == 3) {
throw new BadRequestException("The merchant failed the audit!");
}
String pdfPath = this.getClass().getClassLoader().getResource("").getPath() + "/templates/pdf/terms_and_conditions.pdf";
String fileName = clientMoniker + "_Terms_And_Conditions.pdf";
publishExcelCardPDFFile(clientMoniker,manage,fileName, pdfPath, new JSONObject(),TERMS_AND_CONDITIONS_FILE);
}
private void publishExcelCardPDFFile(String clientMoniker,JSONObject manager, String fileName, String pdfPath, JSONObject info, String fileLabel) {
try {
PdfUtils pdu = new PdfUtils();
pdu.setTemplatePdfPath(pdfPath);
pdu.setPdfTemplate(info);
try {
File file = new File(fileName);
ByteArrayOutputStream bos = pdu.templetPdfBos(file);
InputStream stream = new ByteArrayInputStream(bos.toByteArray());
JSONObject fileRes = attachmentClient.uploadFile(stream, fileName, false);
if (fileRes != null) {
importCardAgreeFile(clientMoniker, manager, fileRes.getString("url"), fileLabel);
}
stream.close();
} catch (Exception e) {
logger.error("合同制作出现问题:", e);
}
} catch (Exception e) {
e.printStackTrace();
}
}
private String convertDateEnglish(Date date) {
String[] months = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Spt", "Oct", "Nov", "Dec"};
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
int year = calendar.get(Calendar.YEAR);
int month = calendar.get(Calendar.MONTH);
int day = calendar.get(Calendar.DAY_OF_MONTH);
return day + " " + months[month] + " " + year;
}
private void importCardAgreeFile(String clientMoniker, JSONObject manager, String sourceFile, String fileLabel) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
if (sourceFile != null) {
List<JSONObject> existFiles = clientFilesMapper.findFileByClientAndType(client.getIntValue("client_id"), fileLabel);
JSONObject existFile = null;
if (!CollectionUtils.isEmpty(existFiles)) {
existFile = existFiles.get(0);
}
Date now = new Date();
JSONObject file = new JSONObject();
file.put("file_name", fileLabel);
file.put("file_value", sourceFile);
file.put("client_id", client.getIntValue("client_id"));
file.put("last_update_date", now);
file.put("status", 1);
file.put("is_valid", 1);
if (manager == null) {
file.put("last_update_by", "System Import");
} else {
file.put("last_update_by", manager.getString("display_name"));
}
JSONObject contract = clientsContractMapper.findByClientId(client.getIntValue("client_id"));
if (contract == null || now.compareTo(contract.getDate("expiry_date")) > 0 || !contract.getBoolean("has_sign") || existFile == null
|| existFile.isEmpty()) {
clientFilesMapper.save(file);
} else {
file.put("file_id", existFile.getString("file_id"));
clientFilesMapper.update(file);
}
}
}
public void saveLegalAndMarketingInfo(JSONObject partner) {
JSONObject representativeInfo = new JSONObject();
representativeInfo.put("client_id", partner.getIntValue("client_id"));
representativeInfo.put("representative_person", partner.getString("legal_representative_person"));
representativeInfo.put("phone", partner.getString("legal_representative_phone"));
representativeInfo.put("email", partner.getString("legal_representative_email"));
representativeInfo.put("job_title", partner.getString("legal_representative_job"));
representativeInfo.put("address", partner.getString("registered_address"));
representativeInfo.put("suburb", partner.getString("registered_suburb"));
representativeInfo.put("postcode", partner.getString("registered_postcode"));
representativeInfo.put("state", partner.getString("registered_state"));
representativeInfo.put("legal_representative_wechatid", partner.getString("legal_representative_wechatid"));
representativeInfo.put("marketing_person", partner.getString("marketing_person"));
representativeInfo.put("marketing_phone", partner.getString("marketing_phone"));
representativeInfo.put("marketing_email", partner.getString("marketing_email"));
representativeInfo.put("marketing_job_title", partner.getString("marketing_job"));
representativeInfo.put("marketing_wechatid", partner.getString("marketing_wechatid"));
sysClientLegalPersonMapper.save(representativeInfo);
}
} }

@ -2,11 +2,18 @@ package au.com.royalpay.payment.manage.merchants.enums;
public enum UPayAuthFileEnum { public enum UPayAuthFileEnum {
ALL(""), ALL(""),
UPAY_APPLICATION_FORM("upay_application_form"), CLIENT_BANK_FILE("client_bank_file"),
UPAY_AGREEMENT_FILE("upay_agreement_file"), CLIENT_COMPANY_FILE("client_company_file"),
UPAY_OFFER_LETTER("upay_offer_letter"),
UPAY_DRIVER_LICENSE("upay_driver_license"), UPAY_DRIVER_LICENSE("upay_driver_license"),
UPAY_RESIDENCE_CERTIFICATE("upay_residence_certificate"); REFUND_EXCHANGE_POLICY("refund_exchange_policy"),
UPAY_PRIVACY_POLICY("upay_privacy_policy"),
CARD_SECURITY_POLICY("card_security_policy"),
UPAY_OFFER_LETTER("upay_offer_letter"),
UPAY_PROMOTIONAL_OFFER("upay_promotional_offer"),
UPAY_TERMS_CONDITIONS("upay_terms_conditions"),
KYC_UTILITY_BILL_FILE("kyc_utility_bill_file"),
UPAY_APPLICATION_FORM("upay_application_form"),
UPAY_DESC_FILE("upay_desc_file");
private final String fileName; private final String fileName;
@ -19,10 +26,17 @@ public enum UPayAuthFileEnum {
} }
public String[] getFileNameArrays() { public String[] getFileNameArrays() {
return new String[]{UPAY_APPLICATION_FORM.getFileName(), return new String[]{CLIENT_BANK_FILE.getFileName(),
UPAY_AGREEMENT_FILE.getFileName(), CLIENT_COMPANY_FILE.getFileName(),
UPAY_OFFER_LETTER.getFileName(),
REFUND_EXCHANGE_POLICY.getFileName(),
UPAY_PRIVACY_POLICY.getFileName(),
CARD_SECURITY_POLICY.getFileName(),
UPAY_OFFER_LETTER.getFileName(), UPAY_OFFER_LETTER.getFileName(),
UPAY_DRIVER_LICENSE.getFileName(), UPAY_PROMOTIONAL_OFFER.getFileName(),
UPAY_RESIDENCE_CERTIFICATE.getFileName()}; UPAY_TERMS_CONDITIONS.getFileName(),
KYC_UTILITY_BILL_FILE.getFileName(),
UPAY_APPLICATION_FORM.getFileName(),
UPAY_DESC_FILE.getFileName()};
} }
} }

@ -22,6 +22,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -279,6 +280,11 @@ public class PartnerManageController {
clientManager.auditClient(manager, clientMoniker, pass.getIntValue("pass")); clientManager.auditClient(manager, clientMoniker, pass.getIntValue("pass"));
} }
@ManagerMapping(value = "/{clientMoniker}/card_audit", method = RequestMethod.PUT, role = ManagerRole.OPERATOR)
public void auditCardPartner(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String clientMoniker, @RequestBody JSONObject pass) {
clientManager.auditCardClient(manager, clientMoniker, pass.getIntValue("pass"));
}
@ManagerMapping(value = "/{clientMoniker}/aduit/green_channel", method = RequestMethod.PUT, role = ManagerRole.OPERATOR) @ManagerMapping(value = "/{clientMoniker}/aduit/green_channel", method = RequestMethod.PUT, role = ManagerRole.OPERATOR)
public void auditPartnerGreenChannel(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String clientMoniker) { public void auditPartnerGreenChannel(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @PathVariable String clientMoniker) {
clientManager.auditClientGreenChannel(manager, clientMoniker); clientManager.auditClientGreenChannel(manager, clientMoniker);
@ -299,6 +305,11 @@ public class PartnerManageController {
clientManager.refusePartner(clientMoniker, manager, refuse.getString("refuse_remark")); clientManager.refusePartner(clientMoniker, manager, refuse.getString("refuse_remark"));
} }
@ManagerMapping(value = "/{clientMoniker}/card_audit/refuse", method = RequestMethod.PUT, role = ManagerRole.OPERATOR)
public void cardRefusePartner(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody JSONObject refuse) {
clientManager.cardRefusePartner(clientMoniker, manager, refuse.getString("refuse_remark"));
}
@ManagerMapping(value = "/{clientMoniker}/common_sub_merchant_id", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR}) @ManagerMapping(value = "/{clientMoniker}/common_sub_merchant_id", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR})
public void switchCommonSubMerchantId(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public void switchCommonSubMerchantId(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.switchPermission(manager, clientMoniker, "common_sub_merchant_id", pass.getBooleanValue("allow")); clientManager.switchPermission(manager, clientMoniker, "common_sub_merchant_id", pass.getBooleanValue("allow"));
@ -584,6 +595,17 @@ public class PartnerManageController {
return clientManager.getSourceAgreeFiles(manager, clientMoniker); return clientManager.getSourceAgreeFiles(manager, clientMoniker);
} }
/**
*
*
* @param clientMoniker
*/
@ManagerMapping(value = "/{clientMoniker}/file/source_card_agree_file", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.BD_USER, ManagerRole.SERVANT})
public JSONObject getSourceCardAgreeAuthFiles(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
@RequestParam("fileName") String fileName){
return clientManager.getSourceCardAgreeFiles(clientMoniker,manager,fileName);
}
@ManagerMapping(value = "/auth_file/{fileId}/delete", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER}) @ManagerMapping(value = "/auth_file/{fileId}/delete", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void deleteAuthFiles(@PathVariable String fileId, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public void deleteAuthFiles(@PathVariable String fileId, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.deleteAuthFilesByAdmin(fileId); clientManager.deleteAuthFilesByAdmin(fileId);
@ -623,11 +645,31 @@ public class PartnerManageController {
clientManager.commitToCompliance(clientMoniker, manager); clientManager.commitToCompliance(clientMoniker, manager);
} }
/**
* BD
* @param clientMoniker
* @param manager
*/
@ManagerMapping(value = "/{clientMoniker}/to_card_compliance", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.BD_USER})
public void commitToCardCompliance(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.commitToCardCompliance(clientMoniker, manager);
}
@ManagerMapping(value = "/{clientMoniker}/make_agree_file", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.BD_USER}) @ManagerMapping(value = "/{clientMoniker}/make_agree_file", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.BD_USER})
public void commitToDoAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public void commitToDoAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.commitToDoAgreeFile(clientMoniker, manager); clientManager.commitToDoAgreeFile(clientMoniker, manager);
} }
/**
*
* @param clientMoniker
* @param manager
*/
@ManagerMapping(value = "/{clientMoniker}/make_card_agree_file", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.BD_USER})
public void commitToDoCardAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.commitToDoCardAgreeFile(clientMoniker, manager);
}
@ManagerMapping(value = "/{clientMoniker}/compliance/green_channel", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.BD_USER}) @ManagerMapping(value = "/{clientMoniker}/compliance/green_channel", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.BD_USER})
public void commitToGreenChannel(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public void commitToGreenChannel(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.commitToGreenChannel(clientMoniker, manager); clientManager.commitToGreenChannel(clientMoniker, manager);
@ -643,6 +685,29 @@ public class PartnerManageController {
clientManager.getAggregateAgreeFile(clientMoniker, manager, false); clientManager.getAggregateAgreeFile(clientMoniker, manager, false);
} }
/**
*
* @param clientMoniker
* @param manager
* @throws Exception
*/
@ManagerMapping(value = "/{clientMoniker}/export/aggregate/card_agree_pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
public void exportAggregateCardAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) throws Exception {
clientManager.getAggregateCardAgreeFile(clientMoniker, manager, false);
}
/**
*
* @param clientMoniker
* @param manager
* @throws Exception
*/
@ManagerMapping(value = "/{clientMoniker}/export/aggregate/card_promotiona_agree_pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
public void exportAggregateCardPromotionaAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,
@RequestParam("date") String promotionalEffectiveDate,@RequestParam("period") int promotionalPeriod) throws Exception {
clientManager.getAggregateCardPromotionaAgreeFile(clientMoniker, manager, false,promotionalEffectiveDate,promotionalPeriod);
}
@ManagerMapping(value = "/{clientMoniker}/temp/export/pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.DIRECTOR, ManagerRole.OPERATOR}) @ManagerMapping(value = "/{clientMoniker}/temp/export/pdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.DIRECTOR, ManagerRole.OPERATOR})
public void temporaryExportPDF(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception { public void temporaryExportPDF(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception {
clientManager.temporaryExportPdf(clientMoniker, manager, httpResponse); clientManager.temporaryExportPdf(clientMoniker, manager, httpResponse);
@ -658,6 +723,16 @@ public class PartnerManageController {
clientManager.completeAgree(clientMoniker, manager); clientManager.completeAgree(clientMoniker, manager);
} }
/**
* BD
* @param clientMoniker
* @param manager
*/
@ManagerMapping(value = "/{clientMoniker}/notify/cardCompleteAgree", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void cardCompleteAgree(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.cardCompleteAgree(clientMoniker, manager);
}
@ManagerMapping(value = "/{clientMoniker}/download/complianceAsZIP", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR}) @ManagerMapping(value = "/{clientMoniker}/download/complianceAsZIP", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void downloadComplianceZip(@PathVariable String clientMoniker, HttpServletResponse response) throws Exception { public void downloadComplianceZip(@PathVariable String clientMoniker, HttpServletResponse response) throws Exception {
clientManager.downloadComplianceZip(clientMoniker, response); clientManager.downloadComplianceZip(clientMoniker, response);
@ -929,4 +1004,14 @@ public class PartnerManageController {
public RPayMerchantEntity queryMWMerchantInfo(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { public RPayMerchantEntity queryMWMerchantInfo(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.queryMWMerchantInfo(clientMoniker, manager); return clientManager.queryMWMerchantInfo(clientMoniker, manager);
} }
/**
* /
* @param clientMoniker
*/
@ManagerMapping(value = "/{clientMoniker}/payment_card_permission", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR})
public void switchInternationalCard(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager){
clientManager.switchPermission(manager, clientMoniker, "enable_international_card", pass.getBooleanValue("allow"));
}
} }

@ -36,6 +36,8 @@ public interface TradeLogService {
void exportTransFlow(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception; void exportTransFlow(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception;
void exportUpayTransFlow(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception;
void exportTransFlowApi(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception; void exportTransFlowApi(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception;
void exportExcel(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception; void exportExcel(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception;

@ -136,6 +136,8 @@ public class TradeLogServiceImpl implements TradeLogService {
private org.springframework.core.io.Resource trans_flow; private org.springframework.core.io.Resource trans_flow;
@Value("classpath:/jasper/incremental_partner_invoice_gst.jasper") @Value("classpath:/jasper/incremental_partner_invoice_gst.jasper")
private org.springframework.core.io.Resource incremental_trans_flow; private org.springframework.core.io.Resource incremental_trans_flow;
@Value("classpath:/jasper/partner_upay_invoice_gst.jasper")
private org.springframework.core.io.Resource upay_trans_flow;
@Value("classpath:/jasper/royalpay_logo.png") @Value("classpath:/jasper/royalpay_logo.png")
private org.springframework.core.io.Resource logo; private org.springframework.core.io.Resource logo;
@Value("classpath:/jasper/trans_excel.jasper") @Value("classpath:/jasper/trans_excel.jasper")
@ -573,6 +575,30 @@ public class TradeLogServiceImpl implements TradeLogService {
return result; return result;
} }
private JSONObject listPartnerTransFlowByExportPdf(TradeLogQuery query, JSONObject partner, String[] channels) throws Exception {
int clientId = partner.getIntValue("client_id");
String timezone = partner.getJSONObject("client").getString("timezone");
JSONObject params = query.toParams(timezone);
params.put("channel", channels);
clientManager.validateClients(clientId, params);
params.put("client_id", clientId);
clientManager.queryModifyClientIds(clientId, params);
List<JSONObject> logs = transactionMapper.listTransFlow(params);
TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy HH:mm:ss", Collections.singletonList("transaction_time"));
TimeZoneUtils.switchTimeZoneToString(logs, timezone, "dd/MM/yyyy", Collections.singletonList("clearing_time"));
final JSONObject analysis = analysisTransLogs(logs);
JSONObject result = new JSONObject();
result.put("data", logs);
analysis.put("balance", transactionMapper.analysisBalance(params));
if (analysis.containsKey("paid_fee") && analysis.containsKey("refund_fee")) {
analysis.put("actual_fee", analysis.getBigDecimal("paid_fee").add(analysis.getBigDecimal("refund_fee")));
}
result.put("analysis", analysis);
return result;
}
private JSONObject analysisTransLogs(List<JSONObject> logs) { private JSONObject analysisTransLogs(List<JSONObject> logs) {
final JSONObject analysis = new JSONObject(); final JSONObject analysis = new JSONObject();
analysis.put("order_count", logs.size()); analysis.put("order_count", logs.size());
@ -633,10 +659,18 @@ public class TradeLogServiceImpl implements TradeLogService {
.filter(log -> log.getBigDecimal("settle_amount") != null) .filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("incremental_surcharge"))) .map(log -> getSymbol(log).multiply(log.getBigDecimal("incremental_surcharge")))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO)); .reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_transaction_fee", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("transaction_fee")))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_incremental_tax", logs.parallelStream() analysis.put("total_incremental_tax", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null) .filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("incremental_surcharge").divide(new BigDecimal(10), 2, RoundingMode.HALF_UP))) .map(log -> getSymbol(log).multiply(log.getBigDecimal("incremental_surcharge").divide(new BigDecimal(10), 2, RoundingMode.HALF_UP)))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO)); .reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_transaction_fee_tax", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("transaction_fee").divide(new BigDecimal(10), 2, RoundingMode.HALF_UP)))
.reduce(BigDecimal::add).orElse(BigDecimal.ZERO));
analysis.put("total_surcharge", logs.parallelStream() analysis.put("total_surcharge", logs.parallelStream()
.filter(log -> log.getBigDecimal("settle_amount") != null) .filter(log -> log.getBigDecimal("settle_amount") != null)
.map(log -> getSymbol(log).multiply(log.getBigDecimal("total_surcharge").add(log.getBigDecimal("tax_amount")))) .map(log -> getSymbol(log).multiply(log.getBigDecimal("total_surcharge").add(log.getBigDecimal("tax_amount"))))
@ -679,7 +713,7 @@ public class TradeLogServiceImpl implements TradeLogService {
@Override @Override
public void exportTransFlow(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception { public void exportTransFlow(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception {
JSONObject transFlow = listPartnerTransFlow(query, partner); JSONObject transFlow = listPartnerTransFlowByExportPdf(query, partner,new String[]{"Wechat","Alipay","AlipayOnline"});
JSONObject analysis = transFlow.getJSONObject("analysis"); JSONObject analysis = transFlow.getJSONObject("analysis");
JSONObject client = clientManager.getClientInfo(partner.getIntValue("client_id")); JSONObject client = clientManager.getClientInfo(partner.getIntValue("client_id"));
if (!transFlow.getJSONArray("data").isEmpty()) { if (!transFlow.getJSONArray("data").isEmpty()) {
@ -736,7 +770,7 @@ public class TradeLogServiceImpl implements TradeLogService {
}); });
JRDataSource jrDataSource = new JRBeanCollectionDataSource(dataList); JRDataSource jrDataSource = new JRBeanCollectionDataSource(dataList);
response.setContentType("application/pdf"); response.setContentType("application/pdf");
String fileName = client.getString("client_moniker") + "_" + parmerters.getString("dateRange").replaceAll("/", ""); String fileName = client.getString("client_moniker") + "_Cross_Border_" + parmerters.getString("dateRange").replaceAll("/", "");
response.setHeader("Content-Disposition", "attachment;fileName=" + fileName + ".pdf"); response.setHeader("Content-Disposition", "attachment;fileName=" + fileName + ".pdf");
OutputStream outs = response.getOutputStream(); OutputStream outs = response.getOutputStream();
JSONObject clientIncrement = clientIncrementalMapper.findByClinetIdAndChannel(client.getIntValue("client_id"), "RP跨境商城"); JSONObject clientIncrement = clientIncrementalMapper.findByClinetIdAndChannel(client.getIntValue("client_id"), "RP跨境商城");
@ -752,6 +786,84 @@ public class TradeLogServiceImpl implements TradeLogService {
} }
} }
@Override
public void exportUpayTransFlow(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception {
JSONObject transFlow = listPartnerTransFlowByExportPdf(query, partner,new String[]{"rpaypmt_card","rpaypmt_dd"});
JSONObject analysis = transFlow.getJSONObject("analysis");
JSONObject client = clientManager.getClientInfo(partner.getIntValue("client_id"));
if (!transFlow.getJSONArray("data").isEmpty()) {
try {
List<JSONObject> dataList = transFlow.getJSONArray("data").toJavaList(JSONObject.class);
JSONObject parmerters = new JSONObject();
parmerters.put("dateFrom", StringUtils.isNotBlank(query.getDatefrom())
? DateFormatUtils.format(DateUtils.parseDate(query.getDatefrom(), "yyyyMMdd"), "dd/MM/yyyy") : "");
parmerters.put("dateTo",
StringUtils.isNotBlank(query.getDateto())
? DateFormatUtils.format(DateUtils.parseDate(query.getDateto(), "yyyyMMdd"), "dd/MM/yyyy")
: DateFormatUtils.format(new Date(), "dd/MM/yyyy"));
parmerters.put("dateRange", (StringUtils.isNotBlank(parmerters.getString("dateFrom")) ? parmerters.getString("dateFrom") : "") + "~"
+ parmerters.getString("dateTo"));
parmerters.put("partnerCode", client.getString("client_moniker"));
parmerters.put("clientName", client.getString("company_name"));
parmerters.put("clientAddress", client.getString("address"));
parmerters.put("balance", analysis.getDoubleValue("balance"));
parmerters.put("logo", logo.getInputStream());
parmerters.put("actual_fee", takeDecimalOrDefault(analysis, "actual_fee", BigDecimal.ZERO));
parmerters.put("totalSettledAmount", takeDecimalOrDefault(analysis, "total_settle_amount", BigDecimal.ZERO));
parmerters.put("royalpay_charge", takeDecimalOrDefault(analysis, "total_royal_surcharge", BigDecimal.ZERO));
parmerters.put("total_fee", takeDecimalOrDefault(analysis, "total_surcharge", BigDecimal.ZERO));
parmerters.put("alipay_fee", takeDecimalOrDefault(analysis, "alipay_fee", BigDecimal.ZERO));
parmerters.put("wechat_fee", takeDecimalOrDefault(analysis, "wechat_fee", BigDecimal.ZERO));
parmerters.put("bestpay_fee", takeDecimalOrDefault(analysis, "bestpay_fee", BigDecimal.ZERO));
parmerters.put("jd_fee", takeDecimalOrDefault(analysis, "jd_fee", BigDecimal.ZERO));
parmerters.put("alipay_online_fee", takeDecimalOrDefault(analysis, "alipay_online_fee", BigDecimal.ZERO));
parmerters.put("gst", takeDecimalOrDefault(analysis, "tax_amount", BigDecimal.ZERO));
parmerters.put("royalpay_fee", takeDecimalOrDefault(analysis, "total_royalpay_fee", BigDecimal.ZERO));
parmerters.put("incremental_fee", takeDecimalOrDefault(analysis, "total_incremental_surcharge", BigDecimal.ZERO));
parmerters.put("incremental_gst", takeDecimalOrDefault(analysis, "total_incremental_tax", BigDecimal.ZERO));
parmerters.put("royalpay_gst", analysis.getBigDecimal("tax_amount").subtract(analysis.getBigDecimal("total_incremental_tax")).setScale(2,RoundingMode.HALF_UP));
parmerters.put("total_transaction_fee", analysis.getBigDecimal("total_transaction_fee").add(analysis.getBigDecimal("total_transaction_fee_tax")).setScale(2,RoundingMode.HALF_UP));
parmerters.put("total_royalpay_fee", analysis.getBigDecimal("total_surcharge").subtract(parmerters.getBigDecimal("total_transaction_fee")).setScale(2,RoundingMode.HALF_UP));
dataList.parallelStream().forEach(item -> {
BigDecimal incrementalSurcharge = item.containsKey("incremental_surcharge") ? item.getBigDecimal("incremental_surcharge") : BigDecimal.ZERO;
BigDecimal taxAmount = item.containsKey("tax_amount") ? item.getBigDecimal("tax_amount") : BigDecimal.ZERO;
BigDecimal royalpaySurhcarge = item.containsKey("royal_surcharge") ? item.getBigDecimal("royal_surcharge") : BigDecimal.ZERO;
BigDecimal surhcargeBack = item.containsKey("surcharge_cashback") ? item.getBigDecimal("surcharge_cashback") : BigDecimal.ZERO;
BigDecimal channelSurcharge = item.containsKey("channel_surcharge") ? item.getBigDecimal("channel_surcharge") : BigDecimal.ZERO;
BigDecimal incrementalTax = incrementalSurcharge.divide(new BigDecimal(10), 2, RoundingMode.HALF_UP);
BigDecimal transactionFee = item.getBigDecimal("transaction_fee");
BigDecimal transactionFeeTax = item.getBigDecimal("transaction_fee").divide(new BigDecimal(10), 2, RoundingMode.HALF_UP);
BigDecimal royalpayTax = taxAmount.subtract(incrementalTax).subtract(transactionFeeTax);
BigDecimal realRoyalpayCharge = item.getBigDecimal("total_surcharge").add(taxAmount).subtract(transactionFee).subtract(transactionFeeTax);
item.put("incremental_surcharge", incrementalSurcharge.add(incrementalTax).setScale(2, RoundingMode.HALF_UP));
item.put("total_surcharge_intax", realRoyalpayCharge.setScale(2, RoundingMode.HALF_UP));
item.put("transaction_fee_intax", transactionFee.add(transactionFeeTax).setScale(2,RoundingMode.HALF_UP));
scaleDecimalVal(item, "display_amount", item.getString("currency"));
String platformCurrency = PlatformEnvironment.getEnv().getForeignCurrency();
scaleDecimalVal(item, "clearing_amount", platformCurrency);
scaleDecimalVal(item, "settle_amount", platformCurrency);
scaleDecimalVal(item, "total_surcharge", platformCurrency);
});
JRDataSource jrDataSource = new JRBeanCollectionDataSource(dataList);
response.setContentType("application/pdf");
String fileName = client.getString("client_moniker") + "_Card_Payment_" + parmerters.getString("dateRange").replaceAll("/", "");
response.setHeader("Content-Disposition", "attachment;fileName=" + fileName + ".pdf");
OutputStream outs = response.getOutputStream();
// JSONObject clientIncrement = clientIncrementalMapper.findByClinetIdAndChannel(client.getIntValue("client_id"), "RP跨境商城");
// InputStream jasper = clientIncrement == null ? trans_flow.getInputStream() : incremental_trans_flow.getInputStream();
InputStream jasper = upay_trans_flow.getInputStream();
byte[] bytes = JasperRunManager.runReportToPdf(jasper, parmerters, jrDataSource);
outs.write(bytes, 0, bytes.length);
outs.flush();
outs.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}
@Override @Override
public void exportTransFlowApi(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception { public void exportTransFlowApi(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception {
query.setClearing_status(-1); query.setClearing_status(-1);

@ -39,6 +39,12 @@ public class TradeFlowController {
tradeLogService.exportTransFlow(query, partner, httpResponse); tradeLogService.exportTransFlow(query, partner, httpResponse);
} }
@PartnerMapping(value = "/report/upay_pdf", method = RequestMethod.GET)
@ReadOnlyConnection
public void exportUpayPDF(TradeLogQuery query, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, HttpServletResponse httpResponse) throws Exception {
tradeLogService.exportUpayTransFlow(query, partner, httpResponse);
}
@PartnerMapping(value = "/report/excel", method = RequestMethod.GET) @PartnerMapping(value = "/report/excel", method = RequestMethod.GET)
@ReadOnlyConnection @ReadOnlyConnection
public void exportExcel(TradeLogQuery query, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, HttpServletResponse httpResponse) throws Exception { public void exportExcel(TradeLogQuery query, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, HttpServletResponse httpResponse) throws Exception {

@ -73,3 +73,6 @@ spring:
preferred-json-mapper: fastjson preferred-json-mapper: fastjson
stockholder: stockholder:
mails: leo.huang@royalpay.com.au mails: leo.huang@royalpay.com.au
client_card:
account_reserve: 1000
annual_rate: 0

@ -17,7 +17,7 @@ app:
cms: cms:
host: http://127.0.0.1:9533 host: http://127.0.0.1:9533
customer: customer:
host: https://customer.royalpay.com.au/ host: http://192.168.0.33:9008/
foreign-currency: AUD foreign-currency: AUD
hanyin-secure: hanyin-secure:
pid: ROYALPAY pid: ROYALPAY
@ -26,10 +26,10 @@ app:
sftp-pwd: royalpay sftp-pwd: royalpay
sftp-username: royalpay sftp-username: royalpay
host: host:
main: http://192.168.0.8:9009/ main: http://192.168.0.33:9009/
regions: regions:
au: http://192.168.0.8:9009/ au: http://192.168.0.33:9009/
cn: http://192.168.0.8:9009/ cn: http://192.168.0.33:9009/
mail: mail:
appid: 1 appid: 1
host: https://mailsupport.royalpay.com.au host: https://mailsupport.royalpay.com.au
@ -156,8 +156,8 @@ settle:
- RPAY_SVC_DIRECTDEBIT - RPAY_SVC_DIRECTDEBIT
spring: spring:
mail: mail:
host: smtp.office365.com host: ''
port: 587 port: ''
profiles: profiles:
active: dev,alipay,bestpay,jd,wechat,rpay,yeepay,rppaysvc,common active: dev,alipay,bestpay,jd,wechat,rpay,yeepay,rppaysvc,common
redis: redis:
@ -166,6 +166,12 @@ spring:
port: 6379 port: 6379
thymeleaf: thymeleaf:
mode: HTML mode: HTML
logging:
level:
au:
com:
royalpay:
payment: debug

@ -576,9 +576,11 @@
(SELECT min(r.rate_value) FROM sys_client_rates r WHERE r.client_id = t.client_id (SELECT min(r.rate_value) FROM sys_client_rates r WHERE r.client_id = t.client_id
AND date(r.expiry_time) >= DATE(t.clearing_time) AND date(r.expiry_time) >= DATE(t.clearing_time)
AND date(r.active_time) &lt;= DATE(t.clearing_time)) rate, AND date(r.active_time) &lt;= DATE(t.clearing_time)) rate,
t.clearing_order clear_detail_id t.clearing_order clear_detail_id,
lc.balance_group
FROM pmt_transactions t FROM pmt_transactions t
left join log_clearing_detail cd on cd.clear_detail_id=t.clearing_order left join log_clearing_detail cd on cd.clear_detail_id=t.clearing_order
left join log_clearing lc on cd.clearing_id = lc.clearing_id
left join sys_clients sc on t.client_id = sc.client_id left join sys_clients sc on t.client_id = sc.client_id
WHERE t.channel='Settlement' WHERE t.channel='Settlement'
@ -938,6 +940,7 @@
t.transaction_time, t.transaction_time,
if(t.transaction_type = 'Credit', t.clearing_amount, -t.clearing_amount) clearing_amount, if(t.transaction_type = 'Credit', t.clearing_amount, -t.clearing_amount) clearing_amount,
if(t.transaction_type = 'Credit', t.total_surcharge, -t.total_surcharge) total_surcharge, if(t.transaction_type = 'Credit', t.total_surcharge, -t.total_surcharge) total_surcharge,
if(t.transaction_type = 'Credit', t.transaction_fee, -t.transaction_fee) transaction_fee,
if(t.transaction_type = 'Credit', t.channel_surcharge, -t.channel_surcharge) channel_surcharge, if(t.transaction_type = 'Credit', t.channel_surcharge, -t.channel_surcharge) channel_surcharge,
if(t.transaction_type = 'Credit', t.settle_amount, -t.settle_amount) settle_amount, if(t.transaction_type = 'Credit', t.settle_amount, -t.settle_amount) settle_amount,
t.order_id, t.order_id,
@ -965,12 +968,13 @@
t.transaction_time, t.transaction_time,
if(t.transaction_type = 'Credit', t.clearing_amount, -t.clearing_amount) clearing_amount, if(t.transaction_type = 'Credit', t.clearing_amount, -t.clearing_amount) clearing_amount,
if(t.transaction_type = 'Credit', t.total_surcharge, -t.total_surcharge) total_surcharge, if(t.transaction_type = 'Credit', t.total_surcharge, -t.total_surcharge) total_surcharge,
if(t.transaction_type = 'Credit', t.transaction_fee, -t.transaction_fee) transaction_fee,
if(t.transaction_type = 'Credit', t.channel_surcharge, -t.channel_surcharge) channel_surcharge, if(t.transaction_type = 'Credit', t.channel_surcharge, -t.channel_surcharge) channel_surcharge,
if(t.transaction_type = 'Credit', t.settle_amount, -t.settle_amount) settle_amount, if(t.transaction_type = 'Credit', t.settle_amount, -t.settle_amount) settle_amount,
t.order_id, t.order_id,
t.org_rate, t.org_rate,
t.surcharge_cashback, t.surcharge_cashback,
o.customer_surcharge o.customer_surcharge,
from pmt_transactions t from pmt_transactions t
LEFT JOIN pmt_orders o on o.order_id = t.order_id LEFT JOIN pmt_orders o on o.order_id = t.order_id
INNER JOIN sys_org so ON t.org_id = so.org_id AND so.is_valid = 1 INNER JOIN sys_org so ON t.org_id = so.org_id AND so.is_valid = 1

@ -19,6 +19,14 @@
and file_name = 'source_agree_file' and file_name = 'source_agree_file'
order by last_update_date desc limit 1 order by last_update_date desc limit 1
</select> </select>
<select id="getSourceCardAgreeFilesByClientId" resultType="com.alibaba.fastjson.JSONObject">
select * from sys_files
where client_id = #{client_id}
and file_name = #{file_name}
order by last_update_date desc limit 1
</select>
<select id="deleteAggreeByClientId" resultType="com.alibaba.fastjson.JSONObject"> <select id="deleteAggreeByClientId" resultType="com.alibaba.fastjson.JSONObject">
update sys_files set is_valid = 0 update sys_files set is_valid = 0
where client_id = #{client_id} where client_id = #{client_id}

@ -38,11 +38,19 @@
order by display_name order by display_name
</select> </select>
<select id="listPartners" resultType="com.alibaba.fastjson.JSONObject"> <select id="listPartners" resultType="com.alibaba.fastjson.JSONObject">
SELECT DISTINCT c.*,o.name org_name SELECT DISTINCT c.*,o.name org_name,
scup.upay_open_status,
scup.upay_approve_result,
scup.upay_approve_time,
scup.upay_refuse_remark,
scup.upay_approve_email_send,
scup.upay_approve_email_id,
cc.enable_cross_payment,
cc.enable_card_payment
FROM sys_clients c FROM sys_clients c
inner join sys_client_config cc on cc.client_id = c.client_id inner join sys_client_config cc on cc.client_id = c.client_id
inner join sys_org o inner join sys_org o on o.org_id=c.org_id
on o.org_id=c.org_id left join sys_client_upay_profile scup on scup.client_id = c.client_id
<if test="bd_user!=null"> <if test="bd_user!=null">
INNER JOIN sys_client_bd d ON c.client_id = d.client_id AND d.bd_id = #{bd_user} and INNER JOIN sys_client_bd d ON c.client_id = d.client_id AND d.bd_id = #{bd_user} and
date(d.start_date)&lt;= date(now()) and (d.end_date is null or date(d.end_date)&gt;= date(now())) and date(d.start_date)&lt;= date(now()) and (d.end_date is null or date(d.end_date)&gt;= date(now())) and
@ -133,6 +141,24 @@
c.open_status=1 or c.open_status=2 or c.open_status=4) c.open_status=1 or c.open_status=2 or c.open_status=4)
</if> </if>
<if test="card_approving and approving">
OR (c.client_id NOT IN (
SELECT client_id FROM sys_client_upay_profile
)
OR c.client_id IN (
SELECT client_id FROM sys_client_upay_profile AS cardFlow
WHERE cardFlow.upay_approve_result = 4 or upay_approve_result = 1
))
</if>
<if test="card_approving">
AND (c.client_id NOT IN (
SELECT client_id FROM sys_client_upay_profile
)
OR c.client_id IN (
SELECT client_id FROM sys_client_upay_profile AS cardFlow
WHERE cardFlow.upay_approve_result = 4 or upay_approve_result = 1
))
</if>
<if test="quickPass"> <if test="quickPass">
and c.source=4 and c.source=4
</if> </if>

@ -177,6 +177,16 @@
limit 1 limit 1
</select> </select>
<select id="latestCardChannelCleanDays" resultType="com.alibaba.fastjson.JSONObject">
SELECT cr.*,c.clean_days c_clean_days FROM sys_client_rates cr
INNER JOIN sys_clients c on c.client_id= cr.client_id and c.is_valid = 1
INNER JOIN sys_client_upay_profile cf ON cf.client_id = c.client_id AND ( cf.upay_approve_result = 4 AND cf.upay_open_status NOT IN (0,5) )
where cr.client_id = #{client_id}
and cr.rate_name = #{rate_name}
order by cr.expiry_time desc
limit 1
</select>
<select id="latestExpiryConfig" resultType="com.alibaba.fastjson.JSONObject"> <select id="latestExpiryConfig" resultType="com.alibaba.fastjson.JSONObject">
SELECT * FROM SELECT * FROM
sys_client_rates sys_client_rates

@ -53,6 +53,16 @@
<img src="/static/images/rpayplus_sign_lg.png" class="channel-icon-lg"> <img src="/static/images/rpayplus_sign_lg.png" class="channel-icon-lg">
</a> </a>
</li> </li>
<li ng-class="{active:ctrl.channel=='rpaypmt_card'}" ng-if="report.channels.rpaypmt_card">
<a role="button" ng-click="ctrl.channel='rpaypmt_card';channelAndDayOfAnalysis()" title="rpaypmt_card">
<img src="/static/images/card_payment_sign_lg.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='rpaypmt_dd'}" ng-if="report.channels.rpaypmt_dd">
<a role="button" ng-click="ctrl.channel='rpaypmt_dd';channelAndDayOfAnalysis()" title="rpaypmt_dd">
<img src="/static/images/direct_debit_sign_lg.png" class="channel-icon-lg">
</a>
</li>
</ul> </ul>
</div> </div>
</div> </div>

@ -13,6 +13,7 @@ define(['./app',
'./services/yeepayIndustryMap', './services/yeepayIndustryMap',
'./services/stateMap', './services/stateMap',
'./services/industryMap', './services/industryMap',
'./services/upayIndustryMap',
'./services/wechatGoodMcc', './services/wechatGoodMcc',
'./services/sectorMap', './services/sectorMap',
'./services/countryMap', './services/countryMap',

@ -19,6 +19,21 @@ define(['../app','decimal'], function (app,Decimal) {
size: 'lg' size: 'lg'
}) })
} }
function openDetailOfUpaySettle(url, is_partner, client_id, detailId) {
$uibModal.open({
templateUrl: '/static/payment/tradelog/templates/partner_settlement_upay_settle_dialog.html',
controller: 'clearingDetailOfUpaySettleCtrl',
resolve: {
detail: ['$http', function ($http) {
return $http.get(url);
}],
is_partner: is_partner,
client_id: client_id,
detailId: detailId
},
size: 'lg'
})
}
function openDetailOfMergeSettle(url,client_id) { function openDetailOfMergeSettle(url,client_id) {
$uibModal.open({ $uibModal.open({
templateUrl: '/static/payment/tradelog/templates/partner_settlement_merge_settle_dialog.html', templateUrl: '/static/payment/tradelog/templates/partner_settlement_merge_settle_dialog.html',
@ -37,6 +52,9 @@ define(['../app','decimal'], function (app,Decimal) {
clientClearingDetail: function (client_id, detailId, is_partner) { clientClearingDetail: function (client_id, detailId, is_partner) {
openDetail('/client/clean_logs/' + client_id + '/settlement_logs/' + detailId, is_partner,client_id,detailId); openDetail('/client/clean_logs/' + client_id + '/settlement_logs/' + detailId, is_partner,client_id,detailId);
}, },
clientClearingDetailOfUpaySettle: function (client_id, detailId, is_partner) {
openDetailOfUpaySettle('/client/clean_logs/' + client_id + '/settlement_logs/' + detailId, is_partner,client_id,detailId);
},
clientClearingDetailOfMergeSettle: function (client_id, reportDate) { clientClearingDetailOfMergeSettle: function (client_id, reportDate) {
openDetailOfMergeSettle('/client/clean_logs/' + client_id + '/settlement_logs/report_date/' + reportDate, client_id); openDetailOfMergeSettle('/client/clean_logs/' + client_id + '/settlement_logs/report_date/' + reportDate, client_id);
} }
@ -55,6 +73,18 @@ define(['../app','decimal'], function (app,Decimal) {
} }
$scope.channelAndDayOfAnalysis(); $scope.channelAndDayOfAnalysis();
}]); }]);
app.controller('clearingDetailOfUpaySettleCtrl', ['$scope', 'detail', 'is_partner','client_id','detailId','$http', function ($scope, detail, is_partner,client_id,detailId,$http) {
$scope.ctrl = {channel: null,day:null};
$scope.report = detail.data;
$scope.is_partner = is_partner;
$scope.channelAndDayOfAnalysis = function () {
$http.get('/client/clean_logs/' + client_id + '/settlement_logs/' + detailId+'/analysis/'+$scope.ctrl.channel).then(function (resp) {
$scope.channelAndDayMap = resp.data;
$scope.index = 0;
})
}
$scope.channelAndDayOfAnalysis();
}]);
app.controller('clearingDetailOfMergeSettleCtrl', ['$scope', 'detail','client_id','$http', function ($scope, detail,client_id,$http) { app.controller('clearingDetailOfMergeSettleCtrl', ['$scope', 'detail','client_id','$http', function ($scope, detail,client_id,$http) {
$scope.ctrl = {channel: null,day:null}; $scope.ctrl = {channel: null,day:null};
$scope.report = detail.data; $scope.report = detail.data;

@ -0,0 +1,81 @@
define(['../app'], function (app) {
'use strict';
var upayIndustry = [
{
"label": "Professional Services",
"value": "Professional Services"
},
{
"label": "Mail/Telephone Order",
"value": "Mail/Telephone Order"
},
{
"label": "Business Services",
"value": "Business Services"
},
{
"label": "Retail Store",
"value": "Retail Store"
},
{
"label": "Airline Services",
"value": "Airline Services"
},
{
"label": "Entertainment",
"value": "Entertainment"
},
{
"label": "Automobiles",
"value": "Automobiles"
},
{
"label": "Clothing",
"value": "Clothing"
},
{
"label": "Contracted Services",
"value": "Contracted Services"
},
{
"label": "Government",
"value": "Government"
},
{
"label": "Hotel",
"value": "Hotel"
},
{
"label": "Personal Services",
"value": "Personal Services"
},
{
"label": "Repair Services",
"value": "Repair Services"
},
{
"label": "Transportation",
"value": "Transportation"
},
{
"label": "Utilities",
"value": "Utilities"
},
{
"label": "Wholesale",
"value": "Wholesale"
},
{
"label": "Other",
"value": "Other"
}
];
app.factory('upayIndustryMap', function () {
return {
configs: function () {
return upayIndustry;
}
}
});
});

@ -0,0 +1,19 @@
<div class="modal-header bg-green">
<h4 style="text-align: center">制作PPromotional Offer合同</h4>
</div>
<div class="modal-body" style="padding: 30px">
<div class="row">
<div class="col-xs-12">
<lable>请选择优惠生效日:</lable>
<input placeholder="From" uib-datepicker-popup is-open="ctrl.from" ng-click="ctrl.from=true" id="promotiona_date" ng-model="" datepicker-options="{maxDate:filter.to}">
</div>
<div class="col-xs-12">
<lable>请输入活动周期:</lable>
<input id="promotiona_period" ng-model="">
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-success" type="button" ng-click="readNotice()" ng-if="!previewStatus && notice.status=='0'">I Know</button>
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Close</button>
</div>

@ -0,0 +1,908 @@
/**
* Created by yixian on 2016-06-29.
*/
define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiSelect'], function (angular, Decimal) {
'use strict';
var removeClientPayDesc = function (items, key) {
for (var i = 0; i < items.length; i++) {
var item = items[i];
if (item.indexOf(key) >= 0) {
items.splice(items.indexOf(item), 1);
i = i - 1;
}
}
};
var app = angular.module('addPartnerApp', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch', 'ui.select', 'ngFileUpload']);
app.config(['$stateProvider', function ($stateProvider) {
$stateProvider.state('newPartners', {
url: '/partners/new',
templateUrl: '/static/payment/partner/templates/add_partner.html',
controller: 'addPartnerCtrl'
}).state('partners.edit', {
url: '/{clientMoniker}/edit',
params: {"commitCardPayment": false, commitCrossBorderPayment: false},
templateUrl: '/static/payment/partner/templates/partner_edit.html',
controller: 'partnerEditCtrl',
resolve: {
partner: ['$http', '$stateParams', function ($http, $stateParams) {
return $http.get('/sys/partners/' + $stateParams.clientMoniker);
}]
}
})
}]);
app.controller('addPartnerCtrl', ['$rootScope', '$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'businessStructuresMap', 'upayIndustryMap', 'industryMap', 'stateMap', 'sectorMap', 'countryMap', function ($rootScope, $scope, $http, $state, Upload, commonDialog, timezone, businessStructuresMap, upayIndustryMap, industryMap, stateMap, sectorMap, countryMap) {
if ($scope.partner_application) {
$scope.partner = angular.copy($scope.partner_application);
delete $rootScope.partner_application;
} else {
$scope.partner = {timezone: 'Australia/Melbourne'};
}
$scope.partner.enable_cross_payment = false;
$scope.partner.enable_cross_payment = false;
$scope.initMerchantCode = function () {
$http.get('/sys/partners/init/merchant_code').then(function (response) {
$scope.partner.client_moniker = response.data.partner_code;
$scope.merchantCodeChecked = true;
$scope.merchantIsValid = true;
});
};
$scope.enablePaymentType = function (type) {
$scope.partner[type] = !$scope.partner[type];
};
$scope.enablePaymentType('enable_cross_payment');
$scope.initMerchantCode();
$scope.partner.company_phone_c = 61;
$scope.partner.contact_phone_c = 61;
$scope.partner.client_pay_type = [];
$scope.partner.client_pay_desc = [];
var resetClientPayDescByTpey = function (type) {
type = parseInt(type);
if (type == 1) {
removeClientPayDesc($scope.partner.client_pay_desc, '10');
}
if (type == 2) {
removeClientPayDesc($scope.partner.client_pay_desc, '20');
}
};
$scope.partner.sameAsContactPerson = false;
$scope.checkboxOnclick = function (){
$scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson);
if($scope.partner.sameAsContactPerson) {
$scope.partner.legal_representative_person = $scope.partner.contact_person;
$scope.partner.legal_representative_phone_a = $scope.partner.contact_phone_a;
$scope.partner.legal_representative_phone_c = $scope.partner.contact_phone_c;
$scope.partner.legal_representative_phone_p = $scope.partner.contact_phone_p;
$scope.partner.legal_representative_email = $scope.partner.contact_email;
$scope.partner.legal_representative_job = $scope.partner.contact_job;
$scope.partner.legal_representative_wechatid = $scope.partner.contact_wechatid;
}
}
$scope.partner.marketingSameAsContact = false;
$scope.checkMarketingSameAsContact = function (){
$scope.partner.marketingSameAsContact = !($scope.partner.marketingSameAsContact);
if($scope.partner.marketingSameAsContact) {
$scope.partner.marketing_person = $scope.partner.contact_person;
$scope.partner.marketing_phone_a = $scope.partner.contact_phone_a;
$scope.partner.marketing_phone_c = $scope.partner.contact_phone_c;
$scope.partner.marketing_phone_p = $scope.partner.contact_phone_p;
$scope.partner.marketing_email = $scope.partner.contact_email;
$scope.partner.marketing_job = $scope.partner.contact_job;
$scope.partner.marketing_wechatid = $scope.partner.contact_wechatid;
}
}
$scope.partner.sameAsAddress=false;
$scope.sameAddress = function (){
$scope.partner.sameAsAddress = !($scope.partner.sameAsAddress);
if($scope.partner.sameAsAddress) {
$scope.partner.registered_address = $scope.partner.address;
$scope.partner.registered_suburb = $scope.partner.suburb;
$scope.partner.registered_postcode = $scope.partner.postcode;
$scope.partner.registered_state = $scope.partner.state;
}
}
var compare = function (x, y) {
x = parseInt(x);
y = parseInt(y);
if (x < y) {
return -1;
} else if (x > y) {
return 1;
} else {
return 0;
}
}
$scope.toggleClientPayType = function (type) {
if ($scope.partner.client_pay_type == null || $scope.partner.client_pay_type == undefined) {
$scope.partner.client_pay_type = [];
}
var $idx = $scope.partner.client_pay_type.indexOf(type);
if ($idx >= 0) {
$scope.partner.client_pay_type.splice($idx, 1);
resetClientPayDescByTpey(type);
} else {
$scope.partner.client_pay_type.push(type);
$scope.partner.client_pay_type.sort(compare);
}
};
$scope.toggleClientPayDesc = function (type) {
if ($scope.partner.client_pay_desc == null || $scope.partner.client_pay_desc == undefined) {
$scope.partner.client_pay_desc = [];
}
var $idx = $scope.partner.client_pay_desc.indexOf(type);
if ($idx >= 0) {
if (type == '203') {
removeClientPayDesc($scope.partner.client_pay_desc, '2030')
}
$scope.partner.client_pay_desc.splice($idx, 1);
} else {
$scope.partner.client_pay_desc.push(type);
$scope.partner.client_pay_desc.sort(compare);
}
};
$scope.pagination = {};
$scope.industries = industryMap.configs();
$scope.upayIndustrys = upayIndustryMap.configs();
$scope.states = stateMap.configs();
$scope.countries = countryMap.configs();
$scope.sectors = sectorMap.configs();
$scope.business_structures = businessStructuresMap.configs();
$scope.params = {textType: 'all', org_name: 'ALL'};
$scope.merchantIsValid = false;
$scope.merchantCodeChecked = false;
function remove(arr, val) {
if (angular.isArray(arr)) {
for (var i = arr.length; i--;) {
if (arr[i].value == val) {
arr.splice(i, 1);
break;
}
}
}
return arr;
}
var industries = angular.copy($scope.industries);
$scope.industries = remove(industries, 331);
$scope.listReferrers = function () {
$http.get('/sys/orgs/referrer').then(function (resp) {
$scope.referrers = resp.data;
})
};
$scope.listReferrers();
$scope.loadAlipayCategory = function () {
$http.get('/static/data/alipayMcc.json').then(function (resp) {
$scope.alipayMccCategory = resp.data;
})
};
$scope.loadAlipayCategory();
$scope.loadJDindustry = function () {
$http.get('/static/data/jdindustry.json').then(function (resp) {
$scope.jdindustry = resp.data;
})
};
$scope.loadJDindustry();
$scope.loadLakalaPayindustry = function () {
$http.get('/static/data/lakalapayindustry.json').then(function (resp) {
$scope.lakalapayindustry = resp.data;
})
};
$scope.loadLakalaPayindustry();
$scope.loadLakalaPaySettle = function () {
$http.get('/static/data/lakalapaysettle.json').then(function (resp) {
$scope.lakalapaysettle = resp.data;
})
};
$scope.loadLakalaPaySettle();
$scope.loadLakalaPayGoods = function () {
$http.get('/static/data/lakalapaygoods.json').then(function (resp) {
$scope.lakalapaygoods = resp.data;
})
};
$scope.loadLakalaPayGoods();
$scope.loadRoyalpayindustry = function () {
$http.get('/static/data/royalpayindustry.json').then(function (resp) {
$scope.royalpayindustry = resp.data;
})
};
$scope.loadRoyalpayindustry();
$scope.loadHfindustry = function () {
$http.get('/static/data/hfindustry.json').then(function (resp) {
$scope.hfindustry = resp.data;
})
};
$scope.loadHfindustry();
$scope.onAlipayMccSelect = function (selectedItem) {
$scope.partner.alipay_category = selectedItem.label;
$scope.partner.alipayindustry = selectedItem.mccCode;
};
$scope.onRoyalPayIndustrySelect = function (selectedItem) {
$scope.partner.royalpay_label = selectedItem.label;
$scope.partner.royalpayindustry = selectedItem.mccCode;
};
$scope.onHfIndustrySelect = function (selectedItem) {
$scope.partner.hf_label = selectedItem.label;
$scope.partner.hfindustry = selectedItem.mccCode;
};
// $scope.t2city_map = angular.copy(t2city_map);
$scope.timezones = timezone.configs();
$scope.checkMerchantCodeIsValid = function (code) {
if (code.length != 4) {
$scope.merchantCodeChecked = false;
$scope.merchantIsValid = false;
return;
}
$http.get('/sys/partners/init/check_code_isvalid', {params: {clientMoniker: code}}).then(function (response) {
$scope.merchantIsValid = response.data;
$scope.merchantCodeChecked = true;
});
};
$scope.save = function (form) {
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
item.$dirty = true;
}
});
return;
}
if (!$scope.partner.enable_cross_payment && !$scope.partner.enable_card_payment) {
alert("商户至少开通一种支付方式,请检查是否选择了跨境支付或卡支付!");
return;
}
if ($scope.partner.company_name.indexOf("Migration") != -1) {
alert("Company Name包含敏感词汇请检查后重新提交");
return;
}
if ($scope.partner.company_phone_a && ('' + $scope.partner.company_phone_a != '')) {
if ($scope.partner.company_phone_a.indexOf('0') == 0) {
alert("Please remove the first character '0' of area code");
return;
}
}
if ($scope.partner.contact_phone && ('' + $scope.partner.contact_phone != '')) {
if ($scope.partner.contact_phone.indexOf('0') == 0) {
alert("Please remove the first character '0' of area code");
return;
}
}
$scope.partner.company_phone = '+' + $scope.partner.company_phone_c + ($scope.partner.company_phone_a || '') + $scope.partner.company_phone_p;
$scope.partner.contact_phone = '+' + $scope.partner.contact_phone_c + ($scope.partner.contact_phone_a || '') + $scope.partner.contact_phone_p;
$scope.partner.legal_representative_phone = '+' + $scope.partner.legal_representative_phone_c + ( $scope.partner.legal_representative_phone_a || '') + $scope.partner.legal_representative_phone_p;
$scope.partner.marketing_phone = '+' + $scope.partner.marketing_phone_c + ( $scope.partner.marketing_phone_a || '') + $scope.partner.marketing_phone_p;
if ($scope.partner.company_phone.indexOf(' ') != -1) {
alert('Company Phone can not contain space character');
return;
}
if ($scope.partner.contact_phone.indexOf(' ') != -1) {
alert('Contact Phone can not contain space character');
return;
}
if ($scope.partner.legal_representative_phone.indexOf(' ') != -1) {
alert('Representative phone can not contain space character');
return;
}
if ($scope.partner.marketing_phone.indexOf(' ') != -1) {
alert('Marketing phone can not contain space character');
return;
}
if ($scope.partner.contact_email.indexOf(' ') != -1) {
alert('Contact email Phone can not contain space character');
return;
}
if ($scope.partner.legal_representative_email.indexOf(' ') != -1) {
alert('Representative email Phone can not contain space character');
return;
}
if ($scope.partner.marketing_email && $scope.partner.marketing_email.indexOf(' ') != -1) {
alert('Marketing email Phone can not contain space character');
return;
}
if ($scope.partner.suburb.indexOf(' ') != -1) {
alert('suburb can not contain two and more continuous space characters');
return;
}
if ($scope.partner.registered_suburb.indexOf(' ') != -1) {
alert('Registered suburb can not contain two and more continuous space characters');
return;
}
if ($scope.partner.acn && $scope.partner.business_structure == 'Company') {
if ($scope.partner.acn.length != 9) {
alert('Acn is not valid');
return;
}
}
if (!$scope.partner.logo_url) {
alert("Logo is necessary!");
return;
}
if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
if (!$scope.partner.company_photo) {
alert('Shop Photo1 is necessary');
return;
}
if (!$scope.partner.store_photo) {
alert('Shop Photo2 is necessary');
return;
}
}
if ($scope.partner.referrer_id) {
$scope.referrers.forEach(function (e) {
if ($scope.partner.referrer_id == e.org_id) {
$scope.partner.referrer_name = e.name;
return;
}
})
}
if ($scope.partner.client_pay_type.length == 0) {
alert('请选择商户支付场景')
return;
}
if ($scope.partner.client_pay_desc.length == 0) {
alert('请选择商户支付方式')
return;
}
if (typeof ($scope.partner.client_pay_type) == 'string' || typeof ($scope.partner.client_pay_desc) == 'string') {
$scope.partner.client_pay_type = $scope.partner.client_pay_type.split(",");
$scope.partner.client_pay_desc = $scope.partner.client_pay_desc.split(",");
}
if ($scope.partner.client_pay_type.indexOf('1') >= 0) {
if ($scope.partner.client_pay_desc.join(',').indexOf('10') < 0) {
alert("请检查线上支付场景是否已选择支付方式");
return;
}
}
if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
if ($scope.partner.client_pay_desc.join(',').indexOf('20') < 0) {
alert("请检查线下支付场景是否已选择支付方式");
return;
}
}
if ($scope.partner.client_pay_desc.join(',').indexOf('203') >= 0) {
if ($scope.partner.client_pay_desc.join(',').indexOf('2030') < 0 && $scope.partner.client_pay_desc.join(',').indexOf('20399') < 0) {
alert("请检查线下支付是否已选择收银系统类型");
return;
}
}
$scope.partner.client_pay_type = $scope.partner.client_pay_type.join(',');
$scope.partner.client_pay_desc = $scope.partner.client_pay_desc.join(',');
$http.post('/sys/partners', $scope.partner).then(function (resp) {
commonDialog.alert({title: 'Success', content: 'Register new partner successfully', type: 'success'});
$scope.updateMerchantLocation();
// $scope.loadPartners();
$state.go('partners.detail', {clientMoniker: resp.data.client_moniker})
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
});
};
$scope.uploadLogo = function (file) {
if (file != null) {
if (file.size > 1 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过1MB请压缩后重试', type: 'error'})
} else {
$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) {
if (file.size > 2 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB请压缩后重试', type: 'error'})
} else {
$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) {
if (file.size > 2 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB请压缩后重试', type: 'error'})
} else {
$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.updateMerchantLocation = function () {
var params = window.frames['merchant_detail'].merchant_location;
if (params) {
$http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () {
});
}
}
}]);
app.controller('partnerEditCtrl', ['$scope', '$http', '$state', 'Upload', 'commonDialog', 'timezone', 'partner','upayIndustryMap',
function ($scope, $http, $state, Upload, commonDialog, timezone, partner,upayIndustryMap) {
$scope.upayIndustrys = upayIndustryMap.configs();
$scope.timezones = timezone.configs();
$scope.partner = partner.data;
if (!$scope.partner.client_type) {
$scope.partner.client_type = 'cross-border';
}
if($scope.partner.representativeInfo != null)
{
$scope.partner.registered_address = $scope.partner.representativeInfo.address;
$scope.partner.registered_suburb = $scope.partner.representativeInfo.suburb;
$scope.partner.registered_postcode = $scope.partner.representativeInfo.postcode;
$scope.partner.registered_state = $scope.partner.representativeInfo.state;
$scope.partner.legal_representative_person = $scope.partner.representativeInfo.representative_person;
$scope.partner.legal_representative_phone = $scope.partner.representativeInfo.phone;
$scope.partner.legal_representative_email = $scope.partner.representativeInfo.email;
$scope.partner.legal_representative_job = $scope.partner.representativeInfo.job_title;
$scope.partner.marketing_person = $scope.partner.representativeInfo.marketing_person;
$scope.partner.marketing_phone = $scope.partner.representativeInfo.marketing_phone;
$scope.partner.marketing_email = $scope.partner.representativeInfo.marketing_email;
$scope.partner.marketing_job = $scope.partner.representativeInfo.marketing_job_title;
$scope.partner.legal_representative_wechatid = $scope.partner.representativeInfo.legal_representative_wechatid;
$scope.partner.marketing_wechatid = $scope.partner.representativeInfo.marketing_wechatid;
}
$scope.enablePaymentType = function (type) {
$scope.partner[type] = !$scope.partner[type];
};
if ($state.params.commitCardPayment) {
$scope.enablePaymentType('enable_card_payment');
}
if ($state.params.commitCrossBorderPayment) {
$scope.enablePaymentType('enable_cross_payment');
}
function hasRole() {
var rolenum;
switch (sessionStorage.getItem('role')) {
case "administrator":
rolenum = 1;
break;
case "bduser":
rolenum = 4;
break;
case "salesmanager":
rolenum = 8192;
break;
case "accountant":
rolenum = 8;
break;
case "sitemanager":
rolenum = 128;
break;
case "director":
rolenum = 64;
break;
case "developer":
rolenum = 256;
break;
case "compliance":
rolenum = 2;
break;
case "guest":
rolenum = 2048;
break;
case "orgmanager":
rolenum = 4096;
break;
case "riskmanager":
rolenum = 1024;
break;
default:
break;
}
if ((window.currentUser.role & rolenum) >0) {
return true;
}else {
sessionStorage.removeItem('role');
return false;
}
}
if (hasRole()) {
$scope.role = sessionStorage.getItem('role');
}
var origin_referrer_id = angular.copy($scope.partner.referrer_id);
var resetClientPayDescByTpey = function (type) {
type = parseInt(type);
if (type == 1) {
removeClientPayDesc($scope.partner.client_pay_desc, '10');
}
if (type == 2) {
removeClientPayDesc($scope.partner.client_pay_desc, '20');
}
};
var compare = function (x, y) {
x = parseInt(x);
y = parseInt(y);
if (x < y) {
return -1;
} else if (x > y) {
return 1;
} else {
return 0;
}
}
$scope.toggleClientPayType = function (type) {
if (!$scope.partner.client_pay_type) {
$scope.partner.client_pay_type = [];
}
var $idx = $scope.partner.client_pay_type.indexOf(type);
if ($idx >= 0) {
$scope.partner.client_pay_type.splice($idx, 1);
resetClientPayDescByTpey(type);
} else {
$scope.partner.client_pay_type.push(type);
$scope.partner.client_pay_type.sort(compare);
}
};
$scope.toggleClientPayDesc = function (type) {
if (!$scope.partner.client_pay_desc) {
$scope.partner.client_pay_desc = [];
}
var $idx = $scope.partner.client_pay_desc.indexOf(type);
if ($idx >= 0) {
if (type == '203') {
removeClientPayDesc($scope.partner.client_pay_desc, '2030')
}
$scope.partner.client_pay_desc.splice($idx, 1);
} else {
$scope.partner.client_pay_desc.push(type);
$scope.partner.client_pay_desc.sort(compare);
}
};
$scope.partner.sameAsContactPerson = false;
$scope.checkboxOnclick = function (){
$scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson);
if($scope.partner.sameAsContactPerson) {
$scope.partner.legal_representative_person = $scope.partner.contact_person;
$scope.partner.legal_representative_phone = $scope.partner.contact_phone;
$scope.partner.legal_representative_email = $scope.partner.contact_email;
$scope.partner.legal_representative_job = $scope.partner.contact_job;
$scope.partner.legal_representative_wechatid = $scope.partner.contact_wechatid;
}
}
$scope.partner.marketingSameAsContact = false;
$scope.checkMarketingSameAsContact = function (){
$scope.partner.marketingSameAsContact = !($scope.partner.marketingSameAsContact);
if($scope.partner.marketingSameAsContact) {
$scope.partner.marketing_person = $scope.partner.contact_person;
$scope.partner.marketing_phone = $scope.partner.contact_phone;
$scope.partner.marketing_email = $scope.partner.contact_email;
$scope.partner.marketing_job = $scope.partner.contact_job;
$scope.partner.marketing_wechatid = $scope.partner.contact_wechatid;
}
}
$scope.partner.sameAsAddress=false;
$scope.sameAddress = function (){
$scope.partner.sameAsAddress=!($scope.partner.sameAsAddress);
if($scope.partner.sameAsAddress) {
$scope.partner.registered_address = $scope.partner.address;
$scope.partner.registered_suburb = $scope.partner.suburb;
$scope.partner.registered_postcode = $scope.partner.postcode;
$scope.partner.registered_state = $scope.partner.state;
}
}
$scope.listReferrers = function () {
$http.get('/sys/orgs/referrer').then(function (resp) {
$scope.referrers = resp.data;
})
};
$scope.listReferrers();
$scope.loadAlipayCategory = function () {
$http.get('/static/data/alipayMcc.json').then(function (resp) {
$scope.alipayMccCategory = resp.data;
})
};
$scope.loadAlipayCategory();
$scope.loadJDindustry = function () {
$http.get('/static/data/jdindustry.json').then(function (resp) {
$scope.jdindustry = resp.data;
})
};
$scope.loadJDindustry();
$scope.loadLakalaPayindustry = function () {
$http.get('/static/data/lakalapayindustry.json').then(function (resp) {
$scope.lakalapayindustry = resp.data;
})
};
$scope.loadLakalaPayindustry();
$scope.loadLakalaPaySettle = function () {
$http.get('/static/data/lakalapaysettle.json').then(function (resp) {
$scope.lakalapaysettle = resp.data;
})
};
$scope.loadLakalaPaySettle();
$scope.loadLakalaPayGoods = function () {
$http.get('/static/data/lakalapaygoods.json').then(function (resp) {
$scope.lakalapaygoods = resp.data;
})
};
$scope.loadLakalaPayGoods();
$scope.loadRoyalpayindustry = function () {
$http.get('/static/data/royalpayindustry.json').then(function (resp) {
$scope.royalpayindustry = resp.data;
})
};
$scope.loadRoyalpayindustry();
$scope.loadHfindustry = function () {
$http.get('/static/data/hfindustry.json').then(function (resp) {
$scope.hfindustry = resp.data;
})
};
$scope.loadHfindustry();
$scope.onAlipayMccSelect = function (selectedItem) {
$scope.partner.alipay_category = selectedItem.label;
$scope.partner.alipayindustry = selectedItem.mccCode;
};
$scope.onRoyalPayIndustrySelect = function (selectedItem) {
$scope.partner.royalpay_label = selectedItem.label;
$scope.partner.royalpayindustry = selectedItem.mccCode;
};
$scope.onHfIndustrySelect = function (selectedItem) {
$scope.partner.hf_label = selectedItem.label;
$scope.partner.hfindustry = selectedItem.mccCode;
};
$scope.updatePartner = function (form) {
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
item.$dirty = true;
}
});
return;
}
if ($scope.partner.company_name.indexOf("Migration") != -1) {
alert("Company Name包含敏感词汇请检查后重新提交");
return;
}
if ($scope.partner.company_phone.indexOf(' ') != -1) {
alert('Company Phone can not contain space character');
return;
}
if ($scope.partner.contact_email.indexOf(' ') != -1) {
alert('Contact email Phone can not contain space character');
return;
}
if ($scope.partner.suburb.indexOf(' ') != -1) {
alert('suburb can not contain two and more continuous space characters');
return;
}
if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
if (!$scope.partner.company_photo) {
alert('Shop Photo1 is necessary');
return;
}
if (!$scope.partner.store_photo) {
alert('Shop Photo2 is necessary');
return;
}
}
if ($scope.partner.acn && $scope.partner.business_structure == 'Company') {
if ($scope.partner.acn.length != 9) {
alert('Acn is not valid');
}
}
if ($scope.partner.referrer_id) {
$scope.referrers.forEach(function (e) {
if ($scope.partner.referrer_id == e.org_id) {
$scope.partner.referrer_name = e.name;
return;
}
})
}
var content = '';
if (!origin_referrer_id && $scope.partner.referrer_id) {
content = 'Update partner info successfully,But You Had add new Referrer,Please Change the BD Commission Proportion!';
}
if ($scope.partner.client_pay_type.length == 0) {
alert('请选择商户支付场景')
return;
}
if ($scope.partner.client_pay_desc.length == 0) {
alert('请选择商户支付方式')
return;
}
if ($scope.partner.client_pay_type.indexOf('1') >= 0) {
if ($scope.partner.client_pay_desc.join(',').indexOf('10') < 0) {
alert("请检查线上支付场景是否已选择支付方式");
return;
}
}
if ($scope.partner.client_pay_type.indexOf('2') >= 0) {
if ($scope.partner.client_pay_desc.join(',').indexOf('20') < 0) {
alert("请检查线下支付场景是否已选择支付方式");
return;
}
}
if ($scope.partner.client_pay_desc.join(',').indexOf('203') >= 0) {
if ($scope.partner.client_pay_desc.join(',').indexOf('2030') < 0 && $scope.partner.client_pay_desc.join(',').indexOf('20399') < 0) {
alert("请检查线下支付是否已选择收银系统类型");
return;
}
}
$scope.partner.client_pay_type = $scope.partner.client_pay_type.join(',');
$scope.partner.client_pay_desc = $scope.partner.client_pay_desc.join(',');
$http.put('/sys/partners/' + $scope.partner.client_moniker, $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'
});
}
$scope.updateMerchantLocation();
$scope.loadPartners();
$state.go('^.detail', {clientMoniker: $scope.partner.client_moniker}, {reload: true});
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
});
};
$scope.uploadLogo = function (file) {
if (file != null) {
if (file.size > 1 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过1MB请压缩后重试', type: 'error'})
} else {
$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) {
if (file.size > 2 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB请压缩后重试', type: 'error'})
} else {
$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) {
if (file.size > 2 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB请压缩后重试', type: 'error'})
} else {
$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.getMerchantLocation = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/location').then(function (resp) {
$scope.merchant_location = resp.data;
});
};
$scope.getMerchantLocation();
$scope.updateMerchantLocation = function () {
var params = window.frames['merchant_detail'].merchant_location;
if (params) {
$http.put('/sys/partners/modify/' + $scope.partner.client_moniker + '/location', params).then(function () {
});
}
}
}]);
return app;
});

File diff suppressed because it is too large Load Diff

@ -16,6 +16,17 @@
background-color: #f7bf90; background-color: #f7bf90;
border-color: #adadad; border-color: #adadad;
} }
.form-control-float {
float: left;
width: 93%; !important;
}
.form-control-span{
height: 34px;
}
.check-box {
zoom: 130%;
margin-right: 5px;
}
</style> </style>
<section class="content-header"> <section class="content-header">
<h1>New Partner</h1> <h1>New Partner</h1>
@ -26,11 +37,22 @@
<li class="active">New Partner</li> <li class="active">New Partner</li>
</ol> </ol>
</section> </section>
<div class="content"> <div class="content">
<form novalidate name="partnerForm"> <form novalidate name="partnerForm">
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="row">
<div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills">
<li ng-class="{active:partner.enable_cross_payment}" style="cursor: pointer">
<a ng-click="enablePaymentType('enable_cross_payment')"><input type="checkbox" class="check-box" style="margin-right: 5px;" ng-model="partner.enable_cross_payment"><span>跨境支付|Cross-border Payment</span></a>
</li>
<li ng-class="{active:partner.enable_card_payment}" style="cursor: pointer">
<a ng-click="enablePaymentType('enable_card_payment')"><input type="checkbox" class="check-box" style="margin-right: 5px;" ng-model="partner.enable_card_payment"><span>卡支付|Card Payment</span></a>
</li>
</ul>
</div>
</div>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">Partner Basic Information</div> <div class="panel-heading">Partner Basic Information</div>
<div class="panel-body"> <div class="panel-body">
@ -112,21 +134,40 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.business_name.$invalid && partnerForm.business_name.$dirty}"> ng-class="{'has-error':partnerForm.business_name.$invalid && partnerForm.business_name.$dirty}">
<label class="control-label col-sm-2" for="business-name-input">Business <label class="control-label col-sm-2" for="business-name-input">*Business
Name</label> Name</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input id="business-name-input" ng-model="partner.business_name" <input id="business-name-input" ng-model="partner.business_name"
class="form-control" class="form-control" required
type="text" name="business_name" maxlength="100"> type="text" name="business_name" maxlength="100">
<div ng-messages="partnerForm.business_name.$error" <div ng-messages="partnerForm.business_name.$error"
ng-if="partnerForm.business_name.$dirty"> ng-if="partnerForm.business_name.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less <p class="small text-danger" ng-message="maxlength">Less
Than 100 Than 100
Characters(including symbols and spaces)</p> Characters(including symbols and spaces)</p>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group" ng-if="partner.enable_card_payment"
ng-class="{'has-error':partnerForm.acceptor_name.$invalid && partnerForm.acceptor_name.$dirty}">
<label class="control-label col-sm-2" for="card-acceptor-input">* Card Acceptor Name</label>
<div class="col-sm-8">
<input id="card-acceptor-input" ng-model="partner.acceptor_name" required
class="form-control"
type="text" name="acceptor_name" maxlength="19">
<div ng-messages="partnerForm.acceptor_name.$error"
ng-if="partnerForm.acceptor_name.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 19
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.store_name.$invalid && partnerForm.store_name.$dirty}"> ng-class="{'has-error':partnerForm.store_name.$invalid && partnerForm.store_name.$dirty}">
<label class="control-label col-sm-2" for="store-name-input">* Store <label class="control-label col-sm-2" for="store-name-input">* Store
Name</label> Name</label>
@ -148,7 +189,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.business_structure.$invalid && partnerForm.business_structure.$dirty}"> ng-class="{'has-error':partnerForm.business_structure.$invalid && partnerForm.business_structure.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="business-structure-input">Business Structure</label> for="business-structure-input">Business Structure</label>
@ -176,31 +217,19 @@
<img ng-src="{{partner.logo_url}}" ng-if="partner.logo_url" style="height: 100px;"> <img ng-src="{{partner.logo_url}}" ng-if="partner.logo_url" style="height: 100px;">
</div> </div>
</div> </div>
<!--<div class="form-group"-->
<!--ng-class="{'has-error':partnerForm.abn.$invalid && partnerForm.abn.$dirty}">-->
<!--<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"-->
<!--required maxlength="20">-->
<!--<div ng-messages="partnerForm.abn.$error" ng-if="partnerForm.abn.$dirty">-->
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
<!--<p class="small text-danger" ng-message="maxlength">Less Than 20-->
<!--Characters(including symbols and spaces)</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.abn.$invalid && partnerForm.abn.$dirty}" ng-class="{'has-error':partnerForm.abn.$invalid && partnerForm.abn.$dirty}"
ng-if="partner.business_structure != 'Company'"> ng-if="partner.business_structure != 'Company' || partner.enable_card_payment">
<label class="control-label col-sm-2" for="abn-input">ABN</label> <label class="control-label col-sm-2" for="abn-input"><span ng-if="partner.enable_card_payment">*</span>ABN</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="partner.abn" type="text" <input class="form-control" ng-model="partner.abn" type="text"
name="abn" name="abn" required
id="abn-input" id="abn-input"
maxlength="20"> maxlength="20">
<div ng-messages="partnerForm.abn.$error" <div ng-messages="partnerForm.abn.$error"
ng-if="partnerForm.abn.$dirty"> ng-if="partnerForm.abn.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less <p class="small text-danger" ng-message="maxlength">Less
Than 20 Than 20
Characters(including symbols and spaces)</p> Characters(including symbols and spaces)</p>
@ -209,7 +238,7 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.acn.$invalid && partnerForm.acn.$dirty}" ng-class="{'has-error':partnerForm.acn.$invalid && partnerForm.acn.$dirty}"
ng-if="partner.business_structure == 'Company'"> ng-if="partner.business_structure == 'Company' && partner.enable_cross_payment">
<label class="control-label col-sm-2" for="acn-input">ACN</label> <label class="control-label col-sm-2" for="acn-input">ACN</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="partner.acn" type="text" <input class="form-control" ng-model="partner.acn" type="text"
@ -223,36 +252,10 @@
</div> </div>
</div> </div>
</div> </div>
<!--<div class="form-group"-->
<!--ng-class="{'has-error':partnerForm.sector.$invalid && partnerForm.sector.$dirty}">-->
<!--<label class="control-label col-sm-2" for="sector-input">* Sector</label>-->
<!--<div class="col-sm-8">-->
<!--&lt;!&ndash;<input class="form-control" type="text" ng-model="partner.sector" name="sector"&ndash;&gt;-->
<!--&lt;!&ndash;id="sector-input">&ndash;&gt;-->
<!--<select class="form-control" name="sector" required ng-model="partner.sector"-->
<!--id="sector-input"-->
<!--ng-options="sector.value as sector.label for sector in sectors">-->
<!--<option value="">Please Choose</option>-->
<!--</select>-->
<!--<div ng-messages="partnerForm.sector.$error" ng-if="partnerForm.sector.$dirty">-->
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.company_phone_p.$invalid && partnerForm.company_phone_p.$dirty}"> ng-class="{'has-error':partnerForm.company_phone_p.$invalid && partnerForm.company_phone_p.$dirty}">
<label class="control-label col-sm-2" for="service-phone-p-input">* <label class="control-label col-sm-2" for="service-phone-p-input">*
Service Phone</label> Service Phone</label>
<!--<div class="col-sm-8">
<input class="form-control" required type="text" ng-model="partner.company_phone"
name="company_phone" id="service-phone-input" maxlength="20">
<div ng-messages="partnerForm.company_phone.$error"
ng-if="partnerForm.company_phone.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 20 Characters</p>
</div>
</div>-->
<div class="col-sm-2"> <div class="col-sm-2">
<div class="input-group"> <div class="input-group">
<div class="input-group-addon">+</div> <div class="input-group-addon">+</div>
@ -296,7 +299,6 @@
Than 11 Characters</p> Than 11 Characters</p>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}"> ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}">
@ -353,7 +355,7 @@
ng-click="toggleClientPayType('1')"> ng-click="toggleClientPayType('1')">
<i class="fa fa-mixcloud"></i> <i class="fa fa-mixcloud"></i>
线上</button> 线上</button>
<button class="btn btn-default" <button class="btn btn-default" ng-if="partner.enable_cross_payment"
ng-class="{active:partner.client_pay_type.indexOf('2')>=0}" ng-class="{active:partner.client_pay_type.indexOf('2')>=0}"
ng-click="toggleClientPayType('2')"> ng-click="toggleClientPayType('2')">
<i class="fa fa-shopping-basket"></i> <i class="fa fa-shopping-basket"></i>
@ -392,7 +394,7 @@
小程序</button> 小程序</button>
</div> </div>
</div> </div>
<div ng-if="partner.client_pay_type.indexOf('2')>=0"> <div ng-if="partner.client_pay_type.indexOf('2')>=0 && partner.enable_cross_payment" >
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}"> ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">*Offline</label> <label class="control-label col-sm-2">*Offline</label>
@ -420,7 +422,7 @@
</div> </div>
</div> </div>
</div> </div>
<div ng-if="partner.client_pay_desc.join(',').indexOf('203')>=0"> <div ng-if="partner.client_pay_desc.join(',').indexOf('203')>=0 && partner.enable_cross_payment" >
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}"> ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">* POS</label> <label class="control-label col-sm-2">* POS</label>
@ -491,7 +493,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.client_pay_type.indexOf('2')>=0"> <div class="form-group" ng-if="partner.client_pay_type.indexOf('2')>=0 && partner.enable_cross_payment">
<label class="control-label col-sm-2">* Shop Photo</label> <label class="control-label col-sm-2">* Shop Photo</label>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-control-static"><em>1:</em>&nbsp; <div class="form-control-static"><em>1:</em>&nbsp;
@ -523,11 +525,43 @@
</a> </a>
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.enable_card_payment"
ng-class="{'has-error':partnerForm.expected_card_revenue.$invalid && partnerForm.expected_card_revenue.$dirty}">
<label class="control-label col-sm-2" for="expected_card_revenue-input">*
Expected credit card monthly revenue ($)</label>
<div class="col-sm-8">
<input type="number" name="expected_card_revenue" class="form-control form-control-float"
ng-model="partner.expected_card_revenue"
id="expected_card_revenue-input" required min="0">
<span class="input-group-addon form-control-span">$</span>
<div ng-messages="partnerForm.expected_card_revenue.$error"
ng-if="partnerForm.expected_card_revenue.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.enable_card_payment"
ng-class="{'has-error':partnerForm.average_card_transaction.$invalid && partnerForm.average_card_transaction.$dirty}">
<label class="control-label col-sm-2" for="average_card_transaction-input">*
Average credit card transaction value ($)</label>
<div class="col-sm-8">
<input type="number" name="average_card_transaction" class="form-control form-control-float"
ng-model="partner.average_card_transaction"
id="average_card_transaction-input" required min="0">
<span class="input-group-addon form-control-span">$</span>
<div ng-messages="partnerForm.average_card_transaction.$error"
ng-if="partnerForm.average_card_transaction.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="panel panel-default"> <div class="panel panel-default" ng-if="partner.enable_cross_payment">
<div class="panel-heading">Alipay Information &nbsp;<em class="small"><b>(Optional)</b></em> <div class="panel-heading">Alipay Information &nbsp;<em class="small"><b>(Optional)</b></em>
</div> </div>
<div class="panel-body"> <div class="panel-body">
@ -687,7 +721,6 @@
Characters(including symbols and spaces)</p> Characters(including symbols and spaces)</p>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" for="contact_wechatid-id"> <label class="control-label col-sm-2" for="contact_wechatid-id">
Wechat ID</label> Wechat ID</label>
@ -697,12 +730,22 @@
maxlength="50"> maxlength="50">
</div> </div>
</div> </div>
<!-- IT联系人信息 -->
<div class="form-group">
<label class="control-label col-sm-2" for="it-contact-person-email-id">
IT Contact E-mail</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.it_contact_person_email"
name="it_contact_person_email" id="it-contact-person-email-id"
maxlength="50">
</div>
</div>
<div class="from-group"> <div class="from-group">
<div> <div>
<label><input type="checkbox" ng-click="checkboxOnclick(this)">Legal Representative Same As Contact Information</label> <label><input type="checkbox" ng-click="checkboxOnclick(this)">Legal Representative Same As Contact Information</label>
</div> </div>
<div> <div ng-if="partner.enable_cross_payment">
<label><input type="checkbox" ng-click="checkMarketingSameAsContact(this)">Marketing Person Same As Contact Information</label> <label><input type="checkbox" ng-click="checkMarketingSameAsContact(this)">Marketing Person Same As Contact Information</label>
</div> </div>
</div> </div>
@ -827,9 +870,9 @@
</div> </div>
</div> </div>
<hr/> <hr ng-if="partner.enable_cross_payment" />
<div>&nbsp;&nbsp;Marketing Person</div> <div ng-if="partner.enable_cross_payment">&nbsp;&nbsp;Marketing Person</div>
<div class="panel-body"> <div class="panel-body" ng-if="partner.enable_cross_payment">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.marketing_person.$invalid && partnerForm.marketing_person.$dirty}"> ng-class="{'has-error':partnerForm.marketing_person.$invalid && partnerForm.marketing_person.$dirty}">
@ -1185,105 +1228,6 @@
</div> </div>
</div> </div>
</div> </div>
<!--<div class="panel panel-info">
<div class="panel-heading">Alipay Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">
<label class="control-label col-sm-4"
for="alipay_category">*Category</label>
<div class="col-sm-8" >
<input class="form-control" id="alipay_category" required
name="alipay_category" readonly
ng-model="partner.alipay_category"
multi-level-select-popup="alipayMccCategory"
on-select="onAlipayMccSelect($selected)"
chose-one-level="false">
<div ng-messages="partnerForm.alipay_category.$error"
ng-if="partnerForm.alipay_category.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading" style="background:#62b900">wechat Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}">
<label class="control-label col-sm-2" for="industry-input">
*Industry</label>
<div class="col-sm-8">
<select class="form-control" name="industry"
ng-model="partner.industry"
id="industry-input" required
ng-options="industry.value as industry.label for industry in industries">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.industry.$error"
ng-if="partnerForm.industry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading" style="background:#d82d2d">JD Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.jdindustry.$invalid && partnerForm.jdindustry.$dirty}">
<label class="control-label col-sm-2" for="jdindustry-input">
*Industry</label>
<div class="col-sm-8">
<select class="form-control" name="jdindustry"
ng-model="partner.jdindustry"
id="jdindustry-input" required
ng-options="industry.value as industry.label for industry in jdindustry">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.jdindustry.$error"
ng-if="partnerForm.jdindustry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading" style="background:#f06010;color: #f6f6f6;">RoyalPay Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.royalpayindustry.$invalid && partnerForm.royalpayindustry.$dirty}">
<label class="control-label col-sm-2" for="royalpayindustry-input">
*Industry</label>
<div class="col-sm-8">
<select class="form-control" name="royalpayindustry"
ng-model="partner.royalpayindustry"
id="royalpayindustry-input" required
ng-options="industry.value as industry.label for industry in royalpayindustry">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.royalpayindustry.$error"
ng-if="partnerForm.royalpayindustry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>-->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading" style="color: #333;background-color: #f5f5f5;border-color: #ddd;"> <div class="panel-heading" style="color: #333;background-color: #f5f5f5;border-color: #ddd;">
Industry Industry
@ -1308,7 +1252,7 @@
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}"> ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}">
<label class="control-label col-sm-2" for="industry-input"> <label class="control-label col-sm-2" for="industry-input">
*Wechat Industry</label> *Wechat Industry</label>
@ -1327,7 +1271,7 @@
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}"> ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="alipay_category">*Alipay Category</label> for="alipay_category">*Alipay Category</label>
@ -1346,6 +1290,44 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.enable_card_payment"
ng-class="{'has-error':partnerForm.mw-industry.$invalid && partnerForm.mw-industry.$dirty}">
<label class="control-label col-sm-2" for="mw-industry-input">
*Merchant Warrior Industry</label>
<div class="col-sm-8">
<select class="form-control" name="mw-industry"
ng-model="partner.mw_industry" required
id="mw-industry-input"
ng-options="industry.value as industry.label for industry in upayIndustrys">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.mw-industry.$error"
ng-if="partnerForm.mw-industry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.enable_card_payment">
<label class="control-label col-sm-2" for="mw-industry-input">
*Card Service Selection</label>
<div class="col-sm-8">
<span class="checkbox-inline">
<label>
<input type="checkbox" checked disabled
id="approving-check">
Australia Credit Card Payment|澳大利亚信用卡支付
</label>
</span>
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-model="partner.enable_international_card">
International Credit Card Payment|国际信用卡支付
</label>
</span>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

@ -390,9 +390,17 @@
</div> </div>
</div> </div>
<!-- IT联系人信息 -->
<div class="form-group col-sm-6" ng-if="partner.it_contact_person_email">
<label class="control-label col-sm-4">IT Contact Person E-mail</label>
<div class="col-sm-8">
<p class="form-control-static">
<span ng-bind="partner.it_contact_person_email"></span>
</p>
</div>
</div>
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
<label class="control-label col-sm-4">Job Title</label> <label class="control-label col-sm-4">Job Title</label>
<div class="col-sm-8"> <div class="col-sm-8">
<p class="form-control-static"> <p class="form-control-static">
<span ng-bind="partner.contact_job"></span> <span ng-bind="partner.contact_job"></span>

@ -392,6 +392,15 @@
Characters(including symbols and spaces)</p> Characters(including symbols and spaces)</p>
</div> </div>
</div> </div>
<!-- IT联系人信息 -->
<div class="form-group">
<label class="control-label col-sm-2">IT Contact Person E-mail</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.it_contact_person_email"
name="it_contact_person_email" id="it-contact-person-email-id"
maxlength="50">
</div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.contact_job.$invalid && partnerForm.contact_job.$dirty}"> ng-class="{'has-error':partnerForm.contact_job.$invalid && partnerForm.contact_job.$dirty}">
<label class="control-label col-sm-2" for="contact_job-id">* <label class="control-label col-sm-2" for="contact_job-id">*

@ -4,365 +4,20 @@
} }
</style> </style>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">Audit Files &nbsp;&nbsp;&nbsp; <div class="panel-heading" style="padding: 10px 15px 0 15px;">
<a class="btn-group btn btn-success" ng-if="file" ng-href="{{downloadAsZip()}}" target="_blank"> <div class="row">
<i class="fa fa-cloud-download">一键下载</i> <div class="col-sm-12 analysis-nav">
</a> <ul class="nav nav-pills">
<li ui-sref-active-eq="active">
<a ui-sref="partners.detail.files.CP_files"><span>跨境支付合规文件|Cross-border Payment Compliance Files</span></a>
</li>
<li ui-sref-active="active">
<a ui-sref="partners.detail.files.MW_files"> <span>卡支付合规文件|Card Payment Compliance Files</span></a>
</li>
</ul>
</div> </div>
<div class="panel-body">
<div class="form-horizontal">
<div class="panel panel-info">
<div class="panel-heading"><h4>
ID描述信息
<a class="small" role="button" ng-if="!id_info_form.edit" ng-click="id_info_form.edit=true">
<i class="fa fa-edit"></i></a>
</h4></div>
<div class="panel-body">
<div class="row form-horizontal">
<div class="form-group" ng-if="id_info_form.edit">
<label class="control-label col-sm-2">* Choose ID Type </label>
<div class="col-sm-4">
<div class="form-control-static">
<select class="form-control"
ng-model="file.id_type" style="width: 250px" ng-change="setIDTypeSession(file.id_type)">
<option value="">Please Choose</option>
<option value="passport" >Passport</option>
<option value="driver_license">Driver license</option>
</select>
</div> </div>
</div> </div>
<div class="panel-body" ui-view>
</div> </div>
<div class="form-group" ng-if="id_info_form.edit">
<label class="control-label col-sm-2">* ID Title</label>
<div class="col-sm-6">
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='Ultimate beneficiary owner'}"
ng-click="toggleIdTitle('Ultimate beneficiary owner')">
Ultimate beneficiary owner</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='CEO'}"
ng-click="toggleIdTitle('CEO')">
CEO</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='Director'}"
ng-click="toggleIdTitle('Director')">
Director</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='General Manager'}"
ng-click="toggleIdTitle('General Manager')">
General Manager</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='Other'}"
ng-click="toggleIdTitle('Other')">
Other</button>
</div> </div>
</div>
<div class="form-group" ng-if="id_info_form.edit && file.beneficiary_id_title!='Ultimate beneficiary owner'">
<label class="control-label col-sm-2">* 请简要告知为何无法提供受益股东的资料</label>
<div class="col-sm-4">
<div class="form-control-static">
<textarea class="form-control" ng-model="file.other_id_title_desc" style="height: 100px"></textarea>
</div>
</div>
</div>
<div class="form-group" ng-if="!id_info_form.edit">
<label class="control-label col-sm-2">ID Type </label>
<div class="col-sm-4">
<div class="form-control-static">
<span>{{file.id_type}}</span>
</div>
</div>
</div>
<div class="form-group" ng-if="!id_info_form.edit">
<label class="control-label col-sm-2">ID Title</label>
<div class="col-sm-6">
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='Ultimate beneficiary owner'}">
Ultimate beneficiary owner</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='CEO'}">
CEO</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='Director'}">
Director</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='General Manager'}">
General Manager</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='Other'}">
Other</button>
</div>
</div>
<div class="form-group" ng-if="!id_info_form.edit && file.beneficiary_id_title!='Ultimate beneficiary owner'">
<label class="control-label col-sm-2">请简要告知为何无法提供受益股东的资料</label>
<div class="col-sm-4">
<div class="form-control-static">
<textarea class="form-control" ng-model="file.other_id_title_desc" style="height: 100px" disabled></textarea>
</div>
</div>
</div>
</div>
</div>
<div class="panel-footer" ng-if="id_info_form.edit">
<button class="btn btn-success" ng-click="saveIdInfo()">保存</button>
<button class="btn btn-danger" ng-click="cancelIdInfo()">取消</button>
</div>
</div>
<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)">
<i class="fa fa-upload"></i> Upload
</button>
<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-repeat="src in file.client_bank_file" ng-href="{{src}}">
<img ng-src="{{src}}" class="col-sm-8">
</a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_bank_file track by $index">
<td ng-bind="$index+1+'.'" ALIGN="left" VALIGN="top" class="btn">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}"class="col-sm-6" style="border: 1px solid #ddd" onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file_src.file_value}}" ><i class="fa fa-download"></i></a>
</td>
</tr>
</tbody>
</table>
</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)">
<i class="fa fa-upload"></i> Upload
</button>
<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-repeat="src in file.client_company_file" ng-href="{{src}}" target="_blank">
<img ng-src="{{src}}" class="col-sm-8"></a>-->
<table><tbody>
<tr ng-repeat="file_src in file.client_company_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="companyIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-6" style="border: 1px solid #ddd" onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
<a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file_src.file_value}}" download="" target="_blank" ><i class="fa fa-download"></i></a>
</td>
</tr>
</tbody></table>
</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)">
<i class="fa fa-upload"></i> Upload
</button>
<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-repeat="src in file.client_id_file" ng-href="{{src}}" target="_blank">
<img ng-src="{{src}}" class="col-sm-8"></a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_id_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-6" style="border: 1px solid #ddd" onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
<a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file_src.file_value}}" download="" target="_blank"><i class="fa fa-download"></i></a>
</td>
</tr>
</tbody></table>
</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)">
<i class="fa fa-upload"></i> Upload
</button>
<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-repeat="src in file.client_agree_file" ng-href="{{src}}">
<img ng-src="{{src}}" class="col-sm-8"></a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_agree_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-6" style="border: 1px solid #ddd" onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
<a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file_src.file_value}}" download="" target="_blank"><i class="fa fa-download"></i></a>
</td>
</tr>
</tbody></table>
</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">
<button class="btn btn-primary" type="button"
ngf-select="uploadApplyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<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-repeat="src in file.client_apply_file" ng-href="{{src}}">
<img ng-src="{{src}}" class="col-sm-8"></a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_apply_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}"class="col-sm-6" style="border: 1px solid #ddd" onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
<a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file_src.file_value}}" download="" target="_blank"><i class="fa fa-download"></i></a>
</td>
</tr>
</tbody></table>
</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 class="form-group">
<label class="control-label col-sm-2"> Utility Bill Files</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadBillFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<p class="text-info">
<i class="fa fa-info"></i> One utility bill (water, electricity or gas) that shows the residential address (*Mandatory if your uploaded ID is a passport)<br>
<i class="fa fa-info"></i> 一份显示常住居所地址的账单(水费、电费或煤气费)(*必须上传 - 如您上传的ID是护照)<br>
</p>
<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="billFileProgress.value" ng-if="billFileProgress"></uib-progressbar>
<table>
<tbody>
<tr ng-repeat="file_src in file.kyc_utility_bill_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="billIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8"
onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button"
ng-click="deleteComplianceFiles(file_src.file_id)">
X
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<div class="col-sm-12">
<p class="col-sm-6">Example请提供水电煤账单文件图片,如示例
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491226098_Ho29fpS08rNP9AvPTZQfyoIrNa9bcB.png" title="" alt="水费.png"/>
<br/><img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491263193_hqD9DkQOZvqx8Qaw1ABIkqL21aSNrd.jpg" title="" alt="电费.jpg"/>
</p>
<p class="col-sm-6">
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491285195_C8oXVU4QIJ3ADDEMghaNXTt3cXUhtd.png" title="" alt="煤气.png"/>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="text-align: center">
<a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope" ng-if="('10'|withRole)" ng-click="complianceCheck()">check</a>
</div>
</div>
<!--<div class="margin-bottom margin-top">-->
<!--<button class="btn-group btn btn-success" type="button" ng-click="updateFile()">Save-->
<!--</button>-->
<!--</div>-->

@ -214,9 +214,9 @@
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='CB_BankPay'}"><a role="button" ng-click="bankCtrl.rate_name='CB_BankPay'" ng-if="sysconfig.active_channels.indexOf('CB_BankPay')!=-1">CB_BankPay</a></li> <li role="presentation" ng-class="{active:bankCtrl.rate_name=='CB_BankPay'}"><a role="button" ng-click="bankCtrl.rate_name='CB_BankPay'" ng-if="sysconfig.active_channels.indexOf('CB_BankPay')!=-1">CB_BankPay</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_card'}"><a role="button" ng-click="bankCtrl.rate_name='rpaypmt_card'">Card Payment</a></li> <li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_card'}"><a role="button" ng-click="bankCtrl.rate_name='rpaypmt_card'">Card Payment</a></li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_dd'}"><a role="button" ng-click="bankCtrl.rate_name='rpaypmt_dd'">Direct Debit</a></li> <li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_dd'}"><a role="button" ng-click="bankCtrl.rate_name='rpaypmt_dd'">Direct Debit</a></li>
<button class="btn btn-warning" style="float: right" type="button" ng-click="newCardPaymentRates()" ng-if="partner.rate_editable && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4) && ('111'|withRole)))" > <a id="addCardPaymentRate" class="btn btn-warning" style="float: right" type="button" ng-click="newCardPaymentRates()" ng-if="partner.rate_editable && (('11'|withRole)||((!partner.upay_approve_result||partner.upay_approve_result>4) && ('111'|withRole)))" >
Add Card Payment Rates Add Card Payment Rates
</button> </a>
</ul> </ul>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered"> <table class="table table-bordered">

@ -0,0 +1,363 @@
<style type="text/css">
img {
width: 100%;
}
</style>
<div class="panel-heading" style="padding: 0">Audit Files &nbsp;&nbsp;&nbsp;
<a class="btn-group btn btn-success" ng-if="file" ng-href="{{downloadAsZip()}}" target="_blank">
<i class="fa fa-cloud-download">一键下载</i>
</a>
</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="panel panel-info">
<div class="panel-heading"><h4>
ID描述信息
<a class="small" role="button" ng-if="!id_info_form.edit" ng-click="id_info_form.edit=true">
<i class="fa fa-edit"></i></a>
</h4></div>
<div class="panel-body">
<div class="row form-horizontal">
<div class="form-group" ng-if="id_info_form.edit">
<label class="control-label col-sm-2">* Choose ID Type </label>
<div class="col-sm-4">
<div class="form-control-static">
<select class="form-control"
ng-model="file.id_type" style="width: 250px" ng-change="setIDTypeSession(file.id_type)">
<option value="">Please Choose</option>
<option value="passport" >Passport</option>
<option value="driver_license">Driver license</option>
</select>
</div>
</div>
</div>
<div class="form-group" ng-if="id_info_form.edit">
<label class="control-label col-sm-2">* ID Title</label>
<div class="col-sm-6">
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='Ultimate beneficiary owner'}"
ng-click="toggleIdTitle('Ultimate beneficiary owner')">
Ultimate beneficiary owner</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='CEO'}"
ng-click="toggleIdTitle('CEO')">
CEO</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='Director'}"
ng-click="toggleIdTitle('Director')">
Director</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='General Manager'}"
ng-click="toggleIdTitle('General Manager')">
General Manager</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='Other'}"
ng-click="toggleIdTitle('Other')">
Other</button>
</div>
</div>
<div class="form-group" ng-if="id_info_form.edit && file.beneficiary_id_title!='Ultimate beneficiary owner'">
<label class="control-label col-sm-2">* 请简要告知为何无法提供受益股东的资料</label>
<div class="col-sm-4">
<div class="form-control-static">
<textarea class="form-control" ng-model="file.other_id_title_desc" style="height: 100px"></textarea>
</div>
</div>
</div>
<div class="form-group" ng-if="!id_info_form.edit">
<label class="control-label col-sm-2">ID Type </label>
<div class="col-sm-4">
<div class="form-control-static">
<span>{{file.id_type}}</span>
</div>
</div>
</div>
<div class="form-group" ng-if="!id_info_form.edit">
<label class="control-label col-sm-2">ID Title</label>
<div class="col-sm-6">
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='Ultimate beneficiary owner'}">
Ultimate beneficiary owner</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='CEO'}">
CEO</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='Director'}">
Director</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='General Manager'}">
General Manager</button>
<button class="btn btn-default"
ng-class="{active:file.beneficiary_id_title=='Other'}">
Other</button>
</div>
</div>
<div class="form-group" ng-if="!id_info_form.edit && file.beneficiary_id_title!='Ultimate beneficiary owner'">
<label class="control-label col-sm-2">请简要告知为何无法提供受益股东的资料</label>
<div class="col-sm-4">
<div class="form-control-static">
<textarea class="form-control" ng-model="file.other_id_title_desc" style="height: 100px" disabled></textarea>
</div>
</div>
</div>
</div>
</div>
<div class="panel-footer" ng-if="id_info_form.edit">
<button class="btn btn-success" ng-click="saveIdInfo()">保存</button>
<button class="btn btn-danger" ng-click="cancelIdInfo()">取消</button>
</div>
</div>
<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" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.approve_result || partner.approve_result==0 || partner.approve_result==2 || partner.approve_result==5 || partner.approve_result==4))"
ngf-select="uploadBankFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<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-repeat="src in file.client_bank_file" ng-href="{{src}}">
<img ng-src="{{src}}" class="col-sm-8">
</a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_bank_file track by $index">
<td ng-bind="$index+1+'.'" ALIGN="left" VALIGN="top" class="btn">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}"class="col-sm-6" style="border: 1px solid #ddd" onerror="this.src='/static/images/file_close.png'">
</a>
<button ng-if="('10'|withRole) || (('100'|withRole) && (!partner.approve_result || partner.approve_result==0 || partner.approve_result==2 || partner.approve_result==5 || partner.approve_result==4))" class="btn btn-danger" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file_src.file_value}}" ><i class="fa fa-download"></i></a>
</td>
</tr>
</tbody>
</table>
</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" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.approve_result || partner.approve_result==0 || partner.approve_result==2 || partner.approve_result==5 || partner.approve_result==4))"
ngf-select="uploadCompanyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<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-repeat="src in file.client_company_file" ng-href="{{src}}" target="_blank">
<img ng-src="{{src}}" class="col-sm-8"></a>-->
<table><tbody>
<tr ng-repeat="file_src in file.client_company_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="companyIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-6" style="border: 1px solid #ddd" onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.approve_result || partner.approve_result==0 || partner.approve_result==2 || partner.approve_result==5 || partner.approve_result==4))" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
<a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file_src.file_value}}" download="" target="_blank" ><i class="fa fa-download"></i></a>
</td>
</tr>
</tbody></table>
</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" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.approve_result || partner.approve_result==0 || partner.approve_result==2 || partner.approve_result==5 || partner.approve_result==4))"
ngf-select="uploadIDFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<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-repeat="src in file.client_id_file" ng-href="{{src}}" target="_blank">
<img ng-src="{{src}}" class="col-sm-8"></a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_id_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-6" style="border: 1px solid #ddd" onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.approve_result || partner.approve_result==0 || partner.approve_result==2 || partner.approve_result==5 || partner.approve_result==4))" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
<a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file_src.file_value}}" download="" target="_blank"><i class="fa fa-download"></i></a>
</td>
</tr>
</tbody></table>
</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" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.approve_result || partner.approve_result==0 || partner.approve_result==2 || partner.approve_result==5 || partner.approve_result==4))"
ngf-select="uploadAgreementFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<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-repeat="src in file.client_agree_file" ng-href="{{src}}">
<img ng-src="{{src}}" class="col-sm-8"></a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_agree_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-6" style="border: 1px solid #ddd" onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.approve_result || partner.approve_result==0 || partner.approve_result==2 || partner.approve_result==5 || partner.approve_result==4))" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
<a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file_src.file_value}}" download="" target="_blank"><i class="fa fa-download"></i></a>
</td>
</tr>
</tbody></table>
</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">
<button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.approve_result || partner.approve_result==0 || partner.approve_result==2 || partner.approve_result==5 || partner.approve_result==4))"
ngf-select="uploadApplyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<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-repeat="src in file.client_apply_file" ng-href="{{src}}">
<img ng-src="{{src}}" class="col-sm-8"></a>-->
<table>
<tbody>
<tr ng-repeat="file_src in file.client_apply_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}"class="col-sm-6" style="border: 1px solid #ddd" onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.approve_result || partner.approve_result==0 || partner.approve_result==2 || partner.approve_result==5 || partner.approve_result==4))" type="button" ng-click="deleteComplianceFiles(file_src.file_id)">X</button>
<a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file_src.file_value}}" download="" target="_blank"><i class="fa fa-download"></i></a>
</td>
</tr>
</tbody></table>
</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 class="form-group">
<label class="control-label col-sm-2"> Utility Bill Files</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.approve_result || partner.approve_result==0 || partner.approve_result==2 || partner.approve_result==5 || partner.approve_result==4))"
ngf-select="uploadBillFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<p class="text-info">
<i class="fa fa-info"></i> One utility bill (water, electricity or gas) that shows the residential address (*Mandatory if your uploaded ID is a passport)<br>
<i class="fa fa-info"></i> 一份显示常住居所地址的账单(水费、电费或煤气费)(*必须上传 - 如您上传的ID是护照)<br>
</p>
<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="billFileProgress.value" ng-if="billFileProgress"></uib-progressbar>
<table>
<tbody>
<tr ng-repeat="file_src in file.kyc_utility_bill_file track by $index">
<td ng-bind="$index+1+'.'" class="btn">1</td>
<td><a ng-if="billIsImage" target="_blank" ng-href="{{file_src.file_value}}">
<img ng-src="{{file_src.file_value}}" class="col-sm-8"
onerror="this.src='/static/images/file_close.png'">
</a>
<button class="btn btn-danger" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.approve_result || partner.approve_result==0 || partner.approve_result==2 || partner.approve_result==5 || partner.approve_result==4))"
ng-click="deleteComplianceFiles(file_src.file_id)">
X
</button>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-6">
<div class="form-control-static">
<div class="col-sm-12">
<p class="col-sm-6">Example请提供水电煤账单文件图片,如示例
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491226098_Ho29fpS08rNP9AvPTZQfyoIrNa9bcB.png" title="" alt="水费.png"/>
<br/><img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491263193_hqD9DkQOZvqx8Qaw1ABIkqL21aSNrd.jpg" title="" alt="电费.jpg"/>
</p>
<p class="col-sm-6">
<img class="col-xs-12" style="border: 1px solid #ddd"
src="https://file.royalpay.com.au/open/2019/12/16/1576491285195_C8oXVU4QIJ3ADDEMghaNXTt3cXUhtd.png" title="" alt="煤气.png"/>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="text-align: center">
<a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope" ng-if="('10'|withRole)" ng-click="complianceCheck()">check</a>
</div>

@ -58,11 +58,11 @@
<li class="active">Partner Detail</li> <li class="active">Partner Detail</li>
</ol> </ol>
</section> </section>
<div class="content"> <div class="content">
<!-- 跨境支付审核 -->
<div class="box box-warning" ng-if="('10'|withRole)"> <div class="box box-warning" ng-if="('10'|withRole)">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">Compliance <span ng-if="partner.approve_result==5 || partner.refuse_remark.length>0" <h3 class="box-title"> <img style="height: 20px;width: 20px" height="20px" src="/static/images/royalpay_sign_s.png">Cross-border payment Compliance <span ng-if="partner.approve_result==5 || partner.refuse_remark.length>0"
style="color: red">(Refused style="color: red">(Refused
<small class="" <small class=""
ng-if="partner.approve_result==5 || partner.refuse_remark.length>0">:{{partner.refuse_remark}}</small>)</span> ng-if="partner.approve_result==5 || partner.refuse_remark.length>0">:{{partner.refuse_remark}}</small>)</span>
@ -95,6 +95,8 @@
<div ng-if="partner.open_status != 5 && partner.open_status!=10"> <div ng-if="partner.open_status != 5 && partner.open_status!=10">
<!--<a role="button" type="button" class="btn btn-success" ng-click="exportPDF()">--> <!--<a role="button" type="button" class="btn btn-success" ng-click="exportPDF()">-->
<!--制作合同</a>--> <!--制作合同</a>-->
<a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{Export()}}">
<i class="fa fa-download"></i>制作临时合同</a>
<a role="button" type="button" class="btn btn-success" ng-click="exportAgreegatePDF()"> <a role="button" type="button" class="btn btn-success" ng-click="exportAgreegatePDF()">
制作全支付合同</a> 制作全支付合同</a>
<a role="button" type="button" class="btn btn-warning" ngf-select="uploadAgreeFile($file)" <a role="button" type="button" class="btn btn-warning" ngf-select="uploadAgreeFile($file)"
@ -108,7 +110,7 @@
<button ng-if="(partner.open_status==1||partner.open_status==10) && partner.approve_result>3 || partner.open_status==4" <button ng-if="(partner.open_status==1||partner.open_status==10) && partner.approve_result>3 || partner.open_status==4"
type="button" class="btn btn-primary" ng-click="refuse()">Refuse type="button" class="btn btn-primary" ng-click="refuse()">Refuse
</button> </button>
<button type="button" class="btn btn-danger" ng-click="deleteClient()">Delete</button>
</div> </div>
<div ng-if="partner.open_status==10" class="btn-group pull-right" role="group" aria-label="..."> <div ng-if="partner.open_status==10" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-success" ng-click="pass2GreenChannel()"> <button type="button" class="btn btn-success" ng-click="pass2GreenChannel()">
@ -116,10 +118,10 @@
Agree Green Channel Agree Green Channel
</button> </button>
</div> </div>
<a ng-if="fileManager.source_agree_file" role="button" class="btn-group btn btn-warning" <a style="margin-top: 5px" ng-if="fileManager.source_agree_file" role="button" class="btn-group btn btn-warning" style="margin-top: 5px"
type="button" ng-href="{{fileManager.source_agree_file}}" target="_blank"><i type="button" ng-href="{{fileManager.source_agree_file}}" target="_blank"><i
class="fa fa-download"></i>下载合同</a> class="fa fa-download"></i>下载合同</a>
<span style="padding-top: 10px" ng-if="partner.open_status != 5"> <span style="margin-top: 5px" ng-if="partner.open_status != 5">
<a ng-if="partner.open_status==2" role="button" type="button" class="btn btn-primary" <a ng-if="partner.open_status==2" role="button" type="button" class="btn btn-primary"
ng-click="notifyBD()"> ng-click="notifyBD()">
<i class="fa fa-thumb-tack"></i> Notify BD</a> <i class="fa fa-thumb-tack"></i> Notify BD</a>
@ -155,14 +157,12 @@
</div> </div>
</div> </div>
</div> </div>
<div><a role="button" class="btn-group btn btn-warning" type="button" ng-href="{{Export()}}">
<i class="fa fa-download"></i>制作临时合同</a>
</div>
<div class="box" ng-if="('100'|withRole) && partner.show_all_permission" <div class="box" ng-if="('100'|withRole) && partner.show_all_permission"
ng-class="{'box-warning':partner.approve_result!=5,'box-danger':partner.approve_result==5}"> ng-class="{'box-warning':partner.approve_result!=5,'box-danger':partner.approve_result==5}">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">Operation <span ng-if="partner.approve_result==5" style="color: red"> <h3 class="box-title">
<img style="height: 20px;width: 20px" src="/static/images/royalpay_sign_s.png">
Operation <span ng-if="partner.approve_result==5" style="color: red">
(Refused (Refused
<small class="" ng-if="partner.approve_result==5">:{{partner.refuse_remark}}</small> <small class="" ng-if="partner.approve_result==5">:{{partner.refuse_remark}}</small>
)</span><span ng-if="(partner.source==1 || partner.source==2) && partner.approve_result==2" )</span><span ng-if="(partner.source==1 || partner.source==2) && partner.approve_result==2"
@ -231,7 +231,170 @@
</div> </div>
</div> </div>
</div> </div>
<div class="box box-warning" ng-if="partner.approve_result==1 && partner.approve_email_send==2">
<!-- 卡支付审核 -->
<!-- 给合规权限查看 -->
<div class="box box-warning" ng-if="('10'|withRole)">
<div class="box-header with-border">
<h3 class="box-title"><span style="width: 20px;height: 20px"><img style="height: 20px;width: 20px" src="/static/images/card_payment_sign.png"></span>
Card Payment Compliance
<span ng-if="partner.upay_approve_result==5" style="color: red">(Refused
<small class="" ng-if="partner.upay_approve_result==5 || partner.upay_refuse_remark.length>0">:{{partner.upay_refuse_remark}}</small>)
</span>
【目前状态】-
<b ng-if="partner.source==4">
<span ng-if="!partner.upay_approve_result">(自助申请)资料完善中</span>
<span ng-if="partner.upay_approve_result==1">(自助申请)已开通</span>
<span ng-if="partner.upay_approve_result==2">(自助申请)快速开通等待提交合规材料</span>
<span ng-if="partner.upay_approve_result==3">(自助申请)待审核(材料已提交)</span>
</b>
<b ng-if="partner.source!=4">
<span ng-if="!partner.upay_open_status">资料完善中</span>
<span ng-if="partner.upay_open_status==1">待审核(合同制作中)</span>
<span ng-if="partner.upay_open_status==2">合同制作完成</span>
<span ng-if="partner.upay_open_status==3">BD处理中</span>
<span ng-if="partner.upay_open_status==4">待审核(合规文件已提交)</span>
<span ng-if="partner.upay_open_status==5">通过</span>
<span ng-if="partner.upay_open_status==0">不通过</span>
</b>
<span ng-if="partner.is_valid==0" ng-class="{pass_timeout:partner.is_valid==0}">(已禁用)</span>
</h3>
<button ng-if="!partner.is_valid" type="button" class="btn btn-success" style="float:right;"
ng-click="revertClient()">Revert
</button>
</div>
<div class="box-body" ng-if="partner.is_valid==1">
<a ng-if="partner.upay_open_status != 5" role="button" type="button" class="btn btn-success" ng-click="exportCardAgreegatePDF()">
制作信用卡支付合同</a>
<a ng-if="partner.upay_open_status != 5 &&letterOfOfferFileManager.letter_of_offer_file" role="button" type="button" class="btn btn-success" ng-click="exportCardPromotionaAgreegatePDF()">
制作促销合同</a>
<div class="btn-group pull-right" role="group" aria-label="...">
<button type="button" ng-if="partner.upay_open_status==1 && partner.upay_approve_result>1 || partner.upay_open_status==4"
class="btn btn-success" ng-click="passCardClient()">Pass
</button>
<button ng-if="partner.upay_open_status==1 ||partner.upay_open_status==4"
type="button" class="btn btn-primary" ng-click="cardRefuse()">Refuse
</button>
</div>
<a ng-if="letterOfOfferFileManager.letter_of_offer_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{letterOfOfferFileManager.letter_of_offer_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Letter Of Offer合同</a>
<a ng-if="termsAndConditionsFile.terms_and_conditions_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{termsAndConditionsFile.terms_and_conditions_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Terms And Conditions合同</a>
<a ng-if="promotionalOfferFileManager.promotional_offer_file" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{promotionalOfferFileManager.promotional_offer_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Promotional Offer合同</a>
<span style="margin-top: 5px"ng-if="partner.upay_open_status != 5">
<a ng-if="partner.upay_open_status==2" role="button" type="button" class="btn btn-primary"
ng-click="cardNotifyBD()">
<i class="fa fa-thumb-tack"></i> Notify BD</a>
</span>
<div ng-if="partner.audit_card_logs">
<hr>
<div class="box-body table-responsive pad">
<small>
<div class="btn-group-vertical">
<button type="button" class="btn btn-xs btn-primary">完善资料</button>
</div>
</small>
<small ng-repeat="log in partner.audit_card_logs">
<i class="fa fa-arrow-right" aria-hidden="true"></i>
<div class="btn-group-vertical">
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.remark}}
</button>
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.operator}} | {{log.create_time}}
</button>
</div>
</small>
</div>
</div>
</div>
</div>
<!-- 给BD权限查看 -->
<div class="box" ng-if="('100'|withRole) && partner.show_all_permission"
ng-class="{'box-warning':partner.upay_approve_result!=5,'box-danger':partner.upay_approve_result==5}">
<div class="box-header with-border">
<h3 class="box-title"><img style="height: 20px;width: 20px" src="/static/images/card_payment_sign.png"> Operation <span ng-if="partner.upay_approve_result==5" style="color: red">
(Refused
<small class="" ng-if="partner.upay_approve_result==5">:{{partner.upay_refuse_remark}}</small>
)</span><span ng-if="(partner.source==1 || partner.source==2) && partner.approve_result==2"
style="color: green">(The Partner Using Green Channel Now!)</span>
【目前状态】-
<span ng-if="!partner.upay_open_status">资料完善中</span>
<span ng-if="partner.upay_open_status==1">待审核(合同制作中)</span>
<span ng-if="partner.upay_open_status==2">合同制作完成</span>
<span ng-if="partner.upay_open_status==3">BD处理中</span>
<span ng-if="partner.upay_open_status==4">待审核(合规文件已提交)</span>
<span ng-if="partner.upay_open_status==5">通过</span>
<span ng-if="partner.upay_open_status==0">不通过</span>
<span ng-if="partner.upay_open_status==10">绿色通道申请中</span>
</h3>
</div>
<div class="box-body">
<a ng-if="letterOfOfferFileManager.letter_of_offer_file && partner.upay_approve_result!=1" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{letterOfOfferFileManager.letter_of_offer_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Letter Of Offer合同</a>
<a ng-if="termsAndConditionsFile.terms_and_conditions_file && partner.upay_approve_result!=1" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{termsAndConditionsFile.terms_and_conditions_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Terms And Conditions合同</a>
<a ng-if="promotionalOfferFileManager.promotional_offer_file && partner.upay_approve_result!=1" role="button" class="btn-group btn btn-warning"
type="button" ng-href="{{promotionalOfferFileManager.promotional_offer_file}}" target="_blank"> <i
class="fa fa-download"></i>下载Promotional Offer合同</a>
<div ng-if="partner.upay_open_status==3" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-danger" ng-click="commitToCardCompliance()">Commit to Compliance
</button>
</div>
<!--<div>
<a ng-if="letterOfOfferFileManager.letter_of_offer_file && partner.upay_open_status==3" role="button" class="btn-group btn btn-success"
type="button" ng-href="{{letterOfOfferFileManager.letter_of_offer_file}}" target="_blank"> <i
class="fa fa-upload"></i>上传签约Letter Of Offer合同</a>
<a ng-if="termsAndConditionsFile.terms_and_conditions_file && partner.upay_open_status==3" role="button" class="btn-group btn btn-success"
type="button" ng-href="{{termsAndConditionsFile.terms_and_conditions_file}}" target="_blank"> <i
class="fa fa-upload"></i>上传签约Terms And Conditions合同</a>
<a ng-if="promotionalOfferFileManager.promotional_offer_file && partner.upay_open_status==3" role="button" class="btn-group btn btn-success"
type="button" ng-href="{{promotionalOfferFileManager.promotional_offer_file}}" target="_blank"> <i
class="fa fa-upload"></i>上传签约Promotional Offer合同</a>
</div>-->
<div ng-if="!partner.upay_open_status" class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-primary" ng-click="apply2makeCardAgreeFile()">
<i class="fa fa-paper-plane"></i>
提交合规制作卡支付合同
</button>
</div>
<div ng-if="partner.audit_card_logs">
<hr>
<div class="box-body table-responsive pad">
<small>
<div class="btn-group-vertical" style="margin-top: 5px">
<button type="button" class="btn btn-xs btn-primary">BD完善资料</button>
</div>
</small>
<small ng-repeat="log in partner.audit_card_logs">
<i class="fa fa-arrow-right" aria-hidden="true" style="margin-top: 5px"></i>
<div class="btn-group-vertical">
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.remark}}
</button>
<button type="button" class="btn btn-xs btn-primary"
ng-class="{'btn-danger':log.remark.indexOf('打回')>-1,'btn-success':log.open_status_to==5||(log.open_status_from==10 && log.open_status_to==1)}">
{{log.operator}} | {{log.create_time}}
</button>
</div>
</small>
</div>
</div>
</div>
</div>
<!-- 邮件重发通知 -->
<div class="box box-warning" ng-if="(partner.approve_result==1 && partner.approve_email_send==2) ||
(partner.upay_approve_result==1 && partner.upay_approve_email_send==2)">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">Solved</h3> <h3 class="box-title">Solved</h3>
</div> </div>
@ -242,6 +405,8 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 商户信息 -->
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="nav-tabs-custom"> <div class="nav-tabs-custom">
@ -277,9 +442,6 @@
<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1"> <li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1">
<a ui-sref=".files">Compliance Files</a> <a ui-sref=".files">Compliance Files</a>
</li> </li>
<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1">
<a ui-sref=".MW_files">Merchant Warrior Compliance Files</a>
</li>
<!--<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1"> <!--<li ui-sref-active="active" ng-if="partner.show_all_permission && partner.is_valid==1">
<a ui-sref=".kyc_files">KYC Files</a> <a ui-sref=".kyc_files">KYC Files</a>
</li>--> </li>-->
@ -318,13 +480,11 @@
ui-sref="partners.edit({clientMoniker:partner.client_moniker})"> ui-sref="partners.edit({clientMoniker:partner.client_moniker})">
<i class="fa fa-edit"></i> Edit <i class="fa fa-edit"></i> Edit
</a> </a>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Partner Code</label> <label class="control-label col-sm-2">Partner Code</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static"> <p class="form-control-static">
<span id="parent_code">{{partner.client_moniker}}</span> <span id="parent_code">{{partner.client_moniker}}</span>
@ -371,6 +531,12 @@
<p class="form-control-static" ng-bind="partner.business_name"></p> <p class="form-control-static" ng-bind="partner.business_name"></p>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label col-sm-2">Card Acceptor Name</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.acceptor_name"></p>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Store Name</label> <label class="control-label col-sm-2">Store Name</label>
<div class="col-sm-10"> <div class="col-sm-10">
@ -659,6 +825,20 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label col-sm-2">Expected credit card monthly revenue ($)</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.expected_card_revenue"></p>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Average credit card transaction value ($)</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.average_card_transaction"></p>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -748,6 +928,16 @@
</div> </div>
</div> </div>
<!-- IT联系人信息 -->
<div class="form-group col-sm-6" ng-if="partner.it_contact_person_email">
<label class="control-label col-sm-4">IT Contact Person E-mail</label>
<div class="col-sm-8">
<p class="form-control-static">
<span ng-bind="partner.it_contact_person_email"></span>
</p>
</div>
</div>
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
<label class="control-label col-sm-4">Job Title</label> <label class="control-label col-sm-4">Job Title</label>
@ -1072,11 +1262,42 @@
ng-if="$root.complianceCheck.clientInfo"></i> ng-if="$root.complianceCheck.clientInfo"></i>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label col-sm-2">Merchant Warrior Industry</label>
<div class="col-sm-10">
<p class="form-control-static industry-p" ng-if="partner.mw_industry">
{{partner.mw_industry}}
</p>
<i class="fa fa-check-square-o check-i" aria-hidden="true"
ng-if="$root.complianceCheck.clientInfo"></i>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">
Card Service Selection</label>
<div class="col-sm-8">
<span class="checkbox-inline">
<label>
<input type="checkbox" checked disabled ng-if="partner.mw_industry">
<input type="checkbox" disabled ng-if="!partner.mw_industry">
Australia Credit Card Payment|澳大利亚信用卡支付
</label>
</span>
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-if="partner.enable_international_card" checked disabled>
<input type="checkbox" ng-if="!partner.enable_international_card" disabled>
International Credit Card Payment|国际信用卡支付
</label>
</span>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div style="text-align: center"> <div style="text-align: center">
<a role="button" style="margin-bottom: 25px;" class="btn btn-danger btn-sm ng-scope" ng-click="deleteClient()">Destroy</a>
<a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope" <a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope"
ng-if="('10'|withRole)" ng-click="complianceCheck()">check</a> ng-if="('10'|withRole)" ng-click="complianceCheck()">check</a>
</div> </div>

@ -10,6 +10,17 @@
background-color: #f7bf90; background-color: #f7bf90;
border-color: #adadad; border-color: #adadad;
} }
.form-control-float {
float: left;
width: 93%; !important;
}
.form-control-span{
height: 34px;
}
.check-box {
zoom: 130%;
margin-right: 5px;
}
</style> </style>
<section class="content-header"> <section class="content-header">
<h1 ng-bind="partner.short_name"></h1> <h1 ng-bind="partner.short_name"></h1>
@ -26,6 +37,24 @@
<form novalidate name="partnerForm"> <form novalidate name="partnerForm">
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="row">
<div class="col-sm-12 analysis-nav">
<ul class="nav nav-pills">
<li ng-class="{active:partner.enable_cross_payment}" style="cursor: pointer">
<a ng-click="enablePaymentType('enable_cross_payment')">
<input ng-if="partner.enable_cross_payment" type="checkbox" class="check-box" style="margin-right: 5px;" checked>
<input ng-if="!partner.enable_cross_payment" type="checkbox" class="check-box" style="margin-right: 5px;">
<span>跨境支付|Cross-border Payment</span></a>
</li>
<li ng-class="{active:partner.enable_card_payment}" style="cursor: pointer">
<a ng-click="enablePaymentType('enable_card_payment')">
<input ng-if="partner.enable_card_payment" type="checkbox" class="check-box" style="margin-right: 5px;" checked>
<input ng-if="!partner.enable_card_payment" type="checkbox" class="check-box" style="margin-right: 5px;">
<span>卡支付|Card Payment</span></a>
</li>
</ul>
</div>
</div>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading">Partner Basic Information</div> <div class="panel-heading">Partner Basic Information</div>
<div class="panel-body"> <div class="panel-body">
@ -82,7 +111,7 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.business_name.$invalid && partnerForm.business_name.$dirty}"> ng-class="{'has-error':partnerForm.business_name.$invalid && partnerForm.business_name.$dirty}">
<label class="control-label col-sm-2" for="business-name-input">Business Name</label> <label class="control-label col-sm-2" for="business-name-input">* Business Name</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input id="business-name-input" ng-model="partner.business_name" class="form-control" <input id="business-name-input" ng-model="partner.business_name" class="form-control"
type="text" name="business_name" maxlength="100"> type="text" name="business_name" maxlength="100">
@ -93,7 +122,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.store_name.$invalid && partnerForm.store_name.$dirty}"> ng-class="{'has-error':partnerForm.store_name.$invalid && partnerForm.store_name.$dirty}">
<label class="control-label col-sm-2" for="store-name-input"> <label class="control-label col-sm-2" for="store-name-input">
* Store Name</label> * Store Name</label>
@ -111,9 +140,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div ng-if="!('100'|withRole)"> <div ng-if="!('100'|withRole)">
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.company_name.$invalid && partnerForm.company_name.$dirty}"> ng-class="{'has-error':partnerForm.company_name.$invalid && partnerForm.company_name.$dirty}">
@ -162,7 +189,7 @@
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.store_name.$invalid && partnerForm.store_name.$dirty}"> ng-class="{'has-error':partnerForm.store_name.$invalid && partnerForm.store_name.$dirty}">
<label class="control-label col-sm-2" for="store-name-input"> <label class="control-label col-sm-2" for="store-name-input">
* Store Name</label> * Store Name</label>
@ -181,8 +208,24 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.enable_card_payment"
<div class="form-group" ng-class="{'has-error':partnerForm.acceptor_name.$invalid && partnerForm.acceptor_name.$dirty}">
<label class="control-label col-sm-2" for="card-acceptor-input">* Card Acceptor Name</label>
<div class="col-sm-8">
<input id="card-acceptor-input" ng-model="partner.acceptor_name" required
class="form-control"
type="text" name="acceptor_name" maxlength="19">
<div ng-messages="partnerForm.acceptor_name.$error"
ng-if="partnerForm.acceptor_name.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
<p class="small text-danger" ng-message="maxlength">Less
Than 19
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.business_structure.$invalid && partnerForm.business_structure.$dirty}"> 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> <label class="control-label col-sm-2" for="business-structure-input">Business Structure</label>
<div class="col-sm-8"> <div class="col-sm-8">
@ -206,20 +249,6 @@
<img ng-src="{{partner.logo_url}}" ng-if="partner.logo_url" style="height: 100px;"> <img ng-src="{{partner.logo_url}}" ng-if="partner.logo_url" style="height: 100px;">
</div> </div>
</div> </div>
<!--<div class="form-group"-->
<!--ng-class="{'has-error':partnerForm.abn.$invalid && partnerForm.abn.$dirty}">-->
<!--<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"-->
<!--required maxlength="20">-->
<!--<div ng-messages="partnerForm.abn.$error" ng-if="partnerForm.abn.$dirty">-->
<!--<p class="small text-danger" ng-message="required">Required Field</p>-->
<!--<p class="small text-danger" ng-message="maxlength">Less Than 20-->
<!--Characters(including symbols and spaces)</p>-->
<!--</div>-->
<!--</div>-->
<!--</div>-->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.abn.$invalid && partnerForm.abn.$dirty}" ng-if="partner.business_structure != 'Company'"> 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> <label class="control-label col-sm-2" for="abn-input">ABN</label>
@ -319,7 +348,7 @@
ng-click="toggleClientPayType('1')"> ng-click="toggleClientPayType('1')">
<i class="fa fa-mixcloud"></i> <i class="fa fa-mixcloud"></i>
线上</button> 线上</button>
<button class="btn btn-default" <button class="btn btn-default" ng-if="partner.enable_cross_payment"
ng-class="{active:partner.client_pay_type.indexOf('2')>=0}" ng-class="{active:partner.client_pay_type.indexOf('2')>=0}"
ng-click="toggleClientPayType('2')"> ng-click="toggleClientPayType('2')">
<i class="fa fa-shopping-basket"></i> <i class="fa fa-shopping-basket"></i>
@ -358,7 +387,7 @@
小程序</button> 小程序</button>
</div> </div>
</div> </div>
<div ng-if="partner.client_pay_type.indexOf('2')>=0"> <div ng-if="partner.client_pay_type.indexOf('2')>=0 && partner.enable_cross_payment">
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}"> ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">*Offline Scene Of Merchants</label> <label class="control-label col-sm-2">*Offline Scene Of Merchants</label>
@ -386,7 +415,7 @@
</div> </div>
</div> </div>
</div> </div>
<div ng-if="partner.client_pay_desc.join(',').indexOf('203')>=0"> <div ng-if="partner.client_pay_desc.join(',').indexOf('203')>=0 && partner.enable_cross_payment">
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}"> ng-class="{'has-error':partnerForm.client_offline.$invalid && partnerForm.client_offline.$dirty}">
<label class="control-label col-sm-2">* POS</label> <label class="control-label col-sm-2">* POS</label>
@ -457,7 +486,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.client_pay_type.indexOf('2')>=0"> <div class="form-group" ng-if="partner.client_pay_type.indexOf('2')>=0 && partner.enable_cross_payment">
<label class="control-label col-sm-2">* Shop Photo</label> <label class="control-label col-sm-2">* Shop Photo</label>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-control-static"><em>1:</em>&nbsp; <div class="form-control-static"><em>1:</em>&nbsp;
@ -488,11 +517,43 @@
</a> </a>
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.enable_card_payment"
ng-class="{'has-error':partnerForm.expected_card_revenue.$invalid && partnerForm.expected_card_revenue.$dirty}">
<label class="control-label col-sm-2" for="expected_card_revenue-input">*
Expected credit card monthly revenue ($)</label>
<div class="col-sm-8">
<input type="number" name="expected_card_revenue" class="form-control form-control-float"
ng-model="partner.expected_card_revenue"
id="expected_card_revenue-input" required min="0">
<span class="input-group-addon form-control-span">$</span>
<div ng-messages="partnerForm.expected_card_revenue.$error"
ng-if="partnerForm.expected_card_revenue.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.enable_card_payment"
ng-class="{'has-error':partnerForm.average_card_transaction.$invalid && partnerForm.average_card_transaction.$dirty}">
<label class="control-label col-sm-2" for="average_card_transaction-input">*
Average credit card transaction value ($)</label>
<div class="col-sm-8">
<input type="number" name="average_card_transaction" class="form-control form-control-float"
ng-model="partner.average_card_transaction"
id="average_card_transaction-input" required min="0">
<span class="input-group-addon form-control-span">$</span>
<div ng-messages="partnerForm.average_card_transaction.$error"
ng-if="partnerForm.average_card_transaction.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="panel panel-default"> <div class="panel panel-default" ng-if="partner.enable_cross_payment">
<div class="panel-heading">Alipay Information &nbsp; <em class="small"><b>(Optional)</b></em></div> <div class="panel-heading">Alipay Information &nbsp; <em class="small"><b>(Optional)</b></em></div>
<div class="panel-body"> <div class="panel-body">
<div class="form-horizontal"> <div class="form-horizontal">
@ -578,7 +639,6 @@
Characters(including symbols and spaces)</p> Characters(including symbols and spaces)</p>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.contact_job.$invalid && partnerForm.contact_job.$dirty}"> ng-class="{'has-error':partnerForm.contact_job.$invalid && partnerForm.contact_job.$dirty}">
<label class="control-label col-sm-2" for="contact_job-id">* <label class="control-label col-sm-2" for="contact_job-id">*
@ -595,6 +655,7 @@
Characters(including symbols and spaces)</p> Characters(including symbols and spaces)</p>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2" for="contact_wechatid-id"> <label class="control-label col-sm-2" for="contact_wechatid-id">
Wechat ID</label> Wechat ID</label>
@ -604,10 +665,20 @@
maxlength="50"> maxlength="50">
</div> </div>
</div> </div>
<!-- IT联系人信息 -->
<div class="form-group">
<label class="control-label col-sm-2" for="it-contact-person-email-id">
IT Contact Person E-mail</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.it_contact_person_email"
name="it_contact_person_email" id="it-contact-person-email-id"
maxlength="50">
</div>
</div>
<div> <div>
<label><input type="checkbox" ng-click="checkboxOnclick(this)">Legal Representative Same As Contact Information</label> <label><input type="checkbox" ng-click="checkboxOnclick(this)">Legal Representative Same As Contact Information</label>
</div> </div>
<div> <div ng-if="partner.enable_cross_payment">
<label><input type="checkbox" ng-click="checkMarketingSameAsContact(this)">Marketing Person Same As Contact Information</label> <label><input type="checkbox" ng-click="checkMarketingSameAsContact(this)">Marketing Person Same As Contact Information</label>
</div> </div>
</div> </div>
@ -719,8 +790,8 @@
</div> </div>
</div> </div>
<div>&nbsp;&nbsp;Marketing Person</div> <div ng-if="partner.enable_cross_payment">&nbsp;&nbsp;Marketing Person</div>
<div class="panel-body"> <div class="panel-body" ng-if="partner.enable_cross_payment">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.marketing_person.$invalid && partnerForm.marketing_person.$dirty}"> ng-class="{'has-error':partnerForm.marketing_person.$invalid && partnerForm.marketing_person.$dirty}">
@ -1070,81 +1141,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="panel panel-info">
<div class="panel-heading">Alipay Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">
<label class="control-label col-sm-4"
for="alipay_category">*Category</label>
<div class="col-sm-8" >
<input class="form-control" id="alipay_category" required
name="alipay_category" readonly
ng-model="partner.alipayindustry|partner_alipay_industry"
multi-level-select-popup="alipayMccCategory"
on-select="onAlipayMccSelect($selected)"
chose-one-level="false">
<div ng-messages="partnerForm.alipay_category.$error"
ng-if="partnerForm.alipay_category.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading" style="background:#62b900">wechat Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}">
<label class="control-label col-sm-2" for="industry-input">
*Industry</label>
<div class="col-sm-8">
<select class="form-control" name="industry"
ng-model="partner.industry"
id="industry-input" required
ng-options="industry.value as industry.label for industry in industries">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.industry.$error"
ng-if="partnerForm.industry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading" style="background:#d82d2d;color: #f6f6f6;">JD Parameters</div>
<div class="panel-body form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.jdindustry.$invalid && partnerForm.jdindustry.$dirty}">
<label class="control-label col-sm-2" for="jdindustry-input">
*Industry</label>
<div class="col-sm-8">
<select class="form-control" name="jdindustry"
ng-model="partner.jdindustry"
id="jdindustry-input" required
ng-options="industry.value as industry.label for industry in jdindustry">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.jdindustryindustry.$error"
ng-if="partnerForm.jdindustryindustry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
</div>
</div>-->
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading" style="color: #333;background-color: #f5f5f5;border-color: #ddd;">Industry</div> <div class="panel-heading" style="color: #333;background-color: #f5f5f5;border-color: #ddd;">Industry</div>
@ -1168,7 +1164,7 @@
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}"> ng-class="{'has-error':partnerForm.industry.$invalid && partnerForm.industry.$dirty}">
<label class="control-label col-sm-2" for="industry-input"> <label class="control-label col-sm-2" for="industry-input">
*Wechat Industry</label> *Wechat Industry</label>
@ -1187,7 +1183,7 @@
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group" ng-if="partner.enable_cross_payment"
ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}"> ng-class="{'has-error':partnerForm.alipay_category.$invalid && partnerForm.alipay_category.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-2"
for="alipay_category">*Alipay Category</label> for="alipay_category">*Alipay Category</label>
@ -1206,6 +1202,42 @@
</div> </div>
</div> </div>
<div class="form-group" ng-if="partner.enable_card_payment"
ng-class="{'has-error':partnerForm.mw-industry.$invalid && partnerForm.mw-industry.$dirty}">
<label class="control-label col-sm-2" for="mw-industry-input">
*Merchant Warrior Industry</label>
<div class="col-sm-8">
<select class="form-control" name="mw-industry"
ng-model="partner.mw_industry" required
id="mw-industry-input"
ng-options="industry.value as industry.label for industry in upayIndustrys">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.mw-industry.$error"
ng-if="partnerForm.mw-industry.$dirty">
<p class="small text-danger" ng-message="required">Required
Field</p>
</div>
</div>
</div>
<div class="form-group" ng-if="partner.enable_card_payment">
<label class="control-label col-sm-2" for="mw-industry-input">
*Card Service Selection</label>
<div class="col-sm-8">
<span class="checkbox-inline">
<label>
<input type="checkbox" checked disabled
id="approving-check">
Australia Credit Card Payment|澳大利亚信用卡支付
</label>
</span>
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-model="partner.enable_international_card">
International Credit Card Payment|国际信用卡支付
</label>
</span>
</div>
</div> </div>
</div> </div>

@ -3,8 +3,7 @@
width: 100%; width: 100%;
} }
</style> </style>
<div class="panel panel-default"> <div class="panel-heading" style="padding: 0">Audit Files &nbsp;&nbsp;&nbsp;
<div class="panel-heading">Audit Files &nbsp;&nbsp;&nbsp;
<a class="btn-group btn btn-success" ng-if="file" ng-href="{{downloadAsZip()}}" target="_blank"> <a class="btn-group btn btn-success" ng-if="file" ng-href="{{downloadAsZip()}}" target="_blank">
<i class="fa fa-cloud-download">一键下载</i> <i class="fa fa-cloud-download">一键下载</i>
</a> </a>
@ -14,7 +13,7 @@
<div class="panel panel-info"> <div class="panel panel-info">
<div class="panel-heading"><h4> <div class="panel-heading"><h4>
Merchant Warrior商户风险评级 Merchant Warrior商户风险评级
<a class="small" role="button" ng-if="!id_info_form.edit" ng-click="id_info_form.edit=true"> <a class="small" role="button" ng-if="!id_info_form.edit && ('10'|withRole)" ng-click="id_info_form.edit=true">
<i class="fa fa-edit"></i></a> <i class="fa fa-edit"></i></a>
</h4></div> </h4></div>
<div class="panel-body"> <div class="panel-body">
@ -67,128 +66,211 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">* Merchant Warrior申请表</label> <label class="control-label col-sm-2">* Application Form | 商户申请表</label>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-control-static"> <div class="form-control-static">
<button class="btn btn-primary" type="button" <button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5 || partner.upay_approve_result==4))"
ngf-select="uploadApplyFile($file)"> ngf-select="uploadApplicationFile($file)">
<i class="fa fa-upload"></i> Upload <i class="fa fa-upload"></i> Upload
</button> </button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_application_form}}" ><i class="fa fa-download"></i></a> <a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_application_form}}" ><i class="fa fa-download"></i></a>
</div> </div>
<uib-progressbar value="bankFileProgress.value" ng-if="bankFileProgress"></uib-progressbar> <uib-progressbar value="applicationFileProgress.value" ng-if="applicationFileProgress"></uib-progressbar>
<table> <a ng-if="applicationIsImage" target="_blank" ng-href="{{file.upay_application_form}}">
<tbody>
<tr>
<td><a ng-if="bankIsImage" target="_blank" ng-href="{{file.upay_application_form}}">
<img ng-src="{{file.upay_application_form}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'"> <img ng-src="{{file.upay_application_form}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a> </a>
</td>
</tr>
</tbody>
</table>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">* Letter of Offer邀约信 </label> <label class="control-label col-sm-2">* Six Months Bank Statement | 六个月银行对账单</label>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-control-static"> <div class="form-control-static">
<button class="btn btn-primary" type="button" <button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5 || partner.upay_approve_result==4))"
ngf-select="uploadOfferFile($file)"> ngf-select="uploadBankFile($file)">
<i class="fa fa-upload"></i> Upload <i class="fa fa-upload"></i> Upload
</button> </button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_offer_letter}}" ><i class="fa fa-download"></i></a> <a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.client_bank_file}}" ><i class="fa fa-download"></i></a>
</div> </div>
<uib-progressbar value="idFileProgress.value" ng-if="idFileProgress"></uib-progressbar> <uib-progressbar value="bankFileProgress.value" ng-if="bankFileProgress"></uib-progressbar>
<table> <a ng-if="bankIsImage" target="_blank" ng-href="{{file.client_bank_file}}">
<tbody> <img ng-src="{{file.client_bank_file}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
<tr>
<td><a ng-if="idIsImage" target="_blank" ng-href="{{file.upay_offer_letter}}">
<img ng-src="{{file.upay_offer_letter}}"class="col-sm-6"onerror="this.src='/static/images/file_close.png'">
</a> </a>
</td>
</tr>
</tbody></table>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">* Merchant Warrior商户签署协议</label> <label class="control-label col-sm-2">* ASIC Current Company Extract | ASIC 当前公司信息摘录</label>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-control-static"> <div class="form-control-static">
<button class="btn btn-primary" type="button" <button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5 || partner.upay_approve_result==4))"
ngf-select="uploadAgreementFile($file)"> ngf-select="uploadASICFile($file)">
<i class="fa fa-upload"></i> Upload <i class="fa fa-upload"></i> Upload
</button> </button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_agreement_file}}" ><i class="fa fa-download"></i></a> <a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.client_company_file}}" ><i class="fa fa-download"></i></a>
</div> </div>
<uib-progressbar value="companyFileProgress.value" ng-if="companyFileProgress"></uib-progressbar> <uib-progressbar value="ASICProgress.value" ng-if="ASICProgress"></uib-progressbar>
<table><tbody> <a ng-if="asicIsImage" target="_blank" ng-href="{{file.client_company_file}}">
<tr> <img ng-src="{{file.client_company_file}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
<td><a ng-if="companyIsImage" target="_blank" ng-href="{{file.upay_agreement_file}}">
<img ng-src="{{file.upay_agreement_file}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a> </a>
</td>
</tr>
</tbody></table>
</div> </div>
</div> </div>
<div class="form-horizontal">
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">* 最终受益人驾驶执照</label> <label class="control-label col-sm-2">* ID of Legal Representative 法人身份证明</label>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-control-static"> <div class="form-control-static">
<button class="btn btn-primary" type="button" <button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5 || partner.upay_approve_result==4))"
ngf-select="uploadDriverFile($file)"> ngf-select="uploadIdFile($file)">
<i class="fa fa-upload"></i> Upload <i class="fa fa-upload"></i> Upload
</button> </button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_driver_license}}" ><i class="fa fa-download"></i></a> <a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_driver_license}}" ><i class="fa fa-download"></i></a>
</div> </div>
<uib-progressbar value="agreementFileProgress.value" ng-if="agreementFileProgress"></uib-progressbar> <uib-progressbar value="idProgress.value" ng-if="idProgress"></uib-progressbar>
<table> <a ng-if="idIsImage" target="_blank" ng-href="{{file.upay_driver_license}}">
<tbody>
<tr>
<td><a ng-if="idIsImage" target="_blank" ng-href="{{file.upay_driver_license}}">
<img ng-src="{{file.upay_driver_license}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'"> <img ng-src="{{file.upay_driver_license}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a> </a>
</td>
</tr>
</tbody></table>
</div> </div>
</div> </div>
</div>
<div class="form-horizontal">
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">* 受益人居住证明文件</label> <label class="control-label col-sm-2">* Proof of Residential Address (One Utilities Bill) | 家庭住址证明 (一个水电煤网账单)</label>
<div class="col-sm-4"> <div class="col-sm-4">
<div class="form-control-static"> <div class="form-control-static">
<button class="btn btn-primary" type="button" <button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5 || partner.upay_approve_result==4))"
ngf-select="uploadResidenceFile($file)"> ngf-select="uploadResidenceFile($file)">
<i class="fa fa-upload"></i> Upload <i class="fa fa-upload"></i> Upload
</button> </button>
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i> <i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_residence_certificate}}" ><i class="fa fa-download"></i></a> <a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.kyc_utility_bill_file}}" ><i class="fa fa-download"></i></a>
</div> </div>
<uib-progressbar value="bankFileProgress.value" ng-if="applyFileProgress"></uib-progressbar> <uib-progressbar value="residenceFileProgress.value" ng-if="residenceFileProgress"></uib-progressbar>
<table> <a ng-if="utilityIsImage" target="_blank" ng-href="{{file.kyc_utility_bill_file}}">
<tbody> <img ng-src="{{file.kyc_utility_bill_file}}" class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
<tr> </a>
<td><a ng-if="idIsImage" target="_blank" ng-href="{{file.upay_residence_certificate}}"> </div>
<img ng-src="{{file.upay_residence_certificate}}" class="col-sm-6" onerror="this.src='/static/images/file_close.png'"> </div>
<div class="form-group">
<label class="control-label col-sm-2">* Refund and Exchange Policy | 退款和换货政策</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5 || partner.upay_approve_result==4))"
ngf-select="uploadRefundPolicyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.refund_exchange_policy}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="refundPolicyFileProgress.value" ng-if="refundPolicyFileProgress"></uib-progressbar>
<a ng-if="refundIsImage" target="_blank" ng-href="{{file.refund_exchange_policy}}">
<img ng-src="{{file.refund_exchange_policy}}" class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Privacy Policy | 隐私政策</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5 || partner.upay_approve_result==4))"
ngf-select="uploadPrivacyPolicyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true"ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_privacy_policy}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="privacyFileProgress.value" ng-if="privacyFileProgress"></uib-progressbar>
<a ng-if="privacyIsImage" target="_blank" ng-href="{{file.upay_privacy_policy}}">
<img ng-src="{{file.upay_privacy_policy}}" class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Card information Security Policy | 卡信息安全政策</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5 || partner.upay_approve_result==4))"
ngf-select="uploadCardPolicyFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" style="float: none" aria-hidden="true" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.card_security_policy}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="cardFileProgress.value" ng-if="cardFileProgress"></uib-progressbar>
<a ng-if="cardIsImage" target="_blank" ng-href="{{file.card_security_policy}}">
<img ng-src="{{file.card_security_policy}}" class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a> </a>
</td>
</tr>
</tbody></table>
</div> </div>
</div> </div>
<div class="form-group">
<label class="control-label col-sm-2">* Letter of Offer | 邀约信 </label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5 || partner.upay_approve_result==4))"
ngf-select="uploadLetterOfOfferFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_offer_letter}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="letterFileProgress.value" ng-if="letterFileProgress"></uib-progressbar>
<a ng-if="letterIsImage" target="_blank" ng-href="{{file.upay_offer_letter}}">
<img ng-src="{{file.upay_offer_letter}}"class="col-sm-6"onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Promotional Offer | 优惠费率信 </label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5 || partner.upay_approve_result==4))"
ngf-select="uploadPromotionalFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_promotional_offer}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="promotionalFileProgress.value" ng-if="promotionalFileProgress"></uib-progressbar>
<a ng-if="promotionalIsImage" target="_blank" ng-href="{{file.upay_promotional_offer}}">
<img ng-src="{{file.upay_promotional_offer}}"class="col-sm-6"onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Terms and Conditions | 条款</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5 || partner.upay_approve_result==4))"
ngf-select="uploadTermsFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_terms_conditions}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="termsFileProgress.value" ng-if="termsFileProgress"></uib-progressbar>
<a ng-if="termsIsImage" target="_blank" ng-href="{{file.upay_terms_conditions}}">
<img ng-src="{{file.upay_terms_conditions}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2">* Detailed Business Description详细的业务描述</label>
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button" ng-if="('10'|withRole) || (('100'|withRole) && (!partner.upay_approve_result || partner.upay_approve_result==0 || partner.upay_approve_result==5 || partner.upay_approve_result==4))"
ngf-select="uploadDescFile($file)">
<i class="fa fa-upload"></i> Upload
</button>
<i class="fa fa-check-square-o check-i" aria-hidden="true" style="float: none" ng-if="$root.complianceCheck.authFile"></i>
<a role="button" download="" target="_blank" class="btn-group btn btn-warning" type="button" href="{{file.upay_desc_file}}" ><i class="fa fa-download"></i></a>
</div>
<uib-progressbar value="descFileProgress.value" ng-if="descFileProgress"></uib-progressbar>
<a ng-if="descIsImage" target="_blank" ng-href="{{file.upay_desc_file}}">
<img ng-src="{{file.upay_desc_file}}"class="col-sm-6" onerror="this.src='/static/images/file_close.png'">
</a>
</div>
</div> </div>
</div> </div>
</div> </div>
<div style="text-align: center">
<a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope" ng-if="('10'|withRole)" ng-click="complianceCheck()">check</a>
</div> </div>

@ -205,36 +205,12 @@
<input type="checkbox" ng-model="paymentInfo.enable_alipay" bs-switch switch-change="toggleChannel('alipay')"> <input type="checkbox" ng-model="paymentInfo.enable_alipay" bs-switch switch-change="toggleChannel('alipay')">
</div> </div>
</div> </div>
<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">Bestpay|翼支付</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_bestpay" bs-switch switch-change="toggleChannel('bestpay')">
</div>
</div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<label class="col-xs-6 control-label">WeChat|微信</label> <label class="col-xs-6 control-label">WeChat|微信</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_wechat" bs-switch switch-change="toggleChannel('wechat')"> <input type="checkbox" ng-model="paymentInfo.enable_wechat" bs-switch switch-change="toggleChannel('wechat')">
</div> </div>
</div> </div>
<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">JD|京东</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_jd" bs-switch switch-change="toggleChannel('jd')">
</div>
</div>
<!--<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">HF|汇付</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_hf" bs-switch switch-change="toggleChannel('hf')">
</div>
</div>
<div class="form-group col-sm-4">
<label class="col-xs-6 control-label">Yeepay|易宝支付</label>
<div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.enable_yeepay" bs-switch switch-change="toggleChannel('yeepay')">
</div>
</div>-->
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<label class="col-xs-6 control-label">CB BankPay|快捷支付</label> <label class="col-xs-6 control-label">CB BankPay|快捷支付</label>
<div class="col-xs-6"> <div class="col-xs-6">
@ -489,6 +465,23 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 卡支付配置 -->
<div class="panel panel-default" ng-if="('111'|withRole) || ('retail_surcharge'|withFunc)" ng-if="paymentInfo.enable_international_card">
<div class="panel-heading">Card Payment Config</div>
<div class="panel-body">
<div class="form-horizontal">
<!-- 是否启用国际卡支付 -->
<div class="form-group" ng-if="'111'|withRole">
<label class="col-sm-2 control-label">Enable International Card</label>
<div class="col-sm-10">
<input type="checkbox" ng-model="paymentInfo.enable_international_card" bs-switch
switch-change="switchInternationalCard()">
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default" ng-if="('111'|withRole) || ('retail_surcharge'|withFunc)"> <div class="panel panel-default" ng-if="('111'|withRole) || ('retail_surcharge'|withFunc)">
<div class="panel-heading">Retail In Store Payment(App, WePayLite, Albert)</div> <div class="panel-heading">Retail In Store Payment(App, WePayLite, Albert)</div>
<div class="panel-body"> <div class="panel-body">

@ -220,6 +220,7 @@
<thead> <thead>
<tr> <tr>
<th>Settle Time</th> <th>Settle Time</th>
<th>Settle Version</th>
<th>Transaction Amount</th> <th>Transaction Amount</th>
<th>to Merchant</th> <th>to Merchant</th>
<th>Service Fee</th> <th>Service Fee</th>
@ -229,11 +230,15 @@
<tbody> <tbody>
<tr ng-repeat="log in settlementLogs"> <tr ng-repeat="log in settlementLogs">
<td> <td>
{{log.report_date}} {{log.report_date|limitTo:10}}
&nbsp;<span ng-if="$index==0&&padding" class="text-red"> &nbsp;<span ng-if="$index==0&&padding" class="text-red">
<i class="glyphicon glyphicon-time" uib-tooltip="清算正在执行中,以最终结果为准"></i> <i class="glyphicon glyphicon-time" uib-tooltip="清算正在执行中,以最终结果为准"></i>
</span> </span>
</td> </td>
<td>
<span ng-if="log.balance_group=='RPAY_SVC_CARD'">Card Payment</span>
<span ng-if="log.balance_group!='RPAY_SVC_CARD'">Cross-border Payment</span>
</td>
<td ng-bind="log.total"></td> <td ng-bind="log.total"></td>
<td ng-bind="log.income"></td> <td ng-bind="log.income"></td>
<td ng-bind="log.fee"></td> <td ng-bind="log.fee"></td>

@ -370,6 +370,16 @@
<label> <label>
<input type="checkbox" ng-model="params.approving" <input type="checkbox" ng-model="params.approving"
id="approving-check"> id="approving-check">
<img height="20px" src="/static/images/royalpay_sign_s.png">
等待合规
</label>
</span>
<span class="checkbox-inline">
<label>
<input type="checkbox" ng-model="params.card_approving"
id="card_approving-check">
<img height="20px" src="/static/images/card_payment_sign.png">
等待合规 等待合规
</label> </label>
</span> </span>
@ -476,7 +486,9 @@
<td ng-bind="partner.short_name"></td> <td ng-bind="partner.short_name"></td>
<td ng-bind="partner.sub_merchant_id"></td> <td ng-bind="partner.sub_merchant_id"></td>
<td ng-bind="partner.create_time"></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.open_status == 4))||(partner.approve_result==4 && !partner.open_status)||(partner.open_status==10)}"> <td class="row">
<div ng-if="partner.enable_cross_payment" class="col-xs-4" style="padding-left: 0;padding-right: 0" 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)}">
<img height="20px" src="/static/images/royalpay_sign_s.png">
<span ng-if="partner.approve_result==1 && partner.approve_time">通过({{partner.approve_time}})</span> <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>
<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>
@ -489,6 +501,25 @@
<span ng-if="partner.open_status==3 && partner.approve_result!=5">等待BD上传材料审核</span> <span ng-if="partner.open_status==3 && partner.approve_result!=5">等待BD上传材料审核</span>
<span ng-if="partner.open_status==10">绿色通道申请中</span> <span ng-if="partner.open_status==10">绿色通道申请中</span>
<span ng-if="partner.approve_result==4 && !partner.open_status"><i ng-if="partner.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true" title="被打回重新提交"></i>等待合规</span> <span ng-if="partner.approve_result==4 && !partner.open_status"><i ng-if="partner.refuse_remark.length>0" class="fa fa-reply" aria-hidden="true" title="被打回重新提交"></i>等待合规</span>
</div>
<div ng-if="partner.enable_card_payment">
<div ng-if="!partner.upay_approve_result" class="col-xs-4" style="padding-left: 0;padding-right: 0">
<img height="20px" src="/static/images/card_payment_sign.png"><span> 资料完善中</span>
</div>
<div ng-if="partner.upay_approve_result" style="padding-left: 0;padding-right: 0" class="col-xs-4" style="margin-left: 2px" ng-class="{'bg-green':(partner.upay_approve_result==2 && (partner.source==1 || partner.source==2)),'bg-red':((partner.upay_open_status==1||partner.upay_open_status==2||partner.upay_open_status==4) && partner.upay_approve_result!=3)||(partner.upay_approve_result==3 && (!partner.upay_open_status || partner.upay_open_status==1 || partner.upay_open_status == 4))||(partner.upay_approve_result==4 && !partner.upay_open_status)}">
<img height="20px" src="/static/images/card_payment_sign.png">
<span ng-if="partner.upay_approve_result==1 && partner.upay_approve_time">通过({{partner.upay_approve_time}})</span>
<span ng-if="!partner.upay_open_status && !partner.upay_approve_result && partner.upay_approve_result!=5 && partner.source!=4">资料完善中</span>
<span ng-if="!partner.upay_open_status && !partner.upay_approve_result && partner.upay_approve_result!=5 && partner.source==4">(自助开通)资料完善中</span>
<span ng-if="partner.upay_approve_result==0 && partner.upay_approve_time">不通过({{partner.upay_approve_time}})</span>
<span ng-if="partner.upay_approve_result==5">申请打回({{partner.upay_refuse_remark|limitTo:15}})</span>
<span ng-if="(partner.upay_open_status==1||partner.upay_open_status==4)"><i ng-if="partner.upay_refuse_remark.length>0" class="fa fa-reply" aria-hidden="true" title="被打回重新提交"></i>等待合规</span>
<span ng-if="partner.upay_open_status==2">合同制作完成</span>
<span ng-if="partner.upay_open_status==3 && partner.upay_approve_result!=5">等待BD上传材料审核</span>
<span ng-if="partner.upay_approve_result==4 && !partner.upay_open_status"><i ng-if="partner.upay_refuse_remark.length>0" class="fa fa-reply" aria-hidden="true" title="被打回重新提交"></i>等待合规</span>
</div>
</div>
</td> </td>
<td ng-bind="partner.org_name"></td> <td ng-bind="partner.org_name"></td>
<td ng-bind="partner.bd_user_name"></td> <td ng-bind="partner.bd_user_name"></td>

@ -222,6 +222,9 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
$scope.getClearingTransactions = function (client_id, detailId) { $scope.getClearingTransactions = function (client_id, detailId) {
clearingDetailService.clientClearingDetail(client_id, detailId, true) clearingDetailService.clientClearingDetail(client_id, detailId, true)
} }
$scope.getClearingTransactionsOfUpaySettle = function (client_id, detailId) {
clearingDetailService.clientClearingDetailOfUpaySettle(client_id, detailId, true)
}
$scope.getClearingTransactionsOfMergeSettle = function (client_id, reportDate) { $scope.getClearingTransactionsOfMergeSettle = function (client_id, reportDate) {
clearingDetailService.clientClearingDetailOfMergeSettle(client_id, reportDate) clearingDetailService.clientClearingDetailOfMergeSettle(client_id, reportDate)
} }

@ -389,7 +389,8 @@
</button> </button>
<ul class="dropdown-menu" uib-dropdown-menu aria-labelledby="single-button" <ul class="dropdown-menu" uib-dropdown-menu aria-labelledby="single-button"
style="min-width: 80px"> style="min-width: 80px">
<li><a target="_blank" ng-href="{{export('pdf')}}">PDF</a></li> <li><a target="_blank" ng-href="{{export('pdf')}}">Cross-border Payment PDF</a></li>
<!-- <li><a target="_blank" ng-href="{{export('upay-pdf')}}">Card Payment PDF</a></li>-->
<li><a target="_blank" ng-href="{{export('excel')}}">EXCEL</a></li> <li><a target="_blank" ng-href="{{export('excel')}}">EXCEL</a></li>
<li><a target="_blank" <li><a target="_blank"
ng-href="{{export('excel_detail')}}">EXCEL(Detail)</a></li> ng-href="{{export('excel_detail')}}">EXCEL(Detail)</a></li>

@ -55,6 +55,17 @@
<img src="/static/images/lakalapay_sign_lg.png"> <img src="/static/images/lakalapay_sign_lg.png">
</a> </a>
</li> </li>
<li ng-class="{active:ctrl.channel=='rpaypmt_card'}" ng-if="report.channels.rpaypmt_card">
<a role="button" ng-click="ctrl.channel='rpaypmt_card';channelAndDayOfAnalysis()" title="rpaypmt_card">
<img src="/static/images/card_payment_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='rpaypmt_dd'}" ng-if="report.channels.rpaypmt_dd">
<a role="button" ng-click="ctrl.channel='rpaypmt_dd';channelAndDayOfAnalysis()" title="rpaypmt_dd">
<img src="/static/images/direct_debit_sign_lg.png">
</a>
</li>
</ul> </ul>
</div> </div>
</div> </div>

@ -271,6 +271,7 @@
<thead> <thead>
<tr> <tr>
<th>Date</th> <th>Date</th>
<th>Settle Version</th>
<th>Transaction Amount(AUD)</th> <th>Transaction Amount(AUD)</th>
<th>Transfer to Merchant(AUD)</th> <th>Transfer to Merchant(AUD)</th>
<th>GST(AUD)</th> <th>GST(AUD)</th>
@ -285,6 +286,10 @@
{{log.clearing_time|limitTo:10}} {{log.clearing_time|limitTo:10}}
&nbsp;<span ng-if="$index==0&&padding" class="text-red"><i class="glyphicon glyphicon-time" uib-tooltip="清算正在执行中,以最终结果为准"></i></span> &nbsp;<span ng-if="$index==0&&padding" class="text-red"><i class="glyphicon glyphicon-time" uib-tooltip="清算正在执行中,以最终结果为准"></i></span>
</td> </td>
<td>
<span ng-if="log.balance_group=='RPAY_SVC_CARD'">Card Payment</span>
<span ng-if="log.balance_group!='RPAY_SVC_CARD'">Cross-border Payment</span>
</td>
<td ng-bind="log.total"></td> <td ng-bind="log.total"></td>
<td ng-bind="log.income"></td> <td ng-bind="log.income"></td>
<td ng-bind="log.tax_amount"></td> <td ng-bind="log.tax_amount"></td>
@ -304,6 +309,19 @@
<i class="fa fa-download"></i> <i class="fa fa-download"></i>
</a> </a>
</td> </td>
<!-- <td ng-if="!log.merge_settle && log.balance_group =='RPAY_SVC_CARD'">-->
<!-- <a role="button" class="text-bold"-->
<!-- ng-if="(log.clearing_time|limitTo:10) >= '2017-01-12'"-->
<!-- ng-click="getClearingTransactionsOfUpaySettle(log.client_id,log.clear_detail_id)"-->
<!-- title="Detail">-->
<!-- <i class="fa fa-list-alt"></i>-->
<!-- </a>-->
<!-- <a ng-href="/client/clean_logs/{{log.client_id}}/settlement_logs/{{log.clear_detail_id}}/export"-->
<!-- target="_blank" ng-if="(log.clearing_time|limitTo:10) >= '2017-01-12'"-->
<!-- title="Download">-->
<!-- <i class="fa fa-download"></i>-->
<!-- </a>-->
<!-- </td>-->
<td ng-if="log.merge_settle"> <td ng-if="log.merge_settle">
<a role="button" class="text-bold" <a role="button" class="text-bold"
ng-if="(log.clearing_time|limitTo:10) >= '2017-01-12'" ng-if="(log.clearing_time|limitTo:10) >= '2017-01-12'"

@ -0,0 +1,258 @@
<div class="modal-header">
<h4>Transactions{{report.client_moniker?'('+report.client_moniker+')':''}}</h4>
</div>
<div class="modal-body">
<div class="box box-warning">
<div class="box-body">
<ul class="nav nav-pills">
<li ng-class="{active:ctrl.channel==null}">
<a role="button" ng-click="ctrl.channel=null;channelAndDayOfAnalysis()" title="All">
<img src="/static/images/royalpay_sign.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Wechat'}" ng-if="report.channels.Wechat">
<a role="button" ng-click="ctrl.channel='Wechat';channelAndDayOfAnalysis()" title="Wechat">
<img src="/static/images/wechatpay_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Alipay'}" ng-if="report.channels.Alipay">
<a role="button" ng-click="ctrl.channel='Alipay';channelAndDayOfAnalysis()" title="Alipay">
<img src="/static/images/alipay_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='AlipayOnline'}" ng-if="report.channels.AlipayOnline">
<a role="button" ng-click="ctrl.channel='AlipayOnline';channelAndDayOfAnalysis()" title="AlipayOnline">
<img src="/static/images/alipay_online.png" class="channel-icon-lg">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Bestpay'}" ng-if="report.channels.Bestpay">
<a role="button" ng-click="ctrl.channel='Bestpay';channelAndDayOfAnalysis()" title="Bestpay">
<img src="/static/images/bestpay_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='jd'}" ng-if="report.channels.jd">
<a role="button" ng-click="ctrl.channel='jd';channelAndDayOfAnalysis()" title="JD Pay">
<img src="/static/images/jd_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='hf'}" ng-if="report.channels.hf">
<a role="button" ng-click="ctrl.channel='hf';channelAndDayOfAnalysis()" title="HF Pay">
<img src="/static/images/hf_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Rpay'}" ng-if="report.channels.Rpay">
<a role="button" ng-click="ctrl.channel='Rpay';channelAndDayOfAnalysis()" title="Rpay Pay">
<img src="/static/images/rpayplus_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='Yeepay'}" ng-if="report.channels.Yeepay">
<a role="button" ng-click="ctrl.channel='Yeepay';channelAndDayOfAnalysis()" title="Yeepay">
<img src="/static/images/yeepay_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='LakalaPay'}" ng-if="report.channels.LakalaPay">
<a role="button" ng-click="ctrl.channel='LakalaPay';channelAndDayOfAnalysis()" title="LakalaPay">
<img src="/static/images/lakalapay_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='rpaypmt_card'}" ng-if="report.channels.rpaypmt_card">
<a role="button" ng-click="ctrl.channel='rpaypmt_card';channelAndDayOfAnalysis()" title="rpaypmt_card">
<img src="/static/images/card_payment_sign_lg.png">
</a>
</li>
<li ng-class="{active:ctrl.channel=='rpaypmt_dd'}" ng-if="report.channels.rpaypmt_dd">
<a role="button" ng-click="ctrl.channel='rpaypmt_dd';channelAndDayOfAnalysis()" title="rpaypmt_dd">
<img src="/static/images/direct_debit_sign_lg.png">
</a>
</li>
</ul>
</div>
</div>
<div class="box box-warning">
<uib-tabset active="index">
<uib-tab index="0" heading="Analysis" ng-click="ctrl.day=null">
<div class="box-body">
<div class="row">
<!--<div class="col-xs-6 col-sm-3">-->
<!--<span class="col-xs-6 text-bold">Rate</span>-->
<!--<span class="col-xs-6" ng-bind="report.rate+'%'"></span>-->
<!--</div>-->
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Credit</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.total_payment|currency:''"></span>
<span ng-if="ctrl.channel!=null"class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_credit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Debit</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.total_refund|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_debit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Gross Amount</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.gross_amount|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].gross_amount|currency:''"></span>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Tax Amount</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.tax_amount|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].tax_amount|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Charge</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.total_charge|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].total_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">Channel Charge</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.wechat_charge|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6" ng-bind="report.channels[ctrl.channel].third_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3" ng-if="!is_partner">
<span class="col-xs-6 text-bold">RoyalPay Charge</span>
<span ng-if="ctrl.channel==null" class="col-xs-6" ng-bind="report.royalpay_charge|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6"
ng-bind="report.channels[ctrl.channel].royalpay_charge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Net Amount</span>
<span ng-if="ctrl.channel==null" class="col-xs-6"
ng-bind="report.clearing_amount|currency:''"></span>
<span ng-if="ctrl.channel!=null" class="col-xs-6"
ng-bind="(report.channels[ctrl.channel].gross_amount - report.channels[ctrl.channel].total_charge-report.channels[ctrl.channel].tax_amount)|currency:''"></span>
</div>
</div>
</div>
</uib-tab>
<uib-tab ng-repeat="(key,analysis) in channelAndDayMap" heading="{{key}}" ng-click="ctrl.day=key">
<div class="box-body" >
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Credit</span>
<span class="col-xs-6" ng-bind="analysis.total_credit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Debit</span>
<span class="col-xs-6" ng-bind="analysis.total_debit|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Gross Amount</span>
<span class="col-xs-6" ng-bind="analysis.gross_amount|currency:''"></span>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Tax Amount</span>
<span class="col-xs-6" ng-bind="analysis.tax_amount|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Charge</span>
<span class="col-xs-6" ng-bind="analysis.total_surcharge|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Net Amount</span>
<span class="col-xs-6" ng-bind="analysis.net_amount|currency:''"></span>
</div>
</div>
</div>
</uib-tab>
</uib-tabset>
</div>
<div class="box box-default">
<div class="box-header">Credits</div>
<div class="box-body">
<div class="table-responsive col-sm-12">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Order Id</th>
<th>Transaction Time</th>
<th>Currency</th>
<th>Input Amount</th>
<th>Total Amount</th>
<th>Transaction Fee (GST Inclu.)</th>
<th>Surcharge rate for RoyalPay</th>
<th>Surcharge Amount for RoyalPay</th>
<th>GST Amount for RoyalPay</th>
<th>Surcharge rate for Mini Program</th>
<th>Surcharge Amount for Mini Program</th>
<th>GST Amount for Mini Program </th>
<th ng-if="report.report[0].settle_amount!=null">Settle Amount</th>
<th>Remark</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in report.report|propsFilter:{transaction_type:'Credit',channel:ctrl.channel,transaction_time:ctrl.day}:true">
<td>
<img src="/static/images/royalpay_sign_s.png" uib-tooltip="RoyalPay" ng-if="tr.source=='system'"/>
<img src="/static/images/yangmaimai_sign.png" uib-tooltip="RP跨境商城" ng-if="tr.source=='RP跨境商城'"/>
<img class="channel-icon" ng-src="{{tr.channel|channel_image}}">{{tr.order_id}}
</td>
<td ng-bind="tr.transaction_time"></td>
<td ng-bind="tr.transaction_currency"></td>
<td ng-bind="tr.display_amount"></td>
<td ng-bind="tr.transaction_amount"></td>
<!--<td ng-bind="tr.surcharge_rate?(tr.surcharge_rate|percentage:1):report.channels[tr.channel].rate+'%'"></td>-->
<td>
{{(((tr.surcharge_rate * 100) > tr.rate_value)?((tr.surcharge_rate * 100-tr.rate_value)):(tr.surcharge_rate))|number:2}} %
</td>
<td ng-bind="(tr.real_royal_surcharge?tr.real_royal_surcharge:0)|currency:''"></td>
<td ng-bind="tr.royalpay_tax|currency:''"></td>
<td ng-bind="(tr.rate_value/100)|percentage:2"></td>
<td ng-bind="(tr.incremental_surcharge?tr.incremental_surcharge:0)|currency:''"></td>
<td ng-bind="tr.incremental_tax|currency:''"></td>
<td ng-if="tr.settle_amount!=null" ng-bind="tr.settle_amount|currency:''"></td>
<td ng-bind="tr.remark"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="box box-default">
<div class="box-header">Debits</div>
<div class="box-body">
<div class="table-responsive col-sm-12">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>Order Id</th>
<th>Transaction Time</th>
<th>Currency</th>
<th>Total Amount</th>
<th>Surcharge rate for RoyalPay</th>
<th>Surcharge Amount for RoyalPay</th>
<th>GST Amount for RoyalPay</th>
<th>Surcharge rate for Mini Program</th>
<th>Surcharge Amount for Mini Program</th>
<th>GST Amount for Mini Program </th>
<th>Settle Amount</th>
<th>Remark</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="tr in report.report|propsFilter:{transaction_type:'Debit',channel:ctrl.channel,transaction_time:ctrl.day}:true">
<td ng-bind="tr.order_id"></td>
<td ng-bind="tr.transaction_time"></td>
<td ng-bind="tr.transaction_currency"></td>
<td ng-bind="tr.transaction_amount"></td>
<td>
{{(((tr.surcharge_rate * 100) > tr.rate_value)?((tr.surcharge_rate * 100-tr.rate_value)):(tr.surcharge_rate))|number:2}} %
</td>
<td ng-bind="(tr.real_royal_surcharge?tr.real_royal_surcharge:0)|currency:''"></td>
<td ng-bind="tr.royalpay_tax|currency:''"></td>
<td ng-bind="(tr.rate_value/100)|percentage:2"></td>
<td ng-bind="(tr.incremental_surcharge?tr.incremental_surcharge:0)|currency:''"></td>
<td ng-bind="tr.incremental_tax|currency:''"></td>
<td ng-bind="tr.settle_amount"></td>
<td ng-bind="tr.remark"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>

@ -219,6 +219,9 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
if (type=='pdf'){ if (type=='pdf'){
url = '/client/trans_flow/report/pdf'; url = '/client/trans_flow/report/pdf';
} }
if (type=='upay-pdf'){
url = '/client/trans_flow/report/upay_pdf';
}
if (type=='excel'){ if (type=='excel'){
url='/client/trans_flow/report/excel'; url='/client/trans_flow/report/excel';
} }

Loading…
Cancel
Save