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 67262f59
authored
Sep 18, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'dev_v4.28.0' into 'develop'
Dev v4.28.0 See merge request
!170
2 parents
70ef6280
30179e33
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
853 additions
and
159 deletions
app.js
components/GlCell/GlCell.js
components/GlCell/GlCell.wxml
components/GlCell/GlCell.wxss
packageEquity/components/GLForm/GLForm.js
packageEquity/components/GLForm/GLForm.wxml
packageEquity/components/GLForm/GLForm.wxss
packageEquity/components/orderInfoCom/orderInfoCom.wxml
packageEquity/pages/carEquity/components/SecondStep/SecondStep.js
packageEquity/pages/carEquity/components/SecondStep/SecondStep.json
packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml
packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxss
packageEquity/pages/carEquity/components/constant/constantList.js
packageEquity/pages/carEquity/components/constant/secondStepData.js
packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxss
packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.js
packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay.js
packageEquity/pages/carQuotation/components/PopupSelect/PopupSelect.js
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
packageEquity/pages/carQuotation/fullSignture/fullSignture.js
packageEquity/pages/carQuotation/signature/signature.js
tabWorkOrder/pages/additionRecordOrder/additionRecordOrder.js
app.js
View file @
67262f5
...
...
@@ -42,8 +42,9 @@ App({
wx
.
onMemoryWarning
(
function
()
{
console
.
log
(
'onMemoryWarningReceive'
)
})
console
.
log
(
'lifeshow'
);
getUpdateManager
()
if
(
options
)
{
console
.
log
(
'options'
,
options
)
let
res
=
checkScene
(
options
)
...
...
@@ -71,9 +72,11 @@ App({
data
}
=
res
if
(
code
==
'0'
&&
data
)
{
// util.setUserinfo(data)
// util.setUserinfo( console.log('noSignInUuid_sessionId',data?.sessionId);
wx
.
reLaunch
({
url
:
'/pages/accountItems/accountItems'
})
util
.
setSessionId
(
data
?.
sessionId
)
return
router
.
reLaunch
(
'pages.accountItems'
)
return
// return router.reLaunch('pages.accountItems')
}
else
{
util
.
removeStorage
()
removeSystemStorage
()
...
...
components/GlCell/GlCell.js
View file @
67262f5
...
...
@@ -17,6 +17,8 @@ Component({
placeholder
:
String
,
iconSrc
:
String
,
labelStyle
:
String
,
cellStyle
:
String
,
cellBoxStyle
:
String
,
background
:
{
type
:
String
,
value
:
'#FFFFFF'
,
...
...
components/GlCell/GlCell.wxml
View file @
67262f5
<view class='cell-box' style="background:{{background}}">
<view class="cell {{cellHeight?'cellHeight': ''}} {{border?'border':''}}" bindtap="click">
<view class='cell-box' style="background:{{background}}
;{{cellBoxStyle}}
">
<view class="cell {{cellHeight?'cellHeight': ''}} {{border?'border':''}}"
style="{{cellStyle}}"
bindtap="click">
<view class='cell-label title-style' style="width:{{labelWidth}};{{labelStyle}}" bindtap="titleClick">
<text wx:if='{{required&&requiredBefore}}' class='required'>*</text>
{{label||'标题'}}
...
...
components/GlCell/GlCell.wxss
View file @
67262f5
...
...
@@ -100,4 +100,5 @@
transform: translateY(-50%);
width: 28rpx;
height: 26rpx;
margin: 0 !important;
}
\ No newline at end of file
packageEquity/components/GLForm/GLForm.js
View file @
67262f5
...
...
@@ -2,7 +2,8 @@
Component
({
externalClasses
:
[
'custom-class'
],
options
:
{
multipleSlots
:
true
// 在组件定义时的选项中启用多 slot 支持
multipleSlots
:
true
,
// 在组件定义时的选项中启用多 slot 支持
styleIsolation
:
'shared'
,
// 自定义覆盖vant样式
},
/**
* 组件的属性列表
...
...
@@ -90,15 +91,22 @@ Component({
},
this
)
})
},
parentSetData
(
attr
,
value
)
{
let
{
dataAttrName
}
=
this
.
data
let
thisPage
=
wx
.
$router
.
getPageInstance
()
thisPage
.
setData
({
[
dataAttrName
+
'.'
+
attr
]:
value
})
},
handleInput
(
e
)
{
let
value
=
e
.
detail
let
{
attr
,
item
}
=
e
.
target
.
dataset
let
{
dataAttrName
}
=
this
.
data
// if (attr == 'price') {
// value = value >= 2000000 ? '2000000' : value
// // wx.$eventbus.emit('delete_goodsSelect')
// }
// console.log(item,'handleInput');
// if (attr == 'price') {
// value = value >= 2000000 ? '2000000' : value
// // wx.$eventbus.emit('delete_goodsSelect')
// }
// console.log(item,'handleInput');
let
thisPage
=
wx
.
$router
.
getPageInstance
()
if
(
item
.
inputLimit
&&
item
.
inputLimit
.
maxVal
)
{
value
=
value
>=
item
.
inputLimit
.
maxVal
?
item
.
inputLimit
.
maxVal
:
value
...
...
@@ -117,9 +125,9 @@ Component({
const
diffValue
=
value
.
toString
()
const
trimValue
=
value
.
toString
().
trim
()
if
(
diffValue
!=
trimValue
)
{
value
=
trimValue
value
=
trimValue
}
thisPage
.
setData
({
[
dataAttrName
+
'.'
+
attr
]:
value
})
...
...
packageEquity/components/GLForm/GLForm.wxml
View file @
67262f5
<!-- packageEquity/pages/carEquity/components/GLForm/GLForm.wxml -->
<wxs src="./GLForm.wxs" module="filterUtils" />
<view wx:for="{{formDataList}}" wx:key="index" class="custom-class">
<view wx:for="{{formDataList}}" wx:key="index" class="custom-class
gl-form
">
<gl-cell
wx:if="{{filterUtils.isShowFn(formData, item)}}"
border="{{!item.noBorder}}"
...
...
@@ -16,7 +16,9 @@
background="{{background}}"
required="{{item.required}}"
requiredAfter="{{item.requiredAfter}}"
cellHeight="{{!item.noCellHeight}}">
cellHeight="{{!item.noCellHeight}}"
cellStyle="{{item.cellStyle}}"
cellBoxStyle="{{item.cellBoxStyle}}">
<!-- slot -->
<slot wx:if="{{item.type == 'slot'}}" name="{{item.name}}" />
<!-- input / textarea -->
...
...
@@ -67,7 +69,6 @@
bindchange="handleTimeChange"
data-target="{{item}}">
<view class="picker">
<image class="arrow" src="../../../components/images/arrow-x.png" />
<view class="text-hide" wx:if="{{formData[item.name]}}">{{formData[item.name]}}</view>
<text class="placeholder" wx:else>请选择</text>
</view>
...
...
packageEquity/components/GLForm/GLForm.wxss
View file @
67262f5
...
...
@@ -34,7 +34,7 @@
color: #B6B6B8;
}
.arrow {
.
gl-form .
arrow {
width: 28rpx;
height: 26rpx;
margin-top: 26rpx;
...
...
@@ -50,4 +50,9 @@
.brand {
text-align: right;
padding: 40rpx 0;
}
.gl-form .van-field__control--disabled {
color: #666666;
-webkit-text-fill-color: #666666;
}
\ No newline at end of file
packageEquity/components/orderInfoCom/orderInfoCom.wxml
View file @
67262f5
...
...
@@ -15,10 +15,9 @@
<!-- test -->
</view>
<view class="text" wx:elif="{{item.type == 'project' }}">
<block
wx:for="{{
orderInfo.subOrderList}}" wx:for-item="subItem" wx:key="idx">
<view class="goodsName">{{subItem.
upgradeGoodsName}} <text class="goodsItem">(包含{{subItem.serviceItems
}})</text></view>
<block
wx:for="{{orderInfo.quotationGoodsInfoList ||
orderInfo.subOrderList}}" wx:for-item="subItem" wx:key="idx">
<view class="goodsName">{{subItem.
goodsName||subItem.upgradeGoodsName}} <text class="goodsItem">(包含{{subItem.serviceItems||subItem.position
}})</text></view>
</block>
<!-- <view class="goodsItem">包含{{orderInfo.subOrderList[0].serviceItems}}</view> -->
</view>
<view class="text" wx:else>{{orderInfo[item.key]||''}}</view>
</view>
...
...
packageEquity/pages/carEquity/components/SecondStep/SecondStep.js
View file @
67262f5
...
...
@@ -2,7 +2,11 @@
import
constantData
from
'../constant/secondStepData'
import
fn
from
'../constant/ruleFn'
const
defaultLabelWidth
=
'140rpx'
import
api
from
'~/api/api'
Component
({
options
:
{
styleIsolation
:
'shared'
,
// 自定义覆盖vant样式
},
/**
* 组件的属性列表
*/
...
...
@@ -21,17 +25,17 @@ Component({
},
cardSetting
:
{
type
:
Boolean
,
observer
:
function
(
n
)
{
console
.
log
(
n
,
'cardSetting'
);
observer
:
function
(
n
)
{
console
.
log
(
n
,
'cardSetting'
);
if
(
!
n
)
{
let
{
secondObj
,
formRule
}
=
this
.
data
const
productFormList
=
secondObj
.
productFormList
.
filter
(
item
=>
item
.
name
!=
'card'
)
delete
formRule
.
card
// formRule = formRule.filter(item=> )
this
.
setData
({
[
'secondObj.productFormList'
]:
productFormList
,
formRule
})
let
{
secondObj
,
formRule
}
=
this
.
data
const
productFormList
=
secondObj
.
productFormList
.
filter
(
item
=>
item
.
name
!=
'card'
)
delete
formRule
.
card
// formRule = formRule.filter(item=> )
this
.
setData
({
[
'secondObj.productFormList'
]:
productFormList
,
formRule
})
}
}
},
...
...
@@ -44,11 +48,58 @@ Component({
defaultLabelWidth
,
secondObj
:
constantData
.
secondObj
,
formRule
:
constantData
.
formRule
,
energyFormRule
:
constantData
.
energyFormRule
,
oilFormRule
:
constantData
.
oilFormRule
,
isShowObj
:
{
car
:
true
,
customer
:
true
,
product
:
true
,
info
:
true
,
store
:
true
},
codeToAttr
:
{
YB0001
:
'invoice'
,
YB0003
:
'driveFront'
,
YB0004
:
'driveBack'
,
YB0002
:
'contract'
,
YB0005
:
'other'
},
imgToInfo
:
{
invoice
:
{
code
:
'YB0001'
,
label
:
'购车发票'
},
driveFront
:
{
code
:
'YB0003'
,
label
:
'行驶证主页'
},
driveBack
:
{
code
:
'YB0004'
,
label
:
'行驶证副页'
},
contract
:
{
code
:
'YB0002'
,
label
:
'合同购买时里程数'
},
other
:
{
code
:
'YB0005'
}
},
imgObj
:
{
invoice
:
[],
driveFront
:
[],
driveBack
:
[],
contract
:
[],
other
:
[]
},
popObj
:
{
popValue
:
''
}
},
lifetimes
:
{
attached
()
{
this
.
dealImg
()
}
},
...
...
@@ -60,28 +111,83 @@ Component({
let
formData
=
this
.
getPageData
()
var
{
formRule
}
=
this
.
data
const
list
=
[
'tireBrand'
,
'frontTireSpecification'
,
'rearTireSpecification'
]
if
(
formData
&&
formData
.
tireFlag
==
0
)
{
if
(
formData
&&
formData
.
tireFlag
==
0
)
{
list
.
forEach
(
item
=>
{
formRule
[
item
][
0
].
required
=
false
})
}
console
.
log
(
formRule
);
this
.
setData
({
formRule
})
},
dealImg
()
{
let
{
serviceInfo
,
codeToAttr
,
imgObj
}
=
this
.
data
if
(
serviceInfo
.
ybAttachmentFlag
==
0
&&
serviceInfo
.
attachmentList
.
length
)
{
serviceInfo
.
attachmentList
.
forEach
(
item
=>
{
imgObj
[
codeToAttr
[
item
.
attachmentCode
]].
push
({
url
:
item
.
attachmentFile
})
})
}
this
.
setData
({
imgObj
})
},
handleUpDown
(
e
)
{
let
{
attr
}
=
e
.
currentTarget
.
dataset
this
.
setData
({
[
'isShowObj.'
+
attr
]:
!
this
.
data
.
isShowObj
[
attr
]
})
},
handlePopupShow
(
e
)
{
let
{
attr
,
idx
,
typename
}
=
e
.
currentTarget
.
dataset
let
{
serviceInfo
}
=
this
.
data
let
popValue
=
serviceInfo
.
goodInfoList
[
idx
][
attr
]
||
''
this
.
setData
({
popupShow
:
true
,
popObj
:
{
idx
,
attr
,
popValue
,
typename
}
})
},
handleSelectConfirm
(
e
)
{
let
{
popObj
}
=
this
.
data
let
{
value
}
=
e
.
detail
let
formData
=
this
.
getPageData
()
let
curitem
=
formData
.
goodInfoList
[
popObj
.
idx
]
let
idName
=
curitem
.
itemsCode
==
'YB0003'
?
'oil'
:
'energy'
let
childCom
=
this
.
selectComponent
(
'#'
+
idName
+
popObj
.
idx
)
childCom
.
parentSetData
(
popObj
.
attr
,
value
)
this
.
setData
({
[
`serviceInfo.goodInfoList[
${
popObj
.
idx
}
].
${
popObj
.
attr
}
`
]:
value
})
},
getPageData
()
{
let
thisPage
=
wx
.
$router
.
getPageInstance
()
return
thisPage
?.
data
[
this
.
data
.
dataAttrName
]
},
confirmDealImg
()
{
var
{
serviceInfo
,
imgObj
,
imgToInfo
}
=
this
.
data
let
formData
=
this
.
getPageData
()
// 图片处理
if
(
serviceInfo
.
ybAttachmentFlag
==
0
)
{
formData
.
attachmentList
=
[]
let
attrList
=
Object
.
keys
(
imgObj
)
for
(
let
i
=
0
;
i
<
attrList
.
length
;
i
++
)
{
let
item
=
attrList
[
i
]
imgObj
[
item
].
forEach
(
k
=>
{
formData
.
attachmentList
.
push
({
attachmentCode
:
imgToInfo
[
item
].
code
,
attachmentType
:
'IMG'
,
attachmentFile
:
k
.
url
})
})
}
}
},
handleConfirm
(
e
)
{
var
{
formRule
}
=
this
.
data
var
{
formRule
,
serviceInfo
,
imgObj
,
imgToInfo
,
energyFormRule
,
oilFormRule
}
=
this
.
data
let
formData
=
this
.
getPageData
()
let
validObj
=
fn
.
checkRequired
(
formData
,
formRule
)
if
(
validObj
)
{
...
...
@@ -109,22 +215,105 @@ Component({
// }
return
}
for
(
let
i
=
0
;
i
<
formData
.
goodInfoList
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
formData
.
goodInfoList
.
length
;
i
++
)
{
let
item
=
formData
.
goodInfoList
[
i
]
if
(
item
.
entityCardFlag
==
'Y'
&&
!
/
[
a-zA-Z0-9
]{6}
/
.
test
(
item
.
card
))
{
if
(
item
.
entityCardFlag
==
'Y'
&&
!
/
[
a-zA-Z0-9
]{6}
/
.
test
(
item
.
card
))
{
wx
.
$util
.
showToast
(
item
.
goodName
+
'商品卡号请输入6位字母或数字'
)
return
}
// 延保产品-验证
if
(
item
.
printType
==
2
)
{
// itemsCode标识:YB0001-延保-6大件,YB0002-延保-3电,YB0003-延保-油车
let
subValidObj
=
fn
.
checkRequired
(
item
,
item
.
itemsCode
==
'YB0003'
?
oilFormRule
:
energyFormRule
)
if
(
subValidObj
)
{
wx
.
$util
.
showToast
(
subValidObj
.
message
)
return
}
}
}
// 图片处理
if
(
serviceInfo
.
ybAttachmentFlag
==
0
)
{
formData
.
attachmentList
=
[]
let
attrList
=
Object
.
keys
(
imgObj
)
for
(
let
i
=
0
;
i
<
attrList
.
length
;
i
++
)
{
let
item
=
attrList
[
i
]
if
(
item
!=
'other'
&&
!
imgObj
[
item
].
length
)
{
wx
.
$util
.
showToast
(
'请上传'
+
imgToInfo
[
item
].
label
)
return
true
}
}
}
this
.
confirmDealImg
()
console
.
log
(
formData
,
'formData---'
)
this
.
triggerEvent
(
'confirm'
,
{
type
:
'confirm'
})
},
handleDraft
()
{
this
.
confirmDealImg
()
this
.
triggerEvent
(
'draft'
,
{
type
:
'draft'
})
},
handleWarrantyInput
(
e
)
{
let
value
=
e
.
detail
let
{
attr
,
idx
,
curitem
}
=
e
.
target
.
dataset
let
[
number
,
decimal
]
=
value
.
toString
().
split
(
'.'
)
if
(
decimal
!=
undefined
)
{
decimal
=
decimal
.
substring
(
0
,
2
)
number
+=
`.
${
decimal
}
`
value
=
number
}
let
idName
=
curitem
.
itemsCode
==
'YB0003'
?
'oil'
:
'energy'
let
childCom
=
this
.
selectComponent
(
'#'
+
idName
+
idx
)
childCom
.
parentSetData
(
attr
,
value
)
this
.
setData
({
[
`serviceInfo.goodInfoList[
${
idx
}
].
${
attr
}
`
]:
value
})
},
// 拍照识别
navOcr
(
e
)
{
let
{
type
}
=
e
.
currentTarget
.
dataset
wx
.
$router
.
go
(
`ocrEquityModules?type=
${
type
}
`
)
},
// 图片上传
upLoad
(
event
)
{
let
_this
=
this
const
{
file
}
=
event
.
detail
const
{
attr
,
idx
}
=
event
.
currentTarget
.
dataset
let
{
imgObj
}
=
this
.
data
let
tempFiles
=
file
?.
url
let
imgType
=
tempFiles
.
split
(
'.'
)[
1
]
let
type
=
imgType
==
'unknown'
?
'jpg'
:
imgType
wx
.
getFileSystemManager
().
readFile
({
filePath
:
tempFiles
,
//选择图片返回的相对路径
encoding
:
'base64'
,
//编码格式
success
(
_res
)
{
wx
.
$util
.
showLoading
(
'上传中...'
)
api
.
uploadImg
({
file
:
`
${
type
}
@
${
_res
.
data
}
`
})
.
then
(
img
=>
{
wx
.
$util
.
hideLoading
()
let
{
code
,
data
,
message
}
=
img
if
(
code
==
0
)
{
imgObj
[
attr
].
push
({
url
:
data
})
_this
.
setData
({
imgObj
})
}
else
{
wx
.
$util
.
showToast
(
message
)
}
})
}
})
},
// 图片删除
handleDeleteImg
(
e
)
{
const
{
attr
}
=
e
.
currentTarget
.
dataset
let
{
imgObj
}
=
this
.
data
const
{
index
}
=
e
.
detail
imgObj
[
attr
].
splice
(
index
,
1
)
this
.
setData
({
imgObj
})
}
}
})
packageEquity/pages/carEquity/components/SecondStep/SecondStep.json
View file @
67262f5
{
"component"
:
true
,
"usingComponents"
:
{
"gl-form"
:
"/packageEquity/components/GLForm/GLForm"
"gl-form"
:
"/packageEquity/components/GLForm/GLForm"
,
"popup-select"
:
"/packageEquity/pages/carQuotation/components/PopupSelect/PopupSelect"
}
}
packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml
View file @
67262f5
<!--packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxml-->
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view>
<view class="box">
<view class="title">
...
...
@@ -47,17 +48,73 @@
<!-- 多商品 -->
<view slot="goodInfoList">
<view wx:for="{{serviceInfo.goodInfoList}}" wx:key="index">
<view class="pro-head">
<view>{{item.goodName}}</view>
<view class="pro-service">包含{{item.items}}</view>
</view>
<view class="pro-list">
<gl-form id="proList" background="#F4F5F7" formData="{{item}}" dataAttrName="{{'serviceInfo.goodInfoList[' + index +']'}}" formDataList="{{secondObj.productFormList[0].proFormList}}"></gl-form>
<view>
<view class="pro-head">
<view>{{item.goodName}}</view>
<view class="pro-service">包含{{item.items}}</view>
</view>
<view class="pro-list">
<view wx:if="{{item.printType == 2}}">
<!-- itemsCode标识:YB0001-延保-6大件,YB0002-延保-3电,YB0003-延保-油车 -->
<gl-form wx:if="{{item.itemsCode == 'YB0003'}}" id="{{'oil' + index}}" background="#F4F5F7" formData="{{item}}" dataAttrName="{{'serviceInfo.goodInfoList[' + index +']'}}" formDataList="{{secondObj.productFormList[0].oilProFormList}}">
<view slot="warranty" class="warranty">
<van-field class="textarea" custom-style="width: 100rpx; padding: 20rpx 0; background: #F4F5F7;" border="{{false}}" value="{{item.warrantyPeriod}}" input-align="right" autosize hold-keyboard type="number" placeholder="请输入" maxlength="140" data-attr="warrantyPeriod" data-idx="{{index}}" data-curitem="{{item}}" bindinput="handleWarrantyInput" />
<text class="input-suffix">年或</text>
<van-field class="textarea" custom-style="width: 100rpx; padding: 20rpx 0 20rpx 12rpx; background: #F4F5F7;" border="{{false}}" value="{{item.warrantyKm}}" input-align="right" autosize hold-keyboard type="number" placeholder="请输入" maxlength="140" data-attr="warrantyKm" data-idx="{{index}}" data-curitem="{{item}}" bindinput="handleWarrantyInput" />
<text class="input-suffix">万公里</text>
</view>
<view slot="gearbox" class="selectItem gearbox" data-attr="gearbox" data-idx="{{index}}" data-typename="gearboxtype" catchtap="handlePopupShow">
{{item.gearbox}}
<image class="arrow" src="/components/images/arrow-x.png" mode="widthFix" binderror="" bindload="" />
</view>
</gl-form>
<gl-form wx:else id="{{'energy' + index}}" background="#F4F5F7" formData="{{item}}" dataAttrName="{{'serviceInfo.goodInfoList[' + index +']'}}" formDataList="{{secondObj.productFormList[0].energyProFormList}}">
<view slot="warranty" class="warranty">
<van-field class="textarea" custom-style="width: 100rpx; padding: 20rpx 0; background: #F4F5F7;" border="{{false}}" value="{{item.warrantyPeriod}}" input-align="right" autosize hold-keyboard type="number" placeholder="请输入" maxlength="140" data-attr="warrantyPeriod" data-idx="{{index}}" data-curitem="{{item}}" bindinput="handleWarrantyInput" />
<text class="input-suffix">年或</text>
<van-field class="textarea" custom-style="width: 100rpx; padding: 20rpx 0 20rpx 12rpx; background: #F4F5F7;" border="{{false}}" value="{{item.warrantyKm}}" input-align="right" autosize hold-keyboard type="number" placeholder="请输入" maxlength="140" data-attr="warrantyKm" data-curitem="{{item}}" data-idx="{{index}}" bindinput="handleWarrantyInput" />
<text class="input-suffix">万公里</text>
</view>
</gl-form>
</view>
<gl-form wx:else id="proList" background="#F4F5F7" formData="{{item}}" dataAttrName="{{'serviceInfo.goodInfoList[' + index +']'}}" formDataList="{{secondObj.productFormList[0].equityProFormList}}"></gl-form>
</view>
</view>
</view>
</view>
</gl-form>
</view>
<!-- 延保附件展示标识,0-展示,1-不展示 -->
<view wx:if="{{serviceInfo.ybAttachmentFlag == 0}}" class="box m-b-40">
<view class="title">
<view>上传资料</view>
<view class="up-down-box" bindtap="handleUpDown" data-attr="info">
<view class="up-down-arrow">
<view class="arrow-up {{isShowObj.info ? '' : 'arrow-down'}}"></view>
</view>
</view>
</view>
<gl-form wx:if="{{isShowObj.info}}" id="store" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" formDataList="{{secondObj.infoFormList}}">
<view slot="upload" class="upload">
<view class="label">购车发票</view>
<van-uploader class="plus" file-list="{{ imgObj.invoice }}" upload-text="上传照片" max-count="1" deletable preview-size="192rpx" bind:after-read="upLoad" bind:delete="handleDeleteImg" data-attr="invoice">
</van-uploader>
<view class="label">行驶证</view>
<view class="flex">
<van-uploader class="driveFront" file-list="{{ imgObj.driveFront }}" upload-text="行驶证主页" max-count="1" deletable preview-size="192rpx" bind:after-read="upLoad" bind:delete="handleDeleteImg" data-attr="driveFront">
</van-uploader>
<van-uploader class="driveBack" file-list="{{ imgObj.driveBack }}" upload-text="行驶证副页" max-count="1" deletable preview-size="192rpx" bind:after-read="upLoad" bind:delete="handleDeleteImg" data-attr="driveBack">
</van-uploader>
</view>
<view class="label">合同购买时里程数</view>
<van-uploader class="plus" file-list="{{ imgObj.contract }}" upload-text="上传照片" max-count="1" deletable preview-size="192rpx" bind:after-read="upLoad" bind:delete="handleDeleteImg" data-attr="contract">
</van-uploader>
<view class="label">其他</view>
<van-uploader class="plus" file-list="{{ imgObj.other }}" upload-text="上传照片\n最多9张" max-count="9" deletable preview-size="192rpx" bind:after-read="upLoad" bind:delete="handleDeleteImg" data-attr="other">
</van-uploader>
</view>
</gl-form>
</view>
<view class="box m-b-40">
<view class="title">
<view>店面信息</view>
...
...
@@ -72,4 +129,5 @@
<button class="btn" bindtap="handleConfirm">{{serviceInfo.mode?'确认提交':'确认提交(2/2)'}}</button>
<button class="btn draft-btn" bindtap="handleDraft">存草稿</button>
<view class="h-40"></view>
</view>
\ No newline at end of file
</view>
<popup-select show="{{ popupShow }}" popObj="{{ popObj }}" typeName="{{ popObj.typename }}" bindconfirm="handleSelectConfirm" />
\ No newline at end of file
packageEquity/pages/carEquity/components/SecondStep/SecondStep.wxss
View file @
67262f5
...
...
@@ -97,7 +97,7 @@
color: #B6B6B8;
}
.arrow {
.
gearbox .
arrow {
width: 28rpx;
height: 26rpx;
margin-top: 26rpx;
...
...
@@ -186,10 +186,101 @@
.pro-head .pro-service {
font-size: 24rpx;
color: #999999;
margin-top: 4rpx;
}
.pro-list {
border: 4rpx solid #F4F5F7;
border-radius: 8rpx;
margin: 30rpx 0;
}
.label {
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
color: #222222;
}
.selectItem {
box-sizing: border-box;
height: 88rpx;
line-height: 88rpx;
text-align: right;
}
.selectItem .arrow {
width: 28rpx;
height: 26rpx;
margin-top: 32rpx;
}
.warranty {
display: flex;
justify-content: flex-end;
height: 80rpx;
line-height: 80rpx;
}
.warranty .input-suffix {
/* width: calc((100% - 212rpx) / 2); */
margin-left: 12rpx;
}
.upload {
padding-bottom: 40rpx;
}
.upload .van-uploader .van-uploader__wrapper .van-uploader__preview .van-uploader__preview-delete {
background-color: #B2B2B2 !important;
border-radius: 0 4rpx !important;
top: 0rpx !important;
right: 0rpx !important;
}
.upload .plus .van-icon-photograph:before {
content: '';
width: 32rpx;
height: 32rpx;
background-image: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/icon-plus.png');
background-size: 100% 100%;
}
.upload .driveFront {
margin-right: 24rpx;
}
.upload .driveFront .van-icon-photograph:before {
content: '';
width: 152rpx;
height: 108rpx;
background-image: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/icon-front.png');
background-size: 100% 100%;
}
.upload .driveBack .van-icon-photograph:before {
content: '';
width: 152rpx;
height: 108rpx;
background-image: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/icon-back.png');
background-size: 100% 100%;
}
.upload .van-uploader__upload-text {
font-size: 22rpx !important;
color: #9B9B9E !important;
}
.upload .driveFront .van-uploader .van-uploader__wrapper .van-uploader__upload,
.upload .driveBack .van-uploader .van-uploader__wrapper .van-uploader__upload {
width: 256rpx !important;
}
.upload .driveFront .van-uploader .van-uploader__wrapper .van-uploader__preview image,
.upload .driveBack .van-uploader .van-uploader__wrapper .van-uploader__preview image {
width: 256rpx !important;
}
.upload .van-uploader .van-uploader__wrapper .van-uploader__upload {
order: 0 !important;
}
\ No newline at end of file
packageEquity/pages/carEquity/components/constant/constantList.js
View file @
67262f5
...
...
@@ -67,9 +67,18 @@ const buyCarTypeList = [{
optionLabel
:
'全款车'
}]
const
vehicleNatureList
=
[{
optionId
:
0
,
optionLabel
:
'营运'
},
{
optionId
:
1
,
optionLabel
:
'非营运'
}]
export
default
{
seatesList
,
customerTypeList
,
cardTypeList
,
buyCarTypeList
buyCarTypeList
,
vehicleNatureList
}
packageEquity/pages/carEquity/components/constant/secondStepData.js
View file @
67262f5
...
...
@@ -54,6 +54,82 @@ const formRule = {
merchantAddress
:
[{
required
:
true
,
message
:
'联系地址不能为空'
}]
}
const
energyFormRule
=
{
servicePeriod
:
[{
required
:
true
,
message
:
'服务年限不能为空'
}],
vehicleRegistrationDate
:
[{
required
:
true
,
message
:
'车辆登记日期不能为空'
}],
vehicleDisplacement
:
[
{
required
:
true
,
message
:
'车型排量不能为空'
},
{
validator
:
(
rule
,
value
)
=>
{
return
/^
\d
+
(\.\d{1,2})?
$/
.
test
(
value
)
?
null
:
{
message
:
'车型排量请输入仅有两位小数的数字'
}
}
}
],
warrantyPeriod
:
[
{
required
:
true
,
message
:
'原厂质保年限不能为空'
},
{
validator
:
(
rule
,
value
)
=>
{
return
/^
\d
+$/
.
test
(
value
)
?
null
:
{
message
:
'原厂质保年限请输入整数'
}
}
}
],
warrantyKm
:
[
{
required
:
true
,
message
:
'原厂质保里程数不能为空'
},
{
validator
:
(
rule
,
value
)
=>
{
return
/^
\d
+
(\.\d{1,2})?
$/
.
test
(
value
)
?
null
:
{
message
:
'原厂质保里程数请输入仅有两位小数的数字'
}
}
}
],
mileage
:
[
{
required
:
true
,
message
:
'合同购买时里程数不能为空'
},
{
validator
:
(
rule
,
value
)
=>
{
return
/^
\d
+
(\.\d{1,2})?
$/
.
test
(
value
)
?
null
:
{
message
:
'合同购买时里程数请输入仅有两位小数的数字'
}
}
}
]
}
const
oilFormRule
=
{
servicePeriod
:
[{
required
:
true
,
message
:
'服务年限不能为空'
}],
vehicleRegistrationDate
:
[{
required
:
true
,
message
:
'车辆登记日期不能为空'
}],
vehicleNatureName
:
[{
required
:
true
,
message
:
'车辆使用性质不能为空'
}],
gearbox
:
[{
required
:
true
,
message
:
'变速箱类型不能为空'
}],
vehicleDisplacement
:
[
{
required
:
true
,
message
:
'车型排量不能为空'
},
{
validator
:
(
rule
,
value
)
=>
{
return
/^
\d
+
(\.\d{1,2})?
$/
.
test
(
value
)
?
null
:
{
message
:
'车型排量请输入仅有两位小数的数字'
}
}
}
],
warrantyPeriod
:
[
{
required
:
true
,
message
:
'原厂质保年限不能为空'
},
{
validator
:
(
rule
,
value
)
=>
{
return
/^
\d
+$/
.
test
(
value
)
?
null
:
{
message
:
'原厂质保年限请输入整数'
}
}
}
],
warrantyKm
:
[
{
required
:
true
,
message
:
'原厂质保里程数不能为空'
},
{
validator
:
(
rule
,
value
)
=>
{
return
/^
\d
+
(\.\d{1,2})?
$/
.
test
(
value
)
?
null
:
{
message
:
'原厂质保里程数请输入仅有两位小数的数字'
}
}
}
],
mileage
:
[
{
required
:
true
,
message
:
'合同购买时里程数不能为空'
},
{
validator
:
(
rule
,
value
)
=>
{
return
/^
\d
+
(\.\d{1,2})?
$/
.
test
(
value
)
?
null
:
{
message
:
'合同购买时里程数请输入仅有两位小数的数字'
}
}
}
]
}
const
secondObj
=
{
carFormList
:
[
{
...
...
@@ -93,7 +169,8 @@ const secondObj = {
label
:
'购车日期'
,
name
:
'billingDate'
,
type
:
'pickerTime'
,
end
:
new
Date
()
end
:
Util
.
tsFormatTime
(
new
Date
(),
'Y-M-D'
),
haveArrow
:
true
},
{
label
:
'品牌车系'
,
...
...
@@ -149,7 +226,6 @@ const secondObj = {
name
:
'customerAddress'
,
type
:
'input'
,
maxlength
:
'100'
,
noCellHeight
:
true
,
fieldType
:
'input'
}
],
...
...
@@ -160,7 +236,8 @@ const secondObj = {
type
:
'slot'
,
labelWidth
:
'0rpx'
,
noCellHeight
:
true
,
proFormList
:
[{
// 权益表单
equityProFormList
:
[{
label
:
'服务年限'
,
name
:
'servicePeriod'
,
type
:
'input'
,
...
...
@@ -193,7 +270,125 @@ const secondObj = {
attr
:
'entityCardFlag'
,
list
:
[
'Y'
]
}
}]
}],
// 新能源3电和6大件表单
energyProFormList
:
[{
label
:
'服务年限'
,
name
:
'servicePeriod'
,
type
:
'input'
,
disabled
:
true
,
suffix
:
'年'
,
noCellHeight
:
true
,
cellStyle
:
"height: 90rpx;"
},
{
label
:
'车辆登记日期'
,
name
:
'vehicleRegistrationDate'
,
type
:
'pickerTime'
,
end
:
Util
.
tsFormatTime
(
new
Date
(),
'Y-M-D'
),
labelWidth
:
'220rpx'
,
noCellHeight
:
true
,
cellStyle
:
"height: 90rpx;"
,
haveArrow
:
true
},
{
label
:
'车型排量'
,
name
:
'vehicleDisplacement'
,
type
:
'input'
,
suffix
:
'L'
,
fieldType
:
'digit'
,
inputLimit
:
{
type
:
'digit'
,
minVal
:
0
,
maxVal
:
100
},
noCellHeight
:
true
,
cellStyle
:
"height: 90rpx;"
},
{
label
:
'原厂质保'
,
name
:
'warranty'
,
type
:
'slot'
,
noCellHeight
:
true
,
cellBoxStyle
:
"width: 100%;"
},
{
label
:
'合同购买时里程数'
,
name
:
'mileage'
,
type
:
'input'
,
suffix
:
'KM'
,
noCellHeight
:
true
,
fieldType
:
'digit'
,
inputLimit
:
{
type
:
'digit'
,
minVal
:
0
},
labelWidth
:
'240rpx'
,
noCellHeight
:
true
,
cellStyle
:
"height: 90rpx; border-bottom: 0;"
}],
// 燃油车4大件
oilProFormList
:
[{
label
:
'服务年限'
,
name
:
'servicePeriod'
,
type
:
'input'
,
disabled
:
true
,
suffix
:
'年'
,
noCellHeight
:
true
,
cellStyle
:
"height: 90rpx;"
},
{
label
:
'车辆登记日期'
,
name
:
'vehicleRegistrationDate'
,
type
:
'pickerTime'
,
end
:
Util
.
tsFormatTime
(
new
Date
(),
'Y-M-D'
),
labelWidth
:
'220rpx'
,
noCellHeight
:
true
,
cellStyle
:
"height: 90rpx;"
,
haveArrow
:
true
},
{
label
:
'车辆使用性质'
,
name
:
'vehicleNature'
,
labelName
:
'vehicleNatureName'
,
type
:
'select'
,
optionList
:
constantList
.
vehicleNatureList
,
optionId
:
'optionId'
,
optionLabel
:
'optionLabel'
,
labelWidth
:
'180rpx'
,
noCellHeight
:
true
,
cellStyle
:
"height: 90rpx;"
},
{
label
:
'变速箱类型'
,
name
:
'gearbox'
,
type
:
'slot'
,
noCellHeight
:
true
,
cellStyle
:
"height: 90rpx;"
},
{
label
:
'车型排量'
,
name
:
'vehicleDisplacement'
,
type
:
'input'
,
suffix
:
'L'
,
inputLimit
:
{
type
:
'digit'
,
minVal
:
0
,
maxVal
:
100
},
noCellHeight
:
true
,
cellStyle
:
"height: 90rpx;"
},
{
label
:
'原厂质保'
,
name
:
'warranty'
,
type
:
'slot'
,
noCellHeight
:
true
,
cellBoxStyle
:
"width: 100%;"
},
{
label
:
'合同购买时里程数'
,
name
:
'mileage'
,
type
:
'input'
,
suffix
:
'KM'
,
labelWidth
:
'240rpx'
,
inputLimit
:
{
type
:
'digit'
,
minVal
:
0
},
noCellHeight
:
true
,
cellStyle
:
"height: 90rpx; border-bottom: 0;"
}],
},
// {
// label: '服务年限',
...
...
@@ -206,7 +401,8 @@ const secondObj = {
label
:
'生效日期'
,
name
:
'effectiveDate'
,
type
:
'pickerTime'
,
start
:
Util
.
tsFormatTime
(
new
Date
(
new
Date
().
setDate
(
new
Date
(
new
Date
()).
getDate
()
+
1
)),
'Y-M-D'
)
start
:
Util
.
tsFormatTime
(
new
Date
(
new
Date
().
setDate
(
new
Date
(
new
Date
()).
getDate
()
+
1
)),
'Y-M-D'
),
haveArrow
:
true
// .toLocaleDateString().replace('/','-')
},
// {
...
...
@@ -260,6 +456,13 @@ const secondObj = {
type
:
'input'
}
],
infoFormList
:
[{
label
:
' '
,
name
:
'upload'
,
type
:
'slot'
,
labelWidth
:
'0rpx'
,
noCellHeight
:
true
,
}],
storeFormList
:
[
{
label
:
'店面名称'
,
...
...
@@ -288,5 +491,7 @@ const secondObj = {
export
default
{
constantList
,
formRule
,
energyFormRule
,
oilFormRule
,
secondObj
}
packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
View file @
67262f5
// packageEquity/pages/carEquity/serviceInfo/serviceInfo.js
import
carLifeApi
from
'../../../carEquityApi'
import
secondStepData
from
'../components/constant/secondStepData'
import
constantData
from
'../components/constant/constantList'
const
sussObj
=
{
type
:
'success'
,
title
:
'提单成功'
,
...
...
@@ -43,7 +44,8 @@ Page({
isDialogShow
:
false
,
dialogObj
:
{},
scrollTop
:
0
,
cardSetting
:
true
cardSetting
:
true
,
isAsk
:
false
},
getPickerObj
(
obj
)
{
...
...
@@ -85,9 +87,21 @@ Page({
}
})
// 商品服务费,分-元
let
priceList
=
[
'actualSalesPrice'
]
obj
.
goodInfoList
.
forEach
((
item
,
idx
)
=>
{
if
(
item
.
actualSalesPrice
)
{
obj
.
goodInfoList
[
idx
].
actualSalesPrice
=
(
item
.
actualSalesPrice
/
100
).
toFixed
(
2
)
priceList
.
forEach
(
k
=>
{
obj
.
goodInfoList
[
idx
][
k
]
=
(
item
[
k
]
/
100
).
toFixed
(
2
)
})
if
(
item
.
vehicleRegistrationDate
)
{
item
.
vehicleRegistrationDate
=
new
Date
(
item
.
vehicleRegistrationDate
).
format
(
'yyyy-MM-dd'
)
}
if
(
item
.
itemsCode
==
'YB0003'
)
{
item
.
gearbox
=
item
.
gearbox
||
''
item
.
vehicleNature
=
typeof
item
.
vehicleNature
==
'number'
?
item
.
vehicleNature
:
1
let
val
=
constantData
.
vehicleNatureList
.
find
(
k
=>
k
.
optionId
==
item
.
vehicleNature
)
if
(
val
)
{
item
.
vehicleNatureName
=
val
.
optionLabel
}
}
})
// picker-label处理
...
...
@@ -152,30 +166,10 @@ Page({
// 权益卡
this
.
getInterestCardSetting
(
data
.
goodId
)
}
// goodInfoList,数据结构 - 删
// data.goodInfoList = [{
// items: ['xx服务', '哈哈服务', '嘻嘻服务'],
// goodName: '商品名称',
// actualSalesPrice: 3 || data.actualSalesPrice,
// card: data.card,
// contractNo: data.contractNo,
// packageCode: data.packageCode,
// servicePeriod: data.servicePeriod,
// goodId: data.goodId,
// entityCardFlag: 'Y'
// }, {
// items: ['xx服务', '哈哈服务', '嘻嘻服务'],
// goodName: '商品名称22',
// actualSalesPrice: data.actualSalesPrice,
// card: data.card,
// contractNo: data.contractNo,
// packageCode: data.packageCode,
// servicePeriod: data.servicePeriod,
// goodId: data.goodId,
// entityCardFlag: 'N'
// }]
// data.attachmentList = data.attachmentList
this
.
setData
({
serviceInfo
:
data
,
[
'serviceInfo.attachmentList'
]:
data
?.
attachmentList
||
[],
step
:
data
.
mode
?
'second'
:
'first'
// 先调试
})
...
...
@@ -258,10 +252,11 @@ Page({
}
})
// 商品服务费,分-元
let
priceList
=
[
'actualSalesPrice'
]
obj
.
goodInfoList
.
forEach
((
item
,
idx
)
=>
{
if
(
item
.
actualSalesPrice
)
{
obj
.
goodInfoList
[
idx
]
.
actualSalesPrice
=
(
item
.
actualSalesPrice
*
100
).
toFixed
(
0
)
}
priceList
.
forEach
(
k
=>
{
obj
.
goodInfoList
[
idx
]
[
k
]
=
(
item
[
k
]
*
100
).
toFixed
(
0
)
}
)
})
return
obj
},
...
...
@@ -271,12 +266,19 @@ Page({
draft
:
0
,
confirm
:
1
}
let
{
serviceInfo
}
=
this
.
data
let
_this
=
this
let
{
serviceInfo
,
isAsk
}
=
this
.
data
if
(
isAsk
)
{
return
true
}
let
type
=
e
.
detail
?.
type
||
'draft'
let
params
=
this
.
dealComfirmData
(
JSON
.
parse
(
JSON
.
stringify
(
serviceInfo
)))
// 0草稿,1提单
params
.
operationType
=
typeObj
[
type
]
console
.
log
(
params
,
'调接口---'
)
this
.
setData
({
isAsk
:
true
})
// return
carLifeApi
.
updateEquity
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
'0'
)
{
...
...
@@ -289,11 +291,15 @@ Page({
})
}
else
{
// wx.$router.reLaunch('packageEquity.equityPage')
wx
.
$router
.
reLaunch
(
'packageEquity.equityPage'
,
{
tabIndex
:
1
})
wx
.
$router
.
reLaunch
(
'packageEquity.equityPage'
,
{
tabIndex
:
1
})
}
}
else
{
wx
.
$util
.
showToast
(
res
.
message
||
'接口异常'
)
}
}).
finally
(()
=>
{
_this
.
setData
({
isAsk
:
false
})
})
},
...
...
@@ -305,13 +311,22 @@ Page({
})
},
handleSecondConfirm
(
e
)
{
let
{
serviceInfo
,
conSecondObj
}
=
this
.
data
let
{
serviceInfo
,
conSecondObj
,
isAsk
}
=
this
.
data
if
(
isAsk
)
{
return
true
}
if
(
e
.
detail
?.
type
==
'confirm'
)
{
this
.
setData
({
isAsk
:
true
})
carLifeApi
.
checkVin
({
vin
:
serviceInfo
.
vin
})
.
then
(
res
=>
{
this
.
setData
({
isAsk
:
false
})
if
(
res
.
code
==
'0'
)
{
this
.
confirm
(
e
)
}
else
if
(
res
.
code
==
'-2'
)
{
...
...
@@ -367,7 +382,7 @@ Page({
this
.
setData
({
isDialogShow
:
false
})
wx
.
$router
.
reLaunch
(
'packageEquity.equityPage'
,
{
tabIndex
:
1
})
wx
.
$router
.
reLaunch
(
'packageEquity.equityPage'
,
{
tabIndex
:
1
})
},
// 合同地址
...
...
@@ -458,7 +473,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{},
onReady
()
{
},
/**
* 生命周期函数--监听页面显示
...
...
@@ -466,32 +481,32 @@ Page({
onShow
()
{
let
{
isBack
}
=
this
.
data
if
(
isBack
)
{
wx
.
$router
.
reLaunch
(
'packageEquity.equityPage'
,
{
tabIndex
:
1
})
wx
.
$router
.
reLaunch
(
'packageEquity.equityPage'
,
{
tabIndex
:
1
})
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{},
onHide
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{},
onUnload
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{},
onPullDownRefresh
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{},
onReachBottom
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
()
{}
onShareAppMessage
()
{
}
})
packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxss
View file @
67262f5
/* packageEquity/pages/carEquity/serviceInfo/serviceInfo.wxss */
.layout {
height: 100vh;
min-
height: 100vh;
background: #F4F5F7;
padding: 20rpx 0 60rpx;
}
\ No newline at end of file
}
packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.js
View file @
67262f5
// packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.js
import
{
getOrderDetail
}
from
'../../../api'
import
{
getOrderDetail
,
getQuotationInfoById
}
from
'../../../api'
let
timer
=
null
Page
({
/**
...
...
@@ -57,8 +57,48 @@ Page({
apiName
:
'handler'
})
},
getQuotationInfoById
()
{
let
{
id
}
=
this
.
data
getQuotationInfoById
({
id
}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
console
.
log
(
res
)
let
{
orderId
,
payId
,
merchantAddress
,
merchantName4s
,
quotationGoodsInfoList
}
=
data
quotationGoodsInfoList
if
(
quotationGoodsInfoList
&&
quotationGoodsInfoList
.
length
)
{
quotationGoodsInfoList
.
forEach
(
item
=>
{
if
(
item
.
position
)
{
const
fieldMap
=
{
"4大件"
:
"燃油车4大件服务"
,
"3电"
:
"新能源3电服务"
,
"6大件"
:
"新能源6大件服务"
,
// 在这里可以添加更多的替换规则
};
// 如果输入字段在字段映射中有匹配项,则进行替换,否则保持不变
fieldMap
[
item
.
position
]
&&
(
item
.
position
=
fieldMap
[
item
.
position
])
}
if
(
item
.
quotationGoodsServiceItemsRelationDTOList
&&
item
.
quotationGoodsServiceItemsRelationDTOList
.
length
)
{
item
.
serviceItems
=
item
.
quotationGoodsServiceItemsRelationDTOList
.
reduce
((
prev
,
subItm
,
index
)
=>
{
let
unit
=
index
==
0
?
''
:
'/'
prev
+=
unit
+
subItm
.
serviceName
return
prev
},
''
)
}
})
}
this
.
setData
({
orderCode
:
payId
,
merchantAddress
,
merchantName4s
,
orderId
,
[
'orderDetail.quotationGoodsInfoList'
]:
quotationGoodsInfoList
// quotationGoodsInfoList
// id
})
this
.
createWxQrcode
()
})
},
getOrderDetail
()
{
let
{
orderCode
}
=
this
.
data
let
{
orderCode
,
orderDetail
}
=
this
.
data
getOrderDetail
({
orderCode
}).
then
(
res
=>
{
console
.
log
(
res
)
let
{
code
,
data
}
=
res
...
...
@@ -69,6 +109,7 @@ Page({
if
(
code
==
0
)
{
this
.
setData
({
orderDetail
:
{
...
orderDetail
,
...
data
.
customer
,
...
data
}
...
...
@@ -85,6 +126,7 @@ Page({
id
})
this
.
getOrderDetail
()
this
.
getQuotationInfoById
()
// this.countDownTimer()
},
/**
...
...
packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay.js
View file @
67262f5
...
...
@@ -120,7 +120,7 @@ Page({
// _this.getDetail(orderCode)
// },
getDetail
()
{
let
{
orderCode
}
=
this
.
data
let
{
orderCode
,
orderDetail
}
=
this
.
data
// console.log(orderCode)
let
_this
=
this
getOrderDetail
({
...
...
@@ -137,6 +137,7 @@ Page({
if
(
code
==
0
)
{
this
.
setData
({
orderDetail
:
{
...
orderDetail
,
...
data
.
customer
,
...
data
// ...data.payOrder
...
...
@@ -191,7 +192,30 @@ Page({
getQuotationInfoById
({
id
}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
console
.
log
(
res
)
let
{
orderId
,
payId
,
merchantAddress
,
merchantName4s
,
goodsOrderDTO
:
orderInfo
}
=
data
let
{
orderId
,
payId
,
merchantAddress
,
merchantName4s
,
quotationGoodsInfoList
}
=
data
// quotationGoodsInfoList
if
(
quotationGoodsInfoList
&&
quotationGoodsInfoList
.
length
)
{
quotationGoodsInfoList
.
forEach
(
item
=>
{
if
(
item
.
position
)
{
const
fieldMap
=
{
"4大件"
:
"燃油车4大件服务"
,
"3电"
:
"新能源3电服务"
,
"6大件"
:
"新能源6大件服务"
,
// 在这里可以添加更多的替换规则
};
// 如果输入字段在字段映射中有匹配项,则进行替换,否则保持不变
fieldMap
[
item
.
position
]
&&
(
item
.
position
=
fieldMap
[
item
.
position
])
}
if
(
item
.
quotationGoodsServiceItemsRelationDTOList
&&
item
.
quotationGoodsServiceItemsRelationDTOList
.
length
)
{
item
.
serviceItems
=
item
.
quotationGoodsServiceItemsRelationDTOList
.
reduce
((
prev
,
subItm
,
index
)
=>
{
let
unit
=
index
==
0
?
''
:
'/'
prev
+=
unit
+
subItm
.
serviceName
return
prev
},
''
)
}
})
}
console
.
log
(
quotationGoodsInfoList
,
'quotationGoodsInfoList'
);
this
.
setData
({
// || '230311133649896'
// orderCode: orderCode || '230310104652929',
...
...
@@ -199,16 +223,19 @@ Page({
// orderCode: '230310104652929',
merchantAddress
,
merchantName4s
,
orderId
orderId
,
[
'orderDetail.quotationGoodsInfoList'
]:
quotationGoodsInfoList
// quotationGoodsInfoList
// id
})
this
.
createWxQrcode
()
})
},
onRoute
(
options
)
{
// console.log(options,'options');
// console.log(options = 19)
let
{
data
,
id
}
=
options
// id = 1
23
// id = 1
50
// orderCode: 230724111753590
this
.
setData
({
id
})
this
.
getQuotationInfoById
()
...
...
packageEquity/pages/carQuotation/components/PopupSelect/PopupSelect.js
View file @
67262f5
...
...
@@ -134,6 +134,32 @@ Component({
}
]
},
gearboxtype
:
{
name
:
'变速箱类型'
,
height
:
'810rpx'
,
optionsList
:
[
{
value
:
'MT变速箱'
},
{
value
:
'AMT变速箱'
},
{
value
:
'AT变速箱'
},
{
value
:
'CVT变速箱'
},
{
value
:
'DCT变速箱'
},
{
label
:
'自定义'
,
value
:
''
,
type
:
'input'
}
]
},
optionsList
:
[]
},
pageLifetimes
:
{
...
...
@@ -142,8 +168,8 @@ Component({
// console.log('attached', attached)
this
.
initOptions
()
},
show
:
function
()
{},
hide
:
function
()
{}
show
:
function
()
{
},
hide
:
function
()
{
}
},
/**
* 组件的方法列表
...
...
@@ -221,13 +247,15 @@ Component({
let
thisPage
=
wx
.
$router
.
getPageInstance
()
// let popValue = thisPage.data[attrname][attrtype]
console
.
log
(
flag
.
value
,
attrname
,
attrtype
,
'flag.value'
)
thisPage
.
setData
({
[
'orderInfo'
+
'.'
+
attrtype
+
'.'
+
attrname
]:
flag
.
value
})
if
(
attrtype
||
attrname
)
{
thisPage
.
setData
({
[
'orderInfo'
+
'.'
+
attrtype
+
'.'
+
attrname
]:
flag
.
value
})
}
this
.
setData
({
show
:
false
})
this
.
triggerEvent
(
'confirm'
)
this
.
triggerEvent
(
'confirm'
,
{
value
:
flag
.
value
}
)
}
}
})
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
67262f5
...
...
@@ -44,7 +44,7 @@ Page({
orderInfo
:
{
mode
:
1
,
insurancePrice
:
''
,
vdQuotationGoodsList
:[]
vdQuotationGoodsList
:
[]
// 0-商业,1-交强,2-车船,3-增值车损,4-other 对应下面字段名字
// owner
// business: {
...
...
@@ -69,7 +69,7 @@ Page({
// 页面存放表单对象的对象名
dataAttrName
:
'owner'
,
// step: 'first',
step
:
'second'
,
// 非融合不要第一步
step
:
'second'
,
// 非融合不要第一步
needChangeList
:
[
'price'
,
'base'
,
'threePremium'
,
'carInsidePremium'
,
'passengerPremium'
,
'payPrice'
,
,
'insurancePrice'
,
'quotedPriceUpdate'
,
'minEquityPrice'
]
},
closeTips
()
{
...
...
@@ -195,6 +195,9 @@ Page({
data
}
=
result
if
(
code
==
0
&&
data
)
{
this
.
setData
({
confirmStatus
:
false
})
wx
.
showToast
({
title
:
'补录订单成功'
,
icon
:
'success'
...
...
@@ -221,13 +224,13 @@ Page({
// 修改权益报价逻辑
// let { modifyEquityQuotation, confirmStatus,outTradeNo } = this.data
// 是订单补录直接走另外的补录逻辑
if
(
outTradeNo
)
return
this
.
setQuotationRecording
()
if
(
confirmStatus
)
return
false
wx
.
showLoading
(
'报价中...'
)
this
.
setData
({
confirmStatus
:
true
})
if
(
outTradeNo
)
return
this
.
setQuotationRecording
()
wx
.
showLoading
(
'报价中...'
)
let
result
=
await
this
.
handleSecondConfirmCheck
(
true
)
let
{
code
,
...
...
@@ -240,8 +243,11 @@ Page({
// 校验生成告知书是否成功
let
status
=
await
this
.
createWithPay
(
id
)
wx
.
hideLoading
()
this
.
setData
({
confirmStatus
:
false
let
that
=
this
setTimeout
(()
=>
{
that
.
setData
({
confirmStatus
:
false
})
})
console
.
log
(
'id'
,
id
)
// { orderId:data.orderId, id }
...
...
@@ -518,21 +524,25 @@ Page({
data
=
data
.
map
(
item
=>
{
// console.log(item.upgradeGoodsServiceItemsList,'item.upgradeGoodsServiceItemsList');
let
serveName
if
(
item
.
upgradeGoodsServiceItemsList
)
{
serveName
=
item
.
upgradeGoodsServiceItemsList
.
reduce
((
label
,
ele
,
index
)
=>
{
let
unit
=
index
==
item
.
upgradeGoodsServiceItemsList
.
length
?
''
:
'/'
// debugger
label
=
label
+
ele
?.
serviceName
+
unit
return
label
},
''
)
}
// let serveName = item.upgradeGoodsServiceItemsList.reduce((label, ele, index) => {
// let unit = index == item.upgradeGoodsServiceItemsList.length ? '' : '/'
// // debugger
// label = label + ele?.serviceName + unit
// return label
// }, '')
// console.log(serveName,'serveName');
if
(
item
.
upgradeGoodsServiceItemsList
&&
item
.
upgradeGoodsServiceItemsList
.
length
)
{
serveName
=
item
.
upgradeGoodsServiceItemsList
.
reduce
((
label
,
ele
,
index
)
=>
{
let
unit
=
index
==
0
?
''
:
'/'
// debugger
label
=
label
+
unit
+
ele
?.
serviceName
return
label
},
''
)
}
if
(
item
.
position
)
{
const
fieldMap
=
{
"4大件"
:
"燃油车4大件服务"
,
"3电"
:
"新能源3电服务"
,
"6大件"
:
"新能源6大件服务"
,
// 在这里可以添加更多的替换规则
};
// 如果输入字段在字段映射中有匹配项,则进行替换,否则保持不变
fieldMap
[
item
.
position
]
&&
(
serveName
=
fieldMap
[
item
.
position
])
}
console
.
log
(
serveName
,
'serveName'
);
return
{
...
item
,
serveName
,
...
...
packageEquity/pages/carQuotation/fullSignture/fullSignture.js
View file @
67262f5
...
...
@@ -38,7 +38,7 @@ Page({
let
query
=
wx
.
createSelectorQuery
().
in
(
this
)
//获取自定义组件的SelectQuery对象
this
.
canvasCtx
=
wx
.
createCanvasContext
(
'signature'
,
that
)
// 设置线的样式
this
.
canvasCtx
.
setFillStyle
(
'
white
'
)
this
.
canvasCtx
.
setFillStyle
(
'
rgba(0, 0, 0, 0)
'
)
this
.
canvasCtx
.
fillRect
(
0
,
0
,
windowWidth
,
windowHeight
)
this
.
canvasCtx
.
setLineCap
(
'round'
)
this
.
canvasCtx
.
setLineJoin
(
'round'
)
...
...
@@ -115,7 +115,7 @@ Page({
//清空画布
let
ctx
=
this
.
canvasCtx
ctx
.
clearRect
(
0
,
0
,
this
.
data
.
canvasWidth
,
this
.
data
.
canvasHeight
)
ctx
.
fillStyle
=
'rgba(0, 0, 0,
.1
)'
ctx
.
fillStyle
=
'rgba(0, 0, 0,
0
)'
ctx
.
draw
()
this
.
setData
({
hasDraw
:
false
,
//未签字
...
...
packageEquity/pages/carQuotation/signature/signature.js
View file @
67262f5
...
...
@@ -41,7 +41,7 @@ Page({
let
query
=
wx
.
createSelectorQuery
().
in
(
this
)
//获取自定义组件的SelectQuery对象
this
.
canvasCtx
=
wx
.
createCanvasContext
(
'signature'
,
that
)
// 设置线的样式
this
.
canvasCtx
.
setFillStyle
(
'
white
'
)
this
.
canvasCtx
.
setFillStyle
(
'
rgba(0, 0, 0, 0)
'
)
this
.
canvasCtx
.
fillRect
(
0
,
0
,
600
,
600
)
this
.
canvasCtx
.
setLineCap
(
'round'
)
this
.
canvasCtx
.
setLineJoin
(
'round'
)
...
...
@@ -129,7 +129,7 @@ Page({
//清空画布
let
ctx
=
this
.
canvasCtx
ctx
.
clearRect
(
0
,
0
,
this
.
data
.
canvasWidth
,
this
.
data
.
canvasHeight
)
ctx
.
fillStyle
=
'rgba(0, 0, 0,
.1
)'
ctx
.
fillStyle
=
'rgba(0, 0, 0,
0
)'
ctx
.
draw
()
this
.
setData
({
hasDraw
:
false
,
//未签字
...
...
tabWorkOrder/pages/additionRecordOrder/additionRecordOrder.js
View file @
67262f5
...
...
@@ -227,38 +227,38 @@ Page({
})
let
{
goodsList
}
=
this
.
data
//
this.setGoodsTotal(goodsList)
this
.
setGoodsTotal
(
goodsList
)
},
// 屏蔽不用
//
setGoodsTotal(goodsList) {
//
let { totalFee } = this.data
//
let total = 0
//
// goodsList.map(i => (total += i.count * i.price))
//
goodsList.map(i => {
//
const totalPrice = NP.times(i.count, i.price)
//
total = NP.plus(total, totalPrice)
//
})
//
// 用来解决小数相减导致精度问题
//
// total = this.accMul(total, 100)
//
total = NP.times(total, 100)
//
// total = parseFloat(total.toFixed(2))
//
// console.log(total * 100)
//
// console.log(totalFee)
//
// console.log(totalFee * 100)
//
// 计算差价格 没有就归0 100是用来解决小数相减导致精度问题
//
// console.log(this.accMul(total, 100))
//
// 解决数据精度丢失问题
//
// let priceSpread = goodsList.length ? parseFloat((total - totalFee).toFixed(2)) : 0
//
let priceSpread = goodsList.length ? NP.minus(total, totalFee) : 0
//
// console.log(priceSpread)
//
this.setData({
//
priceSpread: priceSpread,
//
// total: wx.$util.decimal(total, 2)
//
total
//
})
//
},
setGoodsTotal
(
goodsList
)
{
let
{
totalFee
}
=
this
.
data
let
total
=
0
// goodsList.map(i => (total += i.count * i.price))
goodsList
.
map
(
i
=>
{
const
totalPrice
=
NP
.
times
(
i
.
count
,
i
.
price
)
total
=
NP
.
plus
(
total
,
totalPrice
)
})
// 用来解决小数相减导致精度问题
// total = this.accMul(total, 100)
total
=
NP
.
times
(
total
,
100
)
// total = parseFloat(total.toFixed(2))
// console.log(total * 100)
// console.log(totalFee)
// console.log(totalFee * 100)
// 计算差价格 没有就归0 100是用来解决小数相减导致精度问题
// console.log(this.accMul(total, 100))
// 解决数据精度丢失问题
// let priceSpread = goodsList.length ? parseFloat((total - totalFee).toFixed(2)) : 0
let
priceSpread
=
goodsList
.
length
?
NP
.
minus
(
total
,
totalFee
)
:
0
// console.log(priceSpread)
this
.
setData
({
priceSpread
:
priceSpread
,
// total: wx.$util.decimal(total, 2)
//
total
})
},
// accSub(arg1, arg2) {
// let r1, r2, m, n
...
...
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