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 9b73fae7
authored
Feb 08, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
d43df1b5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
43 deletions
src/views/seckillActivity/editCrowdFund.vue
src/views/seckillActivity/editCrowdFund.vue
View file @
9b73fae
...
@@ -181,7 +181,10 @@
...
@@ -181,7 +181,10 @@
></el-input>
></el-input>
</div>
</div>
</glsx-combi-form>
</glsx-combi-form>
<div
class=
"del flex-align"
@
click=
"delGoods(index)"
>
<div
class=
"del flex-align"
@
click=
"delGoods(index)"
>
<img
src=
"@/assets/icon-del.png"
/>
<img
src=
"@/assets/icon-del.png"
/>
</div>
</div>
</div>
</div>
...
@@ -263,6 +266,7 @@
...
@@ -263,6 +266,7 @@
<el-radio-group
<el-radio-group
v-model=
"editForm[scope.scope.name]"
v-model=
"editForm[scope.scope.name]"
@
change=
"handleIsLimit"
@
change=
"handleIsLimit"
:disabled=
"limitPurchaseDisabled"
>
>
<el-radio
<el-radio
v-for=
"(item, index) in scope.scope.optionList"
v-for=
"(item, index) in scope.scope.optionList"
...
@@ -1155,6 +1159,8 @@ export default {
...
@@ -1155,6 +1159,8 @@ export default {
relateStoreVisible
:
false
,
// 选择门店
relateStoreVisible
:
false
,
// 选择门店
limitPurchaseDisabled
:
false
,
//多商品禁用限购
selectedList
:
[],
selectedList
:
[],
selectedProInfo
:
[],
selectedProInfo
:
[],
// selectedProInfo: {},
// selectedProInfo: {},
...
@@ -1168,11 +1174,6 @@ export default {
...
@@ -1168,11 +1174,6 @@ export default {
activityImg
:
''
,
activityImg
:
''
,
promotion
:
''
,
promotion
:
''
,
activityTime
:
[],
activityTime
:
[],
// activityPrice: '', 改-定金
activityPriceList
:
[],
// goodsStock: '', 改-库存
goodsStockList
:
[],
crowdFundingPriceList
:
[],
goodsList
:
[],
goodsList
:
[],
limitPurchaseFlag
:
1
,
limitPurchaseFlag
:
1
,
limitPurchaseNumber
:
''
,
limitPurchaseNumber
:
''
,
...
@@ -2149,12 +2150,6 @@ export default {
...
@@ -2149,12 +2150,6 @@ export default {
'editForm.liveBroadcastRoomId'
(
newValue
,
oldValue
)
{
'editForm.liveBroadcastRoomId'
(
newValue
,
oldValue
)
{
this
.
editForm
.
liveFlag
=
newValue
?
true
:
false
this
.
editForm
.
liveFlag
=
newValue
?
true
:
false
},
},
'editForm.goodsId'
(
newValue
,
oldValue
)
{
if
(
newValue
)
{
let
idx
=
this
.
editFormData
.
findIndex
(
val
=>
val
.
name
==
'goodsCategory'
)
this
.
editFormData
[
idx
].
isHide
=
false
}
},
'editForm.targetStock'
(
newValue
,
oldValue
)
{
'editForm.targetStock'
(
newValue
,
oldValue
)
{
this
.
editForm
.
targetStock
=
limitPrice
(
newValue
,
oldValue
,
99999
,
0
)
this
.
editForm
.
targetStock
=
limitPrice
(
newValue
,
oldValue
,
99999
,
0
)
},
},
...
@@ -2311,15 +2306,9 @@ export default {
...
@@ -2311,15 +2306,9 @@ export default {
this
.
editRule
.
limitPurchaseNumber
[
0
].
required
=
val
!=
1
this
.
editRule
.
limitPurchaseNumber
[
0
].
required
=
val
!=
1
},
},
handleRelateProChange
(
val
)
{
handleRelateProClose
()
{
this
.
editRule
.
goodsId
[
0
].
required
=
val
==
2
var
idx
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'goodsId'
)
this
.
editFormData
[
idx
].
isHide
=
val
!=
2
},
handleRelateProClose
(
targetItem
)
{
// 先选门店在选商品
// 先选门店在选商品
if
(
!
this
.
editForm
.
merchantId
)
return
this
.
$message
.
error
(
'请先选择门店!'
)
if
(
!
this
.
editForm
.
merchantId
)
return
this
.
$message
.
error
(
'请先选择门店!'
)
//多选 this.selectedProInfo = this.editForm.goodsId ? { id: this.editForm.goodsId } : {}
this
.
handleSingleSelectClose
()
this
.
handleSingleSelectClose
()
},
},
formatAppend
(
val
,
target
,
index
,
isInt
)
{
formatAppend
(
val
,
target
,
index
,
isInt
)
{
...
@@ -2349,15 +2338,11 @@ export default {
...
@@ -2349,15 +2338,11 @@ export default {
}
else
list
.
map
(
e
=>
{
}
else
list
.
map
(
e
=>
{
arr
.
push
({
goodsId
:
e
.
id
})
arr
.
push
({
goodsId
:
e
.
id
})
})
})
// 多选 this.editForm.goodsId = selectedProInfo.id
// this.getGoodInfo(selectedProInfo.id)
this
.
selectedProInfo
=
list
||
[]
this
.
selectedProInfo
=
list
||
[]
this
.
editForm
.
goodsList
=
arr
||
[]
this
.
editForm
.
goodsList
=
arr
||
[]
this
.
setLimitPurchase
()
},
},
handleSingleSelectClose
(
isCancel
=
false
)
{
handleSingleSelectClose
(
isCancel
=
false
)
{
// if (isCancel) {
// this.selectedProInfo.id && this.getGoodInfo(this.selectedProInfo.id)
// }
this
.
isSingleSelectVisible
=
!
this
.
isSingleSelectVisible
this
.
isSingleSelectVisible
=
!
this
.
isSingleSelectVisible
},
},
...
@@ -2738,7 +2723,7 @@ export default {
...
@@ -2738,7 +2723,7 @@ export default {
}
}
// 复制
// 复制
if
(
this
.
routeInfo
.
addOrEdit
==
'copy'
)
{
if
(
this
.
routeInfo
.
addOrEdit
==
'copy'
)
{
let
resetArr
=
[{
name
:
'id'
},
{
name
:
'activityTime'
,
type
:
'array'
},
{
name
:
'liveBroadcastRoomId'
},
{
name
:
'groupQrCode'
},
{
name
:
'floatingMaskDiagram'
},
{
name
:
'liveBroadcastRoomCover'
},
{
name
:
'liveBroadcastRoomEndCover'
},
{
name
:
'selectedProInfo'
,
type
:
'Object'
},
{
name
:
'goods
Id
'
},
{
name
:
'activityPrice'
},
{
name
:
'crowdFundingPrice'
},
{
name
:
'goodsStock'
}]
let
resetArr
=
[{
name
:
'id'
},
{
name
:
'activityTime'
,
type
:
'array'
},
{
name
:
'liveBroadcastRoomId'
},
{
name
:
'groupQrCode'
},
{
name
:
'floatingMaskDiagram'
},
{
name
:
'liveBroadcastRoomCover'
},
{
name
:
'liveBroadcastRoomEndCover'
},
{
name
:
'selectedProInfo'
,
type
:
'Object'
},
{
name
:
'goods
List
'
},
{
name
:
'activityPrice'
},
{
name
:
'crowdFundingPrice'
},
{
name
:
'goodsStock'
}]
this
.
copyReset
(
resetArr
)
this
.
copyReset
(
resetArr
)
}
}
// 兼容以前众筹活动没有战报内容配置,展示页面
// 兼容以前众筹活动没有战报内容配置,展示页面
...
@@ -2787,22 +2772,12 @@ export default {
...
@@ -2787,22 +2772,12 @@ export default {
})
})
},
},
validateRules
()
{
if
(
this
.
specificationDetailList
.
length
)
{
this
.
editRule
.
activityPrice
[
0
].
required
=
false
this
.
editRule
.
goodsStock
[
0
].
required
=
false
}
else
{
this
.
editRule
.
activityPrice
[
0
].
required
=
true
this
.
editRule
.
goodsStock
[
0
].
required
=
true
}
},
getCouponInfoParams
()
{
getCouponInfoParams
()
{
var
_this
=
this
var
_this
=
this
var
param
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
var
param
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
param
.
marketingType
=
3
param
.
marketingType
=
3
//改
param
.
goodsList
.
map
(
e
=>
{
param
.
goodsList
.
map
(
e
=>
{
e
.
activityPrice
=
(
e
.
activityPrice
*
100
).
toFixed
(
0
)
//存的分,需乘100
e
.
activityPrice
=
(
e
.
activityPrice
*
100
).
toFixed
(
0
)
//存的分,需乘100
e
.
crowdFundingPrice
=
(
e
.
crowdFundingPrice
*
100
).
toFixed
(
0
)
//存的分,需乘100
e
.
crowdFundingPrice
=
(
e
.
crowdFundingPrice
*
100
).
toFixed
(
0
)
//存的分,需乘100
})
})
...
@@ -2814,7 +2789,6 @@ export default {
...
@@ -2814,7 +2789,6 @@ export default {
param
.
startTime
=
d
[
0
]
param
.
startTime
=
d
[
0
]
param
.
endTime
=
d
[
1
]
param
.
endTime
=
d
[
1
]
}
}
// param.goodsId = this.selectedProInfo.id
if
(
this
.
nameToValSpecsList
.
length
>
0
)
{
if
(
this
.
nameToValSpecsList
.
length
>
0
)
{
delete
param
.
activityPrice
delete
param
.
activityPrice
delete
param
.
goodsStock
delete
param
.
goodsStock
...
@@ -2930,9 +2904,9 @@ export default {
...
@@ -2930,9 +2904,9 @@ export default {
},
},
addOrUpdate
()
{
addOrUpdate
()
{
//
this.loading = true
this
.
loading
=
true
var
params
=
this
.
getCouponInfoParams
()
var
params
=
this
.
getCouponInfoParams
()
console
.
table
({
...
params
})
console
.
table
({
...
params
})
this
.
$apis
.
seckillActivity
this
.
$apis
.
seckillActivity
.
addOrUpdateActivityApi
(
params
)
.
addOrUpdateActivityApi
(
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
...
@@ -2978,7 +2952,6 @@ export default {
...
@@ -2978,7 +2952,6 @@ export default {
this
.
editForm
.
activityServices
=
this
.
delListAllEmpty
(
'activityServices'
,
[
'title'
,
'content'
])
this
.
editForm
.
activityServices
=
this
.
delListAllEmpty
(
'activityServices'
,
[
'title'
,
'content'
])
this
.
editForm
.
activityCommoditys
=
this
.
delListAllEmpty
(
'activityCommoditys'
,
[
'question'
,
'answer'
])
this
.
editForm
.
activityCommoditys
=
this
.
delListAllEmpty
(
'activityCommoditys'
,
[
'question'
,
'answer'
])
this
.
editForm
.
activityExperienceDTOs
=
this
.
delListAllEmpty
(
'activityExperienceDTOs'
,
[
'experience'
,
'activityExperienceImgs'
])
this
.
editForm
.
activityExperienceDTOs
=
this
.
delListAllEmpty
(
'activityExperienceDTOs'
,
[
'experience'
,
'activityExperienceImgs'
])
// this.validateRules()
var
flag
=
true
var
flag
=
true
if
(
this
.
nameToValSpecsList
&&
this
.
nameToValSpecsList
.
length
>
0
)
{
if
(
this
.
nameToValSpecsList
&&
this
.
nameToValSpecsList
.
length
>
0
)
{
var
list
=
this
.
nameToValSpecsList
var
list
=
this
.
nameToValSpecsList
...
@@ -3134,10 +3107,19 @@ export default {
...
@@ -3134,10 +3107,19 @@ export default {
},
},
/**删除商品 */
/**删除商品 */
delGoods
(
index
){
delGoods
(
index
)
{
this
.
editForm
.
goodsList
.
splice
(
index
,
1
)
this
.
editForm
.
goodsList
.
splice
(
index
,
1
)
this
.
selectedProInfo
.
splice
(
index
,
1
)
this
.
selectedProInfo
.
splice
(
index
,
1
)
this
.
setLimitPurchase
()
},
setLimitPurchase
()
{
const
{
goodsList
}
=
this
.
editForm
if
(
goodsList
.
length
>
1
)
this
.
editForm
.
limitPurchaseFlag
=
1
this
.
limitPurchaseDisabled
=
goodsList
.
length
>
1
}
}
}
}
}
}
</
script
>
</
script
>
...
...
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