Commit ae5added by zhangxw

认证修改

1 parent adf6a523
......@@ -57,7 +57,7 @@ export default {
},
"auctionOrder": {
"orderState": {
"CONTRACT_UNSIGNED": "待签署合同",
// "CONTRACT_UNSIGNED": "待签署合同",
"UNPAID": "待付车款",
"WAIT_PICKUP": "待提车",
"TRANSFERRING": "待过户",
......
......@@ -39,7 +39,7 @@ export const businessRouter: Array<RouteRecordRaw> = [
},
{
path: '/business/platformContract',
component: () => import( '@/views/business/platformContract/platformContractPage.vue'),
component: () => import( '@/views/business/platformContract/platFormContractPage.vue'),
meta: {
breadcrumbs: [{name: '运营管理'}, {name: '平台合同管理'}]
}
......
......@@ -34,7 +34,7 @@
<!-- 审核过户资料-->
<a-button type="link" v-if="record.orderState==='TRANSFERRING'&&record.auditState==='UNAUDITED'" size="small" @click="auditAuctionOrder(record)">审核</a-button>
<!-- <a-button type="link" disabled v-if="record.orderState==='TRANSFERRING'&&!record.auditState" size="small">未提交过户资料</a-button> -->
<a-button type="link" size="small" @click="uploadTransferring(record)">修改过户资料</a-button>
<a-button type="link" size="small" v-if="record.orderState === 'TRANSFERRING' || record.orderState === 'COMPLETED'" @click="uploadTransferring(record)">修改过户资料</a-button>
<a-button type="link" v-if="record.orderState==='COMPLETED'" size="small" @click="viewTransferring(record)">过户资料</a-button>
<router-link :to="{path:'/account/view',query:{accountId:record.account?.accountId}}">
<a-button type="link" size="small">联系买家</a-button>
......@@ -83,7 +83,7 @@ import UploadPaymentVoucher from "@/views/auction/order/UploadPaymentVoucher.vue
},
})
export default class AuctionOrderPage extends PaginationComponent<AuctionOrder> {
orderState: AuctionOrder_OrderState | '' = "CONTRACT_UNSIGNED";
orderState: AuctionOrder_OrderState | '' = "UNPAID";
exporting = false;
/**
* 表格列配置
......@@ -191,7 +191,7 @@ export default class AuctionOrderPage extends PaginationComponent<AuctionOrder>
const tabs = [];
if (this.hasPrivilege('auction_order_1')) tabs.push({key: "", tab: `全部(${this.orderStateCount?.total})`});
AUCTION_ORDER_ORDER_STATES.forEach(item => {
if (item === 'CONTRACT_UNSIGNED') tabs.push({key: item, tab: `${this.$t('enum.auctionOrder.orderState.' + item)}(${this.orderStateCount.contractUnsignedCount})`});
// if (item === 'CONTRACT_UNSIGNED') tabs.push({key: item, tab: `${this.$t('enum.auctionOrder.orderState.' + item)}(${this.orderStateCount.contractUnsignedCount})`});
if (item === 'UNPAID' && this.hasPrivilege('auction_order_3')) tabs.push({key: item, tab: `${this.$t('enum.auctionOrder.orderState.' + item)}(${this.orderStateCount.unpaidCount})`});
if (item === 'WAIT_PICKUP' && this.hasPrivilege('auction_order_4')) tabs.push({key: item, tab: `${this.$t('enum.auctionOrder.orderState.' + item)}(${this.orderStateCount.waitPickupCount})`});
if (item === 'TRANSFERRING' && this.hasPrivilege('auction_order_5')) tabs.push({key: item, tab: `${this.$t('enum.auctionOrder.orderState.' + item)}(${this.orderStateCount.transferringCount})`});
......
......@@ -32,6 +32,18 @@
<a-descriptions-item label="创建时间" name="createTime">
{{ auctionOrder.createTime }}
</a-descriptions-item>
<a-descriptions-item label="保留价" name="updateTime">
¥{{ auctionOrder.vehicle.reservePrice }}
</a-descriptions-item>
<a-descriptions-item label="预计经销差" name="updateTime">
¥{{ expectedProfitMargin }}
</a-descriptions-item>
<a-descriptions-item label="溢价金额" name="updateTime">
¥{{ premiumAmount }}
</a-descriptions-item>
<a-descriptions-item label="实际经销差" name="updateTime">
¥{{ actualProfitMargin }}
</a-descriptions-item>
</a-descriptions>
</a-card>
<a-card class="mt-10" :bordered="false" size="small">
......@@ -429,6 +441,69 @@ export default class ViewAuctionOrder extends Vue {
return this.auctionOrder?.account;
}
/**
* 预计经销差 = 保留价 + 佣金 - 成本价
* 使用 Math.round() 避免精度丢失
*/
get expectedProfitMargin(): string {
if (!this.auctionOrder) return '-';
const reservePrice = this.auctionOrder.vehicle?.reservePrice;
const commissionPrice = this.auctionOrder.commissionPrice;
const purchasePrice = this.auctionOrder.vehicle?.evaluationTransaction?.purchasePrice;
// 如果任一值为空,返回 '-'
if (!reservePrice || !commissionPrice || !purchasePrice) {
return '-';
}
// 使用 Math.round() 避免精度丢失,保留2位小数
const margin = Math.round((reservePrice + commissionPrice - purchasePrice) * 100) / 100;
return margin.toFixed(2);
}
/**
* 溢价金额 = 成交价 + 佣金 - 保留价
* 使用 Math.round() 避免精度丢失
*/
get premiumAmount(): string {
if (!this.auctionOrder) return '-';
const orderPrice = this.auctionOrder.orderPrice;
const commissionPrice = this.auctionOrder.commissionPrice;
const reservePrice = this.auctionOrder.vehicle?.reservePrice;
// 如果任一值为空,返回 '-'
if (!orderPrice || !commissionPrice || !reservePrice) {
return '-';
}
// 使用 Math.round() 避免精度丢失,保留2位小数
const premium = Math.round((orderPrice + commissionPrice - reservePrice) * 100) / 100;
return premium.toFixed(2);
}
/**
* 实际经销差 = 成交价 + 佣金 - 成本价
* 使用 Math.round() 避免精度丢失
*/
get actualProfitMargin(): string {
if (!this.auctionOrder) return '-';
const orderPrice = this.auctionOrder.orderPrice;
const commissionPrice = this.auctionOrder.commissionPrice;
const purchasePrice = this.auctionOrder.vehicle?.evaluationTransaction?.purchasePrice;
// 如果任一值为空,返回 '-'
if (!orderPrice || !commissionPrice || !purchasePrice) {
return '-';
}
// 使用 Math.round() 避免精度丢失,保留2位小数
const margin = Math.round((orderPrice + commissionPrice - purchasePrice) * 100) / 100;
return margin.toFixed(2);
}
viewContract(contract: Contract): void {
contract.auctionOrder = this.auctionOrder;
const modal = ModalService.confirm({
......
......@@ -19,8 +19,7 @@
</a-descriptions-item>
<a-descriptions-item label="签署状态">
<a-tag v-if="contract.signed" color="success">已签署</a-tag>
<a-tag v-else color="error">未签署</a-tag>
<a-tag :color="contract.contractStatus == '已签署' ? 'success' : 'orange'">{{contract.contractStatus}}</a-tag>
</a-descriptions-item>
<a-descriptions-item label="合同附件">
......@@ -46,16 +45,16 @@
<a-empty v-else description="暂无合同附件" :image="simpleImage"></a-empty>
</a-card>
<a-descriptions v-if="contract.auctionOrder?.account" :bordered="false" :column="4" size="small" style="margin-top: 16px;">
<a-descriptions :bordered="false" :column="4" size="small" style="margin-top: 16px;">
<template #title>
<title-tip-icon/>
签署方信息
</template>
<a-descriptions-item label="买受方">
{{ contract.auctionOrder.account.accountName || '-' }} (ID: {{ contract.auctionOrder.account.accountId || '-' }})
<a-descriptions-item label="买受方" :span="2">
{{ contract.signerName || '-' }} (ID: {{ contract.signerIdCard || '-' }})
</a-descriptions-item>
<a-descriptions-item label="联系方式">
{{ contract.auctionOrder.account.mobile || '-' }}
<a-descriptions-item label="联系方式" :span="2">
{{ contract.signerMobile || '-' }}
</a-descriptions-item>
</a-descriptions>
</template>
......
......@@ -26,7 +26,7 @@
<span>{{ record.accountName || '—' }}</span>
</template>
<template v-if="column.key === 'signTime'">
<span>{{ record.signed ? (record.signTime || '—') : '—' }}</span>
<span>{{ (record.signTime || '—') }}</span>
</template>
<template v-if="column.key === 'createTime'">
<span>{{ record.createTime || '—' }}</span>
......@@ -83,7 +83,7 @@ export default class MasterContractPage extends PaginationComponent<Contract> {
{
title: '签署状态', dataIndex: 'contractStatus', key: 'contractStatus', align: 'center', width: 100, resizable: true, ellipsis: true, sorter: true,
},
{title: '签署乙方姓名', dataIndex: 'accountName', key: 'accountName', width: 120, resizable: true, ellipsis: true, sorter: true},
{title: '签署乙方姓名', dataIndex: 'signerName', key: 'signerName', width: 120, resizable: true, ellipsis: true, sorter: true},
{title: '创建时间', dataIndex: 'createTime', key: 'createTime', width: 170, align: 'center', resizable: true, ellipsis: true, sorter: true},
{title: '签署时间', dataIndex: 'signTime', key: 'signTime', width: 170, align: 'center', resizable: true, ellipsis: true, sorter: true},
{title: '操作', key: 'action', width: 80, align: 'center', fixed: 'right'},
......
......@@ -22,6 +22,12 @@
<a-descriptions-item label="佣金金额" name="referencePrice">
¥{{ appraisePrice.fixedCommission || appraisePrice.fixedCommission == 0 ? appraisePrice.fixedCommission : '-' }}元
</a-descriptions-item>
<a-descriptions-item label="成本价" name="referencePrice">
¥{{ appraisePrice.vehicle?.evaluationTransaction?.purchasePrice || appraisePrice.vehicle?.evaluationTransaction?.purchasePrice == 0 ? appraisePrice.vehicle?.evaluationTransaction?.purchasePrice : '-' }}元
</a-descriptions-item>
<a-descriptions-item label="预计经销差" name="referencePrice">
¥{{ expectedProfitMargin }}元
</a-descriptions-item>
</a-descriptions>
<a-divider>审批记录</a-divider>
<approve-history-timeline approve-type="APPRAISE_PRICE" :approve-id="appraisePrice.appraiseId" :create-time="appraisePrice.createTime"
......@@ -70,6 +76,33 @@ export default class AppraisePriceAuditForm extends EnhanceFormComponent<Approve
this.formState = reactive<ApproveHistory>(approveHistory);
}
/**
* 预计经销差 = 保留价 + 佣金 - 成本价
* 使用 Math.round() 避免精度丢失
*/
get expectedProfitMargin(): string {
// 获取保留价
const reservePrice = this.appraisePrice?.reservePrice;
// 获取佣金
const commission = this.appraisePrice?.fixedCommission;
// 获取成本价
const purchasePrice = this.appraisePrice?.vehicle?.evaluationTransaction?.purchasePrice;
// 如果保留价或成本价为空,返回 '-'
if (!reservePrice || !purchasePrice) {
return '-';
}
// 佣金字段可能是0或空,需要特殊处理
const commissionPrice = commission || 0;
// 使用 Math.round() 避免精度丢失,保留2位小数
const margin = Math.round((reservePrice + commissionPrice - purchasePrice) * 100) / 100;
return margin.toFixed(2);
}
onValidSuccess(formValue: ApproveHistory): void {
formValue.approveId = this.appraisePrice.appraiseId;
AppraiseController.auditAppraisePrice(this.axios, formValue).then(res => {
......
......@@ -4,6 +4,7 @@
<a-descriptions-item label="车辆信息">{{ vehicle.baseInfo.carSeriesName }} {{ vehicle.baseInfo.carTypeName }}</a-descriptions-item>
<a-descriptions-item label="市场参考价">¥{{ vehicle.baseInfo.guidePrice }}元</a-descriptions-item>
<a-descriptions-item label="收车成本价">¥{{ vehicle.evaluationTransaction.purchasePrice }}元</a-descriptions-item>
<a-descriptions-item label="预计经销差">¥{{ difference }}元</a-descriptions-item>
</a-descriptions>
<a-alert v-if="(businessConfig&&!businessConfig?.specialPricingEnabled)&&formState.referencePrice <= 0" message="请配置有效的基础参考价规则"
type="error" show-icon class="mb-12"/>
......@@ -87,6 +88,31 @@ export default class AppraisePriceForm extends EnhanceFormComponent<AppraisePric
}
}
/**
* 预计经销差 = 手动输入的保留价 + 佣金 - 收车成本价
* 佣金取值:如果开启自定义佣金,取表单输入的固定佣金,否则按 0 处理
* 使用 Math.round() 避免精度丢失
*/
get difference(): string {
// 获取保留价(手动输入)
const reservePrice = this.formState.reservePrice;
// 获取佣金:如果开启自定义佣金,取表单输入的固定佣金,否则为 0
const commissionPrice = this.formState.fixedCommissionSwitch ? (this.formState.fixedCommission || 0) : 0;
// 获取收车成本价
const purchasePrice = this.vehicle?.evaluationTransaction?.purchasePrice;
// 如果保留价或成本价为空,返回 '-'
if (!reservePrice || !purchasePrice) {
return '-';
}
// 使用 Math.round() 避免精度丢失,保留2位小数
const margin = Math.round((reservePrice + commissionPrice - purchasePrice) * 100) / 100;
return margin.toFixed(2);
}
verifyReferencePrice(_rule: RuleObject, referencePrice: number) {
if (referencePrice <= 0) {
return Promise.reject('请配置有效的基础参考价规则!');
......
......@@ -31,6 +31,12 @@
<a-descriptions-item label="保留价">
¥{{ vehicle.reservePrice }}
</a-descriptions-item>
<a-descriptions-item label="成本价">
¥{{ vehicle.evaluationTransaction?.purchasePrice ?? '-' }}
</a-descriptions-item>
<a-descriptions-item label="预计经销差">
¥{{ expectedProfitMargin }}
</a-descriptions-item>
<a-descriptions-item label="延时规则">
最后{{ auctionVehicle.auction.beforeEndMinute }}分钟出价,延时{{ auctionVehicle.auction.delayMinute }}分钟
</a-descriptions-item>
......@@ -108,6 +114,24 @@ export default class AuctionVehicleHistory extends Vue {
}
}
/**
* 计算预计经销差(保留价 - 成本价)
* 使用 Math.round() 避免精度丢失
*/
get expectedProfitMargin(): string {
const reservePrice = this.vehicle.reservePrice;
const purchasePrice = this.vehicle.evaluationTransaction?.purchasePrice;
// 如果保留价或成本价为空,返回 '-'
if (!reservePrice || !purchasePrice) {
return '-';
}
// 使用 Math.round() 避免精度丢失,保留2位小数
const margin = Math.round((reservePrice - purchasePrice) * 100) / 100;
return margin.toFixed(2);
}
created() {
AuctionController.getAuctionVehiclesByVehicleId(this.axios, this.vehicle.vehicleId).then(response => {
this.auctionVehicles = response.data;
......
......@@ -83,4 +83,11 @@ export class AccountController {
// region 前端扩展代码区
// endregion
/**
* 发起平台合同签署
*/
static initiateSigningApi(axios: AxiosStatic): Promise<AxiosResponse<Account>> {
return axios.post('platformContract/initiateSigning');
}
}
......@@ -172,7 +172,9 @@ export default {
"COUPON_2": "优惠券协议2",
"COUPON_3": "优惠券协议3",
"COUPON_4": "优惠券协议4",
"COUPON_5": "优惠券协议5"
"COUPON_5": "优惠券协议5",
"PURCHASE_CONTRACT": "购车合同",
"PLATFORM_CONTRACT": "平台交易整体合同"
},
"agreementState": {
"DRAFT": "草稿",
......
<template>
<view class="submit-result-container">
<!-- 内容区域 -->
<view class="content-container">
<!-- 等待图标 -->
<view class="waiting-icon-container">
<view class="waiting-icon">
<!-- 资料审核中 -->
<template v-if="account?.certifiedState === 'CERTIFICATING'">
<view class="status-center">
<image :src="imageUrl" class="state-image"></image>
<text class="status-title">资料审核中</text>
<text class="status-desc">我们将于<text class="highlight">3个工作日内</text>进行审核,审核结果会以短信的形式通知,请您耐心等待</text>
</view>
<view class="footer-submit-bar single">
<van-button type="primary" round @click="navigateToHome" block>返回</van-button>
</view>
</template>
<!-- 已通过认证,请完成平台合同签署 -->
<template v-else-if="account?.certifiedState === 'CERTIFIED' && (!account?.platformContractSigned || !account?.platformContractSignTime)">
<view v-if="account.signDeadline && !isSignDeadline" class="tips-box">
<van-icon name="warning" style="margin-top: 2px;" color="#F47F13" />
若 24h 内未完成签署,可点击下方按钮重新发起签署任务。
</view>
<view class="scroll-page with-notice">
<view class="status-center compact">
<image :src="imageUrl" class="state-image"></image>
<text class="status-title">已通过认证,请完成平台合同签署</text>
<text class="status-sub">(签署完成后即可出价参拍)</text>
</view>
<view class="contract-section">
<view class="section-title sticky-title">平台交易整体合同</view>
<view class="contract-content">
<rich-text class="content-text" :nodes="htmlContent"></rich-text>
</view>
</view>
</view>
<!-- 审核状态文字 -->
<view class="status-text-container" v-if="account?.certifiedState==='CERTIFICATING'">
<text class="status-title">资料审核中</text>
<view class="status-desc">我们将于<span style="color:#007FFF ">3个工作日内</span>进行审核,审核结果会以短信的形式通知,请您耐心等待</view>
<view class="footer-submit-bar">
<template v-if="!account.signDeadline">
<van-button type="primary" round @click="handleSign" block>发起合同签署</van-button>
</template>
<template v-else-if="account.signDeadline && isSignDeadline">
<van-button type="primary" round @click="handleSign" block>重新发起签署</van-button>
</template>
<template v-else>
<view class="sign-notice">
<text>签署通过e签宝完成,短信发送至预留手机号</text>
<text>协议将短信发送至{{ maskedMobile }}</text>
</view>
<van-button type="primary" round block>合同签署中</van-button>
</template>
</view>
<view class="status-text-container" v-if="account?.certifiedState==='CERTIFY_FAILED'">
<text class="status-title">审核失败</text>
<text class="status-desc">很抱歉,您的认证信息中有部分信息未能通过审批,请重新上传资料</text>
</template>
<!-- 认证失败 -->
<template v-else-if="account?.certifiedState === 'CERTIFY_FAILED'">
<view class="scroll-page">
<view class="status-center compact">
<image :src="imageUrl" class="state-image"></image>
<text class="status-title">认证失败</text>
<text class="status-desc">请重新填写资料并提交</text>
</view>
<uni-forms v-if="account?.accountType === 'COMMON'" ref="form" :model="formData" :rules="rules">
<view class="info-section">
<view class="section-title">请完善您的个人信息</view>
<view class="section-tip">
<van-image width="16" height="16" fit="cover" src="/static/images/account/certifition/certifition.png"></van-image>
<text class="tip-text">信息用于开通车商服务,您的资料将被严格保密</text>
</view>
<uni-forms-item label="" name="accountName" required>
<view class="form-item">
<text class="label-text">真实姓名</text>
<uni-easyinput v-model="formData.accountName" placeholder="请输入真实姓名" :maxlength="18" :inputBorder="false"/>
</view>
</uni-forms-item>
<uni-forms-item label="" name="idCard" required>
<view class="form-item">
<text class="label-text">身份证号</text>
<uni-easyinput v-model="formData.idCard" placeholder="请输入身份证号码" type="idcard" :maxlength="18" :inputBorder="false"/>
</view>
</uni-forms-item>
</view>
<view class="info-section">
<view class="section-title">上传身份证照片</view>
<view class="section-desc">请上传本人的身份证照片,证件信息仅用于身份认证</view>
<view class="upload-section">
<view class="upload-item">
<uni-file-picker fileMediatype="image" :image-styles="imageStyles" @select="selectFile($event,'front')" mode="grid" :auto-upload="true"
:limit="1" file-extname="png,jpg,jpeg">
<view class="upload-placeholder">
<image v-if="formData.idCardPortrait?.url || account?.idCardPortraitUrl" :src="formData.idCardPortrait?.url || account?.idCardPortraitUrl" mode="aspectFill" style="width: 100%; height: 150px;"></image>
<image v-else src="~@/static/images/account/certifition/idcard_0@2x.png" style="width: 100%; height: 150px;"></image>
<text class="upload-text">上传人像面</text>
</view>
</uni-file-picker>
</view>
<view class="upload-item">
<uni-file-picker fileMediatype="image" :image-styles="imageStyles" @select="selectFile($event,'back')" :limit="1" file-extname="png,jpg,jpeg">
<view class="upload-placeholder">
<image v-if="formData.idCardNationalEmblem?.url || account?.idCardNationalEmblemUrl" :src="formData.idCardNationalEmblem?.url || account?.idCardNationalEmblemUrl" mode="aspectFill" style="width: 100%; height: 150px;"></image>
<image v-else src="~@/static/images/account/certifition/idcard_1@2x.png" style="width: 100%; height: 150px;"></image>
<text class="upload-text">上传国徽面</text>
</view>
</uni-file-picker>
</view>
</view>
</view>
</uni-forms>
<view class="contract-section">
<view class="section-title sticky-title">平台交易整体合同</view>
<view class="contract-content">
<rich-text class="content-text" :nodes="htmlContent"></rich-text>
</view>
</view>
</view>
<view class="status-text-container" v-if="account?.certifiedState==='CERTIFIED'">
<text class="status-title">审核成功</text>
<text class="status-desc">审核通过,开启您的省赚车商之旅</text>
<view class="footer-submit-bar single">
<van-button type="danger" round @click="submitForm" block>重新上传</van-button>
</view>
</template>
<!-- 已通过认证,您可随时参拍 -->
<template v-else-if="account?.certifiedState === 'CERTIFIED' && account?.platformContractSignTime">
<view class="scroll-page">
<view class="status-center compact">
<image :src="imageUrl" class="state-image big-image"></image>
<text class="status-title blue-text">已通过认证,您可随时参拍</text>
<text class="status-desc">平台合同已签署完成,签署时间:2026-07-22 14:08</text>
</view>
<!-- 返回按钮 -->
<view class="button-container">
<template v-if="account?.certifiedState==='CERTIFY_FAILED'">
<van-button type="primary" round @click="navigateTo" block>重新上传</van-button>
<van-button type="default" plain hairline round @click="navigateToHome" block>返回</van-button>
</template>
<van-button v-else type="info" hairline round @click="navigateToHome" block>返回</van-button>
<view class="contract-section">
<view class="section-title sticky-title">平台交易整体合同</view>
<view class="contract-content">
<rich-text class="content-text" :nodes="htmlContent"></rich-text>
</view>
</view>
</view>
<view class="footer-submit-bar single">
<van-button type="primary" color="#EAF1FF" custom-style="color: #185EFE" round @click="navigateToUpgrade" block>企业可继续升级参拍权</van-button>
</view>
</view>
</template>
</view>
</template>
<script lang="ts">
import {Component, Vue} from "vue-facing-decorator";
import {Component, Vue, Watch} from "vue-facing-decorator";
import {onLoad, onShow} from "@dcloudio/uni-app";
import {AccountController} from "@/api/AccountController";
import {Account} from "lib/src/entity/account/entity/Account";
import {AgreementController} from "@/api/AgreementController";
import {Certification} from "lib/src/entity/account/domain/Certification";
import type {FileInfo} from "lib/src/core/bean/FileInfo";
import {AuthService} from "@/common/AuthService";
import {ID_CARD_18_REGEX} from "@/common/CommonUtils";
@Component({
components: {}
})
@Component({})
export default class CertificationResult extends Vue {
account: Account = null;
agreement: { content: string } = null;
formData: Certification = null;
isFormValid = false;
imageStyles = {
width: 168,
border: {
radius: '2px'
}
};
account: Account = null;
rules = {
accountName: {
rules: [{required: true, errorMessage: '请输入真实姓名'}]
},
idCard: {
rules: [
{required: true, errorMessage: '请输入身份证号码'},
{pattern: ID_CARD_18_REGEX, errorMessage: '请输入正确的身份证号码'}
]
},
};
created(): void {
onLoad((option) => {
AccountController.getLoginAccount(this.axios).then(res => {
this.account = res.data;
});
this.formData = new Certification();
this.formData.idCardNationalEmblem = null;
this.formData.idCardPortrait = null;
onLoad(() => {
this.loadAccount();
this.loadAgreement();
});
// 每次都加载
onShow((option) => {
onShow(() => {
this.loadAccount();
});
}
// 返回上一页
navigateTo() {
if (this.account.accountType === 'COMMON') {
uni.navigateTo({url: '/module/account/PersonCertificationPage'});
loadAccount() {
AccountController.getLoginAccount(this.axios).then(res => {
this.account = res.data;
if (this.account?.certifiedState === 'CERTIFY_FAILED') {
this.formData.accountName = this.account.accountName || '';
this.formData.idCard = this.account.idCard || '';
}
});
}
loadAgreement() {
AgreementController.getAgreementByKey(this.axios, 'PLATFORM_CONTRACT').then(res => {
this.agreement = res.data || {};
}).catch(() => {
this.agreement = {};
});
}
get imageUrl(): string {
switch (this.account?.certifiedState) {
case 'CERTIFICATING':
return '/static/images/account/certifition/auditing@2x.png';
case 'CERTIFIED':
if (this.account?.platformContractSignTime) {
return 'https://img02.glsx.com.cn/weapp/resource/dj-aus/images/account/certifition/platformContractSigned.png'
}
return '/static/images/account/certifition/success@2x.png';
case 'CERTIFY_FAILED':
return '/static/images/account/certifition/fail@2x.png';
default:
return '';
}
}
get htmlContent(): string {
return this.formatRichText(this.agreement?.content ?? '');
}
get maskedMobile(): string {
if (!this.account?.mobile) return '';
const mobile = this.account.mobile;
if (mobile.length === 11) {
return mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
}
return mobile;
}
get isSignDeadline(): boolean {
try {
const signDeadline = new Date(this.account.signDeadline);
const now = new Date();
return signDeadline <= now;
} catch (error) {
console.error('签署截止时间解析失败:', error);
return false;
}
}
formatRichText(html: string) {
html = html.replace(/class="mce-.*?"/g, '');
html = html.replace(/width:\s*\d+px;/g, '');
html = html.replace(/height:\s*\d+px;/g, 'height: auto;');
html = html.replace(/<(\/)?pre[^>]*>/gi, '');
return html;
}
@Watch("formData", {deep: true, immediate: true})
async watchFormData() {
setTimeout(() => {
this.$refs.form?.validate().then(() => {
this.isFormValid = (this.formData.idCardPortrait != null) && (this.formData.idCardNationalEmblem != null);
}).catch(() => {
this.isFormValid = false;
});
}, 50);
}
async selectFile(e: any, type: string) {
const tempFiles = e.tempFiles;
if (tempFiles && tempFiles.length > 0) {
const fileInfos = [];
for (const tempFile of tempFiles) {
const fileInfo = await this.uploadFiles(tempFile);
if (fileInfo) {
fileInfos.push(fileInfo);
}
}
if (fileInfos.length > 0) {
if (type === 'front') {
this.formData.idCardPortrait = fileInfos[0];
} else {
this.formData.idCardNationalEmblem = fileInfos[0];
}
}
}
}
uploadFiles(tempFile: any): Promise<FileInfo> {
const authService: AuthService = this.$auth;
const action = 'upload/uploadImage?directory=account/certification';
return new Promise((resolve, reject) => {
uni.uploadFile({
url: this.$apiUrl + action,
filePath: tempFile.path,
name: 'file',
file: tempFile,
header: {'Authorization': 'Bearer ' + authService.getToken()},
success: res => {
if (res.statusCode === 200) {
const file = JSON.parse(res.data);
resolve(file);
} else {
reject(null);
}
},
fail: () => {
uni.showToast({title: '上传失败,请检查网络后重试', icon: 'none'});
reject(null);
}
});
});
}
submitForm() {
if (this.account?.accountType == "COMMON") {
this.$refs.form.validate().then(() => {
if (!this.formData.idCardPortrait) {
uni.showToast({title: '请上传身份证人像面', icon: 'none'});
return;
}
if (!this.formData.idCardNationalEmblem) {
uni.showToast({title: '请上传身份证国徽面', icon: 'none'});
return;
}
uni.showLoading({title: '提交中...', mask: true});
AccountController.certifyAccount(this.axios, this.formData).then(() => {
uni.showToast({title: '提交成功', icon: 'success'});
uni.navigateBack();
}).finally(() => {
uni.hideLoading();
});
}).catch((error: any) => {
console.log('表单验证失败', error);
});
} else if (this.account.accountType === 'PERSON') {
uni.navigateTo({url: '/module/account/CompanyCertificationPage'});
}
}
get imageUrl(): string {
switch (this.account?.certifiedState) {
case "CERTIFICATING":
return "/static/images/account/certifition/auditing@2x.png"
case "CERTIFIED":
return "/static/images/account/certifition/success@2x.png"
case "CERTIFY_FAILED":
return "/static/images/account/certifition/fail@2x.png"
case "UNCERTIFIED":
return "/static/images/account/certifition/success@2x.png"
handleSign() {
uni.showLoading({title: '发起中...', mask: true})
AccountController.initiateSigningApi(this.axios).then(() => {
uni.showToast({title: '发起成功', icon: 'success'})
uni.navigateBack();
}).finally(() => {
uni.hideLoading();
});
}
navigateTo() {
if (this.account?.accountType === 'COMMON') {
uni.navigateTo({url: '/module/account/PersonCertificationPage'});
} else if (this.account?.accountType === 'PERSON') {
uni.navigateTo({url: '/module/account/CompanyCertificationPage'});
}
}
// 返回首页
navigateToHome() {
uni.switchTab({url: '/pages/tabbar/ProfilePage'});
}
navigateToUpgrade() {
uni.navigateTo({url: '/module/account/CompanyCertificationPage'})
}
}
</script>
......@@ -93,69 +380,228 @@ export default class CertificationResult extends Vue {
.submit-result-container {
min-height: 100vh;
background-color: #fff;
box-sizing: border-box;
padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
.tips-box {
padding: 13px 16px;
background: #FEF2E7;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 8px;
color: #F47F13;
font-size: 14px;
}
.scroll-page {
min-height: 100vh;
padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
/* 内容区域样式 */
.content-container {
flex: 1;
.scroll-page.with-notice {
padding-bottom: calc(112px + env(safe-area-inset-bottom));
}
.status-center {
display: flex;
flex-direction: column;
align-items: center;
//justify-content: center;
padding: 40px 20px;
padding: 80px 30px 40px;
text-align: center;
}
/* 等待图标样式 */
.waiting-icon-container {
margin-bottom: 30px;
.status-center.compact {
padding: 40px 0 24px;
}
.waiting-icon {
width: 120px;
height: 120px;
//border-radius: 60px;
//background-color: #fff7e6;
//display: flex;
//align-items: center;
//justify-content: center;
.state-image {
width: 60px;
height: 60px;
margin-bottom: 20px;
}
.state-image {
.big-image {
width: 120px;
height: 120px;
}
/* 状态文字样式 */
.status-text-container {
text-align: center;
margin-bottom: 50px;
padding: 0 20px;
}
.status-title {
font-size: 20px;
color: #141E34;
margin-bottom: 12px;
}
.blue-text {
color: #185EFE;
}
.status-desc {
font-size: 14px;
color: #828CA0;
line-height: 1.6;
}
.status-desc .highlight {
color: #007FFF;
}
.status-sub {
font-size: 13px;
color: #999;
}
.info-section {
background-color: #fff;
margin-bottom: 10px;
padding: 15px;
}
.section-title {
font-size: 18px;
font-weight: 500;
color: #333;
margin-bottom: 10px;
display: block;
}
.section-tip {
display: inline-flex;
align-items: center;
gap: 5px;
margin-bottom: 15px;
border-radius: 20px;
padding: 1px 30px 1px 6px;
background: #007FFF19;
}
.status-desc {
font-size: 14px;
.tip-text {
font-size: 10px;
color: #1A1A1AFF;
}
.section-desc {
font-size: 12px;
color: #666;
line-height: 1.6;
margin-bottom: 15px;
display: block;
}
.form-item {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 16px;
}
.form-item:last-child {
margin-bottom: 0;
}
/* 按钮样式 */
.button-container {
.label-text {
font-size: 14px;
color: #333;
width: 90px;
flex-shrink: 0;
}
.required {
color: #ff4d4f;
}
.value-text {
flex: 1;
font-size: 14px;
color: #333;
}
.upload-section {
display: flex;
gap: 15px;
}
.upload-item {
flex: 1;
}
.upload-placeholder {
width: 100%;
height: 120px;
border-radius: 8px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background-color: #fafafa;
}
.upload-text {
font-size: 12px;
color: #999;
margin-top: 8px;
}
.idcard-image {
width: 100%;
padding: 0 20px;
height: 120px;
border-radius: 8px;
background-color: #fafafa;
}
.contract-section {
background-color: #fff;
padding: 15px;
margin-bottom: 10px;
}
.section-title {
font-size: 16px;
font-weight: 500;
color: #333;
margin-bottom: 12px;
}
.first-button {
.sticky-title {
position: sticky;
top: 0;
background: #fff;
z-index: 100;
padding: 15px 15px 12px;
margin: 0 -15px 12px;
}
.contract-content {
background: #F8F8F8;
padding: 12px;
border-radius: 8px;
}
.content-text {
font-size: 14px;
line-height: 1.6;
color: #333;
}
.sign-notice {
padding: 0 0 12px;
text-align: center;
font-size: 12px;
color: #999;
line-height: 1.5;
}
.sign-notice text {
display: block;
}
.footer-submit-bar {
position: fixed;
right: 0;
bottom: 0;
left: 0;
z-index: 101;
padding: 12px 15px calc(12px + env(safe-area-inset-bottom));
background-color: #fff;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}
</style>
<template>
<view class="dealer-application-container">
<uni-forms ref="form" :model="formData" :rules="rules">
<!-- 个人信息部分 -->
<view class="form-section">
<text class="section-title">请完善您的个人信息</text>
<view class="section-tip">
<van-image width="16" height="16" fit="cover" src="/static/images/account/certifition/certifition.png" style="margin-top: 3px"></van-image>
<text class="tip-text">信息用于开通车商服务,您的资料将被严格保密</text>
</view>
<view class="form-content">
<uni-forms ref="form" :model="formData" :rules="rules">
<!-- 个人信息部分 -->
<view class="form-section">
<text class="section-title">请完善您的个人信息</text>
<view class="section-tip">
<van-image width="16" height="16" fit="cover" src="/static/images/account/certifition/certifition.png" style="margin-top: 3px"></van-image>
<text class="tip-text">信息用于开通车商服务,您的资料将被严格保密</text>
</view>
<uni-forms-item label="" name="accountName" required>
<view class="form-item">
<text class="label-text">真实姓名</text>
<uni-easyinput v-model="formData.accountName" placeholder="请输入真实姓名" :maxlength="18" :inputBorder="false"/>
</view>
</uni-forms-item>
<uni-forms-item label="" name="accountName" required>
<view class="form-item">
<text class="label-text">真实姓名</text>
<uni-easyinput v-model="formData.accountName" placeholder="请输入真实姓名" :maxlength="18" :inputBorder="false"/>
</view>
</uni-forms-item>
<uni-forms-item label="" name="idCard" required>
<view class="form-item">
<text class="label-text">身份证号</text>
<uni-easyinput v-model="formData.idCard" placeholder="请输入身份证号码" type="idcard" :maxlength="18" :inputBorder="false"/>
</view>
</uni-forms-item>
</view>
<uni-forms-item label="" name="idCard" required>
<view class="form-item">
<text class="label-text">身份证号</text>
<uni-easyinput v-model="formData.idCard" placeholder="请输入身份证号码" type="idcard" :maxlength="18" :inputBorder="false"/>
</view>
</uni-forms-item>
</view>
<!-- 身份证照片上传部分 -->
<view class="form-section">
<text class="section-title">上传身份证照片</text>
<text class="section-desc">请上传本人的身份证照片,证件信息仅用于身份认证</text>
<view class="upload-section">
<view class="upload-item">
<uni-file-picker fileMediatype="image" :image-styles="imageStyles" @select="selectFile($event,'front')" mode="grid" :auto-upload="true"
:limit="1" file-extname="png,jpg,jpeg">
<view class="upload-placeholder">
<image src="~@/static/images/account/certifition/idcard_0@2x.png" style="width: 100%; height: 150px;"></image>
<text class="upload-text">上传人像面</text>
</view>
</uni-file-picker>
</view>
<view class="upload-item">
<uni-file-picker fileMediatype="image" :image-styles="imageStyles" @select="selectFile($event,'back')" :limit="1" file-extname="png,jpg,jpeg">
<view class="upload-placeholder">
<image class="add-img" src="~@/static/images/account/certifition/idcard_1@2x.png" style="width: 100%; height: 150px;"></image>
<text class="upload-text">上传国徽面</text>
</view>
</uni-file-picker>
<!-- 身份证照片上传部分 -->
<view class="form-section">
<text class="section-title">上传身份证照片</text>
<text class="section-desc">请上传本人的身份证照片,证件信息仅用于身份认证</text>
<view class="upload-section">
<view class="upload-item">
<uni-file-picker fileMediatype="image" :image-styles="imageStyles" @select="selectFile($event,'front')" mode="grid" :auto-upload="true"
:limit="1" file-extname="png,jpg,jpeg">
<view class="upload-placeholder">
<image src="~@/static/images/account/certifition/idcard_0@2x.png" style="width: 100%; height: 150px;"></image>
<text class="upload-text">上传人像面</text>
</view>
</uni-file-picker>
</view>
<view class="upload-item">
<uni-file-picker fileMediatype="image" :image-styles="imageStyles" @select="selectFile($event,'back')" :limit="1" file-extname="png,jpg,jpeg">
<view class="upload-placeholder">
<image class="add-img" src="~@/static/images/account/certifition/idcard_1@2x.png" style="width: 100%; height: 150px;"></image>
<text class="upload-text">上传国徽面</text>
</view>
</uni-file-picker>
</view>
</view>
</view>
</uni-forms>
</view>
<!-- 合同内容查看 -->
<view class="contract-section">
<view class="section-title sticky-title">平台交易整体合同</view>
<view class="contract-content">
<rich-text class="content-text" :nodes="htmlContent"></rich-text>
</view>
<!-- <view class="form-section">-->
<!-- <uni-forms-item label="" name="recommendCode">-->
<!-- <view class="form-item">-->
<!-- <text class="label-text">推荐码</text>-->
<!-- <uni-easyinput v-model="formData.recommendCode" placeholder="请输入推荐码" :inputBorder="false"/>-->
<!-- </view>-->
<!-- </uni-forms-item>-->
<!-- </view>-->
<!-- 提交按钮 -->
<view class="submit-button-container">
<van-button type="primary" :disabled="!isFormValid" round @click="submitForm" block>提交</van-button>
</view>
</uni-forms>
</view>
<!-- 底部固定提交按钮 -->
<view class="footer-submit-bar">
<van-button type="primary" :disabled="!isFormValid" round @click="submitForm" block>提交认证</van-button>
</view>
</view>
</template>
<script lang="ts">
......@@ -74,7 +78,7 @@ import {AccountController} from "@/api/AccountController";
import type {FileInfo} from "lib/src/core/bean/FileInfo";
import {AuthService} from "@/common/AuthService";
import {ID_CARD_18_REGEX} from "@/common/CommonUtils";
import {AgreementController} from "@/api/AgreementController"
@Component({})
export default class PersonCertificationPage extends Vue {
formData: Certification = null;
......@@ -90,6 +94,7 @@ export default class PersonCertificationPage extends Vue {
isFormValid = false;
agreement: {content: string} = null;
// 110101199001011234
rules = {
......@@ -117,11 +122,28 @@ export default class PersonCertificationPage extends Vue {
});
const recommendCode = uni.getStorageSync('recommendCode');
console.log("recommendCode:" + recommendCode);
// if (recommendCode) {
// this.formData.recommendCode = recommendCode;
// }
AgreementController.getAgreementByKey(this.axios, 'PLATFORM_CONTRACT').then(res => {
this.agreement = res.data || {};
}).catch(() => {
this.agreement = {};
});
});
}
get htmlContent(): string {
console.log('htmlContent: this.agreement?.content =', this.agreement?.content);
return this.formatRichText(this.agreement?.content ?? "");
}
formatRichText(html: string) {
// 移除 mce 前缀类名
html = html.replace(/class="mce-.*?"/g, '');
// 移除固定宽度样式
html = html.replace(/width:\s*\d+px;/g, '');
// 移除内联 style 中的 height(保留 auto)
html = html.replace(/height:\s*\d+px;/g, 'height: auto;');
html = html.replace(/<(\/)?pre[^>]*>/gi, '');
return html;
}
@Watch("formData", {deep: true, immediate: true})
......@@ -238,7 +260,7 @@ export default class PersonCertificationPage extends Vue {
.dealer-application-container {
min-height: 100vh;
background-color: #f5f5f5;
padding-bottom: 30px;
padding-bottom: calc(64px + env(safe-area-inset-bottom));
}
......@@ -261,6 +283,38 @@ export default class PersonCertificationPage extends Vue {
display: block;
}
.sticky-title {
position: sticky;
top: 0;
background: #fff;
z-index: 100;
padding: 15px 15px 10px;
margin: 0 -15px 10px;
}
.contract-section {
background-color: #fff;
padding: 15px;
margin-bottom: 10px;
}
.contract-content {
background: #F8F8F8;
padding: 8px 12px;
border-radius: 8px;
}
.footer-submit-bar {
position: fixed;
right: 0;
bottom: 0;
left: 0;
z-index: 101;
padding: 12px 15px calc(12px + env(safe-area-inset-bottom));
background-color: #fff;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}
.section-tip {
display: inline-flex;
align-items: center;
......@@ -332,9 +386,10 @@ export default class PersonCertificationPage extends Vue {
}
/* 提交按钮样式 */
.submit-button-container {
padding: 20px 15px 0;
.content-text {
font-size: 14px;
line-height: 1.6;
color: #333;
}
</style>
......@@ -393,7 +393,9 @@
@close="closeBidSuccessDialog"></bid-success-dialog>
</van-dialog>
</view>
<van-dialog use-slot :show="showCertifyDialog" :show-cancel-button="false" :show-confirm-button="false">
<certification-dialog @close="onCertifyDialogClosed"></certification-dialog>
</van-dialog>
<coupon-home-benefit-popup v-if="!isSinglePageMode" :show="showCouponBenefitPopup" :payload="couponBenefitPayload"
@close="onCouponBenefitPopupClose" />
......@@ -429,7 +431,7 @@ import roundBidBottom from "@/module/auction/roundBidBottom.vue";
import RoundBidPopup from "@/components/RoundBidPopup.vue";
import customNav from "@/module/auction/customNav.vue";
import InspectionReport from "@/module/auction/InspectionReport.vue";
import CertificationDialog from "@/pages/tabbar/home/CertificationDialog.vue";
/**
* 检测是否处于微信朋友圈/短链「单页模式」。
* 必须在类字段初始化阶段同步调用:冷启动时 composable onLoad 可能尚未执行,
......@@ -468,7 +470,7 @@ function parseAucvehIdFromEnterOptions(): number | undefined {
}
@Component({
components: { BidSuccessDialog, roundBidBottom, RoundBidPopup, customNav, InspectionReport, CouponHomeBenefitPopup }
components: { CertificationDialog, BidSuccessDialog, roundBidBottom, RoundBidPopup, customNav, InspectionReport, CouponHomeBenefitPopup }
})
export default class AuctionVehiclePage extends Vue {
......@@ -573,7 +575,9 @@ export default class AuctionVehiclePage extends Vue {
lightBidPriceRange: LightBidPriceRange;
darkBidPriceRange: DarkBidPriceRange;
/** 认证弹窗延迟定时器(避免重复 onShow 叠加多个定时器) */
certifyDelayTimer: ReturnType<typeof setTimeout> | null = null;
showCertifyDialog = false;
change(e: any) {
// this.show = e.show
}
......@@ -892,7 +896,7 @@ export default class AuctionVehiclePage extends Vue {
// 代码请求优化
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
//this.auctionVehicle.auctionState === 'SOLD' &&
//this.auctionVehicle.auctionState === 'SOLD' &&
if (this.$auth.isLogin() && currentPage.route == 'module/auction/AuctionVehiclePage') {
this.intervalId = setInterval(() => {
AuctionOrderController.getAuctionOrderByVehicleId(this.axios, this.vehicle.vehicleId).then(res => {
......@@ -1088,6 +1092,10 @@ export default class AuctionVehiclePage extends Vue {
}
}
onCertifyDialogClosed(): void {
this.showCertifyDialog = false;
}
// 增加出价金额
addBidAmount(price: number) {
this.currentAddPrice = price;
......@@ -1157,6 +1165,15 @@ export default class AuctionVehiclePage extends Vue {
}
}
});
} else if (reason.data && reason.data.code === "platformContract") {
if (this.certifyDelayTimer != null) {
clearTimeout(this.certifyDelayTimer);
this.certifyDelayTimer = null;
}
this.certifyDelayTimer = setTimeout(() => {
this.certifyDelayTimer = null;
this.showCertifyDialog = true;
}, 1000);
}
}).finally(() => {
uni.hideLoading();
......
......@@ -328,7 +328,7 @@
{
"path": "CompanyCertificationPage",
"style": {
"navigationBarTitleText": "成为车商",
"navigationBarTitleText": "升级参拍权",
"enablePullDownRefresh": false
}
},
......@@ -588,4 +588,4 @@
"van-count-down": "/wxcomponents/vant/weapp/count-down/index"
}
}
}
\ No newline at end of file
}
......@@ -32,8 +32,10 @@
</view>
<text class="agreement-text">
阅读并同意
<text class="agreement-link" @click="viewUserAgreement">《优加车拍二手车用户协议》</text>
<text class="agreement-link" @click="viewPrivacyAgreement">《优加车拍二手车隐私协议》</text>
<text class="agreement-link" @click="viewAgreement('ACCOUNT')">《用户协议》</text>
<text class="agreement-link" @click="viewAgreement('PRIVACY')">《隐私协议》</text>
<text class="agreement-link" @click="viewAgreement('PURCHASE_CONTRACT')">《购车合同》</text>
<text class="agreement-link" @click="viewAgreement('AUCTION')">《竞拍规则》</text>
未登录用户默认注册为平台会员
</text>
</view>
......@@ -139,14 +141,9 @@ export default class LoginPage extends Vue {
this.isAgreed = !this.isAgreed;
}
// 查看用户协议
viewUserAgreement() {
uni.navigateTo({url: '/module/profile/AgreementPage?key=ACCOUNT'});
}
// 查看隐私协议
viewPrivacyAgreement() {
uni.navigateTo({url: '/module/profile/AgreementPage?key=PRIVACY'});
// 查看协议
viewAgreement(key) {
uni.navigateTo({url: `/module/profile/AgreementPage?key=${key}`});
}
}
</script>
......
......@@ -332,10 +332,9 @@ export default class HomePage extends Vue {
return;
}
const accountInfo = authService.getAuthentication();
/** 仅未认证/认证失败的 COMMON 用户走认证引导;已认证用户直接进入权益弹窗链路 */
/** 仅未认证/认证失败的 COMMON 用户走认证引导 或者未签署平台合同;已认证用户直接进入权益弹窗链路 */
const cs = accountInfo?.certifiedState;
const needP1 = !!(accountInfo && accountInfo.accountType === 'COMMON' && cs !== 'CERTIFICATING' && cs !== 'CERTIFIED');
const needP1 = (!!(accountInfo && accountInfo.accountType === 'COMMON' && cs !== 'CERTIFICATING' && cs !== 'CERTIFIED') || (accountInfo && !accountInfo.platformContractSigned));
if (needP1) {
if (this.certifyDelayTimer != null) {
clearTimeout(this.certifyDelayTimer);
......
......@@ -54,39 +54,57 @@
<template v-if="accountInfo">
<template v-if="accountInfo.accountType === 'COMMON'">
<template v-if="accountInfo?.certifiedState === 'UNCERTIFIED'">
<account-auth-section title="获得参拍权" desc="让每一次拍得得心应手" button="立即开通"
<account-auth-section title="完成认证,解锁竞拍权限" desc="出价前需完成验证" button="去认证"
url="/module/account/PersonCertificationPage"></account-auth-section>
</template>
<template v-if="accountInfo?.certifiedState === 'CERTIFICATING'">
<account-auth-section title="认证资料审核中" desc="认证资料审核中" button="查看详情"
<account-auth-section title="认证资料审核中" desc="出价前需完成验证" button="去查看"
url="/module/account/CertificationResult"></account-auth-section>
</template>
<template v-if="accountInfo?.certifiedState === 'CERTIFY_FAILED'">
<account-auth-section title="认证失败" desc="让获得更专业的服务" button="查看详情"
<account-auth-section title="认证失败,请重新认证" desc="出价前需完成验证" button="去认证"
url="/module/account/CertificationResult"></account-auth-section>
</template>
</template>
<template v-if="accountInfo.accountType === 'PERSON'">
<!-- 个人未认证 -->
<template
v-if="accountInfo?.certifiedState === 'UNCERTIFIED' || accountInfo?.certifiedState === 'CERTIFIED'">
<account-auth-section title="升级参拍权" desc="让获得更专业的服务" button="立即升级"
url="/module/account/CompanyCertificationPage"></account-auth-section>
v-if="accountInfo?.certifiedState === 'UNCERTIFIED'">
<account-auth-section title="完成认证,解锁竞拍权限" desc="出价前需完成验证" button="去认证"
url="/module/account/PersonCertificationPage"></account-auth-section>
</template>
<!-- 个人认证中 -->
<template v-if="accountInfo?.certifiedState === 'CERTIFICATING'">
<account-auth-section title="认证资料审核中" desc="认证资料审核中" button="查看详情"
<account-auth-section title="认证资料审核中" desc="出价前需完成验证" button="去查看"
url="/module/account/CertificationResult"></account-auth-section>
</template>
<!-- 个人认证失败 -->
<template v-if="accountInfo?.certifiedState === 'CERTIFY_FAILED'">
<account-auth-section title="认证失败" desc="让获得更专业的服务" button="查看详情"
<account-auth-section title="认证失败,请重新认证" desc="出价前需完成验证" button="去认证"
url="/module/account/CertificationResult"></account-auth-section>
</template>
<!-- 个人认证成功未签署合同 -->
<template v-if="accountInfo?.certifiedState === 'CERTIFIED' && !accountInfo?.platformContractSigned && !accountInfo?.signDeadline">
<account-auth-section title="认证成功,待签署合同" desc="合同签署成功后即可参拍" button="去签署"
url="/module/account/CertificationResult"></account-auth-section>
</template>
<!-- 合同签署中 -->
<template v-if="accountInfo?.certifiedState === 'CERTIFIED' && isSignDeadline">
<account-auth-section title="合同签署中" desc="合同签署成功后即可参拍" button="去查看"
url="/module/account/CertificationResult"></account-auth-section>
</template>
<!-- 升级到车商参拍权 -->
<template v-if="accountInfo?.certifiedState === 'CERTIFIED' && accountInfo?.platformContractSigned && accountInfo?.platformContractSignTime">
<account-auth-section title="恭喜你,获得参拍资格" desc="点击查看按钮可继续升级参拍权" button="去查看"
url="/module/account/CompanyCertificationPage"></account-auth-section>
</template>
</template>
<template v-if="accountInfo.accountType === 'COMPANY'">
</template>
</template>
<template v-else>
<account-auth-section title="获得参拍权" desc="让每一次拍得得心应手" button="立即开通"
<account-auth-section title="完成认证,解锁竞拍权限" desc="出价前需完成验证" button="去认证"
url="/pages/LoginPage"></account-auth-section>
</template>
<!-- 常用工具 -->
......@@ -373,6 +391,25 @@ export default class ProfilePage extends Vue {
return couponImageUrl("ticket.png");
}
/**
* 判断签署截止时间是否大于当前时间
* 用于显示"合同签署中"状态
*/
get isSignDeadline(): boolean {
if (!this.accountInfo?.signDeadline) {
return false;
}
try {
const signDeadline = new Date(this.accountInfo.signDeadline);
const now = new Date();
return signDeadline > now;
} catch (error) {
console.error('签署截止时间解析失败:', error);
return false;
}
}
previewAvatar(): void {
if (this.accountInfo?.avatar && this.accountInfo.avatar?.url) {
uni.previewImage({ urls: [this.accountInfo.avatar.url], current: 0 });
......
<template>
<view class="dialog-container">
<view class="dialog-body">
<view class="dialog-close" @click="closeDialog">
<text class="close-icon">×</text>
</view>
<view class="dialog-icon">
<van-image width="80" height="88" fit="cover" src="/static/images/account/certifition/certifition.png"></van-image>
</view>
......@@ -8,97 +11,105 @@
完成本人认证
</view>
<view class="dialog-content">
<text>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;完成后,您将获得在我们平台上架车辆的权限,享受安全、高效的交易环境</text>
<text>认证完成后,您将解锁海量优质车源的竞拍购车权限,畅享透明、安全、高效的在线交易体验。</text>
</view>
<view class="dialog-footer">
<van-button type="primary" hairline round block @click="goCertification">立即认证</van-button>
<view @click="closeDialog" class="popup-button-text">稍后认证</view>
<van-button type="primary" round block @click="goCertification">立即认证</van-button>
</view>
</view>
</view>
</template>
<script lang="ts">
import {Component, Vue} from "vue-facing-decorator";
import { AuthService } from "@/common/AuthService";
@Component({
components: {}
})
export default class CertificationDialog extends Vue {
goCertification(): void {
const authService: AuthService = this.$auth
this.$emit('close');
uni.navigateTo({url: '/module/account/PersonCertificationPage'});
if (authService.accountInfo.certifiedState == 'UNCERTIFIED') {
uni.navigateTo({url: '/module/account/PersonCertificationPage'})
} else {
uni.navigateTo({url: '/module/account/CertificationResult'})
}
}
closeDialog(): void {
this.$emit('close');
}
}
</script>
<style lang="scss" scoped>
.dialog-container {
//height: 200px;
//min-height: 100vh;
/* 避免内容被顶部导航栏遮挡(可选) */
//padding-top: var(--status-bar-height);
//box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
.bg-image {
background-attachment: inherit; /* 将背景图固定不动 */
.dialog-body {
position: relative;
padding: 32px 24px 28px;
background: #fff;
border-radius: 16px;
box-sizing: border-box;
}
.dialog-body {
padding: 20px;
.dialog-close {
position: absolute;
top: 12px;
right: 12px;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
z-index: 1;
}
.close-icon {
font-size: 22px;
color: #999;
line-height: 1;
}
.dialog-icon {
text-align: center;
margin-bottom: 16px;
}
.dialog-header {
position: relative;
font-size: 22px;
font-weight: 400;
font-size: 20px;
font-weight: 500;
color: #141E34;
text-align: center;
margin-top: 20px;
margin-bottom: 10px;
margin-bottom: 12px;
}
.dialog-content {
position: relative;
padding: 4px 20px 12px 20px;
padding: 0 4px 24px;
text-align: center;
text {
text-indent: 2em;
font-size: 14px;
font-weight: 400;
line-height: 18.2px;
line-height: 1.6;
color: #676D7D;
text-justify: newspaper;
}
}
.dialog-footer {
margin-top: 20px;
position: relative;
display: flex;
flex-direction: column;
gap: 3px;;
}
.popup-button-text {
width: 100%;
height: 20px;
float: left;
line-height: 20px;
color: #666666;
font-size: 14px;
font-weight: 常规体;
font-family: "苹方-简";
text-align: center;
cursor: pointer;
margin-top: 16px;
.dialog-footer ::v-deep .van-button--primary {
background: #347BFF;
border-color: #347BFF;
height: 44px;
font-size: 16px;
font-weight: 500;
}
</style>
......@@ -50,8 +50,8 @@ export class Agreement extends AuditingEntity {
* ABOUT_US 关于我们
* COUPON_1 ~ COUPON_5 优惠券协议(多档活动可分别配置)
*/
export type Agreement_AgreementKey = 'AUCTION'|'TRANSACTION'|'VIOLATION'|'CONTRACT'|'ACCOUNT'|'PRIVACY'|'ABOUT_US'|'FAPAI_ACCOUNT'|'FAPAI_PRIVACY'|'COUPON_1'|'COUPON_2'|'COUPON_3'|'COUPON_4'|'COUPON_5';
export const AGREEMENT_AGREEMENT_KEYS = ['AUCTION','TRANSACTION','VIOLATION','CONTRACT','ACCOUNT','PRIVACY','ABOUT_US', 'FAPAI_ACCOUNT', 'FAPAI_PRIVACY', 'COUPON_1', 'COUPON_2', 'COUPON_3', 'COUPON_4', 'COUPON_5'];
export type Agreement_AgreementKey = 'AUCTION'|'TRANSACTION'|'VIOLATION'|'CONTRACT'|'ACCOUNT'|'PRIVACY'|'ABOUT_US'|'FAPAI_ACCOUNT'|'FAPAI_PRIVACY'|'COUPON_1'|'COUPON_2'|'COUPON_3'|'COUPON_4'|'COUPON_5'|'PURCHASE_CONTRACT'|'PLATFORM_CONTRACT';
export const AGREEMENT_AGREEMENT_KEYS = ['AUCTION','TRANSACTION','VIOLATION','CONTRACT','ACCOUNT','PRIVACY','ABOUT_US', 'FAPAI_ACCOUNT', 'FAPAI_PRIVACY', 'COUPON_1', 'COUPON_2', 'COUPON_3', 'COUPON_4', 'COUPON_5', 'PURCHASE_CONTRACT', 'PLATFORM_CONTRACT'];
/**
* DRAFT 草稿
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!