Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shenshaokai
jinfa-platform
Commits
91af31aa
Commit
91af31aa
authored
Apr 29, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 同步会员能力修改分类信息分组展示
parent
28fb925b
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
462 additions
and
487 deletions
+462
-487
Item.tsx
src/pages/supplier/components/Bookmark/Item.tsx
+14
-12
index.less
src/pages/supplier/components/Bookmark/index.less
+12
-11
index.tsx
...pages/supplier/components/MemberDocIncomingInfo/index.tsx
+13
-21
index.tsx
...s/supplier/components/MemberDocIncomingInfoForm/index.tsx
+20
-24
schema.ts
...s/supplier/components/MemberDocIncomingInfoForm/schema.ts
+28
-17
index.tsx
src/pages/supplier/components/MemberProfile/index.tsx
+30
-38
memberDetailsContext.ts
src/pages/supplier/memberDetailsContext.ts
+31
-0
archiveInfo.tsx
src/pages/supplier/memberMaintain/detailed/archiveInfo.tsx
+47
-11
basicInfo.tsx
src/pages/supplier/memberMaintain/detailed/basicInfo.tsx
+140
-134
changedInfo.tsx
src/pages/supplier/memberMaintain/detailed/changedInfo.tsx
+17
-1
index.tsx
src/pages/supplier/memberMaintain/detailed/index.tsx
+24
-153
detail.tsx
src/pages/supplier/memberPrVerifyComingData/detail.tsx
+14
-4
verify.tsx
src/pages/supplier/memberPrVerifyComingData/verify.tsx
+51
-47
utils.tsx
src/pages/supplier/utils.tsx
+21
-14
No files found.
src/pages/supplier/components/Bookmark/Item.tsx
View file @
91af31aa
...
@@ -44,19 +44,21 @@ const BookmarkItem: React.FC<IProps> = (props: IProps) => {
...
@@ -44,19 +44,21 @@ const BookmarkItem: React.FC<IProps> = (props: IProps) => {
};
};
return
(
return
(
<
li
<
li
className=
{
styles
[
'bookmark-itemWrap'
]
}
>
className=
{
classNames
(
styles
[
'bookmark-item'
],
{
<
div
[
styles
[
'bookmark-item-active'
]]:
value
===
bookmarkContext
.
value
,
className=
{
classNames
(
styles
[
'bookmark-item'
],
{
})
}
[
styles
[
'bookmark-item-active'
]]:
value
===
bookmarkContext
.
value
,
onClick=
{
handleClick
}
})
}
>
onClick=
{
handleClick
}
{
icon
?
(
>
<
div
className=
{
styles
[
'bookmark-item-left'
]
}
>
{
icon
?
(
{
icon
}
<
div
className=
{
styles
[
'bookmark-item-left'
]
}
>
{
icon
}
</
div
>
)
:
null
}
<
div
className=
{
styles
[
'bookmark-item-center'
]
}
>
{
title
}
</
div
>
</
div
>
)
:
null
}
<
div
className=
{
styles
[
'bookmark-item-center'
]
}
>
{
title
}
</
div
>
</
div
>
</
li
>
</
li
>
);
);
...
...
src/pages/supplier/components/Bookmark/index.less
View file @
91af31aa
@import '~antd/es/style/themes/default.less';
@import '~antd/es/style/themes/default.less';
.bookmark {
.bookmark {
display: flex;
display:
inline-
flex;
align-items: center;
align-items: center;
border: 1px solid #E4E6EB;
list-style: none;
list-style: none;
padding: 0;
padding: 0;
margin: 0;
margin: -@padding-xss;
&-itemWrap {
padding: @padding-xss;
}
&-item {
&-item {
padding: @padding-xs @padding-md;
padding: @padding-xs @padding-md;
display: flex;
display: flex;
align-items: center;
align-items: center;
background-color:
#FFFFFF
;
background-color:
@background-color-light
;
color:
#6B778C
;
color:
@text-color-secondary
;
cursor: pointer;
cursor: pointer;
border-radius: 4px;
&:not(:last-child) {
border-right: 1px solid #E4E6EB;
}
&-left {
&-left {
flex-shrink: 0;
flex-shrink: 0;
...
@@ -31,8 +31,8 @@
...
@@ -31,8 +31,8 @@
&-active,
&-active,
&:hover {
&:hover {
background-color:
#6B778C
;
background-color:
@background-color-base
;
color:
#FFFFFF
;
color:
@primary-color
;
}
}
}
}
}
}
\ No newline at end of file
src/pages/supplier/components/MemberDocIncomingInfo/index.tsx
View file @
91af31aa
...
@@ -14,9 +14,13 @@ import styles from './index.less';
...
@@ -14,9 +14,13 @@ import styles from './index.less';
interface
IProps
extends
Omit
<
CustomizeColumnProps
,
'data'
|
'columns'
>
{
interface
IProps
extends
Omit
<
CustomizeColumnProps
,
'data'
|
'columns'
>
{
/**
/**
* 数据
* 是否展示 new
*/
showNew
?:
boolean
,
/**
* 组数据
*/
*/
dataSource
:
{
groupData
:
{
/**
/**
* 分组名
* 分组名
*/
*/
...
@@ -46,27 +50,22 @@ interface IProps extends Omit<CustomizeColumnProps, 'data' | 'columns'> {
...
@@ -46,27 +50,22 @@ interface IProps extends Omit<CustomizeColumnProps, 'data' | 'columns'> {
*/
*/
fieldType
?:
string
,
fieldType
?:
string
,
}[],
}[],
}[],
},
/**
* 是否展示 new
*/
showNew
?:
boolean
,
}
}
const
MemberDocIncomingInfo
:
React
.
FC
<
IProps
>
=
(
props
:
IProps
)
=>
{
const
MemberDocIncomingInfo
:
React
.
FC
<
IProps
>
=
(
props
:
IProps
)
=>
{
const
{
const
{
dataSource
=
[],
showNew
=
false
,
showNew
=
false
,
groupData
,
...
rest
...
rest
}
=
props
;
}
=
props
;
const
intl
=
useIntl
();
const
intl
=
useIntl
();
const
data
:
DataItem
[]
=
[];
return
(
<
CustomizeColumn
dataSource
.
forEach
((
item
)
=>
{
title=
{
groupData
.
groupName
}
item
.
elements
.
forEach
((
ele
)
=>
{
data=
{
groupData
.
elements
.
map
((
ele
)
=>
({
data
.
push
({
title
:
ele
.
fieldLocalName
,
title
:
ele
.
fieldLocalName
,
value
:
(
value
:
(
<
div
className=
{
styles
.
changed
}
>
<
div
className=
{
styles
.
changed
}
>
...
@@ -82,14 +81,7 @@ const MemberDocIncomingInfo: React.FC<IProps> = (props: IProps) => {
...
@@ -82,14 +81,7 @@ const MemberDocIncomingInfo: React.FC<IProps> = (props: IProps) => {
columnProps
:
{
columnProps
:
{
span
:
1
,
span
:
1
,
},
},
});
}))
}
});
});
return
(
<
CustomizeColumn
title=
{
intl
.
formatMessage
({
id
:
'member.components.MemberDocIncomingInfo.title'
})
}
data=
{
data
}
{
...
rest
}
{
...
rest
}
/>
/>
);
);
...
...
src/pages/supplier/components/MemberDocIncomingInfoForm/index.tsx
View file @
91af31aa
...
@@ -10,9 +10,9 @@ import { useIntl } from 'umi';
...
@@ -10,9 +10,9 @@ import { useIntl } from 'umi';
import
{
Radio
,
Checkbox
}
from
'@formily/antd-components'
;
import
{
Radio
,
Checkbox
}
from
'@formily/antd-components'
;
import
{
createAsyncFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
createAsyncFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
ValidateNodeResult
}
from
'@formily/validator'
;
import
{
ValidateNodeResult
}
from
'@formily/validator'
;
import
themeConfig
from
'@/../config/lingxi.theme.config'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
{
schemaPro
,
GroupItem
}
from
'./schema'
;
import
{
schema
,
GroupItem
}
from
'./schema'
;
import
AreaSelect
from
'../AreaSelect'
;
import
AreaSelect
from
'../AreaSelect'
;
export
type
DepositValueType
=
{
[
key
:
string
]:
any
}
export
type
DepositValueType
=
{
[
key
:
string
]:
any
}
...
@@ -51,29 +51,25 @@ const MemberDocIncomingInfoForm: React.ForwardRefRenderFunction<DepositRefHandle
...
@@ -51,29 +51,25 @@ const MemberDocIncomingInfoForm: React.ForwardRefRenderFunction<DepositRefHandle
}));
}));
return
(
return
(
<
MellowCard
<
NiceForm
title=
{
intl
.
formatMessage
({
id
:
'member.components.MemberDocIncomingInfoForm.title'
})
}
previewPlaceholder=
"' '"
bodyStyle=
{
{
components=
{
{
paddingBottom
:
0
,
RadioGroup
:
Radio
.
Group
,
CheckboxGroup
:
Checkbox
.
Group
,
AreaSelect
,
}
}
}
}
{
...
rest
}
effects=
{
()
=>
{
>
onFormInputChange$
().
subscribe
((
state
)
=>
{
<
NiceForm
onInputChange
?.(
state
.
values
);
previewPlaceholder=
"' '"
});
components=
{
{
}
}
RadioGroup
:
Radio
.
Group
,
actions=
{
formActions
}
CheckboxGroup
:
Checkbox
.
Group
,
schema=
{
schemaPro
(
groups
)
}
AreaSelect
,
style=
{
{
}
}
paddingLeft
:
themeConfig
[
'@margin-xs'
],
effects=
{
()
=>
{
paddingRight
:
themeConfig
[
'@margin-xs'
],
onFormInputChange$
().
subscribe
((
state
)
=>
{
}
}
onInputChange
?.(
state
.
values
);
/>
});
}
}
actions=
{
formActions
}
schema=
{
schema
(
groups
)
}
/>
</
MellowCard
>
);
);
});
});
...
...
src/pages/supplier/components/MemberDocIncomingInfoForm/schema.ts
View file @
91af31aa
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
* @Description:
* @Description:
*/
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
ISchema
}
from
'@formily/antd'
;
import
{
createMemberSchema
,
ElementType
}
from
'../../utils'
;
import
themeConfig
from
'@/../config/lingxi.theme.config'
;
import
{
createMemberSchema
,
ElementType
,
getIncomingInfoAnchorKey
}
from
'../../utils'
;
export
type
GroupItem
=
{
export
type
GroupItem
=
{
/**
/**
...
@@ -19,28 +20,38 @@ export type GroupItem = {
...
@@ -19,28 +20,38 @@ export type GroupItem = {
elements
:
ElementType
[],
elements
:
ElementType
[],
};
};
export
const
schema
=
(
groups
:
GroupItem
[]):
ISchema
=>
{
export
const
schemaPro
=
(
groups
:
GroupItem
[]):
ISchema
=>
{
const
groupArr
=
groups
||
[];
const
depositSchema
:
ISchema
=
{
const
depositSchema
:
ISchema
=
{
type
:
'object'
,
type
:
'object'
,
properties
:
{
properties
:
{},
COlUMN_LAYOUT
:
{
type
:
'object'
,
'x-component'
:
'ColumnLayout'
,
'x-component-props'
:
{},
properties
:
{},
},
},
};
};
(
groups
||
[])
.
forEach
((
item
,
index
)
=>
{
groupArr
.
forEach
((
item
,
index
)
=>
{
depositSchema
.
properties
.
COlUMN_LAYOUT
.
properties
[
`MEGA_LAYOUT
_
${
index
}
`
]
=
{
depositSchema
.
properties
[
`DEPOSIT_GROUP
_
${
index
}
`
]
=
{
type
:
'object'
,
type
:
'object'
,
'x-component'
:
'Me
ga-Layout
'
,
'x-component'
:
'Me
llowCardBox
'
,
'x-component-props'
:
{
'x-component-props'
:
{
labelCol
:
6
,
title
:
item
.
groupName
,
wrapperCol
:
18
,
id
:
getIncomingInfoAnchorKey
(
index
),
labelAlign
:
'left'
,
style
:
{
marginBottom
:
index
!==
groupArr
.
length
-
1
?
themeConfig
[
'@margin-md'
]
:
0
,
},
},
properties
:
{
MEGA_LADYOUT
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
2
,
labelWidth
:
144
,
labelAlign
:
'left'
,
},
properties
:
createMemberSchema
(
item
.
elements
),
},
},
},
properties
:
createMemberSchema
(
item
.
elements
),
};
};
});
});
return
depositSchema
;
return
depositSchema
;
...
...
src/pages/supplier/components/MemberProfile/index.tsx
View file @
91af31aa
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
* @LastEditTime: 2021-12-04 15:35:31
* @LastEditTime: 2021-12-04 15:35:31
* @Description: 会员详情信息
* @Description: 会员详情信息
*/
*/
import
React
,
{
Ref
}
from
'react'
;
import
React
,
{
Ref
,
useMemo
}
from
'react'
;
import
{
import
{
Row
,
Row
,
Col
,
Col
,
...
@@ -26,7 +26,7 @@ import {
...
@@ -26,7 +26,7 @@ import {
MEMBER_OUTER_COLUMNS
,
MEMBER_OUTER_COLUMNS
,
MEMBER_INNER_COLUMNS
,
MEMBER_INNER_COLUMNS
,
}
from
'../../constant'
;
}
from
'../../constant'
;
import
{
renderFieldTypeContent
}
from
'../../utils'
;
import
{
renderFieldTypeContent
,
getIncomingInfoAnchorKey
}
from
'../../utils'
;
import
MemberBasicInfo
from
'../MemberBasicInfo'
;
import
MemberBasicInfo
from
'../MemberBasicInfo'
;
import
MemberChannelInfo
from
'../MemberChannelInfo'
;
import
MemberChannelInfo
from
'../MemberChannelInfo'
;
import
MemberDocIncomingInfo
from
'../MemberDocIncomingInfo'
;
import
MemberDocIncomingInfo
from
'../MemberDocIncomingInfo'
;
...
@@ -134,6 +134,8 @@ const MemberProfile: React.FC<IProps> = (props) => {
...
@@ -134,6 +134,8 @@ const MemberProfile: React.FC<IProps> = (props) => {
const
intl
=
useIntl
();
const
intl
=
useIntl
();
const
depositDetails
=
dataSource
?.
depositDetails
||
[];
const
anchorsArr
=
[
const
anchorsArr
=
[
{
{
key
:
'verifySteps'
,
key
:
'verifySteps'
,
...
@@ -163,22 +165,18 @@ const MemberProfile: React.FC<IProps> = (props) => {
...
@@ -163,22 +165,18 @@ const MemberProfile: React.FC<IProps> = (props) => {
}))
}))
:
[]
:
[]
),
),
(
...(
dataSource
depositDetails
.
map
((
item
,
index
)
=>
({
&&
(
key
:
getIncomingInfoAnchorKey
(
index
),
dataSource
.
depositDetailTexts
?.
length
name
:
item
.
groupName
,
||
dataSource
.
depositDetails
?.
length
}))
)
?
{
key
:
'incomingInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.components.MemberProfile.incomingInfo'
}),
}
:
null
),
),
(
(
dataSource
(
&&
dataSource
.
qualities
dataSource
&&
dataSource
.
qualities
.
length
&&
dataSource
.
qualities
&&
dataSource
.
qualities
.
length
)
||
editableQualities
?
{
?
{
key
:
'qualificationInfo'
,
key
:
'qualificationInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.components.MemberProfile.qualificationInfo'
}),
name
:
intl
.
formatMessage
({
id
:
'member.components.MemberProfile.qualificationInfo'
}),
...
@@ -355,21 +353,19 @@ const MemberProfile: React.FC<IProps> = (props) => {
...
@@ -355,21 +353,19 @@ const MemberProfile: React.FC<IProps> = (props) => {
{
/* 入库信息 */
}
{
/* 入库信息 */
}
{
(
{
(
(
depositDetails
.
length
>
0
dataSource
?.
depositDetailTexts
?.
length
||
dataSource
?.
depositDetails
?.
length
)
>
0
&&
!
editableDeposit
&&
!
editableDeposit
)
?
(
)
?
(
<
Col
span=
{
24
}
>
depositDetails
.
map
((
item
,
index
)
=>
(
<
AnchorPage
.
Item
itemKey=
"incomingInfo"
>
<
Col
span=
{
24
}
key=
{
index
}
>
<
MemberDocIncomingInfo
<
AnchorPage
.
Item
itemKey=
{
getIncomingInfoAnchorKey
(
index
)
}
>
dataSource=
{
dataSource
?.
depositDetailTexts
||
dataSource
?.
depositDetails
||
[]
}
<
MemberDocIncomingInfo
showNew=
{
showNew
}
groupData=
{
item
}
id=
"incomingInfo"
showNew=
{
showNew
}
/>
/>
</
AnchorPage
.
Item
>
</
AnchorPage
.
Item
>
</
Col
>
</
Col
>
))
)
:
null
}
)
:
null
}
{
/* 入库信息,可编辑的 */
}
{
/* 入库信息,可编辑的 */
}
...
@@ -377,15 +373,11 @@ const MemberProfile: React.FC<IProps> = (props) => {
...
@@ -377,15 +373,11 @@ const MemberProfile: React.FC<IProps> = (props) => {
dataSource
?.
depositDetails
?.
length
>
0
dataSource
?.
depositDetails
?.
length
>
0
&&
editableDeposit
&&
editableDeposit
)
?
(
)
?
(
<
Col
span=
{
24
}
>
<
MemberDocIncomingInfoForm
<
AnchorPage
.
Item
itemKey=
"incomingInfo"
>
groups=
{
dataSource
?.
depositDetails
}
<
MemberDocIncomingInfoForm
ref=
{
depositRef
}
groups=
{
dataSource
?.
depositDetails
||
[]
}
onInputChange=
{
handleDepositChange
}
ref=
{
depositRef
}
/>
onInputChange=
{
handleDepositChange
}
/>
</
AnchorPage
.
Item
>
</
Col
>
)
:
null
}
)
:
null
}
{
/* 资质证明 */
}
{
/* 资质证明 */
}
...
...
src/pages/supplier/memberDetailsContext.ts
0 → 100644
View file @
91af31aa
/**
* @Description 会员详情context,主要用于会员管理-会员详情、会员查询-会员详情下
*/
import
*
as
React
from
'react'
;
import
{
GetMemberAbilityMaintenanceDetailBasicResponse
}
from
'@/services/MemberV2Api'
;
import
{
AnchorsItem
}
from
'@/components/AnchorPage'
;
export
type
MemberDetails
=
GetMemberAbilityMaintenanceDetailBasicResponse
&
{}
export
interface
MemberDetailsContextProps
{
/**
* 详情信息
*/
details
:
MemberDetails
,
/**
* 重新详情信息,用于某些修改请求的操作需要重现获取信息
*/
refreshDetails
?:
()
=>
void
,
/**
* 锚点数据
*/
onAnchorsReady
:
(
anchores
:
AnchorsItem
[])
=>
void
,
}
const
MemberDetailsContext
=
React
.
createContext
<
MemberDetailsContextProps
|
null
>
(
null
);
export
const
MemberDetailsContextProvider
=
MemberDetailsContext
.
Provider
;
export
default
MemberDetailsContext
;
\ No newline at end of file
src/pages/supplier/memberMaintain/detailed/archiveInfo.tsx
View file @
91af31aa
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
* @LastEditTime: 2021-11-29 20:07:02
* @LastEditTime: 2021-11-29 20:07:02
* @Description: 会员档案信息
* @Description: 会员档案信息
*/
*/
import
React
,
{
useEffect
,
useRef
,
useState
}
from
'react'
;
import
React
,
{
use
Context
,
use
Effect
,
useRef
,
useState
}
from
'react'
;
import
{
useIntl
}
from
'umi'
;
import
{
useIntl
}
from
'umi'
;
import
{
Row
,
Col
,
Spin
,
message
}
from
'antd'
;
import
{
Row
,
Col
,
Spin
,
message
}
from
'antd'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
...
@@ -20,6 +20,8 @@ import {
...
@@ -20,6 +20,8 @@ import {
import
BASE_CONFIG
from
'@/../config/base.config.json'
;
import
BASE_CONFIG
from
'@/../config/base.config.json'
;
import
{
EditableColumns
}
from
'@/components/PolymericTable/interface'
;
import
{
EditableColumns
}
from
'@/components/PolymericTable/interface'
;
import
AnchorPage
from
'@/components/AnchorPage'
;
import
AnchorPage
from
'@/components/AnchorPage'
;
import
{
getIncomingInfoAnchorKey
}
from
'../../utils'
;
import
MemberDetailsContext
from
'../../memberDetailsContext'
;
import
MemberDocCategoryPro
,
{
MemberDocCategoryProProps
,
MemberDocCategoryProRef
}
from
'../../components/MemberDocCategoryPro'
;
import
MemberDocCategoryPro
,
{
MemberDocCategoryProProps
,
MemberDocCategoryProRef
}
from
'../../components/MemberDocCategoryPro'
;
import
MemberDocIncomingInfo
from
'../../components/MemberDocIncomingInfo'
;
import
MemberDocIncomingInfo
from
'../../components/MemberDocIncomingInfo'
;
import
MemberDocQualification
from
'../../components/MemberDocQualification'
;
import
MemberDocQualification
from
'../../components/MemberDocQualification'
;
...
@@ -111,6 +113,8 @@ const MemberArchiveInfo = () => {
...
@@ -111,6 +113,8 @@ const MemberArchiveInfo = () => {
const
[
archiveInfo
,
setArchiveInfo
]
=
useState
<
GetMemberAbilityMaintenanceDetailRecordResponse
>
();
const
[
archiveInfo
,
setArchiveInfo
]
=
useState
<
GetMemberAbilityMaintenanceDetailRecordResponse
>
();
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
contenxt
=
useContext
(
MemberDetailsContext
);
const
categoryFormRef
=
useRef
<
MemberDocCategoryProRef
|
null
>
(
null
);
const
categoryFormRef
=
useRef
<
MemberDocCategoryProRef
|
null
>
(
null
);
const
intl
=
useIntl
();
const
intl
=
useIntl
();
...
@@ -263,9 +267,39 @@ const MemberArchiveInfo = () => {
...
@@ -263,9 +267,39 @@ const MemberArchiveInfo = () => {
getArchiveInfo
();
getArchiveInfo
();
},
[]);
},
[]);
const
handleModifyAfter
=
()
=>
{
useEffect
(()
=>
{
getArchiveInfo
();
const
anchors
=
[
};
{
key
:
'categoryInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.categoryInfo'
}),
},
...(
archiveInfo
?.
depositDetails
?
archiveInfo
?.
depositDetails
?.
map
((
item
,
index
)
=>
({
key
:
getIncomingInfoAnchorKey
(
index
),
name
:
item
.
groupName
,
}))
:
[]
),
{
key
:
'qualitiesInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.qualitiesInfo'
}),
},
{
key
:
'inspectInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.inspectInfo'
}),
},
{
key
:
'appraisalInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.appraisalInfo'
}),
},
{
key
:
'rectifyInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.rectifyInfo'
}),
},
].
filter
(
Boolean
);
contenxt
.
onAnchorsReady
(
anchors
);
},
[
archiveInfo
]);
const
handleFinish
=
()
=>
{
const
handleFinish
=
()
=>
{
categoryFormRef
.
current
?.
submit
();
categoryFormRef
.
current
?.
submit
();
...
@@ -316,13 +350,15 @@ const MemberArchiveInfo = () => {
...
@@ -316,13 +350,15 @@ const MemberArchiveInfo = () => {
</
Col
>
</
Col
>
{
/* 入库信息 */
}
{
/* 入库信息 */
}
<
Col
span=
{
24
}
>
{
archiveInfo
?.
depositDetails
.
map
((
item
,
index
)
=>
(
<
AnchorPage
.
Item
itemKey=
"depositDetails"
>
<
Col
span=
{
24
}
key=
{
index
}
>
<
MemberDocIncomingInfo
<
AnchorPage
.
Item
itemKey=
{
getIncomingInfoAnchorKey
(
index
)
}
>
dataSource=
{
archiveInfo
?.
depositDetails
}
<
MemberDocIncomingInfo
/>
groupData=
{
item
}
</
AnchorPage
.
Item
>
/>
</
Col
>
</
AnchorPage
.
Item
>
</
Col
>
))
}
{
/* 资质证明 */
}
{
/* 资质证明 */
}
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
...
...
src/pages/supplier/memberMaintain/detailed/basicInfo.tsx
View file @
91af31aa
...
@@ -5,16 +5,12 @@
...
@@ -5,16 +5,12 @@
* @LastEditTime: 2021-11-17 18:01:05
* @LastEditTime: 2021-11-17 18:01:05
* @Description: 会员基础信息详情
* @Description: 会员基础信息详情
*/
*/
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useContext
,
useEffect
}
from
'react'
;
import
{
useIntl
}
from
'umi'
;
import
{
import
{
Row
,
Row
,
Col
,
Col
,
Spin
,
}
from
'antd'
;
}
from
'antd'
;
import
{
observer
,
inject
}
from
'mobx-react'
;
import
{
IMemberModule
}
from
'@/module/memberModule'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
getMemberAbilityMaintenanceDetailBasic
}
from
'@/services/MemberV2Api'
;
import
{
import
{
MEMBER_TYPE_CHANNEL_CORPORATE
,
MEMBER_TYPE_CHANNEL_CORPORATE
,
MEMBER_TYPE_CHANNEL_INDIVIDUAL
,
MEMBER_TYPE_CHANNEL_INDIVIDUAL
,
...
@@ -27,149 +23,159 @@ import {
...
@@ -27,149 +23,159 @@ import {
MEMBER_OUTER_COLUMNS
,
MEMBER_OUTER_COLUMNS
,
MEMBER_INNER_COLUMNS
,
MEMBER_INNER_COLUMNS
,
}
from
'../../constant'
;
}
from
'../../constant'
;
import
MemberDetailsContext
from
'../../memberDetailsContext'
;
import
BasicInfo
from
'../../components/MemberBasicInfo'
;
import
BasicInfo
from
'../../components/MemberBasicInfo'
;
import
MemberChannelInfo
from
'../../components/MemberChannelInfo'
;
import
MemberChannelInfo
from
'../../components/MemberChannelInfo'
;
import
MemberProfile
from
'../../components/MemberProfile'
;
import
PicWrap
from
'../../components/PicWrap'
;
import
PicWrap
from
'../../components/PicWrap'
;
interface
MemberBasicInfoProps
{
const
MemberBasicInfo
:
React
.
FC
<
any
>
=
()
=>
{
MemberStore
?:
IMemberModule
;
};
const
MemberBasicInfo
:
React
.
FC
<
MemberBasicInfoProps
>
=
({
const
contenxt
=
useContext
(
MemberDetailsContext
);
MemberStore
,
const
{
details
:
memberInfo
}
=
contenxt
;
})
=>
{
const
{
memberInfo
}
=
MemberStore
;
const
{
id
,
validateId
}
=
usePageStatus
();
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
getBasicInfo
=
()
=>
{
const
intl
=
useIntl
();
if
(
!
validateId
)
{
return
;
useEffect
(()
=>
{
}
const
anchors
=
[
setInfoLoading
(
true
);
{
getMemberAbilityMaintenanceDetailBasic
({
key
:
'verifySteps'
,
validateId
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.verifySteps'
}),
}).
then
(
res
=>
{
},
if
(
res
.
code
!==
1000
)
{
{
return
;
key
:
'basicInfo'
,
}
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.basic'
}),
MemberStore
.
setMemberInfo
(
res
.
data
);
},
}).
catch
((
err
)
=>
{
(
console
.
warn
(
err
);
memberInfo
?.
memberTypeEnum
===
MEMBER_TYPE_CHANNEL_CORPORATE
}).
finally
(()
=>
{
||
memberInfo
?.
memberTypeEnum
===
MEMBER_TYPE_CHANNEL_INDIVIDUAL
setInfoLoading
(
false
);
?
{
});
key
:
'channelInfo'
,
};
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.channel'
}),
}
:
null
),
...(
memberInfo
&&
memberInfo
.
groups
?
memberInfo
.
groups
.
map
((
item
,
index
)
=>
({
key
:
`group
${
index
}
`
,
name
:
item
.
groupName
,
}))
:
[]
),
{
key
:
'flowRecords'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.flowRecords'
}),
},
].
filter
(
Boolean
);
contenxt
.
onAnchorsReady
(
anchors
);
},
[
memberInfo
]);
const
handleModifyAfter
=
()
=>
{
const
handleModifyAfter
=
()
=>
{
getBasicInfo
();
contenxt
.
refreshDetails
?.
();
};
};
return
(
return
(
<
Spin
spinning=
{
infoLoading
}
>
<
Row
gutter=
{
[
16
,
16
]
}
>
<
Row
gutter=
{
[
16
,
16
]
}
>
{
/* 会员审核流程 */
}
{
/* 会员审核流程 */
}
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
AnchorPage
.
Item
itemKey=
"verifySteps"
>
<
AnchorPage
.
Item
itemKey=
"verifySteps"
>
<
AuditProcess
<
AuditProcess
outerVerifySteps=
{
memberInfo
?.
outerVerifySteps
}
outerVerifySteps=
{
memberInfo
?.
outerVerifySteps
}
outerVerifyCurrent=
{
memberInfo
?.
currentOuterStep
}
outerVerifyCurrent=
{
memberInfo
?.
currentOuterStep
}
innerVerifySteps=
{
memberInfo
?.
innerVerifySteps
}
innerVerifySteps=
{
memberInfo
?.
innerVerifySteps
}
innerVerifyCurrent=
{
memberInfo
?.
currentInnerStep
}
innerVerifyCurrent=
{
memberInfo
?.
currentInnerStep
}
/>
/>
</
AnchorPage
.
Item
>
</
AnchorPage
.
Item
>
</
Col
>
</
Col
>
{
/* 基本信息 */
}
{
/* 基本信息 */
}
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
AnchorPage
.
Item
itemKey=
"basicInfo"
>
<
AnchorPage
.
Item
itemKey=
"basicInfo"
>
<
BasicInfo
<
BasicInfo
dataSource=
{
{
dataSource=
{
{
memberId
:
memberInfo
?.
memberId
,
memberId
:
memberInfo
?.
memberId
,
memberTypeName
:
memberInfo
?.
memberTypeName
,
memberTypeName
:
memberInfo
?.
memberTypeName
,
account
:
memberInfo
?.
account
,
account
:
memberInfo
?.
account
,
name
:
memberInfo
?.
name
,
name
:
memberInfo
?.
name
,
roleName
:
memberInfo
?.
roleName
,
roleName
:
memberInfo
?.
roleName
,
phone
:
memberInfo
?.
phone
,
phone
:
memberInfo
?.
phone
,
outerStatus
:
memberInfo
?.
outerStatus
,
outerStatus
:
memberInfo
?.
outerStatus
,
outerStatusName
:
memberInfo
?.
outerStatusName
,
outerStatusName
:
memberInfo
?.
outerStatusName
,
levelTag
:
memberInfo
?.
levelTag
,
levelTag
:
memberInfo
?.
levelTag
,
email
:
memberInfo
?.
email
,
email
:
memberInfo
?.
email
,
createTime
:
memberInfo
?.
create
Time
,
createTime
:
memberInfo
?.
register
Time
,
}
}
}
}
/>
/>
</
AnchorPage
.
Item
>
</
AnchorPage
.
Item
>
</
Col
>
</
Col
>
{
/* 渠道信息 */
}
{
/* 渠道信息 */
}
{
{
memberInfo
?.
memberTypeEnum
===
MEMBER_TYPE_CHANNEL_CORPORATE
memberInfo
?.
memberTypeEnum
===
MEMBER_TYPE_CHANNEL_CORPORATE
||
memberInfo
?.
memberTypeEnum
===
MEMBER_TYPE_CHANNEL_INDIVIDUAL
||
memberInfo
?.
memberTypeEnum
===
MEMBER_TYPE_CHANNEL_INDIVIDUAL
?
(
?
(
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
AnchorPage
.
Item
itemKey=
"channelInfo"
>
<
AnchorPage
.
Item
itemKey=
"channelInfo"
>
<
MemberChannelInfo
<
MemberChannelInfo
dataSource=
{
{
dataSource=
{
{
level
:
memberInfo
?.
channelLevelTag
,
level
:
memberInfo
?.
channelLevelTag
,
type
:
memberInfo
?.
channelTypeName
,
type
:
memberInfo
?.
channelTypeName
,
areas
:
memberInfo
?.
areas
,
areas
:
memberInfo
?.
areas
,
desc
:
memberInfo
?.
remark
,
desc
:
memberInfo
?.
remark
,
}
}
}
}
validateId=
{
memberInfo
?.
validateId
}
validateId=
{
`${memberInfo?.validateId || ''}`
}
onModifyAfter=
{
handleModifyAfter
}
onModifyAfter=
{
handleModifyAfter
}
/>
/>
</
AnchorPage
.
Item
>
</
AnchorPage
.
Item
>
</
Col
>
</
Col
>
)
)
:
null
:
null
}
}
{
/* 其他注册信息 */
}
{
/* 其他注册信息 */
}
{
{
memberInfo
&&
memberInfo
.
groups
memberInfo
&&
memberInfo
.
groups
?
memberInfo
.
groups
.
map
((
item
,
index
)
=>
(
?
memberInfo
.
groups
.
map
((
item
,
index
)
=>
(
<
Col
span=
{
24
}
key=
{
`group${index}`
}
>
<
Col
span=
{
24
}
key=
{
`group${index}`
}
>
<
AnchorPage
.
Item
itemKey=
{
`group${index}`
}
>
<
AnchorPage
.
Item
itemKey=
{
`group${index}`
}
>
<
CustomizeColumn
<
CustomizeColumn
title=
{
item
.
groupName
}
title=
{
item
.
groupName
}
data=
{
(
data=
{
(
item
.
elements
.
map
((
ele
)
=>
({
item
.
elements
.
map
((
ele
)
=>
({
title
:
ele
.
fieldLocalName
,
title
:
ele
.
fieldLocalName
,
value
:
(
value
:
(
ele
.
fieldType
!==
'upload'
ele
.
fieldType
!==
'upload'
?
ele
.
fieldValue
?
ele
.
fieldValue
:
(
:
(
<
PicWrap
<
PicWrap
pics=
{
[
ele
.
fieldValue
]
}
pics=
{
[
ele
.
fieldValue
]
}
/>
/>
)
)
),
),
}))
}))
)
}
)
}
/>
/>
</
AnchorPage
.
Item
>
</
AnchorPage
.
Item
>
</
Col
>
</
Col
>
))
))
:
null
:
null
}
}
{
/* 流转记录 */
}
{
/* 流转记录 */
}
<
Col
span=
{
24
}
>
<
Col
span=
{
24
}
>
<
AnchorPage
.
Item
itemKey=
"flowRecords"
>
<
AnchorPage
.
Item
itemKey=
"flowRecords"
>
<
FlowRecords
<
FlowRecords
outerColumns=
{
MEMBER_OUTER_COLUMNS
}
outerColumns=
{
MEMBER_OUTER_COLUMNS
}
innerColumns=
{
MEMBER_INNER_COLUMNS
}
innerColumns=
{
MEMBER_INNER_COLUMNS
}
outerRowkey=
"id"
outerRowkey=
"id"
innerRowkey=
"id"
innerRowkey=
"id"
outerDataSource=
{
memberInfo
?.
outerHistory
}
outerDataSource=
{
memberInfo
?.
outerHistory
}
innerDataSource=
{
memberInfo
?.
innerHistory
}
innerDataSource=
{
memberInfo
?.
innerHistory
}
/>
/>
</
AnchorPage
.
Item
>
</
AnchorPage
.
Item
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</
Spin
>
);
);
};
};
export
default
inject
(
'MemberStore'
)(
observer
(
MemberBasicInfo
))
;
export
default
MemberBasicInfo
;
src/pages/supplier/memberMaintain/detailed/changedInfo.tsx
View file @
91af31aa
...
@@ -5,16 +5,22 @@
...
@@ -5,16 +5,22 @@
* @LastEditTime: 2021-11-17 18:01:17
* @LastEditTime: 2021-11-17 18:01:17
* @Description: 会员变更信息详情
* @Description: 会员变更信息详情
*/
*/
import
React
from
'react'
;
import
React
,
{
useContext
,
useEffect
}
from
'react'
;
import
{
useIntl
}
from
'umi'
;
import
{
Row
,
Col
}
from
'antd'
;
import
{
Row
,
Col
}
from
'antd'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
getMemberAbilityMaintenanceDetailDepositHistoryPage
}
from
'@/services/MemberV2Api'
;
import
{
getMemberAbilityMaintenanceDetailDepositHistoryPage
}
from
'@/services/MemberV2Api'
;
import
AnchorPage
from
'@/components/AnchorPage'
;
import
AnchorPage
from
'@/components/AnchorPage'
;
import
MemberDetailsContext
from
'../../memberDetailsContext'
;
import
ChangedInfo
,
{
FetchParamsType
,
ReponseType
}
from
'../../components/MemberChangedInfo'
;
import
ChangedInfo
,
{
FetchParamsType
,
ReponseType
}
from
'../../components/MemberChangedInfo'
;
const
MemberChangedInfo
=
()
=>
{
const
MemberChangedInfo
=
()
=>
{
const
{
validateId
}
=
usePageStatus
();
const
{
validateId
}
=
usePageStatus
();
const
contenxt
=
useContext
(
MemberDetailsContext
);
const
intl
=
useIntl
();
const
getInspectList
=
(
params
:
FetchParamsType
):
Promise
<
ReponseType
>
=>
{
const
getInspectList
=
(
params
:
FetchParamsType
):
Promise
<
ReponseType
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getMemberAbilityMaintenanceDetailDepositHistoryPage
({
getMemberAbilityMaintenanceDetailDepositHistoryPage
({
...
@@ -33,6 +39,16 @@ const MemberChangedInfo = () => {
...
@@ -33,6 +39,16 @@ const MemberChangedInfo = () => {
});
});
};
};
useEffect
(()
=>
{
const
anchors
=
[
{
key
:
'changedInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.changedInfo'
}),
},
];
contenxt
.
onAnchorsReady
(
anchors
);
},
[]);
return
(
return
(
<
Row
gutter=
{
[
16
,
16
]
}
>
<
Row
gutter=
{
[
16
,
16
]
}
>
{
/* 分类信息 */
}
{
/* 分类信息 */
}
...
...
src/pages/supplier/memberMaintain/detailed/index.tsx
View file @
91af31aa
...
@@ -6,44 +6,31 @@
...
@@ -6,44 +6,31 @@
* @Description:
* @Description:
*/
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
history
,
useIntl
}
from
'umi'
;
import
{
history
,
IRouteComponentProps
,
useIntl
}
from
'umi'
;
import
{
Spin
}
from
'antd'
;
import
{
Spin
}
from
'antd'
;
import
{
import
{
UnorderedListOutlined
,
UnorderedListOutlined
,
FolderOutlined
,
FolderOutlined
,
BarChartOutlined
,
//
BarChartOutlined,
InsuranceOutlined
,
//
InsuranceOutlined,
BulbOutlined
,
//
BulbOutlined,
EditOutlined
,
EditOutlined
,
}
from
'@ant-design/icons'
;
}
from
'@ant-design/icons'
;
import
{
observer
,
inject
}
from
'mobx-react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
getMemberAbilityMaintenanceDetailBasic
,
GetMemberAbilityMaintenanceDetailBasicResponse
}
from
'@/services/MemberV2Api'
;
import
{
getMemberAbilityMaintenanceDetailBasic
,
GetMemberAbilityMaintenanceDetailBasicResponse
}
from
'@/services/MemberV2Api'
;
import
{
IMemberModule
}
from
'@/module/memberModule'
;
import
AnchorPage
,
{
AnchorsItem
}
from
'@/components/AnchorPage'
;
import
{
MEMBER_TYPE_CHANNEL_CORPORATE
,
MEMBER_TYPE_CHANNEL_INDIVIDUAL
,
}
from
'@/constants/member'
;
import
AnchorPage
from
'@/components/AnchorPage'
;
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
AvatarWrap
from
'@/components/AvatarWrap'
;
import
{
MemberDetailsContextProvider
}
from
'../../memberDetailsContext'
;
import
Bookmark
from
'../../components/Bookmark'
;
import
Bookmark
from
'../../components/Bookmark'
;
interface
QueryProps
{
interface
IProps
extends
IRouteComponentProps
{}
match
:
{
url
:
string
;
path
:
string
;
};
location
:
{
pathname
:
string
;
};
MemberStore
?:
IMemberModule
;
}
const
MemberMaintainDetailed
:
React
.
FC
<
Query
Props
>
=
props
=>
{
const
MemberMaintainDetailed
:
React
.
FC
<
I
Props
>
=
props
=>
{
const
{
MemberStore
,
children
}
=
props
;
const
{
children
}
=
props
;
const
{
id
,
validateId
}
=
usePageStatus
();
const
{
id
,
validateId
}
=
usePageStatus
();
const
[
memberInfo
,
setMemberInfo
]
=
useState
<
GetMemberAbilityMaintenanceDetailBasicResponse
>
(
null
);
const
[
memberInfo
,
setMemberInfo
]
=
useState
<
GetMemberAbilityMaintenanceDetailBasicResponse
>
(
null
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
anchors
,
setAnchors
]
=
useState
<
AnchorsItem
[]
>
([]);
const
intl
=
useIntl
();
const
intl
=
useIntl
();
...
@@ -59,7 +46,6 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
...
@@ -59,7 +46,6 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
return
;
return
;
}
}
setMemberInfo
(
res
.
data
);
setMemberInfo
(
res
.
data
);
MemberStore
.
setMemberInfo
(
res
.
data
);
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
warn
(
err
);
console
.
warn
(
err
);
}).
finally
(()
=>
{
}).
finally
(()
=>
{
...
@@ -112,131 +98,8 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
...
@@ -112,131 +98,8 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
return
'basicInfo'
;
return
'basicInfo'
;
};
};
const
getAnchorsArr
=
()
=>
{
const
handleAnchorsReady
=
(
anchors
:
AnchorsItem
[])
=>
{
const
markKey
=
getBookmarkKey
();
setAnchors
(
anchors
);
let
ret
=
[];
switch
(
markKey
)
{
case
'basicInfo'
:
ret
=
[
{
key
:
'verifySteps'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.verifySteps'
}),
},
{
key
:
'basicInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.basic'
}),
},
(
memberInfo
?.
memberTypeEnum
===
MEMBER_TYPE_CHANNEL_CORPORATE
||
memberInfo
?.
memberTypeEnum
===
MEMBER_TYPE_CHANNEL_INDIVIDUAL
?
{
key
:
'channelInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.channel'
}),
}
:
null
),
...(
memberInfo
&&
memberInfo
.
groups
?
memberInfo
.
groups
.
map
((
item
,
index
)
=>
({
key
:
`group
${
index
}
`
,
name
:
item
.
groupName
,
}))
:
[]
),
{
key
:
'flowRecords'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.flowRecords'
}),
},
].
filter
(
Boolean
);
break
;
case
'levelInfo'
:
ret
=
[
{
key
:
'memberLevel'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.memberLevel'
}),
},
{
key
:
'activePoints'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.activePoints'
}),
},
];
break
;
case
'equityInfo'
:
ret
=
[
{
key
:
'basicInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.basic'
}),
},
{
key
:
'memberEquity'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.memberEquity'
}),
},
{
key
:
'equityRecords'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.equityRecords'
}),
},
];
break
;
case
'sincerityInfo'
:
ret
=
[
{
key
:
'basicInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.basic'
}),
},
{
key
:
'orderEvaluation'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.orderEvaluation'
}),
},
{
key
:
'afterServiceEvaluation'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.afterServiceEvaluation'
}),
},
{
key
:
'feedbackRecords'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.feedbackRecords'
}),
},
];
break
;
case
'archiveInfo'
:
ret
=
[
{
key
:
'categoryInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.categoryInfo'
}),
},
{
key
:
'depositDetails'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.depositDetails'
}),
},
{
key
:
'qualitiesInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.qualitiesInfo'
}),
},
{
key
:
'inspectInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.inspectInfo'
}),
},
{
key
:
'appraisalInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.appraisalInfo'
}),
},
{
key
:
'rectifyInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.rectifyInfo'
}),
},
];
break
;
case
'changedInfo'
:
ret
=
[
{
key
:
'changedInfo'
,
name
:
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.changedInfo'
}),
},
];
break
;
default
:
break
;
}
return
ret
;
};
};
return
(
return
(
...
@@ -253,8 +116,8 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
...
@@ -253,8 +116,8 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
/>
/>
)
}
)
}
onBack=
{
()
=>
history
.
push
(
`/memberCenter/supplierAbility/manage/maintain`
)
}
onBack=
{
()
=>
history
.
push
(
`/memberCenter/supplierAbility/manage/maintain`
)
}
anchors=
{
getAnchorsArr
()
}
anchors=
{
anchors
}
extra
=
{
(
desc
=
{
(
<
Bookmark
value=
{
getBookmarkKey
()
}
onChange=
{
handleBookmarkChange
}
>
<
Bookmark
value=
{
getBookmarkKey
()
}
onChange=
{
handleBookmarkChange
}
>
<
Bookmark
.
Item
value=
"basicInfo"
title=
{
intl
.
formatMessage
({
id
:
'member.management.maintain.basic'
})
}
icon=
{
<
UnorderedListOutlined
/>
}
/>
<
Bookmark
.
Item
value=
"basicInfo"
title=
{
intl
.
formatMessage
({
id
:
'member.management.maintain.basic'
})
}
icon=
{
<
UnorderedListOutlined
/>
}
/>
<
Bookmark
.
Item
value=
"archiveInfo"
title=
{
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.archivalInfo'
})
}
icon=
{
<
FolderOutlined
/>
}
/>
<
Bookmark
.
Item
value=
"archiveInfo"
title=
{
intl
.
formatMessage
({
id
:
'member.management.maintain.detail.archivalInfo'
})
}
icon=
{
<
FolderOutlined
/>
}
/>
...
@@ -265,10 +128,18 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
...
@@ -265,10 +128,18 @@ const MemberMaintainDetailed: React.FC<QueryProps> = props => {
</
Bookmark
>
</
Bookmark
>
)
}
)
}
>
>
{
children
}
<
MemberDetailsContextProvider
value=
{
{
details
:
memberInfo
,
refreshDetails
:
getBasicInfo
,
onAnchorsReady
:
handleAnchorsReady
,
}
}
>
{
children
}
</
MemberDetailsContextProvider
>
</
AnchorPage
>
</
AnchorPage
>
</
Spin
>
</
Spin
>
);
);
};
};
export
default
inject
(
'MemberStore'
)(
observer
(
MemberMaintainDetailed
))
;
export
default
MemberMaintainDetailed
;
src/pages/supplier/memberPrVerifyComingData/detail.tsx
View file @
91af31aa
...
@@ -7,7 +7,8 @@
...
@@ -7,7 +7,8 @@
*/
*/
import
React
from
'react'
;
import
React
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
getMemberDepositVerifyDetail
}
from
'@/services/MemberV2Api'
;
import
{
getMemberDepositVerifyDetail
,
GetMemberDepositVerifyDetailResponse
}
from
'@/services/MemberV2Api'
;
import
{
IRequestSuccess
}
from
'@/index'
;
import
fetchDetailHoc
from
'../common/hoc/fetchDetailHoc'
;
import
fetchDetailHoc
from
'../common/hoc/fetchDetailHoc'
;
import
MemberProfile
from
'../components/MemberProfile'
;
import
MemberProfile
from
'../components/MemberProfile'
;
...
@@ -15,9 +16,18 @@ const MemberPrVerifyComingDataDetail: React.FC<{}> = () => {
...
@@ -15,9 +16,18 @@ const MemberPrVerifyComingDataDetail: React.FC<{}> = () => {
const
{
validateId
}
=
usePageStatus
();
const
{
validateId
}
=
usePageStatus
();
const
MemberProfilePro
=
fetchDetailHoc
({
const
MemberProfilePro
=
fetchDetailHoc
({
fetchDetail
:
()
=>
getMemberDepositVerifyDetail
({
fetchDetail
:
():
Promise
<
IRequestSuccess
<
GetMemberDepositVerifyDetailResponse
>>
=>
(
validateId
,
new
Promise
((
resolve
,
reject
)
=>
{
}),
getMemberDepositVerifyDetail
({
validateId
,
}).
then
((
res
)
=>
{
if
(
res
.
code
===
1000
)
{
res
.
data
.
depositDetails
=
res
.
data
.
depositDetailTexts
;
}
resolve
(
res
);
})
})
),
},
MemberProfile
);
},
MemberProfile
);
return
(
return
(
...
...
src/pages/supplier/memberPrVerifyComingData/verify.tsx
View file @
91af31aa
...
@@ -16,10 +16,11 @@ import {
...
@@ -16,10 +16,11 @@ import {
}
from
'@ant-design/icons'
;
}
from
'@ant-design/icons'
;
import
{
history
,
useIntl
}
from
'umi'
;
import
{
history
,
useIntl
}
from
'umi'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
useHttpRequest
}
from
'@/hooks/useHttpRequest'
;
import
{
postMemberDepositVerify
,
getMemberDepositVerifyDetail
}
from
'@/services/MemberV2Api'
;
import
{
postMemberDepositVerify
,
getMemberDepositVerifyDetail
}
from
'@/services/MemberV2Api'
;
import
{
normalizeFiledata
}
from
'@/utils'
;
import
{
normalizeFiledata
}
from
'@/utils'
;
import
{
IRequestSuccess
}
from
'@/index'
;
import
VerifyComingDataDrawer
,
{
ValueType
as
VerifyData
}
from
'./components/VerifyComingDataDrawer'
;
import
VerifyComingDataDrawer
,
{
ValueType
as
VerifyData
}
from
'./components/VerifyComingDataDrawer'
;
import
fetchDetailHoc
,
{
ResponseType
}
from
'../common/hoc/fetchDetailHoc'
;
import
MemberProfile
,
{
DetailType
}
from
'../components/MemberProfile'
;
import
MemberProfile
,
{
DetailType
}
from
'../components/MemberProfile'
;
import
{
ChannelValueType
,
ChannelRefHandle
}
from
'../components/MemberChannelInfoForm'
;
import
{
ChannelValueType
,
ChannelRefHandle
}
from
'../components/MemberChannelInfoForm'
;
import
{
DepositValueType
,
DepositRefHandle
}
from
'../components/MemberDocIncomingInfoForm'
;
import
{
DepositValueType
,
DepositRefHandle
}
from
'../components/MemberDocIncomingInfoForm'
;
...
@@ -37,6 +38,52 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
...
@@ -37,6 +38,52 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
const
depositInfoRef
=
useRef
<
DepositValueType
|
null
>
(
null
);
const
depositInfoRef
=
useRef
<
DepositValueType
|
null
>
(
null
);
const
qualitiesRef
=
useRef
<
QualitiesSubmitValueType
[]
|
null
>
([]);
const
qualitiesRef
=
useRef
<
QualitiesSubmitValueType
[]
|
null
>
([]);
const
fetchDetail
=
():
Promise
<
IRequestSuccess
<
DetailType
>>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getMemberDepositVerifyDetail
({
validateId
,
}).
then
((
res
)
=>
{
if
(
res
.
data
&&
res
.
data
.
upperMembers
)
{
const
newUpperMembers
=
[...(
res
.
data
.
upperMembers
||
[])];
// 手动添加一个选项
if
(
newUpperMembers
.
findIndex
((
item
)
=>
item
.
upperRelationId
===
0
)
===
-
1
)
{
newUpperMembers
.
unshift
({
upperRelationId
:
0
,
name
:
intl
.
formatMessage
({
id
:
'member.management.memberPrVerifyComingData.verify.upperMember.null'
}),
});
}
res
.
data
.
upperMembers
=
newUpperMembers
;
}
if
(
res
.
code
===
1000
)
{
// 要手动将旧数据带过去
const
depositDetails
=
{};
res
.
data
.
depositDetails
.
forEach
((
item
)
=>
{
if
(
item
.
elements
)
{
item
.
elements
.
forEach
((
ele
)
=>
{
depositDetails
[
ele
.
fieldName
]
=
ele
.
fieldValue
;
});
}
});
depositInfoRef
.
current
=
depositDetails
;
qualitiesRef
.
current
=
res
.
data
.
qualities
.
map
((
item
)
=>
({
file
:
item
.
url
?
[
normalizeFiledata
(
item
.
url
)]
:
[],
expireDay
:
item
.
expireDay
,
permanent
:
item
.
permanent
===
1
?
[
item
.
permanent
]
:
[],
}));
}
resolve
(
res
);
}).
catch
(
err
=>
{
reject
(
err
);
});
});
};
const
{
data
:
dataSource
,
loading
,
}
=
useHttpRequest
<
DetailType
>
(
fetchDetail
,
{
manual
:
false
});
const
intl
=
useIntl
();
const
intl
=
useIntl
();
const
handleVisibleVerifyDrawer
=
(
flag
?)
=>
{
const
handleVisibleVerifyDrawer
=
(
flag
?)
=>
{
...
@@ -101,30 +148,6 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
...
@@ -101,30 +148,6 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
});
});
};
};
const
fetchDetail
=
():
Promise
<
ResponseType
<
DetailType
>>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
getMemberDepositVerifyDetail
({
validateId
,
}).
then
((
res
)
=>
{
if
(
res
.
data
&&
res
.
data
.
upperMembers
)
{
const
newUpperMembers
=
[...(
res
.
data
.
upperMembers
||
[])];
// 手动添加一个选项
if
(
newUpperMembers
.
findIndex
((
item
)
=>
item
.
upperRelationId
===
0
)
===
-
1
)
{
newUpperMembers
.
unshift
({
upperRelationId
:
0
,
name
:
intl
.
formatMessage
({
id
:
'member.management.memberPrVerifyComingData.verify.upperMember.null'
}),
});
}
res
.
data
.
upperMembers
=
newUpperMembers
;
}
resolve
(
res
);
}).
catch
(
err
=>
{
reject
(
err
);
});
});
};
const
handleChannelInfoChange
=
(
values
:
ChannelValueType
)
=>
{
const
handleChannelInfoChange
=
(
values
:
ChannelValueType
)
=>
{
channelInfoRef
.
current
=
values
;
channelInfoRef
.
current
=
values
;
};
};
...
@@ -137,30 +160,11 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
...
@@ -137,30 +160,11 @@ const MemberPrVerifyComingDataVerify: React.FC<{}> = () => {
qualitiesRef
.
current
=
values
;
qualitiesRef
.
current
=
values
;
};
};
const
MemberProfilePro
=
fetchDetailHoc
({
fetchDetail
:
fetchDetail
,
fetchCallback
:
(
info
)
=>
{
// 要手动将旧数据带过去
const
depositDetails
=
{};
info
.
depositDetails
.
forEach
((
item
)
=>
{
if
(
item
.
elements
)
{
item
.
elements
.
forEach
((
ele
)
=>
{
depositDetails
[
ele
.
fieldName
]
=
ele
.
fieldValue
;
});
}
});
depositInfoRef
.
current
=
depositDetails
;
qualitiesRef
.
current
=
info
.
qualities
.
map
((
item
)
=>
({
file
:
item
.
url
?
[
normalizeFiledata
(
item
.
url
)]
:
[],
expireDay
:
item
.
expireDay
,
permanent
:
item
.
permanent
===
1
?
[
item
.
permanent
]
:
[],
}));
},
},
MemberProfile
);
return
(
return
(
<>
<>
<
MemberProfilePro
<
MemberProfile
dataSource=
{
dataSource
}
loading=
{
loading
}
extra=
{
()
=>
(
extra=
{
()
=>
(
<>
<>
<
Space
>
<
Space
>
...
...
src/pages/supplier/utils.tsx
View file @
91af31aa
...
@@ -80,16 +80,16 @@ export type GroupItem = {
...
@@ -80,16 +80,16 @@ export type GroupItem = {
}
}
export
function
coverColFiltersItem
(
export
function
coverColFiltersItem
(
data
:
Array
<
{
[
key
:
string
]:
any
}
>
,
data
:
Array
<
{
[
key
:
string
]:
any
}
>
,
dataIndex
:
string
,
dataIndex
:
string
,
item
:
{
[
key
:
string
]:
any
}
item
:
{
[
key
:
string
]:
any
}
)
{
)
{
const
index
=
data
.
findIndex
(
i
=>
i
.
dataIndex
===
dataIndex
);
const
index
=
data
.
findIndex
(
i
=>
i
.
dataIndex
===
dataIndex
);
if
(
index
!==
-
1
)
{
if
(
index
!==
-
1
)
{
data
.
splice
(
index
,
1
,
{
data
.
splice
(
index
,
1
,
{
...
data
[
index
],
...
data
[
index
],
filters
:
item
,
filters
:
item
,
});
});
}
}
};
};
...
@@ -129,7 +129,7 @@ const getFieldType = (field: ElementType, editable: boolean = true) => {
...
@@ -129,7 +129,7 @@ const getFieldType = (field: ElementType, editable: boolean = true) => {
// 默认是 输入框
// 默认是 输入框
let
description
:
{
[
key
:
string
]:
any
}
=
{
let
description
:
{
[
key
:
string
]:
any
}
=
{
'x-component-props'
:
{
'x-component-props'
:
{
placeholder
:
field
.
fieldRemark
,
placeholder
:
field
.
fieldRemark
,
disabled
:
isDisabled
,
disabled
:
isDisabled
,
},
},
};
};
...
@@ -151,7 +151,7 @@ const getFieldType = (field: ElementType, editable: boolean = true) => {
...
@@ -151,7 +151,7 @@ const getFieldType = (field: ElementType, editable: boolean = true) => {
(
(
field
.
pattern
field
.
pattern
?
{
?
{
pattern
:
field
.
pattern
,
pattern
:
field
.
pattern
,
message
:
field
.
msg
,
message
:
field
.
msg
,
}
}
:
null
:
null
...
@@ -161,7 +161,7 @@ const getFieldType = (field: ElementType, editable: boolean = true) => {
...
@@ -161,7 +161,7 @@ const getFieldType = (field: ElementType, editable: boolean = true) => {
switch
(
field
.
fieldType
as
FieldType
)
{
switch
(
field
.
fieldType
as
FieldType
)
{
case
'upload'
:
{
case
'upload'
:
{
description
=
{
description
=
{
'x-component'
:
'CustomUpload'
,
'x-component'
:
'CustomUpload'
,
'x-component-props'
:
{
'x-component-props'
:
{
showDesc
:
false
,
showDesc
:
false
,
...
@@ -225,7 +225,7 @@ const getFieldType = (field: ElementType, editable: boolean = true) => {
...
@@ -225,7 +225,7 @@ const getFieldType = (field: ElementType, editable: boolean = true) => {
*/
*/
export
function
createMemberSchema
(
elements
:
ElementType
[],
editable
:
boolean
=
true
)
{
export
function
createMemberSchema
(
elements
:
ElementType
[],
editable
:
boolean
=
true
)
{
const
components
=
{};
const
components
=
{};
if
(
!
Array
.
isArray
(
elements
))
{
if
(
!
Array
.
isArray
(
elements
))
{
return
components
;
return
components
;
}
}
...
@@ -242,12 +242,12 @@ export function renderFieldTypeContent(fieldType: FieldType, fieldValue: any): R
...
@@ -242,12 +242,12 @@ export function renderFieldTypeContent(fieldType: FieldType, fieldValue: any): R
switch
(
fieldType
)
{
switch
(
fieldType
)
{
case
'upload'
:
case
'upload'
:
node
=
(
node
=
(
<
PicWrap
<
PicWrap
pics=
{
[
fieldValue
]
}
pics=
{
[
fieldValue
]
}
/>
/>
);
);
break
;
break
;
default
:
default
:
break
;
break
;
}
}
...
@@ -292,4 +292,11 @@ export function completeCategory(ids: string[], dataSource: CategoryItemType[]):
...
@@ -292,4 +292,11 @@ export function completeCategory(ids: string[], dataSource: CategoryItemType[]):
}
}
});
});
return
ret
;
return
ret
;
};
};
\ No newline at end of file
/**
* 获取入库信息锚点key
* @param index 索引
* @returns
*/
export
const
getIncomingInfoAnchorKey
=
(
index
:
number
)
=>
`incomingInfo-
${
index
}
`
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment