10.11 标书费功能优化,增加免费选项
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
import ProTable, { ProColumns } from '@ant-design/pro-table';
|
import ProTable, { ActionType, ProColumns } from '@ant-design/pro-table';
|
||||||
import { Button, Descriptions, Form, Input, message, Radio, Spin } from 'antd';
|
import { Button, Descriptions, Form, Input, message, Radio, Spin } from 'antd';
|
||||||
import styles from './indexStyles.less';
|
import styles from './indexStyles.less';
|
||||||
import '@/assets/xsy_style.less'
|
import '@/assets/xsy_style.less'
|
||||||
@ -83,12 +83,25 @@ const costConfig: React.FC<{}> = () => {
|
|||||||
{ title: '序号', valueType: 'index', width: 50 },
|
{ title: '序号', valueType: 'index', width: 50 },
|
||||||
{ title: showName.sec, dataIndex: 'sectionName', },
|
{ title: showName.sec, dataIndex: 'sectionName', },
|
||||||
{
|
{
|
||||||
title: showName.bsf + '(元)', dataIndex: 'expenses1Amount',
|
title: showName.bsf + '(元)', dataIndex: 'expenses1Amount', width: '20%',
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
return (
|
return (
|
||||||
<Form form={form}>
|
<Form form={form}>
|
||||||
<FormItem
|
<Radio.Group disabled={returnDisabled(record.sendOut)} onChange={(event) => {
|
||||||
|
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)}>
|
||||||
|
<Radio value={0} className={styles.radioStyle}>免费</Radio>
|
||||||
|
<Radio value={2} className={styles.radioStyle}>收费
|
||||||
|
{parseInt(record.expenses1Type) == 2 ? <><FormItem
|
||||||
name={`expenses1Amount${record.key}`}
|
name={`expenses1Amount${record.key}`}
|
||||||
|
style={{ display: 'inline-block', width: '60%', paddingLeft: '6px', position: 'relative', top: '-4px' }}
|
||||||
rules={[
|
rules={[
|
||||||
{ pattern: /^[0-9]+(\.[0-9]{1,2})?$/, message: '请输入正确数值(最多2位小数)' },
|
{ pattern: /^[0-9]+(\.[0-9]{1,2})?$/, message: '请输入正确数值(最多2位小数)' },
|
||||||
{ pattern: /^.{0,21}$/, message: '超长' }
|
{ pattern: /^.{0,21}$/, message: '超长' }
|
||||||
@ -96,12 +109,14 @@ const costConfig: React.FC<{}> = () => {
|
|||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
readOnly={returnDisabled(record.sendOut)}
|
readOnly={returnDisabled(record.sendOut)}
|
||||||
style={{ width: '80%', maxWidth: '300px' }}
|
size="small"
|
||||||
|
type="number"
|
||||||
placeholder={`请输入${showName.bsf}`}
|
placeholder={`请输入${showName.bsf}`}
|
||||||
defaultValue={record.expenses1Amount}
|
defaultValue={record.expenses1Amount}
|
||||||
onBlur={(event) => record.expenses1Amount = event.target.value}
|
onBlur={(event) => record.expenses1Amount = event.target.value}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem> 元</> : null}</Radio>
|
||||||
|
</Radio.Group>
|
||||||
</Form>
|
</Form>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -43,13 +43,15 @@ const Complete: React.FC<{}> = () => {
|
|||||||
{ title: '费用内容描述', dataIndex: 'commodityDescribe', width: '25%' },
|
{ title: '费用内容描述', dataIndex: 'commodityDescribe', width: '25%' },
|
||||||
{ title: '下单时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime' },
|
{ title: '下单时间', dataIndex: 'createDate', width: '10%', valueType: 'dateTime' },
|
||||||
{ title: '支付时间', dataIndex: 'paymentTime', 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: '操作',
|
title: '操作',
|
||||||
dataIndex: 'option',
|
dataIndex: 'option',
|
||||||
width: '3%',
|
|
||||||
valueType: 'option',
|
valueType: 'option',
|
||||||
render: (_, record) => {
|
render: (_, record) => {
|
||||||
|
if (record.chargeType == "0") {//免费无需申请发票
|
||||||
|
return null;
|
||||||
|
}
|
||||||
if (record.bidInvoice == null) {
|
if (record.bidInvoice == null) {
|
||||||
return <Button
|
return <Button
|
||||||
type="text"
|
type="text"
|
||||||
@ -97,10 +99,11 @@ const Complete: React.FC<{}> = () => {
|
|||||||
options={false}
|
options={false}
|
||||||
rowSelection={{
|
rowSelection={{
|
||||||
getCheckboxProps: (record) => ({
|
getCheckboxProps: (record) => ({
|
||||||
disabled: record.bidInvoice == null ? false : true
|
disabled: record.bidInvoice == null ? record.chargeType == "0" : true
|
||||||
}),
|
}),
|
||||||
columnWidth: '1px',
|
preserveSelectedRowKeys: true,
|
||||||
fixed: true,
|
// columnWidth: '50px',
|
||||||
|
// fixed: true,
|
||||||
}}
|
}}
|
||||||
pagination={{ defaultPageSize: 10 }} //默认显示条数
|
pagination={{ defaultPageSize: 10 }} //默认显示条数
|
||||||
// bordered
|
// bordered
|
||||||
|
@ -189,7 +189,7 @@ const IParticipate: React.FC = () => {
|
|||||||
{
|
{
|
||||||
title: flowName[moduleName.cost],
|
title: flowName[moduleName.cost],
|
||||||
dataIndex: 'amount',
|
dataIndex: 'amount',
|
||||||
render: (_: any, record: any, index: number) => digitalConversionAmount(record.amount, 2)
|
render: (_: any, record: any, index: number) => record.chargeType == "0" ? "免费" : digitalConversionAmount(record.amount, 2)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: flowName[moduleName.fileName] + '文件获取开始时间',
|
title: flowName[moduleName.fileName] + '文件获取开始时间',
|
||||||
|
@ -180,7 +180,7 @@ const IParticipate: React.FC = () => {
|
|||||||
{
|
{
|
||||||
title: '招募文件费用(元)',
|
title: '招募文件费用(元)',
|
||||||
dataIndex: 'amount',
|
dataIndex: 'amount',
|
||||||
render: (_: any, record: any, index: number) => digitalConversionAmount(record.amount, 2)
|
render: (_: any, record: any, index: number) => record.chargeType == "0" ? "免费" : digitalConversionAmount(record.amount, 2)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '招募文件获取开始时间',
|
title: '招募文件获取开始时间',
|
||||||
|
Reference in New Issue
Block a user