|
|
@ -371,6 +371,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.initMerchantCode = function () {
|
|
|
|
$scope.initMerchantCode = function () {
|
|
|
|
$http.get('/sys/partners/init/merchant_code').then(function (response) {
|
|
|
|
$http.get('/sys/partners/init/merchant_code').then(function (response) {
|
|
|
|
$scope.partner.client_moniker = response.data;
|
|
|
|
$scope.partner.client_moniker = response.data;
|
|
|
|
|
|
|
|
$scope.merchantCodeChecked = true;
|
|
|
|
|
|
|
|
$scope.merchantIsValid = true;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
$scope.initMerchantCode();
|
|
|
|
$scope.initMerchantCode();
|
|
|
@ -437,6 +439,8 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
$scope.clean_days = angular.copy(clean_days_map);
|
|
|
|
$scope.clean_days = angular.copy(clean_days_map);
|
|
|
|
$scope.bd_citys = angular.copy(bd_city_map);
|
|
|
|
$scope.bd_citys = angular.copy(bd_city_map);
|
|
|
|
$scope.params = {textType: 'all', org_name: 'ALL'};
|
|
|
|
$scope.params = {textType: 'all', org_name: 'ALL'};
|
|
|
|
|
|
|
|
$scope.merchantIsValid = false;
|
|
|
|
|
|
|
|
$scope.merchantCodeChecked = false;
|
|
|
|
|
|
|
|
|
|
|
|
function remove(arr, val) {
|
|
|
|
function remove(arr, val) {
|
|
|
|
if (angular.isArray(arr)) {
|
|
|
|
if (angular.isArray(arr)) {
|
|
|
@ -526,6 +530,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
// $scope.t2city_map = angular.copy(t2city_map);
|
|
|
|
// $scope.t2city_map = angular.copy(t2city_map);
|
|
|
|
|
|
|
|
|
|
|
|
$scope.timezones = timezone.configs();
|
|
|
|
$scope.timezones = timezone.configs();
|
|
|
|
|
|
|
|
$scope.checkMerchantCodeIsValid = function (code) {
|
|
|
|
|
|
|
|
if (code.length != 4) {
|
|
|
|
|
|
|
|
$scope.merchantCodeChecked = false;
|
|
|
|
|
|
|
|
$scope.merchantIsValid = false;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
$http.get('/sys/partners/init/check_code_isvalid',{params:{clientMoniker:code}}).then(function (response) {
|
|
|
|
|
|
|
|
$scope.merchantIsValid = response.data;
|
|
|
|
|
|
|
|
$scope.merchantCodeChecked = true;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
$scope.save = function (form) {
|
|
|
|
$scope.save = function (form) {
|
|
|
|
if (form.$invalid) {
|
|
|
|
if (form.$invalid) {
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|
angular.forEach(form, function (item, key) {
|
|
|
|