From 8384db4911844896b07f7f56967d6717cd340816 Mon Sep 17 00:00:00 2001 From: pushuo Date: Thu, 5 Jan 2023 17:47:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=90=8E=E5=8F=B0=E7=B3=BB?= =?UTF-8?q?=E7=BB=9F=E8=AE=BE=E7=BD=AE=E5=BF=AB=E9=80=92=E5=85=AC=E5=8F=B8?= =?UTF-8?q?=E5=BF=85=E5=A1=AB=E5=88=A4=E6=96=AD=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../beike/admin/css/_bootstrap-extra.scss | 14 ++++++++++++++ resources/beike/admin/css/_global.scss | 14 ++++++++++++++ .../beike/admin/js/bootstrap-validation.js | 9 +++++++++ .../admin/views/pages/orders/form.blade.php | 18 +++++++++--------- .../beike/admin/views/pages/setting.blade.php | 10 ++++++++-- 5 files changed, 54 insertions(+), 11 deletions(-) diff --git a/resources/beike/admin/css/_bootstrap-extra.scss b/resources/beike/admin/css/_bootstrap-extra.scss index fdd79d4e..8beafd6e 100644 --- a/resources/beike/admin/css/_bootstrap-extra.scss +++ b/resources/beike/admin/css/_bootstrap-extra.scss @@ -40,6 +40,20 @@ hr.horizontal.dark { color: #6c757d; border: none; padding: 0 .2rem 0.7rem; + &.error-invalid { + color: #dc3545 !important; + font-weight: bold; + position: relative; + padding-left: 17px; + + &:before { + content: '\F333'; + left: 0; + top: 1px; + font-family: 'bootstrap-icons'; + position: absolute; + } + } &.active { // color: $primary; diff --git a/resources/beike/admin/css/_global.scss b/resources/beike/admin/css/_global.scss index a7763052..2383cdb0 100644 --- a/resources/beike/admin/css/_global.scss +++ b/resources/beike/admin/css/_global.scss @@ -454,3 +454,17 @@ table.table thead th, .fw-bold, h1,h2,h3, h4, h5, h6, b, strong, .card .card-hea .swal2-confirm:focus { box-shadow: none !important; } + +.order-top-info { + table { + tr { + td:first-of-type { + width: 40%; + + html[lang="zh_cn"] &, html[lang="zh_hk"] &, html[lang="en"] &, html[lang="ja"] & { + width: 90px; + } + } + } + } +} \ No newline at end of file diff --git a/resources/beike/admin/js/bootstrap-validation.js b/resources/beike/admin/js/bootstrap-validation.js index f8266d42..5cb579ac 100644 --- a/resources/beike/admin/js/bootstrap-validation.js +++ b/resources/beike/admin/js/bootstrap-validation.js @@ -21,6 +21,15 @@ $(function () { } form.classList.add("was-validated"); + + // 如果错误输入框在 tab 页面,则高亮显示对应的选项卡 + $('.invalid-feedback').each(function(index, el) { + if ($(el).css('display') == 'block' && $(el).parents('.tab-pane')) { + const id = $(el).parents('.tab-pane').prop('id'); + + $(`a[href="#${id}"], button[data-bs-target="#${id}"]`).addClass('error-invalid'); + } + }); }, false ); diff --git a/resources/beike/admin/views/pages/orders/form.blade.php b/resources/beike/admin/views/pages/orders/form.blade.php index 62382004..6af09432 100644 --- a/resources/beike/admin/views/pages/orders/form.blade.php +++ b/resources/beike/admin/views/pages/orders/form.blade.php @@ -5,13 +5,13 @@ @section('content')
{{ __('admin/common.order') }}
-
+
- + @@ -29,17 +29,17 @@
{{ __('order.number') }}:{{ __('order.number') }}: {{ $order->number }}
- + + + + + - - - -
{{ __('order.customer_name') }}:{{ __('order.customer_name') }}: {{ $order->customer_name }}
{{ __('common.email') }}:{{ $order->email }}
{{ __('order.created_at') }}: {{ $order->created_at }}
{{ __('order.updated_at') }}:{{ $order->updated_at }}
@@ -47,8 +47,8 @@ - - + +
{{ __('common.email') }}:{{ $order->email }}{{ __('order.updated_at') }}:{{ $order->updated_at }}
diff --git a/resources/beike/admin/views/pages/setting.blade.php b/resources/beike/admin/views/pages/setting.blade.php index 08a56b81..eaaabe69 100644 --- a/resources/beike/admin/views/pages/setting.blade.php +++ b/resources/beike/admin/views/pages/setting.blade.php @@ -117,8 +117,14 @@ {{ __('order.express_company') }}Code - - + + +
{{ __('common.error_required', ['name' => __('order.express_company')]) }}
+ + + +
{{ __('common.error_required', ['name' => 'Code']) }}
+