From 70252f7f73f197d4a8125fbfcf3e62b4431c7b3b Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 19 Mar 2020 10:53:16 +0800 Subject: [PATCH] =?UTF-8?q?fix=20partners=20industry=E6=94=B9=E4=B8=BAroya?= =?UTF-8?q?lpay=E8=A1=8C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/mappers/system/ClientMapper.xml | 5 ++-- src/main/ui/merchant_application.html | 1 + .../commons/directives/multiLevelSelect.js | 30 ++++++++++++++----- .../static/commons/filters/commonFilters.js | 6 ++++ .../static/payment/partner/partner-manage.js | 22 ++++++++++++-- .../partner/templates/add_partner.html | 14 +++++---- .../templates/add_sub_partner_dialog.html | 12 +++++--- .../partner/templates/partner_detail.html | 2 +- .../partner/templates/partner_edit.html | 14 +++++---- .../payment/partner/templates/partners.html | 21 +++++++------ .../product/templates/add_product.html | 3 +- .../payment/product/templates/product.html | 5 ++-- 13 files changed, 98 insertions(+), 39 deletions(-) diff --git a/pom.xml b/pom.xml index 0cb5cad66..078cabd4a 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.4.1 + 1.4.2 UTF-8 1.8.0 diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml index 5d79f6cf0..5b9e0db6a 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml @@ -89,8 +89,9 @@ AND c.business_structure=#{business_structure} - - AND c.industry=#{industry} + + + AND c.royalpayindustry like #{industry} AND c.create_time >= #{create_start_time} diff --git a/src/main/ui/merchant_application.html b/src/main/ui/merchant_application.html index b24762107..35a3462fe 100644 --- a/src/main/ui/merchant_application.html +++ b/src/main/ui/merchant_application.html @@ -482,6 +482,7 @@ margin-bottom: 10%;"/> multi-level-select-popup="alipayMccCategory" on-select="onAlipayMccSelect($selected)" placeholder="alipayIndustry" + chose-one-level="false" >
diff --git a/src/main/ui/static/commons/directives/multiLevelSelect.js b/src/main/ui/static/commons/directives/multiLevelSelect.js index 1e389668f..512f1c4b2 100644 --- a/src/main/ui/static/commons/directives/multiLevelSelect.js +++ b/src/main/ui/static/commons/directives/multiLevelSelect.js @@ -10,7 +10,8 @@ define(['../app', 'angular', 'jquery', 'css!../css/multiLevelSelect'], function multiLevelSelectPopup: '=', childrenKey: '@', labelKey: '@', - onSelect: '&' + onSelect: '&', + choseOneLevel: '=' }, link: function (scope, element, attr) { var selectBox,bg; @@ -27,8 +28,8 @@ define(['../app', 'angular', 'jquery', 'css!../css/multiLevelSelect'], function top: (offset.top + $(this).outerHeight() + 3) + 'px', left: offset.left + 'px' }); - var container = $('
').appendTo(selectBox); - initSelectLevel(container, scope.multiLevelSelectPopup, 0); + var container = $('
').appendTo(selectBox); + initSelectLevel(container, scope.multiLevelSelectPopup, 0, scope.choseOneLevel); var $body = $('body'); selectBox.appendTo($body); bg = $('
').css({position:'fixed',top:0,left:0,right:0,bottom:0,zIndex:9998}).appendTo($body); @@ -40,8 +41,7 @@ define(['../app', 'angular', 'jquery', 'css!../css/multiLevelSelect'], function }); - - function initSelectLevel(container, list, groupIndex) { + function initSelectLevel(container, list, groupIndex, choseOneLevel) { if (selectGroups[groupIndex]) { var groups = selectGroups.splice(groupIndex, 999); angular.forEach(groups, function (group) { @@ -61,7 +61,8 @@ define(['../app', 'angular', 'jquery', 'css!../css/multiLevelSelect'], function scope.onSelect({$selected: item}); }) - }catch(err){} + } catch (err) { + } selectBox.remove(); bg.remove(); selectBox = null; @@ -74,10 +75,25 @@ define(['../app', 'angular', 'jquery', 'css!../css/multiLevelSelect'], function li.addClass('active'); initSelectLevel(container, item.children, groupIndex + 1); }); + if (choseOneLevel) { + li.click(function () { + if (angular.isFunction(scope.onSelect)) { + try { + scope.$apply(function () { + scope.onSelect({$selected: item}); + + }) + }catch(err){} + selectBox.remove(); + bg.remove(); + selectBox = null; + } + }); + } } }) } } } }]) -}); \ No newline at end of file +}); diff --git a/src/main/ui/static/commons/filters/commonFilters.js b/src/main/ui/static/commons/filters/commonFilters.js index e6452c454..2bb0caf65 100644 --- a/src/main/ui/static/commons/filters/commonFilters.js +++ b/src/main/ui/static/commons/filters/commonFilters.js @@ -9,6 +9,12 @@ define(['../app', 'jquery'], function (app, $) { dataType: 'json', success: function (data) { royalpay = data; + var selectAll = { + "label": "All", + "mccCode": "0", + "children":{} + }; + royalpay.unshift(selectAll); } }); diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index f00a66158..a6c2209ce 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -224,14 +224,32 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.analysisClients(); } $scope.pagination = {}; - $scope.industries = industryMap.configs(); $scope.states = stateMap.configs(); $scope.countries = countryMap.configs(); $scope.sectors = sectorMap.configs(); $scope.business_structures = businessStructuresMap.configs(); $scope.clean_days = angular.copy(clean_days_map); $scope.bd_citys = angular.copy(bd_city_map); - $scope.params = {textType: 'all', org_name: 'ALL'}; + $scope.params = {textType: 'all', org_name: 'ALL', industry: "0"}; + $scope.loadRoyalpayindustry = function () { + $http.get('/static/data/royalpayindustry.json').then(function (resp) { + $scope.royalpayindustry = resp.data; + var selectAll = { + "label": "All", + "mccCode": "0", + "children":{} + }; + $scope.royalpayindustry.unshift(selectAll); + }) + }; + + $scope.loadRoyalpayindustry(); + + $scope.onRoyalPayIndustrySelect = function (selectedItem) { + $scope.params.royalpay_label = selectedItem.label; + $scope.params.industry = selectedItem.mccCode; + $scope.loadPartners(1); + }; $scope.loadPartners = function (page) { var params = angular.copy($scope.params); 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 a89d75908..81a32685b 100644 --- a/src/main/ui/static/payment/partner/templates/add_partner.html +++ b/src/main/ui/static/payment/partner/templates/add_partner.html @@ -1197,7 +1197,8 @@ name="alipay_category" readonly ng-model="partner.alipay_category" multi-level-select-popup="alipayMccCategory" - on-select="onAlipayMccSelect($selected)"> + on-select="onAlipayMccSelect($selected)" + chose-one-level="false">

Required @@ -1291,13 +1292,14 @@

+ for="royalpayindustry">*RoyalPay商户类别
+ on-select="onRoyalPayIndustrySelect($selected)" + chose-one-level="false">

Required @@ -1354,7 +1356,8 @@ name="alipay_category" readonly ng-model="partner.alipayindustry|partner_alipay_industry" multi-level-select-popup="alipayMccCategory" - on-select="onAlipayMccSelect($selected)"> + on-select="onAlipayMccSelect($selected)" + chose-one-level="false">

Required @@ -1372,7 +1375,8 @@ name="hf_label" readonly ng-model="partner.hfindustry|partner_hf_industry" multi-level-select-popup="hfindustry" - on-select="onHfIndustrySelect($selected)"> + on-select="onHfIndustrySelect($selected)" + chose-one-level="false">

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 cd73afa9e..ea6876105 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 @@ -1064,7 +1064,8 @@ name="alipay_category" readonly ng-model="partner.alipay_category" multi-level-select-popup="alipayMccCategory" - on-select="onAlipayMccSelect($selected)"> + on-select="onAlipayMccSelect($selected)" + chose-one-level="false">

Required @@ -1161,7 +1162,8 @@ name="royalpayindustry" readonly ng-model="partner.royalpayindustry|partner_royalpay_industry" multi-level-select-popup="royalpayindustry" - on-select="onRoyalPayIndustrySelect($selected)"> + on-select="onRoyalPayIndustrySelect($selected)" + chose-one-level="false">

Required @@ -1219,7 +1221,8 @@ name="alipay_category" readonly ng-model="partner.alipayindustry" multi-level-select-popup="alipayMccCategory" - on-select="onAlipayMccSelect($selected)"> + on-select="onAlipayMccSelect($selected)" + chose-one-level="false">

Required @@ -1237,7 +1240,8 @@ name="hf_label" readonly ng-model="partner.hfindustry |partner_hf_industry" multi-level-select-popup="hfindustry" - on-select="onHfIndustrySelect($selected)"> + on-select="onHfIndustrySelect($selected)" + chose-one-level="false">

- +

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 e4e2c2863..67dc57d72 100644 --- a/src/main/ui/static/payment/partner/templates/partner_edit.html +++ b/src/main/ui/static/payment/partner/templates/partner_edit.html @@ -1083,7 +1083,8 @@ name="alipay_category" readonly ng-model="partner.alipayindustry|partner_alipay_industry" multi-level-select-popup="alipayMccCategory" - on-select="onAlipayMccSelect($selected)"> + on-select="onAlipayMccSelect($selected)" + chose-one-level="false">

Required @@ -1151,13 +1152,14 @@

+ for="royalpayindustry"> *RoyalPay商户类别
+ on-select="onRoyalPayIndustrySelect($selected)" + chose-one-level="false">

Required @@ -1214,7 +1216,8 @@ name="alipay_category" readonly ng-model="partner.alipayindustry|partner_alipay_industry" multi-level-select-popup="alipayMccCategory" - on-select="onAlipayMccSelect($selected)"> + on-select="onAlipayMccSelect($selected)" + chose-one-level="false">

Required @@ -1232,7 +1235,8 @@ name="hf_label" readonly ng-model="partner.hfindustry|partner_hf_industry" multi-level-select-popup="hfindustry" - on-select="onHfIndustrySelect($selected)"> + on-select="onHfIndustrySelect($selected)" + chose-one-level="false">

diff --git a/src/main/ui/static/payment/partner/templates/partners.html b/src/main/ui/static/payment/partner/templates/partners.html index 7681d526b..34b0bfea2 100644 --- a/src/main/ui/static/payment/partner/templates/partners.html +++ b/src/main/ui/static/payment/partner/templates/partners.html @@ -191,7 +191,8 @@ name="params.org_name" ng-model="params.org_name" multi-level-select-popup="orgs_child" - on-select="onOrgsSelect($selected)"> + on-select="onOrgsSelect($selected)" + chose-one-level="false">
-->
- -
- + +
+
diff --git a/src/main/ui/static/payment/product/templates/add_product.html b/src/main/ui/static/payment/product/templates/add_product.html index 2d3f08502..08c4ed54e 100644 --- a/src/main/ui/static/payment/product/templates/add_product.html +++ b/src/main/ui/static/payment/product/templates/add_product.html @@ -79,7 +79,8 @@ name="hf_industry" readonly ng-model="product.hf_industry|partner_hf_industry" multi-level-select-popup="hf_industry" - on-select="onHfIndustrySelect($selected)"> + on-select="onHfIndustrySelect($selected)" + chose-one-level="false">
diff --git a/src/main/ui/static/payment/product/templates/product.html b/src/main/ui/static/payment/product/templates/product.html index c3aaaaa18..0600f4aa7 100644 --- a/src/main/ui/static/payment/product/templates/product.html +++ b/src/main/ui/static/payment/product/templates/product.html @@ -34,7 +34,8 @@ ng-model="params.hf_industry|partner_hf_industry" multi-level-select-popup="hf_industry" placeholder="Select a Hf Industry To Follow Up" - on-select="onHfIndustrySelect($selected)"> + on-select="onHfIndustrySelect($selected)" + chose-one-level="false">
@@ -125,4 +126,4 @@
-
\ No newline at end of file +