|
@@ -14,195 +14,231 @@
|
14
|
14
|
border
|
15
|
15
|
fit
|
16
|
16
|
highlight-current-row
|
17
|
|
- style="width: 100%;"
|
|
17
|
+ style="width: 100%"
|
18
|
18
|
@sort-change="sortChange"
|
19
|
19
|
>
|
20
|
|
- <el-table-column label="流水编号" min-width="100px" align="center">
|
21
|
|
- <template slot-scope="{row}">
|
|
20
|
+ <el-table-column label="流水编号" min-width="100px" align="center">
|
|
21
|
+ <template slot-scope="{ row }">
|
22
|
22
|
<span>{{ row.billId }}</span>
|
23
|
23
|
</template>
|
24
|
24
|
</el-table-column>
|
25
|
25
|
<el-table-column label="客户姓名" min-width="100px" align="center">
|
26
|
|
- <template slot-scope="{row}">
|
|
26
|
+ <template slot-scope="{ row }">
|
27
|
27
|
<span>{{ row.customerName }}</span>
|
28
|
28
|
</template>
|
29
|
29
|
</el-table-column>
|
30
|
|
- <el-table-column label="费用简介" min-width="100px" align="center">
|
31
|
|
- <template slot-scope="{row}">
|
32
|
|
- <span>{{ row.summary }}</span>
|
|
30
|
+ <el-table-column label="费用类型" min-width="100px" align="center">
|
|
31
|
+ <template slot-scope="{ row }">
|
|
32
|
+ <span>{{ row.feeType | feeTypeFilter }}</span>
|
33
|
33
|
</template>
|
34
|
34
|
</el-table-column>
|
35
|
35
|
<el-table-column label="金额" min-width="110px" align="center">
|
36
|
|
- <template slot-scope="{row}">
|
37
|
|
- <span>{{ row.amount /100 }}元</span>
|
|
36
|
+ <template slot-scope="{ row }">
|
|
37
|
+ <span>{{ row.amount }}牛币</span>
|
38
|
38
|
</template>
|
39
|
39
|
</el-table-column>
|
40
|
|
- <el-table-column label="收支类型" min-width="110px" align="center">
|
41
|
|
- <template slot-scope="{row}">
|
|
40
|
+ <el-table-column label="收支类型" min-width="110px" align="center">
|
|
41
|
+ <template slot-scope="{ row }">
|
42
|
42
|
<span>{{ row.feeSign == 1 ? "收入" : "支出" }}</span>
|
43
|
43
|
</template>
|
44
|
44
|
</el-table-column>
|
45
|
45
|
<el-table-column label="订单号" min-width="110px" align="center">
|
46
|
|
- <template slot-scope="{row}">
|
|
46
|
+ <template slot-scope="{ row }">
|
47
|
47
|
<span>{{ row.orderId }}</span>
|
48
|
48
|
</template>
|
49
|
49
|
</el-table-column>
|
50
|
|
- <el-table-column label="创建时间" prop="createTime" min-width="160px" align="center">
|
51
|
|
- <template slot-scope="{row}">
|
|
50
|
+ <el-table-column
|
|
51
|
+ label="创建时间"
|
|
52
|
+ prop="createTime"
|
|
53
|
+ min-width="160px"
|
|
54
|
+ align="center"
|
|
55
|
+ >
|
|
56
|
+ <template slot-scope="{ row }">
|
52
|
57
|
<span>{{ row.createDate }}</span>
|
53
|
58
|
</template>
|
54
|
59
|
</el-table-column>
|
55
|
60
|
</el-table>
|
56
|
61
|
|
57
|
|
- <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageIndex" :limit.sync="listQuery.pageSize" @pagination="getList" />
|
58
|
|
-
|
|
62
|
+ <pagination
|
|
63
|
+ v-show="total > 0"
|
|
64
|
+ :total="total"
|
|
65
|
+ :page.sync="listQuery.pageIndex"
|
|
66
|
+ :limit.sync="listQuery.pageSize"
|
|
67
|
+ @pagination="getList"
|
|
68
|
+ />
|
59
|
69
|
</div>
|
60
|
70
|
</template>
|
61
|
71
|
|
62
|
72
|
<script>
|
63
|
|
- import waves from '@/directive/waves'
|
64
|
|
- import Pagination from '@/components/Pagination'
|
65
|
|
- import customerApi from '@/api/lottery/customer-api'
|
66
|
|
-
|
67
|
|
- const stateEnum = { 0: '待审核', 1: '已审核', 2: '审核不通过' }
|
68
|
|
- const statusOptions = [
|
69
|
|
- { label: '已审核', value: 1 },
|
70
|
|
- { label: '待审核', value: 0 },
|
71
|
|
- { label: '审核不通过', value: 2 }
|
72
|
|
- ]
|
73
|
|
-
|
74
|
|
- export default {
|
75
|
|
- name: 'shopLotteryList',
|
76
|
|
- components: { Pagination },
|
77
|
|
- directives: { waves },
|
78
|
|
- filters: {
|
79
|
|
- statusFilter(state) {
|
80
|
|
- return stateEnum[state];
|
81
|
|
- }
|
82
|
|
- },
|
83
|
|
- data() {
|
84
|
|
- return {
|
85
|
|
- tableKey: 0,
|
86
|
|
- list: null,
|
87
|
|
- total: 0,
|
88
|
|
- listLoading: true,
|
89
|
|
- sortColumn: 'bill_id',
|
90
|
|
- sortAsc: false,
|
91
|
|
- listQuery: {
|
92
|
|
- pageIndex: 1,
|
93
|
|
- pageSize: 10,
|
94
|
|
- phone: null,
|
95
|
|
- customerId: "",
|
96
|
|
- idCard: null,
|
97
|
|
- name: null,
|
98
|
|
- pageSorts: []
|
99
|
|
- },
|
100
|
|
- statusOptions,
|
101
|
|
- tableColumnChecked: null
|
102
|
|
- }
|
103
|
|
- },
|
104
|
|
- created() {
|
105
|
|
- this.listQuery.customerId = this.$route.query.customerId;
|
106
|
|
- this.setDefaultSort()
|
107
|
|
- this.getList()
|
108
|
|
- },
|
109
|
|
- methods: {
|
110
|
|
- getList() {
|
111
|
|
- this.listLoading = true
|
112
|
|
- customerApi.getBillPageList(this.listQuery).then(response => {
|
113
|
|
- this.list = response.data.records
|
114
|
|
- this.total = response.data.total
|
115
|
|
- this.listLoading = false
|
116
|
|
- });
|
|
73
|
+import waves from "@/directive/waves";
|
|
74
|
+import Pagination from "@/components/Pagination";
|
|
75
|
+import customerApi from "@/api/lottery/customer-api";
|
|
76
|
+
|
|
77
|
+// const stateEnum = { 0: "待审核", 1: "已审核", 2: "审核不通过" };
|
|
78
|
+const statusOptions = [
|
|
79
|
+ { label: "已审核", value: 1 },
|
|
80
|
+ { label: "待审核", value: 0 },
|
|
81
|
+ { label: "审核不通过", value: 2 }
|
|
82
|
+];
|
|
83
|
+
|
|
84
|
+const feeTypeList = {
|
|
85
|
+ DEPOSIT: "充值",
|
|
86
|
+ BETTING: "投注",
|
|
87
|
+ DRAW_LOTTERY: "中奖",
|
|
88
|
+ SENT_AWARD: "派奖",
|
|
89
|
+ CASH_OUT: "提现"
|
|
90
|
+};
|
|
91
|
+
|
|
92
|
+export default {
|
|
93
|
+ name: "ShopLotteryList",
|
|
94
|
+ components: { Pagination },
|
|
95
|
+ directives: { waves },
|
|
96
|
+ filters: {
|
|
97
|
+ feeTypeFilter(state) {
|
|
98
|
+ return feeTypeList[state];
|
|
99
|
+ }
|
|
100
|
+ },
|
|
101
|
+ data() {
|
|
102
|
+ return {
|
|
103
|
+ tableKey: 0,
|
|
104
|
+ list: null,
|
|
105
|
+ total: 0,
|
|
106
|
+ listLoading: true,
|
|
107
|
+ sortColumn: "bill_id",
|
|
108
|
+ sortAsc: false,
|
|
109
|
+ listQuery: {
|
|
110
|
+ pageIndex: 1,
|
|
111
|
+ pageSize: 10,
|
|
112
|
+ phone: null,
|
|
113
|
+ customerId: "",
|
|
114
|
+ idCard: null,
|
|
115
|
+ name: null,
|
|
116
|
+ pageSorts: []
|
117
|
117
|
},
|
|
118
|
+ statusOptions,
|
|
119
|
+ tableColumnChecked: null
|
|
120
|
+ };
|
|
121
|
+ },
|
|
122
|
+ created() {
|
|
123
|
+ this.listQuery.customerId = this.$route.query.customerId;
|
|
124
|
+ this.setDefaultSort();
|
|
125
|
+ this.getList();
|
|
126
|
+ },
|
|
127
|
+ beforeRouteEnter(to, from, next) {
|
|
128
|
+ next((vm) => {
|
|
129
|
+ vm.listQuery.customerId = vm.$route.query.customerId;
|
|
130
|
+ vm.setDefaultSort();
|
|
131
|
+ vm.getList();
|
|
132
|
+ });
|
|
133
|
+ },
|
|
134
|
+ beforeRouteUpdate(to, from, next) {
|
|
135
|
+ console.log(to, from)
|
|
136
|
+ this.listQuery.customerId = to.query.customerId;
|
|
137
|
+ this.setDefaultSort();
|
|
138
|
+ this.getList();
|
|
139
|
+ next();
|
|
140
|
+ },
|
|
141
|
+ methods: {
|
|
142
|
+ getList() {
|
|
143
|
+ this.listLoading = true;
|
|
144
|
+ customerApi.getBillPageList(this.listQuery).then((response) => {
|
|
145
|
+ this.list = response.data.records;
|
|
146
|
+ this.total = response.data.total;
|
|
147
|
+ this.listLoading = false;
|
|
148
|
+ });
|
|
149
|
+ },
|
118
|
150
|
|
119
|
|
- handleFilter() {
|
120
|
|
- this.listQuery.pageIndex = 1
|
121
|
|
- this.getList()
|
122
|
|
- },
|
123
|
|
- setDefaultSort() {
|
124
|
|
- // 设置默认排序
|
125
|
|
- this.listQuery.pageSorts = [{
|
|
151
|
+ handleFilter() {
|
|
152
|
+ this.listQuery.pageIndex = 1;
|
|
153
|
+ this.getList();
|
|
154
|
+ },
|
|
155
|
+ setDefaultSort() {
|
|
156
|
+ // 设置默认排序
|
|
157
|
+ this.listQuery.pageSorts = [
|
|
158
|
+ {
|
126
|
159
|
column: this.sortColumn,
|
127
|
160
|
asc: this.sortAsc
|
128
|
|
- }]
|
129
|
|
- },
|
130
|
|
- sortChange(data) {
|
131
|
|
- const { prop, order } = data
|
132
|
|
- if (prop === 'createTime') {
|
133
|
|
- this.sortColumn = 'create_time'
|
134
|
|
- } else {
|
135
|
|
- this.sortColumn = prop
|
136
|
161
|
}
|
137
|
|
- this.sortAsc = order === 'ascending'
|
138
|
|
- this.listQuery.pageSorts = [{
|
|
162
|
+ ];
|
|
163
|
+ },
|
|
164
|
+ sortChange(data) {
|
|
165
|
+ const { prop, order } = data;
|
|
166
|
+ if (prop === "createTime") {
|
|
167
|
+ this.sortColumn = "create_time";
|
|
168
|
+ } else {
|
|
169
|
+ this.sortColumn = prop;
|
|
170
|
+ }
|
|
171
|
+ this.sortAsc = order === "ascending";
|
|
172
|
+ this.listQuery.pageSorts = [
|
|
173
|
+ {
|
139
|
174
|
column: this.sortColumn,
|
140
|
175
|
asc: this.sortAsc
|
141
|
|
- }]
|
142
|
|
- this.handleFilter()
|
143
|
|
- },
|
144
|
|
- getSortClass: function(key) {
|
145
|
|
- if (this.sortColumn === key) {
|
146
|
|
- return this.sortAsc ? 'ascending' : 'descending'
|
147
|
|
- } else {
|
148
|
|
- return ''
|
149
|
176
|
}
|
150
|
|
- },
|
151
|
|
- handUpdate(id, username) {
|
152
|
|
- this.$confirm('您确定要删除 ' + username + ' ?', '删除提示', {
|
153
|
|
- confirmButtonText: '确定',
|
154
|
|
- cancelButtonText: '取消',
|
155
|
|
- type: 'warning'
|
156
|
|
- }).then(() => {
|
157
|
|
- sysUserApi.delete(id).then(response => {
|
158
|
|
- this.$message({
|
159
|
|
- type: 'success',
|
160
|
|
- message: '删除成功!'
|
161
|
|
- });
|
162
|
|
- this.handleFilter();
|
163
|
|
- })
|
164
|
|
- });
|
|
177
|
+ ];
|
|
178
|
+ this.handleFilter();
|
|
179
|
+ },
|
|
180
|
+ getSortClass: function(key) {
|
|
181
|
+ if (this.sortColumn === key) {
|
|
182
|
+ return this.sortAsc ? "ascending" : "descending";
|
|
183
|
+ } else {
|
|
184
|
+ return "";
|
165
|
185
|
}
|
166
|
186
|
}
|
|
187
|
+ // handUpdate(id, username) {
|
|
188
|
+ // this.$confirm("您确定要删除 " + username + " ?", "删除提示", {
|
|
189
|
+ // confirmButtonText: "确定",
|
|
190
|
+ // cancelButtonText: "取消",
|
|
191
|
+ // type: "warning"
|
|
192
|
+ // }).then(() => {
|
|
193
|
+ // sysUserApi.delete(id).then((response) => {
|
|
194
|
+ // this.$message({
|
|
195
|
+ // type: "success",
|
|
196
|
+ // message: "删除成功!"
|
|
197
|
+ // });
|
|
198
|
+ // this.handleFilter();
|
|
199
|
+ // });
|
|
200
|
+ // });
|
|
201
|
+ // }
|
167
|
202
|
}
|
|
203
|
+};
|
168
|
204
|
</script>
|
169
|
205
|
|
170
|
206
|
<style lang="scss">
|
171
|
|
- #sys-user-list .el-table th, .el-table td{
|
172
|
|
- padding: 6px 0px;
|
173
|
|
- }
|
174
|
|
-
|
175
|
|
- #sys-user-list .filter-container {
|
176
|
|
- padding-bottom: 10px;
|
177
|
|
- }
|
178
|
|
-
|
179
|
|
- #sys-user-list .filter-container .tree-select-item{
|
180
|
|
- width: 120px;
|
181
|
|
- display: inline-block;
|
182
|
|
- vertical-align: top;
|
183
|
|
- margin-right: 4px;
|
184
|
|
- }
|
185
|
|
-
|
186
|
|
- #sys-user-list .input-with-select {
|
187
|
|
- vertical-align: top;
|
188
|
|
- width: 505px;
|
189
|
|
- margin-right: 4px;
|
190
|
|
- }
|
191
|
|
-
|
192
|
|
- #sys-user-list .input-with-select .el-select .el-input {
|
193
|
|
- width: 120px;
|
194
|
|
- }
|
195
|
|
-
|
196
|
|
- #sys-user-list .input-with-select .el-input-group__prepend {
|
197
|
|
- background-color: #fff;
|
198
|
|
- }
|
199
|
|
-
|
200
|
|
- #sys-user-list .filter-item {
|
201
|
|
- margin-right: 4px;
|
202
|
|
- }
|
203
|
|
-
|
204
|
|
- #sys-user-list .el-table__body .operation .cell {
|
205
|
|
- text-align: center;
|
206
|
|
- }
|
207
|
|
-
|
|
207
|
+#sys-user-list .el-table th,
|
|
208
|
+.el-table td {
|
|
209
|
+ padding: 6px 0px;
|
|
210
|
+}
|
|
211
|
+
|
|
212
|
+#sys-user-list .filter-container {
|
|
213
|
+ padding-bottom: 10px;
|
|
214
|
+}
|
|
215
|
+
|
|
216
|
+#sys-user-list .filter-container .tree-select-item {
|
|
217
|
+ width: 120px;
|
|
218
|
+ display: inline-block;
|
|
219
|
+ vertical-align: top;
|
|
220
|
+ margin-right: 4px;
|
|
221
|
+}
|
|
222
|
+
|
|
223
|
+#sys-user-list .input-with-select {
|
|
224
|
+ vertical-align: top;
|
|
225
|
+ width: 505px;
|
|
226
|
+ margin-right: 4px;
|
|
227
|
+}
|
|
228
|
+
|
|
229
|
+#sys-user-list .input-with-select .el-select .el-input {
|
|
230
|
+ width: 120px;
|
|
231
|
+}
|
|
232
|
+
|
|
233
|
+#sys-user-list .input-with-select .el-input-group__prepend {
|
|
234
|
+ background-color: #fff;
|
|
235
|
+}
|
|
236
|
+
|
|
237
|
+#sys-user-list .filter-item {
|
|
238
|
+ margin-right: 4px;
|
|
239
|
+}
|
|
240
|
+
|
|
241
|
+#sys-user-list .el-table__body .operation .cell {
|
|
242
|
+ text-align: center;
|
|
243
|
+}
|
208
|
244
|
</style>
|