mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-20 21:16:43 +08:00
Merge branch 'feature/GFRS-615【待确定】问卷' into dev
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 905 B |
Binary file not shown.
|
Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 2.6 KiB |
@@ -30,7 +30,7 @@
|
|||||||
<div v-else-if="!item.options">
|
<div v-else-if="!item.options">
|
||||||
<van-col span="24">
|
<van-col span="24">
|
||||||
<van-field v-if="item.orderCode == '7'" :label="item.title" maxlength="11" input-align="right" v-model="anwerJson[item.orderCode]" />
|
<van-field v-if="item.orderCode == '7'" :label="item.title" maxlength="11" input-align="right" v-model="anwerJson[item.orderCode]" />
|
||||||
<van-field v-if="item.orderCode == '6'" :label="item.title" maxlength="4" input-align="right" v-model="anwerJson[item.orderCode]" />
|
<van-field v-if="item.orderCode == '6'" :label="item.title" input-align="right" v-model="anwerJson[item.orderCode]" />
|
||||||
<van-field v-if="item.orderCode == '8'" :label="item.title" maxlength="3" input-align="right" v-model="anwerJson[item.orderCode]" />
|
<van-field v-if="item.orderCode == '8'" :label="item.title" maxlength="3" input-align="right" v-model="anwerJson[item.orderCode]" />
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="24" class="pl10 pr10 bg-white" style="height:2px;"><div style="width: 100%;height: 100%;background-color: #f5f5f5;"></div></van-col>
|
<van-col span="24" class="pl10 pr10 bg-white" style="height:2px;"><div style="width: 100%;height: 100%;background-color: #f5f5f5;"></div></van-col>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<img src="@/assets/images/sharePeople.png" />
|
<img src="@/assets/images/sharePeople.png" />
|
||||||
<div>{{ agentInfo.name }}</div>
|
<div>{{ agentInfo.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="fix_bottom_sub">
|
<div class="fix_bottom_sub" @click="callPhone">
|
||||||
<img src="@/assets/images/sharePhone.png" />
|
<img src="@/assets/images/sharePhone.png" />
|
||||||
<div>{{ agentInfo.mobile }}</div>
|
<div>{{ agentInfo.mobile }}</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -64,6 +64,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { Field, CellGroup, Popup, Picker, List, Cell, Row, Col, RadioGroup, Radio, Button } from 'vant'
|
import { Field, CellGroup, Popup, Picker, List, Cell, Row, Col, RadioGroup, Radio, Button } from 'vant'
|
||||||
import { getSurveyQuestion, saveSurveyAnswer, getSurveyAgentInfo } from '@/api/ebiz/survey/survey'
|
import { getSurveyQuestion, saveSurveyAnswer, getSurveyAgentInfo } from '@/api/ebiz/survey/survey'
|
||||||
|
import { weixinShare } from '@/assets/js/utils/wxShare.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -105,14 +106,20 @@ export default {
|
|||||||
name: null,
|
name: null,
|
||||||
mobile: null
|
mobile: null
|
||||||
},
|
},
|
||||||
userModel: {
|
agentCode: null,
|
||||||
id: null
|
agentName: null
|
||||||
}
|
|
||||||
},
|
},
|
||||||
tableId: null
|
tableId: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
// 微信分享设置
|
||||||
|
weixinShare({
|
||||||
|
title: '国富送爱心',
|
||||||
|
imgUrl: this.$assetsUrl + 'images/logo.png',
|
||||||
|
desc: '“共同抗击新冠,国富免费送爱心”'
|
||||||
|
})
|
||||||
|
// 页面初始化
|
||||||
let tableId = this.getQueryString('code')
|
let tableId = this.getQueryString('code')
|
||||||
if (!tableId) {
|
if (!tableId) {
|
||||||
this.$toast('链接异常,请代理人重新分享')
|
this.$toast('链接异常,请代理人重新分享')
|
||||||
@@ -169,14 +176,22 @@ export default {
|
|||||||
if (!returnFlag) {
|
if (!returnFlag) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 手机号格式错误校验
|
||||||
if (!/1\d{10}/.test(that.anwerJson['7'])) {
|
if (!/1\d{10}/.test(that.anwerJson['7'])) {
|
||||||
that.$toast('手机号格式错误')
|
that.$toast('手机号格式错误')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 年龄格式校验
|
||||||
|
if (!/^[1-9]\d{0,2}$/.test(that.anwerJson['8'])) {
|
||||||
|
that.$toast('年龄格式错误')
|
||||||
|
return
|
||||||
}
|
}
|
||||||
// 初始化请求数据
|
// 初始化请求数据
|
||||||
that.surveyAnswerReqDTO.customerInfo.name = that.anwerJson['7']
|
that.surveyAnswerReqDTO.customerInfo.name = that.anwerJson['6']
|
||||||
that.surveyAnswerReqDTO.customerInfo.mobile = that.anwerJson['8']
|
that.surveyAnswerReqDTO.customerInfo.mobile = that.anwerJson['7']
|
||||||
that.surveyAnswerReqDTO.answer = JSON.stringify(this.anwerJson)
|
that.surveyAnswerReqDTO.answer = JSON.stringify(this.anwerJson)
|
||||||
that.surveyAnswerReqDTO.userModel.id = that.agentInfo.agentCode
|
that.surveyAnswerReqDTO.agentCode = that.agentInfo.agentCode
|
||||||
|
that.surveyAnswerReqDTO.agentName = that.agentInfo.name
|
||||||
that.surveyAnswerReqDTO.tableId = that.tableId
|
that.surveyAnswerReqDTO.tableId = that.tableId
|
||||||
saveSurveyAnswer(that.surveyAnswerReqDTO).then(res => {
|
saveSurveyAnswer(that.surveyAnswerReqDTO).then(res => {
|
||||||
if (res.result == '0') {
|
if (res.result == '0') {
|
||||||
@@ -198,6 +213,13 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return theRequest[name]
|
return theRequest[name]
|
||||||
|
},
|
||||||
|
callPhone() {
|
||||||
|
let that = this
|
||||||
|
EWebBridge.webCallAppInJs('callSystem', {
|
||||||
|
system: 'tel', //tel: 打电话,sms: 发短信
|
||||||
|
number: that.agentInfo.mobile
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
name="问卷状态"
|
name="问卷状态"
|
||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
input-align="right"
|
input-align="right"
|
||||||
|
readonly
|
||||||
@click="toSelect('0')"
|
@click="toSelect('0')"
|
||||||
/>
|
/>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
@@ -86,7 +87,7 @@ export default {
|
|||||||
filters: {
|
filters: {
|
||||||
submitStatusFormat(status) {
|
submitStatusFormat(status) {
|
||||||
let text
|
let text
|
||||||
switch (status) {
|
switch (status + '') {
|
||||||
case '1':
|
case '1':
|
||||||
text = '已提交'
|
text = '已提交'
|
||||||
break
|
break
|
||||||
@@ -129,6 +130,11 @@ export default {
|
|||||||
},
|
},
|
||||||
// 页面跳转
|
// 页面跳转
|
||||||
getItemDetail(item) {
|
getItemDetail(item) {
|
||||||
|
let that = this
|
||||||
|
if (item.isSubmit + '' == '0') {
|
||||||
|
that.$toast('抱歉,系统不支持查看该状态的问卷信息!')
|
||||||
|
return
|
||||||
|
}
|
||||||
window.localStorage.setItem('surveyTableId', item.tableId)
|
window.localStorage.setItem('surveyTableId', item.tableId)
|
||||||
this.$jump({
|
this.$jump({
|
||||||
flag: 'h5',
|
flag: 'h5',
|
||||||
@@ -180,8 +186,8 @@ export default {
|
|||||||
EWebBridge.webCallAppInJs('bridge', {
|
EWebBridge.webCallAppInJs('bridge', {
|
||||||
flag: 'share',
|
flag: 'share',
|
||||||
extra: {
|
extra: {
|
||||||
title: `国富免费送父母健康体检`,
|
title: `国富送爱心`,
|
||||||
content: '“共同抗击新冠,国富免费送父母健康体检”',
|
content: '“共同抗击新冠,国富免费送爱心”',
|
||||||
url: location.origin + '/#/survey/ShareCover?code=' + this.tableId,
|
url: location.origin + '/#/survey/ShareCover?code=' + this.tableId,
|
||||||
img: this.$assetsUrl + 'images/logo.png'
|
img: this.$assetsUrl + 'images/logo.png'
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user