Commit 14f7e296 authored by sherlock's avatar sherlock

Merge branch 'dev_oracle_sherlock' into 'dev_oracle'

manual formula not number valid

See merge request root/atms!213
parents 47b2d550 800db84b
......@@ -239,11 +239,42 @@
closeOnCancel: true
},
function (isConfirm) {
if (isConfirm) {
doConfirmEventHandler();
if(isConfirm){
var message;
var r = /^00\d*|^\.\d+|\.$/;
if ($scope.detail.inputValue && (isNaN($scope.detail.inputValue) || r.test($scope.detail.inputValue))) {
message = $translate.instant('CheckInputValueFormat');
} else if ($scope.detail.inputValue && parseFloat($scope.detail.inputValue).toFixed(2) > 9999999999999) {
message = $translate.instant('CheckInputValueLength');
} else if ($scope.detail.dataType === 5) {
r = /^(-[1-9]\d*|[1-9]\d*|[0]{1,1})$/;
if (!r.test($scope.detail.inputValue)) {
message = $translate.instant('CheckIntInputValue');
}
}
if ($scope.detail.inputMemo && $scope.detail.inputMemo.length > 500) {
message = $translate.instant('CheckInputMemoLength');
}
if (message) {
setTimeout(function () {
swal({
title: "warning!",
text: message,
type: "warning",
showCancelButton: false,
confirmButtonColor: "#DD6B55",
confirmButtonText: '确认',
closeOnConfirm: true
}, function (isConfirm) {
if (isConfirm) {
return;
}
})},500);
} else {
doConfirmEventHandler();
}
}
else {
swal.close();
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment