Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9e75ffde
authored
Oct 15, 2024
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车架号复核
1 parent
acefcac6
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
359 additions
and
41 deletions
packageEquity/images/icon-edit.png
packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
packageEquity/pages/carEquity/serviceInfo/serviceInfo.json
packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxml
packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.js
packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.json
packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.sass
packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.wxml
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.js
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.json
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.wxml
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.json
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.wxml
packageEquity/images/icon-edit.png
0 → 100644
View file @
9e75ffd
2.05 KB
packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
View file @
9e75ffd
...
...
@@ -46,7 +46,12 @@ Page({
dialogObj
:
{},
scrollTop
:
0
,
cardSetting
:
true
,
isAsk
:
false
isAsk
:
false
,
// vin二次确认弹窗
showVinDialog
:
false
,
secFormData
:
{},
tempVin
:
''
,
e
:
{}
},
getPickerObj
(
obj
)
{
let
data
=
[]
...
...
@@ -325,48 +330,92 @@ Page({
scrollTop
:
height
// 滚动到的位置(距离顶部 px)
})
},
handleSecondConfirm
(
e
)
{
let
{
serviceInfo
,
conSecondObj
,
isAsk
}
=
this
.
data
if
(
isAsk
)
{
return
true
}
if
(
e
.
detail
?.
type
==
'confirm'
)
{
secondChange
()
{
let
{
showVinDialog
}
=
this
.
data
this
.
setData
({
showVinDialog
:
!
showVinDialog
})
},
handleSecClose
()
{
let
{
tempVin
}
=
this
.
data
this
.
setData
({
secFormData
:
{
carVin
:
''
},
isAsk
:
false
})
if
(
tempVin
)
{
this
.
setData
({
isAsk
:
true
[
'serviceInfo.vin'
]:
tempVin
,
tempVin
:
''
})
carLifeApi
.
checkVin
({
vin
:
serviceInfo
.
vin
}
this
.
secondChange
()
},
handleSecConfirm
(
e
)
{
let
{
detail
}
=
e
this
.
setData
({
[
'serviceInfo.vin'
]:
detail
.
carVin
,
tempVin
:
detail
.
carVin
})
this
.
api
()
},
api
()
{
let
{
serviceInfo
,
conSecondObj
,
isAsk
,
e
}
=
this
.
data
this
.
setData
({
isAsk
:
true
})
carLifeApi
.
checkVin
({
vin
:
serviceInfo
.
vin
})
.
then
(
res
=>
{
this
.
setData
({
isAsk
:
false
})
.
then
(
res
=>
{
this
.
setData
({
isAsk
:
false
})
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
this
.
confirm
(
e
)
}
else
if
(
res
.
code
==
'-2'
)
{
if
(
conSecondObj
.
vin
==
serviceInfo
.
vin
)
{
this
.
confirm
(
e
)
}
else
if
(
res
.
code
==
'-2'
)
{
if
(
conSecondObj
.
vin
==
serviceInfo
.
vin
)
{
this
.
confirm
(
e
)
this
.
setData
({
[
'conSecondObj.vin'
]:
''
})
}
else
{
this
.
setData
({
[
'conSecondObj.vin'
]:
serviceInfo
.
vin
,
dialogObj
:
JSON
.
parse
(
JSON
.
stringify
(
errorObj
)),
[
'dialogObj.tipTxt'
]:
res
.
message
,
isDialogShow
:
true
})
}
this
.
setData
({
[
'conSecondObj.vin'
]:
''
,
e
:
{}
})
}
else
{
this
.
setData
({
[
'conSecondObj.vin'
]:
serviceInfo
.
vin
,
dialogObj
:
JSON
.
parse
(
JSON
.
stringify
(
errorObj
)),
[
'dialogObj.tipTxt'
]:
res
.
message
,
isDialogShow
:
true
isDialogShow
:
true
,
e
:
{}
})
wx
.
$util
.
showToast
(
res
.
message
||
'接口异常'
)
}
})
}
else
{
this
.
setData
({
dialogObj
:
JSON
.
parse
(
JSON
.
stringify
(
errorObj
)),
[
'dialogObj.tipTxt'
]:
res
.
message
,
isDialogShow
:
true
,
e
:
{}
})
wx
.
$util
.
showToast
(
res
.
message
||
'接口异常'
)
}
})
},
handleSecondConfirm
(
e
)
{
console
.
log
(
e
)
let
{
serviceInfo
,
conSecondObj
,
isAsk
}
=
this
.
data
if
(
isAsk
)
{
return
true
}
if
(
e
.
detail
?.
type
==
'confirm'
)
{
this
.
setData
({
secFormData
:
{
carVin
:
serviceInfo
.
vin
},
e
:
e
})
this
.
secondChange
()
}
else
{
this
.
confirm
(
e
)
}
...
...
packageEquity/pages/carEquity/serviceInfo/serviceInfo.json
View file @
9e75ffd
...
...
@@ -3,6 +3,7 @@
"usingComponents"
:
{
"first-step"
:
"../components/FirstStep/FirstStep"
,
"second-step"
:
"../components/SecondStep/SecondStep"
,
"shade-tip"
:
"../components/ShadeTip/ShadeTip"
"shade-tip"
:
"../components/ShadeTip/ShadeTip"
,
"vin-sec-dialog"
:
"../../carQuotation/components/VinSecDialog/VinSecDialog"
}
}
packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxml
View file @
9e75ffd
...
...
@@ -3,4 +3,6 @@
<first-step wx:if="{{step == 'first'}}" id="FirstStep" serviceInfo="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bindconfirm="handleFirstConfirm" binddraft="handleSecondConfirm"></first-step>
<second-step wx:if="{{step == 'second'}}" cardSetting="{{cardSetting}}" id="SecondStep" serviceInfo="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bindvaliderror="handleErrorJump" bindconfirm="handleSecondConfirm" binddraft="handleSecondConfirm"></second-step>
<shade-tip isShow="{{isDialogShow}}" type="{{dialogObj.type}}" title="{{dialogObj.title}}" tipTxt="{{dialogObj.tipTxt}}" btnTxt="{{dialogObj.btnTxt}}" bindclick="handleTipClick" bindclose="handleTipClose" data-type="{{dialogObj.type}}"></shade-tip>
</view>
\ No newline at end of file
</view>
<!-- vin二次复核 -->
<vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog>
\ No newline at end of file
packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.js
0 → 100644
View file @
9e75ffd
// packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
showVinDialog
:
Boolean
,
secFormData
:
Object
},
/**
* 组件的初始数据
*/
data
:
{
vinFormat
:
''
,
formData
:
{
carVin
:
''
},
disable
:
true
,
that
:
this
,
beforeClose
:
null
,
// (action, done) => {
// console.log('?????')
// if (action === "confirm") {
// let { carVin } = this.data.formData
// if (!carVin) {
// wx.$util.showToast('车架号不能为空')
// return done(false)
// }
// if (!/^[a-zA-Z0-9]{17}$/.test(carVin)) {
// wx.$util.showToast('车架号请输入17位数字和字母')
// return done(false)
// }
// done(true)
// }
// }
},
lifetimes
:
{
attached
()
{
let
{
carVin
}
=
this
.
data
.
secFormData
this
.
setData
({
'formData.carVin'
:
carVin
||
''
,
vinFormat
:
carVin
.
replace
(
/
(
.
{4})
/g
,
"$1 "
)
})
}
},
/**
* 组件的方法列表
*/
methods
:
{
handleInput
(
e
)
{
let
inputValue
=
e
.
detail
this
.
setData
({
'formData.carVin'
:
inputValue
})
},
changeVal
(
e
)
{
let
{
attr
,
val
}
=
e
.
target
.
dataset
this
.
setData
({
[
attr
]:
false
})
},
dialogClost
(
type
)
{
this
.
setData
({
beforeClose
:
(
action
)
=>
new
Promise
((
resolve
)
=>
{
if
(
action
===
'confirm'
)
{
// 点击确定,根据传入的状态判断是否取消
resolve
(
type
)
}
else
if
(
action
===
'cancel'
)
{
// 取消则直接关闭
resolve
(
true
)
}
}),
})
},
onClose
()
{
this
.
triggerEvent
(
'onClose'
)
},
onConfirm
(
e
)
{
let
{
carVin
}
=
this
.
data
.
formData
if
(
!
carVin
)
{
wx
.
$util
.
showToast
(
'车架号不能为空'
)
return
this
.
dialogClost
(
false
)
// 表单校验不通过
}
if
(
!
(
/^
[
a-zA-Z0-9
]{17}
$/
.
test
(
carVin
)))
{
wx
.
$util
.
showToast
(
'车架号请输入17位数字和字母'
)
return
this
.
dialogClost
(
false
)
// 表单校验不通过
}
this
.
triggerEvent
(
'onConfirm'
,
{
carVin
:
carVin
})
this
.
dialogClost
(
true
)
// 表单校验通过
}
}
})
packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.json
0 → 100644
View file @
9e75ffd
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.sass
0 → 100644
View file @
9e75ffd
/* packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.wxss */
.dialog-class
{
font-size
:
var
(
--
fontSize28
)
;
font-weight
:
400
;
}
.title_text
{
font-family
:
PingFangSC-Medium
;
color
:
#222222
;
font-size
:
var
(
--
fontSize32
)
;
font-weight
:
600
;
text-align
:
center
;
}
.message-box
{
font-size
:
var
(
--
fontSize28
)
;
color
:
#000000
a6
;
padding
:
40rpx
40rpx
50rpx
;
}
.label
{
padding
:
32rpx
0
8rpx
;
}
.vin-row
{
display
:
flex
;
align-items
:
center
;
}
.vin-txt
{
background
:
#F4F5F7
;
border
:
2rpx
solid
#EFF0F2
;
border-radius
:
12rpx
;
font-size
:
var
(
--
fontSize28
)
;
color
:
#999999
;
flex
:
1
;
padding
:
30rpx
24rpx
;
}
.vin-input
{
font-size
:
var
(
--
fontSize28
)
;
padding
:
24rpx
24rpx
!
important
;
border
:
2rpx
solid
#EFF0F2
;
border-radius
:
12rpx
;
}
.pictureIcon
{
display
:
inline-block
;
width
:
var
(
--
fontSize36
)
;
height
:
var
(
--
fontSize36
)
;
margin
:
0
24rpx
;
flex-shrink
:
0
;
}
\ No newline at end of file
packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.wxml
0 → 100644
View file @
9e75ffd
<!--packageEquity/pages/carQuotation/components/VinSecDialog/VinSecDialog.wxml-->
<van-dialog use-slot title="车架号复核" show="{{ showVinDialog }}" class="dialog-class" width="var(--fontSize622)" show-cancel-button confirmButtonText="确认提交" confirm-button-color="#3582EE" use-title-slot="{{ true }}" bind:confirm="onConfirm" bind:close="onClose" before-close="{{beforeClose}}">
<view slot="title">
<view class="title_text">车架号复核</view>
</view>
<view class="message-box">
<view>请核对车架号是否正确,如信息有误后期将无法申请补偿服务!</view>
<view class="label">车架号:</view>
<view class="vin-row">
<view style="flex: 1;">
<view class="vin-txt" wx:if="{{disable}}">{{vinFormat}}</view>
<van-field wx:else custom-class="vin-input" custom-style="width: 100%; font-size: var(--fontSize28); background: #F4F5F7;" value="{{formData.carVin}}" autosize hold-keyboard placeholder="请输入车架号" maxlength="17" data-attr="carVin" bindinput="handleInput" />
</view>
<image wx:if="{{disable}}" class="pictureIcon" src="/packageEquity/images/icon-edit.png" data-attr="disable" data-val="false" bindtap="changeVal" />
</view>
</view>
</van-dialog>
\ No newline at end of file
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.js
View file @
9e75ffd
...
...
@@ -56,12 +56,48 @@ Page({
dataAttrName
:
'owner'
,
step
:
'first'
,
// step: 'second',
needChangeList
:
[
'price'
,
'base'
,
'threePremium'
,
'carInsidePremium'
,
'passengerPremium'
,
'payPrice'
]
needChangeList
:
[
'price'
,
'base'
,
'threePremium'
,
'carInsidePremium'
,
'passengerPremium'
,
'payPrice'
],
// vin二次确认弹窗
showVinDialog
:
false
,
secFormData
:
{},
tempVin
:
''
},
secondChange
()
{
let
{
showVinDialog
}
=
this
.
data
this
.
setData
({
showVinDialog
:
!
showVinDialog
})
},
handleSecClose
()
{
let
{
tempVin
}
=
this
.
data
this
.
setData
({
secFormData
:
{
carVin
:
''
},
})
if
(
tempVin
)
{
console
.
log
(
tempVin
,
'tempVin----'
)
this
.
setData
({
'owner.carVin'
:
tempVin
,
tempVin
:
''
})
}
this
.
secondChange
()
},
handleSecConfirm
(
e
)
{
let
{
detail
}
=
e
this
.
setData
({
[
'owner.carVin'
]:
detail
.
carVin
,
tempVin
:
detail
.
carVin
})
},
reWrite
(
type
,
data
)
{
console
.
log
(
type
,
data
)
let
{
owner
}
=
this
.
data
if
(
type
==
'vehicleCertificate'
)
{
this
.
setData
({
tempVin
:
this
.
data
.
owner
.
carVin
})
let
{
vinNo
:
carVin
,
seatingCapacity
:
seat
,
engineNo
:
engineNumber
,
carColor
}
=
data
owner
=
Object
.
assign
(
owner
,
{
carVin
,
...
...
@@ -69,6 +105,15 @@ Page({
engineNumber
,
carColor
})
owner
.
carVin
=
''
if
(
carVin
)
{
this
.
setData
({
secFormData
:
{
carVin
:
carVin
}
})
this
.
secondChange
(
carVin
)
}
}
if
(
type
==
'idCard'
)
{
// debugger
...
...
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.json
View file @
9e75ffd
...
...
@@ -2,7 +2,8 @@
"navigationBarTitleText"
:
"服务信息"
,
"usingComponents"
:
{
"first-step"
:
"../components/FirstStep/FirstStep"
,
"second-step"
:
"../components/SecondStep/SecondStep"
"second-step"
:
"../components/SecondStep/SecondStep"
,
"vin-sec-dialog"
:
"../components/VinSecDialog/VinSecDialog"
},
"navigationStyle"
:
"custom"
}
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.wxml
View file @
9e75ffd
...
...
@@ -16,4 +16,6 @@
<view class="layout" style="padding-top:{{navBarHeight}}px; ">
<first-step wx:if="{{step == 'first'}}" id="FirstStep" serviceInfo="{{owner}}" dataAttrName="{{dataAttrName}}" orderInfo="{{orderInfo}}" bindconfirm="handleFirstConfirm" bindeditSave="handleEditSave" mode="{{0}}" />
<second-step wx:if="{{step == 'second'}}" id="SecondStep" orderInfo="{{orderInfo}}" quotationGoodsList="{{quotationGoodsList}}" bindconfirm="handleSecondConfirm" bindeditSave="handleEditSave" />
</view>
\ No newline at end of file
</view>
<!-- vin二次复核 -->
<vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog>
\ No newline at end of file
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
9e75ffd
...
...
@@ -96,17 +96,52 @@ Page({
"quotedPriceUpdate"
,
"minEquityPrice"
,
],
firstEnter
:
true
firstEnter
:
true
,
// vin二次确认弹窗
showVinDialog
:
false
,
secFormData
:
{},
tempVin
:
''
},
closeTips
()
{
this
.
setData
({
showTips
:
false
,
});
},
secondChange
()
{
let
{
showVinDialog
}
=
this
.
data
this
.
setData
({
showVinDialog
:
!
showVinDialog
})
},
handleSecClose
()
{
let
{
tempVin
}
=
this
.
data
this
.
setData
({
secFormData
:
{
carVin
:
''
},
})
if
(
tempVin
)
{
this
.
setData
({
'owner.carVin'
:
tempVin
,
tempVin
:
''
})
}
this
.
secondChange
()
},
handleSecConfirm
(
e
)
{
let
{
detail
}
=
e
this
.
setData
({
[
'owner.carVin'
]:
detail
.
carVin
,
tempVin
:
detail
.
carVin
})
},
reWrite
(
type
,
data
)
{
console
.
log
(
type
,
data
);
let
{
owner
}
=
this
.
data
;
if
(
type
==
"vehicleCertificate"
)
{
this
.
setData
({
tempVin
:
this
.
data
.
owner
.
carVin
})
let
{
vinNo
:
carVin
,
seatingCapacity
:
seat
,
...
...
@@ -119,6 +154,15 @@ Page({
engineNumber
,
carColor
,
});
owner
.
carVin
=
''
if
(
carVin
)
{
this
.
setData
({
secFormData
:
{
carVin
:
carVin
}
})
this
.
secondChange
(
carVin
)
}
}
if
(
type
==
"idCard"
)
{
let
{
...
...
@@ -318,6 +362,7 @@ Page({
orderInfo
.
paymentDocList
=
_tempMap
}
// -------
wx
.
showLoading
(
"报价中..."
);
let
result
=
await
this
.
handleSecondConfirmCheck
(
true
);
let
{
code
,
data
:
id
,
message
}
=
result
;
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.json
View file @
9e75ffd
...
...
@@ -3,7 +3,8 @@
"usingComponents"
:
{
"first-step"
:
"../components/FirstStep/FirstStep"
,
"second-step"
:
"../components/SecondStepSimple/SecondStep"
,
"order-popup"
:
"../components/OrderPopup/OrderPopup"
"order-popup"
:
"../components/OrderPopup/OrderPopup"
,
"vin-sec-dialog"
:
"../components/VinSecDialog/VinSecDialog"
},
"navigationStyle"
:
"custom"
}
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.wxml
View file @
9e75ffd
...
...
@@ -25,4 +25,6 @@
<view class="confirm text-center" bindtap="submit">提交工单</view>
</view> -->
</view>
<order-popup orderType="{{orderInfo.payType }}" resetTransNo="{{orderInfo.transactionNo || orderInfo.outTradeNo}}" resetOrder="{{orderInfo.resetOrder}}" wx:if="{{showPopup}}" show="{{showPopup}}" />
\ No newline at end of file
<order-popup orderType="{{orderInfo.payType }}" resetTransNo="{{orderInfo.transactionNo || orderInfo.outTradeNo}}" resetOrder="{{orderInfo.resetOrder}}" wx:if="{{showPopup}}" show="{{showPopup}}" />
<!-- vin二次复核 -->
<vin-sec-dialog wx:if="{{showVinDialog}}" showVinDialog="{{showVinDialog}}" secFormData="{{secFormData}}" bindonClose="handleSecClose" bindonConfirm="handleSecConfirm"></vin-sec-dialog>
\ No newline at end of file
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