Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-activity-center
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 63572aaa
authored
Dec 19, 2025
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix(销售日报配置): 添加表单验证规则并修复保存逻辑
为日报人员名单和抽检人员名单添加必填验证规则 重构保存逻辑,在验证通过后才执行保存操作
1 parent
f8e2a6e9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
24 deletions
src/views/salesDaily/index.vue
src/views/salesDaily/index.vue
View file @
63572aa
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
销售日报配置
销售日报配置
</div>
</div>
<div
class=
"config-wrap gl-form-page"
v-loading=
"loading"
>
<div
class=
"config-wrap gl-form-page"
v-loading=
"loading"
>
<glsx-combi-form
ref=
"showSearch"
labelWidth=
"130px"
:isBlock=
"true"
:formObj=
"editForm"
:formData=
"editFormData"
></glsx-combi-form>
<glsx-combi-form
ref=
"showSearch"
labelWidth=
"130px"
:isBlock=
"true"
:form
Rules=
"rules"
:formRef=
"editChildRef"
:form
Obj=
"editForm"
:formData=
"editFormData"
></glsx-combi-form>
</div>
</div>
<!--
<!--
<el-form
ref=
"form"
:model=
"form"
label-width=
"154px"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"154px"
>
...
@@ -32,6 +32,11 @@ export default {
...
@@ -32,6 +32,11 @@ export default {
dailyReportStaffList
:
[],
dailyReportStaffList
:
[],
randomCheckStaffList
:
[]
randomCheckStaffList
:
[]
},
},
editChildRef
:
'editChildRef'
,
rules
:
{
dailyReportStaffList
:
[{
required
:
true
,
message
:
'请选择日报人员名单'
,
trigger
:
'change'
}],
randomCheckStaffList
:
[{
required
:
true
,
message
:
'请选择抽检人员名单'
,
trigger
:
'change'
}]
},
editFormData
:
[
editFormData
:
[
{
{
label
:
'所属企业'
,
label
:
'所属企业'
,
...
@@ -135,31 +140,35 @@ export default {
...
@@ -135,31 +140,35 @@ export default {
if
(
this
.
loading
)
{
if
(
this
.
loading
)
{
return
true
return
true
}
}
this
.
loading
=
true
this
.
$refs
.
showSearch
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
var
params
=
{
if
(
valid
)
{
dailyReportStaffList
:
[],
this
.
loading
=
true
randomCheckStaffList
:
[]
var
params
=
{
}
dailyReportStaffList
:
[],
const
attrList
=
[
'dailyReportStaffList'
,
'randomCheckStaffList'
]
randomCheckStaffList
:
[]
attrList
.
forEach
(
item
=>
{
}
this
.
editForm
[
item
].
forEach
(
k
=>
{
const
attrList
=
[
'dailyReportStaffList'
,
'randomCheckStaffList'
]
params
[
item
].
push
({
attrList
.
forEach
(
item
=>
{
staffUuid
:
k
,
this
.
editForm
[
item
].
forEach
(
k
=>
{
staffName
:
this
.
baseData
.
staffList
.
find
(
n
=>
n
.
staffUuid
==
k
).
staffName
params
[
item
].
push
({
staffUuid
:
k
,
staffName
:
this
.
baseData
.
staffList
.
find
(
n
=>
n
.
staffUuid
==
k
).
staffName
})
})
})
})
})
console
.
log
(
params
,
'params'
)
})
this
.
$apis
.
salesDaily
.
saveSalesDailyConfig
(
params
).
then
(
res
=>
{
console
.
log
(
params
,
'params'
)
console
.
log
(
res
)
this
.
$apis
.
salesDaily
.
saveSalesDailyConfig
(
params
).
then
(
res
=>
{
this
.
$message
({
console
.
log
(
res
)
message
:
res
.
code
==
'0'
?
'配置成功!'
:
res
.
message
,
this
.
$message
({
type
:
res
.
code
==
'0'
?
'success'
:
'error'
message
:
res
.
code
==
'0'
?
'配置成功!'
:
res
.
message
,
})
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
})
.
finally
(()
=>
{
this
.
loading
=
false
})
}
})
})
.
finally
(()
=>
{
this
.
loading
=
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