修复 兑换码管理】编辑页面,立减金加款对话框中,输入加款金额,点击取消按钮,在充值批次金额中也会展示加款后的金额
This commit is contained in:
parent
87ba41c2ae
commit
3905dfe6fa
|
@ -8,6 +8,7 @@ import { Button, Notify } from 'zent'
|
|||
import { addFund, handelResponse } from '@/assets/api'
|
||||
export default ({ data, onChangeMoney }) => {
|
||||
const [stateData, setStateData] = useState({ addNew: '' })
|
||||
const [isCount, setIsCount] = useState(false)
|
||||
const ref = useRef()
|
||||
useEffect(() => {
|
||||
setStateData({ ...data })
|
||||
|
@ -25,6 +26,7 @@ export default ({ data, onChangeMoney }) => {
|
|||
res,
|
||||
(req, msg) => {
|
||||
Notify.success('加款成功')
|
||||
setIsCount(true)
|
||||
setTimeout(() => {
|
||||
onChangeMoney(false, Number(stateData.addNew))
|
||||
}, 1000)
|
||||
|
@ -132,10 +134,7 @@ export default ({ data, onChangeMoney }) => {
|
|||
<p className='dflexajce'>
|
||||
<Button
|
||||
onClick={() => {
|
||||
onChangeMoney(
|
||||
false,
|
||||
stateData.addNew ? Number(stateData.addNew) : 0
|
||||
)
|
||||
onChangeMoney(false, isCount ? Number(stateData.addNew) : 0)
|
||||
}}>
|
||||
取消
|
||||
</Button>
|
||||
|
|
Loading…
Reference in New Issue