Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
marketing
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
marketing-web
marketing
Commits
7355f662
Commit
7355f662
authored
Aug 31, 2022
by
huaying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 核销记录
parent
53e326b6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
34 deletions
+77
-34
index.css
src/assets/theme/index.css
+1
-1
links.vue
src/views/card/links.vue
+49
-20
store-list.vue
src/views/card/store-list.vue
+4
-1
writeOffCard.vue
src/views/card/writeOffCard.vue
+8
-5
writeOffStore.vue
src/views/card/writeOffStore.vue
+5
-2
writeOffStoreDetail.vue
src/views/card/writeOffStoreDetail.vue
+10
-5
No files found.
src/assets/theme/index.css
View file @
7355f662
...
...
@@ -3971,7 +3971,7 @@
color
:
#606266
;
font-size
:
14px
;
}
.el-dialog__footer
{
border-top
:
1px
solid
#DCDFE6
;
/* border-top:1px solid #DCDFE6; */
padding
:
10px
20px
;
/* padding-top: 10px; */
text-align
:
right
;
src/views/card/links.vue
View file @
7355f662
<
template
>
<el-dialog
title=
"核销工具二维码"
:visible
.
sync=
"show"
width=
"600px"
:before-close=
"close"
>
<el-dialog
title=
"核销工具二维码"
:visible
.
sync=
"show"
width=
"600px"
:before-close=
"close"
class=
"hexiaoBox"
>
<div
v-loading=
"loading"
class=
"links-block"
>
<div
class=
"links__body"
>
<div
class=
"links__body--url"
>
{{
link
}}
</div>
...
...
@@ -9,17 +9,28 @@
</div>
<div
class=
"link__divider"
></div>
<div
class=
"links__qr"
>
<div
style=
"text-align:center; background: #FFFFFF;border-radius: 2px;"
>
<div
style=
"text-align:center; background: #FFFFFF;
width: 129px;height: 131px;padding-top:6px;
border-radius: 2px;"
>
<vue-qr
v-if=
"sourceType"
id=
"qrImg"
:text=
"src"
:size=
"130"
:margin=
"5"
></vue-qr>
<img
:src=
"src"
id=
"qrImg"
class=
"imgs"
/>
<el-image
v-else
id=
"qrImg"
class=
"imgs"
lazy
:src=
"src"
@
click
.
native=
"onView(false)"
>
<div
slot=
"placeholder"
style=
"display:flex;align-items:center;justify-content:center;width:100%;height:100%;"
>
<i
class=
"el-icon-picture-outline"
style=
"font-size:30px"
></i>
</div>
</el-image>
</div>
<div
class=
"testBtn"
>
<i
class=
"iconfont icon-xiazai downIcon"
></i>
<el-button
type=
"text"
v-show=
"src"
@
click=
"download"
>
<span
style=
"fontSize:14px;"
>
小程序二维码下载
</span>
</el-button>
</div>
<el-button
type=
"text"
v-show=
"src"
@
click=
"download"
><i
class=
"iconfont icon-xiazai font-14"
></i>
小程序二维码下载
</el-button>
</div>
</div>
</el-dialog>
</
template
>
<
script
>
import
VueQr
from
'vue-qr'
;
import
{
api
as
viewerApi
}
from
'v-viewer'
;
import
'viewerjs/dist/viewer.css'
;
export
default
{
name
:
'links'
,
components
:
{
...
...
@@ -49,22 +60,36 @@ export default {
},
data
()
{
return
{
loading
:
false
,
miniprogram
:
{
link
:
''
,
url
:
''
}
loading
:
false
};
},
watch
:
{
show
(
val
)
{
if
(
val
)
{
console
.
log
(
this
.
src
);
//
console.log(this.src);
}
}
},
methods
:
{
// 点击预览
onView
(
isH5
)
{
let
qrImg
=
''
;
if
(
isH5
)
{
const
qrWrap
=
document
.
getElementById
(
'qrWrap'
);
qrImg
=
qrWrap
&&
qrWrap
.
childNodes
[
0
].
src
;
}
else
{
qrImg
=
this
.
src
+
'?imageMogr2/thumbnail/500x500'
;
}
viewerApi
({
images
:
[
qrImg
],
options
:
{
toolbar
:
false
,
navbar
:
false
,
title
:
false
,
zIndex
:
9999
}
});
},
close
()
{
this
.
$emit
(
'update:show'
,
false
);
},
...
...
@@ -81,7 +106,7 @@ export default {
let
link
=
document
.
createElement
(
'a'
);
let
url
=
img
.
getAttribute
(
'src'
);
link
.
setAttribute
(
'href'
,
url
);
link
.
setAttribute
(
'download'
,
`
${
this
.
imageName
}
.png`
);
link
.
setAttribute
(
'download'
,
`
核销工具二维码
.png`
);
link
.
click
();
},
downloadCodeImg
(
url
)
{
...
...
@@ -103,7 +128,7 @@ export default {
//创建a标签
const
a
=
document
.
createElement
(
'a'
);
// 赋值a标签download属性值,标明该a标签提供下载功能,同时该属性指定了下载时的文件名称
a
.
download
=
this
.
imageName
;
a
.
download
=
'核销工具二维码.png'
;
//赋值a标签下载地址,即canvas导出的画布快照 base64格式的图片地址
a
.
href
=
dataURL
;
//添加a标签到dom中
...
...
@@ -117,8 +142,13 @@ export default {
};
</
script
>
<
style
lang=
"scss"
scoped
>
.font-14
{
font-size
:
14px
!important
;
.testBtn
{
display
:
flex
;
}
.downIcon
{
font-size
:
20px
;
color
:
#2f54eb
;
margin-right
:
4px
;
}
.m-r-3
{
margin-right
:
3px
;
...
...
@@ -133,7 +163,7 @@ export default {
overflow-x
:
hidden
;
overflow-y
:
auto
;
word-break
:
break-all
;
padding
:
42px
32px
4
px
24px
;
padding
:
42px
32px
2
px
24px
;
line-height
:
17px
;
font-size
:
12px
;
}
...
...
@@ -182,9 +212,8 @@ export default {
}
.imgs
{
display
:
inline-block
;
width
:
129px
;
height
:
131px
;
background
:
#ffffff
;
border-radius
:
2px
;
width
:
119px
;
height
:
120px
;
cursor
:
pointer
;
}
</
style
>
src/views/card/store-list.vue
View file @
7355f662
<
template
>
<div
class=
"storeBox"
v-loading=
"loading"
>
<div>
门店
{{
tableData
.
length
}}
家
</div>
<div>
门店
<span
style=
"margin: 0 10px;"
>
{{
tableData
.
length
}}
</span
>
家
</div>
<div
class=
"searchBox"
>
<el-input
class=
"w260"
prefix-icon=
"el-icon-search"
placeholder=
"请输入门店名称/代码"
clearable
v-model=
"listParams.search"
@
change=
"searchEvent"
></el-input>
<div>
...
...
src/views/card/writeOffCard.vue
View file @
7355f662
<
template
>
<div
v-loading=
"loading"
class=
"writeOffCardBox"
>
<div
class=
"searchBox"
>
<el-input
prefix-icon=
"el-icon-search"
placeholder=
"请输入会员信息/卡券信息/门店名称"
class=
"w2
61
"
v-model=
"params.search"
@
change=
"refresh"
clearable
></el-input>
<el-input
prefix-icon=
"el-icon-search"
placeholder=
"请输入会员信息/卡券信息/门店名称"
class=
"w2
80
"
v-model=
"params.search"
@
change=
"refresh"
clearable
></el-input>
<span
class=
"spanBox"
>
核销时间
</span>
<el-date-picker
v-model=
"dateTime"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
@
change=
"refresh"
:picker-options=
"pickerOptions()"
></el-date-picker>
<el-date-picker
v-model=
"dateTime"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
@
change=
"refresh"
:picker-options=
"pickerOptions()"
class=
"w256"
></el-date-picker>
<el-checkbox
class=
"ml16"
v-model=
"checkedM"
label=
"当月"
border
@
change=
"currentM"
/>
<el-checkbox
style=
"margin-left:6px;"
v-model=
"checkedT"
label=
"最近三个月"
border
@
change=
"reThree"
/>
<div
class=
"frmbt20"
>
<el-button
type=
"primary"
@
click=
"exportResult"
><i
class=
"iconfont icon-xiazai"
style=
"marginRight:
5px;fontSize:12
px"
/>
查询结果导出
</el-button>
<el-button
type=
"primary"
@
click=
"exportResult"
><i
class=
"iconfont icon-xiazai"
style=
"marginRight:
4px;fontSize:16
px"
/>
查询结果导出
</el-button>
</div>
</div>
<div
class=
"content"
>
...
...
@@ -114,8 +114,11 @@ export default {
};
</
script
>
<
style
lang=
"scss"
scoped
>
.w261
{
width
:
261px
;
.w280
{
width
:
280px
;
}
.w256
{
width
:
256px
;
}
.ml16
{
margin-left
:
16px
;
...
...
src/views/card/writeOffStore.vue
View file @
7355f662
...
...
@@ -3,11 +3,11 @@
<div
class=
"searchBox"
>
<el-input
prefix-icon=
"el-icon-search"
placeholder=
"请输入核销门店"
class=
"w261"
v-model=
"params.search"
@
change=
"refresh"
clearable
></el-input>
<span
class=
"spanBox"
>
核销时间
</span>
<el-date-picker
v-model=
"dateTime"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
@
change=
"refresh"
:picker-options=
"pickerOptions()"
></el-date-picker>
<el-date-picker
v-model=
"dateTime"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
@
change=
"refresh"
:picker-options=
"pickerOptions()"
class=
"w256"
></el-date-picker>
<el-checkbox
class=
"ml16"
v-model=
"checkedM"
label=
"当月"
border
@
change=
"currentM"
/>
<el-checkbox
style=
"margin-left:6px;"
v-model=
"checkedT"
label=
"最近三个月"
border
@
change=
"reThree"
/>
<div
class=
"frmbt20"
>
<el-button
type=
"primary"
@
click=
"exportResult"
><i
class=
"iconfont icon-xiazai"
style=
"marginRight:
5px;fontSize:12
px"
/>
查询结果导出
</el-button>
<el-button
type=
"primary"
@
click=
"exportResult"
><i
class=
"iconfont icon-xiazai"
style=
"marginRight:
4px;fontSize:16
px"
/>
查询结果导出
</el-button>
</div>
</div>
<div
class=
"content"
>
...
...
@@ -94,6 +94,9 @@ export default {
.w261
{
width
:
261px
;
}
.w256
{
width
:
256px
;
}
.ml16
{
margin-left
:
16px
;
}
...
...
src/views/card/writeOffStoreDetail.vue
View file @
7355f662
...
...
@@ -3,17 +3,19 @@
<div
class=
"searchBox"
>
<el-input
prefix-icon=
"el-icon-search"
placeholder=
"请输入卡券名称"
class=
"w261"
v-model=
"params.search"
@
change=
"refresh"
clearable
></el-input>
<span
class=
"spanBox"
>
核销时间
</span>
<el-date-picker
v-model=
"dateTime"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
@
change=
"refresh"
:picker-options=
"pickerOptions()"
></el-date-picker>
<el-date-picker
v-model=
"dateTime"
type=
"daterange"
range-separator=
"~"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:default-time=
"['00:00:00', '23:59:59']"
@
change=
"refresh"
:picker-options=
"pickerOptions()"
class=
"w256"
></el-date-picker>
<el-checkbox
class=
"ml16"
v-model=
"checkedM"
label=
"当月"
border
@
change=
"currentM"
/>
<el-checkbox
style=
"margin-left:6px;"
v-model=
"checkedT"
label=
"最近三个月"
border
@
change=
"reThree"
/>
</div>
<div
class=
"content"
>
<el-table
:data=
"tableData"
@
sort-change=
"sortChange"
>
<el-table-column
label=
"卡券名称"
prop=
"
store
Name"
min-width=
"100px"
></el-table-column>
<el-table-column
label=
"券金额"
prop=
"
writeOffCount
"
min-width=
"100px"
sortable=
"custom"
></el-table-column>
<el-table-column
label=
"核销数量"
prop=
"writeOff
Price
"
min-width=
"100px"
sortable=
"custom"
></el-table-column>
<el-table-column
label=
"卡券名称"
prop=
"
card
Name"
min-width=
"100px"
></el-table-column>
<el-table-column
label=
"券金额"
prop=
"
cardDenomination
"
min-width=
"100px"
sortable=
"custom"
></el-table-column>
<el-table-column
label=
"核销数量"
prop=
"writeOff
Count
"
min-width=
"100px"
sortable=
"custom"
></el-table-column>
<el-table-column
label=
"核销金额"
prop=
"writeOffPrice"
min-width=
"100px"
sortable=
"custom"
></el-table-column>
<el-table-column
label=
"成本比例"
prop=
"costValue"
min-width=
"100px"
sortable=
"custom"
></el-table-column>
<el-table-column
label=
"成本比例"
prop=
"costValueProportion"
min-width=
"100px"
sortable=
"custom"
>
<template
slot-scope=
"
{ row }">
{{
row
.
costValueProportion
}}
%
</
template
>
</el-table-column>
<el-table-column
label=
"成本金额"
prop=
"costValue"
min-width=
"100px"
sortable=
"custom"
></el-table-column>
</el-table>
<dm-pagination
v-show=
"tableData.length"
background
class=
"dm-pagination"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"params.currentPage"
:page-sizes=
"[20, 40, 60, 80]"
:page-size=
"params.pageSize"
layout=
"total, sizes, prev, pager, next"
:total=
"total"
></dm-pagination>
...
...
@@ -64,6 +66,9 @@ export default {
};
</
script
>
<
style
lang=
"scss"
scoped
>
.w256
{
width
:
256px
;
}
.w261
{
width
:
261px
;
}
...
...
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