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 c67fcd8e
authored
Aug 09, 2024
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
最低价和售价校验修改
1 parent
e4cf0989
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
src/views/goods/packageManage/components/packageForm.vue
src/views/goods/packageManage/components/packageForm.vue
View file @
c67fcd8
...
...
@@ -31,7 +31,7 @@
:id="`groundingGoodsList[${eleIndex}][${item.name}]`"
:label-width="item.label ? '180px' : '0px'" class="dis-in-block"
:style="{ 'margin-bottom': !item.type ? '0px' : '22px' }">
<el-radio-group
v-model=
"ele[item.name]"
>
<el-radio-group
v-model=
"ele[item.name]"
@
change=
"($event, index) => upgradeSupplyModeChange($event, eleIndex)"
>
<el-radio
v-for=
"(subItem, subIndex) in item.radioGroupList"
:key=
"subIndex"
:label=
"subItem.confId"
>
{{
subItem
.
confName
}}
</el-radio>
</el-radio-group>
...
...
@@ -83,7 +83,7 @@
<!--
下拉框
/
输入框
-->
<
div
v
-
if
=
"item.type === 'input' || item.type === 'select' || item.type === 'searchSelect'"
>
<
el
-
form
-
item
:
prop
=
"
`groundingGoodsList[${eleIndex
}
][${item.name
}
]`"
:rules="
rules
[
item
.
name
]
"
:rules="
item
.
name
==
'minSellPrice'
?
rules
[
item
.
name
+
eleIndex
]
:
rules
[
item
.
name
]
"
:label="
item
.
label
?
(
item
.
unit
?
(
membraneTypeList
.
includes
(
ele
[
'goodsType'
])
?
item
.
label
+
`(元)/车`
:
(
item
.
label
+
'(元)/件'
))
:
item
.
label
)
+
':'
:
''
"
:id="`groundingGoodsList[${eleIndex
}
][${item.name
}
]`" :label-width="
item
.
label
?
'180px'
:
'0px'
" class="
dis
-
in
-
block
"
:style="
{
'margin-bottom'
:
!
item
.
type
?
'0px'
:
'22px'
}
">
...
...
@@ -279,16 +279,6 @@ export default {
upgradeGoodsId
:
[{
required
:
true
,
message
:
'请选择上架商品'
,
trigger
:
'change'
}
],
position
:
[{
required
:
true
,
message
:
'请选择上架部位'
,
trigger
:
'change'
}
],
sellPrice
:
[{
required
:
true
,
message
:
'请输入售价'
,
trigger
:
'blur'
}
],
minSellPrice
:
[
{
required
:
true
,
message
:
'请输入最低售价'
,
trigger
:
'blur'
}
,
{
required
:
true
,
trigger
:
'blur'
,
validator
:
(
rule
,
value
,
callback
)
=>
{
(
+
value
>
+
this
.
formData
.
sellPrice
)
?
callback
(
new
Error
(
'最低售价不能大于售价'
))
:
callback
()
}
}
],
upgradeSupplyMode
:
[{
required
:
true
,
message
:
'请选择升级/产品供应模式'
,
trigger
:
'change'
}
],
upgradeProductCost
:
[{
required
:
true
,
message
:
'请输入产品、升级成本'
,
trigger
:
'blur'
}
],
recoveryCost
:
[{
required
:
true
,
message
:
'请输入回收成本'
,
trigger
:
'blur'
}
],
...
...
@@ -385,6 +375,7 @@ export default {
this
.
formData
.
minSellPrice
=
acc
.
minSellPrice
this
.
formData
.
djCost
=
acc
.
djCost
this
.
formData
.
thirdPartyCost
=
acc
.
thirdPartyCost
this
.
checkMinPrice
()
}
}
,
deep
:
true
...
...
@@ -410,12 +401,28 @@ export default {
mounted
()
{
this
.
formData
=
deepClone
(
this
.
originData
)
this
.
checkMinPrice
()
}
,
methods
:
{
...
mapActions
({
get
:
'd2admin/base/get'
}
),
checkMinPrice
()
{
let
_rules
=
this
.
rules
this
.
formData
?.
groundingGoodsList
?.
forEach
((
item
,
index
)
=>
{
_rules
[
'minSellPrice'
+
index
]
=
[
{
required
:
true
,
message
:
'请输入最低售价'
,
trigger
:
'blur'
}
,
{
required
:
true
,
trigger
:
'blur'
,
validator
:
(
rule
,
value
,
callback
)
=>
{
(
+
value
>
+
item
.
sellPrice
)
?
callback
(
new
Error
(
'最低售价不能大于售价'
))
:
callback
()
}
}
]
}
)
}
,
filterForm
(
index
)
{
const
{
formList
,
formData
}
=
this
const
itemData
=
formData
?.
groundingGoodsList
[
index
]
...
...
@@ -508,6 +515,11 @@ export default {
}
}
,
50
)
}
,
// 修改升级产品供货模式
upgradeSupplyModeChange
(
e
,
index
)
{
this
.
$set
(
this
.
formData
.
groundingGoodsList
[
index
],
'recoveryCost'
,
''
)
this
.
$set
(
this
.
formData
.
groundingGoodsList
[
index
],
'virtualAccountCost'
,
''
)
}
,
// 限制上传文件个数
hanldeOnExceed
()
{
this
.
$message
({
...
...
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