Commit 9640b2f4 by 李伟康

Merge branch 'SAAS+V5.0.0-1014' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.0.0-1014

2 parents ce437761 38f5fa34
......@@ -3,129 +3,223 @@ import { gscPost } from '../request/signHttp'
module.exports = {
/** 评估单列表 */
evalOrderList(data) {
return gscPost(`/evalOrder/page`, {
...data
})
return gscPost(
`/evalOrder/page`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单详情 */
evalOrderDetail(data) {
return gscPost(`/evalOrder/detail`, {
...data
})
return gscPost(
`/evalOrder/detail`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单创建 */
evalOrderCreate(data) {
return gscPost(`/evalOrder/create`, {
...data
})
return gscPost(
`/evalOrder/create`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单分页状态数量 */
evalOrderPageCount(data) {
return gscPost(`/evalOrder/pageCount`, {
...data
})
return gscPost(
`/evalOrder/pageCount`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单更新 */
evalOrderUpdate(data) {
return gscPost(`/evalOrder/edit`, {
...data
})
return gscPost(
`/evalOrder/edit`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单重新报价 */
evalOrderOwnerReQuote(data) {
return gscPost(`/evalOrder/ownerReQuote`, {
...data
})
return gscPost(
`/evalOrder/ownerReQuote`,
{
...data
},
{ returnAll: true }
)
},
/** 签订买卖合同 */
evalOrderSignContract(data) {
return gscPost(`/evalOrder/signingSaleContract`, {
...data
})
return gscPost(
`/evalOrder/signingSaleContract`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单取消合同 */
evalOrderCancelContract(data) {
return gscPost(`/evalOrder/cancelSaleContract`, {
...data
})
return gscPost(
`/evalOrder/cancelSaleContract`,
{
...data
},
{ returnAll: true }
)
},
/** 评估单重新提交 */
evalOrderConfirmVehicleDelivery(data) {
return gscPost(`/confirmVehicleDelivery/reSubmit`, {
...data
})
return gscPost(
`/confirmVehicleDelivery/reSubmit`,
{
...data
},
{ returnAll: true }
)
},
/** 确认交车 */
confirmDelivery(data) {
return gscPost(`/confirmVehicleDelivery/confirmVehicleDelivery`, {
...data
})
return gscPost(
`/confirmVehicleDelivery/confirmVehicleDelivery`,
{
...data
},
{ returnAll: true }
)
},
/** 支付定金 */
payDepositApplication(data) {
return gscPost(`/applyPayment/payDepositApplication`, {
...data
})
return gscPost(
`/applyPayment/payDepositApplication`,
{
...data
},
{ returnAll: true }
)
},
/** 发起代保管协议签署 */
signAgreement(data) {
return gscPost(`/applyPayment/payFinal`, {
...data
})
return gscPost(
`/applyPayment/payFinal`,
{
...data
},
{ returnAll: true }
)
},
/** 检查代保管协议签署状态 */
checkSignAgreement(data) {
return gscPost(`/applyPayment/checkSignAgreement`, {
...data
})
return gscPost(
`/applyPayment/checkSignAgreement`,
{
...data
},
{ returnAll: true }
)
},
/** 检查车辆是否存在重复评估单 */
checkRepeat(data) {
return gscPost(`/evalOrder/checkRepeat`, {
...data
})
return gscPost(
`/evalOrder/checkRepeat`,
{
...data
},
{ returnAll: true }
)
},
/** 车辆ocr识别 */
vinOcr(data) {
return gscPost(`/evalOrder/vinOcr`, {
...data
})
return gscPost(
`/evalOrder/vinOcr`,
{
...data
},
{ returnAll: true }
)
},
/** 行驶证ocr识别 */
carLicenseOcr(data) {
return gscPost(`/evalOrder/carLicenseOcr`, {
...data
})
return gscPost(
`/evalOrder/carLicenseOcr`,
{
...data
},
{ returnAll: true }
)
},
/** 获取合同详情 */
getContractDetail(data) {
return gscPost(`/evalElectronicContract/getDetail`, {
...data
})
return gscPost(
`/evalElectronicContract/getDetail`,
{
...data
},
{ returnAll: true }
)
},
/** 获取保管人列表 */
getCustodyAgreementList(data) {
return gscPost(`/custodyAgreement/custodyAgreementList`, {
...data
})
return gscPost(
`/custodyAgreement/custodyAgreementList`,
{
...data
},
{ returnAll: true }
)
},
/** 新增保管人 */
addCustodyAgreement(data) {
return gscPost(`/custodyAgreement/addCustodyAgreement`, {
...data
})
return gscPost(
`/custodyAgreement/addCustodyAgreement`,
{
...data
},
{ returnAll: true }
)
},
/** 发送代保管人协议 */
sendCustodyAgreement(data) {
return gscPost(`/custodyAgreement/sendCustodyAgreement`, {
...data
})
return gscPost(
`/custodyAgreement/sendCustodyAgreement`,
{
...data
},
{ returnAll: true }
)
},
/** 销售协议预览 */
salesAgreementPreview(data) {
return gscPost(`/evalOrder/salesAgreementPreview`, {
...data
})
return gscPost(
`/evalOrder/salesAgreementPreview`,
{
...data
},
{ returnAll: true }
)
},
/** 线上合同预览 */
viewOnlineContract(data) {
return gscPost(
`/evalOrder/viewOnlineContract`,
{
...data
},
{ returnAll: true }
)
}
}
import { Request } from 'glsk-toolkit'
module.exports = {
gscPost: (url, data, _config = {}) => {
if(!uni.$signHttp) uni.$signHttp = new Request(uni.signHttpConfig)
if (!uni.$signHttp) uni.$signHttp = new Request(uni.signHttpConfig)
return uni.$signHttp.post(url, data, _config)
}
}
\ No newline at end of file
}

47.4 KB | W: | H:

50.8 KB | W: | H:

assets/images/common/sign-no-data.png
assets/images/common/sign-no-data.png
assets/images/common/sign-no-data.png
assets/images/common/sign-no-data.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -68,6 +68,11 @@ uni.signHttpConfig = {
},
error: (error, config) => {
console.log('error事件触发', error, config)
uni.hideLoading()
uni.showToast({
title: error.msg || '请求失败',
icon: 'none'
})
return Promise.reject(error)
},
logout: config => {
......
......@@ -11,7 +11,7 @@
<view v-if="subStatus == 2 || subStatus == 3" class="common-btn gray-btn ml-24" @click="handleClick('paying')">支付中</view>
<view v-if="status == 40 && !subStatus && paymentType == 1" class="common-btn blue-btn ml-24" @click="handleClick('payFull')">支付尾款</view>
<view v-if="status == 50 && !subStatus" class="common-btn blue-btn ml-24" @click="handleClick('confirmDelivery')">确认交车</view>
<view v-if="status == 1" class="common-btn blue-btn ml-24" @click="handleClick('reSubmit')">重新提交</view>
<view v-if="status == '-1'" class="common-btn blue-btn ml-24" @click="handleClick('reSubmit')">重新提交</view>
</div>
</template>
......
......@@ -155,24 +155,28 @@ export default {
width: toRpx(848);
border-radius: toRpx(36);
background-color: #fff !important;
padding: 0 toRpx(64) toRpx(48);
padding: 0 0 toRpx(48);
overflow: hidden;
.content {
min-height: 32vh;
max-height: 80vh;
overflow-y: auto;
padding-bottom: toRpx(96);
padding: 0 toRpx(64) toRpx(64);
box-sizing: border-box;
background-color: #fff;
.uni-input-placeholder {
color: #999999;
}
}
.popup-top-box {
color: #1a1a1a;
font-size: toRpx(40);
font-weight: 500;
text-align: center;
background-color: #fff;
height: toRpx(136);
padding: 0 toRpx(64);
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%);
.popup-top-box-title {
flex: 1;
text-align: center;
......@@ -184,12 +188,15 @@ export default {
.footer-box {
width: 100%;
margin-top: toRpx(16);
padding: 0 toRpx(64);
border-radius: toRpx(42);
}
}
::v-deep .noTitle .uni-popup__wrapper.center {
padding: 0;
.content {
padding: 0;
}
.footer-box {
padding: 0 toRpx(64);
}
......
......@@ -45,7 +45,8 @@
<text class="common-label">评估价格</text>
<view class="price ml-16" :class="{ 'text-blue': carInfo.evalPriceDisplay && carInfo.status != 10 }">
{{ carInfo.status == 10 ? '评估中' : carInfo.evalPriceDisplay }}
<text v-if="carInfo.evalPriceDisplay && carInfo.status != 10" class="text-gray">(定金: {{ carInfo.depositPrice }}元 | 尾款: {{ carInfo.finalPrice }}元)</text>
<text v-if="carInfo.paymentType == 1 && carInfo.status != 10" class="text-gray">(定金: {{ carInfo.depositPrice }}元 | 尾款: {{ carInfo.finalPrice }}元)</text>
<text v-if="carInfo.paymentType == 2 && carInfo.status != 10" class="text-gray">(全款: {{ carInfo.evalPrice }}元 )</text>
</view>
</view>
<ButtonModule @button-click="$emit('button-click', { ...$event, ...carInfo })" :status="carInfo.status" :subStatus="carInfo.subStatus" :paymentType="carInfo.paymentType"></ButtonModule>
......
......@@ -22,14 +22,18 @@ export default {
return {
url: '',
title: '',
fileType: 'pdf'
fileType: 'pdf',
Signature: true
}
},
onLoad (options) {
console.log(options)
this.fileType = options.fileType || 'pdf'
this.Signature = options.Signature === 'false' ? false : (options.Signature || true);
if(this.fileType === 'docx') {
this.url = options.fileUrl
}else if(!this.Signature) {
this.url = options.fileUrl
}else {
this.url = options.fileUrl + '&OSSAccessKeyId='+ options.OSSAccessKeyId + '&Signature=' + options.Signature
}
......
......@@ -253,14 +253,16 @@ export default {
supplementaryClauseText: this.formData.supplementaryClauseText
})
.then(res => {
this.$refs.addAgreementPopup.closePopup()
this.formFields.forEach(item => {
if (item.key === field.key) {
item.isShowPreview = true
}
})
this.pdfUrl = res.fileDownloadUrl
console.log('this.pdfUrl', this.pdfUrl)
if (res.data.code == 0) {
this.$refs.addAgreementPopup.closePopup()
this.formFields.forEach(item => {
if (item.key === field.key) {
item.isShowPreview = true
}
})
this.pdfUrl = res.fileDownloadUrl
console.log('this.pdfUrl', this.pdfUrl)
}
})
})
} else if (field.type === 'calendar') {
......@@ -304,12 +306,12 @@ export default {
...this.formData
})
console.log('res:', res)
if (res) {
if (res.data.code == 0) {
uni.showToast({ title: '交车成功', icon: 'none' })
setTimeout(() => {
// uni.navigateBack({
// delta: 1
// })
uni.navigateBack({
delta: 1
})
}, 500)
}
},
......
......@@ -128,7 +128,7 @@
</StepperNavigation>
</view>
<view v-else-if="activeTab === 4">
<view class="mb-32 upload-box">
<view class="mb-32 upload-box" v-if="detailsInfo.signingInfo.saleContract">
<view class="tab-panel-title">车辆买卖协议</view>
<view class="gridBoxNoPadding">
<view v-for="(item, index) in vehicleItems" :key="index" :class="['flex align-start', { 'full-width': item.fullWidth }]">
......@@ -136,7 +136,7 @@
<view v-if="item.type == 'image'">
<image :src="formatValue(item, detailsInfo)" @click.stop="previewMedia(formatValue(item, detailsInfo), 1)"></image>
</view>
<view v-else-if="item.type == 'link'" class="flex-1">
<view v-else-if="item.type == 'link'" class="flex-1" @click.stop="pdfPreview(detailsInfo.signingInfo.saleContract.contractNo)">
<view class="pdf-box flex align-center justify-between">
<view class="flex align-center">
<view class="sprite-icon icon-pdf"></view>
......@@ -201,7 +201,7 @@
</view>
<view v-for="(item, index) in detailsInfo.paymentList || []" :key="index" class="tableRow">
<view class="tableCell">{{ item.paymentType == 1 ? '定金' : item.paymentType == 2 ? '尾款' : '全款' }}</view>
<view class="tableCell">{{ item.paymentStatus == 1 ? '已支付' : '未支付' }}</view>
<view class="tableCell">{{ item.status == 1 ? '已支付' : '未支付' }}</view>
<view class="tableCell">{{ item.payTime || '-' }}</view>
<view class="tableCell">{{ item.paymentAmount ? '¥' + item.paymentAmount : '-' }}</view>
</view>
......@@ -546,8 +546,9 @@ export default {
})
.then(res => {
console.log('res:', res)
const { basic = {}, carInfo = {}, carLicense = {}, images = {} } = res
that.detailsInfo = res
if (res.data.code == 0) {
that.detailsInfo = res.data.data
}
})
},
switchTab(index) {
......@@ -605,6 +606,22 @@ export default {
uni.navigateTo({
url: `${url}`
})
},
pdfPreview(contractNo) {
uni.$api.evaluationApi
.viewOnlineContract({
contractNo: contractNo
})
.then(res => {
console.log('res:', res)
if (res.data.code == 0) {
// const pdfUrl = 'https://jinrong-huidan-test.oss-cn-shenzhen.aliyuncs.com/testdev/696fdf0c-0287-4bcd-9d4e-6b423f2fe5ba%E4%BA%8C%E6%89%8B%E8%BD%A6%E8%BD%AC%E8%AE%A9%E5%8D%8F%E8%AE%AE.docx'
const url = `/pages/evaluationForm/components/pdfPreView?fileUrl=${res.data.data.contractUrl}&title=pdf&fileType=pdf&Signature=false`
uni.navigateTo({
url: `${url}`
})
}
})
}
}
}
......
......@@ -125,9 +125,9 @@
</view>
<template>
<checkbox-group @change="checkboxChange" class="checkbox-group flex align-center">
<label class="uni-list-cell uni-list-cell-pd align-center flex ml-48" v-for="item in checkboxList" :key="item.value">
<label class="uni-list-cell uni-list-cell-pd align-center flex ml-48 mb-16" v-for="item in checkboxList" :key="item.value">
<view>
<checkbox style="transform: scale(0.7)" activeBackgroundColor="#4673FF" iconColor="#fff" :value="item.value" :checked="item.checked" :disabled="item.disabled" />
<checkbox class="sign-checkbox" style="transform: scale(0.7)" activeBackgroundColor="#4673FF" iconColor="#fff" :value="item.value" :checked="item.checked" :disabled="item.disabled" />
</view>
<view class="checkbox-name">{{ item.name }}</view>
<input class="checkbox-input" v-if="item.isShowInput" v-model="formData[item.inputValue]" placeholder="请输入" type="text" />
......@@ -380,7 +380,7 @@ export default {
purchaseInvoice: '',
trafficScreenshot: '',
carKey: '',
carKeyCount: 0,
carKeyCount: 2,
trafficInsurance: '',
insuranceCard: '',
transferPhoto: '',
......@@ -465,16 +465,10 @@ export default {
// 监听定金变化,自动计算尾款
'formData.depositPrice': {
handler(newValue) {
console.log(newValue)
this.calculateFinalPrice()
},
immediate: true
},
// 监听尾款变化,自动计算定金
'formData.finalPrice': {
handler(newValue) {
this.calculateDepositPrice()
},
immediate: true
}
},
onLoad(options) {
......@@ -631,6 +625,8 @@ export default {
}
]
if (value === 1) {
this.formData.finalPrice = 0
this.formData.depositPrice = 0
// 定金+尾款模式
// 如果之前有填写全款金额,则将其分配给定金和尾款
if (this.formData.fullPrice > 0) {
......@@ -642,6 +638,7 @@ export default {
this.formData.fullPrice = this.query.evalPrice
}
} else if (value === 2) {
console.log('this.formData', this.formData)
this.formFields = [
{
key: 'fullPrice',
......@@ -715,11 +712,6 @@ export default {
}
]
// 全款模式
// 如果之前有填写定金和尾款,则计算总和作为全款金额
if (this.formData.depositPrice > 0 || this.formData.finalPrice > 0) {
this.formData.fullPrice = parseInt(this.formData.depositPrice || 0) + parseInt(this.formData.finalPrice || 0)
}
// 确保评估价已设置
if (this.query.evalPrice && !this.formData.fullPrice) {
this.formData.fullPrice = this.query.evalPrice
......@@ -862,17 +854,28 @@ export default {
this.$refs.notice.open()
},
comfirm() {
uni.$api.evaluationApi.evalOrderSignContract({ ...this.formData, evalOrderNo: this.query.evalOrderNo })
uni.showToast({
title: '电子签约已发送,请注意查收短信',
icon: 'none'
console.log('this.formData', this.formData)
if (this.formData.paymentType == 2) {
delete this.formData.depositPrice
delete this.formData.finalPrice
}
const res = uni.$api.evaluationApi.evalOrderSignContract({ ...this.formData, evalOrderNo: this.query.evalOrderNo })
res.then(res => {
console.log('res:', res)
if (res.data.code == 0) {
uni.showToast({
title: '电子签约已发送,请注意查收短信',
icon: 'none'
})
setTimeout(() => {
uni.navigateBack()
}, 500)
}
})
setTimeout(() => {
uni.navigateBack()
}, 500)
},
// 计算尾款:尾款 = 评估价 - 定金
calculateFinalPrice() {
console.log(' 计算尾款:尾款 = 评估价 - 定金', this.formData)
const depositPrice = parseFloat(this.formData.depositPrice) || 0
const evalPrice = parseFloat(this.formData.evalPrice) || 0
const finalPrice = evalPrice - depositPrice
......@@ -890,25 +893,7 @@ export default {
})
}
},
// 计算定金:定金 = 评估价 - 尾款
calculateDepositPrice() {
const finalPrice = parseFloat(this.formData.finalPrice) || 0
const evalPrice = parseFloat(this.formData.evalPrice) || 0
const depositPrice = evalPrice - finalPrice
// 确保定金不为负数
if (depositPrice >= 0) {
this.formData.depositPrice = depositPrice
} else {
// 尾款不能大于评估价
this.formData.finalPrice = evalPrice
this.formData.depositPrice = 0
uni.showToast({
title: '尾款不能大于评估价',
icon: 'none'
})
}
},
// 处理输入事件
handleInputChange(e, field) {
const value = e.detail.value
......@@ -939,6 +924,12 @@ export default {
}
</script>
<style scoped lang="scss">
::v-deep .sign-checkbox .uni-checkbox-input.uni-checkbox-input-disabled {
background-color: #8cb6ff !important;
&::before {
color: #fff;
}
}
.sign-info {
position: relative;
width: 100vw;
......@@ -947,9 +938,7 @@ export default {
background-size: 100%;
padding: toRpx(160) toRpx(64) toRpx(48);
box-sizing: border-box;
::v-deep .uni-checkbox .uni-checkbox-input.uni-checkbox-input-disabled {
background-color: #4673ff !important;
}
.detail-content {
width: 100%;
height: 100%;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!