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
43590d64
Commit
43590d64
authored
Nov 03, 2020
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改物流管理 收货地址新增的问题
parent
c81f8b34
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
34 deletions
+15
-34
addCompany.tsx
src/pages/logistics/list/addCompany.tsx
+7
-25
addressForm.tsx
src/pages/logistics/list/components/addressForm.tsx
+7
-7
add.tsx
src/pages/logistics/receiptAddress/add.tsx
+0
-1
detail.tsx
src/pages/transaction/enquirySubmit/components/detail.tsx
+1
-1
No files found.
src/pages/logistics/list/addCompany.tsx
View file @
43590d64
import
*
as
React
from
'react'
;
import
{
useState
,
useRef
,
useEffect
}
from
'react'
;
import
{
Row
,
Col
,
Tooltip
,
Form
,
Input
,
Select
,
Popconfirm
,
Button
,
Card
,
message
,
Modal
}
from
'antd'
;
import
{
DeleteOutlined
,
FormOutlined
,
PlusCircleOutlined
,
LoadingOutlined
,
PlusOutlined
,
LinkOutlined
}
from
'@ant-design/icons'
;
import
{
Row
,
Col
,
Form
,
Input
,
Select
,
Popconfirm
,
Button
,
Card
}
from
'antd'
;
import
{
LinkOutlined
}
from
'@ant-design/icons'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
import
{
StandardTable
}
from
'god'
import
{
history
}
from
'umi'
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
ModalTable
from
'@/components/ModalTable'
import
{
PublicApi
,
CustomApi
}
from
'@/services/api'
import
{
usePageStatus
,
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
PublicApi
}
from
'@/services/api'
import
{
PageStatus
}
from
'@/hooks/usePageStatus'
import
{
useRowSelectionTable
}
from
'@/hooks/useRowSelectionTable'
import
{
addCompany
,
updateCompany
,
getCompanyDetail
}
from
'@/services/logistics/index'
import
style
from
"./addCompany.less"
import
{
ISchema
}
from
'@formily/antd'
;
export
interface
companyProps
{
...
...
@@ -64,19 +61,6 @@ const columns: ColumnType<any>[] = [
align
:
'center'
}
]
// 模拟请求
// const fetchData = (params: any) => {
// return new Promise((resolve, reject) => {
// const queryResult = data.find(v => v.key === params.keywords)
// setTimeout(() => {
// resolve({
// code: 200,
// message: '',
// data: queryResult ? [queryResult] : data
// })
// }, 1000)
// })
// }
const
fetchData
=
async
(
params
)
=>
{
const
res
=
await
PublicApi
.
getMemberManageLowerPageBynamerole
(
params
)
...
...
@@ -108,6 +92,7 @@ const company: React.FC<parmas> = (props) => {
const
[
selectRow
,
setSelectRow
]
=
useState
<
Item
[]
>
([])
// 模态框选择的行数据
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
Array
<
string
>>
([])
useEffect
(()
=>
{
console
.
log
(
id
,
pageStatus
,
'100000'
)
let
_title
=
pageStatus
===
PageStatus
.
PREVIEW
?
'查看'
:
id
?
'编辑'
:
'新建'
setHeaderTitle
(
`
${
_title
}
物流公司`
)
PublicApi
.
getMemberManageRoleList
().
then
(
res
=>
{
...
...
@@ -136,6 +121,7 @@ const company: React.FC<parmas> = (props) => {
const
handleSubmitAllSetting
=
()
=>
{
menuForm
.
validateFields
().
then
((
values
:
any
)
=>
{
console
.
log
(
values
,
'嘿嘿嘿'
)
if
(
id
)
{
values
.
id
=
id
setLoading
(
true
)
...
...
@@ -250,13 +236,9 @@ const company: React.FC<parmas> = (props) => {
(<
Form
form=
{
menuForm
}
colon=
{
false
}
name=
"edit_infomation"
layout=
"horizontal"
labelAlign=
"left"
autoComplete=
"off"
{
...
layout
}
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
18
}
>
...
...
@@ -292,7 +274,7 @@ const company: React.FC<parmas> = (props) => {
}
]
}
>
<
Input
disabled=
{
isSee
}
className=
"input_addonAfter"
disabled
maxLength=
{
20
}
addonAfter=
{
selectBtn
}
/>
<
Input
disabled=
{
isSee
}
className=
"input_addonAfter"
maxLength=
{
20
}
addonAfter=
{
selectBtn
}
/>
</
Form
.
Item
>
:
<
Form
.
Item
...
...
src/pages/logistics/list/components/addressForm.tsx
View file @
43590d64
...
...
@@ -91,7 +91,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
*/
const
formSubmit
=
(
values
)
=>
{
console
.
log
(
values
)
let
id
=
history
.
location
.
query
.
id
//0新建
//
let id = history.location.query.id //0新建
let
value
=
{
...
values
}
value
.
isDefault
=
values
.
isDefault
?
1
:
0
value
.
provinceCode
=
value
.
provinceCode
.
split
(
'-'
).
length
>
1
?
value
.
provinceCode
.
split
(
'-'
)[
0
]
:
value
.
provinceCode
...
...
@@ -101,7 +101,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
value
.
cityName
=
cityName
value
.
districtName
=
districtName
if
(
type
==
1
)
{
if
(
id
==
0
)
{
if
(
!
id
)
{
setloading
(
true
)
PublicApi
.
postLogisticsShipperAddressAdd
(
value
).
then
(
res
=>
{
if
(
res
.
code
==
1000
)
{
...
...
@@ -118,7 +118,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
})
}
}
else
{
if
(
id
==
0
)
{
if
(
!
id
)
{
setloading
(
true
)
PublicApi
.
postLogisticsReceiverAddressAdd
(
value
).
then
(
res
=>
{
if
(
res
.
code
==
1000
)
{
...
...
@@ -176,8 +176,8 @@ const diaLogForm: React.FC<ListProps> = (props) => {
useEffect
(()
=>
{
const
id
=
Number
(
history
.
location
.
query
.
id
)
console
.
log
(
typeof
(
id
))
let
title
=
id
===
0
?
'新建'
:
'编辑'
type
===
1
?
setHeaderTitle
(
`
${
title
}
发货地址`
)
:
setHeaderTitle
(
`
${
title
}
收货地址`
)
//
let title = id === 0 ? '新建' : '编辑'
//
type === 1 ? setHeaderTitle(`${title}发货地址`) : setHeaderTitle(`${title}收货地址`)
PublicApi
.
getManageCountryAreaGetTelCode
().
then
(
res
=>
{
res
.
data
.
forEach
((
item
,
index
)
=>
{
TelCodeList
.
push
({
label
:
item
,
value
:
(
index
).
toString
()
})
...
...
@@ -306,7 +306,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
headerTitle
}
//
title={headerTitle}
>
<
Card
>
<
Row
>
...
...
@@ -415,7 +415,7 @@ const diaLogForm: React.FC<ListProps> = (props) => {
x
-
component=
"TextArea"
x
-
component
-
props=
{
{
placeholder
:
'请输入详细地址'
,
auto
c
omplete
:
'off'
auto
C
omplete
:
'off'
}
}
x
-
rules=
{
[{
max
:
30
,
...
...
src/pages/logistics/receiptAddress/add.tsx
View file @
43590d64
...
...
@@ -6,7 +6,6 @@ const AddShipingAddress:React.FC<{}> = () => {
return
(
<
AddressTemplate
type=
{
2
}
id=
{
0
}
/>
)
}
...
...
src/pages/transaction/enquirySubmit/components/detail.tsx
View file @
43590d64
...
...
@@ -145,7 +145,7 @@ const detailInfo: React.FC<parmas> = (props) => {
title
:
'交易条件'
,
leftElem
:
[
{
title
:
'交付日期'
,
key
:
'shipmentOrderNo'
,
value
:
moment
(
dataInfo
.
deliveryTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
},
{
title
:
'交付地址'
,
key
:
''
,
value
:
shipperAddres
s
},
{
title
:
'交付地址'
,
key
:
''
,
value
:
dataInfo
.
addre
s
},
{
title
:
'物流要求'
,
key
:
''
,
value
:
dataInfo
.
logistics
}
],
centerElem
:
[
...
...
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