后台区域、税率、税类等多语言

This commit is contained in:
pushuo 2022-08-24 10:02:17 +08:00
parent 43fb0ceb76
commit 6d9081e4e2
12 changed files with 100 additions and 61 deletions

View File

@ -1,22 +1,22 @@
@extends('admin::layouts.master')
@section('title', '区域组')
@section('title', __('admin/region.index'))
@section('content')
<div id="tax-classes-app" class="card" v-cloak>
<div class="card-body h-min-600">
<div class="d-flex justify-content-between mb-4">
<button type="button" class="btn btn-primary" @click="checkedCreate('add', null)">添加</button>
<button type="button" class="btn btn-primary" @click="checkedCreate('add', null)">{{ __('common.add') }}</button>
</div>
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>名称</th>
<th>描述</th>
<th>创建时间</th>
<th>修改时间</th>
<th class="text-end">操作</th>
<th>{{ __('admin/region.name') }}</th>
<th>{{ __('admin/region.describe') }}</th>
<th>{{ __('common.created_at') }}</th>
<th>{{ __('common.updated_at') }}</th>
<th class="text-end">{{ __('common.operate') }}</th>
</tr>
</thead>
<tbody>
@ -27,8 +27,8 @@
<td>@{{ tax.created_at }}</td>
<td>@{{ tax.updated_at }}</td>
<td class="text-end">
<button class="btn btn-outline-secondary btn-sm" @click="checkedCreate('edit', index)">编辑</button>
<button class="btn btn-outline-danger btn-sm ml-1" type="button" @click="deleteCustomer(tax.id, index)">删除</button>
<button class="btn btn-outline-secondary btn-sm" @click="checkedCreate('edit', index)">{{ __('common.edit') }}</button>
<button class="btn btn-outline-danger btn-sm ml-1" type="button" @click="deleteCustomer(tax.id, index)">{{ __('common.delete') }}</button>
</td>
</tr>
</tbody>

View File

