feat(huifu): 支持汇付进件通过后更换结算银行卡
- 用户端及后台管理端新增更换结算卡接口与页面交互 - 服务层实现换卡核心逻辑、参数校验及汇付接口调用 - 增加换卡异步通知处理与定时轮询补偿以同步审核状态 - 完善进件状态网关,补充换卡审核状态及驳回原因等字段
这个提交包含在:
@@ -6,7 +6,7 @@
|
||||
<view class="huifu-badge">汇付</view>
|
||||
<view class="huifu-head-text">
|
||||
<view class="section-title">绑定银行卡</view>
|
||||
<view class="tip">填写开户资料,先由平台审核,通过后再提交汇付</view>
|
||||
<view class="tip">{{ formTipText }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="status-pill" v-if="statusInfo && statusInfo.status" :class="'is-' + statusInfo.status">
|
||||
@@ -21,7 +21,7 @@
|
||||
class="type-item"
|
||||
v-for="item in accountTypeOptions"
|
||||
:key="item.value"
|
||||
:class="{ active: form.account_type === item.value, disabled: readonly }"
|
||||
:class="{ active: form.account_type === item.value, disabled: identityReadonly }"
|
||||
@tap="setAccountType(item.value)"
|
||||
>
|
||||
<text class="type-check">{{ form.account_type === item.value ? '✓' : '' }}</text>
|
||||
@@ -36,19 +36,19 @@
|
||||
<view class="field" id="field-name" :class="{ 'is-error': fieldErrors.name }">
|
||||
<text class="field-label required">真实姓名</text>
|
||||
<text class="field-hint">银行卡绑定的用户姓名</text>
|
||||
<input class="field-input" v-model="form.name" placeholder="请输入真实姓名" placeholder-class="ph" :disabled="readonly" @input="clearError('name')" />
|
||||
<input class="field-input" v-model="form.name" placeholder="请输入真实姓名" placeholder-class="ph" :disabled="identityReadonly" @input="clearError('name')" />
|
||||
<text class="field-error" v-if="fieldErrors.name">{{ fieldErrors.name }}</text>
|
||||
</view>
|
||||
<view class="field" id="field-cert_no" :class="{ 'is-error': fieldErrors.cert_no }">
|
||||
<text class="field-label required">身份证号</text>
|
||||
<text class="field-hint">18 位二代身份证号码</text>
|
||||
<input class="field-input" v-model="form.cert_no" maxlength="18" placeholder="请输入身份证号" placeholder-class="ph" :disabled="readonly" @input="clearError('cert_no')" />
|
||||
<input class="field-input" v-model="form.cert_no" maxlength="18" placeholder="请输入身份证号" placeholder-class="ph" :disabled="identityReadonly" @input="clearError('cert_no')" />
|
||||
<text class="field-error" v-if="fieldErrors.cert_no">{{ fieldErrors.cert_no }}</text>
|
||||
</view>
|
||||
<view class="field" id="field-cert_end_date" :class="{ 'is-error': fieldErrors.cert_end_date }">
|
||||
<text class="field-label required">身份证有效期至</text>
|
||||
<text class="field-hint">长期有效请选择 2099-12-31</text>
|
||||
<picker mode="date" :value="certEndPickerValue" @change="onCertEndChange" :disabled="readonly">
|
||||
<picker mode="date" :value="certEndPickerValue" @change="onCertEndChange" :disabled="identityReadonly">
|
||||
<view class="field-input is-picker">
|
||||
<text :class="{ ph: !form.cert_end_date }">{{ certEndDisplay || '请选择日期' }}</text>
|
||||
<text class="arrow">›</text>
|
||||
@@ -66,18 +66,18 @@
|
||||
</view>
|
||||
<view class="field" id="field-reg_detail" :class="{ 'is-error': fieldErrors.reg_detail }">
|
||||
<text class="field-label required">详细地址</text>
|
||||
<input class="field-input" v-model="form.reg_detail" placeholder="请输入详细居住地址" placeholder-class="ph" :disabled="readonly" @input="clearError('reg_detail')" />
|
||||
<input class="field-input" v-model="form.reg_detail" placeholder="请输入详细居住地址" placeholder-class="ph" :disabled="identityReadonly" @input="clearError('reg_detail')" />
|
||||
<text class="field-error" v-if="fieldErrors.reg_detail">{{ fieldErrors.reg_detail }}</text>
|
||||
</view>
|
||||
<view class="upload-grid">
|
||||
<view class="upload-cell" id="field-id_card_front_url" :class="{ 'is-error': fieldErrors.id_card_front_url }">
|
||||
<text class="upload-label required">身份证人像面</text>
|
||||
<u-upload :file-list="frontList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!readonly" :disabled="readonly" @on-success="onFrontSuccess" @on-uploaded="onFrontUploaded" @on-error="onUploadError('id_card_front_url', '身份证人像面')" @on-remove="onFrontRemoved"></u-upload>
|
||||
<u-upload :file-list="frontList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!identityReadonly" :disabled="identityReadonly" @on-success="onFrontSuccess" @on-uploaded="onFrontUploaded" @on-error="onUploadError('id_card_front_url', '身份证人像面')" @on-remove="onFrontRemoved"></u-upload>
|
||||
<text class="field-error" v-if="fieldErrors.id_card_front_url">{{ fieldErrors.id_card_front_url }}</text>
|
||||
</view>
|
||||
<view class="upload-cell" id="field-id_card_back_url" :class="{ 'is-error': fieldErrors.id_card_back_url }">
|
||||
<text class="upload-label required">身份证国徽面</text>
|
||||
<u-upload :file-list="backList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!readonly" :disabled="readonly" @on-success="onBackSuccess" @on-uploaded="onBackUploaded" @on-error="onUploadError('id_card_back_url', '身份证国徽面')" @on-remove="onBackRemoved"></u-upload>
|
||||
<u-upload :file-list="backList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!identityReadonly" :disabled="identityReadonly" @on-success="onBackSuccess" @on-uploaded="onBackUploaded" @on-error="onUploadError('id_card_back_url', '身份证国徽面')" @on-remove="onBackRemoved"></u-upload>
|
||||
<text class="field-error" v-if="fieldErrors.id_card_back_url">{{ fieldErrors.id_card_back_url }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -89,18 +89,18 @@
|
||||
<view class="field" id="field-reg_name" :class="{ 'is-error': fieldErrors.reg_name }">
|
||||
<text class="field-label required">商户名称</text>
|
||||
<text class="field-hint">请输入营业执照上的名称</text>
|
||||
<input class="field-input" v-model="form.reg_name" placeholder="请输入商户名称" placeholder-class="ph" :disabled="readonly" @input="clearError('reg_name')" />
|
||||
<input class="field-input" v-model="form.reg_name" placeholder="请输入商户名称" placeholder-class="ph" :disabled="identityReadonly" @input="clearError('reg_name')" />
|
||||
<text class="field-error" v-if="fieldErrors.reg_name">{{ fieldErrors.reg_name }}</text>
|
||||
</view>
|
||||
<view class="field" id="field-license_code" :class="{ 'is-error': fieldErrors.license_code }">
|
||||
<text class="field-label required">统一社会信用代码</text>
|
||||
<input class="field-input" v-model="form.license_code" maxlength="18" placeholder="请输入统一社会信用代码" placeholder-class="ph" :disabled="readonly" @input="clearError('license_code')" />
|
||||
<input class="field-input" v-model="form.license_code" maxlength="18" placeholder="请输入统一社会信用代码" placeholder-class="ph" :disabled="identityReadonly" @input="clearError('license_code')" />
|
||||
<text class="field-error" v-if="fieldErrors.license_code">{{ fieldErrors.license_code }}</text>
|
||||
</view>
|
||||
<view class="field" id="field-license_end_date" :class="{ 'is-error': fieldErrors.license_end_date }">
|
||||
<text class="field-label required">统一社会信用代码有效期</text>
|
||||
<text class="field-hint">长期有效请选择 2099-12-31</text>
|
||||
<picker mode="date" :value="licenseEndPickerValue" @change="onLicenseEndChange" :disabled="readonly">
|
||||
<picker mode="date" :value="licenseEndPickerValue" @change="onLicenseEndChange" :disabled="identityReadonly">
|
||||
<view class="field-input is-picker">
|
||||
<text :class="{ ph: !form.license_end_date }">{{ licenseEndDisplay || '请选择日期' }}</text>
|
||||
<text class="arrow">›</text>
|
||||
@@ -118,27 +118,27 @@
|
||||
</view>
|
||||
<view class="field" id="field-ent-reg_detail" :class="{ 'is-error': fieldErrors.reg_detail }">
|
||||
<text class="field-label required">企业地址</text>
|
||||
<input class="field-input" v-model="form.reg_detail" placeholder="请输入企业经营地址" placeholder-class="ph" :disabled="readonly" @input="clearError('reg_detail')" />
|
||||
<input class="field-input" v-model="form.reg_detail" placeholder="请输入企业经营地址" placeholder-class="ph" :disabled="identityReadonly" @input="clearError('reg_detail')" />
|
||||
<text class="field-error" v-if="fieldErrors.reg_detail">{{ fieldErrors.reg_detail }}</text>
|
||||
</view>
|
||||
<view class="field" id="field-legal_name" :class="{ 'is-error': fieldErrors.legal_name }">
|
||||
<text class="field-label required">法人姓名</text>
|
||||
<input class="field-input" v-model="form.legal_name" placeholder="请输入法人姓名" placeholder-class="ph" :disabled="readonly" @input="clearError('legal_name')" />
|
||||
<input class="field-input" v-model="form.legal_name" placeholder="请输入法人姓名" placeholder-class="ph" :disabled="identityReadonly" @input="clearError('legal_name')" />
|
||||
<text class="field-error" v-if="fieldErrors.legal_name">{{ fieldErrors.legal_name }}</text>
|
||||
</view>
|
||||
<view class="field" id="field-legal_mobile" :class="{ 'is-error': fieldErrors.legal_mobile }">
|
||||
<text class="field-label required">法人手机号</text>
|
||||
<input class="field-input" v-model="form.legal_mobile" type="number" maxlength="11" placeholder="请输入法人手机号" placeholder-class="ph" :disabled="readonly" @input="clearError('legal_mobile')" />
|
||||
<input class="field-input" v-model="form.legal_mobile" type="number" maxlength="11" placeholder="请输入法人手机号" placeholder-class="ph" :disabled="identityReadonly" @input="clearError('legal_mobile')" />
|
||||
<text class="field-error" v-if="fieldErrors.legal_mobile">{{ fieldErrors.legal_mobile }}</text>
|
||||
</view>
|
||||
<view class="field" id="field-legal_cert_no" :class="{ 'is-error': fieldErrors.legal_cert_no }">
|
||||
<text class="field-label required">法人身份证号</text>
|
||||
<input class="field-input" v-model="form.legal_cert_no" maxlength="18" placeholder="请输入法人身份证号" placeholder-class="ph" :disabled="readonly" @input="clearError('legal_cert_no')" />
|
||||
<input class="field-input" v-model="form.legal_cert_no" maxlength="18" placeholder="请输入法人身份证号" placeholder-class="ph" :disabled="identityReadonly" @input="clearError('legal_cert_no')" />
|
||||
<text class="field-error" v-if="fieldErrors.legal_cert_no">{{ fieldErrors.legal_cert_no }}</text>
|
||||
</view>
|
||||
<view class="field" id="field-legal_cert_end_date" :class="{ 'is-error': fieldErrors.legal_cert_end_date }">
|
||||
<text class="field-label required">法人身份证有效期</text>
|
||||
<picker mode="date" :value="legalCertEndPickerValue" @change="onLegalCertEndChange" :disabled="readonly">
|
||||
<picker mode="date" :value="legalCertEndPickerValue" @change="onLegalCertEndChange" :disabled="identityReadonly">
|
||||
<view class="field-input is-picker">
|
||||
<text :class="{ ph: !form.legal_cert_end_date }">{{ legalCertEndDisplay || '请选择日期' }}</text>
|
||||
<text class="arrow">›</text>
|
||||
@@ -149,17 +149,17 @@
|
||||
<view class="upload-grid">
|
||||
<view class="upload-cell" id="field-license_url" :class="{ 'is-error': fieldErrors.license_url }">
|
||||
<text class="upload-label required">营业执照照片</text>
|
||||
<u-upload :file-list="licenseList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!readonly" :disabled="readonly" @on-success="onLicenseSuccess" @on-uploaded="onLicenseUploaded" @on-remove="onLicenseRemoved"></u-upload>
|
||||
<u-upload :file-list="licenseList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!identityReadonly" :disabled="identityReadonly" @on-success="onLicenseSuccess" @on-uploaded="onLicenseUploaded" @on-remove="onLicenseRemoved"></u-upload>
|
||||
<text class="field-error" v-if="fieldErrors.license_url">{{ fieldErrors.license_url }}</text>
|
||||
</view>
|
||||
<view class="upload-cell" id="field-legal_id_front_url" :class="{ 'is-error': fieldErrors.legal_id_front_url }">
|
||||
<text class="upload-label required">法人身份证人像面</text>
|
||||
<u-upload :file-list="legalFrontList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!readonly" :disabled="readonly" @on-success="onLegalFrontSuccess" @on-uploaded="onLegalFrontUploaded" @on-remove="onLegalFrontRemoved"></u-upload>
|
||||
<u-upload :file-list="legalFrontList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!identityReadonly" :disabled="identityReadonly" @on-success="onLegalFrontSuccess" @on-uploaded="onLegalFrontUploaded" @on-remove="onLegalFrontRemoved"></u-upload>
|
||||
<text class="field-error" v-if="fieldErrors.legal_id_front_url">{{ fieldErrors.legal_id_front_url }}</text>
|
||||
</view>
|
||||
<view class="upload-cell" id="field-legal_id_back_url" :class="{ 'is-error': fieldErrors.legal_id_back_url }">
|
||||
<text class="upload-label required">法人身份证国徽面</text>
|
||||
<u-upload :file-list="legalBackList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!readonly" :disabled="readonly" @on-success="onLegalBackSuccess" @on-uploaded="onLegalBackUploaded" @on-remove="onLegalBackRemoved"></u-upload>
|
||||
<u-upload :file-list="legalBackList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!identityReadonly" :disabled="identityReadonly" @on-success="onLegalBackSuccess" @on-uploaded="onLegalBackUploaded" @on-remove="onLegalBackRemoved"></u-upload>
|
||||
<text class="field-error" v-if="fieldErrors.legal_id_back_url">{{ fieldErrors.legal_id_back_url }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -173,7 +173,7 @@
|
||||
class="type-item small"
|
||||
v-for="item in bankAccountTypeOptions"
|
||||
:key="item.value"
|
||||
:class="{ active: form.bank_account_type === item.value, disabled: readonly }"
|
||||
:class="{ active: form.bank_account_type === item.value, disabled: bankReadonly }"
|
||||
@tap="setBankAccountType(item.value)"
|
||||
>
|
||||
<text class="type-check">{{ form.bank_account_type === item.value ? '✓' : '' }}</text>
|
||||
@@ -183,14 +183,14 @@
|
||||
<view class="field" id="field-card_no" :class="{ 'is-error': fieldErrors.card_no }">
|
||||
<text class="field-label required">结算账户银行卡号</text>
|
||||
<text class="field-hint">分成资金到账银行卡号,须为一类借记卡</text>
|
||||
<input class="field-input" v-model="form.card_no" type="number" placeholder="请输入结算银行卡号" placeholder-class="ph" :disabled="readonly" @input="clearError('card_no')" />
|
||||
<input class="field-input" v-model="form.card_no" type="number" placeholder="请输入结算银行卡号" placeholder-class="ph" :disabled="bankReadonly" @input="onCardNoInput" />
|
||||
<text class="field-error" v-if="fieldErrors.card_no">{{ fieldErrors.card_no }}</text>
|
||||
</view>
|
||||
<view class="field" id="field-branch_name" :class="{ 'is-error': fieldErrors.branch_name }">
|
||||
<text class="field-label required">开户银行名称</text>
|
||||
<text class="field-hint">搜索支行名称,系统将自动匹配联行号</text>
|
||||
<input class="field-input" v-model="branchKeyword" placeholder="例如:农业银行贵阳总府支行" placeholder-class="ph" :disabled="readonly" @input="onBranchInput" @focus="onBranchInput" />
|
||||
<view class="branch-panel" v-if="branchResults.length && !readonly">
|
||||
<input class="field-input" v-model="branchKeyword" placeholder="例如:农业银行贵阳总府支行" placeholder-class="ph" :disabled="bankReadonly" @input="onBranchInput" @focus="onBranchInput" />
|
||||
<view class="branch-panel" v-if="branchResults.length && !bankReadonly">
|
||||
<view class="branch-item" v-for="(item, idx) in branchResults" :key="idx" @tap="selectBranch(item)">
|
||||
<text class="branch-name">{{ item.branch_name }}</text>
|
||||
<text class="branch-code">{{ item.branch_code }}</text>
|
||||
@@ -207,23 +207,24 @@
|
||||
<view class="field" v-if="form.account_type === 'indv' || (form.account_type === 'ent' && form.bank_account_type === '0')" id="field-mobile_no" :class="{ 'is-error': fieldErrors.mobile_no }">
|
||||
<text class="field-label required">{{ form.account_type === 'ent' ? '手机号' : '手机号' }}</text>
|
||||
<text class="field-hint">银行卡开户预留的手机号</text>
|
||||
<input class="field-input" v-model="bankMobile" type="number" maxlength="11" placeholder="请输入银行预留手机号" placeholder-class="ph" :disabled="readonly" @input="clearError('mobile_no')" />
|
||||
<input class="field-input" v-model="bankMobile" type="number" maxlength="11" placeholder="请输入银行预留手机号" placeholder-class="ph" :disabled="bankReadonly" @input="clearError('mobile_no')" />
|
||||
<text class="field-error" v-if="fieldErrors.mobile_no">{{ fieldErrors.mobile_no }}</text>
|
||||
</view>
|
||||
<view class="field upload-bank">
|
||||
<text class="field-label">银行卡正面照</text>
|
||||
<text class="field-hint">建议上传,可加快审核</text>
|
||||
<u-upload :file-list="bankList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!readonly" :disabled="readonly" @on-success="onBankSuccess" @on-uploaded="onBankUploaded" @on-remove="onBankRemoved"></u-upload>
|
||||
<text class="field-label" :class="{ required: editMode === 'bank_only' }">银行卡正面照</text>
|
||||
<text class="field-hint">{{ editMode === 'bank_only' ? '更换卡号时请重新上传银行卡照片' : '建议上传,可加快审核' }}</text>
|
||||
<u-upload :file-list="bankList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!bankReadonly" :disabled="bankReadonly" @on-success="onBankSuccess" @on-uploaded="onBankUploaded" @on-remove="onBankRemoved"></u-upload>
|
||||
<text class="field-error" v-if="fieldErrors.bank_card_url">{{ fieldErrors.bank_card_url }}</text>
|
||||
</view>
|
||||
<view class="field upload-bank" v-if="form.account_type === 'ent' && form.bank_account_type === '1'">
|
||||
<text class="field-label required">开户许可证/基本户证明</text>
|
||||
<u-upload :file-list="permitList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!readonly" :disabled="readonly" @on-success="onPermitSuccess" @on-uploaded="onPermitUploaded" @on-remove="onPermitRemoved"></u-upload>
|
||||
<u-upload :file-list="permitList" :action="`${$API_URL}/index/upload`" :header="uploadHeader" maxCount="1" width="200" height="140" :deletable="!bankReadonly" :disabled="bankReadonly" @on-success="onPermitSuccess" @on-uploaded="onPermitUploaded" @on-remove="onPermitRemoved"></u-upload>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="reject-box" v-if="statusInfo && statusInfo.reject_reason">
|
||||
<text class="reject-label">驳回原因</text>
|
||||
<text class="reject-text">{{ statusInfo.reject_reason }}</text>
|
||||
<view class="reject-box" v-if="statusInfo && (statusInfo.reject_reason || statusInfo.card_modify_reject_reason)">
|
||||
<text class="reject-label">{{ statusInfo.card_modify_reject_reason ? '换卡驳回原因' : '驳回原因' }}</text>
|
||||
<text class="reject-text">{{ statusInfo.card_modify_reject_reason || statusInfo.reject_reason }}</text>
|
||||
</view>
|
||||
|
||||
<u-select mode="mutil-column-auto" safe-area-inset-bottom :list="addressAreaList" v-model="showRegionSelect" @confirm="onRegionConfirm"></u-select>
|
||||
@@ -236,7 +237,9 @@ export default {
|
||||
props: {
|
||||
required: { type: Boolean, default: false },
|
||||
statusInfo: { type: Object, default: () => ({}) },
|
||||
readonly: { type: Boolean, default: false }
|
||||
readonly: { type: Boolean, default: false },
|
||||
/** full=完整进件;bank_only=仅更换结算卡 */
|
||||
editMode: { type: String, default: 'full' }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -248,6 +251,7 @@ export default {
|
||||
{ label: '对公', value: '1' },
|
||||
{ label: '对私', value: '0' }
|
||||
],
|
||||
originalCardNo: '',
|
||||
form: {
|
||||
account_type: 'indv',
|
||||
bank_account_type: '0',
|
||||
@@ -308,6 +312,18 @@ export default {
|
||||
uploadHeader() {
|
||||
return { token: uni.getStorageSync('token') || '' };
|
||||
},
|
||||
identityReadonly() {
|
||||
return this.readonly || this.editMode === 'bank_only';
|
||||
},
|
||||
bankReadonly() {
|
||||
return this.readonly;
|
||||
},
|
||||
formTipText() {
|
||||
if (this.editMode === 'bank_only') {
|
||||
return '进件已通过,可修改结算银行卡信息后提交更换';
|
||||
}
|
||||
return '填写开户资料,先由平台审核,通过后再提交汇付';
|
||||
},
|
||||
bankMobile: {
|
||||
get() {
|
||||
return this.form.account_type === 'ent' ? this.form.legal_mobile : this.form.mobile_no;
|
||||
@@ -340,10 +356,49 @@ export default {
|
||||
return this.displayDate(this.form.legal_cert_end_date);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
statusInfo: {
|
||||
immediate: true,
|
||||
deep: true,
|
||||
handler(val) {
|
||||
if (val && val.draft) {
|
||||
this.applyDraft(val.draft);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadArea();
|
||||
},
|
||||
methods: {
|
||||
applyDraft(draft) {
|
||||
if (!draft || typeof draft !== 'object') return;
|
||||
Object.keys(this.form).forEach(key => {
|
||||
if (draft[key] !== undefined && draft[key] !== null && draft[key] !== '') {
|
||||
this.form[key] = draft[key];
|
||||
}
|
||||
});
|
||||
this.originalCardNo = String(this.form.card_no || '').replace(/\s+/g, '');
|
||||
if (draft.branch_name) {
|
||||
this.branchKeyword = draft.branch_name;
|
||||
}
|
||||
const setList = (url, listKey) => {
|
||||
if (url) this[listKey] = [{ url }];
|
||||
};
|
||||
setList(this.form.id_card_front_url, 'frontList');
|
||||
setList(this.form.id_card_back_url, 'backList');
|
||||
setList(this.form.license_url, 'licenseList');
|
||||
setList(this.form.legal_id_front_url, 'legalFrontList');
|
||||
setList(this.form.legal_id_back_url, 'legalBackList');
|
||||
setList(this.form.bank_card_url, 'bankList');
|
||||
setList(this.form.account_permit_url, 'permitList');
|
||||
if (draft.shopro_province_id || draft.prov_id) {
|
||||
// 区域文案在无完整省市区树时先用编码占位,用户可重选支行补齐
|
||||
if (!this.regionText) {
|
||||
this.regionText = [draft.prov_id, draft.area_id, draft.district_id].filter(Boolean).join(' / ');
|
||||
}
|
||||
}
|
||||
},
|
||||
loadArea() {
|
||||
this.$http('address.area').then(res => {
|
||||
if (res.code !== 1) return;
|
||||
@@ -360,18 +415,18 @@ export default {
|
||||
});
|
||||
},
|
||||
setAccountType(value) {
|
||||
if (this.readonly) return;
|
||||
if (this.identityReadonly) return;
|
||||
this.form.account_type = value;
|
||||
if (value === 'indv') {
|
||||
this.form.bank_account_type = '0';
|
||||
}
|
||||
},
|
||||
setBankAccountType(value) {
|
||||
if (this.readonly) return;
|
||||
if (this.bankReadonly) return;
|
||||
this.form.bank_account_type = value;
|
||||
},
|
||||
openRegionPicker() {
|
||||
if (this.readonly) return;
|
||||
if (this.identityReadonly) return;
|
||||
if (!this.addressAreaList.length) {
|
||||
this.$u.toast('区域数据加载中,请稍候');
|
||||
return;
|
||||
@@ -414,8 +469,20 @@ export default {
|
||||
this.applyValidityByEnd('legal_cert', e.detail.value);
|
||||
this.clearError('legal_cert_end_date');
|
||||
},
|
||||
onCardNoInput() {
|
||||
this.clearError('card_no');
|
||||
if (this.editMode !== 'bank_only') return;
|
||||
const newCard = String(this.form.card_no || '').replace(/\s+/g, '');
|
||||
const oldCard = String(this.originalCardNo || '').replace(/\s+/g, '');
|
||||
if (newCard && oldCard && newCard !== oldCard) {
|
||||
// 卡号变更后必须重新上传银行卡图,避免沿用旧图
|
||||
this.form.bank_card_url = '';
|
||||
this.bankList = [];
|
||||
this.clearError('bank_card_url');
|
||||
}
|
||||
},
|
||||
onBranchInput() {
|
||||
if (this.readonly) return;
|
||||
if (this.bankReadonly) return;
|
||||
clearTimeout(this.branchTimer);
|
||||
const keyword = (this.branchKeyword || '').trim();
|
||||
if (keyword.length < 2) {
|
||||
@@ -545,13 +612,16 @@ export default {
|
||||
if (!this.required) return true;
|
||||
this.fieldErrors = {};
|
||||
const f = this.form;
|
||||
if (!f.prov_id || !f.area_id) return this.failField('prov_id', '请选择所在区域');
|
||||
if (!f.branch_code && !(this.branchKeyword || f.branch_name)) {
|
||||
return this.failField('branch_name', '请搜索并选择开户银行支行');
|
||||
}
|
||||
if (!f.branch_name && this.branchKeyword) {
|
||||
f.branch_name = this.branchKeyword.trim();
|
||||
}
|
||||
if (this.editMode === 'bank_only') {
|
||||
return this.validateBankOnly();
|
||||
}
|
||||
if (!f.prov_id || !f.area_id) return this.failField('prov_id', '请选择所在区域');
|
||||
if (f.account_type === 'indv') {
|
||||
if (!f.name) return this.failField('name', '请填写真实姓名');
|
||||
if (!f.cert_no) return this.failField('cert_no', '请填写身份证号');
|
||||
@@ -597,6 +667,30 @@ export default {
|
||||
}
|
||||
return true;
|
||||
},
|
||||
validateBankOnly() {
|
||||
const f = this.form;
|
||||
if (!f.card_no || !/^\d{12,19}$/.test(String(f.card_no).replace(/\s+/g, ''))) {
|
||||
return this.failField('card_no', '请填写正确银行卡号');
|
||||
}
|
||||
if (!f.branch_code) {
|
||||
return this.failField('branch_name', '请搜索并选择开户银行支行');
|
||||
}
|
||||
const newCard = String(f.card_no).replace(/\s+/g, '');
|
||||
const oldCard = String(this.originalCardNo || '').replace(/\s+/g, '');
|
||||
if (newCard !== oldCard && !f.bank_card_url) {
|
||||
return this.failField('bank_card_url', '更换银行卡号时请重新上传银行卡照片');
|
||||
}
|
||||
if (f.account_type === 'indv' || (f.account_type === 'ent' && f.bank_account_type === '0')) {
|
||||
const mobile = f.account_type === 'ent' ? f.legal_mobile : f.mobile_no;
|
||||
if (!mobile || !/^1\d{10}$/.test(mobile)) {
|
||||
return this.failField('mobile_no', '请填写银行预留手机号');
|
||||
}
|
||||
}
|
||||
if (f.account_type === 'ent' && f.bank_account_type === '1' && !f.account_permit_url) {
|
||||
return this.failField('account_permit_url', '对公账户请上传开户许可证');
|
||||
}
|
||||
return true;
|
||||
},
|
||||
statusText(status) {
|
||||
const map = {
|
||||
draft: '待后台审核',
|
||||
|
||||
在新工单中引用
屏蔽一个用户