Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
abdce3bd
Commit
abdce3bd
authored
Mar 02, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
公海标识和优惠延期
parent
cec5e442
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
2 deletions
+57
-2
coupon.js
src/api/ecw/coupon.js
+9
-0
index.vue
src/components/ChooseContactDialog/index.vue
+1
-0
index.vue
src/views/ecw/coupon/index.vue
+47
-2
No files found.
src/api/ecw/coupon.js
View file @
abdce3bd
...
@@ -69,4 +69,13 @@ export function getCustomerAvailableCouponList(data){
...
@@ -69,4 +69,13 @@ export function getCustomerAvailableCouponList(data){
method
:
'
post
'
,
method
:
'
post
'
,
data
data
})
})
}
// 更新优惠券有效期
export
function
updateEndtime
(
data
){
return
request
({
url
:
'
/product/coupon/update/endTime
'
,
method
:
'
put
'
,
data
})
}
}
\ No newline at end of file
src/components/ChooseContactDialog/index.vue
View file @
abdce3bd
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<div
class=
"line"
>
<div
class=
"line"
>
<div
class=
"label"
>
{{
$t
(
'
姓名
'
)
}}
:
</div>
<div
class=
"label"
>
{{
$t
(
'
姓名
'
)
}}
:
</div>
<div
class=
"value"
>
{{
item
.
contactsName
}}
</div>
<div
class=
"value"
>
{{
item
.
contactsName
}}
</div>
<el-tag
v-if=
"item.isInOpenSea"
type=
"danger"
effect=
"dark"
>
{{
$t
(
'
公
'
)
}}
</el-tag>
</div>
</div>
<div
class=
"line"
>
<div
class=
"line"
>
<div
class=
"label"
>
{{
$t
(
'
电话
'
)
}}
:
</div>
<div
class=
"label"
>
{{
$t
(
'
电话
'
)
}}
:
</div>
...
...
src/views/ecw/coupon/index.vue
View file @
abdce3bd
...
@@ -188,6 +188,8 @@
...
@@ -188,6 +188,8 @@
v
-
hasPermi
=
"
['ecw:coupon:update']
"
>
{{
$t
(
'
编辑
'
)
}}
<
/el-button
>
v
-
hasPermi
=
"
['ecw:coupon:update']
"
>
{{
$t
(
'
编辑
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
handleCopy(scope.row)
"
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
handleCopy(scope.row)
"
v
-
hasPermi
=
"
['ecw:coupon:create']
"
>
{{
$t
(
'
复制
'
)
}}
<
/el-button
>
v
-
hasPermi
=
"
['ecw:coupon:create']
"
>
{{
$t
(
'
复制
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-edit
"
@
click
=
"
updateEndtimeItem = scope.row
"
v
-
hasPermi
=
"
['ecw:coupon:update']
"
>
{{
$t
(
'
延期
'
)
}}
<
/el-button
>
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-delete
"
@
click
=
"
handleDelete(scope.row)
"
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-delete
"
@
click
=
"
handleDelete(scope.row)
"
v
-
hasPermi
=
"
['ecw:coupon:delete']
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-button
>
v
-
hasPermi
=
"
['ecw:coupon:delete']
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-button
>
<
/template
>
<
/template
>
...
@@ -196,12 +198,32 @@
...
@@ -196,12 +198,32 @@
<!--
分页组件
-->
<!--
分页组件
-->
<
pagination
v
-
show
=
"
total > 0
"
:
total
=
"
total
"
:
page
.
sync
=
"
queryParams.pageNo
"
:
limit
.
sync
=
"
queryParams.pageSize
"
<
pagination
v
-
show
=
"
total > 0
"
:
total
=
"
total
"
:
page
.
sync
=
"
queryParams.pageNo
"
:
limit
.
sync
=
"
queryParams.pageSize
"
@
pagination
=
"
getList
"
/>
@
pagination
=
"
getList
"
/>
<
el
-
dialog
:
title
=
"
$t('延期活动时间')
"
:
visible
=
"
!!updateEndtimeItem
"
:
before
-
close
=
"
() => updateEndtimeItem=null
"
>
<
div
v
-
if
=
"
updateEndtimeItem
"
>
{{
$t
(
'
优惠活动“{name
}
”的当前结束时间:{time
}
'
,{
name
:
updateEndtimeItem
.
name
,
time
:
updateEndtimeItem
.
endTime
||
$t
(
'
永久有效
'
)
}
)
}}
<
/div
>
<
div
>
{{
$t
(
'
请问您确定延长活动吗?
'
)
}}
<
/div
>
<
el
-
form
:
model
=
"
updateEndtimeForm
"
:
rules
=
"
updateEndtimeRules
"
label
-
position
=
"
left
"
>
<
el
-
form
-
item
:
label
=
"
$t('活动结束时间')
"
prop
=
"
endTime
"
>
<
el
-
date
-
picker
type
=
"
datetime
"
value
-
format
=
"
yyyy-MM-dd HH:mm:ss
"
v
-
model
=
"
updateEndtimeForm.endTime
"
placeholder
=
""
><
/el-date-picker
>
<
el
-
checkbox
:
label
=
"
$t('永久有效')
"
v
-
model
=
"
updateEndtimeForm.forever
"
class
=
"
ml-10
"
><
/el-checkbox
>
<
/el-form-item
>
<
/el-form
>
<
div
slot
=
"
footer
"
>
<
el
-
button
type
=
"
primary
"
@
click
=
"
updateEndtime
"
>
{{
$t
(
'
确定
'
)
}}
<
/el-button
>
<
el
-
button
type
=
"
default
"
@
click
=
"
updateEndtimeItem = null
"
>
{{
$t
(
'
取消
'
)
}}
<
/el-button
>
<
/div
>
<
/el-dialog
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
script
>
<
script
>
import
{
createCoupon
,
updateCoupon
,
deleteCoupon
,
getCoupon
,
getCouponPage
,
exportCouponExcel
}
from
"
@/api/ecw/coupon
"
;
import
{
createCoupon
,
updateCoupon
,
deleteCoupon
,
getCoupon
,
getCouponPage
,
exportCouponExcel
,
updateEndtime
}
from
"
@/api/ecw/coupon
"
;
export
default
{
export
default
{
name
:
"
EcwCouponIndex
"
,
name
:
"
EcwCouponIndex
"
,
...
@@ -260,9 +282,20 @@ export default {
...
@@ -260,9 +282,20 @@ export default {
form
:
{
}
,
form
:
{
}
,
// 表单校验
// 表单校验
rules
:
{
rules
:
{
}
}
,
updateEndtimeItem
:
null
,
// 延期操作的数据
updateEndtimeForm
:{
}
// 延长有效期的表单数据
}
;
}
;
}
,
}
,
computed
:{
updateEndtimeRules
(){
return
{
endTime
:
[
{
required
:
!
this
.
updateEndtimeForm
.
forever
,
message
:
"
请填写结束时间
"
}
]
}
}
}
,
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
}
,
}
,
...
@@ -331,6 +364,18 @@ export default {
...
@@ -331,6 +364,18 @@ export default {
this
.
$message
.
success
(
this
.
$t
(
"
删除成功
"
));
this
.
$message
.
success
(
this
.
$t
(
"
删除成功
"
));
}
).
catch
(()
=>
{
}
);
}
).
catch
(()
=>
{
}
);
}
,
}
,
// 延期
updateEndtime
(){
if
(
!
this
.
updateEndtimeForm
.
forever
&&
!
this
.
updateEndtimeForm
.
endTime
){
return
this
.
$message
.
error
(
this
.
$t
(
"
请填写结束时间
"
))
}
let
form
=
{
couponId
:
this
.
updateEndtimeItem
.
couponId
,
...
this
.
updateEndtimeForm
}
form
.
isValidity
=
!
form
.
forever
// 是否设置有效期
updateEndtime
(
form
).
then
(
res
=>
{
this
.
getList
()
this
.
updateEndtimeItem
=
null
}
)
}
,
/** 导出按钮操作 */
/** 导出按钮操作 */
handleExport
()
{
handleExport
()
{
// 处理查询参数
// 处理查询参数
...
...
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