gjy 3 роки тому
батько
коміт
eb991da4b3
1 змінених файлів з 10 додано та 1 видалено
  1. 10 1
      src/views/warehouse/warehouselocation.vue

+ 10 - 1
src/views/warehouse/warehouselocation.vue

@@ -343,7 +343,10 @@ export default {
             })
             return
         }
-        if(this.amount<0||this.amount>100000000){
+        if(this.amount<0||this.amount>100000000||(String(this.amount).indexOf('.') != -1 &&
+						String(this.amount).length -
+						(String(this.amount).indexOf('.') +1) >
+						2)){
             this.$message({
               message: '金额输入错误!',
               type: 'warning'
@@ -357,6 +360,9 @@ export default {
                 message: '添加成功',
               })
            this.addvisible=false
+           this.expenseName=''
+           this.amount=''
+           this.applUrl=''
            this.getList()
         })
     },
@@ -396,6 +402,9 @@ export default {
                 message: '编辑成功',
               })
            this.addvisible=false
+           this.expenseName=''
+           this.amount=''
+           this.applUrl=''
            this.getList()
         })
     },