细节优化
parent
b063bfb179
commit
3719797079
|
|
@ -707,7 +707,7 @@
|
|||
<div class="am-modal am-modal-no-btn" tabindex="-1" id="buy-order-submit-modal">
|
||||
<div class="am-modal-dialog">
|
||||
<div class="am-modal-bd">
|
||||
<div class="content am-vertical-align-middle am-padding-vertical-sm">
|
||||
<div class="content am-vertical-align-middle am-padding-vertical-sm am-text-xs">
|
||||
<p class="am-text-success">支付跳转中、请勿关闭页面</p>
|
||||
<p class="am-text-warning am-margin-top-lg">支付失败或长时间未响应</p>
|
||||
<p class="am-text-warning am-margin-xs">
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
];
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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%;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue