diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index f61832c8d..aaac1fd4b 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -6990,31 +6990,49 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.wechatMccIndustries = wechatGoodMcc.configs() $scope.merchantIds = merchantIds.data $scope.businessTypesMap = businessTypesMap.configs() + $scope.subMerchantInfo.short_name = $scope.merchantInfo.short_name + $scope.subMerchantInfo.industry = $scope.merchantInfo.industry + $scope.subMerchantInfo.company_website = $scope.merchantInfo.company_website + $scope.subMerchantInfo.address = $scope.merchantInfo.address + $scope.subMerchantInfo.company_phone = $scope.merchantInfo.company_phone + $scope.subMerchantInfo.contact_person = $scope.merchantInfo.contact_person + $scope.subMerchantInfo.contact_phone = $scope.merchantInfo.contact_phone + $scope.subMerchantInfo.contact_email = $scope.merchantInfo.contact_email + $scope.subMerchantInfo.company_register_no = $scope.merchantInfo.abn ? $scope.merchantInfo.abn : $scope.merchantInfo.acn + + if ($scope.merchantInfo.client_pay_type) { + if ($scope.merchantInfo.client_pay_type.indexOf('1') >= 0 && $scope.merchantInfo.client_pay_type.indexOf('2') >= 0) { + $scope.subMerchantInfo.business_type = 'BOTH' + } else if ($scope.merchantInfo.client_pay_type.indexOf('1') >= 0) { + $scope.subMerchantInfo.business_type = 'ONLINE' + } else if ($scope.merchantInfo.client_pay_type.indexOf('2') >= 0) { + $scope.subMerchantInfo.business_type = 'OFFLINE' + } + } else { + $scope.subMerchantInfo.business_type = 'BOTH' + } - if ($scope.subMerchantInfo.extra_merchant_type) { - $scope.subMerchantInfo.merchant_type = $scope.subMerchantInfo.extra_merchant_type - } - if ($scope.subMerchantInfo.industry) { - $scope.subMerchantInfo.industry = $filter('newWxMerchantsFilter')($scope.subMerchantInfo.industry) - } - if ($scope.subMerchantInfo.mcc_code) { - $scope.subMerchantInfo.mcc_code = parseInt($scope.subMerchantInfo.mcc_code) - } + if ($scope.merchantInfo.industry) { + $scope.subMerchantInfo.industry = $filter('newWxMerchantsFilter')($scope.merchantInfo.industry) + } + if ($scope.merchantInfo.mc_code) { + $scope.subMerchantInfo.mcc_code = $scope.merchantInfo.mc_code + } - // if($scope.subMerchantInfo.certificat_expire_date) { - // // var datestr = subMerchantInfo.certificat_expire_date.replace(/-/g, '/'); - // $scope.subMerchantInfo.certificat_expire_date=new Date($scope.subMerchantInfo.certificat_expire_date); - // } - if ($scope.subMerchantInfo.certificat_expire_date) { - if ($scope.subMerchantInfo.certificat_expire_date == 'PERMANENT') { - $scope.subMerchantInfo.certificat_expire_date_premanent = true - } else if ($scope.subMerchantInfo.certificat_expire_date == 'N/A') { - $scope.subMerchantInfo.certificat_expire_date_NA = true - } else { - var datestr = $scope.subMerchantInfo.certificat_expire_date.replace(/-/g, '/') - $scope.subMerchantInfo.certificat_expire_date_d = new Date(datestr) + if ($scope.merchantInfo.business_structure) { + $scope.subMerchantInfo.merchant_type = $scope.merchantInfo.business_structure != 'Registered body(Sole Trader)' ? 'ENTERPRISE' : 'INDIVIDUAL' } - } + if ($scope.merchantInfo.certificat_expire_date) { + if ($scope.merchantInfo.certificat_expire_date == 'PERMANENT') { + $scope.subMerchantInfo.certificat_expire_date_premanent = true + } else if ($scope.merchantInfo.certificat_expire_date == 'N/A') { + $scope.subMerchantInfo.certificat_expire_date_NA = true + } else { + var datestr = $scope.merchantInfo.certificat_expire_date.replace(/-/g, '/') + $scope.subMerchantInfo.certificat_expire_date_d = new Date(datestr) + } + } + $scope.checkExpriedate = function (value) { if (value) { $scope.subMerchantInfo.certificat_expire_date_premanent = false @@ -7060,6 +7078,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter address: $scope.subMerchantInfo.address, business_type: $scope.subMerchantInfo.business_type, sub_mch_id: $scope.subMerchantInfo.sub_merchant_id, + merchant_remark: $scope.subMerchantInfo.merchant_remark, } if (params.business_type == 'ONLINE') { params.address = null