Commit 1f582cde by 杨树贤

优化设置

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