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
443ef2a8
Commit
443ef2a8
authored
Jul 05, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-srm' of
http://10.0.0.22:3000/lingxi/lingxi-business-paltform
into dev-srm
parents
1affcf72
32e74e70
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
13 deletions
+26
-13
index.tsx
...saction/purchaseAbility/purchasDoor/purchasInfo/index.tsx
+21
-9
material.tsx
...bility/purchaseInquiry/addInquiry/components/material.tsx
+5
-4
No files found.
src/pages/transaction/purchaseAbility/purchasDoor/purchasInfo/index.tsx
View file @
443ef2a8
...
...
@@ -28,6 +28,8 @@ const defaultCategoryData = { index: 0, firstId: 0, secondId: 0, thirdlyId: 0, f
const
PurchasInfo
:
React
.
FC
<
PurchasInfoPropsType
>
=
(
props
)
=>
{
const
{
siteUrl
,
siteId
}
=
props
.
SiteStore
const
[
resUrl
,
setResUrl
]
=
useState
<
string
>
(
''
);
const
[
door
,
setDoor
]
=
useState
<
string
>
(
''
);
const
[
formIsHalfFilledOut
,
setFormIsHalfFilledOut
]
=
useState
(
false
)
const
[
form
]
=
Form
.
useForm
()
const
[
allMallList
,
setAllMallList
]
=
useState
([])
...
...
@@ -320,7 +322,7 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
slideshowBOList
:
result
})
}
/**
const handleMallSelectChange = (mallId: number) => {
setShopId(mallId)
console.log(mallId, shopInfo)
...
...
@@ -362,10 +364,6 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
return result
}
const
handleFormValueChange
=
()
=>
{
setFormIsHalfFilledOut
(
true
)
}
const getSelectMallStoreUrl = () => {
if (!shopInfo) {
return null
...
...
@@ -382,6 +380,16 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
}
return null
}
*/
const
handleFormValueChange
=
()
=>
{
setFormIsHalfFilledOut
(
true
)
}
/** 获取店铺链接 */
const
handleMallSelectChange
=
(
val
,
option
)
=>
{
setDoor
(
option
.
children
);
setResUrl
(
`
${
siteUrl
}${
option
.
url
}
`
)
}
return
(
<
PageHeaderWrapper
...
...
@@ -541,13 +549,17 @@ const PurchasInfo: React.FC<PurchasInfoPropsType> = (props) => {
<
Select
allowClear
value=
{
shopId
}
className=
{
styles
.
form_item
}
onChange=
{
handleMallSelectChange
}
>
{
allMallList
.
map
(
item
=>
(
<
Select
.
Option
key=
{
item
.
id
}
value=
{
item
.
id
}
>
{
item
.
name
}
</
Select
.
Option
>
<
Select
.
Option
key=
{
item
.
id
}
value=
{
item
.
id
}
url=
{
item
.
url
}
>
{
item
.
name
}
</
Select
.
Option
>
))
}
</
Select
>
{
getSelectMallStoreUrl
()
}
{
resUrl
&&
(
<
div
className=
{
styles
.
shop_url
}
>
<
span
>
当前
{
door
}
链接:
</
span
>
<
label
>
{
resUrl
}
</
label
>
<
CopyOutlined
className=
{
styles
.
copy_icon
}
onClick=
{
()
=>
handleCopyLinke
(
resUrl
)
}
/>
</
div
>
)
}
</
Form
.
Item
>
</
TabPane
>
<
TabPane
tab=
'首页轮播图'
key=
'2'
forceRender
>
...
...
src/pages/transaction/purchaseAbility/purchaseInquiry/addInquiry/components/material.tsx
View file @
443ef2a8
...
...
@@ -123,7 +123,7 @@ const Material: React.FC<Iprops> = (props: any) => {
dataIndex
:
'category'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
(
<>
{
materielMode
===
1
&&
(
{
Array
.
isArray
(
record
.
ids
)
?
(
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
`category_${index + 1}`
}
...
...
@@ -139,17 +139,17 @@ const Material: React.FC<Iprops> = (props: any) => {
notFoundContent=
{
<
Spin
size=
"small"
/>
}
/>
</
Form
.
Item
>
)
}
{
materielMode
===
2
&&
(
)
:
(
<
Form
.
Item
style=
{
{
margin
:
0
}
}
name=
{
`category_${index + 1}`
}
initialValue=
{
text
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
>
<
Input
onChange=
{
(
e
)
=>
handleEdit
(
e
,
'category'
,
index
)
}
/>
<
Input
onChange=
{
(
e
)
=>
handleEdit
(
e
,
'category'
,
index
)
}
/>
</
Form
.
Item
>
)
}
</>
),
},
...
...
@@ -220,6 +220,7 @@ const Material: React.FC<Iprops> = (props: any) => {
/** 添加列表 */
const
fetchTableList
=
(
data
:
any
)
=>
{
if
(
Object
.
keys
(
data
).
length
>
0
)
{
console
.
log
(
data
,
98
)
setDataSource
([...
dataSource
,
data
]);
setFlag
(
false
);
}
...
...
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