Просмотр исходного кода

Merge branch 'feature_20260513_新建专业五金店' into release

zhujindu 1 неделя назад
Родитель
Сommit
09a93d6302

+ 18 - 0
src/api/index.js

@@ -1214,3 +1214,21 @@ export function shareReportMobile(data) {
     data,
   });
 }
+
+// 陈列照识别接口
+export function recognizeDisplayPhoto(query) {
+  return request({
+    url: 'mobile/store/recognizeDisplayPhoto',
+    method: 'get',
+    params: query,
+  });
+}
+
+// 根据门店code获取陈列照识别数据
+export function getDisplayPhotoIdentify(query) {
+  return request({
+    url: 'mobile/store/getDisplayPhotoIdentify',
+    method: 'get',
+    params: query,
+  });
+}

+ 15 - 0
src/components/uploadImgVStore.vue

@@ -89,6 +89,16 @@ export default {
       type: String,
       default: '',
     },
+    displayPhoto: {
+      // 是否是 专业五金店-陈列照
+      type: String,
+      default: '0',
+    },
+    displayImg: {
+      // 专业五金店-陈列照的图片
+      type: Array,
+      default: () => [],
+    },
   },
   data() {
     return {
@@ -119,6 +129,10 @@ export default {
       ImagePreview(this.imgUrlArr);
     },
     uploadImg() {
+      if (this.displayImg.length >= 3 && this.displayPhoto == '1') {
+        this.$toast('专业五金店-陈列照最多只能上传三张!');
+        return;
+      }
       if (this.disabled) return;
       if (localStorage.getItem('chainName') == null) {
         this.$toast('请输入名称!');
@@ -177,6 +191,7 @@ export default {
         storeName: localStorage.getItem('chainName'),
         locationRemark: localStorage.getItem('locationRemark'),
         deptName: localStorage.getItem('deptName'),
+        displayPhoto: this.displayPhoto, //专业五金店-陈列照(0:否,1:是)
       };
       this.controller = null;
       // 需要图匠校验的添加参数和loading

+ 4 - 0
src/views/deviceWithin/storeVisit.vue

@@ -618,6 +618,8 @@ export default {
                   that.isToOtherSystem = true;
                 }
               } else {
+                // 获取门店拜访任务失败依然返回拜访id,取消拜访使用
+                that.visitId = res.data;
                 that.$toast(res.msg);
               }
             });
@@ -675,6 +677,8 @@ export default {
                   that.isToOtherSystem = true;
                 }
               } else {
+                // 获取门店拜访任务失败依然返回拜访id,取消拜访使用
+                that.visitId = res.data;
                 that.$toast(res.msg);
               }
             });

+ 25 - 2
src/views/signApproval/newStoreApprovalDetail.vue

@@ -188,7 +188,19 @@
             </van-col>
           </van-row>
           <van-collapse v-model="activeNames" class="orderList">
-            <van-collapse-item title="门店下单记录" name="1">
+            <van-collapse-item title="门店陈列照识别结果" name="0" v-if="photoIdentify.length">
+              <div class="orderItem" v-for="(item, index) in photoIdentify" :key="index">
+                <el-table
+                  :data="photoIdentify"
+                  border
+                  class="table-headermd table-headermdhome"
+                  style="width: 100%">
+                  <el-table-column label="产品名称" prop="name" />
+                  <el-table-column label="排面数" prop="count" width="80px" />
+                </el-table>
+              </div>
+            </van-collapse-item>
+            <van-collapse-item title="门店下单记录" name="1" v-if="orderList.length">
               <div class="orderItem" v-for="(item, index) in orderList" :key="index">
                 <div class="orderTitle">
                   {{ item.ORDERID }} | {{ item.ORDERDATE }} | {{ item.STATUS_DESCR }}
@@ -212,6 +224,7 @@
             </van-collapse-item>
           </van-collapse>
           <div
+            v-if="list.storeCategory != '126565'"
             style="font-size: 16px; font-weight: 600; padding: 10px 16px 0 16px; line-height: 25px">
             同城分销店首批铺货要求
             <span style="color: red">1000元</span>
@@ -315,6 +328,7 @@ import {
   getOrderByStoreCode,
   approvalStore,
   storeApprovaHistory,
+  getDisplayPhotoIdentify,
 } from '@/api/index';
 import mapmarker from '@/components/mapMarker';
 import viewUploadImg from '@/components/viewUploadImg';
