Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1f582cde
authored
Jul 23, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化设置
parent
9e715a74
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
30 deletions
app/Http/Services/SupplierTagService.php
resources/views/script/BatchAddSkuTagScript.blade.php
resources/views/script/SkuListScript.blade.php
resources/views/web/BatchAddSkuTag.blade.php
app/Http/Services/SupplierTagService.php
View file @
1f582cde
...
...
@@ -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显示类型
...
...
resources/views/script/BatchAddSkuTagScript.blade.php
View file @
1f582cde
...
...
@@ -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'
:
...
...
resources/views/script/SkuListScript.blade.php
View file @
1f582cde
...
...
@@ -520,7 +520,7 @@
layer
.
open
({
type
:
2
,
content
:
'/sku/BatchAddSkuTag?view=iframe&sku_ids='
+
skuIds
,
area
:
[
'80%'
,
'
8
0%'
],
area
:
[
'80%'
,
'
9
0%'
],
title
:
'批量设置SKU标签'
,
end
:
function
()
{
table
.
reload
(
'skuList'
);
...
...
resources/views/web/BatchAddSkuTag.blade.php
View file @
1f582cde
...
...
@@ -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($goodsLabel
SystemTagList as $item)
<tr>
<td>
{{$item['goods_label
']}}
</td>
<td>
{{$item['goods_label_
system_tags']}}
</td>
@foreach($goodsSource
SystemTagList as $item)
<tr>
<td>
{{$item['goods_source
']}}
</td>
<td>
{{$item['
system_tags']}}
</td>
</tr>
@endforeach
--}}
@endforeach
</tbody>
</table>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment