Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-discover
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 e8fe61e7
authored
Jul 14, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改搜索下拉
1 parent
036186c6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
26 deletions
src/views/goods/add.vue
src/views/goods/components/brandCascader.vue
src/views/goods/index.vue
src/views/store/edit.vue
src/views/goods/add.vue
View file @
e8fe61e
...
...
@@ -51,7 +51,7 @@
</div>
</div>
<div
slot=
"categorySlot"
>
<brandCascader
:disabled=
"disabled"
:listTree=
"categoryData"
:defaultProps=
"defaultProps"
@
clickItem=
"selectCategory"
:curInfo=
"curCategoryInfo
"
class=
"category-class"
></brandCascader>
<brandCascader
:disabled=
"disabled"
@
clickItem=
"selectCategory
"
class=
"category-class"
></brandCascader>
</div>
</glsx-combi-form>
</div>
...
...
@@ -173,7 +173,6 @@ export default {
associationClassifyFirstId
:
''
,
associationClassifySecondId
:
''
},
categoryData
:
[],
merchantRequestList
:[],
vehicleSeriesRequestList
:
[],
myRule
:
{
...
...
src/views/goods/components/brandCascader.vue
View file @
e8fe61e
...
...
@@ -29,10 +29,6 @@ export default {
curBrand
:
{},
expandedList
:[],
categoryData
:
[],
defaultProps
:
{
children
:
'childs'
,
label
:
'categoryName'
},
}
},
model
:
{
...
...
@@ -40,15 +36,15 @@ export default {
event
:
'changeItem'
,
// 默认是input
},
props
:
{
//
defaultProps: {
//
type: Object,
//
default: ()=> {
//
return {
// children: 'children
',
// label: 'label
'
//
}
//
}
//
},
defaultProps
:
{
type
:
Object
,
default
:
()
=>
{
return
{
children
:
'childs
'
,
label
:
'categoryName
'
}
}
},
disabled
:{
type
:
Boolean
,
default
:
false
...
...
@@ -112,7 +108,6 @@ export default {
}
})
this
.
categoryData
=
list
console
.
log
(
this
.
categoryData
)
}
})
},
...
...
@@ -183,6 +178,7 @@ export default {
z-index
:
20
;
max-height
:
300px
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
.filter-tree
{
.custom-tree-node{
width
:
100%
;
...
...
src/views/goods/index.vue
View file @
e8fe61e
...
...
@@ -2,7 +2,11 @@
<div
class=
"goods-list-cntr"
>
<!--
<GLTabs
v-model=
"activeName"
:tabPaneList=
"tabPaneList"
@
tab-click=
"handleClick"
></GLTabs>
-->
<div
class=
"table-wrap"
>
<GLCombiForm
ref=
"showSearch"
:rowNumber=
"1"
:formObj=
"tableSearchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
></GLCombiForm>
<GLCombiForm
ref=
"showSearch"
class=
"search-wrap"
:rowNumber=
"1"
:formObj=
"tableSearchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
>
<div
slot=
"categorySlot"
>
<brandCascader
ref=
"cascaderRef"
@
clickItem=
"selectCategory"
class=
"category-slot-class"
></brandCascader>
</div>
</GLCombiForm>
<div
class=
"operate-wrap"
>
<span
class=
"table-title"
>
发现商品列表
</span>
<el-button
class=
"operate-btn"
type=
"primary"
size=
"small"
@
click=
"handleAdd"
>
新增商品
</el-button>
...
...
@@ -46,14 +50,20 @@
<
script
>
import
url
from
'@/assets/empty.png'
import
*
as
dayjs
from
'dayjs
'
import
brandCascader
from
'./components/brandCascader
'
export
default
{
name
:
'App'
,
components
:
{
brandCascader
,
},
data
()
{
return
{
tableSearchForm
:
{
channelName
:
''
,
createDate
:
[]
createDate
:
[],
associationClassifyFirstId
:
''
,
associationClassifySecondId
:
''
,
merchantName
:
''
},
tabPaneList
:
[{
name
:
'sa'
,
label
:
'配置升级'
},
{
name
:
'sa'
,
label
:
'车主优选'
}],
buttonList
:
[
...
...
@@ -152,8 +162,8 @@
},
{
label
:
'商品分类'
,
name
:
'
channelName
'
,
type
:
'inpu
t'
name
:
'
goodsCategory
'
,
addHtml
:
'categorySlo
t'
},
],
getListApi
:
this
.
$apis
.
goods
.
getGoodsListApi
,
...
...
@@ -220,6 +230,10 @@
created
()
{},
mounted
()
{},
methods
:
{
selectCategory
(
e
){
this
.
tableSearchForm
.
associationClassifyFirstId
=
e
?.
parent
?.
id
this
.
tableSearchForm
.
associationClassifySecondId
=
e
?.
data
?.
id
},
shelfGoodsFn
(
item
,
type
){
if
(
type
==
1
){
this
.
updateStatus
(
item
.
id
,
type
)
...
...
@@ -288,8 +302,12 @@
handleReset
()
{
this
.
tableSearchForm
=
{
channelName
:
''
,
createDate
:
[]
}
createDate
:
[],
associationClassifyFirstId
:
''
,
associationClassifySecondId
:
''
,
merchantName
:
''
},
this
.
$refs
?.
cascaderRef
?.
curBrand
&&
(
this
.
$refs
.
cascaderRef
.
curBrand
=
{})
this
.
searchForm
=
{}
this
.
handleSearch
()
},
...
...
@@ -315,6 +333,14 @@
<
style
scoped
lang=
"scss"
>
.goods-list-cntr
{
.search-wrap{
/deep/
.gl-search{
overflow
:
unset
;
.tree-box{
width
:
300px
;
}
}
}
.table-wrap
{
margin-top
:
16px
;
padding
:
20px
;
...
...
src/views/store/edit.vue
View file @
e8fe61e
...
...
@@ -2,10 +2,13 @@
<div
class=
"edit-wrap"
v-if=
"isFlag"
>
<GLTabs
v-model=
"activeName"
:tabPaneList=
"tabPaneList"
@
tab-click=
"handleClick"
></GLTabs>
<div
class=
"container mgt16"
>
<GLCombiForm
ref=
"showSearch"
v-if=
"searchFormData.length"
:rowNumber=
"1"
:formObj=
"tableSearchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
>
<GLCombiForm
class=
"search-wrap"
ref=
"showSearch"
v-if=
"searchFormData.length"
:rowNumber=
"1"
:formObj=
"tableSearchForm"
:formData=
"searchFormData"
@
handleOk=
"handleSearch"
@
handleRest=
"handleReset"
>
<div
slot=
"createdDate"
>
<el-date-picker
v-model=
"tableSearchForm.createdDate"
type=
"date"
value-format=
"yyyy-MM-dd"
placeholder=
"选择日期"
:picker-options=
"pickerOptions"
></el-date-picker>
</div>
<div
slot=
"categorySlot"
>
<brandCascader
ref=
"cascaderRef"
@
clickItem=
"selectCategory"
class=
"category-slot-class"
></brandCascader>
</div>
</GLCombiForm>
<div
class=
"store-head"
>
<div
class=
"info"
>
{{
tabPaneText
}}
列表
</div>
...
...
@@ -76,10 +79,14 @@
<
script
>
import
url
from
'@/assets/empty.png'
import
brandCascader
from
'../goods/components/brandCascader'
import
*
as
dayjs
from
'dayjs'
import
{
mapState
,
mapMutations
}
from
'vuex'
export
default
{
name
:
'App'
,
components
:
{
brandCascader
,
},
data
()
{
return
{
isFlag
:
false
,
...
...
@@ -92,6 +99,7 @@ export default {
createDate
:
[]
},
searchForm
:
{},
ClassifyInfo
:
{},
url
:
url
,
mode
:
'mid'
,
tabPaneList
:
[],
...
...
@@ -147,8 +155,8 @@ export default {
},
{
label
:
'商品分类'
,
name
:
'
channelName
'
,
type
:
'inpu
t'
,
name
:
'
goodsCategory
'
,
addHtml
:
'categorySlo
t'
,
filter
:
'5'
},
],
...
...
@@ -337,6 +345,10 @@ export default {
SET_CHANNEL_STYLE
:
'channel/SET_CHANNEL_STYLE'
,
SET_CHANNEL_TYPE
:
'channel/SET_CHANNEL_TYPE'
}),
selectCategory
(
e
){
this
.
ClassifyInfo
.
associationClassifyFirstId
=
e
?.
parent
?.
id
this
.
ClassifyInfo
.
associationClassifySecondId
=
e
?.
data
?.
id
},
filterData
({
merchantList
:
list
}){
return
list
?.
map
(
item
=>
{
let
activityPrice
=
item
.
activityPrice
?
Number
((
Number
(
item
.
activityPrice
)
/
100
).
toFixed
(
2
))
:
0
...
...
@@ -359,6 +371,9 @@ export default {
if
(
this
.
activeName
==
5
){
this
.
searchForm
.
apiType
=
5
this
.
searchForm
.
merchantId
=
this
.
merchantId
const
{
associationClassifyFirstId
,
associationClassifySecondId
}
=
this
.
ClassifyInfo
this
.
searchForm
.
associationClassifyFirstId
=
associationClassifyFirstId
this
.
searchForm
.
associationClassifySecondId
=
associationClassifySecondId
}
// delete this.searchForm.createDate
resolve
()
...
...
@@ -488,6 +503,8 @@ export default {
merchantName
:
''
,
createDate
:
[]
}
this
.
ClassifyInfo
=
{}
this
.
$refs
?.
cascaderRef
?.
curBrand
&&
(
this
.
$refs
.
cascaderRef
.
curBrand
=
{})
this
.
searchForm
=
{}
this
.
handleSearch
()
},
...
...
@@ -519,6 +536,14 @@ export default {
</
script
>
<
style
scoped
lang=
"scss"
>
.search-wrap
{
/deep/
.gl-search{
overflow
:
unset
;
.tree-box{
width
:
300px
;
}
}
}
.edit-wrap
{
.store-head
{
display
:
flex
;
...
...
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