GFRS-615 问卷调查VUE代码修改3 --提交人:阳华祥

This commit is contained in:
阳华祥
2020-02-24 17:24:45 +08:00
parent 01db29aa9e
commit 62d76c9265
4 changed files with 39 additions and 21 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1002 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 KiB

View File

@@ -42,7 +42,7 @@
</div>
<!--提交结果页-->
<div v-if="showType == 'Result'" class="mt30 mr2 ml2">
<img style="width: 100%;" src="@/assets/images/shareSurveyResult.png" />
<img style="width: 100%;" :src="resultImgUrl" />
<div class="mt30 mr2 ml2">
<van-button type="danger" style="width: 100%;" @click="showType = 'Detail'">返回</van-button>
</div>
@@ -53,7 +53,7 @@
<img src="@/assets/images/sharePeople.png" />
<div>{{ agentInfo.name }}</div>
</div>
<div class="fix_bottom_sub" @click="callPhone">
<div class="fix_bottom_sub">
<img src="@/assets/images/sharePhone.png" />
<div>{{ agentInfo.mobile }}</div>
</div>
@@ -82,6 +82,7 @@ export default {
},
data() {
return {
resultImgUrl: '',
enterFlag: true,
anwerJson: {},
showType: 'Cover', //false 显示封面 true显示提交表格
@@ -196,6 +197,11 @@ export default {
saveSurveyAnswer(that.surveyAnswerReqDTO).then(res => {
if (res.result == '0') {
//跳转结果页面
if (res.content + '' == 'PHYSICAL') {
that.resultImgUrl = '@/assets/images/shareSurveyResult.png' //雨伞
} else {
that.resultImgUrl = '@/assets/images/shareSurveyResult_1.png' // 体检
}
that.showType = 'Result'
} else {
that.$toast(res.resultMessage)
@@ -213,13 +219,6 @@ export default {
}
}
return theRequest[name]
},
callPhone() {
let that = this
EWebBridge.webCallAppInJs('callSystem', {
system: 'tel', //tel: 打电话sms: 发短信
number: that.agentInfo.mobile
})
}
}
}

View File

@@ -13,25 +13,29 @@
/>
</van-cell-group>
<van-row class="row-tes bg-white" style="margin-top: 0.1em;" type="flex" justify="center">
<van-col span="4" class="text-center red">状态</van-col>
<van-col span="7" class="text-center red">问卷状态</van-col>
<van-col span="7" class="text-center red">分享时间</van-col>
<van-col span="6" class="text-center red">客户姓名</van-col>
<van-row class="row-tes bg-white" style="margin-top: 0.5em;" type="flex" justify="center">
<van-col span="3" class="text-center red">状态</van-col>
<van-col span="5" class="text-center red">问卷状态</van-col>
<van-col span="6" class="text-center red">分享时间</van-col>
<van-col span="5" class="text-center red">客户姓名</van-col>
<van-col span="5" class="text-center red">奖品内容</van-col>
</van-row>
<van-list class="bg-white" style="margin-top: 0.5em;" v-model="surveyShow.loading" :finished="surveyShow.finished" finished-text="没有更多了">
<van-list class="bg-white" v-model="surveyShow.loading" :finished="surveyShow.finished">
<van-row class="row-tes x-large" type="flex" justify="center" v-for="(item, index) in surveyShow.list" :key="index" @click="getItemDetail(item, index)">
<van-col span="4" class="text-center">{{ index + 1 }}</van-col>
<van-col span="7" class="text-center">{{ item.isSubmit | submitStatusFormat }}</van-col>
<van-col span="7" class="text-center">{{ item.shareTime | shareDateFormat }}</van-col>
<van-col span="6" class="text-center">{{ item.customerName ? item.customerName : '---' }}</van-col>
<van-col span="3" class="text-center">{{ index + 1 }}</van-col>
<van-col span="5" class="text-center">{{ item.isSubmit | submitStatusFormat }}</van-col>
<van-col span="6" class="text-center">{{ item.shareTime | shareDateFormat }}</van-col>
<van-col span="5" class="text-center">{{ item.customerName ? item.customerName : '---' }}</van-col>
<van-col span="5" class="text-center">{{ item.prizeCode | prizeCodeFormat }}</van-col>
</van-row>
</van-list>
<div style="width: 100%;margin-bottom: 80px;background-color: #f5f5f5;height: 1px;"></div>
<!-- 问卷状态-->
<van-popup v-model="popupShow" position="bottom">
<van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="popupShow = false" />
</van-popup>
<div style="position: fixed;left: 0;bottom: 0;width: 100%;">
<div class="pb10 pt10 pl10" style="font-size: 14px;background-color: #f5f5f5;">:本次收集的信息可在客户管理模块查看</div>
<van-button type="danger" style="width: 100%;" size="large" @click="shareFriends" v-if="!isWeixin">分享给客户</van-button>
</div>
</div>
@@ -99,6 +103,21 @@ export default {
},
shareDateFormat(dateStr) {
return dateStr.substr(0, 10)
},
prizeCodeFormat(prizeCode) {
let text = '---'
if (!prizeCode) {
return text
}
switch (prizeCode + '') {
case 'UMBRELLA':
text = '已提交'
break
case 'PHYSICAL':
text = '未提交'
break
}
return text
}
},
created() {
@@ -198,8 +217,8 @@ export default {
that.saveSurveyShareReqDTO.shareTime = dateUtils.formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss')
that.saveSurveyShareReqDTO.tableId = that.tableId
saveSurveyShareDate(that.saveSurveyShareReqDTO).then(res => {
if (res.result == '0') {
that.surveyShow.list = res.content
// eslint-disable-next-line no-empty
if (res.result != '0') {
} else {
that.$toast(res.resultMessage)
}