Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-app-operator-master
Commits
324cd867
Commit
324cd867
authored
Nov 01, 2023
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复添加区间价没给默认值
parent
34a84154
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
edit.vue
src/views/ecw/productPrice/edit.vue
+20
-1
No files found.
src/views/ecw/productPrice/edit.vue
View file @
324cd867
...
...
@@ -101,7 +101,7 @@
<div
style=
"font-size:14px; margin:10px 0"
>
{{
$t
(
'
第{index
}
阶梯定价方案
'
,
{
index
:
index
+
1
}
)
}}
:
<
template
v
-
if
=
"
index == form.priceStepList.length - 1 && !readonly
"
>
<
el
-
link
type
=
"
primary
"
@
click
.
native
=
"
form.priceStepList.push({
}
)
"
>
{{
$t
(
'
添加区间
'
)
}}
<
/el-link
>
<
el
-
link
type
=
"
primary
"
@
click
.
native
=
"
addStepPrice
"
>
{{
$t
(
'
添加区间
'
)
}}
<
/el-link
>
<
el
-
divider
direction
=
"
vertical
"
><
/el-divider
>
<
el
-
link
type
=
"
danger
"
@
click
.
native
=
"
form.priceStepList.splice(index, 1)
"
>
{{
$t
(
'
删除
'
)
}}
<
/el-link
>
<
/template
>
...
...
@@ -956,6 +956,25 @@ export default {
// 加上对应的价格,但是不能小于0
this
.
$set
(
item
,
field
,
Math
.
max
(
0
,
Decimal
(
item
[
field
]
||
0
).
plus
(
amount
).
toNumber
()))
}
)
}
,
// 添加区间价
addStepPrice
(){
let
fields
=
{
}
const
obj
=
this
.
form
.
priceStepList
[
0
]
||
{
}
if
(
this
.
form
.
priceType
==
1
){
fields
=
{
allPriceUnit
:
obj
[
'
allPriceUnit
'
],
allVolumeUnit
:
obj
[
'
allVolumeUnit
'
]
}
}
else
{
fields
=
{
transportPriceUnit
:
obj
.
transportPriceUnit
,
transportVolumeUnit
:
obj
.
transportVolumeUnit
,
clearancePriceUnit
:
obj
.
clearancePriceUnit
,
clearanceVolumeUnit
:
obj
.
transportVolumeUnit
,
}
}
this
.
form
.
priceStepList
.
push
(
fields
)
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment