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
cbd723a9
Commit
cbd723a9
authored
Jul 16, 2021
by
卢均锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 采购竞价不需要缓存的列表的加入props keepAlive=false
parent
9ac7e002
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
135 additions
and
130 deletions
+135
-130
index.tsx
...s/detail/components/lowestQuotationRecordLayout/index.tsx
+2
-1
index.tsx
...ity/components/detail/components/materialLayout/index.tsx
+1
-0
index.tsx
...nents/detail/components/purchaseBidDemandLayout/index.tsx
+130
-129
index.tsx
...onents/detail/components/quotationDetailsDrawer/index.tsx
+1
-0
index.tsx
.../components/detail/components/tableCommonLayout/index.tsx
+1
-0
No files found.
src/pages/transaction/purchaseAbility/components/detail/components/lowestQuotationRecordLayout/index.tsx
View file @
cbd723a9
...
@@ -91,7 +91,7 @@ const LowestQuotationRecord: React.FC<TableCommonLayoutProps> = (props: any) =>
...
@@ -91,7 +91,7 @@ const LowestQuotationRecord: React.FC<TableCommonLayoutProps> = (props: any) =>
const
_returnBadge
=
(
number
)
=>
{
const
_returnBadge
=
(
number
)
=>
{
const
_number
=
Number
(
number
??
0
);
const
_number
=
Number
(
number
??
0
);
switch
(
_number
)
{
switch
(
_number
)
{
case
0
:
case
0
:
return
'-'
;
return
'-'
;
case
1
:
case
1
:
return
<
img
src=
{
level1
}
alt=
'第一名'
/>;
return
<
img
src=
{
level1
}
alt=
'第一名'
/>;
...
@@ -119,6 +119,7 @@ const LowestQuotationRecord: React.FC<TableCommonLayoutProps> = (props: any) =>
...
@@ -119,6 +119,7 @@ const LowestQuotationRecord: React.FC<TableCommonLayoutProps> = (props: any) =>
<
h5
className=
{
selfStyles
.
content
}
>
{
effect
?.
reportPrice
?
`¥ ${priceFormat(effect?.reportPrice)}`
:
'-'
}
</
h5
>
<
h5
className=
{
selfStyles
.
content
}
>
{
effect
?.
reportPrice
?
`¥ ${priceFormat(effect?.reportPrice)}`
:
'-'
}
</
h5
>
</
div
>
</
div
>
<
StandardTable
<
StandardTable
keepAlive=
{
false
}
currentRef=
{
currentRef
}
currentRef=
{
currentRef
}
columns=
{
columns
}
columns=
{
columns
}
tableProps=
{
{
rowKew
:
'id'
}
}
tableProps=
{
{
rowKew
:
'id'
}
}
...
...
src/pages/transaction/purchaseAbility/components/detail/components/materialLayout/index.tsx
View file @
cbd723a9
...
@@ -126,6 +126,7 @@ const MaterialLayout: React.FC<IPROPS> = (props: any) => {
...
@@ -126,6 +126,7 @@ const MaterialLayout: React.FC<IPROPS> = (props: any) => {
title=
{
layoutTitle
}
title=
{
layoutTitle
}
>
>
<
StandardTable
<
StandardTable
keepAlive=
{
false
}
currentRef=
{
currentRef
}
currentRef=
{
currentRef
}
columns=
{
column
?
column
:
columns
}
columns=
{
column
?
column
:
columns
}
tableProps=
{
{
rowKey
:
'id'
}
}
tableProps=
{
{
rowKey
:
'id'
}
}
...
...
src/pages/transaction/purchaseAbility/components/detail/components/purchaseBidDemandLayout/index.tsx
View file @
cbd723a9
...
@@ -10,152 +10,153 @@ import { Context } from '../context';
...
@@ -10,152 +10,153 @@ import { Context } from '../context';
import
style
from
'./index.less'
;
import
style
from
'./index.less'
;
const
TYPE
=
{
const
TYPE
=
{
1
:
'发布至平台'
,
1
:
'发布至平台'
,
2
:
'系统匹配'
,
2
:
'系统匹配'
,
3
:
'邀请会员'
,
3
:
'邀请会员'
,
}
}
const
ColStyle
=
{
const
ColStyle
=
{
display
:
'flex'
,
display
:
'flex'
,
alignItems
:
'center'
,
alignItems
:
'center'
,
border
:
'1px solid #1fbf87'
,
border
:
'1px solid #1fbf87'
,
paddingTop
:
' 6px'
,
paddingTop
:
' 6px'
,
paddingBottom
:
'6px'
,
paddingBottom
:
'6px'
,
margin
:
'5px'
,
margin
:
'5px'
,
borderRadius
:
'4px'
,
borderRadius
:
'4px'
,
}
}
const
TextStyle
=
{
const
TextStyle
=
{
color
:
'#1fbf87'
,
color
:
'#1fbf87'
,
marginLeft
:
'10px'
,
marginLeft
:
'10px'
,
}
}
export
interface
DemandLayoutIProps
{
export
interface
DemandLayoutIProps
{
storeList
?:
any
,
storeList
?:
any
,
title
?:
string
,
title
?:
string
,
bidId
:
number
,
bidId
:
number
,
number
:
string
,
number
:
string
,
fetch
?:
()
=>
Promise
<
unknown
>
fetch
?:
()
=>
Promise
<
unknown
>
}
}
const
DemandLayout
:
React
.
FC
<
DemandLayoutIProps
>
=
(
props
:
any
)
=>
{
const
DemandLayout
:
React
.
FC
<
DemandLayoutIProps
>
=
(
props
:
any
)
=>
{
const
{
storeList
,
title
,
bidId
,
number
,
fetch
}
=
props
;
const
{
storeList
,
title
,
bidId
,
number
,
fetch
}
=
props
;
const
tableRef
=
useRef
<
any
>
({});
const
tableRef
=
useRef
<
any
>
({});
const
context
=
useContext
(
Context
);
const
context
=
useContext
(
Context
);
const
columns
=
[
const
columns
=
[
{
{
title
:
'序号'
,
title
:
'序号'
,
key
:
'number'
,
key
:
'number'
,
dataIndex
:
'number'
,
dataIndex
:
'number'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
<>
{
index
+
1
}
</>
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
<>
{
index
+
1
}
</>
},
},
{
{
title
:
'会员名称'
,
title
:
'会员名称'
,
key
:
'memberName'
,
key
:
'memberName'
,
dataIndex
:
'memberName'
,
dataIndex
:
'memberName'
,
},
},
{
{
title
:
'会员类型'
,
title
:
'会员类型'
,
key
:
'memberTypeName'
,
key
:
'memberTypeName'
,
dataIndex
:
'memberTypeName'
,
dataIndex
:
'memberTypeName'
,
},
},
{
{
title
:
'会员角色'
,
title
:
'会员角色'
,
key
:
'roleName'
,
key
:
'roleName'
,
dataIndex
:
'roleName'
,
dataIndex
:
'roleName'
,
},
},
{
{
title
:
'会员等级'
,
title
:
'会员等级'
,
key
:
'levelTag'
,
key
:
'levelTag'
,
dataIndex
:
'levelTag'
,
dataIndex
:
'levelTag'
,
},
},
{
{
title
:
'是否归属会员'
,
title
:
'是否归属会员'
,
key
:
'membershipOrNot'
,
key
:
'membershipOrNot'
,
dataIndex
:
'membershipOrNot'
,
dataIndex
:
'membershipOrNot'
,
render
:
(
text
:
any
)
=>
(<
StatusTag
type=
{
text
?
'success'
:
'danger'
}
title=
{
text
?
'是'
:
'否'
}
/>)
render
:
(
text
:
any
)
=>
(<
StatusTag
type=
{
text
?
'success'
:
'danger'
}
title=
{
text
?
'是'
:
'否'
}
/>)
},
},
{
{
title
:
(
title
:
(
<>
<>
<
span
>
需求发送
</
span
>
<
span
>
需求发送
</
span
>
<
Tooltip
placement=
"top"
title=
'打开开关,审核通过后,将发送需求至选择的归属会员'
>
<
Tooltip
placement=
"top"
title=
'打开开关,审核通过后,将发送需求至选择的归属会员'
>
<
QuestionCircleOutlined
<
QuestionCircleOutlined
style=
{
{
style=
{
{
marginLeft
:
'5px'
,
marginLeft
:
'5px'
,
fontSize
:
'14px'
,
fontSize
:
'14px'
,
color
:
'#909399'
color
:
'#909399'
}
}
}
}
/>
/>
</
Tooltip
>
</
Tooltip
>
</>
</>
),
),
key
:
'state'
,
key
:
'state'
,
dataIndex
:
'state'
,
dataIndex
:
'state'
,
render
:
(
text
:
any
)
=>
(
render
:
(
text
:
any
)
=>
(
<
Switch
checked=
{
text
}
disabled=
{
true
}
/>
<
Switch
checked=
{
text
}
disabled=
{
true
}
/>
)
)
},
},
{
{
title
:
'操作'
,
title
:
'操作'
,
key
:
'operate'
,
key
:
'operate'
,
dataIndex
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
_text
:
any
,
_record
:
any
)
=>
(
render
:
(
_text
:
any
,
_record
:
any
)
=>
(
<
Typography
.
Link
href=
{
`/shop?shopId=${btoa(JSON.stringify({ roleId: _record.roleId, memberId: _record.memberId }))}`
}
target=
"_blank"
>
<
Typography
.
Link
href=
{
`/shop?shopId=${btoa(JSON.stringify({ roleId: _record.roleId, memberId: _record.memberId }))}`
}
target=
"_blank"
>
进入店铺
进入店铺
</
Typography
.
Link
>
</
Typography
.
Link
>
)
)
},
},
]
]
/** 列表数据 */
/** 列表数据 */
const
fetchData
=
(
params
?:
any
)
=>
{
const
fetchData
=
(
params
?:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
fetch
({
id
:
bidId
,
number
:
number
,
...
params
}).
then
(
res
=>
{
fetch
({
id
:
bidId
,
number
:
number
,
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
resolve
(
res
.
data
)
})
})
})
})
}
}
return
(
return
(
<
Card
<
Card
id=
'demandLayout'
id=
'demandLayout'
title=
'需求对接'
title=
'需求对接'
>
>
<
div
className=
{
style
.
list
}
>
<
div
className=
{
style
.
list
}
>
<
h5
className=
{
style
.
listLable
}
style=
{
{
flex
:
'0 0 100px'
}
}
>
{
title
}
:
</
h5
>
<
h5
className=
{
style
.
listLable
}
style=
{
{
flex
:
'0 0 100px'
}
}
>
{
title
}
:
</
h5
>
<
h5
className=
{
style
.
listContent
}
>
{
TYPE
[
context
.
type
]
}
</
h5
>
<
h5
className=
{
style
.
listContent
}
>
{
TYPE
[
context
.
type
]
}
</
h5
>
</
div
>
</
div
>
{
context
.
type
===
1
{
context
.
type
===
1
&&
(
&&
(
<
Row
gutter=
{
[
16
,
16
]
}
>
<
Row
gutter=
{
[
16
,
16
]
}
>
{
storeList
.
map
(
item
=>
(
{
storeList
.
map
(
item
=>
(
<
Col
<
Col
span=
{
6
}
span=
{
6
}
key=
{
item
.
id
}
key=
{
item
.
id
}
style=
{
ColStyle
}
style=
{
ColStyle
}
>
>
<
Image
width=
{
32
}
height=
{
32
}
src=
{
item
.
logoUrl
}
/>
<
Image
width=
{
32
}
height=
{
32
}
src=
{
item
.
logoUrl
}
/>
<
span
style=
{
TextStyle
}
>
{
item
.
name
}
</
span
>
<
span
style=
{
TextStyle
}
>
{
item
.
name
}
</
span
>
</
Col
>
</
Col
>
))
}
))
}
</
Row
>
</
Row
>
)
}
)
}
{
context
.
type
!==
1
{
context
.
type
!==
1
&&
(
&&
(
<
StandardTable
<
StandardTable
currentRef=
{
tableRef
}
keepAlive=
{
false
}
columns=
{
columns
}
currentRef=
{
tableRef
}
tableProps=
{
{
rowKew
:
'id'
}
}
columns=
{
columns
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
tableProps=
{
{
rowKew
:
'id'
}
}
/>
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
)
}
/>
</
Card
>
)
}
)
</
Card
>
)
}
}
DemandLayout
.
defaultProps
=
{
DemandLayout
.
defaultProps
=
{
title
:
'发布方式'
title
:
'发布方式'
}
}
export
default
DemandLayout
;
export
default
DemandLayout
;
src/pages/transaction/purchaseAbility/components/detail/components/quotationDetailsDrawer/index.tsx
View file @
cbd723a9
...
@@ -123,6 +123,7 @@ const QuotationDetailsDrawer:React.FC<QuotationDetailsDrawerProps> = (props: any
...
@@ -123,6 +123,7 @@ const QuotationDetailsDrawer:React.FC<QuotationDetailsDrawerProps> = (props: any
}
}
>
>
<
StandardTable
<
StandardTable
keepAlive=
{
false
}
currentRef=
{
tableRef
}
currentRef=
{
tableRef
}
columns=
{
columns
}
columns=
{
columns
}
tableProps=
{
{
rowKew
:
'id'
}
}
tableProps=
{
{
rowKew
:
'id'
}
}
...
...
src/pages/transaction/purchaseAbility/components/detail/components/tableCommonLayout/index.tsx
View file @
cbd723a9
...
@@ -101,6 +101,7 @@ const TableCommonLayout: React.FC<TableCommonLayoutProps> = (props: any) => {
...
@@ -101,6 +101,7 @@ const TableCommonLayout: React.FC<TableCommonLayoutProps> = (props: any) => {
title=
{
layoutTitle
}
title=
{
layoutTitle
}
>
>
<
StandardTable
<
StandardTable
keepAlive=
{
false
}
currentRef=
{
currentRef
}
currentRef=
{
currentRef
}
columns=
{
columns
}
columns=
{
columns
}
tableProps=
{
{
rowKew
:
'id'
}
}
tableProps=
{
{
rowKew
:
'id'
}
}
...
...
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