Browse Source

Merge branch 'feature_20250722_金牌店档案收集' into uat(dev)

# Conflicts:
#	src/views/home/index.vue
zhujindu 4 months ago
parent
commit
7c272eb9b7

BIN
src/assets/hua.png


BIN
src/assets/ownerBirthdayBG.png


BIN
src/assets/送祝福按钮 粉色.png


+ 44 - 13
src/views/deviceWithin/addStoreVisit.vue

@@ -187,14 +187,15 @@
               v-model="item.answerValue"
               :placeholder="item.text"
               type="tel"
-              @blur="telFn(item, index, 'A')">
-              <template #button>
+              @blur="sendCodeTelFn(item, index, 'A')">
+              <template #button v-if="!verifyMobile">
                 <van-button
                   size="small"
                   style="color: white; background: rgb(0, 87, 186); border-radius: 6px"
                   @click="sendCode(item, index)"
-                  :disabled="time != null"
-                  >发送验证码<span v-if="time">({{ timeNum }})</span>
+                  :disabled="time != null">
+                  <span v-if="time">已发送({{ timeNum }})</span>
+                  <span v-else>发送验证码</span>
                 </van-button>
               </template>
             </van-field>
@@ -204,7 +205,7 @@
               {{ item.collectionOptionList[0].collectionOption }}
             </p>
           </div>
-          <div v-if="item.answerType == 'check_code'" class="formLabel z-cell">
+          <div v-if="item.answerType == 'check_code' && !verifyMobile" class="formLabel z-cell">
             <van-cell>
               <template #title>
                 <span v-if="item.isMust == 0" class="van-f-red">*</span>
@@ -584,14 +585,15 @@
                         v-model="childitem.collectionOptionList[0].answerValue"
                         :placeholder="item.text"
                         type="tel"
-                        @blur="telFn(childitem, index)">
-                        <template #button>
+                        @blur="sendCodeTelFn(childitem, index)">
+                        <template #button v-if="!verifyMobile">
                           <van-button
                             size="small"
                             style="color: white; background: rgb(0, 87, 186); border-radius: 6px"
                             @click="sendCode(childitem, index)"
-                            :disabled="time != null"
-                            >发送验证码<span v-if="time">({{ timeNum }})</span>
+                            :disabled="time != null">
+                            <span v-if="time">已发送({{ timeNum }})</span>
+                            <span v-else>发送验证码</span>
                           </van-button>
                         </template>
                       </van-field>
@@ -607,7 +609,9 @@
                         {{ childitem.collectionOptionList[0].collectionOption }}
                       </p>
                     </div>
-                    <div v-if="childitem.answerType == 'check_code'" class="formLabel z-cell">
+                    <div
+                      v-if="childitem.answerType == 'check_code' && !verifyMobile"
+                      class="formLabel z-cell">
                       <van-cell>
                         <template #title>
                           <span v-if="childitem.isMust == 0" class="van-f-red">*</span>
