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
272e752e
authored
May 21, 2025
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化布局
parent
ce63ba6c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
19 deletions
.codeiumignore
app/Http/Controllers/SupplierController.php
app/Http/Services/SupplierTagService.php
resources/views/web/supplier/SupplierBase.blade.php
.codeiumignore
0 → 100644
View file @
272e752e
# Add directories or file patterns to ignore during indexing (e.g. foo/ or *.csv)
vendor/
app/Http/Controllers/SupplierController.php
View file @
272e752e
...
...
@@ -236,10 +236,10 @@ class SupplierController extends Controller
];
},
$systemTags
);
$customerTags
=
$tagService
->
getTagsBySupplierId
(
$supplierId
,
2
);
$supplier
[
'customer_tags'
]
=
$customerTags
?
implode
(
','
,
$customerTags
[
'list'
])
:
[]
;
$supplier
[
'customer_tags'
]
=
$customerTags
?
implode
(
','
,
$customerTags
[
'list'
])
:
''
;
$supplierModel
=
new
SupplierChannelModel
();
$supplierModel
->
where
(
'supplier_id'
,
$supplierId
)
->
update
([
'customer_tags'
=>
$supplier
[
'customer_tags'
],
'customer_tags'
=>
$supplier
[
'customer_tags'
]
?:
''
,
]);
$this
->
data
[
'supplier'
]
=
$supplier
;
$this
->
data
[
'address'
]
=
$supplierService
->
getAddress
(
$supplierId
);
...
...
@@ -251,7 +251,6 @@ class SupplierController extends Controller
$this
->
data
[
'brand_init_value'
]
=
(
new
StandardBrandService
())
->
getBrandInitValue
(
$supplier
[
'main_brands'
]);
$this
->
data
[
'exclude_brand_init_value'
]
=
(
new
StandardBrandService
())
->
getBrandInitValue
(
$supplier
[
'main_brands'
]);
$this
->
data
[
'agency_brand_init_value'
]
=
(
new
StandardBrandService
())
->
getBrandInitValue
(
$supplier
[
'agency_brands'
]);
$ruleService
=
new
RuleService
();
$this
->
data
[
'rule'
]
=
$ruleService
->
getSupplierRule
(
$supplier
[
'supplier_code'
]);
...
...
app/Http/Services/SupplierTagService.php
View file @
272e752e
...
...
@@ -28,18 +28,23 @@ class SupplierTagService
//标签系统获取标签
public
function
getSystemTags
()
{
$response
=
$this
->
client
->
get
(
'/get?tag_use=14'
);
$data
=
json_decode
(
$response
->
getBody
()
->
getContents
(),
true
);
$data
=
!
empty
(
$data
[
'data'
])
?
$data
[
'data'
]
:
[];
$result
=
[];
foreach
(
$data
as
$key
=>
$value
)
{
if
(
empty
(
$value
))
{
continue
;
try
{
$response
=
$this
->
client
->
get
(
'/get?tag_use=14'
);
$data
=
json_decode
(
$response
->
getBody
()
->
getContents
(),
true
);
$data
=
!
empty
(
$data
[
'data'
])
?
$data
[
'data'
]
:
[];
$result
=
[];
foreach
(
$data
as
$key
=>
$value
)
{
if
(
empty
(
$value
))
{
continue
;
}
$result
[]
=
[
'tag_id'
=>
$value
,
'tag_name'
=>
$value
,
];
}
$result
[]
=
[
'tag_id'
=>
$value
,
'tag_name'
=>
$value
,
];
}
catch
(
\Exception
$exception
)
{
return
[];
}
return
$result
;
}
...
...
@@ -56,15 +61,14 @@ class SupplierTagService
}
catch
(
\Exception
$exception
)
{
return
[];
}
}
public
function
getSystemTagsBySupplierId
(
$supplierId
)
{
$supplier
=
SupplierChannelModel
::
where
(
'supplier_id'
,
$supplierId
)
->
select
([
'system_tags'
,
'united_tags'
])
->
first
()
->
toArray
();
$systemTags
=
$supplier
[
'system_tags'
]
?
explode
(
','
,
$supplier
[
'system_tags'
])
:
[];
$unitedTags
=
$supplier
[
'united_tags'
]
?
explode
(
','
,
$supplier
[
'united_tags'
])
:
[];
$systemTags
=
$supplier
[
'system_tags'
]
?
explode
(
','
,
$supplier
[
'system_tags'
])
:
[];
$unitedTags
=
$supplier
[
'united_tags'
]
?
explode
(
','
,
$supplier
[
'united_tags'
])
:
[];
return
array_merge
(
$systemTags
,
$unitedTags
);
}
...
...
resources/views/web/supplier/SupplierBase.blade.php
View file @
272e752e
...
...
@@ -256,7 +256,6 @@
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-col-md6"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
><span
class=
"require"
>
*
</span>
合作类型
</label>
<div
class=
"layui-input-block"
>
...
...
@@ -269,8 +268,9 @@
title=
"{{$type}}"
>
@endforeach
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-col-md3"
>
<div
class=
"layui-inline"
>
@inject('statusPresenter','App\Presenters\StatusPresenter')
...
...
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