Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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-admin
Commits
25a61922
Commit
25a61922
authored
Jan 22, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 修改按钮显示
parent
e14bac19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
189 additions
and
186 deletions
+189
-186
index.tsx
src/pages/returnManage/components/ReturnInfoDrawer/index.tsx
+189
-186
No files found.
src/pages/returnManage/components/ReturnInfoDrawer/index.tsx
View file @
25a61922
/*
* @Author: XieZhiXiong
* @Date: 2020-11-05 17:36:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-12-09 16:38:48
* @Description: 查看退货数量与退款金额 抽屉
*/
import
React
from
'react'
;
import
{
Drawer
,
Button
}
from
'antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
schema
from
'./schema'
;
import
{
createEffects
}
from
'./effects'
;
import
Stamp
from
'../Stamp'
;
import
SteamerTicket
from
'./components/SteamerTicket'
;
import
styles
from
'./index.less'
;
const
schemaAction
=
createFormActions
();
export
interface
PayListItem
{
/**
* 支付次数
*/
payCount
:
number
,
/**
* 支付环节
*/
payNode
:
string
,
/**
* 支付比例
*/
payRatio
:
number
,
/**
* 支付金额
*/
payAmount
:
number
,
/**
* 支付方式
*/
payWay
:
string
,
/**
* 支付渠道
*/
channel
:
string
,
/**
* 支付时间
*/
payTime
:
string
,
/**
* 退款金额
*/
refundAmount
:
number
,
};
export
interface
OrderInfo
{
/**
* 列表索引
*/
index
?:
number
;
/**
* 订单号
*/
orderNo
:
string
;
/**
* 商品名称
*/
productName
:
string
;
/**
* 品类
*/
category
:
string
;
/**
* 品牌
*/
brand
:
string
;
/**
* 单位
*/
unit
:
string
;
/**
* 采购数量
*/
purchaseCount
:
string
;
/**
* 采购单价
*/
purchasePrice
:
string
;
/**
* 采购金额
*/
purchaseAmount
:
string
;
/**
* 支付记录
*/
payList
:
PayListItem
;
/**
* 退款数量
*/
returnCount
?:
number
|
string
;
/**
* 退款理由
*/
returnReason
?:
string
;
};
interface
ReturnInfoDrawerProps
{
visible
:
boolean
;
orderInfo
:
OrderInfo
;
onClose
:
()
=>
void
;
onSubmit
?:
(
values
:
{
[
key
:
string
]:
any
})
=>
void
;
/**
* 是否是编辑的
*/
isEdit
?:
boolean
;
};
const
ReturnInfoDrawer
:
React
.
FC
<
ReturnInfoDrawerProps
>
=
({
visible
=
false
,
orderInfo
=
{},
onClose
,
onSubmit
,
isEdit
=
false
,
})
=>
{
const
handleClose
=
()
=>
{
if
(
onClose
)
{
onClose
();
}
};
const
handleSubmit
=
values
=>
{
if
(
onSubmit
)
{
onSubmit
(
values
);
}
else
{
onClose
();
}
};
return
(
<
Drawer
title=
"查看退货数量与退款金额"
placement=
"right"
width=
{
1120
}
onClose=
{
handleClose
}
visible=
{
visible
}
closable=
{
false
}
footer=
{
<
div
style=
{
{
textAlign
:
'right'
,
}
}
>
<
Button
onClick=
{
handleClose
}
style=
{
{
marginRight
:
8
}
}
>
取消
</
Button
>
<
Button
onClick=
{
()
=>
schemaAction
.
submit
()
}
type=
"primary"
>
确定
</
Button
>
</
div
>
}
>
<
NiceForm
initialValues=
{
orderInfo
}
previewPlaceholder=
" "
components=
{
{
Stamp
,
SteamerTicket
,
}
}
editable=
{
isEdit
}
effects=
{
(
$
,
actions
)
=>
{
createEffects
(
$
,
actions
);
}
}
onSubmit=
{
handleSubmit
}
actions=
{
schemaAction
}
schema=
{
schema
}
/>
</
Drawer
>
);
};
/*
* @Author: XieZhiXiong
* @Date: 2020-11-05 17:36:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-01-22 10:37:43
* @Description: 查看退货数量与退款金额 抽屉
*/
import
React
from
'react'
;
import
{
Drawer
,
Button
}
from
'antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
schema
from
'./schema'
;
import
{
createEffects
}
from
'./effects'
;
import
Stamp
from
'../Stamp'
;
import
SteamerTicket
from
'./components/SteamerTicket'
;
import
styles
from
'./index.less'
;
const
schemaAction
=
createFormActions
();
export
interface
PayListItem
{
/**
* 支付次数
*/
payCount
:
number
,
/**
* 支付环节
*/
payNode
:
string
,
/**
* 支付比例
*/
payRatio
:
number
,
/**
* 支付金额
*/
payAmount
:
number
,
/**
* 支付方式
*/
payWay
:
string
,
/**
* 支付渠道
*/
channel
:
string
,
/**
* 支付时间
*/
payTime
:
string
,
/**
* 退款金额
*/
refundAmount
:
number
,
};
export
interface
OrderInfo
{
/**
* 列表索引
*/
index
?:
number
;
/**
* 订单号
*/
orderNo
:
string
;
/**
* 商品名称
*/
productName
:
string
;
/**
* 品类
*/
category
:
string
;
/**
* 品牌
*/
brand
:
string
;
/**
* 单位
*/
unit
:
string
;
/**
* 采购数量
*/
purchaseCount
:
string
;
/**
* 采购单价
*/
purchasePrice
:
string
;
/**
* 采购金额
*/
purchaseAmount
:
string
;
/**
* 支付记录
*/
payList
:
PayListItem
;
/**
* 退款数量
*/
returnCount
?:
number
|
string
;
/**
* 退款理由
*/
returnReason
?:
string
;
};
interface
ReturnInfoDrawerProps
{
visible
:
boolean
;
orderInfo
:
OrderInfo
;
onClose
:
()
=>
void
;
onSubmit
?:
(
values
:
{
[
key
:
string
]:
any
})
=>
void
;
/**
* 是否是编辑的
*/
isEdit
?:
boolean
;
};
const
ReturnInfoDrawer
:
React
.
FC
<
ReturnInfoDrawerProps
>
=
({
visible
=
false
,
orderInfo
=
{},
onClose
,
onSubmit
,
isEdit
=
false
,
})
=>
{
const
handleClose
=
()
=>
{
if
(
onClose
)
{
onClose
();
}
};
const
handleSubmit
=
values
=>
{
if
(
onSubmit
)
{
onSubmit
(
values
);
}
else
{
onClose
();
}
};
return
(
<
Drawer
title=
"查看退货数量与退款金额"
placement=
"right"
width=
{
1120
}
onClose=
{
handleClose
}
visible=
{
visible
}
closable=
{
false
}
footer=
{
<
div
style=
{
{
textAlign
:
'right'
,
}
}
>
<
Button
onClick=
{
handleClose
}
style=
{
{
marginRight
:
8
}
}
>
{
onSubmit
?
'取消'
:
'关闭'
}
</
Button
>
{
onSubmit
&&
(
<
Button
onClick=
{
()
=>
schemaAction
.
submit
()
}
type=
"primary"
>
确定
</
Button
>
)
}
</
div
>
}
>
<
NiceForm
initialValues=
{
orderInfo
}
previewPlaceholder=
" "
components=
{
{
Stamp
,
SteamerTicket
,
}
}
editable=
{
isEdit
}
effects=
{
(
$
,
actions
)
=>
{
createEffects
(
$
,
actions
);
}
}
onSubmit=
{
handleSubmit
}
actions=
{
schemaAction
}
schema=
{
schema
}
/>
</
Drawer
>
);
};
export
default
ReturnInfoDrawer
;
\ No newline at end of file
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