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
shenshaokai
jinfa-platform
Commits
9999370c
Commit
9999370c
authored
May 26, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改地址字段
parent
77026ae3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
12 deletions
+18
-12
useBidDetail.tsx
src/pages/procurement/_public/bid/effects/useBidDetail.tsx
+8
-7
index.tsx
src/pages/procurement/callForBids/addNewBid/index.tsx
+5
-1
index.ts
src/pages/procurement/callForBids/addNewBid/schema/index.ts
+1
-1
index.tsx
src/pages/procurement/tender/addTender/index.tsx
+4
-3
No files found.
src/pages/procurement/_public/bid/effects/useBidDetail.tsx
View file @
9999370c
...
...
@@ -96,13 +96,14 @@ export const useBidDetail = (options: OrderDetailHookProps) => {
if
(
code
===
1000
)
{
setFormData
(
data
)
if
(
data
?.
deliverAddress
)
{
PublicApi
.
getLogisticsReceiverAddressGet
({
id
:
data
.
deliverAddress
}).
then
(
_res
=>
{
const
{
data
:
_data
}
=
_res
const
{
provinceName
,
cityName
,
districtName
,
address
}
=
_data
if
(
code
===
1000
)
{
setAddress
(
`
${
provinceName
}
/
${
cityName
}
/
${
districtName
}
/
${
address
}
`
)
}
})
// PublicApi.getLogisticsReceiverAddressGet({id: data.deliverAddress}).then(_res => {
// const { data: _data } = _res
// const { provinceName, cityName, districtName, address } = _data
// if(code === 1000) {
// setAddress(`${provinceName}/${cityName}/${districtName}/${address}`)
// }
// })
setAddress
(
data
.
deliverAddress
)
}
}
else
{
message
.
error
(
msg
)
...
...
src/pages/procurement/callForBids/addNewBid/index.tsx
View file @
9999370c
...
...
@@ -134,6 +134,10 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => {
if
(
id
)
{
params
[
'id'
]
=
id
}
addSchemaAction
.
getFieldState
(
'deliverAddressId'
,
state
=>
{
params
[
'deliverAddress'
]
=
state
.
props
.
enum
.
filter
(
item
=>
item
[
'value'
]
===
params
[
'deliverAddressId'
])[
0
][
'label'
]
})
let
res
=
await
PublicApi
.
postPurchaseInviteTenderSaveOrUpdateInviteTender
(
params
)
if
(
res
.
code
===
1000
)
{
history
.
goBack
()
...
...
@@ -201,7 +205,7 @@ const AddNewBid:React.FC<AddNewBidProps> = (props) => {
effects=
{
(
$
,
ctx
)
=>
{
$
(
'onFormMount'
).
subscribe
(
async
()
=>
{
const
addressRes
=
await
PublicApi
.
getLogisticsSelectListReceiverAddress
()
ctx
.
setFieldState
(
'deliverAddress'
,
state
=>
{
ctx
.
setFieldState
(
'deliverAddress
Id
'
,
state
=>
{
state
.
props
.
enum
=
addressRes
.
data
.
map
(
item
=>
({
label
:
item
.
fullAddress
,
value
:
item
.
id
}))
})
...
...
src/pages/procurement/callForBids/addNewBid/schema/index.ts
View file @
9999370c
...
...
@@ -635,7 +635,7 @@ const otherRequset: ISchema = {
wrapperCol
:
10
},
properties
:
{
deliverAddress
:
{
deliverAddress
Id
:
{
type
:
'number'
,
title
:
'交付地址'
,
enum
:
[],
...
...
src/pages/procurement/tender/addTender/index.tsx
View file @
9999370c
...
...
@@ -171,9 +171,10 @@ const AddTender:React.FC<AddTenderProps> = (props) => {
$
(
'onFormMount'
).
subscribe
(
async
()
=>
{
$
(
'onFieldValueChange'
,
'deliverAddress'
).
subscribe
(
async
state
=>
{
if
(
state
.
value
)
{
const
res
=
await
PublicApi
.
getLogisticsReceiverAddressGet
({
id
:
state
.
value
})
const
{
provinceName
,
cityName
,
districtName
,
address
}
=
res
.
data
ctx
.
setFieldValue
(
'fullAddress'
,
`${provinceName}${cityName}${districtName}${address}`
)
// const res = await PublicApi.getLogisticsReceiverAddressGet(
{
id
:
state
.
value
})
// const
{
provinceName
,
cityName
,
districtName
,
address
}
=
res
.
data
// ctx.setFieldValue('fullAddress', `$
{
provinceName
}
$
{
cityName
}
$
{
districtName
}
$
{
address
}
`)
ctx.setFieldValue('fullAddress', state.value)
}
})
})
...
...
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