diff --git a/app/index/view/default/buy/index.html b/app/index/view/default/buy/index.html index 5b7c4f360..5cedd0ce3 100755 --- a/app/index/view/default/buy/index.html +++ b/app/index/view/default/buy/index.html @@ -707,7 +707,7 @@
支付跳转中、请勿关闭页面
支付失败或长时间未响应
diff --git a/app/module/FormHandleModule.php b/app/module/FormHandleModule.php index c2ad736d4..943fe4f86 100644 --- a/app/module/FormHandleModule.php +++ b/app/module/FormHandleModule.php @@ -554,7 +554,8 @@ class FormHandleModule { if(isset($v['view_type']) && $v['view_type'] == 'field' && !empty($v['label']) && !empty($v['view_key'])) { - $title[$v['view_key']] = [ + $key = is_array($v['view_key']) ? $v['view_key'][0] : $v['view_key']; + $title[$key] = [ 'name' => $v['label'], 'type' => 'string', ]; diff --git a/app/service/BuyService.php b/app/service/BuyService.php index 705b5cb07..10b8b6214 100755 --- a/app/service/BuyService.php +++ b/app/service/BuyService.php @@ -747,6 +747,7 @@ class BuyService 'spec_barcode' => empty($vs['spec_barcode']) ? '' : $vs['spec_barcode'], 'buy_number' => intval($vs['stock']), 'model' => $vs['model'], + 'inventory_unit' => $vs['inventory_unit'], 'extends' => empty($vs['extends']) ? [] : json_decode($vs['extends'], true), ]; } diff --git a/app/service/GoodsService.php b/app/service/GoodsService.php index 8c9800c8d..c7dff8988 100755 --- a/app/service/GoodsService.php +++ b/app/service/GoodsService.php @@ -638,6 +638,9 @@ class GoodsService $place_origin_list = RegionService::RegionName(array_column($data, 'place_origin')); } + // 商品分类 + $category_group = $is_category ? self::GoodsListCategoryGroupList(array_column($data, $data_key_field)) : []; + // 开始处理数据 foreach($data as &$v) { @@ -751,9 +754,15 @@ class GoodsService // 是否需要分类名称 if($is_category && !empty($data_id)) { - $v['category_ids'] = Db::name('GoodsCategoryJoin')->where(['goods_id'=>$data_id])->column('category_id'); - $category_name = Db::name('GoodsCategory')->where(['id'=>$v['category_ids']])->column('name'); - $v['category_text'] = implode(',', $category_name); + if(array_key_exists($data_id, $category_group)) + { + $temp = $category_group[$data_id]; + $v['category_ids'] = $temp['category_ids']; + $v['category_text'] = empty($temp['category_names']) ? '' : implode(',', $temp['category_names']); + } else { + $v['category_ids'] = []; + $v['category_text'] = ''; + } } // 规格基础 @@ -834,6 +843,44 @@ class GoodsService return DataReturn('success', 0, $data); } + /** + * 商品列表获取产品分类分组信息 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2022-10-13 + * @desc description + * @param [array] $goods_ids [商品id] + */ + public static function GoodsListCategoryGroupList($goods_ids) + { + $result = []; + $category_join = Db::name('GoodsCategoryJoin')->where(['goods_id'=>$goods_ids])->field('goods_id,category_id')->select()->toArray(); + if(!empty($category_join)) + { + $category_name = Db::name('GoodsCategory')->where(['id'=>array_unique(array_column($category_join, 'category_id'))])->column('name', 'id'); + if(!empty($category_name)) + { + foreach($category_join as $v) + { + if(array_key_exists($v['category_id'], $category_name)) + { + if(!array_key_exists($v['goods_id'], $result)) + { + $result[$v['goods_id']] = [ + 'category_ids' => [], + 'category_names' => [], + ]; + } + $result[$v['goods_id']]['category_ids'][] = $v['category_id']; + $result[$v['goods_id']]['category_names'][] = $category_name[$v['category_id']]; + } + } + } + } + return $result; + } + /** * 获取商品封面图片 * @author Devil diff --git a/public/static/admin/default/css/pluginsadmin.css b/public/static/admin/default/css/pluginsadmin.css index 9cf59ed50..4e3e05c57 100755 --- a/public/static/admin/default/css/pluginsadmin.css +++ b/public/static/admin/default/css/pluginsadmin.css @@ -143,6 +143,9 @@ /** * 删除modal */ +.am-modal-confirm .am-modal-dialog { + box-shadow: rgb(85 85 85 / 60%) 0px 0px 30px; +} @media only screen and (min-width: 641px) { .plugins-data-list ul li { width: 50%; diff --git a/public/static/common/css/common.css b/public/static/common/css/common.css index eabdaf7ac..c69fc9b91 100755 --- a/public/static/common/css/common.css +++ b/public/static/common/css/common.css @@ -548,6 +548,7 @@ form.am-form-pure .business-form-block { } .am-modal-dialog { width: auto; + box-shadow: rgb(136 136 136 / 60%) 0px 0px 30px; } .am-modal-dialog .am-modal-bd span { vertical-align: middle; @@ -1053,10 +1054,12 @@ button.colorpicker-submit img { .am-table-scrollable-horizontal .am-table-striped > tbody > tr:nth-child(odd) > td.am-grid-fixed-right { background-color: #fafafa; } -.am-table-scrollable-horizontal .am-table tr th, +.am-table-scrollable-horizontal .am-table tr th { + z-index: 5; +} .am-table-scrollable-horizontal .am-table tr th.am-grid-fixed-left, .am-table-scrollable-horizontal .am-table tr th.am-grid-fixed-right { - z-index: 5; + z-index: 6; } .am-table-scrollable-horizontal .am-table tr .am-grid-fixed-left { -webkit-box-shadow: 1px 0px 1px #ddd; @@ -1244,6 +1247,19 @@ button.colorpicker-submit img { /** * 内部表格 */ +.form-inside-table-layer { + max-height: 50px; + overflow: hidden; +} +.form-inside-table-layer-auto { + max-height: 100%; +} +.form-inside-stretch-submit { + margin-top: 5px; +} +.form-inside-stretch-submit > a { + text-decoration: none !important; +} .form-inside-table tr th, .form-inside-table tr td { padding: 5px !important; @@ -1252,6 +1268,8 @@ button.colorpicker-submit img { .form-inside-table tr th { background: transparent !important; padding-top: 0 !important; + color: #777777; + font-weight: 300 !important; } .form-inside-table tr th:first-child, .form-inside-table tr td:first-child { @@ -1263,6 +1281,7 @@ button.colorpicker-submit img { } .form-inside-table tr:last-child td { padding-bottom: 0 !important; + border-bottom: 0 !important; } /** @@ -1447,7 +1466,7 @@ form .am-tab-panel .am-form-group:last-child { * 弹出框 */ .am-popover { - max-width: 260px; + max-width: 320px; border-radius: 2px; } diff --git a/public/static/common/js/common.js b/public/static/common/js/common.js index 389364f1b..10e01fc15 100755 --- a/public/static/common/js/common.js +++ b/public/static/common/js/common.js @@ -2877,6 +2877,31 @@ $(function() DataPrintHandle($(this).data('is-pdf')); }); + // 表格内部表格伸缩事件 + $(document).on('click', '.form-inside-stretch-submit > a', function() + { + var $container = $(this).parents('.form-inside-table-container'); + var $layer = $container.find('.form-inside-table-layer'); + var open_text = $(this).data('open-text') || null; + var close_text = $(this).data('close-text') || null; + if($layer.hasClass('form-inside-table-layer-auto')) + { + $layer.removeClass('form-inside-table-layer-auto'); + $(this).removeClass('am-icon-angle-double-up').addClass('am-icon-angle-double-down'); + if(open_text != null) + { + $(this).text(' '+open_text); + } + } else { + $layer.addClass('form-inside-table-layer-auto'); + $(this).addClass('am-icon-angle-double-up').removeClass('am-icon-angle-double-down'); + if(close_text != null) + { + $(this).text(' '+close_text); + } + } + }); + // 页面加载loading if($('.am-page-loading').length > 0) { @@ -3126,6 +3151,22 @@ $(function() FormDataFill(data, '#'+tag); }); + /** + * 公共无限节点 - 双击编辑 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2022-10-16 + * @desc description + */ + $(document).on('dblclick', '#tree table.am-table td', function() + { + if($(this).find('.submit-edit').length > 0) + { + $(this).find('.submit-edit').trigger('click'); + } + }); + /** * 公共无限节点 - 新子节点 * @author Devil