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
26e3fcd1
Commit
26e3fcd1
authored
Feb 23, 2022
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2-220318' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into v2-220318
parents
15df527b
6498f9d5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
124 additions
and
41 deletions
+124
-41
index.ts
config/routes/index.ts
+1
-1
add.tsx
src/pages/authConfig/portalSystem/add.tsx
+3
-3
address.tsx
src/pages/authConfig/portalSystem/components/address.tsx
+116
-34
delivery.ts
...ges/authConfig/portalSystem/components/schema/delivery.ts
+3
-2
dispatch.ts
...ges/authConfig/portalSystem/components/schema/dispatch.ts
+1
-1
index.tsx
src/pages/systemSetting/parameterSetting/index.tsx
+0
-0
No files found.
config/routes/index.ts
View file @
26e3fcd1
...
...
@@ -24,7 +24,7 @@ import asyncRoutes from '../router.config.json';
// import contracRoute from './contracRoute';
// export const routes = [CommodityRoute, MemberRoute, ShopRoute, ChannelRoute, TranactionRoute, AfterService, PayandSettleRoute, LogisticsRoute, AuthConfigRoute, HandlingRoute, BalaceRoute]
const
isDev
=
fals
e
;
const
isDev
=
tru
e
;
const
homeRoute
=
{
path
:
`/memberCenter/home`
,
name
:
'home'
,
...
...
src/pages/authConfig/portalSystem/add.tsx
View file @
26e3fcd1
...
...
@@ -3,7 +3,7 @@ import { Button, Form } from 'antd';
import
PeripheralLayout
from
'@/pages/transaction/components/detailLayout'
;
import
BasicLayout
from
'./components/basicLayout'
;
import
ContactLayout
from
'./components/contactLayout'
;
import
AddressLayout
from
'./components/address'
;
import
AddressLayout
,
{
ADDED_DELIVERY
,
ADDED_DISPATCH
}
from
'./components/address'
;
const
layout
:
any
=
{
colon
:
false
,
...
...
@@ -38,8 +38,8 @@ const PortalSystemAdded: React.FC<{}> = () => {
<
Form
{
...
layout
}
form=
{
form
}
>
<
BasicLayout
/>
<
ContactLayout
form=
{
form
}
/>
<
AddressLayout
id=
'address1'
title=
'收货地址'
/>
<
AddressLayout
id=
'address2'
title=
'发货(自提)地址'
/>
<
AddressLayout
id=
'address1'
title=
'收货地址'
type=
{
ADDED_DELIVERY
}
/>
<
AddressLayout
id=
'address2'
title=
'发货(自提)地址'
type=
{
ADDED_DISPATCH
}
/>
</
Form
>
}
/>
...
...
src/pages/authConfig/portalSystem/components/address.tsx
View file @
26e3fcd1
import
React
,
{
Fragment
,
useState
}
from
'react'
;
import
CardLayout
from
'@/pages/transaction/components/card'
import
{
Button
,
Col
,
Radio
,
Row
,
Drawer
}
from
'antd'
;
import
{
Button
,
Col
,
Radio
,
Row
,
Drawer
,
Empty
}
from
'antd'
;
import
style
from
'./index.less'
;
import
{
DeleteOutlined
,
EditOutlined
}
from
'@ant-design/icons'
;
import
{
DELIVERY_SCHEMA
}
from
'./schema/delivery'
;
...
...
@@ -10,6 +10,7 @@ import { createFormActions, FormEffectHooks } from '@formily/antd';
import
{
getManageAreaByPcode
,
GetManageAreaByPcodeRequest
,
getManageCountryAreaGetTelCode
}
from
'@/services/ManageV2Api'
;
import
{
useFetchAreaEnumLinkageEffect
}
from
'@/components/AddressSelect'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
isEmpty
}
from
'lodash'
;
/** 收货地址 */
export
const
ADDED_DELIVERY
=
1
;
...
...
@@ -31,28 +32,54 @@ const {
onFormInputChange$
,
}
=
FormEffectHooks
;
type
addressList
=
{
/** 发货人名称 */
deliverName
?:
string
,
/** 收货人名称 */
receiveName
?:
string
,
/** 省编号 */
provinceCode
?:
string
,
/** 省名称 */
provinceName
?:
string
,
/** 市编号 */
cityCode
?:
string
,
/** 市名称 */
cityName
?:
string
,
/** 区编号 */
districtCode
?:
string
,
/** 区名称 */
districtName
?:
string
,
/** 街道编码 */
streetCode
?:
string
,
/** 街道名称 */
streetName
?:
string
,
/** 详细地址 */
address
?:
string
,
/** 邮编 */
postalCode
?:
string
,
/** 手机区号 */
areaCode
?:
string
,
/** 手机号码 */
phone
?:
string
,
/** 电话号码 */
tel
?:
string
,
/** 是否默认0-否1-是 */
isDefault
?:
number
,
}
const
AddressLayout
:
React
.
FC
<
addressProps
>
=
(
props
:
addressProps
)
=>
{
const
{
id
,
title
,
type
,
yapi
}
=
props
;
const
[
visible
,
setVisible
]
=
useState
<
boolean
>
(
false
);
const
[
selfInitValue
,
setSelfInitValue
]
=
useState
<
any
>
({});
const
renderFooter
=
()
=>
{
return
(
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
Button
style=
{
{
marginRight
:
8
}
}
>
取消
</
Button
>
<
Button
type=
"primary"
>
保存
</
Button
>
</
div
>
)
}
const
[
addressList
,
setAddressList
]
=
useState
<
addressList
[]
>
([])
const
handleAdded
=
()
=>
{
setVisible
(
true
)
}
console
.
log
(
typeof
type
,
type
)
const
renderSelectOption
=
(
key
,
ctx
,
params
?:
GetManageAreaByPcodeRequest
)
=>
{
getManageAreaByPcode
({
...
params
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
@@ -78,6 +105,54 @@ const AddressLayout: React.FC<addressProps> = (props: addressProps) => {
return
data
}
/** 新增地址 */
const
handleSubmit
=
()
=>
{
const
newList
=
[...
addressList
]
addressSchemaAction
.
submit
((
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
params
=
{
...
value
,
isDefault
:
Number
(
!!
value
.
isDefault
),
provinceName
,
cityName
,
districtName
,
streetName
}
console
.
log
(
params
,
value
)
setAddressList
([...
newList
,
params
])
setVisible
(
false
);
})
}
const
renderFooter
=
()
=>
{
return
(
<
div
style=
{
{
textAlign
:
'right'
}
}
>
<
Button
style=
{
{
marginRight
:
8
}
}
>
取消
</
Button
>
<
Button
type=
"primary"
onClick=
{
handleSubmit
}
>
保存
</
Button
>
</
div
>
)
}
/** 地址拼合 */
const
handleMosaic
=
(
provinceName
,
cityName
,
districtName
,
address
,
streetName
?,
)
=>
{
const
mosaic
=
(
streetName
?
provinceName
+
cityName
+
districtName
+
streetName
+
address
:
provinceName
+
cityName
+
districtName
+
address
);
return
mosaic
}
return
(
<
Fragment
>
<
CardLayout
...
...
@@ -86,27 +161,34 @@ const AddressLayout: React.FC<addressProps> = (props: addressProps) => {
extra=
{
<
Button
type=
'link'
onClick=
{
()
=>
handleAdded
()
}
>
新增地址
</
Button
>
}
>
<
div
className=
{
style
.
addressList
}
>
<
Radio
.
Group
style=
{
{
display
:
'block'
}
}
>
<
Row
gutter=
{
[
48
,
24
]
}
>
<
Col
span=
{
12
}
>
<
div
className=
{
style
.
addressLayout
}
>
<
Radio
>
<
div
className=
{
style
.
addressInfo
}
>
<
div
className=
{
style
.
info
}
>
<
div
className=
{
style
.
name
}
>
蒯美政
185 2929 6758
</
div
>
<
div
className=
{
style
.
default
}
>
默认地址
</
div
>
</
div
>
<
div
className=
{
style
.
address
}
>
广东省广州市海珠区新港东路1068号中洲中心北塔6楼
</
div
>
{
!
isEmpty
(
addressList
)
?
(
<
Radio
.
Group
style=
{
{
display
:
'block'
}
}
>
<
Row
gutter=
{
[
48
,
24
]
}
>
{
addressList
.
map
((
item
,
index
)
=>
(
<
Col
span=
{
12
}
key=
{
index
*
1
}
>
<
div
className=
{
style
.
addressLayout
}
>
<
Radio
value=
{
index
*
1
}
>
<
div
className=
{
style
.
addressInfo
}
>
<
div
className=
{
style
.
info
}
>
<
div
className=
{
style
.
name
}
>
{
type
===
ADDED_DELIVERY
?
item
.
deliverName
:
item
.
receiveName
}
{
item
.
phone
}
</
div
>
{
item
.
isDefault
&&
<
div
className=
{
style
.
default
}
>
默认地址
</
div
>
}
</
div
>
<
div
className=
{
style
.
address
}
>
{
handleMosaic
(
item
.
provinceName
,
item
.
cityName
,
item
.
districtName
,
item
.
address
,
item
.
streetName
)
}
</
div
>
</
div
>
<
div
className=
{
style
.
addressOperate
}
>
<
EditOutlined
className=
{
style
.
icon
}
/>
<
DeleteOutlined
className=
{
style
.
icon
}
/>
</
div
>
</
Radio
>
</
div
>
<
div
className=
{
style
.
addressOperate
}
>
<
EditOutlined
className=
{
style
.
icon
}
/>
<
DeleteOutlined
className=
{
style
.
icon
}
/>
</
div
>
</
Radio
>
</
div
>
</
Col
>
</
Row
>
</
Radio
.
Group
>
</
Col
>
))
}
</
Row
>
</
Radio
.
Group
>
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
)
}
</
div
>
</
CardLayout
>
<
Drawer
...
...
src/pages/authConfig/portalSystem/components/schema/delivery.ts
View file @
26e3fcd1
...
...
@@ -11,11 +11,12 @@ export const DELIVERY_SCHEMA: ISchema = {
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
inline
:
true
,
labelCol
:
24
,
wrapperCol
:
24
,
labelAlign
:
'left'
,
},
properties
:
{
receive
r
Name
:
{
receiveName
:
{
type
:
'string'
,
title
:
intl
.
formatMessage
({
id
:
'logistics.shouhuoren'
}),
"x-rules"
:
[
...
...
src/pages/authConfig/portalSystem/components/schema/dispatch.ts
View file @
26e3fcd1
...
...
@@ -16,7 +16,7 @@ export const DISPATCH_SCHEMA: ISchema = {
labelAlign
:
'left'
,
},
properties
:
{
shipp
erName
:
{
deliv
erName
:
{
type
:
'string'
,
title
:
intl
.
formatMessage
({
id
:
'logistics.fahuoren'
}),
"x-rules"
:
[
...
...
src/pages/systemSetting/parameterSetting/index.tsx
View file @
26e3fcd1
This diff is collapsed.
Click to expand it.
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