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 ab2e01a5
authored
Nov 09, 2026
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V5.8.7.2' into 'develop'
上线合并 See merge request
!558
2 parents
0c7a7cca
72d38fcf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
9 deletions
packageUsedCar/pages/evaluationForm/signInfo/signInfo.js
packageUsedCar/pages/evaluationForm/signInfo/signInfo.wxml
packageUsedCar/pages/evaluationForm/signInfo/signInfo.js
View file @
ab2e01a
...
...
@@ -10,10 +10,24 @@ import mapApi from "~/packageUsedCar/utils/mapapi/mapapi";
/** 合同模板查询类型:广联 / 小鹏等 */
const
CONTRACT_TEMPLATE_TYPES
=
[
'1'
,
'5'
]
/** 深圳易驾主体可查询的合同模板类型 */
const
SZYJZH_CONTRACT_TEMPLATE_TYPES
=
[
'1'
,
'6'
]
/** 默认优先选中的合同模板名称 */
const
DEFAULT_TEMPLATE_NAME
=
'广联二手车转让协议'
/**
* 根据合同主体确定可查询的合同模板类型,避免深圳易驾沿用广联主体的类型。
* @param {string} contractOrg 合同主体标识
* @returns {string[]} 合同模板类型
*/
function
getContractTemplateTypes
(
contractOrg
)
{
return
contractOrg
===
'szyjzh'
?
SZYJZH_CONTRACT_TEMPLATE_TYPES
:
CONTRACT_TEMPLATE_TYPES
}
/**
* 计算签约提交参数中的合同总金额(fullPrice)。
* @param {Object} formData 页面表单数据
* @param {string|number} formData.paymentType 付款类型:1 定金+尾款,2 全款
...
...
@@ -66,6 +80,7 @@ Page({
}
],
contractTemplateList
:
[],
contractTemplateTypes
:
CONTRACT_TEMPLATE_TYPES
,
checkboxList
:
[
{
key
:
'motorBook'
,
...
...
@@ -187,7 +202,8 @@ Page({
returnSummaryRemark
:
''
,
contractOrg
:
''
,
docTemplateId
:
''
,
docTemplateName
:
''
docTemplateName
:
''
,
previewUrl
:
''
},
formFields
:
[],
formFields1
:
[
...
...
@@ -282,13 +298,17 @@ Page({
},
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载,根据合同主体准备对应的模板查询类型。
* @param {Object} options 页面路由参数
* @returns {void}
*/
onLoad
(
options
)
{
const
contractTemplateTypes
=
getContractTemplateTypes
(
options
.
contractOrg
)
this
.
setData
({
query
:
options
,
'formData.evalPrice'
:
options
.
evalPrice
,
'formData.contractOrg'
:
options
.
contractOrg
||
''
,
contractTemplateTypes
,
'formData.handoverTime'
:
dayjs
().
format
(
'YYYY-MM-DD HH:mm:00'
),
currentDate
:
new
Date
().
getTime
(),
sysInfo
:
getSystemInfoSync
()
...
...
@@ -363,9 +383,15 @@ Page({
})
},
pdfPreview
(
e
)
{
/**
* 预览当前已选二级合同模板,未选择时不发起空地址下载。
* @returns {void}
*/
pdfPreview
()
{
const
previewUrl
=
this
.
data
.
formData
.
previewUrl
if
(
!
previewUrl
)
return
wx
.
downloadFile
({
url
:
'https://jinrong-huidan-test.oss-cn-shenzhen.aliyuncs.com/testdev/8981c8ca-8b30-436e-bb17-82fb6a53a3c4%E4%BA%8C%E6%89%8B%E8%BD%A6%E8%BD%AC%E8%AE%A9%E5%8D%8F%E8%AE%AE.pdf'
,
url
:
previewUrl
,
success
:
function
(
res
)
{
const
filePath
=
res
.
tempFilePath
wx
.
openDocument
({
...
...
@@ -596,6 +622,7 @@ Page({
* 切换合同类型并同步模板/表单(二级模板各类型共用同一份列表)
* @param {string|number} value paymentType
* @param {object} [template] 指定模板,未传则取默认模板
* @returns {void}
*/
applyPaymentType
(
value
,
template
)
{
const
{
query
,
formData
}
=
this
.
data
...
...
@@ -611,7 +638,8 @@ Page({
'formData.depositPrice'
:
''
,
'formData.fullPrice'
:
''
,
'formData.docTemplateId'
:
pickedTemplate
?.
docTemplateId
||
''
,
'formData.docTemplateName'
:
pickedTemplate
?.
docTemplateName
||
''
'formData.docTemplateName'
:
pickedTemplate
?.
docTemplateName
||
''
,
'formData.previewUrl'
:
pickedTemplate
?.
previewUrl
||
''
},
()
=>
{
setTimeout
(()
=>
{
if
(
query
?.
evalPrice
&&
value
==
2
)
{
...
...
@@ -1255,7 +1283,9 @@ Page({
},
/**
* 页面加载时拉取合同模板(各合同类型下共用同一份二级列表)
* 页面加载时拉取合同模板(各合同类型下共用同一份二级列表)。
* 模板类型已在页面加载时按合同主体确定,避免改变其他主体的查询规则。
* @returns {Promise<void>}
*/
async loadContractTemplates() {
const contractOrg = this.data.query?.contractOrg || this.data.formData.contractOrg
...
...
@@ -1264,7 +1294,7 @@ Page({
}
const templateRes = await newApi.electronicContractTemplateList({
contractOrg,
docTemplateTypes:
CONTRACT_TEMPLATE_TYPES
docTemplateTypes:
this.data.contractTemplateTypes
})
if (templateRes.data.code != 0) {
wx.$util.showToast(templateRes.data.msg || '合同模板获取失败')
...
...
@@ -1284,6 +1314,7 @@ Page({
/**
* 选择某合同类型下的二级模板(与点击合同类型共用 applyPaymentType)
* @param {Object} e 点击事件
* @returns {void}
*/
templateRadioChange(e) {
const { id, value } = e.currentTarget.dataset
...
...
@@ -1381,4 +1412,4 @@ Page({
onShareAppMessage() {
}
})
\ No newline at end of file
})
packageUsedCar/pages/evaluationForm/signInfo/signInfo.wxml
View file @
ab2e01a
...
...
@@ -21,7 +21,7 @@
<view class="box-radio">
<view class="h2-title">
电子合同模版
<view class="template-title flex align-center" bindtap="pdfPreview">
<view
wx:if="{{formData.previewUrl}}"
class="template-title flex align-center" bindtap="pdfPreview">
<image class="sprite-icon" src="{{IMG_URL}}usedCar/seeIcon.png" mode=""/>
<text>合同模板</text>
</view>
...
...
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