Просмотр исходного кода

订单列表增加用户归属站点显示

skyline 1 год назад
Родитель
Сommit
6d6e8991b6

+ 13 - 1
admin-web/src/views/admin/ordering/index.vue

@@ -109,6 +109,17 @@
                 </div>
                 </div>
               </div>
               </div>
             </template>
             </template>
+            <template v-else-if="'userStationId'===field.prop">
+              <div class="flex-align-items-center text-align-center">
+                <div>
+                  {{ row.userStationId }}
+                </div>
+                <hr/>
+                <div>
+                  {{ row.userStationName }}
+                </div>
+              </div>
+            </template>
             <template v-else-if="field.prop==='discountType'">
             <template v-else-if="field.prop==='discountType'">
               <ext-d-label type="Activity.discountType" :model-value="row[field.prop]"></ext-d-label>
               <ext-d-label type="Activity.discountType" :model-value="row[field.prop]"></ext-d-label>
             </template>
             </template>
@@ -198,7 +209,8 @@ const state = reactive({
   exportConfig: {},
   exportConfig: {},
   columns: [
   columns: [
     {type: 'expand', width: 60, align: 'center', fixed: 'left'},
     {type: 'expand', width: 60, align: 'center', fixed: 'left'},
-    {label: '站点', prop: 'stationId', width: 140,query: true, type: 'select', resizable: true,conf:{url:'washStation/list',labelKey:'stationName',valueKey:'stationId',dataKey:'list'}},
+    {label: '消费站点', prop: 'stationId', width: 140,query: true, type: 'select', resizable: true},
+    {label: '归属站点', prop: 'userStationId', width: 140,query: true, type: 'select', resizable: true},
     {width: 220, label: '订单号', prop: 'orderId', query: true, type: 'text', resizable: true, fixed: 'left'},
     {width: 220, label: '订单号', prop: 'orderId', query: true, type: 'text', resizable: true, fixed: 'left'},
     {width: 120, label: '用户手机号', prop: 'mobilePhone', query: true, type: 'text', fixed: 'left'},
     {width: 120, label: '用户手机号', prop: 'mobilePhone', query: true, type: 'text', fixed: 'left'},
     {width: 100, label: '设备编号', prop: 'shortId', query: false, type: 'text', resizable: true},
     {width: 100, label: '设备编号', prop: 'shortId', query: false, type: 'text', resizable: true},

+ 16 - 0
car-wash-entity/src/main/java/com/kym/entity/vo/WashOrderVo.java

@@ -22,10 +22,26 @@ public class WashOrderVo extends BaseEntity {
 
 
     private String mobilePhone;
     private String mobilePhone;
 
 
+    /**
+     * 消费站点ID
+     */
     private String stationId;
     private String stationId;
 
 
+    /**
+     * 消费站点名称
+     */
     private String stationName;
     private String stationName;
 
 
+    /**
+     * 用户归属站点ID
+     */
+    private String userStationId;
+
+    /**
+     * 用户归属站点名称
+     */
+    private String userStationName;
+
     /**
     /**
      * 产品key
      * 产品key
      */
      */

+ 2 - 0
car-wash-service/src/main/java/com/kym/service/impl/WashOrderServiceImpl.java

@@ -191,6 +191,8 @@ public class WashOrderServiceImpl extends MyBaseServiceImpl<WashOrderMapper, Was
         List<WashOrderVo> list = selectJoinList(WashOrderVo.class, wrapper);
         List<WashOrderVo> list = selectJoinList(WashOrderVo.class, wrapper);
         list.forEach(item -> {
         list.forEach(item -> {
             item.setStationName(KymCache.INSTANCE.getStationNameById(item.getStationId()));
             item.setStationName(KymCache.INSTANCE.getStationNameById(item.getStationId()));
+            item.setUserStationId(KymCache.INSTANCE.getUserStationId(item.getUserId()));
+            item.setUserStationName(KymCache.INSTANCE.getStationNameById(item.getUserStationId()));
         });
         });
         return new PageBean<>(list);
         return new PageBean<>(list);
     }
     }