瀏覽代碼

Merge branch 'feature_20250722_金牌店档案收集' into release

# Conflicts:
#	src/api/index.js
#	src/views/deviceWithin/addStoreVisit.vue
zhujindu 4 月之前
父節點
當前提交
29095823c3

+ 9 - 0
src/api/index.js

@@ -1048,3 +1048,12 @@ export function getSkuDetailById(query) {
     params: query,
   });
 }
+
+// 发送验证码并校验验证码
+export function sendAndCheckVerCode(query) {
+  return request({
+    url: '/mobile/storeGroup/sendAndCheckVerCode',
+    method: 'get',
+    params: query,
+  });
+}

+ 19 - 0
src/api/storeManagement.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request';
+
+// 根据门店编码获取档案信息接口
+export function getStoreArchives(query) {
+  return request({
+    url: 'mobile/store/getStoreArchives',
+    method: 'get',
+    params: query,
+  });
+}
+
+// 修改门店档案信息接口
+export function updateArchives(data) {
+  return request({
+    url: 'mobile/store/updateArchives',
+    method: 'post',
+    data,
+  });
+}

二進制
src/assets/close.png


二進制
src/assets/dangao.png


二進制
src/assets/hua.png


二進制
src/assets/ownerBirthdayBG.png


二進制
src/assets/送祝福按钮 粉色.png


+ 6 - 0
src/router/index.js

@@ -143,6 +143,12 @@ const router = new VueRouter({
           component: () => import('@/views/storeManagement/addDesignerEdit.vue'),
           meta: { title: '设计师招募编辑', keepAlive: true },
         },
+        {
+          path: '/JPattributeEditor',
+          name: 'JPattributeEditor',
+          component: () => import('@/views/storeManagement/JPattributeEditor.vue'),
+          meta: { title: '金牌店档案编辑', keepAlive: true },
+        },
       ],
     },
     {

+ 466 - 35
src/views/deviceWithin/addStoreVisit.vue

@@ -164,11 +164,84 @@
       </div>
     </div>
     <div
-      v-if="taskType == 1"
+      v-if="taskType == 1 || taskType == 4"
       class="container"
       style="width: 94%; margin: 0 auto; border-radius: 6px; padding: 10px 10px 10px 0">
       <van-form ref="tabstoreVal">
         <div v-for="(item, index) in collectionItemList" :key="index">
+          <div v-if="item.answerType == 'tel_send_code'" class="formLabel z-cell">
+            <van-cell>
+              <template #title>
+                <span v-if="item.isMust == 0" class="van-f-red">*</span>
+                {{ item.collectionName }}
+                <!-- 操作说明图片和电话 -->
+                <taskTips
+                  v-if="item.contactPhone || item.examplePhoto"
+                  :contactPhone="item.contactPhone"
+                  :examplePhoto="item.examplePhoto">
+                </taskTips>
+              </template>
+            </van-cell>
+            <van-field
+              class="sendCode"
+              v-model="item.answerValue"
+              :placeholder="item.text"
+              type="tel"
+              @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>
+                  <span v-else>发送验证码</span>
+                </van-button>
+              </template>
+            </van-field>
+            <p
+              style="color: #444; font-size: 12px; margin: 0; padding: 10px 0; text-align: right"
+              v-if="item.collectionOptionList[0].collectionOption">
+              {{ item.collectionOptionList[0].collectionOption }}
+            </p>
+          </div>
+          <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>
+                {{ item.collectionName }}
+              </template>
+            </van-cell>
+            <van-field
+              v-model="item.answerValue"
+              :placeholder="item.text"
+              type="number"
+              @blur="verification(item, collectionItemList)"
+              @input="numberFn(item, index, 'A')"></van-field>
+            <p
+              style="color: red; font-size: 14px; margin: 0; padding: 10px 0; text-align: right"
+              v-if="item.collectionOptionList[0].collectionOption">
+              {{ item.collectionOptionList[0].collectionOption }}
+            </p>
+          </div>
+          <div v-if="item.answerType == 'nyr'" class="formLabel z-cell">
+            <van-cell>
+              <template #title>
+                <span v-if="item.isMust == 0" class="van-f-red">*</span>
+                {{ item.collectionName }}
+              </template>
+            </van-cell>
+            <van-field
+              v-model="item.answerValue"
+              :placeholder="item.text"
+              readonly
+              @click="getNyr(item, item.answerValue)"></van-field>
+            <p
+              style="color: red; font-size: 14px; margin: 0; padding: 10px 0; text-align: right"
+              v-if="item.collectionOptionList[0].collectionOption">
+              {{ item.collectionOptionList[0].collectionOption }}
+            </p>
+          </div>
           <div v-if="item.answerType == 'sz'" class="formLabel z-cell">
             <van-cell>
               <template #title
@@ -494,6 +567,102 @@
               <div v-for="(child, indexc) in item.collectionOptionList" :key="indexc">
                 <div v-if="child.isCheck == 1">
                   <div v-for="(childitem, childIndex) in child.collectionItems" :key="childIndex">
+                    <div v-if="childitem.answerType == 'tel_send_code'" class="formLabel z-cell">
+                      <van-cell>
+                        <template #title>
+                          <span v-if="childitem.isMust == 0" class="van-f-red">*</span>
+                          {{ childitem.collectionName }}
+                          <!-- 操作说明图片和电话 -->
+                          <taskTips
+                            v-if="childitem.contactPhone || childitem.examplePhoto"
+                            :contactPhone="childitem.contactPhone"
+                            :examplePhoto="childitem.examplePhoto">
+                          </taskTips>
+                        </template>
+                      </van-cell>
+                      <van-field
+                        class="sendCode"
+                        v-model="childitem.collectionOptionList[0].answerValue"
+                        :placeholder="item.text"
+                        type="tel"
+                        @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>
+                            <span v-else>发送验证码</span>
+                          </van-button>
+                        </template>
+                      </van-field>
+                      <p
+                        style="
+                          color: #444;
+                          font-size: 12px;
+                          margin: 0;
+                          padding: 10px 0;
+                          text-align: right;
+                        "
+                        v-if="childitem.collectionOptionList[0].collectionOption"
+                        v-html="childitem.collectionOptionList[0].collectionOption"></p>
+                    </div>
+                    <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>
+                          {{ childitem.collectionName }}
+                        </template>
+                      </van-cell>
+                      <van-field
+                        v-model="childitem.collectionOptionList[0].answerValue"
+                        :placeholder="item.text"
+                        type="number"
+                        @blur="verification(childitem, child.collectionItems)"
+                        @input="numberFn(childitem, index)"></van-field>
+                      <p
+                        style="
+                          color: red;
+                          font-size: 14px;
+                          margin: 0;
+                          padding: 10px 0;
+                          text-align: right;
+                        "
+                        v-if="childitem.collectionOptionList[0].collectionOption"
+                        v-html="childitem.collectionOptionList[0].collectionOption"></p>
+                    </div>
+                    <div v-if="childitem.answerType == 'nyr'" class="formLabel z-cell">
+                      <van-cell>
+                        <template #title>
+                          <span v-if="childitem.isMust == 0" class="van-f-red">*</span>
+                          {{ childitem.collectionName }}
+                        </template>
+                      </van-cell>
+                      <van-field
+                        v-model="childitem.collectionOptionList[0].answerValue"
+                        :placeholder="childitem.text"
+                        readonly
+                        @click="
+                          getNyr(
+                            childitem.collectionOptionList[0],
+                            childitem.collectionOptionList[0].answerValue
+                          )
+                        "></van-field>
+                      <p
+                        style="
+                          color: red;
+                          font-size: 14px;
+                          margin: 0;
+                          padding: 10px 0;
+                          text-align: right;
+                        "
+                        v-if="childitem.collectionOptionList[0].collectionOption">
+                        {{ childitem.collectionOptionList[0].collectionOption }}
+                      </p>
+                    </div>
                     <div v-if="childitem.answerType == 'wb'" class="formLabel z-cell">
                       <van-cell>
                         <template #title>
@@ -581,14 +750,9 @@
                           margin: 0;
                           padding: 10px 0;
                           text-align: right;
-                        ">
-                        <van-field
-                          class="mobile-input"
-                          v-model="childitem.collectionOptionList[0].collectionOption"
-                          autosize
-                          readonly
-                          type="textarea" />
-                      </p>
+                        "
+                        v-if="childitem.collectionOptionList[0].collectionOption"
+                        v-html="childitem.collectionOptionList[0].collectionOption"></p>
                       <delete-upload-img
                         :photoIdentifyType="photoIdentifyType"
                         :imgs="childitem.fileInfoList"></delete-upload-img>
@@ -628,14 +792,9 @@
                           margin: 0;
                           padding: 10px 0;
                           text-align: right;
-                        ">
-                        <van-field
-                          class="mobile-input"
-                          v-model="childitem.collectionOptionList[0].collectionOption"
-                          autosize
-                          readonly
-                          type="textarea" />
-                      </p>
+                        "
+                        v-if="childitem.collectionOptionList[0].collectionOption"
+                        v-html="childitem.collectionOptionList[0].collectionOption"></p>
                       <delete-upload-img
                         :photoIdentifyType="photoIdentifyType"
                         :imgs="childitem.fileInfoList"></delete-upload-img>
@@ -674,14 +833,9 @@
                           margin: 0;
                           padding: 10px 0;
                           text-align: right;
-                        ">
-                        <van-field
-                          class="mobile-input"
-                          v-model="childitem.collectionOptionList[0].collectionOption"
-                          autosize
-                          readonly
-                          type="textarea" />
-                      </p>
+                        "
+                        v-if="childitem.collectionOptionList[0].collectionOption"
+                        v-html="childitem.collectionOptionList[0].collectionOption"></p>
                       <delete-upload-img
                         :photoIdentifyType="photoIdentifyType"
                         :imgs="childitem.fileInfoList"></delete-upload-img>
@@ -1418,6 +1572,47 @@
                                             :photoIdentifyType="photoIdentifyType"
                                             :imgs="child33item1.fileInfoList"></delete-upload-img>
                                         </div>
+                                        <div
+                                          v-if="child33item1.answerType == 'nyr'"
+                                          class="formLabel z-cell">
+                                          <van-cell>
+                                            <template #title>
+                                              <span
+                                                v-if="child33item1.isMust == 0"
+                                                class="van-f-red"
+                                                >*</span
+                                              >
+                                              {{ child33item1.collectionName }}
+                                            </template>
+                                          </van-cell>
+                                          <van-field
+                                            v-model="
+                                              child33item1.collectionOptionList[0].answerValue
+                                            "
+                                            :placeholder="child33item1.text"
+                                            readonly
+                                            @click="
+                                              getNyr(
+                                                child33item1.collectionOptionList[0],
+                                                child33item1.collectionOptionList[0].answerValue
+                                              )
+                                            "></van-field>
+                                          <p
+                                            style="
+                                              color: red;
+                                              font-size: 14px;
+                                              margin: 0;
+                                              padding: 10px 0;
+                                              text-align: right;
+                                            "
+                                            v-if="
+                                              child33item1.collectionOptionList[0].collectionOption
+                                            ">
+                                            {{
+                                              child33item1.collectionOptionList[0].collectionOption
+                                            }}
+                                          </p>
+                                        </div>
                                         <div
                                           v-if="child33item1.answerType == 'sz'"
                                           class="formLabel z-cell">
@@ -2054,6 +2249,51 @@
                                                         child44item1.fileInfoList
                                                       "></delete-upload-img>
                                                   </div>
+                                                  <div
+                                                    v-if="child44item1.answerType == 'nyr'"
+                                                    class="formLabel z-cell">
+                                                    <van-cell>
+                                                      <template #title>
+                                                        <span
+                                                          v-if="child44item1.isMust == 0"
+                                                          class="van-f-red"
+                                                          >*</span
+                                                        >
+                                                        {{ child44item1.collectionName }}
+                                                      </template>
+                                                    </van-cell>
+                                                    <van-field
+                                                      v-model="
+                                                        child44item1.collectionOptionList[0]
+                                                          .answerValue
+                                                      "
+                                                      :placeholder="child44item1.text"
+                                                      readonly
+                                                      @click="
+                                                        getNyr(
+                                                          child44item1.collectionOptionList[0],
+                                                          child44item1.collectionOptionList[0]
+                                                            .answerValue
+                                                        )
+                                                      "></van-field>
+                                                    <p
+                                                      style="
+                                                        color: red;
+                                                        font-size: 14px;
+                                                        margin: 0;
+                                                        padding: 10px 0;
+                                                        text-align: right;
+                                                      "
+                                                      v-if="
+                                                        child44item1.collectionOptionList[0]
+                                                          .collectionOption
+                                                      ">
+                                                      {{
+                                                        child44item1.collectionOptionList[0]
+                                                          .collectionOption
+                                                      }}
+                                                    </p>
+                                                  </div>
                                                   <div
                                                     v-if="child44item1.answerType == 'sz'"
                                                     class="formLabel z-cell">
@@ -2747,6 +2987,17 @@
         @cancel="showPicker = false"
         @confirm="onConfirm" />
     </van-popup>
+    <!-- 时间选择 -->
+    <van-popup v-model="datetimeShowPicker" position="bottom">
+      <van-datetime-picker
+        v-model="currentDate"
+        type="date"
+        title="选择年月日"
+        :min-date="minDate"
+        :max-date="maxDate"
+        @confirm="datetimeOnConfirm"
+        @cancel="datetimeShowPicker = false" />
+    </van-popup>
     <van-dialog v-model="logshow" show-cancel-button title="系统提示"> 是否保存信息? </van-dialog>
     <br />
     <br />
@@ -2781,6 +3032,7 @@ import {
   editDwellTime,
   deleteTaskAnswer,
   getCollectionShowHistory,
+  sendAndCheckVerCode,
 } from '@/api/index';
 import zRadio from '@/components/zRadio';
 import zCheckbox from '@/components/zCheckbox';
@@ -2883,6 +3135,16 @@ export default {
       inspectionType: '',
       competitortableData: [],
       isEditSDHCL: true, //是否可以编辑生动化陈列
+      time: null, //计时
+      timeNum: 60,
+      datetimeShowPicker: false,
+      activatNyrItem: '',
+      verificationPassedPhoneNum: '', //验证通过的手机号
+      verifyMobile: false, //手机号是否验证透通过
+      verifyMobileFlag: false, //手机号是否改变
+      minDate: new Date(1945, 0, 1),
+      maxDate: new Date(),
+      currentDate: new Date(1945, 0, 1),
     };
   },
   beforeRouteLeave(to, from, next) {
@@ -2920,6 +3182,9 @@ export default {
     store.dispatch('setShotsNum', 0);
     this.show = false;
     this.stillDistribute = false;
+    clearInterval(this.time);
+    this.time = null; //计时
+    this.timeNum = 60;
   },
   watch: {
     $route(to, from) {
@@ -3313,6 +3578,22 @@ 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;
+      }
+    },
     numberFn(val, index, type) {
       if (type == 'A') {
         if (!/^[+-]?\d*\.{0,1}\d{0,1}$/.test(this.collectionItemList[index].answerValue)) {
@@ -3437,14 +3718,19 @@ export default {
           this.processKey = false;
         }
         this.infoShow = res.data.isMust;
-        if (this.$route.query.taskType == 1) {
+        // 主经营者电话验证是否通过
+        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 (
               collectionItemLists[q].answerType == 'sz' ||
               collectionItemLists[q].answerType == 'wb' ||
               collectionItemLists[q].answerType == 'sm' ||
               collectionItemLists[q].answerType == 'tel' ||
-              collectionItemLists[q].answerType == 'date'
+              collectionItemLists[q].answerType == 'date' ||
+              collectionItemLists[q].answerType == 'tel_send_code' ||
+              collectionItemLists[q].answerType == 'check_code' ||
+              collectionItemLists[q].answerType == 'nyr'
             ) {
               collectionItemLists[q].answerValue =
                 collectionItemLists[q].collectionOptionList[0].answerValue;
@@ -3523,6 +3809,33 @@ export default {
                           listchild[qq1].answerValue = '';
                         }
                       }
+                      if (listchild[qq1].answerType == 'tel_send_code') {
+                        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 = '';
+                        }
+                      }
+                      if (listchild[qq1].answerType == 'check_code') {
+                        if (listchild[qq1].collectionOptionList[0].answerValue != null) {
+                          listchild[qq1].answerValue =
+                            listchild[qq1].collectionOptionList[0].answerValue;
+                        } else {
+                          listchild[qq1].answerValue = '';
+                        }
+                      }
+                      if (listchild[qq1].answerType == 'nyr') {
+                        if (listchild[qq1].collectionOptionList[0].answerValue != null) {
+                          listchild[qq1].answerValue =
+                            listchild[qq1].collectionOptionList[0].answerValue;
+                        } else {
+                          listchild[qq1].answerValue = '';
+                        }
+                      }
                       if (listchild[qq1].answerType == 'date') {
                         if (listchild[qq1].collectionOptionList[0].answerValue != null) {
                           listchild[qq1].answerValue =
@@ -4357,14 +4670,17 @@ export default {
         };
       }
 
-      if (this.$route.query.taskType == 1) {
+      if (this.$route.query.taskType == 1 || this.$route.query.taskType == 4) {
         for (var b = 0; b < this.collectionItemList.length; b++) {
           if (
             this.collectionItemList[b].answerType == 'sz' ||
             this.collectionItemList[b].answerType == 'sm' ||
             this.collectionItemList[b].answerType == 'wb' ||
             this.collectionItemList[b].answerType == 'tel' ||
-            this.collectionItemList[b].answerType == 'date'
+            this.collectionItemList[b].answerType == 'date' ||
+            this.collectionItemList[b].answerType == 'tel_send_code' ||
+            this.collectionItemList[b].answerType == 'check_code' ||
+            this.collectionItemList[b].answerType == 'nyr'
           ) {
             formData.collectionAnswers.push({
               collectionId: this.collectionItemList[b].collectionId,
@@ -4417,7 +4733,10 @@ export default {
                     listDatas[f2].answerType == 'wb' ||
                     listDatas[f2].answerType == 'sm' ||
                     listDatas[f2].answerType == 'tel' ||
-                    listDatas[f2].answerType == 'date'
+                    listDatas[f2].answerType == 'date' ||
+                    listDatas[f2].answerType == 'tel_send_code' ||
+                    listDatas[f2].answerType == 'check_code' ||
+                    listDatas[f2].answerType == 'nyr'
                   ) {
                     formData.collectionAnswers.push({
                       collectionId: listDatas[f2].collectionId,
@@ -4484,7 +4803,10 @@ export default {
                             listDatas2[f10].answerType == 'wb' ||
                             listDatas2[f10].answerType == 'sm' ||
                             listDatas2[f10].answerType == 'date' ||
-                            listDatas2[f10].answerType == 'tel'
+                            listDatas2[f10].answerType == 'tel' ||
+                            listDatas2[f10].answerType == 'tel_send_code' ||
+                            listDatas2[f10].answerType == 'check_code' ||
+                            listDatas2[f10].answerType == 'nyr'
                           ) {
                             formData.collectionAnswers.push({
                               collectionId: listDatas2[f10].collectionId,
@@ -4570,7 +4892,10 @@ export default {
                                     listc4[fc4].answerType == 'wb' ||
                                     listc4[fc4].answerType == 'sm' ||
                                     listc4[fc4].answerType == 'date' ||
-                                    listc4[fc4].answerType == 'tel'
+                                    listc4[fc4].answerType == 'tel' ||
+                                    listc4[fc4].answerType == 'tel_send_code' ||
+                                    listc4[fc4].answerType == 'check_code' ||
+                                    listc4[fc4].answerType == 'nyr'
                                   ) {
                                     formData.collectionAnswers.push({
                                       collectionId: listc4[fc4].collectionId,
@@ -4671,7 +4996,10 @@ export default {
                                             listc5[fc5].answerType == 'wb' ||
                                             listc5[fc5].answerType == 'sm' ||
                                             listc5[fc5].answerType == 'date' ||
-                                            listc5[fc5].answerType == 'tel'
+                                            listc5[fc5].answerType == 'tel' ||
+                                            listc5[fc5].answerType == 'tel_send_code' ||
+                                            listc5[fc5].answerType == 'check_code' ||
+                                            listc5[fc5].answerType == 'nyr'
                                           ) {
                                             formData.collectionAnswers.push({
                                               collectionId: listc5[fc5].collectionId,
@@ -4793,7 +5121,6 @@ export default {
                 answerValue: this.tableData1[d].xdjhchjj,
               });
             }
-            debugger;
             if (dd == 2) {
               formData.collectionAnswers.push({
                 collectionId: this.tableData1[d].collectionId,
@@ -4846,7 +5173,6 @@ export default {
             telName = item.itemName + '格式错误';
           }
         });
-        debugger;
         if (!telVerify) {
           this.$toast(telName);
         } else {
@@ -4896,9 +5222,105 @@ export default {
         return true;
       }
     },
+    // 发送验证码
+    sendCode(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 (this.time) return;
+      clearInterval(this.time);
+      this.timeNum = 60;
+      this.sendCodeFun(
+        {
+          type: '1', //String	调用类型:1:发送验证码 2:校验验证码
+          phone: answerValue, //String	手机号
+          verification: '', //String	手机号验证码
+        },
+        () => {
+          this.time = setInterval(() => {
+            this.timeNum--;
+            if (this.timeNum <= 0) {
+              clearInterval(this.time);
+              this.time = null;
+            }
+          }, 1000);
+          this.$toast('发送成功');
+        }
+      );
+    },
+    verification(item, collectionItems) {
+      let answerValue = '';
+      if (item.collectionOptionList && item.collectionOptionList.length) {
+        answerValue = item.collectionOptionList[0].answerValue;
+      } else {
+        answerValue = item.answerValue;
+      }
+      // 验证码
+      if (answerValue == '') {
+        return;
+      }
+      let telSendCode = collectionItems.find((res) => {
+        if (res.answerType == 'tel_send_code') {
+          return res;
+        }
+      });
+      // 手机号
+      let sendPhone = '';
+      if (telSendCode.collectionOptionList && telSendCode.collectionOptionList.length) {
+        sendPhone = telSendCode.collectionOptionList[0].answerValue;
+      } else {
+        sendPhone = telSendCode.answerValue;
+      }
+      if (sendPhone == '') {
+        return;
+      }
+      this.sendCodeFun(
+        {
+          type: '2', //String	调用类型:1:发送验证码 2:校验验证码
+          phone: sendPhone, //String	手机号
+          verification: answerValue, //String	手机号验证码
+        },
+        (res) => {
+          this.verificationPassedPhoneNum = sendPhone;
+          this.$toast(res.data ? '验证成功' : '验证码错误');
+        }
+      );
+    },
+    sendCodeFun(params, callback) {
+      sendAndCheckVerCode(params).then((res) => {
+        if (res.code == 200) {
+          callback && callback(res);
+        }
+      });
+    },
+    getNyr(val, date) {
+      this.activatNyrItem = val;
+      if (date && date != '') {
+        let time = date.split('-');
+        this.currentDate = new Date(time[0], Number(time[1]) - 1, time[2]);
+      } else {
+        this.currentDate = new Date(1945, 0, 1);
+      }
+      this.datetimeShowPicker = true;
+    },
+    datetimeOnConfirm(time) {
+      this.$set(this.activatNyrItem, 'answerValue', this.parseTime(time, '{y}-{m}-{d}'));
+      this.datetimeShowPicker = false;
+    },
     onClickLeft() {
       this.$router.go(-1);
     },
+    destroyed() {
+      if (this.time) clearInterval(this.time);
+    },
   },
 };
 </script>
@@ -5054,4 +5476,13 @@ export default {
     overflow: visible;
   }
 }
+.addStoreVisit {
+  .sendCode {
+    border: none !important;
+    input {
+      border: 1px solid #f1f1f1;
+      height: 35px;
+    }
+  }
+}
 </style>

+ 22 - 3
src/views/historicalVisit/hisvistdeils.vue

@@ -94,9 +94,25 @@
     <div
       class="container containert"
       style="width: 94%; margin: 0 auto; border-radius: 6px"
-      v-if="taskType == 1">
+      v-if="taskType == 1 || taskType == 4">
       <van-form ref="tabstoreVal">
         <div v-for="(item, index) in collectionItemList" :key="index">
+          <div v-if="item.answerType == 'tel_send_code'" class="formLabel z-cell z-cells">
+            <van-cell>
+              <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
+            </van-cell>
+            <div class="selesetText">
+              <p class="mg0">{{ item.answerValue }}</p>
+            </div>
+          </div>
+          <div v-if="item.answerType == 'nyr'" class="formLabel z-cell z-cells">
+            <van-cell>
+              <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
+            </van-cell>
+            <div class="selesetText">
+              <p class="mg0">{{ item.answerValue }}</p>
+            </div>
+          </div>
           <div class="formLabel z-cell z-cells" v-if="item.answerType == 'sz'">
             <van-cell>
               <template #title> {{ index + 1 }}.{{ item.collectionName }} </template>
@@ -387,13 +403,16 @@ export default {
         } else {
           this.showCode = false;
         }
-        if (this.$route.query.taskType == 1) {
+        if (this.$route.query.taskType == 1 || this.$route.query.taskType == 4) {
           for (var q = 0; q < collectionItemLists.length; q++) {
             if (
               collectionItemLists[q].answerType == 'sz' ||
               collectionItemLists[q].answerType == 'wb' ||
               collectionItemLists[q].answerType == 'tel' ||
-              collectionItemLists[q].answerType == 'date'
+              collectionItemLists[q].answerType == 'date' ||
+              collectionItemLists[q].answerType == 'tel_send_code' ||
+              collectionItemLists[q].answerType == 'check_code' ||
+              collectionItemLists[q].answerType == 'nyr'
             ) {
               collectionItemLists[q].answerValue =
                 collectionItemLists[q].collectionOptionList[0].answerValue;

+ 83 - 4
src/views/home/bottomBtn.vue

@@ -2,9 +2,10 @@
   <div class="bottomBtn">
     <div style="color: #999; font-size: 12px; margin: 0 10px">
       <!--      昨日新增的数据统一在上午9点更新.-->
-      <span v-if="reportInfoData.newUser"
-        ><van-icon name="info-o" />&nbsp;新人入职后5个工作日不用提交日报.</span
-      >
+      <span v-if="reportInfoData.newUser">
+        <van-icon name="info-o" />
+        &nbsp;新人入职后5个工作日不用提交日报.
+      </span>
     </div>
     <div class="lineGrey"></div>
     <div v-if="approvalButton && !GZdata" class="contentborder">
@@ -90,6 +91,16 @@
       >
     </div>
     <!-- <p class="updataTime" v-if="type != 4 && tabVal != '-1'">更新时间:{{ updataTime }}</p> -->
+    <div class="ownerBirthdayReminds" v-if="ownerBirthdayBoxFlag && ownerBirthdayReminds">
+      <div class="ownerBirthdayBox">
+        <div class="title"><img :src="require('@/assets/hua.png')" />金牌店生日提醒</div>
+        <div class="content">{{ this.ownerBirthdayReminds }},将在3日后生日,请及时送上生日祝福!</div>
+        <img class="dangao" :src="require('@/assets/dangao.png')" />
+      </div>
+      <div class="close" @click="ownerBirthdayBoxFlag = false">
+        <img :src="require('@/assets/close.png')" />
+      </div>
+    </div>
   </div>
 </template>
 <script>
@@ -114,6 +125,8 @@ export default {
       isCommit: null,
       updataTime: '',
       type: '-1',
+      ownerBirthdayBoxFlag: false,
+      ownerBirthdayReminds: null,
     };
   },
   activated() {
@@ -150,6 +163,11 @@ export default {
           }
           this.approvalPendingNum = res.data.approvalPendingNum;
           this.type = res.data.userType;
+          // 金牌店老板生日提醒
+          if (res.data.ownerBirthdayReminds && res.data.ownerBirthdayReminds.length) {
+            this.ownerBirthdayBoxFlag = true;
+            this.ownerBirthdayReminds = res.data.ownerBirthdayReminds.join(',');
+          }
         } else {
           this.$toast(res.msg);
         }
@@ -188,4 +206,65 @@ export default {
   },
 };
 </script>
-<style scoped lang="scss"></style>
+<style scoped lang="scss">
+.bottomBtn {
+  .ownerBirthdayReminds {
+    width: 100%;
+    height: 100%;
+    position: fixed;
+    top: 0;
+    z-index: 999999;
+    background: rgba(0, 0, 0, 0.5);
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    flex-direction: column;
+    .ownerBirthdayBox {
+      width: 90%;
+      // height: 369px;
+      background: url('../../assets/ownerBirthdayBG.png') no-repeat center center;
+      background-size: 100% 100%;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      .title {
+        text-align: center;
+        font-size: 20px;
+        color: #99443b;
+        font-weight: bold;
+        display: flex;
+        align-items: end;
+        padding-top: 40px;
+        position: relative;
+        img {
+          width: 35px;
+          height: 35px;
+          position: absolute;
+          left: -55px;
+        }
+      }
+      .content {
+        width: 80%;
+        line-height: 30px;
+        font-size: 16px;
+        color: #555555;
+        text-align: center;
+        margin-top: 20px;
+      }
+      .dangao {
+        width: 80%;
+        height: 160px;
+        margin-top: 20px;
+        margin-bottom: 35px;
+      }
+    }
+    .close {
+      img {
+        width: 35px;
+        height: 35px;
+        margin-top: 20px;
+      }
+    }
+  }
+}
+</style>

+ 1 - 1
src/views/home/index.vue

@@ -128,6 +128,7 @@ export default {
             this.tabVal = '-1';
           }
         }
+        if (this.$refs.bottomBtn) this.$refs.bottomBtn.getReportInfo();
         if (this.tabVal == '-1') {
           if (this.$refs.hintTabPage) this.$refs.hintTabPage.initData();
         } else if (this.tabVal == '0') {
@@ -135,7 +136,6 @@ export default {
         } else if (this.tabVal == '1') {
           if (this.$refs.Btarget) this.$refs.Btarget.initData();
         }
-        if (this.$refs.bottomBtn) this.$refs.bottomBtn.getReportInfo();
       });
     },
     onClickTabs(val) {

+ 330 - 0
src/views/storeManagement/JPattributeEditor.vue

@@ -0,0 +1,330 @@
+<template>
+  <div class="JPattributeEditor">
+    <van-nav-bar class="navBar" title="金牌店档案编辑" left-arrow @click-left="onClickLeft" />
+    <div class="content" v-if="detail">
+      <van-form ref="tabstoreVal">
+        <van-field
+          class="sendCode"
+          v-model="detail.ownerMobile"
+          label="主经营者电话"
+          placeholder="请输入主经营者电话"
+          @blur="sendCodeTelFn(detail.ownerMobile)"
+          type="tel">
+          <template #button v-if="!verifyMobile">
+            <van-button
+              size="small"
+              style="color: white; background: rgb(0, 87, 186); border-radius: 6px"
+              @click="sendCode(detail.ownerMobile)"
+              :disabled="time != null">
+              <span v-if="time">已发送({{ timeNum }})</span>
+              <span v-else>发送验证码</span>
+            </van-button>
+          </template>
+        </van-field>
+        <van-field
+          v-model="verificationVal"
+          label="主经营者收到的验证码"
+          placeholder="请输入验证码"
+          type="number"
+          @blur="verification(verificationVal)"
+          v-if="!verifyMobile" />
+        <van-field v-model="detail.ownerName" label="主经营者姓名" />
+        <van-field
+          v-model="detail.ownerBirthday"
+          label="主经营者出生日期"
+          placeholder="请输入主经营者出生日期"
+          @click="getNyr('ownerBirthday', detail.ownerBirthday)" />
+        <van-field autosize type="textarea" label="主营/擅长经营品类">
+          <template #input>
+            <van-checkbox-group v-model="detail.mainProductCategorys" direction="horizontal">
+              <van-checkbox
+                v-for="(item, index) in mainProductCategorys"
+                :name="item.dictValue"
+                shape="square"
+                :key="index">
+                {{ item.dictValue }}
+              </van-checkbox>
+            </van-checkbox-group>
+          </template>
+        </van-field>
+        <van-field
+          v-model="detail.totalSalesAmount"
+          type="number"
+          label="门店24年总进货额(含所有品牌品类)" />
+        <van-field v-model="detail.performanceRatio" type="number" label="立邦业绩占比(%)" />
+        <van-field v-model="detail.mainBrand" autosize type="textarea" label="主营T0P3品牌" />
+        <van-field label="紧急联系人身份">
+          <template #input>
+            <van-radio-group v-model="detail.emergencyContactRelation" direction="horizontal">
+              <van-radio
+                v-for="(item, index) in emergencyContactRelation"
+                :name="item.dictValue"
+                :key="index">
+                {{ item.dictValue }}
+              </van-radio>
+            </van-radio-group>
+          </template>
+        </van-field>
+        <van-field v-model="detail.emergencyContact" label="紧急联系人姓名" />
+        <van-field
+          v-model="detail.emergencyContactBirthday"
+          label="紧急联系人出生日期"
+          @click="getNyr('emergencyContactBirthday', detail.emergencyContactBirthday)" />
+        <van-field
+          v-model="detail.emergencyContactMobile"
+          type="number"
+          @blur="emergencyContactBlur(detail.emergencyContactMobile)"
+          label="紧急联系人电话" />
+      </van-form>
+    </div>
+    <div class="footer-btn">
+      <van-button
+        style="color: white; background: rgb(0, 87, 186); border-radius: 6px; width: 90%"
+        @click="confirmShare">
+        保 存
+      </van-button>
+    </div>
+    <!-- 时间选择 -->
+    <van-popup v-model="datetimeShowPicker" position="bottom">
+      <van-datetime-picker
+        v-model="currentDate"
+        type="date"
+        title="选择年月日"
+        :min-date="minDate"
+        :max-date="maxDate"
+        @confirm="datetimeOnConfirm"
+        @cancel="datetimeShowPicker = false" />
+    </van-popup>
+  </div>
+</template>
+
+<script>
+import { sendAndCheckVerCode, getDictOption } from '@/api/index';
+import { getStoreArchives, updateArchives } from '@/api/storeManagement';
+export default {
+  name: 'JPattributeEditor',
+  data() {
+    return {
+      detail: null,
+      time: null, //计时
+      timeNum: 60,
+      verificationVal: '',
+      datetimeShowPicker: false,
+      activatNyrItem: '',
+      checkboxGroup: [],
+      mainProductCategorys: [],
+      emergencyContactRelation: [],
+      verificationPassedPhoneNum: '', //验证通过手机号
+      minDate: new Date(1945, 0, 1),
+      maxDate: new Date(),
+      currentDate: new Date(1945, 0, 1),
+      mobileStatus: '0',
+      verifyMobile: false, //手机号是否验证透通过
+    };
+  },
+  activated() {
+    this.detail = null;
+    this.verificationVal = '';
+    if (this.time) clearInterval(this.time);
+    this.time = null; //计时
+    this.timeNum = 60;
+    this.toastLoading(0, '加载中...', true);
+    getDictOption({}, 'archives_main_product_categorys').then((res) => {
+      let mainProductCategorys = [];
+      let emergencyContactRelation = [];
+      res.data.forEach((val) => {
+        if (val.remark == 'mainProductCategorys') {
+          mainProductCategorys.push(val);
+        } else {
+          emergencyContactRelation.push(val);
+        }
+      });
+      this.mainProductCategorys = mainProductCategorys;
+      this.emergencyContactRelation = emergencyContactRelation;
+      this.getDetaild();
+    });
+  },
+  methods: {
+    getDetaild() {
+      getStoreArchives({ storeCode: this.$route.query.storeCode }).then((res) => {
+        this.toastLoading().clear();
+        if (res.code == 200) {
+          //   let copyData = JSON.parse(JSON.stringify(res.data));
+          res.data.mainProductCategorys = res.data.mainProductCategorys
+            ? res.data.mainProductCategorys.split(',')
+            : [];
+          this.detail = res.data;
+          this.mobileStatus = res.data.mobileStatus;
+          // mobileStatus 1是 是否验证通过
+          if (res.data.mobileStatus == '1') {
+            this.verificationPassedPhoneNum = this.detail.ownerMobile;
+          }
+          // 验证码和发送按钮是否显示
+          this.verifyMobile = this.mobileStatus == '0' ? false : true;
+        }
+      });
+    },
+    sendCodeTelFn(tel) {
+      if (!/^1[3456789]\d{9}$/.test(tel) || tel == '') {
+        this.$toast('格式错误');
+        return;
+      }
+      if (tel != this.verificationPassedPhoneNum) {
+        this.verifyMobile = false;
+      }
+    },
+    // 发送验证码
+    sendCode(val) {
+      if (!/^1[3456789]\d{9}$/.test(val) || val == '') {
+        this.$toast('格式错误');
+        return;
+      }
+      if (this.time) return;
+      clearInterval(this.time);
+      this.timeNum = 60;
+      this.sendCodeFun(
+        {
+          type: '1', //String	调用类型:1:发送验证码 2:校验验证码
+          phone: val, //String	手机号
+          verification: '', //String	手机号验证码
+        },
+        () => {
+          this.time = setInterval(() => {
+            this.timeNum--;
+            if (this.timeNum <= 0) {
+              clearInterval(this.time);
+              this.time = null;
+            }
+          }, 1000);
+          this.$toast('发送成功');
+        }
+      );
+    },
+    sendCodeFun(params, callback) {
+      sendAndCheckVerCode(params).then((res) => {
+        if (res.code == 200) {
+          callback && callback(res);
+        }
+      });
+    },
+    verification(val) {
+      // 验证码
+      if (val == '') {
+        return;
+      }
+      // 手机号
+      if (this.detail.ownerMobile == '') {
+        return;
+      }
+      this.sendCodeFun(
+        {
+          type: '2', //String	调用类型:1:发送验证码 2:校验验证码
+          phone: this.detail.ownerMobile, //String	手机号
+          verification: val, //String	手机号验证码
+        },
+        (res) => {
+          if (res.data) this.verificationPassedPhoneNum = this.detail.ownerMobile;
+          this.$toast(res.data ? '验证成功' : '验证码错误');
+        }
+      );
+    },
+    getNyr(val, date) {
+      this.activatNyrItem = val;
+      if (date && date != '') {
+        let time = date.split('-');
+        this.currentDate = new Date(time[0], Number(time[1]) - 1, time[2]);
+      } else {
+        this.currentDate = new Date(1945, 0, 1);
+      }
+      this.datetimeShowPicker = true;
+    },
+    datetimeOnConfirm(time) {
+      this.$set(this.detail, this.activatNyrItem, this.parseTime(time, '{y}-{m}-{d}'));
+      //   this.detail.ownerBirthday = this.parseTime(time, '{y}-{m}-{d}');
+      this.datetimeShowPicker = false;
+    },
+    // 保存
+    confirmShare() {
+      if (
+        this.verificationPassedPhoneNum == '' ||
+        this.detail.ownerMobile != this.verificationPassedPhoneNum
+      ) {
+        this.$toast('请验证手机号');
+        return;
+      }
+      if (this.detail.emergencyContactMobile != '') {
+        if (!/^1[3456789]\d{9}$/.test(this.detail.emergencyContactMobile)) {
+          this.$toast('紧急联系人电话格式错误');
+          return;
+        }
+      }
+      this.toastLoading(0, '加载中...', true);
+      let params = JSON.parse(JSON.stringify(this.detail));
+      params.mainProductCategorys = params.mainProductCategorys.join(',');
+      params.storeCode = this.$route.query.storeCode;
+      updateArchives(params).then((res) => {
+        this.toastLoading().clear();
+        if (res.code == 200) {
+          this.$toast(res.msg);
+          this.$router.go(-1);
+        } else {
+          this.$toast(res.msg);
+        }
+      });
+    },
+    emergencyContactBlur(val) {
+      if (!/^1[3456789]\d{9}$/.test(val)) {
+        this.$toast('紧急联系人电话格式错误');
+      }
+    },
+    onClickLeft() {
+      this.$router.go(-1);
+    },
+  },
+};
+</script>
+
+<style lang="scss">
+.JPattributeEditor {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  overflow: hidden;
+  .content {
+    flex: 1;
+    overflow-y: auto;
+    background: #fff;
+    padding: 10px 15px;
+    margin-top: 10px;
+    background: #fff;
+    .van-cell {
+      padding: 10px 0;
+      border-bottom: 1px solid #ccc;
+    }
+    .van-field__label {
+      width: 9em;
+    }
+    .sendCode {
+      border: none !important;
+      input {
+        border: 1px solid #f1f1f1;
+        height: 35px;
+      }
+    }
+    .van-checkbox--horizontal {
+      margin-bottom: 10px;
+      width: 100%;
+    }
+    .van-radio--horizontal {
+      margin-bottom: 10px;
+    }
+  }
+  .footer-btn {
+    display: flex;
+    justify-content: space-around;
+    padding: 10px 0;
+  }
+}
+</style>

+ 75 - 1
src/views/storeManagement/storeDetail.vue

@@ -8,6 +8,13 @@
             <span style="color: #0057ba" @click="chainMaintain">维护经销商</span>
           </template>
           <template v-else>
+            <!-- 金牌店 编辑属性信息 当前门店是否是我覆盖的:myCover -->
+            <!-- <template> -->
+            <template v-if="list.myCover && list.storeCode">
+              <span style="color: #0057ba" v-if="type != 'address'" @click="attributeEditor">
+                编辑
+              </span>
+            </template>
             <!-- updatable 当前操作人是否可以编辑 -->
             <template v-if="list.updatable">
               <!-- 未结案状态下 -->
@@ -326,7 +333,56 @@
           </van-collapse>
         </van-tab>
         <van-tab title="属性信息" name="outsidePlan">
-          <template v-for="(item, index) in TCFXList" v-if="dictTypeFormShow">
+          <!-- 金牌店档案信息 -->
+          <template v-if="list.ifJpStoreType && list.storeArchives">
+            <div class="JpStore">
+              <van-field readonly v-model="list.storeArchives.ownerMobile" label="主经营者电话" />
+              <van-field readonly v-model="list.storeArchives.ownerName" label="主经营者姓名" />
+              <van-field
+                readonly
+                v-model="list.storeArchives.ownerBirthday"
+                label="主经营者出生日期" />
+              <van-field
+                readonly
+                autosize
+                type="textarea"
+                v-model="list.storeArchives.mainProductCategorys"
+                label="主营/擅长经营品类" />
+              <van-field
+                readonly
+                autosize
+                type="textarea"
+                v-model="list.storeArchives.totalSalesAmount"
+                label="门店24年总进货额(含所有品牌品类)" />
+              <van-field
+                readonly
+                v-model="list.storeArchives.performanceRatio"
+                label="立邦业绩占比(%)" />
+              <van-field
+                readonly
+                autosize
+                type="textarea"
+                v-model="list.storeArchives.mainBrand"
+                label="主营T0P3品牌" />
+              <van-field
+                readonly
+                v-model="list.storeArchives.emergencyContactRelation"
+                label="紧急联系人身份" />
+              <van-field
+                readonly
+                v-model="list.storeArchives.emergencyContact"
+                label="紧急联系人姓名" />
+              <van-field
+                readonly
+                v-model="list.storeArchives.emergencyContactBirthday"
+                label="紧急联系人出生日期" />
+              <van-field
+                readonly
+                v-model="list.storeArchives.emergencyContactMobile"
+                label="紧急联系人电话" />
+            </div>
+          </template>
+          <template v-for="(item, index) in TCFXList" v-if="dictTypeFormShow" v-else>
             <van-field
               readonly
               label="属性"
@@ -1625,6 +1681,13 @@ export default {
         query: { id: this.$route.query.id },
       });
     },
+    // 金牌店属性编辑
+    attributeEditor() {
+      this.$router.push({
+        path: '/JPattributeEditor',
+        query: { storeCode: this.list.storeCode },
+      });
+    },
   },
 };
 </script>
@@ -1858,5 +1921,16 @@ export default {
       }
     }
   }
+  .JpStore {
+    padding: 0 16px;
+    background: #fff;
+    .van-cell {
+      padding: 10px 0;
+      border-bottom: 1px solid #ccc;
+    }
+    .van-field__label {
+      width: 9em;
+    }
+  }
 }
 </style>