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
151b0a48
authored
Jun 02, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修改主营品牌限制权限逻辑
parent
d2800004
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
app/Http/routes.php
resources/views/script/supplier/SupplierBaseScript.blade.php
app/Http/routes.php
View file @
151b0a48
...
...
@@ -70,9 +70,7 @@ Route::match(['get', 'post'], '/test', function () {
(
new
\App\Http\Services\DataService
())
->
statisticsSkuNumber
();
// (new \App\Http\Services\DataService())->initialMainBrandsLimit();
// (new \App\Http\Services\DataService())->initialMainBrandsToSkuRuler();
\App\Model\LogModel
::
where
(
'action'
,
'批量配置供应商sku上架有效期'
)
->
update
([
'ignore_audit_check'
=>
1
]);
// \App\Model\SupplierChannelModel::where('supplier_name', '厦门市三安集成电路有限公司')->update([
// 'status' => 2,
// 'update_time' => time(),
...
...
resources/views/script/supplier/SupplierBaseScript.blade.php
View file @
151b0a48
...
...
@@ -176,8 +176,17 @@
}
}
let
mainBrandsLimitObj
=
$
(
'#main_brands_limit'
);
//修改主营品牌数量限制权限校验
let
canModifyBrandLimit
=
{{
checkPerm
(
'ModifyMainBrandsLimit'
)?
1
:
0
}};
let
supplierGroupMap
=
{
!!
json_encode
(
config
(
'fixed.SupplierGroup'
))
!!
};
let
limitMap
=
{
!!
json_encode
(
config
(
'field.SupplierGroupMainBrandsLimitMap'
))
!!
};
if
(
!
canModifyBrandLimit
){
mainBrandsLimitObj
.
attr
(
'disabled'
,
true
);
mainBrandsLimitObj
.
addClass
(
'layui-disabled'
);
mainBrandsLimitTypeObj
.
attr
(
'disabled'
,
true
);
mainBrandsLimitTypeObj
.
addClass
(
'layui-disabled'
);
}
//监听主营品牌限制的数字,不同供应商性质的数量限制不一样
$
(
document
).
on
(
'change'
,
'#main_brands_limit'
,
function
()
{
let
supplierGroup
=
$
(
'#supplier_group'
).
val
();
...
...
@@ -200,12 +209,10 @@
}
else
{
$
(
'#agency_brands_div'
).
hide
();
}
// 这里还要去判断主营品牌数量限制的切换
// 原厂,代理商,分销平台,品牌数量不做限制;默认为“无限制”;
// 混合分销商,现货商,代工厂,品牌数量默认为10;
// 方案商,其他,品牌数量默认为5;
let
mainBrandsLimitObj
=
$
(
'#main_brands_limit'
);
let
limit
=
limitMap
[
data
.
value
];
console
.
log
(
limit
)
if
(
limit
===
-
1
)
{
...
...
@@ -213,8 +220,10 @@
mainBrandsLimitObj
.
addClass
(
'layui-disabled'
);
mainBrandsLimitTypeObj
.
val
(
2
);
}
else
{
mainBrandsLimitObj
.
attr
(
'disabled'
,
false
);
mainBrandsLimitObj
.
removeClass
(
'layui-disabled'
);
if
(
canModifyBrandLimit
)
{
mainBrandsLimitObj
.
attr
(
'disabled'
,
false
);
mainBrandsLimitObj
.
removeClass
(
'layui-disabled'
);
}
mainBrandsLimitTypeObj
.
val
(
1
);
}
form
.
render
(
'select'
);
...
...
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