Procházet zdrojové kódy

feat: 订单列表新增新用户订单标记,手机号列加宽并显示品牌红标签

skyline před 3 dny
rodič
revize
43aabff49e
1 změnil soubory, kde provedl 26 přidání a 1 odebrání
  1. 26 1
      admin-web-new/src/views/admin/ordering/index.vue

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

@@ -36,7 +36,7 @@ const state = reactive({
       { label: "消费站点", prop: "stationName", width: 140 },
       { label: "归属站点", prop: "userStationName", width: 140 },
       { label: "订单号", prop: "orderId", width: 220 },
-      { label: "用户手机号", prop: "mobilePhone", width: 120 },
+      { label: "用户手机号", prop: "mobilePhone", width: 180 },
       { label: "设备编号", prop: "shortId", width: 100 },
       { label: "开始时间", prop: "startTime", width: 160 },
       { label: "结束时间", prop: "endTime", width: 160 },
@@ -262,6 +262,20 @@ const processDetailData = (detail: any[]) => {
             <template v-if="isMoneyField(col.prop)">
               ¥{{ formatMoney(row[col.prop]) }}
             </template>
+            <template v-else-if="col.prop === 'mobilePhone'">
+              <div class="phone-cell">
+                <span>{{ row.mobilePhone }}</span>
+                <el-tag
+                  v-if="row.newUser"
+                  class="new-user-tag"
+                  type="danger"
+                  size="small"
+                  effect="light"
+                >
+                  新用户
+                </el-tag>
+              </div>
+            </template>
             <template v-else-if="col.prop === 'orderStatus'">
               <ExtDLabel type="Order.status" :model-value="row.orderStatus" />
             </template>
@@ -336,6 +350,17 @@ const processDetailData = (detail: any[]) => {
   padding: 10px;
 }
 
+.phone-cell {
+  display: flex;
+  align-items: center;
+  overflow: hidden;
+}
+
+.new-user-tag {
+  margin-left: 6px;
+  flex-shrink: 0;
+}
+
 .no-detail {
   padding: 20px;
   text-align: center;