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
56d32757
Commit
56d32757
authored
Apr 06, 2022
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 采购-待新增商城采购需求单-交易条件中交付地址缺少更改地址入口
parent
a5f05f3f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
22 deletions
+66
-22
basic.tsx
...seAbility/purchaseInquiry/addInquiry/components/basic.tsx
+50
-4
condition.tsx
...ility/purchaseInquiry/addInquiry/components/condition.tsx
+16
-18
No files found.
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/components/basic.tsx
View file @
56d32757
...
...
@@ -106,7 +106,33 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
if
(
res
.
code
===
1000
)
{
result
[
idx
].
provinceCode
=
val
;
result
[
idx
].
province
=
item
.
name
;
city
[
idx
]
=
{
citydata
:
res
.
data
}
if
(
val
===
'0'
)
{
result
[
idx
].
cityCode
=
'0'
;
result
[
idx
].
city
=
intl
.
formatMessage
({
id
:
'components.suoyou'
});
city
[
idx
]
=
{
citydata
:
[{
code
:
'0'
,
name
:
intl
.
formatMessage
({
id
:
'components.suoyou'
}),
pcode
:
'0'
,
}]
}
}
else
{
const
tempCityList
=
[]
tempCityList
.
push
({
code
:
'0'
,
name
:
intl
.
formatMessage
({
id
:
'components.suoyou'
}),
pcode
:
'0'
,
})
for
(
const
cityItem
of
res
.
data
)
{
tempCityList
.
push
({
...
cityItem
})
}
city
[
idx
]
=
{
citydata
:
tempCityList
}
}
form
.
setFieldsValue
({
[
'city_'
+
idx
]:
'0'
})
setcity
([...
city
])
}
}).
catch
(()
=>
{})
...
...
@@ -182,8 +208,17 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
}
}
useEffect
(()
=>
{
manageProvince
().
then
(
data
=>
{
setprovince
(
data
)
manageProvince
().
then
((
data
:
any
[])
=>
{
const
tempProvinceData
=
[]
tempProvinceData
.
push
({
code
:
'0'
,
name
:
intl
.
formatMessage
({
id
:
'components.suoyou'
}),
pcode
:
'0'
,
})
for
(
const
item
of
data
)
{
tempProvinceData
.
push
({
...
item
})
}
setprovince
(
tempProvinceData
)
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
...
...
@@ -194,8 +229,19 @@ const BasicInfo: React.FC<Iprops> = (props: any) => {
fetchdata
.
areas
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
getManageAreaByPcodeAll
({
pcode
:
item
.
provinceCode
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
1000
)
{
const
tempCityList
=
[]
tempCityList
.
push
({
code
:
'0'
,
name
:
intl
.
formatMessage
({
id
:
'components.suoyou'
}),
pcode
:
'0'
,
})
if
(
item
.
provinceCode
!==
'0'
)
{
for
(
const
cityItem
of
res
.
data
)
{
tempCityList
.
push
({
...
cityItem
})
}
}
const
citydata
=
{
citydata
:
res
.
data
citydata
:
tempCityList
}
city
[
index
]
=
{
...
citydata
}
Promise
.
resolve
().
then
(()
=>
{
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/components/condition.tsx
View file @
56d32757
...
...
@@ -3,6 +3,7 @@ import { Form, Row, Col, Input, DatePicker, Select } from 'antd';
import
moment
from
'moment'
;
import
{
getLogisticsSelectListReceiverAddress
}
from
'@/services/LogisticsV2Api'
;
import
{
getIntl
}
from
'umi'
;
import
AddressSelect
from
'@/components/AddressSelect'
;
const
{
TextArea
}
=
Input
;
const
{
Option
}
=
Select
;
...
...
@@ -30,27 +31,14 @@ const Condition: React.FC<Iprops> = (props: any) => {
fetchdata
,
onBadge
}
=
props
;
const
[
address
,
setAddress
]
=
useState
<
Array
<
any
>>
([]);
const
[
deliveryTime
,
setDeliveryTime
]
=
useState
<
any
>
()
const
[
selAddress
,
setSelAddress
]
=
useState
<
ADDRESS_TYPE
>
();
/** 获取交付地址 */
const
handleGetLogistics
=
async
()
=>
{
const
service
=
getLogisticsSelectListReceiverAddress
;
const
res
=
await
service
();
if
(
res
.
code
===
1000
)
{
setAddress
(
res
.
data
);
}
}
useEffect
(()
=>
{
handleGetLogistics
();
},
[])
/** 选择地址 */
const
handleSelectAddress
=
(
val
:
any
,
option
:
any
)
=>
{
const
handleSelectAddress
=
(
info
)
=>
{
const
params
:
ADDRESS_TYPE
=
{
address
:
option
.
children
,
addressId
:
option
.
value
,
address
:
`
${
info
.
name
}
${
info
.
fullAddress
}
${
info
.
phone
}
`
,
addressId
:
info
.
id
,
}
setSelAddress
(
params
);
}
...
...
@@ -137,13 +125,23 @@ const Condition: React.FC<Iprops> = (props: any) => {
name=
'addressId'
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'detail.purchase.message55'
})
}]
}
>
<
Select
{
/*
<Select
onSelect={handleSelectAddress}
>
{address.map(v => (
<Option key={v.id} value={v.id}>{v.fullAddress}</Option>
))}
</
Select
>
</Select> */
}
{
selAddress
?.
address
&&
<
AddressSelect
value=
{
selAddress
.
address
as
any
}
isDefaultAddress
addressType=
{
1
}
disabled=
{
false
}
onChange=
{
handleSelectAddress
}
/>
}
</
Form
.
Item
>
<
Form
.
Item
label=
{
intl
.
formatMessage
({
id
:
'table.purchase.quotedPriceTime1'
})
}
...
...
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