@@ -355,13 +369,14 @@ export default {
       rejectMsgShow: false,
       //退回原因详情列表
       rejectMsg: [],
-      activeNames: [],
+      activeNames: [0, 1],
       orderList: [],
       rejectReasonShow: false, //退回提交原因
       rejectMessage: '',
       displayImg: [],
       orderPrice: 0, //订单总金额
       storeCompetitorList: '',
+      photoIdentify: [],
     };
   },
   activated() {
@@ -621,6 +636,7 @@ export default {
           }
           // 获取门店订单
           this.getStoreOrderList(this.list.storeCode);
+          this.getDisplayPhotoIdentifyFun(this.list.storeCode);
         } else {
           this.$toast.fail(res.msg);
         }
@@ -668,6 +684,13 @@ export default {
         }
       });
     },
+    getDisplayPhotoIdentifyFun(storeCode) {
+      getDisplayPhotoIdentify({ storeCode: storeCode }).then((res) => {
+        if (res.code == 200) {
+          this.photoIdentify = res.data.skuList || [];
+        }
+      });
+    },
     getSummaries(param) {
       const { columns, data } = param;
       const sums = [];

+ 411 - 144
src/views/storeManagement/storeAdd.vue

@@ -2,18 +2,27 @@
   <div class="storeAdd">
     <div class="navBarTOP">
       <!-- 新建同城分销店必须要下单 -->
-      <van-nav-bar
-        class="navBar"
-        title="新增信息"
-        left-arrow
-        @click-left="onClickLeft"
-        :right-text="
-          verifyStoreType(fromValue.storeCategory) &&
-          verifyStoreType(fromValue.storeCategory).type == 'fxd'
-            ? '去下单'
-            : '保存'
-        "
-        @click-right="onSubmit" />
+      <van-nav-bar class="navBar" title="新增信息" left-arrow @click-left="onClickLeft">
+        <template #right>
+          <span
+            v-if="
+              verifyStoreType(fromValue.storeCategory) &&
+              verifyStoreType(fromValue.storeCategory).type == 'fxd'
+            ">
+            <span
+              @click="onSubmit"
+              v-if="
+                fromValue.storeCategory == '126565' &&
+                fromValue.orgName &&
+                fromValue.orgName.indexOf('BMD') != -1
+              "
+              >提交
+            </span>
+            <span v-else @click="onSubmit">去下单</span>
+          </span>
+          <span v-else @click="onSubmit">保存</span>
+        </template>
+      </van-nav-bar>
     </div>
     <!--        主体内容-->
     <div style="margin-top: 44px">
@@ -312,7 +321,7 @@
               <deleteImgView :imgs="fromValue.carShopImgList"></deleteImgView>
             </div>
             <div v-if="fromValue.storeCategory != 'C917'">
-              <div style="padding: 20px; height: 228px; background-color: #f1f1f1" v-if="imgShow">
+              <div style="padding: 20px; height: 228px; background-color: #f1f1f1">
                 <van-row gutter="20">
                   <van-col span="12">
                     <div v-if="!storeTypePOP">
@@ -335,28 +344,74 @@
                         ref="uploadImgVStore"></upload-img>
                     </div>
                   </van-col>
-                  <!-- 新建同城分销店不显示陈列照 -->
-                  <template
-                    v-if="
-                      verifyStoreType(fromValue.storeCategory) &&
-                      !verifyStoreType(fromValue.storeCategory).type == 'fxd'
-                    ">
-                    <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
-                      <div v-if="storeTypePOP">
-                        <upload-img
-                          :uploadid="uploadid2"
-                          :imgArr="fromValue.imgSed"
-                          @newimgarr="newimgarr1"
-                          :type="2"
-                          :imgText="
-                            fromValue.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片'
-                          "></upload-img>
-                      </div>
-                    </van-col>
+                  <template v-if="verifyStoreType(fromValue.storeCategory)">
+                    <!-- 新建同城分销店不显示陈列照 -->
+                    <template v-if="!verifyStoreType(fromValue.storeCategory).type == 'fxd'">
+                      <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
+                        <div v-if="storeTypePOP">
+                          <upload-img
+                            :uploadid="uploadid2"
+                            :imgArr="fromValue.imgSed"
+                            @newimgarr="newimgarr1"
+                            :type="2"
+                            :imgText="
+                              fromValue.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片'
+                            "></upload-img>
+                        </div>
+                      </van-col>
+                    </template>
+                    <template
+                      v-if="
+                        fromValue.storeCategory == '126565' &&
+                        fromValue.orgName &&
+                        fromValue.orgName.indexOf('BMD') != -1
+                      ">
+                      <van-col span="12">
+                        <div>
+                          <upload-img
+                            :uploadid="uploadid2"
+                            imgArr=""
+                            @newimgarr="newimgarr1"
+                            imgText="陈列照"
+                            :type="2"
+                            :displayPhoto="'1'"
+                            :displayImg="displayImg"
+                            :count="1"></upload-img>
+                        </div>
+                      </van-col>
+                    </template>
                   </template>
                 </van-row>
+                <!-- 专业五金店 -->
+                <div
+                  v-if="
+                    fromValue.storeCategory == '126565' &&
+                    fromValue.orgName &&
+                    fromValue.orgName.indexOf('BMD') != -1
+                  "
+                  class="displayImg">
+                  <template v-if="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">
+                    <div>
+                      <upload-img
+                        :uploadid="uploadid2"
+                        imgArr=""
+                        @newimgarr="newimgarr1"
+                        imgText="陈列照"
+                        :type="2"
+                        :displayPhoto="'1'"
+                        :count="1"></upload-img>
+                    </div>
+                  </div> -->
+                </div>
               </div>
-              <div style="padding: 20px; height: 228px; background-color: #f1f1f1" v-if="!imgShow">
+              <!-- <div style="padding: 20px; height: 228px; background-color: #f1f1f1" v-if="!imgShow">
                 <van-row gutter="20">
                   <van-col span="12">
                     <div v-if="!storeTypePOP">
@@ -376,27 +431,43 @@
                         :type="1"></uploadImgView>
                     </div>
                   </van-col>
-                  <!-- 新建同城A、B店不显示陈列照 -->
-                  <template
-                    v-if="
-                      verifyStoreType(fromValue.storeCategory) &&
-                      !verifyStoreType(fromValue.storeCategory).type == 'fxd'
-                    ">
-                    <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
-                      <div v-if="storeTypePOP">
-                        <uploadImgView
-                          :uploadid="uploadid2"
-                          :imgArr="fromValue.imgSed"
-                          @newimgarr="newimgarr1"
-                          :type="2"
-                          :imgText="
-                            fromValue.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片'
-                          "></uploadImgView>
-                      </div>
-                    </van-col>
+                  <template v-if="verifyStoreType(fromValue.storeCategory)">
+                    <template v-if="!verifyStoreType(fromValue.storeCategory).type == 'fxd'">
+                      <van-col span="12" v-if="fromValue.ifJzStoreType != 1">
+                        <div v-if="storeTypePOP">
+                          <uploadImgView
+                            :uploadid="uploadid2"
+                            :imgArr="fromValue.imgSed"
+                            @newimgarr="newimgarr1"
+                            :type="2"
+                            :imgText="
+                              fromValue.ifJzStoreType != 1 ? '陈列照' : '立邦展厅照片'
+                            "></uploadImgView>
+                        </div>
+                      </van-col>
+                    </template>
+                    <template
+                      v-else-if="
+                        fromValue.storeCategory == '126565' &&
+                        fromValue.orgName &&
+                        fromValue.orgName.indexOf('BMD') != -1
+                      ">
+                      <van-col span="12">
+                        <div v-if="storeTypePOP">
+                          <uploadImgView
+                            :uploadid="uploadid2"
+                            :imgArr="fromValue.imgSed"
+                            @newimgarr="newimgarr1"
+                            :type="2"
+                            displayPhoto="'1'"
+                            :imgText="'陈列照'">
+                          </uploadImgView>
+                        </div>
+                      </van-col>
+                    </template>
                   </template>
                 </van-row>
-              </div>
+              </div> -->
             </div>
           </van-tab>
           <van-tab title="属性信息" name="Planpic">
@@ -713,6 +784,17 @@
         </div>
       </div>
     </div>
+    <div class="mask" v-if="progressFlag">
+      <div class="progress">
+        <el-progress
+          type="circle"
+          :percentage="percentage"
+          :show-text="true"
+          :width="110"
+          :format="format"></el-progress>
+        <!-- <div class="progressClose" @click="progressClose">取消</div> -->
+      </div>
+    </div>
   </div>
 </template>
 
@@ -736,6 +818,7 @@ import {
   getCustomerNatureList,
   getpotentialCustomerTypeList,
   getDictOption,
+  recognizeDisplayPhoto,
 } from '@/api/index';
 import uploadImg from '@/components/uploadImgVStore';
 import uploadImgc from '@/components/uploadImgVStorec';
@@ -750,9 +833,16 @@ import txmapimg3 from '@/assets/marker_blue.png';
 import { getPosition, getTicketFun } from '@/utils/TXApiFun';
 import { listChainsByCategory, checkStoreBeforeAdd } from '@/api/store';
 import store from '@/store';
+import { mapState } from 'vuex';
+import { ImagePreview } from 'vant';
 export default {
   name: 'storeAdd',
   components: { uploadImg, uploadImgView, mapmarker, uploadImgc, deleteImgView },
+  computed: {
+    ...mapState({
+      userInfo: (state) => state.user.userInfo,
+    }),
+  },
   data() {
     return {
       mapsearchlist: [],
@@ -888,6 +978,10 @@ export default {
       otherCompetitor: '', //主营竞品品牌-其他
       storeCompetitorList: [],
       activatedStoreCompetitor: [],
+      progressFlag: false,
+      percentage: 0,
+      timeFlag: null,
+      displayImg: [],
     };
   },
   created() {
@@ -969,6 +1063,11 @@ export default {
           storeCompetitorList: [],
           otherCompetitor: '', //主营竞品品牌-其他
         };
+        this.displayImg = [
+          // 'https://cdn-svs-test.nipponpaint.com.cn/17790740128352026-05-18%E7%95%A5%E7%95%A5%E7%95%A5.jpg?Expires=2094693212&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=1O13rUNy5FHiqTxcuJTq7RnPek4%3D',
+          // 'https://cdn-svs-test.nipponpaint.com.cn/17790740128352026-05-18%E7%95%A5%E7%95%A5%E7%95%A5.jpg?Expires=2094693212&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=1O13rUNy5FHiqTxcuJTq7RnPek4%3D',
+          // 'https://cdn-svs-test.nipponpaint.com.cn/17790740128352026-05-18%E7%95%A5%E7%95%A5%E7%95%A5.jpg?Expires=2094693212&OSSAccessKeyId=LTAI5tG1DTJFA16BHkzHVxjz&Signature=1O13rUNy5FHiqTxcuJTq7RnPek4%3D',
+        ];
         setTimeout(() => {
           // this.getLocation()
         });
@@ -996,6 +1095,7 @@ export default {
     });
     // 拍照次数重置
     store.dispatch('setShotsNum', 0);
+    this.resetProgress();
   },
   methods: {
     addressFns(val) {
@@ -1231,6 +1331,10 @@ export default {
       this.fromValue.chainName = '';
       this.getChainsByDeptId(value.deptId, this.fromValue.ifJzStoreType);
       this.showPickerDept = false;
+      // 非BMD门店,清空陈列照图片展示
+      if (value.text.indexOf('BMD') == -1) {
+        this.displayImg = [];
+      }
     },
     setStoreNameFn() {
       if (this.fromValue.storeName.trim() == '') {
@@ -1310,7 +1414,16 @@ export default {
       if (val.type == '1') {
         this.fromValue.img = val.fileUrl;
       } else if (val.type == '2') {
-        this.fromValue.imgSed = val.fileUrl;
+        //
+        if (
+          this.fromValue.storeCategory == '126565' &&
+          this.fromValue.orgName &&
+          this.fromValue.orgName.indexOf('BMD') != -1
+        ) {
+          this.displayImg.push(val.fileUrl);
+        } else {
+          this.fromValue.imgSed = val.fileUrl;
+        }
       } else {
         this.fromValue.carShopImgList.push(val.fileUrl);
       }
@@ -1467,7 +1580,13 @@ export default {
             this.fromValue.lon = TXisBD.lon;
             this.location.lat1 = resData.latitude;
             this.location.lon1 = resData.longitude;
+            //**********************************
+            // **********************************
+            // ***********************************
+            // ***************************************
+            // ****************************** */
             this.addVisits();
+            // this.beforeAddFn();
           })
           .catch((error) => {
             this.beforeAddFn();
@@ -1663,7 +1782,10 @@ export default {
         this.fromValue.tcfxCode = '';
         this.dictTypeFormShow = false;
       }
-
+      // 非专业五金店
+      if (value.dictValue !== '126565') {
+        this.displayImg = [];
+      }
       if (value.dictValue == 'C917') {
         this.GZAttributeFormShow = true;
         this.dictTypeSJSFormShow = false;
@@ -1759,6 +1881,7 @@ export default {
       this.moreTypeShow = false;
     },
     onSubmit() {
+      this.fromValue.tempStoreCode = null;
       var that = this;
       var arrList = [];
       for (var n2 = 0; n2 < this.sfaOrderProducts.length; n2++) {
@@ -1900,6 +2023,18 @@ export default {
         this.fromValue.storeCompetitorList = JSON.parse(
           JSON.stringify(this.activatedStoreCompetitor),
         );
+        // BMD-专业五金店-陈列照必须上传
+        if (
+          this.fromValue.storeCategory == '126565' &&
+          this.fromValue.orgName &&
+          this.fromValue.orgName.indexOf('BMD') != -1
+        ) {
+          this.fromValue.imgSed = this.displayImg.join(',');
+          if (!this.fromValue.imgSed && this.fromValue.imgSed.length == 0) {
+            this.$toast('陈列照未上传');
+            return;
+          }
+        }
       } else {
         // 非同城分销店 经销商必填校验
         if (
@@ -1942,113 +2077,146 @@ export default {
                 });
               });
           } else if (res.data.type == 2 || res.data.type == 1) {
-            this.$dialog
-              .confirm({
-                title: '系统提示',
-                message: `该门店类型为<span style="color:red">同城分销店</span>,<br/>首笔订单最低金额:<span style="color:red">1000元</span>`,
-                confirmButtonText: '去下单',
-                cancelButtonText: '修改门店信息',
-              })
-              .then(() => {
-                this.toastLoading(0, '上传中...', true);
-                this.addStoreFun();
-              });
-          }
-        });
-      } else {
-        this.addStoreFun();
-      }
-    },
-    // 添加门店
-    addStoreFun() {
-      addStore(this.fromValue).then((res) => {
-        this.toastLoading().clear();
-        if (res.code == 200) {
-          if (res.data.serverCode) {
-            this.fromValue.storeCode = res.data.sfaStore.storeCode;
-            this.fromValue.storeId = res.data.sfaStore.storeId;
             if (
-              res.data.orderUrl != null &&
-              (res.data.orderUrl != '') & (res.data.orderUrl != undefined)
+              126565 == this.fromValue.storeCategory &&
+              this.fromValue.orgName &&
+              this.fromValue.orgName.indexOf('BMD') != -1
             ) {
-              window.location.replace(res.data.orderUrl);
+              this.progress();
+              recognizeDisplayPhoto({ imgSed: this.fromValue.imgSed })
+                .then((response) => {
+                  if (response.code == 200) {
+                    this.fromValue.tempStoreCode = response.data;
+                    this.addStoreFun();
+                  } else {
+                    this.resetProgress();
+                    this.$dialog.alert({
+                      title: '系统提示',
+                      message: response.msg,
+                    });
+                  }
+                })
+                .catch(() => {
+                  this.resetProgress();
+                  this.$dialog.alert({
+                    title: '系统提示',
+                    message: response.msg,
+                  });
+                });
             } else {
               this.$dialog
                 .confirm({
                   title: '系统提示',
-                  message: '建店成功,是否立即拜访?',
-                  confirmButtonText: '立即拜访',
-                  cancelButtonText: '返回上一页',
+                  message: `该门店类型为<span style="color:red">同城分销店</span>,<br/>首笔订单最低金额:<span style="color:red">1000元</span>`,
+                  confirmButtonText: '去下单',
+                  cancelButtonText: '修改门店信息',
                 })
                 .then(() => {
-                  checkVisit({ storeId: res.data.sfaStore.storeId }).then((response) => {
-                    localStorage.setItem('startTime', new Date());
-                    localStorage.setItem('ORGName', this.fromValue.deptName);
-                    localStorage.setItem('chainNameR', this.fromValue.storeName);
-                    if (response.code == 200) {
+                  this.toastLoading(0, '上传中...', true);
+                  this.addStoreFun();
+                });
+            }
+          }
+        });
+      } else {
+        this.addStoreFun();
+      }
+    },
+    // 添加门店
+    addStoreFun() {
+      addStore(this.fromValue)
+        .then((res) => {
+          this.toastLoading().clear();
+          this.resetProgress();
+          if (res.code == 200) {
+            if (res.data.serverCode) {
+              this.fromValue.storeCode = res.data.sfaStore.storeCode;
+              this.fromValue.storeId = res.data.sfaStore.storeId;
+              if (
+                res.data.orderUrl != null &&
+                (res.data.orderUrl != '') & (res.data.orderUrl != undefined)
+              ) {
+                window.location.replace(res.data.orderUrl);
+              } else {
+                this.$dialog
+                  .confirm({
+                    title: '系统提示',
+                    message: '建店成功,是否立即拜访?',
+                    confirmButtonText: '立即拜访',
+                    cancelButtonText: '返回上一页',
+                  })
+                  .then(() => {
+                    checkVisit({ storeId: res.data.sfaStore.storeId }).then((response) => {
                       localStorage.setItem('startTime', new Date());
-                      localStorage.setItem('ORGName', res.data.sfaStore.deptName);
-                      localStorage.setItem('chainNameR', res.data.sfaStore.storeName);
-                      window.location.replace(
-                        window.location.origin +
-                          this.locationOrigin +
-                          '/suishenbangOutstoreVisit?PointSum=0&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=' +
-                          res.data.sfaStore.storeId +
-                          '&lat=' +
-                          this.fromValue.lat +
-                          '&lon=' +
-                          this.fromValue.lon +
-                          '&addressLine=' +
-                          this.fromValue.addressLine +
-                          '&storeCategory=' +
-                          res.data.sfaStore.storeCategory +
-                          '&storeName=' +
-                          this.fromValue.storeName +
-                          '&contactName=' +
-                          this.fromValue.contactName +
-                          '&storeCode=' +
-                          res.data.sfaStore.storeCode +
-                          '&latNew=' +
-                          this.fromValue.lat +
-                          '&lonNew=' +
-                          this.fromValue.lon +
-                          '&marklat=' +
-                          this.mlan +
-                          '&marklon=' +
-                          this.mlon,
-                      );
-                    } else {
-                      this.$dialog
-                        .alert({
-                          title: '系统提示',
-                          message: response.msg,
-                        })
-                        .then((res) => {
-                          this.$router.go(-1);
-                        });
-                    }
+                      localStorage.setItem('ORGName', this.fromValue.deptName);
+                      localStorage.setItem('chainNameR', this.fromValue.storeName);
+                      if (response.code == 200) {
+                        localStorage.setItem('startTime', new Date());
+                        localStorage.setItem('ORGName', res.data.sfaStore.deptName);
+                        localStorage.setItem('chainNameR', res.data.sfaStore.storeName);
+                        window.location.replace(
+                          window.location.origin +
+                            this.locationOrigin +
+                            '/suishenbangOutstoreVisit?PointSum=0&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=' +
+                            res.data.sfaStore.storeId +
+                            '&lat=' +
+                            this.fromValue.lat +
+                            '&lon=' +
+                            this.fromValue.lon +
+                            '&addressLine=' +
+                            this.fromValue.addressLine +
+                            '&storeCategory=' +
+                            res.data.sfaStore.storeCategory +
+                            '&storeName=' +
+                            this.fromValue.storeName +
+                            '&contactName=' +
+                            this.fromValue.contactName +
+                            '&storeCode=' +
+                            res.data.sfaStore.storeCode +
+                            '&latNew=' +
+                            this.fromValue.lat +
+                            '&lonNew=' +
+                            this.fromValue.lon +
+                            '&marklat=' +
+                            this.mlan +
+                            '&marklon=' +
+                            this.mlon,
+                        );
+                      } else {
+                        this.$dialog
+                          .alert({
+                            title: '系统提示',
+                            message: response.msg,
+                          })
+                          .then((res) => {
+                            this.$router.go(-1);
+                          });
+                      }
+                    });
+                  })
+                  .catch(() => {
+                    this.$router.go(-1);
                   });
-                })
-                .catch(() => {
-                  this.$router.go(-1);
-                });
+              }
+            } else {
+              this.fromValue.storeCode = res.data.sfaStore.storeCode;
+              this.fromValue.storeId = res.data.sfaStore.storeId;
+              this.$dialog.alert({
+                title: '系统提示',
+                message: res.data.serverMsg,
+              });
             }
           } else {
-            this.fromValue.storeCode = res.data.sfaStore.storeCode;
-            this.fromValue.storeId = res.data.sfaStore.storeId;
             this.$dialog.alert({
               title: '系统提示',
-              message: res.data.serverMsg,
+              message: res.msg,
+              messageAlign: 'left',
             });
           }
-        } else {
-          this.$dialog.alert({
-            title: '系统提示',
-            message: res.msg,
-            messageAlign: 'left',
-          });
-        }
-      });
+        })
+        .catch(() => {
+          this.resetProgress();
+        });
     },
     onClickLeft() {
       this.$router.go(-1);
@@ -2155,6 +2323,40 @@ export default {
       this.sfaStoreChainsContactList = treeSelectArr;
       this.showPickerChainsList = false;
     },
+    // 重置loaidng状态
+    resetProgress() {
+      this.percentage = 100;
+      clearInterval(this.timeFlag);
+      this.progressFlag = false;
+      this.percentage = 0;
+    },
+    progress() {
+      // 后端接口20000ms后失效,每1000m progress加10,到90停止;
+      this.progressFlag = true;
+      this.percentage = 10;
+      this.timeFlag = setInterval(() => {
+        this.percentage = this.percentage + 10;
+        if (this.percentage == 90) clearInterval(this.timeFlag);
+      }, 1500);
+    },
+    format(percentage) {
+      return `${percentage} %\n图像识别中`;
+    },
+    // 陈列照 图片删除
+    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>
@@ -2293,5 +2495,70 @@ export default {
       width: 50px;
     }
   }
+  .mask {
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    width: 100%;
+    height: 100%;
+    background: rgba(0, 0, 0, 0.5);
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    z-index: 99999999;
+    display: flex;
+    flex-direction: column;
+    .progress {
+      width: 90%;
+      height: 140px;
+      background: #fff;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      .el-progress__text {
+        white-space: break-spaces;
+      }
+    }
+    .progressClose {
+      width: 70px;
+      text-align: center;
+      background: #67c23a;
+      color: #fff;
+      height: 30px;
+      line-height: 30px;
+      border-radius: 5px;
+      margin-top: 5px;
+      font-size: 12px;
+    }
+  }
+  .displayImg {
+    overflow: hidden;
+    padding-bottom: 10px;
+    .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>

+ 105 - 11
src/views/storeManagement/storeDetail.vue

@@ -21,7 +21,7 @@
               <template v-if="list.approvalStatus == 0">
                 <!-- validFlag 正常门店 -->
                 <template v-if="list.validFlag == 0">
-                  <!-- 未提交 -->
+                  <!-- 未提交processApprovalStatus 0=未提交,1=已提交待审核,2=审批通过,3=审批拒绝 -->
                   <template v-if="list.processApprovalStatus == 0">
                     <span style="color: #0057ba" v-if="type != 'address'" @click="editorFn"
                       >编辑
@@ -247,7 +247,10 @@
               </div>
             </van-col>
           </van-row>
-          <van-row gutter="20" style="padding: 16px">
+          <van-row
+            gutter="20"
+            style="padding: 16px"
+            v-if="list.newStoreDisplayPhoto || list.newStoreSignPhoto">
             <van-col span="12" v-if="list.newStoreSignPhoto">
               <div v-if="storeTypePOP">
                 <van-image
@@ -309,7 +312,7 @@
           <van-collapse
             v-model="activeNames"
             class="orderList"
-            v-if="list.approvalStatus == 0 && cityABStore">
+            v-if="list.approvalStatus == 0 && cityABStore && orderList.length">
             <van-collapse-item title="门店下单记录" name="1">
               <div class="orderItem" v-for="(item, index) in orderList" :key="index">
                 <div class="orderTitle">
@@ -613,6 +616,17 @@
         <!-- </div> -->
       </div>
     </van-popup>
+    <div class="mask" v-if="progressFlag">
+      <div class="progress">
+        <el-progress
+          type="circle"
+          :percentage="percentage"
+          :show-text="true"
+          :width="110"
+          :format="format"></el-progress>
+        <!-- <div class="progressClose" @click="progressClose">取消</div> -->
+      </div>
+    </div>
   </div>
 </template>
 
@@ -725,6 +739,9 @@ export default {
       cityABStore: false, //同城分销A/B店
       displayImg: [],
       storeCompetitorList: '',
+      progressFlag: false,
+      percentage: 0,
+      timeFlag: null,
     };
   },
   watch: {
@@ -1683,7 +1700,7 @@ export default {
           .then(() => {});
         return;
       }
-      if (!this.orderList.length) {
+      if (!this.orderList.length && this.list.storeCategory != '126565') {
         this.$notify({ type: 'warning', message: '门店没有系统订单,请根据实际情况下单' });
         return;
       }
@@ -1692,15 +1709,35 @@ export default {
         return;
       }
       this.toastLoading(0, '正在提交...', true);
+      if (this.list.storeCategory == '126565') {
+        this.progress();
+        this.submitFun();
+      } else {
+        this.submitFun();
+      }
+    },
+    submitFun() {
       submitApproval({
         storeId: this.list.storeId, // 店铺id
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$toast.success('提交成功');
-          this.getDetail();
-          this.$router.go(-1);
-        }
-      });
+      })
+        .then((res) => {
+          this.resetProgress();
+          this.toastLoading().clear();
+          if (res.code == 200) {
+            this.$toast.success('提交成功');
+            this.getDetail();
+            this.$router.go(-1);
+          } else {
+            this.$dialog.alert({
+              title: '系统提示',
+              message: res.msg,
+              messageAlign: 'left',
+            });
+          }
+        })
+        .catch(() => {
+          this.resetProgress();
+        });
     },
     // 预览
     previewsImg(index) {
@@ -1727,6 +1764,25 @@ export default {
         query: { storeCode: this.list.storeCode },
       });
     },
