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 5d2ea8fd
authored
May 12, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
功能开发完成
1 parent
c5afbf83
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
241 additions
and
153 deletions
packageEquity/pages/carQuotation/components/SecondStep/SecondStep.js
packageEquity/pages/carQuotation/components/SecondStep/SecondStep.sass
packageEquity/pages/carQuotation/components/SecondStep/SecondStep.wxml
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.js
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.json
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.wxml
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.js
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.wxml
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
packageEquity/pages/carQuotation/index/index.js
packageEquity/pages/carQuotation/index/index.wxml
project.private.config.json
packageEquity/pages/carQuotation/components/SecondStep/SecondStep.js
View file @
5d2ea8f
...
@@ -43,6 +43,10 @@ Component({
...
@@ -43,6 +43,10 @@ Component({
})
})
}
}
}
}
},
quotationGoodsList
:
{
type
:
Array
,
value
:
()
=>
{}
}
}
},
},
...
@@ -97,6 +101,7 @@ Component({
...
@@ -97,6 +101,7 @@ Component({
onChangeInsurance
(
e
)
{
onChangeInsurance
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
)
let
{
detail
}
=
e
let
{
detail
}
=
e
let
{
id
}
=
e
.
currentTarget
.
dataset
console
.
log
(
detail
,
'detail'
)
console
.
log
(
detail
,
'detail'
)
if
(
!
detail
)
{
if
(
!
detail
)
{
return
this
.
setData
({
return
this
.
setData
({
...
@@ -104,10 +109,28 @@ Component({
...
@@ -104,10 +109,28 @@ Component({
})
})
}
}
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
{
quotationGoodsList
}
=
this
.
data
let
goodsItem
=
quotationGoodsList
.
find
(
item
=>
item
.
id
==
id
)
let
{
id
:
appreciation
,
goodsInfo
,
upgradeGoodsName
:
goodsName
,
upgradeGoodsServiceItemsList
}
=
goodsItem
thisPage
.
setData
({})
let
params
=
thisPage
.
getInsurance
()
let
params
=
thisPage
.
getInsurance
()
let
owner
=
thisPage
.
getOwnerInfo
()
let
owner
=
thisPage
.
getOwnerInfo
()
// const owner = wx.$util.deepClone(thisPage.data.owner)
// const owner = wx.$util.deepClone(thisPage.data.owner)
params
.
owner
=
owner
params
.
owner
=
owner
params
.
goodsId
=
goodsItem
.
id
params
.
goodsName
=
goodsItem
.
goodsName
params
.
insureList
=
params
.
insureList
.
map
(
item
=>
{
if
(
item
.
type
==
3
)
{
item
=
{
appreciation
,
goodsName
,
type
:
3
}
}
return
item
})
// params.owner = owner
// params.owner = owner
// params.owner.price = this.multipliedByHundred(orderInfo.owner?.price) || ''
// params.owner.price = this.multipliedByHundred(orderInfo.owner?.price) || ''
// console.log(thisPage)
// console.log(thisPage)
...
@@ -127,8 +150,21 @@ Component({
...
@@ -127,8 +150,21 @@ Component({
if
(
code
)
{
if
(
code
)
{
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
wx
.
$router
.
getPageInstance
()
thisPage
.
setData
({
thisPage
.
setData
({
[
'orderInfo.quotedPriceUpdate'
]:
data
.
quotedPriceUpdate
[
'orderInfo.quotedPriceUpdate'
]:
data
.
quotedPriceUpdate
,
[
'orderInfo.goodsId'
]:
goodsItem
.
id
,
[
'orderInfo.goodsName'
]:
goodsItem
.
goodsName
,
[
'orderInfo.valueAddedVehicleLoss'
]:
{
appreciation
,
goodsName
,
type
:
3
},
[
'orderInfo.quotationGoodsInfo'
]:
{
titlePictureUrl
:
goodsInfo
.
thumbUrl
,
goodsName
,
quotationGoodsServiceItemsRelationDTOList
:
upgradeGoodsServiceItemsList
}
})
})
this
.
setData
({
this
.
setData
({
insuranceCheck
:
true
,
insuranceCheck
:
true
,
...
...
packageEquity/pages/carQuotation/components/SecondStep/SecondStep.sass
View file @
5d2ea8f
...
@@ -216,7 +216,20 @@
...
@@ -216,7 +216,20 @@
}
}
}
}
}
}
.goodsCheckItem
{
display
:
flex
;
.check
{
display
:
flex
;
align-items
:
center
;
text-align
:
center
;
}
.goodsInfo
{
// flex: 1;
width
:
80%
;
}
}
.errorMessage
{
.errorMessage
{
// text-align: right;
// text-align: right;
padding-left
:
20rpx
;
padding-left
:
20rpx
;
...
...
packageEquity/pages/carQuotation/components/SecondStep/SecondStep.wxml
View file @
5d2ea8f
This diff is collapsed.
Click to expand it.
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.js
View file @
5d2ea8f
...
@@ -101,17 +101,20 @@ Component({
...
@@ -101,17 +101,20 @@ Component({
onChangeInsurance
(
e
)
{
onChangeInsurance
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
)
let
{
detail
}
=
e
let
{
detail
}
=
e
console
.
log
(
detail
,
'detail'
)
let
{
id
}
=
e
.
currentTarget
.
dataset
if
(
!
detail
)
{
if
(
!
detail
)
return
false
return
this
.
setData
({
insuranceCheck
:
false
})
}
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
wx
.
$router
.
getPageInstance
()
// console.log(detail, 'detail')
let
{
quotationGoodsList
}
=
this
.
data
let
goodsItem
=
quotationGoodsList
.
find
(
item
=>
item
.
id
==
id
)
let
params
=
thisPage
.
getInsurance
()
let
params
=
thisPage
.
getInsurance
()
let
owner
=
thisPage
.
getOwnerInfo
()
let
owner
=
thisPage
.
getOwnerInfo
()
// const owner = wx.$util.deepClone(thisPage.data.owner)
// const owner = wx.$util.deepClone(thisPage.data.owner)
params
.
owner
=
owner
params
.
owner
=
owner
params
.
goodsId
=
goodsItem
.
id
params
.
goodsName
=
goodsItem
.
goodsName
// params.owner = owner
// params.owner = owner
// params.owner.price = this.multipliedByHundred(orderInfo.owner?.price) || ''
// params.owner.price = this.multipliedByHundred(orderInfo.owner?.price) || ''
// console.log(thisPage)
// console.log(thisPage)
...
@@ -131,11 +134,20 @@ Component({
...
@@ -131,11 +134,20 @@ Component({
if
(
code
)
{
if
(
code
)
{
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
wx
.
$router
.
getPageInstance
()
// thisPage.setData({
// // ['orderInfo.quotedPriceUpdate']: data.quotedPriceUpdate
// })
thisPage
.
setData
({
thisPage
.
setData
({
[
'orderInfo.quotedPriceUpdate'
]:
data
.
quotedPriceUpdate
[
'orderInfo.quotedPriceUpdate'
]:
data
.
quotedPriceUpdate
,
[
'orderInfo.minEquityPrice'
]:
data
.
minEquityPrice
,
[
'orderInfo.goodsId'
]:
goodsItem
.
id
,
[
'orderInfo.goodsName'
]:
goodsItem
.
goodsName
})
})
// return
this
.
setData
({
this
.
setData
({
insuranceCheck
:
true
,
// insuranceCheck: true,
showError
:
false
,
testQuotedPriceUpdate
:
data
.
quotedPriceUpdate
/
100
testQuotedPriceUpdate
:
data
.
quotedPriceUpdate
/
100
})
})
}
else
{
}
else
{
...
@@ -270,12 +282,13 @@ Component({
...
@@ -270,12 +282,13 @@ Component({
let
thisPage
=
wx
.
$router
.
getPageInstance
()
let
thisPage
=
wx
.
$router
.
getPageInstance
()
console
.
log
(
attrtype
)
console
.
log
(
attrtype
)
if
(
attr
type
==
'modifyEquityQuotation
'
)
{
if
(
attr
name
==
'quotedPriceUpdate
'
)
{
let
{
orderInfo
}
=
this
.
data
let
{
orderInfo
}
=
this
.
data
let
showError
=
orderInfo
.
m
odifyEquityQuotation
.
m
inEquityPrice
<=
value
?
false
:
true
let
showError
=
orderInfo
.
minEquityPrice
<=
value
?
false
:
true
this
.
setData
({
this
.
setData
({
showError
showError
})
})
if
(
showError
)
return
false
}
}
// ['orderInfo' + '.' + attrType]
// ['orderInfo' + '.' + attrType]
// console.log(['orderInfo' + '.' + attrType], '2')
// console.log(['orderInfo' + '.' + attrType], '2')
...
@@ -285,6 +298,12 @@ Component({
...
@@ -285,6 +298,12 @@ Component({
this
.
cancelInsuranceCheck
()
this
.
cancelInsuranceCheck
()
// console.log(thisPage.data)
// console.log(thisPage.data)
}
}
// onChange (e){
// console.log(e);
// let value = e.detail
// }
// numberFixedDigit (e) { // 固定两位小数
// numberFixedDigit (e) { // 固定两位小数
// e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || ''
// e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || ''
// this.$nextTick(() => {
// this.$nextTick(() => {
...
...
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.json
View file @
5d2ea8f
...
@@ -7,6 +7,8 @@
...
@@ -7,6 +7,8 @@
"van-collapse-item"
:
"@vant/weapp/collapse-item/index"
,
"van-collapse-item"
:
"@vant/weapp/collapse-item/index"
,
"van-checkbox"
:
"@vant/weapp/checkbox/index"
,
"van-checkbox"
:
"@vant/weapp/checkbox/index"
,
"popup-input"
:
"../PopupInput/PopupInput"
,
"popup-input"
:
"../PopupInput/PopupInput"
,
"custom-content"
:
"/components/ContentHiden/content"
"custom-content"
:
"/components/ContentHiden/content"
,
"van-radio"
:
"@vant/weapp/radio/index"
,
"van-radio-group"
:
"@vant/weapp/radio-group/index"
}
}
}
}
packageEquity/pages/carQuotation/components/SecondStepSimple/SecondStep.wxml
View file @
5d2ea8f
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</view>
</view>
<view class="box">
<view class="box">
<view class="title">商业险总价</view>
<view class="title">商业险总价</view>
<van-field class="inputBox" border="{{false}}" disabled="{{disable}}" data-hold-keyboard value="{{orderInfo.
business.base}}" data-attrName="base" data-type='number' type="digit" placeholder="请输入商业险总价" data-attrType="business
" bindinput="handleInput">
<van-field class="inputBox" border="{{false}}" disabled="{{disable}}" data-hold-keyboard value="{{orderInfo.
insurancePrice}}" data-attrName="insurancePrice" data-type='number' type="digit" placeholder="请输入商业险总价" data-attrType="
" bindinput="handleInput">
<view slot="left-icon">
<view slot="left-icon">
<view>¥</view>
<view>¥</view>
</view>
</view>
...
@@ -37,33 +37,34 @@
...
@@ -37,33 +37,34 @@
请勾选增值车损险服务
请勾选增值车损险服务
</van-checkbox> -->
</van-checkbox> -->
<!-- <block wx:if="{{insuranceCheck}}"> -->
<!-- <block wx:if="{{insuranceCheck}}"> -->
<view class="goodsCheckItem" wx:for="{{quotationGoodsList}}" wx:key="index">
<!-- <van-radio-group value="{{orderInfo.goodsId}}" bind:change="onChangeInsurance"> -->
<block wx:for="{{quotationGoodsList}}" wx:key="index" name="{{item.id}}" wx:for-item="item">
<view class="goodsCheckItem">
<view class="check">
<view class="check">
<van-checkbox value="{{ insuranceCheck
}}" shape="square" bind:change="onChangeInsurance"></van-checkbox>
<van-checkbox value="{{orderInfo.goodsId ==item.id}}" data-id="{{item.id
}}" shape="square" bind:change="onChangeInsurance"></van-checkbox>
</view>
</view>
<view class="goodsInfo">
<view class="goodsInfo">
<view class="incrementInfo">
<view class="incrementInfo">
<image class="img" src="{{item.quotationGoodsInfo
.titlePictureUrl}}" />
<image class="img" src="{{item
.titlePictureUrl}}" />
<view class="info">
<view class="info">
<view class="infoTitle">{{item.quotationGoodsInfo.goodsName}}</view>
<view class="infoTitle">{{item.goodsName}}</view>
<view>
<view><text>包含</text><block wx:for-index="itemIndex" wx:for-item="i" wx:key="itemIndex" wx:for="{{item.quotationGoodsServiceItemsRelationDTOList}}"><text>{{i.serviceName}}{{i.quotationGoodsServiceItemsRelationDTOList.length-1==itemIndex?'':'、'}}</text></block></view>
<text>包含</text>
<block wx:for-index="itemIndex" wx:for-item="i" wx:key="itemIndex" wx:for="{{item.quotationGoodsInfo.quotationGoodsServiceItemsRelationDTOList}}">
<text>
{{i.serviceName}}{{i.quotationGoodsInfo.quotationGoodsServiceItemsRelationDTOList.length==index?'':'、'}}
</text>
</block>
</view>
</view>
</view>
</view>
</view>
<block wx:if="{{orderInfo.goodsId == item.id}}">
<view class="title">增值权益价格</view>
<view class="title">增值权益价格</view>
<van-field class="inputBox customInput disabled" border="{{false}}" value="{{testQuotedPriceUpdate}}" data-attrType="modifyEquityQuotation" data-attrName="quotedPriceUpdate" maxlength="10" readonly disabled label-class="field_test" custom-style=" background-color: #F4F5F7; " data-type='number'>
<!-- disabled -->
<van-field class="inputBox customInput " border="{{false}}" value="{{orderInfo.quotedPriceUpdate}}" data-attrType="" data-attrName="quotedPriceUpdate" maxlength="10" bindinput="handleInput" data-type='number' type="digit">
<view slot="left-icon">
<view slot="left-icon">
<view>¥</view>
<view>¥</view>
</view>
</view>
</van-field>
</van-field>
<view class="errorMessage" wx:if="{{showError}}">金额小于最低限制</view>
</block>
</view>
</view>
</view>
</view>
</block>
<!-- </van-radio-group> -->
<!-- </block> -->
<!-- </block> -->
</van-collapse-item>
</van-collapse-item>
</view>
</view>
...
...
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.js
View file @
5d2ea8f
// packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
// packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
import
{
getQuotationInfo
,
quotationAdd
,
updateQuotation
,
quotationGoo
ds
,
getQuotationInfoById
,
quotationPicture
}
from
'../../../api'
import
{
getQuotationInfo
,
quotationAdd
,
updateQuotation
,
listByMerchantIdAndI
ds
,
getQuotationInfoById
,
quotationPicture
}
from
'../../../api'
import
{
quotedImgUrl
}
from
'~/config'
import
{
quotedImgUrl
}
from
'~/config'
// console.log(quotedImgUrl, 'quotedImgUrl')
// console.log(quotedImgUrl, 'quotedImgUrl')
Page
({
Page
({
...
@@ -7,24 +7,27 @@ Page({
...
@@ -7,24 +7,27 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
// owner: {
// owner: '',
// phone: '',
// certificateNo: '',
// carVin: '',
// seat: '5',
// price: '',
// confirmStatus: false,
// saveStatus: false
// },
owner
:
{
owner
:
{
owner
:
''
,
owner
:
'
test2
'
,
phone
:
''
,
phone
:
15816539334
,
certificateNo
:
''
,
certificateNo
:
'
230182198012251659
'
,
carVin
:
''
,
carVin
:
'
12345678912345678
'
,
seat
:
'5'
,
seat
:
5
,
price
:
''
,
price
:
7
,
confirmStatus
:
false
,
confirmStatus
:
false
,
saveStatus
:
false
saveStatus
:
false
},
},
// owner: {
quotationGoodsList
:
[],
//权益商品列表
// owner: 'test2',
// phone: 15816539334,
// certificateNo: '230182198012251659',
// carVin: '12345678912345678',
// seat: 5,
// price: 7
// },
orderInfo
:
{
orderInfo
:
{
// 0-商业,1-交强,2-车船,3-增值车损,4-other 对应下面字段名字
// 0-商业,1-交强,2-车船,3-增值车损,4-other 对应下面字段名字
// owner
// owner
...
@@ -45,7 +48,8 @@ Page({
...
@@ -45,7 +48,8 @@ Page({
valueAddedVehicleLoss
:
{
valueAddedVehicleLoss
:
{
type
:
3
type
:
3
},
},
otherInsuranceList
:
[]
otherInsuranceList
:
[],
mode
:
0
},
},
// 页面存放表单对象的对象名
// 页面存放表单对象的对象名
dataAttrName
:
'owner'
,
dataAttrName
:
'owner'
,
...
@@ -316,23 +320,36 @@ Page({
...
@@ -316,23 +320,36 @@ Page({
getQuotationInfo
()
{
getQuotationInfo
()
{
let
{
default4SStoreInfo
}
=
wx
.
$util
.
getUserInfo
()
let
{
default4SStoreInfo
}
=
wx
.
$util
.
getUserInfo
()
console
.
log
(
default4SStoreInfo
,
'default4SStoreInfo'
)
console
.
log
(
default4SStoreInfo
,
'default4SStoreInfo'
)
quotationGoo
ds
({
merchantId
:
default4SStoreInfo
.
merchantId
})
listByMerchantIdAndI
ds
({
merchantId
:
default4SStoreInfo
.
merchantId
})
.
then
(
result
=>
{
.
then
(
result
=>
{
console
.
log
(
result
)
console
.
log
(
result
)
let
{
data
}
=
result
let
{
data
}
=
result
let
{
id
:
appreciation
,
goodsInfo
,
upgradeGoodsName
:
goodsName
,
upgradeGoodsServiceItemsList
}
=
data
[
0
]
if
(
!
data
.
length
)
return
wx
.
$util
.
showToast
(
'请先添加权益配置'
)
this
.
setData
({
data
=
data
.
map
(
item
=>
{
[
'orderInfo.valueAddedVehicleLoss'
]:
{
return
{
appreciation
,
...
item
,
goodsName
,
appreciation
:
item
.
appreciation
,
type
:
3
goodsName
:
item
.
upgradeGoodsName
,
},
quotationGoodsServiceItemsRelationDTOList
:
item
.
upgradeGoodsServiceItemsList
,
[
'orderInfo.quotationGoodsInfo'
]:
{
titlePictureUrl
:
item
.
titlePictureUrl
titlePictureUrl
:
goodsInfo
.
thumbUrl
,
goodsName
,
quotationGoodsServiceItemsRelationDTOList
:
upgradeGoodsServiceItemsList
}
}
})
})
this
.
setData
({
quotationGoodsList
:
data
})
// let { id: appreciation, goodsInfo, upgradeGoodsName: goodsName, upgradeGoodsServiceItemsList } = data[0]
// this.setData({
// ['orderInfo.valueAddedVehicleLoss']: {
// appreciation,
// goodsName,
// type: 3
// },
// ['orderInfo.quotationGoodsInfo']: {
// titlePictureUrl: goodsInfo.thumbUrl,
// goodsName,
// quotationGoodsServiceItemsRelationDTOList: upgradeGoodsServiceItemsList
// }
// })
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{})
},
},
...
...
packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation.wxml
View file @
5d2ea8f
<!-- packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxml -->
<!-- packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxml -->
<navigation-bar
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back">
class="navigation-header"
bindnavbarReady="navbarReady"
showBack="{{true}}"
bindback="back">
<!-- showMenu="{{true}}" -->
<!-- showMenu="{{true}}" -->
<!-- bindtap="showStorePicker" -->
<!-- bindtap="showStorePicker" -->
<view class="navigation-title">
<view class="navigation-title">
...
@@ -18,19 +14,6 @@
...
@@ -18,19 +14,6 @@
</navigation-bar>
</navigation-bar>
<!-- height: calc(100vh - {{navBarHeight}}px); -->
<!-- height: calc(100vh - {{navBarHeight}}px); -->
<view class="layout" style="padding-top:{{navBarHeight}}px; ">
<view class="layout" style="padding-top:{{navBarHeight}}px; ">
<first-step
<first-step wx:if="{{step == 'first'}}" id="FirstStep" serviceInfo="{{owner}}" dataAttrName="{{dataAttrName}}" orderInfo="{{orderInfo}}" bindconfirm="handleFirstConfirm" bindeditSave="handleEditSave" />
wx:if="{{step == 'first'}}"
<second-step wx:if="{{step == 'second'}}" id="SecondStep" orderInfo="{{orderInfo}}" quotationGoodsList="{{quotationGoodsList}}" bindconfirm="handleSecondConfirm" bindeditSave="handleEditSave" />
id="FirstStep"
serviceInfo="{{owner}}"
dataAttrName="{{dataAttrName}}"
orderInfo="{{orderInfo}}"
bindconfirm="handleFirstConfirm"
bindeditSave="handleEditSave" />
<second-step
wx:if="{{step == 'second'}}"
id="SecondStep"
orderInfo="{{orderInfo}}"
bindconfirm="handleSecondConfirm"
bindeditSave="handleEditSave" />
</view>
</view>
\ No newline at end of file
\ No newline at end of file
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
5d2ea8f
// packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
// packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
quotationGoods
import
{
getQuotationInfo
,
quotationAdd
,
updateQuotation
,
quotation
Goods
,
getQuotationInfoById
,
quotationPicture
}
from
'../../../api'
import
{
getQuotationInfo
,
quotationAdd
,
updateQuotation
,
quotation
Upgrade
,
getQuotationInfoById
,
quotationPicture
,
listByMerchantIdAndIds
}
from
'../../../api'
import
{
quotedImgUrl
}
from
'~/config'
import
{
quotedImgUrl
}
from
'~/config'
// console.log(quotedImgUrl, 'quotedImgUrl')
// console.log(quotedImgUrl, 'quotedImgUrl')
Page
({
Page
({
...
@@ -7,46 +7,48 @@ Page({
...
@@ -7,46 +7,48 @@ Page({
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
owner
:
{
owner
:
''
,
phone
:
''
,
certificateNo
:
''
,
carVin
:
''
,
seat
:
'5'
,
price
:
''
,
confirmStatus
:
false
,
saveStatus
:
false
},
quotationGoodsList
:
[],
//权益商品列表
// owner: {
// owner: {
// owner: 'test2',
// owner: '',
// phone: 15816539334,
// phone: '',
// certificateNo: '230182198012251659',
// certificateNo: '',
// carVin: '12345678912345678',
// carVin: '',
// seat: 5,
// seat: '5',
// price: 7
// price: '',
// confirmStatus: false,
// saveStatus: false
// },
// },
quotationGoodsList
:
[],
//权益商品列表
owner
:
{
owner
:
'test2'
,
phone
:
15816539334
,
certificateNo
:
'230182198012251659'
,
carVin
:
'12345678912345678'
,
seat
:
5
,
price
:
230000
},
orderInfo
:
{
orderInfo
:
{
mode
:
1
,
insurancePrice
:
333
// 0-商业,1-交强,2-车船,3-增值车损,4-other 对应下面字段名字
// 0-商业,1-交强,2-车船,3-增值车损,4-other 对应下面字段名字
// owner
// owner
business
:
{
//
business: {
type
:
0
,
//
type: 0,
three
:
'100万'
,
//
three: '100万',
driver
:
'1万'
,
//
driver: '1万',
passenger
:
'1万'
//
passenger: '1万'
},
//
},
mutualStrength
:
{
//
mutualStrength: {
type
:
1
,
//
type: 1,
compensation
:
'20万'
//
compensation: '20万'
},
//
},
vehiclesAndVessels
:
{
//
vehiclesAndVessels: {
type
:
2
,
//
type: 2,
compensation
:
new
Date
().
getFullYear
()
+
'年'
//
compensation: new Date().getFullYear() + '年'
},
//
},
valueAddedVehicleLoss
:
{
//
valueAddedVehicleLoss: {
type
:
3
//
type: 3
},
//
},
otherInsuranceList
:
[]
//
otherInsuranceList: []
},
},
// 页面存放表单对象的对象名
// 页面存放表单对象的对象名
dataAttrName
:
'owner'
,
dataAttrName
:
'owner'
,
...
@@ -79,22 +81,23 @@ Page({
...
@@ -79,22 +81,23 @@ Page({
step
:
'second'
step
:
'second'
})
})
},
},
getQuotationGenerate
(
id
)
{
createWithPay
(
id
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getQuotationInfoById
({
id
})
let
para
=
{
.
then
(
res
=>
{
id
,
customerNameUrl
:
''
,
orderStatus
:
2
}
quotationUpgrade
(
para
).
then
(
res
=>
{
// wx.$util.hideLoading()
console
.
log
(
res
,
'res'
)
resolve
(
res
)
resolve
(
res
)
// let { code, data, message } = res
// let { code, data } = res
// if (code == 0) {
// resolve(true)
// if (code==0) {
// } else {
// resolve({ data, id })
// wx.$util.showToast(message)
// reject()
// }
// }
})
})
.
catch
(
err
=>
{
reject
()
})
})
})
},
},
updateEquityPrice
(
type
)
{
updateEquityPrice
(
type
)
{
...
@@ -133,15 +136,14 @@ Page({
...
@@ -133,15 +136,14 @@ Page({
// console.log(id)
// console.log(id)
if
(
id
)
{
if
(
id
)
{
// 校验生成告知书是否成功
// 校验生成告知书是否成功
let
status
=
await
this
.
getQuotationGenerate
(
id
)
let
status
=
await
this
.
createWithPay
(
id
)
wx
.
hideLoading
()
wx
.
hideLoading
()
this
.
setData
({
this
.
setData
({
confirmStatus
:
false
confirmStatus
:
false
})
})
console
.
log
(
'id'
,
id
)
console
.
log
(
'id'
,
id
)
status
.
code
==
0
?
this
.
navigatorNext
(
id
)
:
wx
.
$util
.
showToast
(
status
.
message
||
'报价失败'
)
// { orderId:data.orderId, id }
// let
status
.
code
==
0
?
this
.
navigatorNext
({
id
,
orderId
:
status
.
data
.
orderId
})
:
wx
.
$util
.
showToast
(
status
.
message
||
'报价失败'
)
// status && this.navigatorNext(id)
}
else
{
}
else
{
console
.
log
(
message
)
console
.
log
(
message
)
wx
.
hideLoading
()
wx
.
hideLoading
()
...
@@ -217,9 +219,10 @@ Page({
...
@@ -217,9 +219,10 @@ Page({
console
.
log
(
error
)
console
.
log
(
error
)
}
}
},
},
navigatorNext
(
id
)
{
navigatorNext
(
obj
)
{
// packageEquity/pages/TabBar/equityPage
// packageEquity/pages/TabBar/equityPage
wx
.
$router
.
redirectTo
(
'schemeConfirmation'
,
{
id
})
wx
.
$router
.
redirectTo
(
'CarQuotationPay'
,
obj
)
// wx.$router.redirectTo('schemeConfirmation', { id })
},
},
getOrderInfo
()
{
getOrderInfo
()
{
let
{
id
,
orderInfo
}
=
this
.
data
let
{
id
,
orderInfo
}
=
this
.
data
...
@@ -232,6 +235,7 @@ Page({
...
@@ -232,6 +235,7 @@ Page({
// tableInfo.quotedPrice = this.divideByHundred(tableInfo.quotedPrice)
// tableInfo.quotedPrice = this.divideByHundred(tableInfo.quotedPrice)
tableInfo
.
quotedPriceUpdate
=
this
.
divideByHundred
(
tableInfo
.
quotedPriceUpdate
)
tableInfo
.
quotedPriceUpdate
=
this
.
divideByHundred
(
tableInfo
.
quotedPriceUpdate
)
if
(
code
==
0
)
{
if
(
code
==
0
)
{
// debugger
const
insurance
=
{
const
insurance
=
{
0
:
'business'
,
0
:
'business'
,
1
:
'mutualStrength'
,
1
:
'mutualStrength'
,
...
@@ -239,25 +243,27 @@ Page({
...
@@ -239,25 +243,27 @@ Page({
3
:
'valueAddedVehicleLoss'
,
3
:
'valueAddedVehicleLoss'
,
4
:
'otherInsuranceList'
4
:
'otherInsuranceList'
}
}
const
insuranceTypeObj
=
tableInfo
.
insureList
.
reduce
((
obj
,
item
)
=>
{
// const insuranceTypeObj = tableInfo.insureList.reduce((obj, item) => {
item
=
this
.
divideByHundredObj
(
item
)
// item = this.divideByHundredObj(item)
console
.
log
(
item
,
'item'
)
// console.log(item, 'item')
// 其他的保修是可能为多个
// // 其他的保修是可能为多个
let
name
=
insurance
[
item
.
type
]
// let name = insurance[item.type]
if
(
name
==
'otherInsuranceList'
)
{
// if (name == 'otherInsuranceList') {
if
(
obj
[
name
])
{
// if (obj[name]) {
obj
[
name
].
push
(
item
)
// obj[name].push(item)
}
else
{
// } else {
obj
[
name
]
=
[
item
]
// obj[name] = [item]
}
// }
}
else
{
// } else {
obj
[
name
]
=
item
// obj[name] = item
}
// }
return
obj
// return obj
},
{})
// }, {})
console
.
log
(
'insuranceTypeObj'
,
insuranceTypeObj
)
// console.log('insuranceTypeObj', insuranceTypeObj)
// console.log(orderInfo, tableInfo, insuranceTypeObj);
// debugger
this
.
setData
({
this
.
setData
({
orderInfo
:
Object
.
assign
(
orderInfo
,
tableInfo
,
insuranceTypeObj
),
orderInfo
:
Object
.
assign
(
orderInfo
,
tableInfo
),
owner
:
tableInfo
.
owner
owner
:
tableInfo
.
owner
// ...insuranceTypeObj
// ...insuranceTypeObj
})
})
...
@@ -312,12 +318,12 @@ Page({
...
@@ -312,12 +318,12 @@ Page({
getQuotationInfo
()
{
getQuotationInfo
()
{
let
{
default4SStoreInfo
}
=
wx
.
$util
.
getUserInfo
()
let
{
default4SStoreInfo
}
=
wx
.
$util
.
getUserInfo
()
console
.
log
(
default4SStoreInfo
,
'default4SStoreInfo'
)
console
.
log
(
default4SStoreInfo
,
'default4SStoreInfo'
)
quotationGoo
ds
({
merchantId
:
default4SStoreInfo
.
merchantId
})
listByMerchantIdAndI
ds
({
merchantId
:
default4SStoreInfo
.
merchantId
})
.
then
(
result
=>
{
.
then
(
result
=>
{
console
.
log
(
result
)
console
.
log
(
result
)
let
{
data
}
=
result
let
{
data
}
=
result
if
(
!
data
.
length
)
return
wx
.
$util
.
showToast
(
'请先添加权益配置'
)
if
(
!
data
.
length
)
return
wx
.
$util
.
showToast
(
'请先添加权益配置'
)
let
{
id
:
appreciation
,
goodsInfo
,
upgradeGoodsName
:
goodsName
,
upgradeGoodsServiceItemsList
}
=
data
[
0
]
//
let { id: appreciation, goodsInfo, upgradeGoodsName: goodsName, upgradeGoodsServiceItemsList } = data[0]
data
=
data
.
map
(
item
=>
{
data
=
data
.
map
(
item
=>
{
return
{
return
{
...
item
,
...
item
,
...
@@ -406,6 +412,7 @@ Page({
...
@@ -406,6 +412,7 @@ Page({
// 判断是编辑还是新增
// 判断是编辑还是新增
// options.id = 14
// options.id = 14
// options.modifyEquityQuotation = true
// options.modifyEquityQuotation = true
this
.
getQuotationInfo
()
if
(
options
.
id
)
{
if
(
options
.
id
)
{
// 修改权益报价
// 修改权益报价
let
{
modifyEquityQuotation
}
=
options
let
{
modifyEquityQuotation
}
=
options
...
@@ -423,9 +430,10 @@ Page({
...
@@ -423,9 +430,10 @@ Page({
}
}
this
.
setData
({
id
:
options
.
id
})
this
.
setData
({
id
:
options
.
id
})
this
.
getOrderInfo
()
this
.
getOrderInfo
()
}
else
{
this
.
getQuotationInfo
()
}
}
// else {
// this.getQuotationInfo()
// }
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
...
...
packageEquity/pages/carQuotation/index/index.js
View file @
5d2ea8f
...
@@ -233,10 +233,11 @@ Component({
...
@@ -233,10 +233,11 @@ Component({
// id: target.id
// id: target.id
// })
// })
// 0待报价、1待确认、2待支付、3已支付、-1战败 5已完成(已签名)
// 0待报价、1待确认、2待支付、3已支付、-1战败 5已完成(已签名)
// mode 0 融合 1 非融合
switch
(
target
.
orderStatus
+
''
)
{
switch
(
target
.
orderStatus
+
''
)
{
// schemeConfirmation
// schemeConfirmation
case
'0'
:
case
'0'
:
wx
.
$router
.
go
(
'createOrderCarQuotation'
,
{
wx
.
$router
.
go
(
target
.
mode
!=
0
?
'createOrderCarQuotationSimple'
:
'createOrderCarQuotation'
,
{
id
:
target
.
id
id
:
target
.
id
})
})
break
break
...
...
packageEquity/pages/carQuotation/index/index.wxml
View file @
5d2ea8f
...
@@ -103,7 +103,8 @@
...
@@ -103,7 +103,8 @@
</view>
</view>
</block>
</block>
</view>
</view>
<view class="order-detail" wx:if="{{item.orderStatus == '1'|| item.orderStatus == '2' || item.orderStatus == '3' ||item.orderStatus =='4' ||item.orderStatus =='5'}}">
<!-- 非融合不显示 -->
<view class="order-detail" wx:if="{{(item.orderStatus != 0|| item.orderStatus != -1 )&&(item.mode!=1)}}">
<view class="detail-item">
<view class="detail-item">
<view class="detail-label">报价金额</view>
<view class="detail-label">报价金额</view>
<view class="text-hide">{{item.quotedPrice || '--'}}</view>
<view class="text-hide">{{item.quotedPrice || '--'}}</view>
...
...
project.private.config.json
View file @
5d2ea8f
...
@@ -305,6 +305,13 @@
...
@@ -305,6 +305,13 @@
"query"
:
""
,
"query"
:
""
,
"launchMode"
:
"default"
,
"launchMode"
:
"default"
,
"scene"
:
null
"scene"
:
null
},
{
"name"
:
"融合报价"
,
"pathName"
:
"packageEquity/pages/carQuotation/createOrderCarQuotation/createOrderCarQuotation"
,
"query"
:
""
,
"launchMode"
:
"default"
,
"scene"
:
null
}
}
]
]
}
}
...
...
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