diff --git a/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyBean.java b/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyBean.java index d00e8e90a..8f2f4c2be 100644 --- a/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyBean.java +++ b/src/main/java/au/com/royalpay/payment/manage/application/beans/ClientPreApplyBean.java @@ -52,6 +52,7 @@ public class ClientPreApplyBean { @NotEmpty(message = "codeKey can't be null") private String codeKey; private boolean agree; + private String nation_code; public JSONObject insertObject() { JSONObject res = (JSONObject) JSON.toJSON(this); @@ -225,4 +226,12 @@ public class ClientPreApplyBean { public void setCodeKey(String codeKey) { this.codeKey = codeKey; } + + public String getNation_code() { + return nation_code; + } + + public void setNation_code(String nation_code) { + this.nation_code = nation_code; + } } diff --git a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java index 2edea8e9d..21561226e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/application/core/impls/SimpleClientApplyServiceImpl.java @@ -285,7 +285,9 @@ public class SimpleClientApplyServiceImpl implements SimpleClientApplyService { sysClient.put("create_time",new Date()); sysClient.put("source",4); 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", availableMerchant.getMerchantId()); sysClient.put("sub_merchant_id",tempSubMerchantId); @@ -299,6 +301,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); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java index eb65168f7..8c0f45cd5 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java @@ -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; diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java index 6ab259398..febcab7e8 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java @@ -292,4 +292,6 @@ public interface ClientManager { List getClientSubMerchantIdLogs(String clientMoniker,JSONObject manager); void applyToCompliance(String client_moniker, JSONObject account); + + void sendVerifyEmail(JSONObject client,String accountId); } diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index 631b59bc6..781ff933f 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -11,6 +11,7 @@ import au.com.royalpay.payment.core.exceptions.InvalidShortIdException; import au.com.royalpay.payment.core.utils.OrderExpiryRuleResolver; import au.com.royalpay.payment.manage.analysis.mappers.TransactionAnalysisMapper; import au.com.royalpay.payment.manage.appclient.beans.AppClientBean; +import au.com.royalpay.payment.manage.application.core.SimpleClientApplyService; 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; @@ -264,6 +265,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Resource private ClientInfoCacheSupport clientInfoCacheSupport; + + @Resource + private SimpleClientApplyService simpleClientApplyService; @Resource private MongoTemplate mongoTemplate; @Resource @@ -3439,4 +3443,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid sendCommissionWechatMessage(client); } } + + @Override + public void sendVerifyEmail(JSONObject client,String 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")); + } } diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java index 3ecfa512b..e1eb68b66 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerViewController.java @@ -1,6 +1,9 @@ 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; @@ -57,6 +60,9 @@ public class PartnerViewController { @Resource private ClientContractService clientContractService; + @Resource + private SimpleClientApplyService simpleClientApplyService; + @RequestMapping(method = RequestMethod.GET) @RequirePartner @ResponseBody @@ -385,4 +391,41 @@ public class PartnerViewController { public void commitAudit(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) { clientManager.applyToCompliance(account.getString("client_moniker"),account); } + + @PartnerMapping(value = "/compliance/files", method = RequestMethod.GET) + @ResponseBody + public JSONObject complianceFile(@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject account) { + return clientManager.getAuthFiles(null,account.getString("client_moniker")); + } + + @PartnerMapping(value = "/verify/email", method = RequestMethod.PUT) + @ResponseBody + 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("已通过审核,暂不能提交和修改"); + } + } } diff --git a/src/main/ui/merchant_application.html b/src/main/ui/merchant_application.html index 23e6a03d8..4907f499b 100644 --- a/src/main/ui/merchant_application.html +++ b/src/main/ui/merchant_application.html @@ -1,5 +1,6 @@ - + @@ -272,7 +273,7 @@
+ required maxlength="50" name="contact_email" ng-mouseleave="checkParams()" ng-mousedown="trueEmail =false">