@ -1,31 +1,31 @@
@extends('admin::layouts.master')
@section('title', '税类设置')
@section('title', __('admin/tax_rate.tax_classes_index'))
@section('content')
<ul class="nav-bordered nav nav-tabs mb-3">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="{{ admin_route('tax_classes.index') }}">税类设置</a>
<a class="nav-link active" aria-current="page" href="{{ admin_route('tax_classes.index') }}">{{ __('admin/tax_rate.tax_classes_index') }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ admin_route('tax_rates.index') }}">税率设置</a>
<a class="nav-link" href="{{ admin_route('tax_rates.index') }}">{{ __('admin/tax_rate.index') }}</a>
</li>
</ul>
<div id="tax-classes-app" class="card" v-cloak>
<div class="card-body h-min-600">
<div class="d-flex justify-content-between mb-4">
<button type="button" class="btn btn-primary" @click="checkedCreate('add', null)">添加</button>
<button type="button" class="btn btn-primary" @click="checkedCreate('add', null)">{{ __('common.add') }}</button>
</div>
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>名称</th>
<th>描述</th>
<th>创建时间</th>
<th>修改时间</th>
<th class="text-end">操作</th>
<th>{{ __('admin/region.name') }}</th>
<th>{{ __('admin/region.describe') }}</th>
<th>{{ __('common.created_at') }}</th>
<th>{{ __('common.updated_at') }}</th>
<th class="text-end">{{ __('common.operate') }}</th>
</tr>
</thead>
<tbody>
@ -36,8 +36,8 @@
<td>@{{ tax.created_at }}</td>
<td>@{{ tax.updated_at }}</td>
<td class="text-end">
<button class="btn btn-outline-secondary btn-sm" @click="checkedCreate('edit', index)">编辑</button>
<button class="btn btn-outline-danger btn-sm ml-1" type="button" @click="deleteCustomer(tax.id, index)">删除</button>
<button class="btn btn-outline-secondary btn-sm" @click="checkedCreate('edit', index)">{{ __('common.edit') }}</button>
<button class="btn btn-outline-danger btn-sm ml-1" type="button" @click="deleteCustomer(tax.id, index)">{{ __('common.delete') }}</button>
</td>
</tr>
</tbody>
@ -46,52 +46,52 @@
{{-- {{ $tax_classes->links('admin::vendor/pagination/bootstrap-4') }} --}}
</div>
<el-dialog title="创建税费" :visible.sync="dialog.show" width="700px"
<el-dialog title="{{ __('admin/tax_class.tax_classes_create') }}" :visible.sync="dialog.show" width="700px"
@close="closeCustomersDialog('form')" :close-on-click-modal="false">
<el-form ref="form" :rules="rules" :model="dialog.form" label-width="100px">
<el-form-item label="税类名称" prop="title">
<el-input v-model="dialog.form.title" placeholder="税类名称"></el-input>
<el-form-item label="{{ __('admin/region.name') }}" prop="title">
<el-input v-model="dialog.form.title" placeholder="{{ __('admin/region.name') }}"></el-input>
</el-form-item>
<el-form-item label="描述" prop="description">
<el-input v-model="dialog.form.description" placeholder="描述"></el-input>
<el-form-item label="{{ __('admin/region.describe') }}" prop="description">
<el-input v-model="dialog.form.description" placeholder="{{ __('admin/region.describe') }}"></el-input>
</el-form-item>
<el-form-item label="规则">
<el-form-item label="{{ __('admin/tax_class.rule') }}">
<table class="table table-bordered" style="line-height: 1.6;">
<thead>
<tr>
<th>税率</th>
<th>基于</th>
<th>优先级</th>
<th>{{ __('admin/tax_rate.tax_rate') }}</th>
<th>{{ __('admin/tax_class.based_on') }}</th>
<th>{{ __('admin/tax_class.priority') }}</th>
<th></th>
</tr>
</thead>
<tbody>
<tr v-for="rule, index in dialog.form.tax_rules" :key="index">
<td>
<el-select v-model="rule.tax_rate_id" size="mini" placeholder="请选择">
<el-select v-model="rule.tax_rate_id" size="mini" placeholder="{{ __('common.please_choose') }}">
<el-option v-for="tax in source.all_tax_rates" :key="tax.id" :label="tax.name" :value="tax.id"></el-option>
</el-select>
</td>
<td>
<el-select v-model="rule.based" size="mini" placeholder="请选择">
<el-select v-model="rule.based" size="mini" placeholder="{{ __('common.please_choose') }}">
<el-option v-for="base in source.bases" :key="base" :label="base" :value="base"></el-option>
</el-select>
</td>
<td width="80px"><el-input v-model="rule.priority" size="mini" placeholder="优先级"></el-input></td>
<td width="80px"><el-input v-model="rule.priority" size="mini" placeholder="{{ __('admin/tax_class.priority') }}"></el-input></td>
<td>
<button class="btn btn-outline-danger btn-sm ml-1" type="button" @click="deleteRates(index)">删除</button>
<button class="btn btn-outline-danger btn-sm ml-1" type="button" @click="deleteRates(index)">{{ __('common.delete') }}</button>
</td>
</tr>
</tbody>
</table>
<el-button type="primary" icon="el-icon-plus" size="small" plain @click="addRates">添加规则</el-button>
<el-button type="primary" icon="el-icon-plus" size="small" plain @click="addRates">{{ __('common.add') }}</el-button>
</el-form-item>
<el-form-item class="mt-5">
<el-button type="primary" @click="addFormSubmit('form')">保存</el-button>
<el-button @click="closeCustomersDialog('form')">取消</el-button>
<el-button type="primary" @click="addFormSubmit('form')">{{ __('common.save') }}</el-button>
<el-button @click="closeCustomersDialog('form')">{{ __('common.cancel') }}</el-button>
</el-form-item>
</el-form>
</el-dialog>

View File

