Commit 65b3e897 authored by 卢均锐's avatar 卢均锐

feat: 业务请款详情修改字段

parent 91106b1a
import React, { Fragment, useEffect, useState, useMemo, useRef } from 'react';
import { Badge, Popconfirm, Button } from 'antd';
import { Button } from 'antd';
import { getIntl, history, Link } from 'umi';
import { CheckCircleOutlined } from '@ant-design/icons';
import { ColumnType } from 'antd/lib/table/interface';
import { StandardTable } from '@linkseeks/god';
import { GlobalConfig } from '@/global/config'
import { formatTimeString } from '@/utils'
import { priceFormat } from '@/utils/numberFomat';
import StatusTag from '@/components/StatusTag';
......@@ -38,6 +36,7 @@ const SearchDetail = () => {
const [dataSource, setDataSource] = useState<any>({});
const currentRef = useRef({});
const [basicEffect, setBasicEffect] = useState<any>([]);
const [writeOffRecord, setWriteOffRecord] = useState<any>({});
const _tabs = useMemo(() => {
let _list = [];
......@@ -62,12 +61,12 @@ const SearchDetail = () => {
col: [
{ label: '请款单号', extra: data.applyNo, type: 'text' },
{ label: '请款摘要', extra: data.applyAbstract, type: 'text' },
{ label: '请款类型', extra: data.applyType, type: 'text' },
{ label: '支付方式', extra: data.moneyPayWay, type: 'text' },
{ label: '请款类型', extra: data.applyTypeName, type: 'text' },
{ label: '支付方式', extra: data.moneyPayWayName, type: 'text' },
{ label: '请款备注', extra: data.remark, type: 'text' },
{ label: '对账单号', extra: <Link to={`/memberCenter/balance/businessReconciliation/search/preview?id=${data.reconciliationId}&no=${data.reconciliationNo}`}>{data.reconciliationNo}</Link>, type: 'text' },
{ label: '发票号码', extra: '40122826 (2020-08-25)', type: 'text' },
{ label: '状态', extra: <StatusTag type='primary' title={data.status} />, type: 'text' },
{ label: '状态', extra: <StatusTag type='primary' title={data.statusName} />, type: 'text' },
{ label: '单据时间', extra: data.createTime, type: 'text' },
]
},
......@@ -78,9 +77,9 @@ const SearchDetail = () => {
{ label: '银行账号', extra: data.bankAccount, type: 'text' },
{ label: '开户行', extra: data.bankDeposit, type: 'text' },
{ label: '请款金额', extra: ${priceFormat(data.applyAmount)}`, type: 'text' },
{ label: '核销金额', extra: ${priceFormat(data.applyAmount)}`, type: 'text' },
{ label: '预计付款日期', extra: data.expectPayTime, type: 'text' },
{ label: '付款方式', extra: data.payWay, type: 'text' },
{ label: '核销金额', extra: ${priceFormat(data.writeOffAmount)}`, type: 'text' },
{ label: '预计付款日期', extra: formatTimeString(data.expectPayTime, 'YYYY-MM-DD'), type: 'text' },
{ label: '付款方式', extra: data.payWayName, type: 'text' },
]
},
]
......@@ -89,7 +88,8 @@ const SearchDetail = () => {
})
}
const _openWriteOff = () => {
const _openWriteOff = (record) => {
setWriteOffRecord(record)
setWriteOffVisible(true)
}
......@@ -166,13 +166,13 @@ const SearchDetail = () => {
title: '核销金额',
key: 'writeOffAmount',
dataIndex: 'writeOffAmount',
render: (text: any) => <Button type='link' onClick={() => { _openWriteOff() }}>¥ ${priceFormat(text)}</Button>
render: (text: any, record: any) => <Button type='link' onClick={() => { _openWriteOff(record) }}>¥ ${priceFormat(text)}</Button>
},
{
title: '可核销金额',
key: 'reconciliationQuantity',
dataIndex: 'reconciliationQuantity',
render: (text: any) => <Button type='link' onClick={() => { _openWriteOff() }}>¥ ${priceFormat(text)}</Button>
key: 'canWriteOffAmount',
dataIndex: 'canWriteOffAmount',
render: (text: any, record: any) => <Button type='link' onClick={() => { _openWriteOff(record) }}>¥ ${priceFormat(text)}</Button>
},
];
......@@ -205,7 +205,7 @@ const SearchDetail = () => {
</Fragment>
}
/>
{/* <WriteOffDrawer visible={writeOffVisible} onClose={() => { setWriteOffVisible(false) }} /> */}
<WriteOffDrawer visible={writeOffVisible} record={writeOffRecord} onClose={() => { setWriteOffVisible(false) }} />
</>
)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment