3.10 工程代码同步master

This commit is contained in:
jl-zhoujl2
2022-03-10 14:24:13 +08:00
parent 41ab55a4ac
commit 62f6b07ee2
914 changed files with 143121 additions and 29110 deletions

View File

@ -0,0 +1,225 @@
import React, { useEffect,useState } from 'react';
import { Collapse,Form, Input, Modal,Col,Row,Divider } from 'antd';
import ProTable from "@ant-design/pro-table";
import ExtendUpload from "@/utils/ExtendUpload";
interface ViewInvoiceFormModalProps {
modalVisible: boolean;
values: any;
onCancel:any;
}
const ViewInvoiceFormModal: React.FC<ViewInvoiceFormModalProps> = (props) => {
const {modalVisible, values,onCancel: handleUpdateModalVisible,} = props;
const [ListData, setListData] = useState<any>([]);
const layout = {
labelCol: { span: 8 },
wrapperCol: { span: 16 },
};
const [form] = Form.useForm();
const { Panel } = Collapse;
const { TextArea } = Input;
useEffect(() => {
if (values?.id === null || values === undefined) {
} else {
form.setFieldsValue({
payerName: values.payerName,
contactName: values.contactName,
contactTelephone: values.contactTelephone,
projectName: values.projectName,
ebpProjectNumber: values.ebpProjectNumber,
commodityDescribe: values.commodityDescribe,
reviewerName: values.reviewerName,
requestWopayTime: values.requestWopayTime,
paymentTime: values.paymentTime,
companyName: values.bidInvoice?.companyName,
taxpayerIdentification: values.bidInvoice?.taxpayerIdentification,
companyAddress: values.bidInvoice?.companyAddress,
companyPhone: values.bidInvoice?.companyPhone,
bank: values.bidInvoice?.bank,
account: values.bidInvoice?.account,
accountOpening: values.bidInvoice?.accountOpening,
taxRegistration: values.bidInvoice?.taxRegistration,
region: values.bidInvoice?.region,
address: values.bidInvoice?.address,
addressee: values.bidInvoice?.addressee,
phone: values.bidInvoice?.phone,
});
setListData(values.cartList);
}
}, [values,modalVisible])
const columns: any = [
{
title: '费用类别',
valueType: 'text',
width: 120,
dataIndex: 'commodityName',
},{
title: '费用描述',
valueType: 'text',
width: 300,
ellipsis:true,//自动缩略
dataIndex: 'commodityDescribe',
},{
title: '费用金额',
valueType: 'money',
width: 200,
dataIndex: 'amount',
},{
title: '下单人名称',
valueType: 'text',
dataIndex: 'payerUserName',
},
]
const modalHeight=window.innerHeight*96/100;
return (
<Modal
destroyOnClose
title="收入信息查看"
visible={modalVisible}
onCancel={() => handleUpdateModalVisible()}
okText="确定"
okButtonProps={{disabled: true}}
cancelText="取消"
width="80%"
centered
style={{maxHeight: modalHeight }}
  bodyStyle={{maxHeight: modalHeight - 107,  overflowY: 'auto' }}
>
<Form {...layout} form={form} size="small">
<Row>
<Col span={8}>
<Form.Item label="缴费单位" name="payerName">
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item label="联系人" name="contactName">
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item label="联系电话" name="contactTelephone">
<Input readOnly bordered={false} />
</Form.Item>
</Col>
<Col span={8}>
<Form.Item label="项目名称" name="projectName">
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item label="项目编号" name="ebpProjectNumber">
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item label="费用描述" name="commodityDescribe">
<TextArea readOnly bordered={false} autoSize={false} style={{resize:"none"}}/>
</Form.Item>
</Col>
<Col span={8}>
{values?.reviewerName == null ? null : (
<Form.Item label="审核人" name="reviewerName">
<Input readOnly bordered={false} />
</Form.Item>
)}
<Form.Item label="付款时间" name="requestWopayTime">
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item label="到账时间" name="paymentTime">
<Input readOnly bordered={false} />
</Form.Item>
</Col>
</Row>
</Form>
<Collapse defaultActiveKey={['1', '2','3']} >
<Panel header="增值税专用发票基本信息" key="1">
<Form {...layout} form={form} size="small">
<Row>
<Col span={8}>
<Form.Item label="公司名称" name="companyName">
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item label="纳税人识别号" name="taxpayerIdentification">
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item label="公司地址" name="companyAddress">
<Input readOnly bordered={false} />
</Form.Item>
</Col>
<Col span={8}>
<Form.Item label="公司电话" name="companyPhone">
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item label="开户银行" name="bank">
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item label="开户账号" name="account">
<Input readOnly bordered={false} />
</Form.Item>
</Col>
<Col span={8}>
<Form.Item label="开户证明" name="accountOpening">
<ExtendUpload bid={values.bidInvoice?.accountOpening} btnName="上传" uploadProps={{name:"file",disabled:true}}>
</ExtendUpload>
</Form.Item>
<Form.Item label="税务登记证(国税)" name="taxRegistration">
<ExtendUpload bid={values.bidInvoice?.taxRegistration} btnName="上传" uploadProps={{name:"file",disabled:true}}>
</ExtendUpload>
</Form.Item>
</Col>
</Row>
</Form>
</Panel>
<Panel header="发票邮寄地址" key="2">
<Form {...layout} form={form} size="small">
<Row>
<Col span={12}>
<Form.Item label="所在地区" name="region">
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item label="收件地址" name="address">
<Input readOnly bordered={false} />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item label="收件人" name="addressee">
<Input readOnly bordered={false} />
</Form.Item>
<Form.Item label="收件人电话" name="phone">
<Input readOnly bordered={false} />
</Form.Item>
</Col>
</Row>
</Form>
</Panel>
<Panel header="收入明细" key="3">
<ProTable
rowKey="id"
bordered={false}
search={false}
options={false}
columns={columns}
dataSource={ListData}
pagination={false}
/>
<Divider orientation="right" style={{ color: '#980000' }}>
{values.amount == undefined ? null : values.amount}
</Divider>
<p style={{ color: '#980000' }}>{values.remarks}</p>
</Panel>
</Collapse>
</Modal>
);
};
export default ViewInvoiceFormModal;

