serviceDetailDialog.vue
2.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!-- 服务商 - 财务列表 - 查看详情 -->
<template>
<d2-dialog
title="查看详情"
:is-visible.sync="isVisible"
btn-ok-label="关闭"
width="700px"
:no-cancel="noCancel"
@confirmDialog="handleDetailClose"
@closeDialog="handleDetailClose">
<el-form
:inline="true"
label-width="0">
<el-form-item>
<span class="picker-placeholder">
<el-date-picker
v-model="summaryDate"
type="month"
placeholder="全部"
:clear="false"
:picker-options="{
disabledDate(time) {
return time.getTime() > Date.now();
},
shortcuts: [{
text: '全部',
onClick(picker) {
picker.$emit('pick', '');
}
}]
}" />
</span>
<el-button
@click="getList"
type="primary">
查询
</el-button>
</el-form-item>
</el-form>
<el-table
:data="tableData"
style="width: 100%"
border>
<el-table-column
label="序号"
type="index"
:align="align" />
<el-table-column
prop="yqMerchantName"
label="园区店名称"
:align="align" />
<el-table-column
prop="subNums"
label="订单笔数"
:align="align" />
<el-table-column
prop="totalFranchiseeProfitMoney"
label="总收入(元)"
:align="align" />
</el-table>
</d2-dialog>
</template>
<script>
// import moment from 'moment'
import dayjs from 'dayjs'
import { getServiceSummaryApi } from '@api/finance'
export default {
name: 'ServiceDetailDialog',
data() {
return {
noCancel: true,
align: 'center',
summaryDate: '',
tableData: []
}
},
props: {
isVisible: {
type: Boolean,
default: false
},
date: {
type: String,
default: ''
}
},
watch: {
isVisible(val) {
this.summaryDate = val ? this.date : ''
val && this.getList()
}
},
mounted() { },
methods: {
getList() {
getServiceSummaryApi({
payStartDateStr: this.summaryDate ? dayjs(this.summaryDate).startOf('month').format('YYYY-MM-DD') : '',
payEndDateStr: this.summaryDate ? dayjs(this.summaryDate).endOf('month').format('YYYY-MM-DD') : ''
}).then((res) => {
this.tableData = res.countList
})
},
handleDetailClose() {
this.$emit('handleStoreClose')
}
}
}
</script>
<style lang="scss">
.picker-placeholder {
.el-input__inner::-webkit-input-placeholder {
color: #606266;
}
}
</style>