+    // 重置loaidng状态
+    resetProgress() {
+      this.percentage = 100;
+      clearInterval(this.timeFlag);
+      this.progressFlag = false;
+      this.percentage = 0;
+    },
+    progress() {
+      // 后端接口20000ms后失效,每1000m progress加10,到90停止;
+      this.progressFlag = true;
+      this.percentage = 10;
+      this.timeFlag = setInterval(() => {
+        this.percentage = this.percentage + 10;
+        if (this.percentage == 90) clearInterval(this.timeFlag);
+      }, 1500);
+    },
+    format(percentage) {
+      return `${percentage} %\n图像识别中`;
+    },
   },
 };
 </script>
@@ -1971,5 +2027,43 @@ export default {
       width: 9em;
     }
   }
+  .mask {
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    width: 100%;
+    height: 100%;
+    background: rgba(0, 0, 0, 0.5);
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    z-index: 99999999;
+    display: flex;
+    flex-direction: column;
+    .progress {
+      width: 90%;
+      height: 140px;
+      background: #fff;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      .el-progress__text {
+        white-space: break-spaces;
+      }
+    }
+    .progressClose {
+      width: 70px;
+      text-align: center;
+      background: #67c23a;
+      color: #fff;
+      height: 30px;
+      line-height: 30px;
+      border-radius: 5px;
+      margin-top: 5px;
+      font-size: 12px;
+    }
+  }
 }
 </style>

