master
lion 3 years ago
parent 861f12bf1e
commit f85d4b9528

@ -1,4 +1,6 @@
<template> <template>
<page-meta :page-style="'overflow:'+(callshow?'hidden':'visible')"></page-meta>
<view class="containers"> <view class="containers">
<view class="top"> <view class="top">
<view class="toplogo justify-between align-center"> <view class="toplogo justify-between align-center">
@ -27,7 +29,8 @@
<view class="mine"> <view class="mine">
<view class="mineicon justify-between align-center"> <view class="mineicon justify-between align-center">
<view v-for="item in iconList"> <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 class="icontext">{{item.text}}</view>
</view> </view>
</view> </view>
@ -73,6 +76,18 @@
</view> </view>
</view> </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> </view>
</template> </template>
@ -98,12 +113,13 @@
{ {
src: require("../../static/img/yy.png"), src: require("../../static/img/yy.png"),
text: '邀约', text: '邀约',
url: "/pages/bd/call" url: "/pages/bd/call",
isyy: true
}, },
{ {
src: require("../../static/img/dyyjl.png"), src: require("../../static/img/dyyjl.png"),
text: '代邀约记录', text: '代邀约记录',
url: "/pages/bd/replace" url: "/pages/bd/record?type=call"
} }
], ],
list: [], list: [],
@ -114,7 +130,8 @@
audit_status: 0, audit_status: 0,
keyword: "" keyword: ""
}, },
isEmpty: false isEmpty: false,
callshow: false
} }
}, },
onLoad() { onLoad() {
@ -142,11 +159,21 @@
this.loadList() this.loadList()
} }
}, },
methods: { methods: {
toUrl(url) { toForm(type){
uni.navigateTo({ 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) { toDetail(id) {
uni.navigateTo({ uni.navigateTo({
@ -286,4 +313,21 @@
/deep/ .u-empty { /deep/ .u-empty {
min-height: 30vh; 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> </style>

@ -111,7 +111,7 @@
</uni-data-select> </uni-data-select>
</uni-forms-item> </uni-forms-item>
</uni-forms> </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, id: 1,
value: '是' value: '是'
}], }],
adminList: [] adminList: [],
isCall:'',
goStudy:'去学习'
} }
}, },
onLoad(options) { onLoad(options) {
this.form.type = options.type this.form.type = options.type
this.isCall = options.iscall
this.goStudy = this.isCall=='call'?'提交':'去学习'
this.form.audit_status = 1
this.getVisitArea() this.getVisitArea()
this.getVisitTime() this.getVisitTime()
this.getReason() this.getReason()
@ -348,7 +353,11 @@
// //
saveFormgoStudy() { saveFormgoStudy() {
console.log("form", this.form) console.log("form", this.form)
this.$refs['formdata'].validate().then(res => { this.$refs['formdata'].validate().then(res => {
if(this.isCall==='call'){
this.submitForm()
return
}
uni.setStorageSync('formdata',this.form) uni.setStorageSync('formdata',this.form)
uni.navigateTo({ uni.navigateTo({
url: '/pages/visit/study?type=' + this.form.type url: '/pages/visit/study?type=' + this.form.type
@ -356,6 +365,32 @@
}).catch(err => { }).catch(err => {
console.log('err', 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