View File

@ -0,0 +1,248 @@
import React, { useRef, useState } from 'react';
import { Button, Card } from 'antd';
import ProTable, { ProColumns, ActionType } from '@ant-design/pro-table';
import FileDown from '@/utils/Download';
import ViewInvoiceFormModal from './components/ViewInvoiceFormModal';
import { getAgencyAdminGetPagelist, getInSingleInvoiceRecord } from "./service"
const Invoice: React.FC<any> = (props) => {
const actionRef = useRef<ActionType>();
//查看详情窗口显示
const [viewInvoiceFormVisible, setViewInvoiceFormVisible] = useState<any>(false);
//查看详情窗口record
const [viewInvoiceValues, setViewInvoiceValues] = useState<any>({});
const viewDetail = (invoiceId: String) => {
getInSingleInvoiceRecord(invoiceId).then((res: any) => {
if (res?.success === true && res.data?.id !== null) {
setViewInvoiceFormVisible(true);
setViewInvoiceValues(res?.data);
}
})
}
const columns: ProColumns<any>[] = [
{
title: '项目名称',
dataIndex: 'projectName',
valueType: 'text',
width: '12%',
},
{
title: '费用名称',
dataIndex: 'commodityName',
width: '8%',
valueType: 'text',
hideInSearch: true,//列表中显示,查询条件中不显示
render: (_, record) => {
let val = '-';
if (record.expensesType == '1') {//标书费  采购文件费用 招募文件费用
if (record.bidMethodDict === 'procurement_mode_1' || record.bidMethodDict === 'procurement_mode_2') {
val = '标书费'
} else if (record.bidMethodDict === 'procurement_mode_4') {
val = '招募文件费用'
} else { val = '采购文件费用' }
} else if (record.expensesType == '4') {//中标服务费 中选服务费
if (record.bidMethodDict === 'procurement_mode_1' || record.bidMethodDict === 'procurement_mode_2') {
val = '中标服务费'
} else { val = '中选服务费' }
} else if (record.expensesType == '5') {//投标保证金 保证金
if (record.bidMethodDict === 'procurement_mode_1' || record.bidMethodDict === 'procurement_mode_2') {
val = '投标保证金'
} else { val = '保证金' }
}
return val;
}
},
{
title: '支付单位',
valueType: 'text',
hideInSearch: true,//列表中显示,查询条件中不显示
width: '10%',
dataIndex: 'payerName',
},
{
title: '支付方式',
valueType: 'text',
hideInSearch: true,//列表中显示,查询条件中不显示
width: '8%',
dataIndex: 'paymentMethod',
valueEnum: {
"0": { text: '线上', status: '' },
"2": { text: '线下', status: '' },
},
},
{
title: '到账时间',
valueType: 'dateTime',
hideInSearch: true,//列表中显示,查询条件中不显示
width: '9%',
dataIndex: 'paymentTime',
},
{
title: '付款状态',
valueType: 'text',
hideInSearch: true,//列表中显示,查询条件中不显示
width: '8%',
dataIndex: 'payState',
valueEnum: {
"0": { text: '未支付', status: '' },
"1": { text: '支付中', status: '' },
"2": { text: '支付成功', status: '' },
"3": { text: '到账待审核', status: '' },
"4": { text: '确认到账', status: '' },
"-1": { text: '已失效', status: '' },
"-2": { text: '审核驳回', status: '' },
},
},
{
title: '金额',
valueType: 'money',
hideInSearch: true,//列表中显示,查询条件中不显示
width: '8%',
dataIndex: 'amount',
},
{
title: '发票状态',
valueType: 'select',
dataIndex: 'invoiceState',
width: '8%',
valueEnum: {
"0": { text: '未开', status: '' },
"1": { text: '已开', status: '' },
},
},
{
title: '需要邮寄',
valueType: 'text',
hideInSearch: true,//列表中显示,查询条件中不显示
width: '8%',
dataIndex: 'mail',
valueEnum: {
"0": { text: '不需要', status: '' },
"1": { text: '需要', status: '' },
},
},
{
title: '邮寄状态',
valueType: 'text',
dataIndex: 'mailState',
width: '8%',
valueEnum: {
"0": { text: '未邮寄', status: '' },
"1": { text: '已邮寄', status: '' },
},
},
{
title: '发票类型',
dataIndex: 'type',
hideInSearch: true,//列表中显示,查询条件中不显示
valueType: 'text',
width: '8%',
valueEnum: {
"0": { text: '增值税普通发票' },
"1": { text: '增值税专用发票' },
},
},
{
title: '操作',
dataIndex: 'option',
valueType: 'option',
width: '5%',
render: (_, record) => {
return (
<>
<Button type="text" key="view" onClick={() => { viewDetail(record.invoiceId) }}></Button>
</>
)
}
},
];
return (
<>
<Card title="我的发票列表" style={{ borderRadius: 6 }} bodyStyle={{ padding: '1px 24px 0px' }}>
<div className="zjl-entrust confirm" style={{ height: window.innerHeight - 124, overflowY: 'auto' }}>
<ProTable
rowKey="invoiceId"
size="small"
actionRef={actionRef}//action触发后更新表格
search={{
defaultCollapsed: true,
optionRender: (searchConfig, { form }) => {
let params = ''
for (const key in form?.getFieldsValue()) {
let element = form?.getFieldsValue()[key];
if (element != undefined) {
params = params + '&' + key + '=' + element
}
}
return [
<Button
key="searchText"
type="primary"
onClick={() => {
form?.submit();
}}
>
{searchConfig?.searchText}
</Button>,
<Button
key="resetText"
onClick={() => {
form?.resetFields();
actionRef.current?.reset?.();
}}
>
{searchConfig?.resetText}
</Button>,
<FileDown
key="downLoad"
type="xlsx"
apiUrl={`/api/biz-service-ebtp-expenses/v1/bizbidinvoice/agencyAdminExportGetlist?n=${params}`}
btnName="导出"
method="GET"
form={form}
/>,
];
},
}}
columns={columns}
options={false}
request={(params) =>
getAgencyAdminGetPagelist({ ...params, pageNo: params.current }).then((res: any) => {
const result = {
data: res.data?.records,
total: res.data?.total,
success: res.success,
pageSize: res.data?.size,
current: res.data?.current
}
return result;
})
}
pagination={{ defaultPageSize: 10, showSizeChanger: false }}
/>
</div>
</Card>
{
viewInvoiceValues ? (
<ViewInvoiceFormModal
modalVisible={viewInvoiceFormVisible}
values={viewInvoiceValues}
onCancel={() => {
setViewInvoiceFormVisible(!viewInvoiceFormVisible);
setViewInvoiceValues({});
}}
>
</ViewInvoiceFormModal>
) : null
}
</>
);
};
export default Invoice;

View File

@ -0,0 +1,31 @@
import request from '@/utils/request';
//获取发票列表(管理员)
export async function getAgencyAdminGetPagelist(paramas:any) {
return request('/api/biz-service-ebtp-expenses/v1/bizbidinvoice/agencyAdminGetPagelist',{
method:'GET' ,
params:{
...paramas
}
})
}
//获取单条发票信息
export async function getInSingleInvoiceRecord(invoiceId:String) {
return request('/api/biz-service-ebtp-expenses/v1/bizbidinvoice/'+invoiceId,{
method:'GET' ,
})
}
//导出发票列表
export async function exportInvoiceList(paramas:any) {
return request('/api/biz-service-ebtp-expenses/v1/bizbidinvoice/agencyExportGetlist',{
method:'GET' ,
params:{
...paramas
}
})
}