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 07e917d4
authored
Jun 01, 2022
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
套餐编辑数量限制
1 parent
3763c1bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
42 deletions
src/views/memberCenter/setmealAddUpdate.vue
src/views/memberCenter/setmealAddUpdate.vue
View file @
07e917d
...
...
@@ -68,7 +68,7 @@
<div
class=
"footer-panel"
>
<div>
<el-button
type=
"primary"
@
click=
"submitForm()"
size=
"medium"
:loading=
"sloading"
>
提交
</el-button>
<el-button
@
click=
"goBack"
size=
"medium"
>
取消
</el-button>
<el-button
@
click=
"goBack"
size=
"medium"
>
取消
</el-button>
</div>
</div>
<glsx-dialog
title=
""
top=
"30vh"
:hasScroll=
"false"
class=
"tipDialog"
width=
"547px"
btnCloseLabel=
"取消"
:noClose=
"false"
:noCancel=
"true"
btnSize=
"small"
:isVisible=
"isTipDialogVisible"
:showClose=
"false"
@
closeDialog=
"handleTipClose"
@
confirmDialog=
"handleTipConfirm"
>
...
...
@@ -122,6 +122,7 @@ export default {
merchantId
:
44184606
,
merchantName
:
''
,
setmealContentRules
:
false
,
isConfig
:
false
,
//弹窗
//弹窗2(提示弹窗)
isTipDialogVisible
:
false
,
...
...
@@ -304,7 +305,7 @@ export default {
})
},
submitForm
(
formName
)
{
this
.
$refs
.
ruleForm
.
validate
(
valid
=>
{
this
.
$refs
.
ruleForm
.
validate
(
async
valid
=>
{
if
(
!
valid
)
{
if
(
this
.
choseItemList
.
length
<=
0
)
{
this
.
setmealContentRules
=
true
...
...
@@ -315,42 +316,46 @@ export default {
this
.
setmealContentRules
=
true
return
}
if
(
this
.
id
)
{
//需要调config的接口????
// scrm.api.equity.package.service.config
this
.
configFun
()
//调修改的接口
let
param
=
{}
param
.
id
=
this
.
id
param
.
merchantId
=
this
.
merchantId
param
.
merchantName
=
this
.
merchantName
param
.
packageName
=
this
.
ruleForm
.
packageName
param
.
packagePrice
=
this
.
ruleForm
.
packagePrice
param
.
notes
=
this
.
ruleForm
.
notes
param
.
switchStatus
=
this
.
ruleForm
.
switchStatus
?
1
:
0
let
lists
=
this
.
choseItemList
for
(
var
k
in
lists
)
{
param
[
`lists[
${
k
}
].serviceQuantity`
]
=
lists
[
k
].
couponAmount
param
[
`lists[
${
k
}
].serviceId`
]
=
lists
[
k
].
id
}
this
.
sloading
=
true
updateSetMeal
(
param
)
.
then
(
res
=>
{
this
.
sloading
=
false
this
.
$message
({
message
:
res
.
code
==
'0'
?
'修改成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
$router
.
push
(
'/memberCenter/setmeal'
)
this
.
configFun
().
then
(
result
=>
{
if
(
!
result
)
{
let
param
=
{}
param
.
id
=
this
.
id
param
.
merchantId
=
this
.
merchantId
param
.
merchantName
=
this
.
merchantName
param
.
packageName
=
this
.
ruleForm
.
packageName
param
.
packagePrice
=
this
.
ruleForm
.
packagePrice
param
.
notes
=
this
.
ruleForm
.
notes
param
.
switchStatus
=
this
.
ruleForm
.
switchStatus
?
1
:
0
let
lists
=
this
.
choseItemList
for
(
var
k
in
lists
)
{
param
[
`lists[
${
k
}
].serviceQuantity`
]
=
lists
[
k
].
couponAmount
param
[
`lists[
${
k
}
].serviceId`
]
=
lists
[
k
].
id
}
})
.
catch
(
err
=>
{
this
.
sloading
=
false
})
.
finally
(()
=>
{
this
.
sloading
=
false
})
this
.
sloading
=
true
updateSetMeal
(
param
)
.
then
(
res
=>
{
this
.
sloading
=
false
this
.
$message
({
message
:
res
.
code
==
'0'
?
'修改成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
$router
.
push
(
'/memberCenter/setmeal'
)
}
})
.
catch
(
err
=>
{
this
.
sloading
=
false
})
.
finally
(()
=>
{
this
.
sloading
=
false
})
}
})
}
else
{
//调创建的接口
let
params
=
{}
...
...
@@ -388,15 +393,25 @@ export default {
})
},
configFun
()
{
let
params
=
{}
params
.
id
=
this
.
id
let
list
=
this
.
choseItemList
for
(
var
i
in
list
)
{
params
[
`list[
${
i
}
].serviceQuantity`
]
=
list
[
i
].
couponAmount
params
[
`list[
${
i
}
].serviceId`
]
=
list
[
i
].
id
}
configSetMeal
(
params
).
then
(
res
=>
{
console
.
log
(
'配置接口'
,
res
.
data
)
return
new
Promise
(
resolve
=>
{
let
params
=
{}
params
.
id
=
this
.
id
let
list
=
this
.
choseItemList
for
(
var
i
in
list
)
{
params
[
`list[
${
i
}
].serviceQuantity`
]
=
list
[
i
].
couponAmount
params
[
`list[
${
i
}
].serviceId`
]
=
list
[
i
].
id
}
configSetMeal
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
-
1
)
{
this
.
$message
({
message
:
res
.
message
,
type
:
'error'
})
resolve
(
true
)
}
else
{
resolve
(
false
)
}
})
})
},
...
...
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