Commit b31916ea3003d11f9ebc0a28159acfa0a3f78bba
Merge branch 'productCollect'
Showing
15 changed files
with
2241 additions
and
82 deletions
.umirc.ts
... | ... | @@ -151,10 +151,28 @@ export default defineConfig({ |
151 | 151 | access: 'canReadAdmin', |
152 | 152 | }, |
153 | 153 | { |
154 | - name: '礼品申领', | |
155 | - path: '/productCollectBill', | |
156 | - component: './productCollectBill', | |
154 | + name: '礼品管理', | |
155 | + path: '/product', | |
157 | 156 | icon: 'BookOutlined', |
157 | + routes: [ | |
158 | + { | |
159 | + name: '礼品采购', | |
160 | + path: 'procure', | |
161 | + access: 'canReadProductManagerAndProcureAndAdmin', | |
162 | + component: './product/procure', | |
163 | + }, | |
164 | + { | |
165 | + name: '礼品库存', | |
166 | + path: 'product', | |
167 | + access: 'canReadProductManagerAndAdmin', | |
168 | + component: './product/product', | |
169 | + }, | |
170 | + { | |
171 | + name: '礼品申领', | |
172 | + path: 'productCollect', | |
173 | + component: './product/productCollect', | |
174 | + }, | |
175 | + ], | |
158 | 176 | }, |
159 | 177 | { |
160 | 178 | name: '客户管理', | ... | ... |
README.md
src/access.ts
... | ... | @@ -11,6 +11,7 @@ export default (initialState: API.UserInfo) => { |
11 | 11 | const canReadSales = |
12 | 12 | roles?.includes('SALES_MANAGER') || roles?.includes('SALES_REPRESENTATIVE'); |
13 | 13 | const canReadSalesManager = roles?.includes('SALES_MANAGER'); |
14 | + const canReadProductManager = roles?.includes('PRODUCT_MANAGER'); | |
14 | 15 | return { |
15 | 16 | canReadAdmin: canReadAdmin, |
16 | 17 | canReadProcure: canReadProcure || canReadAdmin, |
... | ... | @@ -25,5 +26,8 @@ export default (initialState: API.UserInfo) => { |
25 | 26 | canReadAdminAndSalesManager: canReadAdmin || canReadSalesManager, |
26 | 27 | canReadAdminAndSalesAndWarehouseKeeper: |
27 | 28 | canReadAdmin || canReadSales || canReadWarehouseKeeper, |
29 | + canReadProductManagerAndProcureAndAdmin: | |
30 | + canReadAdmin || canReadProductManager || canReadProcure, | |
31 | + canReadProductManagerAndAdmin: canReadAdmin || canReadProductManager, | |
28 | 32 | }; |
29 | 33 | }; | ... | ... |
src/models/enum.ts
... | ... | @@ -3,6 +3,7 @@ import { |
3 | 3 | postServiceConstInvoiceReissueRecordStatus, |
4 | 4 | postServiceConstPayees, |
5 | 5 | postServiceConstProductCollectBillStatus, |
6 | + postServiceConstProducts, | |
6 | 7 | postServiceConstStores, |
7 | 8 | } from '@/services'; |
8 | 9 | import { useCallback } from 'react'; |
... | ... | @@ -28,11 +29,16 @@ export default () => { |
28 | 29 | const result = await postServiceConstStores(); |
29 | 30 | return result.data; |
30 | 31 | }, []); |
32 | + const getProducts = useCallback(async () => { | |
33 | + const res = await postServiceConstProducts(); | |
34 | + return res.data; | |
35 | + }, []); | |
31 | 36 | return { |
32 | 37 | getPayees, |
33 | 38 | getInvoiceReissueRecordStatus, |
34 | 39 | getInvoiceFlushStatus, |
35 | 40 | getProductCollectBillAuditStatus, |
36 | 41 | getWarehouse, |
42 | + getProducts, | |
37 | 43 | }; |
38 | 44 | }; | ... | ... |
src/pages/product/procure/components/AddOrUpdate.tsx
0 → 100644
1 | +import { | |
2 | + postOrderErpTicketsUpload, | |
3 | + postProcureBillAddOrModify, | |
4 | +} from '@/services'; | |
5 | +import { useModel } from '@@/exports'; | |
6 | +import { UploadOutlined } from '@ant-design/icons'; | |
7 | +import { | |
8 | + ActionType, | |
9 | + EditableProTable, | |
10 | + ModalForm, | |
11 | + ProCard, | |
12 | + ProColumns, | |
13 | + ProForm, | |
14 | + ProFormDependency, | |
15 | + ProFormField, | |
16 | + ProFormSwitch, | |
17 | + ProFormTextArea, | |
18 | +} from '@ant-design/pro-components'; | |
19 | +import { Button, Form, Upload, message } from 'antd'; | |
20 | +import React, { useEffect, useRef, useState } from 'react'; | |
21 | + | |
22 | +export default ({ record, onfinish }) => { | |
23 | + const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | |
24 | + const [controlled, setControlled] = useState<boolean>(false); | |
25 | + const [processedRecord, setProcessedRecord] = useState(record); | |
26 | + const formRef = useRef(null); | |
27 | + const editorFormRef = useRef(null); | |
28 | + const { getProducts } = useModel('enum'); | |
29 | + const actionRef = useRef<ActionType>(); | |
30 | + // 使用 useEffect 为 procureBillDetailList 中的每个元素添加 key | |
31 | + useEffect(() => { | |
32 | + if (record?.procureBillDetailList) { | |
33 | + const updatedProcureBillDetailList = record.procureBillDetailList.map( | |
34 | + (item) => ({ | |
35 | + ...item, | |
36 | + key: item.key || `key-${Math.random().toString(36).substr(2, 9)}`, // 动态生成唯一 key | |
37 | + }), | |
38 | + ); | |
39 | + setProcessedRecord({ | |
40 | + ...record, | |
41 | + procureBillDetailList: updatedProcureBillDetailList, | |
42 | + }); | |
43 | + } | |
44 | + }, [record]); | |
45 | + | |
46 | + const columns: ProColumns[] = [ | |
47 | + { | |
48 | + title: '商品', | |
49 | + dataIndex: 'productId', | |
50 | + valueType: 'select', | |
51 | + request: async () => { | |
52 | + const res = await getProducts(); | |
53 | + return res.map((item) => ({ | |
54 | + ...item, | |
55 | + label: item.name, | |
56 | + value: item.id, | |
57 | + productUnitName: item.baseUnitName, | |
58 | + productUnitPrice: item.unitPrice, | |
59 | + })); | |
60 | + }, | |
61 | + fieldProps: (_, { rowIndex }) => ({ | |
62 | + onSelect: (value, option) => { | |
63 | + console.log('option111111' + JSON.stringify(option)); | |
64 | + const currentTableData = editorFormRef.current?.getRowsData?.(); | |
65 | + if (currentTableData) { | |
66 | + const updatedData = [...currentTableData]; | |
67 | + updatedData[rowIndex] = { | |
68 | + ...updatedData[rowIndex], | |
69 | + productUnitName: option.productUnitName, | |
70 | + productUnitPrice: option.productUnitPrice, | |
71 | + }; | |
72 | + formRef.current?.setFieldsValue({ | |
73 | + procureBillDetailList: updatedData, | |
74 | + }); | |
75 | + } | |
76 | + }, | |
77 | + }), | |
78 | + }, | |
79 | + { | |
80 | + title: '单位', | |
81 | + dataIndex: 'productUnitName', | |
82 | + valueType: 'text', | |
83 | + editable: false, | |
84 | + }, | |
85 | + { | |
86 | + title: '单价', | |
87 | + dataIndex: 'productUnitPrice', | |
88 | + valueType: 'digit', | |
89 | + editable: false, | |
90 | + }, | |
91 | + { | |
92 | + title: '数量', | |
93 | + dataIndex: 'number', | |
94 | + valueType: 'digit', | |
95 | + }, | |
96 | + { | |
97 | + title: '备注', | |
98 | + dataIndex: 'notes', | |
99 | + valueType: 'textarea', | |
100 | + }, | |
101 | + { | |
102 | + title: '附件', | |
103 | + dataIndex: 'annexUpload', | |
104 | + renderFormItem: (_, { record }) => ( | |
105 | + <Upload | |
106 | + fileList={ | |
107 | + record.annexList?.map((url) => ({ | |
108 | + uid: url, | |
109 | + name: url.split('/').pop(), | |
110 | + status: 'done', | |
111 | + url, | |
112 | + })) || [] | |
113 | + } | |
114 | + onPreview={(file) => { | |
115 | + window.open(file.url || file.thumbUrl); // 打开文件预览 | |
116 | + }} | |
117 | + customRequest={async (options) => { | |
118 | + const { file, onSuccess, onError } = options; | |
119 | + | |
120 | + const formData = new FormData(); | |
121 | + formData.append('file', file); | |
122 | + | |
123 | + try { | |
124 | + const res = await postOrderErpTicketsUpload({ | |
125 | + data: formData, | |
126 | + headers: { 'Content-Type': 'multipart/form-data' }, | |
127 | + }); | |
128 | + | |
129 | + if (res.message === '成功') { | |
130 | + message.success(`${file.name} 上传成功`); | |
131 | + | |
132 | + // 更新文件列表 | |
133 | + const currentData = formRef.current?.getFieldValue( | |
134 | + 'procureBillDetailList', | |
135 | + ); | |
136 | + const currentRow = currentData.find( | |
137 | + (row) => row.key === record.key, | |
138 | + ); | |
139 | + const existingAnnex = currentRow?.annexList || []; // 取现有的 annex 数据 | |
140 | + | |
141 | + const updatedAnnex = [...existingAnnex, res.data]; // 合并新的文件 URL | |
142 | + | |
143 | + // 更新表单数据 | |
144 | + const updatedData = currentData.map((row) => | |
145 | + row.key === record.key | |
146 | + ? { ...row, annexList: updatedAnnex } | |
147 | + : row, | |
148 | + ); | |
149 | + formRef.current?.setFieldValue( | |
150 | + 'procureBillDetailList', | |
151 | + updatedData, | |
152 | + ); | |
153 | + | |
154 | + onSuccess?.('上传成功'); | |
155 | + } else { | |
156 | + message.error(`${file.name} 上传失败`); | |
157 | + onError?.(new Error('上传失败')); | |
158 | + } | |
159 | + } catch (error) { | |
160 | + message.error(`${file.name} 上传错误`); | |
161 | + onError?.(error); | |
162 | + } | |
163 | + }} | |
164 | + onRemove={(file) => { | |
165 | + const currentData = | |
166 | + formRef.current?.getFieldValue('procureBillDetailList') || []; | |
167 | + const updatedData = currentData.map((row) => { | |
168 | + if (row.key === record.key) { | |
169 | + return { | |
170 | + ...row, | |
171 | + annexList: row.annexList.filter((url) => url !== file.url), // 移除对应文件 URL | |
172 | + }; | |
173 | + } | |
174 | + return row; | |
175 | + }); | |
176 | + | |
177 | + formRef.current?.setFieldsValue({ | |
178 | + procureBillDetailList: updatedData, | |
179 | + }); | |
180 | + | |
181 | + // 触发状态更新 | |
182 | + setProcessedRecord((prevRecord) => ({ | |
183 | + ...prevRecord, | |
184 | + procureBillDetailList: updatedData, | |
185 | + })); | |
186 | + }} | |
187 | + > | |
188 | + <Button icon={<UploadOutlined />}>上传附件</Button> | |
189 | + </Upload> | |
190 | + ), | |
191 | + render: (_, record) => ( | |
192 | + <div> | |
193 | + {record.annexList?.map((url, index) => { | |
194 | + const shortName = | |
195 | + url.split('/').pop()?.slice(0, 15) || `附件 ${index + 1}`; | |
196 | + return ( | |
197 | + <a | |
198 | + key={index} | |
199 | + href={url} | |
200 | + target="_blank" | |
201 | + rel="noopener noreferrer" | |
202 | + title={url} // 悬停显示完整链接 | |
203 | + style={{ | |
204 | + display: 'block', | |
205 | + marginBottom: '4px', | |
206 | + whiteSpace: 'nowrap', | |
207 | + overflow: 'hidden', | |
208 | + textOverflow: 'ellipsis', | |
209 | + maxWidth: '200px', // 限制显示宽度 | |
210 | + }} | |
211 | + > | |
212 | + {shortName.length < url.split('/').pop()?.length | |
213 | + ? `${shortName}...` | |
214 | + : shortName} | |
215 | + </a> | |
216 | + ); | |
217 | + })} | |
218 | + </div> | |
219 | + ), | |
220 | + }, | |
221 | + { | |
222 | + title: '附件', | |
223 | + hideInTable: true, | |
224 | + dataIndex: 'annexList', | |
225 | + }, | |
226 | + { | |
227 | + title: '操作', | |
228 | + valueType: 'option', | |
229 | + render: (text, record, _, action) => [ | |
230 | + <a | |
231 | + key="editable" | |
232 | + onClick={() => { | |
233 | + action?.startEditable?.(record.key); | |
234 | + }} | |
235 | + > | |
236 | + 编辑 | |
237 | + </a>, | |
238 | + <a | |
239 | + key="delete" | |
240 | + onClick={() => { | |
241 | + const tableDataSource = formRef.current?.getFieldValue( | |
242 | + 'procureBillDetailList', | |
243 | + ); | |
244 | + formRef.current?.setFieldsValue({ | |
245 | + table: tableDataSource.filter((item) => item.key !== record.key), | |
246 | + }); | |
247 | + }} | |
248 | + > | |
249 | + 删除 | |
250 | + </a>, | |
251 | + ], | |
252 | + }, | |
253 | + ]; | |
254 | + | |
255 | + const [form] = Form.useForm(); | |
256 | + return ( | |
257 | + <ModalForm | |
258 | + formRef={formRef} | |
259 | + initialValues={processedRecord} | |
260 | + validateTrigger="onBlur" | |
261 | + title="新建表单" | |
262 | + trigger={ | |
263 | + record?.id ? ( | |
264 | + <Button type="link">修改</Button> | |
265 | + ) : ( | |
266 | + <Button type="primary">新建</Button> | |
267 | + ) | |
268 | + } | |
269 | + form={form} | |
270 | + autoFocusFirstInput | |
271 | + width={1500} | |
272 | + modalProps={{ | |
273 | + destroyOnClose: true, | |
274 | + onCancel: () => console.log('run'), | |
275 | + }} | |
276 | + submitTimeout={2000} | |
277 | + onFinish={async (values) => { | |
278 | + const res = await postProcureBillAddOrModify({ | |
279 | + data: { | |
280 | + ...record, | |
281 | + ...values, | |
282 | + }, | |
283 | + }); | |
284 | + if (res) { | |
285 | + message.success(res.message); | |
286 | + onfinish(); | |
287 | + } | |
288 | + return true; | |
289 | + }} | |
290 | + > | |
291 | + <EditableProTable | |
292 | + rowKey="key" | |
293 | + scroll={{ | |
294 | + x: 960, | |
295 | + }} | |
296 | + editableFormRef={editorFormRef} | |
297 | + headerTitle="可编辑表格" | |
298 | + maxLength={5} | |
299 | + name="procureBillDetailList" | |
300 | + controlled={controlled} | |
301 | + recordCreatorProps={{ | |
302 | + position: 'bottom', | |
303 | + record: () => ({ | |
304 | + key: `key-${Math.random().toString(36).substr(2, 9)}`, | |
305 | + }), | |
306 | + }} | |
307 | + actionRef={actionRef} | |
308 | + toolBarRender={() => [ | |
309 | + <ProFormSwitch | |
310 | + key="render" | |
311 | + fieldProps={{ | |
312 | + style: { | |
313 | + marginBlockEnd: 0, | |
314 | + }, | |
315 | + checked: controlled, | |
316 | + onChange: (value) => { | |
317 | + setControlled(value); | |
318 | + }, | |
319 | + }} | |
320 | + checkedChildren="数据更新通知 Form" | |
321 | + unCheckedChildren="保存后通知 Form" | |
322 | + noStyle | |
323 | + />, | |
324 | + <Button | |
325 | + key="rows" | |
326 | + onClick={() => { | |
327 | + const rows = editorFormRef.current?.getRowsData?.(); | |
328 | + console.log(rows); | |
329 | + }} | |
330 | + > | |
331 | + 获取 table 的数据 | |
332 | + </Button>, | |
333 | + ]} | |
334 | + columns={columns} | |
335 | + editable={{ | |
336 | + type: 'multiple', | |
337 | + editableKeys, | |
338 | + onChange: setEditableRowKeys, | |
339 | + actionRender: (row, config, defaultDom) => { | |
340 | + return [defaultDom.save, defaultDom.delete, defaultDom.cancel]; | |
341 | + }, | |
342 | + }} | |
343 | + /> | |
344 | + <ProForm.Item> | |
345 | + <ProCard title="表格数据" headerBordered collapsible defaultCollapsed> | |
346 | + <ProFormDependency name={['procureBillDetailList']}> | |
347 | + {({ procureBillDetailList }) => ( | |
348 | + <ProFormField | |
349 | + ignoreFormItem | |
350 | + fieldProps={{ | |
351 | + style: { | |
352 | + width: '100%', | |
353 | + }, | |
354 | + }} | |
355 | + mode="read" | |
356 | + valueType="jsonCode" | |
357 | + text={JSON.stringify(procureBillDetailList)} | |
358 | + /> | |
359 | + )} | |
360 | + </ProFormDependency> | |
361 | + </ProCard> | |
362 | + </ProForm.Item> | |
363 | + <ProFormTextArea name="notes" label="备注" /> | |
364 | + </ModalForm> | |
365 | + ); | |
366 | +}; | ... | ... |
src/pages/product/procure/components/Audit.tsx
0 → 100644
1 | +import { RESPONSE_CODE } from '@/constants/enum'; | |
2 | +import { postProcureBillAudit } from '@/services'; | |
3 | +import { ModalForm, ProFormTextArea } from '@ant-design/pro-components'; | |
4 | +import { Button, Form, message } from 'antd'; | |
5 | + | |
6 | +export default ({ recordId, onClose }) => { | |
7 | + const [form] = Form.useForm<{ name: string; company: string }>(); | |
8 | + return ( | |
9 | + <ModalForm | |
10 | + title="审核" | |
11 | + trigger={<Button type="link">审核</Button>} | |
12 | + form={form} | |
13 | + autoFocusFirstInput | |
14 | + modalProps={{ | |
15 | + destroyOnClose: true, | |
16 | + onCancel: () => console.log('run'), | |
17 | + }} | |
18 | + submitTimeout={2000} | |
19 | + submitter={{ | |
20 | + searchConfig: { | |
21 | + submitText: '通过', | |
22 | + resetText: '取消', | |
23 | + }, | |
24 | + render: (props, defaultDoms) => { | |
25 | + return [ | |
26 | + defaultDoms[0], | |
27 | + <Button | |
28 | + type={'primary'} | |
29 | + key="ok" | |
30 | + onClick={async () => { | |
31 | + const res = await postProcureBillAudit({ | |
32 | + data: { | |
33 | + ...form.getFieldsValue(), | |
34 | + id: recordId, | |
35 | + passed: false, | |
36 | + }, | |
37 | + }); | |
38 | + if (res.result === RESPONSE_CODE.SUCCESS) { | |
39 | + message.success('提交成功'); | |
40 | + } | |
41 | + props.submit(); | |
42 | + }} | |
43 | + > | |
44 | + 驳回 | |
45 | + </Button>, | |
46 | + <Button | |
47 | + type={'primary'} | |
48 | + key="ok" | |
49 | + onClick={async () => { | |
50 | + const res = await postProcureBillAudit({ | |
51 | + data: { | |
52 | + ...form.getFieldsValue(), | |
53 | + id: recordId, | |
54 | + passed: true, | |
55 | + }, | |
56 | + }); | |
57 | + if (res.result === RESPONSE_CODE.SUCCESS) { | |
58 | + message.success('提交成功'); | |
59 | + } | |
60 | + props.submit(); | |
61 | + }} | |
62 | + > | |
63 | + 通过 | |
64 | + </Button>, | |
65 | + ]; | |
66 | + }, | |
67 | + }} | |
68 | + onFinish={async () => { | |
69 | + onClose(); | |
70 | + return true; | |
71 | + }} | |
72 | + > | |
73 | + <ProFormTextArea name="auditRemarks" label="备注" /> | |
74 | + </ModalForm> | |
75 | + ); | |
76 | +}; | ... | ... |
src/pages/product/procure/index.tsx
0 → 100644
1 | +import ButtonConfirm from '@/components/ButtomConfirm'; | |
2 | +import { RESPONSE_CODE } from '@/constants/enum'; | |
3 | +import AddOrUpdate from '@/pages/product/procure/components/AddOrUpdate'; | |
4 | +import { | |
5 | + postProcureBillDelete, | |
6 | + postProcureBillPage, | |
7 | + postServiceConstProcureBillAuditStatus, | |
8 | +} from '@/services'; | |
9 | +import { enumToSelect } from '@/utils'; | |
10 | +import { ProTable, type ActionType } from '@ant-design/pro-components'; | |
11 | +import { message } from 'antd'; | |
12 | +import { useRef } from 'react'; | |
13 | +import Audit from './components/Audit'; | |
14 | + | |
15 | +export default () => { | |
16 | + const actionRef = useRef<ActionType>(); | |
17 | + const columns = [ | |
18 | + { | |
19 | + title: '单号', | |
20 | + dataIndex: 'id', | |
21 | + ellipsis: true, | |
22 | + hideInSearch: true, | |
23 | + }, | |
24 | + { | |
25 | + title: '创建时间', | |
26 | + dataIndex: 'createTime', | |
27 | + ellipsis: true, | |
28 | + width: 180, | |
29 | + hideInSearch: true, | |
30 | + }, | |
31 | + { | |
32 | + title: '创建人', | |
33 | + dataIndex: 'createByName', | |
34 | + ellipsis: true, | |
35 | + width: 180, | |
36 | + hideInSearch: true, | |
37 | + }, | |
38 | + { | |
39 | + title: '总金额', | |
40 | + dataIndex: 'totalPrice', | |
41 | + ellipsis: true, | |
42 | + width: 180, | |
43 | + hideInSearch: true, | |
44 | + }, | |
45 | + { | |
46 | + title: '审核状态', | |
47 | + dataIndex: 'auditStatusText', | |
48 | + ellipsis: true, | |
49 | + width: 180, | |
50 | + hideInSearch: true, | |
51 | + }, | |
52 | + { | |
53 | + title: '审核备注', | |
54 | + dataIndex: 'auditNotes', | |
55 | + ellipsis: true, | |
56 | + width: 180, | |
57 | + hideInSearch: true, | |
58 | + }, | |
59 | + { | |
60 | + title: '备注', | |
61 | + dataIndex: 'notes', | |
62 | + ellipsis: true, | |
63 | + width: 180, | |
64 | + hideInSearch: true, | |
65 | + }, | |
66 | + { | |
67 | + title: '采购单号', | |
68 | + dataIndex: 'id', | |
69 | + ellipsis: true, | |
70 | + hideInTable: true, | |
71 | + }, | |
72 | + { | |
73 | + title: '创建人', | |
74 | + dataIndex: 'createByNameLike', | |
75 | + ellipsis: true, | |
76 | + hideInTable: true, | |
77 | + }, | |
78 | + { | |
79 | + title: '创建时间', | |
80 | + valueType: 'dateTimeRange', | |
81 | + hideInTable: true, | |
82 | + search: { | |
83 | + transform: (value) => { | |
84 | + if (value) { | |
85 | + return { | |
86 | + createTimeGe: value[0], | |
87 | + createTimeLe: value[1], | |
88 | + }; | |
89 | + } | |
90 | + }, | |
91 | + }, | |
92 | + }, | |
93 | + { | |
94 | + title: '审核状态', | |
95 | + valueType: 'select', | |
96 | + key: 'auditStatus', | |
97 | + dataIndex: 'auditStatus', | |
98 | + filters: true, | |
99 | + onFilter: true, | |
100 | + hideInTable: true, | |
101 | + request: async () => { | |
102 | + const res = await postServiceConstProcureBillAuditStatus(); | |
103 | + return enumToSelect(res.data); | |
104 | + }, | |
105 | + }, | |
106 | + { | |
107 | + title: '操作', | |
108 | + valueType: 'option', | |
109 | + key: 'option', | |
110 | + render: (text, record) => [ | |
111 | + record.paths?.includes('UPDATE') && ( | |
112 | + <AddOrUpdate | |
113 | + key="update" | |
114 | + record={record} | |
115 | + onfinish={() => { | |
116 | + actionRef.current?.reload(); | |
117 | + }} | |
118 | + /> | |
119 | + ), | |
120 | + record.paths?.includes('UPDATE') && ( | |
121 | + <ButtonConfirm | |
122 | + key="delete" | |
123 | + className="p-0" | |
124 | + title={'确认删除该记录?'} | |
125 | + text="删除" | |
126 | + onConfirm={async () => { | |
127 | + let res = await postProcureBillDelete({ | |
128 | + query: { id: record.id }, | |
129 | + }); | |
130 | + if (res) { | |
131 | + message.success(res.message); | |
132 | + actionRef.current?.reload(); | |
133 | + } | |
134 | + }} | |
135 | + /> | |
136 | + ), | |
137 | + record.paths?.includes('AUDIT') && ( | |
138 | + <Audit | |
139 | + recordId={record.id} | |
140 | + onClose={() => { | |
141 | + actionRef.current?.reload(); | |
142 | + }} | |
143 | + ></Audit> | |
144 | + ), | |
145 | + ], | |
146 | + }, | |
147 | + ]; | |
148 | + | |
149 | + return ( | |
150 | + <ProTable | |
151 | + actionRef={actionRef} | |
152 | + columns={columns} | |
153 | + request={async (params) => { | |
154 | + const res = await postProcureBillPage({ | |
155 | + data: { | |
156 | + ...params, | |
157 | + }, | |
158 | + }); | |
159 | + if (res.result === RESPONSE_CODE.SUCCESS) { | |
160 | + return { | |
161 | + data: res?.data?.data, | |
162 | + total: res?.data?.total || 0, | |
163 | + }; | |
164 | + } | |
165 | + return { | |
166 | + data: [], | |
167 | + success: false, | |
168 | + }; | |
169 | + }} | |
170 | + rowKey="id" | |
171 | + pagination={{ | |
172 | + showQuickJumper: true, | |
173 | + }} | |
174 | + expandable={{ | |
175 | + expandedRowRender: (record) => ( | |
176 | + <ProTable | |
177 | + columns={[ | |
178 | + { | |
179 | + title: '商品名称', | |
180 | + dataIndex: 'productName', | |
181 | + key: 'productName', | |
182 | + }, | |
183 | + { | |
184 | + title: '单位', | |
185 | + dataIndex: 'productUnitName', | |
186 | + key: 'productUnitName', | |
187 | + }, | |
188 | + { | |
189 | + title: '单价', | |
190 | + dataIndex: 'productUnitPrice', | |
191 | + key: 'productUnitPrice', | |
192 | + }, | |
193 | + { title: '数量', dataIndex: 'number', key: 'number' }, | |
194 | + { title: '小计', dataIndex: 'totalPrice', key: 'totalPrice' }, | |
195 | + { | |
196 | + title: '附件', | |
197 | + dataIndex: 'annex', | |
198 | + key: 'annex', | |
199 | + render: (_, record) => ( | |
200 | + <div> | |
201 | + {record.annexList?.map((url, index) => { | |
202 | + const shortName = | |
203 | + url.split('/').pop()?.slice(0, 15) || | |
204 | + `附件 ${index + 1}`; | |
205 | + return ( | |
206 | + <a | |
207 | + key={index} | |
208 | + href={url} | |
209 | + target="_blank" | |
210 | + rel="noopener noreferrer" | |
211 | + title={url} // 悬停显示完整链接 | |
212 | + style={{ | |
213 | + display: 'block', | |
214 | + marginBottom: '4px', | |
215 | + whiteSpace: 'nowrap', | |
216 | + overflow: 'hidden', | |
217 | + textOverflow: 'ellipsis', | |
218 | + maxWidth: '200px', // 限制显示宽度 | |
219 | + }} | |
220 | + > | |
221 | + {shortName.length < url.split('/').pop()?.length | |
222 | + ? `${shortName}...` | |
223 | + : shortName} | |
224 | + </a> | |
225 | + ); | |
226 | + })} | |
227 | + </div> | |
228 | + ), | |
229 | + }, | |
230 | + { title: '备注', dataIndex: 'notes', key: 'notes' }, | |
231 | + ]} | |
232 | + headerTitle={false} | |
233 | + search={false} | |
234 | + options={false} | |
235 | + dataSource={record.procureBillDetailList} | |
236 | + pagination={false} | |
237 | + /> | |
238 | + ), | |
239 | + }} | |
240 | + dateFormatter="string" | |
241 | + headerTitle="采购管理" | |
242 | + options={false} | |
243 | + toolBarRender={() => [ | |
244 | + <AddOrUpdate | |
245 | + key="add" | |
246 | + record={undefined} | |
247 | + onfinish={() => actionRef.current?.reload()} | |
248 | + />, | |
249 | + ]} | |
250 | + /> | |
251 | + ); | |
252 | +}; | ... | ... |
src/pages/productCollectBill/components/AddOrUpdate.tsx renamed to src/pages/product/product/components/AddOrUpdate.tsx
1 | -import { postProductCollectBillAddOrModify } from '@/services'; | |
2 | -import { useModel } from '@@/exports'; | |
1 | +import { postProductAddOrModify } from '@/services'; | |
3 | 2 | import { |
4 | 3 | ModalForm, |
5 | 4 | ProFormDigit, |
6 | - ProFormSelect, | |
7 | 5 | ProFormText, |
8 | - ProFormTextArea, | |
9 | 6 | } from '@ant-design/pro-components'; |
10 | 7 | import { Button, Form, message } from 'antd'; |
11 | 8 | |
12 | 9 | export default ({ record, onFinish }) => { |
13 | 10 | const [form] = Form.useForm(); |
14 | - const { getWarehouse } = useModel('enum'); | |
15 | 11 | return ( |
16 | 12 | <ModalForm |
17 | 13 | title="新建表单" |
... | ... | @@ -30,8 +26,11 @@ export default ({ record, onFinish }) => { |
30 | 26 | }} |
31 | 27 | submitTimeout={2000} |
32 | 28 | onFinish={async (values) => { |
33 | - let res = await postProductCollectBillAddOrModify({ | |
34 | - data: values, | |
29 | + let res = await postProductAddOrModify({ | |
30 | + data: { | |
31 | + ...record, | |
32 | + ...values, | |
33 | + }, | |
35 | 34 | }); |
36 | 35 | if (res) { |
37 | 36 | message.success(res.message); |
... | ... | @@ -40,49 +39,35 @@ export default ({ record, onFinish }) => { |
40 | 39 | return true; |
41 | 40 | }} |
42 | 41 | > |
43 | - <ProFormDigit | |
44 | - label="id" | |
45 | - name="id" | |
46 | - initialValue={record?.id} | |
47 | - width="sm" | |
48 | - hidden={true} | |
42 | + <ProFormText | |
43 | + width="md" | |
44 | + initialValue={record?.name} | |
45 | + name="name" | |
46 | + label="商品名称" | |
47 | + rules={[{ required: true, message: '商品名称必填' }]} | |
49 | 48 | /> |
50 | 49 | <ProFormText |
51 | 50 | width="md" |
52 | - initialValue={record?.productName} | |
53 | - name="productName" | |
54 | - label="申领物品" | |
55 | - rules={[{ required: true, message: '申领物品必填' }]} | |
51 | + initialValue={record?.baseUnitName} | |
52 | + name="baseUnitName" | |
53 | + label="商品单位" | |
54 | + rules={[{ required: true, message: '商品单位必填' }]} | |
56 | 55 | /> |
57 | 56 | <ProFormDigit |
58 | - label="申领数量" | |
59 | - name="productNumber" | |
60 | - initialValue={record?.productNumber} | |
57 | + label="商品单价" | |
58 | + name="unitPrice" | |
59 | + initialValue={record?.unitPrice} | |
61 | 60 | width="sm" |
62 | - min={1} | |
63 | - rules={[{ required: true, message: '申领数量必填' }]} | |
61 | + min={0} | |
62 | + rules={[{ required: true, message: '商品单价必填' }]} | |
64 | 63 | /> |
65 | - <ProFormSelect | |
66 | - width="md" | |
67 | - request={async () => { | |
68 | - const res = await getWarehouse(); | |
69 | - console.log('options:' + res); | |
70 | - let options = Object.entries(res).map(([value, label]) => ({ | |
71 | - label, | |
72 | - value, | |
73 | - })); | |
74 | - console.log('options:' + options); | |
75 | - return options; | |
76 | - }} | |
77 | - // initialValue={record?.warehouseCode} | |
78 | - name="warehouseCode" | |
79 | - label="申领仓库" | |
80 | - rules={[{ required: true, message: '申领仓库为必填项' }]} | |
81 | - /> | |
82 | - <ProFormTextArea | |
83 | - initialValue={record?.applyRemarks} | |
84 | - name="applyRemarks" | |
85 | - label="申领备注" | |
64 | + <ProFormDigit | |
65 | + label="商品库存" | |
66 | + name="inventory" | |
67 | + initialValue={record?.inventory} | |
68 | + width="sm" | |
69 | + min={0} | |
70 | + rules={[{ required: true, message: '商品库存必填' }]} | |
86 | 71 | /> |
87 | 72 | </ModalForm> |
88 | 73 | ); | ... | ... |
src/pages/product/product/index.tsx
0 → 100644
1 | +import ButtonConfirm from '@/components/ButtomConfirm'; | |
2 | +import { RESPONSE_CODE } from '@/constants/enum'; | |
3 | +import AddOrUpdate from '@/pages/product/product/components/AddOrUpdate'; | |
4 | +import { postProductDelete, postProductPage } from '@/services'; | |
5 | +import type { ActionType, ProColumns } from '@ant-design/pro-components'; | |
6 | +import { ProTable } from '@ant-design/pro-components'; | |
7 | +import { message } from 'antd'; | |
8 | +import { useRef } from 'react'; | |
9 | + | |
10 | +export default () => { | |
11 | + const actionRef = useRef<ActionType>(); | |
12 | + const columns: ProColumns[] = [ | |
13 | + { | |
14 | + title: '编号', | |
15 | + dataIndex: 'id', | |
16 | + ellipsis: true, | |
17 | + }, | |
18 | + { | |
19 | + title: '商品名称', | |
20 | + dataIndex: 'name', | |
21 | + ellipsis: true, | |
22 | + hideInSearch: true, | |
23 | + }, | |
24 | + { | |
25 | + title: '商品名称', | |
26 | + dataIndex: 'nameLike', | |
27 | + ellipsis: true, | |
28 | + hideInTable: true, | |
29 | + }, | |
30 | + { | |
31 | + title: '单位', | |
32 | + dataIndex: 'baseUnitName', | |
33 | + ellipsis: true, | |
34 | + hideInSearch: true, | |
35 | + }, | |
36 | + { | |
37 | + title: '单价', | |
38 | + dataIndex: 'unitPrice', | |
39 | + ellipsis: true, | |
40 | + hideInSearch: true, | |
41 | + }, | |
42 | + { | |
43 | + title: '库存', | |
44 | + dataIndex: 'inventory', | |
45 | + ellipsis: true, | |
46 | + hideInSearch: true, | |
47 | + }, | |
48 | + | |
49 | + { | |
50 | + title: '操作', | |
51 | + valueType: 'option', | |
52 | + key: 'option', | |
53 | + render: (text, record) => [ | |
54 | + record.paths?.includes('UPDATE') && ( | |
55 | + <AddOrUpdate | |
56 | + key={'addOrUpdate'} | |
57 | + record={record} | |
58 | + onFinish={() => { | |
59 | + actionRef.current?.reload(); | |
60 | + }} | |
61 | + /> | |
62 | + ), | |
63 | + record.paths?.includes('UPDATE') && ( | |
64 | + <ButtonConfirm | |
65 | + key="delete" | |
66 | + className="p-0" | |
67 | + title={'确认删除该记录?'} | |
68 | + text="删除" | |
69 | + onConfirm={async () => { | |
70 | + let res = await postProductDelete({ | |
71 | + query: { id: record.id }, | |
72 | + }); | |
73 | + if (res) { | |
74 | + message.success(res.message); | |
75 | + actionRef.current?.reload(); | |
76 | + } | |
77 | + }} | |
78 | + /> | |
79 | + ), | |
80 | + ], | |
81 | + }, | |
82 | + ]; | |
83 | + return ( | |
84 | + <ProTable | |
85 | + columns={columns} | |
86 | + actionRef={actionRef} | |
87 | + cardBordered | |
88 | + request={async (params) => { | |
89 | + const res = await postProductPage({ | |
90 | + data: { | |
91 | + ...params, | |
92 | + }, | |
93 | + }); | |
94 | + if (res.result === RESPONSE_CODE.SUCCESS) { | |
95 | + return { | |
96 | + data: res?.data?.data, | |
97 | + total: res?.data?.total || 0, | |
98 | + }; | |
99 | + } | |
100 | + return { | |
101 | + data: [], | |
102 | + success: false, | |
103 | + }; | |
104 | + }} | |
105 | + editable={{ | |
106 | + type: 'multiple', | |
107 | + }} | |
108 | + columnsState={{ | |
109 | + persistenceKey: 'pro-table-singe-demos', | |
110 | + persistenceType: 'localStorage', | |
111 | + defaultValue: { | |
112 | + option: { fixed: 'right', disable: true }, | |
113 | + }, | |
114 | + onChange(value) { | |
115 | + console.log('value: ', value); | |
116 | + }, | |
117 | + }} | |
118 | + rowKey="id" | |
119 | + search={{ | |
120 | + labelWidth: 'auto', | |
121 | + }} | |
122 | + options={{ | |
123 | + setting: { | |
124 | + listsHeight: 400, | |
125 | + }, | |
126 | + }} | |
127 | + form={{ | |
128 | + // 由于配置了 transform,提交的参数与定义的不同这里需要转化一下 | |
129 | + syncToUrl: (values, type) => { | |
130 | + if (type === 'get') { | |
131 | + return { | |
132 | + ...values, | |
133 | + created_at: [values.startTime, values.endTime], | |
134 | + }; | |
135 | + } | |
136 | + return values; | |
137 | + }, | |
138 | + }} | |
139 | + pagination={{ | |
140 | + pageSize: 5, | |
141 | + onChange: (page) => console.log(page), | |
142 | + }} | |
143 | + dateFormatter="string" | |
144 | + headerTitle="商品列表" | |
145 | + toolBarRender={() => [ | |
146 | + <AddOrUpdate | |
147 | + key="AddOrUpdate" | |
148 | + record={null} | |
149 | + onFinish={() => { | |
150 | + actionRef.current?.reload(); | |
151 | + }} | |
152 | + />, | |
153 | + ]} | |
154 | + /> | |
155 | + ); | |
156 | +}; | ... | ... |
src/pages/product/productCollect/components/AddOrUpdate.tsx
0 → 100644
1 | +import { postProductCollectBillAddOrModify } from '@/services'; | |
2 | +import { useModel } from '@@/exports'; | |
3 | +import { | |
4 | + ActionType, | |
5 | + EditableProTable, | |
6 | + ModalForm, | |
7 | + ProCard, | |
8 | + ProColumns, | |
9 | + ProForm, | |
10 | + ProFormDependency, | |
11 | + ProFormField, | |
12 | + ProFormSwitch, | |
13 | + ProFormTextArea, | |
14 | +} from '@ant-design/pro-components'; | |
15 | +import { Button, Form, message } from 'antd'; | |
16 | +import React, { useEffect, useRef, useState } from 'react'; | |
17 | + | |
18 | +export default ({ record, onfinish }) => { | |
19 | + const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | |
20 | + const [controlled, setControlled] = useState<boolean>(false); | |
21 | + const [processedRecord, setProcessedRecord] = useState(record); | |
22 | + const formRef = useRef(null); | |
23 | + const editorFormRef = useRef(null); | |
24 | + const { getProducts } = useModel('enum'); | |
25 | + const actionRef = useRef<ActionType>(); | |
26 | + useEffect(() => { | |
27 | + if (record?.details) { | |
28 | + const updateddetails = record.details.map((item) => ({ | |
29 | + ...item, | |
30 | + key: item.key || `key-${Math.random().toString(36).substr(2, 9)}`, // 动态生成唯一 key | |
31 | + })); | |
32 | + setProcessedRecord({ | |
33 | + ...record, | |
34 | + details: updateddetails, | |
35 | + }); | |
36 | + } | |
37 | + }, [record]); | |
38 | + | |
39 | + const columns: ProColumns[] = [ | |
40 | + { | |
41 | + title: '商品', | |
42 | + dataIndex: 'productId', | |
43 | + valueType: 'select', | |
44 | + request: async () => { | |
45 | + const res = await getProducts(); | |
46 | + return res.map((item) => ({ | |
47 | + ...item, | |
48 | + label: item.name, | |
49 | + value: item.id, | |
50 | + productUnitName: item.baseUnitName, | |
51 | + productUnitPrice: item.unitPrice, | |
52 | + })); | |
53 | + }, | |
54 | + fieldProps: (_, { rowIndex }) => ({ | |
55 | + onSelect: (value, option) => { | |
56 | + const currentTableData = editorFormRef.current?.getRowsData?.(); | |
57 | + if (currentTableData) { | |
58 | + const updatedData = [...currentTableData]; | |
59 | + updatedData[rowIndex] = { | |
60 | + ...updatedData[rowIndex], | |
61 | + productUnitName: option.productUnitName, | |
62 | + productUnitPrice: option.productUnitPrice, | |
63 | + }; | |
64 | + formRef.current?.setFieldsValue({ | |
65 | + details: updatedData, | |
66 | + }); | |
67 | + } | |
68 | + }, | |
69 | + }), | |
70 | + }, | |
71 | + { | |
72 | + title: '单位', | |
73 | + dataIndex: 'productUnitName', | |
74 | + valueType: 'text', | |
75 | + editable: false, | |
76 | + }, | |
77 | + { | |
78 | + title: '单价', | |
79 | + dataIndex: 'productUnitPrice', | |
80 | + valueType: 'digit', | |
81 | + editable: false, | |
82 | + }, | |
83 | + { | |
84 | + title: '数量', | |
85 | + dataIndex: 'number', | |
86 | + valueType: 'digit', | |
87 | + }, | |
88 | + { | |
89 | + title: '备注', | |
90 | + dataIndex: 'notes', | |
91 | + valueType: 'textarea', | |
92 | + }, | |
93 | + { | |
94 | + title: '操作', | |
95 | + valueType: 'option', | |
96 | + render: (text, record, _, action) => [ | |
97 | + <a | |
98 | + key="editable" | |
99 | + onClick={() => { | |
100 | + action?.startEditable?.(record.key); | |
101 | + }} | |
102 | + > | |
103 | + 编辑 | |
104 | + </a>, | |
105 | + <a | |
106 | + key="delete" | |
107 | + onClick={() => { | |
108 | + const tableDataSource = formRef.current?.getFieldValue('details'); | |
109 | + formRef.current?.setFieldsValue({ | |
110 | + table: tableDataSource.filter((item) => item.key !== record.key), | |
111 | + }); | |
112 | + }} | |
113 | + > | |
114 | + 删除 | |
115 | + </a>, | |
116 | + ], | |
117 | + }, | |
118 | + ]; | |
119 | + | |
120 | + const [form] = Form.useForm(); | |
121 | + return ( | |
122 | + <ModalForm | |
123 | + formRef={formRef} | |
124 | + initialValues={processedRecord} | |
125 | + validateTrigger="onBlur" | |
126 | + title="新建表单" | |
127 | + trigger={ | |
128 | + record?.id ? ( | |
129 | + <Button type="link">修改</Button> | |
130 | + ) : ( | |
131 | + <Button type="primary">新建</Button> | |
132 | + ) | |
133 | + } | |
134 | + form={form} | |
135 | + autoFocusFirstInput | |
136 | + width={1500} | |
137 | + modalProps={{ | |
138 | + destroyOnClose: true, | |
139 | + onCancel: () => console.log('run'), | |
140 | + }} | |
141 | + submitTimeout={2000} | |
142 | + onFinish={async (values) => { | |
143 | + const res = await postProductCollectBillAddOrModify({ | |
144 | + data: { | |
145 | + ...record, | |
146 | + ...values, | |
147 | + }, | |
148 | + }); | |
149 | + if (res) { | |
150 | + message.success(res.message); | |
151 | + onfinish(); | |
152 | + } | |
153 | + return true; | |
154 | + }} | |
155 | + > | |
156 | + <EditableProTable | |
157 | + rowKey="key" | |
158 | + scroll={{ | |
159 | + x: 960, | |
160 | + }} | |
161 | + editableFormRef={editorFormRef} | |
162 | + headerTitle="可编辑表格" | |
163 | + maxLength={5} | |
164 | + name="details" | |
165 | + controlled={controlled} | |
166 | + recordCreatorProps={{ | |
167 | + position: 'bottom', | |
168 | + record: () => ({ | |
169 | + key: `key-${Math.random().toString(36).substr(2, 9)}`, | |
170 | + }), | |
171 | + }} | |
172 | + actionRef={actionRef} | |
173 | + toolBarRender={() => [ | |
174 | + <ProFormSwitch | |
175 | + key="render" | |
176 | + fieldProps={{ | |
177 | + style: { | |
178 | + marginBlockEnd: 0, | |
179 | + }, | |
180 | + checked: controlled, | |
181 | + onChange: (value) => { | |
182 | + setControlled(value); | |
183 | + }, | |
184 | + }} | |
185 | + checkedChildren="数据更新通知 Form" | |
186 | + unCheckedChildren="保存后通知 Form" | |
187 | + noStyle | |
188 | + />, | |
189 | + <Button | |
190 | + key="rows" | |
191 | + onClick={() => { | |
192 | + const rows = editorFormRef.current?.getRowsData?.(); | |
193 | + console.log(rows); | |
194 | + }} | |
195 | + > | |
196 | + 获取 table 的数据 | |
197 | + </Button>, | |
198 | + ]} | |
199 | + columns={columns} | |
200 | + editable={{ | |
201 | + type: 'multiple', | |
202 | + editableKeys, | |
203 | + onChange: setEditableRowKeys, | |
204 | + actionRender: (row, config, defaultDom) => { | |
205 | + return [defaultDom.save, defaultDom.delete, defaultDom.cancel]; | |
206 | + }, | |
207 | + }} | |
208 | + /> | |
209 | + <ProForm.Item> | |
210 | + <ProCard title="表格数据" headerBordered collapsible defaultCollapsed> | |
211 | + <ProFormDependency name={['details']}> | |
212 | + {({ details }) => ( | |
213 | + <ProFormField | |
214 | + ignoreFormItem | |
215 | + fieldProps={{ | |
216 | + style: { | |
217 | + width: '100%', | |
218 | + }, | |
219 | + }} | |
220 | + mode="read" | |
221 | + valueType="jsonCode" | |
222 | + text={JSON.stringify(details)} | |
223 | + /> | |
224 | + )} | |
225 | + </ProFormDependency> | |
226 | + </ProCard> | |
227 | + </ProForm.Item> | |
228 | + <ProFormTextArea name="auditRemarks" label="备注" /> | |
229 | + </ModalForm> | |
230 | + ); | |
231 | +}; | ... | ... |
src/pages/productCollectBill/components/Audit.tsx renamed to src/pages/product/productCollect/components/Audit.tsx
src/pages/product/productCollect/index.tsx
0 → 100644
1 | +import ButtonConfirm from '@/components/ButtomConfirm'; | |
2 | +import { RESPONSE_CODE } from '@/constants/enum'; | |
3 | +import AddOrUpdate from '@/pages/product/productCollect/components/AddOrUpdate'; | |
4 | +import { | |
5 | + postProductCollectBillDelete, | |
6 | + postProductCollectBillPage, | |
7 | + postServiceConstProductCollectBillStatus, | |
8 | +} from '@/services'; | |
9 | +import { enumToSelect } from '@/utils'; | |
10 | +import { | |
11 | + ProTable, | |
12 | + type ActionType, | |
13 | + type ProColumns, | |
14 | +} from '@ant-design/pro-components'; | |
15 | +import { message } from 'antd'; | |
16 | +import { useRef } from 'react'; | |
17 | +import Audit from './components/Audit'; | |
18 | + | |
19 | +export default () => { | |
20 | + const actionRef = useRef<ActionType>(); | |
21 | + const columns: ProColumns[] = [ | |
22 | + { | |
23 | + dataIndex: 'index', | |
24 | + valueType: 'indexBorder', | |
25 | + width: 48, | |
26 | + }, | |
27 | + { | |
28 | + title: '申领人', | |
29 | + dataIndex: 'createByName', | |
30 | + ellipsis: true, | |
31 | + width: 180, | |
32 | + hideInSearch: true, | |
33 | + }, | |
34 | + { | |
35 | + title: '申请时间', | |
36 | + dataIndex: 'createTime', | |
37 | + ellipsis: true, | |
38 | + width: 180, | |
39 | + hideInSearch: true, | |
40 | + }, | |
41 | + { | |
42 | + title: '审核状态', | |
43 | + dataIndex: 'auditStatusText', | |
44 | + ellipsis: true, | |
45 | + width: 180, | |
46 | + hideInSearch: true, | |
47 | + }, | |
48 | + { | |
49 | + title: '申领备注', | |
50 | + dataIndex: 'applyRemarks', | |
51 | + valueType: 'textarea', | |
52 | + ellipsis: true, | |
53 | + width: 180, | |
54 | + hideInSearch: true, | |
55 | + }, | |
56 | + { | |
57 | + title: '审核备注', | |
58 | + dataIndex: 'auditRemarks', | |
59 | + valueType: 'textarea', | |
60 | + ellipsis: true, | |
61 | + width: 180, | |
62 | + hideInSearch: true, | |
63 | + }, | |
64 | + | |
65 | + { | |
66 | + title: '申领物品', | |
67 | + dataIndex: 'productNameLike', | |
68 | + ellipsis: true, | |
69 | + width: 180, | |
70 | + hideInTable: true, | |
71 | + }, | |
72 | + { | |
73 | + title: '申领人', | |
74 | + dataIndex: 'createByNameLike', | |
75 | + hideInTable: true, | |
76 | + }, | |
77 | + { | |
78 | + title: '申请时间', | |
79 | + valueType: 'dateTimeRange', | |
80 | + hideInTable: true, | |
81 | + search: { | |
82 | + transform: (value) => { | |
83 | + if (value) { | |
84 | + return { | |
85 | + createTimeGe: value[0], | |
86 | + createTimeLe: value[1], | |
87 | + }; | |
88 | + } | |
89 | + }, | |
90 | + }, | |
91 | + }, | |
92 | + { | |
93 | + title: '审核状态', | |
94 | + valueType: 'select', | |
95 | + key: 'auditStatus', | |
96 | + dataIndex: 'auditStatus', | |
97 | + filters: true, | |
98 | + onFilter: true, | |
99 | + hideInTable: true, | |
100 | + request: async () => { | |
101 | + const res = await postServiceConstProductCollectBillStatus(); | |
102 | + return enumToSelect(res.data); | |
103 | + }, | |
104 | + }, | |
105 | + { | |
106 | + title: '操作', | |
107 | + valueType: 'option', | |
108 | + key: 'option', | |
109 | + render: (text, record) => [ | |
110 | + record.paths?.includes('UPDATE') && ( | |
111 | + <AddOrUpdate | |
112 | + record={record} | |
113 | + onfinish={() => { | |
114 | + actionRef.current?.reload(); | |
115 | + }} | |
116 | + /> | |
117 | + ), | |
118 | + record.paths?.includes('UPDATE') && ( | |
119 | + <ButtonConfirm | |
120 | + key="delete" | |
121 | + className="p-0" | |
122 | + title={'确认删除该记录?'} | |
123 | + text="删除" | |
124 | + onConfirm={async () => { | |
125 | + let res = await postProductCollectBillDelete({ | |
126 | + query: { id: record.id }, | |
127 | + }); | |
128 | + if (res) { | |
129 | + message.success(res.message); | |
130 | + actionRef.current?.reload(); | |
131 | + } | |
132 | + }} | |
133 | + /> | |
134 | + ), | |
135 | + record.paths?.includes('AUDIT') && ( | |
136 | + <Audit | |
137 | + recordId={record.id} | |
138 | + onClose={() => { | |
139 | + actionRef.current?.reload(); | |
140 | + }} | |
141 | + /> | |
142 | + ), | |
143 | + ], | |
144 | + }, | |
145 | + ]; | |
146 | + | |
147 | + return ( | |
148 | + <ProTable | |
149 | + actionRef={actionRef} | |
150 | + columns={columns} | |
151 | + request={async (params) => { | |
152 | + const res = await postProductCollectBillPage({ | |
153 | + data: { | |
154 | + ...params, | |
155 | + }, | |
156 | + }); | |
157 | + if (res.result === RESPONSE_CODE.SUCCESS) { | |
158 | + return { | |
159 | + data: res?.data?.data, | |
160 | + total: res?.data?.total || 0, | |
161 | + }; | |
162 | + } | |
163 | + return { | |
164 | + data: [], | |
165 | + success: false, | |
166 | + }; | |
167 | + }} | |
168 | + rowKey="id" | |
169 | + pagination={{ | |
170 | + showQuickJumper: true, | |
171 | + }} | |
172 | + expandable={{ | |
173 | + expandedRowRender: (record) => ( | |
174 | + <ProTable | |
175 | + columns={[ | |
176 | + { | |
177 | + title: '商品名称', | |
178 | + dataIndex: 'productName', | |
179 | + key: 'productName', | |
180 | + }, | |
181 | + { title: '数量', dataIndex: 'number', key: 'number' }, | |
182 | + { title: '备注', dataIndex: 'notes', key: 'notes' }, | |
183 | + ]} | |
184 | + headerTitle={false} | |
185 | + search={false} | |
186 | + options={false} | |
187 | + dataSource={record.details} | |
188 | + pagination={false} | |
189 | + /> | |
190 | + ), | |
191 | + }} | |
192 | + dateFormatter="string" | |
193 | + headerTitle="采购管理" | |
194 | + options={false} | |
195 | + toolBarRender={() => [ | |
196 | + <AddOrUpdate | |
197 | + key="add" | |
198 | + record={undefined} | |
199 | + onfinish={() => actionRef.current?.reload()} | |
200 | + />, | |
201 | + ]} | |
202 | + /> | |
203 | + ); | |
204 | +}; | ... | ... |
src/pages/productCollectBill/index.tsx renamed to src/pages/product/productCollect/indexcopy.tsx
1 | 1 | import ButtonConfirm from '@/components/ButtomConfirm'; |
2 | 2 | import { RESPONSE_CODE } from '@/constants/enum'; |
3 | -import AddOrUpdate from '@/pages/productCollectBill/components/AddOrUpdate'; | |
4 | -import Audit from '@/pages/productCollectBill/components/Audit'; | |
3 | +import AddOrUpdate from '@/pages/product/productCollect/components/AddOrUpdate'; | |
4 | +import Audit from '@/pages/product/productCollect/components/Audit'; | |
5 | 5 | import { |
6 | 6 | postProductCollectBillDelete, |
7 | 7 | postProductCollectBillPage, |
... | ... | @@ -96,8 +96,6 @@ export default () => { |
96 | 96 | hideInTable: true, |
97 | 97 | request: async () => { |
98 | 98 | const res = await postServiceConstStores(); |
99 | - console.log('Stores' + JSON.stringify(res)); | |
100 | - console.log('Stores' + JSON.stringify(res.data)); | |
101 | 99 | return enumToSelect(res.data); |
102 | 100 | }, |
103 | 101 | }, |
... | ... | @@ -131,8 +129,6 @@ export default () => { |
131 | 129 | hideInTable: true, |
132 | 130 | request: async () => { |
133 | 131 | const res = await postServiceConstProductCollectBillStatus(); |
134 | - console.log('auditStaus' + JSON.stringify(res)); | |
135 | - console.log('auditStaus' + JSON.stringify(res.data)); | |
136 | 132 | return enumToSelect(res.data); |
137 | 133 | }, |
138 | 134 | }, | ... | ... |
src/services/definition.ts
... | ... | @@ -79,6 +79,10 @@ export type ProcureReturnBillDtoStatus = |
79 | 79 | | 'WAIT_SEND' |
80 | 80 | | 'SENDED' |
81 | 81 | | 'WAIT_AUDIT'; |
82 | +export type ProcureBillInfoAuditStatus = | |
83 | + | 'WAIT_AUDIT' | |
84 | + | 'AUDIT_PASS' | |
85 | + | 'AUDIT_REFUSE'; | |
82 | 86 | export type ProductCollectBillAuditStatus = |
83 | 87 | | 'WAIT_AUDIT' |
84 | 88 | | 'AUDIT_PASS' |
... | ... | @@ -215,6 +219,10 @@ export interface AdminClientDto { |
215 | 219 | export interface AdminDeptQueryVO { |
216 | 220 | createByName?: string; |
217 | 221 | createByNameLike?: string; |
222 | + /** @format date-time */ | |
223 | + createTimeGe?: string; | |
224 | + /** @format date-time */ | |
225 | + createTimeLe?: string; | |
218 | 226 | /** @format int32 */ |
219 | 227 | current?: number; |
220 | 228 | /** @format int32 */ |
... | ... | @@ -261,6 +269,10 @@ export interface AdminInvoicingAccountDTO { |
261 | 269 | export interface AdminJobQueryVO { |
262 | 270 | createByName?: string; |
263 | 271 | createByNameLike?: string; |
272 | + /** @format date-time */ | |
273 | + createTimeGe?: string; | |
274 | + /** @format date-time */ | |
275 | + createTimeLe?: string; | |
264 | 276 | /** @format int32 */ |
265 | 277 | current?: number; |
266 | 278 | /** @format int32 */ |
... | ... | @@ -293,6 +305,10 @@ export interface AdminMenuQueryVO { |
293 | 305 | component?: string; |
294 | 306 | createByName?: string; |
295 | 307 | createByNameLike?: string; |
308 | + /** @format date-time */ | |
309 | + createTimeGe?: string; | |
310 | + /** @format date-time */ | |
311 | + createTimeLe?: string; | |
296 | 312 | /** @format int32 */ |
297 | 313 | current?: number; |
298 | 314 | /** @format int32 */ |
... | ... | @@ -344,6 +360,10 @@ export interface AdminMenuVO { |
344 | 360 | export interface AdminRoleQueryVO { |
345 | 361 | createByName?: string; |
346 | 362 | createByNameLike?: string; |
363 | + /** @format date-time */ | |
364 | + createTimeGe?: string; | |
365 | + /** @format date-time */ | |
366 | + createTimeLe?: string; | |
347 | 367 | /** @format int32 */ |
348 | 368 | current?: number; |
349 | 369 | dataScope?: string; |
... | ... | @@ -378,6 +398,10 @@ export interface AdminRoleVO { |
378 | 398 | export interface AdminUserLoginByPhoneVO { |
379 | 399 | createByName?: string; |
380 | 400 | createByNameLike?: string; |
401 | + /** @format date-time */ | |
402 | + createTimeGe?: string; | |
403 | + /** @format date-time */ | |
404 | + createTimeLe?: string; | |
381 | 405 | /** @format int32 */ |
382 | 406 | current?: number; |
383 | 407 | /** @format int32 */ |
... | ... | @@ -395,6 +419,10 @@ export interface AdminUserLoginByPhoneVO { |
395 | 419 | export interface AdminUserLoginByPwdVO { |
396 | 420 | createByName?: string; |
397 | 421 | createByNameLike?: string; |
422 | + /** @format date-time */ | |
423 | + createTimeGe?: string; | |
424 | + /** @format date-time */ | |
425 | + createTimeLe?: string; | |
398 | 426 | /** @format int32 */ |
399 | 427 | current?: number; |
400 | 428 | /** @format int32 */ |
... | ... | @@ -415,6 +443,10 @@ export interface AdminUserModifyPwdVO { |
415 | 443 | confirmPassword?: string; |
416 | 444 | createByName?: string; |
417 | 445 | createByNameLike?: string; |
446 | + /** @format date-time */ | |
447 | + createTimeGe?: string; | |
448 | + /** @format date-time */ | |
449 | + createTimeLe?: string; | |
418 | 450 | /** @format int32 */ |
419 | 451 | current?: number; |
420 | 452 | /** @format int32 */ |
... | ... | @@ -433,6 +465,10 @@ export interface AdminUserModifyPwdVO { |
433 | 465 | export interface AdminUserPasswordRecoverEmailVO { |
434 | 466 | createByName?: string; |
435 | 467 | createByNameLike?: string; |
468 | + /** @format date-time */ | |
469 | + createTimeGe?: string; | |
470 | + /** @format date-time */ | |
471 | + createTimeLe?: string; | |
436 | 472 | /** @format int32 */ |
437 | 473 | current?: number; |
438 | 474 | /** @format int32 */ |
... | ... | @@ -449,6 +485,10 @@ export interface AdminUserPasswordRecoverEmailVO { |
449 | 485 | export interface AdminUserQueryVO { |
450 | 486 | createByName?: string; |
451 | 487 | createByNameLike?: string; |
488 | + /** @format date-time */ | |
489 | + createTimeGe?: string; | |
490 | + /** @format date-time */ | |
491 | + createTimeLe?: string; | |
452 | 492 | /** @format int32 */ |
453 | 493 | current?: number; |
454 | 494 | email?: string; |
... | ... | @@ -475,6 +515,10 @@ export interface AdminUserRegisterVO { |
475 | 515 | confirmPassword?: string; |
476 | 516 | createByName?: string; |
477 | 517 | createByNameLike?: string; |
518 | + /** @format date-time */ | |
519 | + createTimeGe?: string; | |
520 | + /** @format date-time */ | |
521 | + createTimeLe?: string; | |
478 | 522 | /** @format int32 */ |
479 | 523 | current?: number; |
480 | 524 | email?: string; |
... | ... | @@ -707,6 +751,10 @@ export interface ApiCreateProductRequest { |
707 | 751 | export interface ApiOrderCustomersRequest { |
708 | 752 | createByName?: string; |
709 | 753 | createByNameLike?: string; |
754 | + /** @format date-time */ | |
755 | + createTimeGe?: string; | |
756 | + /** @format date-time */ | |
757 | + createTimeLe?: string; | |
710 | 758 | /** @format int32 */ |
711 | 759 | current?: number; |
712 | 760 | /** @format int32 */ |
... | ... | @@ -1016,6 +1064,10 @@ export interface AuditDto { |
1016 | 1064 | export interface AuditVO { |
1017 | 1065 | createByName?: string; |
1018 | 1066 | createByNameLike?: string; |
1067 | + /** @format date-time */ | |
1068 | + createTimeGe?: string; | |
1069 | + /** @format date-time */ | |
1070 | + createTimeLe?: string; | |
1019 | 1071 | /** @format int32 */ |
1020 | 1072 | current?: number; |
1021 | 1073 | /** @format int32 */ |
... | ... | @@ -1100,6 +1152,10 @@ export interface CancelSendOrderDto { |
1100 | 1152 | export interface CaptchaMessageVO { |
1101 | 1153 | createByName?: string; |
1102 | 1154 | createByNameLike?: string; |
1155 | + /** @format date-time */ | |
1156 | + createTimeGe?: string; | |
1157 | + /** @format date-time */ | |
1158 | + createTimeLe?: string; | |
1103 | 1159 | /** @format int32 */ |
1104 | 1160 | current?: number; |
1105 | 1161 | /** @format int32 */ |
... | ... | @@ -1375,6 +1431,10 @@ export interface CustomerSaveReq { |
1375 | 1431 | export interface DictionaryQueryVO { |
1376 | 1432 | createByName?: string; |
1377 | 1433 | createByNameLike?: string; |
1434 | + /** @format date-time */ | |
1435 | + createTimeGe?: string; | |
1436 | + /** @format date-time */ | |
1437 | + createTimeLe?: string; | |
1378 | 1438 | /** @format int32 */ |
1379 | 1439 | current?: number; |
1380 | 1440 | dictCode?: string; |
... | ... | @@ -2244,6 +2304,10 @@ export interface MergeIntegralDto { |
2244 | 2304 | export interface MessageQueryDTO { |
2245 | 2305 | createByName?: string; |
2246 | 2306 | createByNameLike?: string; |
2307 | + /** @format date-time */ | |
2308 | + createTimeGe?: string; | |
2309 | + /** @format date-time */ | |
2310 | + createTimeLe?: string; | |
2247 | 2311 | /** @format int32 */ |
2248 | 2312 | current?: number; |
2249 | 2313 | /** @format int32 */ |
... | ... | @@ -2289,6 +2353,10 @@ export interface OrderAuditLogQueryVO { |
2289 | 2353 | applyId?: number; |
2290 | 2354 | createByName?: string; |
2291 | 2355 | createByNameLike?: string; |
2356 | + /** @format date-time */ | |
2357 | + createTimeGe?: string; | |
2358 | + /** @format date-time */ | |
2359 | + createTimeLe?: string; | |
2292 | 2360 | /** @format int32 */ |
2293 | 2361 | current?: number; |
2294 | 2362 | /** @format int32 */ |
... | ... | @@ -2335,6 +2403,10 @@ export interface OrderBaseInfoQueryVO { |
2335 | 2403 | collection?: string; |
2336 | 2404 | createByName?: string; |
2337 | 2405 | createByNameLike?: string; |
2406 | + /** @format date-time */ | |
2407 | + createTimeGe?: string; | |
2408 | + /** @format date-time */ | |
2409 | + createTimeLe?: string; | |
2338 | 2410 | /** @format int32 */ |
2339 | 2411 | current?: number; |
2340 | 2412 | customerCode?: string; |
... | ... | @@ -2431,6 +2503,10 @@ export interface OrderFieldLockApplyQueryVO { |
2431 | 2503 | auditUserId?: number; |
2432 | 2504 | createByName?: string; |
2433 | 2505 | createByNameLike?: string; |
2506 | + /** @format date-time */ | |
2507 | + createTimeGe?: string; | |
2508 | + /** @format date-time */ | |
2509 | + createTimeLe?: string; | |
2434 | 2510 | /** @format int32 */ |
2435 | 2511 | current?: number; |
2436 | 2512 | /** @format int32 */ |
... | ... | @@ -2502,6 +2578,10 @@ export interface OrderMainProDo { |
2502 | 2578 | export interface OrderOptLogQueryVO { |
2503 | 2579 | createByName?: string; |
2504 | 2580 | createByNameLike?: string; |
2581 | + /** @format date-time */ | |
2582 | + createTimeGe?: string; | |
2583 | + /** @format date-time */ | |
2584 | + createTimeLe?: string; | |
2505 | 2585 | /** @format int32 */ |
2506 | 2586 | current?: number; |
2507 | 2587 | /** @format int32 */ |
... | ... | @@ -2745,6 +2825,17 @@ export interface OrderZoNingProvinceUserDo { |
2745 | 2825 | zoning?: string; |
2746 | 2826 | } |
2747 | 2827 | |
2828 | +export interface ProcureBillAuditDto { | |
2829 | + /** | |
2830 | + * @description | |
2831 | + * 审核备注 | |
2832 | + */ | |
2833 | + auditRemarks?: string; | |
2834 | + /** @format int64 */ | |
2835 | + id?: number; | |
2836 | + passed?: boolean; | |
2837 | +} | |
2838 | + | |
2748 | 2839 | export interface ProcureConvertProcureDto { |
2749 | 2840 | /** |
2750 | 2841 | * @description |
... | ... | @@ -2925,6 +3016,10 @@ export interface QueryBankStatementDto { |
2925 | 3016 | collectionDatetimeEnd?: string; |
2926 | 3017 | createByName?: string; |
2927 | 3018 | createByNameLike?: string; |
3019 | + /** @format date-time */ | |
3020 | + createTimeGe?: string; | |
3021 | + /** @format date-time */ | |
3022 | + createTimeLe?: string; | |
2928 | 3023 | /** @format int32 */ |
2929 | 3024 | current?: number; |
2930 | 3025 | /** @format int32 */ |
... | ... | @@ -3107,6 +3202,10 @@ export interface QueryInvoiceDetailDto { |
3107 | 3202 | export interface QueryInvoiceProjectDto { |
3108 | 3203 | createByName?: string; |
3109 | 3204 | createByNameLike?: string; |
3205 | + /** @format date-time */ | |
3206 | + createTimeGe?: string; | |
3207 | + /** @format date-time */ | |
3208 | + createTimeLe?: string; | |
3110 | 3209 | /** @format int32 */ |
3111 | 3210 | current?: number; |
3112 | 3211 | /** @format int32 */ |
... | ... | @@ -3412,6 +3511,10 @@ export interface QueryUseOldInvoicingDto { |
3412 | 3511 | export interface QueryUserIntegralRecordDto { |
3413 | 3512 | createByName?: string; |
3414 | 3513 | createByNameLike?: string; |
3514 | + /** @format date-time */ | |
3515 | + createTimeGe?: string; | |
3516 | + /** @format date-time */ | |
3517 | + createTimeLe?: string; | |
3415 | 3518 | /** @format int32 */ |
3416 | 3519 | current?: number; |
3417 | 3520 | /** @format int32 */ |
... | ... | @@ -3580,6 +3683,10 @@ export interface ResearchGroupListRequest { |
3580 | 3683 | companyNameLike?: string; |
3581 | 3684 | createByName?: string; |
3582 | 3685 | createByNameLike?: string; |
3686 | + /** @format date-time */ | |
3687 | + createTimeGe?: string; | |
3688 | + /** @format date-time */ | |
3689 | + createTimeLe?: string; | |
3583 | 3690 | /** @format int32 */ |
3584 | 3691 | current?: number; |
3585 | 3692 | /** @format int32 */ |
... | ... | @@ -3732,6 +3839,10 @@ export interface ResearchGroupMemberRequestsRequest { |
3732 | 3839 | */ |
3733 | 3840 | createByName?: string; |
3734 | 3841 | createByNameLike?: string; |
3842 | + /** @format date-time */ | |
3843 | + createTimeGe?: string; | |
3844 | + /** @format date-time */ | |
3845 | + createTimeLe?: string; | |
3735 | 3846 | /** @format int32 */ |
3736 | 3847 | current?: number; |
3737 | 3848 | /** @format int32 */ |
... | ... | @@ -4070,6 +4181,10 @@ export interface SysLogQueryVO { |
4070 | 4181 | browser?: string; |
4071 | 4182 | createByName?: string; |
4072 | 4183 | createByNameLike?: string; |
4184 | + /** @format date-time */ | |
4185 | + createTimeGe?: string; | |
4186 | + /** @format date-time */ | |
4187 | + createTimeLe?: string; | |
4073 | 4188 | /** @format int32 */ |
4074 | 4189 | current?: number; |
4075 | 4190 | description?: string; |
... | ... | @@ -4109,6 +4224,10 @@ export interface TicketsSearchVo { |
4109 | 4224 | createByName?: string; |
4110 | 4225 | createByNameLike?: string; |
4111 | 4226 | createTime?: Array<LocalDateTime>; |
4227 | + /** @format date-time */ | |
4228 | + createTimeGe?: string; | |
4229 | + /** @format date-time */ | |
4230 | + createTimeLe?: string; | |
4112 | 4231 | /** @format int32 */ |
4113 | 4232 | current?: number; |
4114 | 4233 | detailText?: string; |
... | ... | @@ -4300,6 +4419,10 @@ export interface UserAddressListRequest { |
4300 | 4419 | export interface UserCenterInfoRequest { |
4301 | 4420 | createByName?: string; |
4302 | 4421 | createByNameLike?: string; |
4422 | + /** @format date-time */ | |
4423 | + createTimeGe?: string; | |
4424 | + /** @format date-time */ | |
4425 | + createTimeLe?: string; | |
4303 | 4426 | /** @format int32 */ |
4304 | 4427 | current?: number; |
4305 | 4428 | /** @format int32 */ |
... | ... | @@ -4327,6 +4450,10 @@ export interface UserCenterInfoRequest { |
4327 | 4450 | export interface UserDetailRequest { |
4328 | 4451 | createByName?: string; |
4329 | 4452 | createByNameLike?: string; |
4453 | + /** @format date-time */ | |
4454 | + createTimeGe?: string; | |
4455 | + /** @format date-time */ | |
4456 | + createTimeLe?: string; | |
4330 | 4457 | /** @format int32 */ |
4331 | 4458 | current?: number; |
4332 | 4459 | /** @format int32 */ |
... | ... | @@ -4352,6 +4479,10 @@ export interface UserDetailRequest { |
4352 | 4479 | export interface UserListRequest { |
4353 | 4480 | createByName?: string; |
4354 | 4481 | createByNameLike?: string; |
4482 | + /** @format date-time */ | |
4483 | + createTimeGe?: string; | |
4484 | + /** @format date-time */ | |
4485 | + createTimeLe?: string; | |
4355 | 4486 | /** @format int32 */ |
4356 | 4487 | current?: number; |
4357 | 4488 | /** |
... | ... | @@ -4688,6 +4819,10 @@ export interface InvoiceReissueRecord { |
4688 | 4819 | createDatetimeLe?: string; |
4689 | 4820 | /** @format date-time */ |
4690 | 4821 | createTime?: string; |
4822 | + /** @format date-time */ | |
4823 | + createTimeGe?: string; | |
4824 | + /** @format date-time */ | |
4825 | + createTimeLe?: string; | |
4691 | 4826 | /** @format int32 */ |
4692 | 4827 | current?: number; |
4693 | 4828 | /** @format int32 */ |
... | ... | @@ -4769,6 +4904,67 @@ export interface InvoiceReissueRecord { |
4769 | 4904 | updateTime?: string; |
4770 | 4905 | } |
4771 | 4906 | |
4907 | +export interface ProcureBillDetail { | |
4908 | + annexList?: Array<string>; | |
4909 | + annexs?: string; | |
4910 | + createByName?: string; | |
4911 | + /** @format date-time */ | |
4912 | + createTime?: string; | |
4913 | + /** @format int64 */ | |
4914 | + id?: number; | |
4915 | + /** @format int64 */ | |
4916 | + infoId?: number; | |
4917 | + logicDelete?: boolean; | |
4918 | + notes?: string; | |
4919 | + number?: number; | |
4920 | + paths?: Array<string>; | |
4921 | + /** @format int64 */ | |
4922 | + productId?: number; | |
4923 | + productName?: string; | |
4924 | + productUnitName?: string; | |
4925 | + productUnitPrice?: number; | |
4926 | + totalPrice?: number; | |
4927 | + updateByName?: string; | |
4928 | + /** @format date-time */ | |
4929 | + updateTime?: string; | |
4930 | +} | |
4931 | + | |
4932 | +export interface ProcureBillInfo { | |
4933 | + auditNotes?: string; | |
4934 | + auditNotesLike?: string; | |
4935 | + auditStatus?: ProcureBillInfoAuditStatus; | |
4936 | + auditStatusText?: string; | |
4937 | + createByName?: string; | |
4938 | + createByNameLike?: string; | |
4939 | + /** @format date-time */ | |
4940 | + createTime?: string; | |
4941 | + /** @format date-time */ | |
4942 | + createTimeGe?: string; | |
4943 | + /** @format date-time */ | |
4944 | + createTimeLe?: string; | |
4945 | + /** @format int32 */ | |
4946 | + current?: number; | |
4947 | + /** @format int32 */ | |
4948 | + end?: number; | |
4949 | + /** @format int64 */ | |
4950 | + id?: number; | |
4951 | + logicDelete?: boolean; | |
4952 | + notes?: string; | |
4953 | + notesLike?: string; | |
4954 | + /** @format int32 */ | |
4955 | + pageSize?: number; | |
4956 | + paths?: Array<string>; | |
4957 | + procureBillDetailList?: Array<ProcureBillDetail>; | |
4958 | + /** @format int32 */ | |
4959 | + start?: number; | |
4960 | + /** @format int32 */ | |
4961 | + total?: number; | |
4962 | + totalPrice?: number; | |
4963 | + updateByName?: string; | |
4964 | + /** @format date-time */ | |
4965 | + updateTime?: string; | |
4966 | +} | |
4967 | + | |
4772 | 4968 | /** |
4773 | 4969 | * @description |
4774 | 4970 | * 礼品申领单 |
... | ... | @@ -4860,6 +5056,42 @@ export interface ProductCollectBill { |
4860 | 5056 | warehouseText?: string; |
4861 | 5057 | } |
4862 | 5058 | |
5059 | +export interface Product { | |
5060 | + /** @format int64 */ | |
5061 | + baseUnit?: number; | |
5062 | + baseUnitName?: string; | |
5063 | + createByName?: string; | |
5064 | + createByNameLike?: string; | |
5065 | + /** @format date-time */ | |
5066 | + createTime?: string; | |
5067 | + /** @format date-time */ | |
5068 | + createTimeGe?: string; | |
5069 | + /** @format date-time */ | |
5070 | + createTimeLe?: string; | |
5071 | + /** @format int32 */ | |
5072 | + current?: number; | |
5073 | + /** @format int32 */ | |
5074 | + end?: number; | |
5075 | + /** @format int64 */ | |
5076 | + id?: number; | |
5077 | + idIn?: Array<number>; | |
5078 | + inventory?: number; | |
5079 | + logicDelete?: boolean; | |
5080 | + name?: string; | |
5081 | + nameLike?: string; | |
5082 | + /** @format int32 */ | |
5083 | + pageSize?: number; | |
5084 | + paths?: Array<string>; | |
5085 | + /** @format int32 */ | |
5086 | + start?: number; | |
5087 | + /** @format int32 */ | |
5088 | + total?: number; | |
5089 | + unitPrice?: number; | |
5090 | + updateByName?: string; | |
5091 | + /** @format date-time */ | |
5092 | + updateTime?: string; | |
5093 | +} | |
5094 | + | |
4863 | 5095 | export interface ResearchGroupAccounts { |
4864 | 5096 | /** |
4865 | 5097 | * @description |
... | ... | @@ -5052,6 +5284,10 @@ export interface SalesRechargePrepaymentRequest { |
5052 | 5284 | * @format date-time |
5053 | 5285 | */ |
5054 | 5286 | createTimeEndTime?: string; |
5287 | + /** @format date-time */ | |
5288 | + createTimeGe?: string; | |
5289 | + /** @format date-time */ | |
5290 | + createTimeLe?: string; | |
5055 | 5291 | /** @format int32 */ |
5056 | 5292 | current?: number; |
5057 | 5293 | /** | ... | ... |
src/services/request.ts
... | ... | @@ -70,7 +70,6 @@ import type { |
70 | 70 | MeasureUnitListRes, |
71 | 71 | MergeIntegralDto, |
72 | 72 | MessageQueryDTO, |
73 | - ModelAndView, | |
74 | 73 | OrderAddVO, |
75 | 74 | OrderAuditLogQueryVO, |
76 | 75 | OrderBaseInfoQueryVO, |
... | ... | @@ -89,11 +88,14 @@ import type { |
89 | 88 | OrderUnlockFieldApplyVO, |
90 | 89 | OrderUpdateVO, |
91 | 90 | OrderZoNingProvinceUserDo, |
91 | + ProcureBillAuditDto, | |
92 | + ProcureBillInfo, | |
92 | 93 | ProcureConvertProcureDto, |
93 | 94 | ProcureOrderDto, |
94 | 95 | ProcurePrintDto, |
95 | 96 | ProcureReturnBillApprovalDto, |
96 | 97 | ProcureReturnBillDto, |
98 | + Product, | |
97 | 99 | ProductCollectBill, |
98 | 100 | ProductInformationDto, |
99 | 101 | QueryAfterSalesInfoSnapshotDto, |
... | ... | @@ -163,6 +165,292 @@ import type { |
163 | 165 | WarningUserWhiteListDto, |
164 | 166 | } from './definition'; |
165 | 167 | |
168 | +/** @description request parameter type for postProcureBillAddOrModify */ | |
169 | +export interface PostProcureBillAddOrModifyOption { | |
170 | + /** | |
171 | + * @description | |
172 | + * dto | |
173 | + */ | |
174 | + body: { | |
175 | + /** | |
176 | + @description | |
177 | + dto */ | |
178 | + dto: ProcureBillInfo; | |
179 | + }; | |
180 | +} | |
181 | + | |
182 | +/** @description response type for postProcureBillAddOrModify */ | |
183 | +export interface PostProcureBillAddOrModifyResponse { | |
184 | + /** | |
185 | + * @description | |
186 | + * OK | |
187 | + */ | |
188 | + 200: ServerResult; | |
189 | + /** | |
190 | + * @description | |
191 | + * Created | |
192 | + */ | |
193 | + 201: any; | |
194 | + /** | |
195 | + * @description | |
196 | + * Unauthorized | |
197 | + */ | |
198 | + 401: any; | |
199 | + /** | |
200 | + * @description | |
201 | + * Forbidden | |
202 | + */ | |
203 | + 403: any; | |
204 | + /** | |
205 | + * @description | |
206 | + * Not Found | |
207 | + */ | |
208 | + 404: any; | |
209 | +} | |
210 | + | |
211 | +export type PostProcureBillAddOrModifyResponseSuccess = | |
212 | + PostProcureBillAddOrModifyResponse[200]; | |
213 | +/** | |
214 | + * @description | |
215 | + * 新增或修改 | |
216 | + * @tags 采购管理 | |
217 | + * @produces * | |
218 | + * @consumes application/json | |
219 | + */ | |
220 | +export const postProcureBillAddOrModify = /* #__PURE__ */ (() => { | |
221 | + const method = 'post'; | |
222 | + const url = '/ProcureBill/addOrModify'; | |
223 | + function request( | |
224 | + option: PostProcureBillAddOrModifyOption, | |
225 | + ): Promise<PostProcureBillAddOrModifyResponseSuccess> { | |
226 | + return requester(request.url, { | |
227 | + method: request.method, | |
228 | + ...option, | |
229 | + }) as unknown as Promise<PostProcureBillAddOrModifyResponseSuccess>; | |
230 | + } | |
231 | + | |
232 | + /** http method */ | |
233 | + request.method = method; | |
234 | + /** request url */ | |
235 | + request.url = url; | |
236 | + return request; | |
237 | +})(); | |
238 | + | |
239 | +/** @description request parameter type for postProcureBillAudit */ | |
240 | +export interface PostProcureBillAuditOption { | |
241 | + /** | |
242 | + * @description | |
243 | + * dto | |
244 | + */ | |
245 | + body: { | |
246 | + /** | |
247 | + @description | |
248 | + dto */ | |
249 | + dto: ProcureBillAuditDto; | |
250 | + }; | |
251 | +} | |
252 | + | |
253 | +/** @description response type for postProcureBillAudit */ | |
254 | +export interface PostProcureBillAuditResponse { | |
255 | + /** | |
256 | + * @description | |
257 | + * OK | |
258 | + */ | |
259 | + 200: ServerResult; | |
260 | + /** | |
261 | + * @description | |
262 | + * Created | |
263 | + */ | |
264 | + 201: any; | |
265 | + /** | |
266 | + * @description | |
267 | + * Unauthorized | |
268 | + */ | |
269 | + 401: any; | |
270 | + /** | |
271 | + * @description | |
272 | + * Forbidden | |
273 | + */ | |
274 | + 403: any; | |
275 | + /** | |
276 | + * @description | |
277 | + * Not Found | |
278 | + */ | |
279 | + 404: any; | |
280 | +} | |
281 | + | |
282 | +export type PostProcureBillAuditResponseSuccess = | |
283 | + PostProcureBillAuditResponse[200]; | |
284 | +/** | |
285 | + * @description | |
286 | + * 审核 | |
287 | + * @tags 采购管理 | |
288 | + * @produces * | |
289 | + * @consumes application/json | |
290 | + */ | |
291 | +export const postProcureBillAudit = /* #__PURE__ */ (() => { | |
292 | + const method = 'post'; | |
293 | + const url = '/ProcureBill/audit'; | |
294 | + function request( | |
295 | + option: PostProcureBillAuditOption, | |
296 | + ): Promise<PostProcureBillAuditResponseSuccess> { | |
297 | + return requester(request.url, { | |
298 | + method: request.method, | |
299 | + ...option, | |
300 | + }) as unknown as Promise<PostProcureBillAuditResponseSuccess>; | |
301 | + } | |
302 | + | |
303 | + /** http method */ | |
304 | + request.method = method; | |
305 | + /** request url */ | |
306 | + request.url = url; | |
307 | + return request; | |
308 | +})(); | |
309 | + | |
310 | +/** @description request parameter type for postProcureBillDelete */ | |
311 | +export interface PostProcureBillDeleteOption { | |
312 | + /** | |
313 | + * @description | |
314 | + * id | |
315 | + * @format int64 | |
316 | + */ | |
317 | + query: { | |
318 | + /** | |
319 | + @description | |
320 | + id | |
321 | + @format int64 */ | |
322 | + id: number; | |
323 | + }; | |
324 | +} | |
325 | + | |
326 | +/** @description response type for postProcureBillDelete */ | |
327 | +export interface PostProcureBillDeleteResponse { | |
328 | + /** | |
329 | + * @description | |
330 | + * OK | |
331 | + */ | |
332 | + 200: ServerResult; | |
333 | + /** | |
334 | + * @description | |
335 | + * Created | |
336 | + */ | |
337 | + 201: any; | |
338 | + /** | |
339 | + * @description | |
340 | + * Unauthorized | |
341 | + */ | |
342 | + 401: any; | |
343 | + /** | |
344 | + * @description | |
345 | + * Forbidden | |
346 | + */ | |
347 | + 403: any; | |
348 | + /** | |
349 | + * @description | |
350 | + * Not Found | |
351 | + */ | |
352 | + 404: any; | |
353 | +} | |
354 | + | |
355 | +export type PostProcureBillDeleteResponseSuccess = | |
356 | + PostProcureBillDeleteResponse[200]; | |
357 | +/** | |
358 | + * @description | |
359 | + * 删除 | |
360 | + * @tags 采购管理 | |
361 | + * @produces * | |
362 | + * @consumes application/json | |
363 | + */ | |
364 | +export const postProcureBillDelete = /* #__PURE__ */ (() => { | |
365 | + const method = 'post'; | |
366 | + const url = '/ProcureBill/delete'; | |
367 | + function request( | |
368 | + option: PostProcureBillDeleteOption, | |
369 | + ): Promise<PostProcureBillDeleteResponseSuccess> { | |
370 | + return requester(request.url, { | |
371 | + method: request.method, | |
372 | + ...option, | |
373 | + }) as unknown as Promise<PostProcureBillDeleteResponseSuccess>; | |
374 | + } | |
375 | + | |
376 | + /** http method */ | |
377 | + request.method = method; | |
378 | + /** request url */ | |
379 | + request.url = url; | |
380 | + return request; | |
381 | +})(); | |
382 | + | |
383 | +/** @description request parameter type for postProcureBillPage */ | |
384 | +export interface PostProcureBillPageOption { | |
385 | + /** | |
386 | + * @description | |
387 | + * dto | |
388 | + */ | |
389 | + body: { | |
390 | + /** | |
391 | + @description | |
392 | + dto */ | |
393 | + dto: ProcureBillInfo; | |
394 | + }; | |
395 | +} | |
396 | + | |
397 | +/** @description response type for postProcureBillPage */ | |
398 | +export interface PostProcureBillPageResponse { | |
399 | + /** | |
400 | + * @description | |
401 | + * OK | |
402 | + */ | |
403 | + 200: ServerResult; | |
404 | + /** | |
405 | + * @description | |
406 | + * Created | |
407 | + */ | |
408 | + 201: any; | |
409 | + /** | |
410 | + * @description | |
411 | + * Unauthorized | |
412 | + */ | |
413 | + 401: any; | |
414 | + /** | |
415 | + * @description | |
416 | + * Forbidden | |
417 | + */ | |
418 | + 403: any; | |
419 | + /** | |
420 | + * @description | |
421 | + * Not Found | |
422 | + */ | |
423 | + 404: any; | |
424 | +} | |
425 | + | |
426 | +export type PostProcureBillPageResponseSuccess = | |
427 | + PostProcureBillPageResponse[200]; | |
428 | +/** | |
429 | + * @description | |
430 | + * 分页查询 | |
431 | + * @tags 采购管理 | |
432 | + * @produces * | |
433 | + * @consumes application/json | |
434 | + */ | |
435 | +export const postProcureBillPage = /* #__PURE__ */ (() => { | |
436 | + const method = 'post'; | |
437 | + const url = '/ProcureBill/page'; | |
438 | + function request( | |
439 | + option: PostProcureBillPageOption, | |
440 | + ): Promise<PostProcureBillPageResponseSuccess> { | |
441 | + return requester(request.url, { | |
442 | + method: request.method, | |
443 | + ...option, | |
444 | + }) as unknown as Promise<PostProcureBillPageResponseSuccess>; | |
445 | + } | |
446 | + | |
447 | + /** http method */ | |
448 | + request.method = method; | |
449 | + /** request url */ | |
450 | + request.url = url; | |
451 | + return request; | |
452 | +})(); | |
453 | + | |
166 | 454 | /** @description request parameter type for postAdminClientAddAdminClient */ |
167 | 455 | export interface PostAdminClientAddAdminClientOption { |
168 | 456 | /** |
... | ... | @@ -3540,7 +3828,9 @@ export interface GetErrorResponse { |
3540 | 3828 | * @description |
3541 | 3829 | * OK |
3542 | 3830 | */ |
3543 | - 200: ModelAndView; | |
3831 | + 200: { | |
3832 | + [propertyName: string]: any; | |
3833 | + }; | |
3544 | 3834 | /** |
3545 | 3835 | * @description |
3546 | 3836 | * Unauthorized |
... | ... | @@ -3561,9 +3851,9 @@ export interface GetErrorResponse { |
3561 | 3851 | export type GetErrorResponseSuccess = GetErrorResponse[200]; |
3562 | 3852 | /** |
3563 | 3853 | * @description |
3564 | - * errorHtml | |
3854 | + * error | |
3565 | 3855 | * @tags basic-error-controller |
3566 | - * @produces text/html | |
3856 | + * @produces * | |
3567 | 3857 | */ |
3568 | 3858 | export const getError = /* #__PURE__ */ (() => { |
3569 | 3859 | const method = 'get'; |
... | ... | @@ -3587,7 +3877,9 @@ export interface PutErrorResponse { |
3587 | 3877 | * @description |
3588 | 3878 | * OK |
3589 | 3879 | */ |
3590 | - 200: ModelAndView; | |
3880 | + 200: { | |
3881 | + [propertyName: string]: any; | |
3882 | + }; | |
3591 | 3883 | /** |
3592 | 3884 | * @description |
3593 | 3885 | * Created |
... | ... | @@ -3613,9 +3905,9 @@ export interface PutErrorResponse { |
3613 | 3905 | export type PutErrorResponseSuccess = PutErrorResponse[200]; |
3614 | 3906 | /** |
3615 | 3907 | * @description |
3616 | - * errorHtml | |
3908 | + * error | |
3617 | 3909 | * @tags basic-error-controller |
3618 | - * @produces text/html | |
3910 | + * @produces * | |
3619 | 3911 | * @consumes application/json |
3620 | 3912 | */ |
3621 | 3913 | export const putError = /* #__PURE__ */ (() => { |
... | ... | @@ -3640,7 +3932,9 @@ export interface PostErrorResponse { |
3640 | 3932 | * @description |
3641 | 3933 | * OK |
3642 | 3934 | */ |
3643 | - 200: ModelAndView; | |
3935 | + 200: { | |
3936 | + [propertyName: string]: any; | |
3937 | + }; | |
3644 | 3938 | /** |
3645 | 3939 | * @description |
3646 | 3940 | * Created |
... | ... | @@ -3666,9 +3960,9 @@ export interface PostErrorResponse { |
3666 | 3960 | export type PostErrorResponseSuccess = PostErrorResponse[200]; |
3667 | 3961 | /** |
3668 | 3962 | * @description |
3669 | - * errorHtml | |
3963 | + * error | |
3670 | 3964 | * @tags basic-error-controller |
3671 | - * @produces text/html | |
3965 | + * @produces * | |
3672 | 3966 | * @consumes application/json |
3673 | 3967 | */ |
3674 | 3968 | export const postError = /* #__PURE__ */ (() => { |
... | ... | @@ -3693,7 +3987,9 @@ export interface DeleteErrorResponse { |
3693 | 3987 | * @description |
3694 | 3988 | * OK |
3695 | 3989 | */ |
3696 | - 200: ModelAndView; | |
3990 | + 200: { | |
3991 | + [propertyName: string]: any; | |
3992 | + }; | |
3697 | 3993 | /** |
3698 | 3994 | * @description |
3699 | 3995 | * No Content |
... | ... | @@ -3714,9 +4010,9 @@ export interface DeleteErrorResponse { |
3714 | 4010 | export type DeleteErrorResponseSuccess = DeleteErrorResponse[200]; |
3715 | 4011 | /** |
3716 | 4012 | * @description |
3717 | - * errorHtml | |
4013 | + * error | |
3718 | 4014 | * @tags basic-error-controller |
3719 | - * @produces text/html | |
4015 | + * @produces * | |
3720 | 4016 | */ |
3721 | 4017 | export const deleteError = /* #__PURE__ */ (() => { |
3722 | 4018 | const method = 'delete'; |
... | ... | @@ -3740,7 +4036,9 @@ export interface OptionsErrorResponse { |
3740 | 4036 | * @description |
3741 | 4037 | * OK |
3742 | 4038 | */ |
3743 | - 200: ModelAndView; | |
4039 | + 200: { | |
4040 | + [propertyName: string]: any; | |
4041 | + }; | |
3744 | 4042 | /** |
3745 | 4043 | * @description |
3746 | 4044 | * No Content |
... | ... | @@ -3761,9 +4059,9 @@ export interface OptionsErrorResponse { |
3761 | 4059 | export type OptionsErrorResponseSuccess = OptionsErrorResponse[200]; |
3762 | 4060 | /** |
3763 | 4061 | * @description |
3764 | - * errorHtml | |
4062 | + * error | |
3765 | 4063 | * @tags basic-error-controller |
3766 | - * @produces text/html | |
4064 | + * @produces * | |
3767 | 4065 | * @consumes application/json |
3768 | 4066 | */ |
3769 | 4067 | export const optionsError = /* #__PURE__ */ (() => { |
... | ... | @@ -3788,7 +4086,9 @@ export interface HeadErrorResponse { |
3788 | 4086 | * @description |
3789 | 4087 | * OK |
3790 | 4088 | */ |
3791 | - 200: ModelAndView; | |
4089 | + 200: { | |
4090 | + [propertyName: string]: any; | |
4091 | + }; | |
3792 | 4092 | /** |
3793 | 4093 | * @description |
3794 | 4094 | * No Content |
... | ... | @@ -3809,9 +4109,9 @@ export interface HeadErrorResponse { |
3809 | 4109 | export type HeadErrorResponseSuccess = HeadErrorResponse[200]; |
3810 | 4110 | /** |
3811 | 4111 | * @description |
3812 | - * errorHtml | |
4112 | + * error | |
3813 | 4113 | * @tags basic-error-controller |
3814 | - * @produces text/html | |
4114 | + * @produces * | |
3815 | 4115 | * @consumes application/json |
3816 | 4116 | */ |
3817 | 4117 | export const headError = /* #__PURE__ */ (() => { |
... | ... | @@ -3836,7 +4136,9 @@ export interface PatchErrorResponse { |
3836 | 4136 | * @description |
3837 | 4137 | * OK |
3838 | 4138 | */ |
3839 | - 200: ModelAndView; | |
4139 | + 200: { | |
4140 | + [propertyName: string]: any; | |
4141 | + }; | |
3840 | 4142 | /** |
3841 | 4143 | * @description |
3842 | 4144 | * No Content |
... | ... | @@ -3857,9 +4159,9 @@ export interface PatchErrorResponse { |
3857 | 4159 | export type PatchErrorResponseSuccess = PatchErrorResponse[200]; |
3858 | 4160 | /** |
3859 | 4161 | * @description |
3860 | - * errorHtml | |
4162 | + * error | |
3861 | 4163 | * @tags basic-error-controller |
3862 | - * @produces text/html | |
4164 | + * @produces * | |
3863 | 4165 | * @consumes application/json |
3864 | 4166 | */ |
3865 | 4167 | export const patchError = /* #__PURE__ */ (() => { |
... | ... | @@ -12959,8 +13261,8 @@ export const postProcureReturnBillSend = /* #__PURE__ */ (() => { |
12959 | 13261 | return request; |
12960 | 13262 | })(); |
12961 | 13263 | |
12962 | -/** @description request parameter type for postProductCollectBillAddOrModify */ | |
12963 | -export interface PostProductCollectBillAddOrModifyOption { | |
13264 | +/** @description request parameter type for postProductAddOrModify */ | |
13265 | +export interface PostProductAddOrModifyOption { | |
12964 | 13266 | /** |
12965 | 13267 | * @description |
12966 | 13268 | * dto |
... | ... | @@ -12969,12 +13271,12 @@ export interface PostProductCollectBillAddOrModifyOption { |
12969 | 13271 | /** |
12970 | 13272 | @description |
12971 | 13273 | dto */ |
12972 | - dto: ProductCollectBill; | |
13274 | + dto: Product; | |
12973 | 13275 | }; |
12974 | 13276 | } |
12975 | 13277 | |
12976 | -/** @description response type for postProductCollectBillAddOrModify */ | |
12977 | -export interface PostProductCollectBillAddOrModifyResponse { | |
13278 | +/** @description response type for postProductAddOrModify */ | |
13279 | +export interface PostProductAddOrModifyResponse { | |
12978 | 13280 | /** |
12979 | 13281 | * @description |
12980 | 13282 | * OK |
... | ... | @@ -13002,8 +13304,221 @@ export interface PostProductCollectBillAddOrModifyResponse { |
13002 | 13304 | 404: any; |
13003 | 13305 | } |
13004 | 13306 | |
13005 | -export type PostProductCollectBillAddOrModifyResponseSuccess = | |
13006 | - PostProductCollectBillAddOrModifyResponse[200]; | |
13307 | +export type PostProductAddOrModifyResponseSuccess = | |
13308 | + PostProductAddOrModifyResponse[200]; | |
13309 | +/** | |
13310 | + * @description | |
13311 | + * 新增或修改 | |
13312 | + * @tags 商品管理 | |
13313 | + * @produces * | |
13314 | + * @consumes application/json | |
13315 | + */ | |
13316 | +export const postProductAddOrModify = /* #__PURE__ */ (() => { | |
13317 | + const method = 'post'; | |
13318 | + const url = '/product/addOrModify'; | |
13319 | + function request( | |
13320 | + option: PostProductAddOrModifyOption, | |
13321 | + ): Promise<PostProductAddOrModifyResponseSuccess> { | |
13322 | + return requester(request.url, { | |
13323 | + method: request.method, | |
13324 | + ...option, | |
13325 | + }) as unknown as Promise<PostProductAddOrModifyResponseSuccess>; | |
13326 | + } | |
13327 | + | |
13328 | + /** http method */ | |
13329 | + request.method = method; | |
13330 | + /** request url */ | |
13331 | + request.url = url; | |
13332 | + return request; | |
13333 | +})(); | |
13334 | + | |
13335 | +/** @description request parameter type for postProductDelete */ | |
13336 | +export interface PostProductDeleteOption { | |
13337 | + /** | |
13338 | + * @description | |
13339 | + * id | |
13340 | + * @format int64 | |
13341 | + */ | |
13342 | + query: { | |
13343 | + /** | |
13344 | + @description | |
13345 | + id | |
13346 | + @format int64 */ | |
13347 | + id: number; | |
13348 | + }; | |
13349 | +} | |
13350 | + | |
13351 | +/** @description response type for postProductDelete */ | |
13352 | +export interface PostProductDeleteResponse { | |
13353 | + /** | |
13354 | + * @description | |
13355 | + * OK | |
13356 | + */ | |
13357 | + 200: ServerResult; | |
13358 | + /** | |
13359 | + * @description | |
13360 | + * Created | |
13361 | + */ | |
13362 | + 201: any; | |
13363 | + /** | |
13364 | + * @description | |
13365 | + * Unauthorized | |
13366 | + */ | |
13367 | + 401: any; | |
13368 | + /** | |
13369 | + * @description | |
13370 | + * Forbidden | |
13371 | + */ | |
13372 | + 403: any; | |
13373 | + /** | |
13374 | + * @description | |
13375 | + * Not Found | |
13376 | + */ | |
13377 | + 404: any; | |
13378 | +} | |
13379 | + | |
13380 | +export type PostProductDeleteResponseSuccess = PostProductDeleteResponse[200]; | |
13381 | +/** | |
13382 | + * @description | |
13383 | + * 删除 | |
13384 | + * @tags 商品管理 | |
13385 | + * @produces * | |
13386 | + * @consumes application/json | |
13387 | + */ | |
13388 | +export const postProductDelete = /* #__PURE__ */ (() => { | |
13389 | + const method = 'post'; | |
13390 | + const url = '/product/delete'; | |
13391 | + function request( | |
13392 | + option: PostProductDeleteOption, | |
13393 | + ): Promise<PostProductDeleteResponseSuccess> { | |
13394 | + return requester(request.url, { | |
13395 | + method: request.method, | |
13396 | + ...option, | |
13397 | + }) as unknown as Promise<PostProductDeleteResponseSuccess>; | |
13398 | + } | |
13399 | + | |
13400 | + /** http method */ | |
13401 | + request.method = method; | |
13402 | + /** request url */ | |
13403 | + request.url = url; | |
13404 | + return request; | |
13405 | +})(); | |
13406 | + | |
13407 | +/** @description request parameter type for postProductPage */ | |
13408 | +export interface PostProductPageOption { | |
13409 | + /** | |
13410 | + * @description | |
13411 | + * dto | |
13412 | + */ | |
13413 | + body: { | |
13414 | + /** | |
13415 | + @description | |
13416 | + dto */ | |
13417 | + dto: Product; | |
13418 | + }; | |
13419 | +} | |
13420 | + | |
13421 | +/** @description response type for postProductPage */ | |
13422 | +export interface PostProductPageResponse { | |
13423 | + /** | |
13424 | + * @description | |
13425 | + * OK | |
13426 | + */ | |
13427 | + 200: ServerResult; | |
13428 | + /** | |
13429 | + * @description | |
13430 | + * Created | |
13431 | + */ | |
13432 | + 201: any; | |
13433 | + /** | |
13434 | + * @description | |
13435 | + * Unauthorized | |
13436 | + */ | |
13437 | + 401: any; | |
13438 | + /** | |
13439 | + * @description | |
13440 | + * Forbidden | |
13441 | + */ | |
13442 | + 403: any; | |
13443 | + /** | |
13444 | + * @description | |
13445 | + * Not Found | |
13446 | + */ | |
13447 | + 404: any; | |
13448 | +} | |
13449 | + | |
13450 | +export type PostProductPageResponseSuccess = PostProductPageResponse[200]; | |
13451 | +/** | |
13452 | + * @description | |
13453 | + * 分页查询 | |
13454 | + * @tags 商品管理 | |
13455 | + * @produces * | |
13456 | + * @consumes application/json | |
13457 | + */ | |
13458 | +export const postProductPage = /* #__PURE__ */ (() => { | |
13459 | + const method = 'post'; | |
13460 | + const url = '/product/page'; | |
13461 | + function request( | |
13462 | + option: PostProductPageOption, | |
13463 | + ): Promise<PostProductPageResponseSuccess> { | |
13464 | + return requester(request.url, { | |
13465 | + method: request.method, | |
13466 | + ...option, | |
13467 | + }) as unknown as Promise<PostProductPageResponseSuccess>; | |
13468 | + } | |
13469 | + | |
13470 | + /** http method */ | |
13471 | + request.method = method; | |
13472 | + /** request url */ | |
13473 | + request.url = url; | |
13474 | + return request; | |
13475 | +})(); | |
13476 | + | |
13477 | +/** @description request parameter type for postProductCollectBillAddOrModify */ | |
13478 | +export interface PostProductCollectBillAddOrModifyOption { | |
13479 | + /** | |
13480 | + * @description | |
13481 | + * dto | |
13482 | + */ | |
13483 | + body: { | |
13484 | + /** | |
13485 | + @description | |
13486 | + dto */ | |
13487 | + dto: ProductCollectBill; | |
13488 | + }; | |
13489 | +} | |
13490 | + | |
13491 | +/** @description response type for postProductCollectBillAddOrModify */ | |
13492 | +export interface PostProductCollectBillAddOrModifyResponse { | |
13493 | + /** | |
13494 | + * @description | |
13495 | + * OK | |
13496 | + */ | |
13497 | + 200: ServerResult; | |
13498 | + /** | |
13499 | + * @description | |
13500 | + * Created | |
13501 | + */ | |
13502 | + 201: any; | |
13503 | + /** | |
13504 | + * @description | |
13505 | + * Unauthorized | |
13506 | + */ | |
13507 | + 401: any; | |
13508 | + /** | |
13509 | + * @description | |
13510 | + * Forbidden | |
13511 | + */ | |
13512 | + 403: any; | |
13513 | + /** | |
13514 | + * @description | |
13515 | + * Not Found | |
13516 | + */ | |
13517 | + 404: any; | |
13518 | +} | |
13519 | + | |
13520 | +export type PostProductCollectBillAddOrModifyResponseSuccess = | |
13521 | + PostProductCollectBillAddOrModifyResponse[200]; | |
13007 | 13522 | /** |
13008 | 13523 | * @description |
13009 | 13524 | * 新增或修改 |
... | ... | @@ -15808,6 +16323,60 @@ export const postServiceConstPlatformType = /* #__PURE__ */ (() => { |
15808 | 16323 | return request; |
15809 | 16324 | })(); |
15810 | 16325 | |
16326 | +/** @description response type for postServiceConstProcureBillAuditStatus */ | |
16327 | +export interface PostServiceConstProcureBillAuditStatusResponse { | |
16328 | + /** | |
16329 | + * @description | |
16330 | + * OK | |
16331 | + */ | |
16332 | + 200: ServerResult; | |
16333 | + /** | |
16334 | + * @description | |
16335 | + * Created | |
16336 | + */ | |
16337 | + 201: any; | |
16338 | + /** | |
16339 | + * @description | |
16340 | + * Unauthorized | |
16341 | + */ | |
16342 | + 401: any; | |
16343 | + /** | |
16344 | + * @description | |
16345 | + * Forbidden | |
16346 | + */ | |
16347 | + 403: any; | |
16348 | + /** | |
16349 | + * @description | |
16350 | + * Not Found | |
16351 | + */ | |
16352 | + 404: any; | |
16353 | +} | |
16354 | + | |
16355 | +export type PostServiceConstProcureBillAuditStatusResponseSuccess = | |
16356 | + PostServiceConstProcureBillAuditStatusResponse[200]; | |
16357 | +/** | |
16358 | + * @description | |
16359 | + * 采购单审核状态 | |
16360 | + * @tags front-const-controller | |
16361 | + * @produces * | |
16362 | + * @consumes application/json | |
16363 | + */ | |
16364 | +export const postServiceConstProcureBillAuditStatus = /* #__PURE__ */ (() => { | |
16365 | + const method = 'post'; | |
16366 | + const url = '/service/const/procureBillAuditStatus'; | |
16367 | + function request(): Promise<PostServiceConstProcureBillAuditStatusResponseSuccess> { | |
16368 | + return requester(request.url, { | |
16369 | + method: request.method, | |
16370 | + }) as unknown as Promise<PostServiceConstProcureBillAuditStatusResponseSuccess>; | |
16371 | + } | |
16372 | + | |
16373 | + /** http method */ | |
16374 | + request.method = method; | |
16375 | + /** request url */ | |
16376 | + request.url = url; | |
16377 | + return request; | |
16378 | +})(); | |
16379 | + | |
15811 | 16380 | /** @description response type for postServiceConstProcureReturnBills */ |
15812 | 16381 | export interface PostServiceConstProcureReturnBillsResponse { |
15813 | 16382 | /** |
... | ... | @@ -15916,6 +16485,60 @@ export const postServiceConstProductCollectBillStatus = /* #__PURE__ */ (() => { |
15916 | 16485 | return request; |
15917 | 16486 | })(); |
15918 | 16487 | |
16488 | +/** @description response type for postServiceConstProducts */ | |
16489 | +export interface PostServiceConstProductsResponse { | |
16490 | + /** | |
16491 | + * @description | |
16492 | + * OK | |
16493 | + */ | |
16494 | + 200: ServerResult; | |
16495 | + /** | |
16496 | + * @description | |
16497 | + * Created | |
16498 | + */ | |
16499 | + 201: any; | |
16500 | + /** | |
16501 | + * @description | |
16502 | + * Unauthorized | |
16503 | + */ | |
16504 | + 401: any; | |
16505 | + /** | |
16506 | + * @description | |
16507 | + * Forbidden | |
16508 | + */ | |
16509 | + 403: any; | |
16510 | + /** | |
16511 | + * @description | |
16512 | + * Not Found | |
16513 | + */ | |
16514 | + 404: any; | |
16515 | +} | |
16516 | + | |
16517 | +export type PostServiceConstProductsResponseSuccess = | |
16518 | + PostServiceConstProductsResponse[200]; | |
16519 | +/** | |
16520 | + * @description | |
16521 | + * 商品列表 | |
16522 | + * @tags front-const-controller | |
16523 | + * @produces * | |
16524 | + * @consumes application/json | |
16525 | + */ | |
16526 | +export const postServiceConstProducts = /* #__PURE__ */ (() => { | |
16527 | + const method = 'post'; | |
16528 | + const url = '/service/const/products'; | |
16529 | + function request(): Promise<PostServiceConstProductsResponseSuccess> { | |
16530 | + return requester(request.url, { | |
16531 | + method: request.method, | |
16532 | + }) as unknown as Promise<PostServiceConstProductsResponseSuccess>; | |
16533 | + } | |
16534 | + | |
16535 | + /** http method */ | |
16536 | + request.method = method; | |
16537 | + /** request url */ | |
16538 | + request.url = url; | |
16539 | + return request; | |
16540 | +})(); | |
16541 | + | |
15919 | 16542 | /** @description response type for postServiceConstStores */ |
15920 | 16543 | export interface PostServiceConstStoresResponse { |
15921 | 16544 | /** |
... | ... | @@ -16030,6 +16653,12 @@ export interface GetServiceInvoiceListInvoiceProjectOption { |
16030 | 16653 | createByName?: string; |
16031 | 16654 | createByNameLike?: string; |
16032 | 16655 | /** |
16656 | + @format date-time */ | |
16657 | + createTimeGe?: string; | |
16658 | + /** | |
16659 | + @format date-time */ | |
16660 | + createTimeLe?: string; | |
16661 | + /** | |
16033 | 16662 | @format int32 */ |
16034 | 16663 | current?: number; |
16035 | 16664 | /** | ... | ... |