This commit is contained in:
yanran200730
2022-01-20 10:36:52 +08:00
parent 66236dfb5b
commit 4755651c38
9 changed files with 29 additions and 13 deletions

View File

@@ -53,25 +53,34 @@ export default {
created() {
this.searchDetail();
},
onLoad () {
document.title = this.$route.query.id ? '调查走访详情' : '新增调查走访'
},
methods: {
submitForm() {
if (!this.form.title) {
return this.$u.toast("请输入调查走访事项")
}
this.$loading()
this.$refs.interviewForm?.validate(v => {
if (v) {
this.$http.post(`/app/appinterview/add-xcx`, {
...this.form
}).then(res => {
uni.hideLoading()
if (res?.code == 0) {
this.$u.toast("提交成功!")
setTimeout(() => {
uni.navigateBack({})
}, 1000)
}
}).catch(() => {
uni.hideLoading()
})
}
}).catch(() => {
uni.hideLoading()
})
},
searchDetail() {