Commit 1f582cde by 杨树贤

优化设置

parent 9e715a74
......@@ -172,7 +172,14 @@ class SupplierTagService
$data = array_map(function ($item) {
return json_decode($item, true);
}, $data);
return $data;
$result = [];
foreach ($data as $key => $value) {
$result[] = [
'goods_label' => config('field.SkuGoodsLabel')[$key],
'system_tags' => implode(',', $value['system_tags']),
];
}
return $result;
}
//获取供应商的接入方式标签
......@@ -183,7 +190,14 @@ class SupplierTagService
$data = array_map(function ($item) {
return json_decode($item, true);
}, $data);
return $data;
$result = [];
foreach ($data as $key => $value) {
$result[] = [
'goods_source' => config('field.SkuGoodsLabel')[$key],
'system_tags' => implode(',', $value['system_tags']),
];
}
return $result;
}
//批量更新供应商的SKU显示类型
......
......@@ -74,14 +74,6 @@
// 按SKU显示类型tab的校验规则
function validateGoodsLabelTab(data) {
// 检查SKU是否已选择
let skuIds = data.field.sku_ids;
if (!skuIds || skuIds.trim() === '') {
layer.msg('请先选择SKU', {
icon: 5
});
return false;
}
// 检查是否选择了显示类型
if (!data.field.goods_label || data.field.goods_label === '') {
......@@ -104,14 +96,6 @@
// 按SKU接入方式tab的校验规则
function validateGoodsSourceTab(data) {
// 检查SKU是否已选择
let skuIds = data.field.sku_ids;
if (!skuIds || skuIds.trim() === '') {
layer.msg('请先选择SKU', {
icon: 5
});
return false;
}
// 检查是否选择了接入方式
if (!data.field.goods_source || data.field.goods_source === '') {
......@@ -134,7 +118,7 @@
form.on('submit(addSkuTag)', function(data) {
let currentTab = getCurrentTabName();
data.field.current_tab = currentTab;
// 根据当前tab进行不同的校验
switch (currentTab) {
case 'tag_setting':
......
......@@ -520,7 +520,7 @@
layer.open({
type: 2,
content: '/sku/BatchAddSkuTag?view=iframe&sku_ids=' + skuIds,
area: ['80%', '80%'],
area: ['80%', '90%'],
title: '批量设置SKU标签',
end: function () {
table.reload('skuList');
......
......@@ -35,6 +35,11 @@
</tr>
</thead>
<tbody>
@foreach(explode(',',request()->get('sku_ids')) as $sku_id)
<tr>
<td>{{$sku_id}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
......@@ -108,12 +113,12 @@
</tr>
</thead>
<tbody>
{{-- @foreach($goodsLabelSystemTagList as $item)
<tr>
<td>{{$item['goods_label']}}</td>
<td>{{$item['goods_label_system_tags']}}</td>
@foreach($goodsLabelSystemTagList as $item)
<tr>
<td>{{$item['goods_label']}}</td>
<td>{{$item['system_tags']}}</td>
</tr>
@endforeach --}}
@endforeach
</tbody>
</table>
</div>
......@@ -150,12 +155,12 @@
</tr>
</thead>
<tbody>
{{-- @foreach($goodsLabelSystemTagList as $item)
<tr>
<td>{{$item['goods_label']}}</td>
<td>{{$item['goods_label_system_tags']}}</td>
@foreach($goodsSourceSystemTagList as $item)
<tr>
<td>{{$item['goods_source']}}</td>
<td>{{$item['system_tags']}}</td>
</tr>
@endforeach --}}
@endforeach
</tbody>
</table>
</div>
......
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