Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-presale
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 4328f39d
authored
Dec 14, 2023
by
zhangquan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改保险金额change事件
1 parent
8250ab5b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
src/views/claims/components/repair.vue
src/views/claims/components/repair.vue
View file @
4328f39
...
...
@@ -27,11 +27,11 @@
<p
class=
"name"
>
{{
item
.
serviceItemName
}}
</p>
<div
class=
"price-wrap"
>
<label
class=
"label"
for=
""
>
定损批准金额:
</label>
<el-input
:disabled=
"pageType == 2 || renewDisable"
maxlength=
"10"
@
input=
"validPrice($event, index
)"
@
blur=
"changePrice($event, index
)"
placeholder=
"请输入"
v-model=
"item.approveAmount"
></el-input>
<el-input
:disabled=
"pageType == 2 || renewDisable"
maxlength=
"10"
@
input=
"validPrice($event, index
, 'approveAmount')"
@
blur=
"changePrice($event, index, 'approveAmount'
)"
placeholder=
"请输入"
v-model=
"item.approveAmount"
></el-input>
</div>
<div
v-if=
"item.lossAssessmentFlag"
class=
"price-wrap"
>
<label
class=
"label"
for=
""
>
保险公司定损金额:
</label>
<el-input
:disabled=
"pageType == 2 || renewDisable"
maxlength=
"10"
@
input=
"validPrice($event, index
)"
@
blur=
"changePrice($event, index
)"
placeholder=
"请输入"
v-model=
"item.lossAssessmentAmount"
></el-input>
<el-input
:disabled=
"pageType == 2 || renewDisable"
maxlength=
"10"
@
input=
"validPrice($event, index
, 'lossAssessmentAmount')"
@
blur=
"changePrice($event, index, 'lossAssessmentAmount'
)"
placeholder=
"请输入"
v-model=
"item.lossAssessmentAmount"
></el-input>
</div>
</div>
</
template
>
...
...
@@ -309,8 +309,8 @@ export default {
IDCardTypeList
.
optionList
=
res
.
cardType
})
},
validPrice
(
e
,
id
)
{
let
checkPlan
=
''
+
this
.
serviceItemsList
[
id
]
.
approveAmount
validPrice
(
e
,
id
,
key
)
{
let
checkPlan
=
''
+
this
.
serviceItemsList
[
id
]
[
key
]
checkPlan
=
checkPlan
.
replace
(
/
[^\d
.
]
/g
,
''
)
.
replace
(
/
\.{2,}
/g
,
'.'
)
...
...
@@ -323,22 +323,22 @@ export default {
}
else
if
(
checkPlan
.
indexOf
(
'.'
)
>=
0
)
{
checkPlan
=
checkPlan
.
replace
(
/^
()
*
(\d
+
)\.(\d\d)
.*$/
,
'$1$2.$3'
)
// 只能输入两个小数
}
this
.
$set
(
this
.
serviceItemsList
[
id
],
'approveAmount'
,
checkPlan
)
this
.
$set
(
this
.
serviceItemsList
[
id
],
key
,
checkPlan
)
},
changePrice
(
e
,
id
)
{
changePrice
(
e
,
id
,
key
)
{
if
(
!
e
.
target
.
value
)
return
const
len
=
e
.
target
.
value
.
length
let
lastStr
=
e
.
target
.
value
.
charAt
(
len
-
1
)
if
(
lastStr
===
'.'
)
{
this
.
$set
(
this
.
serviceItemsList
[
id
],
'approveAmount'
,
e
.
target
.
value
.
substr
(
0
,
len
-
1
))
this
.
$set
(
this
.
serviceItemsList
[
id
],
key
,
e
.
target
.
value
.
substr
(
0
,
len
-
1
))
}
const
minPrice
=
1
if
(
Number
(
e
.
target
.
value
)
<
minPrice
)
{
this
.
$set
(
this
.
serviceItemsList
[
id
],
'approveAmount'
,
1
)
this
.
$set
(
this
.
serviceItemsList
[
id
],
key
,
1
)
}
const
maxPrice
=
2000000
if
(
Number
(
e
.
target
.
value
)
>
maxPrice
)
{
this
.
$set
(
this
.
serviceItemsList
[
id
],
'approveAmount'
,
maxPrice
)
this
.
$set
(
this
.
serviceItemsList
[
id
],
key
,
maxPrice
)
}
}
}
...
...
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