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
f87fd488
Commit
f87fd488
authored
Apr 22, 2021
by
前端-黄佳鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: 确认运费新增税率输入
parent
8ab10058
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
62 additions
and
39 deletions
+62
-39
confirmModal.tsx
src/pages/logistics/components/confirmModal.tsx
+4
-3
orderSearchDetail.tsx
src/pages/logistics/components/orderSearchDetail.tsx
+58
-36
No files found.
src/pages/logistics/components/confirmModal.tsx
View file @
f87fd488
...
...
@@ -13,6 +13,7 @@ export interface Params {
dialogVisible
:
boolean
;
onCancel
:
Function
;
onOK
?:
Function
;
taxRate
?:
any
,
freightPrice
?:
any
;
dontReceive
?:
boolean
;
//默认展示
}
...
...
@@ -25,9 +26,9 @@ const comfirmDialog: React.FC<Params> = (props) => {
const
handletOk
=
(
values
:
any
)
=>
{
let
value
=
{
...
values
}
value
.
id
=
props
.
id
if
(
props
.
freightPrice
)
{
value
.
freightPrice
=
props
.
freightPric
e
}
value
.
freightPrice
=
props
.
freightPrice
value
.
taxRate
=
props
.
taxRat
e
value
.
taxInclusive
=
1
PublicApi
.
postLogisticsOrderWaitConfirmConfirm
(
value
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
props
.
onOK
()
...
...
src/pages/logistics/components/orderSearchDetail.tsx
View file @
f87fd488
import
React
,
{
useEffect
,
useState
,
ReactNode
,
useRef
}
from
'react'
;
import
{
Row
,
Col
,
Table
,
Input
,
Button
,
Tag
,
Badge
,
Steps
,
message
}
from
'antd'
import
React
,
{
useEffect
,
useState
,
ReactNode
,
useRef
,
Fragment
}
from
'react'
;
import
{
Row
,
Col
,
Table
,
Input
,
Button
,
Tag
,
Badge
,
Steps
,
message
,
Form
,
Checkbox
}
from
'antd'
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
import
{
CheckSquareOutlined
}
from
'@ant-design/icons'
import
{
ColumnType
}
from
'antd/lib/table/interface'
...
...
@@ -11,9 +11,18 @@ import style from './index.less'
import
statuStyle
from
'../colorTag'
const
{
Step
}
=
Steps
const
layout
:
any
=
{
colon
:
false
,
labelCol
:
{
style
:
{
width
:
'150px'
}
},
wrapperCol
:
{
style
:
{
width
:
'500px'
}
},
labelAlign
:
"left"
}
const
detailInfo
:
React
.
FC
<
{}
>
=
()
=>
{
const
ref
=
useRef
<
any
>
({})
const
[
form
]
=
Form
.
useForm
();
const
[
freightPrice
,
setfreightPrice
]
=
useState
<
any
>
(
null
);
const
[
taxRate
,
setTaxRate
]
=
useState
<
any
>
(
null
);
let
[
isextraOption
,
setIsextraOption
]
=
useState
(
false
)
let
[
dataInfo
,
setdataInfo
]
=
useState
<
any
>
({
status
:
''
,
...
...
@@ -74,8 +83,9 @@ const detailInfo: React.FC<{}> = () => {
freight
:
{
title
:
'运费'
,
leftElem
:
[
{
title
:
'是否含税:'
,
key
:
'taxRate'
,
value
:
''
},
{
title
:
'运费:'
,
key
:
'freight'
,
value
:
dataInfo
.
freightPrice
||
''
},
{
title
:
'结算方式:'
,
key
:
''
,
value
:
dataInfo
.
settlementWay
||
''
}
{
title
:
'结算方式:'
,
key
:
'
settlement
'
,
value
:
dataInfo
.
settlementWay
||
''
}
]
}
}
...
...
@@ -245,11 +255,14 @@ const detailInfo: React.FC<{}> = () => {
setfreightPrice
(
value
);
}
const
handleAudit
=
()
=>
{
if
(
freightPrice
)
{
setvisible
(
true
)
}
else
{
message
.
error
(
'请输入运费'
)
const
handleAudit
=
async
()
=>
{
try
{
const
value
=
await
form
.
validateFields
();
setfreightPrice
(
value
.
freight
);
setTaxRate
(
value
.
taxRate
);
setvisible
(
true
);
}
catch
{
message
.
error
(
'请下拉到运费模块输入税率和运费!'
)
}
}
...
...
@@ -419,35 +432,43 @@ const detailInfo: React.FC<{}> = () => {
{
infoTem
[
'freight'
].
leftElem
.
map
(
(
item
:
any
,
index
:
number
)
=>
{
return
(
<
div
className=
{
style
[
'cols-main'
]
}
key=
{
`freight${index + 1}`
}
>
<
div
className=
{
style
[
'cols-main-options'
]
}
>
{
item
.
title
}
</
div
>
{
item
.
key
===
'freight'
?
<>
{
type
===
'option'
?
<
div
className=
{
style
[
'cols-main-options'
]
}
>
<
Input
value=
{
freightPrice
}
addonBefore=
"¥"
onChange=
{
inputOnchange
}
type=
'number'
maxLength=
{
25
}
style=
{
{
width
:
'300px'
}
}
/>
</
div
>
:
<
div
className=
{
style
[
'cols-main-options'
]
}
>
{
dataInfo
.
status
<
3
?
'未报价'
:
item
.
value
}
</
div
>
}
</>
:
<
div
className=
{
style
[
'cols-main-options'
]
}
>
{
item
.
value
}
<
Form
{
...
layout
}
form=
{
form
}
>
{
item
.
key
===
'taxRate'
&&
<
Form
.
Item
label=
{
item
.
title
}
style=
{
{
marginBottom
:
0
,
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
'absolute'
,
top
:
'7px'
,
}
}
>
<
Checkbox
checked
>
是
</
Checkbox
>
</
div
>
}
</
div
>
<
Form
.
Item
label=
'税率'
name=
'taxRate'
rules=
{
[{
required
:
true
,
message
:
'请输入税率'
}]
}
style=
{
{
paddingLeft
:
'60px'
}
}
>
<
Input
type=
'number'
addonAfter=
'%'
maxLength=
{
25
}
style=
{
{
width
:
'200px'
}
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
}
{
item
.
key
===
'freight'
&&
<
Form
.
Item
label=
{
item
.
title
}
name=
{
item
.
key
}
rules=
{
[{
required
:
true
,
message
:
'请输入运费'
}]
}
>
<
Input
type=
'number'
addonBefore=
"¥"
maxLength=
{
25
}
style=
{
{
width
:
'300px'
}
}
/>
</
Form
.
Item
>
}
{
item
.
key
===
'settlement'
&&
<
Form
.
Item
label=
{
item
.
title
}
name=
{
item
.
key
}
>
<
span
>
{
item
.
value
}
</
span
>
</
Form
.
Item
>
}
</
Form
>
);
},
)
}
...
...
@@ -470,6 +491,7 @@ const detailInfo: React.FC<{}> = () => {
<
ConfirmModal
id=
{
id
}
dialogVisible=
{
visible
}
taxRate=
{
taxRate
}
freightPrice=
{
freightPrice
}
onCancel=
{
()
=>
setvisible
(
false
)
}
onOK=
{
()
=>
handleModalOK
()
}
...
...
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