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
61ed19e8
Commit
61ed19e8
authored
Feb 28, 2025
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
费用申请金额允许输入的小数点限制为2位数
parent
3f5d9139
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
feeApplication.vue
src/views/ecw/order/feeApplication.vue
+12
-1
No files found.
src/views/ecw/order/feeApplication.vue
View file @
61ed19e8
...
...
@@ -57,7 +57,7 @@
<
template
v-slot:default=
"scope"
>
<el-input
:disabled=
"!scope.row.editMode && !!scope.row.status"
v-model=
"scope.row.applicationFee"
type=
"number"
v-model=
"scope.row.applicationFee"
type=
"number"
@
input=
"formatAmount(scope.row)"
></el-input>
</
template
>
</el-table-column>
...
...
@@ -283,6 +283,17 @@ export default {
});
},
methods
:
{
formatAmount
(
row
)
{
// 使用正则表达式限制输入为数字和小数点,并限制小数点后最多两位数字
// row.applicationFee = row.applicationFee.replace(/[^\d.]/g, '').replace(/(\..*)\./g, '$1');
if
(
row
.
applicationFee
.
indexOf
(
'
.
'
)
>
-
1
)
{
const
decimalPart
=
row
.
applicationFee
.
split
(
'
.
'
)[
1
];
if
(
decimalPart
.
length
>
2
)
{
row
.
applicationFee
=
row
.
applicationFee
.
substring
(
0
,
row
.
applicationFee
.
length
-
(
decimalPart
.
length
-
2
));
}
}
},
del
(
index
)
{
this
.
$confirm
(
this
.
$t
(
"
确定要删除此条费用申请么?
"
)).
then
(()
=>
{
this
.
list
.
splice
(
index
,
1
);
...
...
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