Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-presale
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 f00dd1d7
authored
Mar 15, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改所有门店适用编辑
1 parent
1c3466da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
25 deletions
src/views/serviceConfig/addClause.vue
src/views/serviceConfig/index.vue
src/views/serviceConfig/addClause.vue
View file @
f00dd1d
...
...
@@ -3,7 +3,7 @@
<div
class=
"main-warp"
>
<glsx-combi-form
ref=
"submitRef"
labelWidth=
"154px"
defaultWidth=
"284px"
:isInline=
"false"
:formObj=
"formObj"
:formData=
"formData"
:formRules=
"editRule"
>
<div
slot=
"merchantName"
>
<el-button
v-if=
"routeInfo.type
!=2
"
class=
"el-icon-plus"
@
click=
"selectMerchant()"
>
选择门店
</el-button>
<el-button
v-if=
"routeInfo.type
==1 || (routeInfo.type==3 && routeInfo.merchantId)
"
class=
"el-icon-plus"
@
click=
"selectMerchant()"
>
选择门店
</el-button>
<div
class=
"merchantNameLabel"
v-if=
"formObj.merchantName && formObj.merchantId"
...
...
@@ -11,6 +11,7 @@
<p>
所属门店
</p>
<div
class=
"merchantName ellipsis-1"
>
{{
formObj
.
merchantName
}}
</div>
</div>
<div
v-if=
"routeInfo.type!=1 && !routeInfo.merchantId"
>
所有门店适用
</div>
</div>
<div
class=
"equity-class"
slot=
"selectEquity"
>
<div
class=
"equity-area"
v-for=
"item in formObj.serviceList"
:key=
"item.serviceCode"
>
...
...
@@ -181,31 +182,42 @@ export default {
})
},
submit
(){
this
.
$refs
.
submitRef
.
$refs
.
formRef
.
validate
(
valid
=>
{
if
(
!
valid
)
return
;
if
(
this
.
routeInfo
.
id
){
this
.
editService
()
return
;
}
let
{
merchantId
,
merchantName
}
=
this
.
formObj
let
serviceIterm
=
[]
this
.
formObj
.
serviceList
.
forEach
(
item
=>
{
if
(
item
.
checked
)
{
let
{
serviceCode
,
serviceContent
,
serviceName
,
summary
}
=
item
serviceIterm
.
push
({
serviceCode
,
serviceContent
,
serviceName
,
summary
})
}
if
(
this
.
routeInfo
.
type
!=
1
&&
!
this
.
routeInfo
.
merchantId
){
this
.
$refs
.
submitRef
.
$refs
.
formRef
.
validateField
(
'serviceList'
,
valid
=>
{
if
(
valid
)
return
;
//检验单个规则空才是通过
this
.
addConfigApi
()
})
let
params
=
{
merchantId
,
merchantName
,
serviceIterm
}
this
.
$apis
.
serviceConfig
.
craeteEquity
(
params
).
then
(
res
=>
{
if
(
res
?.
length
){
this
.
$message
.
success
(
'操作成功'
)
this
.
$router
.
push
(
'/serviceConfig/index'
)
}
}
else
{
this
.
$refs
.
submitRef
.
$refs
.
formRef
.
validate
(
valid
=>
{
console
.
log
(
222
,
valid
)
if
(
!
valid
)
return
;
this
.
addConfigApi
()
})
}
},
addConfigApi
(){
if
(
this
.
routeInfo
.
id
){
this
.
editService
()
return
;
}
let
{
merchantId
,
merchantName
}
=
this
.
formObj
let
serviceIterm
=
[]
this
.
formObj
.
serviceList
.
forEach
(
item
=>
{
if
(
item
.
checked
)
{
let
{
serviceCode
,
serviceContent
,
serviceName
,
summary
}
=
item
serviceIterm
.
push
({
serviceCode
,
serviceContent
,
serviceName
,
summary
})
}
})
let
params
=
{
merchantId
,
merchantName
,
serviceIterm
}
this
.
$apis
.
serviceConfig
.
craeteEquity
(
params
).
then
(
res
=>
{
if
(
res
?.
length
){
this
.
$message
.
success
(
'操作成功'
)
this
.
$router
.
push
(
'/serviceConfig/index'
)
}
})
}
}
...
...
src/views/serviceConfig/index.vue
View file @
f00dd1d
...
...
@@ -210,12 +210,13 @@
addClause
(
type
,
row
)
{
// 1新增 2查看 3编辑
const
{
id
}
=
row
||
{}
const
{
id
,
merchantId
}
=
row
||
{}
let
query
=
{
type
}
if
(
type
!=
1
){
query
.
id
=
id
query
.
merchantId
=
merchantId
}
const
queryStr
=
encodeURIComponent
(
JSON
.
stringify
(
query
))
this
.
$router
.
push
(
'/serviceConfig/addClause/'
+
queryStr
)
...
...
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