소스 검색

Merge branch 'zhongqi-deliveryDistrict'

shish 3 달 전
부모
커밋
14f802c293
1개의 변경된 파일23개의 추가작업 그리고 7개의 파일을 삭제
  1. 23 7
      ghsApp/src/admin/order/orderListByDist.vue

+ 23 - 7
ghsApp/src/admin/order/orderListByDist.vue

@@ -32,9 +32,11 @@
                 <text class="col-address" style="color: #07c160;">{{ customItems[0].address }}</text>
               </block>
             </view>
-            <view class="row-remark" v-if="customItems[0].remark">
-              <text style="color: #666;font-size: 28upx;">备注:</text>{{ customItems[0].remark }}
-            </view>
+            <block v-if="getRemarks(customItems).length > 0">
+              <view class="row-remark" v-for="(remarkItem, rIndex) in getRemarks(customItems)" :key="'remark-' + rIndex">
+                <text style="font-size: 28upx;">{{ remarkItem.label }}:</text>{{ remarkItem.text }}
+              </view>
+            </block>
           </view>
         </view>
       </block>
@@ -60,7 +62,7 @@
               <text class="col-address-popup">{{ item.address }}</text>
             </view>
             <view class="row-remark" v-if="item.remark">
-              <text style="color: #666;font-size: 28upx;">备注:</text>{{ item.remark }}
+              <text style="font-size: 28upx;">备注:</text>{{ item.remark }}
             </view>
           </view>
         </scroll-view>
@@ -176,6 +178,20 @@ export default {
         remark: item.remark || ''
       };
     },
+    getRemarks(customItems) {
+      if (!customItems || !customItems.length) return [];
+      const remarks = customItems.map(item => item.remark).filter(remark => !!remark);
+      if (remarks.length === 0) {
+        return [];
+      }
+      if (remarks.length === 1) {
+        return [{ label: '备注', text: remarks[0] }];
+      }
+      return remarks.map((remark, index) => ({
+        label: `备注${index + 1}`,
+        text: remark
+      }));
+    },
     handleRowClick(customItems) {
       if (customItems.length === 1) {
         this.goToDetail(customItems[0].id);
@@ -224,7 +240,7 @@ export default {
 }
 
 .list-wrap {
-  padding: 120upx 10upx 20upx;
+  padding: 100upx 10upx 20upx;
   box-sizing: border-box;
 }
 
@@ -232,7 +248,7 @@ export default {
   display: flex;
   align-items: center;
   min-height: 70upx;
-  padding: 0 20upx;
+  padding: 0 10upx;
   color: #8d96b0;
   font-size: 30upx;
   background-color: #eceef3;
@@ -270,7 +286,7 @@ export default {
 
 .row-remark {
   font-size: 26upx;
-  color: #999;
+  color: hsl(0, 95%, 44%);
   margin-top: 10upx;
   width: 100%;
 }