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
a57bc860
Commit
a57bc860
authored
Jul 22, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix(询价报价): 修复bug
parent
af49596b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
50 deletions
+54
-50
index.tsx
...mponents/detailLayout/components/progressLayout/index.tsx
+27
-13
index.tsx
.../components/detailLayout/components/recordLyout/index.tsx
+25
-13
index.tsx
...es/transaction/dealAbility/inquiryOffer/preview/index.tsx
+0
-2
addForm.tsx
...saction/dealAbility/inquiryOffer/waitAddOffer/addForm.tsx
+1
-1
productQuote.tsx
...ity/inquiryOffer/waitAddOffer/components/productQuote.tsx
+1
-1
schema.ts
...action/dealAbility/inquiryOffer/waitSubmitOffer/schema.ts
+0
-20
No files found.
src/pages/transaction/components/detailLayout/components/progressLayout/index.tsx
View file @
a57bc860
/** 详情通用 - 流转进度 */
import
React
,
{
useContext
,
useState
}
from
'react'
;
import
React
,
{
useContext
,
use
Effect
,
use
State
}
from
'react'
;
import
{
Radio
,
Steps
}
from
'antd'
;
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../card'
;
import
style
from
'./index.less'
;
import
{
isEmpty
}
from
'lodash'
;
const
LOGSTATESTYPE
=
{
/** 外部流转 */
...
...
@@ -22,28 +23,41 @@ export interface ProgressProps {
const
ProgressLayout
:
React
.
FC
<
ProgressProps
>
=
(
props
:
any
)
=>
{
const
{
logstate
}
=
props
;
const
context
=
useContext
(
Context
);
const
[
logStatesStatus
,
setLogStatesStatus
]
=
useState
<
number
>
(
logstate
||
LOGSTATESTYPE
.
EXTERNALSTATES
);
console
.
log
(
context
)
const
[
logStatesStatus
,
setLogStatesStatus
]
=
useState
<
number
>
(
1
);
const
[
data
,
setData
]
=
useState
<
any
>
({})
useEffect
(()
=>
{
if
(
!
isEmpty
(
context
))
{
setLogStatesStatus
(
context
.
externalLogs
?
LOGSTATESTYPE
.
EXTERNALSTATES
:
LOGSTATESTYPE
.
INTERIORSTATES
)
setData
(
context
)
}
},
[
context
])
return
(
<
Card
id=
'progressLayout'
title=
'流转进度'
extra=
{
<
Radio
.
Group
onChange=
{
(
e
)
=>
setLogStatesStatus
(
e
.
target
.
value
)
}
defaultValue=
{
logStatesStatus
}
>
{
context
.
externalLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
>
外部流转
</
Radio
.
Button
>
}
{
context
.
interiorLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
INTERIORSTATES
}
>
内部流转
</
Radio
.
Button
>
}
{
context
.
examineInteriorLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXMAINEINERIORSTATES
}
>
竞价结果内部流转
</
Radio
.
Button
>
}
</
Radio
.
Group
>
<>
{
!
isEmpty
(
data
)
&&
(
<
Radio
.
Group
onChange=
{
(
e
)
=>
setLogStatesStatus
(
e
.
target
.
value
)
}
defaultValue=
{
data
.
externalLogs
?
LOGSTATESTYPE
.
EXTERNALSTATES
:
LOGSTATESTYPE
.
INTERIORSTATES
}
>
{
data
.
externalLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
>
外部流转
</
Radio
.
Button
>
}
{
data
.
interiorLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
INTERIORSTATES
}
>
内部流转
</
Radio
.
Button
>
}
{
data
.
examineInteriorLogStates
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXMAINEINERIORSTATES
}
>
竞价结果内部流转
</
Radio
.
Button
>
}
</
Radio
.
Group
>
)
}
</>
}
>
<
Steps
progressDot
>
{
logStatesStatus
===
LOGSTATESTYPE
.
EXTERNALSTATES
?
context
.
externalLogStates
&&
context
.
externalLogStates
.
map
(
item
=>
(
data
.
externalLogStates
&&
data
.
externalLogStates
.
map
(
item
=>
(
<
Steps
.
Step
key=
{
item
.
state
}
title=
{
item
.
operationalProcess
}
...
...
@@ -51,7 +65,7 @@ const ProgressLayout: React.FC<ProgressProps> = (props: any) => {
status=
{
item
.
isExecute
?
'finish'
:
'wait'
}
/>
))
:
(
logStatesStatus
===
LOGSTATESTYPE
.
INTERIORSTATES
?
context
.
interiorLogStates
&&
context
.
interiorLogStates
.
map
(
item
=>
(
data
.
interiorLogStates
&&
data
.
interiorLogStates
.
map
(
item
=>
(
<
Steps
.
Step
key=
{
item
.
state
}
title=
{
item
.
operationalProcess
}
...
...
@@ -59,7 +73,7 @@ const ProgressLayout: React.FC<ProgressProps> = (props: any) => {
status=
{
item
.
isExecute
?
'finish'
:
'wait'
}
/>
))
:
context
.
examineInteriorLogStates
&&
context
.
examineInteriorLogStates
.
map
(
item
=>
(
data
.
examineInteriorLogStates
&&
data
.
examineInteriorLogStates
.
map
(
item
=>
(
<
Steps
.
Step
key=
{
item
.
state
}
title=
{
item
.
operationalProcess
}
...
...
src/pages/transaction/components/detailLayout/components/recordLyout/index.tsx
View file @
a57bc860
/** 详情通用 - 流转进度 */
import
React
,
{
useContext
,
useState
}
from
'react'
;
import
React
,
{
useContext
,
use
Effect
,
use
State
}
from
'react'
;
import
{
Radio
,
Table
}
from
'antd'
;
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../card'
;
...
...
@@ -7,6 +7,7 @@ import {
EXTERNALLOGS
,
INTERNALLOGS
,
}
from
'./columns'
;
import
{
isEmpty
}
from
'lodash'
;
const
LOGSTATESTYPE
=
{
/** 外部流转 */
...
...
@@ -23,30 +24,41 @@ export interface ProgressProps {
const
RecordLayout
:
React
.
FC
<
ProgressProps
>
=
(
props
:
any
)
=>
{
const
{
logstate
}
=
props
;
const
context
=
useContext
(
Context
);
const
[
logStatus
,
setLogStatus
]
=
useState
<
number
>
(
context
.
externalLogs
?
LOGSTATESTYPE
.
EXTERNALSTATES
:
LOGSTATESTYPE
.
INTERIORSTATES
);
const
[
logStatus
,
setLogStatus
]
=
useState
<
number
>
(
context
.
externalLogs
?
LOGSTATESTYPE
.
EXTERNALSTATES
:
LOGSTATESTYPE
.
INTERIORSTATES
);
const
[
data
,
setData
]
=
useState
<
any
>
({})
useEffect
(()
=>
{
if
(
!
isEmpty
(
context
))
{
setLogStatus
(
context
.
externalLogs
?
LOGSTATESTYPE
.
EXTERNALSTATES
:
LOGSTATESTYPE
.
INTERIORSTATES
)
setData
(
context
)
}
},
[
context
])
return
(
<
Card
id=
'recordLyout'
title=
'流转记录'
extra=
{
<
Radio
.
Group
onChange=
{
(
e
)
=>
setLogStatus
(
e
.
target
.
value
)
}
defaultValue=
{
context
.
externalLogs
?
LOGSTATESTYPE
.
EXTERNALSTATES
:
LOGSTATESTYPE
.
INTERIORSTATES
}
>
{
/* {context.externalLogs && <Radio.Button value={LOGSTATESTYPE.EXTERNALSTATES}>外部流转</Radio.Button>}
{context.interiorLogs && <Radio.Button value={LOGSTATESTYPE.INTERIORSTATES}>内部流转</Radio.Button>} */
}
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
>
外部流转
</
Radio
.
Button
>
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
INTERIORSTATES
}
>
内部流转
</
Radio
.
Button
>
</
Radio
.
Group
>
<>
{
!
isEmpty
(
data
)
&&
(
<
Radio
.
Group
onChange=
{
(
e
)
=>
setLogStatus
(
e
.
target
.
value
)
}
defaultValue=
{
data
.
externalLogs
?
LOGSTATESTYPE
.
EXTERNALSTATES
:
LOGSTATESTYPE
.
INTERIORSTATES
}
>
{
data
.
externalLogs
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
EXTERNALSTATES
}
>
外部流转
</
Radio
.
Button
>
}
{
data
.
interiorLogs
&&
<
Radio
.
Button
value=
{
LOGSTATESTYPE
.
INTERIORSTATES
}
>
内部流转
</
Radio
.
Button
>
}
</
Radio
.
Group
>
)
}
</>
}
>
<
Table
columns=
{
logStatus
===
LOGSTATESTYPE
.
EXTERNALSTATES
?
EXTERNALLOGS
:
INTERNALLOGS
}
dataSource=
{
logStatus
===
LOGSTATESTYPE
.
EXTERNALSTATES
?
context
.
externalLogs
:
context
.
interiorLogs
data
.
externalLogs
:
data
.
interiorLogs
}
rowKey=
{
(
record
)
=>
record
.
id
}
pagination=
{
{
...
...
src/pages/transaction/dealAbility/inquiryOffer/preview/index.tsx
View file @
a57bc860
...
...
@@ -122,9 +122,7 @@ const InquiryOfferPreview = () => {
}
const
{
data
}
=
res
;
data
.
externalLogStates
=
[...
data
.
externalInquiryListStateResponses
];
data
.
interiorLogStates
=
[...
data
.
interiorRequisitionFormStateResponses
];
data
.
externalLogs
=
[...
data
.
externalInquiryListLogResponses
];
data
.
interiorLogs
=
[...
data
.
interiorInquiryListLogResponses
];
setDataSource
(
data
);
handleBasicEffect
(
data
);
handleConditionEffect
(
data
);
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/addForm.tsx
View file @
a57bc860
...
...
@@ -40,7 +40,7 @@ const AddedFormLayout: React.FC<AddedFormLayoutProps> = (props: any) => {
const
count
=
(
num
:
any
,
price
:
any
)
=>
{
let
money
:
any
=
null
;
money
=
(
Number
(
price
)
*
1
)
/
Number
(
num
);
money
=
(
Number
(
price
)
*
1
)
*
Number
(
num
);
return
Number
(
money
).
toFixed
(
2
);
}
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitAddOffer/components/productQuote.tsx
View file @
a57bc860
...
...
@@ -14,7 +14,7 @@ const ProductQuoteLayout: React.FC<ProductQuoteLayoutProps> = (props: any) => {
const
[
dataSource
,
setDataSource
]
=
useState
<
any
[]
>
([]);
const
count
=
(
num
:
any
,
price
:
any
)
=>
{
let
money
:
any
=
null
;
money
=
(
Number
(
price
)
*
1
)
/
Number
(
num
);
money
=
(
Number
(
price
)
*
1
)
*
Number
(
num
);
return
Number
(
money
).
toFixed
(
2
);
}
const
handleChange
=
(
id
,
e
)
=>
{
...
...
src/pages/transaction/dealAbility/inquiryOffer/waitSubmitOffer/schema.ts
View file @
a57bc860
...
...
@@ -74,26 +74,6 @@ export const WAITSUBMITOFFERSCHEMA: ISchema = {
placeholder
:
"单据时间(全部)"
,
}
},
externalState
:
{
type
:
"string"
,
"x-component-props"
:
{
placeholder
:
"外部状态"
,
style
:
{
width
:
160
}
},
enum
:
[]
},
interiorState
:
{
type
:
"string"
,
"x-component-props"
:
{
placeholder
:
"内部状态"
,
style
:
{
width
:
160
}
},
enum
:
[]
},
}
},
sumbit
:
{
...
...
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