From 457f9dc1e0b582e08d17990c9a3031e093a0c1d9 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Fri, 2 Sep 2022 21:17:44 +0800 Subject: [PATCH 01/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E8=AF=951?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index aefa376..0e55e4b 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -223,12 +223,12 @@ url: '{:url("/index/carInfo/")}', //数据接口 where: getUrlParam('Object'), toolbar: true, - height: 'full - 45', + height: 'full-45', page: true, //开启分页 limit: 20, loading: true, cols: [[ //表头 - // {type: 'checkbox', fixed: 'left'}, + {type: 'number'}, {field: 'car_no', title: '车牌号', width: 100, edit: 'text', fixed: 'left'}, {field: 'car_frame_no', title: '车架号', width: 180, edit: 'text'}, {field: 'engine_no', title: '发动机号', width: 100, edit: 'text'}, From 00b32fec1913b3a1f8a1112c6b31fff61e7279d1 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Fri, 2 Sep 2022 21:24:25 +0800 Subject: [PATCH 02/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E8=AF=952?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index 0e55e4b..ecace8b 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -223,7 +223,7 @@ url: '{:url("/index/carInfo/")}', //数据接口 where: getUrlParam('Object'), toolbar: true, - height: 'full-45', + height: 'full-230', page: true, //开启分页 limit: 20, loading: true, From 0d8917cc4fad087ced4fb7ed3b4e72d2440d3756 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Fri, 2 Sep 2022 21:28:03 +0800 Subject: [PATCH 03/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E8=AF=953?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 4 ++-- app/view/public/layout.html | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index ecace8b..2c2a7b4 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -1,4 +1,4 @@ -{extend name="public/layout" /} +{extend name="public/layout" /} {block name="header"} {block name="header"}{/block} From 7aeb09483b380e469a984f264e2829366a0e141b Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Fri, 2 Sep 2022 21:36:23 +0800 Subject: [PATCH 04/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E8=AF=954?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 4 ++-- app/view/public/layout.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index 2c2a7b4..9bba238 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -8,7 +8,7 @@ {/block} {block name="body"}
-
+

筛选

@@ -223,7 +223,7 @@ url: '{:url("/index/carInfo/")}', //数据接口 where: getUrlParam('Object'), toolbar: true, - height: 'full-230', + height: 'full-180', page: true, //开启分页 limit: 20, loading: true, diff --git a/app/view/public/layout.html b/app/view/public/layout.html index 7c6202b..02775a9 100644 --- a/app/view/public/layout.html +++ b/app/view/public/layout.html @@ -8,7 +8,7 @@ {block name="header"}{/block} -
+
    From 2b7835ec47ddb6de0fd3d99c6898ed5286374a6e Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Fri, 2 Sep 2022 21:46:47 +0800 Subject: [PATCH 05/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E8=AF=955?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 12 ++++++++++-- app/view/public/layout.html | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index 9bba238..71a3af5 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -8,7 +8,7 @@ {/block} {block name="body"}
    -
    +

    筛选

    @@ -154,7 +154,7 @@
    重置条件 - +
    @@ -357,6 +357,14 @@ }, where: param, }, 'data'); + let param_a = param; + delete param_a['car_phone_empty']; + delete param_a['car_frame_check']; + delete param_a['data_check']; + if (param_a.filter().length > 0) + $('#deletes-btn').css('display', 'inline-block') + else + $('#deletes-btn').css('display', 'none') }); $('#deletes-btn').on('click', function () { layer.confirm('真的删除行么', function(index){ diff --git a/app/view/public/layout.html b/app/view/public/layout.html index 02775a9..d400762 100644 --- a/app/view/public/layout.html +++ b/app/view/public/layout.html @@ -17,7 +17,7 @@
  • 重复车架
-
+
{block name="body"}{/block}
From ed53d994e65ce65b46c32f4d7f35eb8dc7fc8491 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Fri, 2 Sep 2022 21:49:27 +0800 Subject: [PATCH 06/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E8=AF=956?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 4 ++-- app/view/public/layout.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index 71a3af5..7d5c7f6 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -7,8 +7,8 @@ {/block} {block name="body"} -
-
+
+

筛选

diff --git a/app/view/public/layout.html b/app/view/public/layout.html index d400762..51c7da5 100644 --- a/app/view/public/layout.html +++ b/app/view/public/layout.html @@ -17,7 +17,7 @@
  • 重复车架
  • -
    +
    {block name="body"}{/block}
    From 8b1be76b44707d1c7da1329da2dc4cab72dba2a6 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Fri, 2 Sep 2022 21:50:55 +0800 Subject: [PATCH 07/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E8=AF=957?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 6 +++--- app/view/public/layout.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index 7d5c7f6..f4e28b5 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -7,8 +7,8 @@ {/block} {block name="body"} -
    -
    +
    +

    筛选

    @@ -223,7 +223,7 @@ url: '{:url("/index/carInfo/")}', //数据接口 where: getUrlParam('Object'), toolbar: true, - height: 'full-180', + height: 'full-200', page: true, //开启分页 limit: 20, loading: true, diff --git a/app/view/public/layout.html b/app/view/public/layout.html index 51c7da5..02775a9 100644 --- a/app/view/public/layout.html +++ b/app/view/public/layout.html @@ -17,7 +17,7 @@
  • 重复车架
  • -
    +
    {block name="body"}{/block}
    From 3f1b38ee5a889191b7305e629846a97856431332 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Fri, 2 Sep 2022 21:55:24 +0800 Subject: [PATCH 08/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E8=AF=958?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index f4e28b5..0dd46cf 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -223,7 +223,7 @@ url: '{:url("/index/carInfo/")}', //数据接口 where: getUrlParam('Object'), toolbar: true, - height: 'full-200', + height: 'full-220', page: true, //开启分页 limit: 20, loading: true, @@ -361,7 +361,7 @@ delete param_a['car_phone_empty']; delete param_a['car_frame_check']; delete param_a['data_check']; - if (param_a.filter().length > 0) + if (Object.values(param_a).filter(data => data).length > 0) $('#deletes-btn').css('display', 'inline-block') else $('#deletes-btn').css('display', 'none') From fe01f4b814600995d9e5d525378fe79a0da4bcff Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Fri, 2 Sep 2022 21:57:04 +0800 Subject: [PATCH 09/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E8=AF=959?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index 0dd46cf..4b84c90 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -223,12 +223,12 @@ url: '{:url("/index/carInfo/")}', //数据接口 where: getUrlParam('Object'), toolbar: true, - height: 'full-220', + height: 'full-210', page: true, //开启分页 limit: 20, loading: true, cols: [[ //表头 - {type: 'numbers'}, + {type: 'numbers', fixed: 'left'}, {field: 'car_no', title: '车牌号', width: 100, edit: 'text', fixed: 'left'}, {field: 'car_frame_no', title: '车架号', width: 180, edit: 'text'}, {field: 'engine_no', title: '发动机号', width: 100, edit: 'text'}, From 22c3fe0209f251b84c606821987670fa90aa6ae8 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Fri, 2 Sep 2022 22:59:12 +0800 Subject: [PATCH 10/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E8=B0=83=E8=AF=9510?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index 4b84c90..305d020 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -104,7 +104,7 @@
    -
    +
    @@ -112,7 +112,7 @@
    -
    +
    {if $repeat_frame_count > 0 } From 1243f63057cb37e9cd390c4f608885df4d55b404 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Sat, 3 Sep 2022 17:33:57 +0800 Subject: [PATCH 11/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 7 ++++--- extend/service/CarInfoHandle.php | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index 305d020..aac3ac1 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -95,12 +95,13 @@
    - +
    -
    -
    +
    万 -
    - +
    +
    diff --git a/extend/service/CarInfoHandle.php b/extend/service/CarInfoHandle.php index 7de4ec1..2439ee8 100644 --- a/extend/service/CarInfoHandle.php +++ b/extend/service/CarInfoHandle.php @@ -486,7 +486,7 @@ class CarInfoHandle if ($is_update_failed > 0) { CarInfoT::where('is_export_failed', $is_update_failed) ->update(['is_export_failed' => 0, 'is_update_bhx' => Db::raw('is_update_bhx - 1')]); - } else if ($car_info && $car_info->is_update_bhx <= 0) { + } else { CarInfoT::where('is_update_bhx', 0) ->where('is_export_bhx', $car_info->is_export_bhx) ->update(['is_update_bhx' => -1]); From 35cacd15cc07c0b5b1fb4b07b801b6aec14d94e6 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Sat, 3 Sep 2022 17:54:13 +0800 Subject: [PATCH 12/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E8=AF=951?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index aac3ac1..5986344 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -4,6 +4,24 @@ .layui-table-cell { padding: 0 5px; } + .layui-input, .layui-select, .layui-textarea { + height: 28px; + } + .layui-input-block { + height: 28px; + } + .layui-form-label { + padding: 4px 15px; + } + .layui-form-item { + margin-bottom: 4px; + } + .layui-form-mid { + padding: 0; + } + .layui-table td, .layui-table th { + padding: 0 15px; + } {/block} {block name="body"} @@ -11,7 +29,14 @@
    -

    筛选

    +

    + 筛选 +
    + + 重置条件 + +
    +

    @@ -105,7 +130,7 @@
    -
    +
    @@ -113,7 +138,7 @@
    -
    +
    {if $repeat_frame_count > 0 } @@ -152,11 +177,6 @@
    -
    - - 重置条件 - -
    From 1e05b63b559ebd8d9d4fe0e5fbb1cdf7407add30 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Sat, 3 Sep 2022 17:57:13 +0800 Subject: [PATCH 13/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E8=AF=952?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index 5986344..9b02709 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -9,6 +9,7 @@ } .layui-input-block { height: 28px; + min-height: auto; } .layui-form-label { padding: 4px 15px; @@ -55,42 +56,42 @@
    -
    +
    -
    +
    -
    +
    -
    +
    -
    +
    -
    +
    @@ -150,7 +151,7 @@
    -
    +
    From b9f9685ddfbf8fa08468448b0368835f0d93262f Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Sat, 3 Sep 2022 18:11:17 +0800 Subject: [PATCH 14/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E8=AF=953?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 98 +++++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 46 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index 9b02709..0779bfd 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -18,7 +18,7 @@ margin-bottom: 4px; } .layui-form-mid { - padding: 0; + padding: 0 !important; } .layui-table td, .layui-table th { padding: 0 15px; @@ -40,13 +40,6 @@
    -
    - -
    - -
    -
    @@ -61,14 +54,21 @@ class="layui-input" value="{$params.factory_model | default=''}">
    -
    +
    + +
    + +
    +
    +
    -
    +
    + +
    + +
    +
    +
    - +
    - +
    -
    +
    + +
    + +
    +
    +
    - +
    -
    - +
    -
    +
    - 月 - 日 + +
    -
    - 月 - 日 + +
    - +
    -
    万 -
    +
    -
    - -
    -
    -
    -
    - -
    - - - -
    -
    -
    - -
    - - {if $repeat_frame_count > 0 } - - {/if} - {if $peer_phone_count > 0 } - - {/if} +
    -
    +
    From 3fa4f9cd8cfbd79417667569078a554b9100b33a Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Sat, 3 Sep 2022 18:14:57 +0800 Subject: [PATCH 15/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E8=AF=954?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index 0779bfd..d8d30ca 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -96,7 +96,7 @@ class="layui-input" value="{$params.car_phone | default=''}"> -
    +
    -
    +
    +
    +
    -
    -
    - +
    +
    -
    +
    -
    -
    +
    From f518ca98e15f1efdbc20a2ba3cc31eaf72c33848 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Sat, 3 Sep 2022 18:16:23 +0800 Subject: [PATCH 16/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E8=AF=955?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index d8d30ca..f147f4c 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -135,12 +135,12 @@
    -
    +
    -
    -
    +
    From e52af174ad5adda7444869d373442089406ef93a Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Sat, 3 Sep 2022 18:26:06 +0800 Subject: [PATCH 17/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E8=AF=956?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 136 ++++++++++++++++++++++++++------------ 1 file changed, 92 insertions(+), 44 deletions(-) diff --git a/app/view/index/index.html b/app/view/index/index.html index f147f4c..525fadb 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -244,50 +244,7 @@ } } }); - var tableIns = layui.table.render({ - id: 'carInfo', - elem: '#car-info', - title:'车辆信息', - url: '{:url("/index/carInfo/")}', //数据接口 - where: getUrlParam('Object'), - toolbar: true, - height: 'full-210', - page: true, //开启分页 - limit: 20, - loading: true, - cols: [[ //表头 - {type: 'numbers', fixed: 'left'}, - {field: 'car_no', title: '车牌号', width: 100, edit: 'text', fixed: 'left'}, - {field: 'car_frame_no', title: '车架号', width: 180, edit: 'text'}, - {field: 'engine_no', title: '发动机号', width: 100, edit: 'text'}, - {field: 'factory_model', title: '厂牌型号', width: 200, edit: 'text'}, - {field: 'register_date', title: '注册日期', width: 100, edit: 'text'}, - {field: 'car_man', title: '车主', width: 80, edit: 'text'}, - {field: 'car_number', title: '车主证件号', width: 160, edit: 'text'}, - {field: 'car_phone', title: '车主电话', width: 120, edit: 'text'}, - {field: 'id_man', title: '被保险人', width: 80, edit: 'text'}, - {field: 'id_number', title: '被保险人证件号', width: 160, edit: 'text'}, - {field: 'id_phone', title: '被保险人电话', width: 120, edit: 'text'}, - {field: 'insured_man', title: '投保人', width: 80, edit: 'text'}, - {field: 'insured_number', title: '投保人证件号', width: 160, edit: 'text'}, - {field: 'insured_phone', title: '投保人电话', width: 120, edit: 'text'}, - {field: 'link_man_1', title: '联系人1', width: 80, edit: 'text'}, - {field: 'link_phone_1', title: '联系人电话1', width: 120, edit: 'text'}, - {field: 'link_man_2', title: '联系人2', width: 80, edit: 'text'}, - {field: 'link_phone_2', title: '联系人电话2', width: 120, edit: 'text'}, - {field: 'link_man_3', title: '联系人3', width: 80, edit: 'text'}, - {field: 'link_phone_3', title: '联系人电话3', width: 120, edit: 'text'}, - {field: 'purchase_price', title: '新车购置价', width: 100, edit: 'text'}, - {field: 'export_bhx_name', title: '导出清洗', width: 140, edit: 'text', templet:'#BhxNameTpl'}, - {field: 'export_bmc_name', title: '导出上传', width: 140, edit: 'text', templet:'#BmcNameTpl'}, - {fixed: 'right', width: 100, align:'center', toolbar: '#table-bar'} - ]], - done: function (res, curr, count) { - if(res.code == -1){ - $('#lock-screen').css('display','flex'); - } - } - }); + var tableIns = layui.table.render(tableRender('')); //监听行工具事件 layui.table.on('tool(car-info)', function(obj){ //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值" @@ -416,5 +373,96 @@ }); }); } + + //表格 头部数据函数封装 + function getTableCols(){ + return [[ //表头 + {type: 'numbers', fixed: 'left'}, + {field: 'car_no', title: '车牌号', width: 100, edit: 'text', fixed: 'left'}, + {field: 'car_frame_no', title: '车架号', width: 180, edit: 'text'}, + {field: 'engine_no', title: '发动机号', width: 100, edit: 'text'}, + {field: 'factory_model', title: '厂牌型号', width: 200, edit: 'text'}, + {field: 'register_date', title: '注册日期', width: 100, edit: 'text'}, + {field: 'car_man', title: '车主', width: 80, edit: 'text'}, + {field: 'car_number', title: '车主证件号', width: 160, edit: 'text'}, + {field: 'car_phone', title: '车主电话', width: 120, edit: 'text'}, + {field: 'id_man', title: '被保险人', width: 80, edit: 'text'}, + {field: 'id_number', title: '被保险人证件号', width: 160, edit: 'text'}, + {field: 'id_phone', title: '被保险人电话', width: 120, edit: 'text'}, + {field: 'insured_man', title: '投保人', width: 80, edit: 'text'}, + {field: 'insured_number', title: '投保人证件号', width: 160, edit: 'text'}, + {field: 'insured_phone', title: '投保人电话', width: 120, edit: 'text'}, + {field: 'link_man_1', title: '联系人1', width: 80, edit: 'text'}, + {field: 'link_phone_1', title: '联系人电话1', width: 120, edit: 'text'}, + {field: 'link_man_2', title: '联系人2', width: 80, edit: 'text'}, + {field: 'link_phone_2', title: '联系人电话2', width: 120, edit: 'text'}, + {field: 'link_man_3', title: '联系人3', width: 80, edit: 'text'}, + {field: 'link_phone_3', title: '联系人电话3', width: 120, edit: 'text'}, + {field: 'purchase_price', title: '新车购置价', width: 100, edit: 'text'}, + {field: 'export_bhx_name', title: '导出清洗', width: 140, edit: 'text', templet:'#BhxNameTpl'}, + {field: 'export_bmc_name', title: '导出上传', width: 140, edit: 'text', templet:'#BmcNameTpl'}, + {fixed: 'right', width: 100, align:'center', toolbar: '#table-bar'} + ]]; + } + + //layui表格渲染,其中url param为请求的数据接口以及其参数 + function tableRender(param){ + var tableCols = tableSetCol(getTableCols(), local_storage_key); + var renderParam = { + id: 'carInfo', + elem: '#car-info', + title:'车辆信息', + url: '{:url("/index/carInfo/")}', //数据接口 + where: getUrlParam('Object'), + toolbar: true, + height: 'full-210', + page: true, //开启分页 + limit: 20, + loading: true, + cols: [tableCols], + done: function (res, curr, count) { + if(res.code == -1){ + $('#lock-screen').css('display','flex'); + } + } + }; + return renderParam; + } + + //layui表格渲染后,事件需要重新绑定,并记录下筛选信息于localStorage + function tableDone(elem, col, key){ + elem.next().find('[lay-event="LAYTABLE_COLS"]').click(function(e) { + setTimeout(function() { + layui.$(e.currentTarget).find('.layui-form-checkbox').click(function() { + var local_config = {}; + for(var i = 0; i<=col.length-1; i++){ + if(typeof col[i].field !== 'undefined'){ + local_config[col[i].field] = col[i].hide ; + } + } + var saveColsConfig = { + key: 'local_config', + value: local_config + }; + layui.data(key, saveColsConfig); + }) + }, 50); + }) + } + + //layuitable reload或第一次加载的时候,根据存储的local_config 确定哪些列是否选中 + function tableSetCol(col, key){ + //参考写法:https://fly.layui.com/jie/50966/#item-1555416248250 + var config_custom= layui.data(key); + var local_config = config_custom['local_config'] || {}; + if(JSON.stringify(local_config) != '{}'){ + for(var i =0; i<=col.length-1; i++){ + if( typeof col[i].field !== "undefined" ){ + col[i].hide = local_config[col[i].field]; + } + } + } + return col; + } {/block} From 52954f1411e5ebfdbd19341d82e2b3f74910aa36 Mon Sep 17 00:00:00 2001 From: zcstatham <578322713@qq.com> Date: Sat, 3 Sep 2022 18:27:51 +0800 Subject: [PATCH 18/20] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E8=B0=83=E8=AF=957?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/view/index/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/view/index/index.html b/app/view/index/index.html index 525fadb..dfface3 100644 --- a/app/view/index/index.html +++ b/app/view/index/index.html @@ -214,6 +214,7 @@ {{# } }}