@@ -69,8 +69,8 @@
-
-
+
+
@@ -93,8 +93,8 @@
source: {
all_tax_rates: @json($all_tax_rates ?? []),
- bases: @json($bases ?? []),
- types: [{value:'P', name: '百分比'}, {value:'F', name: '固定税率'}]
+ regions: @json($regions ?? []),
+ types: [{value:'percent', name: '百分比'}, {value:'flat', name: '固定税率'}]
},
dialog: {
@@ -105,7 +105,7 @@
id: null,
name: '',
rate: '',
- type: 'P',
+ type: 'percent',
geo_zone_id: '',
},
},
@@ -116,18 +116,12 @@
}
},
- beforeMount() {
- // this.source.languages.forEach(e => {
- // this.$set(this.dialog.form.name, e.code, '')
- // this.$set(this.dialog.form.description, e.code, '')
- // })
- },
-
methods: {
checkedCreate(type, index) {
this.dialog.show = true
this.dialog.type = type
this.dialog.index = index
+ this.dialog.form.geo_zone_id = this.source.regions[0].id
if (type == 'edit') {
let tax = this.tax_rates[index];
@@ -142,13 +136,6 @@
}
},
- addRates() {
- const tax_rate_id = this.source.all_tax_rates[0]?.id || 0;
- const based = this.source.bases[0] || '';
-
- this.dialog.form.tax_rules.push({tax_rate_id, based, priority: ''})
- },
-
deleteRates(index) {
this.dialog.form.tax_rules.splice(index, 1)
},
@@ -193,7 +180,7 @@
closeCustomersDialog(form) {
Object.keys(this.dialog.form).forEach(key => this.dialog.form[key] = '')
- this.dialog.form.type = 'P';
+ this.dialog.form.type = 'percent';
this.dialog.show = false
}
}