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 3bbab550
authored
Jun 15, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优惠券-领取详情-作废
1 parent
27d079a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
90 additions
and
20 deletions
src/api/modules/couponManage.js
src/views/couponManage/receiveDetail.vue
src/api/modules/couponManage.js
View file @
3bbab55
...
@@ -183,4 +183,16 @@ const getAllGoodsApi = params => {
...
@@ -183,4 +183,16 @@ const getAllGoodsApi = params => {
})
})
}
}
export
default
{
getCouponListApi
,
couponExportApi
,
couponGroupExportApi
,
couponStoreExportApi
,
getPackageListApi
,
getVerificationListApi
,
verificationExportApi
,
effectiveCouponApi
,
codeVerificationApi
,
getCouponDetailApi
,
deleteCouponApi
,
createCouponApi
,
updateCouponApi
,
getAllGoodsApi
,
getListReceiveRecordApi
,
exportReceiveRecordApi
}
// 优惠券-作废
const
couponUserCancelApi
=
params
=>
{
params
.
method
=
`scrm.api.coupon.user.cancel`
return
http
({
url
:
'rop-scrm-coupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
,
returnAll
:
true
})
}
export
default
{
getCouponListApi
,
couponExportApi
,
couponGroupExportApi
,
couponStoreExportApi
,
getPackageListApi
,
getVerificationListApi
,
verificationExportApi
,
effectiveCouponApi
,
codeVerificationApi
,
getCouponDetailApi
,
deleteCouponApi
,
createCouponApi
,
updateCouponApi
,
getAllGoodsApi
,
getListReceiveRecordApi
,
exportReceiveRecordApi
,
couponUserCancelApi
}
src/views/couponManage/receiveDetail.vue
View file @
3bbab55
...
@@ -17,15 +17,7 @@
...
@@ -17,15 +17,7 @@
</div>
</div>
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<div>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"searchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormData"
></glsx-combi-form>
<glsx-combi-form
ref=
"showSearch"
:formObj=
"searchForm"
:formData=
"searchFormDataTwo"
>
<span
slot=
"footer"
class=
"footer-btns"
>
<el-button
:size=
"size"
@
click=
"handleReset"
>
重置
</el-button>
<el-button
:size=
"size"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
</span>
</glsx-combi-form>
</div>
<div
class=
"flex m-b-10 w-100-percent"
>
<div
class=
"flex m-b-10 w-100-percent"
>
<span
class=
"table-title"
>
领取详情列表
</span>
<span
class=
"table-title"
>
领取详情列表
</span>
...
@@ -37,6 +29,9 @@
...
@@ -37,6 +29,9 @@
<span
:class=
"['table-circle', 'm-r-8', scope.scope.userStatus == 1 ? 'back-green' : scope.scope.userStatus == 2 ? 'back-red' : 'back-grey']"
></span>
<span
:class=
"['table-circle', 'm-r-8', scope.scope.userStatus == 1 ? 'back-green' : scope.scope.userStatus == 2 ? 'back-red' : 'back-grey']"
></span>
<span>
{{
baseData
.
userStatusList
.
find
(
item
=>
item
.
confId
==
scope
.
scope
.
userStatus
).
confName
}}
</span>
<span>
{{
baseData
.
userStatusList
.
find
(
item
=>
item
.
confId
==
scope
.
scope
.
userStatus
).
confName
}}
</span>
</div>
</div>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"tableButtonList"
:buttonItem=
"scope.scope"
:buttonNum=
"3"
></GLTableButton>
</div>
</GLTable>
</GLTable>
<!-- 表格区域 end -->
<!-- 表格区域 end -->
</div>
</div>
...
@@ -44,6 +39,15 @@
...
@@ -44,6 +39,15 @@
<div
class=
"footer"
:style=
"
{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<div
class=
"footer"
:style=
"
{ left: footerLeft + 'px', width: footerWidth + 'px' }">
<el-button
type=
"primary"
:size=
"size"
@
click=
"goback"
>
返回
</el-button>
<el-button
type=
"primary"
:size=
"size"
@
click=
"goback"
>
返回
</el-button>
</div>
</div>
<!-- 作废 -->
<glsx-dialog
title=
"作废确认"
:isVisible
.
sync=
"isCancelVisible"
@
confirmDialog=
"handleCancelConfirm"
@
closeDialog=
"handleCancelClose"
>
<p>
请先和客户沟通在确认,避免引起客诉,作废后客户将不可使用该礼包下所有优惠卷
</p>
<el-form
ref=
"cancelRef"
label-width=
"100px"
:rules=
"cancelRules"
:model=
"cancelForm"
>
<el-form-item
label=
"作废原因"
prop=
"cancelReason"
>
<el-input
:size=
"size"
v-model=
"cancelForm.cancelReason"
placeholder=
"请输入作废原因"
maxlength=
"50"
></el-input>
</el-form-item>
</el-form>
</glsx-dialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -58,6 +62,15 @@ export default {
...
@@ -58,6 +62,15 @@ export default {
footerLeft
:
'0'
,
footerLeft
:
'0'
,
footerWidth
:
'0'
,
footerWidth
:
'0'
,
url
:
url
,
url
:
url
,
// 作废
isCancelVisible
:
false
,
cancelForm
:
{
userCouponId
:
''
,
cancelReason
:
''
},
cancelRules
:
{
cancelReason
:
[{
required
:
true
,
message
:
'请输入作废原因'
,
trigger
:
'change'
}]
},
coupon
:
{
coupon
:
{
couponName
:
''
,
couponName
:
''
,
stock
:
''
,
stock
:
''
,
...
@@ -113,6 +126,26 @@ export default {
...
@@ -113,6 +126,26 @@ export default {
name
:
'usedAmount'
name
:
'usedAmount'
}
}
],
],
// 表格按钮
tableButtonList
:
[
{
type
:
'el-button'
,
name
:
'作废'
,
attrs
:
{
type
:
'text'
// disabled: (row, condition) => {
// return +row.userStatus != 1
// }
},
condition
:
row
=>
{
return
+
row
.
userStatus
==
1
// return true
},
listeners
:
{
click
:
this
.
handleCancel
}
}
],
// 表格
// 表格
searchForm
:
{
searchForm
:
{
userInfo
:
''
,
userInfo
:
''
,
...
@@ -146,9 +179,7 @@ export default {
...
@@ -146,9 +179,7 @@ export default {
optionId
:
'confId'
,
optionId
:
'confId'
,
optionLabel
:
'confName'
,
optionLabel
:
'confName'
,
optionsName
:
'userStatusList'
optionsName
:
'userStatusList'
}
},
],
searchFormDataTwo
:
[
{
{
label
:
'领取日期'
,
label
:
'领取日期'
,
name
:
'daterange'
,
name
:
'daterange'
,
...
@@ -161,7 +192,7 @@ export default {
...
@@ -161,7 +192,7 @@ export default {
getListApi
:
this
.
$apis
.
couponManage
.
getListReceiveRecordApi
,
getListApi
:
this
.
$apis
.
couponManage
.
getListReceiveRecordApi
,
tableParams
:
{
tableParams
:
{
listName
:
'list'
,
listName
:
'list'
,
tableOption
:
fals
e
,
tableOption
:
tru
e
,
tableColumns
:
[
tableColumns
:
[
{
{
label
:
'领取用户'
,
label
:
'领取用户'
,
...
@@ -197,10 +228,6 @@ export default {
...
@@ -197,10 +228,6 @@ export default {
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
baseData
:
{
baseData
:
{
userStatusList
:
[
userStatusList
:
[
// {
// confId: '0',
// confName: '未领取'
// },
{
{
confId
:
'1'
,
confId
:
'1'
,
confName
:
'未使用'
confName
:
'未使用'
...
@@ -326,8 +353,39 @@ export default {
...
@@ -326,8 +353,39 @@ export default {
})
})
},
},
writeOff
()
{
handleCancel
(
row
)
{
this
.
writeOffVisible
=
!
this
.
writeOffVisible
this
.
cancelForm
.
userCouponId
=
row
.
id
this
.
cancelVisibleChange
()
},
cancelVisibleChange
()
{
this
.
$refs
.
cancelRef
&&
this
.
$refs
.
cancelRef
.
clearValidate
()
this
.
isCancelVisible
=
!
this
.
isCancelVisible
},
handleCancelClose
()
{
this
.
cancelVisibleChange
()
this
.
cancelForm
=
{
userCouponId
:
''
,
cancelReason
:
''
}
},
handleCancelConfirm
()
{
this
.
$refs
.
cancelRef
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$apis
.
couponManage
.
couponUserCancelApi
(
this
.
cancelForm
).
then
(
res
=>
{
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
handleCancelClose
()
this
.
handleSearch
()
}
})
}
})
},
},
/**导出excel */
/**导出excel */
...
...
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