Commit e08a5404 authored by 前端-黄佳鑫's avatar 前端-黄佳鑫

🐞 fix: 修改采购询价上传

parent 8e53c628
import { UPLOAD_TYPE } from '@/constants'
import { getAuth } from '@/utils/auth';
import { GlobalConfig } from '@/global/config';
const { userId, memberId, token } = getAuth() || {}
const UploadProps: any = {
action: "/api/file/file/upload",
data: {
fileType: UPLOAD_TYPE
},
headers: {
userId,
memberId,
token,
source: '1',
environment: '1',
site: GlobalConfig.global.siteInfo.id.toString()
}
}
export default UploadProps;
import React, { useState, useEffect, useCallback } from 'react';
import React, { useState, useEffect } from 'react';
import { Form, Button, Upload, message } from 'antd';
import { UPLOAD_TYPE } from '@/constants'
import UploadProps from '@/pages/transaction/common/uploadProps';
import styles from './index.less';
import { UploadOutlined, DeleteOutlined, LinkOutlined } from '@ant-design/icons';
import { isEmpty } from 'lodash';
......@@ -120,8 +120,7 @@ const File: React.FC<IProps> = (props) => {
</div>
{checkRound === round && (
<Upload
action="/api/file/file/upload"
data={{ fileType: UPLOAD_TYPE }}
{...UploadProps}
showUploadList={false}
accept='.doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx'
beforeUpload={beforeDocUpload}
......
......@@ -16,7 +16,7 @@ import style from './index.less';
import { DeleteOutlined, LinkOutlined, PlusSquareOutlined, UploadOutlined } from '@ant-design/icons';
import SelectProduct from './selectProduct';
import { PublicApi } from '@/services/api';
import { UPLOAD_TYPE } from '@/constants'
import UploadProps from '@/pages/transaction/common/uploadProps';
const { Sider, Content } = Layout;
const { Text } = Typography;
......@@ -388,8 +388,7 @@ const CrossSellProducts: React.FC<IProps> = (props: any) => {
</div>
{!preview && (
<Upload
action="/api/file/file/upload"
data={{ fileType: UPLOAD_TYPE }}
{...UploadProps}
showUploadList={false}
accept='.doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx'
beforeUpload={beforeDocUpload}
......
import React, { useState, useEffect } from 'react';
import { Form, Button, Upload, message } from 'antd';
import { UPLOAD_TYPE } from '@/constants'
import styles from './index.less';
import { UploadOutlined, DeleteOutlined, LinkOutlined } from '@ant-design/icons';
import UploadProps from '@/pages/transaction/common/uploadProps';
const layout: any = {
colon: false,
......@@ -95,8 +95,7 @@ const File: React.FC<IProps> = (props) => {
))}
</div>
<Upload
action="/api/file/file/upload"
data={{ fileType: UPLOAD_TYPE }}
{...UploadProps}
showUploadList={false}
accept='.doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx'
beforeUpload={beforeDocUpload}
......
......@@ -15,7 +15,6 @@ import {
InputNumber
} from 'antd';
import style from './index.less';
import { UPLOAD_TYPE } from '@/constants'
import { ColumnType } from 'antd/lib/table/interface';
import { DeleteOutlined, LinkOutlined, UploadOutlined } from '@ant-design/icons';
import { PublicApi } from '@/services/api';
......@@ -23,6 +22,7 @@ import { isEmpty } from 'lodash';
import TableModal from '@/pages/transaction/components/TableModal';
import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilterSearch';
import { FORM_FILTER_PATH } from '@/formSchema/const';
import UploadProps from '@/pages/transaction/common/uploadProps';
const layout: any = {
colon: false,
......@@ -434,8 +434,7 @@ const DrawerWrite: React.FC<Iprops> = (props: any) => {
))}
</div>
<Upload
action="/api/file/file/upload"
data={{ fileType: UPLOAD_TYPE }}
{...UploadProps}
showUploadList={false}
accept='.doc,.docx,.pdf,.ppt,.pptx,.xls,.xlsx'
beforeUpload={beforeDocUpload}
......
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