Commit 252ac297 by 杨树贤

优化页面

parent 711ce6a3
......@@ -133,6 +133,13 @@ class SkuController extends Controller
$supplier = $supplier->toArray();
$supplierCodes[$supplier['supplier_code']] = $supplier['supplier_name'] . '(' . $supplier['supplier_code'] . ')';
}
$skuIds = $request->input('sku_ids');
if (!empty($skuIds)) {
$skuIds = explode(',', $skuIds);
$this->data['skuIds'] = $skuIds;
}
$this->data['supplierCodes'] = $supplierCodes;
return $this->view('批量设置sku显示类型');
}
......
......@@ -36,6 +36,26 @@
});
// 点击行checkbox选中
$(document).on("click", ".layui-table-body table.layui-table tbody tr", function () {
let index = $(this).attr('data-index');
let tableBox = $(this).parents('.layui-table-box');
let tableDiv = null;
if (tableBox.find(".layui-table-fixed.layui-table-fixed-l").length > 0) {
tableDiv = tableBox.find(".layui-table-fixed.layui-table-fixed-l");
} else {
tableDiv = tableBox.find(".layui-table-body.layui-table-main");
}
let checkCell = tableDiv.find("tr[data-index=" + index + "]").find("td div.laytable-cell-checkbox div.layui-form-checkbox I");
if (checkCell.length > 0) {
checkCell.click();
}
});
$(document).on("click", "td div.laytable-cell-checkbox div.layui-form-checkbox", function (e) {
e.stopPropagation();
});
@if (request()->get('search')==1)
setTimeout(function () {
$('#getSupplierListButton').click();
......
......@@ -13,11 +13,6 @@
</blockquote>
<div class="layui-form-item">
<table class="layui-table">
{{-- <thead>--}}
{{-- <tr>--}}
{{-- <th>商品ID</th>--}}
{{-- </tr>--}}
{{-- </thead>--}}
<tbody>
@foreach($skuIds as $skuId)
<tr>
......
......@@ -6,6 +6,27 @@
<form class="layui-form" action="">
<div class="layui-card">
<div class="layui-card-header" style="height: 400px">
@if(request()->get('sku_ids'))
<div id="selected_sku_id">
<blockquote class="layui-elem-quote layui-text">
<b>选择的sku</b>
</blockquote>
<div class="layui-form-item">
<table class="layui-table">
<tbody>
@foreach($skuIds as $skuId)
<tr>
<td>{{$skuId}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endif
<blockquote class="layui-elem-quote layui-text">
<b>设置标签</b>
</blockquote>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment