From 10b7ca28be7608a8b9166be4817828bc874c687e Mon Sep 17 00:00:00 2001 From: devil Date: Sat, 29 Feb 2020 18:06:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E5=88=97=E8=A1=A8=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/view/default/goods/index.html | 284 +++++++++--------- .../admin/view/default/public/header.html | 2 + .../view/default/public/page_loading.html | 3 + application/tags.php | 18 +- public/static/common/css/common.css | 66 +++- public/static/common/js/common.js | 76 +++++ 6 files changed, 301 insertions(+), 148 deletions(-) create mode 100644 application/admin/view/default/public/page_loading.html diff --git a/application/admin/view/default/goods/index.html b/application/admin/view/default/goods/index.html index 3de3c37de..e7092967b 100755 --- a/application/admin/view/default/goods/index.html +++ b/application/admin/view/default/goods/index.html @@ -134,169 +134,177 @@ - - - - - - - - - - - - - - - - - {{if !empty($data_list)}} - {{foreach $data_list as $v}} - - - - - - - - - - + + {{/foreach}} + {{/if}} + +
编号标题名称销售价格(元)上下架首页推荐库存数量商品型号品牌更多操作
{{$v.id}} - - - - {{$v.title}} - {{if !empty($v['simple_desc'])}} -

{{$v.simple_desc}}

- {{/if}} -
- {{$v.price}} - {{if !empty($v['original_price']) and $v['original_price'] gt 0}} -
原价 {{$v.original_price}} - {{/if}} -
- - - - {{$v.inventory}} {{$v.inventory_unit}}{{$v.model}}{{$v.brand_name}} - 查看更多 -
-
-
-

详情内容

- × -
-
-
-
标题名称
-
{{$v.title}}
+
+ + + + + + + + + + + + + + + + + {{if !empty($data_list)}} + {{foreach $data_list as $v}} + + + + + + + + + + - + - - {{/foreach}} - {{/if}} - -
编号标题名称销售价格(元)上下架首页推荐库存数量商品型号品牌更多操作
{{$v.id}} + + + + {{$v.title}} + {{if !empty($v['simple_desc'])}} +

{{$v.simple_desc}}

+ {{/if}} +
+ {{$v.price}} + {{if !empty($v['original_price']) and $v['original_price'] gt 0}} +
原价 {{$v.original_price}} + {{/if}} +
+ + + + {{$v.inventory}} {{$v.inventory_unit}}{{$v.model}}{{$v.brand_name}} + 查看更多 +
+
+
+

详情内容

