Jelajahi Sumber

Merge branch 'feature_20250114_新增同城分销店增加去下单提示'

zhujindu 10 bulan lalu
induk
melakukan
d038b939b3

+ 20 - 16
src/views/deviceOutside/index.vue

@@ -2121,24 +2121,28 @@ export default {
     // 滚动条与底部距离小于 offset 时触发 初始化会触发
     onLoad() {
       // 授权
-      getTicketFun().then(() => {
-        var postType = localStorage.getItem('postType');
-        if (postType == 'GZ') {
-          this.typeShow = false;
-        } else {
-          this.typeShow = true;
-        }
-        if (this.lon == '' && this.tabVal != 1) {
-          this.positionFn(1);
-        } else {
-          if (this.tabVal == 1) {
-            this.positionFn();
-            // this.getUserOutPlaListFun();
+      getTicketFun()
+        .then(() => {
+          var postType = localStorage.getItem('postType');
+          if (postType == 'GZ') {
+            this.typeShow = false;
           } else {
-            this.getUserOrgStoreList();
+            this.typeShow = true;
           }
-        }
-      });
+          if (this.lon == '' && this.tabVal != 1) {
+            this.positionFn(1);
+          } else {
+            if (this.tabVal == 1) {
+              this.positionFn();
+              // this.getUserOutPlaListFun();
+            } else {
+              this.getUserOrgStoreList();
+            }
+          }
+        })
+        .catch(() => {
+          this.finished = true;
+        });
     },
     // 跳转好帮手门店详情
     goOtherSystem(item) {

+ 11 - 0
src/views/signApproval/newStoreApprovalDetail.vue

@@ -199,6 +199,14 @@
               </div>
             </van-collapse-item>
           </van-collapse>
+          <div
+            style="font-size: 16px; font-weight: 600; padding: 10px 16px 0 16px; line-height: 25px">
+            同城分销店首批铺货要求
+            <span style="color: red">1000元</span>
+            ,该店已达
+            <span style="color: red">{{ orderPrice }}元</span>,
+            <span style="background: #07c160; padding: 3px">满足要求</span>
+          </div>
         </van-tab>
         <van-tab title="属性信息" name="outsidePlan">
           <template v-for="(item, index) in TCFXList" v-if="dictTypeFormShow">
@@ -324,6 +332,7 @@ export default {
       rejectReasonShow: false, //退回提交原因
       rejectMessage: '',
       displayImg: [],
+      orderPrice: 0, //订单总金额
     };
   },
   activated() {
@@ -605,6 +614,7 @@ export default {
             }
             // totalPrice:
             let orderListArr = [];
+            this.orderPrice = 0;
             for (let value of orderMap.values()) {
               let productTotalPrice = 0; //当前订单总金额
               for (let i = 0; i < value.productDetail.length; i++) {
@@ -613,6 +623,7 @@ export default {
                 productTotalPrice = productTotalPrice + value.productDetail[i].productTotalPrice;
               }
               value.totalPrice = productTotalPrice;
+              this.orderPrice = this.orderPrice + productTotalPrice;
               orderListArr.push(value);
             }
             this.orderList = orderListArr;

+ 52 - 30
src/views/storeManagement/storeAdd.vue

@@ -329,7 +329,9 @@
                         :imgArr="fromValue.img"
                         @newimgarr="newimgarr1"
                         :imgText="fromValue.ifJzStoreType != 1 ? '门店照' : '家装前台照片'"
-                        :type="1"></upload-img>
+                        :photoIdentifyType="fromValue.ifJzStoreType != 1 ? '1' : ''"
+                        :type="1"
+                        ref="uploadImgVStore"></upload-img>
                     </div>
                   </van-col>
                   <!-- 新建同城分销店不显示陈列照 -->
@@ -713,6 +715,7 @@ import txmapimg2 from '@/assets/txmap2.svg';
 import txmapimg3 from '@/assets/marker_blue.png';
 import { getPosition, getTicketFun } from '@/utils/TXApiFun';
 import { listChainsByCategory } from '@/api/store';
+import store from '@/store';
 export default {
   name: 'storeAdd',
   components: { uploadImg, uploadImgView, mapmarker, uploadImgc, deleteImgView },
@@ -864,6 +867,8 @@ export default {
     this.dictTypeQGJZFormShow = false;
     this.dictTypeSJSFormShow = false;
     this.dictTypeFormShow = false;
+    // 拍照次数重置
+    store.dispatch('setShotsNum', 0);
   },
   watch: {
     $route(to, from) {
@@ -931,11 +936,15 @@ export default {
         this.getQGJZist();
         this.getStreetQuery();
       }
+      if (from.path == '/storeAdd') {
+        // 离开当前页面时,关闭弹框
+        if (this.$refs.uploadImgVStore) this.$refs.uploadImgVStore.close();
+      }
     },
   },
   activated() {
     this.tabVal = 'insidePlan';
-    // this.beforeAddFn();
+    this.beforeAddFn();
     // 授权
     getTicketFun(['getLocation', 'chooseImage', 'uploadImage']).then(() => {
       this.$nextTick(() => {
@@ -1260,6 +1269,7 @@ export default {
       } else {
         this.fromValue.carShopImgList.push(val.fileUrl);
       }
+      this.fromValue.businessId = val.businessId ? val.businessId : '';
     },
     getChainsByDeptId(deptCode, ifJzStoreType) {
       getChainsByDeptCode({
@@ -1640,6 +1650,8 @@ export default {
       this.fromValue.orgName = '';
       this.fromValue.orgId = '';
       this.fromValue.ifJzStoreType = value.ifJzStoreType;
+      // 重置拍摄照片
+      this.fromValue.img = '';
       this.getChainsByDeptCode(null, value.ifJzStoreType);
       // 切换门店类型删除选定经销商
       this.treeSelect = [];
@@ -1700,11 +1712,7 @@ export default {
         }
       }
       this.fromValue.orderProductStoreList = arrList;
-      let loading1 = this.$toast.loading({
-        duration: 0,
-        message: '加载中...',
-        forbidClick: true,
-      });
+      this.toastLoading(0, '上传中...', true);
       var fromValue = this.fromValue;
       var telrg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
       if (fromValue.orgId == '') {
@@ -1829,22 +1837,36 @@ export default {
           this.$toast('经销商未填写');
           return;
         }
-        // if (
-        //   fromValue.imgSed == '' &&
-        //   fromValue.ifJzStoreType != 1 &&
-        //   this.storeTypePOP &&
-        //   fromValue.storeCategory != 'C917'
-        // ) {
-        //   this.$toast('图片未上传');
-        //   return;
-        // }
       }
       if (this.GZAttributeFormShow && fromValue.potentialCustomerType == '') {
         this.$toast('潜在客户类型未填写');
         return;
       }
+      // 同城分销建店添加去下单提示
+      if (
+        this.verifyStoreType(this.fromValue.storeCategory) &&
+        this.verifyStoreType(this.fromValue.storeCategory).type == 'fxd'
+      ) {
+        this.toastLoading().clear();
+        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) => {
-        loading1.clear();
+        this.toastLoading().clear();
         if (res.code == 200) {
           if (res.data.serverCode) {
             this.fromValue.storeCode = res.data.sfaStore.storeCode;
@@ -1855,7 +1877,7 @@ export default {
             ) {
               window.location.replace(res.data.orderUrl);
             } else {
-              that.$dialog
+              this.$dialog
                 .confirm({
                   title: '系统提示',
                   message: '建店成功,是否立即拜访?',
@@ -1876,42 +1898,42 @@ export default {
                           '/mobile/suishenbangOutstoreVisit?PointSum=0&visitModel=1&tabVal=1&hisTime=null&pageType=out&visitId=null&rdId=null&storeId=' +
                           res.data.sfaStore.storeId +
                           '&lat=' +
-                          that.fromValue.lat +
+                          this.fromValue.lat +
                           '&lon=' +
-                          that.fromValue.lon +
+                          this.fromValue.lon +
                           '&addressLine=' +
-                          that.fromValue.addressLine +
+                          this.fromValue.addressLine +
                           '&storeCategory=' +
                           res.data.sfaStore.storeCategory +
                           '&storeName=' +
-                          that.fromValue.storeName +
+                          this.fromValue.storeName +
                           '&contactName=' +
-                          that.fromValue.contactName +
+                          this.fromValue.contactName +
                           '&storeCode=' +
                           res.data.sfaStore.storeCode +
                           '&latNew=' +
-                          that.fromValue.lat +
+                          this.fromValue.lat +
                           '&lonNew=' +
-                          that.fromValue.lon +
+                          this.fromValue.lon +
                           '&marklat=' +
-                          that.mlan +
+                          this.mlan +
                           '&marklon=' +
-                          that.mlon
+                          this.mlon
                       );
                     } else {
-                      that.$dialog
+                      this.$dialog
                         .alert({
                           title: '系统提示',
                           message: response.msg,
                         })
                         .then((res) => {
-                          that.$router.go(-1);
+                          this.$router.go(-1);
                         });
                     }
                   });
                 })
                 .catch(() => {
-                  that.$router.go(-1);
+                  this.$router.go(-1);
                 });
             }
           } else {

+ 7 - 1
src/views/storeManagement/storeEdit.vue

@@ -324,8 +324,14 @@
               </p>
               <viewUploadImg :imgs="fromValue.carShopImgList"></viewUploadImg>
             </div>
+            <!-- 同城分销店提示 同城店铺 未结案时 -->
+            <div
+              v-if="fromValue.approvalStatus == 0"
+              style="font-size: 16px; font-weight: 600; padding: 10px 16px 0 16px">
+              该店首批铺货要求<span style="color: red">1000元</span>,请上传陈列照片
+            </div>
             <div v-if="fromValue.storeCategory != 'C917'">
-              <div style="padding: 20px; height: 228px; background-color: #f1f1f1">
+              <div style="padding: 0 20px 20px 20px; height: 228px; background-color: #f1f1f1">
                 <div class="displayImg">
                   <div class="displayImgBox">
                     <div v-if="storeTypePOP">