完善页面内容无数据ui
This commit is contained in:
parent
81b38ade1d
commit
ffa2c7d370
|
|
@ -20,4 +20,5 @@ mix-manifest.json
|
|||
package-lock.json
|
||||
beike/node_modules
|
||||
/public/build/beike/*
|
||||
/public/install/css/*
|
||||
/public/install/css/*
|
||||
dist
|
||||
|
|
@ -45,7 +45,8 @@ export default {
|
|||
if (r != null) {
|
||||
return decodeURIComponent(r[2]);
|
||||
}
|
||||
return defaultValue || '';
|
||||
|
||||
return typeof(defaultValue) != 'undefined' ? defaultValue : '';
|
||||
},
|
||||
|
||||
stringLengthInte(text, length = 50) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@
|
|||
<div id="tax-classes-app" class="card">
|
||||
<div class="card-body h-min-600">
|
||||
<div class="d-flex justify-content-between mb-4">
|
||||
<a href="{{ admin_route('admin_roles.create') }}" class="btn btn-primary">{{ __('admin/role.admin_roles_create') }}</a>
|
||||
<a href="{{ admin_route('admin_roles.create') }}"
|
||||
class="btn btn-primary">{{ __('admin/role.admin_roles_create') }}</a>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
|
|
@ -28,18 +29,26 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($roles as $role)
|
||||
<tr>
|
||||
<td>{{ $role->id }}</td>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>{{ $role->created_at }}</td>
|
||||
<td>{{ $role->updated_at }}</td>
|
||||
<td class="text-end">
|
||||
<a href="{{ admin_route('admin_roles.edit', [$role->id]) }}" class="btn btn-outline-secondary btn-sm">{{ __('common.edit') }}</a>
|
||||
<button class="btn btn-outline-danger btn-sm ml-1 delete-role" data-id="{{ $role->id }}" type="button">{{ __('common.delete') }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@if (count($roles))
|
||||
@foreach ($roles as $role)
|
||||
<tr>
|
||||
<td>{{ $role->id }}</td>
|
||||
<td>{{ $role->name }}</td>
|
||||
<td>{{ $role->created_at }}</td>
|
||||
<td>{{ $role->updated_at }}</td>
|
||||
<td class="text-end">
|
||||
<a href="{{ admin_route('admin_roles.edit', [$role->id]) }}"
|
||||
class="btn btn-outline-secondary btn-sm">{{ __('common.edit') }}</a>
|
||||
<button class="btn btn-outline-danger btn-sm ml-1 delete-role" data-id="{{ $role->id }}"
|
||||
type="button">{{ __('common.delete') }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="5" class="border-0"><x-admin-no-data /></td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -57,7 +66,7 @@
|
|||
btn: ['{{ __('common.cancel') }}', '{{ __('common.confirm') }}'],
|
||||
area: ['400px'],
|
||||
btn2: () => {
|
||||
$http.delete(`admin_roles/${id}`).then((res) => {
|
||||
$http.delete(`admin_roles/${id}`).then((res) => {
|
||||
layer.msg(res.message);
|
||||
self.parents('tr').remove()
|
||||
})
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<th>{{ __('common.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody v-if="brands.data.length">
|
||||
<tr v-for="brand, index in brands.data" :key="index">
|
||||
<td>@{{ brand.id }}</td>
|
||||
<td>@{{ brand.name }}</td>
|
||||
|
|
@ -37,9 +37,10 @@
|
|||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody v-else><tr><td colspan="7" class="border-0"><x-admin-no-data /></td></tr></tbody>
|
||||
</table>
|
||||
|
||||
<el-pagination layout="prev, pager, next" background :page-size="brands.per_page" :current-page.sync="page"
|
||||
<el-pagination v-if="brands.data.length" layout="prev, pager, next" background :page-size="brands.per_page" :current-page.sync="page"
|
||||
:total="brands.total"></el-pagination>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div id="category-app" class="card">
|
||||
<div class="card-body">
|
||||
<a href="{{ admin_route('categories.create') }}" class="btn btn-primary">{{ __('admin/category.categories_create') }}</a>
|
||||
<div class="mt-4" style="">
|
||||
<div class="mt-4" style="" v-if="categories.length">
|
||||
<el-tree :data="categories" node-key="id" ref="tree">
|
||||
<div class="custom-tree-node d-flex align-items-center justify-content-between w-100" slot-scope="{ node, data }">
|
||||
<div><span>@{{ data.name }}</span></div>
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
</div>
|
||||
</el-tree>
|
||||
</div>
|
||||
<div><x-admin-no-data /></div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<th class="text-end">{{ __('common.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody v-if="country.data.length">
|
||||
<tr v-for="country, index in country.data" :key="index">
|
||||
<td>@{{ country.id }}</td>
|
||||
<td>@{{ country.name }}</td>
|
||||
|
|
@ -39,9 +39,10 @@
|
|||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody v-else><tr><td colspan="8" class="border-0"><x-admin-no-data /></td></tr></tbody>
|
||||
</table>
|
||||
|
||||
<el-pagination layout="prev, pager, next" background :page-size="country.per_page" :current-page.sync="page"
|
||||
<el-pagination v-if="country.data.length" layout="prev, pager, next" background :page-size="country.per_page" :current-page.sync="page"
|
||||
:total="country.total"></el-pagination>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
<th class="text-end">{{ __('common.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody v-if="currencies.length">
|
||||
<tr v-for="language, index in currencies" :key="index">
|
||||
<td>@{{ language.id }}</td>
|
||||
<td>@{{ language.name }}</td>
|
||||
|
|
@ -41,6 +41,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody v-else><tr><td colspan="9" class="border-0"><x-admin-no-data /></td></tr></tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
<th>{{ __('common.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody v-if="customers.data.length">
|
||||
<tr v-for="customer, index in customers.data" :key="index">
|
||||
<td>@{{ customer.id }}</td>
|
||||
<td>@{{ customer.email }}</td>
|
||||
|
|
@ -79,9 +79,10 @@
|
|||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody v-else><tr><td colspan="9" class="border-0"><x-admin-no-data /></td></tr></tbody>
|
||||
</table>
|
||||
|
||||
<el-pagination layout="prev, pager, next" background :page-size="customers.per_page" :current-page.sync="page"
|
||||
<el-pagination v-if="customers.data.length" layout="prev, pager, next" background :page-size="customers.per_page" :current-page.sync="page"
|
||||
:total="customers.total"></el-pagination>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -66,21 +66,29 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($orders as $order)
|
||||
@if (count($orders))
|
||||
@foreach ($orders as $order)
|
||||
<tr>
|
||||
<td>{{ $order->id }}</td>
|
||||
<td>{{ $order->number }}</td>
|
||||
<td>{{ sub_string($order->customer_name, 14) }}</td>
|
||||
<td>{{ $order->payment_method_name }}</td>
|
||||
<td>{{ $order->status_format }}</td>
|
||||
<td>{{ currency_format($order->total, $order->currency_code, $order->currency_value) }}</td>
|
||||
<td>{{ $order->created_at }}</td>
|
||||
<td>{{ $order->updated_at }}</td>
|
||||
<td><a href="{{ admin_route('orders.show', [$order->id]) }}"
|
||||
class="btn btn-outline-secondary btn-sm">{{ __('common.view') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td>{{ $order->id }}</td>
|
||||
<td>{{ $order->number }}</td>
|
||||
<td>{{ sub_string($order->customer_name, 14) }}</td>
|
||||
<td>{{ $order->payment_method_name }}</td>
|
||||
<td>{{ $order->status_format }}</td>
|
||||
<td>{{ currency_format($order->total, $order->currency_code, $order->currency_value) }}</td>
|
||||
<td>{{ $order->created_at }}</td>
|
||||
<td>{{ $order->updated_at }}</td>
|
||||
<td><a href="{{ admin_route('orders.show', [$order->id]) }}"
|
||||
class="btn btn-outline-secondary btn-sm">{{ __('common.view') }}</a>
|
||||
<td colspan="9" class="border-0">
|
||||
<x-admin-no-data />
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $orders->withQueryString()->links('admin::vendor/pagination/bootstrap-4') }}
|
||||
|
|
|
|||
|
|
@ -25,25 +25,30 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($pages_format as $page)
|
||||
<tr>
|
||||
<td>{{ $page['id'] }}</td>
|
||||
<td>
|
||||
<div title="{{ $page['title'] ?? '' }}">{{ $page['title_format'] ?? '' }}</div>
|
||||
</td>
|
||||
<td class="{{ $page['active'] ? 'text-success' : 'text-secondary'}}">
|
||||
{{ $page['active'] ? __('common.enable') : __('common.disable') }}
|
||||
</td>
|
||||
<td>{{ $page['created_at'] }}</td>
|
||||
<td>{{ $page['updated_at'] }}</td>
|
||||
<td class="text-end">
|
||||
<a href="{{ admin_route('pages.edit', [$page['id']]) }}" class="btn btn-outline-secondary btn-sm">{{ __('common.edit') }}</a>
|
||||
@if (count($pages_format))
|
||||
@foreach ($pages_format as $page)
|
||||
<tr>
|
||||
<td>{{ $page['id'] }}</td>
|
||||
<td>
|
||||
<div title="{{ $page['title'] ?? '' }}">{{ $page['title_format'] ?? '' }}</div>
|
||||
</td>
|
||||
<td class="{{ $page['active'] ? 'text-success' : 'text-secondary' }}">
|
||||
{{ $page['active'] ? __('common.enable') : __('common.disable') }}
|
||||
</td>
|
||||
<td>{{ $page['created_at'] }}</td>
|
||||
<td>{{ $page['updated_at'] }}</td>
|
||||
<td class="text-end">
|
||||
<a href="{{ admin_route('pages.edit', [$page['id']]) }}"
|
||||
class="btn btn-outline-secondary btn-sm">{{ __('common.edit') }}</a>
|
||||
|
||||
<button class="btn btn-outline-danger btn-sm delete-btn" type='button'
|
||||
data-id="{{ $page['id'] }}">{{ __('common.delete') }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<button class="btn btn-outline-danger btn-sm delete-btn" type='button'
|
||||
data-id="{{ $page['id'] }}">{{ __('common.delete') }}</button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr><td colspan="5" class="border-0"><x-admin-no-data /></td></tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,7 @@
|
|||
|
||||
@section('title', __('admin/common.product'))
|
||||
|
||||
@push('header')
|
||||
<script src="https://cdn.bootcdn.net/ajax/libs/underscore.js/1.13.3/underscore.min.js"></script>
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
||||
@if ($errors->has('error'))
|
||||
<x-admin-alert type="danger" msg="{{ $errors->first('error') }}" class="mt-4" />
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<th class="text-end">{{ __('common.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody v-if="regions.length">
|
||||
<tr v-for="tax, index in regions" :key="index">
|
||||
<td>@{{ tax.id }}</td>
|
||||
<td>@{{ tax.name }}</td>
|
||||
|
|
@ -32,9 +32,8 @@
|
|||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody v-else><tr><td colspan="6" class="border-0"><x-admin-no-data /></td></tr></tbody>
|
||||
</table>
|
||||
|
||||
{{-- {{ $regions->links('admin::vendor/pagination/bootstrap-4') }} --}}
|
||||
</div>
|
||||
|
||||
<el-dialog title="{{ __('admin/region.regions_create') }}" :visible.sync="dialog.show" width="700px"
|
||||
|
|
|
|||
|
|
@ -1,41 +1,3 @@
|
|||
{{-- @extends('admin::layouts.master')
|
||||
|
||||
@section('title', '退换货原因')
|
||||
|
||||
@section('content')
|
||||
<div id="customer-app" class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-between mb-4">
|
||||
<button type="button" class="btn btn-primary" @click="checkedCreate('add', null)">创建</button>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>名称</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($rmaReasons as $rmaReason)
|
||||
<tr>
|
||||
<td>{{ $rmaReason->id }}</td>
|
||||
<td>{{ $rmaReason->name }}</td>
|
||||
<td><a href="{{ admin_route('rma_reasons.show', [$rmaReason->id]) }}"
|
||||
class="btn btn-outline-secondary btn-sm">查看</a></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('footer')
|
||||
<script></script>
|
||||
@endpush --}}
|
||||
|
||||
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title', __('admin/common.rma_reasons_index'))
|
||||
|
|
@ -54,7 +16,7 @@
|
|||
<th class="text-end">{{ __('common.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody v-if="rmaReasons.length">
|
||||
<tr v-for="language, index in rmaReasons" :key="index">
|
||||
<td>@{{ language.id }}</td>
|
||||
<td>@{{ language.name }}</td>
|
||||
|
|
@ -64,6 +26,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody v-else><tr><td colspan="3" class="border-0"><x-admin-no-data /></td></tr></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
@ -71,10 +34,6 @@
|
|||
@close="closeCustomersDialog('form')" :close-on-click-modal="false">
|
||||
|
||||
<el-form ref="form" :rules="rules" :model="dialog.form" label-width="100px">
|
||||
{{-- <el-form-item label="{{ __('common.name') }}" prop="name">
|
||||
<el-input v-model="dialog.form.name" placeholder="{{ __('common.name') }}"></el-input>
|
||||
</el-form-item> --}}
|
||||
|
||||
<el-form-item label="{{ __('common.name') }}" required class="language-inputs">
|
||||
<el-form-item :prop="'name.' + lang.code" :inline-message="true" v-for="lang, lang_i in source.languages" :key="lang_i"
|
||||
:rules="[
|
||||
|
|
|
|||
|
|
@ -21,30 +21,35 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($rmas_format as $rma)
|
||||
@if (count($rmas_format))
|
||||
@foreach ($rmas_format as $rma)
|
||||
<tr>
|
||||
<td>{{ $rma['name'] }}</td>
|
||||
<td>{{ $rma['email'] }}</td>
|
||||
<td>{{ $rma['telephone'] }}</td>
|
||||
<td>{{ $rma['product_name'] }}</td>
|
||||
<td>{{ $rma['model'] }}</td>
|
||||
<td>{{ $rma['quantity'] }}</td>
|
||||
<td>{{ $rma['type'] }}</td>
|
||||
<td>{{ $rma['status'] }}</td>
|
||||
<td><a href="{{ admin_route('rmas.show', [$rma['id']]) }}"
|
||||
class="btn btn-outline-secondary btn-sm">{{ __('common.view') }}</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td>{{ $rma['name'] }}</td>
|
||||
<td>{{ $rma['email'] }}</td>
|
||||
<td>{{ $rma['telephone'] }}</td>
|
||||
<td>{{ $rma['product_name'] }}</td>
|
||||
<td>{{ $rma['model'] }}</td>
|
||||
<td>{{ $rma['quantity'] }}</td>
|
||||
<td>{{ $rma['type'] }}</td>
|
||||
<td>{{ $rma['status'] }}</td>
|
||||
<td><a href="{{ admin_route('rmas.show', [$rma['id']]) }}" class="btn btn-outline-secondary btn-sm">{{ __('common.view') }}</a>
|
||||
<td colspan="9" class="border-0">
|
||||
<x-admin-no-data />
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
{{ $rmas->links('admin::vendor/pagination/bootstrap-4') }}
|
||||
@else
|
||||
<x-admin-no-data/>
|
||||
<x-admin-no-data />
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('footer')
|
||||
<script></script>
|
||||
@endpush
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
<th class="text-end">{{ __('common.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody v-if="tax_classes.length">
|
||||
<tr v-for="tax, index in tax_classes" :key="index">
|
||||
<td>@{{ tax.id }}</td>
|
||||
<td>@{{ tax.title }}</td>
|
||||
|
|
@ -41,9 +41,8 @@
|
|||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody v-else><tr><td colspan="5" class="border-0"><x-admin-no-data /></td></tr></tbody>
|
||||
</table>
|
||||
|
||||
{{-- {{ $tax_classes->links('admin::vendor/pagination/bootstrap-4') }} --}}
|
||||
</div>
|
||||
|
||||
<el-dialog title="{{ __('admin/tax_class.tax_classes_create') }}" :visible.sync="dialog.show" width="700px"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<th class="text-end">{{ __('common.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody v-if="tax_rates.length">
|
||||
<tr v-for="tax, index in tax_rates" :key="index">
|
||||
<td>@{{ tax.id }}</td>
|
||||
<td>@{{ tax.name }}</td>
|
||||
|
|
@ -45,6 +45,7 @@
|
|||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody v-else><tr><td colspan="7" class="border-0"><x-admin-no-data /></td></tr></tbody>
|
||||
</table>
|
||||
|
||||
{{-- {{ $tax_rates->links('admin::vendor/pagination/bootstrap-4') }} --}}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
<th class="text-end">{{ __('common.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody v-if="zones.data.length">
|
||||
<tr v-for="zone, index in zones.data" :key="index">
|
||||
<td>@{{ zone.id }}</td>
|
||||
<td>@{{ zone.name }}</td>
|
||||
|
|
@ -39,9 +39,10 @@
|
|||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody v-else><tr><td colspan="7" class="border-0"><x-admin-no-data /></td></tr></tbody>
|
||||
</table>
|
||||
|
||||
<el-pagination layout="prev, pager, next" background :page-size="zones.per_page" :current-page.sync="page"
|
||||
<el-pagination v-if="zones.data.length" layout="prev, pager, next" background :page-size="zones.per_page" :current-page.sync="page"
|
||||
:total="zones.total"></el-pagination>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@
|
|||
@section('content')
|
||||
<div class="container" id="address-app">
|
||||
|
||||
<x-shop-breadcrumb type="static" value="account.addresses.index" />
|
||||
<x-shop-breadcrumb type="static" value="account.addresses.index" />
|
||||
|
||||
<div class="row">
|
||||
<x-shop-sidebar/>
|
||||
<x-shop-sidebar />
|
||||
|
||||
<div class="col-12 col-md-9">
|
||||
<div class="card h-min-600">
|
||||
|
|
@ -22,19 +22,22 @@
|
|||
<h5 class="card-title">{{ __('shop/account.addresses.index') }}</h5>
|
||||
</div>
|
||||
<div class="card-body h-600">
|
||||
<button class="btn btn-dark mb-3" @click="editAddress"><i class="bi bi-plus-square-dotted me-1"></i> {{ __('shop/account.addresses.add_address') }}</button>
|
||||
<button v-if="addresses.length" class="btn btn-dark mb-3" @click="editAddress"><i class="bi bi-plus-square-dotted me-1"></i>
|
||||
{{ __('shop/account.addresses.add_address') }}</button>
|
||||
<div class="addresses-wrap" v-cloak>
|
||||
<div class="row">
|
||||
<div class="col-6" v-for="address, index in addresses" :key="index" v-if="addresses.length">
|
||||
<div class="row" v-if="addresses.length">
|
||||
<div class="col-6" v-for="address, index in addresses" :key="index">
|
||||
<div class="item">
|
||||
<div class="name-wrap">
|
||||
<span class="name">@{{ address.name }}</span>
|
||||
<span class="phone">@{{ address.phone }}</span>
|
||||
</div>
|
||||
<div class="zipcode">@{{ address.zipcode }}</div>
|
||||
<div class="address-info">@{{ address.country }} @{{ address.zone }} @{{ address.city }} @{{ address.address_1 }}</div>
|
||||
<div class="address-info">@{{ address.country }} @{{ address.zone }} @{{ address.city }}
|
||||
@{{ address.address_1 }}</div>
|
||||
<div class="address-bottom">
|
||||
<div><span class="badge bg-success" v-if="address.default">{{ __('shop/account.addresses.default_address') }}</span></div>
|
||||
<div><span class="badge bg-success"
|
||||
v-if="address.default">{{ __('shop/account.addresses.default_address') }}</span></div>
|
||||
<div>
|
||||
<a class="me-2" @click.stop="deleteAddress(index)">{{ __('shop/account.addresses.delete') }}</a>
|
||||
<a @click.stop="editAddress(index)">{{ __('shop/account.addresses.edit') }}</a>
|
||||
|
|
@ -43,6 +46,11 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="text-center">
|
||||
<x-shop-no-data />
|
||||
<button class="btn btn-dark mb-3" @click="editAddress"><i class="bi bi-plus-square-dotted me-1"></i>
|
||||
{{ __('shop/account.addresses.add_address') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -50,10 +58,10 @@
|
|||
</div>
|
||||
|
||||
@include('shared.address-form', [
|
||||
'address_form_key' => 'form',
|
||||
'address_form_show' => 'editShow',
|
||||
'address_form_rules' => 'rules'
|
||||
])
|
||||
'address_form_key' => 'form',
|
||||
'address_form_show' => 'editShow',
|
||||
'address_form_rules' => 'rules',
|
||||
])
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
|
@ -70,7 +78,7 @@
|
|||
form: {
|
||||
name: '',
|
||||
phone: '',
|
||||
country_id: @json((int)system_setting('base.country_id')),
|
||||
country_id: @json((int) system_setting('base.country_id')),
|
||||
zipcode: '',
|
||||
zone_id: '',
|
||||
city: '',
|
||||
|
|
@ -87,19 +95,38 @@
|
|||
},
|
||||
|
||||
rules: {
|
||||
name: [{required: true, message: '{{ __('shop/account.addresses.enter_name') }}', trigger: 'blur'}, ],
|
||||
phone: [{required: true, message: '{{ __('shop/account.addresses.enter_phone') }}', trigger: 'blur'}, ],
|
||||
address_1: [{required: true, message: ' {{ __('shop/account.addresses.enter_address') }}', trigger: 'blur'}, ],
|
||||
zone_id: [{required: true, message: '{{ __('shop/account.addresses.select_province') }}', trigger: 'blur'}, ],
|
||||
city: [{required: true, message: '{{ __('shop/account.addresses.enter_city') }}', trigger: 'blur'}, ],
|
||||
name: [{
|
||||
required: true,
|
||||
message: '{{ __('shop/account.addresses.enter_name') }}',
|
||||
trigger: 'blur'
|
||||
}, ],
|
||||
phone: [{
|
||||
required: true,
|
||||
message: '{{ __('shop/account.addresses.enter_phone') }}',
|
||||
trigger: 'blur'
|
||||
}, ],
|
||||
address_1: [{
|
||||
required: true,
|
||||
message: ' {{ __('shop/account.addresses.enter_address') }}',
|
||||
trigger: 'blur'
|
||||
}, ],
|
||||
zone_id: [{
|
||||
required: true,
|
||||
message: '{{ __('shop/account.addresses.select_province') }}',
|
||||
trigger: 'blur'
|
||||
}, ],
|
||||
city: [{
|
||||
required: true,
|
||||
message: '{{ __('shop/account.addresses.enter_city') }}',
|
||||
trigger: 'blur'
|
||||
}, ],
|
||||
}
|
||||
},
|
||||
|
||||
// 实例被挂载后调用
|
||||
mounted () {
|
||||
},
|
||||
mounted() {},
|
||||
|
||||
beforeMount () {
|
||||
beforeMount() {
|
||||
this.countryChange(this.form.country_id);
|
||||
},
|
||||
|
||||
|
|
@ -114,16 +141,17 @@
|
|||
},
|
||||
|
||||
deleteAddress(index) {
|
||||
this.$confirm('{{ __('shop/account.addresses.confirm_delete') }}', '{{ __('shop/account.addresses.hint') }}', {
|
||||
confirmButtonText: '{{ __('common.confirm') }}',
|
||||
cancelButtonText: '{{ __('common.cancel') }}',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$confirm('{{ __('shop/account.addresses.confirm_delete') }}',
|
||||
'{{ __('shop/account.addresses.hint') }}', {
|
||||
confirmButtonText: '{{ __('common.confirm') }}',
|
||||
cancelButtonText: '{{ __('common.cancel') }}',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
$http.delete('/account/addresses/' + this.addresses[index].id).then((res) => {
|
||||
this.$message.success(res.message);
|
||||
this.addresses.splice(index, 1)
|
||||
})
|
||||
}).catch(()=>{})
|
||||
}).catch(() => {})
|
||||
},
|
||||
|
||||
addressFormSubmit(form) {
|
||||
|
|
@ -162,13 +190,15 @@
|
|||
this.editIndex = null;
|
||||
|
||||
Object.keys(this.form).forEach(key => this.form[key] = '')
|
||||
this.form.country_id = @json((int)system_setting('base.country_id'))
|
||||
this.form.country_id = @json((int) system_setting('base.country_id'))
|
||||
},
|
||||
|
||||
countryChange(e) {
|
||||
const self = this;
|
||||
|
||||
$http.get(`/countries/${e}/zones`, null, {hload:true}).then((res) => {
|
||||
$http.get(`/countries/${e}/zones`, null, {
|
||||
hload: true
|
||||
}).then((res) => {
|
||||
this.source.zones = res.data.zones;
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,11 +7,8 @@
|
|||
|
||||
<x-shop-breadcrumb type="static" value="account.order.index" />
|
||||
|
||||
{{-- {{ dd($orders) }} --}}
|
||||
|
||||
|
||||
<div class="row">
|
||||
<x-shop-sidebar/>
|
||||
<x-shop-sidebar />
|
||||
|
||||
<div class="col-12 col-md-9">
|
||||
<div class="card mb-4 account-card order-wrap">
|
||||
|
|
@ -29,37 +26,49 @@
|
|||
<th width="100px" class="text-end">{{ __('common.action') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach ($orders as $order)
|
||||
<tbody>
|
||||
<tr class="sep-row"><td colspan="4"></td></tr>
|
||||
<tr class="head-tr">
|
||||
<td colspan="4">
|
||||
<span class="order-created me-4">{{ $order->created_at }}</span>
|
||||
<span class="order-number">{{ __('shop/account.order.order_number') }}:{{ $order->number }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@foreach ($order->orderProducts as $product)
|
||||
<tr class="{{ $loop->first ? 'first-tr' : '' }}">
|
||||
<td>
|
||||
<div class="product-info">
|
||||
<div class="img"><img src="{{ $product->image }}" class="img-fluid"></div>
|
||||
<div class="name">
|
||||
<a class="text-dark" href="{{ shop_route('products.show', ['product' => $product->product_id]) }}">{{ $product->name }}</a>
|
||||
<div class="quantity mt-1 text-secondary">x {{ $product->quantity }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@if ($loop->first)
|
||||
<td rowspan="{{ $loop->count }}">{{ currency_format($order->total, $order->currency_code, $order->currency_value) }}</td>
|
||||
<td rowspan="{{ $loop->count }}">{{ __("common.order.{$order->status}") }}</td>
|
||||
<td rowspan="{{ $loop->count }}" class="text-end">
|
||||
<a href="{{ shop_route('account.order.show', ['number' => $order->number]) }}" class="btn btn-outline-secondary btn-sm">{{ __('shop/account.order.check') }}</a>
|
||||
@if (count($orders))
|
||||
@foreach ($orders as $order)
|
||||
<tbody>
|
||||
<tr class="sep-row">
|
||||
<td colspan="4"></td>
|
||||
</tr>
|
||||
<tr class="head-tr">
|
||||
<td colspan="4">
|
||||
<span class="order-created me-4">{{ $order->created_at }}</span>
|
||||
<span
|
||||
class="order-number">{{ __('shop/account.order.order_number') }}:{{ $order->number }}</span>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tr>
|
||||
@foreach ($order->orderProducts as $product)
|
||||
<tr class="{{ $loop->first ? 'first-tr' : '' }}">
|
||||
<td>
|
||||
<div class="product-info">
|
||||
<div class="img"><img src="{{ $product->image }}" class="img-fluid"></div>
|
||||
<div class="name">
|
||||
<a class="text-dark"
|
||||
href="{{ shop_route('products.show', ['product' => $product->product_id]) }}">{{ $product->name }}</a>
|
||||
<div class="quantity mt-1 text-secondary">x {{ $product->quantity }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@if ($loop->first)
|
||||
<td rowspan="{{ $loop->count }}">
|
||||
{{ currency_format($order->total, $order->currency_code, $order->currency_value) }}</td>
|
||||
<td rowspan="{{ $loop->count }}">{{ __("common.order.{$order->status}") }}</td>
|
||||
<td rowspan="{{ $loop->count }}" class="text-end">
|
||||
<a href="{{ shop_route('account.order.show', ['number' => $order->number]) }}"
|
||||
class="btn btn-outline-secondary btn-sm">{{ __('shop/account.order.check') }}</a>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@endforeach
|
||||
@else
|
||||
<tbody>
|
||||
<tr><td colspan="4" class="border-0"><x-shop-no-data /></td></tr>
|
||||
</tbody>
|
||||
@endforeach
|
||||
@endif
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,16 +7,8 @@
|
|||
|
||||
<x-shop-breadcrumb type="static" value="account.rma.index" />
|
||||
|
||||
{{-- <nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="#">Home</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Library</li>
|
||||
</ol>
|
||||
</nav> --}}
|
||||
|
||||
|
||||
<div class="row">
|
||||
<x-shop-sidebar/>
|
||||
<x-shop-sidebar />
|
||||
<div class="col-12 col-md-9">
|
||||
<div class="card mb-4 account-card order-wrap h-min-600">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
|
|
@ -36,17 +28,25 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($rmas as $rma)
|
||||
@if (count($rmas))
|
||||
@foreach ($rmas as $rma)
|
||||
<tr>
|
||||
<td>{{ sub_string($rma['product_name'], 80) }}</td>
|
||||
<td>{{ $rma['quantity'] }}</td>
|
||||
<td>{{ $rma['type'] }}</td>
|
||||
<td>{{ $rma['reason'] }}</td>
|
||||
<td>{{ $rma['created_at'] }}</td>
|
||||
<td class="text-end"><a href="{{ shop_route('account.rma.show', [$rma['id']]) }}"
|
||||
class="btn btn-outline-secondary btn-sm">{{ __('shop/account.rma.check') }}</a> </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td>{{ sub_string($rma['product_name'], 80) }}</td>
|
||||
<td>{{ $rma['quantity'] }}</td>
|
||||
<td>{{ $rma['type'] }}</td>
|
||||
<td>{{ $rma['reason'] }}</td>
|
||||
<td>{{ $rma['created_at'] }}</td>
|
||||
{{-- <td>{{ $rma['status'] }}</td> --}}
|
||||
<td class="text-end"><a href="{{ shop_route('account.rma.show', [$rma['id']]) }}" class="btn btn-outline-secondary btn-sm">{{ __('shop/account.rma.check') }}</a> </td>
|
||||
<td colspan="6" class="border-0">
|
||||
<x-shop-no-data />
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,18 +4,10 @@
|
|||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
|
||||
<x-shop-breadcrumb type="static" value="account.wishlist.index" />
|
||||
|
||||
{{-- <nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="#">Home</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">Library</li>
|
||||
</ol>
|
||||
</nav> --}}
|
||||
<x-shop-breadcrumb type="static" value="account.wishlist.index" />
|
||||
|
||||
<div class="row">
|
||||
<x-shop-sidebar/>
|
||||
<x-shop-sidebar />
|
||||
|
||||
<div class="col-12 col-md-9">
|
||||
<div class="card mb-4 h-min-600">
|
||||
|
|
@ -33,46 +25,56 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($wishlist as $item)
|
||||
<tr data-id="{{ $item['id'] }}">
|
||||
<td><div class="wh-70"><img src="{{ $item['image'] }}" class="img-fluid"></div></td>
|
||||
<td>{{ $item['product_name'] }}</td>
|
||||
<td>{{ $item['price'] }}</td>
|
||||
<td class="text-end">
|
||||
<div class="">
|
||||
<a class="btn btn-dark btn-sm add-cart" href="{{ shop_route('products.show', $item['product_id']) }}">{{ __('shop/account.wishlist.check_details') }}</a>
|
||||
<button class="btn btn-danger btn-sm remove-wishlist"><i class="bi bi-x-lg"></i></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@if (count($wishlist))
|
||||
@foreach ($wishlist as $item)
|
||||
<tr data-id="{{ $item['id'] }}">
|
||||
<td>
|
||||
<div class="wh-70"><img src="{{ $item['image'] }}" class="img-fluid"></div>
|
||||
</td>
|
||||
<td>{{ $item['product_name'] }}</td>
|
||||
<td>{{ $item['price'] }}</td>
|
||||
<td class="text-end">
|
||||
<div class="">
|
||||
<a class="btn btn-dark btn-sm add-cart"
|
||||
href="{{ shop_route('products.show', $item['product_id']) }}">{{ __('shop/account.wishlist.check_details') }}</a>
|
||||
<button class="btn btn-danger btn-sm remove-wishlist"><i class="bi bi-x-lg"></i></button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="4" class="border-0">
|
||||
<x-shop-no-data />
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{{-- {{ $wishlist->links('shared/pagination/bootstrap-4') }} --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@push('add-scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.remove-wishlist').click(function() {
|
||||
const product_id = $(this).closest('tr').data('id');
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('.remove-wishlist').click(function() {
|
||||
const product_id = $(this).closest('tr').data('id');
|
||||
|
||||
$http.delete('account/wishlist/' + product_id).then((res) => {
|
||||
if (res.status == 'success') {
|
||||
$(this).closest('tr').fadeOut(function() {
|
||||
$(this).remove();
|
||||
if ($('.remove-wishlist').length == 0) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
$http.delete('account/wishlist/' + product_id).then((res) => {
|
||||
if (res.status == 'success') {
|
||||
$(this).closest('tr').fadeOut(function() {
|
||||
$(this).remove();
|
||||
if ($('.remove-wishlist').length == 0) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@endpush
|
||||
|
|
|
|||
Loading…
Reference in New Issue