|
|
@ -970,44 +970,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadMerchant_photo1 = function (file) {
|
|
|
|
|
|
|
|
if (file != null) {
|
|
|
|
|
|
|
|
$scope.logoProgress = {value: 0};
|
|
|
|
|
|
|
|
Upload.upload({
|
|
|
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
|
|
|
data: {file: file}
|
|
|
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
|
|
|
delete $scope.logoProgress;
|
|
|
|
|
|
|
|
$scope.partner.logo_id = resp.data.fileid;
|
|
|
|
|
|
|
|
$scope.partner.merchant_photo1 = resp.data.url;
|
|
|
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
|
|
|
delete $scope.logoProgress;
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
|
|
|
$scope.logoProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.uploadMerchant_photo2 = function (file) {
|
|
|
|
|
|
|
|
if (file != null) {
|
|
|
|
|
|
|
|
$scope.logoProgress = {value: 0};
|
|
|
|
|
|
|
|
Upload.upload({
|
|
|
|
|
|
|
|
url: '/attachment/files',
|
|
|
|
|
|
|
|
data: {file: file}
|
|
|
|
|
|
|
|
}).then(function (resp) {
|
|
|
|
|
|
|
|
delete $scope.logoProgress;
|
|
|
|
|
|
|
|
$scope.partner.logo_id = resp.data.fileid;
|
|
|
|
|
|
|
|
$scope.partner.merchant_photo2 = resp.data.url;
|
|
|
|
|
|
|
|
}, function (resp) {
|
|
|
|
|
|
|
|
delete $scope.logoProgress;
|
|
|
|
|
|
|
|
commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
|
|
|
|
|
|
|
|
}, function (evt) {
|
|
|
|
|
|
|
|
$scope.logoProgress.value = parseInt(100 * evt.loaded / evt.total);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$scope.getMerchantLocation = function () {
|
|
|
|
$scope.getMerchantLocation = function () {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/location').then(function (resp) {
|
|
|
|
$http.get('/sys/partners/' + $scope.partner.client_moniker + '/location').then(function (resp) {
|
|
|
|
$scope.merchant_location = resp.data;
|
|
|
|
$scope.merchant_location = resp.data;
|
|
|
|