master
lion 3 years ago
parent 861f12bf1e
commit f85d4b9528

@ -1,4 +1,6 @@
<template>
<page-meta :page-style="'overflow:'+(callshow?'hidden':'visible')"></page-meta>
<view class="containers">
<view class="top">
<view class="toplogo justify-between align-center">
@ -27,7 +29,8 @@
<view class="mine">
<view class="mineicon justify-between align-center">
<view v-for="item in iconList">
<u--image @click="toUrl(item.url)" :src="item.src" width="145rpx" height="149rpx"></u--image>
<u--image @click="toUrl(item.isyy,item.url)" :src="item.src" width="145rpx" height="149rpx">
</u--image>
<view class="icontext">{{item.text}}</view>
</view>
</view>
@ -73,6 +76,18 @@
</view>
</view>
</view>
<!-- 弹出选择 访客类型 -->
<u-popup :show="callshow" mode="center" @close="callshow=false">
<view class="popupVisit">
<view>请选择邀约访客类型</view>
<view class="justify-between">
<button @click="toForm(1)">访</button>
<button @click="toForm(2)">访</button>
<button @click="toForm(3)"></button>
</view>
</view>
</u-popup>
</view>
</template>
@ -98,12 +113,13 @@
{
src: require("../../static/img/yy.png"),
text: '邀约',
url: "/pages/bd/call"
url: "/pages/bd/call",
isyy: true
},
{
src: require("../../static/img/dyyjl.png"),
text: '代邀约记录',
url: "/pages/bd/replace"
url: "/pages/bd/record?type=call"
}
],
list: [],
@ -114,7 +130,8 @@
audit_status: 0,
keyword: ""
},
isEmpty: false
isEmpty: false,
callshow: false
}
},
onLoad() {
@ -143,11 +160,21 @@
}
},
methods: {
toUrl(url) {
toForm(type){
uni.navigateTo({
url: url
url:"/pages/visit/addrecord?iscall=call&type="+type
})
},
toUrl(isyy, url) {
if (isyy) {
this.callshow = true
} else {
uni.navigateTo({
url: url
})
}
},
toDetail(id) {
uni.navigateTo({
url: '/pages/bd/bddetail?id=' + id
@ -286,4 +313,21 @@
/deep/ .u-empty {
min-height: 30vh;
}
/deep/ .u-popup__content {
width: 80%;
background: #fff;
padding: 47rpx;
text-align: center;
}
.popupVisit>view:first-child{
margin-bottom:20rpx
}
.popupVisit>view button{
padding: 0 20rpx;
background-color: #044ed7;
color:#fff
}
</style>

@ -111,7 +111,7 @@
</uni-data-select>
</uni-forms-item>
</uni-forms>
<button type="primary" style="background-color: #044ed7;" @click="saveFormgoStudy"></button>
<button type="primary" style="background-color: #044ed7;" @click="saveFormgoStudy">{{goStudy}}</button>
<!-- 随访人员弹出 -->
@ -233,12 +233,17 @@
id: 1,
value: '是'
}],
adminList: []
adminList: [],
isCall:'',
goStudy:'去学习'
}
},
onLoad(options) {
this.form.type = options.type
this.isCall = options.iscall
this.goStudy = this.isCall=='call'?'提交':'去学习'
this.form.audit_status = 1
this.getVisitArea()
this.getVisitTime()
this.getReason()
@ -349,6 +354,10 @@
saveFormgoStudy() {
console.log("form", this.form)
this.$refs['formdata'].validate().then(res => {
if(this.isCall==='call'){
this.submitForm()
return
}
uni.setStorageSync('formdata',this.form)
uni.navigateTo({
url: '/pages/visit/study?type=' + this.form.type
@ -356,6 +365,32 @@
}).catch(err => {
console.log('err', err);
})
},
submitForm() {
let that = this
this.util.request({
api: '/api/mobile/visit/visit-save',
method: "POST",
data: that.form,
utilSuccess: function(res) {
uni.showToast({
title: res.msg,
duration: 2000,
icon: 'none'
})
uni.removeStorageSync('formData')
uni.navigateTo({
url:'/pages/visit/successform'
})
},
utilFail: function(res) {
uni.showToast({
title: res.errmsg,
duration: 2000,
icon: 'none'
})
}
})
}
}
}

Loading…
Cancel
Save