master
yuan 7 years ago
parent 18e9865b77
commit c287b2ec13

@ -278,6 +278,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
sysClient.put("approve_result",2);
sysClient.put("approve_time",new Date());
sysClient.put("creator",0);
sysClient.put("business_name",apply.getString("short_name"));
sysClient.put("industry",331);
sysClient.put("merchant_id",subMerchantId.getString("merchant_id"));
sysClient.put("sub_merchant_id",subMerchantId.getString("sub_merchant_id"));
@ -291,6 +292,7 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService {
sysAccount.put("display_name",apply.getString("username"));
String salt = PasswordUtils.newSalt();
sysAccount.put("salt", salt);
sysAccount.put("role", 1);
sysAccount.put("password_hash", PasswordUtils.hashPwd(apply.getString("password"), salt));
sysAccount.put("password_aes", PasswordUtils.encryptAESPwd(apply.getString("password")));
sysAccount.put("creator",0);

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

@ -3446,7 +3446,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
@Override
public void sendVerifyEmail(JSONObject client,String accountId) {
JSONObject clientAccount = clientAccountMapper.findByOpenId(accountId);
JSONObject clientAccount = clientAccountMapper.findById(accountId);
Assert.notNull(clientAccount);
simpleClientApplyService.sendVerifyEmail(client.getString("contact_email"),client.getIntValue("client_id"),clientAccount.getString("username"));
JSONObject params = new JSONObject();
params.put("mail_confirm",1);
params.put("client_id",client.getIntValue("client_id"));
clientMapper.update(params);
clientInfoCacheSupport.clearClientCache(client.getIntValue("client_id"));
}
}

@ -2,6 +2,8 @@ package au.com.royalpay.payment.manage.merchants.web;
import au.com.royalpay.payment.core.exceptions.ParamInvalidException;
import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService;
import au.com.royalpay.payment.manage.merchants.beans.ClientAuthFilesInfo;
import au.com.royalpay.payment.manage.merchants.beans.ClientRegisterInfo;
import au.com.royalpay.payment.manage.merchants.beans.NewAccountBean;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.merchants.core.ClientSignEventSupport;
@ -401,4 +403,29 @@ public class PartnerViewController {
public void sendVerifyEmail(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) {
clientManager.sendVerifyEmail(account.getJSONObject("client"),account.getString("account_id"));
}
@PartnerMapping(value = "/update/partnerInfo", method = RequestMethod.PUT)
@ResponseBody
public void updatePartnerInfo(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account,@RequestBody ClientRegisterInfo info) {
JSONObject client = account.getJSONObject("client");
if (client.getIntValue("approve_result") != 1 && client.getIntValue("source") == 4){
clientManager.updateClientRegisterInfo(null,account.getString("client_moniker"),info);
}else {
throw new BadRequestException("已通过审核,暂不能提交和修改");
}
}
@PartnerMapping(value = "/update/file", method = RequestMethod.PUT)
@ResponseBody
public void updateFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account, @RequestBody ClientAuthFilesInfo filesInfo) {
JSONObject client = account.getJSONObject("client");
if (client.getIntValue("approve_result") != 1 && client.getIntValue("source") == 4){
JSONObject manager = new JSONObject();
manager.put("display_name","client");
clientManager.uploadAuthFiles(manager, account.getString("client_moniker"), filesInfo);
}else {
throw new BadRequestException("已通过审核,暂不能提交和修改");
}
}
}

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

