|
|
@@ -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>
|