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