Commit 31b66168 by zhangxw Committed by chenwq

创建员工防连点

1 parent 0c3e4714
......@@ -19,7 +19,8 @@ Page({
connectionValue: '全部',
visualType: 0
},
showServiceConfirm: false
showServiceConfirm: false,
isConfirm: false
},
watch: {
......@@ -156,7 +157,11 @@ Page({
// 提交
handleConfirm() {
let { addOrEdit, formData, allConnectionIds } = this.data
let _this = this
let { addOrEdit, formData, allConnectionIds, isConfirm } = _this.data
if (isConfirm) {
return true
}
let validObj = wx.$util.checkRule(formData, constantData.formRule)
if (validObj) {
wx.$api.showToast(validObj.message)
......@@ -182,6 +187,9 @@ Page({
confirmColor: '#3666FE',
success(res) {
if (res.confirm) {
_this.setData({
isConfirm: true
})
// 创建/编辑接口
let requestEvent = addOrEdit == 'add' ? 'createStaffAPI' : 'updateStaffAPI'
mineApi[requestEvent](params).then(res => {
......@@ -190,6 +198,10 @@ Page({
} else {
wx.$router.back()
}
}).catch(err => {
_this.setData({
isConfirm: false
})
})
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!