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
3d7ebf5e
Commit
3d7ebf5e
authored
Dec 19, 2022
by
shenshaokai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jinfa-20221102' into 'jinfa-20221102'
fix: bugID=35688 框架合同支持修改采购数量 See merge request project/jinfa-platform!475
parents
7fe013a8
f13e9931
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
18 deletions
+6
-18
index.tsx
...pages/transaction/purchaseOrder/orderCollectSrm/index.tsx
+1
-1
useMaterialTable.tsx
.../purchaseOrder/orderCollectSrm/model/useMaterialTable.tsx
+5
-17
No files found.
src/pages/transaction/purchaseOrder/orderCollectSrm/index.tsx
View file @
3d7ebf5e
...
...
@@ -245,7 +245,7 @@ const PurchaseOrderDetail: React.FC<PurchaseOrderDetailProps> = (props) => {
:
materialColumns
productState
.
props
[
"x-component-props"
]
=
{
...
productState
.
props
[
"x-component-props"
],
columns
,
//
columns,
scroll
:
{
x
:
columns
.
reduce
((
total
,
current
)
=>
total
+=
current
.
width
,
0
)
},
// prefix: productState.editable && pageStatus === PageStatus.ADD ? materialAddButton : '',
prefix
:
materialAddButton
,
...
...
src/pages/transaction/purchaseOrder/orderCollectSrm/model/useMaterialTable.tsx
View file @
3d7ebf5e
...
...
@@ -25,7 +25,7 @@ export const sortByKey = (params) => {
export
const
getUnitPriceTotal
=
(
record
)
=>
{
const
purchaseCount
=
Number
(
record
[
'quantity'
])
||
0
return
math
(
'round'
,
Number
((
record
.
price
*
purchaseCount
)),
2
)
return
math
(
'round'
,
Number
((
record
.
price
*
purchaseCount
)),
2
)
}
/**
...
...
@@ -57,24 +57,12 @@ export const useMaterialTable = (
onDeleteRecord
?.(
record
)
}
const
materialColumns
=
useMemo
(()
=>
{
const
{
pageStatus
}
=
usePageStatus
()
//
const { pageStatus } = usePageStatus()
const
tempColumn
=
[...(
orderMode
===
OrderModalType
.
PURCHASE_REQUISITION_CONTRACT_ORDER
?
materialInfoColumnsByRequisition
:
materialInfoColumns
.
map
(
val
=>
{
if
(
val
.
key
===
'quantity'
)
{
// //采购询价合同、框架都能改 其他不能都不能改(这个在弹窗里面输入数量了)
return
{
...
val
,
editable
:
orderMode
===
OrderModalType
.
PURCHASE_ENQUIRY_CONTRACT_ORDER
||
orderMode
===
OrderModalType
.
FRAME_CONTRACT_ORDER
,
}
}
return
val
})
:
materialInfoColumns
)]
// if (pageStatus === PageStatus.ADD) {
// 渲染操作
...
...
@@ -96,7 +84,7 @@ export const useMaterialTable = (
)
}
return
tempColumn
},[
orderMode
])
},
[
orderMode
])
const
handleShowMaterial
=
()
=>
{
const
supplyMembersId
=
ctx
.
getFieldValue
(
'vendorMemberId'
)
const
products
=
ctx
.
getFieldValue
(
'products'
)
...
...
@@ -192,7 +180,7 @@ export const useMaterialTable = (
if
(
!
col
.
editable
)
{
return
col
;
}
if
(
orderMode
===
OrderModalType
.
PURCHASE_REQUISITION_CONTRACT_ORDER
&&
col
?.
dataIndex
===
'quantity'
)
{
if
(
!
[
OrderModalType
.
FRAME_CONTRACT_ORDER
,
OrderModalType
.
PURCHASE_ENQUIRY_CONTRACT_ORDER
].
includes
(
Number
(
orderMode
))
&&
col
?.
dataIndex
===
'quantity'
)
{
return
col
}
return
{
...
...
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