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 f983cdec
authored
Sep 05, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
第一轮bug修复
1 parent
ca3f9633
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
89 additions
and
57 deletions
src/views/category/ownerPreference/index.vue
src/views/goods/addPrefer.vue
src/views/goods/components/selectGoods.vue
src/views/goods/preferList.vue
src/views/category/ownerPreference/index.vue
View file @
f983cde
...
...
@@ -28,7 +28,11 @@
</div>
<div
class=
"category-style"
v-if=
"scope.scope.categoryStyle == 2"
>
<img
src=
"@/assets/category/recommend.png"
>
<span>
种草模式
</span>
<span>
种草模式A
</span>
</div>
<div
class=
"category-style"
v-if=
"scope.scope.categoryStyle == 3"
>
<img
src=
"@/assets/category/recommend2.png"
>
<span>
种草模式B
</span>
</div>
</div>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
...
...
src/views/goods/addPrefer.vue
View file @
f983cde
...
...
@@ -164,7 +164,8 @@ const MerchantColumns = [
addHtml
:
'giveIntegralSlot'
}
]
const
defaultExpreeCol
=
[
const
defaultExpreeColFn
=
(
vn
)
=>
{
return
[
{
label
:
'配送方式'
,
name
:
'deliveryType'
,
...
...
@@ -178,13 +179,17 @@ const defaultExpreeCol = [
}],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
isDisabled
:
false
isDisabled
:
false
,
handleRadioChange
:
(
e
)
=>
{
vn
.
changeMethod
(
e
,
true
)
}
},
{
label
:
'运费/元'
,
name
:
'expressFee'
,
addHtml
:
'expressFeeSlot'
,
isDisabled
:
false
isDisabled
:
false
,
isHide
:
false
},
{
label
:
'服务说明'
,
...
...
@@ -195,7 +200,7 @@ const defaultExpreeCol = [
showLimit
:
true
,
maxlength
:
200
},
]
]
}
const
selfGoodsExpreeCol
=
[
{
...
...
@@ -259,38 +264,7 @@ export default {
isHide
:
false
},
],
expressInfoFormData
:
[
{
label
:
'配送方式'
,
name
:
'deliveryType'
,
type
:
'radio'
,
optionList
:
[{
confId
:
2
,
confName
:
'快递发货'
},{
confId
:
1
,
confName
:
'到店核销'
}],
optionId
:
'confId'
,
optionLabel
:
'confName'
,
isDisabled
:
false
},
{
label
:
'运费/元'
,
name
:
'expressFee'
,
addHtml
:
'expressFeeSlot'
,
isDisabled
:
false
},
{
label
:
'服务说明'
,
name
:
'introduction'
,
type
:
'input'
,
inputType
:
'textarea'
,
isDisabled
:
false
,
showLimit
:
true
,
maxlength
:
200
},
],
expressInfoFormData
:
defaultExpreeColFn
(
this
),
formObj
:
{
goodsSource
:
1
,
deliveryType
:
2
,
...
...
@@ -341,7 +315,11 @@ export default {
saleStoreSlot
:
[{
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
const
_target
=
this
.
saleMerchantList
.
find
(
item
=>
!
item
.
activityPrice
||
!
item
.
originalPrice
)
const
_target
=
this
.
saleMerchantList
.
find
(
item
=>
{
let
activityPrice
=
item
.
activityPrice
||
0
let
originalPrice
=
item
.
originalPrice
||
0
return
!
(
+
activityPrice
)
||
!
(
+
originalPrice
)
})
const
_integralTarget
=
this
.
saleMerchantList
.
find
(
item
=>
!
item
.
giveIntegral
&&
item
.
giveIntegral
!==
0
)
const
hasTarget
=
this
.
saleMerchantList
.
find
(
item
=>
{
let
originalPrice
=
item
.
originalPrice
||
0
...
...
@@ -490,8 +468,16 @@ export default {
}
},
methods
:
{
changeMethod
(
e
,
isClear
){
const
_target
=
this
.
expressInfoFormData
.
find
(
item
=>
item
.
name
==
'expressFee'
)
if
(
_target
){
_target
.
isHide
=
e
==
1
if
(
e
==
1
&&
this
.
formObj
.
goodsSource
==
1
)
this
.
formObj
.
expressFee
=
''
}
},
changeSource
(
e
,
isClear
){
this
.
expressInfoFormData
=
e
==
2
?
selfGoodsExpreeCol
:
defaultExpreeCol
this
.
expressInfoFormData
=
e
==
2
?
selfGoodsExpreeCol
:
defaultExpreeCol
Fn
(
this
)
this
.
goodsFormData
.
forEach
(
item
=>
{
item
.
isHide
=
(
item
.
name
==
'retailPrice'
||
item
.
name
==
'minSellPrice'
)
&&
e
==
2
})
...
...
@@ -709,7 +695,8 @@ export default {
categoryName
:
res
.
associationClassifySecondName
,
id
:
res
.
associationClassifySecondId
}
this
.
changeSource
()
this
.
changeSource
(
res
.
goodsSource
)
this
.
changeMethod
(
res
.
deliveryType
)
this
.
formObj
.
goodsType
=
'2'
//1配置升级, 2车主优选
this
.
formObj
.
coverList
=
res
.
goodsImage
?
[
res
.
goodsImage
]
:
[]
this
.
formObj
.
styleBImgList
=
res
.
styleBImg
?
[
res
.
styleBImg
]
:
[]
...
...
src/views/goods/components/selectGoods.vue
View file @
f983cde
...
...
@@ -15,6 +15,8 @@
<el-button
:size=
"size"
type=
"primary"
@
click=
"resetTable"
>
查询
</el-button>
<el-button
:size=
"size"
v-if=
"goodsInfo.goodsSource==2"
@
click=
"resetSearch"
>
重置
</el-button>
</span>
</glsx-combi-form>
<GLTable
ref=
"goodsRef"
...
...
@@ -202,6 +204,14 @@ export default {
resetTable
()
{
this
.
$refs
.
goodsRef
.
refreshTable
()
},
resetSearch
(){
this
.
searchForm
=
{
goodsName
:
''
,
discoverGoodsId
:
''
,
goodsType
:
''
}
this
.
resetTable
()
},
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
if
(
this
.
goodsInfo
.
goodsSource
==
2
){
...
...
src/views/goods/preferList.vue
View file @
f983cde
...
...
@@ -24,14 +24,32 @@
<span
:class=
"['status', scope.scope.goodsStatus==1 ? 'success-status': 'error-status']"
></span>
<span>
{{
scope
.
scope
.
goodsStatus
==
1
?
'上架'
:
'下架'
}}
</span>
</div>
<div
slot=
"merchantNameSlot"
slot-scope=
"scope"
>
<template
v-if=
"scope.scope.saleMerchantList && scope.scope.saleMerchantList.length > 1"
>
<span>
{{
filterData
(
scope
.
scope
,
'merchantName'
).
slice
(
0
,
1
).
join
(
'、'
)
}}
</span>
<el-popover
placement=
"top"
width=
"fit-content"
trigger=
"hover"
>
<div
v-for=
"(item,index) in filterData(scope.scope, 'merchantName')"
:key=
"index"
>
{{
item
}}
</div>
<span
class=
"more-info"
slot=
"reference"
>
...[
{{
scope
.
scope
.
saleMerchantList
.
length
}}
]
</span>
</el-popover>
</
template
>
<
template
v-else
>
<span
v-if=
"!scope.scope.saleMerchantList || !scope.scope.saleMerchantList.length"
>
--
</span>
<span
v-else
>
{{
filterData
(
scope
.
scope
,
'merchantName'
).
join
(
'、'
)
}}
</span>
</
template
>
</div>
<div
slot=
"merchantPriceSlot"
slot-scope=
"scope"
>
<
template
v-if=
"scope.scope.saleMerchantList && scope.scope.saleMerchantList.length > 1"
>
<span>
{{
filterData
(
scope
.
scope
).
slice
(
0
,
1
).
join
(
'、'
)
}}
</span>
<span>
{{
filterData
(
scope
.
scope
,
'price'
).
slice
(
0
,
1
).
join
(
'、'
)
}}
</span>
<el-popover
placement=
"top"
width=
"fit-content"
trigger=
"hover"
>
<div
v-for=
"(item,index) in filterData(scope.scope)"
:key=
"index"
>
<div
v-for=
"(item,index) in filterData(scope.scope
, 'price'
)"
:key=
"index"
>
{{
item
}}
</div>
<span
class=
"more-info"
slot=
"reference"
>
...[
{{
scope
.
scope
.
saleMerchantList
.
length
}}
]
</span>
...
...
@@ -39,7 +57,7 @@
</
template
>
<
template
v-else
>
<span
v-if=
"!scope.scope.saleMerchantList || !scope.scope.saleMerchantList.length"
>
--
</span>
<span
v-else
>
{{
filterData
(
scope
.
scope
).
join
(
'、'
)
}}
</span>
<span
v-else
>
{{
filterData
(
scope
.
scope
,
'price'
).
join
(
'、'
)
}}
</span>
</
template
>
</div>
<div
...
...
@@ -58,12 +76,12 @@
</div>
<div
slot=
"giveIntegralSlot"
slot-scope=
"scope"
>
<
template
v-if=
"scope.scope.saleMerchantList && scope.scope.saleMerchantList.length > 1"
>
<span>
{{
filterData
(
scope
.
scope
,
1
).
slice
(
0
,
1
).
join
(
'、'
)
}}
</span>
<span>
{{
filterData
(
scope
.
scope
,
'score'
).
slice
(
0
,
1
).
join
(
'、'
)
}}
</span>
<el-popover
placement=
"top"
width=
"400"
trigger=
"hover"
>
<div
v-for=
"(item,index) in filterData(scope.scope,
1
)"
:key=
"index"
>
<div
v-for=
"(item,index) in filterData(scope.scope,
'score'
)"
:key=
"index"
>
{{
item
}}
</div>
<span
class=
"more-info"
slot=
"reference"
>
...(
{{
scope
.
scope
.
saleMerchantList
.
length
}}
)
</span>
...
...
@@ -71,7 +89,7 @@
</
template
>
<
template
v-else
>
<span
v-if=
"!scope.scope.saleMerchantList || !scope.scope.saleMerchantList.length"
>
--
</span>
<span
v-else
>
{{
filterData
(
scope
.
scope
,
1
).
join
(
'、'
)
}}
</span>
<span
v-else
>
{{
filterData
(
scope
.
scope
,
'score'
).
join
(
'、'
)
}}
</span>
</
template
>
</div>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
...
...
@@ -197,7 +215,7 @@ export default {
},
{
label
:
'来源'
,
name
:
'
s
ource'
,
name
:
'
goodsS
ource'
,
type
:
'select'
,
optionList
:
[
{
...
...
@@ -205,17 +223,22 @@ export default {
name
:
'全部'
},
{
id
:
2
,
name
:
'门店自营'
},
{
id
:
1
,
name
:
'嘀加智享'
},
{
id
:
2
,
name
:
'门店自营'
},
],
optionId
:
'id'
,
optionLabel
:
'name'
},
{
label
:
'门店名称'
,
name
:
'merchantName'
,
type
:
'input'
},
],
getListApi
:
this
.
$apis
.
goods
.
getGoodsListApi
,
tableParams
:
{
...
...
@@ -226,10 +249,10 @@ export default {
tableColumns
:
[
{
label
:
'来源'
,
prop
:
'
sours
e'
,
prop
:
'
goodsSourc
e'
,
width
:
150
,
formatter
:
cellValue
=>
{
return
'嘀加智享平台
'
return
cellValue
.
goodsSource
==
1
?
'嘀加智享平台'
:
'门店自营
'
}
},
{
...
...
@@ -241,6 +264,12 @@ export default {
label
:
'缩略图'
,
addHtml
:
'imageSlot'
},
{
label
:
'门店名称'
,
prop
:
'merchantName'
,
width
:
200
,
addHtml
:
'merchantNameSlot'
},
// {
// label: '供货价格(元)',
// formatter: cellValue => {
...
...
@@ -411,16 +440,18 @@ export default {
}
})
},
filterData
({
saleMerchantList
:
list
},
notFormat
)
{
if
(
notFormat
)
{
filterData
({
saleMerchantList
:
list
},
type
)
{
if
(
type
==
'score'
)
{
return
list
?.
map
(
item
=>
{
return
`
${
item
.
merchantName
||
'--'
}
:
${
item
.
giveIntegral
||
'0'
}
`
})
||
[]
}
else
{
}
else
if
(
type
==
'price'
)
{
return
list
?.
map
(
item
=>
{
let
activityPrice
=
item
.
activityPrice
?
Number
((
Number
(
item
.
activityPrice
)
/
100
).
toFixed
(
2
))
:
0
return
`
${
item
.
merchantName
||
'--'
}
:
${
activityPrice
||
'0'
}
`
return
`
${
activityPrice
||
'0'
}
`
})
||
[]
}
else
{
return
list
?.
map
(
item
=>
item
.
merchantName
)
||
[]
}
},
getParams
()
{
...
...
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