Browse Source

Merge branch 'feature_20241014_同城店铺新建流程重构' into uat

zhujindu 1 day ago
parent
commit
ba4ff75a23

+ 64 - 15
src/views/signApproval/newStoreApprovalDetail.vue

@@ -90,8 +90,8 @@
             <viewUploadImg :imgs="list.carShopImgList"></viewUploadImg>
           </div>
           <template v-if="list.img != null && list.storeCategory != 'C917'">
-            <van-row gutter="20" style="padding: 16px">
-              <van-col span="12">
+            <div class="displayImg" style="padding: 16px">
+              <div class="displayImgBox">
                 <div v-if="storeTypePOP">
                   <van-image
                     width="100%"
@@ -112,20 +112,31 @@
                     {{ list.storeCategory == 'C912' ? '工地铭牌照片' : '公司照片' }}
                   </p>
                 </div>
-              </van-col>
-              <van-col span="12" v-if="list.ifJzStoreType != 1">
-                <div v-if="storeTypePOP">
-                  <van-image
-                    width="100%"
-                    height="160"
-                    :src="setImgSrc(list.imgSed)"
-                    @click="deleteImgs(list.imgSed)" />
-                  <p style="text-align: center">
-                    {{ list.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片' }}
-                  </p>
+              </div>
+              <template v-if="list.ifJzStoreType != 1"></template>
+              <template v-else>
+                <div class="displayImgBox">
+                  <div v-if="storeTypePOP">
+                    <van-image
+                      width="100%"
+                      height="160"
+                      :src="setImgSrc(list.imgSed)"
+                      @click="deleteImgs(list.imgSed)" />
+                    <p style="text-align: center">
+                      {{ '立邦展厅照片' }}
+                    </p>
+                  </div>
                 </div>
-              </van-col>
-            </van-row>
+              </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.newStoreSignPhoto">
@@ -281,6 +292,7 @@ export default {
       orderList: [],
       rejectReasonShow: false, //退回提交原因
       rejectMessage: '',
+      displayImg: [],
     };
   },
   activated() {
@@ -459,6 +471,7 @@ export default {
         localStorage.setItem('chainName', res.data.storeName);
         if (res.code == 200) {
           this.list = res.data;
+          this.displayImg = this.list.imgSed != '' ? this.list.imgSed.split(',') : [];
           if (this.list.carShopImgList != null) {
           } else {
             this.list.carShopImgList = [];
@@ -652,6 +665,17 @@ export default {
         }
       });
     },
+    // 预览
+    previewsImg(index) {
+      var arrimg = [];
+      for (var imgi = 0; imgi < this.displayImg.length; imgi++) {
+        arrimg.push(this.displayImg[imgi]);
+      }
+      ImagePreview({
+        images: arrimg,
+        startPosition: index,
+      });
+    },
   },
 };
 </script>
@@ -793,6 +817,31 @@ export default {
     }
   }
 }
+.displayImg {
+  .displayImgBox {
+    position: relative;
+    width: 48%;
+    padding: 20px 0;
+    height: 210px;
+    float: left;
+    margin-right: 4%;
+    .title {
+      text-align: center;
+      padding: 5px 0;
+    }
+  }
+  .displayImgBox:nth-child(even) {
+    margin-right: 0;
+  }
+  i {
+    position: absolute;
+    right: 4px;
+    color: white;
+    background: red;
+    overflow: hidden;
+    border-radius: 50%;
+  }
+}
 </style>
 <style lang="scss">
 .searchDiv {

+ 19 - 15
src/views/storeManagement/storeDetail.vue

@@ -156,8 +156,8 @@
             <viewUploadImg :imgs="list.carShopImgList"></viewUploadImg>
           </div>
           <template v-if="list.img != null && list.storeCategory != 'C917'">
-            <van-row gutter="20" style="padding: 16px">
-              <van-col span="12">
+            <div class="displayImg" style="padding: 16px">
+              <div class="displayImgBox">
                 <div v-if="storeTypePOP">
                   <van-image
                     width="100%"
@@ -178,10 +178,10 @@
                     {{ list.storeCategory == 'C912' ? '工地铭牌照片' : '公司照片' }}
                   </p>
                 </div>
-              </van-col>
+              </div>
               <template v-if="list.ifJzStoreType != 1"></template>
               <template v-else>
-                <van-col span="12">
+                <div class="displayImgBox">
                   <div v-if="storeTypePOP">
                     <van-image
                       width="100%"
@@ -192,16 +192,16 @@
                       {{ '立邦展厅照片' }}
                     </p>
                   </div>
-                </van-col>
+                </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>
-            </van-row>
-            <div
-              class="displayImg"
-              v-if="list.ifJzStoreType != 1 && storeTypePOP && displayImg.length">
-              <div class="displayImgBox" v-for="(urls, index) in displayImg" :key="index">
-                <img :src="urls" width="99%" height="99%" @click="previewsImg(index)" />
-                <div class="title">建店时陈列照</div>
-              </div>
             </div>
           </template>
           <van-row gutter="20" style="padding: 16px">
@@ -1742,15 +1742,19 @@ export default {
 .displayImg {
   .displayImgBox {
     position: relative;
-    width: 50%;
+    width: 48%;
     padding: 20px 0;
-    height: 228px;
+    height: 210px;
     float: left;
+    margin-right: 4%;
     .title {
       text-align: center;
       padding: 5px 0;
     }
   }
+  .displayImgBox:nth-child(even) {
+    margin-right: 0;
+  }
   i {
     position: absolute;
     right: 4px;

+ 20 - 17
src/views/storeManagement/storeEdit.vue

@@ -291,8 +291,8 @@
             </div>
             <div v-if="fromValue.storeCategory != 'C917'">
               <div style="padding: 20px; height: 228px; background-color: #f1f1f1">
-                <van-row gutter="20">
-                  <van-col span="12">
+                <div class="displayImg">
+                  <div class="displayImgBox">
                     <div v-if="storeTypePOP">
                       <upload-img
                         :uploadid="uploadid2"
@@ -309,8 +309,16 @@
                         :imgText="fromValue.storeCategory == 'C912' ? '工地铭牌照片' : '公司照片'"
                         :type="1"></upload-img>
                     </div>
-                  </van-col>
-                  <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
+                  </div>
+                  <template
+                    v-if="fromValue.ifJzStoreType != 1 && storeTypePOP && displayImg.length">
+                    <div class="displayImgBox" v-for="(urls, index) in displayImg" :key="index">
+                      <van-icon name="close" size="16" @click="deleteImg(index)" />
+                      <img :src="urls" width="99%" height="99%" @click="previewsImg(index)" />
+                      <div class="title">陈列照</div>
+                    </div>
+                  </template>
+                  <div class="displayImgBox" v-if="fromValue.ifJzStoreType != 1">
                     <div v-if="storeTypePOP">
                       <upload-img
                         v-if="fromValue.ifJzStoreType != 1"
@@ -321,15 +329,6 @@
                         :type="2"
                         count="1"></upload-img>
                     </div>
-                  </van-col>
-                </van-row>
-                <div
-                  class="displayImg"
-                  v-if="fromValue.ifJzStoreType != 1 && storeTypePOP && displayImg.length">
-                  <div class="displayImgBox" v-for="(urls, index) in displayImg" :key="index">
-                    <van-icon name="close" size="16" @click="deleteImg(index)" />
-                    <img :src="urls" width="99%" height="99%" @click="previewsImg(index)" />
-                    <div class="title">陈列照</div>
                   </div>
                 </div>
               </div>
@@ -1789,15 +1788,19 @@ export default {
   overflow: hidden;
   .displayImgBox {
     position: relative;
-    width: 50%;
-    /* padding: 20px 0; */
-    height: 228px;
+    width: 48%;
+    padding: 20px 0;
+    height: 210px;
     float: left;
-    padding-bottom: 40px;
+    margin-right: 4%;
     .title {
       text-align: center;
+      padding: 5px 0;
     }
   }
+  .displayImgBox:nth-child(even) {
+    margin-right: 0;
+  }
   i {
     position: absolute;
     right: 4px;