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