浏览代码

商品订单-预约停车订单改为平台接口

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

+ 3 - 0
src/api/audit.js

@@ -42,6 +42,9 @@ export default {
42
   orderListByPage(params) {
42
   orderListByPage(params) {
43
     return axios1.post('/reformer-blessing-b/pontus/parking/platform/appointment/record', params)
43
     return axios1.post('/reformer-blessing-b/pontus/parking/platform/appointment/record', params)
44
   },
44
   },
45
+  orderListByPage1(params) {
46
+    return axios.get('/opt/appointment/rules/order/page', {params})
47
+  },
45
   // 预约订单-退款记录
48
   // 预约订单-退款记录
46
   refundListByPage(params) {
49
   refundListByPage(params) {
47
     return axios.get('/opt/appointment/rules/refund/page', {params})
50
     return axios.get('/opt/appointment/rules/refund/page', {params})

+ 3 - 3
src/pages/index/components/appointment_rules.vue

@@ -121,8 +121,8 @@
121
               </el-form-item>
121
               </el-form-item>
122
             </el-col>
122
             </el-col>
123
             <el-col :span="6">
123
             <el-col :span="6">
124
-              <el-form-item label="停车场名称:">
125
-                <el-select filterable v-model="formInline2.parkId" placeholder="请选择" clearable>
124
+              <el-form-item label="停车场:">
125
+                <el-select filterable v-model="formInline2.car_park_id" placeholder="请选择" clearable>
126
                   <el-option
126
                   <el-option
127
                     v-for="(item,index) in parkDic"
127
                     v-for="(item,index) in parkDic"
128
                     :key="index"
128
                     :key="index"
@@ -157,7 +157,7 @@
157
               </el-form-item>
157
               </el-form-item>
158
             </el-col>
158
             </el-col>
159
             <el-col :span="6">
159
             <el-col :span="6">
160
-              <el-form-item label="停车场名称:">
160
+              <el-form-item label="停车场:">
161
                 <el-select filterable v-model="formInline3.parkId" placeholder="请选择" clearable>
161
                 <el-select filterable v-model="formInline3.parkId" placeholder="请选择" clearable>
162
                   <el-option
162
                   <el-option
163
                     v-for="(item,index) in parkDic"
163
                     v-for="(item,index) in parkDic"

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

@@ -287,7 +287,7 @@ export default {
287
     getTableData4() {
287
     getTableData4() {
288
       this.loading4= true
288
       this.loading4= true
289
       const {pageNum4, pageSize4} = this
289
       const {pageNum4, pageSize4} = this
290
-      api.orderListByPage({current: pageNum4, size: pageSize4, ...this.formInline4}).then(res => {
290
+      api.orderListByPage1({current: pageNum4, size: pageSize4, ...this.formInline4}).then(res => {
291
         this.tableData4 = res.data.records || []
291
         this.tableData4 = res.data.records || []
292
         this.total4 = res.data.total
292
         this.total4 = res.data.total
293
         this.loading4 = false
293
         this.loading4 = false

+ 52 - 24
src/pages/index/components/product_order.vue

@@ -81,13 +81,24 @@
81
         <el-form class="form-wrapper" :inline="true" :model="formInline3" style="margin-bottom: 20px;">
81
         <el-form class="form-wrapper" :inline="true" :model="formInline3" style="margin-bottom: 20px;">
82
           <el-row>
82
           <el-row>
83
             <el-col :span="6">
83
             <el-col :span="6">
84
-              <el-form-item label="订单号:">
85
-                <el-input v-model="formInline3.orderNo" placeholder="请输入"></el-input>
84
+              <el-form-item label="手机号:">
85
+                <el-input v-model="formInline3.user_phone" placeholder="请输入"></el-input>
86
               </el-form-item>
86
               </el-form-item>
87
             </el-col>
87
             </el-col>
88
             <el-col :span="6">
88
             <el-col :span="6">
89
               <el-form-item label="车牌号:">
89
               <el-form-item label="车牌号:">
90
-                <el-input v-model="formInline3.plateNo" placeholder="请输入"></el-input>
90
+                <el-input v-model="formInline3.plate_no" placeholder="请输入"></el-input>
91
+              </el-form-item>
92
+            </el-col>
93
+            <el-col :span="6">
94
+              <el-form-item label="停车场:">
95
+                <el-select filterable v-model="formInline3.car_park_id" placeholder="请选择" clearable>
96
+                  <el-option
97
+                    v-for="(item,index) in parkDic"
98
+                    :key="index"
99
+                    :label="item.parkName"
100
+                    :value="item.id" />
101
+                </el-select>
91
               </el-form-item>
102
               </el-form-item>
92
             </el-col>
103
             </el-col>
93
             <el-col :span="5">
104
             <el-col :span="5">
@@ -203,36 +214,40 @@ export default {
203
       },
214
       },
204
       columns3: [
215
       columns3: [
205
         {
216
         {
206
-          label: '订单号',
207
-          key: 'orderNo'
217
+          label: '手机号',
218
+          key: 'appointment_phone'
208
         },
219
         },
209
         {
220
         {
210
           label: '车牌号',
221
           label: '车牌号',
211
-          key: 'plateNo'
222
+          key: 'plate_no'
212
         },
223
         },
213
         {
224
         {
214
-          label: '所属停车场',
215
-          key: 'parkName'
225
+          label: '车场',
226
+          key: 'car_park_name'
227
+        },
228
+        {
229
+          label: '车位',
230
+          key: 'parking_space'
216
         },
231
         },
217
         {
232
         {
218
           label: '预约时间',
233
           label: '预约时间',
219
-          key: 'appointmentTime'
234
+          key: 'appointment_time'
220
         },
235
         },
221
         {
236
         {
222
-          label: '金额',
223
-          key: 'payAmount'
237
+          label: '状态',
238
+          key: 'appointment_status'
224
         },
239
         },
225
         {
240
         {
226
-          label: '支付方式',
227
-          key: 'payWay'
241
+          label: '取消方',
242
+          key: 'cancel_type'
228
         },
243
         },
229
         {
244
         {
230
-          label: '支付状态',
231
-          key: 'payStatus'
245
+          label: '取消原因',
246
+          key: 'cancel_reason'
232
         },
247
         },
233
         {
248
         {
234
-          label: '支付时间',
235
-          key: 'payTime'
249
+          label: '最后更新时间',
250
+          key: 'latest_time'
236
         },
251
         },
237
       ],
252
       ],
238
       tableData3: [],
253
       tableData3: [],
@@ -240,13 +255,21 @@ export default {
240
       pageSize3: 10,
255
       pageSize3: 10,
241
       pageNum3: 1,
256
       pageNum3: 1,
242
       formInline3: {
257
       formInline3: {
243
-        orderNo:'',
244
-        berthCode:'',
245
-        plateNo: ''
258
+        user_phone: '',
259
+        plate_no: '',
260
+        car_park_id:'',
261
+      },
262
+      appointmentMap: {
263
+        0: '进行中',
264
+        1: '已完成',
265
+        2: '已取消',
266
+        3: '已违约'
246
       },
267
       },
268
+      parkDic: []
247
     }
269
     }
248
   },
270
   },
249
   mounted() {
271
   mounted() {
272
+    this.getParkDic()
250
     this.getTableData1()
273
     this.getTableData1()
251
     this.getTableData2()
274
     this.getTableData2()
252
     this.getTableData3()
275
     this.getTableData3()
@@ -254,6 +277,12 @@ export default {
254
   watch: {
277
   watch: {
255
   },
278
   },
256
   methods: {
279
   methods: {
280
+    //车场
281
+    getParkDic() {
282
+      api.parkDic().then(res => {
283
+        this.parkDic = res.data || []
284
+      })
285
+    },
257
     rowClassName({ rowIndex }) {
286
     rowClassName({ rowIndex }) {
258
       // 偶数行和奇数行分别返回不同的类名,也可以根据实际需求基于rowData进行条件判断
287
       // 偶数行和奇数行分别返回不同的类名,也可以根据实际需求基于rowData进行条件判断
259
       return rowIndex % 2 === 0 ? 'even-row' : 'odd-row';
288
       return rowIndex % 2 === 0 ? 'even-row' : 'odd-row';
@@ -308,10 +337,9 @@ export default {
308
     },
337
     },
309
     getTableData3() {
338
     getTableData3() {
310
       this.loading3 = true
339
       this.loading3 = true
311
-      const {pageNum3, pageSize3} = this
312
-      api.orderListByPage({current: pageNum3, size: pageSize3, ...this.formInline3}).then(res => {
313
-        this.tableData3 = res.data.records || []
314
-        this.total3 = res.data.total
340
+      api.orderListByPage({cur_page: pageNum3, page_size: pageSize3, ...this.formInline3}).then(res => {
341
+        this.tableData3 = res.data.data.map(item => ({...item, cancel_type: item.cancel_type === 1 ? '平台':'用户',appointment_status: this.appointmentMap[item.appointment_status]})) || []
342
+        this.total3 = res.data.totalRows
315
         this.loading3 = false
343
         this.loading3 = false
316
       })
344
       })
317
     },
345
     },