修复更新客户信息时证件号必填问题
This commit is contained in:
@@ -514,10 +514,12 @@ export type DaojiandanPrintStatusResponse = CommonActionResult<OutputDaojiandanP
|
||||
* 客户信息编辑入参
|
||||
*/
|
||||
export interface InputCustomerDetailEdit {
|
||||
/** 证件号(必填) */
|
||||
id_no: string;
|
||||
/** 婚姻状况(10-未婚 20-已婚) */
|
||||
marital_status: number;
|
||||
marital_status?: number;
|
||||
/** 联系电话 */
|
||||
phone: string;
|
||||
phone?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -89,12 +89,19 @@ export const ExamDetailPanel = ({
|
||||
return;
|
||||
}
|
||||
|
||||
const idNo = customerInfo?.id_no;
|
||||
if (!idNo) {
|
||||
setEditMessage('无法获取证件号,请稍后重试');
|
||||
return;
|
||||
}
|
||||
|
||||
setEditLoading(true);
|
||||
setEditMessage(null);
|
||||
|
||||
try {
|
||||
const res = await editCustomerDetail({
|
||||
marital_status: maritalCode,
|
||||
id_no: idNo,
|
||||
phone: phone.trim(),
|
||||
});
|
||||
|
||||
@@ -114,10 +121,9 @@ export const ExamDetailPanel = ({
|
||||
};
|
||||
|
||||
const handleSaveMarital = async () => {
|
||||
const phoneValue = phone === '—' ? '' : phone.trim();
|
||||
|
||||
if (!phoneValue) {
|
||||
setEditMessage('联系电话不能为空');
|
||||
const idNo = customerInfo?.id_no;
|
||||
if (!idNo) {
|
||||
setEditMessage('无法获取证件号,请稍后重试');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,8 +132,9 @@ export const ExamDetailPanel = ({
|
||||
|
||||
try {
|
||||
const res = await editCustomerDetail({
|
||||
id_no: idNo,
|
||||
phone: phone.trim(),
|
||||
marital_status: maritalCode,
|
||||
phone: phoneValue,
|
||||
});
|
||||
|
||||
if (res.Status === 200) {
|
||||
|
||||
Reference in New Issue
Block a user