|
|
@ -3199,7 +3199,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.saveRpayAppliy = function (form) {
|
|
|
|
$scope.saveRpayAppliy = function (form) {
|
|
|
|
$scope.merchantInfo = angular.copy(form);
|
|
|
|
var merchantInfo = {};
|
|
|
|
$scope.errmsg = null;
|
|
|
|
$scope.errmsg = null;
|
|
|
|
if (form.$invalid) {
|
|
|
|
if (form.$invalid) {
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
@ -3212,28 +3212,30 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
|
|
|
|
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
if(item !=null) {
|
|
|
|
if(item !=null) {
|
|
|
|
console.log("++++" + key + item.$name)
|
|
|
|
if(item.$name !=null) {
|
|
|
|
|
|
|
|
var name = item.$name;
|
|
|
|
|
|
|
|
merchantInfo.name = item.$modelValue;
|
|
|
|
|
|
|
|
console.log("++++" + item.$name + "++++" + item.$modelValue);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
// var str = angular.toJson(form, true);
|
|
|
|
|
|
|
|
// console.log("----------" + str);
|
|
|
|
|
|
|
|
|
|
|
|
// var str = angular.toJson(form, true);
|
|
|
|
$http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', merchantInfo).then(function (resp) {
|
|
|
|
// console.log("----------" + str);
|
|
|
|
$scope.apply_sub_merchant_id = resp.data;
|
|
|
|
|
|
|
|
$scope.$close();
|
|
|
|
// $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', $scope.merchantInfo).then(function (resp) {
|
|
|
|
if (subMerchantInfo.sub_merchant_id != null) {
|
|
|
|
// $scope.apply_sub_merchant_id = resp.data;
|
|
|
|
commonDialog.alert({
|
|
|
|
// $scope.$close();
|
|
|
|
title: 'Success',
|
|
|
|
// if (subMerchantInfo.sub_merchant_id != null) {
|
|
|
|
content: 'Modify Rpay+ Sub Merchant ID successfully',
|
|
|
|
// commonDialog.alert({
|
|
|
|
type: 'success'
|
|
|
|
// title: 'Success',
|
|
|
|
});
|
|
|
|
// content: 'Modify Rpay+ Sub Merchant ID successfully',
|
|
|
|
$state.reload();
|
|
|
|
// type: 'success'
|
|
|
|
}
|
|
|
|
// });
|
|
|
|
}, function (resp) {
|
|
|
|
// $state.reload();
|
|
|
|
$scope.errmsg = resp.data.message;
|
|
|
|
// }
|
|
|
|
})
|
|
|
|
// }, function (resp) {
|
|
|
|
|
|
|
|
// $scope.errmsg = resp.data.message;
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}]);
|
|
|
|
}]);
|
|
|
|
|
|
|
|
|
|
|
|