Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
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
39c280d0
authored
Feb 24, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
css
parent
0b9224a0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
src/views/Store/list.vue
src/views/Store/list.vue
View file @
39c280d0
...
@@ -671,20 +671,41 @@ export default {
...
@@ -671,20 +671,41 @@ export default {
})
})
},
},
changeStatus
(
status
)
{
changeStatus
(
status
)
{
var
time_arr
=
[];
//过滤出上架有效期时间数组
var
sku_ids
=
[];
//过滤出sku_ids数组
if
(
this
.
multipleSelection
.
length
==
0
)
{
if
(
this
.
multipleSelection
.
length
==
0
)
{
this
.
$message
({
this
.
$message
({
message
:
'请至少选择一条数据'
,
message
:
'请至少选择一条数据'
,
type
:
'warning'
type
:
'warning'
});
});
return
return
;
}
var
time
=
new
Date
();
//当前时间
time_arr
=
this
.
multipleSelection
.
map
(
obj
=>
{
return
obj
.
cp_time
;
});
var
times
=
time_arr
.
filter
((
item
)
=>
{
if
(
new
Date
(
item
)
<
time
)
{
return
item
;
}
});
if
(
times
.
length
>
0
)
{
this
.
$message
({
message
:
'您勾选的数据中,有型号的“上架有效期”低于当前的日期,请先维护上架有效期;'
,
type
:
'warning'
});
return
;
}
}
var
arr
=
[];
arr
=
this
.
multipleSelection
.
map
(
obj
=>
{
sku_ids
=
this
.
multipleSelection
.
map
(
obj
=>
{
return
obj
.
goods_id
;
return
obj
.
goods_id
;
});
});
this
.
$http
(
'post'
,
"/api/sku/updateSkuStatus"
,
{
this
.
$http
(
'post'
,
"/api/sku/updateSkuStatus"
,
{
sku_ids
:
arr
.
join
(
","
),
sku_ids
:
sku_ids
.
join
(
","
),
status
:
status
==
1
?
'passed'
:
'offshelf'
status
:
status
==
1
?
'passed'
:
'offshelf'
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
...
...
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