@ -221,19 +221,20 @@
<section class="content">
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel panel-default" ng-if="source == 4 && approve_result != 1">
<div class="panel-heading">
<h3 class="panel-title"><em>Tips:</em> Started with RoyalPay</h3>
</div>
<div class="panel-body">
<div class="start_item col-sm-6 col-xs-12">
<div class="start_ico">
<i class="fa fa-check-circle"></i>
<i class="fa fa-check-circle" ng-if="mail_confirm"></i>
<i class="fa fa-dot-circle-o" ng-if="!mail_confirm"></i>
</div>
<div class="start_text">
<p><a href="" class="text-primary" role="button" title="Send"
ng-click="checkEmail()">
<span class="text-info">&nbsp;验证邮箱 <em>{{partner.contact_email}}</em></span>
ng-click="checkEmail(mail_confirm)">
<span class="text-info">&nbsp;Verify your email address <em>{{currentUser.client.contact_email}}</em></span>
<i class="fa fa-paper-plane-o"></i>
</a>
</p>
@ -242,24 +243,31 @@
<div class="start_item col-sm-6 col-xs-12">
<div class="start_ico">
<i class="fa fa-dot-circle-o"></i>
<i class="fa fa-check-circle" ng-if="commitPartnerInfo"></i>
<i class="fa fa-dot-circle-o" ng-if="!commitPartnerInfo"></i>
</div>
<div class="start_text">
<p>&nbsp;
<p ng-if="!commitPartnerInfo">&nbsp;
<a href="" class="text-primary" ui-sref="basic.payment_info_edit">
完善商户信息
Complete your company information
</a>
</p>
<p ng-if="commitPartnerInfo">&nbsp;
<a href="" class="text-primary" ui-sref="basic">
Complete your company information
</a>
</p>
</div>
</div>
<div class="start_item col-sm-6 col-xs-12" ng-if="toCommitFiles">
<div class="start_item col-sm-6 col-xs-12">
<div class="start_ico">
<i class="fa fa-dot-circle-o"></i>
<i class="fa fa-check-circle" ng-if="toCommitFiles"></i>
<i class="fa fa-dot-circle-o" ng-if="!toCommitFiles"></i>
</div>
<div class="start_text">
<p>&nbsp;
<a href="" class="text-primary" ui-sref="basic.compliance_files">
提交合规材料
Submit materials required for compliance audits
</a>
</p>
</div>
@ -272,7 +280,7 @@
<p>&nbsp;
<a href="https://www.royalpay.com.au/downloads/royalpay_user_guide.pdf"
target="_blank" class="text-primary">
查看《用户手册》
Read the manual to learn more about using RoyalPay merchant system
</a>
</p>
</div>

@ -29,7 +29,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct
controller: 'clientComplianceFilesCtrl',
resolve: {
file: ['$http', function ($http) {
return $http.get('/client/partner_info/compliance/file');
return $http.get('/client/partner_info/compliance/files');
}]
}
}).state('payment_materials', {
@ -59,17 +59,146 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct
controller: 'clientDeviceCtrl'
})
}]);
app.controller('clientPartnerDetailCtrl', ['$scope', '$http', 'partner','industryMap', function ($scope, $http, partner,industryMap) {
app.controller('clientPartnerDetailCtrl', ['$scope', '$http', 'partner','industryMap','businessStructuresMap', function ($scope, $http, partner,industryMap,businessStructuresMap) {
$scope.business_structures = businessStructuresMap.configs();
$scope.industries = industryMap.configs();
$scope.partner = partner.data;
//修改邮箱
$scope.updateEmail = function () {
$http.put('/client/partner_info', $scope.partner).then(
$http.put('/client/partner_info/compliance_audit').then(
);
};
$scope.commitToCompliance = function () {
$http.get('/client/partner_info/compliance/files').then(function (resp) {
$scope.complianceFiles = resp.data;
if( $scope.complianceFiles.client_agree_file == null || $scope.complianceFiles.client_id_file == null||$scope.complianceFiles.client_bank_file == null || $scope.complianceFiles.client_company_file == null){
alert("请前去完善合规资料,再进行提交");
return;
}
if($scope.partner.business_structure == null ||$scope.partner.logo_url == null || $scope.partner.description == null || (($scope.partner.store_photo == null || $scope.partner.company_photo == null) && $scope.currentUser.client.company_website == null)){
alert("请前去完善商户资料,再进行提交");
return;
}
if(($scope.partner.business_structure == "Company" && $scope.partner.acn == null) || ($scope.partner.business_structure != "Company" && $scope.partner.abn == null)){
alert("请前去完善商户资料,再进行提交");
return;
}
if(!$scope.partner.mail_confirm){
alert("请验证邮箱后,再进行提交");
return;
}
$http.post('/client/partner_info/compliance_audit').then(
);
});
}
}]);
app.controller('clientPaymentInfoEditCtrl', ['$scope', '$http', 'partner','industryMap', function ($scope, $http, partner,industryMap) {
app.controller('clientPaymentInfoEditCtrl', ['$scope', '$http','industryMap', 'commonDialog','$state','Upload',function ($scope, $http,industryMap,commonDialog,$state,Upload) {
/* $scope.loadClient = function () {
$http.get('/client/partner_info').then(function (resp) {
$scope.partner = resp.data;
})
};*/
$scope.uploadLogo = function (file) {
if (file != null) {
$scope.logoProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.logoProgress;
$scope.partner.logo_id = resp.data.fileid;
$scope.partner.logo_url = resp.data.url;
}, function (resp) {
delete $scope.logoProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.logoProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
};
$scope.uploadShopPhoto = function (file) {
if (file != null) {
$scope.shopPhotoProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.shopPhotoProgress;
$scope.partner.company_photo = resp.data.url;
}, function (resp) {
delete $scope.shopPhotoProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
};
$scope.uploadStorePhoto = function (file) {
if (file != null) {
$scope.storePhotoProgress = {value: 0};
Upload.upload({
url: '/attachment/files',
data: {file: file}
}).then(function (resp) {
delete $scope.storePhotoProgress;
$scope.partner.store_photo = resp.data.url;
}, function (resp) {
delete $scope.storePhotoProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
};
$scope.updatePartner = function (form) {
if (form.$invalid) {
angular.forEach(form, function (item, key) {
if (key.indexOf('$') < 0) {
item.$dirty = true;
}
});
return;
}
if (!$scope.partner.logo_url) {
alert("Logo is necessary!");
return;
}
if($scope.partner.partner_type == 'photo'){
if (!$scope.partner.company_photo) {
alert('Shop Photo1 is necessary');
return;
}
if (!$scope.partner.store_photo) {
alert('Shop Photo2 is necessary');
return;
}
}
var content = '';
$http.put('/client/partner_info/update/partnerInfo', $scope.partner).then(function () {
if (content != '') {
commonDialog.alert({
title: 'Warning',
content: content,
type: 'error'
});
} else {
commonDialog.alert({
title: 'Success',
content: 'Update partner information successfully',
type: 'success'
});
}
$state.go('basic', {clientMoniker: $scope.partner.client_moniker}, {reload: true});
}, function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
});
};
}]);
app.controller('clientComplianceFilesCtrl', ['$scope', '$http', '$rootScope', 'commonDialog', '$state', 'Upload', 'file', function ($scope, $http, $rootScope, commonDialog, $state, Upload, file) {
@ -244,7 +373,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct
};
*/
$scope.updateFile = function () {
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/file', $scope.file).then(function () {
$http.put('/client/partner_info/update/file', $scope.file).then(function () {
commonDialog.alert({
title: 'Success',
content: 'Upload Successful',

@ -4,14 +4,6 @@
}
</style>
<div class="panel panel-default">
<div class="panel-heading">Audit Files &nbsp;&nbsp;&nbsp;
<button class="btn-group btn btn-warning" type="button"
ng-click="commitPartner()">Commit to Compliance
</button>
<a class="btn-group btn btn-success" ng-if="file" ng-href="{{downloadAsZip()}}" target="_blank">
<i class="fa fa-cloud-download">一键下载</i>
</a>
</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
@ -19,7 +11,7 @@
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadBankFile($file)">
ngf-select="uploadBankFile($file)" ng-hide="currentUser.approve_result == 1">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_bank_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_bank_file}}" target="_blank"><i class="fa fa-download"></i></a>
@ -43,7 +35,7 @@
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadCompanyFile($file)">
ngf-select="uploadCompanyFile($file)" ng-hide="currentUser.approve_result == 1">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_company_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_company_file}}" target="_blank"><i class="fa fa-download"></i></a>
@ -75,7 +67,7 @@
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadIDFile($file)">
ngf-select="uploadIDFile($file)" ng-hide="currentUser.approve_result == 1">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_id_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_id_file}}" target="_blank"><i class="fa fa-download"></i></a>
@ -108,7 +100,7 @@
<div class="col-sm-4">
<div class="form-control-static">
<button class="btn btn-primary" type="button"
ngf-select="uploadAgreementFile($file)">
ngf-select="uploadAgreementFile($file)" ng-hide="currentUser.approve_result == 1">
<i class="fa fa-upload"></i> Upload
</button>
<a ng-if="file.client_agree_file" role="button" class="btn-group btn btn-warning" type="button" ng-href="{{file.client_agree_file}}" target="_blank"><i class="fa fa-download"></i></a>
@ -132,7 +124,7 @@
<div class="form-group">
<label class="control-label col-sm-2">Application Form(optional)</label>
<div class="col-sm-4">
<div class="form-control-static">
<div class="form-control-static" ng-if="currentUser." ng-hide="currentUser.approve_result == 1">
<button class="btn btn-primary" type="button"
ngf-select="uploadApplyFile($file)">
<i class="fa fa-upload"></i> Upload

@ -9,6 +9,26 @@
</section>
<div class="content">
<div class="box box-warning" ng-if="partner.source == 4">
<div class="box-header with-border">
<h3 class="box-title">Compliance <span ng-if="partner.approve_result==5 || partner.refuse_remark.length>0"
style="color: red">(Refused
<small class=""
ng-if="partner.approve_result==5 || partner.refuse_remark.length>0">:{{partner.refuse_remark}}</small>)</span>
【目前状态】-
<b ng-if="partner.source==4">
<span ng-if="partner.approve_result">(自助申请)资料完善中</span>
<span ng-if="partner.approve_result==1">(自助申请)已开通</span>
<span ng-if="partner.approve_result==2">(自助申请)快速开通等待提交合规材料</span>
<span ng-if="partner.approve_result==3">(自助申请)待审核(材料已提交)</span>
</b>
</h3>
<div class="btn-group pull-right" role="group" aria-label="...">
<button type="button" class="btn btn-danger" ng-click="commitToCompliance()">Commit to Compliance
</button>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="nav-tabs-custom">
@ -105,11 +125,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>

@ -2,57 +2,32 @@
<div class="panel panel-default">
<div class="panel-heading">Partner Basic Information</div>
<div class="panel-body">
<div class="form-horizontal">
<form class="form-horizontal" novalidate name="partnerForm">
<div class="form-group">
<label class="control-label col-sm-2">* Partner Code</label>
<div class="col-sm-8">
<p class="form-control-static" ng-bind="partner.client_moniker"></p>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.company_name.$invalid && partnerForm.company_name.$dirty}">
<label class="control-label col-sm-2" for="company-name-input">* Company Name</label>
<div class="form-group">
<label class="control-label col-sm-2">Company Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.company_name" type="text"
id="company-name-input" required name="company_name" maxlength="100">
<p class="small text-info">Full Name shall be same as the name when register to
gov</p>
<div ng-messages="partnerForm.company_name.$error"
ng-if="partnerForm.company_name.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 100
Characters(including symbols and spaces)</p>
</div>
<p class="form-control-static" ng-bind="partner.company_name"></p>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.short_name.$invalid && partnerForm.short_name.$dirty}">
<label class="control-label col-sm-2" for="short-name-input">* Short Name</label>
<div class="form-group">
<label class="control-label col-sm-2">Short Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.short_name" type="text"
name="short_name"
id="short-name-input" required maxlength="50">
<p class="small text-info">short name for WeChat payment display and partner
name</p>
<div ng-messages="partnerForm.short_name.$error"
ng-if="partnerForm.company_name.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 50
Characters(including symbols and spaces)</p>
</div>
<p class="form-control-static" ng-bind="partner.short_name"></p>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.business_name.$invalid && partnerForm.business_name.$dirty}">
<label class="control-label col-sm-2" for="business-name-input">Business Name</label>
<label class="control-label col-sm-2">Business Name</label>
<div class="col-sm-8">
<input id="business-name-input" ng-model="partner.business_name" class="form-control"
type="text" name="business_name" maxlength="100">
<div ng-messages="partnerForm.business_name.$error"
ng-if="partnerForm.business_name.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 100
Characters(including symbols and spaces)</p>
</div>
<p class="form-control-static" ng-bind="partner.business_name"></p>
</div>
</div>
<div class="form-group"
@ -60,7 +35,7 @@
<label class="control-label col-sm-2" for="business-structure-input">Business Structure</label>
<div class="col-sm-8">
<select class="form-control" name="business_structure" ng-model="partner.business_structure"
id="business-structure-input"
id="business-structure-input" required
ng-options="structure.value as structure.label for structure in business_structures">
<option value="">Please Choose</option>
</select>
@ -85,9 +60,9 @@
<div class="col-sm-8">
<input class="form-control" ng-model="partner.abn" type="text" name="abn"
id="abn-input"
maxlength="20">
maxlength="20" required>
<div ng-messages="partnerForm.abn.$error" ng-if="partnerForm.abn.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 20
<p class="small text-danger" ng-message="required">Less Than 20
Characters(including symbols and spaces)</p>
</div>
</div>
@ -97,19 +72,20 @@
<label class="control-label col-sm-2" for="acn-input">ACN</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.acn" type="text" name="acn"
id="acn-input" maxlength="20">
id="acn-input" maxlength="20" required>
<div ng-messages="partnerForm.acn.$error" ng-if="partnerForm.acn.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 20
<p class="small text-danger" ng-message="required">Less Than 20
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group" ng-if="!partner.parent_client_id || ('00110'|withRole)"
ng-class="{'has-error':partnerForm.partner_type.$invalid && partnerForm.partner_type.$dirty}">
<label class="control-label col-sm-2" for="partner-type-select">* Photo/Website</label>
<div class="col-sm-8">
<select class="form-control" ng-model="partner.partner_type"
id="partner-type-select"
id="partner-type-select" required
name="partner_type">
<option value="">Please Choose</option>
<option value="photo">Photo</option>
@ -126,7 +102,7 @@
</div>
</div>
<div class="form-group"
ng-if="partner.partner_type == 'photo' && (!partner.parent_client_id || ('00110'|withRole))">
ng-if="partner.partner_type == 'photo'">
<label class="control-label col-sm-2">* Shop Photo</label>
<div class="col-sm-5">
<div class="form-control-static"><em>1:</em>&nbsp;
@ -137,7 +113,7 @@
</div>
<uib-progressbar value="shopPhotoProgress.value"
ng-if="shopPhotoProgress"></uib-progressbar>
<img ng-src="{{partner.company_photo}}" ng-if="partner.company_photo" class="thumbnail img-size col-sm-9">
<img ng-src="{{partner.company_photo}}" ng-if="partner.company_photo" class="thumbnail img-size col-sm-5">
</div>
<div class="col-sm-5">
<div class="form-control-static"><em>2:</em>&nbsp;
@ -149,7 +125,7 @@
</div>
<uib-progressbar value="storePhotoProgress.value"
ng-if="storePhotoProgress"></uib-progressbar>
<img ng-src="{{partner.store_photo}}" ng-if="partner.store_photo" class="thumbnail img-size col-sm-9">
<img ng-src="{{partner.store_photo}}" ng-if="partner.store_photo" class="thumbnail img-size col-sm-5">
</div>
</div>
<div class="form-group"
@ -163,22 +139,16 @@
<div ng-messages="partnerForm.company_website.$error"
ng-if="partnerForm.company_website.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 200
<p class="small text-danger" ng-message="required">Less Than 200
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group"
ng-class="{'has-error':partnerForm.company_phone.$invalid && partnerForm.company_phone.$dirty}">
<label class="control-label col-sm-2" for="service-phone-input">* Service Phone</label>
<div class="col-sm-8">
<input class="form-control" required type="text" ng-model="partner.company_phone"
name="company_phone" id="service-phone-input" maxlength="20">
<div ng-messages="partnerForm.company_phone.$error"
ng-if="partnerForm.company_phone.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 20 Characters</p>
</div>
<div class="form-group">
<label class="control-label col-sm-2">Service Phone</label>
<div class="col-sm-10">
<p class="form-control-static" ng-bind="partner.company_phone||'-'"></p>
</div>
</div>
<div class="form-group"
@ -186,7 +156,8 @@
<label class="control-label col-sm-2" for="desc-input">Description</label>
<div class="col-sm-8">
<textarea class="form-control" ng-model="partner.description"
name="description" id="desc-input" maxlength="200"></textarea>
name="description" id="desc-input" maxlength="200" required
placeholder="Tell me about your company and the main products you sell"></textarea>
<div ng-messages="partnerForm.description.$error"
ng-if="partnerForm.description.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 200
@ -194,145 +165,10 @@
</div>
</div>
</div>
<div class="form-group">
<label class="control-label col-sm-2" for="remark-input">Following BD</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.remark" name="remark"
id="remark-input" maxlength="50">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-4 col-sm-2" for="bd-select">Referrer</label>
<div class="col-xs-8">
<select id="bd-select" class="form-control" ng-model="partner.referrer_id"
ng-options="referrer.org_id as referrer.name for referrer in referrers">
<option value="">select referrer</option>
</select>
</div>
</div>
</div>
</form>
</div>
</div>
<!--end 商户基本资料-->
<!--支付宝资料-->
<div class="panel panel-default">
<div class="panel-heading">Contact Information</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group"
ng-class="{'has-error':partnerForm.contact_person.$invalid && partnerForm.contact_person.$dirty}">
<label class="control-label col-sm-2" for="contact_person-input">* Contact Person
Name</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.contact_person" required
name="contact_person"
id="contact_person-input" maxlength="50">
<div ng-messages="partnerForm.contact_person.$error"
ng-if="partnerForm.contact_person.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 50
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.contact_phone.$invalid && partnerForm.contact_phone.$dirty}">
<label class="control-label col-sm-4" for="contact-phone-input">* Phone</label>
<div class="col-sm-8">
<input type="text" class="form-control" ng-model="partner.contact_phone" required
name="contact_phone" id="contact-phone-input" maxlength="20">
</div>
<div ng-messages="partnerForm.contact_phone.$error"
ng-if="partnerForm.contact_phone.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 20
Characters(including symbols and spaces)</p>
</div>
</div>
<div class="form-group col-sm-6"
ng-class="{'has-error':partnerForm.contact_email.$invalid && partnerForm.contact_email.$dirty}">
<label class="control-label col-sm-4" for="contact-email-id">* E-mail</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.contact_email" required
name="contact_email" id="contact-email-id" maxlength="50">
</div>
<div ng-messages="partnerForm.contact_email.$error"
ng-if="partnerForm.contact_email.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
<p class="small text-danger" ng-message="maxlength">Less Than 50
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
</div>
</div>
<!--end 商户联系资料-->
<div class="panel panel-default">
<div class="panel-heading">Address Information</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group col-sm-6">
<label class="control-label col-sm-4" for="address-input">Address</label>
<div class="col-sm-8">
<textarea class="form-control" ng-model="partner.address" name="address"
id="address-input" maxlength="200"></textarea>
<div ng-messages="partnerForm.address.$error" ng-if="partnerForm.address.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 200
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4" for="suburb-input">* Suburb</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.suburb" name="suburb"
id="suburb-input" maxlength="50">
<div ng-messages="partnerForm.suburb.$error" ng-if="partnerForm.suburb.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 50
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4" for="postcode-input">PostCode</label>
<div class="col-sm-8">
<input class="form-control" ng-model="partner.postcode" name="postcode"
id="postcode-input" maxlength="10">
<div ng-messages="partnerForm.postcode.$error" ng-if="partnerForm.postcode.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 10
Characters(including symbols and spaces)</p>
</div>
</div>
</div>
<div class="form-group col-sm-6">
<label class="control-label col-sm-4" for="state-input">State</label>
<div class="col-sm-8">
<select class="form-control" name="state" required ng-model="partner.state"
id="state-input"
ng-options="state.value as state.label for state in states">
<option value="">Please Choose</option>
</select>
<div ng-messages="partnerForm.state.$error" ng-if="partnerForm.state.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<div class="form-group col-sm-6" ng-class="{'has-error':partnerForm.country.$invalid && partnerForm.country.$dirty}">
<label class="control-label col-sm-4" for="country-input">* Country</label>
<div class="col-sm-8">
<input class="form-control" ng-init="partner.country=partner.country||'AUS'" ng-model="partner.country" name="country"
id="country-input" maxlength="20" required placeholder="AUS" readonly="readonly">
<div ng-messages="partnerForm.country.$error" ng-if="partnerForm.country.$dirty">
<p class="small text-danger" ng-message="maxlength">Less Than 20
Characters(including symbols and spaces)</p>
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="btn-group margin-bottom margin-top">
<button class="btn btn-success" type="button" ng-click="updatePartner(partnerForm)">Save
</button>

Loading…
Cancel
Save