@@ -3033,9 +3037,12 @@ export default {
       competitortableData: [],
       isEditSDHCL: true, //是否可以编辑生动化陈列
       time: null, //计时
-      timeNum: 30,
+      timeNum: 60,
       datetimeShowPicker: false,
       activatNyrItem: '',
+      verificationPassedPhoneNum: '', //验证通过的手机号
+      verifyMobile: false, //手机号是否验证透通过
+      verifyMobileFlag: false, //手机号是否改变
     };
   },
   beforeRouteLeave(to, from, next) {
@@ -3075,7 +3082,7 @@ export default {
     this.stillDistribute = false;
     clearInterval(this.time);
     this.time = null; //计时
-    this.timeNum = 30;
+    this.timeNum = 60;
   },
   watch: {
     $route(to, from) {
@@ -3469,6 +3476,24 @@ export default {
         this.$toast(val.collectionName + '格式错误');
       }
     },
+    sendCodeTelFn(val) {
+      let answerValue = '';
+      if (val.collectionOptionList && val.collectionOptionList.length) {
+        answerValue = val.collectionOptionList[0].answerValue;
+      } else {
+        answerValue = val.answerValue;
+      }
+
+      if (!/^1[3456789]\d{9}$/.test(answerValue) || answerValue == '') {
+        this.$toast(val.collectionName + '格式错误');
+        return;
+      }
+      if (answerValue != this.verificationPassedPhoneNum) {
+        this.verifyMobile = false;
+      } else {
+        this.verifyMobile = true;
+      }
+    },
     numberFn(val, index, type) {
       if (type == 'A') {
         if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.collectionItemList[index].answerValue)) {
@@ -3592,6 +3617,8 @@ export default {
           this.processKey = false;
         }
         this.infoShow = res.data.isMust;
+        // 主经营者电话验证是否通过
+        this.verifyMobile = res.data.verifyMobile;
         if (this.$route.query.taskType == 1 || this.$route.query.taskType == 4) {
           for (var q = 0; q < collectionItemLists.length; q++) {
             if (
@@ -3685,6 +3712,9 @@ export default {
                         if (listchild[qq1].collectionOptionList[0].answerValue != null) {
                           listchild[qq1].answerValue =
                             listchild[qq1].collectionOptionList[0].answerValue;
+                          this.verificationPassedPhoneNum =
+                            listchild[qq1].collectionOptionList[0].answerValue;
+                          console.log(this.verificationPassedPhoneNum);
                         } else {
                           listchild[qq1].answerValue = '';
                         }
@@ -5106,7 +5136,7 @@ export default {
       }
       if (this.time) return;
       clearInterval(this.time);
-      this.timeNum = 30;
+      this.timeNum = 60;
       this.sendCodeFun(
         {
           type: '1', //String	调用类型:1:发送验证码 2:校验验证码
@@ -5158,6 +5188,7 @@ export default {
           verification: answerValue, //String	手机号验证码
         },
         (res) => {
+          this.verificationPassedPhoneNum = sendPhone;
           this.$toast(res.data ? '验证成功' : '验证码错误');
         }
       );

+ 17 - 13
src/views/home/bottomBtn.vue

@@ -93,13 +93,11 @@
     <!-- <p class="updataTime" v-if="type != 4 && tabVal != '-1'">更新时间:{{ updataTime }}</p> -->
     <div class="ownerBirthdayRemind" v-if="ownerBirthdayBoxFlag">
       <div class="ownerBirthdayBox">
-        <div class="title">金牌店生日提醒</div>
+        <div class="title"><img :src="require('@/assets/hua.png')" />金牌店生日提醒</div>
         <div class="content">
-          请及时送上生日祝福!{{
-            this.reportInfoData.ownerBirthdayRemind
-          }}将在3日后生日,请及时送上生日祝福!
+          {{ this.reportInfoData.ownerBirthdayRemind }}将在3日后生日,请及时送上生日祝福!
         </div>
-        <img :src="require('@/assets/dangao.png')" />
+        <img class="dangao" :src="require('@/assets/dangao.png')" />
       </div>
       <div class="close" @click="ownerBirthdayBoxFlag = false">
         <img :src="require('@/assets/close.png')" />
@@ -167,7 +165,7 @@ export default {
           this.approvalPendingNum = res.data.approvalPendingNum;
           this.type = res.data.userType;
           // 金牌店老板生日提醒
-          if (res.data.ownerBirthdayRemind) {
+          if (res.data.ownerBirthdayRemind && res.data.ownerBirthdayRemind.length) {
             this.ownerBirthdayBoxFlag = true;
             this.reportInfoData.ownerBirthdayRemind = res.data.ownerBirthdayRemind.join(',');
           } else {
@@ -237,32 +235,38 @@ export default {
         text-align: center;
         font-size: 20px;
         color: #99443b;
-        // margin-top: 30px;
         font-weight: bold;
-        height: 68px;
         display: flex;
         align-items: end;
+        padding-top: 40px;
+        position: relative;
+        img {
+          width: 35px;
+          height: 35px;
+          position: absolute;
+          left: -55px;
+        }
       }
       .content {
-        width: 75%;
+        width: 80%;
         line-height: 30px;
         font-size: 16px;
         color: #555555;
         text-align: center;
         margin-top: 20px;
       }
-      img {
-        width: 75%;
+      .dangao {
+        width: 80%;
         height: 160px;
         margin-top: 20px;
-        margin-bottom: 30px;
+        margin-bottom: 35px;
       }
     }
     .close {
       img {
         width: 35px;
         height: 35px;
-        margin-top: 10px;
+        margin-top: 20px;
       }
     }
   }

+ 6 - 5
src/views/home/index.vue

@@ -132,6 +132,12 @@ export default {
             this.tabVal = '-1';
           }
         }
+        if (this.$refs.bottomBtn) {
+          this.$refs.bottomBtn.getReportInfo(() => {
+            // 用户类型(默认0):0=DIY员工;1=DIY经销商-分销人员;2=YSL;3=DIY经销商-倍增和先锋;4=DIY经销商-老板;经销商多身份时:1,4
+            this.userType = localStorage.getItem('uType');
+          });
+        }
         if (this.tabVal == '-1') {
           if (this.$refs.hintTabPage) this.$refs.hintTabPage.initData();
         } else if (this.tabVal == '0') {
@@ -139,11 +145,6 @@ export default {
         } else if (this.tabVal == '1') {
           if (this.$refs.Btarget) this.$refs.Btarget.initData();
         }
-        if (this.$refs.bottomBtn)
-          this.$refs.bottomBtn.getReportInfo(() => {
-            // 用户类型(默认0):0=DIY员工;1=DIY经销商-分销人员;2=YSL;3=DIY经销商-倍增和先锋;4=DIY经销商-老板;经销商多身份时:1,4
-            this.userType = localStorage.getItem('uType');
-          });
       });
     },
     onClickTabs(val) {

+ 18 - 2
src/views/storeManagement/JPattributeEditor.vue

@@ -49,7 +49,7 @@
           autosize
           type="textarea"
           label="门店24年总销量(以进货额计)" />
-        <van-field v-model="detail.performanceRatio" label="立邦业绩占比(%)" />
+        <van-field v-model="detail.performanceRatio" type="number" label="立邦业绩占比(%)" />
         <van-field v-model="detail.mainBrand" autosize type="textarea" label="主营T0P3品牌" />
 
         <van-field v-model="detail.emergencyContact" label="紧急联系人姓名" />
@@ -57,7 +57,11 @@
           v-model="detail.emergencyContactBirthday"
           label="紧急联系人出生日期"
           @click="getNyr('emergencyContactBirthday')" />
-        <van-field v-model="detail.emergencyContactMobile" label="紧急联系人电话" />
+        <van-field
+          v-model="detail.emergencyContactMobile"
+          type="number"
+          @blur="emergencyContactBlur(detail.emergencyContactMobile)"
+          label="紧急联系人电话" />
         <van-field label="紧急联系人身份">
           <template #input>
             <van-radio-group v-model="detail.emergencyContactRelation" direction="horizontal">
@@ -213,6 +217,13 @@ export default {
         this.$toast('请验证手机号');
         return;
       }
+      if (
+        !/^1[3456789]\d{9}$/.test(this.detail.emergencyContactMobile) ||
+        this.detail.emergencyContactMobile == ''
+      ) {
+        this.$toast('紧急联系人电话格式错误');
+        return;
+      }
       this.toastLoading(0, '加载中...', true);
       let params = JSON.parse(JSON.stringify(this.detail));
       params.mainProductCategorys = params.mainProductCategorys.join(',');
@@ -226,6 +237,11 @@ export default {
         }
       });
     },
+    emergencyContactBlur(val) {
+      if (!/^1[3456789]\d{9}$/.test(val) || val == '') {
+        this.$toast('格式错误');
+      }
+    },
     onClickLeft() {
       this.$router.go(-1);
     },