@ -1,33 +1,33 @@
@extends('admin::layouts.master')
@section('title', '税率设置')
@section('title', __('admin/tax_rate.index'))
@section('content')
<ul class="nav-bordered nav nav-tabs mb-3">
<li class="nav-item">
<a class="nav-link" aria-current="page" href="{{ admin_route('tax_classes.index') }}">税类设置</a>
<a class="nav-link" aria-current="page" href="{{ admin_route('tax_classes.index') }}">{{ __('admin/tax_rate.tax_classes_index') }}</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="{{ admin_route('tax_rates.index') }}">税率设置</a>
<a class="nav-link active" href="{{ admin_route('tax_rates.index') }}">{{ __('admin/tax_rate.index') }}</a>
</li>
</ul>
<div id="tax-classes-app" class="card" v-cloak>
<div class="card-body h-min-600">
<div class="d-flex justify-content-between mb-4">
<button type="button" class="btn btn-primary" @click="checkedCreate('add', null)">添加</button>
<button type="button" class="btn btn-primary" @click="checkedCreate('add', null)">{{ __('common.add') }}</button>
</div>
<table class="table">
<thead>
<tr>
<th>ID</th>
<th>税种</th>
<th>税率</th>
<th>类型</th>
<th>区域</th>
<th>创建时间</th>
<th>修改时间</th>
<th class="text-end">操作</th>
<th>{{ __('admin/tax_rate.tax') }}</th>
<th>{{ __('admin/tax_rate.tax_rate') }}</th>
<th>{{ __('admin/tax_rate.type') }}</th>
<th>{{ __('admin/tax_rate.area') }}</th>
<th>{{ __('common.created_at') }}</th>
<th>{{ __('common.updated_at') }}</th>
<th class="text-end">{{ __('common.operate') }}</th>
</tr>
</thead>
<tbody>
@ -40,8 +40,8 @@
<td>@{{ tax.created_at }}</td>
<td>@{{ tax.updated_at }}</td>
<td class="text-end">
<button class="btn btn-outline-secondary btn-sm" @click="checkedCreate('edit', index)">编辑</button>
<button class="btn btn-outline-danger btn-sm ml-1" type="button" @click="deleteCustomer(tax.id, index)">删除</button>
<button class="btn btn-outline-secondary btn-sm" @click="checkedCreate('edit', index)">{{ __('common.edit') }}</button>
<button class="btn btn-outline-danger btn-sm ml-1" type="button" @click="deleteCustomer(tax.id, index)">{{ __('common.delete') }}</button>
</td>
</tr>
</tbody>
@ -50,35 +50,35 @@
{{-- {{ $tax_rates->links('admin::vendor/pagination/bootstrap-4') }} --}}
</div>
<el-dialog title="税率" :visible.sync="dialog.show" width="500px"
<el-dialog title="{{ __('admin/tax_rate.tax_rate') }}" :visible.sync="dialog.show" width="500px"
@close="closeCustomersDialog('form')" :close-on-click-modal="false">
<el-form ref="form" :rules="rules" :model="dialog.form" label-width="100px">
<el-form-item label="税种" prop="name">
<el-input v-model="dialog.form.name" placeholder="税种"></el-input>
<el-form-item label="{{ __('admin/tax_rate.tax') }}" prop="name">
<el-input v-model="dialog.form.name" placeholder="{{ __('admin/tax_rate.tax') }}"></el-input>
</el-form-item>
<el-form-item label="税率" prop="rate">
<el-input v-model="dialog.form.rate" placeholder="税率">
<el-form-item label="{{ __('admin/tax_rate.tax_rate') }}" prop="rate">
<el-input v-model="dialog.form.rate" placeholder="{{ __('admin/tax_rate.tax_rate') }}">
<template slot="append" v-if="dialog.form.type == 'percent'">%</template>
</el-input>
</el-form-item>
<el-form-item label="类型">
<el-select v-model="dialog.form.type" size="small" placeholder="请选择">
<el-form-item label="{{ __('admin/tax_rate.type') }}">
<el-select v-model="dialog.form.type" size="small" placeholder="{{ __('common.please_choose') }}">
<el-option v-for="type in source.types" :key="type.value" :label="type.name" :value="type.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="区域">
<el-select v-model="dialog.form.region_id" size="small" placeholder="请选择">
<el-form-item label="{{ __('admin/tax_rate.area') }}">
<el-select v-model="dialog.form.region_id" size="small" placeholder="{{ __('common.please_choose') }}">
<el-option v-for="region in source.regions" :key="region.value" :label="region.name" :value="region.id"></el-option>
</el-select>
</el-form-item>
<el-form-item class="mt-5">
<el-button type="primary" @click="addFormSubmit('form')">保存</el-button>
<el-button @click="closeCustomersDialog('form')">取消</el-button>
<el-button type="primary" @click="addFormSubmit('form')">{{ __('common.save') }}</el-button>
<el-button @click="closeCustomersDialog('form')">{{ __('common.cancel') }}</el-button>
</el-form-item>
</el-form>
</el-dialog>

