Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
243da124
authored
Apr 22, 2024
by
puhui999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 调整价格弹窗不出来问题
parent
deb4585d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
src/views/mall/trade/order/form/OrderUpdatePriceForm.vue
+8
-5
No files found.
src/views/mall/trade/order/form/OrderUpdatePriceForm.vue
View file @
243da124
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
</el-form-item>
</el-form-item>
<el-form-item
label=
"订单调价"
>
<el-form-item
label=
"订单调价"
>
<el-input-number
v-model=
"formData.adjustPrice"
:precision=
"2"
:step=
"0.1"
class=
"w-100%"
/>
<el-input-number
v-model=
"formData.adjustPrice"
:precision=
"2"
:step=
"0.1"
class=
"w-100%"
/>
<el-tag
class=
"m
t
-10px"
type=
"warning"
>
订单调价。 正数,加价;负数,减价
</el-tag>
<el-tag
class=
"m
l
-10px"
type=
"warning"
>
订单调价。 正数,加价;负数,减价
</el-tag>
</el-form-item>
</el-form-item>
<el-form-item
label=
"调价后"
>
<el-form-item
label=
"调价后"
>
<el-input
v-model=
"formData.newPayPrice"
disabled
/>
<el-input
v-model=
"formData.newPayPrice"
disabled
/>
...
@@ -38,10 +38,13 @@ const formData = ref({
...
@@ -38,10 +38,13 @@ const formData = ref({
})
})
watch
(
watch
(
()
=>
formData
.
value
.
adjustPrice
,
()
=>
formData
.
value
.
adjustPrice
,
(
data
:
number
)
=>
{
(
adjustPrice
:
number
|
string
)
=>
{
const
num
=
formData
.
value
.
payPrice
!
.
replace
(
'元'
,
''
)
const
numMatch
=
formData
.
value
.
payPrice
.
match
(
/
\d
+
(\.\d
+
)?
/
)
// @ts-ignore
if
(
numMatch
)
{
formData
.
value
.
newPayPrice
=
(
num
*
1
+
data
).
toFixed
(
2
)
+
'元'
const
payPriceNum
=
parseFloat
(
numMatch
[
0
])
adjustPrice
=
typeof
adjustPrice
===
'string'
?
parseFloat
(
adjustPrice
)
:
adjustPrice
formData
.
value
.
newPayPrice
=
(
payPriceNum
+
adjustPrice
).
toFixed
(
2
)
+
'元'
}
}
}
)
)
...
...
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