The mailbox is incorrect

@@ -285,12 +286,14 @@ +61 + placeholder="Your Phone" maxlength="15" ng-mouseleave="checkParams()" ng-mousedown="name_exist =false">
+
+ The phone number has already existed +
phone number is also your login id
@@ -299,8 +302,8 @@
- +
+ placeholder="Company Name" required maxlength="80">
@@ -345,17 +348,17 @@
+ placeholder="Merchant Name" required maxlength="50">
+ placeholder="Company phone" required maxlength="20">
+ name="address" required maxlength="200">
+ maxlength="10" name="postcode">
@@ -420,14 +423,15 @@
-
@@ -494,21 +498,21 @@
-

  WeChat Rate Value: {{rate.wechat_rate_value}}%

+

  WeChat Rate Value:  {{rate.wechat_rate_value}}%

-

  Alipay Rate Value(Retail): {{rate.alipay_rate_value}}%

+

  Alipay Rate Value(Retail):  {{rate.alipay_rate_value}}%

-

  Alipay Rate Value(Online): {{rate.alipayonline_rate_value}}%

+

  Alipay Rate Value(Online):  {{rate.alipayonline_rate_value}}%

-

  Bestpay Rate Value: {{rate.bestpay_rate_value}}%

+

  Bestpay Rate Value:  {{rate.bestpay_rate_value}}%

-

  JD Rate Value: {{rate.jd_rate_value}}%

+

  JD Rate Value:  {{rate.jd_rate_value}}%

diff --git a/src/main/ui/static/boot/indexMainApp.js b/src/main/ui/static/boot/indexMainApp.js index 39837c2f2..7f6454032 100644 --- a/src/main/ui/static/boot/indexMainApp.js +++ b/src/main/ui/static/boot/indexMainApp.js @@ -21,7 +21,7 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo $scope.loadCurrentUser = function () { $http.get('/global/userstatus/current_partner').then(function (resp) { $rootScope.currentUser = resp.data; - if ((resp.data.client.approve_result == 2 || resp.data.client.approve_result == 3) && resp.data.client.source == 4) { + /* if ((resp.data.client.approve_result == 2 || resp.data.client.approve_result == 3) && resp.data.client.source == 4) { if (resp.data.wechat_openid == null) { $scope.newPartnerGuide(resp.data); } else { @@ -32,7 +32,7 @@ define(['angular', 'angularSanitize', 'angularAnimate', 'angularMessages', 'uiRo }); } - } + }*/ if ($rootScope.currentUser.is_password_expired) { commonDialog.confirm({ title: 'Change Password!', diff --git a/src/main/ui/static/css/merchant_application.css b/src/main/ui/static/css/merchant_application.css index 218f8cb27..c99261d17 100644 --- a/src/main/ui/static/css/merchant_application.css +++ b/src/main/ui/static/css/merchant_application.css @@ -95,7 +95,7 @@ body .progress_inner__step:before { height: 30px; color: #70afd0; background: white; - line-height: 30px; + line-height: 26px; border: 3px solid #a6cde2; font-size: 12px; top: 3px; diff --git a/src/main/ui/static/dashboard/partner-dashboard.js b/src/main/ui/static/dashboard/partner-dashboard.js index c2a26c267..4b52d9c5d 100644 --- a/src/main/ui/static/dashboard/partner-dashboard.js +++ b/src/main/ui/static/dashboard/partner-dashboard.js @@ -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(); @@ -910,190 +911,56 @@ define(['angular','decimal', 'uiRouter', 'uiBootstrap', 'angularEcharts'], funct controller: 'unSettledAmountHistoryDialogCtrl' }) }; - + $scope.contactCustomerService = function () { + $uibModal.open({ + templateUrl: 'static/dashboard/templates/dashboard_service_support.html', + controller: 'contactCustomerServiceDialogCtrl', + size: 'sm' + }) + }; $scope.getClearingTransactions = function (client_id, detailId) { clearingDetailService.clientClearingDetail(client_id, detailId, true) }; - }]); - - 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) - } - } + $scope.checkStartGuidance = 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){ + if($scope.complianceFiles.client_bank_file != null && $scope.complianceFiles.client_company_file != null){ + $scope.toCommitFiles = true; } - }, - 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(); }) } }]); + + app.controller('contactCustomerServiceDialogCtrl', ['$scope', '$http', function ($scope, $http) { + + }]); + app.filter('abs', function () { return function (value) { return Math.abs(value); diff --git a/src/main/ui/static/dashboard/templates/dashboard_service_support.html b/src/main/ui/static/dashboard/templates/dashboard_service_support.html new file mode 100644 index 000000000..2fa133ffc --- /dev/null +++ b/src/main/ui/static/dashboard/templates/dashboard_service_support.html @@ -0,0 +1,8 @@ +
+ +
+ 1300-10-77-50
+ support@royalpay.com.au
+ Mon-Fri (9:00am-5:30pm) +
+
\ No newline at end of file diff --git a/src/main/ui/static/dashboard/templates/partner_dashboard.html b/src/main/ui/static/dashboard/templates/partner_dashboard.html index 999479e12..b1d45c58b 100644 --- a/src/main/ui/static/dashboard/templates/partner_dashboard.html +++ b/src/main/ui/static/dashboard/templates/partner_dashboard.html @@ -180,8 +180,29 @@ .mini-stat-info span{ font-size: 18px; } - + .start_item{ + line-height: 50px; + } + .start_ico{ + display: inline-block; + line-height: 50px; + font-size: 30px; + vertical-align: middle; + color: #6fd088; + } + .start_text{ + line-height: 50px; + display: inline-block; + vertical-align: baseline; + } + .start_email{ + font-size: 15px; + } + .text-gray{ + color: grey !important; + } +

Dashboard @@ -201,6 +222,79 @@

+
+
+
+
+

Tips: Started with RoyalPay

+
+
+ + + + + +
+ As soon as you create a RoyalPay account, you can use all of RoyalPay's features, including accepting payments from customers. + But before you activate your account, RoyalPay will not execute settlement.Therefore, it is recommended that you submit your compliance materials as soon as possible, and our compliance department will notify you when the audit is completed. If you have any questions, you can contact our customer service!. +
+
+
+
+
diff --git a/src/main/ui/static/images/customer_service2.jpg b/src/main/ui/static/images/customer_service2.jpg new file mode 100644 index 000000000..980b4c7e1 Binary files /dev/null and b/src/main/ui/static/images/customer_service2.jpg differ diff --git a/src/main/ui/static/images/step/gou.png b/src/main/ui/static/images/step/gou.png new file mode 100644 index 000000000..f4a81919a Binary files /dev/null and b/src/main/ui/static/images/step/gou.png differ diff --git a/src/main/ui/static/images/step/num1_1.png b/src/main/ui/static/images/step/num1_1.png new file mode 100644 index 000000000..e4a8e2496 Binary files /dev/null and b/src/main/ui/static/images/step/num1_1.png differ diff --git a/src/main/ui/static/images/step/num1_2.png b/src/main/ui/static/images/step/num1_2.png new file mode 100644 index 000000000..c009a6baa Binary files /dev/null and b/src/main/ui/static/images/step/num1_2.png differ diff --git a/src/main/ui/static/images/step/num1_3.png b/src/main/ui/static/images/step/num1_3.png new file mode 100644 index 000000000..93931e4be Binary files /dev/null and b/src/main/ui/static/images/step/num1_3.png differ diff --git a/src/main/ui/static/images/step/num1_4.png b/src/main/ui/static/images/step/num1_4.png new file mode 100644 index 000000000..e1b9e4028 Binary files /dev/null and b/src/main/ui/static/images/step/num1_4.png differ diff --git a/src/main/ui/static/images/step/num1_5.png b/src/main/ui/static/images/step/num1_5.png new file mode 100644 index 000000000..63524502e Binary files /dev/null and b/src/main/ui/static/images/step/num1_5.png differ diff --git a/src/main/ui/static/merchantapplication/merchant_application.js b/src/main/ui/static/merchantapplication/merchant_application.js index 40aa14f0e..20f9a3392 100644 --- a/src/main/ui/static/merchantapplication/merchant_application.js +++ b/src/main/ui/static/merchantapplication/merchant_application.js @@ -58,7 +58,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl', $scope.seconds = 6; $scope.canClick=false; $scope.description = "Send Code"; - $scope.partner = {nation_code:"+61"}; + $scope.partner = {nation_code:"+86"}; $scope.bankaccount = {}; $scope.rate = {}; $scope.phone_code_timer=$interval(function () {}, 1000); @@ -71,6 +71,25 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl', $scope.loadRoyalpayindustry(); + $scope.checkParams = function () { + if($scope.partner.contact_phone && $scope.partner.nation_code){ + $http.get('/register/account/check?phone='+$scope.partner.contact_phone+'&nation_code='+$scope.partner.nation_code).then(function (resp) { + $scope.name_exist = false; + }, function (resp) { + if (resp.data.status == 403){ + $scope.name_exist = true; + } + }) + }; + if($scope.partner.contact_email){ + var reg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$"); + if(!reg.test($scope.partner.contact_email)){ + $scope.trueEmail = true; + }else { + $scope.trueEmail = false; + } + } + }; $scope.checkUserName = function (phone,nation_code) { if(phone && nation_code){ $http.get('/register/account/check?phone='+phone+'&nation_code='+nation_code).then(function (resp) { @@ -156,7 +175,7 @@ angular.module('applyPartnerApp', ['ngMessages']).controller('applyPartnerCtrl', $scope.initErrorMsg(); if (bsb_no != null && bsb_no != "") { $scope.showBankInfo = false; - $http.get('/register/info/bank/' + bsb_no).then(function (resp) { + $http.get('/register/info/bank/' + bsb_no+"?username="+$scope.partner.username+'&'+'codeKey='+$scope.partner.codeKey).then(function (resp) { $scope.bankInfo = resp.data; $scope.bankaccount.bank = $scope.bankInfo.bank; $scope.bankaccount.city = $scope.bankInfo.city; diff --git a/src/main/ui/static/payment/partner/partner.js b/src/main/ui/static/payment/partner/partner.js index c60e038ad..b2fc1675f 100644 --- a/src/main/ui/static/payment/partner/partner.js +++ b/src/main/ui/static/payment/partner/partner.js @@ -15,10 +15,23 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct return $http.get('/client/partner_info'); }] } + }).state('basic.payment_info_edit', { + url: '/payment/edit', + templateUrl: '/static/payment/partner/templates/client_partner_edit.html', + controller: 'clientPaymentInfoEditCtrl' }).state('basic.payment_info', { url: '/payment', templateUrl: '/static/payment/partner/templates/client_payment_info.html', controller: 'clientPaymentInfoCtrl' + }).state('basic.compliance_files', { + url: '/{client_moniker}/compliance_files', + templateUrl: '/static/payment/partner/templates/client_compliance_files.html', + controller: 'clientComplianceFilesCtrl', + resolve: { + file: ['$http', function ($http) { + return $http.get('/client/partner_info/compliance/files'); + }] + } }).state('payment_materials', { url: '/payment_materials', templateUrl: '/static/payment/partner/templates/client_payment_materials.html', @@ -46,15 +59,354 @@ 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','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) { + + $scope.file = file.data || {}; + //audit files + $scope.uploadBankFile = function (file) { + if (file != null) { + if (file.size > 3 * 1024 * 1024) { + commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + } else { + $scope.bankFileProgress = {value: 0}; + Upload.upload({ + url: '/attachment/files', + data: {file: file} + }).then(function (resp) { + delete $scope.bankFileProgress; + $scope.file.file_bank_info = resp.data.url; + $scope.updateFile(); + if ($scope.file.file_bank_info.endsWith('pdf')) { + $scope.bankIsImage = false; + } else { + $scope.bankIsImage = true; + } + }, function (resp) { + delete $scope.bankFileProgress; + commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + }, function (evt) { + $scope.bankFileProgress.value = parseInt(100 * evt.loaded / evt.total); + }) + } + } + }; + $scope.agreeIsImage = true; + if ($scope.file.file_agreement_info && $scope.file.file_agreement_info.endsWith('pdf')) { + $scope.agreeIsImage = false; + } + $scope.bankIsImage = true; + if ($scope.file.file_bank_info && $scope.file.file_bank_info.endsWith('pdf')) { + $scope.bankIsImage = false; } + $scope.companyIsImage = true; + if ($scope.file.file_company_info && $scope.file.file_company_info.endsWith('pdf')) { + $scope.companyIsImage = false; + } + $scope.applyIsImage = true; + if ($scope.file.file_apply_info && $scope.file.file_apply_info.endsWith('pdf')) { + $scope.applyIsImage = false; + } + $scope.idIsImage = true; + if ($scope.file.file_id_info && $scope.file.file_id_info.endsWith('pdf')) { + $scope.idIsImage = false; + } + + $scope.uploadCompanyFile = function (file) { + if (file != null) { + if (file.size > 3 * 1024 * 1024) { + commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + } else { + $scope.companyFileProgress = {value: 0}; + Upload.upload({ + url: '/attachment/files', + data: {file: file} + }).then(function (resp) { + delete $scope.companyFileProgress; + $scope.file.file_company_info = resp.data.url; + $scope.updateFile(); + if ($scope.file.file_company_info.endsWith('pdf')) { + $scope.companyIsImage = false; + } else { + $scope.companyIsImage = true; + } + }, function (resp) { + delete $scope.companyFileProgress; + commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + }, function (evt) { + $scope.companyFileProgress.value = parseInt(100 * evt.loaded / evt.total); + }) + } + } + }; + //上传ID信息 + $scope.uploadIDFile = function (file) { + if (file != null) { + if (file.size > 3 * 1024 * 1024) { + commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + } else { + $scope.idFileProgress = {value: 0}; + Upload.upload({ + url: '/attachment/files', + data: {file: file} + }).then(function (resp) { + delete $scope.idFileProgress; + $scope.file.file_id_info = resp.data.url; + $scope.updateFile(); + if ($scope.file.file_id_info.endsWith('pdf')) { + $scope.idIsImage = false; + } else { + $scope.idIsImage = true; + } + }, function (resp) { + delete $scope.idFileProgress; + commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + }, function (evt) { + $scope.idFileProgress.value = parseInt(100 * evt.loaded / evt.total); + }) + } + } + }; + + //上传协议文件 + $scope.uploadAgreementFile = function (file) { + if (file != null) { + if (file.size > 10 * 1024 * 1024) { + commonDialog.alert({title: 'Error', content: '文件大小不能超过5MB,请压缩后重试', type: 'error'}) + } else { + $scope.agreementFileProgress = {value: 0}; + Upload.upload({ + url: '/attachment/files', + data: {file: file} + }).then(function (resp) { + delete $scope.agreementFileProgress; + $scope.file.file_agreement_info = resp.data.url; + $scope.updateFile(); + if ($scope.file.file_agreement_info.endsWith('pdf')) { + $scope.agreeIsImage = false; + } else { + $scope.agreeIsImage = true; + } + }, function (resp) { + delete $scope.agreementFileProgress; + commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + }, function (evt) { + $scope.agreementFileProgress.value = parseInt(100 * evt.loaded / evt.total); + }) + } + } + }; + + //上传申请表 + $scope.uploadApplyFile = function (file) { + if (file != null) { + if (file.size > 3 * 1024 * 1024) { + commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB,请压缩后重试', type: 'error'}) + } else { + $scope.applyFileProgress = {value: 0}; + Upload.upload({ + url: '/attachment/files', + data: {file: file} + }).then(function (resp) { + delete $scope.applyFileProgress; + $scope.file.file_apply_info = resp.data.url; + $scope.updateFile(); + if ($scope.file.file_apply_info.endsWith('pdf')) { + $scope.applyIsImage = false; + } else { + $scope.applyIsImage = true; + } + }, function (resp) { + delete $scope.applyFileProgress; + commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) + }, function (evt) { + $scope.applyFileProgress.value = parseInt(100 * evt.loaded / evt.total); + }) + + } + } + }; + + /* $scope.downloadAsZip = function () { + var url = '/sys/partners/' + $scope.partner.client_moniker + '/download/complianceAsZIP'; + return url; + }; +*/ + $scope.updateFile = function () { + $http.put('/client/partner_info/update/file', $scope.file).then(function () { + commonDialog.alert({ + title: 'Success', + content: 'Upload Successful', + type: 'success' + }); + $state.reload(); + }, function (resp) { + commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); + }) + }; + + function commitError() { + commonDialog.alert({ + title: 'Error', + content: 'Missing file', + type: 'error' + }); + }; + $scope.commitPartner = function () { + if ($scope.file) { + if ($scope.file.file_bank_info != null && $scope.file.file_company_info != null && $scope.file.file_id_info != null && $scope.file_apply_info != null) { + $http.put('/client/partner_info/compliance_audit').then(function (resp) { + + }); + } else { + commitError(); + } + } else { + commitError(); + } + }; }]); + app.controller('clientPaymentInfoCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) { $scope.paymentInfo = $scope.partner; $scope.old_customer_surcharge_rate = angular.copy($scope.partner.customer_surcharge_rate); diff --git a/src/main/ui/static/payment/partner/templates/client_compliance_files.html b/src/main/ui/static/payment/partner/templates/client_compliance_files.html new file mode 100644 index 000000000..769505334 --- /dev/null +++ b/src/main/ui/static/payment/partner/templates/client_compliance_files.html @@ -0,0 +1,154 @@ + +
+
+
+
+ +
+
+ + + +
+ + + +
+
+
+

Example:请保证图片信息清晰可见,如下图

+ +
+
+
+ +
+ +
+
+ + + +
+ + + +
+
+
+
+

Example:公司请提供以下文件图片

+ + +
+
+

sole trade(个体户),partnership(合伙),trust(信托)请在http://abr.business.gov.au,将查询结果截图上传

+ +
+
+
+
+ +
+ +
+
+ + + +
+ + + +
+
+
+
+

Example:请保证图片(护照或驾照)信息清晰可见,如下图

+ +
+
+
+
+ +
+
+
+
+ +
+
+ +
+
+ + + +
+ + + +
+
+
+

Example:请保证图片信息清晰可见,如下图

+ +
+
+
+
+ +
+
+ +
+
+ + + +
+ + + +
+
+
+

Example:请保证图片信息清晰可见,如下图

+ +
+
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/src/main/ui/static/payment/partner/templates/client_partner_detail.html b/src/main/ui/static/payment/partner/templates/client_partner_detail.html index cd34f8e31..112cdd9d0 100644 --- a/src/main/ui/static/payment/partner/templates/client_partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/client_partner_detail.html @@ -9,6 +9,26 @@
+
+
+

Compliance (Refused + :{{partner.refuse_remark}}) + 【目前状态】- + + (自助申请)资料完善中 + (自助申请)已开通 + (自助申请)快速开通等待提交合规材料 + (自助申请)待审核(材料已提交) + +

+
+ +
+
+