Merge remote-tracking branch 'origin/develop' into develop

master
yixian 8 years ago
commit 223e9c708f

@ -355,6 +355,8 @@ public interface ClientManager {
void subYeepayMerchantApplication(String clientMoniker,JSONObject merchantInfo, JSONObject manager); 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 updateAllPartnerPassword(String clientMoniker, List<String> emails, String accountWhiteList);
void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject client); 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()); merchantInfo.put("extinfo",extInfo.toJSONString());
yeePayClientConfigMapper.saveMerchantConfig(merchantInfo); yeePayClientConfigMapper.saveMerchantConfig(merchantInfo);
JSONObject yeepayConfig = yeePayClientConfigMapper.findMerchantConfig(client.getIntValue("client_id")); 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); SubmerchantRegisterResult result = yeePayClient.registerMerchant(client,yeepayConfig);
if(result.getStatus().equals("FAILED")){ if(result.getStatus().equals("FAILED")){
throw new BadRequestException(result.getErrorMsg()); throw new BadRequestException(result.getErrorMsg());
@ -3741,6 +3743,35 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
clientMapper.update(client); 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 @Override
public List<JSONObject> listMerchantIds(String clientMoniker, JSONObject manager) { public List<JSONObject> listMerchantIds(String clientMoniker, JSONObject manager) {
JSONObject client = getClientInfoByMoniker(clientMoniker); JSONObject client = getClientInfoByMoniker(clientMoniker);

@ -615,6 +615,11 @@ public class PartnerManageController {
clientManager.subYeepayMerchantApplication(clientMoniker, merchantInfo,manager); 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) @RequestMapping(value = "/compliance", method = RequestMethod.GET)
@RequireManager(role = { ManagerRole.OPERATOR}) @RequireManager(role = { ManagerRole.OPERATOR})
public JSONObject lisPartnersByCompliance(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, PartnerQuery query) { 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 () { subMerchantInfo: function () {
return $scope.partner; return $scope.partner;
}, },
yeepaySubMerchantId: function () { subMerchantId: function () {
return sub_merchant_id; return sub_merchant_id;
} }
} }
@ -3530,55 +3530,55 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
var merchantId = ''; var merchantId = '';
$scope.uploadLegalIDcardFront = function (file) { // $scope.uploadLegalIDcardFront = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.legalIDcardFrontProgress = {value: 0}; // $scope.legalIDcardFrontProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.legalIDcardFrontProgress; // delete $scope.legalIDcardFrontProgress;
$scope.legalIDcardFront = resp.data.path; // $scope.legalIDcardFront = resp.data.path;
vouchers['legalIDcardFront'] = resp.data.path; // vouchers['legalIDcardFront'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.legalIDcardFrontProgress; // delete $scope.legalIDcardFrontProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
//
$scope.uploadLegalIDcardBack = function (file) { // $scope.uploadLegalIDcardBack = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.legalIDcardBackProgress = {value: 0}; // $scope.legalIDcardBackProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.legalIDcardBackProgress; // delete $scope.legalIDcardBackProgress;
$scope.legalIDcardBack = resp.data.path; // $scope.legalIDcardBack = resp.data.path;
vouchers['legalIDcardBack'] = resp.data.path; // vouchers['legalIDcardBack'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.legalIDcardBackProgress; // delete $scope.legalIDcardBackProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
$scope.uploadBusinessLicence = function (file) { $scope.uploadBusinessLicence = function (file) {
if (file != null) { if (file != null) {
@ -3605,130 +3605,130 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
}; };
$scope.uploadTaxLevel = function (file) { // $scope.uploadTaxLevel = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.taxLevelProgress = {value: 0}; // $scope.taxLevelProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.taxLevelProgress; // delete $scope.taxLevelProgress;
$scope.taxLevel = resp.data.path; // $scope.taxLevel = resp.data.path;
vouchers['taxLevel'] = resp.data.path; // vouchers['taxLevel'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.taxLevelProgress; // delete $scope.taxLevelProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
$scope.uploadBankAccountOpen = function (file) { // $scope.uploadBankAccountOpen = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.bankAccountOpenProgress = {value: 0}; // $scope.bankAccountOpenProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.bankAccountOpenProgress; // delete $scope.bankAccountOpenProgress;
$scope.bankAccountOpen = resp.data.path; // $scope.bankAccountOpen = resp.data.path;
vouchers['bankAccountOpen'] = resp.data.path; // vouchers['bankAccountOpen'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.bankAccountOpenProgress; // delete $scope.bankAccountOpenProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
$scope.uploadOrgCode = function (file) { // $scope.uploadOrgCode = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.orgCodeProgress = {value: 0}; // $scope.orgCodeProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.orgCodeProgress; // delete $scope.orgCodeProgress;
$scope.orgCode = resp.data.path; // $scope.orgCode = resp.data.path;
vouchers['orgCode'] = resp.data.path; // vouchers['orgCode'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.orgCodeProgress; // delete $scope.orgCodeProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
//
$scope.uploadNonStanProtocol = function (file) { // $scope.uploadNonStanProtocol = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.nonStanProtocolProgress = {value: 0}; // $scope.nonStanProtocolProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.nonStanProtocolProgress; // delete $scope.nonStanProtocolProgress;
$scope.nonStanProtocol = resp.data.path; // $scope.nonStanProtocol = resp.data.path;
vouchers['nonStanProtocol'] = resp.data.path; // vouchers['nonStanProtocol'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.nonStanProtocolProgress; // delete $scope.nonStanProtocolProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
//
$scope.uploadZipPath = function (file) { // $scope.uploadZipPath = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.zipPathProgress = {value: 0}; // $scope.zipPathProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.zipPathProgress; // delete $scope.zipPathProgress;
$scope.zipPath = resp.data.path; // $scope.zipPath = resp.data.path;
vouchers['zipPath'] = resp.data.path; // vouchers['zipPath'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.zipPathProgress; // delete $scope.zipPathProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
$scope.uploadDirectorPassport = function (file) { $scope.uploadDirectorPassport = function (file) {
if (file != null) { 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['executives'] = $scope.executives;
merchantInfo['directors'] = $scope.directors; merchantInfo['directors'] = $scope.directors;
merchantInfo['business_content'] = $scope.business_content; 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_industries = yeepayIndustryMap.configs();
$scope.yeepay_business_contents = yeepayBusinessContentMap.configs(); $scope.yeepay_business_contents = yeepayBusinessContentMap.configs();
$scope.subMerchantInfo = angular.copy(subMerchantInfo); $scope.subMerchantInfo = angular.copy(subMerchantInfo);
@ -3838,55 +3840,55 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
var merchantId = ''; var merchantId = '';
$scope.uploadLegalIDcardFront = function (file) { // $scope.uploadLegalIDcardFront = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.legalIDcardFrontProgress = {value: 0}; // $scope.legalIDcardFrontProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.legalIDcardFrontProgress; // delete $scope.legalIDcardFrontProgress;
$scope.legalIDcardFront = resp.data.path; // $scope.legalIDcardFront = resp.data.path;
vouchers['legalIDcardFront'] = resp.data.path; // vouchers['legalIDcardFront'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.legalIDcardFrontProgress; // delete $scope.legalIDcardFrontProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.legalIDcardFrontProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
//
$scope.uploadLegalIDcardBack = function (file) { // $scope.uploadLegalIDcardBack = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.legalIDcardBackProgress = {value: 0}; // $scope.legalIDcardBackProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.legalIDcardBackProgress; // delete $scope.legalIDcardBackProgress;
$scope.legalIDcardBack = resp.data.path; // $scope.legalIDcardBack = resp.data.path;
vouchers['legalIDcardBack'] = resp.data.path; // vouchers['legalIDcardBack'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.legalIDcardBackProgress; // delete $scope.legalIDcardBackProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.legalIDcardBackProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
$scope.uploadBusinessLicence = function (file) { $scope.uploadBusinessLicence = function (file) {
if (file != null) { if (file != null) {
@ -3913,130 +3915,130 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
} }
}; };
$scope.uploadTaxLevel = function (file) { // $scope.uploadTaxLevel = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.taxLevelProgress = {value: 0}; // $scope.taxLevelProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.taxLevelProgress; // delete $scope.taxLevelProgress;
$scope.taxLevel = resp.data.path; // $scope.taxLevel = resp.data.path;
vouchers['taxLevel'] = resp.data.path; // vouchers['taxLevel'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.taxLevelProgress; // delete $scope.taxLevelProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.taxLevelProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
$scope.uploadBankAccountOpen = function (file) { // $scope.uploadBankAccountOpen = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.bankAccountOpenProgress = {value: 0}; // $scope.bankAccountOpenProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.bankAccountOpenProgress; // delete $scope.bankAccountOpenProgress;
$scope.bankAccountOpen = resp.data.path; // $scope.bankAccountOpen = resp.data.path;
vouchers['bankAccountOpen'] = resp.data.path; // vouchers['bankAccountOpen'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.bankAccountOpenProgress; // delete $scope.bankAccountOpenProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.bankAccountOpenProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
$scope.uploadOrgCode = function (file) { // $scope.uploadOrgCode = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.orgCodeProgress = {value: 0}; // $scope.orgCodeProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.orgCodeProgress; // delete $scope.orgCodeProgress;
$scope.orgCode = resp.data.path; // $scope.orgCode = resp.data.path;
vouchers['orgCode'] = resp.data.path; // vouchers['orgCode'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.orgCodeProgress; // delete $scope.orgCodeProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.orgCodeProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
//
$scope.uploadNonStanProtocol = function (file) { // $scope.uploadNonStanProtocol = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.nonStanProtocolProgress = {value: 0}; // $scope.nonStanProtocolProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.nonStanProtocolProgress; // delete $scope.nonStanProtocolProgress;
$scope.nonStanProtocol = resp.data.path; // $scope.nonStanProtocol = resp.data.path;
vouchers['nonStanProtocol'] = resp.data.path; // vouchers['nonStanProtocol'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.nonStanProtocolProgress; // delete $scope.nonStanProtocolProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.nonStanProtocolProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
//
$scope.uploadZipPath = function (file) { // $scope.uploadZipPath = function (file) {
if (file != null) { // if (file != null) {
if (file.size > 3 * 1024 * 1024) { // if (file.size > 3 * 1024 * 1024) {
commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'}) // commonDialog.alert({title: 'Error', content: '文件大小不能超过3MB请压缩后重试', type: 'error'})
} else { // } else {
$scope.zipPathProgress = {value: 0}; // $scope.zipPathProgress = {value: 0};
Upload.upload({ // Upload.upload({
url: '/attachment/yeepayFiles', // url: '/attachment/yeepayFiles',
data: {file: file} // data: {file: file}
}).then(function (resp) { // }).then(function (resp) {
delete $scope.zipPathProgress; // delete $scope.zipPathProgress;
$scope.zipPath = resp.data.path; // $scope.zipPath = resp.data.path;
vouchers['zipPath'] = resp.data.path; // vouchers['zipPath'] = resp.data.path;
merchantId = resp.data.merchantId; // merchantId = resp.data.merchantId;
commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'}) // commonDialog.alert({title: 'Upload Success', content: 'Upload Success', type: 'success'})
}, function (resp) { // }, function (resp) {
delete $scope.zipPathProgress; // delete $scope.zipPathProgress;
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'}) // commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
}, function (evt) { // }, function (evt) {
$scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total); // $scope.zipPathProgress.value = parseInt(100 * evt.loaded / evt.total);
}) // })
} // }
} // }
}; // };
$scope.uploadDirectorPassport = function (file) { $scope.uploadDirectorPassport = function (file) {
if (file != null) { 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; $scope.errmsg = null;
if (form.$invalid) { if (form.$invalid) {
angular.forEach(form, function (item, key) { 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['executives'] = $scope.executives;
merchantInfo['subMerchantId'] = angular.copy(subMerchantId);
merchantInfo['directors'] = $scope.directors; merchantInfo['directors'] = $scope.directors;
merchantInfo['business_content'] = $scope.business_content; merchantInfo['business_content'] = $scope.business_content;
merchantInfo['industry'] = $scope.industry; merchantInfo['industry'] = $scope.industry;
merchantInfo['merchantId'] = merchantId; 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.apply_sub_merchant_id = resp.data;
$scope.$close(); $scope.$close();
if (subMerchantInfo.yeepay_sub_merchant_id != null) { if (subMerchantInfo.yeepay_sub_merchant_id != null) {
commonDialog.alert({ commonDialog.alert({
title: 'Success', title: 'Success',
content: 'Modify Yeepay Sub Merchant ID successfully', content: 'Update Successfully,Please Wait For Review!',
type: 'success' type: 'success'
}); });
$state.reload(); $state.reload();

@ -39,6 +39,30 @@
</div> </div>
</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">--> <!--<div class="form-group">-->
<!--<label class="control-label col-sm-3" >* Corporate ID Card Front</label>--> <!--<label class="control-label col-sm-3" >* Corporate ID Card Front</label>-->
<!--<div class="col-sm-8">--> <!--<div class="col-sm-8">-->
@ -181,7 +205,7 @@
<div class="form-group" <div class="form-group"
ng-class="{'has-error':subForm.directorFirstName.$invalid && subForm.directorFirstName.$dirty}"> ng-class="{'has-error':subForm.directorFirstName.$invalid && subForm.directorFirstName.$dirty}">
<label class="control-label col-sm-3" for="directorFirstName_input">* Director Fist Name</label> <label class="control-label col-sm-3" for="directorFirstName_input">* Director First Name</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="directors.directorFirstName" <input class="form-control" ng-model="directors.directorFirstName"
type="text" name="directorFirstName" id="directorFirstName_input" required maxlength="50"> type="text" name="directorFirstName" id="directorFirstName_input" required maxlength="50">
@ -236,7 +260,7 @@
<div class="form-group" <div class="form-group"
ng-class="{'has-error':subForm.executiveFirstName.$invalid && subForm.executiveFirstName.$dirty}"> ng-class="{'has-error':subForm.executiveFirstName.$invalid && subForm.executiveFirstName.$dirty}">
<label class="control-label col-sm-3" for="executiveFirstName_input">* Executive Fist Name</label> <label class="control-label col-sm-3" for="executiveFirstName_input">* Executive First Name</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="executives.executiveFirstName" <input class="form-control" ng-model="executives.executiveFirstName"
type="text" name="executiveFirstName" id="executiveFirstName_input" required maxlength="50"> type="text" name="executiveFirstName" id="executiveFirstName_input" required maxlength="50">

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

@ -39,6 +39,30 @@
</div> </div>
</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">--> <!--<div class="form-group">-->
<!--<label class="control-label col-sm-3" >* Corporate ID Card Front</label>--> <!--<label class="control-label col-sm-3" >* Corporate ID Card Front</label>-->
<!--<div class="col-sm-8">--> <!--<div class="col-sm-8">-->
@ -181,7 +205,7 @@
<div class="form-group" <div class="form-group"
ng-class="{'has-error':subForm.directorFirstName.$invalid && subForm.directorFirstName.$dirty}"> ng-class="{'has-error':subForm.directorFirstName.$invalid && subForm.directorFirstName.$dirty}">
<label class="control-label col-sm-3" for="directorFirstName_input">* Director Fist Name</label> <label class="control-label col-sm-3" for="directorFirstName_input">* Director First Name</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="directors.directorFirstName" <input class="form-control" ng-model="directors.directorFirstName"
type="text" name="directorFirstName" id="directorFirstName_input" required maxlength="50"> type="text" name="directorFirstName" id="directorFirstName_input" required maxlength="50">
@ -236,7 +260,7 @@
<div class="form-group" <div class="form-group"
ng-class="{'has-error':subForm.executiveFirstName.$invalid && subForm.executiveFirstName.$dirty}"> ng-class="{'has-error':subForm.executiveFirstName.$invalid && subForm.executiveFirstName.$dirty}">
<label class="control-label col-sm-3" for="executiveFirstName_input">* Executive Fist Name</label> <label class="control-label col-sm-3" for="executiveFirstName_input">* Executive First Name</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input class="form-control" ng-model="executives.executiveFirstName" <input class="form-control" ng-model="executives.executiveFirstName"
type="text" name="executiveFirstName" id="executiveFirstName_input" required maxlength="50"> type="text" name="executiveFirstName" id="executiveFirstName_input" required maxlength="50">

Loading…
Cancel
Save