Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
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 c680b113
authored
Mar 10, 2023
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
多规格商品 校验价格修改
1 parent
4ff8630b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
src/views/goods/d2-form/multipleSpecificationForm.vue
src/views/goods/d2-form/multipleSpecificationForm.vue
View file @
c680b11
...
@@ -272,17 +272,17 @@
...
@@ -272,17 +272,17 @@
<td
:style=
"
{ width: specsWidth }">
<td
:style=
"
{ width: specsWidth }">
<el-input
placeholder=
"成本"
<el-input
placeholder=
"成本"
size=
"small"
size=
"small"
:class=
"
{ 'w-80-per': true, 'w-100-per': true, 'border-red':
filterEmpty(subItem.shopPrice
)
&&
subItem.shopPriceEmpty }"
:class=
"
{ 'w-80-per': true, 'w-100-per': true, 'border-red':
(filterEmpty(subItem.shopPrice) || formatPrice(subIndex)
)
&&
subItem.shopPriceEmpty }"
v-model="subItem.shopPrice"
v-model="subItem.shopPrice"
@input="handleShopPrice($event, subIndex)"
@input="handleShopPrice($event, subIndex)"
@blur="handleShopPriceBlur($event, subIndex)">
@blur="handleShopPriceBlur($event, subIndex)">
<el-popover
v-show=
"
filterEmpty(subItem.shopPrice
) && subItem.shopPriceEmpty"
<el-popover
v-show=
"
(filterEmpty(subItem.shopPrice) || formatPrice(subIndex)
) && subItem.shopPriceEmpty"
slot=
"suffix"
slot=
"suffix"
placement=
"top"
placement=
"top"
title
title
width=
"90"
width=
"90"
trigger=
"hover"
trigger=
"hover"
content=
"成本是必填项
"
>
:content=
"formatPrice(subIndex) ? '成本价需≤零售价,成本价需≤最低价' : '成本是必填项'
"
>
<i
class=
"el-icon-warning color-red"
<i
class=
"el-icon-warning color-red"
slot=
"reference"
/>
slot=
"reference"
/>
</el-popover>
</el-popover>
...
@@ -311,16 +311,16 @@
...
@@ -311,16 +311,16 @@
<el-input
placeholder=
"零售"
<el-input
placeholder=
"零售"
size=
"small"
size=
"small"
v-model=
"subItem.upgradePrice"
v-model=
"subItem.upgradePrice"
:class=
"
{ 'w-80-per': true, 'w-100-per': true, 'border-red': (filterEmpty(subItem.upgradePrice) ||
Number(subItem.upgradePrice)
< Number
(
subItem
.
shopPrice
))
&&
subItem
.
upgradePriceEmpty
}"
:class=
"
{ 'w-80-per': true, 'w-100-per': true, 'border-red': (filterEmpty(subItem.upgradePrice) ||
formatPrice(subIndex
))
&&
subItem.upgradePriceEmpty }"
@input="handleUpgradePrice($event, subIndex)"
@input="handleUpgradePrice($event, subIndex)"
@blur="handleUpgradePriceBlur($event, subIndex)">
@blur="handleUpgradePriceBlur($event, subIndex)">
<el-popover
v-show=
"(filterEmpty(subItem.upgradePrice) ||
Number(subItem.upgradePrice)
< Number
(
subItem
.
shopPrice
))
&&
subItem
.
upgradePriceEmpty
"
<el-popover
v-show=
"(filterEmpty(subItem.upgradePrice) ||
formatPrice(subIndex
)) && subItem.upgradePriceEmpty"
slot=
"suffix"
slot=
"suffix"
placement=
"top"
placement=
"top"
title
title
width=
"90"
width=
"90"
trigger=
"hover"
trigger=
"hover"
:content=
"
subItem.upgradePrice && Number(subItem.upgradePrice)
< Number
(
subItem
.
shopPrice
)
?
'零售价需要大于或等于产品成本
'
:
'零售是必填项'"
>
:content=
"
formatPrice(subIndex) ? '零售价需≥成本,零售价需≥最低价
' : '零售是必填项'"
>
<i
class=
"el-icon-warning color-red"
<i
class=
"el-icon-warning color-red"
slot=
"reference"
/>
slot=
"reference"
/>
</el-popover>
</el-popover>
...
@@ -330,16 +330,16 @@
...
@@ -330,16 +330,16 @@
<el-input
placeholder=
"最低价"
<el-input
placeholder=
"最低价"
size=
"small"
size=
"small"
v-model=
"subItem.shopMinPrice"
v-model=
"subItem.shopMinPrice"
:class=
"
{ 'w-80-per': true, 'w-100-per': true, 'border-red': (filterEmpty(subItem.shopMinPrice) ||
Number(subItem.shopMinPrice)
< Number
(
subItem
.
shopPrice
))
&&
subItem
.
shopMinPriceEmpty
}"
:class=
"
{ 'w-80-per': true, 'w-100-per': true, 'border-red': (filterEmpty(subItem.shopMinPrice) ||
formatPrice(subIndex
))
&&
subItem.shopMinPriceEmpty }"
@input="handleShopMinPrice($event, subIndex)"
@input="handleShopMinPrice($event, subIndex)"
@blur="handleShopMinPriceBlur($event, subIndex)">
@blur="handleShopMinPriceBlur($event, subIndex)">
<el-popover
v-show=
"(filterEmpty(subItem.shopMinPrice) ||
Number(subItem.shopMinPrice)
< Number
(
subItem
.
shopPrice
))
&&
subItem
.
shopMinPriceEmpty
"
<el-popover
v-show=
"(filterEmpty(subItem.shopMinPrice) ||
formatPrice(subIndex
)) && subItem.shopMinPriceEmpty"
slot=
"suffix"
slot=
"suffix"
placement=
"top"
placement=
"top"
title
title
width=
"90"
width=
"90"
trigger=
"hover"
trigger=
"hover"
:content=
"
subItem.shopMinPrice && Number(subItem.shopMinPrice)
< Number
(
subItem
.
shopPrice
)
?
'最低价需要大于等于产品成本
'
:
'最低价是必填项'"
>
:content=
"
formatPrice(subIndex) ? '最低价需≥产品成本,最低价需≤零售价
' : '最低价是必填项'"
>
<i
class=
"el-icon-warning color-red"
<i
class=
"el-icon-warning color-red"
slot=
"reference"
/>
slot=
"reference"
/>
</el-popover>
</el-popover>
...
@@ -915,7 +915,7 @@ export default {
...
@@ -915,7 +915,7 @@ export default {
handleUpgradePriceBlur
(
e
,
index
)
{
handleUpgradePriceBlur
(
e
,
index
)
{
const
newValue
=
e
.
target
.
value
const
newValue
=
e
.
target
.
value
if
(
this
.
formatPrice
(
index
)
||
!
newValue
)
{
if
(
this
.
formatPrice
(
index
)
||
!
newValue
)
{
this
.
$set
(
this
.
goodsInfoData
.
goodsSpecificationList
[
index
],
'upgradePrice
Sub
'
,
true
)
this
.
$set
(
this
.
goodsInfoData
.
goodsSpecificationList
[
index
],
'upgradePrice
Empty
'
,
true
)
}
}
},
},
// 选择服务项目
// 选择服务项目
...
@@ -955,7 +955,7 @@ export default {
...
@@ -955,7 +955,7 @@ export default {
handleShopPriceBlur
(
e
,
index
)
{
handleShopPriceBlur
(
e
,
index
)
{
const
newValue
=
e
.
target
.
value
const
newValue
=
e
.
target
.
value
if
(
this
.
formatPrice
(
index
)
||
!
newValue
)
{
if
(
this
.
formatPrice
(
index
)
||
!
newValue
)
{
this
.
$set
(
this
.
goodsInfoData
.
goodsSpecificationList
[
index
],
'shopPrice
Sub
'
,
true
)
this
.
$set
(
this
.
goodsInfoData
.
goodsSpecificationList
[
index
],
'shopPrice
Empty
'
,
true
)
}
}
},
},
// 校验采购价
// 校验采购价
...
@@ -981,7 +981,7 @@ export default {
...
@@ -981,7 +981,7 @@ export default {
handleShopMinPriceBlur
(
e
,
index
)
{
handleShopMinPriceBlur
(
e
,
index
)
{
const
newValue
=
e
.
target
.
value
const
newValue
=
e
.
target
.
value
if
(
this
.
formatPrice
(
index
)
||
!
newValue
)
{
if
(
this
.
formatPrice
(
index
)
||
!
newValue
)
{
this
.
$set
(
this
.
goodsInfoData
.
goodsSpecificationList
[
index
],
'shopMinPrice
Sub
'
,
true
)
this
.
$set
(
this
.
goodsInfoData
.
goodsSpecificationList
[
index
],
'shopMinPrice
Empty
'
,
true
)
}
}
},
},
// 库存预警
// 库存预警
...
...
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