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
黄庭坚
jinfa-platform
Commits
2b5aba38
Commit
2b5aba38
authored
Mar 30, 2022
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 完成 会员入库 新增字段修改
parent
8f9958f6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
183 additions
and
1 deletion
+183
-1
index.tsx
src/pages/member/components/MemberDocCategory/index.tsx
+58
-0
index.tsx
src/pages/member/components/ModifyClassifyDrawer/index.tsx
+67
-1
schema.ts
src/pages/member/components/ModifyClassifyDrawer/schema.ts
+58
-0
No files found.
src/pages/member/components/MemberDocCategory/index.tsx
View file @
2b5aba38
...
...
@@ -95,7 +95,43 @@ export type DocCategoryProps = Omit<CustomizeColumnProps, 'data' | 'columns'> &
* 税点,百分比的分子部分
*/
taxPoint
:
string
,
/**
* 预付款
*/
advanceCharge
:
number
,
/**
* 预付款名称
*/
advanceChargeName
:
string
,
/**
* 结算单据
*/
settlementDocuments
:
number
,
/**
* 结算单据名称
*/
settlementDocumentsName
:
string
,
/**
* 付款方式
*/
paymentType
:
number
,
/**
* 付款方式名称
*/
paymentTypeName
:
string
,
}[],
/**
* 币别
*/
currencyType
:
number
,
/**
* 币别名称
*/
currencyTypeName
:
string
,
/**
* 备注
*/
remark
:
string
,
},
/**
* 审核id
...
...
@@ -149,6 +185,8 @@ const MemberDocCategory: React.FC<DocCategoryProps> = (props: DocCategoryProps)
taxPoint
:
+
taxPoint
*
100
,
...
rest
})),
currencyType
:
res
.
data
?.
currencyType
,
remark
:
res
.
data
?.
remark
,
});
setPartnerTypes
(
res
.
data
?.
partnerTypes
.
map
((
item
)
=>
({
value
:
item
.
id
,
...
...
@@ -205,6 +243,17 @@ const MemberDocCategory: React.FC<DocCategoryProps> = (props: DocCategoryProps)
{
title
:
intl
.
formatMessage
({
id
:
'member.components.MemberDocCategory.partnerTypeName'
}),
value
:
dataSource
?.
partnerTypeName
||
''
,
},
{
title
:
'币别'
,
value
:
dataSource
?.
currencyTypeName
||
''
,
columnProps
:
{
span
:
2
,
},
},
{
title
:
'备注'
,
value
:
dataSource
?.
remark
||
''
,
columnProps
:
{
span
:
3
,
},
...
...
@@ -219,12 +268,21 @@ const MemberDocCategory: React.FC<DocCategoryProps> = (props: DocCategoryProps)
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'member.components.MemberDocCategory.category.name'
})
}
>
{
item
.
details
?.
map
((
item
)
=>
item
.
name
).
join
(
' / '
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"预付款"
>
{
item
.
advanceChargeName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"结算单据"
>
{
item
.
settlementDocumentsName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'member.components.MemberDocCategory.category.paymentDay'
})
}
>
{
`${item.payTypeName} `
}
{
item
.
month
?
`${intl.formatMessage({ id: 'member.components.MemberDocCategory.month' }, { month: item.month })}`
:
''
}
{
item
.
monthDay
?
`${intl.formatMessage({ id: 'member.components.MemberDocCategory.monthDay' }, { monthDay: item.monthDay })}`
:
''
}
{
item
.
days
?
`${intl.formatMessage({ id: 'member.components.MemberDocCategory.days' }, { days: item.days })}`
:
''
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"付款方式"
>
{
item
.
paymentTypeName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'member.components.MemberDocCategory.category.invoiceTypeName'
})
}
>
{
item
.
invoiceTypeName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'member.components.MemberDocCategory.category.taxPoint'
})
}
>
{
item
.
taxPoint
}
%
</
Descriptions
.
Item
>
</
Descriptions
>
...
...
src/pages/member/components/ModifyClassifyDrawer/index.tsx
View file @
2b5aba38
...
...
@@ -80,6 +80,18 @@ type CategoriesType = {
* 税点,只要百分比的分子部分,不要转换为小数
*/
taxPoint
:
number
,
/**
* 预付款
*/
advanceCharge
:
number
,
/**
* 结算单据
*/
settlementDocuments
:
number
,
/**
* 付款方式
*/
paymentType
:
number
,
}
export
type
ValueType
=
{
...
...
@@ -105,6 +117,14 @@ export type ValueType = {
cityCode
:
string
,
}[],
/**
* 币别
*/
currencyType
:
number
,
/**
* 备注
*/
remark
:
string
,
/**
* 主营品类列表
*/
categories
:
CategoriesType
[],
...
...
@@ -159,6 +179,18 @@ export interface FormValueType extends Omit<ValueType, ('maxAmount' | 'categorie
* 税点,只要百分比的分子部分,不要转换为小数
*/
taxPoint
:
number
,
/**
* 预付款
*/
advanceCharge
:
number
,
/**
* 结算单据
*/
settlementDocuments
:
number
,
/**
* 付款方式
*/
paymentType
:
number
,
}[],
}
...
...
@@ -278,6 +310,9 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
days
:
item
.
days
?
+
item
.
days
:
undefined
,
invoiceType
:
item
.
invoiceType
,
taxPoint
:
+
item
.
taxPoint
,
advanceCharge
:
item
.
advanceCharge
,
settlementDocuments
:
item
.
settlementDocuments
,
paymentType
:
item
.
paymentType
,
};
});
onSubmit
({
...
...
@@ -466,7 +501,14 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
// 请求结算方式与发票类型数据
ITEMS_API_MAP
[
isVerify
]().
then
(
res
=>
{
if
(
res
.
code
===
1000
&&
res
.
data
)
{
const
{
payTypes
=
[],
invoiceTypes
}
=
res
.
data
;
const
{
payTypes
=
[],
invoiceTypes
=
[],
advanceCharges
=
[],
paymentTypes
=
[],
settlementDocuments
=
[],
currencyTypes
=
[],
}
=
res
.
data
;
formActions
.
setFieldState
(
'categories.*.payType'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.enum'
,
payTypes
.
map
((
item
)
=>
({
label
:
item
.
payTypeName
,
...
...
@@ -479,6 +521,30 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
value
:
item
.
invoiceType
,
})));
});
formActions
.
setFieldState
(
'categories.*.advanceCharge'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.enum'
,
advanceCharges
.
map
((
item
)
=>
({
label
:
item
.
advanceChargeTypeName
,
value
:
item
.
advanceChargeType
,
})));
});
formActions
.
setFieldState
(
'categories.*.paymentType'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.enum'
,
paymentTypes
.
map
((
item
)
=>
({
label
:
item
.
paymentTypeName
,
value
:
item
.
paymentType
,
})));
});
formActions
.
setFieldState
(
'categories.*.settlementDocuments'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.enum'
,
settlementDocuments
.
map
((
item
)
=>
({
label
:
item
.
settlementDocumentsTypeName
,
value
:
item
.
settlementDocumentsType
,
})));
});
formActions
.
setFieldState
(
'currencyType'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.enum'
,
currencyTypes
.
map
((
item
)
=>
({
label
:
item
.
currencyTypeName
,
value
:
item
.
currencyType
,
})));
});
}
}).
catch
((
err
)
=>
{
console
.
warn
(
err
);
...
...
src/pages/member/components/ModifyClassifyDrawer/schema.ts
View file @
2b5aba38
...
...
@@ -104,6 +104,30 @@ export const schema: ISchema = {
}
}
},
currencyType
:
{
type
:
'string'
,
title
:
'币别'
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'请选择'
,
},
required
:
true
,
},
remark
:
{
type
:
'string'
,
title
:
'备注'
,
'x-component'
:
'Textarea'
,
'x-component-props'
:
{
placeholder
:
'在此输入你的内容,最长200个字符,100个汉字'
,
rows
:
5
,
},
'x-rules'
:
[
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
200
,
}
],
},
categories
:
{
type
:
'array'
,
title
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.classify.categories'
}),
...
...
@@ -176,6 +200,29 @@ export const schema: ISchema = {
// },
// },
// },
advanceCharge
:
{
type
:
'string'
,
'x-component'
:
'Radio'
,
enum
:
[],
title
:
'预付款'
,
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择预付款'
,
},
],
},
settlementDocuments
:
{
type
:
'string'
,
title
:
'结算单据'
,
enum
:
[],
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择结算单据'
,
},
],
},
payType
:
{
type
:
'string'
,
enum
:
[],
...
...
@@ -297,6 +344,17 @@ export const schema: ISchema = {
},
visible
:
false
,
},
paymentType
:
{
type
:
'string'
,
title
:
'付款方式'
,
enum
:
[],
'x-rules'
:
[
{
required
:
true
,
message
:
'请选择付款方式'
,
},
],
},
invoiceType
:
{
type
:
'string'
,
enum
:
[],
...
...
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