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
linweijiong
jinfa-platform
Commits
dd9130c3
Commit
dd9130c3
authored
Dec 17, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2
parents
ac1e43d0
dc8487d7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
1101 additions
and
399 deletions
+1101
-399
payment.ts
src/constants/payment.ts
+180
-181
settlement.ts
src/constants/settlement.ts
+18
-0
member.ts
src/locales/en-US/member.ts
+2
-1
components.ts
src/locales/ko-KR/afterService/components.ts
+5
-0
member.ts
src/locales/ko-KR/member.ts
+1
-0
components.ts
src/locales/zh-CN/afterService/components.ts
+5
-0
member.ts
src/locales/zh-CN/member.ts
+2
-1
index.less
src/pages/afterService/components/RefundModal/COD/index.less
+4
-2
index.less
...ervice/components/RefundModal/MonthlyStatement/index.less
+27
-0
index.tsx
...Service/components/RefundModal/MonthlyStatement/index.tsx
+65
-0
index.less
...fterService/components/RefundModal/PaymentDays/index.less
+27
-0
index.tsx
...afterService/components/RefundModal/PaymentDays/index.tsx
+65
-0
index.tsx
src/pages/afterService/components/RefundModal/index.tsx
+24
-0
index.tsx
src/pages/afterService/components/ReturnDetailInfo/index.tsx
+35
-3
index.tsx
src/pages/contract/coordination/details/index.tsx
+0
-0
index.tsx
...ges/contract/coordination/pageToBeSubmitExamine/index.tsx
+9
-9
index.tsx
src/pages/member/components/MemberDocCategory/index.tsx
+54
-12
index.tsx
src/pages/member/components/ModifyClassifyDrawer/index.tsx
+154
-69
schema.ts
src/pages/member/components/ModifyClassifyDrawer/schema.ts
+111
-32
index.tsx
...rComingClassify/components/ComingClassifyDrawer/index.tsx
+148
-48
index.ts
...gClassify/components/ComingClassifyDrawer/schema/index.ts
+111
-32
utils.tsx
src/pages/member/utils.tsx
+41
-0
index.tsx
src/pages/mobileTemplate/ownMallTemplateEdit/index.tsx
+13
-9
No files found.
src/constants/payment.ts
View file @
dd9130c3
...
...
@@ -15,105 +15,105 @@
/**
* 待提交审核
*/
export
const
CREDIT_INNER_STATUS_UNCOMMITTED
=
1
;
/**
* 提交审核失败
*/
export
const
CREDIT_INNER_STATUS_COMMITTED_FAILED
=
2
;
/**
* 提交审核成功
*/
export
const
CREDIT_INNER_STATUS_COMMITTED_SUCCESS
=
3
;
/**
* 一级审核失败
*/
export
const
CREDIT_INNER_STATUS_FAILED_1
=
4
;
/**
* 一级审核通过
*/
export
const
CREDIT_INNER_STATUS_SUCCESS_1
=
5
;
/**
* 二级审核失败
*/
export
const
CREDIT_INNER_STATUS_FAILED_2
=
6
;
/**
* 二级审核通过
*/
export
const
CREDIT_INNER_STATUS_SUCCESS_2
=
7
;
/**
* 三级审核失败
*/
export
const
CREDIT_INNER_STATUS_FAILED_3
=
8
;
/**
* 三级审核通过
*/
export
const
CREDIT_INNER_STATUS_SUCCESS_3
=
9
;
/**
* 审核不通过
*/
export
const
CREDIT_INNER_STATUS_FAILED
=
10
;
/**
* 审核通过
*/
export
const
CREDIT_INNER_STATUS_CONFIRM_SUCCESS
=
11
;
export
const
CREDIT_INNER_STATUS
=
{
[
CREDIT_INNER_STATUS_UNCOMMITTED
]:
'待提交审核'
,
[
CREDIT_INNER_STATUS_COMMITTED_FAILED
]:
'提交审核失败'
,
[
CREDIT_INNER_STATUS_COMMITTED_SUCCESS
]:
'提交审核成功'
,
[
CREDIT_INNER_STATUS_FAILED_1
]:
'一级审核失败'
,
[
CREDIT_INNER_STATUS_SUCCESS_1
]:
'一级审核通过'
,
[
CREDIT_INNER_STATUS_FAILED_2
]:
'二级审核失败'
,
[
CREDIT_INNER_STATUS_SUCCESS_2
]:
'二级审核通过'
,
[
CREDIT_INNER_STATUS_FAILED_3
]:
'三级审核失败'
,
[
CREDIT_INNER_STATUS_SUCCESS_3
]:
'三级审核通过'
,
[
CREDIT_INNER_STATUS_FAILED
]:
'审核不通过'
,
[
CREDIT_INNER_STATUS_CONFIRM_SUCCESS
]:
'审核通过'
,
};
export
const
CREDIT_INNER_STATUS_UNCOMMITTED
=
1
;
/**
* 提交审核失败
*/
export
const
CREDIT_INNER_STATUS_COMMITTED_FAILED
=
2
;
/**
* 提交审核成功
*/
export
const
CREDIT_INNER_STATUS_COMMITTED_SUCCESS
=
3
;
/**
* 一级审核失败
*/
export
const
CREDIT_INNER_STATUS_FAILED_1
=
4
;
/**
* 一级审核通过
*/
export
const
CREDIT_INNER_STATUS_SUCCESS_1
=
5
;
/**
* 二级审核失败
*/
export
const
CREDIT_INNER_STATUS_FAILED_2
=
6
;
/**
* 二级审核通过
*/
export
const
CREDIT_INNER_STATUS_SUCCESS_2
=
7
;
/**
* 三级审核失败
*/
export
const
CREDIT_INNER_STATUS_FAILED_3
=
8
;
/**
* 三级审核通过
*/
export
const
CREDIT_INNER_STATUS_SUCCESS_3
=
9
;
/**
* 审核不通过
*/
export
const
CREDIT_INNER_STATUS_FAILED
=
10
;
/**
* 审核通过
*/
export
const
CREDIT_INNER_STATUS_CONFIRM_SUCCESS
=
11
;
export
const
CREDIT_INNER_STATUS
=
{
[
CREDIT_INNER_STATUS_UNCOMMITTED
]:
'待提交审核'
,
[
CREDIT_INNER_STATUS_COMMITTED_FAILED
]:
'提交审核失败'
,
[
CREDIT_INNER_STATUS_COMMITTED_SUCCESS
]:
'提交审核成功'
,
[
CREDIT_INNER_STATUS_FAILED_1
]:
'一级审核失败'
,
[
CREDIT_INNER_STATUS_SUCCESS_1
]:
'一级审核通过'
,
[
CREDIT_INNER_STATUS_FAILED_2
]:
'二级审核失败'
,
[
CREDIT_INNER_STATUS_SUCCESS_2
]:
'二级审核通过'
,
[
CREDIT_INNER_STATUS_FAILED_3
]:
'三级审核失败'
,
[
CREDIT_INNER_STATUS_SUCCESS_3
]:
'三级审核通过'
,
[
CREDIT_INNER_STATUS_FAILED
]:
'审核不通过'
,
[
CREDIT_INNER_STATUS_CONFIRM_SUCCESS
]:
'审核通过'
,
};
// 授信内部状态(下级)
// 授信内部状态(下级)
/**
* 待提交
*/
export
const
CREDIT_INNER_STATUS_UNCOMMITTED_PURCHASER
=
1
;
/**
* 已提交
*/
export
const
CREDIT_INNER_STATUS_COMMITTED_PURCHASER
=
2
;
export
const
CREDIT_INNER_STATUS_PURCHASER
=
{
[
CREDIT_INNER_STATUS_UNCOMMITTED_PURCHASER
]:
'待提交'
,
[
CREDIT_INNER_STATUS_COMMITTED_PURCHASER
]:
'已提交'
,
};
/**
* 待提交
*/
export
const
CREDIT_INNER_STATUS_UNCOMMITTED_PURCHASER
=
1
;
/**
* 已提交
*/
export
const
CREDIT_INNER_STATUS_COMMITTED_PURCHASER
=
2
;
export
const
CREDIT_INNER_STATUS_PURCHASER
=
{
[
CREDIT_INNER_STATUS_UNCOMMITTED_PURCHASER
]:
'待提交'
,
[
CREDIT_INNER_STATUS_COMMITTED_PURCHASER
]:
'已提交'
,
};
// 授信外部状态
// 授信外部状态
/**
* 待提交
*/
export
const
CREDIT_OUTER_STATUS_UNCOMMITTED
=
1
;
/**
* 待确认
*/
export
const
CREDIT_OUTER_STATUS_UNCONFIRMED
=
2
;
/**
* 接受申请
*/
export
const
CREDIT_OUTER_STATUS_SUCCESS
=
3
;
/**
* 不接受申请
*/
export
const
CREDIT_OUTER_STATUS_FAILED
=
4
;
export
const
CREDIT_OUTER_STATUS
=
{
[
CREDIT_OUTER_STATUS_UNCOMMITTED
]:
'待提交'
,
[
CREDIT_OUTER_STATUS_UNCONFIRMED
]:
'待确认'
,
[
CREDIT_OUTER_STATUS_SUCCESS
]:
'接受申请'
,
[
CREDIT_OUTER_STATUS_FAILED
]:
'不接受申请'
,
};
/**
* 待提交
*/
export
const
CREDIT_OUTER_STATUS_UNCOMMITTED
=
1
;
/**
* 待确认
*/
export
const
CREDIT_OUTER_STATUS_UNCONFIRMED
=
2
;
/**
* 接受申请
*/
export
const
CREDIT_OUTER_STATUS_SUCCESS
=
3
;
/**
* 不接受申请
*/
export
const
CREDIT_OUTER_STATUS_FAILED
=
4
;
export
const
CREDIT_OUTER_STATUS
=
{
[
CREDIT_OUTER_STATUS_UNCOMMITTED
]:
'待提交'
,
[
CREDIT_OUTER_STATUS_UNCONFIRMED
]:
'待确认'
,
[
CREDIT_OUTER_STATUS_SUCCESS
]:
'接受申请'
,
[
CREDIT_OUTER_STATUS_FAILED
]:
'不接受申请'
,
};
// 授信还款状态
// 授信还款状态
/**
* 账单待还
...
...
@@ -144,28 +144,28 @@ export const CREDIT_REPAYMENT_STATUS = {
/**
* 未申请
*/
export
const
CREDIT_STATUS_NOT_APPLIED
=
1
;
/**
* 申请中
*/
export
const
CREDIT_STATUS_APPLYING
=
2
;
/**
* 正常
*/
export
const
CREDIT_STATUS_NORMAL
=
3
;
/**
* 已冻结
*/
export
const
CREDIT_STATUS_FROZEN
=
4
;
export
const
CREDIT_STATUS
=
{
[
CREDIT_STATUS_NOT_APPLIED
]:
'未申请'
,
[
CREDIT_STATUS_APPLYING
]:
'申请中'
,
[
CREDIT_STATUS_NORMAL
]:
'正常'
,
[
CREDIT_STATUS_FROZEN
]:
'已冻结'
,
};
export
const
CREDIT_STATUS_NOT_APPLIED
=
1
;
/**
* 申请中
*/
export
const
CREDIT_STATUS_APPLYING
=
2
;
/**
* 正常
*/
export
const
CREDIT_STATUS_NORMAL
=
3
;
/**
* 已冻结
*/
export
const
CREDIT_STATUS_FROZEN
=
4
;
export
const
CREDIT_STATUS
=
{
[
CREDIT_STATUS_NOT_APPLIED
]:
'未申请'
,
[
CREDIT_STATUS_APPLYING
]:
'申请中'
,
[
CREDIT_STATUS_NORMAL
]:
'正常'
,
[
CREDIT_STATUS_FROZEN
]:
'已冻结'
,
};
// 账单交易项目
// 账单交易项目
/**
* 订单支付
...
...
@@ -189,50 +189,49 @@ export const BILL_TRADE_OPERATION = {
// 支付渠道
/**
* 无需支付
*/
export
const
PAY_CHANNEL_FREE
=
0
;
/**
* 支付宝
*/
export
const
PAY_CHANNEL_ALI
=
1
;
/**
* 微信
*/
export
const
PAY_CHANNEL_WECHAT
=
2
;
/**
* 银联
*/
export
const
PAY_CHANNEL_UNION
=
3
;
/**
* 余额
*/
export
const
PAY_CHANNEL_BALANCE
=
4
;
/**
* 线下支付线上确认
*/
export
const
PAY_CHANNEL_OFFLINE
=
5
;
/**
* 授信
*/
export
const
PAY_CHANNEL_CREDIT
=
6
;
/**
* 货到付款
*/
export
const
PAY_CHANNEL_COD
=
7
;
/**
* 月结
*/
export
const
PAY_CHANNEL_MONTHLY_STATEMENT
=
8
;
/**
* 账期
*/
export
const
PAY_CHANNEL_PAYMENT_DAYS
=
9
;
/**
* 积分支付
*/
export
const
PAY_CHANNEL_INTEGRAL
=
0
;
/**
* 支付宝
*/
export
const
PAY_CHANNEL_ALI
=
1
;
/**
* 微信
*/
export
const
PAY_CHANNEL_WECHAT
=
2
;
/**
* 银联
*/
export
const
PAY_CHANNEL_UNION
=
3
;
/**
* 余额
*/
export
const
PAY_CHANNEL_BALANCE
=
4
;
/**
* 线下支付线上确认
*/
export
const
PAY_CHANNEL_OFFLINE
=
5
;
/**
* 授信
*/
export
const
PAY_CHANNEL_CREDIT
=
6
;
/**
* 货到付款
*/
export
const
PAY_CHANNEL_COD
=
7
;
/**
* 支付渠道对应中文
*/
export
const
PAY_CHANNEL
=
{
[
PAY_CHANNEL_INTEGRAL
]:
'积分支付'
,
[
PAY_CHANNEL_ALI
]:
'支付宝'
,
[
PAY_CHANNEL_WECHAT
]:
'微信'
,
[
PAY_CHANNEL_UNION
]:
'银联'
,
[
PAY_CHANNEL_BALANCE
]:
'余额'
,
[
PAY_CHANNEL_OFFLINE
]:
'线下支付线上确认'
,
[
PAY_CHANNEL_CREDIT
]:
'授信'
,
[
PAY_CHANNEL_COD
]:
'货到付款'
,
};
export
const
PAY_CHANNEL_INTEGRAL
=
10
;
...
...
@@ -241,35 +240,35 @@ export const BILL_TRADE_OPERATION = {
/**
* 线上支付
*/
export
const
PAY_WAY_ONLINE
=
1
;
/**
* 线下支付
*/
export
const
PAY_WAY_OFFLINE
=
2
;
/**
* 授信支付
*/
export
const
PAY_WAY_CREDIT
=
3
;
/**
* 货到付款
*/
export
const
PAY_WAY_COD
=
4
;
/**
* 账期
*/
export
const
PAY_WAY_DEADLINE
=
5
;
/**
* 月结
*/
export
const
PAY_WAY_MONTH
=
6
;
/**
* 合同内清算
*/
export
const
PAY_WAY_CONTRACT
=
7
;
/**
* 支付方式对应中文
export
const
PAY_WAY_ONLINE
=
1
;
/**
* 线下支付
*/
export
const
PAY_WAY_OFFLINE
=
2
;
/**
* 授信支付
*/
export
const
PAY_WAY_CREDIT
=
3
;
/**
* 货到付款
*/
export
const
PAY_WAY_COD
=
4
;
/**
* 账期
*/
export
const
PAY_WAY_DEADLINE
=
5
;
/**
* 月结
*/
export
const
PAY_WAY_MONTH
=
6
;
/**
* 合同内清算
*/
export
const
PAY_WAY_CONTRACT
=
7
;
/**
* 支付方式对应中文
*/
export
const
PAYWAY
=
{
[
PAY_WAY_ONLINE
]:
'线上支付'
,
[
PAY_WAY_OFFLINE
]:
'线下支付'
,
...
...
src/constants/settlement.ts
0 → 100644
View file @
dd9130c3
/* --------------------------------- 结算方式 -------------------------------- */
/**
* 现结
*/
export
const
PAY_TYPE_CASH
=
1
;
/**
* 账期(按天)
*/
export
const
PAY_TYPE_PAYMENT_DAYS_DAY
=
2
;
/**
* 账期(按月)
*/
export
const
PAY_TYPE_PAYMENT_DAYS_MONTH
=
3
;
/**
* 月结
*/
export
const
PAY_TYPE_MONTHLY_STATEMENT
=
4
;
\ No newline at end of file
src/locales/en-US/member.ts
View file @
dd9130c3
...
...
@@ -528,8 +528,9 @@ export default {
'member.components.MemberDocCategory.partnerTypeName'
:
'Membership'
,
'member.components.MemberDocCategory.category'
:
'Main category'
,
'member.components.MemberDocCategory.category.name'
:
'Category'
,
'member.components.MemberDocCategory.category.paymentDay'
:
'
Payment cycle (days)
'
,
'member.components.MemberDocCategory.category.paymentDay'
:
'
결제 방식
'
,
'member.components.MemberDocCategory.category.invoiceTypeName'
:
'Invoice Type'
,
'member.components.MemberDocCategory.category.taxPoint'
:
'Tax Point'
,
'member.components.MemberDocCategory.title'
:
'Category Information'
,
'member.components.MemberDocCategory.edit'
:
'Modify'
,
'member.components.MemberDocCategory.edit.message'
:
'Submitting, please wait...'
,
...
...
src/locales/ko-KR/afterService/components.ts
View file @
dd9130c3
...
...
@@ -161,6 +161,11 @@ export default {
'afterService.components.UploadPaymentVoucher.bankDeposit'
:
'계좌 개설 은행'
,
'afterService.components.UploadPaymentVoucher.fileList'
:
'환불 증명서 업로드'
,
'afterService.components.UploadPaymentVoucher.fileList.required'
:
'환불 증명서를 올려주세요.'
,
'afterService.components.MonthlyStatement.title'
:
'월 정산 지급 환불 확인'
,
'afterService.components.MonthlyStatement.payChannel'
:
'지불 경로'
,
'afterService.components.MonthlyStatement.tip'
:
'지불방식은 월결산 주문으로, 사용자가 환불방식과 환불금액을 확인한후 시스템은 지불절차에 따라 환불작업이 완성된다. 실제 자금의 환불은 거래 쌍방이 결산절차를 통해 처리한다.'
,
'afterService.components.PaymentDays.title'
:
'정기 지급 환불 확인'
,
'afterService.components.PaymentDays.tip'
:
'지불방식은 계정기간의 주문으로, 사용자가 환불방식과 환불금액을 확인한후 시스템은 지불절차에 따라 환불동작을 완성한다. 실제 자금의 환불은 거래 쌍방이 결산과정을 통해 처리한다.'
,
'afterService.components.RepairAddressInfo.title'
:
'수리 주소'
,
...
...
src/locales/ko-KR/member.ts
View file @
dd9130c3
...
...
@@ -530,6 +530,7 @@ export default {
'member.components.MemberDocCategory.category.name'
:
'종류'
,
'member.components.MemberDocCategory.category.paymentDay'
:
'결제 주기(일)'
,
'member.components.MemberDocCategory.category.invoiceTypeName'
:
'청구서 유형'
,
'member.components.MemberDocCategory.category.taxPoint'
:
'세점'
,
'member.components.MemberDocCategory.title'
:
'분류 정보'
,
'member.components.MemberDocCategory.edit'
:
'수정'
,
'member.components.MemberDocCategory.edit.message'
:
'커밋 중입니다. 잠시 기다려 주십시오...'
,
...
...
src/locales/zh-CN/afterService/components.ts
View file @
dd9130c3
...
...
@@ -161,6 +161,11 @@ export default {
'afterService.components.UploadPaymentVoucher.bankDeposit'
:
'开户行'
,
'afterService.components.UploadPaymentVoucher.fileList'
:
'上传退款凭证'
,
'afterService.components.UploadPaymentVoucher.fileList.required'
:
'请上传退款凭证'
,
'afterService.components.MonthlyStatement.title'
:
'月结支付退款确认'
,
'afterService.components.MonthlyStatement.payChannel'
:
'支付渠道'
,
'afterService.components.MonthlyStatement.tip'
:
'支付方式为月结的订单,用户确认退款方式与退款金额后,系统会按照支付流程来完成退款动作,实际资金的退款由交易双方通过结算流程处理。'
,
'afterService.components.PaymentDays.title'
:
'账期支付退款确认'
,
'afterService.components.PaymentDays.tip'
:
'支付方式为账期的订单,用户确认退款方式与退款金额后,系统会按照支付流程来完成退款动作,实际资金的退款由交易双方通过结算流程处理。'
,
'afterService.components.RepairAddressInfo.title'
:
'维修地址'
,
...
...
src/locales/zh-CN/member.ts
View file @
dd9130c3
...
...
@@ -528,8 +528,9 @@ export default {
'member.components.MemberDocCategory.partnerTypeName'
:
'会员关系'
,
'member.components.MemberDocCategory.category'
:
'主营品类'
,
'member.components.MemberDocCategory.category.name'
:
'品类'
,
'member.components.MemberDocCategory.category.paymentDay'
:
'
付款周期(天)
'
,
'member.components.MemberDocCategory.category.paymentDay'
:
'
结算方式
'
,
'member.components.MemberDocCategory.category.invoiceTypeName'
:
'发票类型'
,
'member.components.MemberDocCategory.category.taxPoint'
:
'税点'
,
'member.components.MemberDocCategory.title'
:
'分类信息'
,
'member.components.MemberDocCategory.edit'
:
'修改'
,
'member.components.MemberDocCategory.edit.message'
:
'正在提交,请稍候...'
,
...
...
src/pages/afterService/components/RefundModal/COD/index.less
View file @
dd9130c3
...
...
@@ -19,7 +19,8 @@
.tip {
padding: @padding-xss @padding-xs;
color: @primary-color;
background-color: color(~`colorPalette('@{primary-color}', 0.04) `);
color: @text-color-secondary;
background-color: @background-color-light;
border-radius: 4px;
}
}
\ No newline at end of file
src/pages/afterService/components/RefundModal/MonthlyStatement/index.less
0 → 100644
View file @
dd9130c3
@import '~antd/es/style/themes/default.less';
.monthly-statement {
:global {
.ant-descriptions-item-container {
align-items: center;
}
}
.amount {
font-size: @font-size-lg;
font-weight: 500;
&-plus {
color: @error-color;
font-size: 24px;
}
}
.tip {
padding: @padding-xss @padding-xs;
color: @text-color-secondary;
background-color: @background-color-light;
border-radius: 4px;
}
}
\ No newline at end of file
src/pages/afterService/components/RefundModal/MonthlyStatement/index.tsx
0 → 100644
View file @
dd9130c3
import
React
from
'react'
;
import
{
useIntl
}
from
'umi'
;
import
{
Descriptions
,
Divider
}
from
'antd'
;
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
styles
from
'./index.less'
;
interface
MonthlyStatementProps
{
/**
* 弹窗需要的数据值
*/
value
:
{
/**
* 退款金额
*/
refundAmount
:
number
,
/**
* 支付方式
*/
payWay
:
string
,
/**
* 支付渠道
*/
payChannel
:
string
,
};
};
const
MonthlyStatement
:
React
.
FC
<
MonthlyStatementProps
>
=
({
value
,
})
=>
{
const
intl
=
useIntl
();
return
(
<
div
className=
{
styles
[
'monthly-statement'
]
}
>
<
Descriptions
column=
{
1
}
>
<
Descriptions
.
Item
label=
{
`${intl.formatMessage({ id: 'afterService.components.RefundModal.refundAmount' }, { default: '当前退款金额' })}(${intl.formatMessage({ id: 'common.money.yuan' }, { default: '元' })})`
}
>
<
span
className=
{
styles
[
'amount-plus'
]
}
>
{
`${intl.formatMessage({ id: 'common.money' }, { default: '¥' })}${priceFormat(value.refundAmount)}`
}
</
span
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'afterService.components.COD.payType'
},
{
default
:
'支付方式'
})
}
style=
{
{
paddingBottom
:
0
,
}
}
>
{
value
.
payWay
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'afterService.components.MonthlyStatement.payChannel'
},
{
default
:
'支付渠道'
})
}
style=
{
{
paddingBottom
:
0
,
}
}
>
{
value
.
payChannel
}
</
Descriptions
.
Item
>
</
Descriptions
>
<
Divider
dashed
/>
<
p
className=
{
styles
.
tip
}
>
{
intl
.
formatMessage
({
id
:
'afterService.components.MonthlyStatement.tip'
},
{
default
:
'支付方式为月结的订单,用户确认退款方式与退款金额后,系统会按照支付流程来完成退款动作,实际资金的退款由交易双方通过结算流程处理。'
})
}
</
p
>
</
div
>
)
};
export
default
MonthlyStatement
;
\ No newline at end of file
src/pages/afterService/components/RefundModal/PaymentDays/index.less
0 → 100644
View file @
dd9130c3
@import '~antd/es/style/themes/default.less';
.payment-days {
:global {
.ant-descriptions-item-container {
align-items: center;
}
}
.amount {
font-size: @font-size-lg;
font-weight: 500;
&-plus {
color: @error-color;
font-size: 24px;
}
}
.tip {
padding: @padding-xss @padding-xs;
color: @text-color-secondary;
background-color: @background-color-light;
border-radius: 4px;
}
}
\ No newline at end of file
src/pages/afterService/components/RefundModal/PaymentDays/index.tsx
0 → 100644
View file @
dd9130c3
import
React
from
'react'
;
import
{
useIntl
}
from
'umi'
;
import
{
Descriptions
,
Divider
}
from
'antd'
;
import
{
priceFormat
}
from
'@/utils/numberFomat'
;
import
styles
from
'./index.less'
;
interface
MonthlyStatementProps
{
/**
* 弹窗需要的数据值
*/
value
:
{
/**
* 退款金额
*/
refundAmount
:
number
,
/**
* 支付方式
*/
payWay
:
string
,
/**
* 支付渠道
*/
payChannel
:
string
,
};
};
const
MonthlyStatement
:
React
.
FC
<
MonthlyStatementProps
>
=
({
value
,
})
=>
{
const
intl
=
useIntl
();
return
(
<
div
className=
{
styles
[
'payment-days'
]
}
>
<
Descriptions
column=
{
1
}
>
<
Descriptions
.
Item
label=
{
`${intl.formatMessage({ id: 'afterService.components.RefundModal.refundAmount' }, { default: '当前退款金额' })}(${intl.formatMessage({ id: 'common.money.yuan' }, { default: '元' })})`
}
>
<
span
className=
{
styles
[
'amount-plus'
]
}
>
{
`${intl.formatMessage({ id: 'common.money' }, { default: '¥' })}${priceFormat(value.refundAmount)}`
}
</
span
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'afterService.components.COD.payType'
},
{
default
:
'支付方式'
})
}
style=
{
{
paddingBottom
:
0
,
}
}
>
{
value
.
payWay
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'afterService.components.MonthlyStatement.payChannel'
},
{
default
:
'支付渠道'
})
}
style=
{
{
paddingBottom
:
0
,
}
}
>
{
value
.
payChannel
}
</
Descriptions
.
Item
>
</
Descriptions
>
<
Divider
dashed
/>
<
p
className=
{
styles
.
tip
}
>
{
intl
.
formatMessage
({
id
:
'afterService.components.PaymentDays.tip'
},
{
default
:
'支付方式为账期的订单,用户确认退款方式与退款金额后,系统会按照支付流程来完成退款动作,实际资金的退款由交易双方通过结算流程处理。'
})
}
</
p
>
</
div
>
)
};
export
default
MonthlyStatement
;
\ No newline at end of file
src/pages/afterService/components/RefundModal/index.tsx
View file @
dd9130c3
...
...
@@ -5,6 +5,8 @@ import { useIntl } from 'umi';
const
Balance
=
React
.
lazy
(()
=>
import
(
'./Balance'
));
const
Credit
=
React
.
lazy
(()
=>
import
(
'./Credit'
));
const
COD
=
React
.
lazy
(()
=>
import
(
'./COD'
));
const
MonthlyStatement
=
React
.
lazy
(()
=>
import
(
'./MonthlyStatement'
));
const
PaymentDays
=
React
.
lazy
(()
=>
import
(
'./PaymentDays'
));
export
interface
RefundModalProps
{
/**
...
...
@@ -91,6 +93,28 @@ const RefundModal: React.FC<RefundModalProps> = ({
</
Suspense
>
),
},
monthlyStatement
:
{
width
:
600
,
title
:
intl
.
formatMessage
({
id
:
'afterService.components.MonthlyStatement.title'
},
{
default
:
'月结支付退款确认'
}),
render
:
()
=>
(
<
Suspense
fallback=
{
null
}
>
<
MonthlyStatement
value=
{
rest
as
any
}
/>
</
Suspense
>
),
},
paymentDays
:
{
width
:
600
,
title
:
intl
.
formatMessage
({
id
:
'afterService.components.PaymentDays.title'
},
{
default
:
'账期支付退款确认'
}),
render
:
()
=>
(
<
Suspense
fallback=
{
null
}
>
<
PaymentDays
value=
{
rest
as
any
}
/>
</
Suspense
>
),
},
};
const
template
=
tempMap
[
modalName
]
||
{
...
...
src/pages/afterService/components/ReturnDetailInfo/index.tsx
View file @
dd9130c3
...
...
@@ -19,7 +19,9 @@ import {
PAY_CHANNEL_OFFLINE
,
PAY_CHANNEL_BALANCE
,
PAY_CHANNEL_CREDIT
,
PAY_CHANNEL_COD
,
PAY_CHANNEL_COD
,
PAY_CHANNEL_MONTHLY_STATEMENT
,
PAY_CHANNEL_PAYMENT_DAYS
,
}
from
'@/constants/payment'
;
import
{
RETURN_OUTER_STATUS_TO_BE_REFUNDED
,
...
...
@@ -67,6 +69,14 @@ type RefundModalValueType = {
* 供应会员角色id
*/
supplierRoleId
?:
number
,
/**
* 支付方式
*/
payWay
?:
string
,
/**
* 支付渠道
*/
payChannel
?:
string
,
}
interface
ReturnDetailInfoProps
extends
MellowCardProps
{
...
...
@@ -216,7 +226,15 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
},
];
const
handleRefund
=
(
id
,
channel
,
amount
)
=>
{
/**
* 打开确认退款弹窗
* @param id 退款id
* @param channel 支付渠道
* @param amount 退款金额
* @param payWayName 支付方式名称
* @param channelName 支付渠道名称
*/
const
handleRefund
=
(
id
,
channel
,
amount
,
payWayName
,
channelName
)
=>
{
switch
(
channel
)
{
// 余额支付
case
PAY_CHANNEL_BALANCE
:
{
...
...
@@ -261,6 +279,20 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
setRefundModalValue
({
id
,
refundAmount
:
amount
});
break
;
};
// 月结
case
PAY_CHANNEL_MONTHLY_STATEMENT
:
{
setModalName
(
'monthlyStatement'
);
setRefundModalVisible
(
true
);
setRefundModalValue
({
id
,
refundAmount
:
amount
,
payWay
:
payWayName
,
payChannel
:
channelName
});
break
;
};
// 账期
case
PAY_CHANNEL_PAYMENT_DAYS
:
{
setModalName
(
'paymentDays'
);
setRefundModalVisible
(
true
);
setRefundModalValue
({
id
,
refundAmount
:
amount
,
payWay
:
payWayName
,
payChannel
:
channelName
});
break
;
};
default
:
{
if
(
onRefund
)
{
confirm
({
...
...
@@ -385,7 +417,7 @@ const ReturnDetailInfo: React.FC<ReturnDetailInfoProps> = ({
)
&&
(
<
div
className=
{
styles
[
'deliver-item-return'
]
}
onClick=
{
()
=>
handleRefund
(
item
.
refundId
,
item
.
channel
,
item
.
refundAmount
)
}
onClick=
{
()
=>
handleRefund
(
item
.
refundId
,
item
.
channel
,
item
.
refundAmount
,
item
.
payWayName
,
item
.
channelName
)
}
>
{
intl
.
formatMessage
({
id
:
'afterService.components.ReturnDetailInfo.refund'
},
{
default
:
'退款'
})
}
</
div
>
...
...
src/pages/contract/coordination/details/index.tsx
View file @
dd9130c3
This diff is collapsed.
Click to expand it.
src/pages/contract/coordination/pageToBeSubmitExamine/index.tsx
View file @
dd9130c3
...
...
@@ -29,7 +29,7 @@ const pageToBeSubmitExamine = () => {
return
new
Date
(
Date
.
parse
(
time
.
replace
(
/-/g
,
"/"
))).
getTime
()
/
1000
;
}
const
columns
:
ColumnType
<
any
>
[]
=
[{
title
:
intl
.
formatMessage
({
id
:
'contract.hetongbianhaozhaiyao'
}),
title
:
intl
.
formatMessage
({
id
:
'contract.hetongbianhaozhaiyao'
}),
dataIndex
:
'contractNo'
,
align
:
'left'
,
render
:
(
text
,
record
)
=>
...
...
@@ -42,7 +42,7 @@ const pageToBeSubmitExamine = () => {
<
p
>
{
record
.
contractAbstract
}
</
p
>
</
div
>
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.hetongshengxiaoshixiaoshi'
}),
title
:
intl
.
formatMessage
({
id
:
'contract.hetongshengxiaoshixiaoshi'
}),
dataIndex
:
'startTime'
,
align
:
'left'
,
sorter
:
{
...
...
@@ -56,12 +56,12 @@ const pageToBeSubmitExamine = () => {
</
div
>
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.hetongjiafang'
}),
title
:
intl
.
formatMessage
({
id
:
'contract.hetongjiafang'
}),
dataIndex
:
'partyAName'
,
align
:
'left'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.hetongzongjine'
}),
title
:
intl
.
formatMessage
({
id
:
'contract.hetongzongjine'
}),
dataIndex
:
'totalAmount'
,
align
:
'left'
,
render
:
(
text
)
=>
...
...
@@ -70,7 +70,7 @@ const pageToBeSubmitExamine = () => {
</
div
>
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.duiyingdanjuxunyuanlei'
}),
title
:
intl
.
formatMessage
({
id
:
'contract.duiyingdanjuxunyuanlei'
}),
dataIndex
:
'sourceNo'
,
align
:
'left'
,
render
:
(
text
,
record
)
=>
...
...
@@ -88,7 +88,7 @@ const pageToBeSubmitExamine = () => {
</
div
>
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.waibuzhuangtai'
}),
title
:
intl
.
formatMessage
({
id
:
'contract.waibuzhuangtai'
}),
dataIndex
:
'outerStatusName'
,
align
:
'left'
,
render
:
(
text
)
=>
{
...
...
@@ -98,7 +98,7 @@ const pageToBeSubmitExamine = () => {
}
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.neibuzhuangtai'
}),
title
:
intl
.
formatMessage
({
id
:
'contract.neibuzhuangtai'
}),
dataIndex
:
'innerStatusName'
,
align
:
'left'
,
render
:
(
text
)
=>
{
...
...
@@ -111,13 +111,13 @@ const pageToBeSubmitExamine = () => {
}
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.caozuo'
}),
title
:
intl
.
formatMessage
({
id
:
'contract.caozuo'
}),
dataIndex
:
'innerStatusName'
,
align
:
'left'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
}
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?contractId=${record.id}&type=submitExamine`
)
}
>
{
intl
.
formatMessage
({
id
:
'contract.tijiaoshenhe'
})
}
</
span
>
<
span
style=
{
{
color
:
'#00B37A'
,
cursor
:
'pointer'
}
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/contract/coordination/pageToBeSubmitExamine/details?contractId=${record.id}&type=submitExamine`
)
}
>
{
intl
.
formatMessage
({
id
:
'contract.tijiaoshenhe'
})
}
</
span
>
</
div
>
)
}
...
...
src/pages/member/components/MemberDocCategory/index.tsx
View file @
dd9130c3
...
...
@@ -41,19 +41,52 @@ export type DocCategoryProps = Omit<CustomizeColumnProps, 'data' | 'columns'> &
/**
* 主营品类
*/
categories
:
{
categories
:
{
/**
*
数据
id
*
品类信息
id
*/
id
:
number
,
/**
* 品类
名称
* 品类
列表 ,BusinessCategoryDetailQueryVO
*/
name
:
string
,
details
:
{
/**
* 品类层级
*/
level
?:
number
,
/**
* 品类Id
*/
categoryId
?:
number
,
/**
* 品类名称
*/
name
?:
string
,
}[]
/**
*
付款周期(天)
*
结算方式,1-现结,2-账期(按天),3-账期(按月),4-月结
*/
paymentDay
:
number
,
payType
:
number
,
/**
* 结算方式名称
*/
payTypeName
:
string
,
/**
* 月,结算方式为账期(按月)时大于0
*/
month
:
number
,
/**
* 每月几号,结算方式为“账期(按月)”或“月结”时大于0
*/
monthDay
:
number
,
/**
* 天,结算方式为账期(按天)时大于0
*/
days
:
number
,
/**
* 发票类型,1-增值税专用发票,2-普通发票,3-机动车专用发票,4-机打发票,5-定额发票
*/
invoiceType
:
number
,
/**
* 发票类型名称
*/
...
...
@@ -108,10 +141,12 @@ const MemberDocCategory: React.FC<DocCategoryProps> = (props: DocCategoryProps)
partnerType
:
res
.
data
?.
partnerType
,
maxAmount
:
res
.
data
?.
maxAmount
,
areaCodes
:
res
.
data
?.
areaCodes
,
categories
:
res
.
data
?.
categories
.
map
(({
names
,
paymentDay
,
taxPoint
,
...
rest
})
=>
({
category
:
names
,
paymentDay
:
`
${
paymentDay
}
`
,
taxPoint
:
+
taxPoint
,
categories
:
res
.
data
?.
categories
.
map
(({
details
,
month
,
monthDay
,
days
,
taxPoint
,
...
rest
})
=>
({
category
:
details
?.
map
((
item
)
=>
`
${
item
.
categoryId
}
`
),
month
:
month
?
`
${
month
}
`
:
''
,
monthDay
:
monthDay
?
`
${
monthDay
}
`
:
''
,
days
:
days
?
`
${
days
}
`
:
''
,
taxPoint
:
taxPoint
,
...
rest
})),
});
...
...
@@ -181,8 +216,15 @@ const MemberDocCategory: React.FC<DocCategoryProps> = (props: DocCategoryProps)
{
dataSource
?.
categories
.
map
((
item
)
=>
(
<
li
className=
{
styles
[
'category-list-item'
]
}
key=
{
item
.
id
}
>
<
Descriptions
column=
{
1
}
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'member.components.MemberDocCategory.category.name'
})
}
>
{
item
.
name
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'member.components.MemberDocCategory.category.paymentDay'
})
}
>
{
item
.
paymentDay
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'member.components.MemberDocCategory.category.name'
})
}
>
{
item
.
details
?.
map
((
item
)
=>
item
.
name
).
join
(
' / '
)
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
{
intl
.
formatMessage
({
id
:
'member.components.MemberDocCategory.category.paymentDay'
})
}
>
{
`${item.payTypeName} `
}
{
item
.
month
?
`${item.month}个月`
:
''
}
{
item
.
monthDay
?
`${item.monthDay}号`
:
''
}
{
item
.
days
?
`${item.days}天`
:
''
}
</
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 @
dd9130c3
...
...
@@ -5,7 +5,7 @@
* @LastEditTime: 2021-12-04 16:06:39
* @Description: 修改入库分类信息 抽屉
*/
import
React
,
{
useEffect
}
from
'react'
;
import
React
,
{
useEffect
,
useRef
}
from
'react'
;
import
{
useIntl
}
from
'umi'
;
import
{
Drawer
,
...
...
@@ -20,25 +20,61 @@ import {
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
ArrayCards
}
from
'@formily/antd-components'
;
import
{
getMemberAbilityMaintenanceDetailRecordClassifyCategoryItems
,
getMemberAbilityMaintenanceDetailRecordClassifyCity
,
getMemberAbilityMaintenanceDetailRecordClassifyProvince
,
}
from
'@/services/MemberV2Api'
;
import
{
getProductCustomerGetCustomerCategoryTree
}
from
'@/services/ProductV2Api'
;
import
{
PAY_TYPE_CASH
,
PAY_TYPE_MONTHLY_STATEMENT
,
PAY_TYPE_PAYMENT_DAYS_DAY
,
PAY_TYPE_PAYMENT_DAYS_MONTH
,
}
from
'@/constants/settlement'
;
import
{
schema
}
from
'./schema'
;
import
{
CategoryItemType
,
completeCategory
}
from
'../../utils'
;
import
CascaderFormItem
from
'../CascaderFormItem'
;
import
styles
from
'./index.less'
;
import
{
getMemberAbilityMaintenanceDetailRecordClassifyCity
,
getMemberAbilityMaintenanceDetailRecordClassifyProvince
}
from
'@/services/MemberV2Api'
;
import
{
getProductCustomerGetCustomerCategoryTree
}
from
'@/services/ProductV2Api'
;
type
CategoriesType
=
{
/**
* 品类名称
* 品类明细
*/
details
:
{
/**
* 层级
*/
level
:
number
,
/**
* 品类id
*/
categoryId
:
number
,
/**
* 品类名称
*/
name
:
string
,
}[],
/**
* 结算方式
*/
payType
:
number
,
/**
* 月份数
*/
month
?:
number
,
/**
* 结算日
*/
names
:
string
[]
,
monthDay
?:
number
,
/**
*
付款周期(天)
*
天数
*/
paymentDay
:
number
,
days
?
:
number
,
/**
* 发票类型
名称
* 发票类型
*/
invoiceType
Name
:
string
,
invoiceType
:
number
,
/**
* 税点,只要百分比的分子部分,不要转换为小数
*/
...
...
@@ -47,12 +83,8 @@ type CategoriesType = {
export
type
ValueType
=
{
/**
* 会员编码
*/
code
:
string
,
/**
* 合作关系类型枚举
*/
* 合作关系类型枚举
*/
partnerType
:
number
,
/**
* 单次合作金额
...
...
@@ -79,6 +111,10 @@ export type ValueType = {
export
interface
FormValueType
extends
Omit
<
ValueType
,
(
'maxAmount'
|
'categories'
)
>
{
/**
* 会员编码
*/
code
:
string
,
/**
* 单次合作金额
*/
maxAmount
:
string
,
...
...
@@ -87,66 +123,36 @@ export interface FormValueType extends Omit<ValueType, ('maxAmount' | 'categorie
*/
categories
:
{
/**
* 已选品类
* 已选品类
,id string[]
*/
category
:
string
[],
/**
* 付款周期(天)
* 结算方式
*/
payType
:
number
,
/**
* 月份数
*/
paymentDay
:
string
,
month
?
:
string
,
/**
*
发票类型名称
*
结算日
*/
invoiceTypeName
:
string
,
monthDay
?:
string
,
/**
* 天数
*/
days
?:
string
,
/**
* 发票类型
*/
invoiceType
:
number
,
/**
* 税点,只要百分比的分子部分,不要转换为小数
*/
taxPoint
:
number
,
taxPoint
:
string
,
}[],
}
interface
CategoryItem
{
/**
* 数据id
*/
id
:
string
,
/**
* 父级id
*/
parentId
:
string
,
/**
* 标题
*/
title
:
string
,
/**
* 是否选中
*/
checked
:
boolean
,
/**
* 图片url路径
*/
imageUrl
:
string
,
/**
* 子元素
*/
children
:
CategoryItem
[],
}
type
CategoryType
=
{
/**
* label
*/
label
:
string
,
/**
* 值
*/
value
:
string
,
/**
* 子元素
*/
children
:
CategoryType
[],
}
export
type
PartnerTypesItem
=
{
/**
* label
...
...
@@ -202,6 +208,8 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
submitLoading
,
}
=
props
;
const
categoryTreeRef
=
useRef
<
CategoryItemType
[]
>
([]);
const
intl
=
useIntl
();
useEffect
(()
=>
{
...
...
@@ -221,12 +229,22 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
const
handleSubmit
=
(
values
:
FormValueType
)
=>
{
if
(
onSubmit
)
{
const
{
maxAmount
,
categories
,
...
rest
}
=
values
;
const
formated
=
categories
.
map
((
item
)
=>
({
names
:
item
.
category
,
paymentDay
:
+
item
.
paymentDay
,
invoiceTypeName
:
item
.
invoiceTypeName
,
taxPoint
:
+
item
.
taxPoint
,
}));
const
formated
=
categories
.
map
((
item
)
=>
{
const
categoryArr
=
completeCategory
(
item
.
category
,
categoryTreeRef
.
current
);
return
{
details
:
categoryArr
.
map
((
category
,
level
)
=>
({
level
:
level
+
1
,
categoryId
:
+
category
.
id
,
name
:
category
.
title
,
})),
payType
:
item
.
payType
,
month
:
item
.
month
?
+
item
.
month
:
undefined
,
monthDay
:
item
.
monthDay
?
+
item
.
monthDay
:
undefined
,
days
:
item
.
days
?
+
item
.
days
:
undefined
,
invoiceType
:
item
.
invoiceType
,
taxPoint
:
+
item
.
taxPoint
,
};
});
onSubmit
({
maxAmount
:
+
maxAmount
,
categories
:
formated
,
...
...
@@ -297,6 +315,51 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
);
});
});
// 结算方式改变,联动显示对应的 FormItem
onFieldValueChange$
(
'categories.*.payType'
).
subscribe
((
fieldState
)
=>
{
formActions
.
setFieldState
(
FormPath
.
transform
(
fieldState
.
name
,
/
\d
/
,
$1
=>
`categories.
${
$1
}
.*(PAYMENT_DAYS_MONTH_WRAP,PAYMENT_DAYS_DAY_WRAP,MONTHLY_TATEMENT_WRAP)`
),
state
=>
{
FormPath
.
setIn
(
state
,
'visible'
,
false
);
}
);
switch
(
fieldState
.
value
)
{
case
PAY_TYPE_CASH
:
{
break
;
}
case
PAY_TYPE_PAYMENT_DAYS_DAY
:
{
formActions
.
setFieldState
(
FormPath
.
transform
(
fieldState
.
name
,
/
\d
/
,
$1
=>
`categories.
${
$1
}
.PAYMENT_DAYS_MONTH_WRAP`
),
state
=>
{
FormPath
.
setIn
(
state
,
'visible'
,
true
);
}
);
break
;
}
case
PAY_TYPE_PAYMENT_DAYS_MONTH
:
{
formActions
.
setFieldState
(
FormPath
.
transform
(
fieldState
.
name
,
/
\d
/
,
$1
=>
`categories.
${
$1
}
.PAYMENT_DAYS_DAY_WRAP`
),
state
=>
{
FormPath
.
setIn
(
state
,
'visible'
,
true
);
}
);
break
;
}
case
PAY_TYPE_MONTHLY_STATEMENT
:
{
formActions
.
setFieldState
(
FormPath
.
transform
(
fieldState
.
name
,
/
\d
/
,
$1
=>
`categories.
${
$1
}
.MONTHLY_TATEMENT_WRAP`
),
state
=>
{
FormPath
.
setIn
(
state
,
'visible'
,
true
);
}
);
break
;
}
default
:
break
;
}
});
}
return
(
...
...
@@ -356,6 +419,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
getProductCustomerGetCustomerCategoryTree
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
data
=
[]
}
=
res
;
categoryTreeRef
.
current
=
data
as
CategoryItemType
[];
formActions
.
setFieldState
(
'categories.*.category'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.x-component-props.options'
,
data
);
});
...
...
@@ -363,6 +427,27 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
}).
catch
((
err
)
=>
{
console
.
warn
(
err
);
});
// 请求结算方式与发票类型数据
getMemberAbilityMaintenanceDetailRecordClassifyCategoryItems
().
then
(
res
=>
{
if
(
res
.
code
===
1000
&&
res
.
data
)
{
const
{
payTypes
=
[],
invoiceTypes
}
=
res
.
data
;
formActions
.
setFieldState
(
'categories.*.payType'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.enum'
,
payTypes
.
map
((
item
)
=>
({
label
:
item
.
payTypeName
,
value
:
item
.
payType
,
})));
});
formActions
.
setFieldState
(
'categories.*.invoiceType'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.enum'
,
invoiceTypes
.
map
((
item
)
=>
({
label
:
item
.
invoiceTypeName
,
value
:
item
.
invoiceType
,
})));
});
}
}).
catch
((
err
)
=>
{
console
.
warn
(
err
);
});
});
}
}
actions=
{
formActions
}
...
...
src/pages/member/components/ModifyClassifyDrawer/schema.ts
View file @
dd9130c3
...
...
@@ -8,12 +8,6 @@
import
{
ISchema
}
from
'@formily/antd'
;
import
{
getIntl
}
from
'umi'
;
import
{
MEMBER_INVOICE_TYPE_1
,
MEMBER_INVOICE_TYPE_2
,
MEMBER_INVOICE_TYPE_3
,
MEMBER_INVOICE_TYPE_4
,
MEMBER_INVOICE_TYPE_5
,
MEMBER_INVOICE_TYPE
,
MEMBER_TAX_POINT_1
,
MEMBER_TAX_POINT_2
,
MEMBER_TAX_POINT_3
,
...
...
@@ -132,7 +126,7 @@ export const schema: ISchema = {
title
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.classify.category'
}),
'x-component'
:
'CascaderFormItem'
,
'x-component-props'
:
{
fieldNames
:
{
label
:
'title'
,
value
:
'
title
'
,
children
:
'children'
},
fieldNames
:
{
label
:
'title'
,
value
:
'
id
'
,
children
:
'children'
},
changeOnSelect
:
true
,
expandTrigger
:
'hover'
,
},
...
...
@@ -182,41 +176,126 @@ export const schema: ISchema = {
// },
// },
// },
pay
mentDay
:
{
pay
Type
:
{
type
:
'string'
,
title
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.classify.paymentDay'
}),
required
:
true
,
enum
:
[],
'x-component'
:
'Radio'
,
title
:
'结算方式'
,
'x-rules'
:
[
{
pattern
:
/^
([
0
]
|
[
1-9
][
0-9
]{0,7})
$/
,
message
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.classify.paymentDay.rules-legal'
})
,
required
:
true
,
message
:
'请选择结算方式'
,
},
],
},
invoiceTypeName
:
{
type
:
'string'
,
enum
:
[
{
label
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_1
],
value
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_1
],
},
{
label
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_2
],
value
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_2
],
PAYMENT_DAYS_MONTH_WRAP
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
2
,
label
:
' '
,
labelCol
:
8
,
},
properties
:
{
month
:
{
type
:
'string'
,
title
:
''
,
'x-component-props'
:
{
addonAfter
:
'个月'
,
},
'x-rules'
:
[
{
pattern
:
PATTERN_MAPS
.
quantity
,
message
:
'请输入正整数'
,
},
],
},
{
label
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_3
],
value
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_3
],
monthDay
:
{
type
:
'string'
,
title
:
'结算日'
,
'x-component-props'
:
{
addonAfter
:
'号'
,
},
'x-rules'
:
[
{
pattern
:
PATTERN_MAPS
.
quantity
,
message
:
'请输入正整数'
,
},
{
validator
(
value
)
{
const
intVal
=
+
value
;
return
intVal
>
28
||
intVal
<
0
?
'请输入大于0 小于等于 28的数值'
:
''
;
}
},
],
},
{
label
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_4
],
value
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_4
],
},
visible
:
false
,
},
PAYMENT_DAYS_DAY_WRAP
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
2
,
label
:
' '
,
labelCol
:
8
,
},
properties
:
{
days
:
{
type
:
'string'
,
title
:
''
,
'x-component-props'
:
{
addonAfter
:
'天'
,
},
'x-rules'
:
[
{
pattern
:
PATTERN_MAPS
.
quantity
,
message
:
'请输入正整数'
,
},
],
},
{
label
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_5
],
value
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_5
],
},
visible
:
false
,
},
MONTHLY_TATEMENT_WRAP
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
2
,
label
:
' '
,
labelCol
:
8
,
},
properties
:
{
monthDay
:
{
type
:
'string'
,
title
:
'结算日'
,
'x-component-props'
:
{
addonAfter
:
'号'
,
},
'x-rules'
:
[
{
validator
(
value
)
{
const
intVal
=
+
value
;
return
intVal
>
28
||
intVal
<
0
?
'请输入大于0 小于等于 28的数值'
:
''
;
}
},
],
},
],
},
visible
:
false
,
},
invoiceType
:
{
type
:
'string'
,
enum
:
[],
title
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.classify.invoiceTypeName'
}),
required
:
true
,
},
...
...
src/pages/member/memberPrComingClassify/components/ComingClassifyDrawer/index.tsx
View file @
dd9130c3
...
...
@@ -5,7 +5,7 @@
* @LastEditTime: 2021-12-03 17:52:44
* @Description: 审核Form抽屉
*/
import
React
,
{
useEffect
}
from
'react'
;
import
React
,
{
useEffect
,
useRef
}
from
'react'
;
import
{
Drawer
,
Button
,
...
...
@@ -18,27 +18,59 @@ import {
FormEffectHooks
,
FormPath
,
}
from
'@formily/antd'
;
import
{
getMemberDepositClassifyCity
,
getMemberDepositClassifyProvince
}
from
'@/services/MemberV2Api'
;
import
{
getMemberDepositClassifyC
ategoryItems
,
getMemberDepositClassifyC
ity
,
getMemberDepositClassifyProvince
}
from
'@/services/MemberV2Api'
;
import
{
getProductCustomerGetCustomerCategoryTree
}
from
'@/services/ProductV2Api'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
PAY_TYPE_CASH
,
PAY_TYPE_PAYMENT_DAYS_DAY
,
PAY_TYPE_PAYMENT_DAYS_MONTH
,
PAY_TYPE_MONTHLY_STATEMENT
,
}
from
'@/constants/settlement'
;
import
{
ArrayCards
}
from
'@formily/antd-components'
;
import
{
schema
}
from
'./schema'
;
import
{
CategoryItemType
,
completeCategory
}
from
'../../../utils'
;
import
CascaderFormItem
from
'../../../components/CascaderFormItem'
;
import
styles
from
'./index.less'
;
type
CategoriesType
=
{
/**
* 品类
名称
* 品类
明细
*/
names
:
string
[],
details
:
{
/**
* 层级
*/
level
:
number
,
/**
* 品类id
*/
categoryId
:
number
,
/**
* 品类名称
*/
name
:
string
,
}[],
/**
*
付款周期(天)
*
结算方式
*/
paymentDay
:
number
,
payType
:
number
,
/**
* 月份数
*/
month
?:
number
,
/**
*
发票类型名称
*
结算日
*/
invoiceTypeName
:
string
,
monthDay
?:
number
,
/**
* 天数
*/
days
?:
number
,
/**
* 发票类型
*/
invoiceType
:
number
,
/**
* 税点,只要百分比的分子部分,不要转换为小数
*/
...
...
@@ -75,6 +107,10 @@ export type ValueType = {
interface
FormValueType
extends
Omit
<
ValueType
,
(
'maxAmount'
|
'categories'
)
>
{
/**
* 会员编码
*/
code
:
string
,
/**
* 单次合作金额
*/
maxAmount
:
string
,
...
...
@@ -83,51 +119,36 @@ interface FormValueType extends Omit<ValueType, ('maxAmount' | 'categories')> {
*/
categories
:
{
/**
* 已选品类
* 已选品类
,id string[]
*/
category
:
string
[],
/**
* 付款周期(天)
* 结算方式
*/
payType
:
number
,
/**
* 月份数
*/
paymentDay
:
string
,
month
?
:
string
,
/**
*
发票类型名称
*
结算日
*/
invoiceTypeName
:
string
,
monthDay
?:
string
,
/**
* 天数
*/
days
?:
string
,
/**
* 发票类型
*/
invoiceType
:
number
,
/**
* 税点,只要百分比的分子部分,不要转换为小数
*/
taxPoint
:
number
,
taxPoint
:
string
,
}[],
}
interface
CategoryItem
{
/**
* 数据id
*/
id
:
string
,
/**
* 父级id
*/
parentId
:
string
,
/**
* 标题
*/
title
:
string
,
/**
* 是否选中
*/
checked
:
boolean
,
/**
* 图片url路径
*/
imageUrl
:
string
,
/**
* 子元素
*/
children
:
CategoryItem
[],
}
type
CategoryType
=
{
/**
* label
...
...
@@ -143,7 +164,7 @@ type CategoryType = {
children
:
CategoryType
[],
}
function
recursionCategoryData
(
dataSource
:
CategoryItem
[]):
CategoryType
[]
{
function
recursionCategoryData
(
dataSource
:
CategoryItem
Type
[]):
CategoryType
[]
{
const
ret
:
CategoryType
[]
=
[];
dataSource
.
forEach
((
item
)
=>
{
...
...
@@ -208,6 +229,8 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
submitLoading
,
}
=
props
;
const
categoryTreeRef
=
useRef
<
CategoryItemType
[]
>
([]);
const
intl
=
useIntl
();
useEffect
(()
=>
{
...
...
@@ -227,12 +250,22 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
const
handleSubmit
=
(
values
:
FormValueType
)
=>
{
if
(
onSubmit
)
{
const
{
maxAmount
,
categories
,
...
rest
}
=
values
;
const
formated
=
categories
.
map
((
item
)
=>
({
names
:
item
.
category
,
paymentDay
:
+
item
.
paymentDay
,
invoiceTypeName
:
item
.
invoiceTypeName
,
taxPoint
:
+
item
.
taxPoint
,
}));
const
formated
=
categories
.
map
((
item
)
=>
{
const
categoryArr
=
completeCategory
(
item
.
category
,
categoryTreeRef
.
current
);
return
{
details
:
categoryArr
.
map
((
category
,
level
)
=>
({
level
:
level
+
1
,
categoryId
:
+
category
.
id
,
name
:
category
.
title
,
})),
payType
:
item
.
payType
,
month
:
item
.
month
?
+
item
.
month
:
undefined
,
monthDay
:
item
.
monthDay
?
+
item
.
monthDay
:
undefined
,
days
:
item
.
days
?
+
item
.
days
:
undefined
,
invoiceType
:
item
.
invoiceType
,
taxPoint
:
+
item
.
taxPoint
,
};
});
onSubmit
({
maxAmount
:
+
maxAmount
,
categories
:
formated
,
...
...
@@ -303,6 +336,51 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
);
});
});
// 结算方式改变,联动显示对应的 FormItem
onFieldValueChange$
(
'categories.*.payType'
).
subscribe
((
fieldState
)
=>
{
formActions
.
setFieldState
(
FormPath
.
transform
(
fieldState
.
name
,
/
\d
/
,
$1
=>
`categories.
${
$1
}
.*(PAYMENT_DAYS_MONTH_WRAP,PAYMENT_DAYS_DAY_WRAP,MONTHLY_TATEMENT_WRAP)`
),
state
=>
{
FormPath
.
setIn
(
state
,
'visible'
,
false
);
}
);
switch
(
fieldState
.
value
)
{
case
PAY_TYPE_CASH
:
{
break
;
}
case
PAY_TYPE_PAYMENT_DAYS_DAY
:
{
formActions
.
setFieldState
(
FormPath
.
transform
(
fieldState
.
name
,
/
\d
/
,
$1
=>
`categories.
${
$1
}
.PAYMENT_DAYS_MONTH_WRAP`
),
state
=>
{
FormPath
.
setIn
(
state
,
'visible'
,
true
);
}
);
break
;
}
case
PAY_TYPE_PAYMENT_DAYS_MONTH
:
{
formActions
.
setFieldState
(
FormPath
.
transform
(
fieldState
.
name
,
/
\d
/
,
$1
=>
`categories.
${
$1
}
.PAYMENT_DAYS_DAY_WRAP`
),
state
=>
{
FormPath
.
setIn
(
state
,
'visible'
,
true
);
}
);
break
;
}
case
PAY_TYPE_MONTHLY_STATEMENT
:
{
formActions
.
setFieldState
(
FormPath
.
transform
(
fieldState
.
name
,
/
\d
/
,
$1
=>
`categories.
${
$1
}
.MONTHLY_TATEMENT_WRAP`
),
state
=>
{
FormPath
.
setIn
(
state
,
'visible'
,
true
);
}
);
break
;
}
default
:
break
;
}
});
}
return
(
...
...
@@ -361,6 +439,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
getProductCustomerGetCustomerCategoryTree
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
data
=
[]
}
=
res
;
categoryTreeRef
.
current
=
data
as
CategoryItemType
[];
formActions
.
setFieldState
(
'categories.*.category'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.x-component-props.options'
,
data
);
});
...
...
@@ -368,6 +447,27 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
}).
catch
((
err
)
=>
{
console
.
warn
(
err
);
});
// 请求结算方式与发票类型数据
getMemberDepositClassifyCategoryItems
().
then
(
res
=>
{
if
(
res
.
code
===
1000
&&
res
.
data
)
{
const
{
payTypes
=
[],
invoiceTypes
}
=
res
.
data
;
formActions
.
setFieldState
(
'categories.*.payType'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.enum'
,
payTypes
.
map
((
item
)
=>
({
label
:
item
.
payTypeName
,
value
:
item
.
payType
,
})));
});
formActions
.
setFieldState
(
'categories.*.invoiceType'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.enum'
,
invoiceTypes
.
map
((
item
)
=>
({
label
:
item
.
invoiceTypeName
,
value
:
item
.
invoiceType
,
})));
});
}
}).
catch
((
err
)
=>
{
console
.
warn
(
err
);
});
});
onFieldValueChange$
(
'agree'
).
subscribe
(
fieldState
=>
{
...
...
src/pages/member/memberPrComingClassify/components/ComingClassifyDrawer/schema/index.ts
View file @
dd9130c3
...
...
@@ -8,12 +8,6 @@
import
{
ISchema
}
from
'@formily/antd'
;
import
{
getIntl
}
from
'umi'
;
import
{
MEMBER_INVOICE_TYPE_1
,
MEMBER_INVOICE_TYPE_2
,
MEMBER_INVOICE_TYPE_3
,
MEMBER_INVOICE_TYPE_4
,
MEMBER_INVOICE_TYPE_5
,
MEMBER_INVOICE_TYPE
,
MEMBER_TAX_POINT_1
,
MEMBER_TAX_POINT_2
,
MEMBER_TAX_POINT_3
,
...
...
@@ -132,7 +126,7 @@ export const schema: ISchema = {
title
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.classify.category'
}),
'x-component'
:
'CascaderFormItem'
,
'x-component-props'
:
{
fieldNames
:
{
label
:
'title'
,
value
:
'
title
'
,
children
:
'children'
},
fieldNames
:
{
label
:
'title'
,
value
:
'
id
'
,
children
:
'children'
},
changeOnSelect
:
true
,
expandTrigger
:
'hover'
,
},
...
...
@@ -182,41 +176,126 @@ export const schema: ISchema = {
// },
// },
// },
pay
mentDay
:
{
pay
Type
:
{
type
:
'string'
,
title
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.classify.paymentDay'
}),
required
:
true
,
enum
:
[],
'x-component'
:
'Radio'
,
title
:
'结算方式'
,
'x-rules'
:
[
{
pattern
:
/^
([
0
]
|
[
1-9
][
0-9
]{0,7})
$/
,
message
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.classify.paymentDay.rules-legal'
})
,
required
:
true
,
message
:
'请选择结算方式'
,
},
],
},
invoiceTypeName
:
{
type
:
'string'
,
enum
:
[
{
label
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_1
],
value
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_1
],
},
{
label
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_2
],
value
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_2
],
PAYMENT_DAYS_MONTH_WRAP
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
2
,
label
:
' '
,
labelCol
:
8
,
},
properties
:
{
month
:
{
type
:
'string'
,
title
:
''
,
'x-component-props'
:
{
addonAfter
:
'个月'
,
},
'x-rules'
:
[
{
pattern
:
PATTERN_MAPS
.
quantity
,
message
:
'请输入正整数'
,
},
],
},
{
label
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_3
],
value
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_3
],
monthDay
:
{
type
:
'string'
,
title
:
'结算日'
,
'x-component-props'
:
{
addonAfter
:
'号'
,
},
'x-rules'
:
[
{
pattern
:
PATTERN_MAPS
.
quantity
,
message
:
'请输入正整数'
,
},
{
validator
(
value
)
{
const
intVal
=
+
value
;
return
intVal
>
28
||
intVal
<
0
?
'请输入大于0 小于等于 28的数值'
:
''
;
}
},
],
},
{
label
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_4
],
value
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_4
],
},
visible
:
false
,
},
PAYMENT_DAYS_DAY_WRAP
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
2
,
label
:
' '
,
labelCol
:
8
,
},
properties
:
{
days
:
{
type
:
'string'
,
title
:
''
,
'x-component-props'
:
{
addonAfter
:
'天'
,
},
'x-rules'
:
[
{
pattern
:
PATTERN_MAPS
.
quantity
,
message
:
'请输入正整数'
,
},
],
},
{
label
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_5
],
value
:
MEMBER_INVOICE_TYPE
[
MEMBER_INVOICE_TYPE_5
],
},
visible
:
false
,
},
MONTHLY_TATEMENT_WRAP
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
2
,
label
:
' '
,
labelCol
:
8
,
},
properties
:
{
monthDay
:
{
type
:
'string'
,
title
:
'结算日'
,
'x-component-props'
:
{
addonAfter
:
'号'
,
},
'x-rules'
:
[
{
validator
(
value
)
{
const
intVal
=
+
value
;
return
intVal
>
28
||
intVal
<
0
?
'请输入大于0 小于等于 28的数值'
:
''
;
}
},
],
},
],
},
visible
:
false
,
},
invoiceType
:
{
type
:
'string'
,
enum
:
[],
title
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.classify.invoiceTypeName'
}),
required
:
true
,
},
...
...
src/pages/member/utils.tsx
View file @
dd9130c3
...
...
@@ -252,4 +252,44 @@ export function renderFieldTypeContent(fieldType: FieldType, fieldValue: any): R
break
;
}
return
node
;
};
export
type
CategoryItemType
=
{
/**
* 数据id
*/
id
:
string
,
/**
* 父级id
*/
parentId
:
string
,
/**
* 标题
*/
title
:
string
,
/**
* 是否选中
*/
checked
:
boolean
,
/**
* 图片url路径
*/
imageUrl
:
string
,
/**
* 子元素
*/
children
:
CategoryItemType
[],
}
export
function
completeCategory
(
ids
:
string
[],
dataSource
:
CategoryItemType
[]):
CategoryItemType
[]
{
const
ret
:
CategoryItemType
[]
=
[];
if
(
!
Array
.
isArray
(
dataSource
))
{
return
ret
;
}
ids
.
forEach
((
curId
,
index
)
=>
{
const
target
=
(
ret
[
index
-
1
]?.
children
||
dataSource
).
find
((
item
)
=>
item
.
id
===
curId
);
if
(
target
)
{
ret
.
push
(
target
);
}
});
return
ret
;
};
\ No newline at end of file
src/pages/mobileTemplate/ownMallTemplateEdit/index.tsx
View file @
dd9130c3
...
...
@@ -172,16 +172,20 @@ const OwnMallTempleteEdit: React.FC<ShopPreviewPropsType> = props => {
};
const
getInfoList
=
async
()
=>
{
const
param
:
any
=
{
current
:
1
,
pageSize
:
1
,
};
const
res
=
await
getManageMemberInformationListAdorn
(
param
);
message
.
destroy
()
if
(
res
.
code
===
1000
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
0
)
{
return
res
.
data
.
data
[
0
].
title
;
try
{
const
param
:
any
=
{
current
:
1
,
pageSize
:
1
,
};
const
res
=
await
getManageMemberInformationListAdorn
(
param
);
message
.
destroy
()
if
(
res
.
code
===
1000
&&
res
.
data
.
data
&&
res
.
data
.
data
.
length
>
0
)
{
return
res
.
data
.
data
[
0
].
title
;
}
return
''
;
}
catch
(
error
)
{
return
''
;
}
return
''
;
};
const
getComponentsConfig
=
async
()
=>
{
...
...
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