Commit 692d5af7 authored by guang.wu's avatar guang.wu

feat: 添加补充发票上传格式

parent af7d76b1
...@@ -19,7 +19,7 @@ const CustomUpload = props => { ...@@ -19,7 +19,7 @@ const CustomUpload = props => {
if (file.name) { if (file.name) {
const index = file.name.lastIndexOf('.'); const index = file.name.lastIndexOf('.');
suffix = file.name.substr(index + 1, file.name.length - 1); suffix = file.name.substr(index + 1, file.name.length - 1);
const types = ['pdf', 'doc', 'docx', 'zip', 'rar', 'png', 'jpeg']; const types = ['pdf', 'doc', 'docx', 'zip', 'rar', 'png', 'jpeg', 'jpg'];
if (!types.includes(suffix)) { if (!types.includes(suffix)) {
message.error('文件格式错误!'); message.error('文件格式错误!');
return; return;
...@@ -98,7 +98,7 @@ const CustomUpload = props => { ...@@ -98,7 +98,7 @@ const CustomUpload = props => {
listType="picture-card" listType="picture-card"
fileList={fileList} fileList={fileList}
onRemove={onRemove} onRemove={onRemove}
accept=".pdf,.doc,.docx,.zip,.rar,.png,.jpeg" accept=".pdf,.doc,.docx,.zip,.rar,.png,.jpeg,.jpg"
> >
<div> <div>
<PlusOutlined /> <PlusOutlined />
......
...@@ -35,7 +35,7 @@ const UploadInvoiceModal = props => { ...@@ -35,7 +35,7 @@ const UploadInvoiceModal = props => {
label="上传发票" label="上传发票"
name="fileList" name="fileList"
rules={[{ required: true }]} rules={[{ required: true }]}
extra="支持格式:pdf | doc | docx | png | jpeg | zip | rar" extra="支持格式:pdf | doc | docx | png | jpeg | jpg | zip | rar"
> >
<Upload limit={1} /> <Upload limit={1} />
</Form.Item> </Form.Item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment