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
36dd61a2
authored
Jul 11, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
审核规则的精简
parent
baa95f61
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
17 deletions
app/Http/Services/DataService.php
app/Http/Services/SupplierService.php
app/Http/Services/SupplierSkuAuditRulerService.php
app/Http/routes.php
config/fixed.php
resources/views/web/SupplierDetail.blade.php
app/Http/Services/DataService.php
View file @
36dd61a2
...
@@ -1312,7 +1312,7 @@ class DataService
...
@@ -1312,7 +1312,7 @@ class DataService
"supplier_id"
=>
17
,
"supplier_id"
=>
17
,
"goods_status"
=>
1
,
"goods_status"
=>
1
,
];
];
$return
=
curl
(
$esUrl
.
'/es/countZhuanmaiSource'
,
$map
,
1
);
$return
=
curl
(
$esUrl
.
'/es/countZhuanmaiSource'
,
$map
,
1
);
$return
=
json_decode
(
$return
,
true
);
$return
=
json_decode
(
$return
,
true
);
$yunxinUploadSupplierCount
=
0
;
$yunxinUploadSupplierCount
=
0
;
if
(
isset
(
$return
[
'code'
])
&
$return
[
'code'
]
==
0
)
{
if
(
isset
(
$return
[
'code'
])
&
$return
[
'code'
]
==
0
)
{
...
@@ -1560,4 +1560,17 @@ class DataService
...
@@ -1560,4 +1560,17 @@ class DataService
})
->
export
(
'csv'
);
})
->
export
(
'csv'
);
}
}
//初始化sku规则
public
function
initSkuRulers
()
{
//全部供应商修改默认值
SupplierChannelModel
::
where
(
'supplier_id'
,
12270
)
->
update
([
// SupplierChannelModel::where('supplier_id', '>', 0)->update([
'sku_audit_ruler'
=>
json_encode
([
'skip'
=>
1
,
'audit_ruler'
=>
[
"1"
=>
1
],
])
]);
}
}
}
\ No newline at end of file
app/Http/Services/SupplierService.php
View file @
36dd61a2
...
@@ -109,7 +109,6 @@ class SupplierService
...
@@ -109,7 +109,6 @@ class SupplierService
//sku上传规则相关设置
//sku上传规则相关设置
$skuAuditRulerService
=
new
SupplierSkuAuditRulerService
();
$skuAuditRulerService
=
new
SupplierSkuAuditRulerService
();
$channel
[
'sku_audit_ruler'
]
=
$skuAuditRulerService
->
getSkuAuditRulerForDB
(
$channel
[
'sku_audit_ruler'
]);
$channel
[
'sku_audit_ruler'
]
=
$skuAuditRulerService
->
getSkuAuditRulerForDB
(
$channel
[
'sku_audit_ruler'
]);
/**新增供应商操作**/
/**新增供应商操作**/
if
(
empty
(
$channel
[
'supplier_id'
]))
{
if
(
empty
(
$channel
[
'supplier_id'
]))
{
//处理附件信息,新增的时候才会有附件信息提交过来
//处理附件信息,新增的时候才会有附件信息提交过来
...
...
app/Http/Services/SupplierSkuAuditRulerService.php
View file @
36dd61a2
...
@@ -57,12 +57,12 @@ class SupplierSkuAuditRulerService
...
@@ -57,12 +57,12 @@ class SupplierSkuAuditRulerService
*/
*/
$defaultRuler
=
[
$defaultRuler
=
[
'1'
=>
1
,
'1'
=>
1
,
'2'
=>
1
,
//
'2' => 1,
'3'
=>
1
,
//
'3' => 1,
'4'
=>
1
//
'4' => 1
];
];
if
(
empty
(
$auditData
))
{
if
(
empty
(
$auditData
))
{
$auditRuler
[
'skip'
]
=
0
;
$auditRuler
[
'skip'
]
=
1
;
$auditRuler
[
'audit_ruler'
]
=
$defaultRuler
;
$auditRuler
[
'audit_ruler'
]
=
$defaultRuler
;
return
json_encode
(
$auditRuler
);
return
json_encode
(
$auditRuler
);
}
}
...
...
app/Http/routes.php
View file @
36dd61a2
...
@@ -77,7 +77,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
...
@@ -77,7 +77,7 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
Route
::
match
([
'get'
,
'post'
],
'/test'
,
function
()
{
(
new
\App\Http\Services\DataService
())
->
statisticsSkuNumberFromSKu
();
(
new
\App\Http\Services\DataService
())
->
initSkuRulers
();
// (new \App\Http\Services\DataService())->initialMainBrandsLimit();
// (new \App\Http\Services\DataService())->initialMainBrandsLimit();
// (new \App\Http\Services\DataService())->initialMainBrandsToSkuRuler();
// (new \App\Http\Services\DataService())->initialMainBrandsToSkuRuler();
...
...
config/fixed.php
View file @
36dd61a2
...
@@ -184,15 +184,15 @@ return [
...
@@ -184,15 +184,15 @@ return [
"skip"
=>
0
,
//1无需审核,0需要审核
"skip"
=>
0
,
//1无需审核,0需要审核
"audit_ruler"
=>
[
"audit_ruler"
=>
[
"1"
=>
1
,
//1=>1 如果其中一条数据型号与品牌都存在,value是1,代表需要审核;value是0,直接通过
"1"
=>
1
,
//1=>1 如果其中一条数据型号与品牌都存在,value是1,代表需要审核;value是0,直接通过
"2"
=>
1
,
//依次类推类推
//
"2" => 1, //依次类推类推
"3"
=>
1
,
//
"3" => 1,
"4"
=>
1
,
//
"4" => 1,
],
],
"name_map"
=>
[
"name_map"
=>
[
"1"
=>
'型号与品牌已存在'
,
"1"
=>
'型号与品牌已存在'
,
"2"
=>
'型号不存在,品牌存在'
,
//
"2" => '型号不存在,品牌存在',
"3"
=>
'型号不存在,品牌不存在'
,
//
"3" => '型号不存在,品牌不存在',
"4"
=>
'型号存在,品牌不存在'
,
//
"4" => '型号存在,品牌不存在',
]
]
],
],
...
...
resources/views/web/SupplierDetail.blade.php
View file @
36dd61a2
...
@@ -178,10 +178,10 @@
...
@@ -178,10 +178,10 @@
</div>
</div>
<div
class=
"layui-row"
>
<div
class=
"layui-row"
>
<span
class=
"required_field"
>
*
</span>
主营品牌 :{{$supplier['main_brand_names']}}
<span
class=
"required_field"
>
*
</span>
主营品牌 :{{$supplier['main_brand_names']}}
{{--
<div
style=
""
>
--}}
{{--
<div
style=
""
>
--}}
{{-- 主营品牌数量--}}
{{-- 主营品牌数量--}}
{{-- :{{$supplier['main_brands_limit']!=-1?$supplier['main_brands_limit']:'无限制'}}--}}
{{-- :{{$supplier['main_brands_limit']!=-1?$supplier['main_brands_limit']:'无限制'}}--}}
{{--
</div>
--}}
{{--
</div>
--}}
</div>
</div>
@if($supplier['supplier_group'] == \App\Model\SupplierChannelModel::SUPPLIER_GROUP_MIX)
@if($supplier['supplier_group'] == \App\Model\SupplierChannelModel::SUPPLIER_GROUP_MIX)
<div
class=
"layui-row"
>
<div
class=
"layui-row"
>
...
...
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