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
5f3d7527
Commit
5f3d7527
authored
Apr 06, 2022
by
leimo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2-220418-fixPurchaseBid' into 'v2-220418'
fix: [21887] 竞价报名--报名信息中的地址,需要选择地市,而不是获取字段的数据 See merge request linkseeks-design/pro-platform!128
parents
c829c70e
31f29d6e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
13 deletions
+50
-13
index.tsx
src/components/NiceForm/components/AreaSelect/index.tsx
+30
-9
index.ts
...ion/purchaseAbility/onlineBid/readySignUp/schema/index.ts
+15
-2
signUp.tsx
...nsaction/purchaseAbility/onlineBid/readySignUp/signUp.tsx
+5
-2
No files found.
src/components/NiceForm/components/AreaSelect/index.tsx
View file @
5f3d7527
...
...
@@ -7,18 +7,21 @@ const { Option } = Select;
const
intl
=
getIntl
();
const
AreaSelect
=
(
props
:
any
)
=>
{
const
{
mutators
}
=
props
;
const
{
...
rest
}
=
props
.
props
[
"x-component-props"
]
||
{};
const
{
needName
=
false
,
...
rest
}
=
props
.
props
[
"x-component-props"
]
||
{};
/** 省列表 */
const
[
province
,
setProvince
]
=
useState
<
any
>
([]);
const
[
provinceCode
,
setProvinceCode
]
=
useState
<
any
>
(
''
);
const
[
provinceName
,
setProvinceName
]
=
useState
<
any
>
(
''
);
/** 市列表 */
const
[
city
,
setCity
]
=
useState
<
any
>
([]);
const
[
cityCode
,
setCityCode
]
=
useState
<
any
>
(
''
);
const
[
cityName
,
setCityName
]
=
useState
<
any
>
(
''
);
/** 区列表 */
const
[
district
,
setDistrict
]
=
useState
<
any
>
([]);
const
[
districtCode
,
setDistrictCode
]
=
useState
<
any
>
(
''
);
const
[
districtName
,
setDistrictName
]
=
useState
<
any
>
(
''
);
/** 结果 */
const
[
result
,
setResult
]
=
useState
<
any
>
({
provinceCode
:
''
,
...
...
@@ -76,17 +79,23 @@ const AreaSelect = (props: any) => {
}
}
setProvinceCode
(
val
);
setResult
({
provinceCode
:
val
,
setProvinceName
(
_item
.
name
)
let
_result
=
{
provinceCode
:
_item
.
code
,
// province: _item.name,
cityCode
:
''
,
// city: '',
districtCode
:
''
,
// area: '',
});
}
needName
&&
(
_result
[
'province'
]
=
_item
.
name
);
needName
&&
(
_result
[
'areaCode'
]
=
''
);
setResult
(
_result
);
setDistrict
([]);
setCityCode
(
''
);
setCityName
(
''
)
setDistrictCode
(
''
);
setDistrictName
(
''
)
}
else
if
(
num
===
2
)
{
for
(
let
i
=
0
;
i
<
city
.
length
;
i
++
)
{
if
(
city
[
i
].
code
===
val
)
{
...
...
@@ -100,28 +109,40 @@ const AreaSelect = (props: any) => {
}
}
setCityCode
(
val
);
setResult
({
setCityName
(
_item
.
name
)
let
_result
=
{
provinceCode
:
provinceCode
,
// province: provinceCode.name,
cityCode
:
val
,
// city: _item.name,
districtCode
:
''
,
// area: '',
});
}
needName
&&
(
_result
[
'province'
]
=
provinceName
);
needName
&&
(
_result
[
'city'
]
=
_item
.
name
);
needName
&&
(
_result
[
'areaCode'
]
=
''
);
setResult
(
_result
);
setDistrictCode
(
''
);
setDistrictName
(
''
)
}
else
{
for
(
let
i
=
0
;
i
<
district
.
length
;
i
++
)
{
if
(
district
[
i
].
code
===
val
)
{
_item
=
district
[
i
];
setDistrictCode
(
val
);
setResult
({
setDistrictName
(
_item
.
name
)
let
_result
=
{
provinceCode
:
provinceCode
,
// province: provinceCode.name,
cityCode
:
cityCode
,
// city: cityCode.name,
districtCode
:
val
,
districtCode
:
_item
.
code
,
// area: _item.name,
});
}
needName
&&
(
_result
[
'province'
]
=
provinceName
);
needName
&&
(
_result
[
'city'
]
=
cityName
);
needName
&&
(
_result
[
'area'
]
=
_item
.
name
);
needName
&&
(
_result
[
'areaCode'
]
=
_item
.
code
);
setResult
(
_result
);
break
;
}
}
...
...
src/pages/transaction/purchaseAbility/onlineBid/readySignUp/schema/index.ts
View file @
5f3d7527
...
...
@@ -217,12 +217,25 @@ export const formSchema: ISchema = {
},
],
},
signUpAreas
:
{
'x-component'
:
'AreaSelect'
,
type
:
'string'
,
title
:
intl
.
formatMessage
({
id
:
'detail.purchase.label17'
}),
required
:
true
,
"x-mega-props"
:
{
span
:
2
},
"x-rules"
:
[],
'x-component-props'
:
{
needName
:
true
}
},
MEGA_LAYOUT3_2
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
label
:
intl
.
formatMessage
({
id
:
'detail.purchase.label17'
})
,
required
:
true
,
label
:
' '
,
//
required: true,
wrapperCol
:
24
,
},
properties
:
{
...
...
src/pages/transaction/purchaseAbility/onlineBid/readySignUp/signUp.tsx
View file @
5f3d7527
...
...
@@ -54,16 +54,18 @@ const SignUpForm = () => {
const
handleSubmit
=
async
(
value
)
=>
{
console
.
log
(
value
);
const
_address
=
`
${
value
[
'signUpAreas'
].
province
}${
value
[
'signUpAreas'
].
city
}${
value
[
'signUpAreas'
].
area
}${
value
.
address
}
`
const
_params
=
{
biddingId
:
value
.
id
,
mail
:
value
.
mail
,
demandUrls
:
value
.
demandUrls
,
enclosureUrls
:
value
.
enclosureUrls
,
address
:
value
.
address
,
address
:
_
address
,
tel
:
value
.
tel
,
telPrefix
:
value
.
telPrefix
,
contacts
:
value
.
contacts
,
areas
:
value
.
areas
,
signUpAreas
:
{...
value
[
'signUpAreas'
],
address
:
value
.
address
}
}
console
.
log
(
_params
)
setBtnLoading
(
true
);
...
...
@@ -113,7 +115,8 @@ const SignUpForm = () => {
member
:
name
,
startSignUp
:
formatTimeString
(
data
.
startSignUp
),
endSignUp
:
formatTimeString
(
data
.
endSignUp
),
telPrefix
:
'86'
telPrefix
:
'86'
,
address
:
data
[
'signUpAreas'
]?.
address
||
''
});
})
}
...
...
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