|
|
|
@ -3193,13 +3193,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
app.controller('applyRpaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', 'businessStructuresMap','$filter', 'commonDialog','timezone', function ($scope, $http, $uibModal, $state, subMerchantInfo, businessStructuresMap,$filter, commonDialog,timezone) {
|
|
|
|
|
$scope.wxIndustries = angular.copy(wxMerchantIndustries);
|
|
|
|
|
$scope.subMerchantInfo = angular.copy(subMerchantInfo);
|
|
|
|
|
$scope.subMerchantInfo.industry = $filter('wxindustries')($scope.subMerchantInfo.industry);
|
|
|
|
|
$scope.business_structures = businessStructuresMap.configs();
|
|
|
|
|
$scope.timezone = timezone.configs();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.saveRpayAppliy = function (form) {
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
|
$scope.merchantInfo = angular.copy(form);
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
|
if (form.$invalid) {
|
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
|
if (key.indexOf('$') < 0) {
|
|
|
|
@ -3208,20 +3209,31 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', $scope.subMerchantInfo).then(function (resp) {
|
|
|
|
|
$scope.apply_sub_merchant_id = resp.data;
|
|
|
|
|
$scope.$close();
|
|
|
|
|
if (subMerchantInfo.sub_merchant_id != null) {
|
|
|
|
|
commonDialog.alert({
|
|
|
|
|
title: 'Success',
|
|
|
|
|
content: 'Modify Rpay+ Sub Merchant ID successfully',
|
|
|
|
|
type: 'success'
|
|
|
|
|
});
|
|
|
|
|
$state.reload();
|
|
|
|
|
}
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
$scope.errmsg = resp.data.message;
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
|
if(item !=null) {
|
|
|
|
|
console.log("++++" + key + item.$name)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// var str = angular.toJson(form, true);
|
|
|
|
|
// console.log("----------" + str);
|
|
|
|
|
|
|
|
|
|
// $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', $scope.merchantInfo).then(function (resp) {
|
|
|
|
|
// $scope.apply_sub_merchant_id = resp.data;
|
|
|
|
|
// $scope.$close();
|
|
|
|
|
// if (subMerchantInfo.sub_merchant_id != null) {
|
|
|
|
|
// commonDialog.alert({
|
|
|
|
|
// title: 'Success',
|
|
|
|
|
// content: 'Modify Rpay+ Sub Merchant ID successfully',
|
|
|
|
|
// type: 'success'
|
|
|
|
|
// });
|
|
|
|
|
// $state.reload();
|
|
|
|
|
// }
|
|
|
|
|
// }, function (resp) {
|
|
|
|
|
// $scope.errmsg = resp.data.message;
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|