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 0cf4a039
authored
Jul 26, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
edf65a00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
30 deletions
src/views/bulletin/components/clewOrder/index.vue
src/views/bulletin/components/clewOrder/index.vue
View file @
0cf4a03
...
...
@@ -8,7 +8,7 @@
<div
class=
"title-text"
>
喜报列表
</div>
<el-button
:size=
"size"
type=
"primary"
class=
"battle-set-btn"
@
click=
"handlebattleOn()"
>
新增
</el-button>
</div>
<GLTable
ref=
"battleRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"
searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf
"
@
setTableFinishFun=
"setTableFinishFun"
>
<GLTable
ref=
"battleRef"
:getListApi=
"getListApi"
:noDataImg=
"url"
:searchForm=
"
tableSearchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
:beforeSearchFn=
"beforeSearchFn
"
@
setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"content"
slot-scope=
"scope"
>
<div>
{{
formatterContent
(
scope
.
scope
)
}}
</div>
</div>
...
...
@@ -32,6 +32,7 @@ export default {
merchantName
:
''
,
groupMerchantName
:
''
},
tableSearchForm
:{},
searchFormData
:
[
{
label
:
'4S店'
,
...
...
@@ -52,8 +53,7 @@ export default {
width
:
'215px'
,
optionList
:
[],
optionId
:
'merchantName'
,
optionLabel
:
'merchantName'
,
optionsName
:
'merchantList'
optionLabel
:
'merchantName'
}
],
getListApi
:
this
.
$apis
.
clewOrder
.
getClueReportList
,
...
...
@@ -100,11 +100,18 @@ export default {
this
.
getMerchantList
()
},
methods
:
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
this
.
tableSearchForm
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
this
.
searchForm
.
groupMerchantName
==
'全部'
?
(
this
.
tableSearchForm
.
groupMerchantName
=
''
)
:
''
resolve
()
})
},
getMerchantList
()
{
this
.
$apis
.
battle
.
getMerchantList
({}).
then
(
res
=>
{
this
.
baseData
.
merchantList
=
res
this
.
merchantList
=
res
this
.
getOptionsList
(
'searchFormData'
)
this
.
searchFormData
[
2
].
optionList
=
[{
merchantId
:
'全部'
,
merchantName
:
'全部'
}].
concat
(
this
.
merchantList
)
})
},
formatterContent
(
cellValue
)
{
...
...
@@ -114,37 +121,17 @@ export default {
})
return
txt
},
getOptionsList
(
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
var
item
=
this
[
formName
].
find
(
k
=>
k
.
name
==
refreshSigle
)
var
index
=
this
[
formName
].
findIndex
(
k
=>
k
.
name
==
refreshSigle
)
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
[
formName
][
index
].
optionId
]
=
''
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
this
[
formName
][
index
].
optionList
.
unshift
(
temp
)
}
}
else
{
this
[
formName
].
forEach
((
item
,
index
)
=>
{
if
(
item
.
type
===
'select'
&&
this
.
baseData
[
item
.
optionsName
]?.
length
)
{
this
.
$set
(
this
[
formName
][
index
],
'optionList'
,
this
.
$common
.
utils
.
deepClone
(
this
.
baseData
[
item
.
optionsName
]))
if
(
hasAll
&&
this
.
baseData
[
item
.
optionsName
].
length
&&
this
.
baseData
[
item
.
optionsName
][
0
][
this
[
formName
][
index
].
optionLabel
]
!==
'全部'
)
{
const
temp
=
{}
temp
[
this
[
formName
][
index
].
optionId
]
=
''
temp
[
this
[
formName
][
index
].
optionLabel
]
=
'全部'
this
[
formName
][
index
].
optionList
.
unshift
(
temp
)
}
}
})
}
},
handleReset
()
{
this
.
searchForm
=
{
merchantId
:
''
,
merchantName
:
''
,
groupMerchantName
:
''
}
this
.
tableSearchForm
=
{
merchantId
:
''
,
merchantName
:
''
,
groupMerchantName
:
''
}
this
.
handleSearch
()
},
handlebattleOn
(
id
)
{
...
...
@@ -167,7 +154,6 @@ export default {
},
handleSearch
()
{
this
.
searchForm
.
groupMerchantName
=
''
this
.
$refs
.
battleRef
.
refreshTable
()
}
}
...
...
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