master
kira 6 years ago
commit 0c2afb0c81

@ -13,4 +13,6 @@ public interface PartnersAnalysisService {
List<JSONObject> getTradePartnersAnalysis(JSONObject params); List<JSONObject> getTradePartnersAnalysis(JSONObject params);
List<JSONObject> getPartnersTypesAnalysis(JSONObject params); List<JSONObject> getPartnersTypesAnalysis(JSONObject params);
List<JSONObject> getPartnersSettlementAnalysis(JSONObject params);
} }

@ -47,7 +47,12 @@ public class PartnersAnalysisServiceImpl implements PartnersAnalysisService {
return getPartnerTypes(key_2,result,2,6,types); return getPartnerTypes(key_2,result,2,6,types);
} }
private List<JSONObject> getPartnerTypes(String keys[],List<JSONObject> result,int short_length,int long_length,List<JSONObject> types){ @Override
public List<JSONObject> getPartnersSettlementAnalysis(JSONObject params) {
return clientAnalysisMapper.countClientsSettlementCycle(params);
}
private List<JSONObject> getPartnerTypes(String keys[], List<JSONObject> result, int short_length, int long_length, List<JSONObject> types){
for(String key : keys){ for(String key : keys){
int countValue = 0; int countValue = 0;
JSONObject object = new JSONObject(); JSONObject object = new JSONObject();

@ -35,4 +35,6 @@ public interface ClientAnalysisMapper {
List<JSONObject> countClientsTypes(JSONObject params); List<JSONObject> countClientsTypes(JSONObject params);
List<JSONObject> notTradeSubMerchantId(); List<JSONObject> notTradeSubMerchantId();
List<JSONObject> countClientsSettlementCycle(JSONObject params);
} }

@ -66,4 +66,19 @@ public class PartnersAnalysisController {
} }
return partnersAnalysisService.getPartnersTypesAnalysis(params); return partnersAnalysisService.getPartnersTypesAnalysis(params);
} }
@ManagerMapping("/settlement")
public List<JSONObject> getPartnersSettlementAnalysis(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
JSONObject params = analysis.toParams(null);
if (manager.getInteger("org_id") != null) {
params.put("org_id", manager.getIntValue("org_id"));
}
if (analysis.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) {
params.put("bd_group", manager.getString("manager_id"));
if (analysis.getGroup_bd()>0){
params.put("bd_group_bd",analysis.getGroup_bd());
}
}
return partnersAnalysisService.getPartnersSettlementAnalysis(params);
}
} }

@ -205,6 +205,9 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
total.put("wechat_charge", 0); total.put("wechat_charge", 0);
total.put("royalpay_charge", 0); total.put("royalpay_charge", 0);
total.put("net_amount", 0); total.put("net_amount", 0);
total.put("total_charge", 0);
total.put("tax_amount", 0);
total.put("charge_cashback", 0);
List<JSONObject> details = new ArrayList<>(); List<JSONObject> details = new ArrayList<>();
for (JSONObject log : logs) { for (JSONObject log : logs) {
@ -214,6 +217,9 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
addBigDecimal(total, log, "wechat_charge"); addBigDecimal(total, log, "wechat_charge");
addBigDecimal(total, log, "royalpay_charge"); addBigDecimal(total, log, "royalpay_charge");
addBigDecimal(total, log, "net_amount"); addBigDecimal(total, log, "net_amount");
addBigDecimal(total, log, "total_charge");
addBigDecimal(total, log, "charge_cashback");
addBigDecimal(total, log, "tax_amount");
int clearingId = log.getIntValue("clearing_id"); int clearingId = log.getIntValue("clearing_id");
List<JSONObject> logDetails = clearingDetailMapper.listReportsOfSettlement(clearingId); List<JSONObject> logDetails = clearingDetailMapper.listReportsOfSettlement(clearingId);
details.addAll(logDetails); details.addAll(logDetails);
@ -226,6 +232,9 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
.map(detail -> detail.getBigDecimal("clearing_amount")) .map(detail -> detail.getBigDecimal("clearing_amount"))
.reduce(BigDecimal::add) .reduce(BigDecimal::add)
); );
data.put("clients", logDetails.stream()
.filter(detail -> bank.equals(detail.getString("settle_bank")))
.count());
return data; return data;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
log.put("bank_statistics", bankStatistics); log.put("bank_statistics", bankStatistics);

