Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-custom
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 7a1d1b8d
authored
Nov 24, 2021
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
增加客户群详情默认时间
1 parent
de8f4c4f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
19 deletions
src/components/search-form/index.vue
src/views/clientGroupManage/clientGroupDetail.vue
src/views/clientGroupManage/index.vue
src/components/search-form/index.vue
View file @
7a1d1b8
...
...
@@ -17,7 +17,7 @@
<span>
收起
</span>
</div>
</div>
<div
class=
"firstRowBtn"
v-if=
"!expande && isShowBtns"
>
<div
class=
"firstRowBtn"
v-if=
"!expande && isShowBtns
&& isNeedThreeBtns
"
>
<el-button
plain
@
click=
"resetTable"
size=
"small"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
size=
"small"
>
查询
</el-button>
<!-- v-if="(merchantModel == 1 && accountLevel == 1) || (merchantModel == 2 && accountLevel == 4)" -->
...
...
@@ -103,6 +103,10 @@ export default {
showDefaultTime
:
{
type
:
Boolean
,
default
:
false
},
isNeedThreeBtns
:{
type
:
Boolean
,
default
:
true
}
},
data
()
{
...
...
src/views/clientGroupManage/clientGroupDetail.vue
View file @
7a1d1b8
...
...
@@ -47,15 +47,14 @@
<span>
客户列表
</span>
<span>
{{
clientTableDataNum
||
0
}}
个
</span>
</p>
<search-form
class=
"searchTop border-shadow"
:
showDefaultTime=
"fals
e"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<search-form
class=
"searchTop border-shadow"
:
isNeedThreeBtns=
"false"
:showDefaultTime=
"tru
e"
:formModel=
"searchForm"
:formList=
"clientGroupFormList"
@
setTableHeightEvent=
"setTableHeightEvent"
>
<span
class=
"inline-b"
slot=
"form-slot"
>
<!-- :size="btn_size" -->
<el-button
plain
@
click=
"resetTable"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchTable"
>
查询
</el-button>
</span>
</search-form>
<!-- :tableId="$route.query.id" 去掉,表格组件也应该去掉 -->
<GLTable
ref=
"clientGroupDetail"
@
setTableFinishFun=
"setTableFinishFun"
:hasNum=
"true"
:pageConf=
"pageConf"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<GLTable
ref=
"clientGroupDetail"
@
setTableFinishFun=
"setTableFinishFun"
:hasNum=
"true"
:pageConf=
"pageConf"
:getListApi=
"getListApi"
:beforeSearchFn=
"beforeSearchFn"
:searchForm=
"searchForm
Table
"
:tableParams=
"tableParams"
:headerStyle=
"
{ height: '54px', background: '#F4F6FC', color: '#333333', fontSize: '14px' }" :noDataImg="url">
<span
slot=
"customerName"
slot-scope=
"scope"
>
<el-tooltip
effect=
"dark"
:content=
"scope.scope.customerName"
placement=
"top"
>
<span
class=
"ellipsis-1"
style=
"display: inline-block; max-width: 70px; text-align: left"
>
{{
scope
.
scope
.
customerName
}}
</span>
...
...
@@ -89,6 +88,7 @@ export default {
url
:
url
,
leftPanelList
:
{},
searchForm
:
{},
searchFormTable
:{},
clientGroupFormList
:
[
{
type
:
'daterange'
,
...
...
@@ -198,6 +198,19 @@ export default {
// this.searchTable()
// })
},
watch
:
{
'searchForm.daterange'
:{
deep
:
true
,
// immediate:true,
handler
(
val
)
{
console
.
log
(
'val值:'
,
val
)
if
(
val
){
console
.
log
(
'7777777777777'
)
this
.
searchTable
()
}
}
}
},
methods
:
{
async
getTableDetail
(
id
=
this
.
$route
.
query
.
id
)
{
...
...
@@ -208,16 +221,18 @@ export default {
}
this
.
leftPanelList
=
res
},
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
console
.
log
(
this
.
searchForm
)
if
(
this
.
searchForm
.
daterange
)
{
this
.
searchForm
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchForm
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchForm
.
daterange
this
.
searchFormTable
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
searchForm
))
// console.log(this.searchForm,'数据')
// console.log(this.searchForm.daterange,this.searchForm.id,this.searchFormTable,'时间选择器')
// console.log(this.searchForm)
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchForm
.
beginTime
)
delete
this
.
searchForm
.
beginTime
&&
delete
this
.
searchForm
.
endTime
if
(
this
.
searchForm
Table
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
resolve
()
})
...
...
@@ -229,12 +244,6 @@ export default {
//content是第一页的数据
console
.
log
(
content
)
this
.
clientTableDataNum
=
this
.
$refs
.
clientGroupDetail
.
total
if
(
!
this
.
flushTime
)
{
this
.
flushTime
=
true
// setTimeout(() => {
// this.searchTable()
// }, 3000)
}
//接收到的数据为空
if
(
!
this
.
$refs
.
clientGroupDetail
.
data
.
length
)
{
this
.
$refs
.
clientGroupDetail
.
setTableHeightFun
()
...
...
src/views/clientGroupManage/index.vue
View file @
7a1d1b8
...
...
@@ -134,6 +134,17 @@ export default {
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
}
},
// watch: {
// 'searchForm.daterange':{
// deep: true,
// handler(val) {
// console.log('val值:',val)
// if(val){
// this.searchTable()
// }
// }
// }
// },
mounted
()
{},
methods
:
{
syncClick
()
{
...
...
@@ -176,10 +187,10 @@ export default {
if
(
this
.
searchFormTable
.
daterange
)
{
this
.
searchFormTable
.
beginTime
=
this
.
searchForm
.
daterange
[
0
]
this
.
searchFormTable
.
endTime
=
this
.
searchForm
.
daterange
[
1
]
delete
this
.
searchFormTable
.
daterange
}
else
{
if
(
this
.
searchFormTable
.
beginTime
)
delete
this
.
searchFormTable
.
beginTime
&&
delete
this
.
searchFormTable
.
endTime
}
delete
this
.
searchFormTable
.
daterange
resolve
()
})
},
...
...
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