From 53632cf00ebcaefda36620f0cf313dcc2370824b Mon Sep 17 00:00:00 2001 From: jl-zhoujl2 Date: Wed, 12 Oct 2022 10:19:08 +0800 Subject: [PATCH] =?UTF-8?q?10.11=20=E6=A0=87=E4=B9=A6=E8=B4=B9=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E4=BC=98=E5=8C=96=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=85=8D?= =?UTF-8?q?=E8=B4=B9=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Bid/CostConfig/index.tsx | 51 ++++++++++++------- .../Finance/Cost/components/Complete.tsx | 13 +++-- .../IParticipate/components/IParticipate.tsx | 2 +- .../IParticipate/components/IParticipate.tsx | 2 +- 4 files changed, 43 insertions(+), 25 deletions(-) diff --git a/src/pages/Bid/CostConfig/index.tsx b/src/pages/Bid/CostConfig/index.tsx index cc4adb5..c7aaf35 100644 --- a/src/pages/Bid/CostConfig/index.tsx +++ b/src/pages/Bid/CostConfig/index.tsx @@ -1,5 +1,5 @@ -import React, { useEffect, useState } from 'react'; -import ProTable, { ProColumns } from '@ant-design/pro-table'; +import React, { useEffect, useRef, useState } from 'react'; +import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table'; import { Button, Descriptions, Form, Input, message, Radio, Spin } from 'antd'; import styles from './indexStyles.less'; import '@/assets/xsy_style.less' @@ -83,25 +83,40 @@ const costConfig: React.FC<{}> = () => { { title: '序号', valueType: 'index', width: 50 }, { title: showName.sec, dataIndex: 'sectionName', }, { - title: showName.bsf + '(元)', dataIndex: 'expenses1Amount', + title: showName.bsf + '(元)', dataIndex: 'expenses1Amount', width: '20%', render: (_, record) => { return (
- - record.expenses1Amount = event.target.value} - /> - + { + const value = event.target.value; + if (value != undefined) { + const data = [...costData]; + const now = data[data.findIndex(item => item.sectionId === record.sectionId)]; + now.expenses1Type = value; + record.expenses1Amount = 0; + setCostData(data); + } + }} value={parseInt(record.expenses1Type)}> + 免费 + 收费 + {parseInt(record.expenses1Type) == 2 ? <> + record.expenses1Amount = event.target.value} + /> + 元 : null} +
) } diff --git a/src/pages/Finance/Cost/components/Complete.tsx b/src/pages/Finance/Cost/components/Complete.tsx index cc489ed..3436be1 100644 --- a/src/pages/Finance/Cost/components/Complete.tsx +++ b/src/pages/Finance/Cost/components/Complete.tsx @@ -43,13 +43,15 @@ const Complete: React.FC<{}> = () => { { title: '费用内容描述', dataIndex: 'commodityDescribe', width: '25%' }, { title: '下单时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime' }, { title: '支付时间', dataIndex: 'paymentTime', width: '10%', valueType: 'dateTime' }, - { title: '金额(元)', dataIndex: 'amount', width: '4%' }, + { title: '金额(元)', dataIndex: 'amount', width: '6%', render: (_, record) => record.chargeType == "0" ? "免费" : record.amount }, { title: '操作', dataIndex: 'option', - width: '3%', valueType: 'option', render: (_, record) => { + if (record.chargeType == "0") {//免费无需申请发票 + return null; + } if (record.bidInvoice == null) { return