fix aps调整为两个渠道

master
Todking 3 years ago
parent 97fc014d93
commit ce05cb30f1

@ -1,5 +1,7 @@
package au.com.royalpay.payment.manage.citypartner.core.impls; package au.com.royalpay.payment.manage.citypartner.core.impls;
import au.com.royalpay.payment.channels.alipay.config.AlipayConfig;
import au.com.royalpay.payment.channels.alipay.runtime.alipayplus.AlipayPlusRuleManager;
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;
@ -8,6 +10,8 @@ import au.com.royalpay.payment.manage.mappers.financial.*;
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.defines.PayChannel;
import au.com.royalpay.payment.tools.defines.TradeType;
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;
@ -357,6 +361,11 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
BigDecimal wechatChargeRate = new BigDecimal("0.6"); BigDecimal wechatChargeRate = new BigDecimal("0.6");
BigDecimal jdChargeRate = new BigDecimal("0.9"); BigDecimal jdChargeRate = new BigDecimal("0.9");
BigDecimal alipayonlineChargeRate = new BigDecimal("0.6"); BigDecimal alipayonlineChargeRate = new BigDecimal("0.6");
BigDecimal retailInterchangeChargeRate = new BigDecimal("0.5");
BigDecimal retailServiceChargeRate = new BigDecimal("0.5");
BigDecimal onlineInterchangeChargeRate = new BigDecimal("0.5");
BigDecimal onlineServiceChargeRate = new BigDecimal("0.5");
if (sysConfig.getBigDecimal("Alipay_charge_rate") != null) { if (sysConfig.getBigDecimal("Alipay_charge_rate") != null) {
alipayChargeRate = sysConfig.getBigDecimal("Alipay_charge_rate"); alipayChargeRate = sysConfig.getBigDecimal("Alipay_charge_rate");
} }
@ -369,11 +378,28 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
if (sysConfig.getBigDecimal("alipayonline_charge_rate") != null) { if (sysConfig.getBigDecimal("alipayonline_charge_rate") != null) {
alipayonlineChargeRate = sysConfig.getBigDecimal("alipayonline_charge_rate"); alipayonlineChargeRate = sysConfig.getBigDecimal("alipayonline_charge_rate");
} }
if (sysConfig.getBigDecimal("retail_interchange_charge_rate") != null) {
retailInterchangeChargeRate = sysConfig.getBigDecimal("retail_interchange_charge_rate");
}
if (sysConfig.getBigDecimal("retail_service_charge_rate") != null) {
retailServiceChargeRate = sysConfig.getBigDecimal("retail_service_charge_rate");
}
if (sysConfig.getBigDecimal("online_interchange_charge_rate") != null) {
onlineInterchangeChargeRate = sysConfig.getBigDecimal("online_interchange_charge_rate");
}
if (sysConfig.getBigDecimal("online_service_charge_rate") != null) {
onlineServiceChargeRate = sysConfig.getBigDecimal("online_service_charge_rate");
}
JSONObject channelCharge = new JSONObject(); JSONObject channelCharge = new JSONObject();
channelCharge.put("alipayChargeRate", alipayChargeRate); channelCharge.put("alipayChargeRate", alipayChargeRate);
channelCharge.put("wechatChargeRate", wechatChargeRate); channelCharge.put("wechatChargeRate", wechatChargeRate);
channelCharge.put("jdChargeRate", jdChargeRate); channelCharge.put("jdChargeRate", jdChargeRate);
channelCharge.put("alipayonlineChargeRate", alipayonlineChargeRate); channelCharge.put("alipayonlineChargeRate", alipayonlineChargeRate);
channelCharge.put("retailInterchangeChargeRate", retailInterchangeChargeRate);
channelCharge.put("retailServiceChargeRate", retailServiceChargeRate);
channelCharge.put("onlineInterchangeChargeRate", onlineInterchangeChargeRate);
channelCharge.put("onlineServiceChargeRate", onlineServiceChargeRate);
List<JSONObject> transactionDetail = transactionMapper.listTransactionForCityPartnerCommissionByDate(year, month); List<JSONObject> transactionDetail = transactionMapper.listTransactionForCityPartnerCommissionByDate(year, month);
transactionDetail.forEach(item -> { transactionDetail.forEach(item -> {
@ -451,13 +477,28 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
if (orgInfo.get("alipayonlinecn_rate_value") == null) { if (orgInfo.get("alipayonlinecn_rate_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下" + oneChannel.getKey() + "成本手续费未设置"); throw new ServerErrorException(orgInfo.getString("name") + "组织下" + oneChannel.getKey() + "成本手续费未设置");
} }
} else if (StringUtils.equals(channel.toLowerCase(), "apsinstore")) {
if (orgInfo.get("retail_interchange_fee_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下A+(Retail)的 Interchange Fee 成本手续费未设置");
}
if (orgInfo.get("retail_service_fee_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下A+(Retail)的 Service Fee 成本手续费未设置");
}
} else if (StringUtils.equals(channel.toLowerCase(), "apscashier")) {
if (orgInfo.get("online_interchange_fee_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下A+(Online)的 Interchange Fee 成本手续费未设置");
}
if (orgInfo.get("online_service_fee_value") == null) {
throw new ServerErrorException(orgInfo.getString("name") + "组织下A+(Online)的 Service Fee 成本手续费未设置");
}
} else { } else {
throw new ServerErrorException(orgInfo.getString("name") + "组织下" + oneChannel.getKey() + "成本手续费未设置"); throw new ServerErrorException(orgInfo.getString("name") + "组织下" + oneChannel.getKey() + "成本手续费未设置");
} }
} }
PayChannel payChannel = PayChannel.fromChannelCode(channel);
for (JSONObject params : oneChannel.getValue()) { for (JSONObject params : oneChannel.getValue()) {
if (StringUtils.equals("rpaypmt_card", channel.toLowerCase())) { if (payChannel == PayChannel.RPAY_CHANNEL_CARD) {
//rpaypmt_domestic_card //rpaypmt_domestic_card
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("rpaypmt_domestic_card" + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN)); BigDecimal channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("rpaypmt_domestic_card" + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
@ -489,7 +530,22 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee")); transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee"));
} else { } else {
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 = null;
if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) {
if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("interchange_fee_value").add(orgInfo.getBigDecimal("service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
} else if (payChannel == PayChannel.ALIPAY_APS_CASHIER) {
if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipayonline_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("interchange_fee_value").add(orgInfo.getBigDecimal("service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
//增加transaction_fee为null异常 //增加transaction_fee为null异常
if (!params.containsKey("transaction_fee") || StringUtils.isEmpty(params.getString("transaction_fee"))) { if (!params.containsKey("transaction_fee") || StringUtils.isEmpty(params.getString("transaction_fee"))) {
params.put("transaction_fee", BigDecimal.ZERO); params.put("transaction_fee", BigDecimal.ZERO);
@ -514,7 +570,13 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
json.put("total_charge", total_surage); json.put("total_charge", total_surage);
json.put("transaction_fee", transaction_fee); json.put("transaction_fee", transaction_fee);
json.put("net_charge", net_surage); json.put("net_charge", net_surage);
if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) {
json.put("org_rate", (orgInfo.getBigDecimal("retail_interchange_fee_value").add(orgInfo.getBigDecimal("retail_service_fee_value"))));
} else if (payChannel == PayChannel.ALIPAY_APS_CASHIER) {
json.put("org_rate", (orgInfo.getBigDecimal("online_interchange_fee_value").add(orgInfo.getBigDecimal("online_service_fee_value"))));
} else {
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);
json.put("org_charge", org_charge.signum() < 0 ? new BigDecimal(0) : org_charge); json.put("org_charge", org_charge.signum() < 0 ? new BigDecimal(0) : org_charge);
json.put("commission_type", "1"); json.put("commission_type", "1");
@ -539,7 +601,21 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
String channel = oneChannel.getKey(); String channel = oneChannel.getKey();
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;
if (StringUtils.equals("alipayaps", channel.toLowerCase())) {
if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) {
AlipayConfig.BizType bizType = AlipayPlusRuleManager.getRules().determineAmsBizType(TradeType.fromGatewayNumber(params.getInteger("gateway")));
if (bizType == AlipayConfig.BizType.RETAIL) {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipayonline_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("interchange_fee_value").add(orgInfo.getBigDecimal("service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
//增加transaction_fee为null异常 //增加transaction_fee为null异常
if (!params.containsKey("transaction_fee") || StringUtils.isEmpty(params.getString("transaction_fee"))) { if (!params.containsKey("transaction_fee") || StringUtils.isEmpty(params.getString("transaction_fee"))) {
params.put("transaction_fee", BigDecimal.ZERO); params.put("transaction_fee", BigDecimal.ZERO);
@ -565,7 +641,11 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
json.put("gross_amount", total); json.put("gross_amount", total);
json.put("total_charge", total_surage); json.put("total_charge", total_surage);
json.put("net_charge", net_surage); json.put("net_charge", net_surage);
if (StringUtils.equals("alipayaps", channel.toLowerCase())) {
json.put("org_rate", (orgInfo.getBigDecimal("interchange_fee_value").add(orgInfo.getBigDecimal("service_fee_value"))));
} else {
json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value")); json.put("org_rate", orgInfo.getBigDecimal(channel.toLowerCase() + "_rate_value"));
}
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);
@ -611,6 +691,7 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
rateChannel); rateChannel);
} catch (Exception e) { } catch (Exception e) {
} }
PayChannel payChannel = PayChannel.fromChannelCode(channel);
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");
if (StringUtils.equals(channel.toLowerCase() + "_rate_value", "rpaypmt_card_rate_value")) { if (StringUtils.equals(channel.toLowerCase() + "_rate_value", "rpaypmt_card_rate_value")) {
@ -659,7 +740,22 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
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")); transaction_fee = transaction_fee.add(params.getBigDecimal("transaction_fee"));
} else { } else {
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;
if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) {
if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("aliapy_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("interchange_fee_value").add(orgInfo.getBigDecimal("service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
} else if (payChannel == PayChannel.ALIPAY_APS_CASHIER) {
if ("alipay_cn".equalsIgnoreCase(params.getString("pay_type"))) {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : (orgInfo.getBigDecimal("alipayonline_rate_value").divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
} else {
channelRate = params.get("org_rate") != null ? params.getBigDecimal("org_rate") : ((orgInfo.getBigDecimal("interchange_fee_value").add(orgInfo.getBigDecimal("service_fee_value"))).divide(CommonConsts.HUNDRED, 4, RoundingMode.DOWN));
}
} else {
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") BigDecimal tmpTotalSurcharge = params.getBigDecimal("total_surcharge")
.subtract(params.getBigDecimal("surcharge_cashback")) .subtract(params.getBigDecimal("surcharge_cashback"))
.subtract(params.getBigDecimal("transaction_fee")); .subtract(params.getBigDecimal("transaction_fee"));
@ -705,7 +801,13 @@ public class CityPartnerPrizeServiceImpl implements CityPartnerPrizeService {
} }
json.put("gross_amount", total); json.put("gross_amount", total);
json.put("total_charge", total_surage); json.put("total_charge", total_surage);
if (payChannel == PayChannel.ALIPAY_APS_IN_STORE) {
json.put("org_rate", (orgInfo.getBigDecimal("retail_interchange_fee_value").add(orgInfo.getBigDecimal("retail_service_fee_value"))));
} else if (payChannel == PayChannel.ALIPAY_APS_CASHIER) {
json.put("org_rate", (orgInfo.getBigDecimal("online_interchange_fee_value").add(orgInfo.getBigDecimal("online_service_fee_value"))));
} else {
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);
if (type == 1) { if (type == 1) {
json.put("net_charge", net_surage); json.put("net_charge", net_surage);

@ -554,9 +554,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("enable_alipayplus", true); client.put("enable_alipayplus", true);
} }
client.put("enable_alipayaps", false); client.put("enable_alipayaps", false);
MerchantChannelPermissionResolver resolverAps = this.paymentApi.channelApi(PayChannel.ALIPAY_APS.getChannelCode()).getChannelPermissionResolver(); MerchantChannelPermissionResolver resolverApsInStore = this.paymentApi.channelApi(PayChannel.ALIPAY_APS_IN_STORE.getChannelCode()).getChannelPermissionResolver();
if (!Objects.isNull(resolver) && MerchantChannelPermissionResolver resolverApsCashier = this.paymentApi.channelApi(PayChannel.ALIPAY_APS_CASHIER.getChannelCode()).getChannelPermissionResolver();
resolverAps.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency())) { if(!Objects.isNull(resolverApsInStore) && !Objects.isNull(resolverApsCashier) &&
(resolverApsInStore.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency()) ||
resolverApsCashier.newOrderEnabled(client, null, PlatformEnvironment.getEnv().getForeignCurrency()))){
client.put("enable_alipayaps", true); client.put("enable_alipayaps", true);
} }
ApsConfigData apsConfig = apsConfigService.getApsConfigByClientId(client.getString("client_id")); ApsConfigData apsConfig = apsConfigService.getApsConfigByClientId(client.getString("client_id"));
@ -2013,15 +2015,18 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
checkAddRate(config, "AlipayOnline", "alipayonline_rate_value", org, "min_alipayonline_rate"); checkAddRate(config, "AlipayOnline", "alipayonline_rate_value", org, "min_alipayonline_rate");
checkAddRate(config, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate"); checkAddRate(config, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
checkAddRate(config, "CB_BankPay", "min_cb_bankpay_value", org, "min_cb_bankpay_rate"); checkAddRate(config, "CB_BankPay", "min_cb_bankpay_value", org, "min_cb_bankpay_rate");
checkAddRate(config, "AlipayAps Interchange Fee", "interchange_fee_value", org, "min_interchange_fee_rate"); checkAddRate(config, "AlipayAps Retail Interchange Fee", "retail_interchange_fee_value", org, "min_retail_interchange_fee_rate");
checkAddRate(config, "AlipayAps Serivce Fee", "service_fee_value", org, "min_service_fee_rate"); checkAddRate(config, "AlipayAps Retail Serivce Fee", "retail_service_fee_value", org, "min_retail_service_fee_rate");
checkAddRate(config, "AlipayAps Online Interchange Fee", "online_interchange_fee_value", org, "min_online_interchange_fee_rate");
checkAddRate(config, "AlipayAps Online Serivce Fee", "online_service_fee_value", org, "min_online_service_fee_rate");
configNewClientRate(config, clientId, "Wechat", "wechat_rate_value", org, "min_wechat_rate"); configNewClientRate(config, clientId, "Wechat", "wechat_rate_value", org, "min_wechat_rate");
configNewClientRate(config, clientId, "Alipay", "alipay_rate_value", org, "min_alipay_rate"); configNewClientRate(config, clientId, "Alipay", "alipay_rate_value", org, "min_alipay_rate");
configNewClientRate(config, clientId, "AlipayOnline", "alipayonline_rate_value", org, "min_alipayonline_rate"); configNewClientRate(config, clientId, "AlipayOnline", "alipayonline_rate_value", org, "min_alipayonline_rate");
configNewClientRate(config, clientId, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate"); configNewClientRate(config, clientId, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate");
configNewClientRate(config, clientId, "CB_BankPay", "cb_bankpay_rate_value", org, "min_cb_bankpay_rate"); configNewClientRate(config, clientId, "CB_BankPay", "cb_bankpay_rate_value", org, "min_cb_bankpay_rate");
configNewClientRate(config, clientId, "AlipayAps", "interchange_fee_value", null, ""); configNewClientRate(config, clientId, "ApsInStore", "retail_interchange_fee_value", null, "");
configNewClientRate(config, clientId, "ApsCashier", "online_interchange_fee_value", null, "");
addAlipayPlusRateConfig(config, clientId, PayChannel.ALIPAY_PLUS.getChannelCode()); addAlipayPlusRateConfig(config, clientId, PayChannel.ALIPAY_PLUS.getChannelCode());
} }
@ -2145,7 +2150,6 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
if (config.containsKey(rateKey)) { if (config.containsKey(rateKey)) {
if (org.containsKey(rateValueKey)) { if (org.containsKey(rateValueKey)) {
if (config.getBigDecimal(rateKey).compareTo(org.getBigDecimal(rateValueKey)) < 0) { if (config.getBigDecimal(rateKey).compareTo(org.getBigDecimal(rateValueKey)) < 0) {
throw new ForbiddenException("费率参数小于旗下商户最低" + channel + "费率,请重新输入"); throw new ForbiddenException("费率参数小于旗下商户最低" + channel + "费率,请重新输入");
} }
} }

@ -57,11 +57,14 @@ public class OrgInfo {
private Double min_rpaypmt_dd_rate; private Double min_rpaypmt_dd_rate;
private String state; private String state;
private String senior_parent_org_id; private String senior_parent_org_id;
private Double interchange_fee_value; private Double retail_interchange_fee_value;
private Double min_interchange_fee_value; private Double min_retail_interchange_fee_value;
private Double service_fee_value; private Double retail_service_fee_value;
private Double min_service_fee_value; private Double min_retail_service_fee_value;
private Double online_interchange_fee_value;
private Double min_online_interchange_fee_value;
private Double online_service_fee_value;
private Double min_online_service_fee_value;
public JSONObject toJsonParam() { public JSONObject toJsonParam() {
@ -333,6 +336,7 @@ public class OrgInfo {
public void setState(String state) { public void setState(String state) {
this.state = state; this.state = state;
} }
public String getSenior_parent_org_id() { public String getSenior_parent_org_id() {
return senior_parent_org_id; return senior_parent_org_id;
} }
@ -422,31 +426,67 @@ public class OrgInfo {
this.min_rpaypmt_overseas_card_rate = min_rpaypmt_overseas_card_rate; this.min_rpaypmt_overseas_card_rate = min_rpaypmt_overseas_card_rate;
} }
public Double getInterchange_fee_value(){ return interchange_fee_value; } public Double getRetail_interchange_fee_value() {
return retail_interchange_fee_value;
}
public void setRetail_interchange_fee_value(Double retail_interchange_fee_value) {
this.retail_interchange_fee_value = retail_interchange_fee_value;
}
public Double getMin_retail_interchange_fee_value() {
return min_retail_interchange_fee_value;
}
public void setMin_retail_interchange_fee_value(Double min_retail_interchange_fee_value) {
this.min_retail_interchange_fee_value = min_retail_interchange_fee_value;
}
public Double getRetail_service_fee_value() {
return retail_service_fee_value;
}
public void setRetail_service_fee_value(Double retail_service_fee_value) {
this.retail_service_fee_value = retail_service_fee_value;
}
public Double getMin_retail_service_fee_value() {
return min_retail_service_fee_value;
}
public void setInterchange_fee_value(Double interchange_fee_value){ this.interchange_fee_value = interchange_fee_value; } public void setMin_retail_service_fee_value(Double min_retail_service_fee_value) {
this.min_retail_service_fee_value = min_retail_service_fee_value;
}
public Double getOnline_interchange_fee_value() {
return online_interchange_fee_value;
}
public void setOnline_interchange_fee_value(Double online_interchange_fee_value) {
this.online_interchange_fee_value = online_interchange_fee_value;
}
public Double getMin_interchange_fee_value() { public Double getMin_online_interchange_fee_value() {
return min_interchange_fee_value; return min_online_interchange_fee_value;
} }
public void setMin_interchange_fee_value(Double min_interchange_fee_value) { public void setMin_online_interchange_fee_value(Double min_online_interchange_fee_value) {
this.min_interchange_fee_value = min_interchange_fee_value; this.min_online_interchange_fee_value = min_online_interchange_fee_value;
} }
public Double getService_fee_value() { public Double getOnline_service_fee_value() {
return service_fee_value; return online_service_fee_value;
} }
public void setService_fee_value(Double service_fee_value) { public void setOnline_service_fee_value(Double online_service_fee_value) {
this.service_fee_value = service_fee_value; this.online_service_fee_value = online_service_fee_value;
} }
public Double getMin_service_fee_value() { public Double getMin_online_service_fee_value() {
return min_service_fee_value; return min_online_service_fee_value;
} }
public void setMin_service_fee_value(Double min_service_fee_value) { public void setMin_online_service_fee_value(Double min_online_service_fee_value) {
this.min_service_fee_value = min_service_fee_value; this.min_online_service_fee_value = min_online_service_fee_value;
} }
} }

@ -136,12 +136,62 @@
</div> </div>
</div> </div>
</div> </div>
<div ng-if="org.commission_type == 1"> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}"> ng-class="{'has-error':org_form.contact_person.$invalid && org_form.contact_person.$dirty}">
<label class="control-label col-sm-2" for="wechat_rate_value_input">Wechat Rate <label class="control-label col-sm-2" for="org_contact_person_input">Contact Person
*</label> *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="org.contact_person"
id="org_contact_person_input" name="contact_person" required/>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.contact_phone.$invalid && org_form.contact_phone.$dirty}">
<label class="control-label col-sm-2" for="org_contact_phone_input">Phone *</label>
<div class="col-sm-8">
<input class="form-control" ng-model="org.contact_phone"
id="org_contact_phone_input" name="contact_phone" required/>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.contact_mail.$invalid && org_form.contact_mail.$dirty}">
<label class="control-label col-sm-2" for="org_contact_mail_input">Mail *</label>
<div class="col-sm-8">
<input class="form-control" ng-model="org.contact_mail" id="org_contact_mail_input"
name="contact_mail" required/>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="commission_checkbox">Enable
Commission</label>
<div class="col-sm-8">
<input id="commission_checkbox" type="checkbox" class="checkbox-inline checkbox"
ng-model="org.commission"/>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.remark.$invalid && org_form.remark.$dirty}">
<label class="control-label col-sm-2" for="remark-input">Remark</label>
<div class="col-sm-8">
<textarea class="form-control" ng-model="org.remark" name="remark" id="remark-input"
maxlength="500"></textarea>
</div>
</div>
<div ng-if="org.type == 0">
<div class="panel panel-default">
<div class="panel-heading">China Wallet</div>
<div class="panel-body">
<div class="col-sm-6" ng-if="org.commission_type == 1">
<div class="form-group"
ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}">
<label class="control-label col-sm-5" for="wechat_rate_value_input">Wechat
Rate
*</label>
<div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
@ -151,16 +201,19 @@
max="100" max="100"
min="0" min="0"
required required
style="width: 100% !important"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.alipay_rate_value.$invalid && org_form.alipay_rate_value.$dirty}"> ng-class="{'has-error':org_form.alipay_rate_value.$invalid && org_form.alipay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="alipay_rate_value_input">Alipay Rate <label class="control-label col-sm-5" for="alipay_rate_value_input">Alipay
Rate
*</label> *</label>
<div class="col-sm-8"> <div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
@ -170,138 +223,173 @@
max="100" max="100"
min="0" min="0"
required required
style="width: 100% !important"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<!-- APS config-->
<div class="form-group">
<label class="control-label col-sm-2">A+(APS):</label>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.interchange_fee_value.$invalid && org_form.interchange_fee_value.$dirty}"> ng-class="{'has-error':org_form.alipayonline_rate_value.$invalid && org_form.alipayonline_rate_value.$dirty}">
<label class="control-label col-sm-3" for="interchange_fee_value_input"> <label class="control-label col-sm-5"
Interchange Fee *</label> for="alipayonline_rate_value_input">AlipayOnline
<div class="col-sm-7"> Rate *</label>
<div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.interchange_fee_value" ng-model="org.alipayonline_rate_value"
id="interchange_fee_value_input" id="alipayonline_rate_value_input"
name="interchange_fee_value" name="alipayonline_rate_value"
max="100" max="100"
min="0" min="0"
required required
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.service_fee_value.$invalid && org_form.service_fee_value.$dirty}"> ng-class="{'has-error':org_form.cb_bankpay_rate_value.$invalid && org_form.cb_bankpay_rate_value.$dirty}">
<label class="control-label col-sm-3" for="service_fee_value_input"> <label class="control-label col-sm-5" for="cb_bankpay_rate_value_input">CB
Service Fee *</label> BankPay Rate</label>
<div class="col-sm-7"> <div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.service_fee_value" ng-model="org.cb_bankpay_rate_value"
id="service_fee_value_input" id="cb_bankpay_rate_value_input"
name="service_fee_value" name="cb_bankpay_rate_value"
max="100" max="100"
min="0" min="0"
required style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<!--<div class="form-group" ng-class="{'has-error':org_form.rpaypmt_card_rate_value.$invalid && org_form.rpaypmt_card_rate_value.$dirty}">
<label class="control-label col-sm-2" for="rpaypmt_card_rate_value_input">Card Payment Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.rpaypmt_card_rate_value" id="rpaypmt_card_rate_value_input" name="rpaypmt_card_rate_value" max="100" min="0" required>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>-->
</div>
<div class="col-sm-6">
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_interchange_fee.$invalid && org_form.min_interchange_fee.$dirty}"> ng-class="{'has-error':org_form.min_wechat_rate.$invalid && org_form.min_wechat_rate.$dirty}">
<label class="control-label col-sm-3" for="min_interchange_fee_input">Min <label class="control-label col-sm-5" for="min_wechat_rate_input">Min
Interchange Fee</label> Wechat
<div class="col-sm-7"> Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.min_interchange_fee_value" ng-model="org.min_wechat_rate"
id="min_interchange_fee_input" id="min_wechat_rate_input"
name="min_interchange_fee" name="min_wechat_rate"
max="100" max="100"
min="0" min="0"
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_service_fee.$invalid && org_form.min_service_fee.$dirty}"> ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}">
<label class="control-label col-sm-3" for="min_service_fee_input">Min <label class="control-label col-sm-5" for="min_alipay_rate_input">Min
Service Fee</label> Alipay
<div class="col-sm-7"> Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.min_service_fee_value" ng-model="org.min_alipay_rate"
id="min_service_fee_input" id="min_alipay_rate_input"
name="min_service_fee" name="min_alipay_rate"
max="100" max="100"
min="0" min="0"
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<!-- APS end--> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.alipayonline_rate_value.$invalid && org_form.alipayonline_rate_value.$dirty}"> ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}">
<label class="control-label col-sm-2" for="alipayonline_rate_value_input">AlipayOnline <label class="control-label col-sm-5" for="min_alipayonline_rate_input">Min
Rate *</label> Alipayonline Rate</label>
<div class="col-sm-8"> <div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.alipayonline_rate_value" ng-model="org.min_alipayonline_rate"
id="alipayonline_rate_value_input" id="min_alipayonline_rate_input"
name="alipayonline_rate_value" name="min_alipayonline_rate"
max="100" max="100"
min="0" min="0"
required style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.cb_bankpay_rate_value.$invalid && org_form.cb_bankpay_rate_value.$dirty}"> ng-class="{'has-error':org_form.min_cb_bankpay_rate.$invalid && org_form.min_cb_bankpay_rate.$dirty}">
<label class="control-label col-sm-2" for="cb_bankpay_rate_value_input">CB <label class="control-label col-sm-5" for="min_cb_bankpay_rate_input">Min
CB
BankPay Rate</label> BankPay Rate</label>
<div class="col-sm-8"> <div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.cb_bankpay_rate_value" ng-model="org.min_cb_bankpay_rate"
id="cb_bankpay_rate_value_input" id="min_cb_bankpay_rate_input"
name="cb_bankpay_rate_value" name="min_cb_bankpay_rate"
max="100" max="100"
min="0" min="0"
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<!--<div class="form-group" ng-class="{'has-error':org_form.rpaypmt_card_rate_value.$invalid && org_form.rpaypmt_card_rate_value.$dirty}"> </div>
<label class="control-label col-sm-2" for="rpaypmt_card_rate_value_input">Card Payment Rate *</label> <!-- <div class="form-group"
ng-class="{'has-error':org_form.min_rpaypmt_card_rate.$invalid && org_form.min_rpaypmt_card_rate.$dirty}">
<label class="control-label col-sm-2" for="min_rpaypmt_card_rate_input">Min Card Payment Rate</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.rpaypmt_card_rate_value" id="rpaypmt_card_rate_value_input" name="rpaypmt_card_rate_value" max="100" min="0" required> <input class="form-control form-control-float" type="number" ng-model="org.min_rpaypmt_card_rate"
id="min_rpaypmt_card_rate_input" name="min_rpaypmt_card_rate" max="100" min="0">
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div>--> </div>-->
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">Card Payment Rate</div>
<div class="panel-body">
<div class="col-sm-6" ng-if="org.commission_type == 1">
<!-- 卡支付-国内卡费率配置 --> <!-- 卡支付-国内卡费率配置 -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.rpaypmt_domestic_card_rate_value.$invalid && org_form.rpaypmt_domestic_card_rate_value.$dirty}"> ng-class="{'has-error':org_form.rpaypmt_domestic_card_rate_value.$invalid && org_form.rpaypmt_domestic_card_rate_value.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-5"
for="rpaypmt_domestic_card_rate_value_input">Domestic Card Payment Rate for="rpaypmt_domestic_card_rate_value_input">Domestic Card
Payment Rate
*</label> *</label>
<div class="col-sm-8"> <div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
@ -311,18 +399,21 @@
max="100" max="100"
min="0" min="0"
required required
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<!-- 卡支付-国际卡费率配置 --> <!-- 卡支付-国际卡费率配置 -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.rpaypmt_overseas_card_rate_value.$invalid && org_form.rpaypmt_overseas_card_rate_value.$dirty}"> ng-class="{'has-error':org_form.rpaypmt_overseas_card_rate_value.$invalid && org_form.rpaypmt_overseas_card_rate_value.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-5"
for="rpaypmt_overseas_card_rate_value_input">International Card Payment for="rpaypmt_overseas_card_rate_value_input">International Card
Payment
Rate *</label> Rate *</label>
<div class="col-sm-8"> <div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
@ -332,16 +423,18 @@
max="100" max="100"
min="0" min="0"
required required
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.rpaypmt_dd_rate_value.$invalid && org_form.rpaypmt_dd_rate_value.$dirty}"> ng-class="{'has-error':org_form.rpaypmt_dd_rate_value.$invalid && org_form.rpaypmt_dd_rate_value.$dirty}">
<label class="control-label col-sm-2" for="rpaypmt_dd_rate_value_input">Direct <label class="control-label col-sm-5" for="rpaypmt_dd_rate_value_input">Direct
Debit Rate</label> Debit Rate</label>
<div class="col-sm-8"> <div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
@ -350,194 +443,270 @@
name="rpaypmt_dd_rate_value" name="rpaypmt_dd_rate_value"
max="100" max="100"
min="0" min="0"
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div> </div>
</div>
<div> <div class="col-sm-6">
<!-- 卡支付-国内卡最小费率配置 -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_wechat_rate.$invalid && org_form.min_wechat_rate.$dirty}"> ng-class="{'has-error':org_form.min_rpaypmt_domestic_card_rate.$invalid && org_form.min_rpaypmt_domestic_card_rate.$dirty}">
<label class="control-label col-sm-2" for="min_wechat_rate_input">Min Wechat <label class="control-label col-sm-5"
for="min_rpaypmt_domestic_card_rate_input">Min Domestic Card
Payment
Rate</label> Rate</label>
<div class="col-sm-8"> <div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.min_wechat_rate" ng-model="org.min_rpaypmt_domestic_card_rate"
id="min_wechat_rate_input" id="min_rpaypmt_domestic_card_rate_input"
name="min_wechat_rate" name="min_rpaypmt_domestic_card_rate"
max="100" max="100"
min="0" min="0"
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<!-- 卡支付-国内卡最小费率配置 -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}"> ng-class="{'has-error':org_form.min_rpaypmt_overseas_card_rate.$invalid && org_form.min_rpaypmt_overseas_card_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipay_rate_input">Min Alipay <label class="control-label col-sm-5"
for="min_rpaypmt_overseas_card_rate_input">Min International Card
Payment
Rate</label> Rate</label>
<div class="col-sm-8"> <div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.min_alipay_rate" ng-model="org.min_rpaypmt_overseas_card_rate"
id="min_alipay_rate_input" id="min_rpaypmt_overseas_card_rate_input"
name="min_alipay_rate" name="min_rpaypmt_overseas_card_rate"
max="100" max="100"
min="0" min="0"
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}"> ng-class="{'has-error':org_form.min_rpaypmt_dd_rate.$invalid && org_form.min_rpaypmt_dd_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipayonline_rate_input">Min <label class="control-label col-sm-5" for="min_rpaypmt_dd_rate_input">Min
Alipayonline Rate</label> Direct
<div class="col-sm-8"> Debit Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.min_alipayonline_rate" ng-model="org.min_rpaypmt_dd_rate"
id="min_alipayonline_rate_input" id="min_rpaypmt_dd_rate_input"
name="min_alipayonline_rate" name="min_rpaypmt_dd_rate"
max="100" max="100"
min="0" min="0"
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">A+ Rate</div>
<div class="panel-body">
<div class="col-sm-6" ng-if="org.commission_type == 1">
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_cb_bankpay_rate.$invalid && org_form.min_cb_bankpay_rate.$dirty}"> ng-class="{'has-error':org_form.retail_interchange_fee_value.$invalid && org_form.retail_interchange_fee_value.$dirty}">
<label class="control-label col-sm-2" for="min_cb_bankpay_rate_input">Min CB <label class="control-label col-sm-5"
BankPay Rate</label> for="retail_interchange_fee_value_input">
<div class="col-sm-8"> Retail Interchange Fee *</label>
<div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.min_cb_bankpay_rate" ng-model="org.retail_interchange_fee_value"
id="min_cb_bankpay_rate_input" id="retail_interchange_fee_value_input"
name="min_cb_bankpay_rate" name="retail_interchange_fee_value"
max="100" max="100"
min="0" min="0"
required
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<!-- <div class="form-group"
ng-class="{'has-error':org_form.min_rpaypmt_card_rate.$invalid && org_form.min_rpaypmt_card_rate.$dirty}">
<label class="control-label col-sm-2" for="min_rpaypmt_card_rate_input">Min Card Payment Rate</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.min_rpaypmt_card_rate"
id="min_rpaypmt_card_rate_input" name="min_rpaypmt_card_rate" max="100" min="0">
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div>-->
<!-- 卡支付-国内卡最小费率配置 -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_rpaypmt_domestic_card_rate.$invalid && org_form.min_rpaypmt_domestic_card_rate.$dirty}"> ng-class="{'has-error':org_form.retail_service_fee_value.$invalid && org_form.retail_service_fee_value.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-5"
for="min_rpaypmt_domestic_card_rate_input">Min Domestic Card Payment for="retail_service_fee_value_input">
Rate</label> Retail Service Fee *</label>
<div class="col-sm-8"> <div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.min_rpaypmt_domestic_card_rate" ng-model="org.retail_service_fee_value"
id="min_rpaypmt_domestic_card_rate_input" id="retail_service_fee_value_input"
name="min_rpaypmt_domestic_card_rate" name="retail_service_fee_value"
max="100" max="100"
min="0" min="0"
required
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<!-- 卡支付-国内卡最小费率配置 -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_rpaypmt_overseas_card_rate.$invalid && org_form.min_rpaypmt_overseas_card_rate.$dirty}"> ng-class="{'has-error':org_form.online_interchange_fee_value.$invalid && org_form.online_interchange_fee_value.$dirty}">
<label class="control-label col-sm-2" <label class="control-label col-sm-5"
for="min_rpaypmt_overseas_card_rate_input">Min International Card Payment for="online_interchange_fee_value_input">
Rate</label> Online Interchange Fee *</label>
<div class="col-sm-8"> <div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.min_rpaypmt_overseas_card_rate" ng-model="org.online_interchange_fee_value"
id="min_rpaypmt_overseas_card_rate_input" id="online_interchange_fee_value_input"
name="min_rpaypmt_overseas_card_rate" name="online_interchange_fee_value"
max="100" max="100"
min="0" min="0"
required
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_rpaypmt_dd_rate.$invalid && org_form.min_rpaypmt_dd_rate.$dirty}"> ng-class="{'has-error':org_form.online_service_fee_value.$invalid && org_form.online_service_fee_value.$dirty}">
<label class="control-label col-sm-2" for="min_rpaypmt_dd_rate_input">Min Direct <label class="control-label col-sm-5"
Debit Rate</label> for="online_service_fee_value_input">
<div class="col-sm-8"> Online Service Fee *</label>
<div class="col-sm-5">
<div class="input-group">
<input <input
class="form-control form-control-float" class="form-control form-control-float"
type="number" type="number"
ng-model="org.min_rpaypmt_dd_rate" ng-model="org.online_service_fee_value"
id="min_rpaypmt_dd_rate_input" id="online_service_fee_value_input"
name="min_rpaypmt_dd_rate" name="online_service_fee_value"
max="100" max="100"
min="0" min="0"
required
style="width: 100% !important;"
/> />
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-sm-6">
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.contact_person.$invalid && org_form.contact_person.$dirty}"> ng-class="{'has-error':org_form.min_retail_interchange_fee.$invalid && org_form.min_retail_interchange_fee.$dirty}">
<label class="control-label col-sm-2" for="org_contact_person_input">Contact Person <label class="control-label col-sm-5"
*</label> for="min_retail_interchange_fee_input">Min Retail
<div class="col-sm-8"> Interchange Fee</label>
<input class="form-control" ng-model="org.contact_person" <div class="col-sm-5">
id="org_contact_person_input" name="contact_person" required/> <div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_retail_interchange_fee_value"
id="min_retail_interchange_fee_input"
name="min_retail_interchange_fee"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.contact_phone.$invalid && org_form.contact_phone.$dirty}"> ng-class="{'has-error':org_form.min_retail_service_fee.$invalid && org_form.min_retail_service_fee.$dirty}">
<label class="control-label col-sm-2" for="org_contact_phone_input">Phone *</label> <label class="control-label col-sm-5"
<div class="col-sm-8"> for="min_retail_service_fee_input">Min Retail
<input class="form-control" ng-model="org.contact_phone" Service Fee</label>
id="org_contact_phone_input" name="contact_phone" required/> <div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_retail_service_fee_value"
id="min_retail_service_fee_input"
name="min_retail_service_fee"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<div class="form-group"
ng-class="{'has-error':org_form.contact_mail.$invalid && org_form.contact_mail.$dirty}">
<label class="control-label col-sm-2" for="org_contact_mail_input">Mail *</label>
<div class="col-sm-8">
<input class="form-control" ng-model="org.contact_mail" id="org_contact_mail_input"
name="contact_mail" required/>
</div> </div>
<div class="form-group"
ng-class="{'has-error':org_form.min_online_interchange_fee.$invalid && org_form.min_online_interchange_fee.$dirty}">
<label class="control-label col-sm-5"
for="min_online_interchange_fee_input">Min
Online Interchange Fee</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_online_interchange_fee_value"
id="min_online_interchange_fee_input"
name="min_online_interchange_fee"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div> </div>
<div class="form-group">
<label class="control-label col-sm-2" for="commission_checkbox">Enable
Commission</label>
<div class="col-sm-8">
<input id="commission_checkbox" type="checkbox" class="checkbox-inline checkbox"
ng-model="org.commission"/>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.remark.$invalid && org_form.remark.$dirty}"> ng-class="{'has-error':org_form.min_online_service_fee.$invalid && org_form.min_online_service_fee.$dirty}">
<label class="control-label col-sm-2" for="remark-input">Remark</label> <label class="control-label col-sm-5"
<div class="col-sm-8"> for="min_online_service_fee_input">Min
<textarea class="form-control" ng-model="org.remark" name="remark" id="remark-input" Online Service Fee</label>
maxlength="500"></textarea> <div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_online_service_fee_value"
id="min_online_service_fee_input"
name="min_online_service_fee"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
<div class="btn-group margin-bottom margin-top"> <div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button" ng-click="update(org_form)">Save</button> <button class="btn btn-success" type="button" ng-click="update(org_form)">Save</button>
<a class="btn btn-danger" role="button" ui-sref="^" ui-sref-opts="{reload:true}">Back</a> <a class="btn btn-danger" role="button" ui-sref="^" ui-sref-opts="{reload:true}">Back</a>

