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 64585f67
authored
Aug 15, 2022
by
wuwx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改优惠券提交方法
1 parent
245eb274
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
30 deletions
src/views/couponManage/editCashCoupon.vue
src/views/couponManage/editDiscountCoupon.vue
src/views/couponManage/editExchangeCoupon.vue
src/views/couponManage/editMemberService.vue
src/views/couponManage/editCashCoupon.vue
View file @
64585f6
...
...
@@ -190,7 +190,6 @@ export default {
title
:
'创建'
,
editChildRef
:
'editChildRef'
,
loading
:
false
,
clickStatus
:
false
,
routeInfo
:
{
// 1-新增;2-编辑;3-查看
addOrEdit
:
1
,
...
...
@@ -772,6 +771,7 @@ export default {
handleConfirm
()
{
this
.
validateRules
()
this
.
loading
=
true
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
valid
,
errorObj
)
=>
{
var
merchantval
=
true
var
merchantErrorObj
=
[]
...
...
@@ -808,8 +808,6 @@ export default {
method
=
'createCouponApi'
//后台创建优惠券
}
console
.
log
(
params
)
if
(
this
.
clickStatus
)
return
this
.
clickStatus
=
true
this
.
$apis
.
couponManage
[
method
](
params
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
...
...
@@ -820,7 +818,7 @@ export default {
}
})
.
finally
(()
=>
{
this
.
clickStatus
=
false
this
.
loading
=
false
})
}
})
...
...
src/views/couponManage/editDiscountCoupon.vue
View file @
64585f6
...
...
@@ -168,7 +168,6 @@ export default {
format
:
'yyyy-MM-dd HH:mm:ss'
,
// 日期显示格式
showSubmit
:
true
,
userDisable
:
false
,
clickStatus
:
false
,
size
:
'small'
,
title
:
'创建'
,
titleObj
:
{
...
...
@@ -545,6 +544,7 @@ export default {
handleConfirm
()
{
this
.
validateRules
()
this
.
loading
=
true
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
valid
,
errorObj
)
=>
{
var
merchantval
=
true
var
merchantErrorObj
=
[]
...
...
@@ -567,8 +567,6 @@ export default {
}
else
{
method
=
'createCouponApi'
//后台创建优惠券
}
if
(
this
.
clickStatus
)
return
this
.
clickStatus
=
true
this
.
$apis
.
couponManage
[
method
](
params
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
...
...
@@ -579,7 +577,7 @@ export default {
}
})
.
finally
(()
=>
{
this
.
clickStatus
=
false
this
.
loading
=
false
})
}
})
...
...
src/views/couponManage/editExchangeCoupon.vue
View file @
64585f6
...
...
@@ -127,7 +127,6 @@ export default {
editChildRef
:
'editChildRef'
,
loading
:
false
,
editStatus
:
false
,
clickStatus
:
false
,
// pickerOptions: {
// disabledDate(v) {//禁用当前之前的日期
// return v.getTime() < new Date().getTime() - 86400000;
...
...
@@ -436,6 +435,7 @@ export default {
handleConfirm
()
{
this
.
validateRules
()
this
.
loading
=
true
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
valid
,
errorObj
)
=>
{
var
merchantval
=
true
var
merchantErrorObj
=
[]
...
...
@@ -458,8 +458,6 @@ export default {
}
else
{
method
=
'createCouponApi'
//后台创建优惠券
}
if
(
this
.
clickStatus
)
return
this
.
clickStatus
=
true
this
.
$apis
.
couponManage
[
method
](
params
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
...
...
@@ -470,7 +468,7 @@ export default {
}
})
.
finally
(()
=>
{
this
.
clickStatus
=
false
this
.
loading
=
false
})
}
})
...
...
src/views/couponManage/editMemberService.vue
View file @
64585f6
...
...
@@ -3,7 +3,7 @@
<div
class=
"topMsg"
>
<p
class=
"pageTitle"
>
基本信息
</p>
</div>
<div
class=
"live-room container"
style=
"padding-top: 20px;"
>
<div
class=
"live-room container"
style=
"padding-top: 20px;"
v-loading=
"sloading"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"120px"
class=
"demo-ruleForm"
>
<el-form-item
size=
"small"
label=
"服务名称"
prop=
"couponName"
style=
"width: 440px"
id=
"couponName"
>
<el-input
size=
"small"
:disabled=
"disabledContent"
v-model
.
trim=
"ruleForm.couponName"
maxlength=
"20"
placeholder=
"请输入服务名称,如“精洗轿车”"
></el-input>
...
...
@@ -159,7 +159,7 @@
</div>
<GLFooter>
<el-button
@
click=
"goBack"
size=
"medium"
>
取消
</el-button>
<el-button
type=
"primary"
v-if=
"showSubmit"
@
click=
"submitForm('ruleForm')"
size=
"medium"
:loading=
"loading"
>
提交
</el-button>
<el-button
type=
"primary"
v-if=
"showSubmit"
@
click=
"submitForm('ruleForm')"
size=
"medium"
:loading=
"
s
loading"
>
提交
</el-button>
</GLFooter>
<!-- :hasScroll="false" :noBtnOk="true" :noCancel="true" :noClose="false" -->
<glsx-dialog
title=
""
top=
"30vh"
:hasScroll=
"false"
width=
"547px"
btnCloseLabel=
"取消"
:noClose=
"false"
:noCancel=
"true"
btnSize=
"small"
:isVisible=
"isDialogVisible"
:showClose=
"false"
@
closeDialog=
"handleClose"
@
confirmDialog=
"handleConfirm"
>
...
...
@@ -209,7 +209,6 @@ export default {
},
1000
)
}
return
{
clickStatus
:
false
,
isEdit
:
false
,
showSubmit
:
true
,
disabledDescription
:
false
,
...
...
@@ -403,8 +402,7 @@ export default {
},
submitForm
(
formName
)
{
if
(
this
.
clickStatus
)
return
this
.
clickStatus
=
true
this
.
sloading
=
true
this
.
$refs
[
formName
].
validate
((
valid
,
errorObj
)
=>
{
var
merchantval
=
true
var
merchantErrorObj
=
[]
...
...
@@ -493,27 +491,20 @@ export default {
params
.
discountType
=
7
params
.
merchantId
=
this
.
merchantId
params
.
merchantName
=
this
.
merchantName
this
.
sloading
=
true
createService
(
params
)
.
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
sloading
=
false
this
.
$message
.
success
(
'操作成功'
)
this
.
$router
.
push
(
'/couponManage/index'
)
}
else
{
this
.
sloading
=
false
this
.
$message
({
type
:
'error'
,
message
:
res
.
message
})
}
})
.
catch
(
err
=>
{
this
.
sloading
=
false
})
.
finally
(()
=>
{
this
.
sloading
=
false
this
.
clickStatus
=
false
})
},
//更新服务
...
...
@@ -526,24 +517,18 @@ export default {
param
.
couponId
=
this
.
$route
.
query
.
couponId
param
.
stock
=
this
.
ruleForm
.
stock
param
.
useDescription
=
this
.
ruleForm
.
useDescription
this
.
sloading
=
true
updateService
(
param
)
.
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
this
.
sloading
=
false
this
.
$message
.
success
(
'编辑服务成功'
)
this
.
$router
.
push
(
'/couponManage/index'
)
}
else
{
this
.
sloading
=
false
this
.
$message
({
type
:
'error'
,
message
:
res
.
message
})
}
})
.
catch
(
err
=>
{
this
.
sloading
=
false
})
.
finally
(()
=>
{
this
.
sloading
=
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