yeepay update

master
james.zhao 6 years ago
parent a4e62a3bb5
commit 85eb7fecf1

@ -355,6 +355,8 @@ public interface ClientManager {
void subYeepayMerchantApplication(String clientMoniker,JSONObject merchantInfo, JSONObject manager);
void reSubYeepayMerchantApplication(String clientMoniker,JSONObject merchantInfo, JSONObject manager);
void updateAllPartnerPassword(String clientMoniker, List<String> emails, String accountWhiteList);
void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject client);

@ -3731,6 +3731,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
merchantInfo.put("extinfo",extInfo.toJSONString());
yeePayClientConfigMapper.saveMerchantConfig(merchantInfo);
JSONObject yeepayConfig = yeePayClientConfigMapper.findMerchantConfig(client.getIntValue("client_id"));
yeepayConfig.put("company_website",merchantInfo.getString("company_website"));
yeepayConfig.put("abn",merchantInfo.getString("abn"));
SubmerchantRegisterResult result = yeePayClient.registerMerchant(client,yeepayConfig);
if(result.getStatus().equals("FAILED")){
throw new BadRequestException(result.getErrorMsg());
@ -3741,6 +3743,35 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientMapper.update(client);
}
@Override
public void reSubYeepayMerchantApplication(String clientMoniker, JSONObject merchantInfo, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);
if (client == null) {
throw new InvalidShortIdException();
}
checkOrgPermission(manager, client);
JSONObject yeepayConfig = yeePayClientConfigMapper.findMerchantConfigBySub(merchantInfo.getString("subMerchantId"));
List<JSONObject> directorsAll = new ArrayList<>();
List<JSONObject> executivesAll = new ArrayList<>();
directorsAll.add(merchantInfo.getJSONObject("directors"));
executivesAll.add(merchantInfo.getJSONObject("executives"));
JSONObject extInfo = new JSONObject();
extInfo.put("directors",directorsAll);
extInfo.put("executives",executivesAll);
yeepayConfig.put("extinfo",extInfo.toJSONString());
yeepayConfig.put("industry",merchantInfo.getString("industry"));
yeepayConfig.put("business_content",merchantInfo.getString("business_content"));
yeepayConfig.put("business_licence",merchantInfo.getString("business_licence"));
yeePayClientConfigMapper.update(yeepayConfig);
yeepayConfig.put("company_website",merchantInfo.getString("company_website"));
yeepayConfig.put("abn",merchantInfo.getString("abn"));
yeepayConfig.put("mode","UPDATE");
SubmerchantRegisterResult result = yeePayClient.registerMerchant(client,yeepayConfig);
if(result.getStatus().equals("FAILED")){
throw new BadRequestException(result.getErrorMsg());
}
}
@Override
public List<JSONObject> listMerchantIds(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker);

