hookehuyr

fix(PaymentAgreementModal): 修改签约提示语以区分首次和后续签约

refactor(collectionSettings): 优化代码格式和组件属性换行
......@@ -310,11 +310,13 @@ const handleBindJeePay = async () => {
auth_sign_url: auth_sign_url || ''
}
// TODO: 第一次签约会发短信, 但是以后再进来就不会发短信了, 如果后端知道短信了, 应该给个标识区别, 写的提示语应该不一样.
// 1. 如果返回 auth_complement_url 非空时,提示用户接收短信
if (auth_complement_url) {
Taro.showModal({
title: '提示',
content: '请注意接收【嘉联支付】的短信,并打开短信里的链接,完成收款协议与实名认证',
content: '您尚未完成签约,请注意接收【嘉联支付】的短信,并打开短信里的链接,完成收款协议与实名认证',
showCancel: false,
confirmText: '关闭'
})
......@@ -324,7 +326,7 @@ const handleBindJeePay = async () => {
if (auth_sign_url) {
Taro.showModal({
title: '提示',
content: '请注意接收【嘉联支付】的短信,并打开短信里的链接,完成收款协议与实名认证',
content: '您尚未完成签约,请注意接收【嘉联支付】的短信,并打开短信里的链接,完成收款协议与实名认证',
showCancel: false,
confirmText: '关闭'
})
......
......@@ -16,7 +16,8 @@
<text class="setting-label">收款账号</text>
</view>
<view class="setting-right">
<text class="setting-status" :class="{ 'status-set': accountInfo.bankName && accountInfo.bankAccount && accountInfo.bankImg }">
<text class="setting-status"
:class="{ 'status-set': accountInfo.bankName && accountInfo.bankAccount && accountInfo.bankImg }">
{{ accountInfo.bankName && accountInfo.bankAccount && accountInfo.bankImg ? '已设置' : '未设置' }}
</text>
<!-- <text class="arrow">></text> -->
......@@ -30,8 +31,11 @@
<text class="setting-label">身份信息</text>
</view>
<view class="setting-right">
<text class="setting-status" :class="{ 'status-set': identityInfo.userName && identityInfo.idCard && identityInfo.idcard_1_img && identityInfo.idcard_2_img && identityInfo.idcard_effect_begin && identityInfo.idcard_effect_end && identityInfo.idcard_address }">
{{ identityInfo.userName && identityInfo.idCard && identityInfo.idcard_1_img && identityInfo.idcard_2_img && identityInfo.idcard_effect_begin && identityInfo.idcard_effect_end && identityInfo.idcard_address ? '已设置' : '未设置' }}
<text class="setting-status"
:class="{ 'status-set': identityInfo.userName && identityInfo.idCard && identityInfo.idcard_1_img && identityInfo.idcard_2_img && identityInfo.idcard_effect_begin && identityInfo.idcard_effect_end && identityInfo.idcard_address }">
{{ identityInfo.userName && identityInfo.idCard && identityInfo.idcard_1_img && identityInfo.idcard_2_img &&
identityInfo.idcard_effect_begin && identityInfo.idcard_effect_end && identityInfo.idcard_address ? '已设置' :
'未设置' }}
</text>
<!-- <text class="arrow">></text> -->
<RectRight color="#999" size="10" />
......@@ -40,15 +44,8 @@
</view>
<!-- 收款账号弹窗 -->
<nut-popup
v-model:visible="showAccountModal"
position="bottom"
:style="{ width: '100%', height: '85%' }"
:close-on-click-overlay="false"
closeable
close-icon-position="top-right"
@close="closeAccountModal"
>
<nut-popup v-model:visible="showAccountModal" position="bottom" :style="{ width: '100%', height: '85%' }"
:close-on-click-overlay="false" closeable close-icon-position="top-right" @close="closeAccountModal">
<view class="modal-content">
<view class="modal-header">
<text class="modal-title">收款账号设置</text>
......@@ -68,13 +65,8 @@
<view class="form-item">
<text class="form-label"><text class="required-mark">*</text>银行账号</text>
<input
v-model="tempAccountInfo.bankAccount"
placeholder="请输入银行账号"
class="form-input custom-input native-input"
:cursor-spacing="50"
@blur="validateBankAccount"
/>
<input v-model="tempAccountInfo.bankAccount" placeholder="请输入银行账号"
class="form-input custom-input native-input" :cursor-spacing="50" @blur="validateBankAccount" />
<text v-if="bankAccountError" class="error-text">{{ bankAccountError }}</text>
</view>
......@@ -83,12 +75,7 @@
<text class="form-label"><text class="required-mark">*</text>银行卡正面照</text>
<view class="bank-img-container">
<view v-if="tempAccountInfo.bankImg" class="bank-img-preview">
<image
:src="tempAccountInfo.bankImg"
class="bank-img-image"
mode="aspectFill"
@tap="previewBankImg"
/>
<image :src="tempAccountInfo.bankImg" class="bank-img-image" mode="aspectFill" @tap="previewBankImg" />
<view class="bank-img-actions">
<text class="change-img-btn" @tap="changeBankImg">重新上传</text>
<text class="delete-img-btn" @tap="deleteBankImg">删除</text>
......@@ -103,20 +90,12 @@
</view>
<view class="modal-footer">
<nut-button
type="default"
@click="closeAccountModal"
class="footer-btn footer-btn-cancel"
>
<nut-button type="default" @click="closeAccountModal" class="footer-btn footer-btn-cancel">
关闭
</nut-button>
<nut-button
type="primary"
@click="saveAccountInfo"
color="#ffa500"
<nut-button type="primary" @click="saveAccountInfo" color="#ffa500"
:disabled="!tempAccountInfo.bankName || !tempAccountInfo.bankAccount || !tempAccountInfo.bankImg"
class="footer-btn footer-btn-save"
>
class="footer-btn footer-btn-save">
保存
</nut-button>
</view>
......@@ -124,29 +103,14 @@
</nut-popup>
<!-- 银行选择器弹窗 -->
<nut-popup
v-model:visible="showBankModal"
position="bottom"
>
<nut-picker
v-model="bankPickerValue"
:columns="bankOptions"
title="选择银行"
@confirm="onBankConfirm"
@cancel="showBankModal = false"
></nut-picker>
<nut-popup v-model:visible="showBankModal" position="bottom">
<nut-picker v-model="bankPickerValue" :columns="bankOptions" title="选择银行" @confirm="onBankConfirm"
@cancel="showBankModal = false"></nut-picker>
</nut-popup>
<!-- 身份信息弹窗 -->
<nut-popup
v-model:visible="showIdentityModal"
position="bottom"
:style="{ width: '100%', height: '85%' }"
:close-on-click-overlay="false"
closeable
close-icon-position="top-right"
@close="closeIdentityModal"
>
<nut-popup v-model:visible="showIdentityModal" position="bottom" :style="{ width: '100%', height: '85%' }"
:close-on-click-overlay="false" closeable close-icon-position="top-right" @close="closeIdentityModal">
<view class="modal-content">
<view class="modal-header">
<text class="modal-title">身份信息设置</text>
......@@ -155,23 +119,13 @@
<view class="form-content">
<view class="form-item">
<text class="form-label"><text class="required-mark">*</text>用户名称</text>
<input
v-model="tempIdentityInfo.userName"
placeholder="请输入真实姓名"
class="form-input native-input"
/>
<input v-model="tempIdentityInfo.userName" placeholder="请输入真实姓名" class="form-input native-input" />
</view>
<view class="form-item">
<text class="form-label"><text class="required-mark">*</text>身份证号码</text>
<input
v-model="tempIdentityInfo.idCard"
placeholder="请输入身份证号码"
class="form-input native-input"
maxlength="18"
@blur="handleIdCardBlur"
:cursor-spacing="50"
/>
<input v-model="tempIdentityInfo.idCard" placeholder="请输入身份证号码" class="form-input native-input"
maxlength="18" @blur="handleIdCardBlur" :cursor-spacing="50" />
<text v-if="idCardError" class="error-text">{{ idCardError }}</text>
</view>
......@@ -180,12 +134,8 @@
<text class="form-label"><text class="required-mark">*</text>身份证人像面</text>
<view class="idcard-img-container">
<view v-if="tempIdentityInfo.idcard_1_img" class="idcard-img-preview">
<image
:src="tempIdentityInfo.idcard_1_img"
class="idcard-img-image"
mode="aspectFill"
@tap="previewIdcard1Img"
/>
<image :src="tempIdentityInfo.idcard_1_img" class="idcard-img-image" mode="aspectFill"
@tap="previewIdcard1Img" />
<view class="idcard-img-actions">
<text class="change-img-btn" @tap="changeIdcard1Img">重新上传</text>
<text class="delete-img-btn" @tap="deleteIdcard1Img">删除</text>
......@@ -203,12 +153,8 @@
<text class="form-label"><text class="required-mark">*</text>身份证国徽面</text>
<view class="idcard-img-container">
<view v-if="tempIdentityInfo.idcard_2_img" class="idcard-img-preview">
<image
:src="tempIdentityInfo.idcard_2_img"
class="idcard-img-image"
mode="aspectFill"
@tap="previewIdcard2Img"
/>
<image :src="tempIdentityInfo.idcard_2_img" class="idcard-img-image" mode="aspectFill"
@tap="previewIdcard2Img" />
<view class="idcard-img-actions">
<text class="change-img-btn" @tap="changeIdcard2Img">重新上传</text>
<text class="delete-img-btn" @tap="deleteIdcard2Img">删除</text>
......@@ -248,30 +194,18 @@
<!-- 身份证地址 -->
<view class="form-item">
<text class="form-label"><text class="required-mark">*</text>身份证地址</text>
<textarea
v-model="tempIdentityInfo.idcard_address"
placeholder="请输入身份证地址"
class="form-input native-input"
:cursor-spacing="50"
/>
<textarea v-model="tempIdentityInfo.idcard_address" placeholder="请输入身份证地址" class="form-input native-input"
:cursor-spacing="50" />
</view>
</view>
<view class="modal-footer">
<nut-button
type="default"
@click="closeIdentityModal"
class="footer-btn footer-btn-cancel"
>
<nut-button type="default" @click="closeIdentityModal" class="footer-btn footer-btn-cancel">
关闭
</nut-button>
<nut-button
type="primary"
@click="saveIdentityInfo"
color="#ffa500"
<nut-button type="primary" @click="saveIdentityInfo" color="#ffa500"
:disabled="!tempIdentityInfo.userName || !tempIdentityInfo.idCard || !tempIdentityInfo.idcard_1_img || !tempIdentityInfo.idcard_2_img || !tempIdentityInfo.idcard_effect_begin || !tempIdentityInfo.idcard_effect_end || !tempIdentityInfo.idcard_address || !!idCardError"
class="footer-btn footer-btn-save"
>
class="footer-btn footer-btn-save">
保存
</nut-button>
</view>
......@@ -279,51 +213,21 @@
</nut-popup>
<!-- 身份证有效期开始日期选择器 -->
<nut-popup
v-model:visible="showIdcardBeginDate"
position="bottom"
:style="{ height: '50%' }"
>
<nut-date-picker
v-model="idcardBeginDate"
type="date"
title="选择证件有效期开始日期"
:max-date="maxYearDate"
:min-date="minYearDate"
@confirm="onIdcardBeginDateConfirm"
@cancel="showIdcardBeginDate = false"
/>
<nut-popup v-model:visible="showIdcardBeginDate" position="bottom" :style="{ height: '50%' }">
<nut-date-picker v-model="idcardBeginDate" type="date" title="选择证件有效期开始日期" :max-date="maxYearDate"
:min-date="minYearDate" @confirm="onIdcardBeginDateConfirm" @cancel="showIdcardBeginDate = false" />
</nut-popup>
<!-- 证件有效期结束类型选择器弹窗 -->
<nut-popup
v-model:visible="showEndDateTypeModal"
position="bottom"
>
<nut-picker
v-model="endDateTypePickerValue"
:columns="endDateTypeOptions"
title="选择证件有效期类型"
@confirm="onEndDateTypeConfirm"
@cancel="showEndDateTypeModal = false"
></nut-picker>
<nut-popup v-model:visible="showEndDateTypeModal" position="bottom">
<nut-picker v-model="endDateTypePickerValue" :columns="endDateTypeOptions" title="选择证件有效期类型"
@confirm="onEndDateTypeConfirm" @cancel="showEndDateTypeModal = false"></nut-picker>
</nut-popup>
<!-- 身份证有效期结束日期选择器 -->
<nut-popup
v-model:visible="showIdcardEndDate"
position="bottom"
:style="{ height: '50%' }"
>
<nut-date-picker
v-model="idcardEndDate"
type="date"
title="选择证件有效期结束日期"
:max-date="maxYearDate"
:min-date="minYearDate"
@confirm="onIdcardEndDateConfirm"
@cancel="showIdcardEndDate = false"
/>
<nut-popup v-model:visible="showIdcardEndDate" position="bottom" :style="{ height: '50%' }">
<nut-date-picker v-model="idcardEndDate" type="date" title="选择证件有效期结束日期" :max-date="maxYearDate"
:min-date="minYearDate" @confirm="onIdcardEndDateConfirm" @cancel="showIdcardEndDate = false" />
</nut-popup>
<!-- 固定返回按钮 - 只有当参数target=sell时才显示 -->
......@@ -602,15 +506,15 @@ const validateBankAccountNumber = (bankAccount) => {
/**
* 处理银行账号失焦事件
*/
const validateBankAccount = () => {
const bankAccount = tempAccountInfo.value.bankAccount;
if (bankAccount) {
const result = validateBankAccountNumber(String(bankAccount));
bankAccountError.value = result.error;
} else {
bankAccountError.value = '';
}
};
const validateBankAccount = () => {
const bankAccount = tempAccountInfo.value.bankAccount;
if (bankAccount) {
const result = validateBankAccountNumber(String(bankAccount));
bankAccountError.value = result.error;
} else {
bankAccountError.value = '';
}
};
/**
* 根据银行ID获取银行名称
......