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
8ef4887c
Commit
8ef4887c
authored
Jan 14, 2022
by
xiexiuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改bug
parent
98c63cbf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
FormList.tsx
src/pages/contract/manage/add/components/FormList.tsx
+32
-32
No files found.
src/pages/contract/manage/add/components/FormList.tsx
View file @
8ef4887c
...
...
@@ -58,7 +58,7 @@ const FormList = (props: any) => {
const
getList
=
()
=>
{
let
parmas
:
any
=
{
current
:
'1'
,
pageSize
:
'
3
'
,
pageSize
:
'
10
'
,
}
let
fn
;
switch
(
sourceType
)
{
...
...
@@ -165,34 +165,34 @@ const FormList = (props: any) => {
useEffect
(()
=>
{
let
columnsTab
:
any
=
[
{
title
:
intl
.
formatMessage
({
id
:
'contract.wuliaobianhaomingcheng'
}),
dataIndex
:
'name'
,
align
:
'center'
,
title
:
intl
.
formatMessage
({
id
:
'contract.wuliaobianhaomingcheng'
}),
dataIndex
:
'name'
,
align
:
'center'
,
render
:
(
text
,
item
)
=>
<
div
>
<
p
>
{
item
.
code
}
</
p
>
<
p
>
{
text
}
</
p
>
</
div
>
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.guigexinghao'
}),
dataIndex
:
'type'
,
align
:
'center'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.guigexinghao'
}),
dataIndex
:
'type'
,
align
:
'center'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.pinlei'
}),
dataIndex
:
'customerCategory'
,
align
:
'center'
,
title
:
intl
.
formatMessage
({
id
:
'contract.pinlei'
}),
dataIndex
:
'customerCategory'
,
align
:
'center'
,
render
:
(
text
,
item
)
=>
<
span
>
{
item
.
customerCategory
.
name
?
item
.
customerCategory
.
name
:
item
.
customerCategory
.
category
}
</
span
>
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.pinpai'
}),
dataIndex
:
'brand'
,
align
:
'center'
,
title
:
intl
.
formatMessage
({
id
:
'contract.pinpai'
}),
dataIndex
:
'brand'
,
align
:
'center'
,
render
:
(
text
,
item
)
=>
<
span
>
{
item
.
brand
?
item
.
brand
.
name
:
''
}
</
span
>
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.danwei'
}),
dataIndex
:
'unitName'
,
align
:
'center'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.danwei'
}),
dataIndex
:
'unitName'
,
align
:
'center'
,
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.caigoushuliang'
}),
title
:
intl
.
formatMessage
({
id
:
'contract.caigoushuliang'
}),
dataIndex
:
'purchaseCount'
,
key
:
'purchaseCount'
,
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
<
Form
.
Item
name=
{
`isHasTax${index}`
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingxuanze'
})
}]
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingxuanze'
})
}]
}
>
<
Input
style=
{
{
...
...
@@ -206,12 +206,12 @@ const FormList = (props: any) => {
</
Form
.
Item
>
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.hanshui'
}),
dataIndex
:
'isHasTax'
,
align
:
'center'
,
title
:
intl
.
formatMessage
({
id
:
'contract.hanshui'
}),
dataIndex
:
'isHasTax'
,
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
<
Form
.
Item
name=
{
`isHasTax${index}`
}
initialValue=
{
text
+
index
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingxuanze'
})
}]
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingxuanze'
})
}]
}
>
<
Select
style=
{
{
width
:
80
}
}
...
...
@@ -219,17 +219,17 @@ const FormList = (props: any) => {
onChange=
{
(
e
)
=>
setInput
(
e
,
'isHasTax'
,
index
)
}
disabled=
{
Object
.
keys
(
Row
).
length
!=
0
?
true
:
false
}
>
<
Option
value=
"0"
key=
{
0
}
>
{
intl
.
formatMessage
({
id
:
'contract.fou'
})
}
</
Option
>
<
Option
value=
"1"
key=
{
1
}
>
{
intl
.
formatMessage
({
id
:
'contract.shi'
})
}
</
Option
>
<
Option
value=
"0"
key=
{
0
}
>
{
intl
.
formatMessage
({
id
:
'contract.fou'
})
}
</
Option
>
<
Option
value=
"1"
key=
{
1
}
>
{
intl
.
formatMessage
({
id
:
'contract.shi'
})
}
</
Option
>
</
Select
>
</
Form
.
Item
>
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.shuil'
}),
dataIndex
:
'taxRate'
,
align
:
'center'
,
title
:
intl
.
formatMessage
({
id
:
'contract.shuil'
}),
dataIndex
:
'taxRate'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
<
Form
.
Item
name=
{
`taxRate${index}`
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingshuru'
})
}]
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingshuru'
})
}]
}
>
<
Input
style=
{
{
...
...
@@ -243,12 +243,12 @@ const FormList = (props: any) => {
</
Form
.
Item
>
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.danjiahanshui'
}),
dataIndex
:
'price'
,
align
:
'center'
,
title
:
intl
.
formatMessage
({
id
:
'contract.danjiahanshui'
}),
dataIndex
:
'price'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
<
Form
.
Item
name=
{
`price${index}`
}
initialValue=
{
text
!=
''
?
Number
(
text
).
toFixed
(
2
)
:
''
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingshuru'
})
}]
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingshuru'
})
}]
}
>
<
Input
style=
{
{
...
...
@@ -262,11 +262,11 @@ const FormList = (props: any) => {
</
Form
.
Item
>
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.shoubiaoshuliang'
}),
dataIndex
:
'bidCount'
,
align
:
'center'
,
title
:
intl
.
formatMessage
({
id
:
'contract.shoubiaoshuliang'
}),
dataIndex
:
'bidCount'
,
align
:
'center'
,
render
:
(
text
,
record
,
index
)
=>
<
Form
.
Item
name=
{
`bidCount${index}`
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingshuru'
})
}]
}
rules=
{
[{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'contract.qingshuru'
})
}]
}
>
<
Input
style=
{
{
...
...
@@ -279,25 +279,25 @@ const FormList = (props: any) => {
</
Form
.
Item
>
},
{
title
:
intl
.
formatMessage
({
id
:
'contract.jinehanshui'
}),
title
:
intl
.
formatMessage
({
id
:
'contract.jinehanshui'
}),
dataIndex
:
'bidAmount'
,
key
:
'bidAmount'
,
align
:
'center'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
>
{
intl
.
formatMessage
({
id
:
'commodity.products.directChannel.columns.currency'
})
}{
record
.
bidAmount
?
Number
(
record
.
bidAmount
).
toFixed
(
2
)
:
'0.00'
}
</
Text
>
render
:
(
text
:
any
,
record
:
any
)
=>
<
Text
>
{
intl
.
formatMessage
({
id
:
'commodity.products.directChannel.columns.currency'
})
}{
record
.
bidAmount
?
Number
(
record
.
bidAmount
).
toFixed
(
2
)
:
'0.00'
}
</
Text
>
},
];
if
(
dataList
.
length
===
0
)
{
columnsTab
.
push
(
{
title
:
intl
.
formatMessage
({
id
:
'contract.caozuo'
}),
title
:
intl
.
formatMessage
({
id
:
'contract.caozuo'
}),
dataIndex
:
'del'
,
align
:
'center'
,
key
:
'del'
,
render
:
(
_
,
record
,
index
)
=>
{
return
(
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'contract.quedingyaoshanchuma'
})
}
onConfirm=
{
()
=>
handleDelete
(
record
.
id
)
}
>
<
a
>
{
intl
.
formatMessage
({
id
:
'contract.shanchu'
})
}
</
a
>
<
Popconfirm
title=
{
intl
.
formatMessage
({
id
:
'contract.quedingyaoshanchuma'
})
}
onConfirm=
{
()
=>
handleDelete
(
record
.
id
)
}
>
<
a
>
{
intl
.
formatMessage
({
id
:
'contract.shanchu'
})
}
</
a
>
</
Popconfirm
>
)
}
...
...
@@ -358,19 +358,19 @@ const FormList = (props: any) => {
const
listItem
=
(
record
,
index
)
=>
(
<
div
className=
{
styles
.
listItem
}
>
<
div
className=
{
styles
.
label
}
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.guanlian'
})
}
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.baojiashangpin'
})
}
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.guanlian'
})
}
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.baojiashangpin'
})
}
</
p
>
</
div
>
<
div
className=
{
styles
.
text
}
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.shangpinID'
})
}
:
{
record
.
associatedDataId
}
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.shangpinmingcheng'
})
}
:
{
record
.
associatedGoods
}
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.shangpinID'
})
}
:
{
record
.
associatedDataId
}
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.shangpinmingcheng'
})
}
:
{
record
.
associatedGoods
}
</
p
>
</
div
>
<
div
className=
{
styles
.
text
}
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.guige'
})
}
:
{
record
.
associatedType
}
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.pinlei'
})
}
:
{
record
.
associatedCategory
}
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.guige'
})
}
:
{
record
.
associatedType
}
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.pinlei'
})
}
:
{
record
.
associatedCategory
}
</
p
>
</
div
>
<
div
className=
{
styles
.
text
}
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.pinpai'
})
}
:
{
record
.
associatedBrand
}
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'contract.pinpai'
})
}
:
{
record
.
associatedBrand
}
</
p
>
</
div
>
</
div
>
...
...
@@ -407,7 +407,7 @@ const FormList = (props: any) => {
<
div
className=
{
styles
.
box
}
>
{
Object
.
keys
(
Row
).
length
===
0
&&
<
div
style=
{
{
paddingTop
:
12
,
paddingBottom
:
12
,
}
}
onClick=
{
()
=>
setIsModalVisible
(
true
)
}
>
<
Button
block
type=
'dashed'
><
PlusOutlined
/>
{
intl
.
formatMessage
({
id
:
'contract.xuanzecaigouwuliao'
})
}
</
Button
>
<
Button
block
type=
'dashed'
><
PlusOutlined
/>
{
intl
.
formatMessage
({
id
:
'contract.xuanzecaigouwuliao'
})
}
</
Button
>
</
div
>
}
<
Table
...
...
@@ -423,7 +423,7 @@ const FormList = (props: any) => {
/>
{
/* 模态框 */
}
<
Modal
title=
{
intl
.
formatMessage
({
id
:
'contract.xuanzecaigouwuliao'
})
}
width=
{
900
}
visible=
{
isModalVisible
}
onOk=
{
handleOk
}
onCancel=
{
handleCancel
}
>
<
Modal
title=
{
intl
.
formatMessage
({
id
:
'contract.xuanzecaigouwuliao'
})
}
width=
{
900
}
visible=
{
isModalVisible
}
onOk=
{
handleOk
}
onCancel=
{
handleCancel
}
>
<
StandardTable
tableProps=
{
{
rowKey
:
'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