+ 36 - 9
src/views/storeManagement/storeEdit.vue

@@ -354,21 +354,48 @@
                   <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)" />
+                      <template v-if="fromValue.storeCategory == '126565'">
+                        <van-icon
+                          name="close"
+                          size="16"
+                          @click="deleteImg(index)"
+                          v-if="
+                            fromValue.processApprovalStatus != 1 &&
+                            fromValue.processApprovalStatus != 2
+                          " />
+                      </template>
+                      <van-icon name="close" size="16" @click="deleteImg(index)" v-else />
                       <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"
-                        :uploadid="uploadid2"
-                        imgArr=""
-                        @newimgarr="newimgarr1"
-                        imgText="陈列照(至少一张)"
-                        :type="2"
-                        :count="1"></upload-img>
+                      <template v-if="fromValue.storeCategory == '126565'">
+                        <upload-img
+                          v-if="
+                            fromValue.processApprovalStatus != 1 &&
+                            fromValue.processApprovalStatus != 2
+                          "
+                          :uploadid="uploadid2"
+                          imgArr=""
+                          @newimgarr="newimgarr1"
+                          imgText="陈列照(至少一张)"
+                          :type="2"
+                          :count="1"
+                          :displayPhoto="fromValue.storeCategory == '126565' ? '1' : '0'"
+                          :displayImg="displayImg"></upload-img>
+                      </template>
+                      <template v-else>
+                        <upload-img
+                          v-if="fromValue.ifJzStoreType != 1"
+                          :uploadid="uploadid2"
+                          imgArr=""
+                          @newimgarr="newimgarr1"
+                          imgText="陈列照(至少一张)"
+                          :type="2"
+                          :count="1"></upload-img>
+                      </template>
                     </div>
                   </div>
                 </div>