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
15d5ee35
authored
Jun 19, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
界面
parent
4cef2975
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
255 additions
and
12 deletions
app/Http/Controllers/SupplierController.php
resources/views/script/supplier/SupplierRulerScript.blade.php
resources/views/web/UpdateSupplier.blade.php
resources/views/web/supplier/SupplierBase.blade.php
resources/views/web/supplier/SupplierRuler.blade.php
app/Http/Controllers/SupplierController.php
View file @
15d5ee35
...
@@ -228,6 +228,7 @@ class SupplierController extends Controller
...
@@ -228,6 +228,7 @@ class SupplierController extends Controller
config
(
'field.SkipChangeSupplierTypeNames'
));
config
(
'field.SkipChangeSupplierTypeNames'
));
$this
->
data
[
'sku_upload_log_count'
]
=
(
new
SkuUploadLogService
())
->
getSkuUploadLogCount
(
$supplierId
);
$this
->
data
[
'sku_upload_log_count'
]
=
(
new
SkuUploadLogService
())
->
getSkuUploadLogCount
(
$supplierId
);
$this
->
data
[
'brand_init_value'
]
=
(
new
StandardBrandService
())
->
getBrandInitValue
(
$supplier
[
'main_brands'
]);
$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'
]);
$this
->
data
[
'agency_brand_init_value'
]
=
(
new
StandardBrandService
())
->
getBrandInitValue
(
$supplier
[
'agency_brands'
]);
return
$this
->
view
(
'编辑供应商'
);
return
$this
->
view
(
'编辑供应商'
);
}
}
...
...
resources/views/script/supplier/SupplierRulerScript.blade.php
View file @
15d5ee35
...
@@ -16,5 +16,145 @@
...
@@ -16,5 +16,145 @@
$
(
'#hk_max'
).
val
(
9999999
);
$
(
'#hk_max'
).
val
(
9999999
);
}
}
});
});
//渲染主营品牌的多选
function
getExcludeBrandOption
(
element
,
idName
=
'exclude_main_brands'
)
{
return
{
el
:
'#'
+
element
,
filterable
:
true
,
paging
:
true
,
height
:
'250px'
,
size
:
'mini'
,
direction
:
'auto'
,
autoRow
:
true
,
prop
:
{
name
:
'brand_name'
,
value
:
'brand_id'
,
},
remoteSearch
:
true
,
pageRemote
:
true
,
template
({
item
,
sels
,
name
,
value
})
{
return
item
.
brand_name
+
'
<
span
style
=
"position: absolute; right: 10px; color: #8799a3"
>
' + item.mapping_brand_names + '
<
/span>
'
},
filterMethod
:
function
(
val
,
item
,
index
,
prop
)
{
},
pageSize
:
30
,
remoteMethod
:
function
(
val
,
cb
,
show
,
pageIndex
)
{
//val: 搜索框的内容, 不开启搜索默认为空, cb: 回调函数, show: 当前下拉框是否展开, pageIndex: 当前第几页
$
.
ajax
({
url
:
'/api/common/getStandardBrandList'
,
type
:
'post'
,
data
:
{
brand_name
:
val
,
page
:
pageIndex
},
dataType
:
'json'
,
timeout
:
10000
,
success
:
function
(
res
)
{
if
(
!
res
)
return
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
5
});
if
(
res
.
err_code
===
0
)
{
cb
(
res
.
data
,
res
.
last_page
);
}
else
{
layer
.
msg
(
res
.
err_msg
,
{
icon
:
6
});
}
},
error
:
function
()
{
return
layer
.
msg
(
'网络错误,请重试'
,
{
icon
:
5
});
}
});
},
on
:
function
(
data
)
{
let
arr
=
data
.
arr
;
let
excludeBrandIds
=
''
;
for
(
let
i
in
arr
)
{
excludeBrandIds
+=
arr
[
i
].
brand_id
+
','
;
}
$
(
'#'
+
idName
).
val
(
excludeBrandIds
);
},
};
}
//主营品牌的渲染
let
brandOption
=
getExcludeBrandOption
(
'exclude_brand_selector'
);
let
excludeBrandSelector
=
xmSelect
.
render
(
brandOption
);
let
excludeBrandIds
=
$
(
'#exclude_main_brands'
).
attr
(
'value'
);
let
excludeBrandInitValue
=
{
!!
json_encode
(
$exclude_brand_init_value
?:[])
!!
};
excludeBrandSelector
.
setValue
(
excludeBrandInitValue
);
//批量新增主营品牌
$
(
'#batchAddExcludeMainBrands'
).
click
(
function
()
{
layer
.
open
({
title
:
"批量增加主营品牌"
,
area
:
[
'600px'
,
'400px'
],
type
:
1
,
content
:
$
(
'#batchAddExcludeMainBrandsDiv'
)
});
});
$
(
'#confirmBatchAddExcludeMainBrands'
).
click
(
function
()
{
let
brandValue
=
excludeBrandSelector
.
getValue
();
console
.
log
(
brandValue
);
let
standardBrandNames
=
$
(
'#batchAddExcludeMainBrandsTextarea'
).
val
();
//请求接口获取返回的数据,并且合并目前选择的主营品牌,重新渲染xm-select
let
res
=
ajax
(
'/api/supplier/getBatchAddExcludeMainBrandsData'
,
{
standard_brand_names
:
standardBrandNames
});
let
data
=
res
.
data
;
let
brandNames
=
arrayColumn
(
data
,
'brand_name'
).
join
(
','
)
$
(
'#batchAddExcludeMainBrandsBlockQuote'
).
text
(
brandNames
);
if
(
data
.
length
===
0
)
{
layer
.
msg
(
'没有匹配到有效的标准品牌'
,
{
icon
:
5
});
return
false
;
}
else
{
brandValue
=
brandValue
.
concat
(
data
);
brandValue
=
multiArrayUnique
(
brandValue
);
excludeBrandSelector
.
setValue
(
brandValue
);
$
(
'#exclude_main_brands'
).
val
(
arrayColumn
(
brandValue
,
'brand_id'
).
join
(
','
));
$
(
'#batchAddExcludeMainBrandsTextarea'
).
val
(
''
);
$
(
'#batchAddExcludeMainBrandsBlockQuote'
).
text
(
''
);
layer
.
msg
(
'批量添加主营品牌成功'
,
{
icon
:
6
});
}
});
$
(
'#closeBatchAddExcludeMainBrands'
).
click
(
function
()
{
$
(
'#batchAddExcludeMainBrandsTextarea'
).
val
(
''
);
$
(
'#batchAddExcludeMainBrandsBlockQuote'
).
text
(
''
);
layer
.
closeAll
();
});
table
.
render
({
elem
:
'#purchaseRemarkList'
,
url
:
'/api/purchase_remark/GetPurchaseRemarkList'
,
method
:
'get'
,
cellMinWidth
:
80
,
//全局定义常规单元格的最小宽度
where
:
{
supplier_id
:
getQueryVariable
(
"supplier_id"
)
},
loading
:
true
,
first
:
true
,
//不显示首页
last
:
false
,
//不显示尾页
cols
:
[[
{
field
:
'participate_type_name'
,
title
:
'参与类型'
,
align
:
'center'
,
width
:
140
},
{
field
:
'participate_content'
,
title
:
'传真'
,
align
:
'center'
,
width
:
140
},
{
field
:
'duration'
,
title
:
'开始时间 - 截至时间'
,
align
:
'center'
,
width
:
200
},
{
field
:
'remark'
,
title
:
'备注内容'
,
align
:
'center'
},
]],
id
:
'purchaseRemarkList'
,
page
:
{},
});
//新增联系方式
$
(
"#add_purchase_remark"
).
click
(
function
()
{
let
supplierId
=
getQueryVariable
(
'supplier_id'
);
layer
.
open
({
type
:
2
,
content
:
'/purchase_remark/AddPurchaseRemark?view=iframe&supplier_id='
+
supplierId
,
area
:
[
'600px'
,
'525px'
],
title
:
'新增采购备注'
,
end
:
function
()
{
// 监听弹窗关闭
table
.
reload
(
'purchaseRemarkList'
);
}
});
})
});
});
</script>
</script>
\ No newline at end of file
resources/views/web/UpdateSupplier.blade.php
View file @
15d5ee35
...
@@ -78,9 +78,9 @@
...
@@ -78,9 +78,9 @@
lay-filter=
"applyAuditSupplier"
>
审核未通过,确认重新提交审核
lay-filter=
"applyAuditSupplier"
>
审核未通过,确认重新提交审核
</button>
</button>
@else
@else
{{--
<button
type=
"button"
class=
"layui-btn layui-btn submit-loading"
lay-submit--
}}
{{--
<button
type=
"button"
class=
"layui-btn layui-btn submit-loading"
lay-submit--
}}
{{
--
lay-filter=
"updateSupplier"
>
确认修改供应商--}}
{{
--
lay-filter=
"updateSupplier"
>
确认修改供应商--}}
{{--
</button>
--}}
{{--
</button>
--}}
@if ($supplier['status'] == \App\Model\SupplierChannelModel::STATUS_PASSED
&&
checkPerm('IgnoreUpdateAudit'))
@if ($supplier['status'] == \App\Model\SupplierChannelModel::STATUS_PASSED
&&
checkPerm('IgnoreUpdateAudit'))
<button
type=
"button"
class=
"layui-btn layui-btn submit-loading"
lay-submit
<button
type=
"button"
class=
"layui-btn layui-btn submit-loading"
lay-submit
lay-filter=
"updateSupplier"
>
确认修改供应商
lay-filter=
"updateSupplier"
>
确认修改供应商
...
@@ -104,39 +104,40 @@
...
@@ -104,39 +104,40 @@
<ul
class=
"layui-tab-title"
>
<ul
class=
"layui-tab-title"
>
<li
<li
@
if
(
request
()
-
>
get('tab')=='base_info'||empty(request()->get('tab')))
@
if
(
request
()
-
>
get('tab')=='base_info'||empty(request()->get('tab')))
class="layui-this"
class="layui-this"
@endif
@endif
id="base_info">基本信息
id="base_info">基本信息
</li>
</li>
<li
<li
@
if
(
request
()
-
>
get('tab')=='contact')
@
if
(
request
()
-
>
get('tab')=='contact')
class="layui-this"
class="layui-this"
@endif
@endif
id="contact">联系人
id="contact">联系人
</li>
</li>
<li
<li
@
if
(
request
()
-
>
get('tab')=='ruler')
@
if
(
request
()
-
>
get('tab')=='ruler')
class="layui-this"
class="layui-this"
@endif
@endif
id="ruler">特殊规则
id="ruler">特殊规则
</li>
</li>
<li
@
if
(!
checkPerm
('
UpdateSkuRuler
'))
style=
"display: none"
@
endif
<li
@
if
(!
checkPerm
('
UpdateSkuRuler
'))
style=
"display: none"
@
endif
@
if
(
request
()
-
>
get('tab')=='sku_ruler')
@
if
(
request
()
-
>
get('tab')=='sku_ruler')
class="layui-this"
class="layui-this"
@endif
@endif
id="sku_ruler">SKU概况
id="sku_ruler">SKU概况
</li>
</li>
<li
@
if
(!
checkPerm
('
ViewSupplierExamination
'))
style=
"display: none"
@
endif
<li
@
if
(!
checkPerm
('
ViewSupplierExamination
'))
style=
"display: none"
@
endif
@
if
(
request
()
-
>
get('tab')=='examination')
@
if
(
request
()
-
>
get('tab')=='examination')
class="layui-this"
class="layui-this"
@endif
@endif
id="examination">检测记录
id="examination">检测记录
</li>
</li>
</ul>
</ul>
<div
class=
"layui-tab-content"
>
<div
class=
"layui-tab-content"
>
<div
class=
"layui-tab-item @if(request()->get('tab')=='base_info'||empty(request()->get('tab'))) layui-show @endif"
>
<div
class=
"layui-tab-item
@if(request()->get('tab')=='base_info'||empty(request()->get('tab'))) layui-show @endif"
>
<div
class=
"layui-row"
>
<div
class=
"layui-row"
>
<input
type=
"hidden"
name=
"apply_audit_reason"
id=
"apply_audit_reason"
>
<input
type=
"hidden"
name=
"apply_audit_reason"
id=
"apply_audit_reason"
>
<input
type=
"hidden"
name=
"status"
value=
"{{$supplier['status'] or 0}}"
>
<input
type=
"hidden"
name=
"status"
value=
"{{$supplier['status'] or 0}}"
>
...
@@ -236,7 +237,7 @@
...
@@ -236,7 +237,7 @@
<div
class=
"layui-tab-item @if(request()->get('tab')=='ruler') layui-show @endif"
>
<div
class=
"layui-tab-item @if(request()->get('tab')=='ruler') layui-show @endif"
>
<div
<div
@
if
(!
checkPerm
('
ViewRuler
')
||
!
checkPerm
('
UpdateRuler
'))
@
if
(!
checkPerm
('
ViewRuler
')
||
!
checkPerm
('
UpdateRuler
'))
style=
"display: none"
style=
"display: none"
@
endif
>
@
endif
>
@include('web.supplier.SupplierRuler')
@include('web.supplier.SupplierRuler')
</div>
</div>
...
...
resources/views/web/supplier/SupplierBase.blade.php
View file @
15d5ee35
...
@@ -237,7 +237,6 @@
...
@@ -237,7 +237,6 @@
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{{--选择“混合分销商”时,在主营品牌下面新增一栏“代理品牌”;代理品牌取值同主营品牌一样--}}
{{--选择“混合分销商”时,在主营品牌下面新增一栏“代理品牌”;代理品牌取值同主营品牌一样--}}
<div
class=
"layui-form-item"
id=
"agency_brands_div"
<div
class=
"layui-form-item"
id=
"agency_brands_div"
...
...
resources/views/web/supplier/SupplierRuler.blade.php
View file @
15d5ee35
<blockquote
class=
"layui-elem-quote layui-text"
>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
运费设置
<span
style=
"color: orange;margin-left: 10px"
>
PS:设置后的运费规则,将会应用在网站下单页面;
</span></b>
</blockquote>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
商品总价不满
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[max]"
id=
"cn_max"
value=
"{{$supplier['extra_fee']['cn']['max'] or ''}}"
lay-verify=
"num"
>
</div>
<div
class=
"layui-form-label"
style=
"width: 100px;margin-left: -20px"
>
元(人民币),收取
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[price]"
value=
"{{$supplier['extra_fee']['cn']['price'] or ''}}"
lay-verify=
"float"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width: 40px;margin-left: -20px"
>
元运费
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
type=
"checkbox"
title=
"全渠道收费"
lay-skin=
"primary"
lay-filter=
"cn_filter"
>
</div>
</div>
</div>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
商品上架限制
</b>
</blockquote>
<div
class=
"layui-form-item"
>
<span>
ECCN编码包含以下内容的,不允许上架
</span>
<div
class=
"layui-form-item layui-form-text"
>
<textarea
name=
"credit_investigation"
placeholder=
"请输入资信调查"
class=
"layui-textarea"
>
{{$supplier['credit_investigation'] or ''}}
</textarea>
</div>
<span
style=
"color: darkgrey"
>
支持通配符“%”,如:①EAR开头:EAR%;②002结尾:%002;③包含A99:%A99%;
</span>
</div>
<div
class=
"layui-form-item"
>
<span>
供应商品牌包含以下标准品牌的,不允许上架
</span>
<div
class=
"layui-form-item"
>
<div
class=
"layui-col-md12"
>
<div
id=
"exclude_brand_selector"
class=
"layui-input-inline"
style=
"width: 100%;"
>
</div>
<input
type=
"hidden"
name=
"exclude_main_brands"
value=
""
id=
"main_brands"
value=
"{{$supplier['exclude_main_brands'] or ''}}"
>
<a
style=
"color: #009688;"
id=
"batchAddExcludeMainBrands"
>
+批量增加主营品牌
</a>
<div
id=
"batchAddExcludeMainBrandsDiv"
style=
"padding-left: 30px;padding-top: 30px;padding-right: 30px;display: none"
>
<div
class=
"layui-col-md12"
>
<textarea
rows=
"7"
placeholder=
"标准品牌名称,多个用英文逗号隔开"
class=
"layui-textarea"
id=
"batchAddExcludeMainBrandsTextarea"
></textarea>
<blockquote
class=
"layui-elem-quote"
id=
"batchAddExcludeMainBrandsBlockQuote"
></blockquote>
<span
style=
"color: red"
id=
"invalid_exclude_brand_name_list"
></span>
</div>
<div
class=
"layui-col-md12"
>
<button
class=
"layui-btn layui-btn-sm"
type=
"button"
id=
"confirmBatchAddExcludeMainBrands"
>
验证并且添加
</button>
<button
class=
"layui-btn layui-btn-sm layui-btn-primary"
type=
"button"
id=
"closeBatchAddExcludeMainBrands"
>
关闭
</button>
</div>
</div>
</div>
</div>
</div>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
采购备注
<span
style=
"color: orange;margin-left: 10px"
>
PS:设置后的备注信息,将会应用在【询报价系统】供销售看到;
</span></b>
</blockquote>
<div
class=
"layui-form-item"
>
<button
class=
"layui-btn layui-btn-sm"
id=
"addPurchaserRemark"
>
添加备注
</button>
<table
class=
"layui-table"
lay-filter=
"purchaseRemarkList"
id=
"purchaseRemarkList"
></table>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
商品总价不满
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[max]"
id=
"cn_max"
value=
"{{$supplier['extra_fee']['cn']['max'] or ''}}"
lay-verify=
"num"
>
</div>
<div
class=
"layui-form-label"
style=
"width: 100px;margin-left: -20px"
>
元(人民币),收取
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
class=
"layui-input"
type=
"text"
name=
"cn[price]"
value=
"{{$supplier['extra_fee']['cn']['price'] or ''}}"
lay-verify=
"float"
value=
""
>
</div>
<div
class=
"layui-form-label"
style=
"width: 40px;margin-left: -20px"
>
元运费
</div>
<div
class=
"layui-input-inline"
style=
"width: 100px;"
>
<input
type=
"checkbox"
title=
"全渠道收费"
lay-skin=
"primary"
lay-filter=
"cn_filter"
>
</div>
</div>
</div>
<blockquote
class=
"layui-elem-quote layui-text"
>
<b>
采购附加费设置
</b>
<b>
采购附加费设置
</b>
</blockquote>
</blockquote>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
...
...
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