Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
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
60ef74ac
authored
Apr 02, 2020
by
朱继来
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
新增商品限制digikey
parent
f8310197
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
public/js/goods.js
public/js/goods.js
View file @
60ef74ac
...
...
@@ -12,6 +12,7 @@
content
:
$
(
'#addGoods'
),
btn
:
[
'新增'
,
'取消'
],
btn1
:
function
()
{
var
sku_id
=
$
(
'.search-sku'
).
val
();
var
goods_min_num
=
$
(
'.sku-info'
).
find
(
'.moq'
).
text
();
// 最小起订量
var
goods_id
=
$
(
'.sku-info'
).
find
(
'.goods_id'
).
val
();
var
type
=
$
(
'.sku-info'
).
find
(
'.goods_type'
).
val
();
// 商品类型
...
...
@@ -20,6 +21,11 @@
var
goods_min_price
=
$
(
'.sku-info'
).
find
(
'.goods-min-price'
).
text
();
// 人民币单价
var
goods_min_price_us
=
$
(
'.sku-info'
).
find
(
'.goods-min-price-us'
).
text
();
// 美元单价
if
(
!
sku_id
)
{
layer
.
msg
(
'请输入SKUID'
);
return
false
;
}
if
(
goods_type
==
1
)
{
// 联营需要选择交货地
if
(
type
==
3
||
type
==
4
)
{
layer
.
msg
(
'自营商品不能添加到联营订单'
);
...
...
@@ -85,6 +91,10 @@
var
val
=
$
(
this
).
val
();
if
(
val
.
toLowerCase
()
==
'digikey'
)
{
layer
.
tips
(
'暂不能添加digikey商品'
,
$
(
this
));
// 临时添加
$
(
this
).
val
(
''
);
return
false
;
$
(
'.skuid-info'
).
css
(
'display'
,
'block'
);
$
(
'.layui-layer-iframe .layui-layer-btn, .layui-layer-page .layui-layer-btn'
).
css
(
'padding-top'
,
'50px'
);
}
else
{
...
...
@@ -234,11 +244,18 @@
return
false
;
}
$
(
'.sku-info'
).
show
();
var
data
=
resp
.
data
;
var
status_val
=
''
;
// 临时添加,限制新增digikey商品
if
(
data
.
supplier_id
==
7
)
{
layer
.
msg
(
'暂不能添加digikey商品'
);
$
(
'.search-sku'
).
val
(
''
);
return
false
;
}
$
(
'.sku-info'
).
show
();
$
(
'.goods_name'
).
text
(
data
.
goods_name
);
$
(
'.brand_name'
).
text
(
data
.
brand_name
);
$
(
'.supplier_name'
).
text
(
data
.
supplier_name
);
...
...
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