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
7f82f7a0
Commit
7f82f7a0
authored
May 31, 2022
by
前端-许冠华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jinfa-0518' into 'jinfa-0518'
fix: 修改审核入库分类——修改分类信息付款条件、付款方式数据格式 See merge request project/jinfa-platform!123
parents
30a0e8a4
8a157a56
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
34 deletions
+63
-34
index.tsx
src/pages/member/components/MemberDocCategoryPro/index.tsx
+43
-27
index.tsx
src/pages/member/components/MemberProfile/index.tsx
+1
-1
interface.ts
src/pages/member/components/MemberProfile/interface.ts
+19
-6
No files found.
src/pages/member/components/MemberDocCategoryPro/index.tsx
View file @
7f82f7a0
...
...
@@ -73,31 +73,31 @@ type CategoriesBasicValueItem = {
/**
* 发票类型
*/
invoiceType
?
:
number
,
invoiceType
:
number
,
/**
* 税点,只要百分比的分子部分,不要转换为小数
*/
taxPoint
?
:
number
,
taxPoint
:
number
,
/**
* 预付款
*/
advanceCharge
?
:
number
,
advanceCharge
:
number
,
/**
* 结算单据
*/
settlementDocuments
?
:
number
,
settlementDocuments
:
number
,
/**
* 付款方式
*/
paymentType
?
:
number
,
paymentType
:
number
,
/**
* 品类明细
*/
details
?
:
string
[],
details
:
string
[],
/**
* 付款条件
*/
paymentClauseType
?
:
number
,
paymentClauseType
:
number
,
}
type
CategoriesValueItemType
=
CategoriesBasicValueItem
&
{
...
...
@@ -111,27 +111,27 @@ export type FormSubmitBasicValueType = {
/**
* 会员编码
*/
code
?
:
string
,
code
:
string
,
/**
* 合作关系类型枚举
*/
partnerType
?
:
number
,
partnerType
:
number
,
/**
* 币别
*/
currencyType
?
:
number
,
currencyType
:
number
,
/**
* 备注
*/
remark
?
:
string
,
remark
:
string
,
/**
* 开发原由
*/
developType
?
:
number
,
developType
:
number
,
/**
* 业务分类
*/
businessType
?
:
number
,
businessType
:
number
,
}
export
type
AreaCodesItemType
=
{
...
...
@@ -149,15 +149,15 @@ export type FormSubmitValueType = FormSubmitBasicValueType & {
/**
* 单次合作金额
*/
maxAmount
?
:
string
,
maxAmount
:
string
,
/**
* 适用区域编码列表
*/
areaCodes
?
:
AreaCodesItemType
[],
areaCodes
:
AreaCodesItemType
[],
/**
* 主营品类列表
*/
categories
?
:
CategoriesValueItemType
[],
categories
:
CategoriesValueItemType
[],
/**
* 适用区域
*/
...
...
@@ -165,7 +165,7 @@ export type FormSubmitValueType = FormSubmitBasicValueType & {
}
type
SubmitCategoriesValueType
=
Omit
<
CategoriesBasicValueItem
,
'details'
>
&
{
payType
:
number
,
payType
?
:
number
,
month
:
number
,
monthDay
:
number
,
days
:
number
,
...
...
@@ -235,9 +235,26 @@ export interface MemberDocCategoryProProps extends Omit<MellowCardProps, 'onSubm
/**
* 上级同步支付方式和支付条件
*/
businessCategoryVOS
?:
any
[]
businessCategoryVO
?:
BusinessCategoryVOType
}
export
type
BusinessCategoryVOType
=
{
/**
* 付款条件code
*/
paymentClauseType
?:
number
/**
* 付款条件名称
*/
paymentClauseTypeName
?:
string
/**
* 付款方式code
*/
paymentType
?:
number
/**
* 付款方式名称
*/
paymentTypeName
?:
string
}
export
type
MemberDocCategoryProRef
=
{
/**
* 触发表单 submit 事件
...
...
@@ -254,7 +271,7 @@ const MemberDocCategoryPro: React.ForwardRefRenderFunction<MemberDocCategoryProR
onFinish
,
editable
,
partnerTypes
,
businessCategoryVO
S
=
[]
,
businessCategoryVO
=
{}
,
...
rest
}
=
props
;
const
[
classifyInfo
,
setClassifyInfo
]
=
useState
<
FormSubmitValueType
>
();
...
...
@@ -270,9 +287,8 @@ const MemberDocCategoryPro: React.ForwardRefRenderFunction<MemberDocCategoryProR
useEffect
(()
=>
{
// 入库分类时才需要,初始设置付款条件、付款方式值
if
(
!
value
&&
businessCategoryVOS
&&
businessCategoryVOS
.
length
)
{
const
first
=
businessCategoryVOS
[
0
];
const
{
paymentClauseType
,
paymentType
}
=
first
;
if
(
!
value
&&
businessCategoryVO
)
{
const
{
paymentClauseType
,
paymentType
}
=
businessCategoryVO
;
formActions
.
setFieldState
(
'categories.*.paymentClauseType'
,
state
=>
{
FormPath
.
setIn
(
state
,
'value'
,
paymentClauseType
);
});
...
...
@@ -280,7 +296,7 @@ const MemberDocCategoryPro: React.ForwardRefRenderFunction<MemberDocCategoryProR
FormPath
.
setIn
(
state
,
'value'
,
paymentType
);
});
}
},
[
businessCategoryVO
S
,
value
]);
},
[
businessCategoryVO
,
value
]);
useEffect
(()
=>
{
if
(
'value'
in
props
&&
value
)
{
...
...
@@ -662,7 +678,7 @@ const MemberDocCategoryPro: React.ForwardRefRenderFunction<MemberDocCategoryProR
})));
});
/* 付款条件 */
if(paymentClauseTypes?.length > 0) {
if
(paymentClauseTypes?.length > 0) {
formActions.setFieldState('categories.*.paymentClauseType', state => {
FormPath.setIn(state, 'props.enum', paymentClauseTypes.map((item) => ({
label: item.paymentClauseTypeName,
...
...
@@ -671,7 +687,7 @@ const MemberDocCategoryPro: React.ForwardRefRenderFunction<MemberDocCategoryProR
});
}
/* 开发原由 */
if(developTypes?.length > 0) {
if
(developTypes?.length > 0) {
formActions.setFieldState('developType', state => {
FormPath.setIn(state, 'props.enum', developTypes.map((item) => ({
label: item.developTypeName,
...
...
@@ -680,7 +696,7 @@ const MemberDocCategoryPro: React.ForwardRefRenderFunction<MemberDocCategoryProR
});
}
/* 业务分类 */
if(businessTypes?.length > 0) {
if
(businessTypes?.length > 0) {
formActions.setFieldState('businessType', state => {
FormPath.setIn(state, 'props.enum', businessTypes.map((item) => ({
label: item.businessTypeName,
...
...
src/pages/member/components/MemberProfile/index.tsx
View file @
7f82f7a0
...
...
@@ -448,7 +448,7 @@ const MemberProfile: React.FC<IProps> = (props) => {
)
}
onSubmit=
{
onCategorySubmit
}
ref=
{
categoryRef
}
businessCategoryVO
S=
{
dataSource
?.
businessCategoryVOS
||
[]
}
businessCategoryVO
=
{
dataSource
?.
businessCategoryVO
||
{}
}
/>
</
AnchorPage
.
Item
>
...
...
src/pages/member/components/MemberProfile/interface.ts
View file @
7f82f7a0
...
...
@@ -354,10 +354,22 @@ export type DetailType = {
/**
* 上级同步支付方式和支付条件
*/
businessCategoryVOS
?:
{
paymentClauseType
?:
number
,
paymentClauseTypeName
?:
string
,
paymentType
?:
number
,
paymentTypeName
?:
string
}[]
businessCategoryVO
?:
{
/**
* 付款条件code
*/
paymentClauseType
?:
number
/**
* 付款条件名称
*/
paymentClauseTypeName
?:
string
/**
* 付款方式code
*/
paymentType
?:
number
/**
* 付款方式名称
*/
paymentTypeName
?:
string
}
};
\ 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