浏览代码

同城店铺新建流程重构

zhujindu 1 年之前
父节点
当前提交
7658f71b90

+ 1 - 1
src/views/signApproval/newStoreApprovalDetail.vue

@@ -175,7 +175,7 @@
       <br />
       <br />
       <!-- 未结案 未提交状态下可关闭门店、提交审核 -->
-      <div class="bottomBtn">
+      <div class="bottomBtn" v-if="list.approvalStatus == 0 && list.processApprovalStatus == 1">
         <van-button color="red" round @click="rejectReasonShow = true">退回</van-button>
         <van-button type="primary" round @click="approvalStoreFun('success')">通过</van-button>
       </div>

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

@@ -16,7 +16,13 @@
                     >编辑
                   </span>
                 </template>
-                <!-- <span style="color: #0057ba; margin-left: 10px" @click="placeOrderFn">去下单 </span> -->
+                <!--下首单专用接口,只有在未结案、没有订单调用 -->
+                <span
+                  v-if="!orderList.length"
+                  style="color: #0057ba; margin-left: 10px"
+                  @click="placeOrderFn"
+                  >去下单
+                </span>
               </template>
             </template>
             <template v-else>
@@ -173,19 +179,30 @@
                   </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>
-              </van-col>
+              <template v-if="list.ifJzStoreType != 1"></template>
+              <template v-else>
+                <van-col span="12">
+                  <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>
+                </van-col>
+              </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">
             <van-col span="12" v-if="list.newStoreSignPhoto">
@@ -575,6 +592,7 @@ export default {
       activeNames: [],
       orderList: [],
       cityABStore: false, //同城分销A/B店
+      displayImg: [],
     };
   },
   activated() {
@@ -1230,6 +1248,7 @@ export default {
             this.lon = res.data.lon;
           }
           this.list = res.data;
+          this.displayImg = this.list.imgSed.split(',');
           if (this.list.storeCategory == '129081' || this.list.storeCategory == '10131') {
             this.cityABStore = true;
           } else {
@@ -1550,7 +1569,7 @@ export default {
         return;
       }
       if (!this.orderList.length) {
-        this.$notify({ type: 'warning', message: '门店没有订单,无法提交审批' });
+        this.$notify({ type: 'warning', message: '门店没有系统订单,请根据实际情况下单' });
         return;
       }
       if (this.list.imgSed == '') {
@@ -1569,6 +1588,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>
@@ -1703,6 +1733,26 @@ export default {
     }
   }
 }
+.displayImg {
+  .displayImgBox {
+    position: relative;
+    width: 50%;
+    padding: 20px 0;
+    height: 228px;
+    float: left;
+    .title {
+      text-align: center;
+    }
+  }
+  i {
+    position: absolute;
+    right: 4px;
+    color: white;
+    background: red;
+    overflow: hidden;
+    border-radius: 50%;
+  }
+}
 </style>
 <style lang="scss">
 .searchDiv {

+ 52 - 4
src/views/storeManagement/storeEdit.vue

@@ -313,16 +313,25 @@
                   <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
                     <div v-if="storeTypePOP">
                       <upload-img
+                        v-if="fromValue.ifJzStoreType != 1"
                         :uploadid="uploadid2"
-                        :imgArr="fromValue.imgSed"
+                        imgArr=""
                         @newimgarr="newimgarr1"
-                        :imgText="fromValue.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片'"
+                        imgText="陈列照"
                         :type="2"
-                        :count="fromValue.ifJzStoreType != 1 ? 9 : 1"></upload-img>
+                        count="1"></upload-img>
                     </div>
-                    <!-- <viewUploadImg :imgs="fromValue.imgSed.split(',')"></viewUploadImg> -->
                   </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>
             </div>
             <!-- 无效店铺,关闭店铺 -->
@@ -582,6 +591,7 @@ import txmapimg1 from '@/assets/txmap1.svg';
 import txmapimg2 from '@/assets/txmap2.svg';
 import txmapimg3 from '@/assets/marker_blue.png';
 import { valid } from '@/api/visitstore';
+import { ImagePreview } from 'vant';
 import { getPosition, getTicketFun, getMapPoi, getkeywordPoi } from '@/utils/TXApiFun';
 
 export default {
@@ -709,6 +719,7 @@ export default {
       map: '',
       pLat: '',
       pLot: '',
+      displayImg: [],
     };
   },
   activated() {
@@ -1165,6 +1176,7 @@ export default {
 
         if (res.code == 200) {
           this.fromValue = res.data;
+          this.displayImg = this.fromValue.imgSed.split(',');
           if (this.fromValue.lat != null) {
           } else {
             this.fromValue.lat = '';
@@ -1536,6 +1548,7 @@ export default {
       }
     },
     onSubmit() {
+      this.fromValue.imgSed = this.displayImg.join(',');
       for (var n1 = 0; n1 < this.fromValue.orderProductStoreList.length; n1++) {
         for (var n2 = 0; n2 < this.sfaOrderProducts.length; n2++) {
           if (
@@ -1718,6 +1731,21 @@ export default {
         }
       }
     },
+    // 陈列照 图片删除
+    deleteImg(index) {
+      this.displayImg.splice(index, 1);
+    },
+    // 预览
+    previewsImg(index) {
+      var arrimg = [];
+      for (var imgi = 0; imgi < this.displayImg.length; imgi++) {
+        arrimg.push(this.displayImg[imgi]);
+      }
+      ImagePreview({
+        images: arrimg,
+        startPosition: index,
+      });
+    },
   },
 };
 </script>
@@ -1752,6 +1780,26 @@ export default {
     }
   }
 }
+.displayImg {
+  .displayImgBox {
+    position: relative;
+    width: 50%;
+    padding: 20px 0;
+    height: 228px;
+    float: left;
+    .title {
+      text-align: center;
+    }
+  }
+  i {
+    position: absolute;
+    right: 4px;
+    color: white;
+    background: red;
+    overflow: hidden;
+    border-radius: 50%;
+  }
+}
 </style>
 <style>
 #allmap {