@ -615,6 +615,11 @@ public class PartnerManageController {
clientManager.subYeepayMerchantApplication(clientMoniker, merchantInfo,manager);
}
@ManagerMapping(value = "/{clientMoniker}/updateYeepaySubMerchantId", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN})
public void reSubYeepayMerchantApplication(@PathVariable String clientMoniker,@RequestBody JSONObject merchantInfo,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.reSubYeepayMerchantApplication(clientMoniker, merchantInfo,manager);
}
@RequestMapping(value = "/compliance", method = RequestMethod.GET)
@RequireManager(role = { ManagerRole.OPERATOR})
public JSONObject lisPartnersByCompliance(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, PartnerQuery query) {

@ -3410,7 +3410,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
subMerchantInfo: function () {
return $scope.partner;
},
yeepaySubMerchantId: function () {
subMerchantId: function () {
return sub_merchant_id;
}
}
@ -3530,55 +3530,55 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
var merchantId = '';
$scope.uploadLegalIDcardFront = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.legalIDcardFrontProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.legalIDcardFrontProgress;
$scope.legalIDcardFront = resp.data.path;
vouchers['legalIDcardFront'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.legalIDcardFrontProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadLegalIDcardBack = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.legalIDcardBackProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.legalIDcardBackProgress;
$scope.legalIDcardBack = resp.data.path;
vouchers['legalIDcardBack'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.legalIDcardBackProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
// $scope.uploadLegalIDcardFront = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.legalIDcardFrontProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.legalIDcardFrontProgress;
// $scope.legalIDcardFront = resp.data.path;
// vouchers['legalIDcardFront'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.legalIDcardFrontProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
//
// $scope.uploadLegalIDcardBack = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.legalIDcardBackProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.legalIDcardBackProgress;
// $scope.legalIDcardBack = resp.data.path;
// vouchers['legalIDcardBack'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.legalIDcardBackProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
$scope.uploadBusinessLicence = function (file) {
if (file != null) {
@ -3605,130 +3605,130 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
};
$scope.uploadTaxLevel = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.taxLevelProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.taxLevelProgress;
$scope.taxLevel = resp.data.path;
vouchers['taxLevel'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.taxLevelProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadBankAccountOpen = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.bankAccountOpenProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.bankAccountOpenProgress;
$scope.bankAccountOpen = resp.data.path;
vouchers['bankAccountOpen'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.bankAccountOpenProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadOrgCode = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.orgCodeProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.orgCodeProgress;
$scope.orgCode = resp.data.path;
vouchers['orgCode'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.orgCodeProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadNonStanProtocol = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.nonStanProtocolProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.nonStanProtocolProgress;
$scope.nonStanProtocol = resp.data.path;
vouchers['nonStanProtocol'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.nonStanProtocolProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadZipPath = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.zipPathProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.zipPathProgress;
$scope.zipPath = resp.data.path;
vouchers['zipPath'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.zipPathProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
// $scope.uploadTaxLevel = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.taxLevelProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.taxLevelProgress;
// $scope.taxLevel = resp.data.path;
// vouchers['taxLevel'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.taxLevelProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
// $scope.uploadBankAccountOpen = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.bankAccountOpenProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.bankAccountOpenProgress;
// $scope.bankAccountOpen = resp.data.path;
// vouchers['bankAccountOpen'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.bankAccountOpenProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
// $scope.uploadOrgCode = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.orgCodeProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.orgCodeProgress;
// $scope.orgCode = resp.data.path;
// vouchers['orgCode'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.orgCodeProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
//
// $scope.uploadNonStanProtocol = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.nonStanProtocolProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.nonStanProtocolProgress;
// $scope.nonStanProtocol = resp.data.path;
// vouchers['nonStanProtocol'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.nonStanProtocolProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
//
// $scope.uploadZipPath = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.zipPathProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.zipPathProgress;
// $scope.zipPath = resp.data.path;
// vouchers['zipPath'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.zipPathProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
$scope.uploadDirectorPassport = function (file) {
if (file != null) {
@ -3797,6 +3797,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
// }
// }
// });
merchantInfo['company_website'] = $scope.subMerchantInfo.company_website;
merchantInfo['abn'] = $scope.subMerchantInfo.abn;
merchantInfo['executives'] = $scope.executives;
merchantInfo['directors'] = $scope.directors;
merchantInfo['business_content'] = $scope.business_content;
@ -3823,7 +3825,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
}]);
app.controller('updateYeepaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state','subMerchantInfo','yeepayIndustryMap','yeepayBusinessContentMap','$filter', 'commonDialog','Upload', function ($scope, $http, $uibModal, $state,subMerchantInfo,yeepayIndustryMap,yeepayBusinessContentMap,$filter, commonDialog,Upload) {
app.controller('updateYeepaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state','subMerchantInfo','yeepayIndustryMap','yeepayBusinessContentMap','$filter', 'commonDialog','Upload','subMerchantId', function ($scope, $http, $uibModal, $state,subMerchantInfo,yeepayIndustryMap,yeepayBusinessContentMap,$filter, commonDialog,Upload,subMerchantId) {
$scope.yeepay_industries = yeepayIndustryMap.configs();
$scope.yeepay_business_contents = yeepayBusinessContentMap.configs();
$scope.subMerchantInfo = angular.copy(subMerchantInfo);
@ -3838,55 +3840,55 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
var merchantId = '';
$scope.uploadLegalIDcardFront = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.legalIDcardFrontProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.legalIDcardFrontProgress;
$scope.legalIDcardFront = resp.data.path;
vouchers['legalIDcardFront'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.legalIDcardFrontProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadLegalIDcardBack = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.legalIDcardBackProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.legalIDcardBackProgress;
$scope.legalIDcardBack = resp.data.path;
vouchers['legalIDcardBack'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.legalIDcardBackProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
// $scope.uploadLegalIDcardFront = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.legalIDcardFrontProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.legalIDcardFrontProgress;
// $scope.legalIDcardFront = resp.data.path;
// vouchers['legalIDcardFront'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.legalIDcardFrontProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
//
// $scope.uploadLegalIDcardBack = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.legalIDcardBackProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.legalIDcardBackProgress;
// $scope.legalIDcardBack = resp.data.path;
// vouchers['legalIDcardBack'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.legalIDcardBackProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
$scope.uploadBusinessLicence = function (file) {
if (file != null) {
@ -3913,130 +3915,130 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
};
$scope.uploadTaxLevel = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.taxLevelProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.taxLevelProgress;
$scope.taxLevel = resp.data.path;
vouchers['taxLevel'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.taxLevelProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadBankAccountOpen = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.bankAccountOpenProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.bankAccountOpenProgress;
$scope.bankAccountOpen = resp.data.path;
vouchers['bankAccountOpen'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.bankAccountOpenProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadOrgCode = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.orgCodeProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.orgCodeProgress;
$scope.orgCode = resp.data.path;
vouchers['orgCode'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.orgCodeProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadNonStanProtocol = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.nonStanProtocolProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.nonStanProtocolProgress;
$scope.nonStanProtocol = resp.data.path;
vouchers['nonStanProtocol'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.nonStanProtocolProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
$scope.uploadZipPath = function (file) {
if (file != null) {
if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else {
$scope.zipPathProgress = {value: 0};
Upload.upload({
url: '/attachment/yeepayFiles',
data: {file: file}
}).then(function (resp) {
delete $scope.zipPathProgress;
$scope.zipPath = resp.data.path;
vouchers['zipPath'] = resp.data.path;
merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) {
delete $scope.zipPathProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) {
$scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total);
})
}
}
};
// $scope.uploadTaxLevel = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.taxLevelProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.taxLevelProgress;
// $scope.taxLevel = resp.data.path;
// vouchers['taxLevel'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.taxLevelProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
// $scope.uploadBankAccountOpen = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.bankAccountOpenProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.bankAccountOpenProgress;
// $scope.bankAccountOpen = resp.data.path;
// vouchers['bankAccountOpen'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.bankAccountOpenProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
// $scope.uploadOrgCode = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.orgCodeProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.orgCodeProgress;
// $scope.orgCode = resp.data.path;
// vouchers['orgCode'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.orgCodeProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
//
// $scope.uploadNonStanProtocol = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.nonStanProtocolProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.nonStanProtocolProgress;
// $scope.nonStanProtocol = resp.data.path;
// vouchers['nonStanProtocol'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.nonStanProtocolProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
//
// $scope.uploadZipPath = function (file) {
// if (file != null) {
// if (file.size > 3 * 1024 * 1024) {
// commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
// } else {
// $scope.zipPathProgress = {value: 0};
// Upload.upload({
// url: '/attachment/yeepayFiles',
// data: {file: file}
// }).then(function (resp) {
// delete $scope.zipPathProgress;
// $scope.zipPath = resp.data.path;
// vouchers['zipPath'] = resp.data.path;
// merchantId = resp.data.merchantId;
// commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
// }, function (resp) {
// delete $scope.zipPathProgress;
// commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
// }, function (evt) {
// $scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total);
// })
// }
// }
// };
$scope.uploadDirectorPassport = function (file) {
if (file != null) {
@ -4088,7 +4090,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
};
$scope.saveYeepayApply = function (form) {
$scope.updateYeepayApply = function (form) {
$scope.errmsg = null;
if (form.$invalid) {
angular.forEach(form, function (item, key) {
@ -4105,18 +4107,21 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
// }
// }
// });
merchantInfo['company_website'] = $scope.subMerchantInfo.company_website;
merchantInfo['abn'] = $scope.subMerchantInfo.abn;
merchantInfo['executives'] = $scope.executives;
merchantInfo['subMerchantId'] = angular.copy(subMerchantId);
merchantInfo['directors'] = $scope.directors;
merchantInfo['business_content'] = $scope.business_content;
merchantInfo['industry'] = $scope.industry;
merchantInfo['merchantId'] = merchantId;
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registYeepaySubMerchantId', merchantInfo).then(function (resp) {
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/updateYeepaySubMerchantId', merchantInfo).then(function (resp) {
$scope.apply_sub_merchant_id = resp.data;
$scope.$close();
if (subMerchantInfo.yeepay_sub_merchant_id != null) {
commonDialog.alert({
title: 'Success',
content: 'Modify Yeepay Sub Merchant ID successfully',
content: 'Update Successfully,Please Wait For Review!',
type: 'success'
});
$state.reload();

@ -39,6 +39,30 @@
</div>
</div>
<div class="form-group" ng-class="{'has-error':subForm.company_website.$invalid && subForm.company_website.$dirty}">
<label class="control-label col-sm-3" for="company_website_input">* Website</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.company_website" required
type="url" name="company_website" id="company_website_input">
<div ng-messages="subForm.company_website.$error" ng-if="subForm.company_website.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
<div ng-messages="subForm.company_website.$error" ng-if="subForm.company_website.$dirty">
<p class="small text-danger" ng-message="url">eg:https://www.royalpay.com.au</p>
</div>
</div>
</div>
<div class="form-group" ng-class="{'has-error':subForm.abn.$invalid && subForm.abn.$dirty}">
<label class="control-label col-sm-3" for="abn_input">* ABN</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.abn" required
type="text" name="abn" id="abn_input">
<div ng-messages="subForm.abn.$error" ng-if="subForm.abn.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-3" >* Corporate ID Card Front</label>-->
<!--<div class="col-sm-8">-->

@ -201,10 +201,10 @@
ng-click="useYeepaySubMerchantId(id_apply.sub_merchant_id)">
USE
</button>
<!--<button role="button" class="btn btn-info" title="use"-->
<!--ng-click="updateYeepaySubMerchantId(id_apply.sub_merchant_id)">-->
<!--UPDATE-->
<!--</button>-->
<button role="button" class="btn btn-info" title="update"
ng-click="updateYeepaySubMerchantId(id_apply.sub_merchant_id)" ng-if="partner.yeepay_sub_merchant_id == id_apply.sub_merchant_id">
UPDATE
</button>
</div>
</div>
</div>

@ -39,6 +39,30 @@
</div>
</div>
<div class="form-group" ng-class="{'has-error':subForm.company_website.$invalid && subForm.company_website.$dirty}">
<label class="control-label col-sm-3" for="company_website_input">* Website</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.company_website" required
type="url" name="company_website" id="company_website_input">
<div ng-messages="subForm.company_website.$error" ng-if="subForm.company_website.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
<div ng-messages="subForm.company_website.$error" ng-if="subForm.company_website.$dirty">
<p class="small text-danger" ng-message="url">eg:https://www.royalpay.com.au</p>
</div>
</div>
</div>
<div class="form-group" ng-class="{'has-error':subForm.abn.$invalid && subForm.abn.$dirty}">
<label class="control-label col-sm-3" for="abn_input">* ABN</label>
<div class="col-sm-8">
<input class="form-control" ng-model="subMerchantInfo.abn" required
type="text" name="abn" id="abn_input">
<div ng-messages="subForm.abn.$error" ng-if="subForm.abn.$dirty">
<p class="small text-danger" ng-message="required">Required Field</p>
</div>
</div>
</div>
<!--<div class="form-group">-->
<!--<label class="control-label col-sm-3" >* Corporate ID Card Front</label>-->
<!--<div class="col-sm-8">-->

Loading…
Cancel
Save