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
5b1cc840
Commit
5b1cc840
authored
Jan 27, 2021
by
前端-钟卫鹏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 处理编辑采购订单发票回显问题
parent
cd4421e9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
index.tsx
...aseOrder/orderCollect/components/theInvoiceList/index.tsx
+5
-6
index.ts
...s/transaction/purchaseOrder/orderCollect/effects/index.ts
+2
-2
No files found.
src/pages/transaction/purchaseOrder/orderCollect/components/theInvoiceList/index.tsx
View file @
5b1cc840
...
...
@@ -37,24 +37,25 @@ const TheInvoiceList = (props: ISchemaFieldComponentProps) => {
})
}
}
else
if
(
pageStatus
===
PageStatus
.
EDIT
){
// console.log(value, mode, dataSource, 'vvv')
// @bug todo 编辑情况下 默认显示有问题 固定第一个
// console.log(value, mode, dataSource, 'EDIT')
if
(
typeof
value
===
'object'
)
{
// console.log('o')
let
target
=
(
mode
===
'add'
||
mode
===
'delete'
)
?
dataSource
[
0
]
:
value
setFieldState
({
dataSource
,
showMore
,
useValue
:
target
})
// console.log('isObject', target)
mutators
.
change
(
target
)
}
else
{
let
target
=
dataSource
.
find
(
v
=>
v
.
id
===
value
)
// console.log(target, 'target')
let
target
=
dataSource
.
length
?
dataSource
.
find
(
v
=>
v
.
id
===
value
)
:
value
setFieldState
({
dataSource
,
showMore
,
useValue
:
target
})
// console.log('notObject', target)
mutators
.
change
(
target
)
}
}
...
...
@@ -89,9 +90,7 @@ const TheInvoiceList = (props: ISchemaFieldComponentProps) => {
form
.
setFieldValue
(
"needTheInvoice"
,
0
)
}
// 订单新增 重载全部置为第一个
// console.log(value, '-2')
if
(
pageStatus
===
PageStatus
.
ADD
)
{
// console.log(value, '-1')
setFieldState
({
dataSource
:
data
,
showMore
,
...
...
src/pages/transaction/purchaseOrder/orderCollect/effects/index.ts
View file @
5b1cc840
...
...
@@ -290,7 +290,7 @@ export const useOrderUpdateChangeOther = (ctx: ISchemaFormActions | ISchemaFormA
if
(
pageStatus
===
PageStatus
.
EDIT
){
if
(
state
?.
dataSource
?.
length
&&
state
.
loading
)
{
ctx
.
submit
((
values
)
=>
{
console
.
log
(
values
,
value
,
path
,
'发票id'
)
//
console.log(values, value, path, '发票id')
if
(
values
){
PublicApi
.
postOrderProcurementOrderUpdate
({
...
values
,
...
...
@@ -313,7 +313,7 @@ export const useOrderUpdateChangeOther = (ctx: ISchemaFormActions | ISchemaFormA
if
(
pageStatus
===
PageStatus
.
EDIT
){
if
(
state
?.
dataSource
?.
length
&&
state
.
loading
)
{
ctx
.
submit
((
values
)
=>
{
console
.
log
(
values
,
value
,
path
,
'发货地址id'
)
//
console.log(values, value, path, '发货地址id')
if
(
values
){
PublicApi
.
postOrderProcurementOrderUpdate
({
...
values
,
...
...
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