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 842fe909
authored
Apr 03, 2025
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
V4.51.2-0408上传合同协议需求开发
1 parent
1140258a
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
214 additions
and
85 deletions
packageEquity/api.js
packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.js
packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.json
packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.sass
packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.wxml
packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay.js
packageEquity/pages/carQuotation/components/OrderScreen/OrderScreen.js
packageEquity/pages/carQuotation/components/OrderScreen/OrderScreen.wxml
packageEquity/pages/carQuotation/components/zyPayPopup/zyPayPopup.js
packageEquity/pages/carQuotation/components/zyPayPopup/zyPayPopup.wxml
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.wxml
packageEquity/pages/carQuotation/index/index.js
packageEquity/pages/carQuotation/index/index.wxml
pages/webView/webView.js
packageEquity/api.js
View file @
842fe90
...
...
@@ -223,5 +223,9 @@ module.exports = {
// 校验流水号
checkRecord
(
data
)
{
return
api
.
post
(
"dj.api.smartcarlife.vehicle.damage.upgrade.quotation.record.check"
,
data
)
},
// 校验订单是否需要上传合同协议
checkZyPayFlag
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.check'
,
data
)
}
}
packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.js
View file @
842fe90
// packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.js
import
{
getOrderDetail
,
getQuotationInfoById
}
from
'../../../api'
import
{
getOrderDetail
,
getQuotationInfoById
,
updateCustomerInfo
}
from
'../../../api'
let
timer
=
null
Page
({
/**
...
...
@@ -11,11 +11,13 @@ Page({
// editName: '修改',
// cancelName: '稍后处理',
timer
:
null
}
},
showZyPopup
:
false
,
zyFlag
:
false
},
// 倒计时10s功能
countDownTimer
()
{
countDownTimer
(
zyFlag
)
{
let
sec
=
10
let
{
id
,
orderId
,
timer
}
=
this
.
data
let
that
=
this
...
...
@@ -23,13 +25,17 @@ Page({
let
objNameStr
=
'textNameObj.confirmName'
// const str = '前往提单(10s)'
that
.
setData
({
[
objNameStr
]:
`下一步·去签名(4/4)(
${
sec
}
s)`
[
objNameStr
]:
`
${
zyFlag
?
'下一步·上传协议(4/4)'
:
'下一步·去签名(4/4)'
}
(
${
sec
}
s)`
,
showBtnFlag
:
true
})
sec
--
if
(
sec
==
-
1
)
{
clearInterval
(
timer
)
// 清除定时器
// 跳转提单页面
// this.navigator()
if
(
zyFlag
)
{
// 需要上传合同协议
return
this
.
setData
({
showZyPopup
:
true
})
// 上传合同协议弹窗
}
// 跳转签名页面
wx
.
$router
.
redirectTo
(
'signature'
,
{
id
,
orderId
})
}
...
...
@@ -39,9 +45,10 @@ Page({
btnTap
(
e
)
{
console
.
log
(
e
)
let
{
name
}
=
e
.
detail
let
{
id
,
orderId
,
timer
}
=
this
.
data
let
{
id
,
orderId
,
timer
,
zyFlag
}
=
this
.
data
if
(
name
==
'confirm'
)
{
clearInterval
(
timer
)
if
(
zyFlag
)
return
this
.
setData
({
showZyPopup
:
true
})
wx
.
$router
.
redirectTo
(
'signature'
,
{
id
,
orderId
})
}
else
{
// this.triggerEvent('editSave')
...
...
@@ -50,6 +57,36 @@ Page({
// wx.$router.reLaunch('packageEquity.index')
}
},
// 合同协议上传确定
zyPayConfirm
(
e
)
{
wx
.
$util
.
showLoading
()
let
{
zyPayOrderInfo
}
=
this
.
data
// 更新客户信息
updateCustomerInfo
({
...
zyPayOrderInfo
,
zyPayUrl
:
e
.
detail
?.
zyPayUrl
?.
join
(
','
)
}).
then
(
result
=>
{
wx
.
$util
.
hideLoading
()
let
{
code
,
message
}
=
result
if
(
code
==
0
)
{
// 返回到报价单列表
wx
.
$router
.
reLaunch
(
"packageEquity.equityPage"
,
{
tabIndex
:
1
,
})
}
else
{
wx
.
$util
.
showToast
(
message
)
}
})
},
getInsurance
(
res
)
{
let
obj
=
wx
.
$util
.
deepClone
(
res
),
orderInfo
=
{};
let
{
default4SStoreInfo
}
=
wx
.
$util
.
getUserInfo
();
orderInfo
.
check
=
true
orderInfo
.
id
=
obj
.
id
orderInfo
.
orderId
=
obj
.
orderId
orderInfo
.
merchantId4s
=
default4SStoreInfo
?.
merchantId
;
orderInfo
.
merchantName4s
=
default4SStoreInfo
?.
merchantName
;
orderInfo
.
referrer
=
obj
.
referrer
orderInfo
.
referrerId
=
obj
.
referrerId
return
orderInfo
;
},
navigator
()
{
let
{
orderId
}
=
this
.
data
wx
.
$router
.
go
(
'serviceInfo'
,
{
...
...
@@ -85,16 +122,22 @@ Page({
}
})
}
// 处理用于上传合同协议更新客户信息接口的参数
let
zyPayOrderInfo
=
this
.
getInsurance
(
data
)
this
.
setData
({
orderCode
:
payId
,
merchantAddress
,
merchantName4s
,
orderId
,
[
'orderDetail.quotationGoodsInfoList'
]:
quotationGoodsInfoList
[
'orderDetail.quotationGoodsInfoList'
]:
quotationGoodsInfoList
,
zyPayOrderInfo
// quotationGoodsInfoList
// id
})
this
.
createWxQrcode
()
this
.
setData
({
zyFlag
:
data
?.
zyPayStatus
==
1
})
this
.
countDownTimer
(
data
?.
zyPayStatus
==
1
)
})
},
getOrderDetail
()
{
...
...
@@ -137,7 +180,7 @@ Page({
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
this
.
countDownTimer
()
//
this.countDownTimer()
},
/**
...
...
packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.json
View file @
842fe90
{
"usingComponents"
:
{
"Gl-Button-Group"
:
"../../../components/GlButtonGroup/GlButtonGroup"
,
"order-info"
:
"../../../components/orderInfoCom/orderInfoCom"
"order-info"
:
"../../../components/orderInfoCom/orderInfoCom"
,
"zy-pay-popup"
:
"../components/zyPayPopup/zyPayPopup"
},
"navigationBarTitleText"
:
"订单详情"
}
packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.sass
View file @
842fe90
...
...
@@ -59,4 +59,7 @@
.order-info
{
width
:
var
(
--
fontSize710
)
;
margin
:
0
auto
;
}
.btn_box
{
padding
:
0
var
(
--
fontSize64
)
}
\ No newline at end of file
packageEquity/pages/carQuotation/CarQuotationDetail/CarQuotationDetail.wxml
View file @
842fe90
...
...
@@ -9,7 +9,7 @@
<view class="descText">
<text>1.</text>
<text class="fontBold">客户服务合同</text>
<text>:手机端支持ocr快速出单,点下一步去
签名
;</text>
<text>:手机端支持ocr快速出单,点下一步去
提单或权益订单补录
;</text>
</view>
<view class="descText">
2.
...
...
@@ -21,5 +21,9 @@
<view class="order-info">
<order-info OderType="detail" orderInfo="{{orderDetail}}" />
</view>
<Gl-Button-Group bindbtnTap="btnTap" textNameObj="{{textNameObj}}" />
<view class="btn_box">
<Gl-Button-Group bindbtnTap="btnTap" wx:if="{{showBtnFlag}}" textNameObj="{{textNameObj}}" />
</view>
<!-- 上传合同协议 -->
<zy-pay-popup show="{{showZyPopup}}" wx:if="{{showZyPopup}}" onlinePaymentFlag="{{true}}" bindconfirm="zyPayConfirm"></zy-pay-popup>
packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay.js
View file @
842fe90
...
...
@@ -80,11 +80,12 @@ Page({
// 生成小程序码
createWxQrcode
()
{
let
_this
=
this
let
{
zyVoucherStatus
}
=
_this
.
data
let
oParams
=
{}
oParams
.
appId
=
'wx06d1198e751435d1'
oParams
.
qrcodeType
=
'QR_WXA_UNLIMIT'
oParams
.
path
=
'packagesPayment/pages/payment/index'
oParams
.
scene
=
`orderCode=
${
_this
.
data
.
orderCode
}
&workWxSessionId=
${
wx
.
getStorageSync
(
'dj_boutique_sessionId'
)}
`
oParams
.
scene
=
`orderCode=
${
_this
.
data
.
orderCode
}
&workWxSessionId=
${
wx
.
getStorageSync
(
'dj_boutique_sessionId'
)}
&zyVoucherStatus=
${
zyVoucherStatus
}
`
oParams
.
channelType
=
1
// B端小程序调用接口生成领券码时,传参userId用uuid,类型由int变string
createQrcodeImage
(
oParams
).
then
(
res
=>
{
...
...
@@ -235,10 +236,10 @@ Page({
onRoute
(
options
)
{
// console.log(options,'options');
// console.log(options = 19)
let
{
data
,
id
}
=
options
let
{
data
,
id
,
zyVoucherStatus
}
=
options
// id = 150
// orderCode: 230724111753590
this
.
setData
({
id
})
this
.
setData
({
id
,
zyVoucherStatus
})
this
.
getQuotationInfoById
()
},
/**
...
...
packageEquity/pages/carQuotation/components/OrderScreen/OrderScreen.js
View file @
842fe90
...
...
@@ -41,7 +41,7 @@ Component({
this
.
setOrderStatusListDisabled
(
n
)
}
},
zyStatus
:
{
//
延保
协议状态
zyStatus
:
{
//
合同
协议状态
type
:
String
,
value
:
null
,
observer
:
function
(
n
)
{
...
...
@@ -146,7 +146,7 @@ Component({
value
:
5
}
],
//
延保
协议状态数据
//
合同
协议状态数据
zyPayStatus
:
[{
name
:
'全部'
,
active
:
true
,
...
...
@@ -316,7 +316,7 @@ Component({
i
.
active
=
false
})
target
[
index
].
active
=
true
// 切换
延保
协议,将支付状态置为全部
// 切换
合同
协议,将支付状态置为全部
if
(
listName
===
'zyPayStatus'
&&
index
!=
0
)
{
let
{
orderStatus
}
=
this
.
data
.
form
orderStatus
?.
map
((
val
,
idx
)
=>
{
...
...
@@ -327,7 +327,7 @@ Component({
'form.orderStatus'
:
orderStatus
})
}
// 切换订单状态,非全部,将
延保
协议置为全部
// 切换订单状态,非全部,将
合同
协议置为全部
if
(
listName
===
'orderStatus'
&&
index
!=
0
)
{
let
{
zyPayStatus
}
=
this
.
data
.
form
zyPayStatus
?.
map
((
val
,
idx
)
=>
{
...
...
@@ -353,7 +353,7 @@ Component({
orderStatus
.
map
((
e
,
index
)
=>
{
e
.
active
=
e
.
value
==
statusType
})
if
(
statusType
!==
''
)
{
// 有订单状态,将
延保
协议状态置为全部
if
(
statusType
!==
''
)
{
// 有订单状态,将
合同
协议状态置为全部
zyPayStatus
.
map
((
e
,
index
)
=>
{
e
.
active
=
false
if
(
index
==
0
)
e
.
active
=
true
...
...
@@ -366,10 +366,10 @@ Component({
[
'form.orderStatus'
]:
wx
.
$util
.
deepClone
(
orderStatus
)
})
},
//
延保
协议
//
合同
协议
setZyPayStatus
(
value
)
{
let
{
zyPayStatus
,
orderStatus
}
=
this
.
data
if
(
value
!==
''
)
{
// 没有
延保
协议状态时 防止干扰
if
(
value
!==
''
)
{
// 没有
合同
协议状态时 防止干扰
orderStatus
.
map
((
e
,
index
)
=>
{
e
.
active
=
false
if
(
index
==
0
)
e
.
active
=
true
...
...
@@ -464,7 +464,7 @@ Component({
val
.
active
=
false
if
(
index
==
0
)
val
.
active
=
true
})
// 将
延保
协议状态置为全部
// 将
合同
协议状态置为全部
zyPayStatus
?.
map
((
val
,
index
)
=>
{
val
.
active
=
false
if
(
index
==
0
)
val
.
active
=
true
...
...
packageEquity/pages/carQuotation/components/OrderScreen/OrderScreen.wxml
View file @
842fe90
...
...
@@ -144,7 +144,7 @@
</view>
<view class="box">
<view class="title">
延保
协议
合同
协议
</view>
<view class="list-box">
<block wx:for="{{form.zyPayStatus}}" wx:key="index">
...
...
packageEquity/pages/carQuotation/components/zyPayPopup/zyPayPopup.js
View file @
842fe90
...
...
@@ -23,7 +23,9 @@ Component({
}
}
},
isListShow
:
Boolean
isListShow
:
Boolean
,
// 是否报价单列表
onlinePaymentFlag
:
Boolean
,
// 是否线上支付
supplementaryFlag
:
Boolean
// 是否订单补录
},
/**
...
...
@@ -56,6 +58,7 @@ Component({
let
{
fileList
}
=
_this
.
data
wx
.
chooseImage
({
count
:
9
-
fileList
?.
length
,
sizeType
:
[
'original'
],
// 选择图片为原图
success
(
res
)
{
_this
.
setData
({
loadingFlag
:
true
...
...
@@ -202,8 +205,12 @@ Component({
},
close
(
e
,
pageBackNum
)
{
// pageBackNum 从h5返回页面层级数
let
{
isListShow
}
=
this
.
data
let
{
isListShow
,
onlinePaymentFlag
,
supplementaryFlag
}
=
this
.
data
if
(
isListShow
)
return
this
.
setData
({
show
:
false
,
fileList
:
[]})
// 线上收款/补录订单稍后补录 跳转到数字报价单列表
if
(
onlinePaymentFlag
||
supplementaryFlag
)
return
wx
.
$router
.
reLaunch
(
"packageEquity.equityPage"
,
{
tabIndex
:
1
,
})
let
thisPage
=
wx
.
$router
.
getPageInstance
(
pageBackNum
||
1
)
thisPage
.
setData
({
[
'orderInfo.zyPayUrl'
]:
''
,
...
...
@@ -213,10 +220,11 @@ Component({
},
confirm
(
e
,
pageBackNum
)
{
// pageBackNum 从h5返回页面层级数
let
{
fileList
,
isListShow
}
=
this
.
data
let
{
fileList
,
isListShow
,
onlinePaymentFlag
,
supplementaryFlag
}
=
this
.
data
let
thisPage
=
wx
.
$router
.
getPageInstance
(
pageBackNum
||
1
)
if
(
fileList
.
length
)
{
if
(
isListShow
)
{
// 报价单列表上传协议或者线上支付方式上传协议或者补录订单上传协议
if
(
isListShow
||
onlinePaymentFlag
||
supplementaryFlag
)
{
this
.
triggerEvent
(
'confirm'
,
{
zyPayUrl
:
fileList
.
map
(
item
=>
item
.
url
)})
}
else
{
thisPage
.
setData
({
...
...
@@ -226,7 +234,7 @@ Component({
thisPage
.
handleSecondConfirm
()
}
}
else
{
wx
.
$util
.
showToast
(
'请上传
延保
协议'
)
wx
.
$util
.
showToast
(
'请上传
合同
协议'
)
}
}
}
...
...
packageEquity/pages/carQuotation/components/zyPayPopup/zyPayPopup.wxml
View file @
842fe90
...
...
@@ -2,7 +2,7 @@
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<block wx:if="{{!showChangeFileType && !loadingFlag}}">
<popup
title="{{'上传
延保
协议'}}"
title="{{'上传
合同
协议'}}"
show="{{show}}"
bindconfirm="confirm"
bindcancel="close"
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.js
View file @
842fe90
...
...
@@ -11,7 +11,9 @@ import {
staffDailyReportMerchantValid
,
updateOrderStatus
,
orderSettingList
,
checkRecord
checkRecord
,
checkZyPayFlag
,
updateCustomerInfo
}
from
"../../../api"
;
import
{
quotedImgUrl
}
from
"~/config"
;
import
dataForm
from
'../components/constant/stepData'
...
...
@@ -102,7 +104,7 @@ Page({
showVinDialog
:
false
,
secFormData
:
{},
tempVin
:
''
,
showZyPopup
:
false
// 上传
延保
协议弹窗
showZyPopup
:
false
// 上传
合同
协议弹窗
},
closeTips
()
{
this
.
setData
({
...
...
@@ -206,6 +208,7 @@ Page({
});
},
setQuotationRecording
()
{
this
.
setData
({
supplementaryFlag
:
true
})
// 补录订单标识
// 获取保险信息
let
{
outTradeNo
}
=
this
.
data
;
let
orderInfo
=
this
.
getInsurance
();
...
...
@@ -216,7 +219,7 @@ Page({
orderInfo
.
outTradeNo
=
outTradeNo
;
wx
.
showLoading
(
"提交中..."
);
quotationRecording
(
orderInfo
)
.
then
((
result
)
=>
{
.
then
(
async
(
result
)
=>
{
wx
.
hideLoading
();
console
.
log
(
result
);
let
{
code
,
data
,
message
}
=
result
;
...
...
@@ -224,15 +227,30 @@ Page({
this
.
setData
({
confirmStatus
:
false
,
});
wx
.
showToast
({
title
:
"补录订单成功"
,
icon
:
"success"
,
});
setTimeout
(()
=>
{
wx
.
$router
.
reLaunch
(
"packageEquity.equityPage"
,
{
tabIndex
:
1
,
// 校验下单商品是否需要上传合同协议
const
params
=
{
goodsIds
:
orderInfo
?.
vdQuotationGoodsList
?.
map
(
v
=>
v
.
goodsId
)
}
let
res
=
await
checkZyPayFlag
(
params
)
if
(
res
?.
code
==
0
)
{
if
(
res
?.
data
)
{
return
this
.
setData
({
showZyPopup
:
true
,
supplementaryOrderId
:
data
})
}
wx
.
showToast
({
title
:
"补录订单成功"
,
icon
:
"success"
,
});
},
1000
);
setTimeout
(()
=>
{
wx
.
$router
.
reLaunch
(
"packageEquity.equityPage"
,
{
tabIndex
:
1
,
});
},
1000
);
}
else
{
this
.
setData
({
confirmStatus
:
false
,
});
wx
.
$util
.
showToast
(
result
?.
message
)
}
}
else
{
this
.
setData
({
confirmStatus
:
false
,
...
...
@@ -244,6 +262,44 @@ Page({
console
.
log
(
err
);
});
},
// 补录订单上传合同协议点击确定
zyPayConfirm
(
e
)
{
let
{
supplementaryOrderId
}
=
this
.
data
// 补录订单id
getQuotationInfoById
({
id
:
supplementaryOrderId
}).
then
(
res
=>
{
let
{
code
,
message
,
data
}
=
res
if
(
code
==
0
)
{
let
obj
=
wx
.
$util
.
deepClone
(
data
),
orderInfo
=
{};
let
{
default4SStoreInfo
}
=
wx
.
$util
.
getUserInfo
();
orderInfo
.
check
=
true
orderInfo
.
id
=
obj
.
id
orderInfo
.
orderId
=
obj
.
orderId
orderInfo
.
merchantId4s
=
default4SStoreInfo
?.
merchantId
;
orderInfo
.
merchantName4s
=
default4SStoreInfo
?.
merchantName
;
orderInfo
.
referrer
=
obj
.
referrer
orderInfo
.
referrerId
=
obj
.
referrerId
// 更新客户信息
updateCustomerInfo
({
...
orderInfo
,
zyPayUrl
:
e
.
detail
?.
zyPayUrl
?.
join
(
','
)
}).
then
(
result
=>
{
this
.
setData
({
showZyPopup
:
false
},
()
=>
{
wx
.
showToast
({
title
:
"补录订单成功"
,
icon
:
"success"
,
});
setTimeout
(()
=>
{
wx
.
$router
.
reLaunch
(
"packageEquity.equityPage"
,
{
tabIndex
:
1
,
});
},
1000
);
})
})
}
else
{
wx
.
$util
.
showToast
(
message
)
}
})
},
staffDailyReportMerchantValid
(
userInfo
)
{
// let { userInfo } = this.data
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
@@ -309,7 +365,7 @@ Page({
async
handleSecondConfirm
(
e
)
{
// debugger
let
{
orderInfo
,
outTradeNo
,
confirmStatus
,
userInfo
,
carBrandList
}
=
this
.
data
;
let
{
orderInfo
,
outTradeNo
,
confirmStatus
,
userInfo
}
=
this
.
data
;
let
staffCheck
=
await
this
.
staffDailyReportMerchantValid
(
userInfo
);
if
(
staffCheck
)
return
false
;;
...
...
@@ -388,27 +444,30 @@ Page({
console
.
log
(
"id"
,
id
);
// { orderId:data.orderId, id }
// return
// 线上支付判断是否需要上传协议
let
obj
=
this
.
getInsurance
()
const
params
=
{
goodsIds
:
obj
?.
vdQuotationGoodsList
?.
map
(
v
=>
v
.
goodsId
)
}
let
res
=
await
checkZyPayFlag
(
params
)
let
zyPayFlag
=
res
?.
code
==
0
&&
res
?.
data
status
.
code
==
0
?
this
.
navigatorNext
({
id
,
orderId
:
status
.
data
.
orderId
,
zyVoucherStatus
:
zyPayFlag
?
1
:
0
// "中邮凭证上传状态:0-无需上传,1-待上传,2-已上传")
})
:
wx
.
$util
.
showToast
(
status
.
message
||
"报价失败"
);
}
else
{
console
.
log
(
message
);
wx
.
hideLoading
();
// 将延保协议弹窗关闭 清空延保协议上传内容,支付凭证内容清空
let
owner
=
this
.
getOwnerInfo
();
if
(
orderInfo
.
payType
==
2
&&
carBrandList
?.
includes
(
owner
?.
carChildsBrandId
))
{
this
.
setData
({
showZyPopup
:
false
,
[
'orderInfo.zyPayUrl'
]:
''
,
[
'orderInfo.transactionNo'
]:
''
,
[
'orderInfo.paymentDocList'
]:
[]
})
}
// 将合同协议弹窗关闭 清空合同协议上传内容,支付凭证内容清空
this
.
setData
({
confirmStatus
:
false
confirmStatus
:
false
,
showZyPopup
:
false
,
[
'orderInfo.zyPayUrl'
]:
''
,
[
'orderInfo.transactionNo'
]:
''
,
[
'orderInfo.paymentDocList'
]:
[]
});
wx
.
$util
.
showToast
(
message
||
"报价失败"
);
}
...
...
@@ -487,7 +546,6 @@ Page({
return
owner
;
},
handleSecondConfirmCheck
(
check
,
detail
)
{
let
{
carBrandList
}
=
this
.
data
// 获取保险信息
let
orderInfo
=
this
.
getInsurance
();
let
owner
=
this
.
getOwnerInfo
();
...
...
@@ -496,27 +554,42 @@ Page({
orderInfo
.
check
=
check
;
orderInfo
.
paymentDocList
=
orderInfo
.
paymentDocList
||
[];
console
.
log
(
"orderInfo"
,
orderInfo
);
//
门店收款且是智界/享界车型 弹出上传延保
协议
//
商品信息包含权益服务/延保类目并且是第三方 弹出上传合同
协议
try
{
return
new
Promise
(
async
(
resolve
,
reject
)
=>
{
// 当延保协议弹窗点击稍后补录会传值detail:cancel, 提交表单时不会重复弹出延保协议弹出 标记错误订单的补录时无需上传延保协议
if
(
check
&&
orderInfo
.
payType
==
2
&&
carBrandList
?.
includes
(
orderInfo
?.
owner
?.
carChildsBrandId
)
&&
detail
!=
'cancel'
&&
!
orderInfo
?.
zyPayUrl
&&
!
orderInfo
.
resetOrder
)
{
// 添加流水号校验
// 当合同协议弹窗点击稍后补录会传值detail:cancel, 提交表单时不会重复弹出合同协议弹出
if
(
check
&&
(
orderInfo
.
payType
==
2
||
orderInfo
.
payType
==
5
)
&&
detail
!=
'cancel'
&&
!
orderInfo
?.
zyPayUrl
)
{
wx
.
hideLoading
()
let
result
=
await
checkRecord
({
transactionNo
:
orderInfo
.
transactionNo
})
let
{
code
,
message
}
=
result
if
(
code
==
0
)
{
this
.
setData
({
showPopup
:
false
})
reject
()
return
this
.
setData
({
showZyPopup
:
true
})
// 请求接口判断是否需要上传合同协议
const
params
=
{
goodsIds
:
orderInfo
?.
vdQuotationGoodsList
?.
map
(
v
=>
v
.
goodsId
)
}
let
res
=
await
checkZyPayFlag
(
params
)
if
(
res
?.
code
==
0
)
{
if
(
res
?.
data
)
{
// 添加流水号校验
let
result
=
await
checkRecord
({
transactionNo
:
orderInfo
.
transactionNo
})
let
{
code
,
message
}
=
result
if
(
code
==
0
)
{
this
.
setData
({
showPopup
:
false
})
reject
()
return
this
.
setData
({
showZyPopup
:
true
})
}
else
{
reject
()
this
.
setData
({
confirmStatus
:
false
})
return
wx
.
$util
.
showToast
(
message
)
}
}
}
else
{
reject
()
this
.
setData
({
confirmStatus
:
false
})
return
wx
.
$util
.
showToast
(
message
)
return
wx
.
$util
.
showToast
(
res
?.
message
)
}
}
// let { orderInfo } = this.data
...
...
@@ -645,9 +718,10 @@ Page({
// item.price =
return
pre
;
},
[]);
// 标识为
补录
工单
// 标识为
错误
工单
if
(
this
.
resetOrder
)
{
orderInfo
.
resetOrder
=
this
.
resetOrder
;
tableInfo
.
zyPayUrl
=
''
// 标记错误工单重新下单,将合同协议字段清除,需重新校验是否上传并重新上传
tableInfo
.
payType
=
2
;
}
tableInfo
.
owner
.
salesType
=
...
...
@@ -736,15 +810,6 @@ Page({
});
});
},
// 获取智界、享界车系id
async
getCarBrandList
()
{
const
{
carBrandList
}
=
await
wx
.
$util
.
getMockData
()
this
.
setData
({
carBrandList
})
},
// 不需要检验 存草稿
async
handleEditSave
()
{
...
...
@@ -987,7 +1052,6 @@ Page({
firstEnter
:
false
});
this
.
orderSettingList
()
this
.
getCarBrandList
()
},
setCustomerInfo
(
customerInfo
)
{
let
{
owner
,
orderInfo
}
=
this
.
data
;
...
...
packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple.wxml
View file @
842fe90
...
...
@@ -28,5 +28,5 @@
<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>
<!-- 上传延保协议 -->
<zy-pay-popup show="{{showZyPopup}}" wx:if="{{showZyPopup}}"></zy-pay-popup>
\ No newline at end of file
<!-- 上传合同协议 -->
<zy-pay-popup show="{{showZyPopup}}" wx:if="{{showZyPopup}}" supplementaryFlag="{{supplementaryFlag}}" bindconfirm="zyPayConfirm"></zy-pay-popup>
\ No newline at end of file
packageEquity/pages/carQuotation/index/index.js
View file @
842fe90
...
...
@@ -148,7 +148,7 @@ Component({
repealVisible
:
false
,
repealReason
:
''
,
repealId
:
''
,
zyPayStatus
:
''
,
//
延保
协议状态
zyPayStatus
:
''
,
//
合同
协议状态
selectType
:
1
},
observers
:
{
...
...
@@ -439,7 +439,7 @@ Component({
this
.
screenForm
.
orderStatus
=
orderStatus
;
this
.
filterTag
=
false
;
}
// 筛选页只会存在
延保
协议状态
// 筛选页只会存在
合同
协议状态
if
(
this
.
screenForm
&&
e
.
zyPayStatus
&&
!
e
.
orderStatus
)
{
this
.
screenForm
.
zyPayStatus
=
e
.
zyPayStatus
this
.
filterTag
=
true
;
...
...
@@ -472,7 +472,7 @@ Component({
async
handleClickBtn
(
e
)
{
let
{
target
,
type
}
=
e
.
currentTarget
.
dataset
;
console
.
log
(
target
);
// 上传
延保
协议
// 上传
合同
协议
if
(
target
?.
zyPayStatus
==
'1'
&&
type
==
'upload'
)
{
// 校验是否填写昨日日报
let
staffCheck
=
await
checkDailyReport
(
true
);
...
...
@@ -510,6 +510,7 @@ Component({
// 去支付
wx
.
$router
.
go
(
"CarQuotationPay"
,
{
id
:
target
.
id
,
zyVoucherStatus
:
target
?.
zyPayStatus
});
}
else
{
// 战败
...
...
@@ -581,7 +582,7 @@ Component({
orderInfo
.
referrerId
=
obj
.
referrerId
return
orderInfo
;
},
//
延保
协议上传确定
//
合同
协议上传确定
zyPayConfirm
(
e
)
{
let
{
showZyTarget
}
=
this
.
data
getQuotationInfoById
({
...
...
packageEquity/pages/carQuotation/index/index.wxml
View file @
842fe90
...
...
@@ -49,7 +49,7 @@
</view>
</block>
<view class="header-status">
<!-- 待上传
延保
协议且是已支付的订单 -->
<!-- 待上传
合同
协议且是已支付的订单 -->
<block wx:if="{{item.zyPayStatus == 1 && (item.orderStatus == 3 || item.orderStatus == 4 || item.orderStatus == 7)}}">
<view class="default-txt">待上传</view>
</block>
...
...
pages/webView/webView.js
View file @
842fe90
...
...
@@ -95,7 +95,7 @@ Page({
flag
:
false
})
}
// 中邮上传
延保
协议页面
// 中邮上传
合同
协议页面
if
(
url
.
includes
(
'zyUpload'
))
{
const
eventChannel
=
this
.
getOpenerEventChannel
();
if
(
!
this
.
data
.
isH5Bind
)
{
...
...
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