Kaynağa Gözat

财务管理列表完成

傅行帆 4 yıl önce
ebeveyn
işleme
5cb0fd0352

+ 8
- 0
src/api/lottery/customer-api.js Dosyayı Görüntüle

@@ -17,4 +17,12 @@ customerApi.getPageList = data => {
17 17
   })
18 18
 }
19 19
 
20
+customerApi.getBillPageList = data => {
21
+  return request({
22
+    url: '/taCustomerBill/getPageList',
23
+    method: 'post',
24
+    data
25
+  })
26
+}
27
+
20 28
 export default customerApi

+ 7
- 1
src/router/index.js Dosyayı Görüntüle

@@ -170,9 +170,15 @@ export const asyncRoutes = [
170 170
       {
171 171
         path: 'customer-lottery-list',
172 172
         component: () => import('@/views/lottery/customer/customer-lottery-list'),
173
-        name: 'customerLotteryList2',
173
+        name: 'customerLotteryList',
174 174
         meta: { title: '彩民管理', icon: 'edit' }
175 175
       },
176
+      {
177
+        path: 'customer-bill-list',
178
+        component: () => import('@/views/lottery/customer/customer-bill-list'),
179
+        name: 'customerBillList',
180
+        meta: { title: '财务管理', icon: 'edit' }
181
+      },
176 182
     ]
177 183
   },
178 184
   // 404 page must be placed at the end !!!

+ 206
- 0
src/views/lottery/customer/customer-bill-list.vue Dosyayı Görüntüle

@@ -0,0 +1,206 @@
1
+<template>
2
+  <div id="sys-user-list" class="app-container">
3
+    <!-- <div class="filter-container">
4
+      <el-input v-model="listQuery.name" placeholder="请输入昵称" clearable style="width: 160px" />
5
+      <el-input v-model="listQuery.phone" placeholder="请输入手机号" clearable style="width: 160px" />
6
+      <el-input v-model="listQuery.idCard" placeholder="请输入身份证号" clearable style="width: 160px" />
7
+      <el-button v-waves type="primary" icon="el-icon-search" style="width: 115px;" @click="handleFilter">搜索</el-button>
8
+    </div> -->
9
+
10
+    <el-table
11
+      :key="tableKey"
12
+      v-loading="listLoading"
13
+      :data="list"
14
+      border
15
+      fit
16
+      highlight-current-row
17
+      style="width: 100%;"
18
+      @sort-change="sortChange"
19
+    >
20
+       <el-table-column label="流水编号" min-width="100px" align="center">
21
+        <template slot-scope="{row}">
22
+          <span>{{ row.billId }}</span>
23
+        </template>
24
+      </el-table-column>
25
+      <el-table-column label="客户姓名" min-width="100px" align="center">
26
+        <template slot-scope="{row}">
27
+          <span>{{ row.customerName }}</span>
28
+        </template>
29
+      </el-table-column>
30
+      <el-table-column label="费用简介" min-width="100px" align="center">
31
+        <template slot-scope="{row}">
32
+          <span>{{ row.summary }}</span>
33
+        </template>
34
+      </el-table-column>
35
+      <el-table-column label="金额" min-width="110px" align="center">
36
+        <template slot-scope="{row}">
37
+          <span>{{ row.amount /100 }}元</span>
38
+        </template>
39
+      </el-table-column>
40
+       <el-table-column label="收支类型" min-width="110px" align="center">
41
+        <template slot-scope="{row}">
42
+          <span>{{ row.feeSign == 1 ? "收入" : "支出" }}</span>
43
+        </template>
44
+      </el-table-column>
45
+      <el-table-column label="订单号" min-width="110px" align="center">
46
+        <template slot-scope="{row}">
47
+          <span>{{ row.orderId }}</span>
48
+        </template>
49
+      </el-table-column>
50
+      <el-table-column label="创建时间" prop="createTime" min-width="160px" align="center">
51
+        <template slot-scope="{row}">
52
+          <span>{{ row.createDate }}</span>
53
+        </template>
54
+      </el-table-column>
55
+    </el-table>
56
+
57
+    <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageIndex" :limit.sync="listQuery.pageSize" @pagination="getList" />
58
+
59
+  </div>
60
+</template>
61
+
62
+<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
+          idCard: null,
96
+          name: null,
97
+          pageSorts: []
98
+        },
99
+        statusOptions,
100
+        tableColumnChecked: null
101
+      }
102
+    },
103
+    created() {
104
+      this.setDefaultSort()
105
+      this.getList()
106
+    },
107
+    methods: {
108
+      getList() {
109
+        this.listLoading = true
110
+        customerApi.getBillPageList(this.listQuery).then(response => {
111
+          this.list = response.data.records
112
+          this.total = response.data.total
113
+          this.listLoading = false
114
+        });
115
+      },
116
+
117
+      handleFilter() {
118
+        this.listQuery.pageIndex = 1
119
+        this.getList()
120
+      },
121
+      setDefaultSort() {
122
+        // 设置默认排序
123
+        this.listQuery.pageSorts = [{
124
+          column: this.sortColumn,
125
+          asc: this.sortAsc
126
+        }]
127
+      },
128
+      sortChange(data) {
129
+        const { prop, order } = data
130
+        if (prop === 'createTime') {
131
+          this.sortColumn = 'create_time'
132
+        } else {
133
+          this.sortColumn = prop
134
+        }
135
+        this.sortAsc = order === 'ascending'
136
+        this.listQuery.pageSorts = [{
137
+          column: this.sortColumn,
138
+          asc: this.sortAsc
139
+        }]
140
+        this.handleFilter()
141
+      },
142
+      getSortClass: function(key) {
143
+        if (this.sortColumn === key) {
144
+          return this.sortAsc ? 'ascending' : 'descending'
145
+        } else {
146
+          return ''
147
+        }
148
+      },
149
+      handUpdate(id, username) {
150
+        this.$confirm('您确定要删除 ' + username + ' ?', '删除提示', {
151
+          confirmButtonText: '确定',
152
+          cancelButtonText: '取消',
153
+          type: 'warning'
154
+        }).then(() => {
155
+          sysUserApi.delete(id).then(response => {
156
+            this.$message({
157
+              type: 'success',
158
+              message: '删除成功!'
159
+            });
160
+            this.handleFilter();
161
+          })
162
+        });
163
+      }
164
+    }
165
+  }
166
+</script>
167
+
168
+<style lang="scss">
169
+  #sys-user-list .el-table th, .el-table td{
170
+    padding: 6px 0px;
171
+  }
172
+
173
+  #sys-user-list .filter-container {
174
+    padding-bottom: 10px;
175
+  }
176
+
177
+  #sys-user-list .filter-container .tree-select-item{
178
+    width: 120px;
179
+    display: inline-block;
180
+    vertical-align: top;
181
+    margin-right: 4px;
182
+  }
183
+
184
+  #sys-user-list .input-with-select {
185
+    vertical-align: top;
186
+    width: 505px;
187
+    margin-right: 4px;
188
+  }
189
+
190
+  #sys-user-list .input-with-select .el-select .el-input {
191
+    width: 120px;
192
+  }
193
+
194
+  #sys-user-list .input-with-select .el-input-group__prepend {
195
+    background-color: #fff;
196
+  }
197
+
198
+  #sys-user-list .filter-item {
199
+    margin-right: 4px;
200
+  }
201
+
202
+  #sys-user-list .el-table__body .operation .cell {
203
+    text-align: center;
204
+  }
205
+
206
+</style>