master
wangning 7 years ago
commit d188406122

@ -360,4 +360,14 @@ ADD COLUMN `surcharge_cashback` decimal(10,4) default 0 after `royalpay_surcharg
ALTER TABLE sys_clients ADD store_photo VARCHAR(200) NULL;
ALTER TABLE sys_clients ADD store_photo VARCHAR(200) NULL;
CREATE TABLE `log_client_sub_merchant_id` (
`id` varchar(50) NOT NULL,
`sub_merchant_id_before` varchar(30) DEFAULT NULL COMMENT '修改之前的sub_merchant_id',
`sub_merchant_id_after` varchar(30) NOT NULL COMMENT '修改之后的sub_merchant_id',
`operator` varchar(30) NOT NULL COMMENT '操作人',
`create_time` datetime NOT NULL COMMENT '创建时间',
`client_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
/**
@ -130,4 +131,6 @@ public interface RetailAppService {
JSONObject getInvoiceData(JSONObject device, AppQueryBean appQueryBean) throws Exception;
void getInvoiceFile(JSONObject device, AppQueryBean appQueryBean, HttpServletResponse httpResponse) throws Exception;
Map<String,JSONObject> channelAndDayOfAnalysis(int client_id, String clearingDetailId, String channel, JSONObject device);
}

@ -10,6 +10,7 @@ import au.com.royalpay.payment.manage.appclient.core.RetailAppService;
import au.com.royalpay.payment.manage.cashback.core.CashbackService;
import au.com.royalpay.payment.manage.customers.core.CouponValidateService;
import au.com.royalpay.payment.manage.fund.core.impls.XPlanFundConfigServiceImpl;
import au.com.royalpay.payment.manage.management.clearing.core.CleanService;
import au.com.royalpay.payment.manage.mappers.log.AppMessageLogMapper;
import au.com.royalpay.payment.manage.mappers.log.ClearingDetailAnalysisMapper;
import au.com.royalpay.payment.manage.mappers.log.ClearingDetailMapper;
@ -150,7 +151,8 @@ public class RetailAppServiceImp implements RetailAppService {
private AppActService appActService;
@Resource
private LogSettleMailMapper logSettleMailMapper;
@Resource
private CleanService cleanService;
private Map<String, AppMsgSender> senderMap = new HashMap<>();
@Resource
@ -293,6 +295,13 @@ public class RetailAppServiceImp implements RetailAppService {
tradeLogService.exportTransFlow(tradeLogQuery,device,httpResponse);
}
@Override
public Map<String, JSONObject> channelAndDayOfAnalysis(int client_id, String clearingDetailId, String channel, JSONObject device) {
String clientType = device.getString("client_type");
deviceSupport.findRegister(clientType);
return cleanService.channelAndDayOfAnalysis(client_id, clearingDetailId,channel,device.getJSONObject("client"));
}
@Override
public void updateClient(JSONObject device, AppClientBean appClientBean) {
String clientType = device.getString("client_type");

@ -15,7 +15,6 @@ import au.com.royalpay.payment.manage.settlement.core.ManualSettleSupport;
import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
import au.com.royalpay.payment.manage.signin.core.SignInStatusManager;
import au.com.royalpay.payment.manage.system.core.ClientContractService;
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
import au.com.royalpay.payment.tools.CommonConsts;
import au.com.royalpay.payment.tools.device.advise.AppClientController;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
@ -23,31 +22,22 @@ import au.com.royalpay.payment.tools.exceptions.ForbiddenException;
import au.com.royalpay.payment.tools.http.HttpUtils;
import au.com.royalpay.payment.tools.merchants.beans.QRCodeConfig;
import au.com.royalpay.payment.tools.merchants.beans.UpdateSurchargeDTO;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import static au.com.royalpay.payment.tools.CommonConsts.RETAIL_DEVICE;
/**
@ -137,6 +127,12 @@ public class RetailAppController {
return retailAppService.getTransactionLogsByClearingDetailId(device, clearing_detail_id, timezone);
}
@RequestMapping("/{client_id}/settlement_logs/{clearingDetailId}/analysis/{channel}")
public Map<String,JSONObject> channelAndDayOfAnalysis(@PathVariable int client_id, @PathVariable String clearingDetailId,
@PathVariable String channel,@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device) {
return retailAppService.channelAndDayOfAnalysis(client_id, clearingDetailId,channel,device);
}
/* 消息模块begin */
@RequestMapping(value = "/notice", method = RequestMethod.GET)
public JSONObject listNotices(@ModelAttribute(CommonConsts.RETAIL_DEVICE) JSONObject device, @RequestParam Map<String, Object> params) {

@ -0,0 +1,19 @@
package au.com.royalpay.payment.manage.mappers.log;
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
import com.alibaba.fastjson.JSONObject;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@AutoMapper(tablename = "log_client_sub_merchant_id", pkName = "id")
public interface LogClientSubMerchantIdMapper {
@AutoSql(type = SqlType.INSERT)
void save(JSONObject log);
@AutoSql(type = SqlType.SELECT)
List<JSONObject> listLogsByClientId(@Param("client_id") int client_id);
}

@ -35,6 +35,8 @@ public class ClientRegisterInfo {
private String alipayIndustry;
@JSONField(name = "company_photo")
private String companyPhoto;
@JSONField(name = "store_photo")
private String storePhoto;
@JSONField(name = "company_website")
private String companyWebsite;
@JSONField(name = "company_phone")
@ -145,6 +147,14 @@ public class ClientRegisterInfo {
this.companyPhoto = companyPhoto;
}
public String getStorePhoto() {
return storePhoto;
}
public void setStorePhoto(String storePhoto) {
this.storePhoto = storePhoto;
}
public String getCompanyWebsite() {
return companyWebsite;
}

@ -286,4 +286,6 @@ public interface ClientManager {
void clearCacheSubMerchantIdApplices(String clientMoniker);
JSONObject getCheckClientInfo(int client_id,String account_id, String channel);
List<JSONObject> getClientSubMerchantIdLogs(String clientMoniker,JSONObject manager);
}

@ -14,6 +14,7 @@ import au.com.royalpay.payment.manage.appclient.beans.AppClientBean;
import au.com.royalpay.payment.manage.device.core.DeviceManager;
import au.com.royalpay.payment.manage.mappers.financial.FinancialBDConfigMapper;
import au.com.royalpay.payment.manage.mappers.log.ClientsOperationLogMapper;
import au.com.royalpay.payment.manage.mappers.log.LogClientSubMerchantIdMapper;
import au.com.royalpay.payment.manage.mappers.log.LogSettleMailMapper;
import au.com.royalpay.payment.manage.mappers.payment.TransactionMapper;
import au.com.royalpay.payment.manage.mappers.redpack.ActClientInvitationCodeMapper;
@ -225,6 +226,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
private MessageSource messageSource;
@Resource
private ClientsOperationLogMapper clientsOperationLogMapper;
@Resource
private LogClientSubMerchantIdMapper logClientSubMerchantIdMapper;
@Resource
private ClientInfoCacheSupport clientInfoCacheSupport;
@ -278,6 +282,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
client.put("show_all_permission", true);
int role = manager != null ? manager.getIntValue("role") : 0;
if (manager != null) {
if(ManagerRole.OPERATOR.hasRole(role)){
List<JSONObject> log = logClientSubMerchantIdMapper.listLogsByClientId(client.getInteger("client_id"));
client.put("sub_merchant_id_log", log.size()>0?true:false);
}
if (ManagerRole.BD_USER.hasRole(role)) {
int checkBDPermission = clientBDMapper.checkBDPermission(client.getIntValue("client_id"), manager.getString("manager_id"));
client.put("show_all_permission", checkBDPermission > 0);
@ -581,16 +589,35 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
WeChatPayConfig.Merchant availableMerchant = mpPaymentApi.determineMerchant(subMerchantId);
update.put("merchant_id", availableMerchant == null ? null : availableMerchant.getMerchantId());
update.put("sub_merchant_id", subMerchantId);
try{
recordSubMerchantLog(client,subMerchantInfo,manager);
}catch(Exception e){
logger.error("记录log_client_sub_merchant_id失败",e);
}
clientMapper.update(update);
List<JSONObject> children = clientMapper.listChildClients(clientId);
for (JSONObject child : children) {
if (Objects.equals(child.getString("sub_merchant_id"), originSubMerchantId)) {
update.put("client_id", child.getIntValue("client_id"));
try{
recordSubMerchantLog(child,subMerchantInfo,manager);
}catch(Exception e){
logger.error("记录log_client_sub_merchant_id失败",e);
}
clientMapper.update(update);
}
}
clientInfoCacheSupport.clearClientCache(clientId);
}
private void recordSubMerchantLog(JSONObject client,JSONObject subMerchantInfo,JSONObject manager){
JSONObject log = new JSONObject();
log.put("sub_merchant_id_after",subMerchantInfo.getString("sub_merchant_id"));
log.put("operator",manager.getString("display_name"));
log.put("create_time",new Date());
log.put("client_id",client.getIntValue("client_id"));
log.put("sub_merchant_id_before",client.getString("sub_merchant_id"));
logClientSubMerchantIdMapper.save(log);
}
@Override
public void auditClient(JSONObject manager, String clientMoniker, int pass) {
@ -3340,4 +3367,14 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
return sourceStr;
}
@Override
public List<JSONObject> getClientSubMerchantIdLogs(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
return logClientSubMerchantIdMapper.listLogsByClientId(client.getInteger("client_id"));
}
}

@ -526,4 +526,9 @@ public class PartnerManageController {
return clientManager.listMerchantIds(clientMoniker,manager);
}
@ManagerMapping(value = "/{clientMoniker}/get_sub_merchant_id_logs",method = RequestMethod.GET,role = {ManagerRole.OPERATOR})
public List<JSONObject> getClientSubMerchantIdLogs(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
return clientManager.getClientSubMerchantIdLogs(clientMoniker,manager);
}
}

@ -385,6 +385,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
alert("Logo is necessary!");
return;
}
if($scope.partner.partner_type == 'photo'){
if (!$scope.partner.company_photo) {
alert('Shop Photo1 is necessary');
return;
}
if (!$scope.partner.store_photo) {
alert('Shop Photo2 is necessary');
return;
}
}
if ($scope.partner.referrer_id) {
$scope.referrers.forEach(function (e) {
if ($scope.partner.referrer_id == e.org_id) {
@ -423,18 +434,36 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.uploadShopPhoto = function (file) {
if (file != null) {
$scope.photoProgress = {value: 0};
$scope.shopPhotoProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.photoProgress;
delete $scope.shopPhotoProgress;
$scope.partner.company_photo = resp.data.url;
}, function (resp) {
delete $scope.photoProgress;
delete $scope.shopPhotoProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
};
$scope.uploadStorePhoto = function (file) {
if (file != null) {
$scope.storePhotoProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.storePhotoProgress;
$scope.partner.store_photo = resp.data.url;
}, function (resp) {
delete $scope.storePhotoProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.photoProgress.value = parseInt(100 * evt.loaded / evt.total);
$scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
};
@ -895,6 +924,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
alert('suburb can not contain two and more continuous space characters');
return;
}
if($scope.partner.partner_type == 'photo'){
if (!$scope.partner.company_photo) {
alert('Shop Photo1 is necessary');
return;
}
if (!$scope.partner.store_photo) {
alert('Shop Photo2 is necessary');
return;
}
}
if ($scope.partner.acn && $scope.partner.business_structure == 'Company') {
if ($scope.partner.acn.length != 9) {
alert('Acn is not valid');
@ -954,18 +994,36 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.uploadShopPhoto = function (file) {
if (file != null) {
$scope.photoProgress = {value: 0};
$scope.shopPhotoProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.photoProgress;
delete $scope.shopPhotoProgress;
$scope.partner.company_photo = resp.data.url;
}, function (resp) {
delete $scope.photoProgress;
delete $scope.shopPhotoProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.photoProgress.value = parseInt(100 * evt.loaded / evt.total);
$scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
};
$scope.uploadStorePhoto = function (file) {
if (file != null) {
$scope.storePhotoProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.storePhotoProgress;
$scope.partner.store_photo = resp.data.url;
}, function (resp) {
delete $scope.storePhotoProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
};
@ -991,7 +1049,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
}
}]);
app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog', function ($scope, $http, $state, commonDialog) {
app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog','$uibModal', function ($scope, $http, $state, commonDialog,$uibModal) {
$scope.loadPartnerPaymentInfo = function () {
$http.get('/sys/partners/' + $scope.partner.client_moniker).then(function (resp) {
$scope.paymentInfo = resp.data;
@ -1010,6 +1068,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.reloadQRCode();
$scope.loadPartnerPaymentInfo();
$scope.showSubMerchantLogs = function () {
$uibModal.open({
templateUrl: '/static/payment/partner/templates/client_sub_merchant_id_log.html',
controller: 'clientSubMerchantIdLogCtrl',
size: 'lg',
resolve: {
logs: ['$http', function ($http) {
return $http.get('/sys/partners/'+$scope.partner.client_moniker+'/get_sub_merchant_id_logs');
}]
}
}).result.then(function () {
$scope.loadSubClients();
});
};
$scope.saveMaxOrderAmount = function (limit) {
if (limit != null && isNaN(limit)) {
commonDialog.alert({title: 'Error', content: 'Your input is not a number!', type: 'error'});
@ -1308,6 +1381,9 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
}]);
app.controller('clientSubMerchantIdLogCtrl', ['$scope', '$http', 'logs', function ($scope, $http, logs) {
$scope.logs = logs.data;
}]);
app.controller('partnerSubCtrl', ['$scope', '$http', '$uibModal', function ($scope, $http, $uibModal) {
$scope.newSubClient = function () {
$uibModal.open({

@ -1,3 +1,9 @@
<style>
.img-size{
height: 100px;
margin-left: 20px;
}
</style>
<section class="content-header">
<h1>New Partner</h1>
<ol class="breadcrumb">
@ -127,7 +133,7 @@
</div>
<uib-progressbar value="logoProgress.value"
ng-if="logoProgress"></uib-progressbar>
<img ng-src="{{partner.logo_url}}" class="col-sm-3">
<img ng-src="{{partner.logo_url}}" ng-if="partner.logo_url" style="height: 100px;">
</div>
</div>
<!--<div class="form-group"-->
@ -210,6 +216,8 @@
a photo of shop is
required while an online store shall choose
companyWebsite</p>
<p class="small text-info">
只要有可能产生线下交易商户静态码、POS就必须上传照片否则支付宝会禁止交易</p>
<div ng-messages="partnerForm.partner_type.$error"
ng-if="partnerForm.partner_type.$dirty">
<p class="small text-danger" ng-message="required">Required
@ -219,19 +227,32 @@
</div>
<div class="form-group" ng-if="partner.partner_type == 'photo'">
<label class="control-label col-sm-2">* Shop Photo</label>
<div class="col-sm-8">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadShopPhoto($file)" accept="image/*"
ngf-max-size="2MB">
<i class="fa fa-upload"></i> Upload Shop Photo
</button>
<div class="col-sm-4">
<div class="form-control-static"><em>1:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadShopPhoto($file)" accept="image/*"
ngf-max-size="2MB">
<i class="fa fa-upload"></i> Upload Shop Photo1
</button>
</div>
<uib-progressbar value="shopPhotoProgress.value"
ng-if="shopPhotoProgress"></uib-progressbar>
<img ng-src="{{partner.company_photo}}" ng-if="partner.company_photo" class="thumbnail img-size">
</div>
<div class="col-sm-4">
<div class="form-control-static"><em>2:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadStorePhoto($file)" accept="image/*"
ngf-max-size="2MB">
<i class="fa fa-upload"></i> Upload Shop Photo2
</button>
</div>
<uib-progressbar value="storePhotoProgress.value"
ng-if="storePhotoProgress"></uib-progressbar>
<img ng-src="{{partner.store_photo}}" ng-if="partner.store_photo" class="thumbnail img-size">
</div>
<uib-progressbar value="photoProgress.value"
ng-if="photoProgress"></uib-progressbar>
<img ng-src="{{partner.company_photo}}" class="col-sm-4">
</div>
</div>
<div class="form-group" ng-if="partner.partner_type == 'companyWebsite'"
ng-class="{'has-error':partnerForm.company_website.$invalid && partnerForm.company_website.$dirty}">
<label class="control-label col-sm-2" for="company_website-input">*

@ -0,0 +1,41 @@
<section class="content-header">
<h1>Sub Merchant Id Logs</h1>
<ol class="breadcrumb">
<li>
<i class="fa fa-users"></i> Configuration
</li>
<li class="active">logs</li>
</ol>
</section>
<section class="content">
<div class="box-solid">
<div class="box box-warning">
<div class="box-body">
<div class="row">
<div class="col-sm-12">
<div class="col-sm-12 table-responsive">
<table class="table table-striped table-bordered table-hover" ng-if="logs.length>0">
<thead>
<tr>
<th>Sub Merchant Id Before</th>
<th>Sub Merchant Id After</th>
<th>Operator</th>
<th>Create Time</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="log in logs">
<td ng-bind="log.sub_merchant_id_before"></td>
<td ng-bind="log.sub_merchant_id_after"></td>
<td ng-bind="log.operator"></td>
<td ng-bind="log.create_time"></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</section>

@ -28,6 +28,10 @@
width: 95%;
float: left;
}
.img-size{
height: 100px;
margin-left: 20px;
}
</style>
<section class="content-header">
<h1>
@ -304,7 +308,7 @@
<div class="form-group">
<label class="control-label col-sm-2">Logo</label>
<div class="col-sm-10">
<img ng-src="{{partner.logo_url}}" class="col-sm-3 col-xs-5">
<img ng-src="{{partner.logo_url}}" class="col-sm-3 col-xs-5" style="max-height: 100px;width: auto">
</div>
</div>
<div class="form-group" ng-if="partner.abn">
@ -336,11 +340,18 @@
</div>
<div class="form-group" ng-if="partner.company_photo">
<label class="control-label col-sm-2">Shop Photo</label>
<div class="col-sm-10">
<div class="col-sm-3 col-xs-5">
<div class="col-sm-3 col-xs-5"><em>1:</em>&nbsp;
<div>
<a class="thumbnail" target="_blank" ng-href="{{partner.company_photo}}">
<img ng-src="{{partner.company_photo}}">
<img ng-src="{{partner.company_photo}}" style="max-height: 100px">
</a>
</div>
</div>
<div class="col-sm-3 col-xs-5" ng-if="partner.store_photo"><em>2:</em>&nbsp;
<div>
<a class="thumbnail" target="_blank" ng-href="{{partner.store_photo}}" >
<img ng-src="{{partner.store_photo}}" style="max-height: 100px">
</a>
</div>
</div>

@ -1,3 +1,9 @@
<style>
.img-size{
height: 100px;
margin-left: 20px;
}
</style>
<section class="content-header">
<h1 ng-bind="partner.short_name"></h1>
<ol class="breadcrumb">
@ -90,7 +96,7 @@
</button>
</div>
<uib-progressbar value="logoProgress.value" ng-if="logoProgress"></uib-progressbar>
<img ng-src="{{partner.logo_url}}" class="col-sm-3">
<img ng-src="{{partner.logo_url}}" ng-if="partner.logo_url" style="height: 100px;">
</div>
</div>
<!--<div class="form-group"-->
@ -160,6 +166,8 @@
</select>
<p class="small text-info">If the partner is a offline shop then a photo of shop is
required while an online store shall choose company website</p>
<p class="small text-info">
只要有可能产生线下交易商户静态码、POS就必须上传照片否则支付宝会禁止交易</p>
<div ng-messages="partnerForm.partner_type.$error"
ng-if="partnerForm.partner_type.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
@ -169,16 +177,28 @@
<div class="form-group"
ng-if="partner.partner_type == 'photo' && (!partner.parent_client_id || ('00110'|withRole))">
<label class="control-label col-sm-2">* Shop Photo</label>
<div class="col-sm-8">
<div class="form-control-static">
<div class="col-sm-5">
<div class="form-control-static"><em>1:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadShopPhoto($file)" accept="image/*" ngf-max-size="2MB">
<i class="fa fa-upload"></i> Upload Shop Photo
<i class="fa fa-upload"></i> Upload Shop Photo1
</button>
</div>
<uib-progressbar value="shopPhotoProgress.value"
ng-if="shopPhotoProgress"></uib-progressbar>
<img ng-src="{{partner.company_photo}}" ng-if="partner.company_photo" class="thumbnail img-size">
</div>
<div class="col-sm-5">
<div class="form-control-static"><em>2:</em>&nbsp;
<button class="btn btn-primary" type="button"
ngf-select="uploadStorePhoto($file)" accept="image/*"
ngf-max-size="2MB">
<i class="fa fa-upload"></i> Upload Shop Photo2
</button>
</div>
<uib-progressbar value="photoProgress.value"
ng-if="photoProgress"></uib-progressbar>
<img ng-src="{{partner.company_photo}}" class="col-sm-4">
<uib-progressbar value="storePhotoProgress.value"
ng-if="storePhotoProgress"></uib-progressbar>
<img ng-src="{{partner.store_photo}}" ng-if="partner.store_photo" class="thumbnail img-size">
</div>
</div>
<div class="form-group"

@ -12,6 +12,16 @@
<a role="button" ng-click="ctrl.editSubMerchant=true" ng-if="'011'|withRole"><i class="fa fa-edit"></i></a>
<i class="fa fa-clock-o text-danger" title="Using temp Sub Merchant ID" ng-if="paymentInfo.temp_sub_merchant"></i>
&nbsp;&nbsp;<span class="small" ng-if="('10'|withRole) &&paymentInfo.sub_merchant_id&&paymentInfo.merchant_id"><b>Merchant ID</b>:{{paymentInfo.merchant_id | choose_merchant_id}}</span>
&nbsp;&nbsp;
<span class="small"
ng-if="('10'|withRole) &&paymentInfo.sub_merchant_id&&paymentInfo.sub_merchant_id_log">
<a class="text-primary" role="button" title="modify logs"
ng-click="showSubMerchantLogs(sub_merchant_id_logs)">
<span class="pull-right-container">
<span class="label label-primary">logs</span>
</span>
</a>
</span>
</p>
<div class="input-group" ng-if="ctrl.editSubMerchant">
<input type="text" class="form-control" ng-model="paymentInfo.sub_merchant_id"

Loading…
Cancel
Save