提交个人开户修改

main
dqytc 2026-08-09 19:26:42 +08:00
parent 77afbc6418
commit 2d168b2a77
2 changed files with 60 additions and 6 deletions

View File

@ -10,7 +10,7 @@
:placeholder="placeholder"
style="width: 220px"
allow-clear
@update:value="$emit('update:modelValue', $event)"
@update:value="handleChange"
/>
</template>
@ -26,11 +26,21 @@ defineProps({
// "")
disabled: { type: Boolean, default: false }
})
defineEmits(['update:modelValue'])
// update:channelName:( create-draft),
// modelValue(),,
// 使 v-model ( prop attrs a-select ),
// @update:channel-name
const emit = defineEmits(['update:modelValue', 'update:channelName'])
const options = ref([])
const loading = ref(false)
function handleChange(value) {
emit('update:modelValue', value)
const opt = options.value.find((o) => o.value === value)
emit('update:channelName', opt?.name || '')
}
async function loadChannelOptions() {
loading.value = true
try {
@ -42,7 +52,7 @@ async function loadChannelOptions() {
options.value = (res.data.data.records || []).map((item) => {
const no = item.channelNo || item.enterpriseCode
const name = item.channelName || item.enterpriseName
return { label: `${no} - ${name}`, value: no }
return { label: `${no} - ${name}`, value: no, name }
})
}
} finally {

View File

@ -64,7 +64,12 @@
>
<div ref="channelSectionRef">
<a-form-item label="渠道归属" required>
<ChannelSelect v-model:model-value="channelNo" placeholder="请选择核心企业" style="width: 300px" />
<ChannelSelect
v-model:model-value="channelNo"
placeholder="请选择核心企业"
style="width: 300px"
@update:channel-name="channelName = $event"
/>
</a-form-item>
</div>
<div ref="customerSectionRef">
@ -238,6 +243,7 @@ import {
queryCardInfoApi
} from '@/api/wallet'
import { fetchPersonalCustomerDetailApi } from '@/api/customer'
import { fetchOrgListAllApi } from '@/api/system'
import { phoneValidatorRule, isValidBankCard } from '@/utils/validators'
import { showErrorModal } from '@/utils/errorModal'
import { mapOcrGender } from '@/utils/ocrMapping'
@ -249,6 +255,10 @@ const router = useRouter()
const formRef = ref(null)
const pickerRef = ref(null)
const channelNo = ref(undefined)
// :2026-08-09 create-draft channelName , ChannelSelect
// update:channel-name ( channelName, v-model
// ),
const channelName = ref('')
const agreementChecked = ref(false)
// ,( a-form-item name ,
@ -326,9 +336,27 @@ const form = reactive({
// /api/wallet-account/query-card-info ,,
// (create-draft/update ,.md)
bankName: '',
bankNo: ''
bankNo: '',
// 2026-08-09 create-draft organizationId/organizationName :
// /api/customer-info/personal/list(-detail) organizationId,organizationName ,
// id ,,
organizationId: undefined,
organizationName: ''
})
// id -> ,(" id ",
// /api/organization/list-all map,.md
// PersonalList.vue )
const orgNameMap = ref({})
async function loadOrgNameMap() {
if (Object.keys(orgNameMap.value).length) return orgNameMap.value
const res = await fetchOrgListAllApi()
if (res.data.code === 200) {
orgNameMap.value = Object.fromEntries((res.data.data || []).map((o) => [o.id, o.organizationName]))
}
return orgNameMap.value
}
const effectiveDateValue = computed(() => (form.certificateEffectiveDate ? dayjs(form.certificateEffectiveDate) : undefined))
const isLongTerm = computed(
() => !!form.certificateExpiryDate && String(form.certificateExpiryDate).startsWith(CERTIFICATE_LONG_TERM_DATE.slice(0, 10))
@ -529,6 +557,11 @@ async function handleSelectCustomer(record) {
form.gender = detail.gender
form.ethnic = detail.ethnicity
form.mobilePhone = detail.mobilePhone || form.mobilePhone
// 2026-08-09 create-draft ID/: organizationId,
// , map
form.organizationId = detail.organizationId
const orgMap = await loadOrgNameMap()
form.organizationName = orgMap[detail.organizationId] || ''
// occupation ""( job ),
// job itemValue ,
// ,
@ -560,6 +593,10 @@ async function loadDetail() {
}
const data = res.data.data || {}
channelNo.value = data.channelNo
// 2026-08-09 detail create-draft channelName/organizationName
// (detail ,.mdPart 11);
// organizationName, organizationId
channelName.value = data.channelName || ''
Object.assign(form, {
customerId: data.customerId,
customerName: data.customerName,
@ -578,8 +615,10 @@ async function loadDetail() {
mobilePhone: data.mobilePhone,
bankCardNumber: data.bankCardNumber,
bankName: data.bankName || '',
bankNo: data.bankNo || ''
bankNo: data.bankNo || '',
organizationId: data.organizationId
})
form.organizationName = data.organizationName || (await loadOrgNameMap())[data.organizationId] || ''
applyFileList(data.fileList)
detailInfo.applicationStatus = data.applicationStatus
detailInfo.failReason = data.failReason
@ -659,8 +698,13 @@ function buildSubmitPayload() {
const payload = {
accountProperty: '1',
channelNo: channelNo.value,
// 2026-08-09 CreateDraftRequest :(ChannelSelect )
// ID/(ID,)
channelName: channelName.value || undefined,
customerId: form.customerId,
customerName: form.customerName,
organizationId: form.organizationId,
organizationName: form.organizationName || undefined,
certificateType: form.certificateType,
certificateNumber: form.certificateNumber,
certificateEffectiveDate: form.certificateEffectiveDate,