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
5e949a9f
authored
Jan 03, 2025
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
库存
parent
bdf52313
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
83 additions
and
66 deletions
src/views/consignmentManagement/consignmentInventory.vue
src/views/consignmentManagement/consignmentInventory.vue
View file @
5e949a9f
...
...
@@ -139,9 +139,9 @@
<el-button
type=
"primary"
@
click=
"changeStatus(3)"
>
下架
</el-button>
<el-button
type=
"primary"
@
click=
"downOut"
>
导出
</el-button>
<a
:href=
"downHref"
ref=
"downs"
target=
"_blank"
style=
"display:none"
>
下载
</a>
<el-button
type=
"primary"
style=
"margin-left: 10px;"
@
click=
"
batchModify(
)"
>
批量修改
</el-button>
<el-button
type=
"primary"
@
click=
"
consignmentReplenishment(
)"
>
寄售补货
</el-button>
<el-button
type=
"primary"
@
click=
"
consignmentRecall(
)"
>
寄售召回
</el-button>
<el-button
type=
"primary"
style=
"margin-left: 10px;"
@
click=
"
popupEvent(1
)"
>
批量修改
</el-button>
<el-button
type=
"primary"
@
click=
"
popupEvent(2
)"
>
寄售补货
</el-button>
<el-button
type=
"primary"
@
click=
"
popupEvent(3
)"
>
寄售召回
</el-button>
</div>
<div
class=
"text-tip row verCenter"
>
<i
class=
"el-icon-warning"
></i>
...
...
@@ -420,7 +420,7 @@
</el-dialog>
<!--批量修改-->
<el-dialog
title=
"批量修改"
:close-on-click-modal=
"false"
:visible
.
sync=
"dialogVisibleBatchModify"
width=
"500px"
>
<el-upload
drag
action=
"
https://jsonplaceholder.typicode.com/posts/
"
>
<el-upload
drag
action=
"
/api/sku/batchUpdateSku"
:on-success=
"handleUploadSuccess"
:on-error=
"handleUploadError"
accept=
".csv"
:show-file-list=
"false
"
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__tip"
slot=
"tip"
>
...
...
@@ -516,10 +516,6 @@ export default {
};
},
created
()
{
let
status
=
this
.
$route
.
query
.
status
;
if
(
status
)
{
this
.
formParam
.
status
=
status
;
}
this
.
getData
();
this
.
getSkuRankList
();
},
...
...
@@ -596,14 +592,8 @@ export default {
}
else
{
this
.
formParam
.
cp_time
=
''
;
}
var
params
=
Object
.
assign
({},
{
page
:
this
.
page
},
{
limit
:
this
.
limit
},
this
.
formParam
,
{
action_time
:
this
.
formParam
.
date
?
this
.
formParam
.
date
[
0
]
:
''
},
{
end_time
:
this
.
formParam
.
date
?
this
.
formParam
.
date
[
1
]
:
''
})
this
.
$http
(
'get'
,
"/api/sku/list"
,
params
).
then
(
res
=>
{
var
params
=
Object
.
assign
({},
this
.
formParam
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
source
:
12
},
{
action_time
:
this
.
formParam
.
date
?
this
.
formParam
.
date
[
0
]
:
''
},
{
end_time
:
this
.
formParam
.
date
?
this
.
formParam
.
date
[
1
]
:
''
})
this
.
$http
(
'GET'
,
"/api/sku/list"
,
params
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
total
=
Number
(
res
.
data
.
count
)
||
0
;
...
...
@@ -636,24 +626,22 @@ export default {
* @param cb
*/
querySearchAsync
(
queryString
,
cb
)
{
this
.
$http
(
'get'
,
"/api/search/getspu"
,
{
spu_name
:
queryString
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
data
.
list
.
length
>
0
)
{
var
arrlist_
=
res
.
data
.
list
||
[];
var
arr_
=
[]
for
(
var
i
=
0
;
i
<
arrlist_
.
length
;
i
++
)
{
arr_
.
push
({
value
:
arrlist_
[
i
][
'spu_name'
]
})
}
cb
(
arr_
);
}
else
{
cb
([]);
}
if
(
!
queryString
)
{
cb
([]);
return
;
}
this
.
$http
(
'GET'
,
"/api/search/getspu"
,
{
spu_name
:
queryString
}).
then
(
res
=>
{
if
(
res
.
code
==
0
&&
res
.
data
.
list
?.
length
)
{
const
arr
=
res
.
data
.
list
.
map
(
item
=>
({
value
:
item
.
spu_name
}));
cb
(
arr
);
}
else
{
cb
([]);
}
})
}).
catch
(()
=>
{
cb
([]);
});
},
/**
* 品牌
...
...
@@ -1060,10 +1048,7 @@ export default {
sku_ids
=
this
.
multipleSelection
.
map
(
obj
=>
{
return
obj
.
goods_id
;
});
this
.
$http
(
'post'
,
"/api/sku/updateSkuStatus"
,
{
sku_ids
:
sku_ids
.
join
(
","
),
status
:
status
==
1
?
'passed'
:
'offshelf'
}).
then
(
res
=>
{
this
.
$http
(
'post'
,
"/api/sku/updateSkuStatus"
,
{
sku_ids
:
sku_ids
.
join
(
","
),
status
:
status
==
1
?
'passed'
:
'offshelf'
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
({
message
:
'操作成功'
,
...
...
@@ -1079,45 +1064,77 @@ export default {
})
},
/**
*
批量修改
*
弹窗事件
*/
batchModify
()
{
this
.
dialogVisibleBatchModify
=
true
;
popupEvent
(
type
)
{
switch
(
type
)
{
case
1
:
this
.
dialogVisibleBatchModify
=
true
;
break
;
case
2
:
if
(
!
this
.
multipleSelection
.
length
)
{
this
.
$message
.
warning
(
'请选择数据'
);
return
;
}
var
html
=
`
<p style="font-size: 14px;">确定将选择的商品提交寄售补货申请?</p>
<p style="font-size: 14px;color: #FF7E11">确认后请到【寄售申请】菜单编辑申请寄售数量,并提交审核</p>
`
this
.
$confirm
(
html
,
'寄售补货'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
dangerouslyUseHTMLString
:
true
}).
then
(()
=>
{
let
sku_ids
=
this
.
multipleSelection
.
map
(
item
=>
item
.
sku_id
).
join
(
','
);
this
.
$http
(
'POST'
,
"/api/consignmentReplenishment/addConsignmentReplenishment"
,
{
sku_ids
:
sku_ids
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
$message
({
message
:
'操作成功'
,
type
:
'success'
,
onClose
:
()
=>
{
this
.
getData
();
}
});
}
else
{
this
.
$message
.
error
(
res
.
msg
||
'操作失败'
);
}
})
}).
catch
(()
=>
{
// 取消时不需要提示
});
break
;
case
3
:
this
.
dialogVisibleConsignmentRecall
=
true
;
break
;
}
},
/**
* 寄售补货
* 上传成功
* @param res
* @param file
* @param fileList
*/
consignmentReplenishment
()
{
if
(
this
.
multipleSelection
.
length
===
0
)
{
this
.
$message
({
message
:
'请至少选择一条数据'
,
type
:
'warning'
});
return
;
}
var
html
=
`
<p style="font-size: 14px;">确定将选择的商品提交寄售补货申请?</p>
<p style="font-size: 14px;color: #FF7E11">确认后请到【寄售申请】菜单编辑申请寄售数量,并提交审核</p>
`
this
.
$confirm
(
html
,
'寄售补货'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
dangerouslyUseHTMLString
:
true
}).
then
(()
=>
{
// TODO: 在这里添加确认后的处理逻辑
handleUploadSuccess
(
res
,
file
,
fileList
)
{
if
(
res
.
code
===
0
)
{
this
.
$message
({
message
:
res
.
msg
,
type
:
'success'
,
message
:
'提交成功'
onClose
:
()
=>
{
this
.
dialogVisibleBatchModify
=
false
;
}
});
}
).
catch
(()
=>
{
// 取消时不需要提示
}
);
}
else
{
this
.
$message
.
error
(
res
.
msg
||
'上传失败'
);
}
},
/**
* 寄售召回
* 上传失败
* @param err
* @param file
* @param fileList
*/
consignmentRecall
(
)
{
this
.
dialogVisibleConsignmentRecall
=
true
;
handleUploadError
(
err
,
file
,
fileList
)
{
this
.
$message
.
error
(
'上传失败,请重试'
)
;
}
},
components
:
{
...
...
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