diff --git a/jshERP-web/src/utils/validate.js b/jshERP-web/src/utils/validate.js index 1c400719..96ac3233 100644 --- a/jshERP-web/src/utils/validate.js +++ b/jshERP-web/src/utils/validate.js @@ -35,7 +35,7 @@ export function isURL (s) { * @param {*} s */ export function isDecimalTwo (s) { - let reg = /^(([^0][0-9]+|0)\.([0-9]{1,2})$)|^([^0][0-9]+|0)$/ + let reg = /^[0-9]+(\.[0-9]{1,2})?$/ return reg.test(s) } @@ -44,7 +44,7 @@ export function isDecimalTwo (s) { * @param {*} s */ export function isDecimalThree (s) { - let reg = /^(([^0][0-9]+|0)\.([0-9]{1,3})$)|^([^0][0-9]+|0)$/ + let reg = /^[0-9]+(\.[0-9]{1,3})?$/ return reg.test(s) } diff --git a/jshERP-web/src/views/system/modules/UnitModal.vue b/jshERP-web/src/views/system/modules/UnitModal.vue index 4c8c5d2a..5b28751a 100644 --- a/jshERP-web/src/views/system/modules/UnitModal.vue +++ b/jshERP-web/src/views/system/modules/UnitModal.vue @@ -13,7 +13,7 @@ @ok="handleOk" @cancel="handleCancel" cancelText="关闭" - style="top:100px; height:50%;"> + style="top:100px; height:55%;">