Ver código fonte

Merge branch 'feature_20250120_门店详情增加最近一次拜访店照' into release

zhujindu 9 meses atrás
pai
commit
80fdfa7bda
1 arquivos alterados com 49 adições e 14 exclusões
  1. 49 14
      src/views/storeManagement/storeDetail.vue

+ 49 - 14
src/views/storeManagement/storeDetail.vue

@@ -172,9 +172,9 @@
             <p style="padding: 0 16px">车铺照片(店招及车铺产品拍在一张照片里)</p>
             <viewUploadImg :imgs="list.carShopImgList"></viewUploadImg>
           </div>
-          <template v-if="list.img != null && list.storeCategory != 'C917'">
+          <template v-if="list.storeCategory != 'C917'">
             <div class="displayImg" style="padding: 16px">
-              <div class="displayImgBox">
+              <!-- <div class="displayImgBox">
                 <div v-if="storeTypePOP">
                   <van-image
                     width="100%"
@@ -195,7 +195,7 @@
                     {{ list.storeCategory == 'C912' ? '工地铭牌照片' : '公司照片' }}
                   </p>
                 </div>
-              </div>
+              </div> -->
               <template v-if="list.ifJzStoreType != 1"></template>
               <template v-else>
                 <div class="displayImgBox">
@@ -211,17 +211,31 @@
                   </div>
                 </div>
               </template>
-              <template v-if="list.ifJzStoreType != 1 && storeTypePOP && displayImg.length">
-                <div class="displayImgBox" v-for="(urls, index) in displayImg" :key="index">
-                  <div>
-                    <van-image width="100%" height="160" :src="urls" @click="previewsImg(index)" />
-                    <p style="text-align: center">建店时陈列照</p>
-                  </div>
-                </div>
-              </template>
             </div>
           </template>
           <van-row gutter="20" style="padding: 16px">
+            <van-col span="12" v-if="list.standardStorePhoto && list.storeCategory != 'C917'">
+              <div v-if="storeTypePOP">
+                <van-image
+                  width="100%"
+                  height="160"
+                  :src="setImgSrc(list.img)"
+                  @click="deleteImgs(list.img)" />
+                <p style="text-align: center">
+                  {{ list.ifJzStoreType != 1 ? '建店时门店照' : '家装前台照片' }}
+                </p>
+              </div>
+              <div v-else>
+                <van-image
+                  width="100%"
+                  height="160"
+                  :src="setImgSrc(list.img)"
+                  @click="deleteImgs(list.img)" />
+                <p style="text-align: center">
+                  {{ list.storeCategory == 'C912' ? '工地铭牌照片' : '公司照片' }}
+                </p>
+              </div>
+            </van-col>
             <van-col span="12" v-if="list.standardStorePhoto">
               <div v-if="storeTypePOP">
                 <van-image
@@ -255,7 +269,26 @@
               </div>
             </van-col>
           </van-row>
-          <van-row gutter="20" style="padding: 16px" v-if="type == 'address'">
+          <div
+            class="displayImg"
+            style="padding: 16px"
+            v-if="list.ifJzStoreType != 1 && storeTypePOP">
+            <div
+              class="displayImgBox"
+              v-for="(urls, index) in displayImg"
+              :key="index"
+              v-if="displayImg.length">
+              <div>
+                <van-image width="100%" height="160" :src="urls" @click="previewsImg(index)" />
+                <p style="text-align: center">建店时陈列照</p>
+              </div>
+            </div>
+            <div class="displayImgBox" v-else>
+              <van-image width="100%" height="160" src="" @click="deleteImgs()" />
+              <p style="text-align: center">建店时陈列照</p>
+            </div>
+          </div>
+          <!-- <van-row gutter="20" style="padding: 16px" v-if="type == 'address'">
             <van-col
               span="12"
               v-if="
@@ -272,7 +305,7 @@
                 imgText="店招照片"
                 :type="1"></upload-img>
             </van-col>
-          </van-row>
+          </van-row> -->
           <van-collapse
             v-model="activeNames"
             class="orderList"
@@ -1223,11 +1256,13 @@ export default {
         });
     },
     setImgSrc(imgUrl) {
+      if (!imgUrl) return '';
       let imgArr = imgUrl.split(',');
       return imgArr[0];
     },
     deleteImgs(val) {
-      ImagePreview(val.split(','));
+      let url = val ? val.split(',') : [''];
+      ImagePreview(url);
     },
     getStoreType() {
       this.toastLoading(0, '加载中...', true);