+ × +
+
+
+
标题名称
+
{{$v.title}}
-
商品简述
-
{{$v.simple_desc}}
+
商品简述
+
{{$v.simple_desc}}
-
销售价格(元)
-
- {{$v.price}} - {{if !empty($v['original_price']) and $v['original_price'] gt 0}} -
原价 {{$v.original_price}} - {{/if}} -
+
销售价格(元)
+
+ {{$v.price}} + {{if !empty($v['original_price']) and $v['original_price'] gt 0}} +
原价 {{$v.original_price}} + {{/if}} +
-
上下架
-
{{:lang('common_is_shelves_list')[$v['is_shelves']]['name']}}
+
上下架
+
{{:lang('common_is_shelves_list')[$v['is_shelves']]['name']}}
-
库存数量
-
{{$v.inventory}} {{$v.inventory_unit}}
+
库存数量
+
{{$v.inventory}} {{$v.inventory_unit}}
-
最低起购数量
-
{{$v.buy_min_number}} {{$v.inventory_unit}}
+
最低起购数量
+
{{$v.buy_min_number}} {{$v.inventory_unit}}
-
单次最大购买数量
-
{{if $v['buy_max_number'] eq 0}}不限{{else /}}{{$v.buy_max_number}} {{$v.inventory_unit}}{{/if}}
+
单次最大购买数量
+
{{if $v['buy_max_number'] eq 0}}不限{{else /}}{{$v.buy_max_number}} {{$v.inventory_unit}}{{/if}}
-
商品型号
-
{{$v.model}}
+
商品型号
+
{{$v.model}}
-
品牌
-
{{$v.brand_name}}
+
品牌
+
{{$v.brand_name}}
-
生产地
-
{{$v.place_origin_name}}
+
生产地
+
{{$v.place_origin_name}}
-
商品分类
-
{{$v.category_text}}
+
商品分类
+
{{$v.category_text}}
-
购买赠送积分
-
{{$v.give_integral}}
+
购买赠送积分
+
{{$v.give_integral}}
-
扣减库存
-
{{:lang('common_is_text_list')[$v['is_deduction_inventory']]['name']}}
+
扣减库存
+
{{:lang('common_is_text_list')[$v['is_deduction_inventory']]['name']}}
-
访问次数
-
{{$v.access_count}}
+
访问次数
+
{{$v.access_count}}
-
电脑端详情
-
-
{{$v.content_web|raw}}
-
+
电脑端详情
+
+
{{$v.content_web|raw}}
+
-
虚拟商品展示数据
-
-
{{$v.fictitious_goods_value|raw}}
-
+
虚拟商品展示数据
+
+
{{$v.fictitious_goods_value|raw}}
+
-
SEO标题
-
{{$v.seo_title}}
+
SEO标题
+
{{$v.seo_title}}
-
SEO关键字
-
{{$v.seo_keywords}}
+
SEO关键字
+
{{$v.seo_keywords}}
-
SEO描述
-
{{$v.seo_desc}}
+
SEO描述
+
{{$v.seo_desc}}
-
创建时间
-
{{$v.add_time}}
+
创建时间
+
{{$v.add_time}}
-
更新时间
-
{{$v.upd_time}}
-
-
-
-
-
- - - - +
更新时间
+
{{$v.upd_time}}
+ + + + +
+ + + + - - {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}} -
- plugins_view_admin_goods_list_operation -
- {{/if}} - {{php}} - $hook_name = 'plugins_view_admin_goods_list_operation'; - $hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true, 'id'=>$v['id'], 'data'=>$v]); - if(!empty($hook_data) && is_array($hook_data)) - { - foreach($hook_data as $hook) + + {{if isset($shopxo_is_develop) and $shopxo_is_develop eq true and (!isset($is_footer) or $is_footer eq 1)}} +
+ plugins_view_admin_goods_list_operation +
+ {{/if}} + {{php}} + $hook_name = 'plugins_view_admin_goods_list_operation'; + $hook_data = Hook::listen($hook_name, ['hook_name'=>$hook_name, 'is_backend'=>true, 'id'=>$v['id'], 'data'=>$v]); + if(!empty($hook_data) && is_array($hook_data)) { - if(is_string($hook) || is_int($hook)) + foreach($hook_data as $hook) { - echo htmlspecialchars_decode($hook); + if(is_string($hook) || is_int($hook)) + { + echo htmlspecialchars_decode($hook); + } } } - } - {{/php}} -
+ {{/php}} +
+ {{if empty($data_list)}}
没有相关数据
{{/if}} diff --git a/application/admin/view/default/public/header.html b/application/admin/view/default/public/header.html index ec5c0df9f..f2ff5ab23 100755 --- a/application/admin/view/default/public/header.html +++ b/application/admin/view/default/public/header.html @@ -48,6 +48,8 @@ var __price_symbol__ = '{{$price_symbol}}'; +{{include file="public/page_loading" /}} + {{if !empty($plugins_admin_view_common_top_data) and is_array($plugins_admin_view_common_top_data) and (!isset($is_header) or $is_header eq 1)}} {{foreach $plugins_admin_view_common_top_data as $hook}} diff --git a/application/admin/view/default/public/page_loading.html b/application/admin/view/default/public/page_loading.html new file mode 100644 index 000000000..6b1374c60 --- /dev/null +++ b/application/admin/view/default/public/page_loading.html @@ -0,0 +1,3 @@ +
+ +
\ No newline at end of file diff --git a/application/tags.php b/application/tags.php index ba5123987..44d9d8920 100755 --- a/application/tags.php +++ b/application/tags.php @@ -46,26 +46,26 @@ return array ( 2 => 'app\\plugins\\distribution\\Hook', 3 => 'app\\plugins\\membershiplevelvip\\Hook', ), + 'plugins_service_buy_order_insert_begin' => + array ( + 0 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + ), 'plugins_service_buy_order_insert_end' => array ( 0 => 'app\\plugins\\excellentbuyreturntocash\\Hook', 1 => 'app\\plugins\\distribution\\Hook', ), + 'plugins_service_order_aftersale_audit_handle_end' => + array ( + 0 => 'app\\plugins\\excellentbuyreturntocash\\Hook', + 1 => 'app\\plugins\\distribution\\Hook', + ), 'plugins_service_order_status_change_history_success_handle' => array ( 0 => 'app\\plugins\\excellentbuyreturntocash\\Hook', 1 => 'app\\plugins\\coupon\\Hook', 2 => 'app\\plugins\\distribution\\Hook', ), - 'plugins_service_buy_order_insert_begin' => - array ( - 0 => 'app\\plugins\\excellentbuyreturntocash\\Hook', - ), - 'plugins_service_order_aftersale_audit_handle_end' => - array ( - 0 => 'app\\plugins\\excellentbuyreturntocash\\Hook', - 1 => 'app\\plugins\\distribution\\Hook', - ), 'plugins_css' => array ( 0 => 'app\\plugins\\coupon\\Hook', diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css index 892307f74..b400fa5a2 100755 --- a/public/static/common/css/common.css +++ b/public/static/common/css/common.css @@ -400,4 +400,68 @@ button.colorpicker-submit:active { -webkit-box-orient: vertical; line-height: 18px; height: 35px; -} \ No newline at end of file +} + +/** + * 公共加载页面view + */ +.am-page-loading { + opacity: 1; + background: #f5f5f5; + display: block; +} + +/** + * 表格样式 + */ +.am-table-scrollable-horizontal { + border: 1px solid #ddd; +} +.am-table-scrollable-horizontal .am-table { + border-collapse: collapse; + border: 0; + margin: 0; +} +.am-table-scrollable-horizontal .am-table tr th:first-child, +.am-table-scrollable-horizontal .am-table tr td:first-child { + border-left: 0; +} +.am-table-scrollable-horizontal .am-table tr th { + background: #e0e0e0; +} +.am-table-scrollable-horizontal .am-table-td-fixed-first th:nth-child(2), +.am-table-scrollable-horizontal .am-table-td-fixed-first td:nth-child(2) { + padding-left: 110px; +} +.am-table-scrollable-horizontal .am-table-td-fixed-last th:nth-last-child(2), +.am-table-scrollable-horizontal .am-table-td-fixed-last td:nth-last-child(2) { + padding-right: 110px; +} + +.am-table-scrollable-horizontal .am-table-td-fixed-first th:first-child, +.am-table-scrollable-horizontal .am-table-td-fixed-first td:first-child, +.am-table-scrollable-horizontal .am-table-td-fixed-last th:last-child, +.am-table-scrollable-horizontal .am-table-td-fixed-last td:last-child { + position: absolute; + width: 100px; + height: auto; + text-align: center; +} +.am-table-scrollable-horizontal .am-table-td-fixed-first td:first-child, +.am-table-scrollable-horizontal .am-table-td-fixed-last td:last-child { + background: #fff; +} +.am-table-scrollable-horizontal .am-table-td-fixed-first th:first-child, +.am-table-scrollable-horizontal .am-table-td-fixed-first td:first-child { + -webkit-box-shadow: 5px 0px 10px rgba(136, 136, 136, 0.3); + -moz-box-shadow: 5px 0px 10px rgba(136, 136, 136, 0.3); + box-shadow: 5px 0px 10px rgba(136, 136, 136, 0.3); + left: 0; +} +.am-table-scrollable-horizontal .am-table-td-fixed-last th:last-child, +.am-table-scrollable-horizontal .am-table-td-fixed-last td:last-child { + -webkit-box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3); + -moz-box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3); + box-shadow: -5px 0px 10px rgba(136, 136, 136, 0.3); + right: 0; +} diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index 0e7aecf1b..ae3d6b977 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -1548,10 +1548,76 @@ function MapInit(lng, lat, level, point, is_dragend) } } +/** + * 表格容器处理 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2020-02-29 + * @desc description + */ +function TableContainerInit() +{ + $('.am-table-scrollable-horizontal .am-table.am-table-td-fixed-first thead tr, .am-table-scrollable-horizontal .am-table.am-table-td-fixed-last thead tr').each(function(k, v) + { + // 第一列 + if($(this).parents('.am-table').hasClass('am-table-td-fixed-first')) + { + $(this).find('th:first').css('left', $(this).parents('.am-table').offset().left); + } + + // 最后一列 + if($(this).parents('.am-table').hasClass('am-table-td-fixed-last')) + { + var $obj = $(this).parents('.am-table'); + var width = $(document.body).width(); + var left = $obj.offset().left; + var right = (width > $obj.width()) ? width-$obj.width()-left : width-$obj.parent().width()-left; + $(this).find('th:last').css('right', right); + } + + }); + $('.am-table-scrollable-horizontal .am-table.am-table-td-fixed-first tbody tr, .am-table-scrollable-horizontal .am-table.am-table-td-fixed-last tbody tr').each(function(k, v) + { + // 容器 + var height = $(this).height(); + if(height > 0) + { + $(this).find('td').css('height', height+'px'); + } + + // 第一列 + if($(this).parents('.am-table').hasClass('am-table-td-fixed-first')) + { + $(this).find('td:first').css('left', $(this).parents('.am-table').offset().left); + } + + // 最后一列 + if($(this).parents('.am-table').hasClass('am-table-td-fixed-last')) + { + var $obj = $(this).parents('.am-table'); + var width = $(document.body).width(); + var left = $obj.offset().left; + var right = (width > $obj.width()) ? width-$obj.width()-left : width-$obj.parent().width()-left; + $(this).find('td:last').css('right', right); + } + }); +} + // 公共数据操作 $(function() { + // 浏览器窗口实时事件 + $(window).resize(function() + { + // 表格初始化 + TableContainerInit(); + }); + + // 表格初始化 + TableContainerInit(); + // 全屏操作 $('.fullscreen-event').on('click', function() { @@ -2219,4 +2285,14 @@ $(function() } }); + /** + * 页面加载 loading + */ + if($('.am-page-loading').length > 0) + { + setTimeout(function() { + $('.am-page-loading').fadeOut(500); + }, 300); + } + }); \ No newline at end of file