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 8fc0bc78
authored
Oct 25, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.20.1' into 'master'
V3.20.1 See merge request
!29
2 parents
9e75ad04
22e69ddc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
10 deletions
src/components/FormatInput/index.vue
src/views/goods/addPrefer.vue
src/views/goods/preferList.vue
src/views/store/edit.vue
src/components/FormatInput/index.vue
View file @
8fc0bc7
...
...
@@ -38,8 +38,8 @@ export default {
},
blurFn
(
e
){
let
value
=
e
.
target
.
value
if
(
this
.
minVal
&&
+
this
.
minVal
>=
value
)
value
=
this
.
minVal
if
(
value
&&
value
.
charAt
(
value
.
length
-
1
)
==
'.'
)
value
=
value
.
substr
(
0
,
value
.
length
-
1
)
if
(
this
.
minVal
&&
+
this
.
minVal
>=
value
)
value
=
this
.
minVal
+
''
if
(
value
&&
value
?
.
charAt
(
value
.
length
-
1
)
==
'.'
)
value
=
value
.
substr
(
0
,
value
.
length
-
1
)
this
.
$emit
(
'input'
,
value
)
}
}
...
...
src/views/goods/addPrefer.vue
View file @
8fc0bc7
...
...
@@ -32,9 +32,16 @@
v-model=
"scope.scope.originalPrice"
></format-input>
</div>
<div
slot=
"giveIntegralSlot"
slot-scope=
"scope"
>
<format-input
:disabled=
"disabled"
:intDigit=
"6"
:precise=
"
2
"
placeholder=
"请输入"
<format-input
:disabled=
"disabled"
:intDigit=
"6"
:precise=
"
0
"
placeholder=
"请输入"
v-model=
"scope.scope.giveIntegral"
></format-input>
</div>
<div
slot=
"integralFlagSlot"
slot-scope=
"scope"
>
<el-switch
:disabled=
"disabled"
v-model=
"scope.scope.exchangeIntegralFlag"
@
change=
"changeIntegralFlagFn($event, scope.scope)"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
</div>
<div
slot=
"exchangeIntegralSlot"
slot-scope=
"scope"
>
<format-input
:disabled=
"disabled || scope.scope.exchangeIntegralFlag!=1"
:intDigit=
"6"
:precise=
"0"
placeholder=
"请输入"
v-model=
"scope.scope.exchangeIntegral"
></format-input>
</div>
<div
slot=
"auth-button"
slot-scope=
"scope"
>
<el-button
v-if=
"!disabled"
type=
"text"
@
click=
"handleDel(scope.scope)"
>
删除
</el-button>
</div>
...
...
@@ -134,13 +141,23 @@ const defalutMerchantColumns = [
},
{
label
:
'门店价格(元)'
,
width
:
22
0
,
width
:
18
0
,
addHtml
:
'activityPriceSlot'
},
{
label
:
'赠送积分'
,
width
:
22
0
,
width
:
18
0
,
addHtml
:
'giveIntegralSlot'
},
{
label
:
'是否支持积分兑换'
,
width
:
150
,
addHtml
:
'integralFlagSlot'
},
{
label
:
'兑换积分'
,
width
:
180
,
addHtml
:
'exchangeIntegralSlot'
}
]
...
...
@@ -321,6 +338,7 @@ export default {
return
!
(
+
activityPrice
)
||
!
(
+
originalPrice
)
})
const
_integralTarget
=
this
.
saleMerchantList
.
find
(
item
=>
!
item
.
giveIntegral
&&
item
.
giveIntegral
!==
0
)
const
_exchangeintegralTarget
=
this
.
saleMerchantList
.
find
(
item
=>
this
.
formObj
.
goodsSource
==
1
&&
item
.
exchangeIntegralFlag
&&
(
!
item
.
exchangeIntegral
||
item
.
exchangeIntegral
==
0
))
const
hasTarget
=
this
.
saleMerchantList
.
find
(
item
=>
{
let
originalPrice
=
item
.
originalPrice
||
0
let
activityPrice
=
item
.
activityPrice
||
0
...
...
@@ -335,6 +353,8 @@ export default {
callback
(
new
Error
(
'原价不能小于最低售价和活动价'
))
}
else
if
(
_integralTarget
)
{
callback
(
new
Error
(
'请输入赠送积分'
))
}
else
if
(
_exchangeintegralTarget
)
{
callback
(
new
Error
(
'请输入大于0的兑换积分'
))
}
else
{
callback
()
}
...
...
@@ -468,6 +488,11 @@ export default {
}
},
methods
:
{
changeIntegralFlagFn
(
e
,
item
)
{
if
(
e
!=
1
){
item
.
exchangeIntegral
=
''
}
},
changeMethod
(
e
,
isClear
){
const
_target
=
this
.
expressInfoFormData
.
find
(
item
=>
item
.
name
==
'expressFee'
)
if
(
_target
){
...
...
@@ -622,7 +647,11 @@ export default {
},
confirmDialog
(
e
)
{
this
.
saleMerchantList
=
e
||
[]
this
.
saleMerchantList
.
map
(
item
=>
this
.
$set
(
item
,
'giveIntegral'
,
''
))
this
.
saleMerchantList
.
map
(
item
=>
{
this
.
$set
(
item
,
'giveIntegral'
,
''
)
this
.
$set
(
item
,
'exchangeIntegralFlag'
,
0
)
this
.
$set
(
item
,
'exchangeIntegral'
,
''
)
})
this
.
validateField
(
'saleStoreSlot'
)
this
.
closeDialog
()
},
...
...
@@ -646,10 +675,15 @@ export default {
delete
obj
.
coverList
delete
obj
.
styleBImgList
let
saleMerchantList
=
this
.
saleMerchantList
.
map
(
item
=>
{
let
{
merchantId
,
merchantName
,
activityPrice
,
giveIntegral
,
originalPrice
}
=
item
let
{
merchantId
,
merchantName
,
activityPrice
,
giveIntegral
,
originalPrice
,
exchangeIntegralFlag
,
exchangeIntegral
}
=
item
activityPrice
=
activityPrice
?
Number
(
Number
(
activityPrice
*
10
*
10
).
toFixed
(
0
))
:
0
originalPrice
=
originalPrice
?
Number
(
Number
(
originalPrice
*
10
*
10
).
toFixed
(
0
))
:
0
return
{
merchantId
,
merchantName
,
activityPrice
,
giveIntegral
,
originalPrice
}
let
saleMerchantItem
=
{
merchantId
,
merchantName
,
activityPrice
,
giveIntegral
,
originalPrice
}
if
(
this
.
formObj
.
goodsSource
==
1
)
{
saleMerchantItem
.
exchangeIntegralFlag
=
exchangeIntegralFlag
saleMerchantItem
.
exchangeIntegral
=
exchangeIntegralFlag
?
exchangeIntegral
:
''
}
return
saleMerchantItem
})
const
params
=
{
saleMerchantList
:
saleMerchantList
,
...
...
@@ -742,7 +776,7 @@ export default {
.selected-table
{
margin-top
:
10px
;
width
:
97
0px
;
width
:
120
0px
;
.el-button--text
{
padding
:
0
;
...
...
src/views/goods/preferList.vue
View file @
8fc0bc7
...
...
@@ -92,6 +92,24 @@
<span
v-else
>
{{
filterData
(
scope
.
scope
,
'score'
).
join
(
'、'
)
}}
</span>
</
template
>
</div>
<div
slot=
"exchangeIntegralSlot"
slot-scope=
"scope"
>
<
template
v-if=
"scope.scope.saleMerchantList && scope.scope.saleMerchantList.length > 1"
>
<span>
{{
filterData
(
scope
.
scope
,
'exchange'
).
slice
(
0
,
1
).
join
(
'、'
)
}}
</span>
<el-popover
placement=
"top"
width=
"400"
trigger=
"hover"
>
<div
v-for=
"(item,index) in filterData(scope.scope,'exchange')"
: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 || scope.scope.goodsSource==2"
>
--
</span>
<span
v-else
>
{{
filterData
(
scope
.
scope
,
'exchange'
).
join
(
'、'
)
}}
</span>
</
template
>
</div>
<div
class=
"table-btns"
slot=
"auth-button"
slot-scope=
"scope"
>
<GLTableButton
:buttonList=
"buttonList"
:buttonItem=
"scope"
:buttonNum=
"4"
></GLTableButton>
</div>
...
...
@@ -313,6 +331,11 @@ export default {
addHtml
:
'giveIntegralSlot'
},
{
label
:
'积分兑换'
,
width
:
200
,
addHtml
:
'exchangeIntegralSlot'
},
{
label
:
'商品分类'
,
width
:
180
,
prop
:
'associationClassifyFirstName'
...
...
@@ -445,7 +468,11 @@ export default {
return
list
?.
map
(
item
=>
{
return
`
${
item
.
merchantName
||
'--'
}
:
${
item
.
giveIntegral
||
'0'
}
`
})
||
[]
}
else
if
(
type
==
'price'
)
{
}
else
if
(
type
==
'exchange'
){
return
list
?.
map
(
item
=>
{
return
`
${
item
.
merchantName
||
'--'
}
:
${
item
.
exchangeIntegral
||
'否'
}
`
})
||
[]
}
else
if
(
type
==
'price'
)
{
return
list
?.
map
(
item
=>
{
let
activityPrice
=
item
.
activityPrice
?
Number
((
Number
(
item
.
activityPrice
)
/
100
).
toFixed
(
2
))
:
0
return
`
${
activityPrice
||
'0'
}
`
...
...
src/views/store/edit.vue
View file @
8fc0bc7
...
...
@@ -303,6 +303,15 @@ export default {
filter
:
'6'
},
{
label
:
'积分兑换'
,
width
:
150
,
formatter
:
cellValue
=>
{
let
item
=
cellValue
.
saleMerchantList
&&
cellValue
.
saleMerchantList
[
0
]
?
cellValue
.
saleMerchantList
[
0
]
:
{}
return
(
item
.
exchangeIntegralFlag
!=
1
||
cellValue
.
goodsSource
==
2
)?
'否'
:
item
.
exchangeIntegral
},
filter
:
'6'
},
{
label
:
'分类'
,
width
:
150
,
formatter
:
cellValue
=>
{
...
...
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