@ -104,223 +104,607 @@
</div> </div>
</div> </div>
</div> </div>
<div ng-if="org.commission_type == 1"> </div>
<div class="form-group" ng-class="{'has-error':org_form.alipay_rate_value.$invalid && org_form.alipay_rate_value.$dirty}">
<label class="control-label col-sm-2" for="alipay_rate_value_input">Alipay Rate *</label>
<!-- <div ng-if="(org.type == 0 || currentUser.org_id !=null)">
<div class="form-group"
ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipay_rate_input">Min Alipay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.alipay_rate_value" id="alipay_rate_value_input" name="alipay_rate_value" max="100" min="0"readonly> <input class="form-control" type="number" ng-model="org.min_alipay_rate"
<span class="input-group-addon form-control-span">%</span> id="min_alipay_rate_input" name="min_alipay_rate" max="100">
</div> </div>
</div> </div>
<div class="form-group" ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}"> <div class="form-group"
<label class="control-label col-sm-2" for="wechat_rate_value_input">Wechat Rate *</label> ng-class="{'has-error':org_form.min_bestpay_rate.$invalid && org_form.min_bestpay_rate.$dirty}">
<label class="control-label col-sm-2" for="min_bestpay_rate_input">Min Bestpay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.wechat_rate_value" id="wechat_rate_value_input" name="wechat_rate_value" max="100" min="0" readonly> <input class="form-control" type="number" ng-model="org.min_bestpay_rate"
<span class="input-group-addon form-control-span">%</span> id="min_bestpay_rate_input" name="min_bestpay_rate" max="100">
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_jd_rate.$invalid && org_form.min_jd_rate.$dirty}">
<label class="control-label col-sm-2" for="min_jd_rate_input">Min Jd Rate *</label>
<div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_jd_rate"
id="min_jd_rate_input" name="min_jd_rate" max="100">
</div> </div>
</div> </div>
<!-- APS start --> <div class="form-group"
ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipayonline_rate_input">Min Alipayonline Rate *</label>
<div class="col-sm-8">
<input class="form-control" type="number" ng-model="org.min_alipayonline_rate"
id="min_alipayonline_rate_input" name="min_alipayonline_rate" max="100">
</div>
</div>
</div>-->
<div class="form-group" ng-class="{'has-error':org_form.contact_person.$invalid && org_form.contact_person.$dirty}">
<label class="control-label col-sm-2" for="org_contact_person_input">Contact Person *</label>
<div class="col-sm-8">
<input class="form-control" ng-model="org.contact_person" id="org_contact_person_input" name="contact_person" required>
</div>
</div>
<div class="form-group" ng-class="{'has-error':org_form.contact_phone.$invalid && org_form.contact_phone.$dirty}">
<label class="control-label col-sm-2" for="org_contact_phone_input">Phone *</label>
<div class="col-sm-8">
<input class="form-control" ng-model="org.contact_phone" id="org_contact_phone_input" name="contact_phone" required>
</div>
</div>
<div class="form-group" ng-class="{'has-error':org_form.contact_mail.$invalid && org_form.contact_mail.$dirty}">
<label class="control-label col-sm-2" for="org_contact_mail_input">Mail *</label>
<div class="col-sm-8">
<input class="form-control" ng-model="org.contact_mail" id="org_contact_mail_input" name="contact_mail" required>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">A+(APS)</label> <label class="control-label col-sm-2" for="commission_checkbox">Enable Commission</label>
<div class="col-sm-8">
<input id="commission_checkbox" type="checkbox" class="checkbox-inline checkbox" ng-model="org.commission">
</div>
</div> </div>
<div class="form-group" ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}"> <div class="form-group"
<label class="control-label col-sm-3" for="wechat_rate_value_input">Interchange Fee *</label> ng-class="{'has-error':org_form.remark.$invalid && org_form.remark.$dirty}">
<div class="col-sm-7"> <label class="control-label col-sm-2" for="remark-input">Remark</label>
<input class="form-control form-control-float" type="number" ng-model="org.interchange_fee_value" id="interchange_fee_value_input" name="interchange_fee_value" max="100" min="0" readonly> <div class="col-sm-8">
<textarea class="form-control" ng-model="org.remark" name="remark"
id="remark-input" maxlength="500"></textarea>
</div>
</div>
<div ng-if="org.type == 0">
<div class="panel panel-default">
<div class="panel-heading">China Wallet</div>
<div class="panel-body">
<div class="col-sm-6" ng-if="org.commission_type == 1">
<div class="form-group"
ng-class="{'has-error':org_form.wechat_rate_value.$invalid && org_form.wechat_rate_value.$dirty}">
<label class="control-label col-sm-5" for="wechat_rate_value_input">Wechat
Rate
*</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.wechat_rate_value"
id="wechat_rate_value_input"
name="wechat_rate_value"
max="100"
min="0"
required
style="width: 100% !important"
/>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<div class="form-group" ng-class="{'has-error':org_form.service_fee_value.$invalid && org_form.service_fee_value.$dirty}"> </div>
<label class="control-label col-sm-3" for="service_fee_value_input">Service Fee *</label> <div class="form-group"
<div class="col-sm-7"> ng-class="{'has-error':org_form.alipay_rate_value.$invalid && org_form.alipay_rate_value.$dirty}">
<input class="form-control form-control-float" type="number" ng-model="org.service_fee_value" id="service_fee_value_input" name="service_fee_value" max="100" min="0" readonly> <label class="control-label col-sm-5" for="alipay_rate_value_input">Alipay
Rate
*</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.alipay_rate_value"
id="alipay_rate_value_input"
name="alipay_rate_value"
max="100"
min="0"
required
style="width: 100% !important"
/>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<div class="form-group" ng-class="{'has-error':org_form.min_interchange_fee_value.$invalid && org_form.min_interchange_fee_value.$dirty}"> </div>
<label class="control-label col-sm-3" for="min_interchange_fee_value_input">Min Interchange Fee</label> <div class="form-group"
<div class="col-sm-7"> ng-class="{'has-error':org_form.alipayonline_rate_value.$invalid && org_form.alipayonline_rate_value.$dirty}">
<input class="form-control form-control-float" type="number" ng-model="org.min_interchange_fee_value" id="min_interchange_fee_value_input" name="min_interchange_fee_value" max="100" min="0" readonly> <label class="control-label col-sm-5"
for="alipayonline_rate_value_input">AlipayOnline
Rate *</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.alipayonline_rate_value"
id="alipayonline_rate_value_input"
name="alipayonline_rate_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<div class="form-group" ng-class="{'has-error':org_form.min_service_fee_value.$invalid && org_form.min_service_fee_value.$dirty}"> </div>
<label class="control-label col-sm-3" for="min_service_fee_value_input">Min Service Fee</label> <div class="form-group"
<div class="col-sm-7"> ng-class="{'has-error':org_form.cb_bankpay_rate_value.$invalid && org_form.cb_bankpay_rate_value.$dirty}">
<input class="form-control form-control-float" type="number" ng-model="org.min_service_fee_value" id="min_service_fee_value_input" name="min_service_fee_value" max="100" min="0" readonly> <label class="control-label col-sm-5" for="cb_bankpay_rate_value_input">CB
BankPay Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.cb_bankpay_rate_value"
id="cb_bankpay_rate_value_input"
name="cb_bankpay_rate_value"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<!-- APS end--> </div>
<!--<div class="form-group" ng-class="{'has-error':org_form.rpaypmt_card_rate_value.$invalid && org_form.rpaypmt_card_rate_value.$dirty}">
<div class="form-group" ng-class="{'has-error':org_form.bestpay_rate_value.$invalid && org_form.bestpay_rate_value.$dirty}"> <label class="control-label col-sm-2" for="rpaypmt_card_rate_value_input">Card Payment Rate *</label>
<label class="control-label col-sm-2" for="bestpay_rate_value_input">Bestpay Rate *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.bestpay_rate_value" id="bestpay_rate_value_input" name="bestpay_rate_value" max="100" min="0" readonly> <input class="form-control form-control-float" type="number" ng-model="org.rpaypmt_card_rate_value" id="rpaypmt_card_rate_value_input" name="rpaypmt_card_rate_value" max="100" min="0" required>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div>-->
</div> </div>
<div class="col-sm-6">
<div class="form-group"
ng-class="{'has-error':org_form.min_wechat_rate.$invalid && org_form.min_wechat_rate.$dirty}">
<label class="control-label col-sm-5" for="min_wechat_rate_input">Min
Wechat
Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_wechat_rate"
id="min_wechat_rate_input"
name="min_wechat_rate"
max="100"
min="0"
style="width: 100% !important;"
<div class="form-group" ng-class="{'has-error':org_form.jd_rate_value.$invalid && org_form.jd_rate_value.$dirty}"> />
<label class="control-label col-sm-2" for="jd_rate_value_input">JD Pay Rate *</label>
<div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.jd_rate_value" id="jd_rate_value_input" name="jd_rate_value" max="100" min="0" readonly>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<div class="form-group" ng-class="{'has-error':org_form.alipayonline_rate_value.$invalid && org_form.alipayonline_rate_value.$dirty}"> <div class="form-group"
<label class="control-label col-sm-2" for="alipayonline_rate_value_input">AlipayOnline Rate *</label> ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}">
<div class="col-sm-8"> <label class="control-label col-sm-5" for="min_alipay_rate_input">Min
<input class="form-control form-control-float" type="number" ng-model="org.alipayonline_rate_value" id="alipayonline_rate_value_input" name="alipayonline_rate_value" max="100" min="0" readonly> Alipay
Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_alipay_rate"
id="min_alipay_rate_input"
name="min_alipay_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<div class="form-group" ng-class="{'has-error':org_form.cb_bankpay_rate_value.$invalid && org_form.cb_bankpay_rate_value.$dirty}"> </div>
<label class="control-label col-sm-2" for="cb_bankpay_rate_value_input">CBBank Pay Rate *</label> <div class="form-group"
ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}">
<label class="control-label col-sm-5" for="min_alipayonline_rate_input">Min
Alipayonline Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_alipayonline_rate"
id="min_alipayonline_rate_input"
name="min_alipayonline_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':org_form.min_cb_bankpay_rate.$invalid && org_form.min_cb_bankpay_rate.$dirty}">
<label class="control-label col-sm-5" for="min_cb_bankpay_rate_input">Min
CB
BankPay Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_cb_bankpay_rate"
id="min_cb_bankpay_rate_input"
name="min_cb_bankpay_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
<!-- <div class="form-group"
ng-class="{'has-error':org_form.min_rpaypmt_card_rate.$invalid && org_form.min_rpaypmt_card_rate.$dirty}">
<label class="control-label col-sm-2" for="min_rpaypmt_card_rate_input">Min Card Payment Rate</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control form-control-float" type="number" ng-model="org.cb_bankpay_rate_value" id="cb_bankpay_rate_value_input" name="cb_bankpay_rate_value" max="100" min="0" readonly> <input class="form-control form-control-float" type="number" ng-model="org.min_rpaypmt_card_rate"
id="min_rpaypmt_card_rate_input" name="min_rpaypmt_card_rate" max="100" min="0">
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div>-->
</div>
</div> </div>
</div> </div>
<div> <div class="panel panel-default">
<div class="panel-heading">Card Payment Rate</div>
<div class="panel-body">
<div class="col-sm-6" ng-if="org.commission_type == 1">
<!-- 卡支付-国内卡费率配置 -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_wechat_rate.$invalid && org_form.min_wechat_rate.$dirty}"> ng-class="{'has-error':org_form.rpaypmt_domestic_card_rate_value.$invalid && org_form.rpaypmt_domestic_card_rate_value.$dirty}">
<label class="control-label col-sm-2" for="min_wechat_rate_input">Min Wechat Rate *</label> <label class="control-label col-sm-5"
<div class="col-sm-8"> for="rpaypmt_domestic_card_rate_value_input">Domestic Card
<input class="form-control form-control-float" type="number" ng-model="org.min_wechat_rate" Payment Rate
id="min_wechat_rate_input" name="min_wechat_rate" max="100" min="0" readonly> *</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.rpaypmt_domestic_card_rate_value"
id="rpaypmt_domestic_card_rate_value_input"
name="rpaypmt_card_rate_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<!-- 卡支付-国际卡费率配置 -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}"> ng-class="{'has-error':org_form.rpaypmt_overseas_card_rate_value.$invalid && org_form.rpaypmt_overseas_card_rate_value.$dirty}">
<label class="control-label col-sm-2" for="min_alipay_rate_input">Min Alipay Rate *</label> <label class="control-label col-sm-5"
<div class="col-sm-8"> for="rpaypmt_overseas_card_rate_value_input">International Card
<input class="form-control form-control-float" type="number" ng-model="org.min_alipay_rate" Payment
id="min_alipay_rate_input" name="min_alipay_rate" max="100" min="0" readonly> Rate *</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.rpaypmt_overseas_card_rate_value"
id="rpaypmt_overseas_card_rate_value_input"
name="rpaypmt_card_rate_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_bestpay_rate.$invalid && org_form.min_bestpay_rate.$dirty}"> ng-class="{'has-error':org_form.rpaypmt_dd_rate_value.$invalid && org_form.rpaypmt_dd_rate_value.$dirty}">
<label class="control-label col-sm-2" for="min_bestpay_rate_input">Min Bestpay Rate *</label> <label class="control-label col-sm-5" for="rpaypmt_dd_rate_value_input">Direct
<div class="col-sm-8"> Debit Rate</label>
<input class="form-control form-control-float" type="number" ng-model="org.min_bestpay_rate" <div class="col-sm-5">
id="min_bestpay_rate_input" name="min_bestpay_rate" max="100" min="0" readonly> <div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.rpaypmt_dd_rate_value"
id="rpaypmt_dd_rate_value_input"
name="rpaypmt_dd_rate_value"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
</div>
<div class="col-sm-6">
<!-- 卡支付-国内卡最小费率配置 -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_jd_rate.$invalid && org_form.min_jd_rate.$dirty}"> ng-class="{'has-error':org_form.min_rpaypmt_domestic_card_rate.$invalid && org_form.min_rpaypmt_domestic_card_rate.$dirty}">
<label class="control-label col-sm-2" for="min_jd_rate_input">Min Jd Rate *</label> <label class="control-label col-sm-5"
<div class="col-sm-8"> for="min_rpaypmt_domestic_card_rate_input">Min Domestic Card
<input class="form-control form-control-float" type="number" ng-model="org.min_jd_rate" Payment
id="min_jd_rate_input" name="min_jd_rate" max="100" min="0" readonly> Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_rpaypmt_domestic_card_rate"
id="min_rpaypmt_domestic_card_rate_input"
name="min_rpaypmt_domestic_card_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<!-- 卡支付-国内卡最小费率配置 -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}"> ng-class="{'has-error':org_form.min_rpaypmt_overseas_card_rate.$invalid && org_form.min_rpaypmt_overseas_card_rate.$dirty}">
<label class="control-label col-sm-2" for="min_alipayonline_rate_input">Min Alipayonline Rate *</label> <label class="control-label col-sm-5"
<div class="col-sm-8"> for="min_rpaypmt_overseas_card_rate_input">Min International Card
<input class="form-control form-control-float" type="number" ng-model="org.min_alipayonline_rate" Payment
id="min_alipayonline_rate_input" name="min_alipayonline_rate" max="100" min="0" readonly> Rate</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_rpaypmt_overseas_card_rate"
id="min_rpaypmt_overseas_card_rate_input"
name="min_rpaypmt_overseas_card_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_cb_bankpay_rate.$invalid && org_form.min_cb_bankpay_rate.$dirty}"> ng-class="{'has-error':org_form.min_rpaypmt_dd_rate.$invalid && org_form.min_rpaypmt_dd_rate.$dirty}">
<label class="control-label col-sm-2" for="min_cb_bankpay_rate_input">Min CBBank Pay Rate *</label> <label class="control-label col-sm-5" for="min_rpaypmt_dd_rate_input">Min
<div class="col-sm-8"> Direct
<input class="form-control form-control-float" type="number" ng-model="org.min_cb_bankpay_rate" Debit Rate</label>
id="min_cb_bankpay_rate_input" name="min_cb_bankpay_rate" max="100" min="0" readonly> <div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_rpaypmt_dd_rate"
id="min_rpaypmt_dd_rate_input"
name="min_rpaypmt_dd_rate"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span> <span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
<div class="panel panel-default">
<!-- <div ng-if="(org.type == 0 || currentUser.org_id !=null)"> <div class="panel-heading">A+ Rate</div>
<div class="panel-body">
<div class="col-sm-6" ng-if="org.commission_type == 1">
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_alipay_rate.$invalid && org_form.min_alipay_rate.$dirty}"> ng-class="{'has-error':org_form.retail_interchange_fee_value.$invalid && org_form.retail_interchange_fee_value.$dirty}">
<label class="control-label col-sm-2" for="min_alipay_rate_input">Min Alipay Rate *</label> <label class="control-label col-sm-5"
<div class="col-sm-8"> for="retail_interchange_fee_value_input">
<input class="form-control" type="number" ng-model="org.min_alipay_rate" Retail Interchange Fee *</label>
id="min_alipay_rate_input" name="min_alipay_rate" max="100"> <div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.retail_interchange_fee_value"
id="retail_interchange_fee_value_input"
name="retail_interchange_fee_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_bestpay_rate.$invalid && org_form.min_bestpay_rate.$dirty}"> ng-class="{'has-error':org_form.retail_service_fee_value.$invalid && org_form.retail_service_fee_value.$dirty}">
<label class="control-label col-sm-2" for="min_bestpay_rate_input">Min Bestpay Rate *</label> <label class="control-label col-sm-5"
<div class="col-sm-8"> for="retail_service_fee_value_input">
<input class="form-control" type="number" ng-model="org.min_bestpay_rate" Retail Service Fee *</label>
id="min_bestpay_rate_input" name="min_bestpay_rate" max="100"> <div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.retail_service_fee_value"
id="retail_service_fee_value_input"
name="retail_service_fee_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_jd_rate.$invalid && org_form.min_jd_rate.$dirty}"> ng-class="{'has-error':org_form.online_interchange_fee_value.$invalid && org_form.online_interchange_fee_value.$dirty}">
<label class="control-label col-sm-2" for="min_jd_rate_input">Min Jd Rate *</label> <label class="control-label col-sm-5"
<div class="col-sm-8"> for="online_interchange_fee_value_input">
<input class="form-control" type="number" ng-model="org.min_jd_rate" Online Interchange Fee *</label>
id="min_jd_rate_input" name="min_jd_rate" max="100"> <div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.online_interchange_fee_value"
id="online_interchange_fee_value_input"
name="online_interchange_fee_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.min_alipayonline_rate.$invalid && org_form.min_alipayonline_rate.$dirty}"> ng-class="{'has-error':org_form.online_service_fee_value.$invalid && org_form.online_service_fee_value.$dirty}">
<label class="control-label col-sm-2" for="min_alipayonline_rate_input">Min Alipayonline Rate *</label> <label class="control-label col-sm-5"
<div class="col-sm-8"> for="online_service_fee_value_input">
<input class="form-control" type="number" ng-model="org.min_alipayonline_rate" Online Service Fee *</label>
id="min_alipayonline_rate_input" name="min_alipayonline_rate" max="100"> <div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.online_service_fee_value"
id="online_service_fee_value_input"
name="online_service_fee_value"
max="100"
min="0"
required
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div>-->
<div class="form-group" ng-class="{'has-error':org_form.contact_person.$invalid && org_form.contact_person.$dirty}">
<label class="control-label col-sm-2" for="org_contact_person_input">Contact Person *</label>
<div class="col-sm-8">
<input class="form-control" ng-model="org.contact_person" id="org_contact_person_input" name="contact_person" required>
</div> </div>
</div> </div>
<div class="form-group" ng-class="{'has-error':org_form.contact_phone.$invalid && org_form.contact_phone.$dirty}"> <div class="col-sm-6">
<label class="control-label col-sm-2" for="org_contact_phone_input">Phone *</label> <div class="form-group"
<div class="col-sm-8"> ng-class="{'has-error':org_form.min_retail_interchange_fee.$invalid && org_form.min_retail_interchange_fee.$dirty}">
<input class="form-control" ng-model="org.contact_phone" id="org_contact_phone_input" name="contact_phone" required> <label class="control-label col-sm-5"
for="min_retail_interchange_fee_input">Min Retail
Interchange Fee</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_retail_interchange_fee_value"
id="min_retail_interchange_fee_input"
name="min_retail_interchange_fee"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
<div class="form-group" ng-class="{'has-error':org_form.contact_mail.$invalid && org_form.contact_mail.$dirty}">
<label class="control-label col-sm-2" for="org_contact_mail_input">Mail *</label>
<div class="col-sm-8">
<input class="form-control" ng-model="org.contact_mail" id="org_contact_mail_input" name="contact_mail" required>
</div> </div>
<div class="form-group"
ng-class="{'has-error':org_form.min_retail_service_fee.$invalid && org_form.min_retail_service_fee.$dirty}">
<label class="control-label col-sm-5"
for="min_retail_service_fee_input">Min Retail
Service Fee</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_retail_service_fee_value"
id="min_retail_service_fee_input"
name="min_retail_service_fee"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div> </div>
<div class="form-group">
<label class="control-label col-sm-2" for="commission_checkbox">Enable Commission</label>
<div class="col-sm-8">
<input id="commission_checkbox" type="checkbox" class="checkbox-inline checkbox" ng-model="org.commission">
</div> </div>
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':org_form.remark.$invalid && org_form.remark.$dirty}"> ng-class="{'has-error':org_form.min_online_interchange_fee.$invalid && org_form.min_online_interchange_fee.$dirty}">
<label class="control-label col-sm-2" for="remark-input">Remark</label> <label class="control-label col-sm-5"
<div class="col-sm-8"> for="min_online_interchange_fee_input">Min
<textarea class="form-control" ng-model="org.remark" name="remark" Online Interchange Fee</label>
id="remark-input" maxlength="500"></textarea> <div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_online_interchange_fee_value"
id="min_online_interchange_fee_input"
name="min_online_interchange_fee"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"
ng-class="{'has-error':org_form.min_online_service_fee.$invalid && org_form.min_online_service_fee.$dirty}">
<label class="control-label col-sm-5"
for="min_online_service_fee_input">Min
Online Service Fee</label>
<div class="col-sm-5">
<div class="input-group">
<input
class="form-control form-control-float"
type="number"
ng-model="org.min_online_service_fee_value"
id="min_online_service_fee_input"
name="min_online_service_fee"
max="100"
min="0"
style="width: 100% !important;"
/>
<span class="input-group-addon form-control-span">%</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="btn-group margin-bottom margin-top"> <div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button" ng-click="update(org_form)">Save <button class="btn btn-success" type="button" ng-click="update(org_form)">Save
</button> </button>

