@@ -816,6 +816,10 @@ const app = new Vue({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    watch: {
 | 
					    watch: {
 | 
				
			||||||
        'form.discount': function (newVal, oldVal) {
 | 
					        'form.discount': function (newVal, oldVal) {
 | 
				
			||||||
 | 
					            if (typeof newVal !== 'string') {
 | 
				
			||||||
 | 
					                return;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (newVal != '' && newVal.search('^[-+]?([0-9]|[1-9][0-9]|100)*\.?[0-9]+$') !== 0) {
 | 
					            if (newVal != '' && newVal.search('^[-+]?([0-9]|[1-9][0-9]|100)*\.?[0-9]+$') !== 0) {
 | 
				
			||||||
                this.form.discount = oldVal;
 | 
					                this.form.discount = oldVal;
 | 
				
			||||||
                this.form.discount = this.form.discount ? this.form.discount.replace(',', '.') : '';
 | 
					                this.form.discount = this.form.discount ? this.form.discount.replace(',', '.') : '';
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user