|
|
@ -88,6 +88,9 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
|
|
|
|
if ($scope.partner.representativeInfo && $scope.partner.representativeInfo.phone) {
|
|
|
|
if ($scope.partner.representativeInfo && $scope.partner.representativeInfo.phone) {
|
|
|
|
$scope.partner.representativeInfo.phone = $scope.partner.representativeInfo.phone.substring(1, $scope.partner.contact_phone.length);
|
|
|
|
$scope.partner.representativeInfo.phone = $scope.partner.representativeInfo.phone.substring(1, $scope.partner.contact_phone.length);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($scope.partner.representativeInfo && $scope.partner.representativeInfo.marketing_phone) {
|
|
|
|
|
|
|
|
$scope.partner.representativeInfo.marketing_phone = $scope.partner.representativeInfo.marketing_phone.substring(1, $scope.partner.contact_phone.length);
|
|
|
|
|
|
|
|
}
|
|
|
|
$scope.getMerchantLocation = function () {
|
|
|
|
$scope.getMerchantLocation = function () {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/location').then(function (resp) {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/location').then(function (resp) {
|
|
|
|
$scope.merchant_location = resp.data;
|
|
|
|
$scope.merchant_location = resp.data;
|
|
|
@ -105,9 +108,21 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
|
|
|
|
$scope.partner.representativeInfo.phone = $scope.partner.contact_phone.substring(1, $scope.partner.contact_phone.length);
|
|
|
|
$scope.partner.representativeInfo.phone = $scope.partner.contact_phone.substring(1, $scope.partner.contact_phone.length);
|
|
|
|
$scope.partner.representativeInfo.email = $scope.partner.contact_email;
|
|
|
|
$scope.partner.representativeInfo.email = $scope.partner.contact_email;
|
|
|
|
$scope.partner.representativeInfo.job_title = $scope.partner.contact_job;
|
|
|
|
$scope.partner.representativeInfo.job_title = $scope.partner.contact_job;
|
|
|
|
|
|
|
|
$scope.partner.representativeInfo.legal_representative_wechatid = $scope.partner.contact_wechatid;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.checkMarketingSameAsContact = function (){
|
|
|
|
|
|
|
|
$scope.partner.marketingSameAsContact = !($scope.partner.marketingSameAsContact);
|
|
|
|
|
|
|
|
if($scope.partner.marketingSameAsContact) {
|
|
|
|
|
|
|
|
$scope.partner.representativeInfo.marketing_person = $scope.partner.contact_person;
|
|
|
|
|
|
|
|
$scope.partner.representativeInfo.marketing_phone = $scope.partner.contact_phone.substring(1, $scope.partner.contact_phone.length);
|
|
|
|
|
|
|
|
$scope.partner.representativeInfo.marketing_email = $scope.partner.contact_email;
|
|
|
|
|
|
|
|
$scope.partner.representativeInfo.marketing_job_title = $scope.partner.contact_job;
|
|
|
|
|
|
|
|
$scope.partner.representativeInfo.marketing_wechatid = $scope.partner.contact_wechatid;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$scope.sameAddress = function (){
|
|
|
|
$scope.sameAddress = function (){
|
|
|
|
$scope.partner.sameAsAddress = !($scope.partner.sameAsAddress);
|
|
|
|
$scope.partner.sameAsAddress = !($scope.partner.sameAsAddress);
|
|
|
|
if($scope.partner.sameAsAddress){
|
|
|
|
if($scope.partner.sameAsAddress){
|
|
|
@ -298,6 +313,13 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
|
|
|
|
$scope.partner.registered_suburb = $scope.partner.representativeInfo.suburb;
|
|
|
|
$scope.partner.registered_suburb = $scope.partner.representativeInfo.suburb;
|
|
|
|
$scope.partner.registered_postcode = $scope.partner.representativeInfo.postcode;
|
|
|
|
$scope.partner.registered_postcode = $scope.partner.representativeInfo.postcode;
|
|
|
|
$scope.partner.registered_state = $scope.partner.representativeInfo.state;
|
|
|
|
$scope.partner.registered_state = $scope.partner.representativeInfo.state;
|
|
|
|
|
|
|
|
$scope.partner.marketing_person = $scope.partner.representativeInfo.marketing_person;
|
|
|
|
|
|
|
|
$scope.partner.marketing_phone = '+' + $scope.partner.representativeInfo.marketing_phone;
|
|
|
|
|
|
|
|
$scope.partner.marketing_email = $scope.partner.representativeInfo.marketing_email;
|
|
|
|
|
|
|
|
$scope.partner.marketing_job = $scope.partner.representativeInfo.marketing_job_title;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_wechatid = $scope.partner.representativeInfo.legal_representative_wechatid;
|
|
|
|
|
|
|
|
$scope.partner.marketing_wechatid = $scope.partner.representativeInfo.marketing_wechatid;
|
|
|
|
$http.put('/client/partner_info/update/partnerInfo', $scope.partner).then(function () {
|
|
|
|
$http.put('/client/partner_info/update/partnerInfo', $scope.partner).then(function () {
|
|
|
|
if (content != '') {
|
|
|
|
if (content != '') {
|
|
|
|
commonDialog.alert({
|
|
|
|
commonDialog.alert({
|
|
|
@ -422,7 +444,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload', 'uiBoo
|
|
|
|
$scope.partner.marketing_email = $scope.partner.representativeInfo.marketing_email;
|
|
|
|
$scope.partner.marketing_email = $scope.partner.representativeInfo.marketing_email;
|
|
|
|
$scope.partner.marketing_job = $scope.partner.representativeInfo.marketing_job_title;
|
|
|
|
$scope.partner.marketing_job = $scope.partner.representativeInfo.marketing_job_title;
|
|
|
|
|
|
|
|
|
|
|
|
$scope.partner.legal_representative_wechatid = $scope.partner.representativeInfo.wechatid;
|
|
|
|
$scope.partner.legal_representative_wechatid = $scope.partner.representativeInfo.legal_representative_wechatid;
|
|
|
|
$scope.partner.marketing_wechatid = $scope.partner.representativeInfo.marketing_wechatid;
|
|
|
|
$scope.partner.marketing_wechatid = $scope.partner.representativeInfo.marketing_wechatid;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|