@ -88,4 +88,7 @@ public interface ClientMapper {
PageList<JSONObject> simpleQuery(JSONObject params, PageBounds pagination); PageList<JSONObject> simpleQuery(JSONObject params, PageBounds pagination);
@AutoSql(type = SqlType.SELECT)
JSONObject findByWechatInstitutionMerchantId(@Param("wechat_institution_merchant_id") String wechat_institution_merchant_id);
} }

@ -45,6 +45,7 @@ public interface ManagerMapper {
List<JSONObject> listByRole(JSONObject params); List<JSONObject> listByRole(JSONObject params);
@AutoSql(type = SqlType.SELECT) @AutoSql(type = SqlType.SELECT)
@AdvanceSelect(addonWhereClause = "is_valid=1")
JSONObject findByWxOpenId(@Param("wx_openid") String openid); JSONObject findByWxOpenId(@Param("wx_openid") String openid);
List<String> listOpenIdsOfCompliances(); List<String> listOpenIdsOfCompliances();

@ -63,6 +63,9 @@ public interface ClientManager {
@Transactional @Transactional
void updateAliSubMerchantId(JSONObject manager, String clientMoniker, JSONObject aliSubMerchantInfo); void updateAliSubMerchantId(JSONObject manager, String clientMoniker, JSONObject aliSubMerchantInfo);
@Transactional
void refreshWechatInstitutionMerchantId(JSONObject manager, String clientMoniker, JSONObject refreshWechatInstitutionMerchantId);
@Transactional(noRollbackFor = EmailException.class) @Transactional(noRollbackFor = EmailException.class)
void auditClient(JSONObject manager, String clientMoniker, int pass); void auditClient(JSONObject manager, String clientMoniker, int pass);

@ -742,11 +742,40 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientInfoCacheSupport.clearClientCache(clientId); clientInfoCacheSupport.clearClientCache(clientId);
} }
@Override
public void refreshWechatInstitutionMerchantId(JSONObject manager, String clientMoniker, JSONObject refreshWechatInstitutionMerchantId) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
JSONObject update = new JSONObject();
int clientId = client.getIntValue("client_id");
update.put("client_id", clientId);
String wechatInstitutionMerchantId = RandomStringUtils.random(6, true, true).toUpperCase();
if(StringUtils.isEmpty(refreshWechatInstitutionMerchantId.getString("wechat_institution_merchant_id"))){
update.put("wechat_institution_merchant_id",wechatInstitutionMerchantId);
}else {
update.put("wechat_institution_merchant_id",createWechatInstitutionMerchantId(wechatInstitutionMerchantId)) ;
}
clientMapper.update(update);
clientInfoCacheSupport.clearClientCache(clientId);
}
private String createWechatInstitutionMerchantId(String wechatInstitutionMerchantId){
JSONObject client = clientMapper.findByWechatInstitutionMerchantId(wechatInstitutionMerchantId);
if(client == null){
return wechatInstitutionMerchantId;
}else {
return createWechatInstitutionMerchantId(RandomStringUtils.random(6, true, true).toUpperCase());
}
}
private void recordSubMerchantLog(JSONObject client, JSONObject subMerchantInfo, JSONObject manager) { private void recordSubMerchantLog(JSONObject client, JSONObject subMerchantInfo, JSONObject manager) {
JSONObject log = new JSONObject(); JSONObject log = new JSONObject();
log.put("sub_merchant_id_after", subMerchantInfo.getString("sub_merchant_id")); log.put("sub_merchant_id_after", subMerchantInfo.getString("sub_merchant_id"));
log.put("operator", manager.getString("display_name")); log.put("operator", manager.getString("display_name"));
log.put("create_time", new Date()); log.put("create_time", new Date());
log.put("wechat_institution_merchant_id", client.getString("wechat_institution_merchant_id"));
log.put("client_id", client.getIntValue("client_id")); log.put("client_id", client.getIntValue("client_id"));
log.put("sub_merchant_id_before", client.getString("sub_merchant_id")); log.put("sub_merchant_id_before", client.getString("sub_merchant_id"));
logClientSubMerchantIdMapper.save(log); logClientSubMerchantIdMapper.save(log);

@ -159,6 +159,11 @@ public class PartnerManageController {
clientManager.updateAliSubMerchantId(manager, clientMoniker, aliSubMerchantInfo); clientManager.updateAliSubMerchantId(manager, clientMoniker, aliSubMerchantInfo);
} }
@ManagerMapping(value = "/{clientMoniker}/wechat_institution_merchant_id", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR})
public void refreshWechatInsMerchantId(@PathVariable String clientMoniker, @RequestBody JSONObject refreshWechatInstitutionMerchantId, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.refreshWechatInstitutionMerchantId(manager, clientMoniker, refreshWechatInstitutionMerchantId);
}
@ManagerMapping(value = "/{clientMoniker}/qrcode_surcharge", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.SERVANT}) @ManagerMapping(value = "/{clientMoniker}/qrcode_surcharge", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN, ManagerRole.BD_USER, ManagerRole.SERVANT})
public void setClientPaySurCharge(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,@PathVariable String clientMoniker, @RequestBody JSONObject config) { public void setClientPaySurCharge(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,@PathVariable String clientMoniker, @RequestBody JSONObject config) {
clientManager.setClientQRCodePaySurCharge(manager,clientMoniker, config.getBooleanValue("qrcode_surcharge")); clientManager.setClientQRCodePaySurCharge(manager,clientMoniker, config.getBooleanValue("qrcode_surcharge"));

@ -148,4 +148,41 @@
GROUP by c.sub_merchant_id GROUP by c.sub_merchant_id
</select> </select>
<select id="countClientsSettlementCycle" resultType="com.alibaba.fastjson.JSONObject">
SELECT COUNT(DISTINCT c.client_id) client_count,
CASE c.clean_days
WHEN 1
THEN 'T+1'
WHEN 2
THEN 'T+2'
WHEN 3
THEN 'T+3'
END AS clean_days
FROM sys_clients c
<where>
(c.approve_result = 1 OR c.approve_result= 2) AND c.is_valid = 1
<if test="org_id!=null and org_ids==null">and org_id=#{org_id}</if>
<if test="org_ids!=null">and org_id in
<foreach collection="org_ids" item="org_id" open="(" close=")" separator=",">#{org_id}</foreach></if>
<if test="bd_group!=null">and c.client_id in
(SELECT b.client_id FROM sys_client_bd b
INNER JOIN financial_bd_config c ON c.manager_id=b.bd_id
where b.is_valid=1 and b.start_date&lt;=now() and (b.end_date is null or b.end_date &gt;= now())
AND (c.bd_group=#{bd_group} or c.manager_id=#{bd_group})
<if test="bd_group_bd">and c.manager_id=#{bd_group_bd}</if>)
</if>
<if test="begin!=null">
AND c.client_id in (SELECT o.client_id FROM statistics_customer_order o
<where>
<if test="begin!=null">
o.date >=#{begin}
</if>
<if test="eng!=null">
o.date > #{end}
</if>
</where>)
</if>
</where>
GROUP by c.clean_days
</select>
</mapper> </mapper>

@ -12,7 +12,7 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
app.controller('partnersAnalysisCtrl', ['$scope', '$http', '$filter', '$timeout', 'commonDialog', 'chartParser','industryMap', app.controller('partnersAnalysisCtrl', ['$scope', '$http', '$filter', '$timeout', 'commonDialog', 'chartParser','industryMap',
function ($scope, $http, $filter, $timeout, commonDialog, chartParser,industryMap) { function ($scope, $http, $filter, $timeout, commonDialog, chartParser,industryMap) {
$scope.params = {}; $scope.params = {};
$scope.analysis = {};
if (($scope.currentUser.role & parseInt('1000000000', 2)) > 0 && $scope.currentUser.org_id) { if (($scope.currentUser.role & parseInt('1000000000', 2)) > 0 && $scope.currentUser.org_id) {
$http.get('/sys/manager_accounts/group/group_bds').then(function (resp) { $http.get('/sys/manager_accounts/group/group_bds').then(function (resp) {
$scope.bd_group_bds = resp.data; $scope.bd_group_bds = resp.data;
@ -23,6 +23,7 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
if (!$scope.params.onlyGroup){ if (!$scope.params.onlyGroup){
$scope.loadPartnersInTypes(); $scope.loadPartnersInTypes();
$scope.doAnalysis(); $scope.doAnalysis();
$scope.loadTradePartnersBySettlementCycle();
return; return;
} }
if (groupBD == 'all') { if (groupBD == 'all') {
@ -36,6 +37,7 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
} }
$scope.loadPartnersInTypes(); $scope.loadPartnersInTypes();
$scope.doAnalysis(); $scope.doAnalysis();
$scope.loadTradePartnersBySettlementCycle();
}; };
$scope.loadRoyalpayindustry = function () { $scope.loadRoyalpayindustry = function () {
$http.get('/static/data/royalpayindustry.json').then(function (resp) { $http.get('/static/data/royalpayindustry.json').then(function (resp) {
@ -176,6 +178,71 @@ define(['angular', 'uiBootstrap', 'uiRouter', 'angularEcharts','./transaction/an
series: series series: series
} }
}; };
$scope.loadTradePartnersBySettlementCycle = function () {
var params = angular.copy($scope.analysis);
params.onlyGroup = $scope.params.onlyGroup;
if ($scope.params.group_bd){
params.group_bd=angular.copy($scope.params.group_bd);
}
$http.get('/analysis/partners/settlement', {params:params}).then(function (resp) {
$scope.settlementCycle = resp.data;
$scope.partners_settlement_chart = chartParser.parse(partnersBySettlementCycle, resp.data);
});
};
$scope.loadTradePartnersBySettlementCycle();
$scope.chooseAll = function () {
$scope.analysis = {};
$scope.loadTradePartnersBySettlementCycle()
};
$scope.chooseThirtyDays = function () {
$scope.analysis = {};
$scope.analysis.end = $filter('date')(new Date(), 'yyyyMMdd');
var day = new Date();
day.setDate(day.getDate() - 30);
$scope.analysis.begin = $filter('date')(day, 'yyyyMMdd');
$scope.loadTradePartnersBySettlementCycle();
};
$scope.chooseLastMonth = function () {
$scope.analysis = {};
var monthFinish = new Date();
monthFinish.setDate(0);
$scope.analysis.end = $filter('date')(monthFinish, 'yyyyMMdd');
var monthBegin = new Date();
monthBegin.setDate(0);
monthBegin.setDate(1);
$scope.analysis.begin = $filter('date')(monthBegin, 'yyyyMMdd');
$scope.loadTradePartnersBySettlementCycle();
};
var partnersBySettlementCycle = {
chart: {
tooltip: {
trigger: 'item',
formatter :"{a} {b} : {c} ({d}%)"
},
color: colors
},
series: [{
basic: {
name: '周期', type: 'pie',
radius: '60%',
center: ['50%', '40%'],
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
},
normal : {
label : {
position : 'outer',
formatter :"{a} {b} : {c} ({d}%)"
}
}
}
},
column: {key: 'client_count', name: 'clean_days'}
}]
};
/*var partnerTypesConfig = function (legend) { /*var partnerTypesConfig = function (legend) {
return { return {
chart: { chart: {

@ -59,7 +59,13 @@
</div> </div>
</div> </div>
<div class="box box-warning"> <div class="box box-warning">
<div class="box-header"> <div class="box-header pull-right">
<div class="btn-group" role="group">
<button type="button" class="btn btn-info" ng-click="display=false" ng-class="{'active':!display}">行业</button>
<button type="button" class="btn btn-info" ng-click="display=true" ng-class="{'active':display}">清算周期</button>
</div>
</div>
<div class="box-body" ng-if="!display">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="col-sm-6 col-xs-12"> <div class="col-sm-6 col-xs-12">
<p class="text-center">各类型商家数量分布</p> <p class="text-center">各类型商家数量分布</p>
@ -92,6 +98,41 @@
</label> </label>
</div> </div>
</div> </div>
<div class="box-body" ng-if="display">
<div class="col-sm-12">
<div class="col-sm-6 col-xs-12">
<p class="text-center">商户清算周期分布</p>
<div class="chart" style="height: 300px" echarts="partners_settlement_chart"
chart-setter="partner_type_chart($chart)"
ng-class="{nodata:partners_settlement_chart.nodata}"></div>
</div>
<div class="col-sm-6 col-xs-12">
<div class="text-center">
<p class="btn-group text-center" role="group">
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseAll()">All</button>
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseThirtyDays();">recent 30 days</button>
<button type="button" class="btn btn-primary btn-xs" ng-click="chooseLastMonth();">Last Month</button>
</p>
<p></p>
<p>清算周期列表</p>
</div>
<table class="table table-bordered table-hover table-striped">
<thead>
<tr>
<th>Clean Days</th>
<th>Partners</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="cycle in settlementCycle">
<td ng-bind="cycle.clean_days"></td>
<td ng-bind="cycle.client_count"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div> </div>
<div class="box box-warning"> <div class="box box-warning">
<div class="box-header"> <div class="box-header">

@ -87,7 +87,12 @@
<li class="list-group-item" ng-repeat="bank in getCurrentLog().bank_statistics"> <li class="list-group-item" ng-repeat="bank in getCurrentLog().bank_statistics">
<div class="row"> <div class="row">
<span class="col-xs-1 text-bold" ng-bind="bank.bank"></span> <span class="col-xs-1 text-bold" ng-bind="bank.bank"></span>
<span class="col-xs-11" ng-bind="bank.total_settle|currency:''"></span> <span class="col-xs-11">
<span>Total Amount:</span>
<span ng-bind="bank.total_settle|currency:''"></span>
<span>Clients:</span>
<span ng-bind="bank.clients"></span>
</span>
</div> </div>
</li> </li>
</ul> </ul>
@ -119,7 +124,7 @@
<div class="col-xs-6 col-sm-3"> <div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Total Charge</span> <span class="col-xs-6 text-bold">Total Charge</span>
<span class="col-xs-6" <span class="col-xs-6"
ng-bind="(currentAnalysis.wechat_charge+currentAnalysis.royalpay_charge)|currency:''"></span> ng-bind="currentAnalysis.total_charge|currency:''"></span>
</div> </div>
<div class="col-xs-6 col-sm-3"> <div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Channel Charge</span> <span class="col-xs-6 text-bold">Channel Charge</span>
@ -129,6 +134,17 @@
<span class="col-xs-6 text-bold">RoyalPay Charge</span> <span class="col-xs-6 text-bold">RoyalPay Charge</span>
<span class="col-xs-6" ng-bind="currentAnalysis.royalpay_charge|currency:''"></span> <span class="col-xs-6" ng-bind="currentAnalysis.royalpay_charge|currency:''"></span>
</div> </div>
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Charge Cashback</span>
<span class="col-xs-6" ng-bind="currentAnalysis.charge_cashback|currency:''"></span>
</div>
</div>
<div class="row">
<div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">GST</span>
<span class="col-xs-6"
ng-bind="currentAnalysis.tax_amount|currency:''"></span>
</div>
<div class="col-xs-6 col-sm-3"> <div class="col-xs-6 col-sm-3">
<span class="col-xs-6 text-bold">Operate Time</span> <span class="col-xs-6 text-bold">Operate Time</span>
<span class="col-xs-6" <span class="col-xs-6"
@ -141,8 +157,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<ul class="list-group"> <ul class="list-group">
<li class="list-group-item" ng-repeat="channel in currentAnalysis.channel_analysis" <li class="list-group-item" ng-repeat="channel in currentAnalysis.channel_analysis">
ng-if="channel.channel!='System'">
<div class="row"> <div class="row">
<span class="col-xs-2"><img ng-src="{{channel.channel|channel_image}}" <span class="col-xs-2"><img ng-src="{{channel.channel|channel_image}}"
class="channel-icon-lg"></span> class="channel-icon-lg"></span>

@ -522,6 +522,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}; };
$scope.showFile(); $scope.showFile();
$scope.passClient = function () { $scope.passClient = function () {
if(!$scope.partner.wechat_institution_merchant_id){
commonDialog.alert({title: 'info', content: 'Wechat Institution Merchant Id not Refresh', type: 'info'});
return;
}
if ($scope.partner.enable_hf) { if ($scope.partner.enable_hf) {
if($scope.partner.hfindustry == null){ if($scope.partner.hfindustry == null){
alert("已开启HF支付通道HF行业不可为空!"); alert("已开启HF支付通道HF行业不可为空!");
@ -570,6 +574,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}); });
}; };
$scope.pass2GreenChannel = function () { $scope.pass2GreenChannel = function () {
if(!$scope.partner.wechat_institution_merchant_id){
commonDialog.alert({title: 'info', content: 'Wechat Institution Merchant Id not Refresh', type: 'info'});
return;
}
commonDialog.confirm({ commonDialog.confirm({
title: 'Green Channel Audit Partner', title: 'Green Channel Audit Partner',
content: 'Are you sure to mark partner ' + $scope.partner.company_name + ' green channel audited ' content: 'Are you sure to mark partner ' + $scope.partner.company_name + ' green channel audited '
@ -1108,6 +1116,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
}]); }]);
app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog','$uibModal', function ($scope, $http, $state, commonDialog,$uibModal) { app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog','$uibModal', function ($scope, $http, $state, commonDialog,$uibModal) {
$scope.refresh = false;
$scope.loadPartnerPaymentInfo = function () { $scope.loadPartnerPaymentInfo = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) { $http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) {
$scope.paymentInfo = resp.data; $scope.paymentInfo = resp.data;
@ -1232,12 +1241,31 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}; };
$scope.ctrl = {}; $scope.ctrl = {};
$scope.saveSubMerchantId = function () { $scope.saveSubMerchantId = function () {
if(!$scope.refresh){
commonDialog.alert({title: 'info', content: 'Wechat Institution Merchant Id not Refresh', type: 'info'});
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_config', {sub_merchant_id: $scope.paymentInfo.sub_merchant_id}).then(function (resp) { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_config', {sub_merchant_id: $scope.paymentInfo.sub_merchant_id}).then(function (resp) {
commonDialog.alert({ commonDialog.alert({
title: 'Success', title: 'Success',
content: 'Modify Wechat Sub Merchant ID successfully', content: 'Modify Wechat Sub Merchant ID successfully',
type: 'success' type: 'success'
}); });
$scope.refresh = false;
$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
});
};
$scope.refreshWechatInstitutionMerchantId = function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_institution_merchant_id', {wechat_institution_merchant_id: $scope.paymentInfo.wechat_institution_merchant_id}).then(function (resp) {
commonDialog.alert({
title: 'Success',
content: 'Refresh Wechat Institution Merchant Id successfully',
type: 'success'
});
$scope.refresh = true;
$scope.loadPartnerPaymentInfo(); $scope.loadPartnerPaymentInfo();
}, function (resp) { }, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})

@ -332,7 +332,7 @@
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}"> ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}">
<label class="control-label col-sm-2" for="desc-input">* <label class="control-label col-sm-2" for="desc-input">*
Description</label> Major Products/Service</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea class="form-control" required <textarea class="form-control" required
ng-model="partner.description" ng-model="partner.description"

@ -271,7 +271,7 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}"> ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}">
<label class="control-label col-sm-2" for="desc-input">* Description</label> <label class="control-label col-sm-2" for="desc-input">* Major Products/Service</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea class="form-control" required ng-model="partner.description" <textarea class="form-control" required ng-model="partner.description"
name="description" id="desc-input" maxlength="200"></textarea> name="description" id="desc-input" maxlength="200"></textarea>

@ -160,7 +160,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">*Description</label> <label class="control-label col-sm-2">Major Products/Service</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.description"></p> <p class="form-control-static" ng-bind="partner.description"></p>
@ -480,7 +480,7 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}"> ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}">
<label class="control-label col-sm-2" for="desc-input">Description</label> <label class="control-label col-sm-2" for="desc-input">Major Products/Service</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea class="form-control" ng-model="partner.description" <textarea class="form-control" ng-model="partner.description"
name="description" id="desc-input" maxlength="200" required name="description" id="desc-input" maxlength="200" required

@ -157,7 +157,7 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}"> ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}">
<label class="control-label col-sm-2" for="desc-input">Description</label> <label class="control-label col-sm-2" for="desc-input">Major Products/Service</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea class="form-control" ng-model="partner.description" <textarea class="form-control" ng-model="partner.description"
name="description" id="desc-input" maxlength="200" required></textarea> name="description" id="desc-input" maxlength="200" required></textarea>

@ -19,6 +19,7 @@
<tr> <tr>
<th>Sub Merchant Id Before</th> <th>Sub Merchant Id Before</th>
<th>Sub Merchant Id After</th> <th>Sub Merchant Id After</th>
<th>Wechat Institution Merchant Id</th>
<th>Operator</th> <th>Operator</th>
<th>Create Time</th> <th>Create Time</th>
</tr> </tr>
@ -27,6 +28,7 @@
<tr ng-repeat="log in logs"> <tr ng-repeat="log in logs">
<td ng-bind="log.sub_merchant_id_before"></td> <td ng-bind="log.sub_merchant_id_before"></td>
<td ng-bind="log.sub_merchant_id_after"></td> <td ng-bind="log.sub_merchant_id_after"></td>
<td ng-bind="log.wechat_institution_merchant_id"></td>
<td ng-bind="log.operator"></td> <td ng-bind="log.operator"></td>
<td ng-bind="log.create_time"></td> <td ng-bind="log.create_time"></td>
</tr> </tr>

@ -390,7 +390,7 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label col-sm-2">Description</label> <label class="control-label col-sm-2">Major Products/Service</label>
<div class="col-sm-10"> <div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.description"></p> <p class="form-control-static" ng-bind="partner.description"></p>

@ -307,7 +307,7 @@
</div> </div>
<div class="form-group" <div class="form-group"
ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}"> ng-class="{'has-error':partnerForm.description.$invalid && partnerForm.description.$dirty}">
<label class="control-label col-sm-2" for="desc-input">Description</label> <label class="control-label col-sm-2" for="desc-input">Major Products/Service</label>
<div class="col-sm-8"> <div class="col-sm-8">
<textarea class="form-control" ng-model="partner.description" <textarea class="form-control" ng-model="partner.description"
name="description" id="desc-input" maxlength="200"></textarea> name="description" id="desc-input" maxlength="200"></textarea>

@ -39,6 +39,16 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-if="'10'|withRole">
<label class="col-sm-3 control-label">Wechat Institution Merchant Id</label>
<div class="col-sm-9">
<p class="form-control-static">
{{paymentInfo.wechat_institution_merchant_id||'初始化'}}
<a role="button" ng-click="refreshWechatInstitutionMerchantId()"><i class="fa fa-refresh"></i></a>
</p>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">Ali Sub Merchant Id</label> <label class="col-sm-3 control-label">Ali Sub Merchant Id</label>
<div class="col-sm-9"> <div class="col-sm-9">

Loading…
Cancel
Save