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
9989de66
Commit
9989de66
authored
Dec 11, 2022
by
陈智峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 采购数量在关联订单回显问题
parent
a0591ee6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
package.json
package.json
+2
-3
index.tsx
...pages/transaction/purchaseOrder/orderCollectSrm/index.tsx
+25
-1
No files found.
package.json
View file @
9989de66
...
...
@@ -9,7 +9,7 @@
"start:dev"
:
"cross-env NODE_OPTIONS=--max_old_space_size=4096 umi dev"
,
"start:analyze"
:
"ANALYZE=1 umi dev"
,
"clean"
:
"rimraf node_modules"
,
"start"
:
"yarn
api && yarn
scripts:build && cross-env NODE_OPTIONS=--max_old_space_size=8192 UMI_ENV=local umi dev"
,
"start"
:
"yarn scripts:build && cross-env NODE_OPTIONS=--max_old_space_size=8192 UMI_ENV=local umi dev"
,
"start-noApi"
:
"yarn scripts:build && cross-env NODE_OPTIONS=--max_old_space_size=8192 UMI_ENV=local umi dev"
,
"start-fast"
:
"cross-env NODE_OPTIONS=--max_old_space_size=8192 UMI_ENV=local umi dev"
,
"build"
:
"yarn && yarn api && yarn scripts:build && yarn build:clean"
,
...
...
@@ -27,8 +27,7 @@
"start:jinfa-0518"
:
"cross-env PRO_ENV=jinfa-0518 yarn start"
,
"start-noApi:jinfa-221102"
:
"cross-env PRO_ENV=jinfa-1102 yarn start-noApi"
,
"start-fast:jinfa-221102"
:
"cross-env PRO_ENV=jinfa-1102 yarn start-fast"
,
"start:jinfa-221102"
:
"cross-env PRO_ENV=jinfa-1102 yarn start"
,
"fstart"
:
"umi dev"
"start:jinfa-221102"
:
"cross-env PRO_ENV=jinfa-1102 yarn start"
},
"lint-staged"
:
{
"*.{js,jsx,less,md,json}"
:
[
...
...
src/pages/transaction/purchaseOrder/orderCollectSrm/index.tsx
View file @
9989de66
...
...
@@ -477,8 +477,32 @@ const PurchaseOrderDetail: React.FC<PurchaseOrderDetailProps> = (props) => {
mergeArr
.
push
({
...
convertOrderMaterialData
(
item
),
...
entity
,
//原来数据优先
//以下是需要更新的
quantity
:
item
.
requisitionList
?.
reduce
((
pre
,
now
)
=>
Number
(
Number
((
now
as
any
).
orderQuantity
+
pre
).
toFixed
(
3
)),
0
)
||
0
,
requisitions
:
(()
=>
{
const
result
=
[]
item
.
requisitionList
?.
forEach
(({
detailId
,
...
rest
})
=>
{
const
existedRequisition
=
result
.
find
(
requisition
=>
requisition
.
requisitionId
===
detailId
)
if
(
existedRequisition
)
{
existedRequisition
.
orderQuantity
+=
(
rest
as
any
).
orderQuantity
||
0
existedRequisition
.
salesManRequests
.
push
({
...
rest
.
purchaseProductSalesManResponse
,
purchaseOrderQuantity
:
(
rest
as
any
).
orderQuantity
||
0
,
})
}
else
{
result
.
push
({
requisitionId
:
detailId
,
orderQuantity
:
(
rest
as
any
).
orderQuantity
||
0
,
requisitionNo
:
(
rest
as
any
).
requisitionNo
,
salesManRequests
:
[{
...
rest
.
purchaseProductSalesManResponse
,
purchaseOrderQuantity
:
(
rest
as
any
).
orderQuantity
||
0
,
}]
})
}
})
return
result
})(),
});
}
else
{
mergeArr
.
push
({
...
convertOrderMaterialData
(
item
)
});
...
...
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