zlisen vor 4 Jahren
Ursprung
Commit
628345aa5b

+ 1
- 1
.env.development Datei anzeigen

@@ -2,7 +2,7 @@
2 2
 ENV = 'development'
3 3
 
4 4
 # base api
5
-VUE_APP_BASE_API = 'http://localhost:8888/api/admin'
5
+VUE_APP_BASE_API = 'http://192.168.31.68:8888/api/admin'
6 6
 
7 7
 # vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
8 8
 # to control whether the babel-plugin-dynamic-import-node plugin is enabled.

+ 8
- 0
src/api/lottery/customer-api.js Datei anzeigen

@@ -25,4 +25,12 @@ customerApi.getBillPageList = data => {
25 25
   })
26 26
 }
27 27
 
28
+customerApi.getShopBillPageList = data => {
29
+  return request({
30
+    url: '/taShopBill/getPageList',
31
+    method: 'post',
32
+    data
33
+  })
34
+}
35
+
28 36
 export default customerApi

+ 8
- 1
src/router/index.js Datei anzeigen

@@ -219,7 +219,14 @@ export const asyncRoutes = [
219 219
         path: 'customer-bill-list',
220 220
         component: () => import('@/views/lottery/customer/customer-bill-list'),
221 221
         name: 'customerBillList',
222
-        meta: { title: '财务管理', icon: 'edit' }
222
+        meta: { title: '彩民财务管理', icon: 'edit' }
223
+      },
224
+      {
225
+        path: 'shop-bill-list',
226
+        component: () => import('@/views/lottery/shop/shop-bill-list'),
227
+        name: 'shopBillList',
228
+        meta: { title: '彩票站财务管理', icon: 'edit' },
229
+        hidden: true
223 230
       }
224 231
     ]
225 232
   },

+ 183
- 147
src/views/lottery/customer/customer-bill-list.vue Datei anzeigen

@@ -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>

+ 238
- 0
src/views/lottery/shop/shop-bill-list.vue Datei anzeigen

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

+ 7
- 6
src/views/lottery/shop/shop-lottery-list.vue Datei anzeigen

@@ -30,7 +30,7 @@
30 30
       </el-table-column>
31 31
       <el-table-column label="店铺名称" min-width="100px" align="center">
32 32
         <template slot-scope="{row}">
33
-          <span @click="detailShop(row)" style="color: blue; cursor:pointer">{{ row.name }}</span>
33
+          <span style="color: blue; cursor:pointer" @click="detailShop(row)">{{ row.name }}</span>
34 34
         </template>
35 35
       </el-table-column>
36 36
       <el-table-column label="详细地址" min-width="110px" align="center">
@@ -50,15 +50,15 @@
50 50
       </el-table-column>
51 51
       <el-table-column label="操作" align="center" width="240" class-name="operation">
52 52
         <template slot-scope="{row}">
53
-          <el-link type="warning" @click="handVerify(row.shopId)">{{row.status == 0 ? "审核" : ""}}</el-link>
54
-          <el-link type="warning" @click="handManage(row.shopId)">彩种管理</el-link>
53
+          <el-link type="warning" @click="handVerify(row.shopId)">{{ row.status == 0 ? "审核" : "" }}</el-link>
54
+          <el-link type="warning" @click="handManage(row.shopId)">财务管理</el-link>
55 55
         </template>
56 56
       </el-table-column>
57 57
     </el-table>
58 58
 
59 59
     <pagination v-show="total>0" :total="total" :page.sync="listQuery.pageIndex" :limit.sync="listQuery.pageSize" @pagination="getList" />
60 60
 
61
-    <shop-verify ref="verifyPage" @change="getList"/>
61
+    <shop-verify ref="verifyPage" @change="getList" />
62 62
     <shop-lottery-manage ref="shopLotteryManagePage" />
63 63
     <shop-detail ref="shopDetailPage" />
64 64
 
@@ -82,7 +82,7 @@
82 82
   ]
83 83
 
84 84
   export default {
85
-    name: 'shopLotteryList',
85
+    name: 'ShopLotteryList',
86 86
     components: { Pagination, ShopVerify, ShopLotteryManage, ShopDetail },
87 87
     directives: { waves },
88 88
     filters: {
@@ -166,7 +166,8 @@
166 166
       },
167 167
       handManage(id) {
168 168
         this.$nextTick(() => {
169
-          this.$refs.shopLotteryManagePage.handle(id)
169
+          // this.$refs.shopLotteryManagePage.handle(id)
170
+this.$router.push("shop-bill-list?customerId=" + id)
170 171
         });
171 172
       }
172 173
     }