Correct unnecessary spaces and add comma
This commit is contained in:
parent
cfa3c2091d
commit
112b842cc4
25
resources/assets/js/views/common/items.js
vendored
25
resources/assets/js/views/common/items.js
vendored
@ -7,20 +7,20 @@
|
|||||||
require('./../../bootstrap');
|
require('./../../bootstrap');
|
||||||
|
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
|
||||||
import DashboardPlugin from './../../plugins/dashboard-plugin';
|
import DashboardPlugin from './../../plugins/dashboard-plugin';
|
||||||
|
|
||||||
import Global from './../../mixins/global';
|
import Global from './../../mixins/global';
|
||||||
|
|
||||||
import Form from './../../plugins/form';
|
import Form from './../../plugins/form';
|
||||||
import BulkAction from './../../plugins/bulk-action';
|
import BulkAction from './../../plugins/bulk-action';
|
||||||
|
|
||||||
// plugin setup
|
// plugin setup
|
||||||
Vue.use(DashboardPlugin);
|
Vue.use(DashboardPlugin);
|
||||||
|
|
||||||
const app = new Vue({
|
const app = new Vue({
|
||||||
el: '#app',
|
el: '#app',
|
||||||
|
|
||||||
mixins: [
|
mixins: [
|
||||||
Global
|
Global
|
||||||
],
|
],
|
||||||
@ -35,10 +35,10 @@ const app = new Vue({
|
|||||||
',.',
|
',.',
|
||||||
',,'
|
',,'
|
||||||
],
|
],
|
||||||
splice_value: null
|
splice_value: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
'form.sale_price': function (newVal, oldVal) {
|
'form.sale_price': function (newVal, oldVal) {
|
||||||
if (newVal != '' && newVal.search('^(?=.*?[0-9])[0-9.,]+$') !== 0) {
|
if (newVal != '' && newVal.search('^(?=.*?[0-9])[0-9.,]+$') !== 0) {
|
||||||
@ -53,20 +53,19 @@ const app = new Vue({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
'form.purchase_price': function (newVal, oldVal) {
|
'form.purchase_price': function (newVal, oldVal) {
|
||||||
if (newVal != '' && newVal.search('^(?=.*?[0-9])[0-9.,]+$') !== 0) {
|
if (newVal != '' && newVal.search('^(?=.*?[0-9])[0-9.,]+$') !== 0) {
|
||||||
this.form.purchase_price = oldVal;
|
this.form.purchase_price = oldVal;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let item of this.regex_condition) {
|
for (let item of this.regex_condition) {
|
||||||
if (this.form.purchase_price.includes(item)) {
|
if (this.form.purchase_price.includes(item)) {
|
||||||
this.splice_value = this.form.purchase_price.replace(item, '');
|
this.splice_value = this.form.purchase_price.replace(item, '');
|
||||||
this.form.purchase_price = this.splice_value;
|
this.form.purchase_price = this.splice_value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user