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
c3aa0556
Commit
c3aa0556
authored
Mar 29, 2022
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'chore-v2-220418' into 'v2-220418'
merge: merge v2-220318 into v2-220418 See merge request linkseeks-design/pro-platform!64
parents
f60203a9
dd02c8aa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
160 additions
and
38 deletions
+160
-38
index.tsx
src/pages/member/components/ModifyClassifyDrawer/index.tsx
+60
-9
schema.ts
src/pages/member/components/ModifyClassifyDrawer/schema.ts
+51
-0
index.less
...ComingClassify/components/ComingClassifyDrawer/index.less
+0
-7
index.ts
...gClassify/components/ComingClassifyDrawer/schema/index.ts
+0
-0
verify.tsx
src/pages/member/memberPrComingClassify/verify.tsx
+3
-2
index.tsx
...seOrder/orderCollectB2b/components/addressModal/index.tsx
+9
-4
index.tsx
...eOrder/orderCollectCash/components/addressModal/index.tsx
+10
-4
index.tsx
...orderCollectRequisition/components/addressModal/index.tsx
+9
-4
index.tsx
...seOrder/orderCollectSrm/components/addressModal/index.tsx
+9
-4
index.tsx
...on/saleOrder/agentOrder/components/addressModal/index.tsx
+9
-4
No files found.
src/pages/member/components/ModifyClassifyDrawer/index.tsx
View file @
c3aa0556
...
...
@@ -13,17 +13,18 @@ import {
}
from
'antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
createFormActions
,
createAsyncFormActions
,
FormEffectHooks
,
FormPath
,
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
ArrayCards
}
from
'@formily/antd-components'
;
import
{
getMemberAbilityMaintenanceDetailRecordClassifyCategoryItems
,
getMemberAbilityMaintenanceDetailRecordClassifyCity
,
getMemberAbilityMaintenanceDetailRecordClassifyProvince
,
getMemberDepositClassifyCategoryItems
,
getMemberDepositClassifyCity
,
getMemberDepositClassifyProvince
,
}
from
'@/services/MemberV2Api'
;
import
{
getProductCustomerGetCustomerCategoryTree
}
from
'@/services/ProductV2Api'
;
import
{
...
...
@@ -107,9 +108,17 @@ export type ValueType = {
* 主营品类列表
*/
categories
:
CategoriesType
[],
/**
* 是否通过
*/
agree
?:
number
,
/**
* 通过理由
*/
reason
?:
string
,
}
export
interface
FormValueType
extends
Omit
<
ValueType
,
(
'maxAmount'
|
'categories'
)
>
{
export
interface
FormValueType
extends
Omit
<
ValueType
,
(
'maxAmount'
|
'categories'
|
'agree'
|
'reason'
)
>
{
/**
* 会员编码
*/
...
...
@@ -184,11 +193,15 @@ interface IProps {
/**
* 值
*/
value
:
FormValueType
,
value
?
:
FormValueType
,
/**
* 确认按钮 loading
*/
submitLoading
:
boolean
,
/**
* 是否可审核的,默认 0
*/
isVerify
?:
0
|
1
,
}
const
formActions
=
createAsyncFormActions
();
...
...
@@ -198,6 +211,27 @@ const {
onFieldInputChange$
,
}
=
FormEffectHooks
;
// 省级接口map
const
PROVINCE_API_MAP
=
{
0
:
getMemberAbilityMaintenanceDetailRecordClassifyProvince
,
1
:
getMemberDepositClassifyProvince
,
};
// 会员品类接口map
const
CATEGORY_TREE_API_MAP
=
{
0
:
getProductCustomerGetCustomerCategoryTree
,
1
:
getProductCustomerGetCustomerCategoryTree
,
};
// 结算类型、发票类型接口map
const
ITEMS_API_MAP
=
{
0
:
getMemberAbilityMaintenanceDetailRecordClassifyCategoryItems
,
1
:
getMemberDepositClassifyCategoryItems
,
};
// 城市接口map
const
CITY_API_MAP
=
{
0
:
getMemberAbilityMaintenanceDetailRecordClassifyCity
,
1
:
getMemberDepositClassifyCity
,
};
const
ComingClassifyDrawer
:
React
.
FC
<
IProps
>
=
(
props
:
IProps
)
=>
{
const
{
visible
,
...
...
@@ -206,6 +240,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
partnerTypes
,
value
,
submitLoading
,
isVerify
=
0
,
}
=
props
;
const
categoryTreeRef
=
useRef
<
CategoryItemType
[]
>
([]);
...
...
@@ -291,7 +326,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
}
);
getMemberAbilityMaintenanceDetailRecordClassifyCity
({
CITY_API_MAP
[
isVerify
]
({
provinceCode
:
fieldState
.
value
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
@@ -403,7 +438,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
onFormInit$
().
subscribe
(()
=>
{
// 请求省级数据
getMemberAbilityMaintenanceDetailRecordClassifyProvince
().
then
(
res
=>
{
PROVINCE_API_MAP
[
isVerify
]
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
data
=
[]
}
=
res
;
const
options
=
data
.
map
(
item
=>
({
label
:
item
.
name
,
value
:
item
.
code
}));
...
...
@@ -416,10 +451,10 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
});
// 请求会员品类数据
getProductCustomerGetCustomerCategoryTree
().
then
(
res
=>
{
CATEGORY_TREE_API_MAP
[
isVerify
]
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
data
=
[]
}
=
res
;
categoryTreeRef
.
current
=
data
as
CategoryItemType
[];
categoryTreeRef
.
current
=
data
as
unknown
as
CategoryItemType
[];
formActions
.
setFieldState
(
'categories.*.category'
,
state
=>
{
FormPath
.
setIn
(
state
,
'props.x-component-props.options'
,
data
);
});
...
...
@@ -429,7 +464,7 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
});
// 请求结算方式与发票类型数据
getMemberAbilityMaintenanceDetailRecordClassifyCategoryItems
().
then
(
res
=>
{
ITEMS_API_MAP
[
isVerify
]
().
then
(
res
=>
{
if
(
res
.
code
===
1000
&&
res
.
data
)
{
const
{
payTypes
=
[],
invoiceTypes
}
=
res
.
data
;
formActions
.
setFieldState
(
'categories.*.payType'
,
state
=>
{
...
...
@@ -448,6 +483,22 @@ const ComingClassifyDrawer: React.FC<IProps> = (props: IProps) => {
}).
catch
((
err
)
=>
{
console
.
warn
(
err
);
});
if
(
isVerify
===
0
)
{
setFieldState
(
'VERIFY_APPLY'
,
(
state
)
=>
{
state
.
visible
=
false
;
});
}
});
onFieldValueChange$
(
'agree'
).
subscribe
(
fieldState
=>
{
setFieldState
(
'reason'
,
state
=>
{
state
.
title
=
fieldState
.
value
===
0
?
intl
.
formatMessage
({
id
:
'member.management.common.form.reason.noPass'
})
:
intl
.
formatMessage
({
id
:
'member.management.common.form.reason.pass'
});
state
.
required
=
fieldState
.
value
===
0
;
setTimeout
(()
=>
{
formActions
.
validate
(
'reason'
);
},
0
);
});
});
}
}
actions=
{
formActions
}
...
...
src/pages/member/components/ModifyClassifyDrawer/schema.ts
View file @
c3aa0556
...
...
@@ -337,5 +337,55 @@ export const schema: ISchema = {
},
},
},
VERIFY_APPLY
:
{
type
:
'object'
,
'x-component'
:
'FlagBox'
,
'x-component-props'
:
{
title
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.verify'
}),
},
properties
:
{
MEGA_LAYOUT
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
18
,
labelAlign
:
'left'
,
},
properties
:
{
agree
:
{
type
:
'string'
,
title
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.verify.agree'
}),
default
:
1
,
'x-component'
:
'Radio'
,
required
:
true
,
enum
:
[
{
label
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.verify.agree.pass'
}),
value
:
1
},
{
label
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.verify.agree.noPass'
}),
value
:
0
},
],
'x-component-props'
:
{},
},
reason
:
{
type
:
'string'
,
title
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.verify.reason'
}),
'x-component'
:
'Textarea'
,
'x-component-props'
:
{
placeholder
:
intl
.
formatMessage
({
id
:
'member.management.memberPrComingClassify.drawer.form.verify.placeholder'
}),
rows
:
5
,
},
'x-rules'
:
[
{
required
:
true
,
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
120
,
}
],
},
},
},
},
},
},
};
\ No newline at end of file
src/pages/member/memberPrComingClassify/components/ComingClassifyDrawer/index.less
deleted
100644 → 0
View file @
f60203a9
@import '~antd/es/style/themes/default.less';
.description {
color: @text-color-secondary;
margin-bottom: @margin-md;
}
\ No newline at end of file
src/pages/member/memberPrComingClassify/components/ComingClassifyDrawer/schema/index.ts
deleted
100644 → 0
View file @
f60203a9
This diff is collapsed.
Click to expand it.
src/pages/member/memberPrComingClassify/verify.tsx
View file @
c3aa0556
...
...
@@ -13,9 +13,9 @@ import {
import
{
history
,
useIntl
}
from
'umi'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
{
postMemberDepositClassify
,
getMemberDepositClassifyDetail
}
from
'@/services/MemberV2Api'
;
import
ModifyClassifyDrawer
,
{
ValueType
}
from
'../components/ModifyClassifyDrawer'
;
import
fetchDetailHoc
from
'../common/hoc/fetchDetailHoc'
;
import
MemberProfile
from
'../components/MemberProfile'
;
import
ComingClassifyDrawer
,
{
ValueType
}
from
'./components/ComingClassifyDrawer'
;
const
MemberPrComingClassifyVerify
:
React
.
FC
<
{}
>
=
()
=>
{
const
{
validateId
}
=
usePageStatus
();
...
...
@@ -72,7 +72,7 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
{
intl
.
formatMessage
({
id
:
'member.actions.apply.verify'
})
}
</
Button
>
<
Coming
ClassifyDrawer
<
Modify
ClassifyDrawer
visible=
{
visibleVerifyDrawer
}
partnerTypes=
{
(
info
...
...
@@ -83,6 +83,7 @@ const MemberPrComingClassifyVerify: React.FC<{}> = () => {
onClose=
{
()
=>
handleVisibleVerifyDrawer
(
false
)
}
submitLoading=
{
submitLoading
}
onSubmit=
{
handleSubmit
}
isVerify=
{
1
}
/>
</>
)
}
...
...
src/pages/transaction/purchaseOrder/orderCollectB2b/components/addressModal/index.tsx
View file @
c3aa0556
...
...
@@ -47,10 +47,15 @@ const AddressModal:React.FC<AddressModalProps> = (props) => {
}
const
handleSubmit
=
async
(
value
)
=>
{
const
provinceName
=
value
?.
provinceName
?
value
.
provinceName
:
addressSchemaAction
.
getFieldState
(
'provinceCode'
)[
'values'
][
1
][
'title'
]
const
cityName
=
value
?.
cityName
?
value
.
cityName
:
addressSchemaAction
.
getFieldState
(
'cityCode'
)[
'values'
][
1
][
'title'
]
const
districtName
=
value
?.
districtName
?
value
.
districtName
:
addressSchemaAction
.
getFieldState
(
'districtCode'
)[
'values'
][
1
][
'title'
]
const
streetName
=
value
?.
streetName
?
value
.
streetName
:
value
[
'streetCode'
]
?
addressSchemaAction
.
getFieldState
(
'streetCode'
)[
'values'
][
1
][
'title'
]
:
null
const
obj_provinceCode
=
addressSchemaAction
.
getFieldState
(
'provinceCode'
)[
'values'
][
1
]
const
obj_cityCode
=
addressSchemaAction
.
getFieldState
(
'cityCode'
)[
'values'
][
1
]
const
obj_districtCode
=
addressSchemaAction
.
getFieldState
(
'districtCode'
)[
'values'
][
1
]
const
obj_streetCode
=
addressSchemaAction
.
getFieldState
(
'streetCode'
)[
'values'
][
1
]
const
provinceName
=
obj_provinceCode
?
obj_provinceCode
[
'title'
]
:
value
.
provinceName
const
cityName
=
obj_cityCode
?
obj_cityCode
[
'title'
]
:
value
.
cityName
const
districtName
=
obj_districtCode
?
obj_districtCode
[
'title'
]
:
value
.
districtName
const
streetName
=
obj_streetCode
?
obj_streetCode
[
'title'
]
:
value
.
streetName
const
params
=
{
...
value
,
...
...
src/pages/transaction/purchaseOrder/orderCollectCash/components/addressModal/index.tsx
View file @
c3aa0556
...
...
@@ -47,10 +47,15 @@ const AddressModal:React.FC<AddressModalProps> = (props) => {
}
const
handleSubmit
=
async
(
value
)
=>
{
const
provinceName
=
value
?.
provinceName
?
value
.
provinceName
:
addressSchemaAction
.
getFieldState
(
'provinceCode'
)[
'values'
][
1
][
'title'
]
const
cityName
=
value
?.
cityName
?
value
.
cityName
:
addressSchemaAction
.
getFieldState
(
'cityCode'
)[
'values'
][
1
][
'title'
]
const
districtName
=
value
?.
districtName
?
value
.
districtName
:
addressSchemaAction
.
getFieldState
(
'districtCode'
)[
'values'
][
1
][
'title'
]
const
streetName
=
value
?.
streetName
?
value
.
streetName
:
value
[
'streetCode'
]
?
addressSchemaAction
.
getFieldState
(
'streetCode'
)[
'values'
][
1
][
'title'
]
:
null
const
obj_provinceCode
=
addressSchemaAction
.
getFieldState
(
'provinceCode'
)[
'values'
][
1
]
const
obj_cityCode
=
addressSchemaAction
.
getFieldState
(
'cityCode'
)[
'values'
][
1
]
const
obj_districtCode
=
addressSchemaAction
.
getFieldState
(
'districtCode'
)[
'values'
][
1
]
const
obj_streetCode
=
addressSchemaAction
.
getFieldState
(
'streetCode'
)[
'values'
][
1
]
const
provinceName
=
obj_provinceCode
?
obj_provinceCode
[
'title'
]
:
value
.
provinceName
const
cityName
=
obj_cityCode
?
obj_cityCode
[
'title'
]
:
value
.
cityName
const
districtName
=
obj_districtCode
?
obj_districtCode
[
'title'
]
:
value
.
districtName
const
streetName
=
obj_streetCode
?
obj_streetCode
[
'title'
]
:
value
.
streetName
const
params
=
{
...
value
,
...
...
@@ -60,6 +65,7 @@ const AddressModal:React.FC<AddressModalProps> = (props) => {
districtName
,
streetName
}
const
fn
=
mode
===
'edit'
?
postLogisticsReceiverAddressUpdate
:
postLogisticsReceiverAddressAdd
await
fn
(
params
)
resetForm
()
...
...
src/pages/transaction/purchaseOrder/orderCollectRequisition/components/addressModal/index.tsx
View file @
c3aa0556
...
...
@@ -48,10 +48,15 @@ const AddressModal:React.FC<AddressModalProps> = (props) => {
}
const
handleSubmit
=
async
(
value
)
=>
{
const
provinceName
=
value
?.
provinceName
?
value
.
provinceName
:
addressSchemaAction
.
getFieldState
(
'provinceCode'
)[
'values'
][
1
][
'title'
]
const
cityName
=
value
?.
cityName
?
value
.
cityName
:
addressSchemaAction
.
getFieldState
(
'cityCode'
)[
'values'
][
1
][
'title'
]
const
districtName
=
value
?.
districtName
?
value
.
districtName
:
addressSchemaAction
.
getFieldState
(
'districtCode'
)[
'values'
][
1
][
'title'
]
const
streetName
=
value
?.
streetName
?
value
.
streetName
:
value
[
'streetCode'
]
?
addressSchemaAction
.
getFieldState
(
'streetCode'
)[
'values'
][
1
][
'title'
]
:
null
const
obj_provinceCode
=
addressSchemaAction
.
getFieldState
(
'provinceCode'
)[
'values'
][
1
]
const
obj_cityCode
=
addressSchemaAction
.
getFieldState
(
'cityCode'
)[
'values'
][
1
]
const
obj_districtCode
=
addressSchemaAction
.
getFieldState
(
'districtCode'
)[
'values'
][
1
]
const
obj_streetCode
=
addressSchemaAction
.
getFieldState
(
'streetCode'
)[
'values'
][
1
]
const
provinceName
=
obj_provinceCode
?
obj_provinceCode
[
'title'
]
:
value
.
provinceName
const
cityName
=
obj_cityCode
?
obj_cityCode
[
'title'
]
:
value
.
cityName
const
districtName
=
obj_districtCode
?
obj_districtCode
[
'title'
]
:
value
.
districtName
const
streetName
=
obj_streetCode
?
obj_streetCode
[
'title'
]
:
value
.
streetName
const
params
=
{
...
value
,
...
...
src/pages/transaction/purchaseOrder/orderCollectSrm/components/addressModal/index.tsx
View file @
c3aa0556
...
...
@@ -47,10 +47,15 @@ const AddressModal:React.FC<AddressModalProps> = (props) => {
}
const
handleSubmit
=
async
(
value
)
=>
{
const
provinceName
=
value
?.
provinceName
?
value
.
provinceName
:
addressSchemaAction
.
getFieldState
(
'provinceCode'
)[
'values'
][
1
][
'title'
]
const
cityName
=
value
?.
cityName
?
value
.
cityName
:
addressSchemaAction
.
getFieldState
(
'cityCode'
)[
'values'
][
1
][
'title'
]
const
districtName
=
value
?.
districtName
?
value
.
districtName
:
addressSchemaAction
.
getFieldState
(
'districtCode'
)[
'values'
][
1
][
'title'
]
const
streetName
=
value
?.
streetName
?
value
.
streetName
:
value
[
'streetCode'
]
?
addressSchemaAction
.
getFieldState
(
'streetCode'
)[
'values'
][
1
][
'title'
]
:
null
const
obj_provinceCode
=
addressSchemaAction
.
getFieldState
(
'provinceCode'
)[
'values'
][
1
]
const
obj_cityCode
=
addressSchemaAction
.
getFieldState
(
'cityCode'
)[
'values'
][
1
]
const
obj_districtCode
=
addressSchemaAction
.
getFieldState
(
'districtCode'
)[
'values'
][
1
]
const
obj_streetCode
=
addressSchemaAction
.
getFieldState
(
'streetCode'
)[
'values'
][
1
]
const
provinceName
=
obj_provinceCode
?
obj_provinceCode
[
'title'
]
:
value
.
provinceName
const
cityName
=
obj_cityCode
?
obj_cityCode
[
'title'
]
:
value
.
cityName
const
districtName
=
obj_districtCode
?
obj_districtCode
[
'title'
]
:
value
.
districtName
const
streetName
=
obj_streetCode
?
obj_streetCode
[
'title'
]
:
value
.
streetName
const
params
=
{
...
value
,
...
...
src/pages/transaction/saleOrder/agentOrder/components/addressModal/index.tsx
View file @
c3aa0556
...
...
@@ -51,10 +51,15 @@ const AddressModal:React.FC<AddressModalProps> = (props) => {
}
const
handleSubmit
=
async
(
value
)
=>
{
const
provinceName
=
value
?.
provinceName
?
value
.
provinceName
:
addressSchemaAction
.
getFieldState
(
'provinceCode'
)[
'values'
][
1
][
'title'
]
const
cityName
=
value
?.
cityName
?
value
.
cityName
:
addressSchemaAction
.
getFieldState
(
'cityCode'
)[
'values'
][
1
][
'title'
]
const
districtName
=
value
?.
districtName
?
value
.
districtName
:
addressSchemaAction
.
getFieldState
(
'districtCode'
)[
'values'
][
1
][
'title'
]
const
streetName
=
value
?.
streetName
?
value
.
streetName
:
value
[
'streetCode'
]
?
addressSchemaAction
.
getFieldState
(
'streetCode'
)[
'values'
][
1
][
'title'
]
:
null
const
obj_provinceCode
=
addressSchemaAction
.
getFieldState
(
'provinceCode'
)[
'values'
][
1
]
const
obj_cityCode
=
addressSchemaAction
.
getFieldState
(
'cityCode'
)[
'values'
][
1
]
const
obj_districtCode
=
addressSchemaAction
.
getFieldState
(
'districtCode'
)[
'values'
][
1
]
const
obj_streetCode
=
addressSchemaAction
.
getFieldState
(
'streetCode'
)[
'values'
][
1
]
const
provinceName
=
obj_provinceCode
?
obj_provinceCode
[
'title'
]
:
value
.
provinceName
const
cityName
=
obj_cityCode
?
obj_cityCode
[
'title'
]
:
value
.
cityName
const
districtName
=
obj_districtCode
?
obj_districtCode
[
'title'
]
:
value
.
districtName
const
streetName
=
obj_streetCode
?
obj_streetCode
[
'title'
]
:
value
.
streetName
const
roleId
=
ctx
.
getFieldValue
(
'buyerRoleId'
)
const
memberId
=
ctx
.
getFieldValue
(
'buyerMemberId'
)
...
...
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