4.1 同步发版内容到天梯
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Divider, Form, Input, Modal, Row, Col } from 'antd';
|
||||
import { Form, Input, Modal, Row, Col } from 'antd';
|
||||
import { ViewInvoiceSupplierProps } from '../data';
|
||||
import { getFileListByBid } from '../service';
|
||||
import ExtendUpload from '@/utils/ExtendUpload';
|
||||
const EditInvoiceSupplier: React.FC<ViewInvoiceSupplierProps> = (props) => {
|
||||
const { onCancel, modalVisible, values } = props;
|
||||
//开户证明文件List
|
||||
const [accountFileList, setAccountFileList] = useState<any[]>([]);
|
||||
//税务登记证List
|
||||
const [registrationFileList, setRegistrationFileList] = useState<any[]>([]);
|
||||
//开户证明文件fileId
|
||||
const [accountFileId, setAccountFileId] = useState<string>('');
|
||||
//税务登记证fileId
|
||||
const [registrationFileId, setRegistrationFileId] = useState<string>('');
|
||||
const [form] = Form.useForm();
|
||||
const FormItem = Form.Item;
|
||||
|
||||
@ -18,12 +18,12 @@ const EditInvoiceSupplier: React.FC<ViewInvoiceSupplierProps> = (props) => {
|
||||
labelCol: { span: 7 },
|
||||
wrapperCol: { span: 15 },
|
||||
};
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
if (values == undefined) {
|
||||
} else {
|
||||
getOidList(values?.accountOpening, 'account');
|
||||
getOidList(values?.taxRegistration, 'registration');
|
||||
setAccountFileId(values?.accountOpening);
|
||||
setRegistrationFileId(values?.taxRegistration);
|
||||
form.setFieldsValue({
|
||||
companyName: values?.companyName,
|
||||
taxpayerIdentification: values?.taxpayerIdentification,
|
||||
@ -41,42 +41,6 @@ const EditInvoiceSupplier: React.FC<ViewInvoiceSupplierProps> = (props) => {
|
||||
}
|
||||
}, [values, modalVisible]);
|
||||
|
||||
//根据bid获取到oid列表
|
||||
const getOidList = async (param: any, type: any) => {
|
||||
if (param == undefined || param == '' || param == null) {
|
||||
} else {
|
||||
let list: any[] = [];
|
||||
list.push(param);
|
||||
await getFileListByBid({ bidList: list }).then((res) => {
|
||||
let data = res?.[param];
|
||||
let list: any[] = [];
|
||||
if (data?.length == 0) {
|
||||
if (type == 'account') {
|
||||
setAccountFileList([]);
|
||||
} else {
|
||||
setRegistrationFileList([]);
|
||||
}
|
||||
} else {
|
||||
data?.forEach((ele: any) => {
|
||||
list.push({
|
||||
uid: ele.id,
|
||||
name: ele.filename,
|
||||
status: 'done',
|
||||
oid: ele.id,
|
||||
businessId: ele.bid,
|
||||
url: `/api/core-service-ebtp-updownload/v1/attachment/download/oid/${ele.id}`,
|
||||
});
|
||||
});
|
||||
if (type == 'account') {
|
||||
setAccountFileList(list);
|
||||
} else {
|
||||
setRegistrationFileList(list);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const renderContent = () => {
|
||||
return (
|
||||
<div
|
||||
@ -92,36 +56,36 @@ const EditInvoiceSupplier: React.FC<ViewInvoiceSupplierProps> = (props) => {
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<FormItem name="companyName" label="公司名称">
|
||||
<Input placeholder="请填写公司名称" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写公司名称" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<FormItem name="taxpayerIdentification" label="纳税人识别号">
|
||||
<Input placeholder="请填写纳税人识别号" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写纳税人识别号" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<FormItem name="companyAddress" label="公司地址">
|
||||
<Input placeholder="请填写公司地址" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写公司地址" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<FormItem name="companyPhone" label="公司电话">
|
||||
<Input placeholder="请填写公司电话" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写公司电话" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<FormItem name="bank" label="开户银行">
|
||||
<Input placeholder="请填写开户银行" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写开户银行" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<FormItem name="account" label="开户账号">
|
||||
<Input placeholder="请填写开户账号" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写开户账号" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
@ -132,60 +96,48 @@ const EditInvoiceSupplier: React.FC<ViewInvoiceSupplierProps> = (props) => {
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<FormItem name="companyName" label="公司名称">
|
||||
<Input placeholder="请填写公司名称" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写公司名称" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<FormItem name="taxpayerIdentification" label="纳税人识别号">
|
||||
<Input placeholder="请填写纳税人识别号" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写纳税人识别号" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<FormItem name="companyAddress" label="公司地址">
|
||||
<Input placeholder="请填写公司地址" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写公司地址" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<FormItem name="companyPhone" label="公司电话">
|
||||
<Input placeholder="请填写公司电话" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写公司电话" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<FormItem name="bank" label="开户银行">
|
||||
<Input placeholder="请填写开户银行" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写开户银行" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<FormItem name="account" label="开户账号">
|
||||
<Input placeholder="请填写开户账号" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写开户账号" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<FormItem name="accountOpening" label="开户证明">
|
||||
{accountFileList.map((e) => (
|
||||
<a
|
||||
href={`/api/core-service-ebtp-updownload/v1/attachment/download/oid/${e.oid}`}
|
||||
>
|
||||
{e.name}
|
||||
</a>
|
||||
))}
|
||||
<ExtendUpload bid={accountFileId} uploadProps={{ disabled: true }} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<FormItem name="taxRegistration" label="税务登记证(国税)">
|
||||
{registrationFileList.map((e) => (
|
||||
<a
|
||||
href={`/api/core-service-ebtp-updownload/v1/attachment/download/oid/${e.oid}`}
|
||||
>
|
||||
{e.name}
|
||||
</a>
|
||||
))}
|
||||
<ExtendUpload bid={registrationFileId} uploadProps={{ disabled: true }} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
@ -197,24 +149,24 @@ const EditInvoiceSupplier: React.FC<ViewInvoiceSupplierProps> = (props) => {
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<FormItem name="region" label="所在地区">
|
||||
<Input placeholder="请填写所在地区" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写所在地区" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<FormItem name="address" label="详细地址">
|
||||
<Input placeholder="请填写详细地址" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写详细地址" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<FormItem name="addressee" label="发票收件人">
|
||||
<Input placeholder="请填写发票收件人" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写发票收件人" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<FormItem name="phone" label="收件人电话">
|
||||
<Input placeholder="请填写收件人电话" readOnly bordered={false}/>
|
||||
<Input placeholder="请填写收件人电话" readOnly bordered={false} />
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
|
@ -28,10 +28,10 @@ export async function addInvoice(params: any) {
|
||||
* 获取发票列表
|
||||
* @param params
|
||||
*/
|
||||
export async function getList(params: any,props: any) {
|
||||
export async function getList(params: any, props: any) {
|
||||
return request('/api/biz-service-ebtp-expenses/v1/bizbidinvoice/payerGetPagelist', {
|
||||
method: 'GET',
|
||||
params:{
|
||||
params: {
|
||||
...params,
|
||||
// pageNo: params.current
|
||||
...props
|
||||
@ -48,7 +48,7 @@ export async function getCommonInvoiceList(params: any) {
|
||||
`/api/biz-service-ebtp-expenses/v1/bizbidinvoicecommon/list`,
|
||||
{
|
||||
method: 'GET',
|
||||
params:{
|
||||
params: {
|
||||
...params,
|
||||
}
|
||||
},
|
||||
@ -64,41 +64,9 @@ export async function getCommonAddressList(params: any) {
|
||||
`/api/biz-service-ebtp-expenses/v1/bizbidinvoiceaddress/list`,
|
||||
{
|
||||
method: 'GET',
|
||||
params:{
|
||||
params: {
|
||||
...params,
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取业务id
|
||||
*/
|
||||
export async function getBusinessId() {
|
||||
return request('/api/core-service-ebtp-updownload/v1/business/id', {
|
||||
method: 'GET',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据bid获取文件列表
|
||||
* @param params
|
||||
*/
|
||||
export async function getFileListByBid(params: any) {
|
||||
return request('/api/core-service-ebtp-updownload/v1/attachment/find', {
|
||||
method: 'POST',
|
||||
data: {...params}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据oid删除文件
|
||||
* @param params
|
||||
*/
|
||||
export async function deleteFileByOid(params: any) {
|
||||
return request('/api/core-service-ebtp-updownload/v1/attachment/item/' + params, {
|
||||
method: 'DELETE',
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user