diff --git a/src/main/ui/static/payment/good/templates/good_edit.html b/src/main/ui/static/payment/good/templates/good_edit.html
index 7623a4ed0..d280e96e8 100644
--- a/src/main/ui/static/payment/good/templates/good_edit.html
+++ b/src/main/ui/static/payment/good/templates/good_edit.html
@@ -147,7 +147,7 @@
diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js
index dc1e11dfd..0084d5263 100644
--- a/src/main/ui/static/payment/partner/partner-manage.js
+++ b/src/main/ui/static/payment/partner/partner-manage.js
@@ -439,56 +439,68 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
$scope.uploadLogo = 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.logo_url = 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);
- })
+ if (file.size > 1 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过1MB,请压缩后重试', type: 'error'})
+ } else {
+ $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.logo_url = 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.uploadShopPhoto = function (file) {
if (file != null) {
- $scope.shopPhotoProgress = {value: 0};
- Upload.upload({
- url: '/attachment/files',
- data: {file: file}
- }).then(function (resp) {
- delete $scope.shopPhotoProgress;
- $scope.partner.company_photo = resp.data.url;
- }, function (resp) {
- delete $scope.shopPhotoProgress;
- commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
- }, function (evt) {
- $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
- })
+ if (file.size > 2 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'})
+ } else {
+ $scope.shopPhotoProgress = {value: 0};
+ Upload.upload({
+ url: '/attachment/files',
+ data: {file: file}
+ }).then(function (resp) {
+ delete $scope.shopPhotoProgress;
+ $scope.partner.company_photo = resp.data.url;
+ }, function (resp) {
+ delete $scope.shopPhotoProgress;
+ commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
+ }, function (evt) {
+ $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
+ })
+ }
}
};
$scope.uploadStorePhoto = function (file) {
if (file != null) {
- $scope.storePhotoProgress = {value: 0};
- Upload.upload({
- url: '/attachment/files',
- data: {file: file}
- }).then(function (resp) {
- delete $scope.storePhotoProgress;
- $scope.partner.store_photo = resp.data.url;
- }, function (resp) {
- delete $scope.storePhotoProgress;
- commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
- }, function (evt) {
- $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
- })
+ if (file.size > 2 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'})
+ } else {
+ $scope.storePhotoProgress = {value: 0};
+ Upload.upload({
+ url: '/attachment/files',
+ data: {file: file}
+ }).then(function (resp) {
+ delete $scope.storePhotoProgress;
+ $scope.partner.store_photo = resp.data.url;
+ }, function (resp) {
+ delete $scope.storePhotoProgress;
+ commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
+ }, function (evt) {
+ $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
+ })
+ }
}
};
@@ -677,24 +689,28 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
$scope.uploadAgreeFile = function (file) {
if (file != null) {
- Upload.upload({
- url: '/attachment/files',
- data: {file: file}
- }).then(function (resp) {
- $scope.agree_file_import = resp.data.url;
- $http.put('/sys/partners/' + $scope.partner.client_moniker + '/import/agreepdf', {source_agree_file: $scope.agree_file_import}).then(function () {
- commonDialog.alert({
- title: 'Success',
- content: 'Succeed Imported! Please notify BD',
- type: 'success'
- });
- $state.reload();
+ if (file.size > 2 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'})
+ } else {
+ Upload.upload({
+ url: '/attachment/files',
+ data: {file: file}
+ }).then(function (resp) {
+ $scope.agree_file_import = resp.data.url;
+ $http.put('/sys/partners/' + $scope.partner.client_moniker + '/import/agreepdf', {source_agree_file: $scope.agree_file_import}).then(function () {
+ commonDialog.alert({
+ title: 'Success',
+ content: 'Succeed Imported! Please notify BD',
+ type: 'success'
+ });
+ $state.reload();
+ }, function (resp) {
+ commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
+ })
}, function (resp) {
- commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
+ commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
})
- }, function (resp) {
- commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
- })
+ }
}
};
$scope.notifyBD = function () {
@@ -1093,56 +1109,68 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
$scope.uploadLogo = 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.logo_url = 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);
- })
+ if (file.size > 1 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过1MB,请压缩后重试', type: 'error'})
+ } else {
+ $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.logo_url = 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.uploadShopPhoto = function (file) {
if (file != null) {
- $scope.shopPhotoProgress = {value: 0};
- Upload.upload({
- url: '/attachment/files',
- data: {file: file}
- }).then(function (resp) {
- delete $scope.shopPhotoProgress;
- $scope.partner.company_photo = resp.data.url;
- }, function (resp) {
- delete $scope.shopPhotoProgress;
- commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
- }, function (evt) {
- $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
- })
+ if (file.size > 2 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'})
+ } else {
+ $scope.shopPhotoProgress = {value: 0};
+ Upload.upload({
+ url: '/attachment/files',
+ data: {file: file}
+ }).then(function (resp) {
+ delete $scope.shopPhotoProgress;
+ $scope.partner.company_photo = resp.data.url;
+ }, function (resp) {
+ delete $scope.shopPhotoProgress;
+ commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
+ }, function (evt) {
+ $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
+ })
+ }
}
};
$scope.uploadStorePhoto = function (file) {
if (file != null) {
- $scope.storePhotoProgress = {value: 0};
- Upload.upload({
- url: '/attachment/files',
- data: {file: file}
- }).then(function (resp) {
- delete $scope.storePhotoProgress;
- $scope.partner.store_photo = resp.data.url;
- }, function (resp) {
- delete $scope.storePhotoProgress;
- commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
- }, function (evt) {
- $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
- })
+ if (file.size > 2 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'})
+ } else {
+ $scope.storePhotoProgress = {value: 0};
+ Upload.upload({
+ url: '/attachment/files',
+ data: {file: file}
+ }).then(function (resp) {
+ delete $scope.storePhotoProgress;
+ $scope.partner.store_photo = resp.data.url;
+ }, function (resp) {
+ delete $scope.storePhotoProgress;
+ commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
+ }, function (evt) {
+ $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
+ })
+ }
}
};
@@ -2108,56 +2136,68 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
}
$scope.uploadLogo = 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.logo_url = 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);
- })
+ if (file.size > 1 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过1MB,请压缩后重试', type: 'error'})
+ } else {
+ $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.logo_url = 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.uploadShopPhoto = function (file) {
if (file != null) {
- $scope.shopPhotoProgress = {value: 0};
- Upload.upload({
- url: '/attachment/files',
- data: {file: file}
- }).then(function (resp) {
- delete $scope.shopPhotoProgress;
- $scope.partner.company_photo = resp.data.url;
- }, function (resp) {
- delete $scope.shopPhotoProgress;
- commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
- }, function (evt) {
- $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
- })
+ if (file.size > 2 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'})
+ } else {
+ $scope.shopPhotoProgress = {value: 0};
+ Upload.upload({
+ url: '/attachment/files',
+ data: {file: file}
+ }).then(function (resp) {
+ delete $scope.shopPhotoProgress;
+ $scope.partner.company_photo = resp.data.url;
+ }, function (resp) {
+ delete $scope.shopPhotoProgress;
+ commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
+ }, function (evt) {
+ $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
+ })
+ }
}
};
$scope.uploadStorePhoto = function (file) {
if (file != null) {
- $scope.storePhotoProgress = {value: 0};
- Upload.upload({
- url: '/attachment/files',
- data: {file: file}
- }).then(function (resp) {
- delete $scope.storePhotoProgress;
- $scope.partner.store_photo = resp.data.url;
- }, function (resp) {
- delete $scope.storePhotoProgress;
- commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
- }, function (evt) {
- $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
- })
+ if (file.size > 2 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'})
+ } else {
+ $scope.storePhotoProgress = {value: 0};
+ Upload.upload({
+ url: '/attachment/files',
+ data: {file: file}
+ }).then(function (resp) {
+ delete $scope.storePhotoProgress;
+ $scope.partner.store_photo = resp.data.url;
+ }, function (resp) {
+ delete $scope.storePhotoProgress;
+ commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
+ }, function (evt) {
+ $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
+ })
+ }
}
};
$scope.updateMerchantLocation = function () {
diff --git a/src/main/ui/static/payment/partner/partner.js b/src/main/ui/static/payment/partner/partner.js
index 989273068..9e5a7e7d8 100644
--- a/src/main/ui/static/payment/partner/partner.js
+++ b/src/main/ui/static/payment/partner/partner.js
@@ -72,56 +72,68 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct
$scope.uploadLogo = 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.logo_url = 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);
- })
+ if (file.size > 1 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过1MB,请压缩后重试', type: 'error'})
+ } else {
+ $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.logo_url = 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.uploadShopPhoto = function (file) {
if (file != null) {
- $scope.shopPhotoProgress = {value: 0};
- Upload.upload({
- url: '/attachment/files',
- data: {file: file}
- }).then(function (resp) {
- delete $scope.shopPhotoProgress;
- $scope.partner.company_photo = resp.data.url;
- }, function (resp) {
- delete $scope.shopPhotoProgress;
- commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
- }, function (evt) {
- $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
- })
+ if (file.size > 2 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'})
+ } else {
+ $scope.shopPhotoProgress = {value: 0};
+ Upload.upload({
+ url: '/attachment/files',
+ data: {file: file}
+ }).then(function (resp) {
+ delete $scope.shopPhotoProgress;
+ $scope.partner.company_photo = resp.data.url;
+ }, function (resp) {
+ delete $scope.shopPhotoProgress;
+ commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
+ }, function (evt) {
+ $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
+ })
+ }
}
};
$scope.uploadStorePhoto = function (file) {
if (file != null) {
- $scope.storePhotoProgress = {value: 0};
- Upload.upload({
- url: '/attachment/files',
- data: {file: file}
- }).then(function (resp) {
- delete $scope.storePhotoProgress;
- $scope.partner.store_photo = resp.data.url;
- }, function (resp) {
- delete $scope.storePhotoProgress;
- commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
- }, function (evt) {
- $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
- })
+ if (file.size > 2 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'})
+ } else {
+ $scope.storePhotoProgress = {value: 0};
+ Upload.upload({
+ url: '/attachment/files',
+ data: {file: file}
+ }).then(function (resp) {
+ delete $scope.storePhotoProgress;
+ $scope.partner.store_photo = resp.data.url;
+ }, function (resp) {
+ delete $scope.storePhotoProgress;
+ commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
+ }, function (evt) {
+ $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
+ })
+ }
}
};
@@ -223,56 +235,68 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct
$scope.uploadLogo = 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.logo_url = 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);
- })
+ if (file.size > 1 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过1MB,请压缩后重试', type: 'error'})
+ } else {
+ $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.logo_url = 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.uploadShopPhoto = function (file) {
if (file != null) {
- $scope.shopPhotoProgress = {value: 0};
- Upload.upload({
- url: '/attachment/files',
- data: {file: file}
- }).then(function (resp) {
- delete $scope.shopPhotoProgress;
- $scope.partner.company_photo = resp.data.url;
- }, function (resp) {
- delete $scope.shopPhotoProgress;
- commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
- }, function (evt) {
- $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
- })
+ if (file.size > 2 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'})
+ } else {
+ $scope.shopPhotoProgress = {value: 0};
+ Upload.upload({
+ url: '/attachment/files',
+ data: {file: file}
+ }).then(function (resp) {
+ delete $scope.shopPhotoProgress;
+ $scope.partner.company_photo = resp.data.url;
+ }, function (resp) {
+ delete $scope.shopPhotoProgress;
+ commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
+ }, function (evt) {
+ $scope.shopPhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
+ })
+ }
}
};
$scope.uploadStorePhoto = function (file) {
if (file != null) {
- $scope.storePhotoProgress = {value: 0};
- Upload.upload({
- url: '/attachment/files',
- data: {file: file}
- }).then(function (resp) {
- delete $scope.storePhotoProgress;
- $scope.partner.store_photo = resp.data.url;
- }, function (resp) {
- delete $scope.storePhotoProgress;
- commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
- }, function (evt) {
- $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
- })
+ if (file.size > 2 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'})
+ } else {
+ $scope.storePhotoProgress = {value: 0};
+ Upload.upload({
+ url: '/attachment/files',
+ data: {file: file}
+ }).then(function (resp) {
+ delete $scope.storePhotoProgress;
+ $scope.partner.store_photo = resp.data.url;
+ }, function (resp) {
+ delete $scope.storePhotoProgress;
+ commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
+ }, function (evt) {
+ $scope.storePhotoProgress.value = parseInt(100 * evt.loaded / evt.total);
+ })
+ }
}
};
diff --git a/src/main/ui/static/payment/partner/templates/add_partner.html b/src/main/ui/static/payment/partner/templates/add_partner.html
index 70595e710..5aa55efa2 100644
--- a/src/main/ui/static/payment/partner/templates/add_partner.html
+++ b/src/main/ui/static/payment/partner/templates/add_partner.html
@@ -127,7 +127,7 @@
@@ -230,8 +230,7 @@
1:
@@ -242,8 +241,7 @@
2:
diff --git a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html
index 07814fd95..52463ae66 100644
--- a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html
+++ b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html
@@ -98,7 +98,7 @@
@@ -188,8 +188,7 @@
1:
@@ -200,8 +199,7 @@
2:
diff --git a/src/main/ui/static/payment/partner/templates/client_partner_detail.html b/src/main/ui/static/payment/partner/templates/client_partner_detail.html
index 5725d8577..9c8ebcfa4 100644
--- a/src/main/ui/static/payment/partner/templates/client_partner_detail.html
+++ b/src/main/ui/static/payment/partner/templates/client_partner_detail.html
@@ -363,7 +363,7 @@
@@ -430,8 +430,7 @@
1:
@@ -443,8 +442,7 @@
2:
diff --git a/src/main/ui/static/payment/partner/templates/client_partner_edit.html b/src/main/ui/static/payment/partner/templates/client_partner_edit.html
index 9dd641196..2ab021514 100644
--- a/src/main/ui/static/payment/partner/templates/client_partner_edit.html
+++ b/src/main/ui/static/payment/partner/templates/client_partner_edit.html
@@ -58,7 +58,7 @@
@@ -105,7 +105,7 @@
1:
@@ -116,8 +116,7 @@
2:
diff --git a/src/main/ui/static/payment/partner/templates/partner_detail.html b/src/main/ui/static/payment/partner/templates/partner_detail.html
index 35cde22f8..0c1b85386 100644
--- a/src/main/ui/static/payment/partner/templates/partner_detail.html
+++ b/src/main/ui/static/payment/partner/templates/partner_detail.html
@@ -85,7 +85,7 @@
制作全支付合同
+ accept="pdf/*">
上传合同 (通用合同请选择制作合同,非通用合同模板请人工制作合同后上传)
diff --git a/src/main/ui/static/payment/partner/templates/partner_edit.html b/src/main/ui/static/payment/partner/templates/partner_edit.html
index c351e7a31..7380f340f 100644
--- a/src/main/ui/static/payment/partner/templates/partner_edit.html
+++ b/src/main/ui/static/payment/partner/templates/partner_edit.html
@@ -166,7 +166,7 @@
@@ -255,7 +255,7 @@
1:
@@ -266,8 +266,7 @@
2:
diff --git a/src/main/ui/static/payment/product/product_manager.js b/src/main/ui/static/payment/product/product_manager.js
index 41050759a..87bd1421e 100644
--- a/src/main/ui/static/payment/product/product_manager.js
+++ b/src/main/ui/static/payment/product/product_manager.js
@@ -30,26 +30,30 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
};
$scope.importExcel = function (file) {
if (file != null) {
- Upload.upload({
- url: '/attachment/files',
- data: {file: file}
- }).then(function (resp) {
- $scope.agree_file_import = resp.data.url;
- $http.put('/sys/product/importExcel', {source_agree_file: $scope.agree_file_import}).then(function () {
- commonDialog.alert({
- title: 'Success',
- content: 'Succeed Imported',
- type: 'success'
- });
- $state.reload();
+ if (file.size > 2 * 1024 * 1024) {
+ commonDialog.alert({title: 'Error', content: '文件大小不能超过2MB,请压缩后重试', type: 'error'})
+ } else {
+ Upload.upload({
+ url: '/attachment/files',
+ data: {file: file}
+ }).then(function (resp) {
+ $scope.agree_file_import = resp.data.url;
+ $http.put('/sys/product/importExcel', {source_agree_file: $scope.agree_file_import}).then(function () {
+ commonDialog.alert({
+ title: 'Success',
+ content: 'Succeed Imported',
+ type: 'success'
+ });
+ $state.reload();
+ }, function (resp) {
+ commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
+ })
}, function (resp) {
- commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
+ commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
})
- }, function (resp) {
- commonDialog.alert({title: 'Upload Failed', content: resp.data.message, type: 'error'})
- })
+ }
}
- }
+ };
$scope.deleteProduct = function (product) {
commonDialog.confirm({
title: 'Confirm',
diff --git a/src/main/ui/static/payment/product/templates/product.html b/src/main/ui/static/payment/product/templates/product.html
index 9e66b1834..08a1a31bf 100644
--- a/src/main/ui/static/payment/product/templates/product.html
+++ b/src/main/ui/static/payment/product/templates/product.html
@@ -31,7 +31,7 @@