wip
This commit is contained in:
parent
782cc0d571
commit
abe56e99b2
|
|
@ -36,7 +36,8 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
{{-- {{ $brands->links('admin::vendor/pagination/bootstrap-4') }} --}}
|
||||
<el-pagination layout="prev, pager, next" background :page-size="brands.per_page" :current-page.sync="page"
|
||||
:total="brands.total"></el-pagination>
|
||||
</div>
|
||||
|
||||
<el-dialog title="品牌" :visible.sync="dialog.show" width="600px"
|
||||
|
|
@ -82,7 +83,7 @@
|
|||
|
||||
data: {
|
||||
brands: @json($brands ?? []),
|
||||
|
||||
page: 1,
|
||||
source: {
|
||||
// languages: ['zh-ck','en-gb']
|
||||
languages: @json($languages ?? []),
|
||||
|
|
@ -146,10 +147,11 @@
|
|||
|
||||
$http[type](url, this.dialog.form).then((res) => {
|
||||
this.$message.success(res.message);
|
||||
if (type == 'add') {
|
||||
this.brands.push(res.data)
|
||||
|
||||
if (this.dialog.type == 'add') {
|
||||
this.brands.data.push(res.data)
|
||||
} else {
|
||||
this.brands[this.dialog.index] = res.data
|
||||
this.brands.data[this.dialog.index] = res.data
|
||||
}
|
||||
this.dialog.show = false
|
||||
})
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@
|
|||
|
||||
$http[type](url, this.dialog.form).then((res) => {
|
||||
this.$message.success(res.message);
|
||||
if (type == 'add') {
|
||||
if (this.dialog.type == 'add') {
|
||||
this.customer_groups.push(res.data)
|
||||
} else {
|
||||
this.customer_groups[this.dialog.index] = res.data
|
||||
|
|
|
|||
|
|
@ -130,7 +130,11 @@
|
|||
|
||||
$http.post('customers', this.dialogCustomers.form).then((res) => {
|
||||
this.$message.success(res.message);
|
||||
this.customers.push(res.data);
|
||||
if (this.dialog.type == 'add') {
|
||||
this.customers.push(res.data)
|
||||
} else {
|
||||
this.customers[this.dialog.index] = res.data
|
||||
}
|
||||
this.dialogCustomers.show = false
|
||||
})
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
<base href="{{ $admin_base_url }}">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta name="asset" content="{{ asset('/') }}">
|
||||
<script src="{{ asset('vendor/vue/2.6.12/vue.js') }}"></script>
|
||||
<script src="{{ asset('vendor/element-ui/2.15.9/index.js') }}"></script>
|
||||
{{-- <script src="{{ asset('vendor/element-ui/2.15.6/js.js') }}"></script> --}}
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@
|
|||
|
||||
$http[type](url, this.dialog.form).then((res) => {
|
||||
this.$message.success(res.message);
|
||||
if (type == 'add') {
|
||||
if (this.dialog.type == 'add') {
|
||||
this.tax_classes.push(res.data)
|
||||
} else {
|
||||
this.tax_classes[this.dialog.index] = res.data
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@
|
|||
|
||||
$http[type](url, this.dialog.form).then((res) => {
|
||||
this.$message.success(res.message);
|
||||
if (type == 'add') {
|
||||
if (this.dialog.type == 'add') {
|
||||
this.tax_rates.push(res.data)
|
||||
} else {
|
||||
this.tax_rates[this.dialog.index] = res.data
|
||||
|
|
|
|||
Loading…
Reference in New Issue