@ -3155,6 +3155,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
'$state', '$state',
function ($scope, $rootScope, $http, $uibModal, commonDialog, $sce, $state) { function ($scope, $rootScope, $http, $uibModal, commonDialog, $sce, $state) {
$scope.bankCtrl = {edit: true, rate_name: 'Wechat', modify_min_settle: false} $scope.bankCtrl = {edit: true, rate_name: 'Wechat', modify_min_settle: false}
$scope.cardBankCtrl = {edit: true, rate_name: 'rpaypmt_card', modify_min_settle: false}
$scope.apsBankCtrl = {edit: true, rate_name: 'ApsInStore', modify_min_settle: false}
$scope.init = { $scope.init = {
skip_clearing: false, skip_clearing: false,
tax_in_surcharge: false, tax_in_surcharge: false,
@ -3383,14 +3385,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
) )
} }
$scope.newAlipayApsRate = function () { $scope.newAlipayApsRate = function (rateName) {
$uibModal $uibModal
.open({ .open({
templateUrl: '/static/payment/partner/templates/partner_new_alipay_aps_rate.html', templateUrl: '/static/payment/partner/templates/partner_new_alipay_aps_rate.html',
controller: 'newAlipayApsRateDialogCtrl', controller: 'newAlipayApsRateDialogCtrl',
resolve: { resolve: {
rate: function () { rate: function () {
return {rate_name: "AlipayAps", clean_days: 3} return {rate_name: rateName, clean_days: 3}
}, },
sys_common_rate: function () { sys_common_rate: function () {
return $http.get('/sys/partners/sys_rates') return $http.get('/sys/partners/sys_rates')
@ -3745,18 +3747,24 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
if ($scope.rate.clean_days) { if ($scope.rate.clean_days) {
switch ($scope.rate.clean_days) { switch ($scope.rate.clean_days) {
case '1': { case '1': {
$scope.rate.interchange_fee_value = parseFloat($scope.sysRateConfig.t1.InterchangeFee) $scope.rate.retail_interchange_fee_value = parseFloat($scope.sysRateConfig.t1.RetailInterchangeFee)
$scope.rate.service_fee_value = parseFloat($scope.sysRateConfig.t1.ServiceFee) $scope.rate.retail_service_fee_value = parseFloat($scope.sysRateConfig.t1.RetailServiceFee)
$scope.rate.online_interchange_fee_value = parseFloat($scope.sysRateConfig.t1.OnlineInterchangeFee)
$scope.rate.online_service_fee_value = parseFloat($scope.sysRateConfig.t1.OnlineServiceFee)
break break
} }
case '2': { case '2': {
$scope.rate.interchange_fee_value = parseFloat($scope.sysRateConfig.t2.InterchangeFee) $scope.rate.retail_interchange_fee_value = parseFloat($scope.sysRateConfig.t2.RetailInterchangeFee)
$scope.rate.service_fee_value = parseFloat($scope.sysRateConfig.t2.ServiceFee) $scope.rate.retail_service_fee_value = parseFloat($scope.sysRateConfig.t2.RetailServiceFee)
$scope.rate.online_interchange_fee_value = parseFloat($scope.sysRateConfig.t2.OnlineInterchangeFee)
$scope.rate.online_service_fee_value = parseFloat($scope.sysRateConfig.t2.OnlineServiceFee)
break break
} }
case '3': { case '3': {
$scope.rate.interchange_fee_value = parseFloat($scope.sysRateConfig.t3.InterchangeFee) $scope.rate.retail_interchange_fee_value = parseFloat($scope.sysRateConfig.t3.RetailInterchangeFee)
$scope.rate.service_fee_value = parseFloat($scope.sysRateConfig.t3.ServiceFee) $scope.rate.retail_service_fee_value = parseFloat($scope.sysRateConfig.t3.RetailServiceFee)
$scope.rate.online_interchange_fee_value = parseFloat($scope.sysRateConfig.t3.OnlineInterchangeFee)
$scope.rate.online_service_fee_value = parseFloat($scope.sysRateConfig.t3.OnlineServiceFee)
break break
} }
} }

@ -236,11 +236,7 @@
</div> </div>
<div class="panel panel-info"> <div class="panel panel-info">
<div class="panel-heading"> <div class="panel-heading">
<h3>Rates <a class="text-success" role="button" <h3>China Wallet</h3>
ng-if="partner.rate_editable && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4) && ('111'|withRole)))"
ng-click="newRate()">
<i class="fa fa-plus"></i></a>
</h3>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="row"> <div class="row">
@ -255,9 +251,6 @@
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='AlipayOnline'}"><a role="button" <li role="presentation" ng-class="{active:bankCtrl.rate_name=='AlipayOnline'}"><a role="button"
ng-click="bankCtrl.rate_name='AlipayOnline'">Alipay(Online)</a> ng-click="bankCtrl.rate_name='AlipayOnline'">Alipay(Online)</a>
</li> </li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='AlipayAps'}"><a role="button"
ng-click="bankCtrl.rate_name='AlipayAps'">A+(APS)</a>
</li>
<!-- <li role="presentation" ng-class="{active:bankCtrl.rate_name=='Bestpay'}"><a role="button" <!-- <li role="presentation" ng-class="{active:bankCtrl.rate_name=='Bestpay'}"><a role="button"
ng-click="bankCtrl.rate_name='Bestpay'">Bestpay</a> ng-click="bankCtrl.rate_name='Bestpay'">Bestpay</a>
</li> </li>
@ -273,36 +266,23 @@
ng-click="bankCtrl.rate_name='CB_BankPay'" ng-click="bankCtrl.rate_name='CB_BankPay'"
ng-if="sysconfig.active_channels.indexOf('CB_BankPay')!=-1">CB_BankPay</a> ng-if="sysconfig.active_channels.indexOf('CB_BankPay')!=-1">CB_BankPay</a>
</li> </li>
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_card'}"><a role="button" <a id="addRate" class="btn btn-info" style="float: right;margin-right: 10px" type="button"
ng-click="bankCtrl.rate_name='rpaypmt_card'">Card ng-if="partner.rate_editable && (('11'|withRole)||((!partner.approve_result||partner.approve_result>4) && ('111'|withRole)))"
Payment</a></li> ng-click="newRate()">
<li role="presentation" ng-class="{active:bankCtrl.rate_name=='rpaypmt_dd'}"><a role="button" Add Rate
ng-click="bankCtrl.rate_name='rpaypmt_dd'">Direct
Debit</a></li>
<a id="addCardPaymentRate" class="btn btn-warning" style="float: right" type="button"
ng-click="newCardPaymentRates()"
ng-if="(bankCtrl.rate_name=='rpaypmt_card'||bankCtrl.rate_name=='rpaypmt_dd') && ((partner.card_rate_editable && ('100'|withRole)) || ('11'|withRole))">
Add Card Payment Rates
</a>
<a id="addAlipayApsRate" class="btn btn-info" style="float: right;margin-right: 10px" type="button"
ng-if="bankCtrl.rate_name=='AlipayAps'"
ng-click="newAlipayApsRate()">
Add Alipay+(APS) Rate
</a> </a>
</ul> </ul>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered"> <table class="table table-bordered">
<thead ng-if="bankCtrl.rate_name != 'AlipayAps'"> <thead>
<tr> <tr>
<th>Rate Name</th> <th>Rate Name</th>
<th ng-if="bankCtrl.rate_name!='rpaypmt_card'">Rate Value</th> <th>Rate Value</th>
<th ng-if="bankCtrl.rate_name=='rpaypmt_card'">Domestic Rate Value</th>
<th ng-if="bankCtrl.rate_name=='rpaypmt_card'">International Rate Value</th>
<th>Transaction Fee</th> <th>Transaction Fee</th>
<th>Active Time</th> <th>Active Time</th>
<th>Expire Time</th> <th>Expire Time</th>
<th <th
ng-if="bankCtrl.rate_name=='Wechat' || bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd'"> ng-if="bankCtrl.rate_name=='Wechat'">
Clean Days Clean Days
</th> </th>
<th>Update Time</th> <th>Update Time</th>
@ -311,34 +291,16 @@
<th style="text-align: center">Operation</th> <th style="text-align: center">Operation</th>
</tr> </tr>
</thead> </thead>
<thead ng-if="bankCtrl.rate_name == 'AlipayAps'">
<tr>
<th>Rate Name</th>
<th>Interchange Fee</th>
<th>Service Fee</th>
<th>Active Time</th>
<th>Expire Time</th>
<th>Update Time</th>
<th>Operator</th>
<th>Remark</th>
<th style="text-align: center">Operation</th>
</tr>
</thead>
<tbody> <tbody>
<tr ng-repeat="rate in rates|filter:{rate_name:bankCtrl.rate_name}:true" <tr ng-repeat="rate in rates|filter:{rate_name:bankCtrl.rate_name}:true"
ng-class="{'text-bold':rate.current,'success':rate.active}"> ng-class="{'text-bold':rate.current,'success':rate.active}">
<td ng-bind="rate.rate_name"></td> <td ng-bind="rate.rate_name"></td>
<td ng-if="bankCtrl.rate_name!='rpaypmt_card'" ng-bind="rate.rate_value + ' %'"></td> <td ng-bind="rate.rate_value + ' %'"></td>
<td ng-if="bankCtrl.rate_name=='rpaypmt_card'" ng-bind="rate.rate_value + ' %'"></td> <td ng-bind="'$ '+rate.transaction_fee"></td>
<td ng-if="bankCtrl.rate_name=='rpaypmt_card'"
ng-bind="rate.ext_rates.overseas_rate_value.rate + ' %/T+'+rate.ext_rates.overseas_rate_value.clean_days">
</td>
<td ng-if="bankCtrl.rate_name !='AlipayAps'" ng-bind="'$ '+rate.transaction_fee"></td>
<td ng-if="bankCtrl.rate_name =='AlipayAps'" ng-bind="rate.transaction_fee + ' %'"></td>
<td ng-bind="rate.active_time|date:'yyyy-MM-dd'"></td> <td ng-bind="rate.active_time|date:'yyyy-MM-dd'"></td>
<td ng-bind="rate.expiry_time|date:'yyyy-MM-dd'"></td> <td ng-bind="rate.expiry_time|date:'yyyy-MM-dd'"></td>
<td <td
ng-if="rate.rate_name=='Wechat' || bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd'"> ng-if="rate.rate_name=='Wechat'">
T+{{rate.clean_days}} T+{{rate.clean_days}}
</td> </td>
<td ng-bind="rate.update_time|date:'yyyy-MM-dd'"></td> <td ng-bind="rate.update_time|date:'yyyy-MM-dd'"></td>
@ -347,12 +309,6 @@
<td style="text-align: center"> <td style="text-align: center">
<a role="button" ng-click="editRate(rate)" style="padding-right: 10px;" <a role="button" ng-click="editRate(rate)" style="padding-right: 10px;"
ng-if="'011'|withRole"><i class="fa fa-edit"></i></a> ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
<span ng-if="(bankCtrl.rate_name=='rpaypmt_card' ||bankCtrl.rate_name=='rpaypmt_dd')
&& partner.upay_approve_result">
<span style="color: orange">(Promotional Offer)</span>
<a class="fa fa-cloud-download" target="_blank"
ng-href="/sys/partners/{{partner.client_moniker}}/export/aggregate/card_promotion_agree_pdf?rateid={{rate.client_rate_id}}"></a>
</span>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -427,4 +383,132 @@
</div> </div>
</div> </div>
</div> </div>
<!-- card payment -->
<div class="panel-heading">
<h3>Card Payment Rate</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-12">
<ul class="nav nav-pills margin-bottom">
<li role="presentation" ng-class="{active:cardBankCtrl.rate_name=='rpaypmt_card'}"><a role="button"
ng-click="cardBankCtrl.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>-->
<a id="addCardPaymentRate" class="btn btn-info" style="float: right" type="button"
ng-click="newCardPaymentRates()"
ng-if="((partner.card_rate_editable && ('100'|withRole)) || ('11'|withRole))">
Add Card Payment Rates
</a>
</ul>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Rate Name</th>
<th>Domestic Rate Value</th>
<th>International Rate Value</th>
<th>Transaction Fee</th>
<th>Active Time</th>
<th>Expire Time</th>
<th>Clean Days</th>
<th>Update Time</th>
<th>Operator</th>
<th>Remark</th>
<th style="text-align: center">Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="rate in rates|filter:{rate_name:cardBankCtrl.rate_name}:true"
ng-class="{'text-bold':rate.current,'success':rate.active}">
<td ng-bind="rate.rate_name"></td>
<td ng-bind="rate.rate_value + ' %'"></td>
<td ng-bind="rate.ext_rates.overseas_rate_value.rate + ' %/T+'+rate.ext_rates.overseas_rate_value.clean_days">
</td>
<td ng-bind="'$ '+rate.transaction_fee"></td>
<td ng-bind="rate.active_time|date:'yyyy-MM-dd'"></td>
<td ng-bind="rate.expiry_time|date:'yyyy-MM-dd'"></td>
<td>T+{{rate.clean_days}}</td>
<td ng-bind="rate.update_time|date:'yyyy-MM-dd'"></td>
<td ng-bind="rate.operator_name||'系统生成'"></td>
<td ng-bind="rate.remark|limitTo:20" title="{{rate.remark}}"></td>
<td style="text-align: center">
<a role="button" ng-click="editRate(rate)" style="padding-right: 10px;"
ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
<span ng-if="partner.upay_approve_result">
<span style="color: orange">(Promotional Offer)</span>
<a class="fa fa-cloud-download" target="_blank"
ng-href="/sys/partners/{{partner.client_moniker}}/export/aggregate/card_promotion_agree_pdf?rateid={{rate.client_rate_id}}"></a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- APS -->
<div class="panel-heading">
<h3>A+</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-sm-12">
<ul class="nav nav-pills margin-bottom">
<li role="presentation" ng-class="{active:apsBankCtrl.rate_name=='ApsInStore'}"><a
role="button"
ng-click="apsBankCtrl.rate_name='ApsInStore'">A+(Retail)</a>
</li>
<li role="presentation" ng-class="{active:apsBankCtrl.rate_name=='ApsCashier'}"><a
role="button"
ng-click="apsBankCtrl.rate_name='ApsCashier'">A+(Online)</a>
</li>
<a id="addAlipayApsInStoreRate" class="btn btn-info" style="float: right;margin-right: 10px"
type="button"
ng-click="newAlipayApsRate(apsBankCtrl.rate_name)">
Add A+(APS) Rate
</a>
</ul>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>Rate Name</th>
<th>Interchange Fee</th>
<th>Service Fee</th>
<th>Active Time</th>
<th>Expire Time</th>
<th>Update Time</th>
<th>Operator</th>
<th>Remark</th>
<th style="text-align: center">Operation</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="rate in rates|filter:{rate_name:apsBankCtrl.rate_name}:true"
ng-class="{'text-bold':rate.current,'success':rate.active}">
<td ng-bind="rate.rate_name"></td>
<td ng-bind="rate.rate_value + ' %'"></td>
<td ng-bind="rate.transaction_fee + ' %'"></td>
<td ng-bind="rate.active_time|date:'yyyy-MM-dd'"></td>
<td ng-bind="rate.expiry_time|date:'yyyy-MM-dd'"></td>
<td ng-bind="rate.update_time|date:'yyyy-MM-dd'"></td>
<td ng-bind="rate.operator_name||'系统生成'"></td>
<td ng-bind="rate.remark|limitTo:20" title="{{rate.remark}}"></td>
<td style="text-align: center">
<a role="button" ng-click="editRate(rate)" style="padding-right: 10px;"
ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div> </div>

@ -1,5 +1,5 @@
<div class="modal-header"> <div class="modal-header">
<h4>New Alipay APS Rate</h4> <h4>New Alipay+ APS Rate</h4>
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div> <div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>
@ -20,17 +20,17 @@
</div> </div>
</div> </div>
<!-- interchange fee --> <!-- retail interchange fee -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':rate_from.interchange_fee_value.$invalid && rate_from.interchange_fee_value.$dirty}"> ng-class="{'has-error':rate_from.retail_interchange_fee_value.$invalid && rate_from.retail_interchange_fee_value.$dirty}">
<label class="control-label col-sm-4" for="interchange_fee_value_input">Interchange Fee</label> <label class="control-label col-sm-4" for="retail_interchange_fee_value_input">Retail Interchange Fee</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group"> <div class="input-group">
<input type="number" name="interchange_fee_value" stringToNumber2 class="form-control" ng-model="rate.interchange_fee_value" <input type="number" name="retail_interchange_fee_value" stringToNumber2 class="form-control" ng-model="rate.retail_interchange_fee_value"
min="0.6" max="10" step="0.1" id="interchange_fee_value_input" required> min="0.6" max="10" step="0.1" id="retail_interchange_fee_value_input" required>
<div class="input-group-addon">%</div> <div class="input-group-addon">%</div>
</div> </div>
<div ng-messages="rate_from.interchange_fee_value.$error" ng-if="rate_from.interchange_fee_value.$dirty"> <div ng-messages="rate_from.retail_interchange_fee_value.$error" ng-if="rate_from.retail_interchange_fee_value.$dirty">
<div class="small text-danger" ng-message="max"> <div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 10.0% <i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div> </div>
@ -44,17 +44,66 @@
</div> </div>
</div> </div>
<!-- service fee --> <!-- retail service fee -->
<div class="form-group" <div class="form-group"
ng-class="{'has-error':rate_from.service_fee_value.$invalid && rate_from.service_fee_value.$dirty}"> ng-class="{'has-error':rate_from.retail_service_fee_value.$invalid && rate_from.retail_service_fee_value.$dirty}">
<label class="control-label col-sm-4" for="service_fee_value_input">Service Fee</label> <label class="control-label col-sm-4" for="retail_service_fee_value_input">Retail Service Fee</label>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="input-group"> <div class="input-group">
<input type="number" name="service_fee_value" stringToNumber2 class="form-control" ng-model="rate.service_fee_value" <input type="number" name="retail_service_fee_value" stringToNumber2 class="form-control" ng-model="rate.retail_service_fee_value"
min="0.6" max="10" step="0.1" id="service_fee_value_input" required> min="0.6" max="10" step="0.1" id="retail_service_fee_value_input" required>
<div class="input-group-addon">%</div> <div class="input-group-addon">%</div>
</div> </div>
<div ng-messages="rate_from.service_fee_value.$error" ng-if="rate_from.service_fee_value.$dirty"> <div ng-messages="rate_from.retail_service_fee_value.$error" ng-if="rate_from.retail_service_fee_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<!-- online interchange fee -->
<div class="form-group"
ng-class="{'has-error':rate_from.online_interchange_fee_value.$invalid && rate_from.online_interchange_fee_value.$dirty}">
<label class="control-label col-sm-4" for="online_interchange_fee_value_input">Online Interchange Fee</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="online_interchange_fee_value" stringToNumber2 class="form-control" ng-model="rate.online_interchange_fee_value"
min="0.6" max="10" step="0.1" id="online_interchange_fee_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_from.online_interchange_fee_value.$error" ng-if="rate_from.online_interchange_fee_value.$dirty">
<div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div>
<div class="small text-danger" ng-message="min">
<i class="glyphicon glyphicon-alert"></i> No less than 0.6%
</div>
<div class="small text-danger" ng-message="required">
<i class="glyphicon glyphicon-alert"></i> Required Field
</div>
</div>
</div>
</div>
<!-- online service fee -->
<div class="form-group"
ng-class="{'has-error':rate_from.online_service_fee_value.$invalid && rate_from.online_service_fee_value.$dirty}">
<label class="control-label col-sm-4" for="online_service_fee_value_input">Online Service Fee</label>
<div class="col-sm-6">
<div class="input-group">
<input type="number" name="online_service_fee_value" stringToNumber2 class="form-control" ng-model="rate.online_service_fee_value"
min="0.6" max="10" step="0.1" id="online_service_fee_value_input" required>
<div class="input-group-addon">%</div>
</div>
<div ng-messages="rate_from.online_service_fee_value.$error" ng-if="rate_from.online_service_fee_value.$dirty">
<div class="small text-danger" ng-message="max"> <div class="small text-danger" ng-message="max">
<i class="glyphicon glyphicon-alert"></i> No more than 10.0% <i class="glyphicon glyphicon-alert"></i> No more than 10.0%
</div> </div>

@ -1,6 +1,6 @@
<div class="modal-header"> <div class="modal-header">
<h4>New {{cardRateConfig.title}} Rate</h4> <h4>New {{cardRateConfig.title}} Rate</h4>
<a role="button" ng-click="switchCardRateConfig()"><i class="fa fa-refresh"></i>Switch {{card_payment_switch_title}} Rate Config</a> <!-- <a role="button" ng-click="switchCardRateConfig()"><i class="fa fa-refresh"></i>Switch {{card_payment_switch_title}} Rate Config</a>-->
</div> </div>
<div class="modal-body"> <div class="modal-body">
<div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div> <div class="alert alert-danger" ng-if="errmsg" ng-bind="errmsg"></div>

@ -550,15 +550,20 @@
<!--AlipayCN支付渠道切换--> <!--AlipayCN支付渠道切换-->
<div class="panel panel-default" ng-if="(('111'|withRole))"> <div class="panel panel-default" ng-if="(('111'|withRole))">
<div class="panel-heading">AlipayCN channel replace</div> <div class="panel-heading">AlipayCN Channel Configuration</div>
<div class="panel-body"> <div class="panel-body">
<div class="form-horizontal"> <div class="form-horizontal">
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<label class="col-xs-6 control-label">AlipayCN channel</label> <label class="col-xs-6 control-label">AlipayCN channel</label>
<div class="col-xs-6"> <div class="col-xs-6">
<input type="checkbox" ng-model="paymentInfo.alipay_cn_switch" bs-switch switch-on-text="Alipay+(APS)" <label class="radio-inline">
switch-off-text="Alipay" <input type="radio" value="0" ng-model="paymentInfo.alipay_cn_switch" ng-change="switchAlipayCn(paymentInfo.client_id,paymentInfo.aps_config_id,paymentInfo.alipay_cn_switch)">
ng-change="switchAlipayCn(paymentInfo.client_id,paymentInfo.aps_config_id,paymentInfo.alipay_cn_switch)"> Alipay
</label>
<label class="radio-inline">
<input type="radio" value="1" ng-model="paymentInfo.alipay_cn_switch" ng-change="switchAlipayCn(paymentInfo.client_id,paymentInfo.aps_config_id,paymentInfo.alipay_cn_switch)">
Alipay+(APS)
</label>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save