浏览代码

停车卡,错峰卡修改为平台页面接口

duwendi 1 年之前
父节点
当前提交
fbdc1235c7

+ 3 - 3
src/api/audit.js

@@ -88,7 +88,7 @@ export default {
88
   },
88
   },
89
   // 停车卡_规则分页列表
89
   // 停车卡_规则分页列表
90
   tckListByPage(params) {
90
   tckListByPage(params) {
91
-    return axios.get('/opt/parking/card/page', {params})
91
+    return axios1.post('/coupon-activity/activity/queryByPage.do', params)
92
   },
92
   },
93
   // 停车卡_添加规则
93
   // 停车卡_添加规则
94
   addTckRule(params) {
94
   addTckRule(params) {
@@ -104,11 +104,11 @@ export default {
104
   },
104
   },
105
   // 停车卡_查看订单分页列表
105
   // 停车卡_查看订单分页列表
106
   tckOrderListByPage(params) {
106
   tckOrderListByPage(params) {
107
-    return axios.post('/reformer-blessing-b/card-mall-system/mall/queryList', params)
107
+    return axios1.post('/reformer-blessing-b/card-mall-system/mall/queryList', params)
108
   },
108
   },
109
   // 停车卡_统计信息
109
   // 停车卡_统计信息
110
   tckTjxxListByPage(params) {
110
   tckTjxxListByPage(params) {
111
-    return axios.get('/opt/parking/card/stat/page', {params})
111
+    return axios1.post('/reformer-saas-business/tenantcard/buycard/newQuerycouponsCount.do', params)
112
   },
112
   },
113
   // 错峰停车_规则分页列表
113
   // 错峰停车_规则分页列表
114
   cftcListByPage(params) {
114
   cftcListByPage(params) {

+ 1 - 1
src/pages/index/components/business_record.vue

@@ -362,7 +362,7 @@ export default {
362
         parkId: '',
362
         parkId: '',
363
         carno: '',
363
         carno: '',
364
         parkingSpaceNo: '',
364
         parkingSpaceNo: '',
365
-        time: [date.getFullYear() + "-" + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + "-" + (date.getDate() > 10 ? date.getDate() : '0' + date.getDate()) + ' 00:00:00', date.getFullYear() + "-" + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + "-" + (date.getDate() > 10 ? date.getDate() : '0' + date.getDate() + ' 23:59:59')],
365
+        time: [date.getFullYear() + "-" + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + "-" + (date.getDate() > 9 ? date.getDate() : '0' + date.getDate()) + ' 00:00:00', date.getFullYear() + "-" + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + "-" + (date.getDate() > 10 ? date.getDate() : '0' + date.getDate() + ' 23:59:59')],
366
       },
366
       },
367
       carParkingNameValue: '',
367
       carParkingNameValue: '',
368
       carParkingNameOptions: [],
368
       carParkingNameOptions: [],

+ 154 - 47
src/pages/index/components/parking_card.vue

@@ -4,34 +4,57 @@
4
       <el-tab-pane label="规则配置" name="规则配置">
4
       <el-tab-pane label="规则配置" name="规则配置">
5
         <el-form class="form-wrapper" :inline="true" :model="formInline1" style="margin-bottom: 20px;">
5
         <el-form class="form-wrapper" :inline="true" :model="formInline1" style="margin-bottom: 20px;">
6
           <el-row>
6
           <el-row>
7
-            <el-col :span="8">
8
-              <el-form-item label="停车卡名称: ">
9
-                <el-input v-model="formInline1.cardName" placeholder="请输入"></el-input>
7
+            <el-col :span="6">
8
+              <el-form-item label="活动名称: ">
9
+                <el-input v-model="formInline1.activity_name" placeholder="请输入"></el-input>
10
+              </el-form-item>
11
+            </el-col>
12
+            <el-col :span="6">
13
+              <el-form-item label="活动状态:">
14
+                <el-select clearable v-model="formInline1.activity_status" placeholder="请选择" popper-class="cur-select">
15
+                  <el-option label="全部" value=""></el-option>
16
+                  <el-option label="未开始" value="0"></el-option>
17
+                  <el-option label="活动中" value="1"></el-option>
18
+                  <el-option label="已过期" value="2"></el-option>
19
+                  <el-option label="已停用" value="3"></el-option>
20
+                </el-select>
10
               </el-form-item>
21
               </el-form-item>
11
             </el-col>
22
             </el-col>
12
             <el-col :span="8">
23
             <el-col :span="8">
13
-              <el-form-item>
14
-                <el-button type="primary" class="query-btn" @click="onSubmit1" icon="el-icon-search">查询</el-button>
24
+              <el-form-item label="创建时间:">
25
+                <el-date-picker
26
+                  v-model="formInline1.time"
27
+                  type="daterange"
28
+                  range-separator="至"
29
+                  value-format="yyyy-MM-dd"
30
+                  start-placeholder="开始日期"
31
+                  end-placeholder="结束日期">
32
+                </el-date-picker>
15
               </el-form-item>
33
               </el-form-item>
34
+            </el-col>
35
+            <el-col :span="4">
16
               <el-form-item>
36
               <el-form-item>
17
-                <el-button type="success" @click="handleAdd">添加规则</el-button>
37
+                <el-button type="primary" class="query-btn" @click="onSubmit1" icon="el-icon-search">查询</el-button>
18
               </el-form-item>
38
               </el-form-item>
39
+<!--              <el-form-item>-->
40
+<!--                <el-button type="success" @click="handleAdd">添加规则</el-button>-->
41
+<!--              </el-form-item>-->
19
             </el-col>
42
             </el-col>
20
           </el-row>
43
           </el-row>
21
         </el-form>
44
         </el-form>
22
         <el-table border :row-class-name="rowClassName" :data="tableData1" v-loading="loading1">
45
         <el-table border :row-class-name="rowClassName" :data="tableData1" v-loading="loading1">
23
           <el-table-column v-for="(item, index) in columns1" :key="index" :label="item.label" :prop="item.key">
46
           <el-table-column v-for="(item, index) in columns1" :key="index" :label="item.label" :prop="item.key">
24
           </el-table-column>
47
           </el-table-column>
25
-          <el-table-column
26
-            label="操作"
27
-            width="200">
28
-            <template slot-scope="scope" style="display: inline-block">
29
-              <el-button type="primary" @click="handleEdit(scope.row)" slot="reference">修改</el-button>
30
-              <el-popconfirm title="确定删除吗?" @confirm="deleteRow(scope.row)">
31
-                <el-button type="danger" slot="reference">删除</el-button>
32
-              </el-popconfirm>
33
-            </template>
34
-          </el-table-column>
48
+<!--          <el-table-column-->
49
+<!--            label="操作"-->
50
+<!--            width="200">-->
51
+<!--            <template slot-scope="scope" style="display: inline-block">-->
52
+<!--              <el-button type="primary" @click="handleEdit(scope.row)" slot="reference">修改</el-button>-->
53
+<!--              <el-popconfirm title="确定删除吗?" @confirm="deleteRow(scope.row)">-->
54
+<!--                <el-button type="danger" slot="reference">删除</el-button>-->
55
+<!--              </el-popconfirm>-->
56
+<!--            </template>-->
57
+<!--          </el-table-column>-->
35
         </el-table>
58
         </el-table>
36
         <div class="table-pagination">
59
         <div class="table-pagination">
37
           <el-pagination layout="total, prev, pager, next, jumper" :total="total1" @current-change="handlePageChange1"
60
           <el-pagination layout="total, prev, pager, next, jumper" :total="total1" @current-change="handlePageChange1"
@@ -108,7 +131,7 @@
108
           </el-table-column>
131
           </el-table-column>
109
         </el-table>
132
         </el-table>
110
         <div class="table-pagination">
133
         <div class="table-pagination">
111
-          <el-pagination layout="total, prev, pager, next, jumper" :total="total1" @current-change="handlePageChange2"
134
+          <el-pagination layout="total, prev, pager, next, jumper" :total="total2" @current-change="handlePageChange2"
112
                          :current-page.sync="pageNum2" :page-size.sync="pageSize2">
135
                          :current-page.sync="pageNum2" :page-size.sync="pageSize2">
113
           </el-pagination>
136
           </el-pagination>
114
         </div>
137
         </div>
@@ -139,12 +162,29 @@
139
       <el-tab-pane label="统计信息" name="统计信息">
162
       <el-tab-pane label="统计信息" name="统计信息">
140
         <el-form class="form-wrapper" :inline="true" :model="formInline3" style="margin-bottom: 20px;">
163
         <el-form class="form-wrapper" :inline="true" :model="formInline3" style="margin-bottom: 20px;">
141
           <el-row>
164
           <el-row>
142
-            <el-col :span="8">
143
-              <el-form-item label="停车卡名称:">
144
-                <el-input v-model="formInline3.cardName" placeholder="请输入"></el-input>
165
+            <el-col :span="6">
166
+              <el-form-item label="卡券名称:">
167
+                <el-select clearable v-model="formInline3.rccId" placeholder="请选择" popper-class="cur-select">
168
+                  <el-option label="测试代金券" value="1737646855015104512"></el-option>
169
+                  <el-option label="测试全免券" value="1737394638060257280"></el-option>
170
+                  <el-option label="测试卡券1" value="1737378555370668032"></el-option>
171
+                  <el-option label="测试卡券" value="1737377941760770048"></el-option>
172
+                </el-select>
145
               </el-form-item>
173
               </el-form-item>
146
             </el-col>
174
             </el-col>
147
             <el-col :span="8">
175
             <el-col :span="8">
176
+              <el-form-item label="可购买时间:">
177
+                <el-date-picker
178
+                  v-model="formInline3.time"
179
+                  type="daterange"
180
+                  range-separator="至"
181
+                  value-format="yyyy-MM-dd"
182
+                  start-placeholder="开始日期"
183
+                  end-placeholder="结束日期">
184
+                </el-date-picker>
185
+              </el-form-item>
186
+            </el-col>
187
+            <el-col :span="4">
148
               <el-form-item>
188
               <el-form-item>
149
                 <el-button type="primary" class="query-btn" @click="onSubmit3" icon="el-icon-search">查询</el-button>
189
                 <el-button type="primary" class="query-btn" @click="onSubmit3" icon="el-icon-search">查询</el-button>
150
               </el-form-item>
190
               </el-form-item>
@@ -168,7 +208,7 @@
168
 import api from "@/api/audit.js";
208
 import api from "@/api/audit.js";
169
 import dictionary from "@/util/dictionary";
209
 import dictionary from "@/util/dictionary";
170
 import moment from "moment/moment";
210
 import moment from "moment/moment";
171
-
211
+const date = new Date;
172
 export default {
212
 export default {
173
   components: {},
213
   components: {},
174
   data() {
214
   data() {
@@ -179,16 +219,36 @@ export default {
179
       activeName: '规则配置',
219
       activeName: '规则配置',
180
       columns1: [
220
       columns1: [
181
         {
221
         {
182
-          label: '停车卡名称',
183
-          key: 'cardName'
222
+          label: '活动ID(点击可复制)',
223
+          key: 'activity_id'
184
         },
224
         },
185
         {
225
         {
186
-          label: '可用次数',
187
-          key: 'useTimes'
226
+          label: '活动方',
227
+          key: 'activity_organizer_name'
188
         },
228
         },
189
         {
229
         {
190
-          label: '有效期至',
191
-          key: 'effectTime'
230
+          label: '活动名称',
231
+          key: 'activity_name'
232
+        },
233
+        {
234
+          label: '活动时间范围',
235
+          key: 'activity_time'
236
+        },
237
+        {
238
+          label: '活动状态',
239
+          key: 'activity_status'
240
+        },
241
+        {
242
+          label: '活动范围',
243
+          key: 'activity_range_name'
244
+        },
245
+        {
246
+          label: '活动卡券份数',
247
+          key: 'activity_card_total'
248
+        },
249
+        {
250
+          label: '创建时间',
251
+          key: 'activity_create_time'
192
         },
252
         },
193
       ],
253
       ],
194
       tableData1: [],
254
       tableData1: [],
@@ -196,7 +256,9 @@ export default {
196
       pageSize1: 10,
256
       pageSize1: 10,
197
       pageNum1: 1,
257
       pageNum1: 1,
198
       formInline1: {
258
       formInline1: {
199
-        cardName: ''
259
+        activity_name: '',
260
+        activity_status: '',
261
+        time: []
200
       },
262
       },
201
       title:'',
263
       title:'',
202
       dialogVisible:false,
264
       dialogVisible:false,
@@ -258,28 +320,48 @@ export default {
258
       },
320
       },
259
       columns3: [
321
       columns3: [
260
         {
322
         {
261
-          label: '停车卡名称',
262
-          key: 'cardName'
323
+          label: '所属机构',
324
+          key: 'rspcMarketName'
325
+        },
326
+        {
327
+          label: '发放机构',
328
+          key: 'rspcSellerName'
263
         },
329
         },
264
         {
330
         {
265
-          label: '购买数量',
266
-          key: 'buyCount'
331
+          label: '卡券名称',
332
+          key: 'rccName'
267
         },
333
         },
268
         {
334
         {
269
-          label: '客户端购买数量',
270
-          key: 'clientBuyCount'
335
+          label: '每张可减免',
336
+          key: 'rccDiscount'
271
         },
337
         },
272
         {
338
         {
273
-          label: '后台录入数量',
274
-          key: 'adminRecordCount'
339
+          label: '类型',
340
+          key: 'rccType'
275
         },
341
         },
276
         {
342
         {
277
-          label: '使用中数量',
278
-          key: 'usedCount'
343
+          label: '发放数量(张)',
344
+          key: 'count'
279
         },
345
         },
280
         {
346
         {
281
-          label: '金额总计',
282
-          key: 'totalFee'
347
+          label: '已消费(张)',
348
+          key: 'count0'
349
+        },
350
+        {
351
+          label: '未消费(张)',
352
+          key: 'count1'
353
+        },
354
+        {
355
+          label: '已过期(张)',
356
+          key: 'count2'
357
+        },
358
+        {
359
+          label: '领取率',
360
+          key: 'sendRate'
361
+        },
362
+        {
363
+          label: '使用率',
364
+          key: 'useRate'
283
         },
365
         },
284
       ],
366
       ],
285
       tableData3: [],
367
       tableData3: [],
@@ -287,8 +369,15 @@ export default {
287
       pageSize3: 10,
369
       pageSize3: 10,
288
       pageNum3: 1,
370
       pageNum3: 1,
289
       formInline3: {
371
       formInline3: {
290
-        parkingCardName: ''
372
+        rccId: '',
373
+        time: [date.getFullYear() + "-" + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + "-" + (date.getDate() > 9 ? date.getDate() : '0' + date.getDate()) + ' 00:00:00', date.getFullYear() + "-" + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + "-" + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate() + ' 23:59:59')],
291
       },
374
       },
375
+      statusMap: {
376
+        0: '未开始',
377
+        1: '活动中',
378
+        2: '已过期',
379
+        3: '已停用',
380
+      }
292
     }
381
     }
293
   },
382
   },
294
   mounted() {
383
   mounted() {
@@ -383,10 +472,19 @@ export default {
383
     },
472
     },
384
     getTableData1() {
473
     getTableData1() {
385
       this.loading1 = true
474
       this.loading1 = true
475
+      let params = {...this.formInline1}
476
+      if (
477
+        this.formInline1.time && this.formInline1.time.length === 2 &&
478
+        this.formInline1.time[1] !== ""
479
+      ) {
480
+        params.activity_create_start_time = this.formInline1.time[0].substring(0, 10) + " 00:00:00";
481
+        params.activity_create_end_time = this.formInline1.time[1].substring(0, 10) + " 23:59:59";
482
+      }
483
+      delete params.time
386
       const {pageNum1, pageSize1} = this
484
       const {pageNum1, pageSize1} = this
387
-      api.tckListByPage({current: pageNum1, size: pageSize1, ...this.formInline1}).then(res => {
388
-        this.tableData1 = (res.data.records || []).map(item => ({...item, carType: dictionary.typeMap[item.carType]}))
389
-        this.total1 = res.data.total
485
+      api.tckListByPage({cur_page: pageNum1, page_size: pageSize1, ...params}).then(res => {
486
+        this.tableData1 = (res.data || []).map(item => ({...item, activity_status: this.statusMap[item.activity_status]}))
487
+        this.total1 = res.total_rows
390
         this.loading1 = false
488
         this.loading1 = false
391
       })
489
       })
392
     },
490
     },
@@ -416,10 +514,19 @@ export default {
416
     },
514
     },
417
     getTableData3() {
515
     getTableData3() {
418
       this.loading3 = true
516
       this.loading3 = true
517
+      let params = {...this.formInline3}
518
+      if (
519
+        this.formInline3.time && this.formInline3.time.length === 2 &&
520
+        this.formInline3.time[1] !== ""
521
+      ) {
522
+        params.rcciCreateTime = this.formInline3.time[0].substring(0, 10);
523
+        params.rcciLimitTime = this.formInline3.time[1].substring(0, 10);
524
+      }
525
+      delete params.time
419
       const {pageNum3, pageSize3} = this
526
       const {pageNum3, pageSize3} = this
420
-      api.tckTjxxListByPage({current: pageNum3, size: pageSize3, ...this.formInline3}).then(res => {
421
-        this.tableData3 = res.data.records || []
422
-        this.total3 = res.data.total
527
+      api.tckTjxxListByPage({pageIndex: pageNum3, pageSize: pageSize3, ...params}).then(res => {
528
+        this.tableData3 = res.data || []
529
+        this.total3 = res.totalRows || 0
423
         this.loading3 = false
530
         this.loading3 = false
424
       })
531
       })
425
     },
532
     },

+ 574 - 0
src/pages/index/components/parking_card_copy.vue

@@ -0,0 +1,574 @@
1
+<template>
2
+  <div class="body-wrapper">
3
+    <el-tabs  v-model="activeName">
4
+      <el-tab-pane label="规则配置" name="规则配置">
5
+        <el-form class="form-wrapper" :inline="true" :model="formInline1" style="margin-bottom: 20px;">
6
+          <el-row>
7
+            <el-col :span="6">
8
+              <el-form-item label="活动名称: ">
9
+                <el-input v-model="formInline1.activity_name" placeholder="请输入"></el-input>
10
+              </el-form-item>
11
+            </el-col>
12
+            <el-col :span="6">
13
+              <el-form-item label="活动状态:">
14
+                <el-select clearable v-model="formInline1.activity_status" placeholder="请选择" popper-class="cur-select">
15
+                  <el-option label="全部" value=""></el-option>
16
+                  <el-option label="未开始" value="0"></el-option>
17
+                  <el-option label="活动中" value="1"></el-option>
18
+                  <el-option label="已过期" value="2"></el-option>
19
+                  <el-option label="已停用" value="3"></el-option>
20
+                </el-select>
21
+              </el-form-item>
22
+            </el-col>
23
+            <el-col :span="8">
24
+              <el-form-item label="创建时间:">
25
+                <el-date-picker
26
+                  v-model="formInline1.time"
27
+                  type="daterange"
28
+                  range-separator="至"
29
+                  value-format="yyyy-MM-dd"
30
+                  start-placeholder="开始日期"
31
+                  end-placeholder="结束日期">
32
+                </el-date-picker>
33
+              </el-form-item>
34
+            </el-col>
35
+            <el-col :span="4">
36
+              <el-form-item>
37
+                <el-button type="primary" class="query-btn" @click="onSubmit1" icon="el-icon-search">查询</el-button>
38
+              </el-form-item>
39
+<!--              <el-form-item>-->
40
+<!--                <el-button type="success" @click="handleAdd">添加规则</el-button>-->
41
+<!--              </el-form-item>-->
42
+            </el-col>
43
+          </el-row>
44
+        </el-form>
45
+        <el-table border :row-class-name="rowClassName" :data="tableData1" v-loading="loading1">
46
+          <el-table-column v-for="(item, index) in columns1" :key="index" :label="item.label" :prop="item.key">
47
+          </el-table-column>
48
+<!--          <el-table-column-->
49
+<!--            label="操作"-->
50
+<!--            width="200">-->
51
+<!--            <template slot-scope="scope" style="display: inline-block">-->
52
+<!--              <el-button type="primary" @click="handleEdit(scope.row)" slot="reference">修改</el-button>-->
53
+<!--              <el-popconfirm title="确定删除吗?" @confirm="deleteRow(scope.row)">-->
54
+<!--                <el-button type="danger" slot="reference">删除</el-button>-->
55
+<!--              </el-popconfirm>-->
56
+<!--            </template>-->
57
+<!--          </el-table-column>-->
58
+        </el-table>
59
+        <div class="table-pagination">
60
+          <el-pagination layout="total, prev, pager, next, jumper" :total="total1" @current-change="handlePageChange1"
61
+                         :current-page.sync="pageNum1" :page-size.sync="pageSize1">
62
+          </el-pagination>
63
+        </div>
64
+        <el-dialog
65
+          :title="title"
66
+          :visible.sync="dialogVisible"
67
+          width="45%"
68
+          custom-class="audit-dialog">
69
+          <div class="form-div">
70
+            <el-form label-position="left" label-width="85px" :model="formLabelAlign">
71
+              <el-form-item label="停车卡名称">
72
+                <el-input v-model="formLabelAlign.cardName"></el-input>
73
+              </el-form-item>
74
+              <el-form-item label="可用次数">
75
+                <el-input v-model="formLabelAlign.useTimes"></el-input>
76
+              </el-form-item>
77
+              <el-form-item label="有效期至">
78
+                <el-date-picker
79
+                  v-model="formLabelAlign.effectTime"
80
+                  type="date"
81
+                  value-format="yyyy-MM-dd HH:mm:ss"
82
+                  placeholder="选择日期">
83
+                </el-date-picker>
84
+              </el-form-item>
85
+            </el-form>
86
+          </div>
87
+          <span slot="footer" class="dialog-footer">
88
+            <el-button @click="dialogVisible = false">取 消</el-button>
89
+            <el-button type="primary" @click="handleConfirm">确 定</el-button>
90
+        </span>
91
+        </el-dialog>
92
+      </el-tab-pane>
93
+      <el-tab-pane label="查看订单" name="查看订单">
94
+        <el-form class="form-wrapper" :inline="true" :model="formInline2" style="margin-bottom: 20px;">
95
+          <el-row>
96
+            <el-col :span="6">
97
+              <el-form-item label="商品名称:">
98
+                <el-input v-model="formInline2.goods_name" placeholder="请输入"></el-input>
99
+              </el-form-item>
100
+            </el-col>
101
+            <el-col :span="6">
102
+              <el-form-item label="发布状态:">
103
+                <el-select clearable v-model="formInline2.release_status" placeholder="请选择" popper-class="cur-select">
104
+                  <el-option label="全部" value=""></el-option>
105
+                  <el-option label="上架" value="1"></el-option>
106
+                  <el-option label="下架" value="0"></el-option>
107
+                </el-select>
108
+              </el-form-item>
109
+            </el-col>
110
+            <el-col :span="8">
111
+              <el-form-item label="可购买时间:">
112
+                <el-date-picker
113
+                  v-model="formInline2.time"
114
+                  type="daterange"
115
+                  range-separator="至"
116
+                  value-format="yyyy-MM-dd"
117
+                  start-placeholder="开始日期"
118
+                  end-placeholder="结束日期">
119
+                </el-date-picker>
120
+              </el-form-item>
121
+            </el-col>
122
+            <el-col :span="4">
123
+              <el-form-item>
124
+                <el-button type="primary" class="query-btn" @click="onSubmit2" icon="el-icon-search">查询</el-button>
125
+              </el-form-item>
126
+            </el-col>
127
+          </el-row>
128
+        </el-form>
129
+        <el-table border :row-class-name="rowClassName" :data="tableData2" v-loading="loading2">
130
+          <el-table-column v-for="(item, index) in columns2" :key="index" :label="item.label" :prop="item.key">
131
+          </el-table-column>
132
+        </el-table>
133
+        <div class="table-pagination">
134
+          <el-pagination layout="total, prev, pager, next, jumper" :total="total2" @current-change="handlePageChange2"
135
+                         :current-page.sync="pageNum2" :page-size.sync="pageSize2">
136
+          </el-pagination>
137
+        </div>
138
+        <el-dialog
139
+          :title="title2"
140
+          :visible.sync="dialogVisible2"
141
+          width="45%"
142
+          custom-class="audit-dialog">
143
+          <div class="form-div">
144
+            <el-form label-position="left" label-width="85px" :model="formLabelAlign2">
145
+              <el-form-item label="停车卡名称">
146
+                <el-input v-model="formLabelAlign2.parkingCardName"></el-input>
147
+              </el-form-item>
148
+              <el-form-item label="下单人">
149
+                <el-input v-model="formLabelAlign2.memberId"></el-input>
150
+              </el-form-item>
151
+              <el-form-item label="支付金额">
152
+                <el-input v-model="formLabelAlign2.payAmount"></el-input>
153
+              </el-form-item>
154
+            </el-form>
155
+          </div>
156
+          <span slot="footer" class="dialog-footer">
157
+            <el-button @click="dialogVisible2 = false">取 消</el-button>
158
+            <el-button type="primary" @click="handleConfirm2">确 定</el-button>
159
+        </span>
160
+        </el-dialog>
161
+      </el-tab-pane>
162
+      <el-tab-pane label="统计信息" name="统计信息">
163
+        <el-form class="form-wrapper" :inline="true" :model="formInline3" style="margin-bottom: 20px;">
164
+          <el-row>
165
+            <el-col :span="6">
166
+              <el-form-item label="卡券名称:">
167
+                <el-select clearable v-model="formInline3.rccId" placeholder="请选择" popper-class="cur-select">
168
+                  <el-option label="测试代金券" value="1737646855015104512"></el-option>
169
+                  <el-option label="测试全免券" value="1737394638060257280"></el-option>
170
+                  <el-option label="测试卡券1" value="1737378555370668032"></el-option>
171
+                  <el-option label="测试卡券" value="1737377941760770048"></el-option>
172
+                </el-select>
173
+              </el-form-item>
174
+            </el-col>
175
+            <el-col :span="8">
176
+              <el-form-item label="可购买时间:">
177
+                <el-date-picker
178
+                  v-model="formInline3.time"
179
+                  type="daterange"
180
+                  range-separator="至"
181
+                  value-format="yyyy-MM-dd"
182
+                  start-placeholder="开始日期"
183
+                  end-placeholder="结束日期">
184
+                </el-date-picker>
185
+              </el-form-item>
186
+            </el-col>
187
+            <el-col :span="4">
188
+              <el-form-item>
189
+                <el-button type="primary" class="query-btn" @click="onSubmit3" icon="el-icon-search">查询</el-button>
190
+              </el-form-item>
191
+            </el-col>
192
+          </el-row>
193
+        </el-form>
194
+        <el-table border :row-class-name="rowClassName" :data="tableData3" v-loading="loading3">
195
+          <el-table-column v-for="(item, index) in columns3" :key="index" :label="item.label" :prop="item.key">
196
+          </el-table-column>
197
+        </el-table>
198
+        <div class="table-pagination">
199
+          <el-pagination layout="total, prev, pager, next, jumper" :total="total3" @current-change="handlePageChange3"
200
+                         :current-page.sync="pageNum3" :page-size.sync="pageSize3">
201
+          </el-pagination>
202
+        </div>
203
+      </el-tab-pane>
204
+    </el-tabs>
205
+  </div>
206
+</template>
207
+<script>
208
+import api from "@/api/audit.js";
209
+import dictionary from "@/util/dictionary";
210
+import moment from "moment/moment";
211
+const date = new Date;
212
+export default {
213
+  components: {},
214
+  data() {
215
+    return {
216
+      loading1: false,
217
+      loading2: false,
218
+      loading3: false,
219
+      activeName: '规则配置',
220
+      columns1: [
221
+        {
222
+          label: '活动ID(点击可复制)',
223
+          key: 'activity_id'
224
+        },
225
+        {
226
+          label: '活动方',
227
+          key: 'activity_organizer_name'
228
+        },
229
+        {
230
+          label: '活动名称',
231
+          key: 'activity_name'
232
+        },
233
+        {
234
+          label: '活动时间范围',
235
+          key: 'activity_time'
236
+        },
237
+        {
238
+          label: '活动状态',
239
+          key: 'activity_status'
240
+        },
241
+        {
242
+          label: '活动范围',
243
+          key: 'activity_range_name'
244
+        },
245
+        {
246
+          label: '活动卡券份数',
247
+          key: 'activity_card_total'
248
+        },
249
+        {
250
+          label: '创建时间',
251
+          key: 'activity_create_time'
252
+        },
253
+      ],
254
+      tableData1: [],
255
+      total1: 0,
256
+      pageSize1: 10,
257
+      pageNum1: 1,
258
+      formInline1: {
259
+        activity_name: '',
260
+        activity_status: '',
261
+        time: []
262
+      },
263
+      title:'',
264
+      dialogVisible:false,
265
+      formLabelAlign: {
266
+        cardName: '',
267
+        useTimes: '',
268
+        effectTime: '',
269
+      },
270
+      columns2: [
271
+        {
272
+          label: '商品名称',
273
+          key: 'goods_name'
274
+        },
275
+        {
276
+          label: '所需金额(分)',
277
+          key: 'reality_price'
278
+        },
279
+        {
280
+          label: '总库存',
281
+          key: 'goods_total_number'
282
+        },
283
+        {
284
+          label: '剩余库存量',
285
+          key: 'goods_number'
286
+        },
287
+        {
288
+          label: '发布状态',
289
+          key: 'release_status'
290
+        },
291
+        {
292
+          label: '可购买时间',
293
+          key: 'good_range'
294
+        },
295
+        {
296
+          label: '创建时间',
297
+          key: 'goods_create_time'
298
+        },
299
+        {
300
+          label: '最后修改时间',
301
+          key: 'goods_update_time'
302
+        },
303
+      ],
304
+      tableData2: [],
305
+      total2: 0,
306
+      pageSize2: 10,
307
+      pageNum2: 1,
308
+      formInline2: {
309
+        goods_name: '',
310
+        release_status:'',
311
+        time: []
312
+      },
313
+      title2:'',
314
+      dialogVisible2:false,
315
+      formLabelAlign2: {
316
+        id: '',
317
+        parkingCardName: '',
318
+        placeOrderPerson: '',
319
+        payMoney: '',
320
+      },
321
+      columns3: [
322
+        {
323
+          label: '所属机构',
324
+          key: 'rspcMarketName'
325
+        },
326
+        {
327
+          label: '发放机构',
328
+          key: 'rspcSellerName'
329
+        },
330
+        {
331
+          label: '卡券名称',
332
+          key: 'rccName'
333
+        },
334
+        {
335
+          label: '每张可减免',
336
+          key: 'rccDiscount'
337
+        },
338
+        {
339
+          label: '类型',
340
+          key: 'rccType'
341
+        },
342
+        {
343
+          label: '发放数量(张)',
344
+          key: 'count'
345
+        },
346
+        {
347
+          label: '已消费(张)',
348
+          key: 'count0'
349
+        },
350
+        {
351
+          label: '未消费(张)',
352
+          key: 'count1'
353
+        },
354
+        {
355
+          label: '已过期(张)',
356
+          key: 'count2'
357
+        },
358
+        {
359
+          label: '领取率',
360
+          key: 'sendRate'
361
+        },
362
+        {
363
+          label: '使用率',
364
+          key: 'useRate'
365
+        },
366
+      ],
367
+      tableData3: [],
368
+      total3: 0,
369
+      pageSize3: 10,
370
+      pageNum3: 1,
371
+      formInline3: {
372
+        rccId: '',
373
+        time: [date.getFullYear() + "-" + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + "-" + (date.getDate() > 9 ? date.getDate() : '0' + date.getDate()) + ' 00:00:00', date.getFullYear() + "-" + ((date.getMonth() + 1) >= 10 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1)) + "-" + (date.getDate() >= 10 ? date.getDate() : '0' + date.getDate() + ' 23:59:59')],
374
+      },
375
+      statusMap: {
376
+        0: '未开始',
377
+        1: '活动中',
378
+        2: '已过期',
379
+        3: '已停用',
380
+      }
381
+    }
382
+  },
383
+  mounted() {
384
+    this.getTableData1()
385
+    this.getTableData2()
386
+    this.getTableData3()
387
+  },
388
+  watch: {
389
+  },
390
+  methods: {
391
+    rowClassName({ rowIndex }) {
392
+      // 偶数行和奇数行分别返回不同的类名,也可以根据实际需求基于rowData进行条件判断
393
+      return rowIndex % 2 === 0 ? 'even-row' : 'odd-row';
394
+    },
395
+    onSubmit1() {
396
+      this.pageNum1 = 1
397
+      this.getTableData1()
398
+    },
399
+    handleAdd () {
400
+      this.title = '添加规则'
401
+      this.formLabelAlign = {}
402
+      this.dialogVisible = true
403
+    },
404
+    handleEdit(row) {
405
+      this.title = '修改规则'
406
+      this.formLabelAlign = {...row}
407
+      this.dialogVisible = true
408
+    },
409
+    deleteRow (record) {
410
+      api.deleteEckRule({id: record.id}).then(res => {
411
+        if (res.code === 200) {
412
+          this.$message({type: 'success', message: '删除成功!'})
413
+          this.getTableData1()
414
+        }
415
+      })
416
+    },
417
+    handleConfirm() {
418
+      if (this.title === '修改规则') {
419
+        api.editTckRule({...this.formLabelAlign}).then(res => {
420
+          if (res.code === 200) {
421
+            this.dialogVisible = false
422
+            this.$message({
423
+              message: '修改成功!',
424
+              type: 'success'
425
+            })
426
+            this.getTableData1()
427
+          }
428
+        })
429
+      } else {
430
+        api.addTckRule({...this.formLabelAlign, effectTime: this.formLabelAlign.effectTime ? this.formLabelAlign.effectTime.substring(0, 10) + " 23:59:59" :''}).then(res => {
431
+          if (res.code === 200) {
432
+            this.dialogVisible = false
433
+            this.$message({
434
+              message: '添加成功!',
435
+              type: 'success'
436
+            })
437
+            this.getTableData1()
438
+          }
439
+        })
440
+      }
441
+    },
442
+    onSubmit2() {
443
+      this.pageNum2 = 1
444
+      this.getTableData2()
445
+    },
446
+    handleAdd2 () {
447
+      this.title = '录入订单'
448
+      this.formLabelAlign2.parkingCardName= ''
449
+      this.formLabelAlign2.totalEnable= ''
450
+      this.formLabelAlign2.payMoney= ''
451
+      this.dialogVisible2 = true
452
+    },
453
+
454
+    handleConfirm2() {
455
+        api.addWhiteIp({ipAddr: this.formLabelAlign.ipAddr}).then(res => {
456
+          if (res.code === 200) {
457
+            this.dialogVisible2 = false
458
+            this.$message({
459
+              message: '录入成功!',
460
+              type: 'success'
461
+            })
462
+            this.getTableData2()
463
+          }
464
+        })
465
+    },
466
+    onSubmit3() {
467
+      this.pageNum3 = 1
468
+      this.getTableData3()
469
+    },
470
+    handlePageChange1() {
471
+      this.getTableData1()
472
+    },
473
+    getTableData1() {
474
+      this.loading1 = true
475
+      let params = {...this.formInline1}
476
+      if (
477
+        this.formInline1.time && this.formInline1.time.length === 2 &&
478
+        this.formInline1.time[1] !== ""
479
+      ) {
480
+        params.activity_create_start_time = this.formInline1.time[0].substring(0, 10) + " 00:00:00";
481
+        params.activity_create_end_time = this.formInline1.time[1].substring(0, 10) + " 23:59:59";
482
+      }
483
+      delete params.time
484
+      const {pageNum1, pageSize1} = this
485
+      api.tckListByPage({cur_page: pageNum1, page_size: pageSize1, ...params}).then(res => {
486
+        this.tableData1 = (res.data || []).map(item => ({...item, activity_status: this.statusMap[item.activity_status]}))
487
+        this.total1 = res.total_rows
488
+        this.loading1 = false
489
+      })
490
+    },
491
+    handlePageChange2() {
492
+      this.getTableData2()
493
+    },
494
+    getTableData2() {
495
+      this.loading2 = true
496
+      let params = {...this.formInline2}
497
+      if (
498
+        this.formInline2.time && this.formInline2.time.length === 2 &&
499
+        this.formInline2.time[1] !== ""
500
+      ) {
501
+        params.goods_start_time = this.formInline2.time[0].substring(0, 10) + " 00:00:00";
502
+        params.goods_end_time = this.formInline2.time[1].substring(0, 10) + " 23:59:59";
503
+      }
504
+      delete params.time
505
+      const {pageNum2, pageSize2} = this
506
+      api.tckOrderListByPage({curPage: pageNum2, pageSize: pageSize2, ...params}).then(res => {
507
+        this.tableData2 = res.data.data.goods_list.map(item => ({...item, release_status: item.release_status === '1' ? '上架' : '下架', good_range: `${moment(item.goods_start_time).format('YYYY-MM-DD')}~${moment(item.goods_end_time).format('YYYY-MM-DD')}`})) || []
508
+        this.total2 = res.data.data.total_rows || 0
509
+        this.loading2 = false
510
+      })
511
+    },
512
+    handlePageChange3() {
513
+      this.getTableData3()
514
+    },
515
+    getTableData3() {
516
+      this.loading3 = true
517
+      let params = {...this.formInline3}
518
+      if (
519
+        this.formInline3.time && this.formInline3.time.length === 2 &&
520
+        this.formInline3.time[1] !== ""
521
+      ) {
522
+        params.rcciCreateTime = this.formInline3.time[0].substring(0, 10);
523
+        params.rcciLimitTime = this.formInline3.time[1].substring(0, 10);
524
+      }
525
+      delete params.time
526
+      const {pageNum3, pageSize3} = this
527
+      api.tckTjxxListByPage({pageIndex: pageNum3, pageSize: pageSize3, ...params}).then(res => {
528
+        this.tableData3 = res.data || []
529
+        this.total3 = res.totalRows || 0
530
+        this.loading3 = false
531
+      })
532
+    },
533
+  }
534
+}
535
+</script>
536
+<style  lang="scss" scoped>
537
+.body-wrapper {
538
+  .form-wrapper {
539
+    .el-form-item {
540
+      margin-bottom: 0px;
541
+    }
542
+  }
543
+  .button-block{
544
+    text-align: right;
545
+    margin-bottom: 20px;
546
+  }
547
+  .table-pagination{
548
+    text-align: right;
549
+  }
550
+  .search-card{
551
+    margin-bottom: 20px;
552
+    text-align: center;
553
+    .input-wrapper{
554
+      width: 36%;
555
+    }
556
+  }
557
+
558
+  .audit-dialog{
559
+    .mg-bt{
560
+      margin-bottom: 24px;
561
+    }
562
+    .label{
563
+      text-align: right;
564
+    }
565
+    .form-div{
566
+      /deep/ .el-input__inner{
567
+        height: 35px;
568
+        width: 90%;
569
+        border: 1px solid #a6a5a5;
570
+      }
571
+    }
572
+  }
573
+}
574
+</style>

+ 1 - 1
src/router/index.js

@@ -55,7 +55,7 @@ export default new Router({
55
         {
55
         {
56
           name: "parking_unpeak",
56
           name: "parking_unpeak",
57
           path: "/parking_unpeak",
57
           path: "/parking_unpeak",
58
-          component: () => import("../pages/index/components/parking_unpeak.vue")
58
+          component: () => import("../pages/index/components/parking_card_copy.vue")
59
         },
59
         },
60
         {
60
         {
61
           name: "appointment_rules",
61
           name: "appointment_rules",