Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d177e970
authored
Aug 12, 2024
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit 提交
1 parent
94f0107d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
56 deletions
components/FinishStep.vue
components/Insurance/Insurance.vue
components/Insurance/components/InsuranceTable.vue
pages/common/components/Scene.vue
pages/equity/detail/detail.vue
components/FinishStep.vue
View file @
d177e97
...
...
@@ -148,7 +148,8 @@ export default {
customerType
:
{
type
:
Number
,
default
:
1
}
},
titleTips
:
String
},
data
()
{
return
{
...
...
@@ -218,8 +219,8 @@ export default {
return
this
.
$store
.
state
.
user
.
historyStatus
},
tips
()
{
let
{
sceneType
}
=
this
,
text
=
'检测到“交车通知书”中未填写客户档案,请填写后再完成接待。'
let
{
sceneType
,
titleTips
}
=
this
,
text
=
titleTips
||
'检测到“交车通知书”中未填写客户档案,请填写后再完成接待。'
if
(
sceneType
==
1
)
text
=
'请确认“精品加装服务说明页”中的客户信息,并点击完成接待结束客户接待。'
return
text
}
...
...
@@ -381,7 +382,7 @@ export default {
}
.required
{
&::before
{
content
:
"*"
;
content
:
'*'
;
color
:
#ff0000
;
position
:
absolute
;
left
:
-20
rpx
;
...
...
components/Insurance/Insurance.vue
View file @
d177e97
...
...
@@ -111,7 +111,7 @@ export default {
key
:
'newCarFare'
,
type
:
'input'
,
inputType
:
'digit'
,
maxlength
:
9
,
maxlength
:
10
,
unit
:
'元'
,
},
],
...
...
@@ -165,10 +165,10 @@ export default {
if
(
e
?.
currentTarget
&&
e
?.
target
)
{
const
{
key
}
=
e
.
currentTarget
.
dataset
if
(
key
==
'newCarFare'
)
{
let
value
=
Number
(
e
.
target
.
value
>=
999999
?
999999
:
e
.
target
.
value
)
let
value
=
Number
(
e
.
target
.
value
)
>=
9999999
?
9999999
:
e
.
target
.
value
// 判断是否为整数
if
(
!
Number
.
isInteger
(
value
))
value
=
String
(
value
).
replace
(
/
(\d
*
\.?\d{0,2})\d
*/
,
'$1'
)
this
.
customerInfo
[
key
]
=
Number
(
value
).
toFixed
(
2
)
?
value
>
0
?
value
:
''
:
''
this
.
customerInfo
[
key
]
=
Number
(
value
).
toFixed
(
2
)
?
value
>
=
0
?
value
:
''
:
''
this
.
inputCustomer
()
}
}
...
...
components/Insurance/components/InsuranceTable.vue
View file @
d177e97
...
...
@@ -176,9 +176,9 @@ export default {
handleInput
(
event
)
{
let
value
=
event
.
target
.
value
,
{
index
}
=
event
.
currentTarget
.
dataset
value
=
Number
(
value
>
999999
?
999999
:
value
)
// 使用正则表达式来限制小数点后的位数
this
.
insuranceList
[
index
].
cost
=
Number
(
value
).
toFixed
(
2
)
>
0
?
String
(
value
).
replace
(
/
(\d
*
\.?\d{0,2})\d
*/
,
'$1'
)
:
''
value
=
Number
(
value
)
>
999999
?
999999
:
value
if
(
!
Number
.
isInteger
(
value
))
value
=
String
(
value
).
replace
(
/
(\d
*
\.?\d{0,2})\d
*/
,
'$1'
)
this
.
insuranceList
[
index
].
cost
=
Number
(
value
).
toFixed
(
2
)
?
value
>=
0
?
value
:
''
:
''
},
defaultBlock
(
item
)
{
return
item
.
main
==
'交强险'
?
(
this
.
isPreview
?
'has-default'
:
item
.
show
?
'has-default'
:
''
)
:
''
...
...
@@ -216,8 +216,8 @@ export default {
this
.
setInsuranceList
(
storageKey
,
list
||
[])
}
else
{
cons
t
{
insuranceList
}
=
this
,
combinedList
=
[...
insuranceList
,
...
list
]
le
t
{
insuranceList
}
=
this
,
combinedList
=
[...
insuranceList
,
...
list
]
const
deduplicatedList
=
combinedList
.
reduce
((
acc
,
item
)
=>
{
const
existingItem
=
acc
.
find
(
existing
=>
String
(
existing
.
id
)
===
String
(
item
.
id
));
if
(
existingItem
)
{
...
...
@@ -227,7 +227,12 @@ export default {
}
else
acc
.
push
(
item
)
return
acc
;
},
[])
this
.
setInsuranceList
(
storageKey
,
deduplicatedList
)
let
arr
=
[]
deduplicatedList
.
map
(
e
=>
{
let
index
=
list
.
findIndex
(
item
=>
String
(
item
.
id
)
===
String
(
e
.
id
))
if
(
index
!=
-
1
)
arr
.
push
(
e
)
})
this
.
setInsuranceList
(
storageKey
,
arr
)
}
}
catch
(
error
)
{
this
.
flag
=
true
...
...
pages/common/components/Scene.vue
View file @
d177e97
...
...
@@ -72,59 +72,72 @@ export default {
},
// 选择场景
async
selectScene
({
sceneType
},
index
)
{
let
{
sceneList
,
openSceneArr
,
userInfo
}
=
this
if
(
!
openSceneArr
.
includes
(
sceneType
)
&&
!
userInfo
?.
isSuper
)
return
uni
.
showToast
(
{
title
:
'暂未开通此场景'
,
icon
:
'none'
})
sceneList
.
map
(
i
=>
(
i
.
actived
=
false
)
)
sceneList
[
index
].
actived
=
true
this
.
sceneList
=
sceneList
userInfo
.
sceneType
=
sceneType
uni
.
showLoading
({
mask
:
true
})
if
(
userInfo
?.
isSuper
)
this
.
jump
(
userInfo
)
else
{
try
{
let
{
sceneList
,
openSceneArr
,
userInfo
}
=
this
try
{
if
(
!
openSceneArr
.
includes
(
sceneType
)
&&
!
userInfo
?.
isSuper
)
return
uni
.
showToast
({
title
:
'暂未开通此场景'
,
icon
:
'none'
}
)
sceneList
.
map
(
i
=>
(
i
.
actived
=
false
))
sceneList
[
index
].
actived
=
true
this
.
sceneList
=
sceneList
userInfo
.
sceneType
=
sceneType
uni
.
showLoading
({
mask
:
true
}
)
if
(
userInfo
?.
isSuper
)
this
.
jump
(
userInfo
)
else
{
const
data
=
await
uni
.
$api
.
userApi
.
selectMerchantScene
({
merchantId
:
userInfo
.
shopMerchantId
,
merchantName
:
userInfo
.
shopMerchantName
,
sceneType
})
if
(
data
)
this
.
jump
(
userInfo
,
data
)
}
catch
(
error
)
{
uni
.
hideLoading
()
uni
.
showToast
({
title
:
error
,
icon
:
'none'
})
else
{
this
.
$sendSentry
(
`选择场景异常:merchantId:
${
userInfo
.
shopMerchantId
}
,merchantName:
${
userInfo
.
shopMerchantName
}
,sceneType:
${
sceneType
}
,接口返回:
${
JSON
.
stringify
(
data
||
''
)}
`
)
}
}
}
catch
(
error
)
{
this
.
$sendSentry
(
`选择场景异常:merchantId:
${
userInfo
.
shopMerchantId
}
,merchantName:
${
userInfo
.
shopMerchantName
}
,sceneType:
${
sceneType
}
,失败原因:
${
JSON
.
stringify
(
error
)}
`
)
uni
.
hideLoading
()
uni
.
showToast
({
title
:
error
,
icon
:
'none'
})
console
.
log
(
error
)
}
},
async
jump
(
userInfo
,
data
)
{
uni
.
hideLoading
()
if
(
data
)
userInfo
.
loginRoleOnSelectMerchant
=
data
?.
loginRoleOnSelectMerchant
let
{
shopMerchantId
}
=
userInfo
//调接口获取门店主营品牌
uni
.
showLoading
({
mask
:
true
})
const
res
=
await
uni
.
$api
.
userApi
.
getMerchantBrand
({
merchantId
:
shopMerchantId
})
uni
.
hideLoading
()
userInfo
.
channelType
=
res
.
channelType
||
1
// 默认1 1问界 2 比亚迪 3 其他
// userInfo.channelType = 3
uni
.
$storage
.
set
(
'userInfo'
,
userInfo
)
let
url
=
{
1
:
'/pages/boutique/index'
,
0
:
'/pages/equity/index'
}[
userInfo
.
sceneType
]
uni
.
reLaunch
({
url
})
try
{
uni
.
hideLoading
()
if
(
data
)
userInfo
.
loginRoleOnSelectMerchant
=
data
?.
loginRoleOnSelectMerchant
let
{
shopMerchantId
}
=
userInfo
//调接口获取门店主营品牌
uni
.
showLoading
({
mask
:
true
})
const
res
=
await
uni
.
$api
.
userApi
.
getMerchantBrand
({
merchantId
:
shopMerchantId
})
uni
.
hideLoading
()
userInfo
.
channelType
=
res
.
channelType
||
1
// 默认1 1问界 2 比亚迪 3 其他
// userInfo.channelType = 3
uni
.
$storage
.
set
(
'userInfo'
,
userInfo
)
let
url
=
{
1
:
'/pages/boutique/index'
,
0
:
'/pages/equity/index'
}[
userInfo
.
sceneType
]
uni
.
reLaunch
({
url
})
}
catch
(
error
)
{
this
.
$sendSentry
(
`选择场景后跳转异常:
${
error
}
`
)
uni
.
hideLoading
()
uni
.
showToast
({
title
:
error
,
icon
:
'none'
})
}
}
}
}
...
...
pages/equity/detail/detail.vue
View file @
d177e97
...
...
@@ -71,6 +71,7 @@
<finish-step
ref=
"stepRef"
@
submit=
"done"
:titleTips=
"finishTips"
/>
<informationEntry
:showPayPage
.
sync=
"showPayPage"
...
...
@@ -139,6 +140,12 @@ export default {
name
=
this
.
media
.
find
((
e
)
=>
e
.
id
==
id
)?.
detailTitle
||
""
return
name
;
},
finishTips
(){
const
{
channelType
}
=
uni
.
$storage
.
get
(
"userInfo"
)
let
text
=
''
if
(
channelType
!=
1
)
text
=
'检测到“汽车保险告知书”中未填写客户档案,请填写后再完成接待。'
return
text
}
},
watch
:
{
watchStatus
:
{
...
...
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