From b8d30b4fbde8c1e5efd5dae0e67d6f0c9d69f241 Mon Sep 17 00:00:00 2001 From: liuxinxin Date: Mon, 2 Sep 2019 17:21:14 +0800 Subject: [PATCH] =?UTF-8?q?[RoyalPay]=20=E9=9C=80=E6=B1=82=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../merchants/beans/ClientRegisterInfo.java | 10 + .../static/payment/partner/partner-manage.js | 57 ++++++ src/main/ui/static/payment/partner/partner.js | 43 ++++ .../partner/templates/add_partner.html | 23 ++- .../templates/add_sub_partner_dialog.html | 18 ++ .../templates/client_partner_detail.html | 87 ++++++++ .../templates/client_partner_edit.html | 186 +++++++++++++++++- .../partner/templates/partner_detail.html | 10 + .../partner/templates/partner_edit.html | 177 ++++++++++++++++- 9 files changed, 606 insertions(+), 5 deletions(-) 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 3d4597926..4681fe714 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 @@ -53,6 +53,8 @@ public class ClientRegisterInfo { private String contactPhone; @JSONField(name = "contact_email") private String contactEmail; + @JSONField(name = "contact_job") + private String contactJob; private String address; private String suburb; private String postcode; @@ -513,4 +515,12 @@ public class ClientRegisterInfo { public void setRepresentativeJobTitle(String representativeJobTitle) { this.representativeJobTitle = representativeJobTitle; } + + public String getContactJob() { + return contactJob; + } + + public void setContactJob(String contactJob) { + this.contactJob = contactJob; + } } diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 5ae63e109..722a54cda 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -428,6 +428,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.legal_representative_phone_p = $scope.partner.contact_phone_p; $scope.partner.legal_representative_email = $scope.partner.contact_email; + + $scope.partner.legal_representative_job = $scope.partner.contact_job; } } @@ -1286,6 +1288,58 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.legal_representative_email = $scope.partner.representativeInfo.email; $scope.partner.legal_representative_job = $scope.partner.representativeInfo.job_title; } + + function hasRole() { + var rolenum; + switch (sessionStorage.getItem('role')) { + case "administrator": + rolenum = 1; + break; + case "bduser": + rolenum = 4; + break; + case "salesmanager": + rolenum = 8192; + break; + case "accountant": + rolenum = 8; + break; + case "sitemanager": + rolenum = 128; + break; + case "director": + rolenum = 64; + break; + case "developer": + rolenum = 256; + break; + case "compliance": + rolenum = 2; + break; + case "guest": + rolenum = 2048; + break; + case "orgmanager": + rolenum = 4096; + break; + case "riskmanager": + rolenum = 1024; + break; + default: + break; + } + if ((window.currentUser.role & rolenum) >0) { + return true; + }else { + sessionStorage.removeItem('role'); + return false; + } + } + + if (hasRole()) { + $scope.role = sessionStorage.getItem('role'); + } + var origin_referrer_id = angular.copy($scope.partner.referrer_id); var resetClientPayDescByTpey = function (type) { type = parseInt(type); @@ -1346,6 +1400,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.legal_representative_phone = $scope.partner.contact_phone; $scope.partner.legal_representative_email = $scope.partner.contact_email; + + $scope.partner.legal_representative_job = $scope.partner.contact_job; } } @@ -3061,6 +3117,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.legal_representative_phone_p = $scope.partner.contact_phone_p; $scope.partner.legal_representative_email = $scope.partner.contact_email; + $scope.partner.legal_representative_job = $scope.partner.contact_job; } } diff --git a/src/main/ui/static/payment/partner/partner.js b/src/main/ui/static/payment/partner/partner.js index 6cbee8215..a2dec110d 100644 --- a/src/main/ui/static/payment/partner/partner.js +++ b/src/main/ui/static/payment/partner/partner.js @@ -328,6 +328,18 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo $scope.states = stateMap.configs(); $scope.countries = countryMap.configs(); + if($scope.partner.representativeInfo != null) + { + $scope.partner.registered_address = $scope.partner.representativeInfo.address; + $scope.partner.registered_suburb = $scope.partner.representativeInfo.suburb; + $scope.partner.registered_postcode = $scope.partner.representativeInfo.postcode; + $scope.partner.registered_state = $scope.partner.representativeInfo.state; + $scope.partner.legal_representative_person = $scope.partner.representativeInfo.representative_person; + $scope.partner.legal_representative_phone = $scope.partner.representativeInfo.phone; + $scope.partner.legal_representative_email = $scope.partner.representativeInfo.email; + $scope.partner.legal_representative_job = $scope.partner.representativeInfo.job_title; + } + $scope.uploadLogo = function (file) { if (file != null) { if (file.size > 1 * 1024 * 1024) { @@ -444,6 +456,37 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo } }; + $scope.partner.sameAsContactPerson = false; + $scope.checkboxOnclick = function (){ + $scope.partner.sameAsContactPerson = !($scope.partner.sameAsContactPerson); + if($scope.partner.sameAsContactPerson) + { + $scope.partner.legal_representative_person = $scope.partner.contact_person; + + $scope.partner.legal_representative_phone = $scope.partner.contact_phone; + + $scope.partner.legal_representative_email = $scope.partner.contact_email; + + $scope.partner.legal_representative_job = $scope.partner.contact_job; + } + }; + + $scope.partner.sameAsAddress=false; + $scope.sameAddress = function (){ + $scope.partner.sameAsAddress=!($scope.partner.sameAsAddress); + if($scope.partner.sameAsAddress) + { + $scope.partner.registered_address = $scope.partner.address; + + $scope.partner.registered_suburb = $scope.partner.suburb; + + $scope.partner.registered_postcode = $scope.partner.postcode; + + $scope.partner.registered_state = $scope.partner.state; + } + }; + + $scope.updatePartner = function (form) { if (form.$invalid) { angular.forEach(form, function (item, key) { diff --git a/src/main/ui/static/payment/partner/templates/add_partner.html b/src/main/ui/static/payment/partner/templates/add_partner.html index 6fa16c2c8..739c3975b 100644 --- a/src/main/ui/static/payment/partner/templates/add_partner.html +++ b/src/main/ui/static/payment/partner/templates/add_partner.html @@ -669,6 +669,25 @@ Characters(including symbols and spaces)

+
+ +
+ +
+
+

Required + Field

+

Less Than 50 + Characters(including symbols and spaces)

+
+
+
@@ -775,8 +794,8 @@ name="legal_representative_job" id="legal_representative_job-id" maxlength="50">
-
+

Required Field

Less Than 50 diff --git a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html index 91b22a995..fc71f4343 100644 --- a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html +++ b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html @@ -574,6 +574,24 @@ Characters(including symbols and spaces)

+
+ +
+ +
+
+

Required + Field

+

Less Than 50 + Characters(including symbols and spaces)

+
+
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 5752a88ec..853c1fb36 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 @@ -384,6 +384,55 @@
+
+ + +
+

+ +

+
+
+ + + +

+
Legal Representative
+
+
+
+ + +
+

+
+
+
+ + +
+

+
+
+
+ + +
+

+ +

+
+
+
+ + +
+

+ +

+
+
+
@@ -430,6 +479,44 @@ + +

+
Registered Address Information
+
+
+ +
+ + +
+

+
+
+
+ + +
+

+
+
+
+ + +
+

+
+
+
+ + +
+

+
+
+
+
+
+
diff --git a/src/main/ui/static/payment/partner/templates/client_partner_edit.html b/src/main/ui/static/payment/partner/templates/client_partner_edit.html index 4877d1b7e..ad1b37ce0 100644 --- a/src/main/ui/static/payment/partner/templates/client_partner_edit.html +++ b/src/main/ui/static/payment/partner/templates/client_partner_edit.html @@ -416,6 +416,107 @@ Characters(including symbols and spaces)

+
+ +
+ +
+
+

Required + Field

+

Less Than 50 + Characters(including symbols and spaces)

+
+
+
+ +
+ + + +
+
  Legal Representative
+
+
+
+ +
+ +
+

Required + Field

+

Less + Than 50 + Characters(including symbols and spaces)

+
+
+
+ +
+ +
+ +
+
+

Required Field

+

Less Than 20 + Characters(including symbols and spaces)

+
+
+ +
+ +
+ +
+
+

Required + Field

+

Less Than 50 + Characters(including symbols and spaces)

+
+
+ +
+ +
+ +
+
+

Required + Field

+

Less Than 50 + Characters(including symbols and spaces)

+
+
+
@@ -483,6 +584,89 @@ +
+ +
+ + + +
+
  Registered Office Address
+
+
+
+ +
+ +
+

Less + Than 200 + Characters(including symbols and spaces)

+

Required + Field

+
+
+
+
+ +
+ +
+

Less + Than 50 + Characters(including symbols and spaces)

+

Required + Field

+
+
+
+
+ +
+ +
+

Less + Than 10 + Characters(including symbols and spaces)

+

Required + Field

+
+
+
+
+ +
+ +
+

Required + Field

+
+ +
+
@@ -495,4 +679,4 @@ - \ No newline at end of file + diff --git a/src/main/ui/static/payment/partner/templates/partner_detail.html b/src/main/ui/static/payment/partner/templates/partner_detail.html index f1b9c66d8..61baafe76 100644 --- a/src/main/ui/static/payment/partner/templates/partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/partner_detail.html @@ -730,6 +730,16 @@

+ +
+ + +
+

+ +

+
+
diff --git a/src/main/ui/static/payment/partner/templates/partner_edit.html b/src/main/ui/static/payment/partner/templates/partner_edit.html index bd24ffaf8..d22fc8976 100644 --- a/src/main/ui/static/payment/partner/templates/partner_edit.html +++ b/src/main/ui/static/payment/partner/templates/partner_edit.html @@ -579,6 +579,25 @@ Characters(including symbols and spaces)

+ +
+ +
+ +
+
+

Required + Field

+

Less Than 50 + Characters(including symbols and spaces)

+
+
@@ -587,7 +606,7 @@
  Legal Representative
-
+
@@ -664,6 +683,82 @@
+ +
+
+
+ +
+ +
+

Required + Field

+

Less + Than 50 + Characters(including symbols and spaces)

+
+
+
+ +
+ +
+ +
+
+

Required Field

+

Less Than 20 + Characters(including symbols and spaces)

+
+
+ +
+ +
+ +
+
+

Required + Field

+

Less Than 50 + Characters(including symbols and spaces)

+
+
+ +
+ +
+ +
+
+

Required + Field

+

Less Than 50 + Characters(including symbols and spaces)

+
+
+ +
+
+
@@ -769,7 +864,7 @@

  Registered Office Address
-
+
@@ -846,6 +941,84 @@
+ +
+
+
+ +
+ +
+

Less + Than 200 + Characters(including symbols and spaces)

+

Required + Field

+
+
+
+
+ +
+ +
+

Less + Than 50 + Characters(including symbols and spaces)

+

Required + Field

+
+
+
+
+ +
+ +
+

Less + Than 10 + Characters(including symbols and spaces)

+

Required + Field

+
+
+
+
+ +
+ +
+

Required + Field

+
+ +
+
+
+