Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 31b66168
authored
Mar 30, 2023
by
zhangxw
Committed by
chenwq
Mar 30, 2023
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
创建员工防连点
1 parent
0c3e4714
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
packageMine/pages/staffManage/createStaff/createStaff.js
packageMine/pages/staffManage/createStaff/createStaff.js
View file @
31b6616
...
@@ -19,7 +19,8 @@ Page({
...
@@ -19,7 +19,8 @@ Page({
connectionValue
:
'全部'
,
connectionValue
:
'全部'
,
visualType
:
0
visualType
:
0
},
},
showServiceConfirm
:
false
showServiceConfirm
:
false
,
isConfirm
:
false
},
},
watch
:
{
watch
:
{
...
@@ -156,7 +157,11 @@ Page({
...
@@ -156,7 +157,11 @@ Page({
// 提交
// 提交
handleConfirm() {
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)
let validObj = wx.$util.checkRule(formData, constantData.formRule)
if (validObj) {
if (validObj) {
wx.$api.showToast(validObj.message)
wx.$api.showToast(validObj.message)
...
@@ -182,6 +187,9 @@ Page({
...
@@ -182,6 +187,9 @@ Page({
confirmColor: '#3666FE',
confirmColor: '#3666FE',
success(res) {
success(res) {
if (res.confirm) {
if (res.confirm) {
_this.setData({
isConfirm: true
})
// 创建/编辑接口
// 创建/编辑接口
let requestEvent = addOrEdit == 'add' ? 'createStaffAPI' : 'updateStaffAPI'
let requestEvent = addOrEdit == 'add' ? 'createStaffAPI' : 'updateStaffAPI'
mineApi[requestEvent](params).then(res => {
mineApi[requestEvent](params).then(res => {
...
@@ -190,6 +198,10 @@ Page({
...
@@ -190,6 +198,10 @@ Page({
} else {
} else {
wx.$router.back()
wx.$router.back()
}
}
}).catch(err => {
_this.setData({
isConfirm: false
})
})
})
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment