瀏覽代碼

feat(groupPackageManagement):优化图片展示和数据提交逻辑

- 为团购管理列表添加默认图片展示逻辑
- 当图片不存在时显示默认 aboutUsLogo.png- 注释掉原有的菜品数据扁平化处理逻辑
- 直接提交原始菜品数据结构而非转换后的扁平数据
- 保留发票类型拼接逻辑不变
congxuesong 1 月之前
父節點
當前提交
151ce18ab3

二進制
src/assets/images/coupon.png


二進制
src/assets/images/groupPackageManagement/aboutUsLogo.png


二進制
src/assets/images/welcome.png


+ 7 - 1
src/views/groupPackageManagement/index.vue

@@ -12,7 +12,13 @@
       </template>
       <template #Information="scope">
         <div class="information">
-          <el-image :src="scope.row.imageValueStr[0]" :preview-src-list="scope.row.imageValueStr" preview-teleported />
+          <el-image
+            v-if="scope.row.imageValueStr[0]"
+            :src="scope.row.imageValueStr[0]"
+            :preview-src-list="scope.row.imageValueStr"
+            preview-teleported
+          />
+          <el-image v-else src="/src/assets/images/groupPackageManagement/aboutUsLogo.png" />
           <div class="information-right">
             <p>团购名称:{{ scope.row.groupName }}</p>
             <p>团购编号:{{ scope.row.groupNo }}</p>

+ 9 - 9
src/views/groupPackageManagement/newGroup.vue

@@ -1741,17 +1741,17 @@ const handleSubmit = (type?) => {
     // params.disableDateValue = params.disableDateList.map(subArray => subArray.join(",")).join(";");
   }
   params.invoiceType = params.invoiceInformation.join(",");
-  const output = lifeGroupBuyThalis.value.flatMap(group =>
-    group.dishes.map(dish => ({
-      groupName: group.groupName,
-      detailId: dish.detailId,
-      qty: dish.qty,
-      dishPrice: dish.dishPrice
-    }))
-  );
+  // const output = lifeGroupBuyThalis.value.flatMap(group =>
+  //   group.dishes.map(dish => ({
+  //     groupName: group.groupName,
+  //     detailId: dish.detailId,
+  //     qty: dish.qty,
+  //     dishPrice: dish.dishPrice
+  //   }))
+  // );
   const paramsObj = {
     lifeGroupBuyMain: params,
-    lifeGroupBuyThalis: output
+    lifeGroupBuyThalis: lifeGroupBuyThalis.value
   };
   console.log(paramsObj);
   if (type) {