Commit 57e4b125 authored by Bill's avatar Bill

Merge branch 'fix-v2-220418' into 'v2-220418'

fix: 修复会员拜访相关bug See merge request linkseeks-design/pro-platform!142
parents 6c107f3a b5857171
...@@ -10,7 +10,7 @@ import { createFormActions } from '@formily/antd'; ...@@ -10,7 +10,7 @@ import { createFormActions } from '@formily/antd';
import moment from 'moment'; import moment from 'moment';
import { import {
GetMemberVisitListResponseDetail, GetMemberVisitListResponseDetail,
// getMemberVisitDelete, postMemberVisitDelete,
getMemberVisitList, getMemberVisitList,
getMemberVisitVisitTypeItems, getMemberVisitVisitTypeItems,
} from '@/services/MemberV2Api'; } from '@/services/MemberV2Api';
...@@ -44,24 +44,24 @@ const MemberVisitManageIndex: React.FC<{}> = props => { ...@@ -44,24 +44,24 @@ const MemberVisitManageIndex: React.FC<{}> = props => {
}; };
const handleDeleteMemberVisitRecord = (record: GetMemberVisitListRequestResponse) => { const handleDeleteMemberVisitRecord = (record: GetMemberVisitListRequestResponse) => {
// if (record.id === deleteLoadingKey) { if (record.id === deleteLoadingKey) {
// return; return;
// } }
// const msg = message.loading({ const msg = message.loading({
// content: '正在删除,请稍候...', content: '正在删除,请稍候...',
// duration: 0, duration: 0,
// }); });
// setDeleteLoadingKey(record.id); setDeleteLoadingKey(record.id);
// getMemberVisitDelete({ postMemberVisitDelete({
// id: `${record.id}`, id: record.id,
// }).then((res) => { }).then((res) => {
// if (res.code === 1000) { if (res.code === 1000) {
// polymericRef.current?.reload(); polymericRef.current?.reload();
// } }
// }).finally(() => { }).finally(() => {
// msg(); msg();
// setDeleteLoadingKey(0); setDeleteLoadingKey(0);
// }); });
}; };
const columns: ColumnType<GetMemberVisitListRequestResponse>[] = [ const columns: ColumnType<GetMemberVisitListRequestResponse>[] = [
......
...@@ -21,11 +21,11 @@ const MemberVisitDetails: React.FC<{}> = (props) => { ...@@ -21,11 +21,11 @@ const MemberVisitDetails: React.FC<{}> = (props) => {
id: id, id: id,
}).then((res) => { }).then((res) => {
if (res.code === 1000) { if (res.code === 1000) {
const { memberId, visitorId, visitDate, visitAttachments, ...rest } = res.data; const { memberId, visitorId, visitor, visitDate, visitAttachments, ...rest } = res.data;
setMemberLevelDetails({ setMemberLevelDetails({
...rest, ...rest,
subMember: [{ memberId: memberId, name: rest.memberName }] as any[], subMember: [{ memberId: memberId, name: rest.memberName }] as any[],
visitorMember: [{ userId: visitorId }] as any[], visitorMember: [{ userId: visitorId, name: visitor }] as any[],
visitDate: moment(visitDate).format('YYYY-MM-DD'), visitDate: moment(visitDate).format('YYYY-MM-DD'),
files: visitAttachments ? visitAttachments.map((item) => normalizeFiledata(item.url)) : [], files: visitAttachments ? visitAttachments.map((item) => normalizeFiledata(item.url)) : [],
}); });
......
...@@ -22,11 +22,11 @@ const ModifyMemberVisit: React.FC<{}> = (props) => { ...@@ -22,11 +22,11 @@ const ModifyMemberVisit: React.FC<{}> = (props) => {
id: id, id: id,
}).then((res) => { }).then((res) => {
if (res.code === 1000) { if (res.code === 1000) {
const { memberId, visitorId, visitDate, visitAttachments, ...rest } = res.data; const { memberId, visitorId, visitor, visitDate, visitAttachments, ...rest } = res.data;
setMemberLevelDetails({ setMemberLevelDetails({
...rest, ...rest,
subMember: [{ memberId: memberId, name: rest.memberName }] as any[], subMember: [{ memberId: memberId, name: rest.memberName }] as any[],
visitorMember: [{ userId: visitorId }] as any[], visitorMember: [{ userId: visitorId, name: visitor }] as any[],
visitDate: moment(visitDate).format('YYYY-MM-DD'), visitDate: moment(visitDate).format('YYYY-MM-DD'),
files: visitAttachments ? visitAttachments.map((item) => normalizeFiledata(item.url)) : [], files: visitAttachments ? visitAttachments.map((item) => normalizeFiledata(item.url)) : [],
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment