Commit 117c264429c6e1acec3e12cad9a4602e4895a9aa
1 parent
e800745d
feat: update v1.1
Showing
18 changed files
with
2125 additions
and
145 deletions
.umirc.ts
@@ -14,6 +14,7 @@ export default defineConfig({ | @@ -14,6 +14,7 @@ export default defineConfig({ | ||
14 | proxy: { | 14 | proxy: { |
15 | '/api/': { | 15 | '/api/': { |
16 | target: 'http://localhost:8085/', | 16 | target: 'http://localhost:8085/', |
17 | + // target: 'http://192.168.1.6:8085/', | ||
17 | // target: 'http://39.108.227.113:8085/', | 18 | // target: 'http://39.108.227.113:8085/', |
18 | changeOrigin: true, | 19 | changeOrigin: true, |
19 | pathRewrite: { '^/api': '' }, | 20 | pathRewrite: { '^/api': '' }, |
src/app.ts
@@ -98,7 +98,10 @@ export const request: RequestConfig = { | @@ -98,7 +98,10 @@ export const request: RequestConfig = { | ||
98 | (response) => { | 98 | (response) => { |
99 | // 不再需要异步处理读取返回体内容,可直接在data中读出,部分字段可在 config 中找到 | 99 | // 不再需要异步处理读取返回体内容,可直接在data中读出,部分字段可在 config 中找到 |
100 | const { data = {} as any } = response; | 100 | const { data = {} as any } = response; |
101 | - if (data.result !== RESPONSE_CODE.SUCCESS) { | 101 | + if ( |
102 | + data.result !== RESPONSE_CODE.SUCCESS && | ||
103 | + data.result !== undefined | ||
104 | + ) { | ||
102 | message.error(data.message); | 105 | message.error(data.message); |
103 | } | 106 | } |
104 | 107 |
src/pages/Order/components/AttachmentModal.tsx
0 → 100644
1 | +import { getAliYunOSSFileNameFromUrl } from '@/utils'; | ||
2 | +import { ModalForm, ProFormUploadDragger } from '@ant-design/pro-components'; | ||
3 | +import { Button, Form } from 'antd'; | ||
4 | +import { cloneDeep } from 'lodash'; | ||
5 | +import { useEffect, useState } from 'react'; | ||
6 | + | ||
7 | +export default ({ data, onClose }) => { | ||
8 | + let newData = cloneDeep(data); | ||
9 | + const [fileList, setFileList] = useState<[]>([]); | ||
10 | + const [form] = Form.useForm<{ | ||
11 | + subOrderId: ''; | ||
12 | + listAnnex: []; | ||
13 | + }>(); | ||
14 | + | ||
15 | + let newListAnnex = newData.listAnnex?.map((path) => { | ||
16 | + let i = 0; | ||
17 | + return { | ||
18 | + uid: i++, | ||
19 | + name: getAliYunOSSFileNameFromUrl(path), | ||
20 | + status: 'uploaded', | ||
21 | + url: path, | ||
22 | + response: { data: [path] }, | ||
23 | + }; | ||
24 | + }); | ||
25 | + newData.listAnnex = newListAnnex; | ||
26 | + useEffect(() => { | ||
27 | + setFileList(newData.listAnnex); | ||
28 | + }, []); | ||
29 | + | ||
30 | + return ( | ||
31 | + <ModalForm | ||
32 | + width={500} | ||
33 | + open | ||
34 | + title="查看附件" | ||
35 | + initialValues={newData} | ||
36 | + form={form} | ||
37 | + modalProps={{ | ||
38 | + onCancel: onClose, | ||
39 | + }} | ||
40 | + submitter={{ | ||
41 | + render: () => { | ||
42 | + return [ | ||
43 | + <Button | ||
44 | + key="back" | ||
45 | + onClick={() => { | ||
46 | + onClose(); | ||
47 | + }} | ||
48 | + > | ||
49 | + 返回 | ||
50 | + </Button>, | ||
51 | + ]; | ||
52 | + }, | ||
53 | + }} | ||
54 | + > | ||
55 | + <ProFormUploadDragger | ||
56 | + name="listAnnex" | ||
57 | + action="/api/service/order/fileProcess" | ||
58 | + disabled | ||
59 | + fieldProps={{ | ||
60 | + headers: { Authorization: localStorage.getItem('token') }, | ||
61 | + // onRemove: (file) => { | ||
62 | + // const index = fileList[listMeta.index].indexOf(file); | ||
63 | + // console.log(index); | ||
64 | + // const newFileList = fileList.slice(); | ||
65 | + // newFileList.splice(index, 1); | ||
66 | + // setFileList(newFileList); | ||
67 | + // }, | ||
68 | + // beforeUpload: (file) => { | ||
69 | + // fileList[listMeta.index] = [...fileList[listMeta.index], file as RcFile]; | ||
70 | + // setFileList(fileList); | ||
71 | + // return true; | ||
72 | + // }, | ||
73 | + fileList, | ||
74 | + // defaultFileList: itemFileList | ||
75 | + }} | ||
76 | + /> | ||
77 | + </ModalForm> | ||
78 | + ); | ||
79 | +}; |
src/pages/Order/components/ConfirmReceiptModal.tsx
@@ -3,12 +3,15 @@ import { postServiceOrderConfirmReceipt } from '@/services'; | @@ -3,12 +3,15 @@ import { postServiceOrderConfirmReceipt } from '@/services'; | ||
3 | import { PlusOutlined } from '@ant-design/icons'; | 3 | import { PlusOutlined } from '@ant-design/icons'; |
4 | import { Button, Modal, Upload, message } from 'antd'; | 4 | import { Button, Modal, Upload, message } from 'antd'; |
5 | import { RcFile, UploadFile, UploadProps } from 'antd/es/upload'; | 5 | import { RcFile, UploadFile, UploadProps } from 'antd/es/upload'; |
6 | -import { useState } from 'react'; | 6 | +import { cloneDeep } from 'lodash'; |
7 | +import { useEffect, useRef, useState } from 'react'; | ||
8 | +import { COMFIR_RECEIPT_IMAGES_NUMBER } from '../constant'; | ||
7 | export default ({ data, onClose }) => { | 9 | export default ({ data, onClose }) => { |
8 | // const [form] = Form.useForm<{ name: string; company: string }>(); | 10 | // const [form] = Form.useForm<{ name: string; company: string }>(); |
9 | const [previewOpen, setPreviewOpen] = useState(false); | 11 | const [previewOpen, setPreviewOpen] = useState(false); |
10 | const [previewImage, setPreviewImage] = useState(''); | 12 | const [previewImage, setPreviewImage] = useState(''); |
11 | const [previewTitle, setPreviewTitle] = useState(''); | 13 | const [previewTitle, setPreviewTitle] = useState(''); |
14 | + const fileListObj = useRef<UploadFile[]>([]); //使用引用类型,使得在useEffect里面设置监听事件后,不用更新监听事件也能保持obj与外界一致 | ||
12 | const getBase64 = (file: RcFile): Promise<string> => | 15 | const getBase64 = (file: RcFile): Promise<string> => |
13 | new Promise((resolve, reject) => { | 16 | new Promise((resolve, reject) => { |
14 | const reader = new FileReader(); | 17 | const reader = new FileReader(); |
@@ -19,9 +22,74 @@ export default ({ data, onClose }) => { | @@ -19,9 +22,74 @@ export default ({ data, onClose }) => { | ||
19 | const [fileList, setFileList] = useState<UploadFile[]>([]); | 22 | const [fileList, setFileList] = useState<UploadFile[]>([]); |
20 | const [uploading, setUploading] = useState(false); | 23 | const [uploading, setUploading] = useState(false); |
21 | const handleCancel = () => setPreviewOpen(false); | 24 | const handleCancel = () => setPreviewOpen(false); |
22 | - const handleChange: UploadProps['onChange'] = ({ fileList: newFileList }) => | 25 | + |
26 | + const handleChange: UploadProps['onChange'] = ({ fileList: newFileList }) => { | ||
27 | + //fileListObj得在change里变化,change的参数是已经处理过的file数组 | ||
28 | + //beforeUpload中的参数file是未处理过,还需要Base64拿到文件数据处理 | ||
29 | + fileListObj.current = newFileList; | ||
23 | setFileList(newFileList); | 30 | setFileList(newFileList); |
31 | + }; | ||
32 | + | ||
33 | + /** 粘贴快捷键的回调 */ | ||
34 | + const onPaste = async (e: any) => { | ||
35 | + /** 获取剪切板的数据clipboardData */ | ||
36 | + let clipboardData = e.clipboardData, | ||
37 | + i = 0, | ||
38 | + items, | ||
39 | + item, | ||
40 | + types; | ||
41 | + | ||
42 | + /** 为空判断 */ | ||
43 | + if (clipboardData) { | ||
44 | + items = clipboardData.items; | ||
45 | + if (!items) { | ||
46 | + message.info('您的剪贴板中没有照片'); | ||
47 | + return; | ||
48 | + } | ||
49 | + | ||
50 | + item = items[0]; | ||
51 | + types = clipboardData.types || []; | ||
52 | + /** 遍历剪切板的数据 */ | ||
53 | + for (; i < types.length; i++) { | ||
54 | + if (types[i] === 'Files') { | ||
55 | + item = items[i]; | ||
56 | + break; | ||
57 | + } | ||
58 | + } | ||
59 | + | ||
60 | + /** 判断文件是否为图片 */ | ||
61 | + if (item && item.kind === 'file' && item.type.match(/^image\//i)) { | ||
62 | + const imgItem = item.getAsFile(); | ||
63 | + const newFileList = cloneDeep(fileListObj.current); | ||
64 | + let filteredArray = newFileList.filter( | ||
65 | + (obj) => obj.status !== 'removed', | ||
66 | + ); //过滤掉状态为已删除的照片 | ||
67 | + const listItem = { | ||
68 | + ...imgItem, | ||
69 | + status: 'done', | ||
70 | + url: await getBase64(imgItem), | ||
71 | + originFileObj: imgItem, | ||
72 | + }; | ||
24 | 73 | ||
74 | + if (filteredArray.length >= COMFIR_RECEIPT_IMAGES_NUMBER) { | ||
75 | + message.info('发货凭证照片数量不能超过3'); | ||
76 | + return; | ||
77 | + } | ||
78 | + fileListObj.current = filteredArray; | ||
79 | + filteredArray.push(listItem); | ||
80 | + setFileList(filteredArray); | ||
81 | + return; | ||
82 | + } | ||
83 | + } | ||
84 | + | ||
85 | + message.info('您的剪贴板中没有照片'); | ||
86 | + }; | ||
87 | + useEffect(() => { | ||
88 | + document.addEventListener('paste', onPaste); | ||
89 | + return () => { | ||
90 | + document.removeEventListener('paste', onPaste); | ||
91 | + }; | ||
92 | + }, []); | ||
25 | const uploadButton = ( | 93 | const uploadButton = ( |
26 | <div> | 94 | <div> |
27 | <PlusOutlined /> | 95 | <PlusOutlined /> |
@@ -32,11 +100,12 @@ export default ({ data, onClose }) => { | @@ -32,11 +100,12 @@ export default ({ data, onClose }) => { | ||
32 | if (!file.url && !file.preview) { | 100 | if (!file.url && !file.preview) { |
33 | file.preview = await getBase64(file.originFileObj as RcFile); | 101 | file.preview = await getBase64(file.originFileObj as RcFile); |
34 | } | 102 | } |
35 | - | ||
36 | setPreviewImage(file.url || (file.preview as string)); | 103 | setPreviewImage(file.url || (file.preview as string)); |
37 | setPreviewOpen(true); | 104 | setPreviewOpen(true); |
38 | setPreviewTitle( | 105 | setPreviewTitle( |
39 | - file.name || file.url!.substring(file.url!.lastIndexOf('/') + 1), | 106 | + file.name || |
107 | + file.originFileObj?.name || | ||
108 | + file.url!.substring(file.url!.lastIndexOf('/') + 1), | ||
40 | ); | 109 | ); |
41 | }; | 110 | }; |
42 | 111 | ||
@@ -76,13 +145,13 @@ export default ({ data, onClose }) => { | @@ -76,13 +145,13 @@ export default ({ data, onClose }) => { | ||
76 | }, | 145 | }, |
77 | beforeUpload: (file) => { | 146 | beforeUpload: (file) => { |
78 | setFileList([...fileList, file]); | 147 | setFileList([...fileList, file]); |
79 | - | ||
80 | return false; | 148 | return false; |
81 | }, | 149 | }, |
82 | listType: 'picture-card', | 150 | listType: 'picture-card', |
83 | onPreview: handlePreview, | 151 | onPreview: handlePreview, |
84 | fileList, | 152 | fileList, |
85 | onChange: handleChange, | 153 | onChange: handleChange, |
154 | + accept: 'image/png, image/jpeg, image/png', | ||
86 | }; | 155 | }; |
87 | 156 | ||
88 | return ( | 157 | return ( |
@@ -109,8 +178,11 @@ export default ({ data, onClose }) => { | @@ -109,8 +178,11 @@ export default ({ data, onClose }) => { | ||
109 | onClose(); | 178 | onClose(); |
110 | }} | 179 | }} |
111 | > | 180 | > |
112 | - <div className="py-4 font-semibold">请将买家确认收货的凭证照片上传</div> | ||
113 | - <Upload {...props}>{fileList.length < 3 ? uploadButton : ''}</Upload> | 181 | + <div className="pt-4 font-semibold">请将买家确认收货的凭证照片上传</div> |
182 | + <div className="pb-4 text-xs decoration-gray-50">可复制照片粘贴</div> | ||
183 | + <Upload {...props}> | ||
184 | + {fileList.length < COMFIR_RECEIPT_IMAGES_NUMBER ? uploadButton : ''} | ||
185 | + </Upload> | ||
114 | </Modal> | 186 | </Modal> |
115 | <Modal | 187 | <Modal |
116 | open={previewOpen} | 188 | open={previewOpen} |
@@ -118,7 +190,7 @@ export default ({ data, onClose }) => { | @@ -118,7 +190,7 @@ export default ({ data, onClose }) => { | ||
118 | footer={null} | 190 | footer={null} |
119 | onCancel={handleCancel} | 191 | onCancel={handleCancel} |
120 | > | 192 | > |
121 | - <img alt="example" style={{ width: '100%' }} src={previewImage} /> | 193 | + <img alt="图片预览" style={{ width: '100%' }} src={previewImage} /> |
122 | </Modal> | 194 | </Modal> |
123 | </> | 195 | </> |
124 | ); | 196 | ); |
src/pages/Order/components/ImportModal.tsx
0 → 100644
1 | +import { RESPONSE_CODE } from '@/constants/enum'; | ||
2 | +import { postServiceOrderImportExcel } from '@/services'; | ||
3 | +import { orderExport } from '@/services/order'; | ||
4 | +import { UploadOutlined } from '@ant-design/icons'; | ||
5 | +import { Button, Modal, Upload, message } from 'antd'; | ||
6 | +import { RcFile, UploadFile, UploadProps } from 'antd/es/upload'; | ||
7 | +import { useState } from 'react'; | ||
8 | +export default ({ onClose }) => { | ||
9 | + // const [form] = Form.useForm<{ name: string; company: string }>(); | ||
10 | + const [messageApi, contextHolder] = message.useMessage(); | ||
11 | + const [fileList, setFileList] = useState<UploadFile[]>([]); | ||
12 | + const [uploading, setUploading] = useState(false); | ||
13 | + const handleChange: UploadProps['onChange'] = ({ fileList: newFileList }) => | ||
14 | + setFileList(newFileList); | ||
15 | + | ||
16 | + const exportLoading = (content: string) => { | ||
17 | + messageApi.open({ | ||
18 | + type: 'loading', | ||
19 | + content: content, | ||
20 | + duration: 0, | ||
21 | + }); | ||
22 | + }; | ||
23 | + | ||
24 | + const exportLoadingDestory = () => { | ||
25 | + messageApi.destroy(); | ||
26 | + }; | ||
27 | + const downloadTemplate = async () => { | ||
28 | + exportLoading('正在下载模板...'); | ||
29 | + orderExport('/api/service/order/exportTemplate', {}, exportLoadingDestory); | ||
30 | + }; | ||
31 | + | ||
32 | + const handleUpload = async () => { | ||
33 | + const formData = new FormData(); | ||
34 | + fileList.forEach((file) => { | ||
35 | + //originFileObj二进制文件 | ||
36 | + formData.append('file', file.originFileObj as RcFile); | ||
37 | + }); | ||
38 | + // console.log(fileList[0] as RcFile) | ||
39 | + // formData.append('file', fileList[0] as RcFile); | ||
40 | + setUploading(true); | ||
41 | + // You can use any AJAX library you like | ||
42 | + const res = await postServiceOrderImportExcel({ | ||
43 | + data: formData, | ||
44 | + headers: { | ||
45 | + 'Content-Type': | ||
46 | + 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | ||
47 | + }, | ||
48 | + }); | ||
49 | + | ||
50 | + console.log(res); | ||
51 | + if (res.result === RESPONSE_CODE.SUCCESS) { | ||
52 | + message.success(res.message); | ||
53 | + onClose(); | ||
54 | + } else { | ||
55 | + if (res.message === '表格中没有数据') { | ||
56 | + setUploading(false); | ||
57 | + return; | ||
58 | + } | ||
59 | + //存在错误信息,下载错误信息模板 | ||
60 | + exportLoading('正在下载错误信息...'); | ||
61 | + orderExport( | ||
62 | + '/api/service/order/errorExcelInformation', | ||
63 | + formData, | ||
64 | + exportLoadingDestory, | ||
65 | + ); | ||
66 | + } | ||
67 | + | ||
68 | + setUploading(false); | ||
69 | + }; | ||
70 | + | ||
71 | + const props: UploadProps = { | ||
72 | + onRemove: (file) => { | ||
73 | + const index = fileList.indexOf(file); | ||
74 | + const newFileList = fileList.slice(); | ||
75 | + newFileList.splice(index, 1); | ||
76 | + setFileList(newFileList); | ||
77 | + }, | ||
78 | + beforeUpload: (file) => { | ||
79 | + setFileList([...fileList, file]); | ||
80 | + | ||
81 | + return false; | ||
82 | + }, | ||
83 | + fileList, | ||
84 | + onChange: handleChange, | ||
85 | + accept: '.xlsx', | ||
86 | + }; | ||
87 | + | ||
88 | + return ( | ||
89 | + <> | ||
90 | + <Modal | ||
91 | + width={500} | ||
92 | + open | ||
93 | + title="导入" | ||
94 | + footer={[ | ||
95 | + <Button key="cancel" onClick={onClose}> | ||
96 | + 取消 | ||
97 | + </Button>, | ||
98 | + <Button | ||
99 | + type="primary" | ||
100 | + key="ok" | ||
101 | + onClick={handleUpload} | ||
102 | + disabled={fileList.length === 0} | ||
103 | + loading={uploading} | ||
104 | + > | ||
105 | + {uploading ? '上传中' : '提交'} | ||
106 | + </Button>, | ||
107 | + ]} | ||
108 | + onCancel={async () => { | ||
109 | + onClose(); | ||
110 | + }} | ||
111 | + > | ||
112 | + <div className="py-4 font-semibold"> | ||
113 | + 导入发货信息 | ||
114 | + <Button type="link" onClick={downloadTemplate}> | ||
115 | + 下载模板 | ||
116 | + </Button> | ||
117 | + </div> | ||
118 | + <Upload {...props}> | ||
119 | + <Button icon={<UploadOutlined />} disabled={fileList.length > 0}> | ||
120 | + 点击选择文件 | ||
121 | + </Button> | ||
122 | + </Upload> | ||
123 | + </Modal> | ||
124 | + {contextHolder} | ||
125 | + </> | ||
126 | + ); | ||
127 | +}; |
src/pages/Order/components/OrderDrawer.tsx
@@ -4,7 +4,11 @@ import { | @@ -4,7 +4,11 @@ import { | ||
4 | postServiceOrderQueryProductInformation, | 4 | postServiceOrderQueryProductInformation, |
5 | postServiceOrderUpdateOrder, | 5 | postServiceOrderUpdateOrder, |
6 | } from '@/services'; | 6 | } from '@/services'; |
7 | -import { enumToSelect, getUserInfo } from '@/utils'; | 7 | +import { |
8 | + enumToSelect, | ||
9 | + getAliYunOSSFileNameFromUrl, | ||
10 | + getUserInfo, | ||
11 | +} from '@/utils'; | ||
8 | import { | 12 | import { |
9 | DrawerForm, | 13 | DrawerForm, |
10 | FormListActionType, | 14 | FormListActionType, |
@@ -15,6 +19,7 @@ import { | @@ -15,6 +19,7 @@ import { | ||
15 | ProFormSelect, | 19 | ProFormSelect, |
16 | ProFormText, | 20 | ProFormText, |
17 | ProFormTextArea, | 21 | ProFormTextArea, |
22 | + ProFormUploadDragger, | ||
18 | } from '@ant-design/pro-components'; | 23 | } from '@ant-design/pro-components'; |
19 | import { Form, message } from 'antd'; | 24 | import { Form, message } from 'antd'; |
20 | import { cloneDeep } from 'lodash'; | 25 | import { cloneDeep } from 'lodash'; |
@@ -37,15 +42,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -37,15 +42,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
37 | function optType(type: string) { | 42 | function optType(type: string) { |
38 | return orderOptType === type; | 43 | return orderOptType === type; |
39 | } | 44 | } |
40 | - // 页码,及搜索值变化时,发请求 | ||
41 | - // const fatchData = async (params:string) => { | ||
42 | - // console.log(params); | ||
43 | - // const res = | ||
44 | - // await postServiceOrderQueryProductInformation({ | ||
45 | - // data: { productName: params.filter } | ||
46 | - // }); | ||
47 | - // return res; | ||
48 | - // } | 45 | + |
46 | + const fileList: any = []; | ||
49 | 47 | ||
50 | useEffect(() => { | 48 | useEffect(() => { |
51 | // 在组件挂载或数据变化时,更新组件状态 | 49 | // 在组件挂载或数据变化时,更新组件状态 |
@@ -62,7 +60,22 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -62,7 +60,22 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
62 | data.paymentMethod = data.list[0].paymentMethod; | 60 | data.paymentMethod = data.list[0].paymentMethod; |
63 | data.paymentChannel = data.list[0].paymentChannel; | 61 | data.paymentChannel = data.list[0].paymentChannel; |
64 | data.invoicingStatus = data.list[0].invoicingStatus; | 62 | data.invoicingStatus = data.list[0].invoicingStatus; |
63 | + | ||
64 | + data.list = data.list?.map((item) => { | ||
65 | + item.filePaths = item.listAnnex?.map((path) => { | ||
66 | + let i = 0; | ||
67 | + return { | ||
68 | + uid: i++, | ||
69 | + name: getAliYunOSSFileNameFromUrl(path), | ||
70 | + status: 'uploaded', | ||
71 | + url: path, | ||
72 | + response: { data: [path] }, | ||
73 | + }; | ||
74 | + }); | ||
75 | + return item; | ||
76 | + }); | ||
65 | } | 77 | } |
78 | + | ||
66 | if (subOrders !== undefined && subOrders.length > 0) { | 79 | if (subOrders !== undefined && subOrders.length > 0) { |
67 | data.list = subOrders; | 80 | data.list = subOrders; |
68 | } | 81 | } |
@@ -114,7 +127,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -114,7 +127,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
114 | * @param currentRowData list中当前行的数据 | 127 | * @param currentRowData list中当前行的数据 |
115 | */ | 128 | */ |
116 | function autoFillProductInfo(option: any, currentRowData: any) { | 129 | function autoFillProductInfo(option: any, currentRowData: any) { |
117 | - console.log(option); | ||
118 | let copyList = form.getFieldValue('list'); | 130 | let copyList = form.getFieldValue('list'); |
119 | let currentData = copyList[currentRowData.field.key]; | 131 | let currentData = copyList[currentRowData.field.key]; |
120 | currentData.productCode = option?.productCode; | 132 | currentData.productCode = option?.productCode; |
@@ -122,7 +134,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -122,7 +134,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
122 | currentData.unit = option?.unit; | 134 | currentData.unit = option?.unit; |
123 | form.setFieldValue('list', copyList); | 135 | form.setFieldValue('list', copyList); |
124 | } | 136 | } |
125 | - | ||
126 | return ( | 137 | return ( |
127 | <DrawerForm<{ | 138 | <DrawerForm<{ |
128 | deleteSubOrderLists: any; | 139 | deleteSubOrderLists: any; |
@@ -137,6 +148,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -137,6 +148,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
137 | if (optType('edit') || optType('copy')) { | 148 | if (optType('edit') || optType('copy')) { |
138 | return data; | 149 | return data; |
139 | } | 150 | } |
151 | + return {}; | ||
140 | }} | 152 | }} |
141 | resize={{ | 153 | resize={{ |
142 | onResize() { | 154 | onResize() { |
@@ -156,6 +168,18 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -156,6 +168,18 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
156 | submitTimeout={2000} | 168 | submitTimeout={2000} |
157 | onFinish={async (values) => { | 169 | onFinish={async (values) => { |
158 | let res = {}; | 170 | let res = {}; |
171 | + //附件处理 | ||
172 | + let list = values.list; | ||
173 | + // console.log(list); | ||
174 | + list = list.map((item) => { | ||
175 | + item.filePaths = item.filePaths?.map((file) => { | ||
176 | + console.log(file); | ||
177 | + return { url: file.response.data[0] }; | ||
178 | + }); | ||
179 | + return item; | ||
180 | + }); | ||
181 | + | ||
182 | + values.list = list; | ||
159 | if (optType('add') || optType('copy')) { | 183 | if (optType('add') || optType('copy')) { |
160 | res = await postServiceOrderAddOrder({ data: values }); | 184 | res = await postServiceOrderAddOrder({ data: values }); |
161 | } else { | 185 | } else { |
@@ -163,11 +187,9 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -163,11 +187,9 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
163 | const originIds = originSubOrders.map((item) => { | 187 | const originIds = originSubOrders.map((item) => { |
164 | return item.id; | 188 | return item.id; |
165 | }); | 189 | }); |
166 | - console.log('originIds:' + originIds); | ||
167 | const curIds = form.getFieldValue('list')?.map((item) => { | 190 | const curIds = form.getFieldValue('list')?.map((item) => { |
168 | return item.id; | 191 | return item.id; |
169 | }); | 192 | }); |
170 | - console.log('curIds:' + curIds); | ||
171 | let diff = originIds.filter((item) => !curIds.includes(item)); | 193 | let diff = originIds.filter((item) => !curIds.includes(item)); |
172 | values.deleteSubOrderLists = diff; | 194 | values.deleteSubOrderLists = diff; |
173 | res = await postServiceOrderUpdateOrder({ data: values }); | 195 | res = await postServiceOrderUpdateOrder({ data: values }); |
@@ -269,15 +291,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -269,15 +291,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
269 | // disabled={mainInfoDisbled} | 291 | // disabled={mainInfoDisbled} |
270 | /> | 292 | /> |
271 | <ProFormSelect | 293 | <ProFormSelect |
272 | - placeholder="请输入所属事业部" | ||
273 | - name="productBelongBusiness" | ||
274 | - width="lg" | ||
275 | - label="所属事业部" | ||
276 | - options={enumToSelect(PRODUCT_BELONG_DEPARTMENT_OPTIONS)} | ||
277 | - rules={[{ required: true, message: '所属事业部必填' }]} | ||
278 | - // disabled={mainInfoDisbled} | ||
279 | - /> | ||
280 | - <ProFormSelect | ||
281 | placeholder="选择是否需要开票" | 294 | placeholder="选择是否需要开票" |
282 | name="invoicingStatus" | 295 | name="invoicingStatus" |
283 | width="lg" | 296 | width="lg" |
@@ -286,7 +299,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -286,7 +299,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
286 | // disabled={mainInfoDisbled} | 299 | // disabled={mainInfoDisbled} |
287 | onChange={(_, option) => { | 300 | onChange={(_, option) => { |
288 | setInvoicingStatus(option.value); | 301 | setInvoicingStatus(option.value); |
289 | - console.log(option.value); | ||
290 | if (option.value === 'UN_INVOICE') { | 302 | if (option.value === 'UN_INVOICE') { |
291 | form.setFieldValue('invoiceIdentificationNumber', undefined); | 303 | form.setFieldValue('invoiceIdentificationNumber', undefined); |
292 | form.setFieldValue('bank', undefined); | 304 | form.setFieldValue('bank', undefined); |
@@ -351,6 +363,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -351,6 +363,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
351 | creatorButtonProps={{ disabled: false }} | 363 | creatorButtonProps={{ disabled: false }} |
352 | name="list" | 364 | name="list" |
353 | label="" | 365 | label="" |
366 | + copyIconProps={false} //复制按钮不显示 | ||
354 | initialValue={[ | 367 | initialValue={[ |
355 | { | 368 | { |
356 | productCode: '', | 369 | productCode: '', |
@@ -362,11 +375,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -362,11 +375,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
362 | }, | 375 | }, |
363 | ]} | 376 | ]} |
364 | actionGuard={{ | 377 | actionGuard={{ |
365 | - // beforeAddRow: async () => { | ||
366 | - // return new Promise((resolve) => { | ||
367 | - // setTimeout(() => resolve(true), 1000); | ||
368 | - // }); | ||
369 | - // }, | ||
370 | beforeRemoveRow: async (index) => { | 378 | beforeRemoveRow: async (index) => { |
371 | return new Promise((resolve) => { | 379 | return new Promise((resolve) => { |
372 | if (index === 0) { | 380 | if (index === 0) { |
@@ -382,6 +390,20 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -382,6 +390,20 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
382 | }} | 390 | }} |
383 | itemRender={(doms, listMeta) => { | 391 | itemRender={(doms, listMeta) => { |
384 | // const list = actionRef.current?.getList(); | 392 | // const list = actionRef.current?.getList(); |
393 | + if (optType('edit')) { | ||
394 | + let i = 0; | ||
395 | + let defaultFileList = listMeta.record?.listAnnex?.map((annex) => { | ||
396 | + return { | ||
397 | + uid: i++, | ||
398 | + name: annex, | ||
399 | + status: 'uploaded', | ||
400 | + url: annex, | ||
401 | + response: { data: [annex] }, | ||
402 | + }; | ||
403 | + }); | ||
404 | + fileList[listMeta.index] = defaultFileList; | ||
405 | + } | ||
406 | + let itemFileList = fileList[listMeta.index]; | ||
385 | return ( | 407 | return ( |
386 | <ProCard | 408 | <ProCard |
387 | bordered | 409 | bordered |
@@ -392,8 +414,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -392,8 +414,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
392 | }} | 414 | }} |
393 | > | 415 | > |
394 | {[ | 416 | {[ |
395 | - // <LazySelect query={fatchData} pageSize={10}></LazySelect> | ||
396 | - // , | ||
397 | <ProFormSelect | 417 | <ProFormSelect |
398 | key="key" | 418 | key="key" |
399 | label="商品名称" | 419 | label="商品名称" |
@@ -407,9 +427,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -407,9 +427,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
407 | autoFillProductInfo(option, listMeta); | 427 | autoFillProductInfo(option, listMeta); |
408 | }} | 428 | }} |
409 | fieldProps={{ | 429 | fieldProps={{ |
410 | - // filterOption:false, | ||
411 | - // onSearch: searchDataset, | ||
412 | - // onPopupScroll: scrollEnd, | ||
413 | optionItemRender(item) { | 430 | optionItemRender(item) { |
414 | if (item.type === 'add') { | 431 | if (item.type === 'add') { |
415 | return ( | 432 | return ( |
@@ -460,7 +477,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -460,7 +477,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
460 | return { | 477 | return { |
461 | ...p, | 478 | ...p, |
462 | label: p.productName, | 479 | label: p.productName, |
463 | - value: p.productName, | 480 | + value: p.id + '|' + p.productName, |
464 | key: p.id, | 481 | key: p.id, |
465 | }; | 482 | }; |
466 | }); | 483 | }); |
@@ -479,6 +496,17 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -479,6 +496,17 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
479 | }} | 496 | }} |
480 | />, | 497 | />, |
481 | doms.listDom, | 498 | doms.listDom, |
499 | + <> | ||
500 | + <ProFormUploadDragger | ||
501 | + label="附件" | ||
502 | + name="filePaths" | ||
503 | + action="/api/service/order/fileProcess" | ||
504 | + fieldProps={{ | ||
505 | + headers: { Authorization: localStorage.getItem('token') }, | ||
506 | + itemFileList, | ||
507 | + }} | ||
508 | + /> | ||
509 | + </>, | ||
482 | ]} | 510 | ]} |
483 | </ProCard> | 511 | </ProCard> |
484 | ); | 512 | ); |
@@ -535,12 +563,16 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -535,12 +563,16 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
535 | placeholder="请输入子订单金额" | 563 | placeholder="请输入子订单金额" |
536 | rules={[{ required: true, message: '子订单金额必填' }]} | 564 | rules={[{ required: true, message: '子订单金额必填' }]} |
537 | /> | 565 | /> |
538 | - {/* <ProFormText | 566 | + <ProFormSelect |
567 | + placeholder="请输入所属事业部" | ||
568 | + name="productBelongBusiness" | ||
539 | width="lg" | 569 | width="lg" |
540 | - name="serialNumber" | ||
541 | - label="物流单号" | ||
542 | - placeholder="请输入物流单号" | ||
543 | - /> */} | 570 | + label="所属事业部" |
571 | + options={enumToSelect(PRODUCT_BELONG_DEPARTMENT_OPTIONS)} | ||
572 | + initialValue={'EXPERIMENTAL_CONSUMABLES'} | ||
573 | + rules={[{ required: true, message: '所属事业部必填' }]} | ||
574 | + // disabled={mainInfoDisbled} | ||
575 | + /> | ||
544 | <ProFormText | 576 | <ProFormText |
545 | width="lg" | 577 | width="lg" |
546 | name="notes" | 578 | name="notes" |
@@ -548,38 +580,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -548,38 +580,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
548 | placeholder="请输入备注" | 580 | placeholder="请输入备注" |
549 | /> | 581 | /> |
550 | </ProFormList> | 582 | </ProFormList> |
551 | - | ||
552 | - {/* <ProFormDateRangePicker name="contractTime" label="合同生效时间" /> */} | ||
553 | - {/* <ProForm.Group> | ||
554 | - <ProFormSelect | ||
555 | - options={[ | ||
556 | - { | ||
557 | - value: 'chapter', | ||
558 | - label: '盖章后生效', | ||
559 | - }, | ||
560 | - ]} | ||
561 | - width="xs" | ||
562 | - name="useMode" | ||
563 | - label="合同约定生效方式" | ||
564 | - /> | ||
565 | - <ProFormSelect | ||
566 | - width="xs" | ||
567 | - options={[ | ||
568 | - { | ||
569 | - value: 'time', | ||
570 | - label: '履行完终止', | ||
571 | - }, | ||
572 | - ]} | ||
573 | - formItemProps={{ | ||
574 | - style: { | ||
575 | - margin: 0, | ||
576 | - }, | ||
577 | - }} | ||
578 | - name="unusedMode" | ||
579 | - label="合同约定失效效方式" | ||
580 | - /> | ||
581 | - </ProForm.Group> | ||
582 | - */} | ||
583 | </DrawerForm> | 583 | </DrawerForm> |
584 | ); | 584 | ); |
585 | }; | 585 | }; |
src/pages/Order/constant.ts
1 | import { enumToProTableEnumValue } from '@/utils'; | 1 | import { enumToProTableEnumValue } from '@/utils'; |
2 | 2 | ||
3 | +export const COMFIR_RECEIPT_IMAGES_NUMBER = 3; | ||
4 | + | ||
3 | export const PAYMENT_CHANNEL_OPTIONS = { | 5 | export const PAYMENT_CHANNEL_OPTIONS = { |
4 | ALIPAY: '支付宝', | 6 | ALIPAY: '支付宝', |
5 | WECHAT: '微信', | 7 | WECHAT: '微信', |
@@ -33,12 +35,12 @@ export const LOGISTICS_STATUS_OPTIONS = { | @@ -33,12 +35,12 @@ export const LOGISTICS_STATUS_OPTIONS = { | ||
33 | }; | 35 | }; |
34 | 36 | ||
35 | export const ORDER_STATUS_OPTIONS = { | 37 | export const ORDER_STATUS_OPTIONS = { |
36 | - CONFIRM_RECEIPT: '确认收货', | ||
37 | UNAUDITED: '未审核', | 38 | UNAUDITED: '未审核', |
39 | + AUDIT_FAILED: '审核失败', | ||
38 | AUDITED: '已审核', | 40 | AUDITED: '已审核', |
39 | WAIT_SHIP: '待发货', | 41 | WAIT_SHIP: '待发货', |
40 | - AUDIT_FAILED: '审核失败', | ||
41 | SHIPPED: '已发货', | 42 | SHIPPED: '已发货', |
43 | + CONFIRM_RECEIPT: '确认收货', | ||
42 | }; | 44 | }; |
43 | 45 | ||
44 | export const TAGS_COLOR = new Map<string, string>([ | 46 | export const TAGS_COLOR = new Map<string, string>([ |
@@ -54,36 +56,44 @@ export const TAGS_COLOR = new Map<string, string>([ | @@ -54,36 +56,44 @@ export const TAGS_COLOR = new Map<string, string>([ | ||
54 | ]); | 56 | ]); |
55 | 57 | ||
56 | export const SALES_CODE_OPTIONS = [ | 58 | export const SALES_CODE_OPTIONS = [ |
57 | - { label: 'HQ_唐华琼', value: 'HQ_唐华琼' }, | ||
58 | - { label: 'HQ-1_陆金丽', value: 'HQ-1_陆金丽' }, | ||
59 | - { label: 'HQ-2_易琼', value: 'HQ-2_易琼' }, | ||
60 | - { label: 'HQ-3_梁董玲', value: 'HQ-3_梁董玲' }, | ||
61 | - { label: 'HQ-4_麦倩莹', value: 'HQ-4_麦倩莹' }, | ||
62 | - { label: 'HQ-5_刘璐', value: 'HQ-5_刘璐' }, | ||
63 | - { label: 'HQ-6_李云', value: 'HQ-6_李云' }, | ||
64 | - { label: 'HQ-7_陈方', value: 'HQ-7_陈方' }, | ||
65 | - { label: 'HQ-8_袁友辉', value: 'HQ-8_袁友辉' }, | ||
66 | - { label: 'TB_储能淘宝店铺', value: 'TB_储能淘宝店铺' }, | 59 | + { label: 'HQ_Linda', value: 'HQ_Linda' }, |
60 | + { label: 'HQ-1_Rita', value: 'HQ-1_Rita' }, | ||
61 | + { label: 'HQ-2_Lisa', value: 'HQ-2_Lisa' }, | ||
62 | + { label: 'HQ-3_iris', value: 'HQ-3_iris' }, | ||
63 | + { label: 'HQ-4_Lynn', value: 'HQ-4_Lynn' }, | ||
64 | + { label: 'HQ-5_Jessica', value: 'HQ-5_Jessica' }, | ||
65 | + { label: 'HQ-6_smile', value: 'HQ-6_smile' }, | ||
66 | + { label: 'HQ-7_Yvonne', value: 'HQ-7_Yvonne' }, | ||
67 | + { label: 'HQ-8_Daniel', value: 'HQ-8_Daniel' }, | ||
68 | + { label: 'W_strong', value: 'W_strong' }, | ||
67 | { label: 'W-1_Alice', value: 'W-1_Alice' }, | 69 | { label: 'W-1_Alice', value: 'W-1_Alice' }, |
68 | - { label: 'W-4_龙青', value: 'W-4_龙青' }, | ||
69 | - { label: 'HCTB_耗材淘宝店铺', value: 'HCTB_耗材淘宝店铺' }, | ||
70 | - { label: 'TBC_电池品牌店', value: 'TBC_电池品牌店' }, | ||
71 | - { label: 'W-3_田菁菁', value: 'W-3_田菁菁' }, | ||
72 | - { label: 'W-2_黄宁', value: 'W-2_黄宁' }, | ||
73 | - { label: 'W_宋学文', value: 'W_宋学文' }, | ||
74 | - { label: 'W-5_黎艳', value: 'W-5_黎艳' }, | ||
75 | - { label: 'W-6_黄丹', value: 'W-6_黄丹' }, | ||
76 | - { label: 'W-7_黄花梅', value: 'W-7_黄花梅' }, | 70 | + { label: 'W-2_Demi', value: 'W-2_Demi' }, |
71 | + { label: 'W-3_Nico', value: 'W-3_Nico' }, | ||
72 | + { label: 'W-4_kk', value: 'W-4_kk' }, | ||
73 | + { label: 'W-5_Alma', value: 'W-5_Alma' }, | ||
74 | + { label: 'W-6_Dream', value: 'W-6_Dream' }, | ||
75 | + { label: 'W-7_Aimee', value: 'W-7_Aimee' }, | ||
77 | { label: 'XX_Tina', value: 'XX_Tina' }, | 76 | { label: 'XX_Tina', value: 'XX_Tina' }, |
78 | - { label: 'XX-P_校平台共用代码', value: 'XX-P_校平台共用代码' }, | ||
79 | { label: 'XX-2_Vivi', value: 'XX-2_Vivi' }, | 77 | { label: 'XX-2_Vivi', value: 'XX-2_Vivi' }, |
80 | - { label: 'XX-N1_Nancy', value: 'XX-N1_Nancy' }, | ||
81 | - { label: 'XX-N2_Sara', value: 'XX-N2_Sara' }, | ||
82 | { label: 'XX-A1_Ada', value: 'XX-A1_Ada' }, | 78 | { label: 'XX-A1_Ada', value: 'XX-A1_Ada' }, |
83 | { label: 'XX-A2_Amy', value: 'XX-A2_Amy' }, | 79 | { label: 'XX-A2_Amy', value: 'XX-A2_Amy' }, |
80 | + { label: 'XX-N1_Nancy', value: 'XX-N1_Nancy' }, | ||
81 | + { label: 'XX-N2_Sara', value: 'XX-N2_Sara' }, | ||
84 | { label: 'XX-C_CC', value: 'XX-C_CC' }, | 82 | { label: 'XX-C_CC', value: 'XX-C_CC' }, |
85 | { label: 'XX-L1_Lucy', value: 'XX-L1_Lucy' }, | 83 | { label: 'XX-L1_Lucy', value: 'XX-L1_Lucy' }, |
86 | { label: 'XX-L2_Lulu', value: 'XX-L2_Lulu' }, | 84 | { label: 'XX-L2_Lulu', value: 'XX-L2_Lulu' }, |
85 | + { label: 'XX-P', value: 'XX-P' }, | ||
86 | + { label: 'TB', value: 'TB' }, | ||
87 | + { label: 'HCTB', value: 'HCTB' }, | ||
88 | + { label: 'TBC', value: 'TBC' }, | ||
89 | + { label: 'GW-3_iris', value: 'GW-3_iris' }, | ||
90 | + { label: 'GW-4_Lynn', value: 'GW-4_Lynn' }, | ||
91 | + { label: 'GW-6_smile', value: 'GW-6_smile' }, | ||
92 | + { label: 'GW-7_Yvonne', value: 'GW-7_Yvonne' }, | ||
93 | + { label: 'W-9_Jack', value: 'W-9_Jack' }, | ||
94 | + { label: 'W-8_Andy', value: 'W-8_Andy' }, | ||
95 | + { label: 'CQ_Peter', value: 'CQ_Peter' }, | ||
96 | + { label: 'MA_A_Mao', value: 'MA_A_Mao' }, | ||
87 | ]; | 97 | ]; |
88 | 98 | ||
89 | export const MAIN_ORDER_COLUMNS = [ | 99 | export const MAIN_ORDER_COLUMNS = [ |
@@ -254,6 +264,12 @@ export const SUB_ORDER_COLUMNS = [ | @@ -254,6 +264,12 @@ export const SUB_ORDER_COLUMNS = [ | ||
254 | width: 80, | 264 | width: 80, |
255 | }, | 265 | }, |
256 | { | 266 | { |
267 | + title: '所属事业部', | ||
268 | + dataIndex: 'productBelongBusiness', | ||
269 | + key: 'productBelongBusiness', | ||
270 | + width: 80, | ||
271 | + }, | ||
272 | + { | ||
257 | title: '支付方式', | 273 | title: '支付方式', |
258 | dataIndex: 'paymentMethod', | 274 | dataIndex: 'paymentMethod', |
259 | key: 'paymentMethod', | 275 | key: 'paymentMethod', |
src/pages/Order/index.tsx
@@ -6,7 +6,11 @@ import { | @@ -6,7 +6,11 @@ import { | ||
6 | } from '@/services'; | 6 | } from '@/services'; |
7 | import { orderExport } from '@/services/order'; | 7 | import { orderExport } from '@/services/order'; |
8 | import { enumValueToLabel, formatDateTime } from '@/utils'; | 8 | import { enumValueToLabel, formatDateTime } from '@/utils'; |
9 | -import { DownOutlined, EllipsisOutlined } from '@ant-design/icons'; | 9 | +import { |
10 | + DownOutlined, | ||
11 | + EllipsisOutlined, | ||
12 | + QuestionCircleOutlined, | ||
13 | +} from '@ant-design/icons'; | ||
10 | import { | 14 | import { |
11 | PageContainer, | 15 | PageContainer, |
12 | ProColumns, | 16 | ProColumns, |
@@ -21,17 +25,21 @@ import { | @@ -21,17 +25,21 @@ import { | ||
21 | Dropdown, | 25 | Dropdown, |
22 | Flex, | 26 | Flex, |
23 | MenuProps, | 27 | MenuProps, |
28 | + Modal, | ||
24 | Space, | 29 | Space, |
25 | Tag, | 30 | Tag, |
31 | + Tooltip, | ||
26 | message, | 32 | message, |
27 | } from 'antd'; | 33 | } from 'antd'; |
28 | import { cloneDeep } from 'lodash'; | 34 | import { cloneDeep } from 'lodash'; |
29 | import { Key, useEffect, useRef, useState } from 'react'; | 35 | import { Key, useEffect, useRef, useState } from 'react'; |
30 | import OrderPrintModal from '../OrderPrint/OrderPrintModal'; | 36 | import OrderPrintModal from '../OrderPrint/OrderPrintModal'; |
37 | +import AttachmentModal from './components/AttachmentModal'; | ||
31 | import CheckModal from './components/CheckModal'; | 38 | import CheckModal from './components/CheckModal'; |
32 | import ConfirmReceiptModal from './components/ConfirmReceiptModal'; | 39 | import ConfirmReceiptModal from './components/ConfirmReceiptModal'; |
33 | import DeliverModal from './components/DeliverModal'; | 40 | import DeliverModal from './components/DeliverModal'; |
34 | import FinancialDrawer from './components/FinancialDrawer'; | 41 | import FinancialDrawer from './components/FinancialDrawer'; |
42 | +import ImportModal from './components/ImportModal'; | ||
35 | import OrderDrawer from './components/OrderDrawer'; | 43 | import OrderDrawer from './components/OrderDrawer'; |
36 | import OrderNotesEditModal from './components/OrderNotesEditModal'; | 44 | import OrderNotesEditModal from './components/OrderNotesEditModal'; |
37 | import SubOrderComfirmReceiptImagesModal from './components/SubOrderComfirmReceiptImagesModal'; | 45 | import SubOrderComfirmReceiptImagesModal from './components/SubOrderComfirmReceiptImagesModal'; |
@@ -42,6 +50,7 @@ import { | @@ -42,6 +50,7 @@ import { | ||
42 | ORDER_STATUS_OPTIONS, | 50 | ORDER_STATUS_OPTIONS, |
43 | PAYMENT_CHANNEL_OPTIONS, | 51 | PAYMENT_CHANNEL_OPTIONS, |
44 | PAYMENT_METHOD_OPTIONS, | 52 | PAYMENT_METHOD_OPTIONS, |
53 | + PRODUCT_BELONG_DEPARTMENT_OPTIONS, | ||
45 | SUB_ORDER_COLUMNS, | 54 | SUB_ORDER_COLUMNS, |
46 | TAGS_COLOR, | 55 | TAGS_COLOR, |
47 | } from './constant'; | 56 | } from './constant'; |
@@ -57,10 +66,13 @@ const OrderPage = () => { | @@ -57,10 +66,13 @@ const OrderPage = () => { | ||
57 | setSubOrderConfirmReceiptImagesVisible, | 66 | setSubOrderConfirmReceiptImagesVisible, |
58 | ] = useState<boolean>(false); | 67 | ] = useState<boolean>(false); |
59 | const [notesEditVisible, setNotesEditVisible] = useState<boolean>(false); | 68 | const [notesEditVisible, setNotesEditVisible] = useState<boolean>(false); |
69 | + const [attachmentModalVisible, setAttachmentModalVisible] = | ||
70 | + useState<boolean>(false); | ||
60 | const [financialVisible, setFinancialVisible] = useState<boolean>(false); | 71 | const [financialVisible, setFinancialVisible] = useState<boolean>(false); |
61 | const [isRePrintOrder, setIsRePrintOrder] = useState<boolean>(false); | 72 | const [isRePrintOrder, setIsRePrintOrder] = useState<boolean>(false); |
62 | const [isSendProduct, setIsSendProduct] = useState<boolean>(false); | 73 | const [isSendProduct, setIsSendProduct] = useState<boolean>(false); |
63 | const [isMainOrder, setIsMainOrder] = useState<boolean>(false); | 74 | const [isMainOrder, setIsMainOrder] = useState<boolean>(false); |
75 | + const [importModalVisible, setImportModalVisible] = useState<boolean>(false); | ||
64 | const [confirmReceiptVisible, setConfirmReceiptVisible] = | 76 | const [confirmReceiptVisible, setConfirmReceiptVisible] = |
65 | useState<boolean>(false); | 77 | useState<boolean>(false); |
66 | const [deliverVisible, setDeliverVisible] = useState<boolean>(false); | 78 | const [deliverVisible, setDeliverVisible] = useState<boolean>(false); |
@@ -76,9 +88,23 @@ const OrderPage = () => { | @@ -76,9 +88,23 @@ const OrderPage = () => { | ||
76 | const [selectedRowObj, setSelectedRowObj] = useState({}); | 88 | const [selectedRowObj, setSelectedRowObj] = useState({}); |
77 | const [selectedItems, setSelectedItems] = useState([]); | 89 | const [selectedItems, setSelectedItems] = useState([]); |
78 | const [selectedRowKeys, setSelectedRowKeys] = useState([]); | 90 | const [selectedRowKeys, setSelectedRowKeys] = useState([]); |
91 | + const [pageSize, setPageSize] = useState(10); | ||
92 | + const [currentPage, setCurrentPage] = useState(1); | ||
79 | const mainTableRef = useRef(); | 93 | const mainTableRef = useRef(); |
80 | const [messageApi, contextHolder] = message.useMessage(); | 94 | const [messageApi, contextHolder] = message.useMessage(); |
81 | 95 | ||
96 | + const openCheckNotes = (checkNotes: string) => { | ||
97 | + Modal.info({ | ||
98 | + title: '驳回备注', | ||
99 | + content: ( | ||
100 | + <div> | ||
101 | + <p>{checkNotes}</p> | ||
102 | + </div> | ||
103 | + ), | ||
104 | + onOk() {}, | ||
105 | + }); | ||
106 | + }; | ||
107 | + | ||
82 | const exportLoading = () => { | 108 | const exportLoading = () => { |
83 | messageApi.open({ | 109 | messageApi.open({ |
84 | type: 'loading', | 110 | type: 'loading', |
@@ -506,6 +532,23 @@ const OrderPage = () => { | @@ -506,6 +532,23 @@ const OrderPage = () => { | ||
506 | label = '已开票'; | 532 | label = '已开票'; |
507 | newText = 'AFTER_INVOICED'; | 533 | newText = 'AFTER_INVOICED'; |
508 | } | 534 | } |
535 | + //审核失败点击标签可以弹出驳回备注信息 | ||
536 | + if (text === 'AUDIT_FAILED') { | ||
537 | + return ( | ||
538 | + <Tooltip placement="top" title="点击查看备注"> | ||
539 | + <Tag | ||
540 | + color={TAGS_COLOR.get(newText)} | ||
541 | + className="mr-1 cursor-pointer" | ||
542 | + onClick={() => { | ||
543 | + openCheckNotes(optRecord.checkNotes); | ||
544 | + }} | ||
545 | + > | ||
546 | + {label} | ||
547 | + </Tag> | ||
548 | + <QuestionCircleOutlined /> | ||
549 | + </Tooltip> | ||
550 | + ); | ||
551 | + } | ||
509 | return <Tag color={TAGS_COLOR.get(newText)}>{label}</Tag>; | 552 | return <Tag color={TAGS_COLOR.get(newText)}>{label}</Tag>; |
510 | }, | 553 | }, |
511 | }; | 554 | }; |
@@ -513,7 +556,8 @@ const OrderPage = () => { | @@ -513,7 +556,8 @@ const OrderPage = () => { | ||
513 | //枚举字段处理 | 556 | //枚举字段处理 |
514 | item.key === 'paymentMethod' || | 557 | item.key === 'paymentMethod' || |
515 | item.key === 'paymentChannel' || | 558 | item.key === 'paymentChannel' || |
516 | - item.key === 'logisticsMethod' | 559 | + item.key === 'logisticsMethod' || |
560 | + item.key === 'productBelongBusiness' | ||
517 | ) { | 561 | ) { |
518 | return { | 562 | return { |
519 | ...item, | 563 | ...item, |
@@ -525,6 +569,12 @@ const OrderPage = () => { | @@ -525,6 +569,12 @@ const OrderPage = () => { | ||
525 | if (label === undefined) { | 569 | if (label === undefined) { |
526 | label = enumValueToLabel(text, LOGISTICS_STATUS_OPTIONS); | 570 | label = enumValueToLabel(text, LOGISTICS_STATUS_OPTIONS); |
527 | } | 571 | } |
572 | + if (label === undefined) { | ||
573 | + label = enumValueToLabel( | ||
574 | + text, | ||
575 | + PRODUCT_BELONG_DEPARTMENT_OPTIONS, | ||
576 | + ); | ||
577 | + } | ||
528 | return label; | 578 | return label; |
529 | }, | 579 | }, |
530 | }; | 580 | }; |
@@ -564,6 +614,22 @@ const OrderPage = () => { | @@ -564,6 +614,22 @@ const OrderPage = () => { | ||
564 | '' | 614 | '' |
565 | )} | 615 | )} |
566 | 616 | ||
617 | + {optRecord.subPath.includes('queryAnnex') ? ( | ||
618 | + <Button | ||
619 | + className="p-0" | ||
620 | + type="link" | ||
621 | + onClick={() => { | ||
622 | + optRecord.mainOrderId = record.id; | ||
623 | + setAttachmentModalVisible(true); | ||
624 | + setOrderRow(optRecord); | ||
625 | + }} | ||
626 | + > | ||
627 | + 附件 | ||
628 | + </Button> | ||
629 | + ) : ( | ||
630 | + '' | ||
631 | + )} | ||
632 | + | ||
567 | {optRecord.subPath.includes('modifySendInformation') ? ( | 633 | {optRecord.subPath.includes('modifySendInformation') ? ( |
568 | <Button | 634 | <Button |
569 | className="p-0" | 635 | className="p-0" |
@@ -753,7 +819,7 @@ const OrderPage = () => { | @@ -753,7 +819,7 @@ const OrderPage = () => { | ||
753 | } | 819 | } |
754 | let body = { flag: true, ids: selectedItems }; | 820 | let body = { flag: true, ids: selectedItems }; |
755 | exportLoading(); | 821 | exportLoading(); |
756 | - orderExport(body, exportLoadingDestory); | 822 | + orderExport('/api/service/order/export', body, exportLoadingDestory); |
757 | }, | 823 | }, |
758 | }, | 824 | }, |
759 | { | 825 | { |
@@ -766,7 +832,7 @@ const OrderPage = () => { | @@ -766,7 +832,7 @@ const OrderPage = () => { | ||
766 | } | 832 | } |
767 | let body = { flag: true, ids: mainOrderAllItemKeys }; | 833 | let body = { flag: true, ids: mainOrderAllItemKeys }; |
768 | exportLoading(); | 834 | exportLoading(); |
769 | - orderExport(body, exportLoadingDestory); | 835 | + orderExport('/api/service/order/export', body, exportLoadingDestory); |
770 | }, | 836 | }, |
771 | }, | 837 | }, |
772 | { | 838 | { |
@@ -775,7 +841,7 @@ const OrderPage = () => { | @@ -775,7 +841,7 @@ const OrderPage = () => { | ||
775 | onClick: async () => { | 841 | onClick: async () => { |
776 | let body = { flag: false, ids: [] }; | 842 | let body = { flag: false, ids: [] }; |
777 | exportLoading(); | 843 | exportLoading(); |
778 | - orderExport(body, exportLoadingDestory); | 844 | + orderExport('/api/service/order/export', body, exportLoadingDestory); |
779 | }, | 845 | }, |
780 | }, | 846 | }, |
781 | ]; | 847 | ]; |
@@ -799,6 +865,19 @@ const OrderPage = () => { | @@ -799,6 +865,19 @@ const OrderPage = () => { | ||
799 | </Button>, | 865 | </Button>, |
800 | ); | 866 | ); |
801 | } | 867 | } |
868 | + if (rolePath?.includes('importExcel')) { | ||
869 | + toolBtns.push( | ||
870 | + <Button | ||
871 | + type="primary" | ||
872 | + key="out" | ||
873 | + onClick={() => { | ||
874 | + setImportModalVisible(true); | ||
875 | + }} | ||
876 | + > | ||
877 | + 导入 | ||
878 | + </Button>, | ||
879 | + ); | ||
880 | + } | ||
802 | 881 | ||
803 | toolBtns.push( | 882 | toolBtns.push( |
804 | <Dropdown menu={menuProps}> | 883 | <Dropdown menu={menuProps}> |
@@ -874,7 +953,13 @@ const OrderPage = () => { | @@ -874,7 +953,13 @@ const OrderPage = () => { | ||
874 | rowKey="id" | 953 | rowKey="id" |
875 | pagination={{ | 954 | pagination={{ |
876 | showQuickJumper: true, | 955 | showQuickJumper: true, |
877 | - pageSize: 10, | 956 | + pageSize: pageSize, |
957 | + current: currentPage, | ||
958 | + showSizeChanger: true, | ||
959 | + onChange: (page, size) => { | ||
960 | + setPageSize(size); | ||
961 | + setCurrentPage(page); | ||
962 | + }, | ||
878 | }} | 963 | }} |
879 | expandedRowKeys={expandedRowKeys} | 964 | expandedRowKeys={expandedRowKeys} |
880 | expandable={{ expandedRowRender }} | 965 | expandable={{ expandedRowRender }} |
@@ -1021,6 +1106,25 @@ const OrderPage = () => { | @@ -1021,6 +1106,25 @@ const OrderPage = () => { | ||
1021 | /> | 1106 | /> |
1022 | )} | 1107 | )} |
1023 | 1108 | ||
1109 | + {importModalVisible && ( | ||
1110 | + <ImportModal | ||
1111 | + onClose={() => { | ||
1112 | + setImportModalVisible(false); | ||
1113 | + refreshTable(); | ||
1114 | + }} | ||
1115 | + /> | ||
1116 | + )} | ||
1117 | + | ||
1118 | + {attachmentModalVisible && ( | ||
1119 | + <AttachmentModal | ||
1120 | + data={orderRow} | ||
1121 | + onClose={() => { | ||
1122 | + setAttachmentModalVisible(false); | ||
1123 | + setOrderRow({}); | ||
1124 | + }} | ||
1125 | + /> | ||
1126 | + )} | ||
1127 | + | ||
1024 | {contextHolder} | 1128 | {contextHolder} |
1025 | </PageContainer> | 1129 | </PageContainer> |
1026 | ); | 1130 | ); |
src/pages/OrderPrint/OrderPrintModal.tsx
@@ -5,6 +5,7 @@ import { ExclamationCircleFilled } from '@ant-design/icons'; | @@ -5,6 +5,7 @@ import { ExclamationCircleFilled } from '@ant-design/icons'; | ||
5 | import { Modal, Select, Space, message } from 'antd'; | 5 | import { Modal, Select, Space, message } from 'antd'; |
6 | import printJS from 'print-js'; | 6 | import printJS from 'print-js'; |
7 | import { useState } from 'react'; | 7 | import { useState } from 'react'; |
8 | +import { printerCSS } from './PrinterCSS'; | ||
8 | import DalangPrinter from './components/DalangPrinter'; | 9 | import DalangPrinter from './components/DalangPrinter'; |
9 | import HoujiePrinter from './components/HoujiePrinter'; | 10 | import HoujiePrinter from './components/HoujiePrinter'; |
10 | import ZhuguangPrinter from './components/ZhuguangPrinter'; | 11 | import ZhuguangPrinter from './components/ZhuguangPrinter'; |
@@ -54,14 +55,11 @@ export default ({ mainOrder, subOrders, isRePrint, onClose }) => { | @@ -54,14 +55,11 @@ export default ({ mainOrder, subOrders, isRePrint, onClose }) => { | ||
54 | //printJS打印出货单 | 55 | //printJS打印出货单 |
55 | printJS({ | 56 | printJS({ |
56 | printable: 'printArea', // 元素id,不支持多个 | 57 | printable: 'printArea', // 元素id,不支持多个 |
57 | - scanStyles: true, | 58 | + scanStyles: false, |
58 | type: 'html', | 59 | type: 'html', |
59 | targetStyle: ['* '], | 60 | targetStyle: ['* '], |
60 | targetStyles: ['*'], | 61 | targetStyles: ['*'], |
61 | - style: | ||
62 | - '@page{size:auto;margin: 0mm;}' + | ||
63 | - '@media print { body{margin:0 auto;padding:0;#title{font-size:24px}}' + | ||
64 | - 'body{zoom:1.6;margin:0;', // landscape 默认横向打印 | 62 | + style: printerCSS(), |
65 | onPrintDialogClose: () => { | 63 | onPrintDialogClose: () => { |
66 | showPropsConfirm(); | 64 | showPropsConfirm(); |
67 | }, | 65 | }, |
src/pages/OrderPrint/PrinterCSS.tsx
0 → 100644
1 | +export function printerCSS2() { | ||
2 | + return ` | ||
3 | + .x165{ | ||
4 | + font-size:13.5pt | ||
5 | + } | ||
6 | + `; | ||
7 | +} | ||
8 | + | ||
9 | +export function printerCSS() { | ||
10 | + return ` | ||
11 | + body{ | ||
12 | + zoom:1.5 | ||
13 | + } | ||
14 | + tr { | ||
15 | + // mso-height-source: auto; | ||
16 | + // mso-ruby-visibility: none; | ||
17 | + } | ||
18 | + | ||
19 | + col { | ||
20 | + // mso-width-source: auto; | ||
21 | + // mso-ruby-visibility: none; | ||
22 | + } | ||
23 | + | ||
24 | + br { | ||
25 | + // mso-data-placement: same-cell; | ||
26 | + } | ||
27 | + | ||
28 | + .font0 { | ||
29 | + color: windowtext; | ||
30 | + font-size: 12px; | ||
31 | + font-weight: 400; | ||
32 | + font-style: normal; | ||
33 | + text-decoration: none; | ||
34 | + font-family: "微软雅黑", sans-serif; | ||
35 | + // //mso-generic-font-family: auto; | ||
36 | + // //mso-font-charset: 134; | ||
37 | + } | ||
38 | + | ||
39 | + .font1 { | ||
40 | + color: windowtext; | ||
41 | + font-size: 16px; | ||
42 | + font-weight: 400; | ||
43 | + font-style: normal; | ||
44 | + text-decoration: none; | ||
45 | + font-family: "微软雅黑", sans-serif; | ||
46 | + // //mso-generic-font-family: auto; | ||
47 | + // mso-font-charset: 134; | ||
48 | + } | ||
49 | + | ||
50 | + .font2 { | ||
51 | + color: windowtext; | ||
52 | + font-size: 10px; | ||
53 | + font-weight: 400; | ||
54 | + font-style: normal; | ||
55 | + text-decoration: none; | ||
56 | + font-family: "微软雅黑", sans-serif; | ||
57 | + ////mso-generic-font-family: auto; | ||
58 | + //mso-font-charset: 134; | ||
59 | + } | ||
60 | + | ||
61 | + .font3 { | ||
62 | + color: windowtext; | ||
63 | + font-size: 10.5pt; | ||
64 | + font-weight: 400; | ||
65 | + font-style: normal; | ||
66 | + text-decoration: none; | ||
67 | + font-family: "微软雅黑", sans-serif; | ||
68 | + ////mso-generic-font-family: auto; | ||
69 | + //mso-font-charset: 134; | ||
70 | + } | ||
71 | + | ||
72 | + .font4 { | ||
73 | + color: windowtext; | ||
74 | + font-size: 8px; | ||
75 | + font-weight: 400; | ||
76 | + font-style: normal; | ||
77 | + text-decoration: none; | ||
78 | + font-family: "微软雅黑", sans-serif; | ||
79 | + ////mso-generic-font-family: auto; | ||
80 | + //mso-font-charset: 134; | ||
81 | + } | ||
82 | + | ||
83 | + .font5 { | ||
84 | + color: #00f; | ||
85 | + font-size: 11px; | ||
86 | + font-weight: 400; | ||
87 | + font-style: normal; | ||
88 | + text-decoration: underline; | ||
89 | + //text-underline-style: single; | ||
90 | + font-family: "微软雅黑", sans-serif; | ||
91 | + ////mso-generic-font-family: auto; | ||
92 | + //mso-font-charset: 134; | ||
93 | + } | ||
94 | + | ||
95 | + .font6 { | ||
96 | + color: #800080; | ||
97 | + font-size: 11px; | ||
98 | + font-weight: 400; | ||
99 | + font-style: normal; | ||
100 | + text-decoration: underline; | ||
101 | + //text-underline-style: single; | ||
102 | + font-family: "微软雅黑", sans-serif; | ||
103 | + ////mso-generic-font-family: auto; | ||
104 | + //mso-font-charset: 134; | ||
105 | + } | ||
106 | + | ||
107 | + .font7 { | ||
108 | + color: #000; | ||
109 | + font-size: 11px; | ||
110 | + font-weight: 400; | ||
111 | + font-style: normal; | ||
112 | + text-decoration: none; | ||
113 | + font-family: "微软雅黑", sans-serif; | ||
114 | + ////mso-generic-font-family: auto; | ||
115 | + //mso-font-charset: 134; | ||
116 | + } | ||
117 | + | ||
118 | + .font8 { | ||
119 | + color: #f00; | ||
120 | + font-size: 11px; | ||
121 | + font-weight: 400; | ||
122 | + font-style: normal; | ||
123 | + text-decoration: none; | ||
124 | + font-family: "微软雅黑", sans-serif; | ||
125 | + ////mso-generic-font-family: auto; | ||
126 | + //mso-font-charset: 134; | ||
127 | + } | ||
128 | + | ||
129 | + .font9 { | ||
130 | + color: #44546a; | ||
131 | + font-size: 13.5pt; | ||
132 | + font-weight: 700; | ||
133 | + font-style: normal; | ||
134 | + text-decoration: none; | ||
135 | + font-family: "微软雅黑", sans-serif; | ||
136 | + ////mso-generic-font-family: auto; | ||
137 | + //mso-font-charset: 134; | ||
138 | + } | ||
139 | + | ||
140 | + .font10 { | ||
141 | + color: #7f7f7f; | ||
142 | + font-size: 11px; | ||
143 | + font-weight: 400; | ||
144 | + font-style: italic; | ||
145 | + text-decoration: none; | ||
146 | + font-family: "微软雅黑", sans-serif; | ||
147 | + ////mso-generic-font-family: auto; | ||
148 | + //mso-font-charset: 134; | ||
149 | + } | ||
150 | + | ||
151 | + .font11 { | ||
152 | + color: #44546a; | ||
153 | + font-size: 15px; | ||
154 | + font-weight: 700; | ||
155 | + font-style: normal; | ||
156 | + text-decoration: none; | ||
157 | + font-family: "微软雅黑", sans-serif; | ||
158 | + ////mso-generic-font-family: auto; | ||
159 | + //mso-font-charset: 134; | ||
160 | + } | ||
161 | + | ||
162 | + .font12 { | ||
163 | + color: #44546a; | ||
164 | + font-size: 13px; | ||
165 | + font-weight: 700; | ||
166 | + font-style: normal; | ||
167 | + text-decoration: none; | ||
168 | + font-family: "微软雅黑", sans-serif; | ||
169 | + ////mso-generic-font-family: auto; | ||
170 | + //mso-font-charset: 134; | ||
171 | + } | ||
172 | + | ||
173 | + .font13 { | ||
174 | + color: #44546a; | ||
175 | + font-size: 11px; | ||
176 | + font-weight: 700; | ||
177 | + font-style: normal; | ||
178 | + text-decoration: none; | ||
179 | + font-family: "微软雅黑", sans-serif; | ||
180 | + ////mso-generic-font-family: auto; | ||
181 | + //mso-font-charset: 134; | ||
182 | + } | ||
183 | + | ||
184 | + .font14 { | ||
185 | + color: #3f3f76; | ||
186 | + font-size: 11px; | ||
187 | + font-weight: 400; | ||
188 | + font-style: normal; | ||
189 | + text-decoration: none; | ||
190 | + font-family: "微软雅黑", sans-serif; | ||
191 | + ////mso-generic-font-family: auto; | ||
192 | + //mso-font-charset: 134; | ||
193 | + } | ||
194 | + | ||
195 | + .font15 { | ||
196 | + color: #3f3f3f; | ||
197 | + font-size: 11px; | ||
198 | + font-weight: 700; | ||
199 | + font-style: normal; | ||
200 | + text-decoration: none; | ||
201 | + font-family: "微软雅黑", sans-serif; | ||
202 | + ////mso-generic-font-family: auto; | ||
203 | + //mso-font-charset: 134; | ||
204 | + } | ||
205 | + | ||
206 | + .font16 { | ||
207 | + color: #fa7d00; | ||
208 | + font-size: 11px; | ||
209 | + font-weight: 700; | ||
210 | + font-style: normal; | ||
211 | + text-decoration: none; | ||
212 | + font-family: "微软雅黑", sans-serif; | ||
213 | + ////mso-generic-font-family: auto; | ||
214 | + //mso-font-charset: 134; | ||
215 | + } | ||
216 | + | ||
217 | + .font17 { | ||
218 | + color: #fff; | ||
219 | + font-size: 11px; | ||
220 | + font-weight: 700; | ||
221 | + font-style: normal; | ||
222 | + text-decoration: none; | ||
223 | + font-family: "微软雅黑", sans-serif; | ||
224 | + ////mso-generic-font-family: auto; | ||
225 | + //mso-font-charset: 134; | ||
226 | + } | ||
227 | + | ||
228 | + .font18 { | ||
229 | + color: #fa7d00; | ||
230 | + font-size: 11px; | ||
231 | + font-weight: 400; | ||
232 | + font-style: normal; | ||
233 | + text-decoration: none; | ||
234 | + font-family: "微软雅黑", sans-serif; | ||
235 | + ////mso-generic-font-family: auto; | ||
236 | + //mso-font-charset: 134; | ||
237 | + } | ||
238 | + | ||
239 | + .font19 { | ||
240 | + color: #000; | ||
241 | + font-size: 11px; | ||
242 | + font-weight: 700; | ||
243 | + font-style: normal; | ||
244 | + text-decoration: none; | ||
245 | + font-family: "微软雅黑", sans-serif; | ||
246 | + ////mso-generic-font-family: auto; | ||
247 | + //mso-font-charset: 134; | ||
248 | + } | ||
249 | + | ||
250 | + .font20 { | ||
251 | + color: #006100; | ||
252 | + font-size: 11px; | ||
253 | + font-weight: 400; | ||
254 | + font-style: normal; | ||
255 | + text-decoration: none; | ||
256 | + font-family: "微软雅黑", sans-serif; | ||
257 | + ////mso-generic-font-family: auto; | ||
258 | + //mso-font-charset: 134; | ||
259 | + } | ||
260 | + | ||
261 | + .font21 { | ||
262 | + color: #9c0006; | ||
263 | + font-size: 11px; | ||
264 | + font-weight: 400; | ||
265 | + font-style: normal; | ||
266 | + text-decoration: none; | ||
267 | + font-family: "微软雅黑", sans-serif; | ||
268 | + ////mso-generic-font-family: auto; | ||
269 | + //mso-font-charset: 134; | ||
270 | + } | ||
271 | + | ||
272 | + .font22 { | ||
273 | + color: #9c6500; | ||
274 | + font-size: 11px; | ||
275 | + font-weight: 400; | ||
276 | + font-style: normal; | ||
277 | + text-decoration: none; | ||
278 | + font-family: "微软雅黑", sans-serif; | ||
279 | + ////mso-generic-font-family: auto; | ||
280 | + //mso-font-charset: 134; | ||
281 | + } | ||
282 | + | ||
283 | + .font23 { | ||
284 | + color: #fff; | ||
285 | + font-size: 11px; | ||
286 | + font-weight: 400; | ||
287 | + font-style: normal; | ||
288 | + text-decoration: none; | ||
289 | + font-family: "微软雅黑", sans-serif; | ||
290 | + ////mso-generic-font-family: auto; | ||
291 | + //mso-font-charset: 134; | ||
292 | + } | ||
293 | + | ||
294 | + .font24 { | ||
295 | + color: #000; | ||
296 | + font-size: 11px; | ||
297 | + font-weight: 400; | ||
298 | + font-style: normal; | ||
299 | + text-decoration: none; | ||
300 | + font-family: "微软雅黑", sans-serif; | ||
301 | + ////mso-generic-font-family: auto; | ||
302 | + //mso-font-charset: 134; | ||
303 | + } | ||
304 | + | ||
305 | + .style0 { | ||
306 | + //mso-number-format: "General"; | ||
307 | + text-align: general; | ||
308 | + vertical-align: middle; | ||
309 | + white-space: nowrap; | ||
310 | + // mso-rotate: 0; | ||
311 | + // //mso-pattern: auto; | ||
312 | + // mso-background-source: auto; | ||
313 | + color: windowtext; | ||
314 | + font-size: 12px; | ||
315 | + font-weight: 400; | ||
316 | + font-style: normal; | ||
317 | + text-decoration: none; | ||
318 | + font-family: "微软雅黑", sans-serif; | ||
319 | + ////mso-generic-font-family: auto; | ||
320 | + //mso-font-charset: 134; | ||
321 | + border: none; | ||
322 | + //mso-protection: locked visible; | ||
323 | + // mso-style-name: "常规"; | ||
324 | + // mso-style-id: 0; | ||
325 | + } | ||
326 | + | ||
327 | + | ||
328 | + .style18 { | ||
329 | + // mso-number-format: "0%"; | ||
330 | + // mso-style-name: "百分比"; | ||
331 | + // mso-style-id: 5; | ||
332 | + } | ||
333 | + .style21 { | ||
334 | + color: #00f; | ||
335 | + font-size: 11px; | ||
336 | + font-weight: 400; | ||
337 | + font-style: normal; | ||
338 | + text-decoration: underline; | ||
339 | + //text-underline-style: single; | ||
340 | + font-family: "微软雅黑", sans-serif; | ||
341 | + ////mso-generic-font-family: auto; | ||
342 | + //mso-font-charset: 134; | ||
343 | + // mso-style-name: "超链接"; | ||
344 | + // mso-style-id: 8; | ||
345 | + } | ||
346 | + | ||
347 | + .style22 { | ||
348 | + color: #800080; | ||
349 | + font-size: 11px; | ||
350 | + font-weight: 400; | ||
351 | + font-style: normal; | ||
352 | + text-decoration: underline; | ||
353 | + //text-underline-style: single; | ||
354 | + font-family: "微软雅黑", sans-serif; | ||
355 | + ////mso-generic-font-family: auto; | ||
356 | + //mso-font-charset: 134; | ||
357 | + // mso-style-name: "已访问的超链接"; | ||
358 | + // mso-style-id: 9; | ||
359 | + } | ||
360 | + | ||
361 | + .style23 { | ||
362 | + // //mso-pattern: auto none; | ||
363 | + background: #ffc; | ||
364 | + border: 0.5px solid #b2b2b2; | ||
365 | + // mso-style-name: "注释"; | ||
366 | + } | ||
367 | + | ||
368 | + .style24 { | ||
369 | + color: #f00; | ||
370 | + font-size: 11px; | ||
371 | + font-weight: 400; | ||
372 | + font-style: normal; | ||
373 | + text-decoration: none; | ||
374 | + font-family: "微软雅黑", sans-serif; | ||
375 | + ////mso-generic-font-family: auto; | ||
376 | + //mso-font-charset: 134; | ||
377 | + // mso-style-name: "警告文本"; | ||
378 | + } | ||
379 | + | ||
380 | + .style25 { | ||
381 | + color: #44546a; | ||
382 | + font-size: 13.5pt; | ||
383 | + font-weight: 700; | ||
384 | + font-style: normal; | ||
385 | + text-decoration: none; | ||
386 | + font-family: "微软雅黑", sans-serif; | ||
387 | + ////mso-generic-font-family: auto; | ||
388 | + //mso-font-charset: 134; | ||
389 | + // mso-style-name: "标题"; | ||
390 | + } | ||
391 | + | ||
392 | + .style26 { | ||
393 | + color: #7f7f7f; | ||
394 | + font-size: 11px; | ||
395 | + font-weight: 400; | ||
396 | + font-style: italic; | ||
397 | + text-decoration: none; | ||
398 | + font-family: "微软雅黑", sans-serif; | ||
399 | + ////mso-generic-font-family: auto; | ||
400 | + //mso-font-charset: 134; | ||
401 | + // mso-style-name: "解释性文本"; | ||
402 | + } | ||
403 | + | ||
404 | + .style27 { | ||
405 | + color: #44546a; | ||
406 | + font-size: 15px; | ||
407 | + font-weight: 700; | ||
408 | + font-style: normal; | ||
409 | + text-decoration: none; | ||
410 | + font-family: "微软雅黑", sans-serif; | ||
411 | + ////mso-generic-font-family: auto; | ||
412 | + //mso-font-charset: 134; | ||
413 | + border-bottom: 1px solid #5b9bd5; | ||
414 | + // mso-style-name: "标题 1"; | ||
415 | + } | ||
416 | + | ||
417 | + .style28 { | ||
418 | + color: #44546a; | ||
419 | + font-size: 13px; | ||
420 | + font-weight: 700; | ||
421 | + font-style: normal; | ||
422 | + text-decoration: none; | ||
423 | + font-family: "微软雅黑", sans-serif; | ||
424 | + ////mso-generic-font-family: auto; | ||
425 | + //mso-font-charset: 134; | ||
426 | + border-bottom: 1px solid #5b9bd5; | ||
427 | + // mso-style-name: "标题 2"; | ||
428 | + } | ||
429 | + | ||
430 | + .style29 { | ||
431 | + color: #44546a; | ||
432 | + font-size: 11px; | ||
433 | + font-weight: 700; | ||
434 | + font-style: normal; | ||
435 | + text-decoration: none; | ||
436 | + font-family: "微软雅黑", sans-serif; | ||
437 | + ////mso-generic-font-family: auto; | ||
438 | + //mso-font-charset: 134; | ||
439 | + border-bottom: 1px solid #acccea; | ||
440 | + //mso-style-name: "标题 3"; | ||
441 | + } | ||
442 | + | ||
443 | + .style30 { | ||
444 | + color: #44546a; | ||
445 | + font-size: 11px; | ||
446 | + font-weight: 700; | ||
447 | + font-style: normal; | ||
448 | + text-decoration: none; | ||
449 | + font-family: "微软雅黑", sans-serif; | ||
450 | + ////mso-generic-font-family: auto; | ||
451 | + //mso-font-charset: 134; | ||
452 | + //mso-style-name: "标题 4"; | ||
453 | + } | ||
454 | + | ||
455 | + .style31 { | ||
456 | + ////mso-pattern: auto none; | ||
457 | + background: #fc9; | ||
458 | + color: #3f3f76; | ||
459 | + font-size: 11px; | ||
460 | + font-weight: 400; | ||
461 | + font-style: normal; | ||
462 | + text-decoration: none; | ||
463 | + font-family: "微软雅黑", sans-serif; | ||
464 | + ////mso-generic-font-family: auto; | ||
465 | + //mso-font-charset: 134; | ||
466 | + border: 0.5px solid #7f7f7f; | ||
467 | + //mso-style-name: "输入"; | ||
468 | + } | ||
469 | + | ||
470 | + .style32 { | ||
471 | + ////mso-pattern: auto none; | ||
472 | + background: #f2f2f2; | ||
473 | + color: #3f3f3f; | ||
474 | + font-size: 11px; | ||
475 | + font-weight: 700; | ||
476 | + font-style: normal; | ||
477 | + text-decoration: none; | ||
478 | + font-family: "微软雅黑", sans-serif; | ||
479 | + ////mso-generic-font-family: auto; | ||
480 | + //mso-font-charset: 134; | ||
481 | + border: 0.5px solid #3f3f3f; | ||
482 | + //mso-style-name: "输出"; | ||
483 | + } | ||
484 | + | ||
485 | + .style33 { | ||
486 | + ////mso-pattern: auto none; | ||
487 | + background: #f2f2f2; | ||
488 | + color: #fa7d00; | ||
489 | + font-size: 11px; | ||
490 | + font-weight: 700; | ||
491 | + font-style: normal; | ||
492 | + text-decoration: none; | ||
493 | + font-family: "微软雅黑", sans-serif; | ||
494 | + ////mso-generic-font-family: auto; | ||
495 | + //mso-font-charset: 134; | ||
496 | + border: 0.5px solid #7f7f7f; | ||
497 | + //mso-style-name: "计算"; | ||
498 | + } | ||
499 | + | ||
500 | + .style34 { | ||
501 | + ////mso-pattern: auto none; | ||
502 | + background: #a5a5a5; | ||
503 | + color: #fff; | ||
504 | + font-size: 11px; | ||
505 | + font-weight: 700; | ||
506 | + font-style: normal; | ||
507 | + text-decoration: none; | ||
508 | + font-family: "微软雅黑", sans-serif; | ||
509 | + ////mso-generic-font-family: auto; | ||
510 | + //mso-font-charset: 134; | ||
511 | + border: 2px double #3f3f3f; | ||
512 | + //mso-style-name: "检查单元格"; | ||
513 | + } | ||
514 | + | ||
515 | + .style35 { | ||
516 | + color: #fa7d00; | ||
517 | + font-size: 11px; | ||
518 | + font-weight: 400; | ||
519 | + font-style: normal; | ||
520 | + text-decoration: none; | ||
521 | + font-family: "微软雅黑", sans-serif; | ||
522 | + ////mso-generic-font-family: auto; | ||
523 | + //mso-font-charset: 134; | ||
524 | + border-bottom: 2px double #ff8001; | ||
525 | + //mso-style-name: "链接单元格"; | ||
526 | + } | ||
527 | + | ||
528 | + .style36 { | ||
529 | + color: #000; | ||
530 | + font-size: 11px; | ||
531 | + font-weight: 700; | ||
532 | + font-style: normal; | ||
533 | + text-decoration: none; | ||
534 | + font-family: "微软雅黑", sans-serif; | ||
535 | + ////mso-generic-font-family: auto; | ||
536 | + //mso-font-charset: 134; | ||
537 | + border-top: 0.5px solid #5b9bd5; | ||
538 | + border-bottom: 2px double #5b9bd5; | ||
539 | + //mso-style-name: "汇总"; | ||
540 | + } | ||
541 | + | ||
542 | + .style37 { | ||
543 | + ////mso-pattern: auto none; | ||
544 | + background: #c6efce; | ||
545 | + color: #006100; | ||
546 | + font-size: 11px; | ||
547 | + font-weight: 400; | ||
548 | + font-style: normal; | ||
549 | + text-decoration: none; | ||
550 | + font-family: "微软雅黑", sans-serif; | ||
551 | + ////mso-generic-font-family: auto; | ||
552 | + //mso-font-charset: 134; | ||
553 | + //mso-style-name: "好"; | ||
554 | + } | ||
555 | + | ||
556 | + .style38 { | ||
557 | + ////mso-pattern: auto none; | ||
558 | + background: #ffc7ce; | ||
559 | + color: #9c0006; | ||
560 | + font-size: 11px; | ||
561 | + font-weight: 400; | ||
562 | + font-style: normal; | ||
563 | + text-decoration: none; | ||
564 | + font-family: "微软雅黑", sans-serif; | ||
565 | + ////mso-generic-font-family: auto; | ||
566 | + //mso-font-charset: 134; | ||
567 | + //mso-style-name: "差"; | ||
568 | + } | ||
569 | + | ||
570 | + .style39 { | ||
571 | + ////mso-pattern: auto none; | ||
572 | + background: #ffeb9c; | ||
573 | + color: #9c6500; | ||
574 | + font-size: 11px; | ||
575 | + font-weight: 400; | ||
576 | + font-style: normal; | ||
577 | + text-decoration: none; | ||
578 | + font-family: "微软雅黑", sans-serif; | ||
579 | + ////mso-generic-font-family: auto; | ||
580 | + //mso-font-charset: 134; | ||
581 | + //mso-style-name: "适中"; | ||
582 | + } | ||
583 | + | ||
584 | + .style40 { | ||
585 | + ////mso-pattern: auto none; | ||
586 | + background: #5b9bd5; | ||
587 | + color: #fff; | ||
588 | + font-size: 11px; | ||
589 | + font-weight: 400; | ||
590 | + font-style: normal; | ||
591 | + text-decoration: none; | ||
592 | + font-family: "微软雅黑", sans-serif; | ||
593 | + ////mso-generic-font-family: auto; | ||
594 | + //mso-font-charset: 134; | ||
595 | + //mso-style-name: "强调文字颜色 1"; | ||
596 | + } | ||
597 | + | ||
598 | + .style41 { | ||
599 | + ////mso-pattern: auto none; | ||
600 | + background: #ddebf7; | ||
601 | + color: #000; | ||
602 | + font-size: 11px; | ||
603 | + font-weight: 400; | ||
604 | + font-style: normal; | ||
605 | + text-decoration: none; | ||
606 | + font-family: "微软雅黑", sans-serif; | ||
607 | + ////mso-generic-font-family: auto; | ||
608 | + //mso-font-charset: 134; | ||
609 | + //mso-style-name: "20% - 强调文字颜色 1"; | ||
610 | + } | ||
611 | + | ||
612 | + .style42 { | ||
613 | + ////mso-pattern: auto none; | ||
614 | + background: #bdd7ee; | ||
615 | + color: #000; | ||
616 | + font-size: 11px; | ||
617 | + font-weight: 400; | ||
618 | + font-style: normal; | ||
619 | + text-decoration: none; | ||
620 | + font-family: "微软雅黑", sans-serif; | ||
621 | + ////mso-generic-font-family: auto; | ||
622 | + //mso-font-charset: 134; | ||
623 | + //mso-style-name: "40% - 强调文字颜色 1"; | ||
624 | + } | ||
625 | + | ||
626 | + .style43 { | ||
627 | + ////mso-pattern: auto none; | ||
628 | + background: #9bc2e6; | ||
629 | + color: #fff; | ||
630 | + font-size: 11px; | ||
631 | + font-weight: 400; | ||
632 | + font-style: normal; | ||
633 | + text-decoration: none; | ||
634 | + font-family: "微软雅黑", sans-serif; | ||
635 | + ////mso-generic-font-family: auto; | ||
636 | + //mso-font-charset: 134; | ||
637 | + //mso-style-name: "60% - 强调文字颜色 1"; | ||
638 | + } | ||
639 | + | ||
640 | + .style44 { | ||
641 | + ////mso-pattern: auto none; | ||
642 | + background: #ed7d31; | ||
643 | + color: #fff; | ||
644 | + font-size: 11px; | ||
645 | + font-weight: 400; | ||
646 | + font-style: normal; | ||
647 | + text-decoration: none; | ||
648 | + font-family: "微软雅黑", sans-serif; | ||
649 | + ////mso-generic-font-family: auto; | ||
650 | + //mso-font-charset: 134; | ||
651 | + //mso-style-name: "强调文字颜色 2"; | ||
652 | + } | ||
653 | + | ||
654 | + .style45 { | ||
655 | + ////mso-pattern: auto none; | ||
656 | + background: #fce4d6; | ||
657 | + color: #000; | ||
658 | + font-size: 11px; | ||
659 | + font-weight: 400; | ||
660 | + font-style: normal; | ||
661 | + text-decoration: none; | ||
662 | + font-family: "微软雅黑", sans-serif; | ||
663 | + ////mso-generic-font-family: auto; | ||
664 | + //mso-font-charset: 134; | ||
665 | + //mso-style-name: "20% - 强调文字颜色 2"; | ||
666 | + } | ||
667 | + | ||
668 | + .style46 { | ||
669 | + ////mso-pattern: auto none; | ||
670 | + background: #f8cbad; | ||
671 | + color: #000; | ||
672 | + font-size: 11px; | ||
673 | + font-weight: 400; | ||
674 | + font-style: normal; | ||
675 | + text-decoration: none; | ||
676 | + font-family: "微软雅黑", sans-serif; | ||
677 | + ////mso-generic-font-family: auto; | ||
678 | + //mso-font-charset: 134; | ||
679 | + //mso-style-name: "40% - 强调文字颜色 2"; | ||
680 | + } | ||
681 | + | ||
682 | + .style47 { | ||
683 | + ////mso-pattern: auto none; | ||
684 | + background: #f4b084; | ||
685 | + color: #fff; | ||
686 | + font-size: 11px; | ||
687 | + font-weight: 400; | ||
688 | + font-style: normal; | ||
689 | + text-decoration: none; | ||
690 | + font-family: "微软雅黑", sans-serif; | ||
691 | + ////mso-generic-font-family: auto; | ||
692 | + //mso-font-charset: 134; | ||
693 | + //mso-style-name: "60% - 强调文字颜色 2"; | ||
694 | + } | ||
695 | + | ||
696 | + .style48 { | ||
697 | + //mso-pattern: auto none; | ||
698 | + background: #a5a5a5; | ||
699 | + color: #fff; | ||
700 | + font-size: 11px; | ||
701 | + font-weight: 400; | ||
702 | + font-style: normal; | ||
703 | + text-decoration: none; | ||
704 | + font-family: "微软雅黑", sans-serif; | ||
705 | + ////mso-generic-font-family: auto; | ||
706 | + //mso-font-charset: 134; | ||
707 | + //mso-style-name: "强调文字颜色 3"; | ||
708 | + } | ||
709 | + | ||
710 | + .style49 { | ||
711 | + //mso-pattern: auto none; | ||
712 | + background: #ededed; | ||
713 | + color: #000; | ||
714 | + font-size: 11px; | ||
715 | + font-weight: 400; | ||
716 | + font-style: normal; | ||
717 | + text-decoration: none; | ||
718 | + font-family: "微软雅黑", sans-serif; | ||
719 | + ////mso-generic-font-family: auto; | ||
720 | + //mso-font-charset: 134; | ||
721 | + //mso-style-name: "20% - 强调文字颜色 3"; | ||
722 | + } | ||
723 | + | ||
724 | + .style50 { | ||
725 | + //mso-pattern: auto none; | ||
726 | + background: #dbdbdb; | ||
727 | + color: #000; | ||
728 | + font-size: 11px; | ||
729 | + font-weight: 400; | ||
730 | + font-style: normal; | ||
731 | + text-decoration: none; | ||
732 | + font-family: "微软雅黑", sans-serif; | ||
733 | + ////mso-generic-font-family: auto; | ||
734 | + //mso-font-charset: 134; | ||
735 | + //mso-style-name: "40% - 强调文字颜色 3"; | ||
736 | + } | ||
737 | + | ||
738 | + .style51 { | ||
739 | + //mso-pattern: auto none; | ||
740 | + background: #c9c9c9; | ||
741 | + color: #fff; | ||
742 | + font-size: 11px; | ||
743 | + font-weight: 400; | ||
744 | + font-style: normal; | ||
745 | + text-decoration: none; | ||
746 | + font-family: "微软雅黑", sans-serif; | ||
747 | + ////mso-generic-font-family: auto; | ||
748 | + //mso-font-charset: 134; | ||
749 | + //mso-style-name: "60% - 强调文字颜色 3"; | ||
750 | + } | ||
751 | + | ||
752 | + .style52 { | ||
753 | + //mso-pattern: auto none; | ||
754 | + background: #ffc000; | ||
755 | + color: #fff; | ||
756 | + font-size: 11px; | ||
757 | + font-weight: 400; | ||
758 | + font-style: normal; | ||
759 | + text-decoration: none; | ||
760 | + font-family: "微软雅黑", sans-serif; | ||
761 | + ////mso-generic-font-family: auto; | ||
762 | + //mso-font-charset: 134; | ||
763 | + //mso-style-name: "强调文字颜色 4"; | ||
764 | + } | ||
765 | + | ||
766 | + .style53 { | ||
767 | + //mso-pattern: auto none; | ||
768 | + background: #fff2cc; | ||
769 | + color: #000; | ||
770 | + font-size: 11px; | ||
771 | + font-weight: 400; | ||
772 | + font-style: normal; | ||
773 | + text-decoration: none; | ||
774 | + font-family: "微软雅黑", sans-serif; | ||
775 | + ////mso-generic-font-family: auto; | ||
776 | + //mso-font-charset: 134; | ||
777 | + //mso-style-name: "20% - 强调文字颜色 4"; | ||
778 | + } | ||
779 | + | ||
780 | + .style54 { | ||
781 | + //mso-pattern: auto none; | ||
782 | + background: #ffe699; | ||
783 | + color: #000; | ||
784 | + font-size: 11px; | ||
785 | + font-weight: 400; | ||
786 | + font-style: normal; | ||
787 | + text-decoration: none; | ||
788 | + font-family: "微软雅黑", sans-serif; | ||
789 | + ////mso-generic-font-family: auto; | ||
790 | + //mso-font-charset: 134; | ||
791 | + //mso-style-name: "40% - 强调文字颜色 4"; | ||
792 | + } | ||
793 | + | ||
794 | + .style55 { | ||
795 | + //mso-pattern: auto none; | ||
796 | + background: #ffd966; | ||
797 | + color: #fff; | ||
798 | + font-size: 11px; | ||
799 | + font-weight: 400; | ||
800 | + font-style: normal; | ||
801 | + text-decoration: none; | ||
802 | + font-family: "微软雅黑", sans-serif; | ||
803 | + ////mso-generic-font-family: auto; | ||
804 | + //mso-font-charset: 134; | ||
805 | + //mso-style-name: "60% - 强调文字颜色 4"; | ||
806 | + } | ||
807 | + | ||
808 | + .style56 { | ||
809 | + //mso-pattern: auto none; | ||
810 | + background: #4472c4; | ||
811 | + color: #fff; | ||
812 | + font-size: 11px; | ||
813 | + font-weight: 400; | ||
814 | + font-style: normal; | ||
815 | + text-decoration: none; | ||
816 | + font-family: "微软雅黑", sans-serif; | ||
817 | + ////mso-generic-font-family: auto; | ||
818 | + //mso-font-charset: 134; | ||
819 | + //mso-style-name: "强调文字颜色 5"; | ||
820 | + } | ||
821 | + | ||
822 | + .style57 { | ||
823 | + //mso-pattern: auto none; | ||
824 | + background: #d9e1f2; | ||
825 | + color: #000; | ||
826 | + font-size: 11px; | ||
827 | + font-weight: 400; | ||
828 | + font-style: normal; | ||
829 | + text-decoration: none; | ||
830 | + font-family: "微软雅黑", sans-serif; | ||
831 | + ////mso-generic-font-family: auto; | ||
832 | + //mso-font-charset: 134; | ||
833 | + //mso-style-name: "20% - 强调文字颜色 5"; | ||
834 | + } | ||
835 | + | ||
836 | + .style58 { | ||
837 | + //mso-pattern: auto none; | ||
838 | + background: #b4c6e7; | ||
839 | + color: #000; | ||
840 | + font-size: 11px; | ||
841 | + font-weight: 400; | ||
842 | + font-style: normal; | ||
843 | + text-decoration: none; | ||
844 | + font-family: "微软雅黑", sans-serif; | ||
845 | + ////mso-generic-font-family: auto; | ||
846 | + //mso-font-charset: 134; | ||
847 | + //mso-style-name: "40% - 强调文字颜色 5"; | ||
848 | + } | ||
849 | + | ||
850 | + .style59 { | ||
851 | + //mso-pattern: auto none; | ||
852 | + background: #8ea9db; | ||
853 | + color: #fff; | ||
854 | + font-size: 11px; | ||
855 | + font-weight: 400; | ||
856 | + font-style: normal; | ||
857 | + text-decoration: none; | ||
858 | + font-family: "微软雅黑", sans-serif; | ||
859 | + ////mso-generic-font-family: auto; | ||
860 | + //mso-font-charset: 134; | ||
861 | + //mso-style-name: "60% - 强调文字颜色 5"; | ||
862 | + } | ||
863 | + | ||
864 | + .style60 { | ||
865 | + //mso-pattern: auto none; | ||
866 | + background: #70ad47; | ||
867 | + color: #fff; | ||
868 | + font-size: 11px; | ||
869 | + font-weight: 400; | ||
870 | + font-style: normal; | ||
871 | + text-decoration: none; | ||
872 | + font-family: "微软雅黑", sans-serif; | ||
873 | + ////mso-generic-font-family: auto; | ||
874 | + //mso-font-charset: 134; | ||
875 | + //mso-style-name: "强调文字颜色 6"; | ||
876 | + } | ||
877 | + | ||
878 | + .style61 { | ||
879 | + //mso-pattern: auto none; | ||
880 | + background: #e2efda; | ||
881 | + color: #000; | ||
882 | + font-size: 11px; | ||
883 | + font-weight: 400; | ||
884 | + font-style: normal; | ||
885 | + text-decoration: none; | ||
886 | + font-family: "微软雅黑", sans-serif; | ||
887 | + ////mso-generic-font-family: auto; | ||
888 | + //mso-font-charset: 134; | ||
889 | + //mso-style-name: "20% - 强调文字颜色 6"; | ||
890 | + } | ||
891 | + | ||
892 | + .style62 { | ||
893 | + //mso-pattern: auto none; | ||
894 | + background: #c6e0b4; | ||
895 | + color: #000; | ||
896 | + font-size: 11px; | ||
897 | + font-weight: 400; | ||
898 | + font-style: normal; | ||
899 | + text-decoration: none; | ||
900 | + font-family: "微软雅黑", sans-serif; | ||
901 | + ////mso-generic-font-family: auto; | ||
902 | + //mso-font-charset: 134; | ||
903 | + //mso-style-name: "40% - 强调文字颜色 6"; | ||
904 | + } | ||
905 | + | ||
906 | + .style63 { | ||
907 | + //mso-pattern: auto none; | ||
908 | + background: #a9d08e; | ||
909 | + color: #fff; | ||
910 | + font-size: 11px; | ||
911 | + font-weight: 400; | ||
912 | + font-style: normal; | ||
913 | + text-decoration: none; | ||
914 | + font-family: "微软雅黑", sans-serif; | ||
915 | + ////mso-generic-font-family: auto; | ||
916 | + ////mso-font-charset: 134; | ||
917 | + //mso-style-name: "60% - 强调文字颜色 6"; | ||
918 | + } | ||
919 | + | ||
920 | + td { | ||
921 | + //mso-style-parent: style0; | ||
922 | + padding-top: 1px; | ||
923 | + padding-right: 1px; | ||
924 | + padding-left: 1px; | ||
925 | + // mso-ignore: padding; | ||
926 | + //mso-number-format: "General"; | ||
927 | + text-align: general; | ||
928 | + vertical-align: middle; | ||
929 | + white-space: nowrap; | ||
930 | + // mso-rotate: 0; | ||
931 | + //mso-pattern: auto; | ||
932 | + // mso-background-source: auto; | ||
933 | + color: windowtext; | ||
934 | + | ||
935 | + font-weight: 400; | ||
936 | + font-style: normal; | ||
937 | + text-decoration: none; | ||
938 | + font-family: "微软雅黑", sans-serif; | ||
939 | + //mso-generic-font-family: auto; | ||
940 | + ////mso-font-charset: 134; | ||
941 | + border: none; | ||
942 | + //mso-protection: locked visible; | ||
943 | + } | ||
944 | + | ||
945 | + .xl65 { | ||
946 | + //mso-style-parent: style0; | ||
947 | + text-align: center; | ||
948 | + font-size: 16.5pt; | ||
949 | + ////mso-font-charset: 134; | ||
950 | + } | ||
951 | + | ||
952 | + .xl66 { | ||
953 | + //mso-style-parent: style0; | ||
954 | + text-align: center; | ||
955 | + font-size: 10.5pt; | ||
956 | + ////mso-font-charset: 134; | ||
957 | + } | ||
958 | + | ||
959 | + .xl67 { | ||
960 | + //mso-style-parent: style0; | ||
961 | + text-align: center; | ||
962 | + font-size: 13.5pt; | ||
963 | + //mso-font-charset: 134; | ||
964 | + } | ||
965 | + | ||
966 | + .xl68 { | ||
967 | + //mso-style-parent: style0; | ||
968 | + text-align: center; | ||
969 | + font-size: 10.5pt; | ||
970 | + //mso-font-charset: 134; | ||
971 | + } | ||
972 | + | ||
973 | + .xl69 { | ||
974 | + //mso-style-parent: style0; | ||
975 | + text-align: left; | ||
976 | + font-size: 10.5pt; | ||
977 | + //mso-font-charset: 134; | ||
978 | + } | ||
979 | + | ||
980 | + .xl70 { | ||
981 | + //mso-style-parent: style0; | ||
982 | + text-align: left; | ||
983 | + font-size: 8px; | ||
984 | + //mso-font-charset: 134; | ||
985 | + } | ||
986 | + | ||
987 | + .xl71 { | ||
988 | + //mso-style-parent: style0; | ||
989 | + text-align: center; | ||
990 | + font-size: 10.5pt; | ||
991 | + //mso-font-charset: 134; | ||
992 | + border: 0.5px solid windowtext; | ||
993 | + } | ||
994 | + | ||
995 | + .xl72 { | ||
996 | + //mso-style-parent: style0; | ||
997 | + text-align: center; | ||
998 | + font-size: 10.5pt; | ||
999 | + //mso-font-charset: 134; | ||
1000 | + border: 0.5px solid windowtext; | ||
1001 | + white-space: normal; | ||
1002 | + } | ||
1003 | + | ||
1004 | + .xl73 { | ||
1005 | + //mso-style-parent: style0; | ||
1006 | + white-space: normal; | ||
1007 | + font-size: 10.5pt; | ||
1008 | + //mso-font-charset: 134; | ||
1009 | + border: 0.5px solid windowtext; | ||
1010 | + } | ||
1011 | + | ||
1012 | + .xl74 { | ||
1013 | + //mso-style-parent: style0; | ||
1014 | + text-align: center; | ||
1015 | + white-space: normal; | ||
1016 | + font-size: 10.5pt; | ||
1017 | + //mso-font-charset: 134; | ||
1018 | + border: 0.5px solid windowtext; | ||
1019 | + } | ||
1020 | + | ||
1021 | + .xl75 { | ||
1022 | + //mso-style-parent: style0; | ||
1023 | + text-align: center; | ||
1024 | + white-space: normal; | ||
1025 | + font-size: 8px; | ||
1026 | + //mso-font-charset: 134; | ||
1027 | + border: 0.5px solid windowtext; | ||
1028 | + } | ||
1029 | + | ||
1030 | + .xl76 { | ||
1031 | + //mso-style-parent: style0; | ||
1032 | + font-size: 10.5pt; | ||
1033 | + //mso-font-charset: 134; | ||
1034 | + } | ||
1035 | + | ||
1036 | + .xl77 { | ||
1037 | + //mso-style-parent: style0; | ||
1038 | + font-size: 8px; | ||
1039 | + //mso-font-charset: 134; | ||
1040 | + } | ||
1041 | + | ||
1042 | + .xl78 { | ||
1043 | + //mso-style-parent: style0; | ||
1044 | + text-align: center; | ||
1045 | + font-size: 10.5pt; | ||
1046 | + //mso-font-charset: 134; | ||
1047 | + } | ||
1048 | + `; | ||
1049 | +} |
src/pages/OrderPrint/components/DalangPrinter.tsx
1 | import '@/pages/OrderPrint/index.less'; | 1 | import '@/pages/OrderPrint/index.less'; |
2 | -import { formatDateTime } from '@/utils'; | 2 | +import { formatDateTime, formatSalesCode } from '@/utils'; |
3 | 3 | ||
4 | export default ({ mainOrder, subOrders }) => { | 4 | export default ({ mainOrder, subOrders }) => { |
5 | - console.log(subOrders); | 5 | + //业务员:英文名称(销售代码) |
6 | + let salesCode = mainOrder.salesCode; | ||
7 | + salesCode = formatSalesCode(salesCode); | ||
8 | + //订单总额计算 | ||
9 | + let totalPayment = 0; | ||
10 | + for (let order of subOrders) { | ||
11 | + let subOrderPayment = order.subOrderPayment; | ||
12 | + totalPayment += subOrderPayment === undefined ? 0 : subOrderPayment; | ||
13 | + } | ||
6 | let columns = []; | 14 | let columns = []; |
7 | for (let i = 0; i < subOrders.length; i++) { | 15 | for (let i = 0; i < subOrders.length; i++) { |
8 | let subOrder = subOrders[i]; | 16 | let subOrder = subOrders[i]; |
@@ -81,9 +89,7 @@ export default ({ mainOrder, subOrders }) => { | @@ -81,9 +89,7 @@ export default ({ mainOrder, subOrders }) => { | ||
81 | <col width="57" /> | 89 | <col width="57" /> |
82 | <col width="57" /> | 90 | <col width="57" /> |
83 | <col width="57" /> | 91 | <col width="57" /> |
84 | - <tr height="42" style={{ height: '21.00pt' }}></tr> | ||
85 | - <tr height="42" style={{ height: '21.00pt' }}></tr> | ||
86 | - <tr height="42" style={{ height: '21.00pt' }}></tr> | 92 | + <tr height="42" style={{ height: '15.00pt' }}></tr> |
87 | <tr height="42" style={{ height: '21.00pt' }}> | 93 | <tr height="42" style={{ height: '21.00pt' }}> |
88 | <td height="42" colSpan={5} style={{ height: '21.00pt' }}></td> | 94 | <td height="42" colSpan={5} style={{ height: '21.00pt' }}></td> |
89 | <td | 95 | <td |
@@ -241,7 +247,7 @@ export default ({ mainOrder, subOrders }) => { | @@ -241,7 +247,7 @@ export default ({ mainOrder, subOrders }) => { | ||
241 | borderBottom: '0.5pt solid windowtext', | 247 | borderBottom: '0.5pt solid windowtext', |
242 | }} | 248 | }} |
243 | > | 249 | > |
244 | - 199 | 250 | + {totalPayment} |
245 | </td> | 251 | </td> |
246 | </tr> | 252 | </tr> |
247 | 253 | ||
@@ -323,7 +329,7 @@ export default ({ mainOrder, subOrders }) => { | @@ -323,7 +329,7 @@ export default ({ mainOrder, subOrders }) => { | ||
323 | colSpan={4} | 329 | colSpan={4} |
324 | style={{ borderRight: 'none', borderBottom: 'none' }} | 330 | style={{ borderRight: 'none', borderBottom: 'none' }} |
325 | > | 331 | > |
326 | - 业务员:Linda | 332 | + 业务员:{salesCode} |
327 | </td> | 333 | </td> |
328 | <td | 334 | <td |
329 | className="xl78" | 335 | className="xl78" |
src/pages/OrderPrint/components/HoujiePrinter.tsx
1 | import '@/pages/OrderPrint/index.less'; | 1 | import '@/pages/OrderPrint/index.less'; |
2 | -import { formatDateTime } from '@/utils'; | 2 | +import { formatDateTime, formatSalesCode } from '@/utils'; |
3 | 3 | ||
4 | export default ({ mainOrder, subOrders }) => { | 4 | export default ({ mainOrder, subOrders }) => { |
5 | - console.log(subOrders); | 5 | + //业务员:英文名称(销售代码) |
6 | + let salesCode = mainOrder.salesCode; | ||
7 | + salesCode = formatSalesCode(salesCode); | ||
6 | let columns = []; | 8 | let columns = []; |
7 | for (let i = 0; i < subOrders.length; i++) { | 9 | for (let i = 0; i < subOrders.length; i++) { |
8 | let subOrder = subOrders[i]; | 10 | let subOrder = subOrders[i]; |
@@ -225,7 +227,7 @@ export default ({ mainOrder, subOrders }) => { | @@ -225,7 +227,7 @@ export default ({ mainOrder, subOrders }) => { | ||
225 | colSpan={2} | 227 | colSpan={2} |
226 | style={{ borderRight: 'none', borderBottom: 'none' }} | 228 | style={{ borderRight: 'none', borderBottom: 'none' }} |
227 | > | 229 | > |
228 | - 业务员:Peter | 230 | + 业务员:{salesCode} |
229 | </td> | 231 | </td> |
230 | <td | 232 | <td |
231 | className="xl78" | 233 | className="xl78" |
src/pages/OrderPrint/components/ZhuguangPrinter.tsx
1 | import '@/pages/OrderPrint/index.less'; | 1 | import '@/pages/OrderPrint/index.less'; |
2 | -import { formatDateTime } from '@/utils'; | 2 | +import { formatDateTime, formatSalesCode } from '@/utils'; |
3 | 3 | ||
4 | export default ({ mainOrder, subOrders }) => { | 4 | export default ({ mainOrder, subOrders }) => { |
5 | - console.log(subOrders); | 5 | + //合计数量 |
6 | + let totalQuantity = 0; | ||
7 | + //业务员:英文名称(销售代码) | ||
8 | + let salesCode = mainOrder.salesCode; | ||
9 | + salesCode = formatSalesCode(salesCode); | ||
10 | + for (let order of subOrders) { | ||
11 | + let subOrderQuantity = parseInt(order.quantity); | ||
12 | + totalQuantity += subOrderQuantity === undefined ? 0 : subOrderQuantity; | ||
13 | + } | ||
6 | let columns = []; | 14 | let columns = []; |
7 | for (let i = 0; i < subOrders.length; i++) { | 15 | for (let i = 0; i < subOrders.length; i++) { |
8 | let subOrder = subOrders[i]; | 16 | let subOrder = subOrders[i]; |
@@ -73,9 +81,7 @@ export default ({ mainOrder, subOrders }) => { | @@ -73,9 +81,7 @@ export default ({ mainOrder, subOrders }) => { | ||
73 | <col width="57" /> | 81 | <col width="57" /> |
74 | <col width="57" /> | 82 | <col width="57" /> |
75 | <col width="57" /> | 83 | <col width="57" /> |
76 | - <tr height="42" style={{ height: '21.00pt' }}></tr> | ||
77 | - <tr height="42" style={{ height: '21.00pt' }}></tr> | ||
78 | - <tr height="42" style={{ height: '21.00pt' }}></tr> | 84 | + <tr height="42" style={{ height: '15.00pt' }}></tr> |
79 | <tr height="42" style={{ height: '21.00pt' }}> | 85 | <tr height="42" style={{ height: '21.00pt' }}> |
80 | <td height="42" colSpan={5} style={{ height: '21.00pt' }}></td> | 86 | <td height="42" colSpan={5} style={{ height: '21.00pt' }}></td> |
81 | <td | 87 | <td |
@@ -226,7 +232,7 @@ export default ({ mainOrder, subOrders }) => { | @@ -226,7 +232,7 @@ export default ({ mainOrder, subOrders }) => { | ||
226 | borderBottom: '0.5pt solid windowtext', | 232 | borderBottom: '0.5pt solid windowtext', |
227 | }} | 233 | }} |
228 | > | 234 | > |
229 | - 199 | 235 | + {totalQuantity} |
230 | </td> | 236 | </td> |
231 | </tr> | 237 | </tr> |
232 | 238 | ||
@@ -308,7 +314,7 @@ export default ({ mainOrder, subOrders }) => { | @@ -308,7 +314,7 @@ export default ({ mainOrder, subOrders }) => { | ||
308 | colSpan={4} | 314 | colSpan={4} |
309 | style={{ borderRight: 'none', borderBottom: 'none' }} | 315 | style={{ borderRight: 'none', borderBottom: 'none' }} |
310 | > | 316 | > |
311 | - 业务员:Tina | 317 | + 业务员:{salesCode} |
312 | </td> | 318 | </td> |
313 | <td | 319 | <td |
314 | className="xl78" | 320 | className="xl78" |
src/pages/OrderPrint/index.less
@@ -11,17 +11,6 @@ col { | @@ -11,17 +11,6 @@ col { | ||
11 | br { | 11 | br { |
12 | // mso-data-placement: same-cell; | 12 | // mso-data-placement: same-cell; |
13 | } | 13 | } |
14 | -@media print { | ||
15 | - body { | ||
16 | - color: black; | ||
17 | - } | ||
18 | - .printed-text { | ||
19 | - color: #333; | ||
20 | - } | ||
21 | - .printed-background { | ||
22 | - background-color: #fff; | ||
23 | - } | ||
24 | -} | ||
25 | 14 | ||
26 | .font0 { | 15 | .font0 { |
27 | color: windowtext; | 16 | color: windowtext; |
src/services/definition.ts
@@ -365,6 +365,10 @@ export interface DictionaryVO { | @@ -365,6 +365,10 @@ export interface DictionaryVO { | ||
365 | sort?: number; | 365 | sort?: number; |
366 | } | 366 | } |
367 | 367 | ||
368 | +export interface FilePathDto { | ||
369 | + url?: string; | ||
370 | +} | ||
371 | + | ||
368 | export interface ModelAndView { | 372 | export interface ModelAndView { |
369 | empty?: boolean; | 373 | empty?: boolean; |
370 | model?: any; | 374 | model?: any; |
@@ -700,6 +704,28 @@ export interface ProductInformationDto { | @@ -700,6 +704,28 @@ export interface ProductInformationDto { | ||
700 | productName?: string; | 704 | productName?: string; |
701 | } | 705 | } |
702 | 706 | ||
707 | +export interface QueryAnnexDto { | ||
708 | + /** | ||
709 | + * @description | ||
710 | + * 附件集合 | ||
711 | + */ | ||
712 | + filePaths?: Array<FilePathDto>; | ||
713 | + /** | ||
714 | + * @description | ||
715 | + * 子订单id | ||
716 | + * @format int64 | ||
717 | + */ | ||
718 | + subId?: number; | ||
719 | +} | ||
720 | + | ||
721 | +export interface QueryMainOrderDto { | ||
722 | + /** | ||
723 | + * @description | ||
724 | + * 收货人姓名 | ||
725 | + */ | ||
726 | + customerName?: string; | ||
727 | +} | ||
728 | + | ||
703 | export interface ResetPwdVO { | 729 | export interface ResetPwdVO { |
704 | /** @format int64 */ | 730 | /** @format int64 */ |
705 | userId?: number; | 731 | userId?: number; |
@@ -757,6 +783,11 @@ export interface Dto { | @@ -757,6 +783,11 @@ export interface Dto { | ||
757 | collectMoneyTime?: string; | 783 | collectMoneyTime?: string; |
758 | /** | 784 | /** |
759 | * @description | 785 | * @description |
786 | + * 财务备注 | ||
787 | + */ | ||
788 | + invoicingNotes?: string; | ||
789 | + /** | ||
790 | + * @description | ||
760 | * 子订单id集合 | 791 | * 子订单id集合 |
761 | */ | 792 | */ |
762 | subIds?: Array<number>; | 793 | subIds?: Array<number>; |
src/services/order.ts
1 | import axios from 'axios'; | 1 | import axios from 'axios'; |
2 | 2 | ||
3 | export const orderExport = async ( | 3 | export const orderExport = async ( |
4 | + url: any = '', | ||
4 | data: any = {}, | 5 | data: any = {}, |
5 | exportLoadingDestory: any, | 6 | exportLoadingDestory: any, |
6 | ) => { | 7 | ) => { |
7 | axios({ | 8 | axios({ |
8 | - url: '/api/service/order/export', | 9 | + url: url, |
9 | method: 'post', | 10 | method: 'post', |
10 | responseType: 'blob', | 11 | responseType: 'blob', |
11 | headers: { Authorization: localStorage.getItem('token') }, | 12 | headers: { Authorization: localStorage.getItem('token') }, |
src/services/request.ts
@@ -35,6 +35,8 @@ import type { | @@ -35,6 +35,8 @@ import type { | ||
35 | OrderUnlockFieldApplyVO, | 35 | OrderUnlockFieldApplyVO, |
36 | OrderUpdateVO, | 36 | OrderUpdateVO, |
37 | ProductInformationDto, | 37 | ProductInformationDto, |
38 | + QueryAnnexDto, | ||
39 | + QueryMainOrderDto, | ||
38 | ResetPwdVO, | 40 | ResetPwdVO, |
39 | ServerResult, | 41 | ServerResult, |
40 | SysLogQueryVO, | 42 | SysLogQueryVO, |
@@ -5150,6 +5152,77 @@ export const postServiceOrderEditOrder = /* #__PURE__ */ (() => { | @@ -5150,6 +5152,77 @@ export const postServiceOrderEditOrder = /* #__PURE__ */ (() => { | ||
5150 | return request; | 5152 | return request; |
5151 | })(); | 5153 | })(); |
5152 | 5154 | ||
5155 | +/** @description request parameter type for postServiceOrderErrorExcelInformation */ | ||
5156 | +export interface PostServiceOrderErrorExcelInformationOption { | ||
5157 | + /** | ||
5158 | + * @description | ||
5159 | + * file | ||
5160 | + */ | ||
5161 | + formData: { | ||
5162 | + /** | ||
5163 | + @description | ||
5164 | + file */ | ||
5165 | + file: File; | ||
5166 | + }; | ||
5167 | +} | ||
5168 | + | ||
5169 | +/** @description response type for postServiceOrderErrorExcelInformation */ | ||
5170 | +export interface PostServiceOrderErrorExcelInformationResponse { | ||
5171 | + /** | ||
5172 | + * @description | ||
5173 | + * OK | ||
5174 | + */ | ||
5175 | + 200: ServerResult; | ||
5176 | + /** | ||
5177 | + * @description | ||
5178 | + * Created | ||
5179 | + */ | ||
5180 | + 201: any; | ||
5181 | + /** | ||
5182 | + * @description | ||
5183 | + * Unauthorized | ||
5184 | + */ | ||
5185 | + 401: any; | ||
5186 | + /** | ||
5187 | + * @description | ||
5188 | + * Forbidden | ||
5189 | + */ | ||
5190 | + 403: any; | ||
5191 | + /** | ||
5192 | + * @description | ||
5193 | + * Not Found | ||
5194 | + */ | ||
5195 | + 404: any; | ||
5196 | +} | ||
5197 | + | ||
5198 | +export type PostServiceOrderErrorExcelInformationResponseSuccess = | ||
5199 | + PostServiceOrderErrorExcelInformationResponse[200]; | ||
5200 | +/** | ||
5201 | + * @description | ||
5202 | + * 错误表格导入 | ||
5203 | + * @tags 内部订单 | ||
5204 | + * @produces * | ||
5205 | + * @consumes multipart/form-data | ||
5206 | + */ | ||
5207 | +export const postServiceOrderErrorExcelInformation = /* #__PURE__ */ (() => { | ||
5208 | + const method = 'post'; | ||
5209 | + const url = '/service/order/errorExcelInformation'; | ||
5210 | + function request( | ||
5211 | + option: PostServiceOrderErrorExcelInformationOption, | ||
5212 | + ): Promise<PostServiceOrderErrorExcelInformationResponseSuccess> { | ||
5213 | + return requester(request.url, { | ||
5214 | + method: request.method, | ||
5215 | + ...option, | ||
5216 | + }) as unknown as Promise<PostServiceOrderErrorExcelInformationResponseSuccess>; | ||
5217 | + } | ||
5218 | + | ||
5219 | + /** http method */ | ||
5220 | + request.method = method; | ||
5221 | + /** request url */ | ||
5222 | + request.url = url; | ||
5223 | + return request; | ||
5224 | +})(); | ||
5225 | + | ||
5153 | /** @description request parameter type for postServiceOrderExport */ | 5226 | /** @description request parameter type for postServiceOrderExport */ |
5154 | export interface PostServiceOrderExportOption { | 5227 | export interface PostServiceOrderExportOption { |
5155 | /** | 5228 | /** |
@@ -5221,6 +5294,202 @@ export const postServiceOrderExport = /* #__PURE__ */ (() => { | @@ -5221,6 +5294,202 @@ export const postServiceOrderExport = /* #__PURE__ */ (() => { | ||
5221 | return request; | 5294 | return request; |
5222 | })(); | 5295 | })(); |
5223 | 5296 | ||
5297 | +/** @description response type for postServiceOrderExportTemplate */ | ||
5298 | +export interface PostServiceOrderExportTemplateResponse { | ||
5299 | + /** | ||
5300 | + * @description | ||
5301 | + * OK | ||
5302 | + */ | ||
5303 | + 200: any; | ||
5304 | + /** | ||
5305 | + * @description | ||
5306 | + * Created | ||
5307 | + */ | ||
5308 | + 201: any; | ||
5309 | + /** | ||
5310 | + * @description | ||
5311 | + * Unauthorized | ||
5312 | + */ | ||
5313 | + 401: any; | ||
5314 | + /** | ||
5315 | + * @description | ||
5316 | + * Forbidden | ||
5317 | + */ | ||
5318 | + 403: any; | ||
5319 | + /** | ||
5320 | + * @description | ||
5321 | + * Not Found | ||
5322 | + */ | ||
5323 | + 404: any; | ||
5324 | +} | ||
5325 | + | ||
5326 | +export type PostServiceOrderExportTemplateResponseSuccess = | ||
5327 | + PostServiceOrderExportTemplateResponse[200]; | ||
5328 | +/** | ||
5329 | + * @description | ||
5330 | + * 下载模板 | ||
5331 | + * @tags 内部订单 | ||
5332 | + * @produces * | ||
5333 | + * @consumes application/json | ||
5334 | + */ | ||
5335 | +export const postServiceOrderExportTemplate = /* #__PURE__ */ (() => { | ||
5336 | + const method = 'post'; | ||
5337 | + const url = '/service/order/exportTemplate'; | ||
5338 | + function request(): Promise<PostServiceOrderExportTemplateResponseSuccess> { | ||
5339 | + return requester(request.url, { | ||
5340 | + method: request.method, | ||
5341 | + }) as unknown as Promise<PostServiceOrderExportTemplateResponseSuccess>; | ||
5342 | + } | ||
5343 | + | ||
5344 | + /** http method */ | ||
5345 | + request.method = method; | ||
5346 | + /** request url */ | ||
5347 | + request.url = url; | ||
5348 | + return request; | ||
5349 | +})(); | ||
5350 | + | ||
5351 | +/** @description request parameter type for postServiceOrderFileProcess */ | ||
5352 | +export interface PostServiceOrderFileProcessOption { | ||
5353 | + /** | ||
5354 | + * @description | ||
5355 | + * files | ||
5356 | + */ | ||
5357 | + formData: { | ||
5358 | + /** | ||
5359 | + @description | ||
5360 | + files */ | ||
5361 | + files: Array<File>; | ||
5362 | + }; | ||
5363 | +} | ||
5364 | + | ||
5365 | +/** @description response type for postServiceOrderFileProcess */ | ||
5366 | +export interface PostServiceOrderFileProcessResponse { | ||
5367 | + /** | ||
5368 | + * @description | ||
5369 | + * OK | ||
5370 | + */ | ||
5371 | + 200: ServerResult; | ||
5372 | + /** | ||
5373 | + * @description | ||
5374 | + * Created | ||
5375 | + */ | ||
5376 | + 201: any; | ||
5377 | + /** | ||
5378 | + * @description | ||
5379 | + * Unauthorized | ||
5380 | + */ | ||
5381 | + 401: any; | ||
5382 | + /** | ||
5383 | + * @description | ||
5384 | + * Forbidden | ||
5385 | + */ | ||
5386 | + 403: any; | ||
5387 | + /** | ||
5388 | + * @description | ||
5389 | + * Not Found | ||
5390 | + */ | ||
5391 | + 404: any; | ||
5392 | +} | ||
5393 | + | ||
5394 | +export type PostServiceOrderFileProcessResponseSuccess = | ||
5395 | + PostServiceOrderFileProcessResponse[200]; | ||
5396 | +/** | ||
5397 | + * @description | ||
5398 | + * 统一文件处理接口 | ||
5399 | + * @tags 内部订单 | ||
5400 | + * @produces * | ||
5401 | + * @consumes application/json | ||
5402 | + */ | ||
5403 | +export const postServiceOrderFileProcess = /* #__PURE__ */ (() => { | ||
5404 | + const method = 'post'; | ||
5405 | + const url = '/service/order/fileProcess'; | ||
5406 | + function request( | ||
5407 | + option: PostServiceOrderFileProcessOption, | ||
5408 | + ): Promise<PostServiceOrderFileProcessResponseSuccess> { | ||
5409 | + return requester(request.url, { | ||
5410 | + method: request.method, | ||
5411 | + ...option, | ||
5412 | + }) as unknown as Promise<PostServiceOrderFileProcessResponseSuccess>; | ||
5413 | + } | ||
5414 | + | ||
5415 | + /** http method */ | ||
5416 | + request.method = method; | ||
5417 | + /** request url */ | ||
5418 | + request.url = url; | ||
5419 | + return request; | ||
5420 | +})(); | ||
5421 | + | ||
5422 | +/** @description request parameter type for postServiceOrderImportExcel */ | ||
5423 | +export interface PostServiceOrderImportExcelOption { | ||
5424 | + /** | ||
5425 | + * @description | ||
5426 | + * file | ||
5427 | + */ | ||
5428 | + formData: { | ||
5429 | + /** | ||
5430 | + @description | ||
5431 | + file */ | ||
5432 | + file: File; | ||
5433 | + }; | ||
5434 | +} | ||
5435 | + | ||
5436 | +/** @description response type for postServiceOrderImportExcel */ | ||
5437 | +export interface PostServiceOrderImportExcelResponse { | ||
5438 | + /** | ||
5439 | + * @description | ||
5440 | + * OK | ||
5441 | + */ | ||
5442 | + 200: ServerResult; | ||
5443 | + /** | ||
5444 | + * @description | ||
5445 | + * Created | ||
5446 | + */ | ||
5447 | + 201: any; | ||
5448 | + /** | ||
5449 | + * @description | ||
5450 | + * Unauthorized | ||
5451 | + */ | ||
5452 | + 401: any; | ||
5453 | + /** | ||
5454 | + * @description | ||
5455 | + * Forbidden | ||
5456 | + */ | ||
5457 | + 403: any; | ||
5458 | + /** | ||
5459 | + * @description | ||
5460 | + * Not Found | ||
5461 | + */ | ||
5462 | + 404: any; | ||
5463 | +} | ||
5464 | + | ||
5465 | +export type PostServiceOrderImportExcelResponseSuccess = | ||
5466 | + PostServiceOrderImportExcelResponse[200]; | ||
5467 | +/** | ||
5468 | + * @description | ||
5469 | + * 表格导入 | ||
5470 | + * @tags 内部订单 | ||
5471 | + * @produces * | ||
5472 | + * @consumes multipart/form-data | ||
5473 | + */ | ||
5474 | +export const postServiceOrderImportExcel = /* #__PURE__ */ (() => { | ||
5475 | + const method = 'post'; | ||
5476 | + const url = '/service/order/importExcel'; | ||
5477 | + function request( | ||
5478 | + option: PostServiceOrderImportExcelOption, | ||
5479 | + ): Promise<PostServiceOrderImportExcelResponseSuccess> { | ||
5480 | + return requester(request.url, { | ||
5481 | + method: request.method, | ||
5482 | + ...option, | ||
5483 | + }) as unknown as Promise<PostServiceOrderImportExcelResponseSuccess>; | ||
5484 | + } | ||
5485 | + | ||
5486 | + /** http method */ | ||
5487 | + request.method = method; | ||
5488 | + /** request url */ | ||
5489 | + request.url = url; | ||
5490 | + return request; | ||
5491 | +})(); | ||
5492 | + | ||
5224 | /** @description request parameter type for postServiceOrderInvoicing */ | 5493 | /** @description request parameter type for postServiceOrderInvoicing */ |
5225 | export interface PostServiceOrderInvoicingOption { | 5494 | export interface PostServiceOrderInvoicingOption { |
5226 | /** | 5495 | /** |
@@ -5748,6 +6017,78 @@ export const getServiceOrderProvideToken = /* #__PURE__ */ (() => { | @@ -5748,6 +6017,78 @@ export const getServiceOrderProvideToken = /* #__PURE__ */ (() => { | ||
5748 | return request; | 6017 | return request; |
5749 | })(); | 6018 | })(); |
5750 | 6019 | ||
6020 | +/** @description request parameter type for postServiceOrderQueryCustomerNameInformation */ | ||
6021 | +export interface PostServiceOrderQueryCustomerNameInformationOption { | ||
6022 | + /** | ||
6023 | + * @description | ||
6024 | + * dto | ||
6025 | + */ | ||
6026 | + body: { | ||
6027 | + /** | ||
6028 | + @description | ||
6029 | + dto */ | ||
6030 | + dto: QueryMainOrderDto; | ||
6031 | + }; | ||
6032 | +} | ||
6033 | + | ||
6034 | +/** @description response type for postServiceOrderQueryCustomerNameInformation */ | ||
6035 | +export interface PostServiceOrderQueryCustomerNameInformationResponse { | ||
6036 | + /** | ||
6037 | + * @description | ||
6038 | + * OK | ||
6039 | + */ | ||
6040 | + 200: ServerResult; | ||
6041 | + /** | ||
6042 | + * @description | ||
6043 | + * Created | ||
6044 | + */ | ||
6045 | + 201: any; | ||
6046 | + /** | ||
6047 | + * @description | ||
6048 | + * Unauthorized | ||
6049 | + */ | ||
6050 | + 401: any; | ||
6051 | + /** | ||
6052 | + * @description | ||
6053 | + * Forbidden | ||
6054 | + */ | ||
6055 | + 403: any; | ||
6056 | + /** | ||
6057 | + * @description | ||
6058 | + * Not Found | ||
6059 | + */ | ||
6060 | + 404: any; | ||
6061 | +} | ||
6062 | + | ||
6063 | +export type PostServiceOrderQueryCustomerNameInformationResponseSuccess = | ||
6064 | + PostServiceOrderQueryCustomerNameInformationResponse[200]; | ||
6065 | +/** | ||
6066 | + * @description | ||
6067 | + * 根据收货人查询主订单信息 | ||
6068 | + * @tags 内部订单 | ||
6069 | + * @produces * | ||
6070 | + * @consumes application/json | ||
6071 | + */ | ||
6072 | +export const postServiceOrderQueryCustomerNameInformation = | ||
6073 | + /* #__PURE__ */ (() => { | ||
6074 | + const method = 'post'; | ||
6075 | + const url = '/service/order/queryCustomerNameInformation'; | ||
6076 | + function request( | ||
6077 | + option: PostServiceOrderQueryCustomerNameInformationOption, | ||
6078 | + ): Promise<PostServiceOrderQueryCustomerNameInformationResponseSuccess> { | ||
6079 | + return requester(request.url, { | ||
6080 | + method: request.method, | ||
6081 | + ...option, | ||
6082 | + }) as unknown as Promise<PostServiceOrderQueryCustomerNameInformationResponseSuccess>; | ||
6083 | + } | ||
6084 | + | ||
6085 | + /** http method */ | ||
6086 | + request.method = method; | ||
6087 | + /** request url */ | ||
6088 | + request.url = url; | ||
6089 | + return request; | ||
6090 | + })(); | ||
6091 | + | ||
5751 | /** @description request parameter type for postServiceOrderQueryProductInformation */ | 6092 | /** @description request parameter type for postServiceOrderQueryProductInformation */ |
5752 | export interface PostServiceOrderQueryProductInformationOption { | 6093 | export interface PostServiceOrderQueryProductInformationOption { |
5753 | /** | 6094 | /** |
@@ -5961,6 +6302,77 @@ export const postServiceOrderSendProduct = /* #__PURE__ */ (() => { | @@ -5961,6 +6302,77 @@ export const postServiceOrderSendProduct = /* #__PURE__ */ (() => { | ||
5961 | return request; | 6302 | return request; |
5962 | })(); | 6303 | })(); |
5963 | 6304 | ||
6305 | +/** @description request parameter type for postServiceOrderUpdateAnnex */ | ||
6306 | +export interface PostServiceOrderUpdateAnnexOption { | ||
6307 | + /** | ||
6308 | + * @description | ||
6309 | + * dto | ||
6310 | + */ | ||
6311 | + body: { | ||
6312 | + /** | ||
6313 | + @description | ||
6314 | + dto */ | ||
6315 | + dto: QueryAnnexDto; | ||
6316 | + }; | ||
6317 | +} | ||
6318 | + | ||
6319 | +/** @description response type for postServiceOrderUpdateAnnex */ | ||
6320 | +export interface PostServiceOrderUpdateAnnexResponse { | ||
6321 | + /** | ||
6322 | + * @description | ||
6323 | + * OK | ||
6324 | + */ | ||
6325 | + 200: ServerResult; | ||
6326 | + /** | ||
6327 | + * @description | ||
6328 | + * Created | ||
6329 | + */ | ||
6330 | + 201: any; | ||
6331 | + /** | ||
6332 | + * @description | ||
6333 | + * Unauthorized | ||
6334 | + */ | ||
6335 | + 401: any; | ||
6336 | + /** | ||
6337 | + * @description | ||
6338 | + * Forbidden | ||
6339 | + */ | ||
6340 | + 403: any; | ||
6341 | + /** | ||
6342 | + * @description | ||
6343 | + * Not Found | ||
6344 | + */ | ||
6345 | + 404: any; | ||
6346 | +} | ||
6347 | + | ||
6348 | +export type PostServiceOrderUpdateAnnexResponseSuccess = | ||
6349 | + PostServiceOrderUpdateAnnexResponse[200]; | ||
6350 | +/** | ||
6351 | + * @description | ||
6352 | + * 修改附件信息 | ||
6353 | + * @tags 内部订单 | ||
6354 | + * @produces * | ||
6355 | + * @consumes application/json | ||
6356 | + */ | ||
6357 | +export const postServiceOrderUpdateAnnex = /* #__PURE__ */ (() => { | ||
6358 | + const method = 'post'; | ||
6359 | + const url = '/service/order/updateAnnex'; | ||
6360 | + function request( | ||
6361 | + option: PostServiceOrderUpdateAnnexOption, | ||
6362 | + ): Promise<PostServiceOrderUpdateAnnexResponseSuccess> { | ||
6363 | + return requester(request.url, { | ||
6364 | + method: request.method, | ||
6365 | + ...option, | ||
6366 | + }) as unknown as Promise<PostServiceOrderUpdateAnnexResponseSuccess>; | ||
6367 | + } | ||
6368 | + | ||
6369 | + /** http method */ | ||
6370 | + request.method = method; | ||
6371 | + /** request url */ | ||
6372 | + request.url = url; | ||
6373 | + return request; | ||
6374 | +})(); | ||
6375 | + | ||
5964 | /** @description request parameter type for postServiceOrderUpdateOrder */ | 6376 | /** @description request parameter type for postServiceOrderUpdateOrder */ |
5965 | export interface PostServiceOrderUpdateOrderOption { | 6377 | export interface PostServiceOrderUpdateOrderOption { |
5966 | /** | 6378 | /** |
src/utils/index.ts
@@ -54,11 +54,95 @@ function formatDateTime(inputDateTime: string) { | @@ -54,11 +54,95 @@ function formatDateTime(inputDateTime: string) { | ||
54 | const formattedDateTime = `${year}-${month}-${day} ${hour}:${minute}:${second}`; | 54 | const formattedDateTime = `${year}-${month}-${day} ${hour}:${minute}:${second}`; |
55 | return formattedDateTime; | 55 | return formattedDateTime; |
56 | } | 56 | } |
57 | + | ||
58 | +function formatSalesCode(salesCode: any) { | ||
59 | + let newSalesCode = salesCode; | ||
60 | + if (newSalesCode.indexOf('_')) { | ||
61 | + newSalesCode = newSalesCode.split('_'); | ||
62 | + if (salesCode?.length === 2) { | ||
63 | + newSalesCode = newSalesCode[1] + '(' + newSalesCode[0] + ')'; | ||
64 | + } | ||
65 | + } | ||
66 | + return newSalesCode; | ||
67 | +} | ||
68 | + | ||
69 | +// 将二进制流的字符串转换成 Blob 对象 | ||
70 | +function dataURItoBlob(dataURI) { | ||
71 | + const byteString = atob(dataURI.split(',')[1]); | ||
72 | + const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0]; | ||
73 | + const ab = new ArrayBuffer(byteString.length); | ||
74 | + const ia = new Uint8Array(ab); | ||
75 | + for (let i = 0; i < byteString.length; i++) { | ||
76 | + ia[i] = byteString.charCodeAt(i); | ||
77 | + } | ||
78 | + return new Blob([ab], { type: mimeString }); | ||
79 | +} | ||
80 | + | ||
81 | +// 将 Blob 对象转换成 File 对象 | ||
82 | +function blobToFile(blob, fileName) { | ||
83 | + return new File([blob], fileName, { type: blob.type }); | ||
84 | +} | ||
85 | + | ||
86 | +function appendFormData(formData, data, parentKey = null) { | ||
87 | + for (const key in data) { | ||
88 | + if (data.hasOwnProperty(key)) { | ||
89 | + const value = data[key]; | ||
90 | + const formKey = parentKey ? `${parentKey}[${key}]` : key; | ||
91 | + | ||
92 | + if (Array.isArray(value)) { | ||
93 | + // 处理数组 | ||
94 | + value.forEach((item, index) => { | ||
95 | + const arrayKey = `${formKey}[${index}]`; | ||
96 | + if (typeof item === 'object' && !Array.isArray(item)) { | ||
97 | + // 递归处理对象 | ||
98 | + appendFormData(formData, item, arrayKey); | ||
99 | + } else { | ||
100 | + // 直接添加到 FormData | ||
101 | + formData.append(arrayKey, item); | ||
102 | + } | ||
103 | + }); | ||
104 | + } else if (typeof value === 'object' && !Array.isArray(value)) { | ||
105 | + // 递归处理对象 | ||
106 | + appendFormData(formData, value, formKey); | ||
107 | + } else { | ||
108 | + // 直接添加到 FormData | ||
109 | + formData.append(formKey, value); | ||
110 | + } | ||
111 | + } | ||
112 | + } | ||
113 | +} | ||
114 | + | ||
115 | +function getAliYunOSSFileNameFromUrl(url: string) { | ||
116 | + try { | ||
117 | + // 使用URL对象解析链接 | ||
118 | + let urlObject = new URL(url); | ||
119 | + | ||
120 | + // 从路径中获取最后一个斜杠后的部分,即文件名 | ||
121 | + let pathParts = urlObject.pathname.split('/'); | ||
122 | + let fileName = pathParts[pathParts.length - 1]; | ||
123 | + | ||
124 | + // 检查文件名是否包含至少一个点(.)以确保是一个合法的文件名 | ||
125 | + if (fileName.includes('.')) { | ||
126 | + return fileName; | ||
127 | + } else { | ||
128 | + throw new Error('Invalid file name in the URL'); | ||
129 | + } | ||
130 | + } catch (error: any) { | ||
131 | + // 如果解析失败或文件名不符合预期,返回原始链接 | ||
132 | + console.error('Error extracting file name:', error.message); | ||
133 | + return url; | ||
134 | + } | ||
135 | +} | ||
57 | export { | 136 | export { |
137 | + appendFormData, | ||
138 | + blobToFile, | ||
58 | customMessage, | 139 | customMessage, |
140 | + dataURItoBlob, | ||
59 | enumToProTableEnumValue, | 141 | enumToProTableEnumValue, |
60 | enumToSelect, | 142 | enumToSelect, |
61 | enumValueToLabel, | 143 | enumValueToLabel, |
62 | formatDateTime, | 144 | formatDateTime, |
145 | + formatSalesCode, | ||
146 | + getAliYunOSSFileNameFromUrl, | ||
63 | getUserInfo, | 147 | getUserInfo, |
64 | }; | 148 | }; |