Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 478263cb
authored
Nov 17, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
带货
1 parent
bd50bef2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
2 deletions
src/api/modules/takeGood.js
src/views/takeGood/index.vue
src/api/modules/takeGood.js
View file @
478263c
...
...
@@ -12,4 +12,15 @@ const getListApi = params => {
})
}
export
default
{
getListApi
}
const
takeGookApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
batchTake`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
export
default
{
getListApi
,
takeGookApi
}
src/views/takeGood/index.vue
View file @
478263c
...
...
@@ -131,9 +131,42 @@ export default {
})
},
secondConfirm
(
title
,
txt
,
apiModule
,
apiName
,
apiParams
,
fn
)
{
this
.
$confirm
(
txt
,
title
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
callback
:
action
=>
{
if
(
action
==
'confirm'
)
{
this
.
$apis
[
apiModule
][
apiName
](
apiParams
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
fn
&&
fn
()
this
.
handleSearch
()
}
})
}
}
})
},
handleSingleTakeGood
(
row
)
{
this
.
secondConfirm
(
'带货'
,
'是否确认带货?'
,
'takeGood'
,
'takeGookApi'
,
{
takeGoodsIdList
:
[
row
.
goodsId
]
})
},
handleTakeGood
()
{
var
selectedList
=
this
.
$refs
.
takeGoodRef
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
console
.
log
(
selectedList
)
if
(
!
selectedList
.
length
)
{
this
.
$message
({
message
:
'请勾选要带货的商品'
,
type
:
'error'
})
return
true
}
this
.
secondConfirm
(
'带货'
,
'是否确认带货?'
,
'takeGood'
,
'takeGookApi'
,
{
takeGoodsIdList
:
selectedList
.
map
(
item
=>
item
.
goodsId
)
})
},
handleDetail
(
row
)
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment