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
7e422f37
authored
Feb 24, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
库存管理/现货库存:修改上架有效期可修改超过一个月
parent
c66bc603
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
src/views/Store/list.vue
src/views/Store/list.vue
View file @
7e422f37
...
...
@@ -288,7 +288,7 @@
<el-button
type=
"primary"
@
click=
"submitHq"
>
确 定
</el-button>
</span>
</el-dialog>
<!--修改
交
期弹窗-->
<!--修改
上架有效
期弹窗-->
<el-dialog
title=
"修改上架有效期"
:visible
.
sync=
"dialogVisible3"
width=
"900px"
>
<div
class=
"kc-mask"
>
<el-table
:data=
"cpdata"
border
max-height=
"600"
>
...
...
@@ -300,10 +300,10 @@
<span
v-else-if=
"scope.row.goods_status==3"
>
下架
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"cp_time"
label=
"上架有效期"
width=
"160"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
prop=
"cp_time
_temp
"
label=
"上架有效期"
width=
"160"
:show-overflow-tooltip=
"true"
></el-table-column>
<el-table-column
label=
"修改上架有效期"
width=
"160"
>
<
template
slot-scope=
"scope"
>
<el-date-picker
v-model=
"scope.row.cp_time"
:picker-options=
"pickerOptions"
type=
"date"
placeholder=
"选择日期"
style=
"width: 128px"
value-format=
"yyyy-MM-dd"
></el-date-picker>
<el-date-picker
v-model=
"scope.row.cp_time"
:picker-options=
"pickerOptions
(scope.row.cp_time)
"
type=
"date"
placeholder=
"选择日期"
style=
"width: 128px"
value-format=
"yyyy-MM-dd"
></el-date-picker>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -329,11 +329,7 @@ export default {
name
:
"list"
,
data
()
{
return
{
pickerOptions
:
{
disabledDate
(
time
)
{
return
time
.
getTime
()
+
24
*
3600
*
1000
*
7
}
},
pickerOptions
:
{},
total
:
0
,
limit
:
10
,
page
:
1
,
...
...
@@ -369,6 +365,14 @@ export default {
}
this
.
getData
();
this
.
getSkuRankList
();
this
.
pickerOptions
=
function
(
val
)
{
return
{
disabledDate
(
time
)
{
let
limit_date
=
new
Date
(
val
);
return
time
.
getTime
()
>
limit_date
.
getTime
()
+
3600
*
1000
*
24
*
30
;
}
}
}
},
methods
:
{
/**
...
...
@@ -582,6 +586,9 @@ export default {
}
else
{
//修改上架有效期
this
.
dialogVisible3
=
true
;
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
this
.
selectData
[
i
].
cp_time_temp
=
this
.
selectData
[
i
].
cp_time
;
}
this
.
cpdata
=
this
.
selectData
;
}
},
...
...
@@ -592,8 +599,8 @@ export default {
var
arr_
=
{}
for
(
var
i
=
0
;
i
<
this
.
cpdata
.
length
;
i
++
)
{
arr_
[
this
.
cpdata
[
i
][
'goods_id'
]]
=
{}
if
(
this
.
cpdata
[
i
][
'cp_time
s'
]
&&
this
.
cpdata
[
i
][
'cp_times
'
]
!=
'undefined'
)
{
arr_
[
this
.
cpdata
[
i
][
'goods_id'
]].
cp_time
=
this
.
cpdata
[
i
][
'cp_time
s
'
]
if
(
this
.
cpdata
[
i
][
'cp_time
'
]
&&
this
.
cpdata
[
i
][
'cp_time
'
]
!=
'undefined'
)
{
arr_
[
this
.
cpdata
[
i
][
'goods_id'
]].
cp_time
=
this
.
cpdata
[
i
][
'cp_time'
]
}
}
this
.
$http
(
'post'
,
"/api/sku/updateSku"
,
arr_
).
then
(
res
=>
{
...
...
@@ -602,8 +609,8 @@ export default {
message
:
'修改成功'
,
type
:
'success'
});
this
.
getData
()
this
.
dialogVisible3
=
false
this
.
getData
()
;
this
.
dialogVisible3
=
false
;
}
else
{
this
.
$message
({
message
:
res
.
msg
,
...
...
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