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 e9559a37
authored
Feb 14, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改活动库存
1 parent
47e16908
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
28 deletions
src/components/selectSingleProDialog/index.vue
src/views/seckillActivity/crowdFundList.vue
src/views/seckillActivity/editCrowdFund.vue
src/components/selectSingleProDialog/index.vue
View file @
e9559a3
...
...
@@ -32,11 +32,15 @@
:key=
"item.id"
:label=
"item.id"
>
<img
<
!--
<
img
v-show=
"infoIdList.includes(item.id)"
class=
"icon-check"
src=
"@/assets/icon-check.png"
/>
/>
-->
<div
class=
"icon-number icon-check"
v-show=
"infoIdList.includes(item.id)"
>
{{
infoIdList
.
findIndex
(
e
=>
item
.
id
==
e
)
+
1
}}
</div>
<img
class=
"goods-img"
:src=
"item.goodsImage"
...
...
src/views/seckillActivity/crowdFundList.vue
View file @
e9559a3
...
...
@@ -448,25 +448,22 @@ export default {
prop
:
'verificationNumber'
},
{
label
:
'定金(元)'
,
name
:
'activityPrice'
,
width
:
140
,
formatter
:
cellValue
=>
{
return
(
cellValue
.
activityPrice
/
100
).
toFixed
(
2
)
}
label
:
'定金/元'
,
prop
:
'activityPrice'
,
addHtml
:
'joinText'
,
width
:
100
},
{
label
:
'众筹价(元)'
,
name
:
'crowdFundingPrice'
,
width
:
140
,
formatter
:
cellValue
=>
{
return
(
cellValue
.
crowdFundingPrice
/
100
).
toFixed
(
2
)
}
label
:
'众筹价/元'
,
prop
:
'crowdFundingPrice'
,
addHtml
:
'joinText'
,
width
:
100
},
{
label
:
'库存'
,
prop
:
'goodsStock'
,
width
:
110
prop
:
'activityGoodsStock'
,
addHtml
:
'joinText'
,
width
:
100
},
{
label
:
'创建日期'
,
...
...
@@ -729,7 +726,7 @@ export default {
formatterNumber
(
cell
,
key
)
{
const
str
=
[]
cell
?.
goodsList
?.
map
(
e
=>
{
str
.
push
(
key
!=
'
g
oodsStock'
?
(
e
[
key
]
/
100
).
toFixed
(
2
)
:
e
[
key
])
str
.
push
(
key
!=
'
activityG
oodsStock'
?
(
e
[
key
]
/
100
).
toFixed
(
2
)
:
e
[
key
])
})
return
str
.
length
>
0
?
str
.
join
(
','
)
:
'--'
}
...
...
src/views/seckillActivity/editCrowdFund.vue
View file @
e9559a3
...
...
@@ -169,15 +169,15 @@
</div>
<div
class=
"goods-form-item"
slot=
"
g
oodsStock"
slot=
"
activityG
oodsStock"
>
<el-input
v-model=
"i.
g
oodsStock"
v-model=
"i.
activityG
oodsStock"
:data-index=
"index"
style=
"width: 136px"
:disabled=
"isDisabled"
type=
"number"
@
input=
"formatAppend(i.
goodsStock,'g
oodsStock',index, true)"
@
input=
"formatAppend(i.
activityGoodsStock,'activityG
oodsStock',index, true)"
></el-input>
</div>
</glsx-combi-form>
...
...
@@ -1606,13 +1606,15 @@ export default {
trigger
:
'change'
}
],
g
oodsStock
:
[
activityG
oodsStock
:
[
{
required
:
true
,
message
:
'请设置活动库存'
,
trigger
:
'change'
},
{
validator
:
(
rule
,
value
,
callback
)
=>
{
const
{
dataset
:
{
index
}
}
=
event
.
target
||
event
.
srcElement
const
{
dataset
:
{
index
}
}
=
event
.
target
||
event
.
srcElement
,
{
selectedProInfo
}
=
this
if
(
typeof
index
==
'undefined'
&&
value
>
-
1
)
return
callback
()
if
(
value
<
1
)
return
callback
(
new
Error
(
'请设置活动库存'
))
if
(
value
>
selectedProInfo
[
index
].
goodsStock
)
return
callback
(
new
Error
(
'不能大于商品库存'
))
},
trigger
:
'change'
}
...
...
@@ -1636,8 +1638,8 @@ export default {
},
{
label
:
'活动库存'
,
name
:
'
g
oodsStock'
,
addHtml
:
'
g
oodsStock'
name
:
'
activityG
oodsStock'
,
addHtml
:
'
activityG
oodsStock'
}
],
// 服务说明
...
...
@@ -2451,8 +2453,8 @@ export default {
},
formatAppend
(
val
,
target
,
index
,
isInt
)
{
let
str
=
String
(
val
)
if
(
str
.
split
(
'.'
).
length
>
1
)
val
=
str
.
slice
(
0
,
str
.
indexOf
(
'.'
)
+
3
)
if
(
isInt
)
val
=
Math
.
floor
(
val
)
if
(
str
.
split
(
'.'
).
length
)
val
=
str
.
slice
(
0
,
str
.
indexOf
(
'.'
)
+
3
)
this
.
editForm
.
goodsList
[
index
][
target
]
=
val
<
0
?
1
:
val
},
handleSingleSelectConfirm
(
list
)
{
...
...
@@ -2468,7 +2470,7 @@ export default {
if
(
i
.
id
==
e
.
goodsId
)
arr
[
index
]
=
{
...
arr
[
index
],
activityPrice
:
e
.
activityPrice
,
g
oodsStock
:
e
.
goodsStock
,
activityG
oodsStock
:
e
.
goodsStock
,
crowdFundingPrice
:
e
.
crowdFundingPrice
,
}
})
...
...
@@ -2795,7 +2797,7 @@ export default {
activityPrice
:
(
e
.
activityPrice
/
100
).
toFixed
(
2
),
crowdFundingPrice
:
(
e
.
crowdFundingPrice
/
100
).
toFixed
(
2
),
goodsId
:
e
.
goodsId
,
g
oodsStock
:
e
.
activityGoodsStock
activityG
oodsStock
:
e
.
activityGoodsStock
})
selectedProInfo
.
push
({
id
:
e
.
goodsId
,
...
...
@@ -3129,7 +3131,7 @@ export default {
flag
=
false
break
}
if
(
!
item
.
g
oodsStock
)
{
if
(
!
item
.
activityG
oodsStock
)
{
this
.
$message
({
message
:
'有未设置活动库存的项'
,
type
:
'error'
...
...
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