Procházet zdrojové kódy

feature_20250722_金牌店档案收集

zhujindu před 4 měsíci
rodič
revize
d797ab1f23
1 změnil soubory, kde provedl 92 přidání a 6 odebrání
  1. 92 6
      src/views/deviceWithin/addStoreVisit.vue

+ 92 - 6
src/views/deviceWithin/addStoreVisit.vue

@@ -536,6 +536,70 @@
               <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
+                        v-model="childitem.collectionOptionList[0].answerValue"
+                        :placeholder="item.text"
+                        type="tel"
+                        @blur="telFn(childitem, index)">
+                        <template #button>
+                          <van-button
+                            size="small"
+                            type="primary"
+                            @click="sendCode(childitem)"
+                            :disabled="time != null"
+                            >发送验证码<span v-if="time">({{ timeNum }})</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">
+                        {{ childitem.collectionOptionList[0].collectionOption }}
+                      </p>
+                    </div>
+                    <div v-if="childitem.answerType == 'check_code'" 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"
+                        @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">
+                        {{ childitem.collectionOptionList[0].collectionOption }}
+                      </p>
+                    </div>
                     <div v-if="childitem.answerType == 'wb'" class="formLabel z-cell">
                       <van-cell>
                         <template #title>
@@ -3533,6 +3597,22 @@ 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;
+                        } 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 == 'date') {
                         if (listchild[qq1].collectionOptionList[0].answerValue != null) {
                           listchild[qq1].answerValue =
@@ -4429,7 +4509,9 @@ 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'
                   ) {
                     formData.collectionAnswers.push({
                       collectionId: listDatas[f2].collectionId,
@@ -4496,7 +4578,9 @@ 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'
                           ) {
                             formData.collectionAnswers.push({
                               collectionId: listDatas2[f10].collectionId,
@@ -4582,7 +4666,9 @@ 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'
                                   ) {
                                     formData.collectionAnswers.push({
                                       collectionId: listc4[fc4].collectionId,
@@ -4683,7 +4769,9 @@ 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'
                                           ) {
                                             formData.collectionAnswers.push({
                                               collectionId: listc5[fc5].collectionId,
@@ -4805,7 +4893,6 @@ export default {
                 answerValue: this.tableData1[d].xdjhchjj,
               });
             }
-            debugger;
             if (dd == 2) {
               formData.collectionAnswers.push({
                 collectionId: this.tableData1[d].collectionId,
@@ -4858,7 +4945,6 @@ export default {
             telName = item.itemName + '格式错误';
           }
         });
-        debugger;
         if (!telVerify) {
           this.$toast(telName);
         } else {