Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
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
罗超
confucius
Commits
07e51137
Commit
07e51137
authored
Apr 02, 2022
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
45b27315
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
103 additions
and
73 deletions
+103
-73
starBucksDetail.vue
src/pages/administration/starBucks/starBucksDetail.vue
+86
-54
starBucksTotal.vue
src/pages/administration/starBucks/starBucksTotal.vue
+17
-19
No files found.
src/pages/administration/starBucks/starBucksDetail.vue
View file @
07e51137
...
...
@@ -13,8 +13,8 @@
<div
class=
"col-2 Sysuser_Date"
>
<q-field
filled
dense
>
<template
v-slot:control
>
<el-date-picker
v-model=
"msg.StartTime"
size=
"mini"
style=
"width:100%"
type=
"date"
placeholder=
"选择开始日期
"
value-format=
"yyyy-MM-dd"
@
change=
"resetSearch"
>
<el-date-picker
v-model=
"msg.StartTime"
size=
"mini"
style=
"width:100%"
:clearable=
"false"
type=
"date
"
placeholder=
"选择开始日期"
value-format=
"yyyy-MM-dd"
@
change=
"resetSearch"
>
</el-date-picker>
</
template
>
</q-field>
...
...
@@ -22,19 +22,19 @@
<div
class=
"col-2"
>
<q-field
filled
dense
>
<
template
v-slot:control
>
<el-date-picker
v-model=
"msg.EndTime"
size=
"mini"
style=
"width:100%"
type=
"date"
placeholder=
"选择结束日期
"
value-format=
"yyyy-MM-dd"
@
change=
"resetSearch"
>
<el-date-picker
v-model=
"msg.EndTime"
size=
"mini"
style=
"width:100%"
:clearable=
"false"
type=
"date
"
placeholder=
"选择结束日期"
value-format=
"yyyy-MM-dd"
@
change=
"resetSearch"
>
</el-date-picker>
</
template
>
</q-field>
</div>
<div
class=
"col-2"
style=
"display:flex;align-items:center;"
>
<q-
radio
dense
v-model=
"msg.Type"
style=
"margin-right:20px;"
@
input=
"resetSearch"
:val=
"1"
label=
"存入"
/>
<q-radio
dense
v-model=
"msg.Type"
:val=
"2"
label=
"消费"
@
input=
"resetSearch"
/>
<div
class=
"col-2"
>
<q-
select
stack-label
color=
"primary"
dense
filled
label=
"消费类型"
option-value=
"Id"
option-label=
"Name"
:options=
"TypeList"
v-model=
"msg.Type"
@
input=
"resetSearch"
emit-value
map-options
/>
</div>
<div
class=
"col-3"
style=
"display:flex;align-items:center;"
>
<q-
radio
dense
v-model=
"msg.BuyType"
style=
"margin-right:20px;"
@
input=
"resetSearch"
:val=
"1"
label=
"免费的"
/>
<q-radio
dense
v-model=
"msg.BuyType"
:val=
"2"
label=
"使用购买的"
@
input=
"resetSearch"
/>
<div
class=
"col-3"
>
<q-
select
stack-label
color=
"primary"
dense
filled
label=
"使用类型"
option-value=
"Id"
option-label=
"Name"
:options=
"BuyTypeList"
v-model=
"msg.BuyType"
@
input=
"resetSearch"
emit-value
map-options
/>
</div>
</div>
</div>
...
...
@@ -45,8 +45,8 @@
<div
class=
"col-2 q-table__title"
>
咖啡劵详情
</div>
<q-space
/>
<div
class=
"page-option"
>
<q-btn
color=
"accent"
class=
"q-mr-md"
size=
"sm"
icon=
"download"
style=
"margin-top:15px;"
label=
"下载
"
@
click=
"downloadStarBucks"
/>
<q-btn
color=
"accent"
class=
"q-mr-md"
v-if=
"isShowDown"
size=
"sm"
icon=
"download"
style=
"margin-top:15px;
"
label=
"下载"
@
click=
"downloadStarBucks"
/>
</div>
</
template
>
<
template
v-slot:body-cell-Type=
"props"
>
...
...
@@ -68,15 +68,11 @@
<span
v-if=
"props.row.EmpType==3"
>
来宾
</span>
</q-td>
</
template
>
<
template
v-slot:body-cell-User
Name
=
"props"
>
<
template
v-slot:body-cell-User
Icon
=
"props"
>
<q-td
:props=
"props"
>
<q-avatar
rounded
size=
"sm"
v-if=
"props.row.UserIcon"
>
<img
:src=
"props.row.UserIcon"
/>
</q-avatar>
<q-avatar
rounded
size=
"sm"
color=
"teal-10"
text-color=
"white"
v-if=
"!props.row.UserIcon"
>
{{
props
.
row
.
UserName
.
substring
(
0
,
1
)
}}
</q-avatar>
<span
style=
"position:relative;top:2px;margin-left:2px;"
>
{{
props
.
row
.
UserName
}}
</span>
</q-td>
</
template
>
<
template
v-slot:bottom
>
...
...
@@ -101,34 +97,52 @@
rowsPerPage
:
10
,
StartTime
:
''
,
EndTime
:
''
,
Type
:
2
,
//1存入 2消费
BuyType
:
1
//使用类型 1免费的 2使用购买的
Type
:
0
,
//1存入 2消费
BuyType
:
0
//使用类型 1免费的 2使用购买的
},
TypeList
:
[{
Id
:
0
,
Name
:
'不限'
},
{
Id
:
1
,
Name
:
'存入'
},
{
Id
:
2
,
Name
:
'消费'
}],
BuyTypeList
:
[{
Id
:
0
,
Name
:
'不限'
},
{
Id
:
1
,
Name
:
'免费的'
},
{
Id
:
2
,
Name
:
'使用购买的'
}],
pageCount
:
0
,
dataList
:
[],
loading
:
true
,
columns
:
[{
name
:
'Type'
,
label
:
'类型'
,
field
:
'Type'
,
align
:
'left'
name
:
'UserName'
,
label
:
'用户名称'
,
align
:
'left'
,
field
:
'UserName'
},
{
name
:
'UserIcon'
,
label
:
'用户头像'
,
align
:
'left'
,
field
:
'UserIcon'
},
{
name
:
'BuyType'
,
label
:
'使用类型'
,
field
:
'BuyType'
,
align
:
'left'
},
{
name
:
'Number'
,
label
:
'数量'
,
align
:
'left'
,
field
:
'Number'
},
{
name
:
'Remark'
,
label
:
'备注'
,
align
:
'left'
,
field
:
'Remark'
},
{
name
:
'Type'
,
label
:
'消费类型'
,
field
:
'Type'
,
align
:
'left'
},
{
name
:
'EmpType'
,
...
...
@@ -137,16 +151,22 @@
field
:
'EmpType'
},
{
name
:
'
User
Name'
,
label
:
'
甲鹤用户名称
'
,
name
:
'
EmpStu
Name'
,
label
:
'
员工/学员
'
,
align
:
'left'
,
field
:
'
User
Name'
field
:
'
EmpStu
Name'
},
{
name
:
'
EmpStuName
'
,
label
:
'
学生姓名
'
,
name
:
'
Number
'
,
label
:
'
数量
'
,
align
:
'left'
,
field
:
'EmpStuName'
field
:
'Number'
},
{
name
:
'Remark'
,
label
:
'备注'
,
align
:
'left'
,
field
:
'Remark'
},
{
name
:
'CreateByName'
,
...
...
@@ -161,9 +181,21 @@
align
:
'left'
}
],
isShowDown
:
false
}
},
watch
:
{
msg
:
{
handler
(
val
)
{
if
(
val
)
{
if
(
val
.
StartTime
!=
''
&&
val
.
EndTime
!=
''
)
{
this
.
isShowDown
=
true
;
}
}
},
deep
:
true
},
},
mounted
()
{
if
(
this
.
$route
.
query
)
{
if
(
this
.
$route
.
query
.
Type
==
1
)
{
...
...
@@ -248,19 +280,19 @@
downloadStarBucks
()
{
this
.
loading
=
true
;
var
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
));
var
dt1
=
msg
.
EndTime
;
var
dt2
=
msg
.
StartTime
;
if
(
dt1
!=
null
&&
dt2
!=
null
){
dt1
=
dt1
.
split
(
'-'
);
dt1
=
parseInt
(
dt1
[
0
])
*
12
+
parseInt
(
dt1
[
1
]);
dt2
=
dt2
.
split
(
'-'
);
dt2
=
parseInt
(
dt2
[
0
])
*
12
+
parseInt
(
dt2
[
1
]);
var
num
=
Math
.
abs
(
dt1
-
dt2
);
if
(
num
>
30
){
msg
.
EndTime
=
this
.
getNextMonth
(
msg
.
StartTime
);
}
var
d1
=
msg
.
StartTime
;
var
d2
=
msg
.
EndTime
;
if
(
d1
!=
null
&&
d2
!=
null
)
{
var
dd1
=
new
Date
(
d1
);
var
dd2
=
new
Date
(
d2
);
var
num
=
(
dd2
-
dd1
)
/
(
1000
*
60
*
60
*
24
)
if
(
num
>
30
)
{
msg
.
EndTime
=
this
.
getNextMonth
(
msg
.
StartTime
);
}
}
this
.
GetLocalFileDS
(
"/api/Coffee/GetCoffeeCouponsListToExcel"
,
{...
msg
},
"咖啡详情统计.xls"
)
this
.
GetLocalFileDS
(
"/api/Coffee/GetCoffeeCouponsListToExcel"
,
{
...
msg
},
"咖啡详情统计.xls"
)
this
.
loading
=
false
;
}
}
...
...
src/pages/administration/starBucks/starBucksTotal.vue
View file @
07e51137
...
...
@@ -196,12 +196,6 @@
align
:
'left'
,
field
:
row
=>
row
.
CList
},
{
name
:
'EmpBuyNum'
,
label
:
'员工购买'
,
align
:
'left'
,
field
:
row
=>
row
.
CList
},
{
name
:
'EmpFreeNum'
,
label
:
'员工赠送'
,
...
...
@@ -209,8 +203,8 @@
field
:
row
=>
row
.
CList
},
{
name
:
'
Stu
BuyNum'
,
label
:
'
学员
购买'
,
name
:
'
Emp
BuyNum'
,
label
:
'
员工
购买'
,
align
:
'left'
,
field
:
row
=>
row
.
CList
},
...
...
@@ -221,8 +215,8 @@
field
:
row
=>
row
.
CList
},
{
name
:
'
LB
BuyNum'
,
label
:
'
来宾
购买'
,
name
:
'
Stu
BuyNum'
,
label
:
'
学员
购买'
,
align
:
'left'
,
field
:
row
=>
row
.
CList
},
...
...
@@ -232,6 +226,12 @@
align
:
'left'
,
field
:
row
=>
row
.
CList
},
{
name
:
'LBBuyNum'
,
label
:
'来宾购买'
,
align
:
'left'
,
field
:
row
=>
row
.
CList
},
{
name
:
'Income'
,
label
:
'当日收款'
,
...
...
@@ -311,14 +311,10 @@
},
//跳转详情
goDetail
(
obj
)
{
console
.
log
(
obj
);
this
.
$router
.
push
({
path
:
'/administration/starBucks/starBucksDetail'
,
query
:
{
Date
:
obj
.
value
,
Type
:
this
.
msg
.
SelectType
},
});
this
.
OpenNewUrl
(
'/administration/starBucks/starBucksDetail'
,
{
Date
:
obj
.
value
,
Type
:
this
.
msg
.
SelectType
})
},
//查询条件改变
resetSearch
()
{
...
...
@@ -328,7 +324,9 @@
downloadStarBucks
()
{
this
.
loading
=
true
;
var
msg
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
msg
));
this
.
GetLocalFileDS
(
"/api/Coffee/GetCoffeeStatisticsToExcel"
,
{...
this
.
msg
},
"咖啡数据统计.xls"
)
this
.
GetLocalFileDS
(
"/api/Coffee/GetCoffeeStatisticsToExcel"
,
{
...
this
.
msg
},
"咖啡数据统计.xls"
)
this
.
loading
=
false
;
}
}
...
...
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