Commit 4e743bb55d57df338be7c422d81dfb8213e8f9c3
1 parent
c56d1a59
feat: update地区管理
Showing
17 changed files
with
748 additions
and
1268 deletions
Too many changes to show.
To preserve performance only 17 of 19 files are displayed.
.umirc.ts
src/pages/Instalment/components/comfire/comfire.tsx
1 | 1 | import { ModalForm } from '@ant-design/pro-components'; |
2 | -import { Form, message } from 'antd'; | |
2 | +import { Form } from 'antd'; | |
3 | 3 | import { useState } from 'react'; |
4 | 4 | |
5 | 5 | const waitTime = (time: number = 100) => { |
... | ... | @@ -41,7 +41,6 @@ export default ({ currtDid, sureDelete }) => { |
41 | 41 | onFinish={async () => { |
42 | 42 | await waitTime(100); |
43 | 43 | sureDelete([ids]); |
44 | - message.success('提交成功'); | |
45 | 44 | return true; |
46 | 45 | }} |
47 | 46 | > | ... | ... |
src/pages/Instalment/components/detail/detail.tsx
... | ... | @@ -207,6 +207,7 @@ export default ({ toReload }) => { |
207 | 207 | payWay: values.payWay || contextBody.payWay, |
208 | 208 | annex: contextBody.annex, |
209 | 209 | remark: values.remark || contextBody.remark, |
210 | + createByName: null, | |
210 | 211 | }; |
211 | 212 | if (values.annex) { |
212 | 213 | formData.append('file', values.annex[0].originFileObj as RcFile); |
... | ... | @@ -221,6 +222,9 @@ export default ({ toReload }) => { |
221 | 222 | toSendEdit.annex = res.data; |
222 | 223 | } |
223 | 224 | } |
225 | + toSendEdit.createByName = JSON.parse( | |
226 | + localStorage.getItem('userInfo'), | |
227 | + ).username; | |
224 | 228 | const isSaveOrUpdate = await postOrderErpOrderStagesAdd({ |
225 | 229 | data: { ...toSendEdit }, |
226 | 230 | }); |
... | ... | @@ -230,31 +234,32 @@ export default ({ toReload }) => { |
230 | 234 | |
231 | 235 | otherBody.forEach((item) => { |
232 | 236 | let remakeItem = { |
233 | - ossId: item.ossId, | |
237 | + ossId: contextBody.id, | |
234 | 238 | number: item.id, |
235 | 239 | dateRange: item.payDate, |
236 | 240 | fileName: item.fileName, |
241 | + fileUrl: item.fileUrl, | |
237 | 242 | }; |
238 | - if ( | |
239 | - typeof item.fileUrl === 'object' && | |
240 | - item.fileUrl instanceof File | |
241 | - ) { | |
242 | - const formData = new FormData(); | |
243 | - formData.append('file', item.fileUrl as RcFile); | |
244 | - const uploadPromise = async () => { | |
245 | - const res = await postOrderErpOrderStagesUpload({ | |
246 | - data: formData, | |
247 | - headers: { | |
248 | - 'Content-Type': | |
249 | - 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | |
250 | - }, | |
251 | - }); | |
252 | - if (res.data) { | |
253 | - remakeItem.fileUrl = res.data; | |
254 | - } | |
255 | - }; | |
256 | - promises.push(uploadPromise()); | |
257 | - } | |
243 | + // if ( | |
244 | + // typeof item.fileUrl === 'object' && | |
245 | + // item.fileUrl instanceof File | |
246 | + // ) { | |
247 | + // const formData = new FormData(); | |
248 | + // formData.append('file', item.fileUrl as RcFile); | |
249 | + // const uploadPromise = async () => { | |
250 | + // const res = await postOrderErpOrderStagesUpload({ | |
251 | + // data: formData, | |
252 | + // headers: { | |
253 | + // 'Content-Type': | |
254 | + // 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | |
255 | + // }, | |
256 | + // }); | |
257 | + // if (res.data) { | |
258 | + // remakeItem.fileUrl = res.data; | |
259 | + // } | |
260 | + // }; | |
261 | + // promises.push(uploadPromise()); | |
262 | + // } | |
258 | 263 | remakeValue.push(remakeItem); |
259 | 264 | }); |
260 | 265 | ... | ... |
src/pages/Instalment/components/edit/edit.tsx
... | ... | @@ -33,7 +33,6 @@ export default ({ currentContract, toReload }) => { |
33 | 33 | const [total, setTotal] = useState(0); |
34 | 34 | const [payWayBody, setPayWayBody] = useState([]); |
35 | 35 | const [otherBody, setOtherBody] = useState([]); |
36 | - | |
37 | 36 | type OrderStagesWithListItem = { |
38 | 37 | //文件编号 |
39 | 38 | id: number; |
... | ... | @@ -85,6 +84,7 @@ export default ({ currentContract, toReload }) => { |
85 | 84 | } |
86 | 85 | |
87 | 86 | function setSave(value) { |
87 | + console.log(value); | |
88 | 88 | setOtherBody(value); |
89 | 89 | } |
90 | 90 | |
... | ... | @@ -134,18 +134,32 @@ export default ({ currentContract, toReload }) => { |
134 | 134 | } |
135 | 135 | }; |
136 | 136 | |
137 | - async function getBody() { | |
138 | - const res = await postOrderErpOrderStagesSearch({ | |
139 | - data: { contract: currentContract }, | |
140 | - }); | |
141 | - const context = res.data[0]; | |
142 | - | |
143 | - if (context.contract !== null) { | |
144 | - setContextBody(context); | |
145 | - setTotal(context.totalPrice); | |
146 | - form.setFieldValue('totalPrice', context.totalPrice); | |
137 | + async function getBody(value) { | |
138 | + if (value !== null) { | |
139 | + const res = await postOrderErpOrderStagesSearch({ | |
140 | + data: { contract: value }, | |
141 | + }); | |
142 | + const context = res.data[0]; | |
143 | + console.log(context); | |
144 | + if (context.contract !== null) { | |
145 | + setContextBody(context); | |
146 | + setTotal(context.totalPrice); | |
147 | + form.setFieldValue('totalPrice', context.totalPrice); | |
148 | + } | |
149 | + handleInputChange(context.payWay, 0, context.totalPrice); | |
150 | + } else { | |
151 | + const res = await postOrderErpOrderStagesSearch({ | |
152 | + data: { contract: currentContract }, | |
153 | + }); | |
154 | + const context = res.data[0]; | |
155 | + console.log(context); | |
156 | + if (context.contract !== null) { | |
157 | + setContextBody(context); | |
158 | + setTotal(context.totalPrice); | |
159 | + form.setFieldValue('totalPrice', context.totalPrice); | |
160 | + } | |
161 | + handleInputChange(context.payWay, 0, context.totalPrice); | |
147 | 162 | } |
148 | - handleInputChange(context.payWay, 0, context.totalPrice); | |
149 | 163 | } |
150 | 164 | |
151 | 165 | function getEditProductBody(value) { |
... | ... | @@ -157,7 +171,8 @@ export default ({ currentContract, toReload }) => { |
157 | 171 | } |
158 | 172 | |
159 | 173 | useEffect(() => { |
160 | - getBody(); | |
174 | + console.log('1'); | |
175 | + getBody(null); | |
161 | 176 | }, []); |
162 | 177 | |
163 | 178 | return ( |
... | ... | @@ -177,34 +192,35 @@ export default ({ currentContract, toReload }) => { |
177 | 192 | } |
178 | 193 | let remakeValue = []; |
179 | 194 | const promises = []; |
180 | - | |
195 | + console.log(otherBody); | |
181 | 196 | otherBody.forEach((item) => { |
182 | 197 | let remakeItem = { |
183 | 198 | ossId: contextBody.id, |
184 | 199 | number: item.id, |
185 | 200 | dateRange: item.payDate, |
186 | 201 | fileName: item.fileName, |
202 | + fileUrl: item.fileUrl, | |
187 | 203 | }; |
188 | - if ( | |
189 | - typeof item.fileUrl === 'object' && | |
190 | - item.fileUrl instanceof File | |
191 | - ) { | |
192 | - const formData = new FormData(); | |
193 | - formData.append('file', item.fileUrl as RcFile); | |
194 | - const uploadPromise = async () => { | |
195 | - const res = await postOrderErpOrderStagesUpload({ | |
196 | - data: formData, | |
197 | - headers: { | |
198 | - 'Content-Type': | |
199 | - 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | |
200 | - }, | |
201 | - }); | |
202 | - if (res.data) { | |
203 | - remakeItem.fileUrl = res.data; | |
204 | - } | |
205 | - }; | |
206 | - promises.push(uploadPromise()); | |
207 | - } | |
204 | + // if ( | |
205 | + // typeof item.fileUrl === 'object' && | |
206 | + // item.fileUrl instanceof File | |
207 | + // ) { | |
208 | + // const formData = new FormData(); | |
209 | + // formData.append('file', item.fileUrl as RcFile); | |
210 | + // const uploadPromise = async () => { | |
211 | + // const res = await postOrderErpOrderStagesUpload({ | |
212 | + // data: formData, | |
213 | + // headers: { | |
214 | + // 'Content-Type': | |
215 | + // 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | |
216 | + // }, | |
217 | + // }); | |
218 | + // if (res.data) { | |
219 | + // remakeItem.fileUrl = res.data; | |
220 | + // } | |
221 | + // }; | |
222 | + // promises.push(uploadPromise()); | |
223 | + // } | |
208 | 224 | remakeValue.push(remakeItem); |
209 | 225 | }); |
210 | 226 | Promise.all(promises).then(async () => { |
... | ... | @@ -243,8 +259,9 @@ export default ({ currentContract, toReload }) => { |
243 | 259 | const isSaveOrUpdate = await postOrderErpOrderStagesSaveOrUpdate({ |
244 | 260 | data: { ...toSendEdit }, |
245 | 261 | }); |
246 | - if (isSaveOrUpdate) { | |
247 | - getBody(); | |
262 | + if (isSaveOrUpdate.message === '成功') { | |
263 | + console.log('2'); | |
264 | + getBody(toSendEdit.contract); | |
248 | 265 | toReload(); |
249 | 266 | } |
250 | 267 | await waitTime(2000); | ... | ... |
src/pages/Instalment/components/payWayDetail/payWayDetail.tsx
... | ... | @@ -4,19 +4,18 @@ import { |
4 | 4 | EditableProTable, |
5 | 5 | ProFormDatePicker, |
6 | 6 | ProFormRadio, |
7 | - ProFormUploadButton, | |
8 | 7 | } from '@ant-design/pro-components'; |
9 | -import { message } from 'antd'; | |
10 | 8 | import React, { useEffect, useState } from 'react'; |
9 | +import PayWayUpload from '../upload/payWayUpload'; | |
11 | 10 | import './payWayDetail.less'; |
12 | 11 | |
13 | -const waitTime = (time: number = 100) => { | |
14 | - return new Promise((resolve) => { | |
15 | - setTimeout(() => { | |
16 | - resolve(true); | |
17 | - }, time); | |
18 | - }); | |
19 | -}; | |
12 | +// const waitTime = (time: number = 100) => { | |
13 | +// return new Promise((resolve) => { | |
14 | +// setTimeout(() => { | |
15 | +// resolve(true); | |
16 | +// }, time); | |
17 | +// }); | |
18 | +// }; | |
20 | 19 | |
21 | 20 | type DataSourceType = { |
22 | 21 | id: number; |
... | ... | @@ -74,6 +73,7 @@ export default ({ payBody, thisId, currtSave }) => { |
74 | 73 | ]; |
75 | 74 | |
76 | 75 | const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); |
76 | + const [isRetrun, setIsRetrun] = useState(false); | |
77 | 77 | const [position, setPosition] = useState<'top' | 'bottom' | 'hidden'>( |
78 | 78 | 'hidden', |
79 | 79 | ); |
... | ... | @@ -81,9 +81,17 @@ export default ({ payBody, thisId, currtSave }) => { |
81 | 81 | readonly DataSourceType[] |
82 | 82 | >([...defaultData]); |
83 | 83 | // const [body, setBody] = useState([]) |
84 | - const [isAccept, setIsAccept] = useState(null); | |
84 | + // const [isAccept, setIsAccept] = useState(null); | |
85 | 85 | // const [isCurrtSave, setIsCurrtSave] = useState(false); |
86 | 86 | |
87 | + const waitTime = (time: number = 100) => { | |
88 | + return new Promise((resolve) => { | |
89 | + setTimeout(() => { | |
90 | + resolve(true); | |
91 | + }, time); | |
92 | + }); | |
93 | + }; | |
94 | + | |
87 | 95 | async function getOther(value, arr) { |
88 | 96 | const res = await postOrderErpOrderStagesPayWaySelect({ |
89 | 97 | data: { ossId: value }, |
... | ... | @@ -106,11 +114,32 @@ export default ({ payBody, thisId, currtSave }) => { |
106 | 114 | }); |
107 | 115 | return currt; |
108 | 116 | }); |
117 | + // console.log(remake); | |
109 | 118 | setPayWayDetailBody(remake); |
119 | + setIsRetrun(true); | |
110 | 120 | } |
111 | 121 | } |
112 | 122 | |
113 | - function setPayWay(value) { | |
123 | + function getUploadFile(value) { | |
124 | + let remakeBody = []; | |
125 | + let remakeBodyItem = {}; | |
126 | + payWayDetailBody.forEach((item) => { | |
127 | + if (item.id === value.id) { | |
128 | + remakeBodyItem = { | |
129 | + ...item, | |
130 | + fileUrl: value.url, | |
131 | + fileName: value.name, | |
132 | + }; | |
133 | + } else { | |
134 | + remakeBodyItem = { ...item }; | |
135 | + } | |
136 | + remakeBody.push(remakeBodyItem); | |
137 | + }); | |
138 | + setPayWayDetailBody(remakeBody); | |
139 | + currtSave(remakeBody); | |
140 | + } | |
141 | + | |
142 | + async function setPayWay(value) { | |
114 | 143 | const remakeData = payWayDetailBody.map((obj) => { |
115 | 144 | return { |
116 | 145 | ...obj, |
... | ... | @@ -127,9 +156,6 @@ export default ({ payBody, thisId, currtSave }) => { |
127 | 156 | getOther(thisId, remakeData); |
128 | 157 | } |
129 | 158 | } |
130 | - // useEffect(() => { | |
131 | - // getOther(thisId) | |
132 | - // }, [thisId]) | |
133 | 159 | |
134 | 160 | useEffect(() => { |
135 | 161 | setPayWay(payBody); |
... | ... | @@ -175,6 +201,7 @@ export default ({ payBody, thisId, currtSave }) => { |
175 | 201 | render: (text, record) => { |
176 | 202 | const handleChange = (value) => { |
177 | 203 | const updatedDataSource = payWayDetailBody.map((item) => { |
204 | + console.log(value); | |
178 | 205 | if (item.id === record.id) { |
179 | 206 | return { |
180 | 207 | ...item, |
... | ... | @@ -207,74 +234,33 @@ export default ({ payBody, thisId, currtSave }) => { |
207 | 234 | title: '付款单回执', |
208 | 235 | dataIndex: 'fileName', |
209 | 236 | render: (text, record) => { |
210 | - if (isAccept !== record.id) { | |
211 | - if ( | |
212 | - typeof record.fileUrl === 'object' && | |
213 | - record.fileUrl instanceof File | |
214 | - ) { | |
215 | - return ( | |
216 | - <a onClick={() => message.error('请先保存')}>{record.fileName}</a> | |
217 | - ); | |
218 | - } else { | |
219 | - return <a href={record.fileUrl}>{record.fileName}</a>; | |
220 | - } | |
237 | + if (record.fileUrl !== undefined) { | |
238 | + return ( | |
239 | + <PayWayUpload | |
240 | + natureModel={{ | |
241 | + id: record.id, | |
242 | + fileName: record.fileName, | |
243 | + fileUrl: record.fileUrl, | |
244 | + }} | |
245 | + setCurryFile={getUploadFile} | |
246 | + key={isRetrun} | |
247 | + ></PayWayUpload> | |
248 | + ); | |
221 | 249 | } else { |
222 | 250 | return ( |
223 | - <ProFormUploadButton | |
224 | - name={record.id} | |
225 | - onChange={(value) => { | |
226 | - console.log(value); | |
227 | - // console.log(payWayDetailBody); | |
228 | - let remakeBody = []; | |
229 | - let remakeBodyItem = {}; | |
230 | - payWayDetailBody.forEach((item) => { | |
231 | - if (item.id === record.id) { | |
232 | - remakeBodyItem = { | |
233 | - ...item, | |
234 | - fileUrl: value.fileList.originFileObj, | |
235 | - fileName: value.fileList.name, | |
236 | - }; | |
237 | - } else { | |
238 | - remakeBodyItem = { ...item }; | |
239 | - } | |
240 | - // if (value.fileList.length == 0) { | |
241 | - // remakeBodyItem = { ...item, fileUrl: undefined, fileName: undefined } | |
242 | - // } | |
243 | - remakeBody.push(remakeBodyItem); | |
244 | - }); | |
245 | - setPayWayDetailBody(remakeBody); | |
246 | - currtSave(remakeBody); | |
251 | + <PayWayUpload | |
252 | + natureModel={{ | |
253 | + id: record.id, | |
254 | + fileName: undefined, | |
255 | + fileUrl: undefined, | |
247 | 256 | }} |
248 | - width="md" | |
249 | - max={1} | |
250 | - /> | |
257 | + setCurryFile={getUploadFile} | |
258 | + key={isRetrun} | |
259 | + ></PayWayUpload> | |
251 | 260 | ); |
252 | 261 | } |
253 | 262 | }, |
254 | 263 | }, |
255 | - { | |
256 | - title: '操作', | |
257 | - valueType: 'option', | |
258 | - width: 200, | |
259 | - render: (text, record) => [ | |
260 | - <a | |
261 | - key="editable" | |
262 | - onClick={() => { | |
263 | - if (isAccept !== record.id) { | |
264 | - setIsAccept(record.id); | |
265 | - } else { | |
266 | - setIsAccept(null); | |
267 | - } | |
268 | - }} | |
269 | - > | |
270 | - {record.fileName !== undefined && | |
271 | - record.fileName !== '' && | |
272 | - record.fileName !== null | |
273 | - ? '重新上传' | |
274 | - : '上传回执'} | |
275 | - </a>, | |
276 | - ], | |
277 | - }, | |
278 | 264 | ]; |
279 | 265 | |
280 | 266 | return ( | ... | ... |
src/pages/Instalment/components/upload/payWayUpload.tsx
0 → 100644
1 | +import { postOrderErpOrderStagesUpload } from '@/services/request'; | |
2 | +import { UploadOutlined } from '@ant-design/icons'; | |
3 | +import type { UploadProps } from 'antd'; | |
4 | +import { Button, Upload, message } from 'antd'; | |
5 | +import { RcFile } from 'antd/es/upload'; | |
6 | +import React, { useEffect } from 'react'; | |
7 | + | |
8 | +const App: React.FC = ({ natureModel, setCurryFile }) => { | |
9 | + const [fileList, setFileList] = React.useState([{}]); | |
10 | + useEffect(() => { | |
11 | + console.log(natureModel); | |
12 | + if (natureModel.fileUrl !== undefined && natureModel.fileUrl !== null) { | |
13 | + setFileList([{ name: natureModel.fileName, url: natureModel.fileUrl }]); | |
14 | + } | |
15 | + }, []); | |
16 | + | |
17 | + const handleUploadChange = (value) => { | |
18 | + setFileList(value.fileList); | |
19 | + setCurryFile({ | |
20 | + id: natureModel.id, | |
21 | + name: null, | |
22 | + url: null, | |
23 | + }); | |
24 | + if ( | |
25 | + value.fileList.length !== 0 && | |
26 | + value.fileList[0].status === 'uploading' | |
27 | + ) { | |
28 | + (async () => { | |
29 | + if (!(value.fileList[0].originFileObj instanceof File)) { | |
30 | + console.log('is not file'); | |
31 | + return false; | |
32 | + } else { | |
33 | + const formData = new FormData(); | |
34 | + formData.append('file', value.fileList[0].originFileObj as RcFile); | |
35 | + const res = await postOrderErpOrderStagesUpload({ | |
36 | + data: formData, | |
37 | + headers: { | |
38 | + 'Content-Type': 'multipart/form-data', | |
39 | + }, | |
40 | + }); | |
41 | + if (res) { | |
42 | + message.success('提交成功'); | |
43 | + console.log({ | |
44 | + uid: value.fileList[0].originFileObj.uid, | |
45 | + name: value.fileList[0].originFileObj.name, | |
46 | + url: res.data, | |
47 | + }); | |
48 | + console.log(natureModel.id); | |
49 | + | |
50 | + setCurryFile({ | |
51 | + id: natureModel.id, | |
52 | + name: value.fileList[0].originFileObj.name, | |
53 | + url: res.data, | |
54 | + }); | |
55 | + setFileList([ | |
56 | + { | |
57 | + id: value.fileList[0].originFileObj.uid, | |
58 | + name: value.fileList[0].originFileObj.name, | |
59 | + url: res.data, | |
60 | + }, | |
61 | + ]); | |
62 | + return ( | |
63 | + <a href={res.data} target="_blank" rel="noopener noreferrer"> | |
64 | + {value.fileList[0].originFileObj.name} | |
65 | + </a> | |
66 | + ); | |
67 | + } | |
68 | + } | |
69 | + })(); | |
70 | + } | |
71 | + }; | |
72 | + | |
73 | + const props: UploadProps = { | |
74 | + onChange(value) { | |
75 | + handleUploadChange(value); | |
76 | + }, | |
77 | + }; | |
78 | + | |
79 | + const shouldShowUploadButton = | |
80 | + fileList.length !== 1 || fileList[0].url === undefined; | |
81 | + | |
82 | + return ( | |
83 | + <Upload | |
84 | + {...props} | |
85 | + fileList={fileList.filter( | |
86 | + (item) => item.url !== undefined && item.url !== null, | |
87 | + )} | |
88 | + > | |
89 | + {shouldShowUploadButton && ( | |
90 | + <Button icon={<UploadOutlined />}>上传</Button> | |
91 | + )} | |
92 | + </Upload> | |
93 | + ); | |
94 | +}; | |
95 | + | |
96 | +export default App; | |
97 | + | |
98 | +{ | |
99 | + /* {!shouldShowUploadButton && <a href={fileList[0].url}>{fileList[0].name}</a>} */ | |
100 | +} | ... | ... |
src/pages/Instalment/components/upload/uploadApp.tsx
... | ... | @@ -21,13 +21,7 @@ const App: React.FC = ({ uploadFile }) => { |
21 | 21 | <p className="ant-upload-drag-icon"> |
22 | 22 | <InboxOutlined /> |
23 | 23 | </p> |
24 | - <p className="ant-upload-text"> | |
25 | - Click or drag file to this area to upload | |
26 | - </p> | |
27 | - <p className="ant-upload-hint"> | |
28 | - Support for a single or bulk upload. Strictly prohibited from | |
29 | - uploading company data or other banned files. | |
30 | - </p> | |
24 | + <p className="ant-upload-text">点击或者拖动文件到此处</p> | |
31 | 25 | </Dragger> |
32 | 26 | <a |
33 | 27 | href="https://order-erp.oss-cn-qingdao.aliyuncs.com/%E5%88%86%E6%9C%9F%E4%BB%98%E6%AC%BE-%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx?Expires=2035527699&OSSAccessKeyId=LTAIZCPI7OaWud0m&Signature=npHyEhfRd6LugJ0St8OkvRmLYtQ%3D" | ... | ... |
src/pages/Order/components/OrderDrawer.tsx
... | ... | @@ -3,6 +3,8 @@ import { |
3 | 3 | postCanrdApiUserAddressList, |
4 | 4 | postCanrdApiUserDetail, |
5 | 5 | postCanrdApiUserNowMoneyCheck, |
6 | + postDistrictSelectBelongByName, | |
7 | + postDistrictSelectByLevel, | |
6 | 8 | postKingdeeRepCustomerDetail, |
7 | 9 | postKingdeeRepMaterial, |
8 | 10 | postKingdeeRepMaterialUnit, |
... | ... | @@ -71,6 +73,10 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
71 | 73 | // [], |
72 | 74 | // ); //商品的仓库选项 |
73 | 75 | const [productUnitOptionsList, setProductUnitOptionsList] = useState([]); //商品的单位选项 |
76 | + //省市区 | |
77 | + const [province, setProvince] = useState(''); | |
78 | + const [city, setCity] = useState(''); | |
79 | + const [district, setDistrict] = useState(''); | |
74 | 80 | // const [productCustomerContactOptions, setProductCustomerContactOptions] = |
75 | 81 | // useState([]); //客户的收货人选项 |
76 | 82 | const [form] = Form.useForm<{ |
... | ... | @@ -246,7 +252,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
246 | 252 | newAccountOptions.push(uidDetail); |
247 | 253 | } |
248 | 254 | |
249 | - //查询当前手机号允许使用的预存账号 | |
255 | + // 查询当前手机号允许使用的预存账号 | |
250 | 256 | if (phone) { |
251 | 257 | let res = await postPrepaidPhoneAvailableList({ data: { phone: phone } }); |
252 | 258 | if (res && res.result === RESPONSE_CODE.SUCCESS) { |
... | ... | @@ -863,6 +869,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
863 | 869 | values.institution = values.institution?.trim(); |
864 | 870 | values.institutionContactName = values.institutionContactName?.trim(); |
865 | 871 | values.customerName = values.customerNameString.trim(); |
872 | + values.customerShippingAddress = | |
873 | + province + city + district + values.customerShippingAddress; | |
866 | 874 | |
867 | 875 | if (typeof values.erpCustomerId !== 'string') { |
868 | 876 | values.erpCustomerId = values.erpCustomerId?.id; |
... | ... | @@ -1015,7 +1023,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
1015 | 1023 | name="contactAddress" |
1016 | 1024 | hidden |
1017 | 1025 | ></ProFormText> |
1018 | - | |
1019 | 1026 | <ProFormSelect |
1020 | 1027 | key="customerName" |
1021 | 1028 | label="收货人" |
... | ... | @@ -1176,6 +1183,113 @@ export default ({ onClose, data, subOrders, orderOptType }) => { |
1176 | 1183 | placeholder="请输入课题组" |
1177 | 1184 | rules={[{ required: true, message: '课题组必填' }]} |
1178 | 1185 | /> |
1186 | + <div | |
1187 | + style={{ | |
1188 | + display: 'flex', | |
1189 | + justifyContent: 'space-between', | |
1190 | + width: 340, | |
1191 | + }} | |
1192 | + > | |
1193 | + <ProFormSelect | |
1194 | + name="province" | |
1195 | + key="province" | |
1196 | + width={100} | |
1197 | + label="省" | |
1198 | + fieldProps={{ | |
1199 | + labelInValue: true, | |
1200 | + }} | |
1201 | + onChange={(value) => { | |
1202 | + setProvince(value?.value); | |
1203 | + }} | |
1204 | + placeholder="请选择" | |
1205 | + rules={[ | |
1206 | + { | |
1207 | + required: true, | |
1208 | + message: '请选择!', | |
1209 | + }, | |
1210 | + ]} | |
1211 | + request={async () => { | |
1212 | + let province = []; | |
1213 | + let res = await postDistrictSelectByLevel({ data: 1 }); | |
1214 | + if (res) { | |
1215 | + res.data.forEach((item) => { | |
1216 | + province.push({ value: item.district, label: item.district }); | |
1217 | + }); | |
1218 | + } | |
1219 | + return province; | |
1220 | + }} | |
1221 | + /> | |
1222 | + <ProFormSelect | |
1223 | + key={province} | |
1224 | + name="city" | |
1225 | + width={100} | |
1226 | + label="市" | |
1227 | + disabled={province === ''} | |
1228 | + fieldProps={{ | |
1229 | + labelInValue: true, | |
1230 | + }} | |
1231 | + placeholder="请选择" | |
1232 | + onChange={(value) => { | |
1233 | + setCity(value?.value); | |
1234 | + }} | |
1235 | + rules={[ | |
1236 | + { | |
1237 | + required: true, | |
1238 | + message: '请选择!', | |
1239 | + }, | |
1240 | + ]} | |
1241 | + request={async () => { | |
1242 | + if (province !== '') { | |
1243 | + let cityOptions = []; | |
1244 | + let res = await postDistrictSelectBelongByName({ | |
1245 | + data: province, | |
1246 | + }); | |
1247 | + if (res && res.data) { | |
1248 | + cityOptions = res.data.map((item) => ({ | |
1249 | + value: item.district, | |
1250 | + label: item.district, | |
1251 | + })); | |
1252 | + } | |
1253 | + return cityOptions; | |
1254 | + } | |
1255 | + return []; | |
1256 | + }} | |
1257 | + /> | |
1258 | + <ProFormSelect | |
1259 | + key={city ? city.toString() : 'district'} | |
1260 | + name="district" | |
1261 | + width={100} | |
1262 | + label="区" | |
1263 | + onChange={(value) => { | |
1264 | + setDistrict(value?.value); | |
1265 | + }} | |
1266 | + disabled={city === ''} | |
1267 | + fieldProps={{ | |
1268 | + labelInValue: true, | |
1269 | + }} | |
1270 | + placeholder="请选择" | |
1271 | + rules={[ | |
1272 | + { | |
1273 | + required: true, | |
1274 | + message: '请选择!', | |
1275 | + }, | |
1276 | + ]} | |
1277 | + request={async () => { | |
1278 | + if (city !== '') { | |
1279 | + let districtOptions = []; | |
1280 | + let res = await postDistrictSelectBelongByName({ data: city }); | |
1281 | + if (res && res.data) { | |
1282 | + districtOptions = res.data.map((item) => ({ | |
1283 | + value: item.district, | |
1284 | + label: item.district, | |
1285 | + })); | |
1286 | + } | |
1287 | + return districtOptions; | |
1288 | + } | |
1289 | + return []; | |
1290 | + }} | |
1291 | + /> | |
1292 | + </div> | |
1179 | 1293 | <ProFormTextArea |
1180 | 1294 | width="lg" |
1181 | 1295 | key="customerShippingAddress" | ... | ... |
src/pages/OrderReport/index.tsx
1 | 1 | import { |
2 | + getOrderErpOrderZoNingSelectAll, | |
3 | + getOrderErpOrderZoNingSelectUserAll, | |
4 | + postOrderErpOrderZoNingSelectSaleUserByProvince, | |
2 | 5 | postServiceOrderQueryReportFormsInformation, |
3 | 6 | postServiceOrderQuerySalesCode, |
4 | 7 | } from '@/services'; |
... | ... | @@ -63,7 +66,7 @@ const OrderReportPage = () => { |
63 | 66 | setLoading(true); |
64 | 67 | let body = { |
65 | 68 | statisticsMethod: '', |
66 | - salesCode: form.getFieldValue('salesCode'), | |
69 | + salesCode: [null], | |
67 | 70 | productBelongBusiness: form.getFieldValue('productBelongBusiness'), |
68 | 71 | maxAccount: form.getFieldValue('maxAccount'), |
69 | 72 | includeExperimentalEquipment: form.getFieldValue( |
... | ... | @@ -72,6 +75,36 @@ const OrderReportPage = () => { |
72 | 75 | // beginTime:"", |
73 | 76 | // endTime:"" |
74 | 77 | }; |
78 | + // console.log(form.getFieldValue('zoning').value); | |
79 | + | |
80 | + let res = await getOrderErpOrderZoNingSelectUserAll(); | |
81 | + if (res && res.data) { | |
82 | + let safeUserList = []; | |
83 | + res.data.forEach((element) => { | |
84 | + safeUserList.push(element.userName); | |
85 | + }); | |
86 | + body = { ...body, salesCode: safeUserList }; | |
87 | + } | |
88 | + if (form.getFieldValue('salesCode')) { | |
89 | + body = { ...body, salesCode: [form.getFieldValue('salesCode')] }; | |
90 | + } | |
91 | + if (form.getFieldValue('zoning')) { | |
92 | + if ( | |
93 | + form.getFieldValue('zoning').value !== '' || | |
94 | + form.getFieldValue('zoning').value !== null || | |
95 | + form.getFieldValue('zoning').value !== undefined | |
96 | + ) { | |
97 | + let res = await postOrderErpOrderZoNingSelectSaleUserByProvince({ | |
98 | + data: form.getFieldValue('zoning').value, | |
99 | + }); | |
100 | + if (res && res.data) { | |
101 | + body = { ...body, salesCode: res.data }; | |
102 | + } | |
103 | + } | |
104 | + } | |
105 | + | |
106 | + if (form.getFieldValue('zoning')) { | |
107 | + } | |
75 | 108 | |
76 | 109 | // if(form.getFieldValue("dateRange")!==undefined){ |
77 | 110 | // body.beginTime=formatDate(form.getFieldValue("dateRange")[0]), |
... | ... | @@ -162,6 +195,30 @@ const OrderReportPage = () => { |
162 | 195 | initialValue={false} |
163 | 196 | label="包含实验设备事业部汇总统计" |
164 | 197 | /> |
198 | + | |
199 | + <ProFormSelect | |
200 | + key="zoning" | |
201 | + name="zoning" | |
202 | + width="md" | |
203 | + label="所属地区" | |
204 | + fieldProps={{ | |
205 | + labelInValue: true, | |
206 | + }} | |
207 | + placeholder="请选择" | |
208 | + request={async () => { | |
209 | + let zoningOptions = []; | |
210 | + let res = await getOrderErpOrderZoNingSelectAll(); | |
211 | + if (res && res.data) { | |
212 | + console.log(res.data); | |
213 | + | |
214 | + zoningOptions = res.data.map((item) => ({ | |
215 | + value: item.zoning, | |
216 | + label: item.zoning, | |
217 | + })); | |
218 | + } | |
219 | + return zoningOptions; | |
220 | + }} | |
221 | + /> | |
165 | 222 | </QueryFilter> |
166 | 223 | </ProCard> |
167 | 224 | ... | ... |
src/pages/ResearchGroup/components/ImportModal.tsx
... | ... | @@ -6,7 +6,7 @@ import { Button, Modal, Upload, message } from 'antd'; |
6 | 6 | import { RcFile, UploadFile, UploadProps } from 'antd/es/upload'; |
7 | 7 | import { useState } from 'react'; |
8 | 8 | export default ({ onClose }) => { |
9 | - // const [form] = Form.useForm<{ name: string; company: string }>(); | |
9 | + // const [form] = Form.useForm<{ name: string; company: string }>(); | |
10 | 10 | const [messageApi, contextHolder] = message.useMessage(); |
11 | 11 | const [fileList, setFileList] = useState<UploadFile[]>([]); |
12 | 12 | const [uploading, setUploading] = useState(false); |
... | ... | @@ -41,8 +41,8 @@ export default ({ onClose }) => { |
41 | 41 | //originFileObj二进制文件 |
42 | 42 | formData.append('file', file.originFileObj as RcFile); |
43 | 43 | }); |
44 | - // console.log(fileList[0] as RcFile) | |
45 | - // formData.append('file', fileList[0] as RcFile); | |
44 | + console.log(fileList[0] as RcFile); | |
45 | + formData.append('file', fileList[0] as RcFile); | |
46 | 46 | setUploading(true); |
47 | 47 | // You can use any AJAX library you like |
48 | 48 | const res = await postResearchGroupsImport({ | ... | ... |
src/pages/ResearchGroup/index.css
0 → 100644
src/pages/ZoNing/components/constant.tsx
1 | 1 | import { List } from 'lodash'; |
2 | 2 | |
3 | 3 | export type zoningItem = { |
4 | - id: number; //id | |
4 | + id?: number; //id | |
5 | 5 | zoning: string; //区域名称 |
6 | 6 | orderProvinceVoList: List<provinceItem>; //所包含的省份列表 |
7 | 7 | orderUserVoList: List<userItem>; //所包含的销售列表 |
8 | 8 | }; |
9 | 9 | |
10 | 10 | export type zoningShowItem = { |
11 | - id: number; //id | |
11 | + id?: number; //id | |
12 | 12 | zoning: string; //区域名称 |
13 | 13 | orderProvinceShowList: string; //所包含的省份列表 |
14 | 14 | orderUserShowList: string; //所包含的销售列表 |
15 | + orderUserNumberShowList: number[]; //销售对应的uId | |
15 | 16 | }; |
16 | 17 | |
17 | 18 | export type provinceItem = { |
18 | - pId: number; | |
19 | + pId?: number; | |
19 | 20 | province: string; |
20 | 21 | }; |
21 | 22 | |
22 | 23 | export type userItem = { |
23 | 24 | uId: number; |
24 | - userName: string; | |
25 | + userName?: string; | |
26 | +}; | |
27 | + | |
28 | +export const provinceEnum = { | |
29 | + 全选: '全选', | |
30 | + 北京市: '北京市', | |
31 | + 天津市: '天津市', | |
32 | + 河北省: '河北省', | |
33 | + 山西省: '山西省', | |
34 | + 内蒙古自治区: '内蒙古自治区', | |
35 | + 辽宁省: '辽宁省', | |
36 | + 吉林省: '吉林省', | |
37 | + 黑龙江省: '黑龙江省', | |
38 | + 上海市: '上海市', | |
39 | + 江苏省: '江苏省', | |
40 | + 浙江省: '浙江省', | |
41 | + 安徽省: '安徽省', | |
42 | + 福建省: '福建省', | |
43 | + 江西省: '江西省', | |
44 | + 山东省: '山东省', | |
45 | + 河南省: '河南省', | |
46 | + 湖北省: '湖北省', | |
47 | + 湖南省: '湖南省', | |
48 | + 广东省: '广东省', | |
49 | + 广西壮族自治区: '广西壮族自治区', | |
50 | + 海南省: '海南省', | |
51 | + 重庆市: '重庆市', | |
52 | + 四川省: '四川省', | |
53 | + 贵州省: '贵州省', | |
54 | + 云南省: '云南省', | |
55 | + 西藏自治区: '西藏自治区', | |
56 | + 陕西省: '陕西省', | |
57 | + 甘肃省: '甘肃省', | |
58 | + 青海省: '青海省', | |
59 | + 宁夏回族自治区: '宁夏回族自治区', | |
60 | + 新疆维吾尔自治区: '新疆维吾尔自治区', | |
61 | + 台湾省: '台湾省', | |
62 | + 香港特别行政区: '香港特别行政区', | |
63 | + 澳门特别行政区: '澳门特别行政区', | |
25 | 64 | }; | ... | ... |
src/pages/ZoNing/components/modal.tsx
1 | -import { getOrderErpOrderZoNingSelectProvinceAll } from '@/services'; | |
1 | +import { | |
2 | + getOrderErpOrderZoNingSelectUserAll, | |
3 | + postOrderErpOrderZoNingSaveOrUpdate, | |
4 | +} from '@/services'; | |
2 | 5 | import { PlusOutlined } from '@ant-design/icons'; |
3 | 6 | import { |
4 | 7 | ModalForm, |
... | ... | @@ -7,8 +10,7 @@ import { |
7 | 10 | ProFormText, |
8 | 11 | } from '@ant-design/pro-components'; |
9 | 12 | import { Button, Form, message } from 'antd'; |
10 | -import { zoningItem } from './constant'; | |
11 | - | |
13 | +import { provinceEnum, zoningItem } from './constant'; | |
12 | 14 | const waitTime = (time: number = 100) => { |
13 | 15 | return new Promise((resolve) => { |
14 | 16 | setTimeout(() => { |
... | ... | @@ -17,71 +19,126 @@ const waitTime = (time: number = 100) => { |
17 | 19 | }); |
18 | 20 | }; |
19 | 21 | |
20 | -export default () => { | |
22 | +export default ({ toReload, option, needEditBody }) => { | |
21 | 23 | const [form] = Form.useForm<zoningItem>(); |
24 | + | |
22 | 25 | return ( |
23 | 26 | <ModalForm<{ |
24 | - name: string; | |
25 | - company: string; | |
27 | + zoning: string; | |
28 | + province: string[]; | |
29 | + user: number[]; | |
26 | 30 | }> |
27 | - title="新增区域" | |
31 | + title={option} | |
28 | 32 | trigger={ |
29 | - <Button type="primary"> | |
30 | - <PlusOutlined /> | |
31 | - 新增区域 | |
33 | + <Button type="primary" key={option.id}> | |
34 | + {option !== '编辑' && <PlusOutlined />} | |
35 | + {option} | |
32 | 36 | </Button> |
33 | 37 | } |
34 | 38 | form={form} |
35 | 39 | autoFocusFirstInput |
40 | + initialValues={{ | |
41 | + zoning: needEditBody.zoning ? needEditBody.zoning : '', | |
42 | + province: needEditBody.orderProvinceShowList | |
43 | + ? needEditBody.orderProvinceShowList.split('、') | |
44 | + : [], | |
45 | + user: needEditBody.orderUserNumberShowList | |
46 | + ? needEditBody.orderUserNumberShowList | |
47 | + : [], | |
48 | + }} | |
36 | 49 | modalProps={{ |
37 | 50 | destroyOnClose: true, |
38 | - onCancel: () => console.log('run'), | |
39 | 51 | }} |
40 | - submitTimeout={2000} | |
52 | + submitTimeout={500} | |
41 | 53 | onFinish={async (values) => { |
42 | - await waitTime(2000); | |
43 | - console.log(values.name); | |
44 | - message.success('提交成功'); | |
45 | - return true; | |
54 | + console.log(values); | |
55 | + const orderProvinceList = values.province.map((item) => { | |
56 | + return { province: item }; | |
57 | + }); | |
58 | + const orderUserList = values.user.map((item) => { | |
59 | + return { uId: item }; | |
60 | + }); | |
61 | + const fetchData: zoningItem = { | |
62 | + zoning: values.zoning, | |
63 | + orderProvinceVoList: orderProvinceList, | |
64 | + orderUserVoList: orderUserList, | |
65 | + }; | |
66 | + let res = await postOrderErpOrderZoNingSaveOrUpdate({ | |
67 | + data: fetchData, | |
68 | + }); | |
69 | + if (res) { | |
70 | + console.log(res); | |
71 | + await waitTime(500); | |
72 | + console.log(values); | |
73 | + message.success('提交成功'); | |
74 | + toReload(); | |
75 | + return true; | |
76 | + } | |
77 | + return false; | |
46 | 78 | }} |
47 | 79 | > |
48 | 80 | <ProForm.Group> |
49 | 81 | <ProFormText |
50 | - width="md" | |
82 | + width="lg" | |
51 | 83 | name="zoning" |
52 | 84 | label="区域名称" |
53 | 85 | placeholder="请输入" |
86 | + rules={[{ required: true, message: '此项为必填项' }]} | |
54 | 87 | /> |
55 | 88 | </ProForm.Group> |
56 | 89 | <ProForm.Group> |
57 | 90 | <ProFormSelect |
91 | + name="user" | |
92 | + width="lg" | |
93 | + label="负责销售" | |
58 | 94 | request={async () => { |
59 | - const provinceList = | |
60 | - await getOrderErpOrderZoNingSelectProvinceAll(); | |
61 | - if (provinceList) { | |
62 | - return provinceList.data.map((item) => ({ | |
63 | - value: { pId: item.pId, province: item.province }, | |
64 | - label: item.province, | |
65 | - })); | |
95 | + const userList = await getOrderErpOrderZoNingSelectUserAll(); | |
96 | + if (userList) { | |
97 | + let userSelList = []; | |
98 | + userList.data.forEach((item: { uId: any; userName: any }) => | |
99 | + userSelList.push({ | |
100 | + value: item.uId, | |
101 | + label: item.userName, | |
102 | + }), | |
103 | + ); | |
104 | + userSelList.unshift({ | |
105 | + value: 0, | |
106 | + label: '全选', | |
107 | + }); | |
108 | + return userSelList; | |
66 | 109 | } |
67 | 110 | return []; |
68 | 111 | }} |
69 | - width="xs" | |
70 | - name="orderProvinceVoList" | |
71 | - label="合同约定生效方式" | |
112 | + fieldProps={{ | |
113 | + mode: 'multiple', | |
114 | + }} | |
115 | + placeholder="请选择" | |
116 | + rules={[ | |
117 | + { | |
118 | + required: true, | |
119 | + message: '请选择!', | |
120 | + type: 'array', | |
121 | + }, | |
122 | + ]} | |
72 | 123 | /> |
73 | 124 | </ProForm.Group> |
74 | 125 | <ProForm.Group> |
75 | 126 | <ProFormSelect |
76 | - width="xs" | |
77 | - options={[ | |
127 | + name="province" | |
128 | + width="lg" | |
129 | + label="管辖地区" | |
130 | + valueEnum={provinceEnum} | |
131 | + fieldProps={{ | |
132 | + mode: 'multiple', | |
133 | + }} | |
134 | + placeholder="请选择" | |
135 | + rules={[ | |
78 | 136 | { |
79 | - value: 'time', | |
80 | - label: '履行完终止', | |
137 | + required: true, | |
138 | + message: '请选择!', | |
139 | + type: 'array', | |
81 | 140 | }, |
82 | 141 | ]} |
83 | - name="orderUserVoList" | |
84 | - label="合同约定失效效方式" | |
85 | 142 | /> |
86 | 143 | </ProForm.Group> |
87 | 144 | </ModalForm> | ... | ... |
src/pages/ZoNing/components/table.tsx
1 | -import type { ProColumns } from '@ant-design/pro-components'; | |
2 | 1 | import { |
3 | - EditableProTable, | |
4 | - ProCard, | |
5 | - ProFormField, | |
6 | -} from '@ant-design/pro-components'; | |
7 | -import React, { useState } from 'react'; | |
2 | + deleteOrderErpOrderZoNingDelete, | |
3 | + getOrderErpOrderZoNingSelectAll, | |
4 | +} from '@/services'; | |
5 | +import type { ProColumns } from '@ant-design/pro-components'; | |
6 | +import { EditableProTable } from '@ant-design/pro-components'; | |
7 | +import { Button, Popconfirm, PopconfirmProps, message } from 'antd'; | |
8 | +import React, { useRef, useState } from 'react'; | |
9 | +import '../index.less'; | |
8 | 10 | import { zoningItem, zoningShowItem } from './constant'; |
9 | 11 | import Modal from './modal'; |
10 | 12 | |
... | ... | @@ -16,68 +18,81 @@ const waitTime = (time: number = 100) => { |
16 | 18 | }); |
17 | 19 | }; |
18 | 20 | |
19 | -const defaultData: zoningItem[] = [ | |
20 | - { | |
21 | - id: 1, | |
22 | - zoning: '华南地区', | |
23 | - orderProvinceVoList: [ | |
24 | - { | |
25 | - pId: 1, | |
26 | - province: '广东省', | |
27 | - }, | |
28 | - { | |
29 | - pId: 2, | |
30 | - province: '四川省', | |
31 | - }, | |
32 | - { | |
33 | - pId: 3, | |
34 | - province: '北京市', | |
35 | - }, | |
36 | - { | |
37 | - pId: 4, | |
38 | - province: '上海市', | |
39 | - }, | |
40 | - ], | |
41 | - orderUserVoList: [ | |
42 | - { | |
43 | - uId: 1, | |
44 | - userName: '李华', | |
45 | - }, | |
46 | - ], | |
47 | - }, | |
48 | -]; | |
21 | +function changeToShow(array: zoningItem[]) { | |
22 | + console.log(JSON.parse(localStorage.getItem('userInfo')).username); | |
23 | + const showArray: zoningShowItem[] = array.map((item) => { | |
24 | + let orderProvinceShowList = ''; | |
25 | + let orderUserShowList = ''; | |
26 | + let orderUserNumberShowList: number[] = []; | |
27 | + item.orderProvinceVoList.forEach((element, index) => { | |
28 | + orderProvinceShowList += element.province; | |
29 | + if (index < item.orderProvinceVoList.length - 1) { | |
30 | + orderProvinceShowList += '、'; | |
31 | + } | |
32 | + }); | |
49 | 33 | |
50 | -const defaultShowData: zoningShowItem[] = defaultData.map((item) => { | |
51 | - let orderProvinceShowList = ''; | |
52 | - let orderUserShowList = ''; | |
34 | + item.orderUserVoList.forEach((event, index) => { | |
35 | + orderUserShowList += event.userName; | |
36 | + orderUserNumberShowList.push(event.uId); | |
37 | + if (index < item.orderUserVoList.length - 1) { | |
38 | + orderUserShowList += '、'; | |
39 | + } | |
40 | + }); | |
53 | 41 | |
54 | - item.orderProvinceVoList.forEach((element, index) => { | |
55 | - orderProvinceShowList += element.province; | |
56 | - if (index < item.orderProvinceVoList.length - 1) { | |
57 | - orderProvinceShowList += '、'; | |
42 | + if (orderUserShowList === '') { | |
43 | + orderUserShowList = '全选'; | |
44 | + orderUserNumberShowList.push(0); | |
58 | 45 | } |
59 | - }); | |
60 | 46 | |
61 | - item.orderUserVoList.forEach((event, index) => { | |
62 | - orderUserShowList += event.userName; | |
63 | - if (index < item.orderUserVoList.length - 1) { | |
64 | - orderUserShowList += '、'; | |
65 | - } | |
47 | + return { | |
48 | + id: item.id, | |
49 | + zoning: item.zoning, | |
50 | + orderProvinceShowList, | |
51 | + orderUserShowList, | |
52 | + orderUserNumberShowList, | |
53 | + }; | |
66 | 54 | }); |
67 | - | |
68 | - return { | |
69 | - id: item.id, | |
70 | - zoning: item.zoning, | |
71 | - orderProvinceShowList, | |
72 | - orderUserShowList, | |
73 | - }; | |
74 | -}); | |
55 | + return showArray; | |
56 | +} | |
75 | 57 | |
76 | 58 | export default () => { |
77 | 59 | const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); |
78 | 60 | const [dataSource, setDataSource] = useState<readonly zoningItem[]>([]); |
79 | 61 | const [position] = useState<'top' | 'bottom' | 'hidden'>('hidden'); |
80 | 62 | |
63 | + interface ActionType { | |
64 | + reload: (resetPageIndex?: boolean) => void; | |
65 | + reloadAndRest: () => void; | |
66 | + reset: () => void; | |
67 | + clearSelected?: () => void; | |
68 | + startEditable: (rowKey: Key) => boolean; | |
69 | + cancelEditable: (rowKey: Key) => boolean; | |
70 | + } | |
71 | + | |
72 | + const ref = useRef<ActionType>({ | |
73 | + reload: () => {}, | |
74 | + reloadAndRest: () => {}, | |
75 | + reset: () => {}, | |
76 | + startEditable: () => {}, | |
77 | + cancelEditable: () => {}, | |
78 | + }); | |
79 | + | |
80 | + function reload() { | |
81 | + ref.current.reload(); | |
82 | + } | |
83 | + | |
84 | + const confirm: PopconfirmProps['onConfirm'] = async (id) => { | |
85 | + await deleteOrderErpOrderZoNingDelete({ | |
86 | + data: id, | |
87 | + }); | |
88 | + reload(); | |
89 | + message.success('删除成功'); | |
90 | + }; | |
91 | + | |
92 | + const cancel: PopconfirmProps['onCancel'] = () => { | |
93 | + message.error('取消删除'); | |
94 | + }; | |
95 | + | |
81 | 96 | const columns: ProColumns<zoningItem>[] = [ |
82 | 97 | { |
83 | 98 | title: '区域名称', |
... | ... | @@ -101,74 +116,72 @@ export default () => { |
101 | 116 | title: '操作', |
102 | 117 | valueType: 'option', |
103 | 118 | width: 200, |
104 | - render: (text, record, _, action) => [ | |
105 | - <a | |
106 | - key="editable" | |
107 | - onClick={() => { | |
108 | - action?.startEditable?.(record.id); | |
109 | - }} | |
110 | - > | |
111 | - 编辑 | |
112 | - </a>, | |
113 | - <a | |
114 | - key="delete" | |
115 | - onClick={() => { | |
116 | - setDataSource(dataSource.filter((item) => item.id !== record.id)); | |
117 | - }} | |
118 | - > | |
119 | - 删除 | |
120 | - </a>, | |
119 | + render: (text, record) => [ | |
120 | + <> | |
121 | + <Modal | |
122 | + toReload={reload} | |
123 | + option={'编辑'} | |
124 | + needEditBody={record} | |
125 | + key={record.id} | |
126 | + /> | |
127 | + <Popconfirm | |
128 | + title="删除此项" | |
129 | + description="你确定你要删除此项吗?" | |
130 | + onConfirm={() => { | |
131 | + confirm(record.id); | |
132 | + }} | |
133 | + onCancel={cancel} | |
134 | + okText="确定" | |
135 | + cancelText="取消" | |
136 | + > | |
137 | + <Button>删除</Button> | |
138 | + </Popconfirm> | |
139 | + </>, | |
121 | 140 | ], |
122 | 141 | }, |
123 | 142 | ]; |
124 | 143 | |
125 | 144 | return ( |
126 | - <> | |
127 | - <EditableProTable<zoningItem> | |
128 | - rowKey="id" | |
129 | - headerTitle={<Modal></Modal>} | |
130 | - maxLength={5} | |
131 | - scroll={{ | |
132 | - x: 960, | |
133 | - }} | |
134 | - recordCreatorProps={ | |
135 | - position !== 'hidden' | |
136 | - ? { | |
137 | - position: position as 'top', | |
138 | - record: () => ({ id: (Math.random() * 1000000).toFixed(0) }), | |
139 | - } | |
140 | - : false | |
145 | + <EditableProTable<zoningItem> | |
146 | + rowKey="id" | |
147 | + className="table-index" | |
148 | + deletePopconfirmMessage | |
149 | + actionRef={ref} | |
150 | + headerTitle={ | |
151 | + <Modal toReload={reload} option={'新增区域'} needEditBody={{}}></Modal> | |
152 | + } | |
153 | + maxLength={5} | |
154 | + scroll={{ | |
155 | + x: 960, | |
156 | + }} | |
157 | + recordCreatorProps={ | |
158 | + position !== 'hidden' | |
159 | + ? { | |
160 | + position: position as 'top', | |
161 | + record: () => ({ id: (Math.random() * 1000000).toFixed(0) }), | |
162 | + } | |
163 | + : false | |
164 | + } | |
165 | + loading={false} | |
166 | + columns={columns} | |
167 | + request={async () => { | |
168 | + const res = await getOrderErpOrderZoNingSelectAll(); | |
169 | + if (res) { | |
170 | + const initDataSource = changeToShow(res.data); | |
171 | + return { data: initDataSource || [] }; | |
141 | 172 | } |
142 | - loading={false} | |
143 | - columns={columns} | |
144 | - request={async () => ({ | |
145 | - data: defaultShowData, | |
146 | - })} | |
147 | - value={dataSource} | |
148 | - onChange={setDataSource} | |
149 | - editable={{ | |
150 | - type: 'multiple', | |
151 | - editableKeys, | |
152 | - onSave: async (rowKey, data, row) => { | |
153 | - console.log(rowKey, data, row); | |
154 | - await waitTime(2000); | |
155 | - }, | |
156 | - onChange: setEditableRowKeys, | |
157 | - }} | |
158 | - /> | |
159 | - <ProCard title="表格数据" headerBordered collapsible defaultCollapsed> | |
160 | - <ProFormField | |
161 | - ignoreFormItem | |
162 | - fieldProps={{ | |
163 | - style: { | |
164 | - width: '100%', | |
165 | - }, | |
166 | - }} | |
167 | - mode="read" | |
168 | - valueType="jsonCode" | |
169 | - text={JSON.stringify(dataSource)} | |
170 | - /> | |
171 | - </ProCard> | |
172 | - </> | |
173 | + }} | |
174 | + value={dataSource} | |
175 | + onChange={setDataSource} | |
176 | + editable={{ | |
177 | + type: 'multiple', | |
178 | + editableKeys, | |
179 | + onSave: async (rowKey, data, row) => { | |
180 | + console.log(rowKey, data, row); | |
181 | + await waitTime(2000); | |
182 | + }, | |
183 | + onChange: setEditableRowKeys, | |
184 | + }} | |
185 | + /> | |
173 | 186 | ); |
174 | 187 | }; | ... | ... |
src/pages/ZoNing/index.css
0 → 100644
1 | +.item { | |
2 | + background: '#0092ff'; | |
3 | + padding: '8px 0'; | |
4 | + display: flex; | |
5 | + flex-flow: row nowrap; | |
6 | + align-content: normal; | |
7 | + align-items: center; | |
8 | + padding-bottom: 20px; | |
9 | +} | |
10 | + | |
11 | +.table-index td { | |
12 | + font-family: 'San Francisco', 'Helvetica Neue', Helvetica, Arial, | |
13 | + 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Heiti SC', | |
14 | + 'WenQuanYi Micro Hei', sans-serif; | |
15 | + font-size: 14px; | |
16 | +} | ... | ... |
src/pages/ZoNing/index.less
0 → 100644
1 | +.item { | |
2 | + background: '#0092ff'; | |
3 | + padding: '8px 0'; | |
4 | + display: flex; | |
5 | + flex-flow: row nowrap; | |
6 | + // flex-direction: row; | |
7 | + // flex-wrap: nowrap; | |
8 | + align-content: normal; | |
9 | + align-items: center; | |
10 | + padding-bottom: 20px; | |
11 | +} | |
12 | + | |
13 | +.table-index td { | |
14 | + font-family: 'San Francisco', 'Helvetica Neue', Helvetica, Arial, | |
15 | + 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Heiti SC', | |
16 | + 'WenQuanYi Micro Hei', sans-serif; | |
17 | + font-size: 14px; | |
18 | +} | ... | ... |
src/services/definition.ts
... | ... | @@ -528,221 +528,6 @@ export interface ApiQueryOrderStatusCountsRequest { |
528 | 528 | uid?: number; |
529 | 529 | } |
530 | 530 | |
531 | -export interface ApplyInvoiceDto { | |
532 | - /** | |
533 | - * @description | |
534 | - * 备注 | |
535 | - */ | |
536 | - applyInvoicingNotes?: string; | |
537 | - /** | |
538 | - * @description | |
539 | - * 开票备注 | |
540 | - */ | |
541 | - comment?: string; | |
542 | - /** | |
543 | - * @description | |
544 | - * 联系人 | |
545 | - */ | |
546 | - contacts?: string; | |
547 | - /** | |
548 | - * @description | |
549 | - * 开票内容 | |
550 | - */ | |
551 | - content?: string; | |
552 | - createByName?: string; | |
553 | - /** @format date-time */ | |
554 | - createTime?: string; | |
555 | - failureReason?: string; | |
556 | - /** | |
557 | - * @description | |
558 | - * id | |
559 | - * @format int64 | |
560 | - */ | |
561 | - id?: number; | |
562 | - /** | |
563 | - * @description | |
564 | - * 发票地址 | |
565 | - */ | |
566 | - invoiceAddress?: string; | |
567 | - /** | |
568 | - * @description | |
569 | - * 发票明细 | |
570 | - */ | |
571 | - invoiceDetails?: Array<InvoiceDetail>; | |
572 | - /** | |
573 | - * @description | |
574 | - * 关联发票id | |
575 | - */ | |
576 | - invoiceId?: string; | |
577 | - /** | |
578 | - * @description | |
579 | - * 发票号码 | |
580 | - */ | |
581 | - invoiceNumber?: string; | |
582 | - /** | |
583 | - * @description | |
584 | - * 开票人 | |
585 | - */ | |
586 | - invoicingPerson?: string; | |
587 | - /** | |
588 | - * @description | |
589 | - * 开票时间 | |
590 | - * @format date-time | |
591 | - */ | |
592 | - invoicingTime?: string; | |
593 | - /** | |
594 | - * @description | |
595 | - * 开具类型 | |
596 | - */ | |
597 | - invoicingType?: string; | |
598 | - /** | |
599 | - * @description | |
600 | - * 开具类型 | |
601 | - */ | |
602 | - invoicingTypeText?: string; | |
603 | - /** @format date */ | |
604 | - invoicingdate?: string; | |
605 | - /** | |
606 | - * @description | |
607 | - * 是否加急 | |
608 | - */ | |
609 | - isUrgent?: boolean; | |
610 | - /** | |
611 | - * @description | |
612 | - * 是否加急文本 | |
613 | - */ | |
614 | - isUrgentText?: string; | |
615 | - logicDelete?: boolean; | |
616 | - /** | |
617 | - * @description | |
618 | - * 买方注册地址 | |
619 | - */ | |
620 | - partyAAddress?: string; | |
621 | - /** | |
622 | - * @description | |
623 | - * 买方开户行账号 | |
624 | - */ | |
625 | - partyABankAccount?: string; | |
626 | - /** | |
627 | - * @description | |
628 | - * 买方名称 | |
629 | - */ | |
630 | - partyAName?: string; | |
631 | - /** | |
632 | - * @description | |
633 | - * 买方开户行 | |
634 | - */ | |
635 | - partyAOpenBank?: string; | |
636 | - /** | |
637 | - * @description | |
638 | - * 买方电话号码 | |
639 | - */ | |
640 | - partyAPhoneNumber?: string; | |
641 | - /** | |
642 | - * @description | |
643 | - * 买方税号 | |
644 | - */ | |
645 | - partyATaxid?: string; | |
646 | - /** | |
647 | - * @description | |
648 | - * 抬头类型 | |
649 | - */ | |
650 | - partyAType?: string; | |
651 | - partyB?: string; | |
652 | - /** | |
653 | - * @description | |
654 | - * 卖方注册地址 | |
655 | - */ | |
656 | - partyBAddress?: string; | |
657 | - /** | |
658 | - * @description | |
659 | - * 卖方开户行账号 | |
660 | - */ | |
661 | - partyBBankAccount?: string; | |
662 | - /** | |
663 | - * @description | |
664 | - * 卖方名称 | |
665 | - */ | |
666 | - partyBName?: string; | |
667 | - /** | |
668 | - * @description | |
669 | - * 卖方开户行 | |
670 | - */ | |
671 | - partyBOpenBank?: string; | |
672 | - /** | |
673 | - * @description | |
674 | - * 卖方电话号码 | |
675 | - */ | |
676 | - partyBPhoneNumber?: string; | |
677 | - /** | |
678 | - * @description | |
679 | - * 卖方税号 | |
680 | - */ | |
681 | - partyBTaxid?: string; | |
682 | - /** | |
683 | - * @description | |
684 | - * 发票金额 | |
685 | - * @format double | |
686 | - */ | |
687 | - price?: number; | |
688 | - /** | |
689 | - * @description | |
690 | - * 接收邮箱地址 | |
691 | - */ | |
692 | - receiveEmail?: string; | |
693 | - /** | |
694 | - * @description | |
695 | - * 订单来源 | |
696 | - */ | |
697 | - salesCodes?: Array<string>; | |
698 | - /** | |
699 | - * @description | |
700 | - * 订单来源 | |
701 | - */ | |
702 | - salesCodesText?: string; | |
703 | - /** | |
704 | - * @description | |
705 | - * 开票状态 | |
706 | - */ | |
707 | - status?: string; | |
708 | - /** | |
709 | - * @description | |
710 | - * 开票状态 | |
711 | - */ | |
712 | - statusText?: string; | |
713 | - /** | |
714 | - * @description | |
715 | - * 子订单id | |
716 | - */ | |
717 | - subOrderIds?: Array<number>; | |
718 | - /** | |
719 | - * @description | |
720 | - * 关联订单 | |
721 | - */ | |
722 | - subOrders?: Array<SubOrder>; | |
723 | - /** @format double */ | |
724 | - totalPrice?: number; | |
725 | - totalPriceText?: string; | |
726 | - /** | |
727 | - * @description | |
728 | - * 开票类型 | |
729 | - */ | |
730 | - type?: string; | |
731 | - /** | |
732 | - * @description | |
733 | - * 开票类型文本 | |
734 | - */ | |
735 | - typeText?: string; | |
736 | - /** | |
737 | - * @description | |
738 | - * 用户id | |
739 | - */ | |
740 | - uid?: string; | |
741 | - updateByName?: string; | |
742 | - /** @format date-time */ | |
743 | - updateTime?: string; | |
744 | -} | |
745 | - | |
746 | 531 | export interface AuditDto { |
747 | 532 | /** |
748 | 533 | * @description |
... | ... | @@ -1061,6 +846,13 @@ export interface DictionaryVO { |
1061 | 846 | sort?: number; |
1062 | 847 | } |
1063 | 848 | |
849 | +export interface DistrictDo { | |
850 | + /** @format int32 */ | |
851 | + level?: number; | |
852 | + /** @format int32 */ | |
853 | + pid?: number; | |
854 | +} | |
855 | + | |
1064 | 856 | export interface Entry { |
1065 | 857 | bankAccount?: string; |
1066 | 858 | bankName?: string; |
... | ... | @@ -1169,396 +961,23 @@ export interface InvoiceDto { |
1169 | 961 | * @description |
1170 | 962 | * 销售 |
1171 | 963 | */ |
1172 | - sale?: string; | |
1173 | - /** | |
1174 | - * @description | |
1175 | - * 状态 | |
1176 | - */ | |
1177 | - status?: string; | |
1178 | -} | |
1179 | - | |
1180 | -export interface InvoiceRecordDto { | |
1181 | - applyInvoicingNotes?: string; | |
1182 | - /** | |
1183 | - * @description | |
1184 | - * 开票备注 | |
1185 | - */ | |
1186 | - comment?: string; | |
1187 | - /** | |
1188 | - * @description | |
1189 | - * 联系人 | |
1190 | - */ | |
1191 | - contacts?: string; | |
1192 | - /** | |
1193 | - * @description | |
1194 | - * 开票内容 | |
1195 | - */ | |
1196 | - content?: string; | |
1197 | - createByName?: string; | |
1198 | - /** @format date-time */ | |
1199 | - createTime?: string; | |
1200 | - failureReason?: string; | |
1201 | - /** | |
1202 | - * @description | |
1203 | - * id | |
1204 | - * @format int64 | |
1205 | - */ | |
1206 | - id?: number; | |
1207 | - /** | |
1208 | - * @description | |
1209 | - * 发票地址 | |
1210 | - */ | |
1211 | - invoiceAddress?: string; | |
1212 | - /** | |
1213 | - * @description | |
1214 | - * 发票明细 | |
1215 | - */ | |
1216 | - invoiceDetails?: Array<InvoiceDetail>; | |
1217 | - /** | |
1218 | - * @description | |
1219 | - * 关联发票id | |
1220 | - */ | |
1221 | - invoiceId?: string; | |
1222 | - /** | |
1223 | - * @description | |
1224 | - * 发票号码 | |
1225 | - */ | |
1226 | - invoiceNumber?: string; | |
1227 | - /** | |
1228 | - * @description | |
1229 | - * 开票人 | |
1230 | - */ | |
1231 | - invoicingPerson?: string; | |
1232 | - /** | |
1233 | - * @description | |
1234 | - * 开票时间 | |
1235 | - * @format date-time | |
1236 | - */ | |
1237 | - invoicingTime?: string; | |
1238 | - /** | |
1239 | - * @description | |
1240 | - * 开具类型 | |
1241 | - */ | |
1242 | - invoicingType?: string; | |
1243 | - /** | |
1244 | - * @description | |
1245 | - * 开具类型 | |
1246 | - */ | |
1247 | - invoicingTypeText?: string; | |
1248 | - /** @format date */ | |
1249 | - invoicingdate?: string; | |
1250 | - /** | |
1251 | - * @description | |
1252 | - * 是否加急 | |
1253 | - */ | |
1254 | - isUrgent?: boolean; | |
1255 | - /** | |
1256 | - * @description | |
1257 | - * 是否加急文本 | |
1258 | - */ | |
1259 | - isUrgentText?: string; | |
1260 | - logicDelete?: boolean; | |
1261 | - /** | |
1262 | - * @description | |
1263 | - * 买方注册地址 | |
1264 | - */ | |
1265 | - partyAAddress?: string; | |
1266 | - /** | |
1267 | - * @description | |
1268 | - * 买方开户行账号 | |
1269 | - */ | |
1270 | - partyABankAccount?: string; | |
1271 | - /** | |
1272 | - * @description | |
1273 | - * 买方名称 | |
1274 | - */ | |
1275 | - partyAName?: string; | |
1276 | - /** | |
1277 | - * @description | |
1278 | - * 买方开户行 | |
1279 | - */ | |
1280 | - partyAOpenBank?: string; | |
1281 | - /** | |
1282 | - * @description | |
1283 | - * 买方电话号码 | |
1284 | - */ | |
1285 | - partyAPhoneNumber?: string; | |
1286 | - /** | |
1287 | - * @description | |
1288 | - * 买方税号 | |
1289 | - */ | |
1290 | - partyATaxid?: string; | |
1291 | - /** | |
1292 | - * @description | |
1293 | - * 抬头类型 | |
1294 | - */ | |
1295 | - partyAType?: string; | |
1296 | - partyB?: string; | |
1297 | - /** | |
1298 | - * @description | |
1299 | - * 卖方注册地址 | |
1300 | - */ | |
1301 | - partyBAddress?: string; | |
1302 | - /** | |
1303 | - * @description | |
1304 | - * 卖方开户行账号 | |
1305 | - */ | |
1306 | - partyBBankAccount?: string; | |
1307 | - /** | |
1308 | - * @description | |
1309 | - * 卖方名称 | |
1310 | - */ | |
1311 | - partyBName?: string; | |
1312 | - /** | |
1313 | - * @description | |
1314 | - * 卖方开户行 | |
1315 | - */ | |
1316 | - partyBOpenBank?: string; | |
1317 | - /** | |
1318 | - * @description | |
1319 | - * 卖方电话号码 | |
1320 | - */ | |
1321 | - partyBPhoneNumber?: string; | |
1322 | - /** | |
1323 | - * @description | |
1324 | - * 卖方税号 | |
1325 | - */ | |
1326 | - partyBTaxid?: string; | |
1327 | - /** | |
1328 | - * @description | |
1329 | - * 发票金额 | |
1330 | - * @format double | |
1331 | - */ | |
1332 | - price?: number; | |
1333 | - /** | |
1334 | - * @description | |
1335 | - * 接收邮箱地址 | |
1336 | - */ | |
1337 | - receiveEmail?: string; | |
1338 | - /** | |
1339 | - * @description | |
1340 | - * 订单来源 | |
1341 | - */ | |
1342 | - salesCodes?: Array<string>; | |
1343 | - /** | |
1344 | - * @description | |
1345 | - * 订单来源 | |
1346 | - */ | |
1347 | - salesCodesText?: string; | |
1348 | - /** | |
1349 | - * @description | |
1350 | - * 开票状态 | |
1351 | - */ | |
1352 | - status?: string; | |
1353 | - /** | |
1354 | - * @description | |
1355 | - * 开票状态 | |
1356 | - */ | |
1357 | - statusText?: string; | |
1358 | - /** | |
1359 | - * @description | |
1360 | - * 子订单id | |
1361 | - */ | |
1362 | - subOrderIds?: Array<number>; | |
1363 | - /** | |
1364 | - * @description | |
1365 | - * 关联订单 | |
1366 | - */ | |
1367 | - subOrders?: Array<SubOrder>; | |
1368 | - /** @format double */ | |
1369 | - totalPrice?: number; | |
1370 | - totalPriceText?: string; | |
1371 | - /** | |
1372 | - * @description | |
1373 | - * 开票类型 | |
1374 | - */ | |
1375 | - type?: string; | |
1376 | - /** | |
1377 | - * @description | |
1378 | - * 开票类型文本 | |
1379 | - */ | |
1380 | - typeText?: string; | |
1381 | - /** | |
1382 | - * @description | |
1383 | - * 用户id | |
1384 | - */ | |
1385 | - uid?: string; | |
1386 | - updateByName?: string; | |
1387 | - /** @format date-time */ | |
1388 | - updateTime?: string; | |
1389 | -} | |
1390 | - | |
1391 | -export interface InvoiceRecordQueryRequest { | |
1392 | - /** | |
1393 | - * @description | |
1394 | - * 联系人 | |
1395 | - */ | |
1396 | - contactsLike?: string; | |
1397 | - /** @format date-time */ | |
1398 | - createTimeGe?: string; | |
1399 | - /** @format date-time */ | |
1400 | - createTimeLe?: string; | |
1401 | - /** @format int32 */ | |
1402 | - current?: number; | |
1403 | - /** @format int32 */ | |
1404 | - end?: number; | |
1405 | - /** | |
1406 | - * @description | |
1407 | - * id | |
1408 | - * @format int64 | |
1409 | - */ | |
1410 | - id?: number; | |
1411 | - /** | |
1412 | - * @description | |
1413 | - * IdIn | |
1414 | - */ | |
1415 | - idIn?: Array<number>; | |
1416 | - /** | |
1417 | - * @description | |
1418 | - * 关联发票id | |
1419 | - */ | |
1420 | - invoiceId?: string; | |
1421 | - /** | |
1422 | - * @description | |
1423 | - * 发票号码 | |
1424 | - */ | |
1425 | - invoiceNumber?: string; | |
1426 | - /** | |
1427 | - * @description | |
1428 | - * 发票号码 | |
1429 | - */ | |
1430 | - invoiceNumberLike?: string; | |
1431 | - /** | |
1432 | - * @description | |
1433 | - * 开票时间 | |
1434 | - * @format date-time | |
1435 | - */ | |
1436 | - invoicingTimeGe?: string; | |
1437 | - /** | |
1438 | - * @description | |
1439 | - * 开票时间 | |
1440 | - * @format date-time | |
1441 | - */ | |
1442 | - invoicingTimeLe?: string; | |
1443 | - /** | |
1444 | - * @description | |
1445 | - * 开票类型 | |
1446 | - */ | |
1447 | - invoicingType?: string; | |
1448 | - /** | |
1449 | - * @description | |
1450 | - * 是否加急 | |
1451 | - */ | |
1452 | - isUrgent?: boolean; | |
1453 | - /** | |
1454 | - * @description | |
1455 | - * 订单号 | |
1456 | - * @format int64 | |
1457 | - */ | |
1458 | - mainOrderId?: number; | |
1459 | - /** | |
1460 | - * @description | |
1461 | - * 主订单idIn | |
1462 | - */ | |
1463 | - mainOrderIdIn?: Array<number>; | |
1464 | - /** | |
1465 | - * @description | |
1466 | - * 订单号 | |
1467 | - */ | |
1468 | - mainOrderIdLike?: string; | |
1469 | - /** | |
1470 | - * @description | |
1471 | - * 是否需要构建发票明细 | |
1472 | - */ | |
1473 | - needBuildDetails?: boolean; | |
1474 | - /** | |
1475 | - * @description | |
1476 | - * 是否需要构建发票明细 | |
1477 | - */ | |
1478 | - needBuildSubOrders?: boolean; | |
1479 | - /** @format int32 */ | |
1480 | - pageSize?: number; | |
1481 | - /** | |
1482 | - * @description | |
1483 | - * 买方名称 | |
1484 | - */ | |
1485 | - partyANameLike?: string; | |
1486 | - /** | |
1487 | - * @description | |
1488 | - * 买方电话号码 | |
1489 | - */ | |
1490 | - partyAPhoneNumberLike?: string; | |
1491 | - /** | |
1492 | - * @description | |
1493 | - * 买方税号 | |
1494 | - */ | |
1495 | - partyATaxid?: string; | |
1496 | - /** | |
1497 | - * @description | |
1498 | - * 买方税号 | |
1499 | - */ | |
1500 | - partyATaxidLike?: string; | |
1501 | - partyB?: string; | |
1502 | - /** | |
1503 | - * @description | |
1504 | - * 卖方名称 | |
1505 | - */ | |
1506 | - partyBName?: string; | |
1507 | - /** | |
1508 | - * @description | |
1509 | - * 销售代表 | |
1510 | - */ | |
1511 | - salesCode?: string; | |
1512 | - /** | |
1513 | - * @description | |
1514 | - * 销售代表 | |
1515 | - */ | |
1516 | - salesCodeLike?: string; | |
1517 | - /** @format int32 */ | |
1518 | - start?: number; | |
1519 | - /** | |
1520 | - * @description | |
1521 | - * 发票状态 | |
1522 | - */ | |
1523 | - status?: string; | |
1524 | - /** | |
1525 | - * @description | |
1526 | - * 状态非空 | |
1527 | - */ | |
1528 | - statusIn?: Array<string>; | |
1529 | - /** | |
1530 | - * @description | |
1531 | - * 状态非空 | |
1532 | - */ | |
1533 | - statusIsNotNull?: boolean; | |
1534 | - /** | |
1535 | - * @description | |
1536 | - * 状态为空 | |
1537 | - */ | |
1538 | - statusIsNull?: boolean; | |
1539 | - /** | |
1540 | - * @description | |
1541 | - * 子订单 | |
1542 | - * @format int64 | |
1543 | - */ | |
1544 | - subOrderId?: number; | |
1545 | - /** | |
1546 | - * @description | |
1547 | - * 子订单idIn | |
1548 | - */ | |
1549 | - subOrderIdIn?: Array<number>; | |
1550 | - /** | |
1551 | - * @description | |
1552 | - * 子订单 | |
1553 | - */ | |
1554 | - subOrderIdLike?: string; | |
1555 | - /** @format int32 */ | |
1556 | - total?: number; | |
964 | + sale?: string; | |
1557 | 965 | /** |
1558 | 966 | * @description |
1559 | - * 开票类型 | |
967 | + * 状态 | |
1560 | 968 | */ |
1561 | - type?: string; | |
969 | + status?: string; | |
970 | +} | |
971 | + | |
972 | +export interface InvoiceRecordQueryRequest { | |
973 | + /** @format date */ | |
974 | + createTimeGe?: string; | |
975 | + /** @format date */ | |
976 | + createTimeLe?: string; | |
977 | + /** @format int32 */ | |
978 | + pageNumber?: number; | |
979 | + /** @format int32 */ | |
980 | + pageSize?: number; | |
1562 | 981 | /** |
1563 | 982 | * @description |
1564 | 983 | * 用户id |
... | ... | @@ -1581,14 +1000,6 @@ export interface ItemSaItem { |
1581 | 1000 | |
1582 | 1001 | export interface MainOrderqueryRequest { |
1583 | 1002 | afterInvoicingStatusIsNull?: boolean; |
1584 | - /** @format date */ | |
1585 | - createDateGe?: string; | |
1586 | - /** @format date */ | |
1587 | - createDateLe?: string; | |
1588 | - /** @format date-time */ | |
1589 | - createTimeGe?: string; | |
1590 | - /** @format date-time */ | |
1591 | - createTimeLe?: string; | |
1592 | 1003 | orderStatusNotIn?: Array<string>; |
1593 | 1004 | /** @format int32 */ |
1594 | 1005 | pageNumber?: number; |
... | ... | @@ -2329,198 +1740,6 @@ export interface QueryInvoiceDetailDto { |
2329 | 1740 | invoiceId?: number; |
2330 | 1741 | } |
2331 | 1742 | |
2332 | -export interface QueryInvoiceProjectDto { | |
2333 | - /** @format int32 */ | |
2334 | - current?: number; | |
2335 | - /** @format int32 */ | |
2336 | - end?: number; | |
2337 | - nameLike?: string; | |
2338 | - /** @format int32 */ | |
2339 | - pageSize?: number; | |
2340 | - /** @format int32 */ | |
2341 | - start?: number; | |
2342 | - /** @format int32 */ | |
2343 | - total?: number; | |
2344 | -} | |
2345 | - | |
2346 | -export interface QueryInvoiceRecordDto { | |
2347 | - /** | |
2348 | - * @description | |
2349 | - * 联系人 | |
2350 | - */ | |
2351 | - contactsLike?: string; | |
2352 | - /** @format date-time */ | |
2353 | - createTimeGe?: string; | |
2354 | - /** @format date-time */ | |
2355 | - createTimeLe?: string; | |
2356 | - /** @format int32 */ | |
2357 | - current?: number; | |
2358 | - /** @format int32 */ | |
2359 | - end?: number; | |
2360 | - /** | |
2361 | - * @description | |
2362 | - * id | |
2363 | - * @format int64 | |
2364 | - */ | |
2365 | - id?: number; | |
2366 | - /** | |
2367 | - * @description | |
2368 | - * IdIn | |
2369 | - */ | |
2370 | - idIn?: Array<number>; | |
2371 | - /** | |
2372 | - * @description | |
2373 | - * 关联发票id | |
2374 | - */ | |
2375 | - invoiceId?: string; | |
2376 | - /** | |
2377 | - * @description | |
2378 | - * 发票号码 | |
2379 | - */ | |
2380 | - invoiceNumber?: string; | |
2381 | - /** | |
2382 | - * @description | |
2383 | - * 发票号码 | |
2384 | - */ | |
2385 | - invoiceNumberLike?: string; | |
2386 | - /** | |
2387 | - * @description | |
2388 | - * 开票时间 | |
2389 | - * @format date-time | |
2390 | - */ | |
2391 | - invoicingTimeGe?: string; | |
2392 | - /** | |
2393 | - * @description | |
2394 | - * 开票时间 | |
2395 | - * @format date-time | |
2396 | - */ | |
2397 | - invoicingTimeLe?: string; | |
2398 | - /** | |
2399 | - * @description | |
2400 | - * 开票类型 | |
2401 | - */ | |
2402 | - invoicingType?: string; | |
2403 | - /** | |
2404 | - * @description | |
2405 | - * 是否加急 | |
2406 | - */ | |
2407 | - isUrgent?: boolean; | |
2408 | - /** | |
2409 | - * @description | |
2410 | - * 订单号 | |
2411 | - * @format int64 | |
2412 | - */ | |
2413 | - mainOrderId?: number; | |
2414 | - /** | |
2415 | - * @description | |
2416 | - * 主订单idIn | |
2417 | - */ | |
2418 | - mainOrderIdIn?: Array<number>; | |
2419 | - /** | |
2420 | - * @description | |
2421 | - * 订单号 | |
2422 | - */ | |
2423 | - mainOrderIdLike?: string; | |
2424 | - /** | |
2425 | - * @description | |
2426 | - * 是否需要构建发票明细 | |
2427 | - */ | |
2428 | - needBuildDetails?: boolean; | |
2429 | - /** | |
2430 | - * @description | |
2431 | - * 是否需要构建发票明细 | |
2432 | - */ | |
2433 | - needBuildSubOrders?: boolean; | |
2434 | - /** @format int32 */ | |
2435 | - pageSize?: number; | |
2436 | - /** | |
2437 | - * @description | |
2438 | - * 买方名称 | |
2439 | - */ | |
2440 | - partyANameLike?: string; | |
2441 | - /** | |
2442 | - * @description | |
2443 | - * 买方电话号码 | |
2444 | - */ | |
2445 | - partyAPhoneNumberLike?: string; | |
2446 | - /** | |
2447 | - * @description | |
2448 | - * 买方税号 | |
2449 | - */ | |
2450 | - partyATaxid?: string; | |
2451 | - /** | |
2452 | - * @description | |
2453 | - * 买方税号 | |
2454 | - */ | |
2455 | - partyATaxidLike?: string; | |
2456 | - partyB?: string; | |
2457 | - /** | |
2458 | - * @description | |
2459 | - * 卖方名称 | |
2460 | - */ | |
2461 | - partyBName?: string; | |
2462 | - /** | |
2463 | - * @description | |
2464 | - * 销售代表 | |
2465 | - */ | |
2466 | - salesCode?: string; | |
2467 | - /** | |
2468 | - * @description | |
2469 | - * 销售代表 | |
2470 | - */ | |
2471 | - salesCodeLike?: string; | |
2472 | - /** @format int32 */ | |
2473 | - start?: number; | |
2474 | - /** | |
2475 | - * @description | |
2476 | - * 发票状态 | |
2477 | - */ | |
2478 | - status?: string; | |
2479 | - /** | |
2480 | - * @description | |
2481 | - * 状态非空 | |
2482 | - */ | |
2483 | - statusIn?: Array<string>; | |
2484 | - /** | |
2485 | - * @description | |
2486 | - * 状态非空 | |
2487 | - */ | |
2488 | - statusIsNotNull?: boolean; | |
2489 | - /** | |
2490 | - * @description | |
2491 | - * 状态为空 | |
2492 | - */ | |
2493 | - statusIsNull?: boolean; | |
2494 | - /** | |
2495 | - * @description | |
2496 | - * 子订单 | |
2497 | - * @format int64 | |
2498 | - */ | |
2499 | - subOrderId?: number; | |
2500 | - /** | |
2501 | - * @description | |
2502 | - * 子订单idIn | |
2503 | - */ | |
2504 | - subOrderIdIn?: Array<number>; | |
2505 | - /** | |
2506 | - * @description | |
2507 | - * 子订单 | |
2508 | - */ | |
2509 | - subOrderIdLike?: string; | |
2510 | - /** @format int32 */ | |
2511 | - total?: number; | |
2512 | - /** | |
2513 | - * @description | |
2514 | - * 开票类型 | |
2515 | - */ | |
2516 | - type?: string; | |
2517 | - /** | |
2518 | - * @description | |
2519 | - * 用户id | |
2520 | - */ | |
2521 | - uid?: string; | |
2522 | -} | |
2523 | - | |
2524 | 1743 | export interface QueryMainOrderDto { |
2525 | 1744 | /** |
2526 | 1745 | * @description |
... | ... | @@ -2551,7 +1770,7 @@ export interface QueryReportFormsDto { |
2551 | 1770 | * @description |
2552 | 1771 | * 销售代表 |
2553 | 1772 | */ |
2554 | - salesCode?: string; | |
1773 | + salesCode?: Array<string>; | |
2555 | 1774 | /** |
2556 | 1775 | * @description |
2557 | 1776 | * 统计方式 |
... | ... | @@ -2604,128 +1823,6 @@ export interface ShippingWarehouseChangeDto { |
2604 | 1823 | shippingWarehouse?: string; |
2605 | 1824 | } |
2606 | 1825 | |
2607 | -export interface SubOrder { | |
2608 | - afterInvoicingStatus?: string; | |
2609 | - /** @format date-time */ | |
2610 | - afterInvoicingStatusUpdateTime?: string; | |
2611 | - afterSalesAnnex?: string; | |
2612 | - afterSalesNotes?: string; | |
2613 | - afterSalesPlan?: string; | |
2614 | - annex?: string; | |
2615 | - applyInvoicingAnnex?: string; | |
2616 | - applyInvoicingNotes?: string; | |
2617 | - /** @format date-time */ | |
2618 | - applyTime?: string; | |
2619 | - /** @format int32 */ | |
2620 | - attrId?: number; | |
2621 | - checkNotes?: string; | |
2622 | - /** @format date-time */ | |
2623 | - collectMoneyTime?: string; | |
2624 | - confirmDeliverNotes?: string; | |
2625 | - confirmReissueNotes?: string; | |
2626 | - createByName?: string; | |
2627 | - /** @format date-time */ | |
2628 | - createTime?: string; | |
2629 | - /** @format date-time */ | |
2630 | - deadline?: string; | |
2631 | - ext?: string; | |
2632 | - extendField?: string; | |
2633 | - /** @format date-time */ | |
2634 | - financialReceiptIssuanceTime?: string; | |
2635 | - fullPaymentStatus?: string; | |
2636 | - /** @format double */ | |
2637 | - goodsVolume?: number; | |
2638 | - /** @format double */ | |
2639 | - goodsWeight?: number; | |
2640 | - /** @format int64 */ | |
2641 | - id?: number; | |
2642 | - image?: string; | |
2643 | - invoiceApplyUsername?: string; | |
2644 | - invoiceInformation?: string; | |
2645 | - /** @format int64 */ | |
2646 | - invoiceRecordId?: number; | |
2647 | - invoicingCheckAnnex?: string; | |
2648 | - invoicingNotes?: string; | |
2649 | - invoicingStatus?: string; | |
2650 | - /** @format date-time */ | |
2651 | - invoicingTime?: string; | |
2652 | - invoicingUrgentCause?: string; | |
2653 | - isUrgent?: boolean; | |
2654 | - kingdeeErrorMessage?: string; | |
2655 | - logicDelete?: boolean; | |
2656 | - logisticsMethod?: string; | |
2657 | - logisticsNotes?: string; | |
2658 | - /** @format int64 */ | |
2659 | - mainOrderAmountProportion?: number; | |
2660 | - /** @format int64 */ | |
2661 | - mainOrderId?: number; | |
2662 | - materialId?: string; | |
2663 | - modified?: boolean; | |
2664 | - modifiedAuditNotes?: string; | |
2665 | - modifiedAuditStatus?: string; | |
2666 | - modifiedOptFlag?: string; | |
2667 | - nextOrderStatus?: string; | |
2668 | - notes?: string; | |
2669 | - orderStatus?: string; | |
2670 | - orderStatusBeforeModify?: string; | |
2671 | - /** @format date-time */ | |
2672 | - orderStatusUpdateTime?: string; | |
2673 | - /** @format int32 */ | |
2674 | - packageNumber?: number; | |
2675 | - parameters?: string; | |
2676 | - paymentChannel?: string; | |
2677 | - paymentMethod?: string; | |
2678 | - paymentReceiptAnnex?: string; | |
2679 | - paymentReceiptNotes?: string; | |
2680 | - paymentReceiptStatus?: string; | |
2681 | - paymentStatus?: string; | |
2682 | - paymentTransactionId?: string; | |
2683 | - postAuditNotes?: string; | |
2684 | - postAuditStatus?: string; | |
2685 | - /** @format date-time */ | |
2686 | - postAuditStatusUpdateTime?: string; | |
2687 | - preAfterInvoicingStatus?: string; | |
2688 | - procureConvertNotes?: string; | |
2689 | - procureNotes?: string; | |
2690 | - /** @format date-time */ | |
2691 | - procureOrderDatetime?: string; | |
2692 | - procureOrderStatus?: string; | |
2693 | - productBelongBusiness?: string; | |
2694 | - productCode?: string; | |
2695 | - /** @format int32 */ | |
2696 | - productId?: number; | |
2697 | - productName?: string; | |
2698 | - /** @format int64 */ | |
2699 | - productPrice?: number; | |
2700 | - /** @format date-time */ | |
2701 | - productionEndTime?: string; | |
2702 | - /** @format date-time */ | |
2703 | - productionStartTime?: string; | |
2704 | - productionTimePushStatus?: string; | |
2705 | - /** @format int32 */ | |
2706 | - quantity?: number; | |
2707 | - receivingCompany?: string; | |
2708 | - reissueNotes?: string; | |
2709 | - serialNumber?: string; | |
2710 | - shippingWarehouse?: string; | |
2711 | - /** @format int64 */ | |
2712 | - subOrderPayment?: number; | |
2713 | - supplierName?: string; | |
2714 | - supplierNotes?: string; | |
2715 | - /** @format int64 */ | |
2716 | - totalPayment?: number; | |
2717 | - /** @format int32 */ | |
2718 | - uid?: number; | |
2719 | - unit?: string; | |
2720 | - unitId?: string; | |
2721 | - updateByName?: string; | |
2722 | - /** @format date-time */ | |
2723 | - updateTime?: string; | |
2724 | - urgentInvoiceAuditNotes?: string; | |
2725 | - /** @format int32 */ | |
2726 | - version?: number; | |
2727 | -} | |
2728 | - | |
2729 | 1826 | export interface SysLogQueryVO { |
2730 | 1827 | address?: string; |
2731 | 1828 | browser?: string; |
... | ... | @@ -3039,44 +2136,6 @@ export interface TsgFile { |
3039 | 2136 | writable?: boolean; |
3040 | 2137 | } |
3041 | 2138 | |
3042 | -export interface InvoiceDetail { | |
3043 | - /** @format int64 */ | |
3044 | - id?: number; | |
3045 | - /** | |
3046 | - * @description | |
3047 | - * 发票id | |
3048 | - * @format int64 | |
3049 | - */ | |
3050 | - invoiceRecordId?: number; | |
3051 | - /** | |
3052 | - * @description | |
3053 | - * 单价 | |
3054 | - * @format double | |
3055 | - */ | |
3056 | - price?: number; | |
3057 | - projectName?: string; | |
3058 | - /** @format double */ | |
3059 | - quantity?: number; | |
3060 | - /** | |
3061 | - * @description | |
3062 | - * 型号 | |
3063 | - */ | |
3064 | - specification?: string; | |
3065 | - /** @format int64 */ | |
3066 | - subOrderId?: number; | |
3067 | - /** @format double */ | |
3068 | - taxPrice?: number; | |
3069 | - /** @format double */ | |
3070 | - taxRate?: number; | |
3071 | - /** | |
3072 | - * @description | |
3073 | - * 总价 | |
3074 | - * @format double | |
3075 | - */ | |
3076 | - totalPrice?: number; | |
3077 | - unit?: string; | |
3078 | -} | |
3079 | - | |
3080 | 2139 | export interface SalesRechargePrepaymentAuditRequest { |
3081 | 2140 | /** |
3082 | 2141 | * @description | ... | ... |