View File

@ -10,9 +10,12 @@
*/
return [
'index' => 'Area Group',
'regions_index' => 'Index',
'regions_create' => 'Create',
'regions_show' => 'Detail',
'regions_update' => 'Edit',
'regions_delete' => 'Delete'
'regions_delete' => 'Delete',
'name' => 'Name',
'describe' => 'Describe',
];

View File

@ -10,6 +10,9 @@
*/
return [
'rule' => 'Rule',
'based_on' => 'Based On',
'priority' => 'Priority',
'rma_reasons_index' => 'Index',
'rma_reasons_create' => 'Create',
'rma_reasons_update' => 'Update',

View File

@ -10,6 +10,9 @@
*/
return [
'rule' => 'Rule',
'based_on' => 'Based',
'priority' => 'Priority',
'tax_classes_index' => 'Index',
'tax_classes_create' => 'Create',
'tax_classes_show' => 'Detail',

View File

@ -10,6 +10,12 @@
*/
return [
'index' => 'Tax Rate',
'tax_classes_index' => 'Tax Classes',
'tax' => 'Tax',
'tax_rate' => 'Tax Rate',
'type' => 'Type',
'area' => 'Area',
'tax_rates_index' => 'Index',
'tax_rates_create' => 'Create',
'tax_rates_show' => 'Detail',

View File

@ -34,6 +34,12 @@ return [
'sign_out' => 'Sign Out',
'contact_us' => 'Contact us',
'input' => 'Type your search here',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
'edit' => 'Edit',
'operate' => 'Operate',
'add' => 'Add',
'please_choose' => 'Please Choose',
'order' => [
'unpaid' => 'Unpaid',

View File

@ -10,9 +10,12 @@
*/
return [
'index' => '区域组',
'regions_index' => '区域组列表',
'regions_create' => '创建区域组',
'regions_show' => '区域组详情',
'regions_update' => '更新区域组',
'regions_delete' => '删除区域组',
'name' => '名称',
'describe' => '描述',
];

View File

@ -10,6 +10,9 @@
*/
return [
'rule' => '规则',
'based_on' => '基于',
'priority' => '优先级',
'tax_classes_index' => '税类列表',
'tax_classes_create' => '创建税类',
'tax_classes_show' => '税类详情',

View File

@ -10,6 +10,12 @@
*/
return [
'index' => '税率设置',
'tax_classes_index' => '税类设置',
'tax' => '税种',
'tax_rate' => '税率',
'type' => '类型',
'area' => '区域',
'tax_rates_index' => '税率列表',
'tax_rates_create' => '创建税率',
'tax_rates_show' => '税率详情',

View File

@ -33,6 +33,12 @@ return [
'sign_out' => '退出登录',
'contact_us' => '联系我们',
'input' => '在此处输入您的搜索',
'created_at' => '创建时间',
'updated_at' => '修改时间',
'edit' => '编辑',
'operate' => '操作',
'add' => '添加',
'please_choose' => '请选择',
'order' => [
'unpaid' => '待支付',