|
@@ -124,13 +124,13 @@ const Receivable: React.FC<ReceivableProps> = ({ updateTreeAndContract, type })
|
|
|
}
|
|
|
const save = async (key: React.Key) => {
|
|
|
try {
|
|
|
- const row = (await form.validateFields()) as iReceivableState
|
|
|
+ const row = await form.validateFields()
|
|
|
|
|
|
const newData = [ ...data ]
|
|
|
const index = newData.findIndex(item => key === item.id)
|
|
|
if (index > -1) {
|
|
|
const item = newData[index]
|
|
|
- const payload = { ...row, time: dayjsFormat(row.time, 'YYYY-MM-DD'), createTime: dayjsFormat(row.createTime, 'YYYY-MM-DD'), id: item.id, bidsectionId: item.bidsectionId, contractsId: item.contractsId }
|
|
|
+ const payload = { ...row, time: dayjsFormat(row.time, 'YYYY-MM-DD'), createTime: dayjsFormat(row.createTime, 'YYYY-MM-DD'), id: item.id, bidsectionId: item.bidsectionId, contractsId: item.contractsId, price: parseFloat(row.price) }
|
|
|
const { code = -1 } = await apiUpdateReturn(type, payload)
|
|
|
if (code === consts.RET_CODE.SUCCESS) {
|
|
|
newData.splice(index, 1, {
|
|
@@ -171,7 +171,7 @@ const Receivable: React.FC<ReceivableProps> = ({ updateTreeAndContract, type })
|
|
|
editable: true,
|
|
|
width: '12%',
|
|
|
// eslint-disable-next-line react/display-name
|
|
|
- render: (text: string) => <span className="pi-text-right pi-width-100P">{formatMoney(new BigNumber(text).toString())}</span>
|
|
|
+ render: (text: string) => <span className="pi-text-right pi-width-100P">{formatMoney(text)}</span>
|
|
|
},
|
|
|
{
|
|
|
title: type === ContractType.INCOME ? '回款方式' : '支付方式',
|