Commit 325a0b92f06645791df8551013ef8de58eae2345
Merge remote-tracking branch 'origin/master'
Showing
39 changed files
with
9124 additions
and
442 deletions
.umirc.ts
@@ -66,6 +66,20 @@ export default defineConfig({ | @@ -66,6 +66,20 @@ export default defineConfig({ | ||
66 | access: 'canReadAdminAndFinanceAndSales', | 66 | access: 'canReadAdminAndFinanceAndSales', |
67 | }, | 67 | }, |
68 | { | 68 | { |
69 | + name: '课题组管理', | ||
70 | + path: '/researchGroup', | ||
71 | + component: './ResearchGroup', | ||
72 | + icon: 'AccountBookOutlined', | ||
73 | + access: 'canReadAdminAndSales', | ||
74 | + }, | ||
75 | + { | ||
76 | + name: '分期账单', | ||
77 | + path: '/instalment', | ||
78 | + component: './Instalment', | ||
79 | + icon: 'BookOutlined', | ||
80 | + access: 'canReadLinda', | ||
81 | + }, | ||
82 | + { | ||
69 | name: '打印', | 83 | name: '打印', |
70 | path: '/print', | 84 | path: '/print', |
71 | component: './OrderPrint', | 85 | component: './OrderPrint', |
src/access.ts
1 | export default (initialState: API.UserInfo) => { | 1 | export default (initialState: API.UserInfo) => { |
2 | // 在这里按照初始化数据定义项目中的权限,统一管理 | 2 | // 在这里按照初始化数据定义项目中的权限,统一管理 |
3 | // 参考文档 https://umijs.org/docs/max/access | 3 | // 参考文档 https://umijs.org/docs/max/access |
4 | - const { roleSmallVO } = initialState; | 4 | + const { roleSmallVO, username } = initialState; |
5 | const canReadAdmin = roleSmallVO?.code === 'admin'; | 5 | const canReadAdmin = roleSmallVO?.code === 'admin'; |
6 | const canReadProcure = roleSmallVO?.code === 'procure'; | 6 | const canReadProcure = roleSmallVO?.code === 'procure'; |
7 | const canReadFinance = roleSmallVO?.code === 'finance'; | 7 | const canReadFinance = roleSmallVO?.code === 'finance'; |
@@ -11,9 +11,11 @@ export default (initialState: API.UserInfo) => { | @@ -11,9 +11,11 @@ export default (initialState: API.UserInfo) => { | ||
11 | return { | 11 | return { |
12 | canReadAdmin: canReadAdmin, | 12 | canReadAdmin: canReadAdmin, |
13 | canReadProcure: canReadProcure, | 13 | canReadProcure: canReadProcure, |
14 | + canReadLinda: username === 'Linda' || username === '吴量', | ||
14 | canReadAdminAndFinance: canReadFinance || canReadAdmin, | 15 | canReadAdminAndFinance: canReadFinance || canReadAdmin, |
15 | canReadSales: canReadSales, | 16 | canReadSales: canReadSales, |
16 | canReadAdminAndFinanceAndSales: | 17 | canReadAdminAndFinanceAndSales: |
17 | canReadFinance || canReadAdmin || canReadSales, | 18 | canReadFinance || canReadAdmin || canReadSales, |
19 | + canReadAdminAndSales: canReadAdmin || canReadSales, | ||
18 | }; | 20 | }; |
19 | }; | 21 | }; |
src/pages/Instalment/components/comfire/comfire.tsx
0 → 100644
1 | +import { ModalForm } from '@ant-design/pro-components'; | ||
2 | +import { Form, message } from 'antd'; | ||
3 | +import { useState } from 'react'; | ||
4 | + | ||
5 | +const waitTime = (time: number = 100) => { | ||
6 | + return new Promise((resolve) => { | ||
7 | + setTimeout(() => { | ||
8 | + resolve(true); | ||
9 | + }, time); | ||
10 | + }); | ||
11 | +}; | ||
12 | + | ||
13 | +export default ({ currtDid, sureDelete }) => { | ||
14 | + const [form] = Form.useForm<{ name: string; company: string }>(); | ||
15 | + const [ids, setIds] = useState([]); | ||
16 | + | ||
17 | + function getIds() { | ||
18 | + setIds([]); | ||
19 | + setIds(currtDid); | ||
20 | + } | ||
21 | + return ( | ||
22 | + <ModalForm<{ | ||
23 | + name: string; | ||
24 | + company: string; | ||
25 | + }> | ||
26 | + trigger={ | ||
27 | + <a | ||
28 | + onClick={() => { | ||
29 | + getIds(); | ||
30 | + }} | ||
31 | + > | ||
32 | + 删除 | ||
33 | + </a> | ||
34 | + } | ||
35 | + form={form} | ||
36 | + autoFocusFirstInput | ||
37 | + width={190} | ||
38 | + modalProps={{ | ||
39 | + destroyOnClose: true, | ||
40 | + }} | ||
41 | + onFinish={async () => { | ||
42 | + await waitTime(100); | ||
43 | + sureDelete([ids]); | ||
44 | + message.success('提交成功'); | ||
45 | + return true; | ||
46 | + }} | ||
47 | + > | ||
48 | + <br /> | ||
49 | + <h2>确定删除吗</h2> | ||
50 | + </ModalForm> | ||
51 | + ); | ||
52 | +}; |
src/pages/Instalment/components/detail/detail.tsx
0 → 100644
1 | +import { | ||
2 | + postOrderErpOrderStagesAdd, | ||
3 | + postOrderErpOrderStagesPayWaySaveOrUpdate, | ||
4 | + postOrderErpOrderStagesSearch, | ||
5 | + postOrderErpOrderStagesUpload, | ||
6 | +} from '@/services'; | ||
7 | +import { PlusOutlined } from '@ant-design/icons'; | ||
8 | +import { | ||
9 | + ModalForm, | ||
10 | + ProCard, | ||
11 | + ProForm, | ||
12 | + ProFormDatePicker, | ||
13 | + ProFormText, | ||
14 | + ProFormTextArea, | ||
15 | + ProFormUploadButton, | ||
16 | +} from '@ant-design/pro-components'; | ||
17 | +import { Button, Form, message } from 'antd'; | ||
18 | +import { RcFile } from 'antd/es/upload'; | ||
19 | +import { useEffect, useState } from 'react'; | ||
20 | +import PayWayDetail from '../payWayDetail/payWayDetail'; | ||
21 | +import ProductDetail from '../productDetail/productDetail'; | ||
22 | + | ||
23 | +const waitTime = (time: number = 100) => { | ||
24 | + return new Promise((resolve) => { | ||
25 | + setTimeout(() => { | ||
26 | + resolve(true); | ||
27 | + }, time); | ||
28 | + }); | ||
29 | +}; | ||
30 | + | ||
31 | +export default ({ toReload }) => { | ||
32 | + const [form] = Form.useForm<{ name: string; company: string }>(); | ||
33 | + const [contextBody, setContextBody] = useState<OrderStagesWithListItem>({ | ||
34 | + id: undefined, | ||
35 | + contract: undefined, | ||
36 | + dateRange: undefined, | ||
37 | + terminal: undefined, | ||
38 | + orderStagesDeviceVoList: [], | ||
39 | + totalPrice: undefined, | ||
40 | + payWay: '30/30/30/10', | ||
41 | + annex: undefined, | ||
42 | + remark: undefined, | ||
43 | + }); | ||
44 | + const [editProductBody, setEditProductBody] = useState([]); | ||
45 | + const [total, setTotal] = useState(0); | ||
46 | + const [payWayBody, setPayWayBody] = useState([]); | ||
47 | + const [otherBody, setOtherBody] = useState([]); | ||
48 | + const [isDis] = useState(true); | ||
49 | + | ||
50 | + type OrderStagesWithListItem = { | ||
51 | + //文件编号 | ||
52 | + id?: number; | ||
53 | + //合同编号 | ||
54 | + contract?: string; | ||
55 | + //供应商名称 | ||
56 | + vendor?: string; | ||
57 | + //签合同日期 | ||
58 | + dateRange?: Date; | ||
59 | + //终端名称 | ||
60 | + terminal?: string; | ||
61 | + orderStagesDeviceVoList: orderStagesDevice[]; | ||
62 | + //合同总金额 | ||
63 | + totalPrice?: number; | ||
64 | + //付款方式 | ||
65 | + payWay?: string; | ||
66 | + //附件 | ||
67 | + annex?: string; | ||
68 | + //备注 | ||
69 | + remark?: string; | ||
70 | + }; | ||
71 | + | ||
72 | + type orderStagesDevice = { | ||
73 | + //设备id | ||
74 | + dId: number; | ||
75 | + //设备名称 | ||
76 | + deviceName: string; | ||
77 | + //设备型号 | ||
78 | + deviceModel: string; | ||
79 | + //数量 | ||
80 | + count: number; | ||
81 | + //单价 | ||
82 | + unitPrice: number; | ||
83 | + //总价 | ||
84 | + price: number; | ||
85 | + }; | ||
86 | + | ||
87 | + function setSave(value) { | ||
88 | + setOtherBody(value); | ||
89 | + } | ||
90 | + | ||
91 | + useEffect(() => { | ||
92 | + setContextBody({ ...contextBody, totalPrice: total }); | ||
93 | + form.setFieldValue('totalPrice', total); | ||
94 | + }, [total]); | ||
95 | + | ||
96 | + const handleInputChange = (value: string, no: number, priceNow?: number) => { | ||
97 | + if (value === '') { | ||
98 | + message.info('请输入比例!'); | ||
99 | + } else { | ||
100 | + let totalPay = 0; | ||
101 | + const payValue: string[] = value.split('/'); | ||
102 | + let body: | ||
103 | + | ((prevState: never[]) => never[]) | ||
104 | + | { proportion: string; payPrice: number }[] = []; | ||
105 | + if (no === 1) { | ||
106 | + if (payValue.length !== 4) { | ||
107 | + message.warning('比例个数总和不为4个!'); | ||
108 | + } else { | ||
109 | + payValue.forEach((item) => { | ||
110 | + totalPay += Number(item); | ||
111 | + }); | ||
112 | + } | ||
113 | + if (totalPay !== 100) { | ||
114 | + message.warning('比例总和不为100!'); | ||
115 | + } else { | ||
116 | + message.success('输入有效!'); | ||
117 | + payValue.forEach((item) => { | ||
118 | + body.push({ | ||
119 | + proportion: item + '%', | ||
120 | + payPrice: (Number(item) * total) / 100, | ||
121 | + }); | ||
122 | + }); | ||
123 | + setPayWayBody(body); | ||
124 | + } | ||
125 | + } else { | ||
126 | + payValue.forEach((item) => { | ||
127 | + totalPay += Number(item); | ||
128 | + }); | ||
129 | + payValue.forEach((item) => { | ||
130 | + body.push({ | ||
131 | + proportion: item + '%', | ||
132 | + payPrice: (Number(item) * priceNow) / 100, | ||
133 | + }); | ||
134 | + }); | ||
135 | + setPayWayBody(body); | ||
136 | + } | ||
137 | + } | ||
138 | + }; | ||
139 | + | ||
140 | + function getEditProductBody(value) { | ||
141 | + setEditProductBody(value); | ||
142 | + let price = 0; | ||
143 | + value.map((obj) => (price += obj.count * obj.unitPrice)); | ||
144 | + setTotal(price); | ||
145 | + setContextBody({ ...contextBody, orderStagesDeviceVoList: value }); | ||
146 | + if (contextBody.payWay === '') { | ||
147 | + handleInputChange('30/30/30/10', 0, price); | ||
148 | + } else { | ||
149 | + handleInputChange(contextBody.payWay, 0, price); | ||
150 | + } | ||
151 | + } | ||
152 | + | ||
153 | + function refresh() { | ||
154 | + setEditProductBody([]); | ||
155 | + setContextBody({ | ||
156 | + id: undefined, | ||
157 | + contract: undefined, | ||
158 | + dateRange: undefined, | ||
159 | + terminal: undefined, | ||
160 | + orderStagesDeviceVoList: [], | ||
161 | + totalPrice: undefined, | ||
162 | + payWay: '30/30/30/10', | ||
163 | + annex: undefined, | ||
164 | + remark: undefined, | ||
165 | + }); | ||
166 | + handleInputChange('30/30/30/10', 0, 0); | ||
167 | + } | ||
168 | + | ||
169 | + return ( | ||
170 | + <ModalForm<OrderStagesWithListItem> | ||
171 | + title="新建" | ||
172 | + trigger={ | ||
173 | + <Button | ||
174 | + key="button" | ||
175 | + icon={<PlusOutlined />} | ||
176 | + type="primary" | ||
177 | + onClick={() => refresh()} | ||
178 | + > | ||
179 | + 新增 | ||
180 | + </Button> | ||
181 | + } | ||
182 | + form={form} | ||
183 | + autoFocusFirstInput | ||
184 | + modalProps={{ | ||
185 | + destroyOnClose: true, | ||
186 | + }} | ||
187 | + submitTimeout={2000} | ||
188 | + onFinish={async (values) => { | ||
189 | + console.log(values); | ||
190 | + if (editProductBody.length === 0) { | ||
191 | + message.error('请填写产品数据'); | ||
192 | + return false; | ||
193 | + } | ||
194 | + let remakeValue = []; | ||
195 | + | ||
196 | + const formData = new FormData(); | ||
197 | + let toSendEdit = { | ||
198 | + id: values.id || contextBody.id, | ||
199 | + contract: values.contract || contextBody.contract, | ||
200 | + vendor: values.vendor || contextBody.vendor, | ||
201 | + dateRange: values.dateRange || contextBody.dateRange, | ||
202 | + terminal: values.terminal || contextBody.terminal, | ||
203 | + orderStagesDeviceDoList: | ||
204 | + values.orderStagesDeviceVoList || | ||
205 | + contextBody.orderStagesDeviceVoList, | ||
206 | + totalPrice: values.totalPrice || contextBody.totalPrice, | ||
207 | + payWay: values.payWay || contextBody.payWay, | ||
208 | + annex: contextBody.annex, | ||
209 | + remark: values.remark || contextBody.remark, | ||
210 | + }; | ||
211 | + if (values.annex) { | ||
212 | + formData.append('file', values.annex[0].originFileObj as RcFile); | ||
213 | + const res = await postOrderErpOrderStagesUpload({ | ||
214 | + data: formData, | ||
215 | + headers: { | ||
216 | + 'Content-Type': | ||
217 | + 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | ||
218 | + }, | ||
219 | + }); | ||
220 | + if (res.data) { | ||
221 | + toSendEdit.annex = res.data; | ||
222 | + } | ||
223 | + } | ||
224 | + const isSaveOrUpdate = await postOrderErpOrderStagesAdd({ | ||
225 | + data: { ...toSendEdit }, | ||
226 | + }); | ||
227 | + | ||
228 | + if (isSaveOrUpdate) { | ||
229 | + const promises = []; | ||
230 | + | ||
231 | + otherBody.forEach((item) => { | ||
232 | + let remakeItem = { | ||
233 | + ossId: item.ossId, | ||
234 | + number: item.id, | ||
235 | + dateRange: item.payDate, | ||
236 | + fileName: item.fileName, | ||
237 | + }; | ||
238 | + if ( | ||
239 | + typeof item.fileUrl === 'object' && | ||
240 | + item.fileUrl instanceof File | ||
241 | + ) { | ||
242 | + const formData = new FormData(); | ||
243 | + formData.append('file', item.fileUrl as RcFile); | ||
244 | + const uploadPromise = async () => { | ||
245 | + const res = await postOrderErpOrderStagesUpload({ | ||
246 | + data: formData, | ||
247 | + headers: { | ||
248 | + 'Content-Type': | ||
249 | + 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | ||
250 | + }, | ||
251 | + }); | ||
252 | + if (res.data) { | ||
253 | + remakeItem.fileUrl = res.data; | ||
254 | + } | ||
255 | + }; | ||
256 | + promises.push(uploadPromise()); | ||
257 | + } | ||
258 | + remakeValue.push(remakeItem); | ||
259 | + }); | ||
260 | + | ||
261 | + let makeEnd = []; | ||
262 | + const getRetrunIDPromise = async () => { | ||
263 | + let returnOssID = await postOrderErpOrderStagesSearch({ | ||
264 | + data: { contract: values.contract || contextBody.contract }, | ||
265 | + }); | ||
266 | + console.log(returnOssID.data); | ||
267 | + | ||
268 | + if (returnOssID) { | ||
269 | + makeEnd = remakeValue.map((item) => { | ||
270 | + return { ...item, ossId: returnOssID.data[0].id }; | ||
271 | + }); | ||
272 | + } | ||
273 | + }; | ||
274 | + | ||
275 | + promises.push(getRetrunIDPromise()); | ||
276 | + Promise.all(promises).then(async () => { | ||
277 | + await postOrderErpOrderStagesPayWaySaveOrUpdate({ | ||
278 | + data: makeEnd, | ||
279 | + }); | ||
280 | + }); | ||
281 | + toReload(); | ||
282 | + } | ||
283 | + await waitTime(2000); | ||
284 | + message.success('提交成功'); | ||
285 | + return true; | ||
286 | + }} | ||
287 | + > | ||
288 | + <ProCard title="基本信息" headerBordered bordered> | ||
289 | + <ProForm.Group> | ||
290 | + <ProFormText | ||
291 | + width="md" | ||
292 | + name="vendor" | ||
293 | + rules={[{ required: true, message: '此项为必填项' }]} | ||
294 | + label="供应商名称" | ||
295 | + placeholder="请输入" | ||
296 | + initialValue={contextBody.vendor} | ||
297 | + /> | ||
298 | + | ||
299 | + <ProFormText | ||
300 | + width="md" | ||
301 | + name="terminal" | ||
302 | + rules={[{ required: true, message: '此项为必填项' }]} | ||
303 | + label="终端名称" | ||
304 | + placeholder="请输入" | ||
305 | + initialValue={contextBody.terminal} | ||
306 | + /> | ||
307 | + | ||
308 | + <ProFormDatePicker | ||
309 | + name="dateRange" | ||
310 | + width="md" | ||
311 | + label="签合同日期" | ||
312 | + placeholder="请选择日期" | ||
313 | + fieldProps={{ | ||
314 | + format: (value) => value.format('YYYY-MM-DD'), | ||
315 | + }} | ||
316 | + initialValue={contextBody.dateRange} | ||
317 | + /> | ||
318 | + | ||
319 | + <ProFormText | ||
320 | + width="md" | ||
321 | + name="payWay" | ||
322 | + rules={[{ required: true, message: '此项为必填项' }]} | ||
323 | + label="付款比例" | ||
324 | + placeholder="请输入" | ||
325 | + initialValue={contextBody.payWay} | ||
326 | + disabled={!isDis} | ||
327 | + onBlur={(e) => { | ||
328 | + setContextBody({ ...contextBody, payWay: e.target.value }); | ||
329 | + handleInputChange(e.target.value, 1); | ||
330 | + }} | ||
331 | + /> | ||
332 | + | ||
333 | + <ProFormText | ||
334 | + width="md" | ||
335 | + name="contract" | ||
336 | + rules={[{ required: true, message: '此项为必填项' }]} | ||
337 | + label="合同编号" | ||
338 | + placeholder="请输入" | ||
339 | + initialValue={contextBody.contract} | ||
340 | + /> | ||
341 | + | ||
342 | + <ProFormUploadButton | ||
343 | + width="md" | ||
344 | + name="annex" | ||
345 | + max={1} | ||
346 | + label="合同附件" | ||
347 | + /> | ||
348 | + | ||
349 | + <ProFormText | ||
350 | + width="md" | ||
351 | + name="totalPrice" | ||
352 | + label="合同金额" | ||
353 | + placeholder="请输入" | ||
354 | + disabled={isDis} | ||
355 | + initialValue={'0'} | ||
356 | + /> | ||
357 | + </ProForm.Group> | ||
358 | + </ProCard> | ||
359 | + <ProCard | ||
360 | + title={ | ||
361 | + <> | ||
362 | + <span style={{ color: 'red' }}>*</span>产品明细 | ||
363 | + </> | ||
364 | + } | ||
365 | + style={{ marginTop: 10 }} | ||
366 | + headerBordered | ||
367 | + bordered | ||
368 | + > | ||
369 | + <ProductDetail | ||
370 | + productBody={[]} | ||
371 | + EditProductBody={getEditProductBody} | ||
372 | + ></ProductDetail> | ||
373 | + </ProCard> | ||
374 | + | ||
375 | + <ProCard | ||
376 | + title="付款信息" | ||
377 | + style={{ marginTop: 10 }} | ||
378 | + headerBordered | ||
379 | + bordered | ||
380 | + > | ||
381 | + <PayWayDetail | ||
382 | + payBody={payWayBody} | ||
383 | + thisId={null} | ||
384 | + currtSave={setSave} | ||
385 | + ></PayWayDetail> | ||
386 | + </ProCard> | ||
387 | + | ||
388 | + <ProCard style={{ marginTop: 10 }} headerBordered bordered> | ||
389 | + <ProFormTextArea | ||
390 | + label="备注" | ||
391 | + name="remark" | ||
392 | + initialValue={contextBody.remark} | ||
393 | + /> | ||
394 | + </ProCard> | ||
395 | + </ModalForm> | ||
396 | + ); | ||
397 | +}; |
src/pages/Instalment/components/edit/edit.tsx
0 → 100644
1 | +import { | ||
2 | + postOrderErpOrderStagesPayWaySaveOrUpdate, | ||
3 | + postOrderErpOrderStagesSaveOrUpdate, | ||
4 | + postOrderErpOrderStagesSearch, | ||
5 | + postOrderErpOrderStagesUpload, | ||
6 | +} from '@/services'; | ||
7 | +import { | ||
8 | + ModalForm, | ||
9 | + ProCard, | ||
10 | + ProForm, | ||
11 | + ProFormDatePicker, | ||
12 | + ProFormText, | ||
13 | + ProFormTextArea, | ||
14 | + ProFormUploadButton, | ||
15 | +} from '@ant-design/pro-components'; | ||
16 | +import { Form, message } from 'antd'; | ||
17 | +import { RcFile } from 'antd/es/upload'; | ||
18 | +import { useEffect, useState } from 'react'; | ||
19 | +import PayWayDetail from '../payWayDetail/payWayDetail'; | ||
20 | +import ProductDetail from '../productDetail/productDetail'; | ||
21 | + | ||
22 | +const waitTime = (time: number = 100) => { | ||
23 | + return new Promise((resolve) => { | ||
24 | + setTimeout(() => { | ||
25 | + resolve(true); | ||
26 | + }, time); | ||
27 | + }); | ||
28 | +}; | ||
29 | + | ||
30 | +export default ({ currentContract, toReload }) => { | ||
31 | + const [form] = Form.useForm<{ name: string; company: string }>(); | ||
32 | + const [contextBody, setContextBody] = useState({}); | ||
33 | + const [total, setTotal] = useState(0); | ||
34 | + const [payWayBody, setPayWayBody] = useState([]); | ||
35 | + const [otherBody, setOtherBody] = useState([]); | ||
36 | + | ||
37 | + type OrderStagesWithListItem = { | ||
38 | + //文件编号 | ||
39 | + id: number; | ||
40 | + //合同编号 | ||
41 | + contract: string; | ||
42 | + //供应商名称 | ||
43 | + vendor: string; | ||
44 | + //签合同日期 | ||
45 | + dateRange: Date; | ||
46 | + //终端名称 | ||
47 | + terminal: string; | ||
48 | + orderStagesDeviceVoList: orderStagesDevice[]; | ||
49 | + //合同总金额 | ||
50 | + totalPrice: number; | ||
51 | + //付款方式 | ||
52 | + payWay: string; | ||
53 | + //附件 | ||
54 | + annex: string; | ||
55 | + //备注 | ||
56 | + remark: string; | ||
57 | + }; | ||
58 | + | ||
59 | + type orderStagesDevice = { | ||
60 | + //设备id | ||
61 | + dId: number; | ||
62 | + //设备名称 | ||
63 | + deviceName: string; | ||
64 | + //设备型号 | ||
65 | + deviceModel: string; | ||
66 | + //数量 | ||
67 | + count: number; | ||
68 | + //单价 | ||
69 | + unitPrice: number; | ||
70 | + //总价 | ||
71 | + price: number; | ||
72 | + }; | ||
73 | + | ||
74 | + async function refresh() { | ||
75 | + const res = await postOrderErpOrderStagesSearch({ | ||
76 | + data: { contract: currentContract }, | ||
77 | + }); | ||
78 | + const context = res.data[0]; | ||
79 | + | ||
80 | + if (context.contract !== null) { | ||
81 | + setContextBody(context); | ||
82 | + setTotal(context.totalPrice); | ||
83 | + form.setFieldValue('totalPrice', context.totalPrice); | ||
84 | + } | ||
85 | + } | ||
86 | + | ||
87 | + function setSave(value) { | ||
88 | + setOtherBody(value); | ||
89 | + } | ||
90 | + | ||
91 | + useEffect(() => { | ||
92 | + setContextBody({ ...contextBody, totalPrice: total }); | ||
93 | + form.setFieldValue('totalPrice', total); | ||
94 | + }, [total]); | ||
95 | + | ||
96 | + const handleInputChange = (value: string, no: number, priceNow?: number) => { | ||
97 | + let totalPay = 0; | ||
98 | + const payValue: string[] = value.split('/'); | ||
99 | + let body: | ||
100 | + | ((prevState: never[]) => never[]) | ||
101 | + | { proportion: string; payPrice: number }[] = []; | ||
102 | + if (no === 1) { | ||
103 | + if (payValue.length !== 4) { | ||
104 | + message.warning('比例个数总和不为4个!'); | ||
105 | + } else { | ||
106 | + payValue.forEach((item) => { | ||
107 | + totalPay += Number(item); | ||
108 | + }); | ||
109 | + } | ||
110 | + if (totalPay !== 100) { | ||
111 | + message.warning('比例总和不为100!'); | ||
112 | + } else { | ||
113 | + message.success('输入有效!'); | ||
114 | + const price = total; | ||
115 | + payValue.forEach((item) => { | ||
116 | + body.push({ | ||
117 | + proportion: item + '%', | ||
118 | + payPrice: (Number(item) * price) / 100, | ||
119 | + }); | ||
120 | + }); | ||
121 | + setPayWayBody(body); | ||
122 | + } | ||
123 | + } else { | ||
124 | + payValue.forEach((item) => { | ||
125 | + totalPay += Number(item); | ||
126 | + }); | ||
127 | + payValue.forEach((item) => { | ||
128 | + body.push({ | ||
129 | + proportion: item + '%', | ||
130 | + payPrice: (Number(item) * priceNow) / 100, | ||
131 | + }); | ||
132 | + }); | ||
133 | + setPayWayBody(body); | ||
134 | + } | ||
135 | + }; | ||
136 | + | ||
137 | + async function getBody() { | ||
138 | + const res = await postOrderErpOrderStagesSearch({ | ||
139 | + data: { contract: currentContract }, | ||
140 | + }); | ||
141 | + const context = res.data[0]; | ||
142 | + | ||
143 | + if (context.contract !== null) { | ||
144 | + setContextBody(context); | ||
145 | + setTotal(context.totalPrice); | ||
146 | + form.setFieldValue('totalPrice', context.totalPrice); | ||
147 | + } | ||
148 | + handleInputChange(context.payWay, 0, context.totalPrice); | ||
149 | + } | ||
150 | + | ||
151 | + function getEditProductBody(value) { | ||
152 | + let price = 0; | ||
153 | + value.map((obj) => (price += obj.count * obj.unitPrice)); | ||
154 | + setTotal(price); | ||
155 | + setContextBody({ ...contextBody, orderStagesDeviceVoList: value }); | ||
156 | + handleInputChange(contextBody.payWay, 0, price); | ||
157 | + } | ||
158 | + | ||
159 | + useEffect(() => { | ||
160 | + getBody(); | ||
161 | + }, []); | ||
162 | + | ||
163 | + return ( | ||
164 | + <ModalForm<OrderStagesWithListItem> | ||
165 | + title="新建" | ||
166 | + trigger={<a onClick={refresh}>编辑</a>} | ||
167 | + form={form} | ||
168 | + autoFocusFirstInput | ||
169 | + modalProps={{ | ||
170 | + destroyOnClose: true, | ||
171 | + }} | ||
172 | + submitTimeout={2000} | ||
173 | + onFinish={async (values) => { | ||
174 | + if (contextBody.orderStagesDeviceVoList.length === 0) { | ||
175 | + message.error('请填写产品数据'); | ||
176 | + return false; | ||
177 | + } | ||
178 | + let remakeValue = []; | ||
179 | + const promises = []; | ||
180 | + | ||
181 | + otherBody.forEach((item) => { | ||
182 | + let remakeItem = { | ||
183 | + ossId: contextBody.id, | ||
184 | + number: item.id, | ||
185 | + dateRange: item.payDate, | ||
186 | + fileName: item.fileName, | ||
187 | + }; | ||
188 | + if ( | ||
189 | + typeof item.fileUrl === 'object' && | ||
190 | + item.fileUrl instanceof File | ||
191 | + ) { | ||
192 | + const formData = new FormData(); | ||
193 | + formData.append('file', item.fileUrl as RcFile); | ||
194 | + const uploadPromise = async () => { | ||
195 | + const res = await postOrderErpOrderStagesUpload({ | ||
196 | + data: formData, | ||
197 | + headers: { | ||
198 | + 'Content-Type': | ||
199 | + 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | ||
200 | + }, | ||
201 | + }); | ||
202 | + if (res.data) { | ||
203 | + remakeItem.fileUrl = res.data; | ||
204 | + } | ||
205 | + }; | ||
206 | + promises.push(uploadPromise()); | ||
207 | + } | ||
208 | + remakeValue.push(remakeItem); | ||
209 | + }); | ||
210 | + Promise.all(promises).then(async () => { | ||
211 | + await postOrderErpOrderStagesPayWaySaveOrUpdate({ | ||
212 | + data: remakeValue, | ||
213 | + }); | ||
214 | + }); | ||
215 | + const formData = new FormData(); | ||
216 | + let toSendEdit = { | ||
217 | + id: values.id || contextBody.id, | ||
218 | + contract: values.contract || contextBody.contract, | ||
219 | + vendor: values.vendor || contextBody.vendor, | ||
220 | + dateRange: values.dateRange || contextBody.dateRange, | ||
221 | + terminal: values.terminal || contextBody.terminal, | ||
222 | + orderStagesDeviceDoList: | ||
223 | + values.orderStagesDeviceVoList || | ||
224 | + contextBody.orderStagesDeviceVoList, | ||
225 | + totalPrice: values.totalPrice || contextBody.totalPrice, | ||
226 | + payWay: values.payWay || contextBody.payWay, | ||
227 | + annex: contextBody.annex, | ||
228 | + remark: values.remark || contextBody.remark, | ||
229 | + }; | ||
230 | + if (values.annex) { | ||
231 | + formData.append('file', values.annex[0].originFileObj as RcFile); | ||
232 | + const res = await postOrderErpOrderStagesUpload({ | ||
233 | + data: formData, | ||
234 | + headers: { | ||
235 | + 'Content-Type': | ||
236 | + 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | ||
237 | + }, | ||
238 | + }); | ||
239 | + if (res.data) { | ||
240 | + toSendEdit.annex = res.data; | ||
241 | + } | ||
242 | + } | ||
243 | + const isSaveOrUpdate = await postOrderErpOrderStagesSaveOrUpdate({ | ||
244 | + data: { ...toSendEdit }, | ||
245 | + }); | ||
246 | + if (isSaveOrUpdate) { | ||
247 | + getBody(); | ||
248 | + toReload(); | ||
249 | + } | ||
250 | + await waitTime(2000); | ||
251 | + message.success('提交成功'); | ||
252 | + return true; | ||
253 | + }} | ||
254 | + > | ||
255 | + <ProCard title="基本信息" headerBordered bordered> | ||
256 | + <ProForm.Group> | ||
257 | + <ProFormText | ||
258 | + width="md" | ||
259 | + name="vendor" | ||
260 | + rules={[{ required: true, message: '此项为必填项' }]} | ||
261 | + label="供应商名称" | ||
262 | + placeholder="请输入" | ||
263 | + initialValue={contextBody.vendor} | ||
264 | + /> | ||
265 | + | ||
266 | + <ProFormText | ||
267 | + width="md" | ||
268 | + name="terminal" | ||
269 | + rules={[{ required: true, message: '此项为必填项' }]} | ||
270 | + label="终端名称" | ||
271 | + placeholder="请输入" | ||
272 | + initialValue={contextBody.terminal} | ||
273 | + /> | ||
274 | + | ||
275 | + <ProFormDatePicker | ||
276 | + name="dateRange" | ||
277 | + width="md" | ||
278 | + label="签合同日期" | ||
279 | + placeholder="请选择日期" | ||
280 | + fieldProps={{ | ||
281 | + format: (value) => value.format('YYYY-MM-DD'), | ||
282 | + }} | ||
283 | + initialValue={contextBody.dateRange} | ||
284 | + /> | ||
285 | + | ||
286 | + <ProFormText | ||
287 | + width="md" | ||
288 | + name="payWay" | ||
289 | + rules={[{ required: true, message: '此项为必填项' }]} | ||
290 | + label="付款比例" | ||
291 | + placeholder="请输入" | ||
292 | + initialValue={contextBody.payWay} | ||
293 | + onBlur={(e) => { | ||
294 | + handleInputChange(e.target.value, 1); | ||
295 | + }} | ||
296 | + /> | ||
297 | + | ||
298 | + <ProFormText | ||
299 | + width="md" | ||
300 | + name="contract" | ||
301 | + rules={[{ required: true, message: '此项为必填项' }]} | ||
302 | + label="合同编号" | ||
303 | + placeholder="请输入" | ||
304 | + initialValue={contextBody.contract} | ||
305 | + /> | ||
306 | + | ||
307 | + <ProFormUploadButton | ||
308 | + width="md" | ||
309 | + name="annex" | ||
310 | + max={1} | ||
311 | + label="合同附件" | ||
312 | + /> | ||
313 | + | ||
314 | + <ProFormText | ||
315 | + width="md" | ||
316 | + name="totalPrice" | ||
317 | + label="合同金额" | ||
318 | + placeholder="请输入" | ||
319 | + disabled | ||
320 | + initialValue={contextBody.totalPrice} | ||
321 | + /> | ||
322 | + </ProForm.Group> | ||
323 | + </ProCard> | ||
324 | + | ||
325 | + <ProCard | ||
326 | + title={ | ||
327 | + <> | ||
328 | + <span style={{ color: 'red' }}>*</span>产品明细 | ||
329 | + </> | ||
330 | + } | ||
331 | + style={{ marginTop: 10 }} | ||
332 | + headerBordered | ||
333 | + bordered | ||
334 | + > | ||
335 | + <ProductDetail | ||
336 | + productBody={contextBody.orderStagesDeviceVoList} | ||
337 | + EditProductBody={getEditProductBody} | ||
338 | + ></ProductDetail> | ||
339 | + </ProCard> | ||
340 | + | ||
341 | + <ProCard | ||
342 | + title="付款信息" | ||
343 | + style={{ marginTop: 10 }} | ||
344 | + headerBordered | ||
345 | + bordered | ||
346 | + > | ||
347 | + <PayWayDetail | ||
348 | + payBody={payWayBody} | ||
349 | + thisId={contextBody.id} | ||
350 | + currtSave={setSave} | ||
351 | + ></PayWayDetail> | ||
352 | + </ProCard> | ||
353 | + | ||
354 | + <ProCard style={{ marginTop: 10 }} headerBordered bordered> | ||
355 | + <ProFormTextArea | ||
356 | + label="备注" | ||
357 | + name="remark" | ||
358 | + initialValue={contextBody.remark} | ||
359 | + /> | ||
360 | + </ProCard> | ||
361 | + </ModalForm> | ||
362 | + ); | ||
363 | +}; |
src/pages/Instalment/components/payWayDetail/payWayDetail.css
0 → 100644
1 | +.payway-detail-index td { | ||
2 | + font-family: 'San Francisco', 'Helvetica Neue', Helvetica, Arial, | ||
3 | + 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Heiti SC', | ||
4 | + 'WenQuanYi Micro Hei', sans-serif; | ||
5 | + font-size: 14px; | ||
6 | + margin: 0; | ||
7 | +} | ||
8 | + | ||
9 | +.payway-detail-index td .css-dev-only-do-not-override-nllxry { | ||
10 | + margin-bottom: 0 !important; | ||
11 | +} | ||
12 | + | ||
13 | +.dataChoose { | ||
14 | + margin: 0; | ||
15 | +} |
src/pages/Instalment/components/payWayDetail/payWayDetail.less
0 → 100644
1 | +.payway-detail-index td { | ||
2 | + font-family: 'San Francisco', 'Helvetica Neue', Helvetica, Arial, | ||
3 | + 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Heiti SC', | ||
4 | + 'WenQuanYi Micro Hei', sans-serif; | ||
5 | + font-size: 14px; | ||
6 | + margin: 0; | ||
7 | + | ||
8 | + .css-dev-only-do-not-override-nllxry { | ||
9 | + margin-bottom: 0 !important; | ||
10 | + } | ||
11 | +} | ||
12 | + | ||
13 | +.dataChoose { | ||
14 | + margin: 0; | ||
15 | +} | ||
16 | + | ||
17 | +// .pay-way-detail-index td .css-dev-only-do-not-override-nllxry{ | ||
18 | +// margin-bottom: 0px !important; | ||
19 | +// } |
src/pages/Instalment/components/payWayDetail/payWayDetail.tsx
0 → 100644
1 | +import { postOrderErpOrderStagesPayWaySelect } from '@/services'; | ||
2 | +import type { ProColumns } from '@ant-design/pro-components'; | ||
3 | +import { | ||
4 | + EditableProTable, | ||
5 | + ProFormDatePicker, | ||
6 | + ProFormRadio, | ||
7 | + ProFormUploadButton, | ||
8 | +} from '@ant-design/pro-components'; | ||
9 | +import { message } from 'antd'; | ||
10 | +import React, { useEffect, useState } from 'react'; | ||
11 | +import './payWayDetail.less'; | ||
12 | + | ||
13 | +const waitTime = (time: number = 100) => { | ||
14 | + return new Promise((resolve) => { | ||
15 | + setTimeout(() => { | ||
16 | + resolve(true); | ||
17 | + }, time); | ||
18 | + }); | ||
19 | +}; | ||
20 | + | ||
21 | +type DataSourceType = { | ||
22 | + id: number; | ||
23 | + payStep?: string; | ||
24 | + proportion?: string; | ||
25 | + ossId?: number; | ||
26 | + payPrice?: number; | ||
27 | + payDate?: Date; | ||
28 | + fileName?: string; | ||
29 | + fileUrl?: string; | ||
30 | +}; | ||
31 | + | ||
32 | +export default ({ payBody, thisId, currtSave }) => { | ||
33 | + const defaultData: DataSourceType[] = [ | ||
34 | + { | ||
35 | + id: 1, | ||
36 | + payStep: '预付款', | ||
37 | + proportion: undefined, | ||
38 | + payPrice: undefined, | ||
39 | + ossId: undefined, | ||
40 | + payDate: undefined, | ||
41 | + fileName: undefined, | ||
42 | + fileUrl: undefined, | ||
43 | + }, | ||
44 | + { | ||
45 | + id: 2, | ||
46 | + payStep: '发贷款', | ||
47 | + proportion: undefined, | ||
48 | + payPrice: undefined, | ||
49 | + ossId: undefined, | ||
50 | + payDate: undefined, | ||
51 | + fileName: undefined, | ||
52 | + fileUrl: undefined, | ||
53 | + }, | ||
54 | + { | ||
55 | + id: 3, | ||
56 | + payStep: '验收款', | ||
57 | + proportion: undefined, | ||
58 | + payPrice: undefined, | ||
59 | + ossId: undefined, | ||
60 | + payDate: undefined, | ||
61 | + fileName: undefined, | ||
62 | + fileUrl: undefined, | ||
63 | + }, | ||
64 | + { | ||
65 | + id: 4, | ||
66 | + payStep: '质保金', | ||
67 | + proportion: undefined, | ||
68 | + payPrice: undefined, | ||
69 | + ossId: undefined, | ||
70 | + payDate: undefined, | ||
71 | + fileName: undefined, | ||
72 | + fileUrl: undefined, | ||
73 | + }, | ||
74 | + ]; | ||
75 | + | ||
76 | + const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | ||
77 | + const [position, setPosition] = useState<'top' | 'bottom' | 'hidden'>( | ||
78 | + 'hidden', | ||
79 | + ); | ||
80 | + const [payWayDetailBody, setPayWayDetailBody] = useState< | ||
81 | + readonly DataSourceType[] | ||
82 | + >([...defaultData]); | ||
83 | + // const [body, setBody] = useState([]) | ||
84 | + const [isAccept, setIsAccept] = useState(null); | ||
85 | + // const [isCurrtSave, setIsCurrtSave] = useState(false); | ||
86 | + | ||
87 | + async function getOther(value, arr) { | ||
88 | + const res = await postOrderErpOrderStagesPayWaySelect({ | ||
89 | + data: { ossId: value }, | ||
90 | + }); | ||
91 | + if (res.data) { | ||
92 | + const context = res.data; | ||
93 | + const remake = arr.map((obj) => { | ||
94 | + let currt = obj; | ||
95 | + context.forEach((object) => { | ||
96 | + if (object.number === obj.id) { | ||
97 | + currt = { | ||
98 | + ...obj, | ||
99 | + ossId: value, | ||
100 | + payDate: object.dateRange, | ||
101 | + fileName: object.fileName, | ||
102 | + fileUrl: object.fileUrl, | ||
103 | + }; | ||
104 | + return currt; | ||
105 | + } | ||
106 | + }); | ||
107 | + return currt; | ||
108 | + }); | ||
109 | + setPayWayDetailBody(remake); | ||
110 | + } | ||
111 | + } | ||
112 | + | ||
113 | + function setPayWay(value) { | ||
114 | + const remakeData = payWayDetailBody.map((obj) => { | ||
115 | + return { | ||
116 | + ...obj, | ||
117 | + proportion: value[obj.id - 1]?.proportion, | ||
118 | + payPrice: value[obj.id - 1]?.payPrice, | ||
119 | + }; | ||
120 | + }); | ||
121 | + // console.log(remakeData); | ||
122 | + | ||
123 | + setPayWayDetailBody(remakeData); | ||
124 | + // console.log(thisId); | ||
125 | + | ||
126 | + if (thisId !== null) { | ||
127 | + getOther(thisId, remakeData); | ||
128 | + } | ||
129 | + } | ||
130 | + // useEffect(() => { | ||
131 | + // getOther(thisId) | ||
132 | + // }, [thisId]) | ||
133 | + | ||
134 | + useEffect(() => { | ||
135 | + setPayWay(payBody); | ||
136 | + }, [payBody]); | ||
137 | + | ||
138 | + // function setCurrtSave(value) { | ||
139 | + // // console.log(value); | ||
140 | + // setIsCurrtSave(payWayDetailBody) | ||
141 | + // } | ||
142 | + | ||
143 | + const columns: ProColumns<DataSourceType>[] = [ | ||
144 | + { | ||
145 | + title: '编号', | ||
146 | + dataIndex: 'id', | ||
147 | + hideInTable: true, | ||
148 | + editable: false, | ||
149 | + }, | ||
150 | + { | ||
151 | + title: '付款信息', | ||
152 | + dataIndex: 'payStep', | ||
153 | + editable: false, | ||
154 | + }, | ||
155 | + { | ||
156 | + title: '付款比例', | ||
157 | + dataIndex: 'proportion', | ||
158 | + editable: false, | ||
159 | + }, | ||
160 | + { | ||
161 | + title: '付款金额', | ||
162 | + dataIndex: 'payPrice', | ||
163 | + editable: false, | ||
164 | + }, | ||
165 | + { | ||
166 | + title: '对应的订单', | ||
167 | + dataIndex: 'ossId', | ||
168 | + editable: false, | ||
169 | + hideInTable: true, | ||
170 | + }, | ||
171 | + { | ||
172 | + title: '付款时间', | ||
173 | + dataIndex: 'payDate', | ||
174 | + editable: false, | ||
175 | + render: (text, record) => { | ||
176 | + const handleChange = (value) => { | ||
177 | + const updatedDataSource = payWayDetailBody.map((item) => { | ||
178 | + if (item.id === record.id) { | ||
179 | + return { | ||
180 | + ...item, | ||
181 | + payDate: value, | ||
182 | + }; | ||
183 | + } | ||
184 | + return item; | ||
185 | + }); | ||
186 | + // console.log(updatedDataSource); | ||
187 | + | ||
188 | + setPayWayDetailBody(updatedDataSource); | ||
189 | + currtSave(updatedDataSource); | ||
190 | + }; | ||
191 | + | ||
192 | + return ( | ||
193 | + <ProFormDatePicker | ||
194 | + className="dataChoose" | ||
195 | + initialValue={record.payDate} | ||
196 | + value={record.payDate} | ||
197 | + placeholder={'请填写时间'} | ||
198 | + fieldProps={{ | ||
199 | + format: (value) => value.format('YYYY-MM-DD'), | ||
200 | + onChange: handleChange, | ||
201 | + }} | ||
202 | + /> | ||
203 | + ); | ||
204 | + }, | ||
205 | + }, | ||
206 | + { | ||
207 | + title: '付款单回执', | ||
208 | + dataIndex: 'fileName', | ||
209 | + render: (text, record) => { | ||
210 | + if (isAccept !== record.id) { | ||
211 | + if ( | ||
212 | + typeof record.fileUrl === 'object' && | ||
213 | + record.fileUrl instanceof File | ||
214 | + ) { | ||
215 | + return ( | ||
216 | + <a onClick={() => message.error('请先保存')}>{record.fileName}</a> | ||
217 | + ); | ||
218 | + } else { | ||
219 | + return <a href={record.fileUrl}>{record.fileName}</a>; | ||
220 | + } | ||
221 | + } else { | ||
222 | + return ( | ||
223 | + <ProFormUploadButton | ||
224 | + name={record.id} | ||
225 | + onChange={(value) => { | ||
226 | + // console.log(value); | ||
227 | + // console.log(payWayDetailBody); | ||
228 | + let remakeBody = []; | ||
229 | + let remakeBodyItem = {}; | ||
230 | + payWayDetailBody.forEach((item) => { | ||
231 | + if (item.id === record.id) { | ||
232 | + remakeBodyItem = { | ||
233 | + ...item, | ||
234 | + fileUrl: value.file.originFileObj, | ||
235 | + fileName: value.file.name, | ||
236 | + }; | ||
237 | + } else { | ||
238 | + remakeBodyItem = { ...item }; | ||
239 | + } | ||
240 | + // if (value.fileList.length == 0) { | ||
241 | + // remakeBodyItem = { ...item, fileUrl: undefined, fileName: undefined } | ||
242 | + // } | ||
243 | + remakeBody.push(remakeBodyItem); | ||
244 | + }); | ||
245 | + setPayWayDetailBody(remakeBody); | ||
246 | + currtSave(remakeBody); | ||
247 | + }} | ||
248 | + width="md" | ||
249 | + max={1} | ||
250 | + /> | ||
251 | + ); | ||
252 | + } | ||
253 | + }, | ||
254 | + }, | ||
255 | + { | ||
256 | + title: '操作', | ||
257 | + valueType: 'option', | ||
258 | + width: 200, | ||
259 | + render: (text, record) => [ | ||
260 | + <a | ||
261 | + key="editable" | ||
262 | + onClick={() => { | ||
263 | + if (isAccept !== record.id) { | ||
264 | + setIsAccept(record.id); | ||
265 | + } else { | ||
266 | + setIsAccept(null); | ||
267 | + } | ||
268 | + }} | ||
269 | + > | ||
270 | + {record.fileName !== undefined && | ||
271 | + record.fileName !== '' && | ||
272 | + record.fileName !== null | ||
273 | + ? '重新上传' | ||
274 | + : '上传回执'} | ||
275 | + </a>, | ||
276 | + ], | ||
277 | + }, | ||
278 | + ]; | ||
279 | + | ||
280 | + return ( | ||
281 | + <> | ||
282 | + <EditableProTable<DataSourceType> | ||
283 | + rowKey="id" | ||
284 | + className="payway-detail-index" | ||
285 | + toolbar={{ style: { display: 'none' } }} | ||
286 | + ghost={true} | ||
287 | + scroll={{ | ||
288 | + x: 960, | ||
289 | + }} | ||
290 | + recordCreatorProps={ | ||
291 | + position !== 'hidden' | ||
292 | + ? { | ||
293 | + position: position as 'top', | ||
294 | + record: () => ({ id: (Math.random() * 1000000).toFixed(0) }), | ||
295 | + } | ||
296 | + : false | ||
297 | + } | ||
298 | + loading={false} | ||
299 | + toolBarRender={() => [ | ||
300 | + <ProFormRadio.Group | ||
301 | + key="render" | ||
302 | + fieldProps={{ | ||
303 | + value: position, | ||
304 | + onChange: (e) => setPosition(e.target.value), | ||
305 | + }} | ||
306 | + />, | ||
307 | + ]} | ||
308 | + columns={columns} | ||
309 | + request={payWayDetailBody} | ||
310 | + value={payWayDetailBody} | ||
311 | + onChange={(value) => { | ||
312 | + setPayWayDetailBody(value); | ||
313 | + // setCurrtSave(payWayDetailBody) | ||
314 | + }} | ||
315 | + editable={{ | ||
316 | + type: 'multiple', | ||
317 | + editableKeys, | ||
318 | + onSave: async () => { | ||
319 | + // console.log(rowKey, data, row); | ||
320 | + await waitTime(2000); | ||
321 | + }, | ||
322 | + onChange: setEditableRowKeys, | ||
323 | + }} | ||
324 | + /> | ||
325 | + </> | ||
326 | + ); | ||
327 | +}; |
src/pages/Instalment/components/productDetail/productDetail.css
0 → 100644
src/pages/Instalment/components/productDetail/productDetail.less
0 → 100644
src/pages/Instalment/components/productDetail/productDetail.tsx
0 → 100644
1 | +import type { ProColumns } from '@ant-design/pro-components'; | ||
2 | +import { EditableProTable, ProFormRadio } from '@ant-design/pro-components'; | ||
3 | +import React, { useEffect, useState } from 'react'; | ||
4 | +import './productDetail.less'; | ||
5 | + | ||
6 | +const waitTime = (time: number = 100) => { | ||
7 | + return new Promise((resolve) => { | ||
8 | + setTimeout(() => { | ||
9 | + resolve(true); | ||
10 | + }, time); | ||
11 | + }); | ||
12 | +}; | ||
13 | + | ||
14 | +// type DataSourceType = { | ||
15 | +// count?: number; | ||
16 | +// id: React.Key; | ||
17 | +// deviceModel?: string; | ||
18 | +// deviceName?: string; | ||
19 | +// price?: number; | ||
20 | +// unitPrice?: number; | ||
21 | +// }; | ||
22 | + | ||
23 | +export default ({ productBody, EditProductBody }) => { | ||
24 | + const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | ||
25 | + const [dataSource, setDataSource] = useState<readonly DataSourceType[]>([]); | ||
26 | + // const [form] = Form.useForm<{ name: string; company: string }>(); | ||
27 | + const [position, setPosition] = useState<'top' | 'bottom' | 'hidden'>( | ||
28 | + 'bottom', | ||
29 | + ); | ||
30 | + function getDataSourece() { | ||
31 | + if (productBody.length !== 0) { | ||
32 | + setDataSource(productBody); | ||
33 | + } | ||
34 | + } | ||
35 | + function setEditProductBody(value) { | ||
36 | + // console.log(value); | ||
37 | + // console.log(dataSource); | ||
38 | + | ||
39 | + const modifiedArray = value.map((obj) => { | ||
40 | + if (obj.dId && Number(obj.dId) <= 1000) { | ||
41 | + return { | ||
42 | + ...obj, | ||
43 | + count: obj.count, | ||
44 | + dId: null, | ||
45 | + deviceModel: obj.deviceModel, | ||
46 | + deviceName: obj.deviceName, | ||
47 | + price: Number(obj.unitPrice) * Number(obj.count), | ||
48 | + unitPrice: obj.unitPrice, | ||
49 | + }; | ||
50 | + } else { | ||
51 | + return { ...obj, price: Number(obj.unitPrice) * Number(obj.count) }; | ||
52 | + } | ||
53 | + }); | ||
54 | + // console.log(modifiedArray); | ||
55 | + | ||
56 | + EditProductBody(modifiedArray); | ||
57 | + setDataSource(value); | ||
58 | + } | ||
59 | + | ||
60 | + useEffect(() => { | ||
61 | + getDataSourece(); | ||
62 | + }, [productBody]); | ||
63 | + | ||
64 | + type DataSourceType = { | ||
65 | + id: React.Key; | ||
66 | + count: number; | ||
67 | + dId?: number; | ||
68 | + deviceModel: string; | ||
69 | + deviceName: string; | ||
70 | + price: number; | ||
71 | + unitPrice: number; | ||
72 | + }; | ||
73 | + | ||
74 | + const columns: ProColumns<DataSourceType>[] = [ | ||
75 | + { | ||
76 | + title: '设备编号', | ||
77 | + dataIndex: 'dId', | ||
78 | + hideInTable: true, | ||
79 | + }, | ||
80 | + { | ||
81 | + title: '设备名称', | ||
82 | + dataIndex: 'deviceName', | ||
83 | + formItemProps: () => { | ||
84 | + return { | ||
85 | + rules: [{ required: true, message: '此项为必填项' }], | ||
86 | + }; | ||
87 | + }, | ||
88 | + }, | ||
89 | + { | ||
90 | + title: '设备型号', | ||
91 | + dataIndex: 'deviceModel', | ||
92 | + width: '15%', | ||
93 | + formItemProps: () => { | ||
94 | + return { | ||
95 | + rules: [{ required: true, message: '此项为必填项' }], | ||
96 | + }; | ||
97 | + }, | ||
98 | + }, | ||
99 | + { | ||
100 | + title: '数量', | ||
101 | + dataIndex: 'count', | ||
102 | + formItemProps: () => { | ||
103 | + return { | ||
104 | + rules: [{ required: true, message: '此项为必填项' }], | ||
105 | + }; | ||
106 | + }, | ||
107 | + }, | ||
108 | + { | ||
109 | + title: '单价', | ||
110 | + dataIndex: 'unitPrice', | ||
111 | + formItemProps: () => { | ||
112 | + return { | ||
113 | + rules: [{ required: true, message: '此项为必填项' }], | ||
114 | + }; | ||
115 | + }, | ||
116 | + }, | ||
117 | + { | ||
118 | + title: '总价', | ||
119 | + dataIndex: 'price', | ||
120 | + hideInSetting: true, | ||
121 | + disable: true, | ||
122 | + editable: false, | ||
123 | + render: (_text, record) => [ | ||
124 | + <span key={record.dId}>{record.count * record.unitPrice}</span>, | ||
125 | + ], | ||
126 | + }, | ||
127 | + { | ||
128 | + title: '操作', | ||
129 | + valueType: 'option', | ||
130 | + width: 200, | ||
131 | + render: (_text, record, _, action) => [ | ||
132 | + <a | ||
133 | + key="editable" | ||
134 | + onClick={() => { | ||
135 | + if (record.dId) { | ||
136 | + action?.startEditable?.(record.dId); | ||
137 | + } | ||
138 | + }} | ||
139 | + > | ||
140 | + 编辑 | ||
141 | + </a>, | ||
142 | + <a | ||
143 | + key="delete" | ||
144 | + onClick={() => { | ||
145 | + EditProductBody( | ||
146 | + dataSource.filter((item) => item.dId !== record.dId), | ||
147 | + ); | ||
148 | + setDataSource(dataSource.filter((item) => item.dId !== record.dId)); | ||
149 | + }} | ||
150 | + > | ||
151 | + 删除 | ||
152 | + </a>, | ||
153 | + ], | ||
154 | + }, | ||
155 | + ]; | ||
156 | + | ||
157 | + return ( | ||
158 | + <> | ||
159 | + <EditableProTable<DataSourceType> | ||
160 | + className="product-detail-index" | ||
161 | + rowKey="dId" | ||
162 | + toolbar={{ style: { display: 'none' } }} | ||
163 | + ghost={true} | ||
164 | + scroll={{ | ||
165 | + x: 960, | ||
166 | + }} | ||
167 | + recordCreatorProps={ | ||
168 | + position !== 'hidden' | ||
169 | + ? { | ||
170 | + position: position as 'top', | ||
171 | + record: () => ({ dId: (Math.random() * 1000).toFixed(0) }), | ||
172 | + } | ||
173 | + : false | ||
174 | + } | ||
175 | + loading={false} | ||
176 | + toolBarRender={() => [ | ||
177 | + <ProFormRadio.Group | ||
178 | + key="render" | ||
179 | + fieldProps={{ | ||
180 | + value: position, | ||
181 | + onChange: (e) => setPosition(e.target.value), | ||
182 | + }} | ||
183 | + />, | ||
184 | + ]} | ||
185 | + columns={columns} | ||
186 | + request={dataSource} | ||
187 | + value={dataSource} | ||
188 | + onChange={setEditProductBody} | ||
189 | + editable={{ | ||
190 | + type: 'multiple', | ||
191 | + editableKeys, | ||
192 | + onSave: async () => { | ||
193 | + await waitTime(500); | ||
194 | + }, | ||
195 | + onChange: setEditableRowKeys, | ||
196 | + }} | ||
197 | + /> | ||
198 | + </> | ||
199 | + ); | ||
200 | +}; |
src/pages/Instalment/components/read/read.tsx
0 → 100644
1 | +import { | ||
2 | + postOrderErpOrderStagesPayWaySaveOrUpdate, | ||
3 | + postOrderErpOrderStagesSaveOrUpdate, | ||
4 | + postOrderErpOrderStagesSearch, | ||
5 | + postOrderErpOrderStagesUpload, | ||
6 | +} from '@/services'; | ||
7 | +import { | ||
8 | + ModalForm, | ||
9 | + ProCard, | ||
10 | + ProForm, | ||
11 | + ProFormDatePicker, | ||
12 | + ProFormText, | ||
13 | + ProFormTextArea, | ||
14 | +} from '@ant-design/pro-components'; | ||
15 | +import { Form, message } from 'antd'; | ||
16 | +import { RcFile } from 'antd/es/upload'; | ||
17 | +import { useEffect, useState } from 'react'; | ||
18 | +import PayWayDetail from './readPayWay'; | ||
19 | +import ProductDetail from './readProduct'; | ||
20 | + | ||
21 | +const waitTime = (time: number = 100) => { | ||
22 | + return new Promise((resolve) => { | ||
23 | + setTimeout(() => { | ||
24 | + resolve(true); | ||
25 | + }, time); | ||
26 | + }); | ||
27 | +}; | ||
28 | + | ||
29 | +export default ({ currentContract }) => { | ||
30 | + const [form] = Form.useForm<{ name: string; company: string }>(); | ||
31 | + const [contextBody, setContextBody] = useState({}); | ||
32 | + const [, setEditProductBody] = useState([]); | ||
33 | + const [total, setTotal] = useState(0); | ||
34 | + const [payWayBody, setPayWayBody] = useState([]); | ||
35 | + const [otherBody, setOtherBody] = useState([]); | ||
36 | + | ||
37 | + type OrderStagesWithListItem = { | ||
38 | + //文件编号 | ||
39 | + id: number; | ||
40 | + //合同编号 | ||
41 | + contract: string; | ||
42 | + //供应商名称 | ||
43 | + vendor: string; | ||
44 | + //签合同日期 | ||
45 | + dateRange: Date; | ||
46 | + //终端名称 | ||
47 | + terminal: string; | ||
48 | + orderStagesDeviceVoList: orderStagesDevice[]; | ||
49 | + //合同总金额 | ||
50 | + totalPrice: number; | ||
51 | + //付款方式 | ||
52 | + payWay: string; | ||
53 | + //附件 | ||
54 | + annex: string; | ||
55 | + //备注 | ||
56 | + remark: string; | ||
57 | + }; | ||
58 | + | ||
59 | + type orderStagesDevice = { | ||
60 | + //设备id | ||
61 | + dId: number; | ||
62 | + //设备名称 | ||
63 | + deviceName: string; | ||
64 | + //设备型号 | ||
65 | + deviceModel: string; | ||
66 | + //数量 | ||
67 | + count: number; | ||
68 | + //单价 | ||
69 | + unitPrice: number; | ||
70 | + //总价 | ||
71 | + price: number; | ||
72 | + }; | ||
73 | + | ||
74 | + async function refresh() { | ||
75 | + const res = await postOrderErpOrderStagesSearch({ | ||
76 | + data: { contract: currentContract }, | ||
77 | + }); | ||
78 | + const context = res.data[0]; | ||
79 | + // console.log(context); | ||
80 | + | ||
81 | + if (context.contract !== null) { | ||
82 | + setContextBody(context); | ||
83 | + setTotal(context.totalPrice); | ||
84 | + form.setFieldValue('totalPrice', context.totalPrice); | ||
85 | + } | ||
86 | + } | ||
87 | + | ||
88 | + function setSave(value) { | ||
89 | + // console.log(value); | ||
90 | + setOtherBody(value); | ||
91 | + } | ||
92 | + | ||
93 | + useEffect(() => { | ||
94 | + setContextBody({ ...contextBody, totalPrice: total }); | ||
95 | + form.setFieldValue('totalPrice', total); | ||
96 | + }, [total]); | ||
97 | + | ||
98 | + const handleInputChange = (value: string, no: number, priceNow?: number) => { | ||
99 | + let totalPay = 0; | ||
100 | + const payValue: string[] = value.split('/'); | ||
101 | + let body: | ||
102 | + | ((prevState: never[]) => never[]) | ||
103 | + | { proportion: string; payPrice: number }[] = []; | ||
104 | + if (no === 1) { | ||
105 | + if (payValue.length !== 4) { | ||
106 | + message.warning('比例个数总和不为4个!'); | ||
107 | + } else { | ||
108 | + payValue.forEach((item) => { | ||
109 | + totalPay += Number(item); | ||
110 | + }); | ||
111 | + } | ||
112 | + if (totalPay !== 100) { | ||
113 | + message.warning('比例总和不为100!'); | ||
114 | + } else { | ||
115 | + message.success('输入有效!'); | ||
116 | + const price = total; | ||
117 | + payValue.forEach((item) => { | ||
118 | + body.push({ | ||
119 | + proportion: item + '%', | ||
120 | + payPrice: (Number(item) * price) / 100, | ||
121 | + }); | ||
122 | + }); | ||
123 | + setPayWayBody(body); | ||
124 | + } | ||
125 | + } else { | ||
126 | + payValue.forEach((item) => { | ||
127 | + totalPay += Number(item); | ||
128 | + }); | ||
129 | + payValue.forEach((item) => { | ||
130 | + body.push({ | ||
131 | + proportion: item + '%', | ||
132 | + payPrice: (Number(item) * priceNow) / 100, | ||
133 | + }); | ||
134 | + }); | ||
135 | + setPayWayBody(body); | ||
136 | + } | ||
137 | + }; | ||
138 | + | ||
139 | + async function getBody() { | ||
140 | + const res = await postOrderErpOrderStagesSearch({ | ||
141 | + data: { contract: currentContract }, | ||
142 | + }); | ||
143 | + const context = res.data[0]; | ||
144 | + // console.log(context); | ||
145 | + | ||
146 | + if (context.contract !== null) { | ||
147 | + setContextBody(context); | ||
148 | + setTotal(context.totalPrice); | ||
149 | + form.setFieldValue('totalPrice', context.totalPrice); | ||
150 | + } | ||
151 | + handleInputChange(context.payWay, 0, context.totalPrice); | ||
152 | + } | ||
153 | + | ||
154 | + useEffect(() => { | ||
155 | + getBody(); | ||
156 | + }, []); | ||
157 | + | ||
158 | + function getEditProductBody(value) { | ||
159 | + // console.log(value); | ||
160 | + | ||
161 | + setEditProductBody(value); | ||
162 | + let price = 0; | ||
163 | + value.map((obj) => (price += obj.count * obj.unitPrice)); | ||
164 | + setTotal(price); | ||
165 | + setContextBody({ ...contextBody, orderStagesDeviceVoList: value }); | ||
166 | + handleInputChange(contextBody.payWay, 0, price); | ||
167 | + } | ||
168 | + | ||
169 | + return ( | ||
170 | + <ModalForm<OrderStagesWithListItem> | ||
171 | + title="新建" | ||
172 | + trigger={<a onClick={refresh}>查看</a>} | ||
173 | + form={form} | ||
174 | + autoFocusFirstInput | ||
175 | + modalProps={{ | ||
176 | + destroyOnClose: true, | ||
177 | + // onCancel: () => console.log('run'), | ||
178 | + }} | ||
179 | + submitTimeout={2000} | ||
180 | + onFinish={async (values) => { | ||
181 | + // console.log(values); | ||
182 | + // console.log(otherBody); | ||
183 | + let remakeValue = []; | ||
184 | + // 创建一个用于存储所有异步操作的Promise数组 | ||
185 | + const promises = []; | ||
186 | + | ||
187 | + otherBody.forEach((item) => { | ||
188 | + let remakeItem = { | ||
189 | + ossId: item.ossId, | ||
190 | + number: item.id, | ||
191 | + dataRange: item.payDate, | ||
192 | + fileName: item.fileName, | ||
193 | + }; | ||
194 | + if ( | ||
195 | + typeof item.fileUrl === 'object' && | ||
196 | + item.fileUrl instanceof File | ||
197 | + ) { | ||
198 | + const formData = new FormData(); | ||
199 | + formData.append('file', item.fileUrl as RcFile); | ||
200 | + const uploadPromise = async () => { | ||
201 | + const res = await postOrderErpOrderStagesUpload({ | ||
202 | + data: formData, | ||
203 | + headers: { | ||
204 | + 'Content-Type': | ||
205 | + 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | ||
206 | + }, | ||
207 | + }); | ||
208 | + if (res.data) { | ||
209 | + remakeItem.fileUrl = res.data; | ||
210 | + } | ||
211 | + }; | ||
212 | + promises.push(uploadPromise()); | ||
213 | + } | ||
214 | + remakeValue.push(remakeItem); | ||
215 | + }); | ||
216 | + | ||
217 | + // 使用Promise.all等待所有异步操作完成后再执行保存操作 | ||
218 | + Promise.all(promises).then(async () => { | ||
219 | + await postOrderErpOrderStagesPayWaySaveOrUpdate({ | ||
220 | + data: remakeValue, | ||
221 | + }); | ||
222 | + }); | ||
223 | + const formData = new FormData(); | ||
224 | + // let toSendEdit={...values,orderStagesDeviceVoList:contextBody.orderStagesDeviceVoList}; | ||
225 | + let toSendEdit = { | ||
226 | + id: values.id || contextBody.id, | ||
227 | + contract: values.contract || contextBody.contract, | ||
228 | + vendor: values.vendor || contextBody.vendor, | ||
229 | + dateRange: values.dateRange || contextBody.dateRange, | ||
230 | + terminal: values.terminal || contextBody.terminal, | ||
231 | + orderStagesDeviceDoList: | ||
232 | + values.orderStagesDeviceVoList || | ||
233 | + contextBody.orderStagesDeviceVoList, | ||
234 | + totalPrice: values.totalPrice || contextBody.totalPrice, | ||
235 | + payWay: values.payWay || contextBody.payWay, | ||
236 | + annex: contextBody.annex, | ||
237 | + remark: values.remark || contextBody.remark, | ||
238 | + }; | ||
239 | + if (values.annex) { | ||
240 | + formData.append('file', values.annex[0].originFileObj as RcFile); | ||
241 | + const res = await postOrderErpOrderStagesUpload({ | ||
242 | + data: formData, | ||
243 | + headers: { | ||
244 | + 'Content-Type': | ||
245 | + 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | ||
246 | + }, | ||
247 | + }); | ||
248 | + if (res.data) { | ||
249 | + // console.log(values) | ||
250 | + // console.log(contextBody); | ||
251 | + toSendEdit.annex = res.data; | ||
252 | + } | ||
253 | + } | ||
254 | + const isSaveOrUpdate = await postOrderErpOrderStagesSaveOrUpdate({ | ||
255 | + data: { ...toSendEdit }, | ||
256 | + }); | ||
257 | + if (isSaveOrUpdate) { | ||
258 | + // console.log(isSaveOrUpdate); | ||
259 | + getBody(); | ||
260 | + } | ||
261 | + await waitTime(2000); | ||
262 | + message.success('提交成功'); | ||
263 | + return true; | ||
264 | + }} | ||
265 | + > | ||
266 | + <ProCard title="基本信息" headerBordered bordered> | ||
267 | + <ProForm.Group> | ||
268 | + <ProFormText | ||
269 | + width="md" | ||
270 | + name="vendor" | ||
271 | + label="供应商名称" | ||
272 | + placeholder="请输入" | ||
273 | + initialValue={contextBody.vendor} | ||
274 | + readonly | ||
275 | + /> | ||
276 | + | ||
277 | + <ProFormText | ||
278 | + width="md" | ||
279 | + name="terminal" | ||
280 | + label="终端名称" | ||
281 | + placeholder="请输入" | ||
282 | + initialValue={contextBody.terminal} | ||
283 | + readonly | ||
284 | + /> | ||
285 | + | ||
286 | + <ProFormDatePicker | ||
287 | + name="dateRange" | ||
288 | + width="md" | ||
289 | + label="签合同日期" | ||
290 | + placeholder="请选择日期" | ||
291 | + fieldProps={{ | ||
292 | + format: (value) => value.format('YYYY-MM-DD'), | ||
293 | + }} | ||
294 | + initialValue={contextBody.dateRange} | ||
295 | + readonly | ||
296 | + /> | ||
297 | + | ||
298 | + <ProFormText | ||
299 | + width="md" | ||
300 | + name="payWay" | ||
301 | + label="付款比例" | ||
302 | + placeholder="请输入" | ||
303 | + initialValue={contextBody.payWay} | ||
304 | + readonly | ||
305 | + onBlur={(e) => { | ||
306 | + handleInputChange(e.target.value, 1); | ||
307 | + }} | ||
308 | + /> | ||
309 | + | ||
310 | + <ProFormText | ||
311 | + width="md" | ||
312 | + name="contract" | ||
313 | + label="合同编号" | ||
314 | + placeholder="请输入" | ||
315 | + initialValue={contextBody.contract} | ||
316 | + readonly | ||
317 | + /> | ||
318 | + | ||
319 | + {/* <ProFormText | ||
320 | + width="md" | ||
321 | + name="annex" | ||
322 | + label="合同附件" | ||
323 | + placeholder="请输入" | ||
324 | + initialValue={contextBody.fileUrl} | ||
325 | + readonly | ||
326 | + /> */} | ||
327 | + | ||
328 | + <ProFormText | ||
329 | + width="md" | ||
330 | + name="totalPrice" | ||
331 | + label="合同金额" | ||
332 | + placeholder="请输入" | ||
333 | + disabled | ||
334 | + readonly | ||
335 | + // rules={[{ required: true, message: '此项为必填项' }]} | ||
336 | + // value={contextBody.totalPrice} | ||
337 | + initialValue={contextBody.totalPrice} | ||
338 | + /> | ||
339 | + </ProForm.Group> | ||
340 | + </ProCard> | ||
341 | + <ProCard | ||
342 | + title="产品明细" | ||
343 | + style={{ marginTop: 10 }} | ||
344 | + headerBordered | ||
345 | + bordered | ||
346 | + > | ||
347 | + <ProductDetail | ||
348 | + productBody={contextBody.orderStagesDeviceVoList} | ||
349 | + EditProductBody={getEditProductBody} | ||
350 | + ></ProductDetail> | ||
351 | + </ProCard> | ||
352 | + | ||
353 | + <ProCard | ||
354 | + title="付款信息" | ||
355 | + style={{ marginTop: 10 }} | ||
356 | + headerBordered | ||
357 | + bordered | ||
358 | + > | ||
359 | + <PayWayDetail | ||
360 | + payBody={payWayBody} | ||
361 | + thisId={contextBody.id} | ||
362 | + currtSave={setSave} | ||
363 | + ></PayWayDetail> | ||
364 | + </ProCard> | ||
365 | + | ||
366 | + <ProCard style={{ marginTop: 10 }} headerBordered bordered> | ||
367 | + <ProFormTextArea | ||
368 | + label="备注" | ||
369 | + name="remark" | ||
370 | + initialValue={contextBody.remark} | ||
371 | + readonly | ||
372 | + /> | ||
373 | + </ProCard> | ||
374 | + </ModalForm> | ||
375 | + ); | ||
376 | +}; |
src/pages/Instalment/components/read/readPayWay.tsx
0 → 100644
1 | +import { postOrderErpOrderStagesPayWaySelect } from '@/services'; | ||
2 | +import type { ProColumns } from '@ant-design/pro-components'; | ||
3 | +import { | ||
4 | + EditableProTable, | ||
5 | + ProFormRadio, | ||
6 | + ProFormUploadButton, | ||
7 | +} from '@ant-design/pro-components'; | ||
8 | +import { message } from 'antd'; | ||
9 | +import React, { useEffect, useState } from 'react'; | ||
10 | + | ||
11 | +const waitTime = (time: number = 100) => { | ||
12 | + return new Promise((resolve) => { | ||
13 | + setTimeout(() => { | ||
14 | + resolve(true); | ||
15 | + }, time); | ||
16 | + }); | ||
17 | +}; | ||
18 | + | ||
19 | +type DataSourceType = { | ||
20 | + id: number; | ||
21 | + payStep?: string; | ||
22 | + proportion?: string; | ||
23 | + ossId?: number; | ||
24 | + payPrice?: number; | ||
25 | + payDate?: Date; | ||
26 | + fileName?: string; | ||
27 | + fileUrl?: string; | ||
28 | +}; | ||
29 | + | ||
30 | +export default ({ payBody, thisId, currtSave }) => { | ||
31 | + const defaultData: DataSourceType[] = [ | ||
32 | + { | ||
33 | + id: 1, | ||
34 | + payStep: '预付款', | ||
35 | + proportion: undefined, | ||
36 | + payPrice: undefined, | ||
37 | + ossId: undefined, | ||
38 | + payDate: undefined, | ||
39 | + fileName: undefined, | ||
40 | + fileUrl: undefined, | ||
41 | + }, | ||
42 | + { | ||
43 | + id: 2, | ||
44 | + payStep: '发贷款', | ||
45 | + proportion: undefined, | ||
46 | + payPrice: undefined, | ||
47 | + ossId: undefined, | ||
48 | + payDate: undefined, | ||
49 | + fileName: undefined, | ||
50 | + fileUrl: undefined, | ||
51 | + }, | ||
52 | + { | ||
53 | + id: 3, | ||
54 | + payStep: '验收款', | ||
55 | + proportion: undefined, | ||
56 | + payPrice: undefined, | ||
57 | + ossId: undefined, | ||
58 | + payDate: undefined, | ||
59 | + fileName: undefined, | ||
60 | + fileUrl: undefined, | ||
61 | + }, | ||
62 | + { | ||
63 | + id: 4, | ||
64 | + payStep: '质保金', | ||
65 | + proportion: undefined, | ||
66 | + payPrice: undefined, | ||
67 | + ossId: undefined, | ||
68 | + payDate: undefined, | ||
69 | + fileName: undefined, | ||
70 | + fileUrl: undefined, | ||
71 | + }, | ||
72 | + ]; | ||
73 | + | ||
74 | + const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | ||
75 | + const [position, setPosition] = useState<'top' | 'bottom' | 'hidden'>( | ||
76 | + 'hidden', | ||
77 | + ); | ||
78 | + const [payWayDetailBody, setPayWayDetailBody] = useState< | ||
79 | + readonly DataSourceType[] | ||
80 | + >([...defaultData]); | ||
81 | + const [isAccept] = useState(null); | ||
82 | + // const [isCurrtSave, setIsCurrtSave] = useState(false); | ||
83 | + | ||
84 | + async function getOther(value, arr) { | ||
85 | + const res = await postOrderErpOrderStagesPayWaySelect({ | ||
86 | + data: { ossId: value }, | ||
87 | + }); | ||
88 | + if (res.data) { | ||
89 | + const context = res.data; | ||
90 | + const remake = arr.map((obj) => { | ||
91 | + let currt = obj; | ||
92 | + context.forEach((object) => { | ||
93 | + if (object.number === obj.id) { | ||
94 | + currt = { | ||
95 | + ...obj, | ||
96 | + ossId: value, | ||
97 | + payDate: object.dateRange, | ||
98 | + fileName: object.fileName, | ||
99 | + fileUrl: object.fileUrl, | ||
100 | + }; | ||
101 | + return currt; | ||
102 | + } | ||
103 | + }); | ||
104 | + return currt; | ||
105 | + }); | ||
106 | + setPayWayDetailBody(remake); | ||
107 | + } | ||
108 | + } | ||
109 | + | ||
110 | + function setPayWay(value) { | ||
111 | + const remakeData = payWayDetailBody.map((obj) => { | ||
112 | + return { | ||
113 | + ...obj, | ||
114 | + proportion: value[obj.id - 1]?.proportion, | ||
115 | + payPrice: value[obj.id - 1]?.payPrice, | ||
116 | + }; | ||
117 | + }); | ||
118 | + | ||
119 | + setPayWayDetailBody(remakeData); | ||
120 | + | ||
121 | + if (thisId !== null) { | ||
122 | + getOther(thisId, remakeData); | ||
123 | + } | ||
124 | + } | ||
125 | + // useEffect(() => { | ||
126 | + // getOther(thisId) | ||
127 | + // }, [thisId]) | ||
128 | + | ||
129 | + useEffect(() => { | ||
130 | + setPayWay(payBody); | ||
131 | + }, [payBody]); | ||
132 | + | ||
133 | + // function setCurrtSave(_value) { | ||
134 | + // setIsCurrtSave(payWayDetailBody) | ||
135 | + // } | ||
136 | + | ||
137 | + const columns: ProColumns<DataSourceType>[] = [ | ||
138 | + { | ||
139 | + title: '编号', | ||
140 | + dataIndex: 'id', | ||
141 | + hideInTable: true, | ||
142 | + editable: false, | ||
143 | + }, | ||
144 | + { | ||
145 | + title: '付款信息', | ||
146 | + dataIndex: 'payStep', | ||
147 | + editable: false, | ||
148 | + }, | ||
149 | + { | ||
150 | + title: '付款比例', | ||
151 | + dataIndex: 'proportion', | ||
152 | + editable: false, | ||
153 | + }, | ||
154 | + { | ||
155 | + title: '付款金额', | ||
156 | + dataIndex: 'payPrice', | ||
157 | + editable: false, | ||
158 | + }, | ||
159 | + { | ||
160 | + title: '对应的订单', | ||
161 | + dataIndex: 'ossId', | ||
162 | + editable: false, | ||
163 | + hideInTable: true, | ||
164 | + }, | ||
165 | + { | ||
166 | + title: '付款时间', | ||
167 | + dataIndex: 'payDate', | ||
168 | + editable: false, | ||
169 | + render: (_text, record) => { | ||
170 | + return ( | ||
171 | + <span> | ||
172 | + {new Intl.DateTimeFormat('zh-CN', { | ||
173 | + year: 'numeric', | ||
174 | + month: 'long', | ||
175 | + day: 'numeric', | ||
176 | + }).format(record.payDate)} | ||
177 | + </span> | ||
178 | + // <ProFormDatePicker | ||
179 | + // className='dataChoose' | ||
180 | + // initialValue={record.payDate} | ||
181 | + // value={record.payDate} | ||
182 | + // placeholder={"请填写时间"} | ||
183 | + // fieldProps={{ | ||
184 | + // format: (value) => value.format('YYYY-MM-DD'), | ||
185 | + // onChange: handleChange, | ||
186 | + // }} | ||
187 | + // /> | ||
188 | + ); | ||
189 | + }, | ||
190 | + }, | ||
191 | + { | ||
192 | + title: '付款单回执', | ||
193 | + dataIndex: 'fileName', | ||
194 | + render: (_text, record) => { | ||
195 | + if (isAccept !== record.id) { | ||
196 | + if ( | ||
197 | + typeof record.fileUrl === 'object' && | ||
198 | + record.fileUrl instanceof File | ||
199 | + ) { | ||
200 | + return ( | ||
201 | + <a onClick={() => message.error('请先保存')}>{record.fileName}</a> | ||
202 | + ); | ||
203 | + } else { | ||
204 | + return <a href={record.fileUrl}>{record.fileName}</a>; | ||
205 | + } | ||
206 | + } else { | ||
207 | + return ( | ||
208 | + <ProFormUploadButton | ||
209 | + name={record.id} | ||
210 | + onChange={(value) => { | ||
211 | + let remakeBody = []; | ||
212 | + let remakeBodyItem = {}; | ||
213 | + payWayDetailBody.forEach((item) => { | ||
214 | + if (item.id === record.id) { | ||
215 | + remakeBodyItem = { | ||
216 | + ...item, | ||
217 | + fileUrl: value.file.originFileObj, | ||
218 | + fileName: value.file.name, | ||
219 | + }; | ||
220 | + } else { | ||
221 | + remakeBodyItem = { ...item }; | ||
222 | + } | ||
223 | + if (value.fileList.length === 0) { | ||
224 | + remakeBodyItem = { | ||
225 | + ...item, | ||
226 | + fileUrl: undefined, | ||
227 | + fileName: undefined, | ||
228 | + }; | ||
229 | + } | ||
230 | + remakeBody.push(remakeBodyItem); | ||
231 | + }); | ||
232 | + setPayWayDetailBody(remakeBody); | ||
233 | + currtSave(remakeBody); | ||
234 | + }} | ||
235 | + width="md" | ||
236 | + max={1} | ||
237 | + /> | ||
238 | + ); | ||
239 | + } | ||
240 | + }, | ||
241 | + }, | ||
242 | + ]; | ||
243 | + | ||
244 | + return ( | ||
245 | + <> | ||
246 | + <EditableProTable<DataSourceType> | ||
247 | + rowKey="id" | ||
248 | + className="payway-detail-index" | ||
249 | + toolbar={{ style: { display: 'none' } }} | ||
250 | + ghost={true} | ||
251 | + scroll={{ | ||
252 | + x: 960, | ||
253 | + }} | ||
254 | + recordCreatorProps={ | ||
255 | + position !== 'hidden' | ||
256 | + ? { | ||
257 | + position: position as 'top', | ||
258 | + record: () => ({ id: (Math.random() * 1000000).toFixed(0) }), | ||
259 | + } | ||
260 | + : false | ||
261 | + } | ||
262 | + loading={false} | ||
263 | + toolBarRender={() => [ | ||
264 | + <ProFormRadio.Group | ||
265 | + key="render" | ||
266 | + fieldProps={{ | ||
267 | + value: position, | ||
268 | + onChange: (e) => setPosition(e.target.value), | ||
269 | + }} | ||
270 | + />, | ||
271 | + ]} | ||
272 | + columns={columns} | ||
273 | + request={payWayDetailBody} | ||
274 | + value={payWayDetailBody} | ||
275 | + onChange={(value) => { | ||
276 | + setPayWayDetailBody(value); | ||
277 | + // setCurrtSave(payWayDetailBody) | ||
278 | + }} | ||
279 | + editable={{ | ||
280 | + type: 'multiple', | ||
281 | + editableKeys, | ||
282 | + onSave: async () => { | ||
283 | + await waitTime(2000); | ||
284 | + }, | ||
285 | + onChange: setEditableRowKeys, | ||
286 | + }} | ||
287 | + /> | ||
288 | + </> | ||
289 | + ); | ||
290 | +}; |
src/pages/Instalment/components/read/readProduct.tsx
0 → 100644
1 | +import type { ProColumns } from '@ant-design/pro-components'; | ||
2 | +import { EditableProTable, ProFormRadio } from '@ant-design/pro-components'; | ||
3 | +import { Form } from 'antd'; | ||
4 | +import React, { useEffect, useState } from 'react'; | ||
5 | + | ||
6 | +const waitTime = (time: number = 100) => { | ||
7 | + return new Promise((resolve) => { | ||
8 | + setTimeout(() => { | ||
9 | + resolve(true); | ||
10 | + }, time); | ||
11 | + }); | ||
12 | +}; | ||
13 | + | ||
14 | +// type DataSourceType = { | ||
15 | +// count?: number; | ||
16 | +// id: React.Key; | ||
17 | +// deviceModel?: string; | ||
18 | +// deviceName?: string; | ||
19 | +// price?: number; | ||
20 | +// unitPrice?: number; | ||
21 | +// }; | ||
22 | + | ||
23 | +export default ({ productBody, EditProductBody }) => { | ||
24 | + const [editableKeys, setEditableRowKeys] = useState<React.Key[]>([]); | ||
25 | + const [dataSource, setDataSource] = useState<readonly DataSourceType[]>([]); | ||
26 | + const [form] = Form.useForm<{ name: string; company: string }>(); | ||
27 | + const [position, setPosition] = useState<'top' | 'bottom' | 'hidden'>( | ||
28 | + 'hidden', | ||
29 | + ); | ||
30 | + function getDataSourece() { | ||
31 | + if (productBody.length !== 0) { | ||
32 | + setDataSource(productBody); | ||
33 | + } | ||
34 | + } | ||
35 | + function setEditProductBody(value) { | ||
36 | + const modifiedArray = value.map((obj) => { | ||
37 | + if (obj.dId && Number(obj.dId) <= 1000) { | ||
38 | + return { | ||
39 | + ...obj, | ||
40 | + count: obj.count, | ||
41 | + dId: null, | ||
42 | + deviceModel: obj.deviceModel, | ||
43 | + deviceName: obj.deviceName, | ||
44 | + price: obj.price, | ||
45 | + unitPrice: obj.unitPrice, | ||
46 | + }; | ||
47 | + } else { | ||
48 | + return obj; | ||
49 | + } | ||
50 | + }); | ||
51 | + | ||
52 | + EditProductBody(modifiedArray); | ||
53 | + setDataSource(value); | ||
54 | + } | ||
55 | + | ||
56 | + useEffect(() => { | ||
57 | + getDataSourece(); | ||
58 | + }, [productBody]); | ||
59 | + | ||
60 | + type DataSourceType = { | ||
61 | + id: React.Key; | ||
62 | + count: number; | ||
63 | + dId?: number; | ||
64 | + deviceModel: string; | ||
65 | + deviceName: string; | ||
66 | + price: number; | ||
67 | + unitPrice: number; | ||
68 | + }; | ||
69 | + | ||
70 | + const columns: ProColumns<DataSourceType>[] = [ | ||
71 | + { | ||
72 | + title: '设备编号', | ||
73 | + dataIndex: 'dId', | ||
74 | + hideInTable: true, | ||
75 | + }, | ||
76 | + { | ||
77 | + title: '设备名称', | ||
78 | + dataIndex: 'deviceName', | ||
79 | + formItemProps: () => { | ||
80 | + return { | ||
81 | + rules: [{ required: true, message: '此项为必填项' }], | ||
82 | + }; | ||
83 | + }, | ||
84 | + }, | ||
85 | + { | ||
86 | + title: '设备型号', | ||
87 | + dataIndex: 'deviceModel', | ||
88 | + width: '15%', | ||
89 | + formItemProps: () => { | ||
90 | + return { | ||
91 | + rules: [{ required: true, message: '此项为必填项' }], | ||
92 | + }; | ||
93 | + }, | ||
94 | + }, | ||
95 | + { | ||
96 | + title: '数量', | ||
97 | + dataIndex: 'count', | ||
98 | + onChange: (e) => { | ||
99 | + const unitPrice = form.getFieldValue(`data[${rowIndex}].unitPrice`); | ||
100 | + form.setFieldsValue({ | ||
101 | + [`data[${rowIndex}].price`]: e * unitPrice, | ||
102 | + }); | ||
103 | + }, | ||
104 | + formItemProps: () => { | ||
105 | + return { | ||
106 | + rules: [{ required: true, message: '此项为必填项' }], | ||
107 | + }; | ||
108 | + }, | ||
109 | + }, | ||
110 | + { | ||
111 | + title: '单价', | ||
112 | + dataIndex: 'unitPrice', | ||
113 | + formItemProps: () => { | ||
114 | + return { | ||
115 | + rules: [{ required: true, message: '此项为必填项' }], | ||
116 | + }; | ||
117 | + }, | ||
118 | + }, | ||
119 | + { | ||
120 | + title: '总价', | ||
121 | + dataIndex: 'price', | ||
122 | + formItemProps: () => { | ||
123 | + return { | ||
124 | + rules: [{ required: true, message: '此项为必填项' }], | ||
125 | + }; | ||
126 | + }, | ||
127 | + }, | ||
128 | + ]; | ||
129 | + | ||
130 | + return ( | ||
131 | + <> | ||
132 | + <EditableProTable<DataSourceType> | ||
133 | + className="product-detail-index" | ||
134 | + rowKey="dId" | ||
135 | + toolbar={{ style: { display: 'none' } }} | ||
136 | + ghost={true} | ||
137 | + scroll={{ | ||
138 | + x: 960, | ||
139 | + }} | ||
140 | + recordCreatorProps={ | ||
141 | + position !== 'hidden' | ||
142 | + ? { | ||
143 | + position: position as 'top', | ||
144 | + record: () => ({ dId: (Math.random() * 1000).toFixed(0) }), | ||
145 | + } | ||
146 | + : false | ||
147 | + } | ||
148 | + loading={false} | ||
149 | + toolBarRender={() => [ | ||
150 | + <ProFormRadio.Group | ||
151 | + key="render" | ||
152 | + fieldProps={{ | ||
153 | + value: position, | ||
154 | + onChange: (e) => setPosition(e.target.value), | ||
155 | + }} | ||
156 | + />, | ||
157 | + ]} | ||
158 | + columns={columns} | ||
159 | + request={dataSource} | ||
160 | + value={dataSource} | ||
161 | + onChange={setEditProductBody} | ||
162 | + editable={{ | ||
163 | + type: 'multiple', | ||
164 | + editableKeys, | ||
165 | + onSave: async () => { | ||
166 | + await waitTime(500); | ||
167 | + }, | ||
168 | + onChange: setEditableRowKeys, | ||
169 | + }} | ||
170 | + /> | ||
171 | + </> | ||
172 | + ); | ||
173 | +}; |
src/pages/Instalment/components/title/title.less
0 → 100644
1 | +.item { | ||
2 | + background: '#0092ff'; | ||
3 | + padding: '8px 0'; | ||
4 | + display: flex; | ||
5 | + flex-flow: row nowrap; | ||
6 | + // flex-direction: row; | ||
7 | + // flex-wrap: nowrap; | ||
8 | + align-content: normal; | ||
9 | + align-items: center; | ||
10 | + padding-bottom: 20px; | ||
11 | +} | ||
12 | + | ||
13 | +// .titleSpan{ | ||
14 | +// font-weight: bold; | ||
15 | +// width: 100px; | ||
16 | +// } | ||
17 | + | ||
18 | +// .Btn{ | ||
19 | +// background: '#0092ff'; | ||
20 | +// padding: '8px 0'; | ||
21 | +// display: flex; | ||
22 | +// flex-flow: row nowrap; | ||
23 | +// // flex-direction: row; | ||
24 | +// // flex-wrap: nowrap; | ||
25 | +// align-content: normal; | ||
26 | +// align-items: center; | ||
27 | +// padding-bottom: 20px; | ||
28 | +// justify-content: space-between; | ||
29 | +// width: 160px; | ||
30 | +// } | ||
31 | + | ||
32 | +.title-index td { | ||
33 | + font-family: 'San Francisco', 'Helvetica Neue', Helvetica, Arial, | ||
34 | + 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', 'Heiti SC', | ||
35 | + 'WenQuanYi Micro Hei', sans-serif; | ||
36 | + font-size: 14px; | ||
37 | +} |
src/pages/Instalment/components/title/title.tsx
0 → 100644
1 | +import { | ||
2 | + deleteOrderErpOrderStagesDelect, | ||
3 | + getOrderErpOrderStagesListAll, | ||
4 | + postOrderErpOrderStagesSearch, | ||
5 | +} from '@/services'; | ||
6 | +import { orderExport } from '@/services/order'; | ||
7 | +import { VerticalAlignTopOutlined } from '@ant-design/icons'; | ||
8 | +import type { ProColumns } from '@ant-design/pro-components'; | ||
9 | +import { ProTable } from '@ant-design/pro-components'; | ||
10 | +import { Button, message } from 'antd'; | ||
11 | +import { useRef } from 'react'; | ||
12 | +import Comfire from '../comfire/comfire'; | ||
13 | +import AddModel from '../detail/detail'; | ||
14 | +import EditorModel from '../edit/edit'; | ||
15 | +import ReadModel from '../read/read'; | ||
16 | +import UploadModel from '../upload/uploadModel'; | ||
17 | +import './title.less'; | ||
18 | +export const waitTimePromise = async (time: number = 100) => { | ||
19 | + return new Promise((resolve) => { | ||
20 | + setTimeout(() => { | ||
21 | + resolve(true); | ||
22 | + }, time); | ||
23 | + }); | ||
24 | +}; | ||
25 | + | ||
26 | +export const waitTime = async (time: number = 100) => { | ||
27 | + await waitTimePromise(time); | ||
28 | +}; | ||
29 | + | ||
30 | +type OrderStagesItem = { | ||
31 | + //文件编号 | ||
32 | + id?: number; | ||
33 | + //合同编号 | ||
34 | + contract?: string; | ||
35 | + //供应商名称 | ||
36 | + vendor?: string; | ||
37 | + //签合同日期 | ||
38 | + dateRange?: Date; | ||
39 | + //终端名称 | ||
40 | + terminal?: string; | ||
41 | + //设备编号 | ||
42 | + dId?: number; | ||
43 | + //设备名称 | ||
44 | + deviceName?: string; | ||
45 | + //设备型号 | ||
46 | + deviceModel?: string; | ||
47 | + //数量 | ||
48 | + count?: number; | ||
49 | + //单价 | ||
50 | + unitPrice?: number; | ||
51 | + //总价 | ||
52 | + price?: number; | ||
53 | + //合同总金额 | ||
54 | + totalPrice?: number; | ||
55 | + //付款方式 | ||
56 | + payWay?: string; | ||
57 | + //附件 | ||
58 | + annex?: string; | ||
59 | + //备注 | ||
60 | + remark?: string; | ||
61 | +}; | ||
62 | + | ||
63 | +type OrderStagesWithListItem = { | ||
64 | + //文件编号 | ||
65 | + id: number; | ||
66 | + //合同编号 | ||
67 | + contract: string; | ||
68 | + //供应商名称 | ||
69 | + vendor: string; | ||
70 | + //签合同日期 | ||
71 | + dateRange: Date; | ||
72 | + //终端名称 | ||
73 | + terminal: string; | ||
74 | + orderStagesDeviceVoList: orderStagesDevice[]; | ||
75 | + //合同总金额 | ||
76 | + totalPrice: number; | ||
77 | + //付款方式 | ||
78 | + payWay: string; | ||
79 | + //附件 | ||
80 | + annex: string; | ||
81 | + //备注 | ||
82 | + remark: string; | ||
83 | +}; | ||
84 | + | ||
85 | +type orderStagesDevice = { | ||
86 | + //设备id | ||
87 | + dId: number; | ||
88 | + //设备名称 | ||
89 | + deviceName: string; | ||
90 | + //设备型号 | ||
91 | + deviceModel: string; | ||
92 | + //数量 | ||
93 | + count: number; | ||
94 | + //单价 | ||
95 | + unitPrice: number; | ||
96 | + //总价 | ||
97 | + price: number; | ||
98 | +}; | ||
99 | + | ||
100 | +export default () => { | ||
101 | + // const actionRef = useRef<ActionType>(); | ||
102 | + // const [TableItem, setTableItem] = useState([]); | ||
103 | + | ||
104 | + interface ActionType { | ||
105 | + reload: (resetPageIndex?: boolean) => void; | ||
106 | + reloadAndRest: () => void; | ||
107 | + reset: () => void; | ||
108 | + clearSelected?: () => void; | ||
109 | + startEditable: (rowKey: Key) => boolean; | ||
110 | + cancelEditable: (rowKey: Key) => boolean; | ||
111 | + } | ||
112 | + | ||
113 | + const ref = useRef<ActionType>({ | ||
114 | + reload: () => { | ||
115 | + // implementation for reload | ||
116 | + }, | ||
117 | + reloadAndRest: () => { | ||
118 | + // implementation for reloadAndRest | ||
119 | + }, | ||
120 | + reset: () => { | ||
121 | + // implementation for reset | ||
122 | + }, | ||
123 | + startEditable: () => { | ||
124 | + // implementation for startEditable | ||
125 | + }, | ||
126 | + cancelEditable: () => { | ||
127 | + // implementation for cancelEditable | ||
128 | + }, | ||
129 | + }); | ||
130 | + | ||
131 | + function reload() { | ||
132 | + ref.current.reload(); | ||
133 | + } | ||
134 | + | ||
135 | + async function toDelete(value) { | ||
136 | + const res = await deleteOrderErpOrderStagesDelect({ | ||
137 | + data: { | ||
138 | + ids: null, | ||
139 | + deviceIds: value, | ||
140 | + }, | ||
141 | + }); | ||
142 | + if (res) { | ||
143 | + message.success('删除成功'); | ||
144 | + ref.current.reload(); | ||
145 | + } else { | ||
146 | + message.error('删除失败'); | ||
147 | + } | ||
148 | + } | ||
149 | + | ||
150 | + const exportLoadingDestory = () => { | ||
151 | + message.success('导出成功'); | ||
152 | + }; | ||
153 | + | ||
154 | + async function toExport() { | ||
155 | + // await getOrderErpOrderStagesExport() | ||
156 | + orderExport( | ||
157 | + '/api/order/erp/orderStages/export', | ||
158 | + '分期订单.xlsx', | ||
159 | + 'get', | ||
160 | + {}, | ||
161 | + exportLoadingDestory, | ||
162 | + ); | ||
163 | + } | ||
164 | + | ||
165 | + const columns: ProColumns<OrderStagesItem>[] = [ | ||
166 | + { | ||
167 | + title: '文件编号', | ||
168 | + dataIndex: 'id', | ||
169 | + width: '7%', | ||
170 | + render: (_, record) => { | ||
171 | + if (record.id) { | ||
172 | + const text = record.id.toString(); | ||
173 | + const paddedText = '0'.repeat(4 - text.length) + text; | ||
174 | + return paddedText; | ||
175 | + } | ||
176 | + }, | ||
177 | + }, | ||
178 | + { | ||
179 | + title: '签合同日期', | ||
180 | + dataIndex: 'dateRange', | ||
181 | + valueType: 'date', | ||
182 | + filters: true, | ||
183 | + onFilter: true, | ||
184 | + ellipsis: true, | ||
185 | + width: '8%', | ||
186 | + }, | ||
187 | + { | ||
188 | + disable: true, | ||
189 | + title: '合同编号', | ||
190 | + dataIndex: 'contract', | ||
191 | + filters: true, | ||
192 | + onFilter: true, | ||
193 | + ellipsis: true, | ||
194 | + width: '9%', | ||
195 | + }, | ||
196 | + { | ||
197 | + disable: true, | ||
198 | + title: '供应商名称', | ||
199 | + dataIndex: 'vendor', | ||
200 | + filters: true, | ||
201 | + onFilter: true, | ||
202 | + ellipsis: true, | ||
203 | + }, | ||
204 | + { | ||
205 | + disable: true, | ||
206 | + title: '终端名称', | ||
207 | + dataIndex: 'terminal', | ||
208 | + filters: true, | ||
209 | + onFilter: true, | ||
210 | + ellipsis: true, | ||
211 | + width: '6%', | ||
212 | + }, | ||
213 | + { | ||
214 | + disable: true, | ||
215 | + title: '设备名称', | ||
216 | + dataIndex: 'deviceName', | ||
217 | + filters: true, | ||
218 | + onFilter: true, | ||
219 | + ellipsis: true, | ||
220 | + }, | ||
221 | + { | ||
222 | + disable: true, | ||
223 | + title: '设备型号', | ||
224 | + dataIndex: 'deviceModel', | ||
225 | + filters: true, | ||
226 | + hideInSearch: true, | ||
227 | + onFilter: false, | ||
228 | + ellipsis: true, | ||
229 | + width: '10%', | ||
230 | + }, | ||
231 | + { | ||
232 | + disable: true, | ||
233 | + title: '数量', | ||
234 | + dataIndex: 'count', | ||
235 | + filters: true, | ||
236 | + hideInSearch: true, | ||
237 | + onFilter: false, | ||
238 | + ellipsis: true, | ||
239 | + width: '4%', | ||
240 | + }, | ||
241 | + { | ||
242 | + disable: true, | ||
243 | + title: '单价', | ||
244 | + dataIndex: 'unitPrice', | ||
245 | + filters: true, | ||
246 | + hideInSearch: true, | ||
247 | + onFilter: false, | ||
248 | + ellipsis: true, | ||
249 | + width: '5%', | ||
250 | + }, | ||
251 | + { | ||
252 | + disable: true, | ||
253 | + title: '总价', | ||
254 | + dataIndex: 'price', | ||
255 | + filters: true, | ||
256 | + hideInSearch: true, | ||
257 | + onFilter: false, | ||
258 | + ellipsis: true, | ||
259 | + width: '5%', | ||
260 | + }, | ||
261 | + { | ||
262 | + disable: true, | ||
263 | + title: '合同总金额', | ||
264 | + dataIndex: 'totalPrice', | ||
265 | + filters: true, | ||
266 | + hideInSearch: true, | ||
267 | + onFilter: false, | ||
268 | + ellipsis: true, | ||
269 | + width: '6%', | ||
270 | + }, | ||
271 | + { | ||
272 | + disable: true, | ||
273 | + title: '付款方式', | ||
274 | + dataIndex: 'payWay', | ||
275 | + filters: true, | ||
276 | + hideInSearch: true, | ||
277 | + onFilter: false, | ||
278 | + ellipsis: true, | ||
279 | + }, | ||
280 | + { | ||
281 | + disable: true, | ||
282 | + title: '附件', | ||
283 | + dataIndex: 'annex', | ||
284 | + filters: true, | ||
285 | + hideInSearch: true, | ||
286 | + onFilter: false, | ||
287 | + ellipsis: true, | ||
288 | + width: '5%', | ||
289 | + render: (_, record) => { | ||
290 | + if (record.id) { | ||
291 | + return <a href={record.annex}>{record.annex}</a>; | ||
292 | + } | ||
293 | + }, | ||
294 | + }, | ||
295 | + { | ||
296 | + disable: true, | ||
297 | + title: '备注', | ||
298 | + dataIndex: 'remark', | ||
299 | + filters: true, | ||
300 | + hideInSearch: true, | ||
301 | + onFilter: false, | ||
302 | + ellipsis: true, | ||
303 | + width: '5%', | ||
304 | + }, | ||
305 | + { | ||
306 | + title: '操作', | ||
307 | + valueType: 'option', | ||
308 | + key: 'option', | ||
309 | + width: '10%', | ||
310 | + render: (_text, record) => { | ||
311 | + if (record?.id) { | ||
312 | + return ( | ||
313 | + <> | ||
314 | + <ReadModel currentContract={record.contract}></ReadModel> | ||
315 | + | ||
316 | + <EditorModel | ||
317 | + currentContract={record.contract} | ||
318 | + toReload={reload} | ||
319 | + ></EditorModel> | ||
320 | + | ||
321 | + {/* <a key="delect" target="_blank" rel="noopener noreferrer" onClick={() => { toDelete([record.dId]) }}> | ||
322 | + 删除 | ||
323 | + </a> */} | ||
324 | + <Comfire currtDid={record.dId} sureDelete={toDelete}></Comfire> | ||
325 | + </> | ||
326 | + ); | ||
327 | + } | ||
328 | + return null; | ||
329 | + }, | ||
330 | + }, | ||
331 | + ]; | ||
332 | + | ||
333 | + return ( | ||
334 | + <ProTable<OrderStagesItem> | ||
335 | + className="title-index" | ||
336 | + columnEmptyText="" | ||
337 | + columns={columns} | ||
338 | + actionRef={ref} | ||
339 | + cardBordered | ||
340 | + request={async (params) => { | ||
341 | + // console.log(params); | ||
342 | + if ( | ||
343 | + params.id !== null || | ||
344 | + params.contract !== null || | ||
345 | + params.vendor !== null || | ||
346 | + params.terminal !== null || | ||
347 | + params.deviceName !== null || | ||
348 | + params.dateRange !== null | ||
349 | + ) { | ||
350 | + // console.log(params.id); | ||
351 | + // console.log(params.contract); | ||
352 | + // console.log(params.vendor); | ||
353 | + let PostOrderErpOrderStagesSearchOption = { | ||
354 | + id: params.id, | ||
355 | + contract: params.contract, | ||
356 | + vendor: params.vendor, | ||
357 | + terminal: params.terminal, | ||
358 | + deviceName: params.deviceName, | ||
359 | + dateRange: params.dateRange, | ||
360 | + }; | ||
361 | + let res = await postOrderErpOrderStagesSearch({ | ||
362 | + data: { ...PostOrderErpOrderStagesSearchOption }, | ||
363 | + }); | ||
364 | + await waitTime(2000); | ||
365 | + if (res) { | ||
366 | + // setTableItem(res.data) | ||
367 | + const orderStagesWithList: OrderStagesWithListItem[] = res?.data; | ||
368 | + let orderStagesList: OrderStagesItem[] = []; | ||
369 | + for (let ind = 0; ind < orderStagesWithList.length; ind++) { | ||
370 | + for ( | ||
371 | + let index = 0; | ||
372 | + index < orderStagesWithList[ind].orderStagesDeviceVoList.length; | ||
373 | + index++ | ||
374 | + ) { | ||
375 | + let item: OrderStagesItem = { | ||
376 | + id: undefined, | ||
377 | + contract: undefined, | ||
378 | + vendor: undefined, | ||
379 | + dateRange: undefined, | ||
380 | + terminal: undefined, | ||
381 | + dId: undefined, | ||
382 | + deviceName: undefined, | ||
383 | + deviceModel: undefined, | ||
384 | + count: undefined, | ||
385 | + unitPrice: undefined, | ||
386 | + price: undefined, | ||
387 | + totalPrice: undefined, | ||
388 | + payWay: undefined, | ||
389 | + annex: undefined, | ||
390 | + remark: undefined, | ||
391 | + }; | ||
392 | + if (index === 0) { | ||
393 | + item.id = orderStagesWithList[ind].id; | ||
394 | + item.contract = orderStagesWithList[ind].contract; | ||
395 | + item.vendor = orderStagesWithList[ind].vendor; | ||
396 | + item.dateRange = orderStagesWithList[ind].dateRange; | ||
397 | + item.terminal = orderStagesWithList[ind].terminal; | ||
398 | + item.dId = | ||
399 | + orderStagesWithList[ind].orderStagesDeviceVoList[index].dId; | ||
400 | + item.deviceName = | ||
401 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
402 | + index | ||
403 | + ].deviceName; | ||
404 | + item.deviceModel = | ||
405 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
406 | + index | ||
407 | + ].deviceModel; | ||
408 | + item.count = | ||
409 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
410 | + index | ||
411 | + ].count; | ||
412 | + item.unitPrice = | ||
413 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
414 | + index | ||
415 | + ].unitPrice; | ||
416 | + item.price = | ||
417 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
418 | + index | ||
419 | + ].price; | ||
420 | + item.totalPrice = orderStagesWithList[ind].totalPrice; | ||
421 | + item.payWay = orderStagesWithList[ind].payWay; | ||
422 | + item.annex = orderStagesWithList[ind].annex; | ||
423 | + item.remark = orderStagesWithList[ind].remark; | ||
424 | + orderStagesList.push(item); | ||
425 | + } else { | ||
426 | + item.id = orderStagesWithList[ind].id; | ||
427 | + item.contract = orderStagesWithList[ind].contract; | ||
428 | + item.vendor = orderStagesWithList[ind].vendor; | ||
429 | + item.dateRange = orderStagesWithList[ind].dateRange; | ||
430 | + item.terminal = orderStagesWithList[ind].terminal; | ||
431 | + item.dId = | ||
432 | + orderStagesWithList[ind].orderStagesDeviceVoList[index].dId; | ||
433 | + item.deviceName = | ||
434 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
435 | + index | ||
436 | + ].deviceName; | ||
437 | + item.deviceModel = | ||
438 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
439 | + index | ||
440 | + ].deviceModel; | ||
441 | + item.count = | ||
442 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
443 | + index | ||
444 | + ].count; | ||
445 | + item.unitPrice = | ||
446 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
447 | + index | ||
448 | + ].unitPrice; | ||
449 | + item.price = | ||
450 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
451 | + index | ||
452 | + ].price; | ||
453 | + item.totalPrice = orderStagesWithList[ind].totalPrice; | ||
454 | + item.payWay = orderStagesWithList[ind].payWay; | ||
455 | + item.annex = orderStagesWithList[ind].annex; | ||
456 | + item.remark = orderStagesWithList[ind].remark; | ||
457 | + orderStagesList.push(item); | ||
458 | + } | ||
459 | + } | ||
460 | + } | ||
461 | + return { | ||
462 | + data: orderStagesList || [], | ||
463 | + }; | ||
464 | + } | ||
465 | + } else { | ||
466 | + let res = await getOrderErpOrderStagesListAll(); | ||
467 | + await waitTime(2000); | ||
468 | + if (res) { | ||
469 | + // setTableItem(res.data) | ||
470 | + const orderStagesWithList: OrderStagesWithListItem[] = res?.data; | ||
471 | + let orderStagesList: OrderStagesItem[] = []; | ||
472 | + for (let ind = 0; ind < orderStagesWithList.length; ind++) { | ||
473 | + for ( | ||
474 | + let index = 0; | ||
475 | + index < orderStagesWithList[ind].orderStagesDeviceVoList.length; | ||
476 | + index++ | ||
477 | + ) { | ||
478 | + let item: OrderStagesItem = { | ||
479 | + id: undefined, | ||
480 | + contract: undefined, | ||
481 | + vendor: undefined, | ||
482 | + dateRange: undefined, | ||
483 | + terminal: undefined, | ||
484 | + dId: undefined, | ||
485 | + deviceName: undefined, | ||
486 | + deviceModel: undefined, | ||
487 | + count: undefined, | ||
488 | + unitPrice: undefined, | ||
489 | + price: undefined, | ||
490 | + totalPrice: undefined, | ||
491 | + payWay: undefined, | ||
492 | + annex: undefined, | ||
493 | + remark: undefined, | ||
494 | + }; | ||
495 | + if (index === 0) { | ||
496 | + item.id = orderStagesWithList[ind].id; | ||
497 | + item.contract = orderStagesWithList[ind].contract; | ||
498 | + item.vendor = orderStagesWithList[ind].vendor; | ||
499 | + item.dateRange = orderStagesWithList[ind].dateRange; | ||
500 | + item.terminal = orderStagesWithList[ind].terminal; | ||
501 | + item.dId = | ||
502 | + orderStagesWithList[ind].orderStagesDeviceVoList[index].dId; | ||
503 | + item.deviceName = | ||
504 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
505 | + index | ||
506 | + ].deviceName; | ||
507 | + item.deviceModel = | ||
508 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
509 | + index | ||
510 | + ].deviceModel; | ||
511 | + item.count = | ||
512 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
513 | + index | ||
514 | + ].count; | ||
515 | + item.unitPrice = | ||
516 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
517 | + index | ||
518 | + ].unitPrice; | ||
519 | + item.price = | ||
520 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
521 | + index | ||
522 | + ].price; | ||
523 | + item.totalPrice = orderStagesWithList[ind].totalPrice; | ||
524 | + item.payWay = orderStagesWithList[ind].payWay; | ||
525 | + item.annex = orderStagesWithList[ind].annex; | ||
526 | + item.remark = orderStagesWithList[ind].remark; | ||
527 | + orderStagesList.push(item); | ||
528 | + } else { | ||
529 | + item.id = orderStagesWithList[ind].id; | ||
530 | + item.contract = orderStagesWithList[ind].contract; | ||
531 | + item.vendor = orderStagesWithList[ind].vendor; | ||
532 | + item.dateRange = orderStagesWithList[ind].dateRange; | ||
533 | + item.terminal = orderStagesWithList[ind].terminal; | ||
534 | + item.dId = | ||
535 | + orderStagesWithList[ind].orderStagesDeviceVoList[index].dId; | ||
536 | + item.deviceName = | ||
537 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
538 | + index | ||
539 | + ].deviceName; | ||
540 | + item.deviceModel = | ||
541 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
542 | + index | ||
543 | + ].deviceModel; | ||
544 | + item.count = | ||
545 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
546 | + index | ||
547 | + ].count; | ||
548 | + item.unitPrice = | ||
549 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
550 | + index | ||
551 | + ].unitPrice; | ||
552 | + item.price = | ||
553 | + orderStagesWithList[ind].orderStagesDeviceVoList[ | ||
554 | + index | ||
555 | + ].price; | ||
556 | + item.totalPrice = orderStagesWithList[ind].totalPrice; | ||
557 | + item.payWay = orderStagesWithList[ind].payWay; | ||
558 | + item.annex = orderStagesWithList[ind].annex; | ||
559 | + item.remark = orderStagesWithList[ind].remark; | ||
560 | + orderStagesList.push(item); | ||
561 | + } | ||
562 | + } | ||
563 | + } | ||
564 | + return { | ||
565 | + data: orderStagesList || [], | ||
566 | + }; | ||
567 | + } | ||
568 | + } | ||
569 | + }} | ||
570 | + editable={{ | ||
571 | + type: 'multiple', | ||
572 | + }} | ||
573 | + columnsState={{ | ||
574 | + persistenceKey: 'pro-table-singe-demos', | ||
575 | + persistenceType: 'localStorage', | ||
576 | + defaultValue: { | ||
577 | + option: { fixed: 'right', disable: true }, | ||
578 | + }, | ||
579 | + // onChange(value) { | ||
580 | + // console.log('value: ', value); | ||
581 | + // }, | ||
582 | + }} | ||
583 | + rowKey="dId" | ||
584 | + search={{ | ||
585 | + labelWidth: 'auto', | ||
586 | + }} | ||
587 | + options={{ | ||
588 | + setting: { | ||
589 | + listsHeight: 800, | ||
590 | + }, | ||
591 | + }} | ||
592 | + form={{ | ||
593 | + syncToUrl: (values, type) => { | ||
594 | + if (type === 'get') { | ||
595 | + return { | ||
596 | + ...values, | ||
597 | + created_at: [values.startTime, values.endTime], | ||
598 | + }; | ||
599 | + } | ||
600 | + return values; | ||
601 | + }, | ||
602 | + }} | ||
603 | + pagination={{ | ||
604 | + pageSize: 10, | ||
605 | + // onChange: (page) => console.log(page), | ||
606 | + }} | ||
607 | + dateFormatter="string" | ||
608 | + headerTitle={[]} | ||
609 | + toolBarRender={() => [ | ||
610 | + <> | ||
611 | + <AddModel toReload={reload}></AddModel> | ||
612 | + <UploadModel toReload={reload}></UploadModel> | ||
613 | + <Button | ||
614 | + type="primary" | ||
615 | + onClick={() => { | ||
616 | + toExport(); | ||
617 | + }} | ||
618 | + > | ||
619 | + <VerticalAlignTopOutlined /> | ||
620 | + 导出 | ||
621 | + </Button> | ||
622 | + </>, | ||
623 | + ]} | ||
624 | + /> | ||
625 | + ); | ||
626 | +}; |
src/pages/Instalment/components/upload/uploadApp.tsx
0 → 100644
1 | +import { InboxOutlined } from '@ant-design/icons'; | ||
2 | +import { Upload } from 'antd'; | ||
3 | +import React from 'react'; | ||
4 | + | ||
5 | +const App: React.FC = ({ uploadFile }) => { | ||
6 | + const { Dragger } = Upload; | ||
7 | + | ||
8 | + const props = { | ||
9 | + name: 'file', | ||
10 | + multiple: true, | ||
11 | + maxCount: 1, | ||
12 | + onChange: (info) => { | ||
13 | + uploadFile(info.file.originFileObj); | ||
14 | + }, | ||
15 | + }; | ||
16 | + | ||
17 | + return ( | ||
18 | + <Dragger {...props}> | ||
19 | + <p className="ant-upload-drag-icon"> | ||
20 | + <InboxOutlined /> | ||
21 | + </p> | ||
22 | + <p className="ant-upload-text"> | ||
23 | + Click or drag file to this area to upload | ||
24 | + </p> | ||
25 | + <p className="ant-upload-hint"> | ||
26 | + Support for a single or bulk upload. Strictly prohibited from uploading | ||
27 | + company data or other banned files. | ||
28 | + </p> | ||
29 | + </Dragger> | ||
30 | + ); | ||
31 | +}; | ||
32 | + | ||
33 | +export default App; |
src/pages/Instalment/components/upload/uploadModel.tsx
0 → 100644
1 | +import { postOrderErpOrderStagesImport } from '@/services/request'; | ||
2 | +import { VerticalAlignBottomOutlined } from '@ant-design/icons'; | ||
3 | +import { ModalForm } from '@ant-design/pro-components'; | ||
4 | +import { Button, Form, message } from 'antd'; | ||
5 | +import { RcFile } from 'antd/es/upload'; | ||
6 | +import { useState } from 'react'; | ||
7 | +import App from './uploadApp'; | ||
8 | + | ||
9 | +// const waitTime = (time: number = 100) => { | ||
10 | +// return new Promise((resolve) => { | ||
11 | +// setTimeout(() => { | ||
12 | +// resolve(true); | ||
13 | +// }, time); | ||
14 | +// }); | ||
15 | +// }; | ||
16 | + | ||
17 | +export default ({ toReload }) => { | ||
18 | + const [form] = Form.useForm<{ name: string; company: string }>(); | ||
19 | + const [uploadFile, setUploadFile] = useState({}); | ||
20 | + // function setUploadFileWay(value) { | ||
21 | + // setUploadFile(value) | ||
22 | + // } | ||
23 | + return ( | ||
24 | + <ModalForm<{ | ||
25 | + name: string; | ||
26 | + company: string; | ||
27 | + }> | ||
28 | + title="新建表单" | ||
29 | + trigger={ | ||
30 | + <Button type="primary"> | ||
31 | + <VerticalAlignBottomOutlined /> | ||
32 | + 导入 | ||
33 | + </Button> | ||
34 | + } | ||
35 | + form={form} | ||
36 | + autoFocusFirstInput | ||
37 | + modalProps={{ | ||
38 | + destroyOnClose: true, | ||
39 | + }} | ||
40 | + submitTimeout={2000} | ||
41 | + onFinish={async () => { | ||
42 | + const formData = new FormData(); | ||
43 | + formData.append('file', uploadFile as RcFile); | ||
44 | + const res = await postOrderErpOrderStagesImport({ | ||
45 | + data: formData, | ||
46 | + headers: { | ||
47 | + 'Content-Type': | ||
48 | + 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | ||
49 | + }, | ||
50 | + }); | ||
51 | + if (res) { | ||
52 | + message.success('提交成功'); | ||
53 | + toReload(); | ||
54 | + return true; | ||
55 | + } | ||
56 | + }} | ||
57 | + > | ||
58 | + <App uploadFile={setUploadFile}></App> | ||
59 | + </ModalForm> | ||
60 | + ); | ||
61 | +}; |
src/pages/Instalment/index.tsx
0 → 100644
src/pages/Order/components/CheckModal.tsx
@@ -401,6 +401,9 @@ export default ({ | @@ -401,6 +401,9 @@ export default ({ | ||
401 | if (checkType(CHECK_TYPE.CONFIRM_REISSUE)) { | 401 | if (checkType(CHECK_TYPE.CONFIRM_REISSUE)) { |
402 | type = 'confirm_reissue'; | 402 | type = 'confirm_reissue'; |
403 | } | 403 | } |
404 | + if (checkType(CHECK_TYPE.CREDIT_AUDIT)) { | ||
405 | + type = 'credit_audit'; | ||
406 | + } | ||
404 | return type; | 407 | return type; |
405 | } | 408 | } |
406 | 409 |
src/pages/Order/components/ImportModal.tsx
@@ -26,7 +26,13 @@ export default ({ onClose }) => { | @@ -26,7 +26,13 @@ export default ({ onClose }) => { | ||
26 | }; | 26 | }; |
27 | const downloadTemplate = async () => { | 27 | const downloadTemplate = async () => { |
28 | exportLoading('正在下载模板...'); | 28 | exportLoading('正在下载模板...'); |
29 | - orderExport('/api/service/order/exportTemplate', {}, exportLoadingDestory); | 29 | + orderExport( |
30 | + '/api/service/order/exportTemplate', | ||
31 | + '订单.xlsx', | ||
32 | + 'post', | ||
33 | + {}, | ||
34 | + exportLoadingDestory, | ||
35 | + ); | ||
30 | }; | 36 | }; |
31 | 37 | ||
32 | const handleUpload = async () => { | 38 | const handleUpload = async () => { |
@@ -59,6 +65,8 @@ export default ({ onClose }) => { | @@ -59,6 +65,8 @@ export default ({ onClose }) => { | ||
59 | exportLoading('正在下载错误信息...'); | 65 | exportLoading('正在下载错误信息...'); |
60 | orderExport( | 66 | orderExport( |
61 | '/api/service/order/errorExcelInformation', | 67 | '/api/service/order/errorExcelInformation', |
68 | + '订单.xlsx', | ||
69 | + 'post', | ||
62 | formData, | 70 | formData, |
63 | exportLoadingDestory, | 71 | exportLoadingDestory, |
64 | ); | 72 | ); |
src/pages/Order/components/ModifiedDiffModal.tsx
1 | import { postServiceOrderModifiedDiff } from '@/services'; | 1 | import { postServiceOrderModifiedDiff } from '@/services'; |
2 | -import { | ||
3 | - enumValueToLabel, | ||
4 | - getAliYunOSSFileNameFromUrl, | ||
5 | - getUserInfo, | ||
6 | -} from '@/utils'; | 2 | +import { enumValueToLabel, getAliYunOSSFileNameFromUrl } from '@/utils'; |
7 | import { getReceivingCompanyOptions, isSupplier } from '@/utils/order'; | 3 | import { getReceivingCompanyOptions, isSupplier } from '@/utils/order'; |
8 | import { Button, Divider, Modal, Space, Table, TableProps } from 'antd'; | 4 | import { Button, Divider, Modal, Space, Table, TableProps } from 'antd'; |
9 | -import Base64 from 'base-64'; | ||
10 | import { useEffect, useState } from 'react'; | 5 | import { useEffect, useState } from 'react'; |
11 | import { | 6 | import { |
12 | PAYEE_OPTIONS, | 7 | PAYEE_OPTIONS, |
8 | + PAYMENT_CHANNEL_OPTIONS, | ||
9 | + PAYMENT_METHOD_OPTIONS, | ||
13 | PRODUCT_BELONG_DEPARTMENT_OPTIONS, | 10 | PRODUCT_BELONG_DEPARTMENT_OPTIONS, |
14 | SHIPPING_WAREHOUSE_OPTIONS, | 11 | SHIPPING_WAREHOUSE_OPTIONS, |
15 | } from '../constant'; | 12 | } from '../constant'; |
16 | import '../table.less'; | 13 | import '../table.less'; |
17 | 14 | ||
18 | export default ({ setVisible, subOrders, mainOrder, onClose }) => { | 15 | export default ({ setVisible, subOrders, mainOrder, onClose }) => { |
19 | - const userInfo = getUserInfo(); | ||
20 | let subIds = subOrders?.map((item: any) => { | 16 | let subIds = subOrders?.map((item: any) => { |
21 | return item.id; | 17 | return item.id; |
22 | }); | 18 | }); |
@@ -77,6 +73,12 @@ export default ({ setVisible, subOrders, mainOrder, onClose }) => { | @@ -77,6 +73,12 @@ export default ({ setVisible, subOrders, mainOrder, onClose }) => { | ||
77 | if (key === '发货仓库') { | 73 | if (key === '发货仓库') { |
78 | newText = enumValueToLabel(text, SHIPPING_WAREHOUSE_OPTIONS); | 74 | newText = enumValueToLabel(text, SHIPPING_WAREHOUSE_OPTIONS); |
79 | } | 75 | } |
76 | + if (key === '支付渠道') { | ||
77 | + newText = enumValueToLabel(text, PAYMENT_CHANNEL_OPTIONS); | ||
78 | + } | ||
79 | + if (key === '支付方式') { | ||
80 | + newText = enumValueToLabel(text, PAYMENT_METHOD_OPTIONS); | ||
81 | + } | ||
80 | if (key === '单价' || key === '合计') { | 82 | if (key === '单价' || key === '合计') { |
81 | newText = '¥' + newText; | 83 | newText = '¥' + newText; |
82 | } | 84 | } |
@@ -186,6 +188,8 @@ export default ({ setVisible, subOrders, mainOrder, onClose }) => { | @@ -186,6 +188,8 @@ export default ({ setVisible, subOrders, mainOrder, onClose }) => { | ||
186 | ['productBelongBusiness', '所属事业部'], | 188 | ['productBelongBusiness', '所属事业部'], |
187 | ['shippingWarehouse', '发货仓库'], | 189 | ['shippingWarehouse', '发货仓库'], |
188 | ['notes', '备注'], | 190 | ['notes', '备注'], |
191 | + ['paymentChannel', '支付渠道'], | ||
192 | + ['paymentMethod', '支付方式'], | ||
189 | ['listAnnex', '附件'], | 193 | ['listAnnex', '附件'], |
190 | ]; | 194 | ]; |
191 | for (let field of visibleFields) { | 195 | for (let field of visibleFields) { |
@@ -234,7 +238,6 @@ export default ({ setVisible, subOrders, mainOrder, onClose }) => { | @@ -234,7 +238,6 @@ export default ({ setVisible, subOrders, mainOrder, onClose }) => { | ||
234 | ['institutionContactName', '单位联系人'], | 238 | ['institutionContactName', '单位联系人'], |
235 | ['institution', '单位'], | 239 | ['institution', '单位'], |
236 | ['totalPayment', '支付总金额'], | 240 | ['totalPayment', '支付总金额'], |
237 | - ['paymentChannel', '支付渠道'], | ||
238 | ['notes', '备注'], | 241 | ['notes', '备注'], |
239 | ['bank', '开户银行'], | 242 | ['bank', '开户银行'], |
240 | ['bankAccountNumber', '银行账号'], | 243 | ['bankAccountNumber', '银行账号'], |
src/pages/Order/components/OrderDrawer.tsx
1 | import { RESPONSE_CODE } from '@/constants/enum'; | 1 | import { RESPONSE_CODE } from '@/constants/enum'; |
2 | import { | 2 | import { |
3 | postCanrdApiUserAddressList, | 3 | postCanrdApiUserAddressList, |
4 | - postCanrdApiUserList, | 4 | + postCanrdApiUserDetail, |
5 | + postCanrdApiUserNowMoneyCheck, | ||
5 | postKingdeeRepCustomerDetail, | 6 | postKingdeeRepCustomerDetail, |
6 | postKingdeeRepMaterial, | 7 | postKingdeeRepMaterial, |
7 | postKingdeeRepMaterialUnit, | 8 | postKingdeeRepMaterialUnit, |
8 | postKingdeeRepMeasureUnit, | 9 | postKingdeeRepMeasureUnit, |
10 | + postPrepaidPhoneAvailableList, | ||
9 | postServiceOrderAddOrder, | 11 | postServiceOrderAddOrder, |
10 | postServiceOrderAfterSalesQuerySnapshotOrder, | 12 | postServiceOrderAfterSalesQuerySnapshotOrder, |
11 | postServiceOrderApplyAfterSales, | 13 | postServiceOrderApplyAfterSales, |
12 | postServiceOrderApplyModify, | 14 | postServiceOrderApplyModify, |
13 | - postServiceOrderQuerySalesCode, | ||
14 | postServiceOrderUpdateOrder, | 15 | postServiceOrderUpdateOrder, |
15 | } from '@/services'; | 16 | } from '@/services'; |
16 | import { | 17 | import { |
@@ -22,6 +23,7 @@ import { | @@ -22,6 +23,7 @@ import { | ||
22 | } from '@/utils'; | 23 | } from '@/utils'; |
23 | import { getDefaultString } from '@/utils/StringUtil'; | 24 | import { getDefaultString } from '@/utils/StringUtil'; |
24 | import { getTeacherCustomFieldNumber } from '@/utils/kingdee'; | 25 | import { getTeacherCustomFieldNumber } from '@/utils/kingdee'; |
26 | +import { getSalesCodeOptions } from '@/utils/order'; | ||
25 | import { | 27 | import { |
26 | DrawerForm, | 28 | DrawerForm, |
27 | FormListActionType, | 29 | FormListActionType, |
@@ -106,6 +108,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -106,6 +108,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
106 | }, | 108 | }, |
107 | ]; | 109 | ]; |
108 | }>(); | 110 | }>(); |
111 | + const [accountOptions, setAccountOptions] = useState<any>([]); | ||
109 | 112 | ||
110 | let copyData = cloneDeep(data); | 113 | let copyData = cloneDeep(data); |
111 | 114 | ||
@@ -122,15 +125,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -122,15 +125,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
122 | /** | 125 | /** |
123 | * 获取销售代码枚举,在复制和编辑的时候判断是否为旧的代码 | 126 | * 获取销售代码枚举,在复制和编辑的时候判断是否为旧的代码 |
124 | */ | 127 | */ |
125 | - const getSalesCodeOptions = async () => { | ||
126 | - const res = await postServiceOrderQuerySalesCode(); | ||
127 | - let options = res.data?.map((item) => { | ||
128 | - return { | ||
129 | - label: item.userName, | ||
130 | - value: item.userName, | ||
131 | - number: item.number, | ||
132 | - }; | ||
133 | - }); | 128 | + const loadSalesCodeOptions = async () => { |
129 | + let options = await getSalesCodeOptions(); | ||
134 | setSalesCodeOptions(options); | 130 | setSalesCodeOptions(options); |
135 | 131 | ||
136 | if (optType('copy') || optType('edit')) { | 132 | if (optType('copy') || optType('edit')) { |
@@ -236,6 +232,38 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -236,6 +232,38 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
236 | // } | 232 | // } |
237 | 233 | ||
238 | /** | 234 | /** |
235 | + * 加载预存账号的options | ||
236 | + */ | ||
237 | + async function loadAccountOptions(phone: any) { | ||
238 | + let newAccountOptions = []; | ||
239 | + //预存账号id | ||
240 | + let uid = copyData.prepaidUid; | ||
241 | + let res = await postCanrdApiUserDetail({ data: { uid: uid } }); | ||
242 | + if (res && res.result === RESPONSE_CODE.SUCCESS && res.data !== null) { | ||
243 | + let uidDetail = res.data; | ||
244 | + uidDetail.value = uid; | ||
245 | + uidDetail.label = uidDetail.realName; | ||
246 | + newAccountOptions.push(uidDetail); | ||
247 | + } | ||
248 | + | ||
249 | + //查询当前手机号允许使用的预存账号 | ||
250 | + if (phone) { | ||
251 | + let res = await postPrepaidPhoneAvailableList({ data: { phone: phone } }); | ||
252 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
253 | + let uidDetails = res.data; | ||
254 | + for (let detail of uidDetails) { | ||
255 | + detail.value = detail.uid; | ||
256 | + detail.label = detail.realName; | ||
257 | + newAccountOptions.push(detail); | ||
258 | + } | ||
259 | + } | ||
260 | + } | ||
261 | + | ||
262 | + console.log(newAccountOptions); | ||
263 | + setAccountOptions(newAccountOptions); | ||
264 | + } | ||
265 | + | ||
266 | + /** | ||
239 | * 构建回显数据 | 267 | * 构建回显数据 |
240 | */ | 268 | */ |
241 | function buildOrderData() { | 269 | function buildOrderData() { |
@@ -303,6 +331,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -303,6 +331,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
303 | if (!optType('after-sales-check')) { | 331 | if (!optType('after-sales-check')) { |
304 | // showKindeeInfo(); | 332 | // showKindeeInfo(); |
305 | } | 333 | } |
334 | + | ||
335 | + loadAccountOptions(form.getFieldValue('customerContactNumber')); | ||
306 | } | 336 | } |
307 | } | 337 | } |
308 | 338 | ||
@@ -524,6 +554,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -524,6 +554,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
524 | getDefaultString(option.detail), | 554 | getDefaultString(option.detail), |
525 | ); | 555 | ); |
526 | form.setFieldValue('customerNameString', option.realName); | 556 | form.setFieldValue('customerNameString', option.realName); |
557 | + | ||
558 | + loadAccountOptions(option.phone); | ||
527 | } | 559 | } |
528 | 560 | ||
529 | //erp收货地址:需要与客户联系人中的地址一样:姓名,手机号,地址 | 561 | //erp收货地址:需要与客户联系人中的地址一样:姓名,手机号,地址 |
@@ -586,6 +618,56 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -586,6 +618,56 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
586 | } | 618 | } |
587 | 619 | ||
588 | /** | 620 | /** |
621 | + * 检查用户额度 | ||
622 | + * @param option | ||
623 | + */ | ||
624 | + const checkAccountMoney = async (uid: any, subPrice: any) => { | ||
625 | + let res = await postCanrdApiUserNowMoneyCheck({ | ||
626 | + data: { uid: uid, subPrice: subPrice }, | ||
627 | + }); | ||
628 | + if (res && res.result === RESPONSE_CODE.SUCCESS && res.data) { | ||
629 | + let data = res.data; | ||
630 | + let isCredit = data.isCredit; | ||
631 | + if (isCredit) { | ||
632 | + return true; | ||
633 | + } | ||
634 | + | ||
635 | + message.error( | ||
636 | + '用户余额不足,当前预减的金额为:' + | ||
637 | + data.subPrice + | ||
638 | + ',当前账号余额为:' + | ||
639 | + data.nowMoney + | ||
640 | + ',当前账号可赊账额度为:' + | ||
641 | + data.creditLimit, | ||
642 | + ); | ||
643 | + return false; | ||
644 | + } | ||
645 | + | ||
646 | + return false; | ||
647 | + }; | ||
648 | + | ||
649 | + /** | ||
650 | + * 总金额改变触发事件 | ||
651 | + * 如果是预存单,需要检查余额 | ||
652 | + * @param value | ||
653 | + */ | ||
654 | + const totalPaymentChange = (value: any) => { | ||
655 | + let paymentMethod = form.getFieldValue('paymentMethod'); | ||
656 | + let prepaidUid = form.getFieldValue('prepaidUid'); | ||
657 | + if ( | ||
658 | + value && | ||
659 | + paymentMethod && | ||
660 | + paymentMethod === 'WITHHOLDING_ADVANCE_DEPOSIT' && | ||
661 | + prepaidUid | ||
662 | + ) { | ||
663 | + let valid = checkAccountMoney(prepaidUid, value); | ||
664 | + if (!valid) { | ||
665 | + form.setFieldValue('prepaidUid', undefined); | ||
666 | + } | ||
667 | + } | ||
668 | + }; | ||
669 | + | ||
670 | + /** | ||
589 | * 检查客户是否可以编辑 | 671 | * 检查客户是否可以编辑 |
590 | * @returns | 672 | * @returns |
591 | */ | 673 | */ |
@@ -658,6 +740,19 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -658,6 +740,19 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
658 | } | 740 | } |
659 | } | 741 | } |
660 | 742 | ||
743 | + const validateContactNumber = (_: any, value: any) => { | ||
744 | + console.log(value); | ||
745 | + const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; | ||
746 | + const phoneRegex = /^\d{1,11}$/; | ||
747 | + | ||
748 | + if (emailRegex.test(value) || phoneRegex.test(value)) { | ||
749 | + return Promise.resolve(); | ||
750 | + } | ||
751 | + return Promise.reject( | ||
752 | + new Error('联系方式必须是邮箱或手机号格式(不能包含空格等特殊符号)'), | ||
753 | + ); | ||
754 | + }; | ||
755 | + | ||
661 | /** | 756 | /** |
662 | * 刪除草稿数据 | 757 | * 刪除草稿数据 |
663 | */ | 758 | */ |
@@ -667,7 +762,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -667,7 +762,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
667 | 762 | ||
668 | useEffect(() => { | 763 | useEffect(() => { |
669 | checkHasLocalData(); | 764 | checkHasLocalData(); |
670 | - getSalesCodeOptions(); | 765 | + loadSalesCodeOptions(); |
671 | if (optType('after-sales-check')) { | 766 | if (optType('after-sales-check')) { |
672 | getOldOrderData(data.id); | 767 | getOldOrderData(data.id); |
673 | } else { | 768 | } else { |
@@ -949,7 +1044,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -949,7 +1044,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
949 | } | 1044 | } |
950 | 1045 | ||
951 | let title = ''; | 1046 | let title = ''; |
952 | - let spanText = ''; | ||
953 | let realName = item.realName; | 1047 | let realName = item.realName; |
954 | let phone = item.phone; | 1048 | let phone = item.phone; |
955 | let province = item.province; | 1049 | let province = item.province; |
@@ -959,31 +1053,41 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -959,31 +1053,41 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
959 | let institution = item.institution; | 1053 | let institution = item.institution; |
960 | let institutionContactName = item.institutionContactName; | 1054 | let institutionContactName = item.institutionContactName; |
961 | 1055 | ||
962 | - title = | ||
963 | - getDefaultString(realName) + | ||
964 | - '|' + | ||
965 | - getDefaultString(phone) + | ||
966 | - '|' + | ||
967 | - getDefaultString(institution) + | ||
968 | - '|' + | ||
969 | - getDefaultString(institutionContactName) + | ||
970 | - '|' + | 1056 | + let address = |
971 | getDefaultString(province) + | 1057 | getDefaultString(province) + |
972 | getDefaultString(city) + | 1058 | getDefaultString(city) + |
973 | getDefaultString(district) + | 1059 | getDefaultString(district) + |
974 | getDefaultString(detail); | 1060 | getDefaultString(detail); |
975 | 1061 | ||
976 | - spanText = | 1062 | + title = |
977 | getDefaultString(realName) + | 1063 | getDefaultString(realName) + |
978 | '|' + | 1064 | '|' + |
979 | getDefaultString(phone) + | 1065 | getDefaultString(phone) + |
980 | '|' + | 1066 | '|' + |
981 | getDefaultString(institution) + | 1067 | getDefaultString(institution) + |
982 | '|' + | 1068 | '|' + |
983 | - getDefaultString(institutionContactName); | 1069 | + getDefaultString(institutionContactName) + |
1070 | + '|' + | ||
1071 | + address; | ||
1072 | + | ||
984 | return ( | 1073 | return ( |
985 | - <div title={title}> | ||
986 | - <span style={{ color: '#333333' }}>{spanText}</span> | 1074 | + <div title={title} className="whitespace-normal"> |
1075 | + <span style={{ color: '#333333' }}> | ||
1076 | + {getDefaultString(realName)} | ||
1077 | + </span> | ||
1078 | + | | ||
1079 | + <span className="text-sky-600"> | ||
1080 | + {getDefaultString(phone)} | ||
1081 | + </span> | ||
1082 | + | | ||
1083 | + <span style={{ color: '#333333' }}> | ||
1084 | + {getDefaultString(institution)} | ||
1085 | + </span> | ||
1086 | + | | ||
1087 | + <span style={{ color: '#333333' }}> | ||
1088 | + {getDefaultString(institutionContactName)} | ||
1089 | + </span> | ||
1090 | + |<span className="text-orange-400">{address}</span> | ||
987 | </div> | 1091 | </div> |
988 | ); | 1092 | ); |
989 | }, | 1093 | }, |
@@ -1047,7 +1151,15 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1047,7 +1151,15 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1047 | name="customerContactNumber" | 1151 | name="customerContactNumber" |
1048 | label="联系方式" | 1152 | label="联系方式" |
1049 | placeholder="请输入联系方式" | 1153 | placeholder="请输入联系方式" |
1050 | - rules={[{ required: true, message: '联系方式必填' }]} | 1154 | + fieldProps={{ |
1155 | + onBlur: (v) => { | ||
1156 | + loadAccountOptions(v.target.value); | ||
1157 | + }, | ||
1158 | + }} | ||
1159 | + rules={[ | ||
1160 | + { required: true, message: '联系方式必填' }, | ||
1161 | + { validator: validateContactNumber }, | ||
1162 | + ]} | ||
1051 | /> | 1163 | /> |
1052 | <ProFormText | 1164 | <ProFormText |
1053 | width="lg" | 1165 | width="lg" |
@@ -1081,18 +1193,23 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1081,18 +1193,23 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1081 | label="支付总额(¥)" | 1193 | label="支付总额(¥)" |
1082 | rules={[ | 1194 | rules={[ |
1083 | { required: true, message: '支付总额必填' }, | 1195 | { required: true, message: '支付总额必填' }, |
1084 | - // { | ||
1085 | - // validator: (_, value) => { | ||
1086 | - // if (value <= 0) { | ||
1087 | - // return Promise.reject( | ||
1088 | - // new Error( | ||
1089 | - // '支付总额必须大于0 (扣预存的订单现在也必须填写实际金额)', | ||
1090 | - // ), | ||
1091 | - // ); | ||
1092 | - // } | ||
1093 | - // return Promise.resolve(); | ||
1094 | - // }, | ||
1095 | - // }, | 1196 | + { |
1197 | + validator: (_, value) => { | ||
1198 | + let paymentMethod = form.getFieldValue('paymentMethod'); | ||
1199 | + if ( | ||
1200 | + value <= 0 && | ||
1201 | + paymentMethod && | ||
1202 | + paymentMethod === 'WITHHOLDING_ADVANCE_DEPOSIT' | ||
1203 | + ) { | ||
1204 | + return Promise.reject( | ||
1205 | + new Error( | ||
1206 | + '支付总额必须大于0 (扣预存的订单现在也必须填写实际金额)', | ||
1207 | + ), | ||
1208 | + ); | ||
1209 | + } | ||
1210 | + return Promise.resolve(); | ||
1211 | + }, | ||
1212 | + }, | ||
1096 | ]} | 1213 | ]} |
1097 | tooltip="点击计算,合计所有子订单金额" | 1214 | tooltip="点击计算,合计所有子订单金额" |
1098 | fieldProps={{ | 1215 | fieldProps={{ |
@@ -1106,6 +1223,9 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1106,6 +1223,9 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1106 | 计算 | 1223 | 计算 |
1107 | </Button> | 1224 | </Button> |
1108 | ), | 1225 | ), |
1226 | + onChange: (value: any) => { | ||
1227 | + totalPaymentChange(value); | ||
1228 | + }, | ||
1109 | }} | 1229 | }} |
1110 | disabled={optType('after-sales-check')} | 1230 | disabled={optType('after-sales-check')} |
1111 | /> | 1231 | /> |
@@ -1141,8 +1261,15 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1141,8 +1261,15 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1141 | hidden={paymentMethod !== 'WITHHOLDING_ADVANCE_DEPOSIT'} | 1261 | hidden={paymentMethod !== 'WITHHOLDING_ADVANCE_DEPOSIT'} |
1142 | showSearch | 1262 | showSearch |
1143 | label="预存账号" | 1263 | label="预存账号" |
1144 | - onChange={(option: any) => { | ||
1145 | - form.setFieldValue('prepaidAmount', option.nowMoney); | 1264 | + onChange={(value: any) => { |
1265 | + //检查用户额度 | ||
1266 | + let valid = checkAccountMoney( | ||
1267 | + value, | ||
1268 | + form.getFieldValue('totalPayment'), | ||
1269 | + ); | ||
1270 | + if (!valid) { | ||
1271 | + form.setFieldValue('prepaidUid', undefined); | ||
1272 | + } | ||
1146 | }} | 1273 | }} |
1147 | placeholder="请选择预存账号" | 1274 | placeholder="请选择预存账号" |
1148 | rules={[ | 1275 | rules={[ |
@@ -1173,21 +1300,22 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1173,21 +1300,22 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1173 | }, | 1300 | }, |
1174 | }} | 1301 | }} |
1175 | debounceTime={1000} | 1302 | debounceTime={1000} |
1176 | - request={async (value, {}) => { | ||
1177 | - const keywords = value.keyWords; | ||
1178 | - const res = await postCanrdApiUserList({ | ||
1179 | - data: { keywords: keywords, pageSize: 1000000 }, | ||
1180 | - }); | ||
1181 | - let options = res?.data?.data?.map((c: any) => { | ||
1182 | - return { | ||
1183 | - ...c, | ||
1184 | - label: c.realName, | ||
1185 | - value: c.uid, | ||
1186 | - key: c.uid, | ||
1187 | - }; | ||
1188 | - }); | ||
1189 | - return options; | ||
1190 | - }} | 1303 | + // request={async (value, {}) => { |
1304 | + // const keywords = value.keyWords; | ||
1305 | + // const res = await postCanrdApiUserList({ | ||
1306 | + // data: { keywords: keywords, pageSize: 50 }, | ||
1307 | + // }); | ||
1308 | + // let options = res?.data?.data?.map((c: any) => { | ||
1309 | + // return { | ||
1310 | + // ...c, | ||
1311 | + // label: c.realName, | ||
1312 | + // value: c.uid, | ||
1313 | + // key: c.uid, | ||
1314 | + // }; | ||
1315 | + // }); | ||
1316 | + // return options; | ||
1317 | + // }} | ||
1318 | + options={accountOptions} | ||
1191 | /> | 1319 | /> |
1192 | <ProFormSelect | 1320 | <ProFormSelect |
1193 | placeholder="选择是否需要开票" | 1321 | placeholder="选择是否需要开票" |
@@ -1308,8 +1436,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1308,8 +1436,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1308 | (sum, item) => FloatAdd(sum, item.subOrderPayment), | 1436 | (sum, item) => FloatAdd(sum, item.subOrderPayment), |
1309 | 0, | 1437 | 0, |
1310 | ); | 1438 | ); |
1311 | - console.log(reduce); | ||
1312 | - console.log(totalPayment); | ||
1313 | if (reduce === totalPayment || value) { | 1439 | if (reduce === totalPayment || value) { |
1314 | return Promise.resolve(); | 1440 | return Promise.resolve(); |
1315 | } | 1441 | } |
src/pages/Order/constant.ts
@@ -108,6 +108,7 @@ export const CHECK_TYPE = { | @@ -108,6 +108,7 @@ export const CHECK_TYPE = { | ||
108 | PAYMENT_RECEIPTS_AUDIT: 'PAYMENT_RECEIPTS_AUDIT', | 108 | PAYMENT_RECEIPTS_AUDIT: 'PAYMENT_RECEIPTS_AUDIT', |
109 | CONFIRM_REISSUE: 'CONFIRM_REISSUE', | 109 | CONFIRM_REISSUE: 'CONFIRM_REISSUE', |
110 | PREPAID_AUDIT: 'PREPAID_AUDIT', | 110 | PREPAID_AUDIT: 'PREPAID_AUDIT', |
111 | + CREDIT_AUDIT: 'CREDIT_AUDIT', | ||
111 | }; | 112 | }; |
112 | 113 | ||
113 | /** | 114 | /** |
@@ -192,6 +193,7 @@ export const ORDER_STATUS_OPTIONS = { | @@ -192,6 +193,7 @@ export const ORDER_STATUS_OPTIONS = { | ||
192 | AFTER_SALES_FAILURE: '售后失败', | 193 | AFTER_SALES_FAILURE: '售后失败', |
193 | NO_NEED_SEND: '无需发货', | 194 | NO_NEED_SEND: '无需发货', |
194 | PROCURE_CONVERT_WAREHOUSE_KEEPER: '采购转仓库', | 195 | PROCURE_CONVERT_WAREHOUSE_KEEPER: '采购转仓库', |
196 | + CREDIT_CONFIRM: '赊账待审核', | ||
195 | }; | 197 | }; |
196 | 198 | ||
197 | export const MODIFIED_AUDIT_STATUS_OPTIONS = { | 199 | export const MODIFIED_AUDIT_STATUS_OPTIONS = { |
@@ -227,8 +229,10 @@ export const AFTER_INVOICING_STATUS = { | @@ -227,8 +229,10 @@ export const AFTER_INVOICING_STATUS = { | ||
227 | NOT_YET_INVOICED: '尚未开票', | 229 | NOT_YET_INVOICED: '尚未开票', |
228 | APPLY_FOR_INVOICING: '申请开票', | 230 | APPLY_FOR_INVOICING: '申请开票', |
229 | URGENT_INVOICE_AUDITING: '加急待审核', | 231 | URGENT_INVOICE_AUDITING: '加急待审核', |
232 | + URGENT_INVOICE_AUDIT_NOTPASS: '加急审核失败', | ||
230 | PARTIAL_INVOICING: '部分开票', | 233 | PARTIAL_INVOICING: '部分开票', |
231 | COMPLETE_INVOICING: '完全开票', | 234 | COMPLETE_INVOICING: '完全开票', |
235 | + REISSUE: '重新开票', | ||
232 | }; | 236 | }; |
233 | 237 | ||
234 | export const TAGS_COLOR = new Map<string, string>([ | 238 | export const TAGS_COLOR = new Map<string, string>([ |
@@ -274,6 +278,9 @@ export const TAGS_COLOR = new Map<string, string>([ | @@ -274,6 +278,9 @@ export const TAGS_COLOR = new Map<string, string>([ | ||
274 | ['AUDIT_NOTPASS', 'error'], | 278 | ['AUDIT_NOTPASS', 'error'], |
275 | ['WAIT_CONFIRM_DELIVER_AFTER_INVOICE', 'processing'], | 279 | ['WAIT_CONFIRM_DELIVER_AFTER_INVOICE', 'processing'], |
276 | ['SALES_CONFIRM', 'warning'], | 280 | ['SALES_CONFIRM', 'warning'], |
281 | + ['URGENT_INVOICE_AUDIT_NOTPASS', 'red'], | ||
282 | + ['REISSUE', 'processing'], | ||
283 | + ['CREDIT_CONFIRM', 'warning'], | ||
277 | ]); | 284 | ]); |
278 | export const SALES_CODE_OPTIONS = [ | 285 | export const SALES_CODE_OPTIONS = [ |
279 | { label: 'D-Linda', value: 'D-Linda' }, | 286 | { label: 'D-Linda', value: 'D-Linda' }, |
@@ -402,6 +409,7 @@ export const HISTORY_OPT_TYPE = new Map<string, string>([ | @@ -402,6 +409,7 @@ export const HISTORY_OPT_TYPE = new Map<string, string>([ | ||
402 | ['OUTSIDE_SYSTEM_PUSH', '外部系统推送了本订单'], | 409 | ['OUTSIDE_SYSTEM_PUSH', '外部系统推送了本订单'], |
403 | ['cancelSendOrder', '取消发货'], | 410 | ['cancelSendOrder', '取消发货'], |
404 | ['salesConfirm', '商城订单销售确认'], | 411 | ['salesConfirm', '商城订单销售确认'], |
412 | + ['credit_audit', '赊账审核'], | ||
405 | ]); | 413 | ]); |
406 | 414 | ||
407 | export const MAIN_ORDER_COLUMNS = [ | 415 | export const MAIN_ORDER_COLUMNS = [ |
src/pages/Order/index.tsx
@@ -1317,6 +1317,23 @@ const OrderPage = () => { | @@ -1317,6 +1317,23 @@ const OrderPage = () => { | ||
1317 | '' | 1317 | '' |
1318 | )} | 1318 | )} |
1319 | 1319 | ||
1320 | + {optRecord.subPath?.includes('creditAudit') ? ( | ||
1321 | + <Button | ||
1322 | + className="p-0" | ||
1323 | + type="link" | ||
1324 | + onClick={() => { | ||
1325 | + setCurrentMainId(record.id); | ||
1326 | + setCurretnOptSubId(optRecord.id); | ||
1327 | + setCheckVisible(true); | ||
1328 | + setOrderCheckType(CHECK_TYPE.CREDIT_AUDIT); | ||
1329 | + }} | ||
1330 | + > | ||
1331 | + 赊账审核 | ||
1332 | + </Button> | ||
1333 | + ) : ( | ||
1334 | + '' | ||
1335 | + )} | ||
1336 | + | ||
1320 | {optRecord.subPath?.includes('auditPaymentReceipt') ? ( | 1337 | {optRecord.subPath?.includes('auditPaymentReceipt') ? ( |
1321 | <Button | 1338 | <Button |
1322 | className="p-0" | 1339 | className="p-0" |
@@ -1928,7 +1945,7 @@ const OrderPage = () => { | @@ -1928,7 +1945,7 @@ const OrderPage = () => { | ||
1928 | 1945 | ||
1929 | <Flex title={optRecord.notes}> | 1946 | <Flex title={optRecord.notes}> |
1930 | <div | 1947 | <div |
1931 | - className="overflow-hidden whitespace-normal overflow-ellipsis hover:cursor-pointer" | 1948 | + className="max-w-[1100px] overflow-hidden whitespace-normal overflow-ellipsis hover:cursor-pointer" |
1932 | onClick={() => { | 1949 | onClick={() => { |
1933 | copyToClipboard(optRecord.notes); | 1950 | copyToClipboard(optRecord.notes); |
1934 | message.info('备注复制成功:' + optRecord.notes); | 1951 | message.info('备注复制成功:' + optRecord.notes); |
@@ -2850,6 +2867,38 @@ const OrderPage = () => { | @@ -2850,6 +2867,38 @@ const OrderPage = () => { | ||
2850 | '' | 2867 | '' |
2851 | )} | 2868 | )} |
2852 | 2869 | ||
2870 | + {record.mainPath?.includes('creditAudit') ? ( | ||
2871 | + <Button | ||
2872 | + className="p-0" | ||
2873 | + type="link" | ||
2874 | + onClick={() => { | ||
2875 | + let selectedSubOrders = subOrderSelectedMap.get( | ||
2876 | + record.id, | ||
2877 | + ); | ||
2878 | + setSelectedRows(selectedSubOrders); | ||
2879 | + if (selectedSubOrders === undefined) { | ||
2880 | + selectedSubOrders = record.subOrderInformationLists; | ||
2881 | + } | ||
2882 | + for (let i = 0; i < selectedSubOrders.length; i++) { | ||
2883 | + if ( | ||
2884 | + selectedSubOrders[i].orderStatus !== | ||
2885 | + 'CREDIT_CONFIRM' | ||
2886 | + ) { | ||
2887 | + message.error('请选择[赊账待审核]的子订单进行审核'); | ||
2888 | + return; | ||
2889 | + } | ||
2890 | + } | ||
2891 | + createOptObject(null, record.id); | ||
2892 | + setCheckVisible(true); | ||
2893 | + setOrderCheckType(CHECK_TYPE.CREDIT_AUDIT); | ||
2894 | + }} | ||
2895 | + > | ||
2896 | + 赊账审核 | ||
2897 | + </Button> | ||
2898 | + ) : ( | ||
2899 | + '' | ||
2900 | + )} | ||
2901 | + | ||
2853 | {record.mainPath?.includes('editProductionTime') ? ( | 2902 | {record.mainPath?.includes('editProductionTime') ? ( |
2854 | <Button | 2903 | <Button |
2855 | className="p-0" | 2904 | className="p-0" |
@@ -3154,10 +3203,11 @@ const OrderPage = () => { | @@ -3154,10 +3203,11 @@ const OrderPage = () => { | ||
3154 | if ( | 3203 | if ( |
3155 | orderStatus !== 'UNAUDITED' && | 3204 | orderStatus !== 'UNAUDITED' && |
3156 | orderStatus !== 'AUDIT_FAILED' && | 3205 | orderStatus !== 'AUDIT_FAILED' && |
3157 | - orderStatus !== 'LEADER_PROCESS' | 3206 | + orderStatus !== 'LEADER_PROCESS' && |
3207 | + orderStatus !== 'SALES_CONFIRM' | ||
3158 | ) { | 3208 | ) { |
3159 | message.error( | 3209 | message.error( |
3160 | - '请选择未审核或者审核失败的订单进行编辑', | 3210 | + '请选择【未审核、审核失败、销售待确认】的订单进行编辑', |
3161 | ); | 3211 | ); |
3162 | return; | 3212 | return; |
3163 | } | 3213 | } |
@@ -3861,11 +3911,11 @@ const OrderPage = () => { | @@ -3861,11 +3911,11 @@ const OrderPage = () => { | ||
3861 | label: '导出已选中订单', | 3911 | label: '导出已选中订单', |
3862 | key: '1', | 3912 | key: '1', |
3863 | onClick: async () => { | 3913 | onClick: async () => { |
3864 | - if (selectedMainOrderKeys.length === 0) { | 3914 | + if (mainOrderSelectedMap.size === 0) { |
3865 | message.error('请选择订单'); | 3915 | message.error('请选择订单'); |
3866 | return; | 3916 | return; |
3867 | } | 3917 | } |
3868 | - let body = { flag: 30, id: selectedMainOrderKeys }; | 3918 | + let body = { flag: 30, id: Array.from(mainOrderSelectedMap.keys()) }; |
3869 | exportLoading(); | 3919 | exportLoading(); |
3870 | orderExport('/api/service/order/export', body, exportLoadingDestory); | 3920 | orderExport('/api/service/order/export', body, exportLoadingDestory); |
3871 | }, | 3921 | }, |
src/pages/OrderPrint/index.css
0 → 100644
1 | +.font0 { | ||
2 | + color: windowtext; | ||
3 | + font-size: 12pt; | ||
4 | + font-weight: 400; | ||
5 | + font-style: normal; | ||
6 | + text-decoration: none; | ||
7 | + font-family: '宋体'; | ||
8 | +} | ||
9 | + | ||
10 | +.font1 { | ||
11 | + color: windowtext; | ||
12 | + font-size: 16pt; | ||
13 | + font-weight: 400; | ||
14 | + font-style: normal; | ||
15 | + text-decoration: none; | ||
16 | + font-family: '宋体'; | ||
17 | +} | ||
18 | + | ||
19 | +.font2 { | ||
20 | + color: windowtext; | ||
21 | + font-size: 10pt; | ||
22 | + font-weight: 400; | ||
23 | + font-style: normal; | ||
24 | + text-decoration: none; | ||
25 | + font-family: '宋体'; | ||
26 | +} | ||
27 | + | ||
28 | +.font3 { | ||
29 | + color: windowtext; | ||
30 | + font-size: 14pt; | ||
31 | + font-weight: 400; | ||
32 | + font-style: normal; | ||
33 | + text-decoration: none; | ||
34 | + font-family: '宋体'; | ||
35 | +} | ||
36 | + | ||
37 | +.font4 { | ||
38 | + color: windowtext; | ||
39 | + font-size: 8pt; | ||
40 | + font-weight: 400; | ||
41 | + font-style: normal; | ||
42 | + text-decoration: none; | ||
43 | + font-family: '宋体'; | ||
44 | +} | ||
45 | + | ||
46 | +.font5 { | ||
47 | + color: #00f; | ||
48 | + font-size: 11pt; | ||
49 | + font-weight: 400; | ||
50 | + font-style: normal; | ||
51 | + text-decoration: underline; | ||
52 | + font-family: '宋体'; | ||
53 | +} | ||
54 | + | ||
55 | +.font6 { | ||
56 | + color: #800080; | ||
57 | + font-size: 11pt; | ||
58 | + font-weight: 400; | ||
59 | + font-style: normal; | ||
60 | + text-decoration: underline; | ||
61 | + font-family: '宋体'; | ||
62 | +} | ||
63 | + | ||
64 | +.font7 { | ||
65 | + color: #000; | ||
66 | + font-size: 11pt; | ||
67 | + font-weight: 400; | ||
68 | + font-style: normal; | ||
69 | + text-decoration: none; | ||
70 | + font-family: '宋体'; | ||
71 | +} | ||
72 | + | ||
73 | +.font8 { | ||
74 | + color: #f00; | ||
75 | + font-size: 11pt; | ||
76 | + font-weight: 400; | ||
77 | + font-style: normal; | ||
78 | + text-decoration: none; | ||
79 | + font-family: '宋体'; | ||
80 | +} | ||
81 | + | ||
82 | +.font9 { | ||
83 | + color: #44546a; | ||
84 | + font-size: 18pt; | ||
85 | + font-weight: 700; | ||
86 | + font-style: normal; | ||
87 | + text-decoration: none; | ||
88 | + font-family: '宋体'; | ||
89 | +} | ||
90 | + | ||
91 | +.font10 { | ||
92 | + color: #7f7f7f; | ||
93 | + font-size: 11pt; | ||
94 | + font-weight: 400; | ||
95 | + font-style: italic; | ||
96 | + text-decoration: none; | ||
97 | + font-family: '宋体'; | ||
98 | +} | ||
99 | + | ||
100 | +.font11 { | ||
101 | + color: #44546a; | ||
102 | + font-size: 15pt; | ||
103 | + font-weight: 700; | ||
104 | + font-style: normal; | ||
105 | + text-decoration: none; | ||
106 | + font-family: '宋体'; | ||
107 | +} | ||
108 | + | ||
109 | +.font12 { | ||
110 | + color: #44546a; | ||
111 | + font-size: 13pt; | ||
112 | + font-weight: 700; | ||
113 | + font-style: normal; | ||
114 | + text-decoration: none; | ||
115 | + font-family: '宋体'; | ||
116 | +} | ||
117 | + | ||
118 | +.font13 { | ||
119 | + color: #44546a; | ||
120 | + font-size: 11pt; | ||
121 | + font-weight: 700; | ||
122 | + font-style: normal; | ||
123 | + text-decoration: none; | ||
124 | + font-family: '宋体'; | ||
125 | +} | ||
126 | + | ||
127 | +.font14 { | ||
128 | + color: #3f3f76; | ||
129 | + font-size: 11pt; | ||
130 | + font-weight: 400; | ||
131 | + font-style: normal; | ||
132 | + text-decoration: none; | ||
133 | + font-family: '宋体'; | ||
134 | +} | ||
135 | + | ||
136 | +.font15 { | ||
137 | + color: #3f3f3f; | ||
138 | + font-size: 11pt; | ||
139 | + font-weight: 700; | ||
140 | + font-style: normal; | ||
141 | + text-decoration: none; | ||
142 | + font-family: '宋体'; | ||
143 | +} | ||
144 | + | ||
145 | +.font16 { | ||
146 | + color: #fa7d00; | ||
147 | + font-size: 11pt; | ||
148 | + font-weight: 700; | ||
149 | + font-style: normal; | ||
150 | + text-decoration: none; | ||
151 | + font-family: '宋体'; | ||
152 | +} | ||
153 | + | ||
154 | +.font17 { | ||
155 | + color: #fff; | ||
156 | + font-size: 11pt; | ||
157 | + font-weight: 700; | ||
158 | + font-style: normal; | ||
159 | + text-decoration: none; | ||
160 | + font-family: '宋体'; | ||
161 | +} | ||
162 | + | ||
163 | +.font18 { | ||
164 | + color: #fa7d00; | ||
165 | + font-size: 11pt; | ||
166 | + font-weight: 400; | ||
167 | + font-style: normal; | ||
168 | + text-decoration: none; | ||
169 | + font-family: '宋体'; | ||
170 | +} | ||
171 | + | ||
172 | +.font19 { | ||
173 | + color: #000; | ||
174 | + font-size: 11pt; | ||
175 | + font-weight: 700; | ||
176 | + font-style: normal; | ||
177 | + text-decoration: none; | ||
178 | + font-family: '宋体'; | ||
179 | +} | ||
180 | + | ||
181 | +.font20 { | ||
182 | + color: #006100; | ||
183 | + font-size: 11pt; | ||
184 | + font-weight: 400; | ||
185 | + font-style: normal; | ||
186 | + text-decoration: none; | ||
187 | + font-family: '宋体'; | ||
188 | +} | ||
189 | + | ||
190 | +.font21 { | ||
191 | + color: #9c0006; | ||
192 | + font-size: 11pt; | ||
193 | + font-weight: 400; | ||
194 | + font-style: normal; | ||
195 | + text-decoration: none; | ||
196 | + font-family: '宋体'; | ||
197 | +} | ||
198 | + | ||
199 | +.font22 { | ||
200 | + color: #9c6500; | ||
201 | + font-size: 11pt; | ||
202 | + font-weight: 400; | ||
203 | + font-style: normal; | ||
204 | + text-decoration: none; | ||
205 | + font-family: '宋体'; | ||
206 | +} | ||
207 | + | ||
208 | +.font23 { | ||
209 | + color: #fff; | ||
210 | + font-size: 11pt; | ||
211 | + font-weight: 400; | ||
212 | + font-style: normal; | ||
213 | + text-decoration: none; | ||
214 | + font-family: '宋体'; | ||
215 | +} | ||
216 | + | ||
217 | +.font24 { | ||
218 | + color: #000; | ||
219 | + font-size: 11pt; | ||
220 | + font-weight: 400; | ||
221 | + font-style: normal; | ||
222 | + text-decoration: none; | ||
223 | + font-family: '宋体'; | ||
224 | +} | ||
225 | + | ||
226 | +.style0 { | ||
227 | + text-align: general; | ||
228 | + vertical-align: middle; | ||
229 | + white-space: nowrap; | ||
230 | + color: windowtext; | ||
231 | + font-size: 12pt; | ||
232 | + font-weight: 400; | ||
233 | + font-style: normal; | ||
234 | + text-decoration: none; | ||
235 | + font-family: '宋体'; | ||
236 | + border: none; | ||
237 | +} | ||
238 | + | ||
239 | +.style21 { | ||
240 | + color: #00f; | ||
241 | + font-size: 11pt; | ||
242 | + font-weight: 400; | ||
243 | + font-style: normal; | ||
244 | + text-decoration: underline; | ||
245 | + font-family: '宋体'; | ||
246 | +} | ||
247 | + | ||
248 | +.style22 { | ||
249 | + color: #800080; | ||
250 | + font-size: 11pt; | ||
251 | + font-weight: 400; | ||
252 | + font-style: normal; | ||
253 | + text-decoration: underline; | ||
254 | + font-family: '宋体'; | ||
255 | +} | ||
256 | + | ||
257 | +.style23 { | ||
258 | + background: #ffc; | ||
259 | + border: 0.5pt solid #b2b2b2; | ||
260 | +} | ||
261 | + | ||
262 | +.style24 { | ||
263 | + color: #f00; | ||
264 | + font-size: 11pt; | ||
265 | + font-weight: 400; | ||
266 | + font-style: normal; | ||
267 | + text-decoration: none; | ||
268 | + font-family: '宋体'; | ||
269 | +} | ||
270 | + | ||
271 | +.style25 { | ||
272 | + color: #44546a; | ||
273 | + font-size: 18pt; | ||
274 | + font-weight: 700; | ||
275 | + font-style: normal; | ||
276 | + text-decoration: none; | ||
277 | + font-family: '宋体'; | ||
278 | +} | ||
279 | + | ||
280 | +.style26 { | ||
281 | + color: #7f7f7f; | ||
282 | + font-size: 11pt; | ||
283 | + font-weight: 400; | ||
284 | + font-style: italic; | ||
285 | + text-decoration: none; | ||
286 | + font-family: '宋体'; | ||
287 | +} | ||
288 | + | ||
289 | +.style27 { | ||
290 | + color: #44546a; | ||
291 | + font-size: 15pt; | ||
292 | + font-weight: 700; | ||
293 | + font-style: normal; | ||
294 | + text-decoration: none; | ||
295 | + font-family: '宋体'; | ||
296 | + border-bottom: 1pt solid #5b9bd5; | ||
297 | +} | ||
298 | + | ||
299 | +.style28 { | ||
300 | + color: #44546a; | ||
301 | + font-size: 13pt; | ||
302 | + font-weight: 700; | ||
303 | + font-style: normal; | ||
304 | + text-decoration: none; | ||
305 | + font-family: '宋体'; | ||
306 | + border-bottom: 1pt solid #5b9bd5; | ||
307 | +} | ||
308 | + | ||
309 | +.style29 { | ||
310 | + color: #44546a; | ||
311 | + font-size: 11pt; | ||
312 | + font-weight: 700; | ||
313 | + font-style: normal; | ||
314 | + text-decoration: none; | ||
315 | + font-family: '宋体'; | ||
316 | + border-bottom: 1pt solid #acccea; | ||
317 | +} | ||
318 | + | ||
319 | +.style30 { | ||
320 | + color: #44546a; | ||
321 | + font-size: 11pt; | ||
322 | + font-weight: 700; | ||
323 | + font-style: normal; | ||
324 | + text-decoration: none; | ||
325 | + font-family: '宋体'; | ||
326 | +} | ||
327 | + | ||
328 | +.style31 { | ||
329 | + background: #fc9; | ||
330 | + color: #3f3f76; | ||
331 | + font-size: 11pt; | ||
332 | + font-weight: 400; | ||
333 | + font-style: normal; | ||
334 | + text-decoration: none; | ||
335 | + font-family: '宋体'; | ||
336 | + border: 0.5pt solid #7f7f7f; | ||
337 | +} | ||
338 | + | ||
339 | +.style32 { | ||
340 | + background: #f2f2f2; | ||
341 | + color: #3f3f3f; | ||
342 | + font-size: 11pt; | ||
343 | + font-weight: 700; | ||
344 | + font-style: normal; | ||
345 | + text-decoration: none; | ||
346 | + font-family: '宋体'; | ||
347 | + border: 0.5pt solid #3f3f3f; | ||
348 | +} | ||
349 | + | ||
350 | +.style33 { | ||
351 | + background: #f2f2f2; | ||
352 | + color: #fa7d00; | ||
353 | + font-size: 11pt; | ||
354 | + font-weight: 700; | ||
355 | + font-style: normal; | ||
356 | + text-decoration: none; | ||
357 | + font-family: '宋体'; | ||
358 | + border: 0.5pt solid #7f7f7f; | ||
359 | +} | ||
360 | + | ||
361 | +.style34 { | ||
362 | + background: #a5a5a5; | ||
363 | + color: #fff; | ||
364 | + font-size: 11pt; | ||
365 | + font-weight: 700; | ||
366 | + font-style: normal; | ||
367 | + text-decoration: none; | ||
368 | + font-family: '宋体'; | ||
369 | + border: 2pt double #3f3f3f; | ||
370 | +} | ||
371 | + | ||
372 | +.style35 { | ||
373 | + color: #fa7d00; | ||
374 | + font-size: 11pt; | ||
375 | + font-weight: 400; | ||
376 | + font-style: normal; | ||
377 | + text-decoration: none; | ||
378 | + font-family: '宋体'; | ||
379 | + border-bottom: 2pt double #ff8001; | ||
380 | +} | ||
381 | + | ||
382 | +.style36 { | ||
383 | + color: #000; | ||
384 | + font-size: 11pt; | ||
385 | + font-weight: 700; | ||
386 | + font-style: normal; | ||
387 | + text-decoration: none; | ||
388 | + font-family: '宋体'; | ||
389 | + border-top: 0.5pt solid #5b9bd5; | ||
390 | + border-bottom: 2pt double #5b9bd5; | ||
391 | +} | ||
392 | + | ||
393 | +.style37 { | ||
394 | + background: #c6efce; | ||
395 | + color: #006100; | ||
396 | + font-size: 11pt; | ||
397 | + font-weight: 400; | ||
398 | + font-style: normal; | ||
399 | + text-decoration: none; | ||
400 | + font-family: '宋体'; | ||
401 | +} | ||
402 | + | ||
403 | +.style38 { | ||
404 | + background: #ffc7ce; | ||
405 | + color: #9c0006; | ||
406 | + font-size: 11pt; | ||
407 | + font-weight: 400; | ||
408 | + font-style: normal; | ||
409 | + text-decoration: none; | ||
410 | + font-family: '宋体'; | ||
411 | +} | ||
412 | + | ||
413 | +.style39 { | ||
414 | + background: #ffeb9c; | ||
415 | + color: #9c6500; | ||
416 | + font-size: 11pt; | ||
417 | + font-weight: 400; | ||
418 | + font-style: normal; | ||
419 | + text-decoration: none; | ||
420 | + font-family: '宋体'; | ||
421 | +} | ||
422 | + | ||
423 | +.style40 { | ||
424 | + background: #5b9bd5; | ||
425 | + color: #fff; | ||
426 | + font-size: 11pt; | ||
427 | + font-weight: 400; | ||
428 | + font-style: normal; | ||
429 | + text-decoration: none; | ||
430 | + font-family: '宋体'; | ||
431 | +} | ||
432 | + | ||
433 | +.style41 { | ||
434 | + background: #ddebf7; | ||
435 | + color: #000; | ||
436 | + font-size: 11pt; | ||
437 | + font-weight: 400; | ||
438 | + font-style: normal; | ||
439 | + text-decoration: none; | ||
440 | + font-family: '宋体'; | ||
441 | +} | ||
442 | + | ||
443 | +.style42 { | ||
444 | + background: #bdd7ee; | ||
445 | + color: #000; | ||
446 | + font-size: 11pt; | ||
447 | + font-weight: 400; | ||
448 | + font-style: normal; | ||
449 | + text-decoration: none; | ||
450 | + font-family: '宋体'; | ||
451 | +} | ||
452 | + | ||
453 | +.style43 { | ||
454 | + background: #9bc2e6; | ||
455 | + color: #fff; | ||
456 | + font-size: 11pt; | ||
457 | + font-weight: 400; | ||
458 | + font-style: normal; | ||
459 | + text-decoration: none; | ||
460 | + font-family: '宋体'; | ||
461 | +} | ||
462 | + | ||
463 | +.style44 { | ||
464 | + background: #ed7d31; | ||
465 | + color: #fff; | ||
466 | + font-size: 11pt; | ||
467 | + font-weight: 400; | ||
468 | + font-style: normal; | ||
469 | + text-decoration: none; | ||
470 | + font-family: '宋体'; | ||
471 | +} | ||
472 | + | ||
473 | +.style45 { | ||
474 | + background: #fce4d6; | ||
475 | + color: #000; | ||
476 | + font-size: 11pt; | ||
477 | + font-weight: 400; | ||
478 | + font-style: normal; | ||
479 | + text-decoration: none; | ||
480 | + font-family: '宋体'; | ||
481 | +} | ||
482 | + | ||
483 | +.style46 { | ||
484 | + background: #f8cbad; | ||
485 | + color: #000; | ||
486 | + font-size: 11pt; | ||
487 | + font-weight: 400; | ||
488 | + font-style: normal; | ||
489 | + text-decoration: none; | ||
490 | + font-family: '宋体'; | ||
491 | +} | ||
492 | + | ||
493 | +.style47 { | ||
494 | + background: #f4b084; | ||
495 | + color: #fff; | ||
496 | + font-size: 11pt; | ||
497 | + font-weight: 400; | ||
498 | + font-style: normal; | ||
499 | + text-decoration: none; | ||
500 | + font-family: '宋体'; | ||
501 | +} | ||
502 | + | ||
503 | +.style48 { | ||
504 | + background: #a5a5a5; | ||
505 | + color: #fff; | ||
506 | + font-size: 11pt; | ||
507 | + font-weight: 400; | ||
508 | + font-style: normal; | ||
509 | + text-decoration: none; | ||
510 | + font-family: '宋体'; | ||
511 | +} | ||
512 | + | ||
513 | +.style49 { | ||
514 | + background: #ededed; | ||
515 | + color: #000; | ||
516 | + font-size: 11pt; | ||
517 | + font-weight: 400; | ||
518 | + font-style: normal; | ||
519 | + text-decoration: none; | ||
520 | + font-family: '宋体'; | ||
521 | +} | ||
522 | + | ||
523 | +.style50 { | ||
524 | + background: #dbdbdb; | ||
525 | + color: #000; | ||
526 | + font-size: 11pt; | ||
527 | + font-weight: 400; | ||
528 | + font-style: normal; | ||
529 | + text-decoration: none; | ||
530 | + font-family: '宋体'; | ||
531 | +} | ||
532 | + | ||
533 | +.style51 { | ||
534 | + background: #c9c9c9; | ||
535 | + color: #fff; | ||
536 | + font-size: 11pt; | ||
537 | + font-weight: 400; | ||
538 | + font-style: normal; | ||
539 | + text-decoration: none; | ||
540 | + font-family: '宋体'; | ||
541 | +} | ||
542 | + | ||
543 | +.style52 { | ||
544 | + background: #ffc000; | ||
545 | + color: #fff; | ||
546 | + font-size: 11pt; | ||
547 | + font-weight: 400; | ||
548 | + font-style: normal; | ||
549 | + text-decoration: none; | ||
550 | + font-family: '宋体'; | ||
551 | +} | ||
552 | + | ||
553 | +.style53 { | ||
554 | + background: #fff2cc; | ||
555 | + color: #000; | ||
556 | + font-size: 11pt; | ||
557 | + font-weight: 400; | ||
558 | + font-style: normal; | ||
559 | + text-decoration: none; | ||
560 | + font-family: '宋体'; | ||
561 | +} | ||
562 | + | ||
563 | +.style54 { | ||
564 | + background: #ffe699; | ||
565 | + color: #000; | ||
566 | + font-size: 11pt; | ||
567 | + font-weight: 400; | ||
568 | + font-style: normal; | ||
569 | + text-decoration: none; | ||
570 | + font-family: '宋体'; | ||
571 | +} | ||
572 | + | ||
573 | +.style55 { | ||
574 | + background: #ffd966; | ||
575 | + color: #fff; | ||
576 | + font-size: 11pt; | ||
577 | + font-weight: 400; | ||
578 | + font-style: normal; | ||
579 | + text-decoration: none; | ||
580 | + font-family: '宋体'; | ||
581 | +} | ||
582 | + | ||
583 | +.style56 { | ||
584 | + background: #4472c4; | ||
585 | + color: #fff; | ||
586 | + font-size: 11pt; | ||
587 | + font-weight: 400; | ||
588 | + font-style: normal; | ||
589 | + text-decoration: none; | ||
590 | + font-family: '宋体'; | ||
591 | +} | ||
592 | + | ||
593 | +.style57 { | ||
594 | + background: #d9e1f2; | ||
595 | + color: #000; | ||
596 | + font-size: 11pt; | ||
597 | + font-weight: 400; | ||
598 | + font-style: normal; | ||
599 | + text-decoration: none; | ||
600 | + font-family: '宋体'; | ||
601 | +} | ||
602 | + | ||
603 | +.style58 { | ||
604 | + background: #b4c6e7; | ||
605 | + color: #000; | ||
606 | + font-size: 11pt; | ||
607 | + font-weight: 400; | ||
608 | + font-style: normal; | ||
609 | + text-decoration: none; | ||
610 | + font-family: '宋体'; | ||
611 | +} | ||
612 | + | ||
613 | +.style59 { | ||
614 | + background: #8ea9db; | ||
615 | + color: #fff; | ||
616 | + font-size: 11pt; | ||
617 | + font-weight: 400; | ||
618 | + font-style: normal; | ||
619 | + text-decoration: none; | ||
620 | + font-family: '宋体'; | ||
621 | +} | ||
622 | + | ||
623 | +.style60 { | ||
624 | + background: #70ad47; | ||
625 | + color: #fff; | ||
626 | + font-size: 11pt; | ||
627 | + font-weight: 400; | ||
628 | + font-style: normal; | ||
629 | + text-decoration: none; | ||
630 | + font-family: '宋体'; | ||
631 | +} | ||
632 | + | ||
633 | +.style61 { | ||
634 | + background: #e2efda; | ||
635 | + color: #000; | ||
636 | + font-size: 11pt; | ||
637 | + font-weight: 400; | ||
638 | + font-style: normal; | ||
639 | + text-decoration: none; | ||
640 | + font-family: '宋体'; | ||
641 | +} | ||
642 | + | ||
643 | +.style62 { | ||
644 | + background: #c6e0b4; | ||
645 | + color: #000; | ||
646 | + font-size: 11pt; | ||
647 | + font-weight: 400; | ||
648 | + font-style: normal; | ||
649 | + text-decoration: none; | ||
650 | + font-family: '宋体'; | ||
651 | +} | ||
652 | + | ||
653 | +.style63 { | ||
654 | + background: #a9d08e; | ||
655 | + color: #fff; | ||
656 | + font-size: 11pt; | ||
657 | + font-weight: 400; | ||
658 | + font-style: normal; | ||
659 | + text-decoration: none; | ||
660 | + font-family: '宋体'; | ||
661 | +} | ||
662 | + | ||
663 | +td { | ||
664 | + padding-top: 1px; | ||
665 | + padding-right: 1px; | ||
666 | + padding-left: 1px; | ||
667 | + text-align: general; | ||
668 | + vertical-align: middle; | ||
669 | + white-space: nowrap; | ||
670 | + color: windowtext; | ||
671 | + font-size: 12pt; | ||
672 | + font-weight: 400; | ||
673 | + font-style: normal; | ||
674 | + text-decoration: none; | ||
675 | + font-family: '宋体'; | ||
676 | + border: none; | ||
677 | +} | ||
678 | + | ||
679 | +.xl65 { | ||
680 | + text-align: center; | ||
681 | + font-size: 16pt; | ||
682 | +} | ||
683 | + | ||
684 | +.xl66 { | ||
685 | + text-align: center; | ||
686 | + font-size: 10pt; | ||
687 | +} | ||
688 | + | ||
689 | +.xl67 { | ||
690 | + text-align: center; | ||
691 | + font-size: 14pt; | ||
692 | +} | ||
693 | + | ||
694 | +.xl68 { | ||
695 | + text-align: center; | ||
696 | + font-size: 14pt; | ||
697 | +} | ||
698 | + | ||
699 | +.xl69 { | ||
700 | + text-align: left; | ||
701 | + font-size: 8pt; | ||
702 | +} | ||
703 | + | ||
704 | +.xl70 { | ||
705 | + text-align: left; | ||
706 | + font-size: 8pt; | ||
707 | +} | ||
708 | + | ||
709 | +.xl71 { | ||
710 | + text-align: center; | ||
711 | + font-size: 8pt; | ||
712 | + border: 0.5pt solid windowtext; | ||
713 | +} | ||
714 | + | ||
715 | +.xl72 { | ||
716 | + text-align: center; | ||
717 | + font-size: 8pt; | ||
718 | + border: 0.5pt solid windowtext; | ||
719 | + white-space: normal; | ||
720 | +} | ||
721 | + | ||
722 | +.xl73 { | ||
723 | + white-space: normal; | ||
724 | + font-size: 8pt; | ||
725 | + border: 0.5pt solid windowtext; | ||
726 | +} | ||
727 | + | ||
728 | +.xl74 { | ||
729 | + text-align: center; | ||
730 | + white-space: normal; | ||
731 | + font-size: 8pt; | ||
732 | + border: 0.5pt solid windowtext; | ||
733 | +} | ||
734 | + | ||
735 | +.xl75 { | ||
736 | + text-align: center; | ||
737 | + white-space: normal; | ||
738 | + font-size: 8pt; | ||
739 | + border: 0.5pt solid windowtext; | ||
740 | +} | ||
741 | + | ||
742 | +.xl76 { | ||
743 | + font-size: 8pt; | ||
744 | +} | ||
745 | + | ||
746 | +.xl77 { | ||
747 | + font-size: 8pt; | ||
748 | +} | ||
749 | + | ||
750 | +.xl78 { | ||
751 | + text-align: center; | ||
752 | + font-size: 8pt; | ||
753 | +} |
src/pages/ResearchGroup/components/AuditModal.tsx
0 → 100644
1 | +import { RESPONSE_CODE } from '@/constants/enum'; | ||
2 | +import { postCommonAudit } from '@/services'; | ||
3 | +import { ModalForm, ProFormTextArea } from '@ant-design/pro-components'; | ||
4 | +import { Button, Form, message } from 'antd'; | ||
5 | +import { cloneDeep } from 'lodash'; | ||
6 | + | ||
7 | +// import { cloneDeep } from 'lodash'; | ||
8 | +export default ({ setVisible, ids, onClose }) => { | ||
9 | + const [form] = Form.useForm(); | ||
10 | + let auditIds = cloneDeep(ids); | ||
11 | + | ||
12 | + const parseValues = (values: any) => { | ||
13 | + values.ids = auditIds; | ||
14 | + values.notes = form.getFieldValue('auditNotes'); | ||
15 | + }; | ||
16 | + | ||
17 | + const doAudit = async (values: any) => { | ||
18 | + values.type = 'research_group_member_request_audit'; | ||
19 | + let res = await postCommonAudit({ data: values }); | ||
20 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
21 | + message.success(res.message); | ||
22 | + onClose(); | ||
23 | + } | ||
24 | + }; | ||
25 | + | ||
26 | + const loadbtns = (props: any, defaultDoms: any) => { | ||
27 | + let btns = []; | ||
28 | + //取消 | ||
29 | + btns.push(defaultDoms[0]); | ||
30 | + | ||
31 | + //驳回 | ||
32 | + btns.push( | ||
33 | + <Button | ||
34 | + type="primary" | ||
35 | + onClick={() => { | ||
36 | + let values = form.getFieldsValue(); | ||
37 | + values.pass = false; | ||
38 | + parseValues(values); | ||
39 | + doAudit(values); | ||
40 | + }} | ||
41 | + > | ||
42 | + 驳回 | ||
43 | + </Button>, | ||
44 | + ); | ||
45 | + | ||
46 | + //确认 | ||
47 | + btns.push(defaultDoms[1]); | ||
48 | + | ||
49 | + return btns; | ||
50 | + }; | ||
51 | + | ||
52 | + return ( | ||
53 | + <> | ||
54 | + <ModalForm | ||
55 | + width={500} | ||
56 | + open | ||
57 | + title="审核" | ||
58 | + form={form} | ||
59 | + autoFocusFirstInput | ||
60 | + modalProps={{ | ||
61 | + okText: '通过', | ||
62 | + cancelText: '取消', | ||
63 | + destroyOnClose: true, | ||
64 | + onCancel: () => { | ||
65 | + setVisible(false); | ||
66 | + }, | ||
67 | + }} | ||
68 | + onFinish={async (values) => { | ||
69 | + values.pass = true; | ||
70 | + parseValues(values); | ||
71 | + doAudit(values); | ||
72 | + onClose(); | ||
73 | + }} | ||
74 | + onOpenChange={setVisible} | ||
75 | + submitter={{ | ||
76 | + render: (props, defaultDoms) => { | ||
77 | + return loadbtns(props, defaultDoms); | ||
78 | + }, | ||
79 | + }} | ||
80 | + > | ||
81 | + <ProFormTextArea | ||
82 | + name="auditNotes" | ||
83 | + key="auditNotes" | ||
84 | + placeholder="备注" | ||
85 | + label="若驳回,请填写备注" | ||
86 | + /> | ||
87 | + </ModalForm> | ||
88 | + </> | ||
89 | + ); | ||
90 | +}; |
src/pages/ResearchGroup/components/ImportModal.tsx
0 → 100644
1 | +import { RESPONSE_CODE } from '@/constants/enum'; | ||
2 | +import { postResearchGroupsImport } from '@/services'; | ||
3 | +import { orderExport } from '@/services/order'; | ||
4 | +import { UploadOutlined } from '@ant-design/icons'; | ||
5 | +import { Button, Modal, Upload, message } from 'antd'; | ||
6 | +import { RcFile, UploadFile, UploadProps } from 'antd/es/upload'; | ||
7 | +import { useState } from 'react'; | ||
8 | +export default ({ onClose }) => { | ||
9 | + // const [form] = Form.useForm<{ name: string; company: string }>(); | ||
10 | + const [messageApi, contextHolder] = message.useMessage(); | ||
11 | + const [fileList, setFileList] = useState<UploadFile[]>([]); | ||
12 | + const [uploading, setUploading] = useState(false); | ||
13 | + const handleChange: UploadProps['onChange'] = ({ fileList: newFileList }) => | ||
14 | + setFileList(newFileList); | ||
15 | + | ||
16 | + const exportLoading = (content: string) => { | ||
17 | + messageApi.open({ | ||
18 | + type: 'loading', | ||
19 | + content: content, | ||
20 | + duration: 0, | ||
21 | + }); | ||
22 | + }; | ||
23 | + | ||
24 | + const exportLoadingDestory = () => { | ||
25 | + messageApi.destroy(); | ||
26 | + }; | ||
27 | + const downloadTemplate = async () => { | ||
28 | + exportLoading('正在下载模板...'); | ||
29 | + orderExport( | ||
30 | + '/api/research/groups/download/importTemplate', | ||
31 | + {}, | ||
32 | + exportLoadingDestory, | ||
33 | + ); | ||
34 | + }; | ||
35 | + | ||
36 | + const handleUpload = async () => { | ||
37 | + const formData = new FormData(); | ||
38 | + fileList.forEach((file) => { | ||
39 | + //originFileObj二进制文件 | ||
40 | + formData.append('file', file.originFileObj as RcFile); | ||
41 | + }); | ||
42 | + // console.log(fileList[0] as RcFile) | ||
43 | + // formData.append('file', fileList[0] as RcFile); | ||
44 | + setUploading(true); | ||
45 | + // You can use any AJAX library you like | ||
46 | + const res = await postResearchGroupsImport({ | ||
47 | + data: formData, | ||
48 | + headers: { | ||
49 | + 'Content-Type': | ||
50 | + 'multipart/form-data; boundary=----WebKitFormBoundarynl6gT1BKdPWIejNq', | ||
51 | + }, | ||
52 | + }); | ||
53 | + | ||
54 | + if (res.result === RESPONSE_CODE.SUCCESS) { | ||
55 | + message.success(res.message); | ||
56 | + onClose(); | ||
57 | + } | ||
58 | + | ||
59 | + setUploading(false); | ||
60 | + }; | ||
61 | + | ||
62 | + const props: UploadProps = { | ||
63 | + onRemove: (file) => { | ||
64 | + const index = fileList.indexOf(file); | ||
65 | + const newFileList = fileList.slice(); | ||
66 | + newFileList.splice(index, 1); | ||
67 | + setFileList(newFileList); | ||
68 | + }, | ||
69 | + beforeUpload: (file) => { | ||
70 | + setFileList([...fileList, file]); | ||
71 | + | ||
72 | + return false; | ||
73 | + }, | ||
74 | + fileList, | ||
75 | + onChange: handleChange, | ||
76 | + accept: '.xlsx', | ||
77 | + }; | ||
78 | + | ||
79 | + return ( | ||
80 | + <> | ||
81 | + <Modal | ||
82 | + width={500} | ||
83 | + open | ||
84 | + title="课题组信息导入" | ||
85 | + footer={[ | ||
86 | + <Button key="cancel" onClick={onClose}> | ||
87 | + 取消 | ||
88 | + </Button>, | ||
89 | + <Button | ||
90 | + type="primary" | ||
91 | + key="ok" | ||
92 | + onClick={handleUpload} | ||
93 | + disabled={fileList.length === 0} | ||
94 | + loading={uploading} | ||
95 | + > | ||
96 | + {uploading ? '上传中' : '提交'} | ||
97 | + </Button>, | ||
98 | + ]} | ||
99 | + onCancel={async () => { | ||
100 | + onClose(); | ||
101 | + }} | ||
102 | + > | ||
103 | + <div className="py-4 font-semibold"> | ||
104 | + 导入课题组信息 | ||
105 | + <Button type="link" onClick={downloadTemplate}> | ||
106 | + 下载模板 | ||
107 | + </Button> | ||
108 | + </div> | ||
109 | + <Upload {...props}> | ||
110 | + <Button icon={<UploadOutlined />} disabled={fileList.length > 0}> | ||
111 | + 点击选择文件 | ||
112 | + </Button> | ||
113 | + </Upload> | ||
114 | + </Modal> | ||
115 | + {contextHolder} | ||
116 | + </> | ||
117 | + ); | ||
118 | +}; |
src/pages/ResearchGroup/components/ResearchGroupAddModal.tsx
0 → 100644
1 | +import { RESPONSE_CODE } from '@/constants/enum'; | ||
2 | +import { | ||
3 | + postCanrdApiUserAddressList, | ||
4 | + postCanrdApiUserList, | ||
5 | + postResearchGroupsAdd, | ||
6 | + postResearchGroupsDetail, | ||
7 | + postResearchGroupsEdit, | ||
8 | +} from '@/services'; | ||
9 | +import { getDefaultString, isEmpty } from '@/utils/StringUtil'; | ||
10 | +import { getRandomNumber } from '@/utils/numberUtil'; | ||
11 | +import { getSalesCodeOptions } from '@/utils/order'; | ||
12 | +import { validatePhoneNumberBool } from '@/utils/validators'; | ||
13 | +import { | ||
14 | + ModalForm, | ||
15 | + ProCard, | ||
16 | + ProForm, | ||
17 | + ProFormSelect, | ||
18 | + ProFormText, | ||
19 | +} from '@ant-design/pro-components'; | ||
20 | +import { Button, Form, Spin, message } from 'antd'; | ||
21 | +import { cloneDeep } from 'lodash'; | ||
22 | +import { useEffect, useState } from 'react'; | ||
23 | +import '../index.less'; | ||
24 | + | ||
25 | +// import { cloneDeep } from 'lodash'; | ||
26 | +export default ({ setVisible, researchGroupId, onClose }) => { | ||
27 | + const [form] = Form.useForm(); | ||
28 | + const [salesCodeOptions, setSalesCodeOptions] = useState([]); | ||
29 | + const [memberOptions, setMemberOptions] = useState<any[]>([]); | ||
30 | + const [accountOptions, setAccountOptions] = useState<any[]>([]); | ||
31 | + const [researchGroupInfo, setResearchGroupInfo] = useState<any>(null); | ||
32 | + const [modalLoading, setModalLoading] = useState(false); | ||
33 | + const groupId = cloneDeep(researchGroupId); | ||
34 | + const [requestCount, setRequestCount] = useState(1); | ||
35 | + | ||
36 | + /** | ||
37 | + * 获取课题组信息 | ||
38 | + * @returns | ||
39 | + */ | ||
40 | + const loadResearchGroupInfo = async () => { | ||
41 | + if (groupId === null) { | ||
42 | + return; | ||
43 | + } | ||
44 | + setModalLoading(true); | ||
45 | + let res = await postResearchGroupsDetail({ data: { id: groupId } }); | ||
46 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
47 | + setResearchGroupInfo(res.data); | ||
48 | + } | ||
49 | + setModalLoading(false); | ||
50 | + }; | ||
51 | + | ||
52 | + /** | ||
53 | + * 获取销售代码枚举,在复制和编辑的时候判断是否为旧的代码 | ||
54 | + */ | ||
55 | + const loadSalesCodeOptions = async () => { | ||
56 | + let options = await getSalesCodeOptions(); | ||
57 | + setSalesCodeOptions(options); | ||
58 | + }; | ||
59 | + | ||
60 | + /** | ||
61 | + * 对options去重 | ||
62 | + * @param options | ||
63 | + * @returns | ||
64 | + */ | ||
65 | + function deduplicateOptions(options: any) { | ||
66 | + const seen = new Set(); | ||
67 | + const result: any[] = []; | ||
68 | + options.forEach((option: any) => { | ||
69 | + const uniqueKey = `${option.realName}-${option.phone}`; | ||
70 | + if (!seen.has(uniqueKey)) { | ||
71 | + seen.add(uniqueKey); | ||
72 | + result.push(option); | ||
73 | + } | ||
74 | + }); | ||
75 | + return result; | ||
76 | + } | ||
77 | + | ||
78 | + /** | ||
79 | + * 自动填充客户信息 | ||
80 | + * @param option | ||
81 | + */ | ||
82 | + function autoFillCustomerInfo(option: any) { | ||
83 | + if (!option) { | ||
84 | + return; | ||
85 | + } | ||
86 | + let realName = option.realName; | ||
87 | + let id = option.value; | ||
88 | + if (id === 3.1415926) { | ||
89 | + message.warning( | ||
90 | + '请填写下方的【客户名称】和【手机号】,填写完成确保信息无误后点击添加按钮。', | ||
91 | + ); | ||
92 | + form.setFieldValue('realName', option.name); | ||
93 | + return; | ||
94 | + } | ||
95 | + //判断当前客户信息是否已添加过:id匹配或者option的phone匹配说明添加过了 | ||
96 | + let memberIds = form.getFieldValue('members'); | ||
97 | + if (!memberIds) { | ||
98 | + //表单项没值的时候默认是undefined。初始化为数组 | ||
99 | + memberIds = []; | ||
100 | + } | ||
101 | + if (memberIds.includes(id)) { | ||
102 | + message.info(`${realName} 重复添加`); | ||
103 | + return; | ||
104 | + } | ||
105 | + //表单项的value添加当前option的value | ||
106 | + memberIds.push(id); | ||
107 | + form.setFieldValue('members', memberIds); | ||
108 | + message.success(`${realName} 添加成功`); | ||
109 | + //判断options中是否已经有这个option | ||
110 | + for (let memberOption of memberOptions) { | ||
111 | + if ( | ||
112 | + memberIds.includes(memberOption.value) && | ||
113 | + memberOption.phone === option.phone | ||
114 | + ) { | ||
115 | + return; | ||
116 | + } | ||
117 | + } | ||
118 | + //option添加到memberOptions中 | ||
119 | + let newMemberOptions = [...memberOptions]; | ||
120 | + newMemberOptions.push(option); | ||
121 | + setMemberOptions(newMemberOptions); | ||
122 | + | ||
123 | + //清空信息 | ||
124 | + form.setFieldValue('realName', undefined); | ||
125 | + form.setFieldValue('phone', undefined); | ||
126 | + form.setFieldValue('customerName', null); | ||
127 | + } | ||
128 | + | ||
129 | + /** | ||
130 | + * 保存account的options | ||
131 | + * @param option | ||
132 | + * @returns | ||
133 | + */ | ||
134 | + function autoAccountSelectOptions(option: any) { | ||
135 | + if (!option) { | ||
136 | + return; | ||
137 | + } | ||
138 | + let id = option.value; | ||
139 | + //判断当前客户信息是否已添加过:id匹配或者option的phone匹配说明添加过了 | ||
140 | + let accountIds = form.getFieldValue('accounts'); | ||
141 | + if (!accountIds) { | ||
142 | + //表单项没值的时候默认是undefined。初始化为数组 | ||
143 | + accountIds = []; | ||
144 | + } | ||
145 | + if (accountIds.includes(id)) { | ||
146 | + return; | ||
147 | + } | ||
148 | + //option添加到accountOptions中 | ||
149 | + setAccountOptions(option); | ||
150 | + } | ||
151 | + | ||
152 | + /** | ||
153 | + * 添加自定义成员 | ||
154 | + */ | ||
155 | + function addCustomMember() { | ||
156 | + let realName = form.getFieldValue('realName'); | ||
157 | + let phone = form.getFieldValue('phone'); | ||
158 | + if (isEmpty(realName)) { | ||
159 | + message.error('请填写客户名称'); | ||
160 | + } | ||
161 | + if (isEmpty(phone)) { | ||
162 | + message.error('请填写手机号'); | ||
163 | + } | ||
164 | + if (!validatePhoneNumberBool(phone)) { | ||
165 | + message.error('请填写正确格式的手机号'); | ||
166 | + return; | ||
167 | + } | ||
168 | + let customOption = { | ||
169 | + value: getRandomNumber(10), | ||
170 | + realName: realName, | ||
171 | + phone: phone, | ||
172 | + }; | ||
173 | + autoFillCustomerInfo(customOption); | ||
174 | + } | ||
175 | + | ||
176 | + function parseFormValues(values: any) { | ||
177 | + if (!values) { | ||
178 | + return {}; | ||
179 | + } | ||
180 | + | ||
181 | + let memberIds = values.members; | ||
182 | + let accountIds = values.accounts; | ||
183 | + values.id = groupId; | ||
184 | + | ||
185 | + //成员对象封装 | ||
186 | + if (memberIds) { | ||
187 | + let memberObjs: any[] = []; | ||
188 | + for (let memberOption of memberOptions) { | ||
189 | + if (memberIds.includes(memberOption.value)) { | ||
190 | + memberObjs.push({ | ||
191 | + memberName: memberOption.realName, | ||
192 | + memberPhone: memberOption.phone, | ||
193 | + id: memberOption.id, | ||
194 | + groupId: memberOption.groupId, | ||
195 | + }); | ||
196 | + } | ||
197 | + } | ||
198 | + values.members = memberObjs; | ||
199 | + } | ||
200 | + | ||
201 | + //预存账号对象封装 | ||
202 | + if (accountIds) { | ||
203 | + let accountObjs: any[] = []; | ||
204 | + for (let accountOption of accountOptions) { | ||
205 | + if (accountIds.includes(accountOption.uid)) { | ||
206 | + accountObjs.push({ | ||
207 | + accountPhone: accountOption.phone, | ||
208 | + accountId: accountOption.uid, | ||
209 | + accountName: accountOption.realName, | ||
210 | + id: accountOption.id, | ||
211 | + groupId: accountOption.groupId, | ||
212 | + }); | ||
213 | + } | ||
214 | + } | ||
215 | + values.accounts = accountObjs; | ||
216 | + } | ||
217 | + | ||
218 | + return values; | ||
219 | + } | ||
220 | + | ||
221 | + /** | ||
222 | + * 设置表单默认信息 | ||
223 | + * @returns | ||
224 | + */ | ||
225 | + const loadFormDefaultValue = async () => { | ||
226 | + if (!researchGroupInfo) { | ||
227 | + return; | ||
228 | + } | ||
229 | + | ||
230 | + let members = researchGroupInfo.members; | ||
231 | + if (members !== null) { | ||
232 | + let newMemberOptions = []; | ||
233 | + for (let member of members) { | ||
234 | + let name = member.memberName; | ||
235 | + let phone = member.memberPhone; | ||
236 | + let id = member.id; | ||
237 | + newMemberOptions.push({ | ||
238 | + ...member, | ||
239 | + realName: name, | ||
240 | + phone: phone, | ||
241 | + value: id, | ||
242 | + }); | ||
243 | + } | ||
244 | + setMemberOptions(newMemberOptions); | ||
245 | + form.setFieldValue( | ||
246 | + 'members', | ||
247 | + members?.map((item: any) => { | ||
248 | + return item.id; | ||
249 | + }), | ||
250 | + ); | ||
251 | + } | ||
252 | + | ||
253 | + let accounts = researchGroupInfo.accounts; | ||
254 | + if (accounts !== null) { | ||
255 | + let phones: any[] = []; | ||
256 | + let accountIds = accounts | ||
257 | + .filter((account: any) => { | ||
258 | + //id为空的按照手机号查询 | ||
259 | + if (account.accountId === null) { | ||
260 | + phones.push(account.accountPhone); | ||
261 | + return false; | ||
262 | + } | ||
263 | + return true; | ||
264 | + }) | ||
265 | + .map((item: any) => item.accountId); | ||
266 | + | ||
267 | + let uidIdMap = new Map( | ||
268 | + accounts.map((item: any) => [item.accountId, item.id]), | ||
269 | + ); | ||
270 | + let res = await postCanrdApiUserList({ | ||
271 | + data: { uids: accountIds, phones: phones }, | ||
272 | + }); | ||
273 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
274 | + let accountList = res?.data?.data; | ||
275 | + console.log(accountList); | ||
276 | + let newAccountOptions = accountList?.map((item) => { | ||
277 | + item.value = uidIdMap.get(item.uid); | ||
278 | + return item; | ||
279 | + }); | ||
280 | + | ||
281 | + console.log(newAccountOptions); | ||
282 | + setAccountOptions(newAccountOptions); | ||
283 | + } | ||
284 | + | ||
285 | + form.setFieldValue('accounts', accountIds); | ||
286 | + } | ||
287 | + | ||
288 | + form.setFieldValue('group', researchGroupInfo.groupName); | ||
289 | + form.setFieldValue('leader', researchGroupInfo.leaderName); | ||
290 | + }; | ||
291 | + | ||
292 | + useEffect(() => { | ||
293 | + loadSalesCodeOptions(); | ||
294 | + loadResearchGroupInfo(); | ||
295 | + }, []); | ||
296 | + | ||
297 | + useEffect(() => { | ||
298 | + loadFormDefaultValue(); | ||
299 | + }, [researchGroupInfo]); | ||
300 | + | ||
301 | + return ( | ||
302 | + <div className="research-group-index"> | ||
303 | + <ModalForm | ||
304 | + width={800} | ||
305 | + open | ||
306 | + title="新增/编辑课题组" | ||
307 | + form={form} | ||
308 | + autoFocusFirstInput | ||
309 | + submitter={{}} | ||
310 | + modalProps={{ | ||
311 | + okText: '提交', | ||
312 | + cancelText: '关闭', | ||
313 | + destroyOnClose: true, | ||
314 | + onCancel: () => { | ||
315 | + setVisible(false); | ||
316 | + }, | ||
317 | + }} | ||
318 | + onFinish={async (values) => { | ||
319 | + let newValues = parseFormValues(values); | ||
320 | + let res; | ||
321 | + if (researchGroupInfo === null) { | ||
322 | + res = await postResearchGroupsAdd({ | ||
323 | + data: newValues, | ||
324 | + }); | ||
325 | + } else { | ||
326 | + res = await postResearchGroupsEdit({ | ||
327 | + data: newValues, | ||
328 | + }); | ||
329 | + } | ||
330 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
331 | + message.success(res.message); | ||
332 | + onClose(); | ||
333 | + } | ||
334 | + }} | ||
335 | + onOpenChange={setVisible} | ||
336 | + > | ||
337 | + <Spin spinning={modalLoading} tip="加载中..."> | ||
338 | + <ProForm.Group> | ||
339 | + <ProFormText | ||
340 | + name="group" | ||
341 | + label="课题组名称" | ||
342 | + placeholder="请输入课题组名称" | ||
343 | + rules={[{ required: true, message: '请输入课题组名称' }]} | ||
344 | + /> | ||
345 | + <ProFormSelect | ||
346 | + name="leader" | ||
347 | + key="leader" | ||
348 | + width="lg" | ||
349 | + showSearch | ||
350 | + label="负责人" | ||
351 | + placeholder="请输入课题组负责人" | ||
352 | + rules={[{ required: true, message: '请输入课题组负责人' }]} | ||
353 | + options={salesCodeOptions} | ||
354 | + /> | ||
355 | + </ProForm.Group> | ||
356 | + | ||
357 | + <ProFormSelect | ||
358 | + name="accounts" | ||
359 | + key="accounts" | ||
360 | + width="lg" | ||
361 | + showSearch | ||
362 | + label="绑定预存账号(可多选)" | ||
363 | + placeholder="请选择预存账号" | ||
364 | + onChange={(_, option) => { | ||
365 | + autoAccountSelectOptions(option); | ||
366 | + }} | ||
367 | + rules={[{ required: true, message: '请至少选择绑定一个预存账号' }]} | ||
368 | + fieldProps={{ | ||
369 | + mode: 'multiple', | ||
370 | + filterOption() { | ||
371 | + return true; | ||
372 | + }, | ||
373 | + optionItemRender(item: any) { | ||
374 | + let name = | ||
375 | + item.label + | ||
376 | + ' | ' + | ||
377 | + item.institution + | ||
378 | + ' | ' + | ||
379 | + item.nowMoney + | ||
380 | + '¥' + | ||
381 | + ' | ' + | ||
382 | + item.phone; | ||
383 | + return ( | ||
384 | + <div title={name}> | ||
385 | + <span style={{ color: '#333333' }}>{name}</span> | ||
386 | + </div> | ||
387 | + ); | ||
388 | + }, | ||
389 | + }} | ||
390 | + debounceTime={1000} | ||
391 | + request={async (value, {}) => { | ||
392 | + const keywords = value.keyWords; | ||
393 | + let body = { | ||
394 | + keywords: keywords, | ||
395 | + pageSize: 20, | ||
396 | + researchGroupId: undefined, | ||
397 | + }; | ||
398 | + | ||
399 | + if (requestCount === 1) { | ||
400 | + body.researchGroupId = groupId; | ||
401 | + } | ||
402 | + | ||
403 | + const res = await postCanrdApiUserList({ | ||
404 | + data: body, | ||
405 | + }); | ||
406 | + let options = res?.data?.data?.map((c: any) => { | ||
407 | + return { | ||
408 | + ...c, | ||
409 | + label: c.realName, | ||
410 | + value: c.uid, | ||
411 | + key: c.uid, | ||
412 | + }; | ||
413 | + }); | ||
414 | + | ||
415 | + setRequestCount(requestCount + 1); | ||
416 | + return options; | ||
417 | + }} | ||
418 | + /> | ||
419 | + | ||
420 | + <ProFormSelect | ||
421 | + name="members" | ||
422 | + key="members" | ||
423 | + width="lg" | ||
424 | + showSearch | ||
425 | + label="课题组成员" | ||
426 | + placeholder="请添加课题组成员" | ||
427 | + fieldProps={{ | ||
428 | + mode: 'multiple', | ||
429 | + filterOption() { | ||
430 | + return true; | ||
431 | + }, | ||
432 | + optionItemRender(item: any) { | ||
433 | + let name = item.realName + ' | ' + item.phone; | ||
434 | + return ( | ||
435 | + <div title={name}> | ||
436 | + <span style={{ color: '#333333' }}>{name}</span> | ||
437 | + </div> | ||
438 | + ); | ||
439 | + }, | ||
440 | + }} | ||
441 | + options={memberOptions} | ||
442 | + /> | ||
443 | + | ||
444 | + <ProCard | ||
445 | + title="选择或自定义课题组成员信息" | ||
446 | + bordered | ||
447 | + tooltip="从【客户信息】选择框中可以直接搜索客户,选中后自动添加到【课题组成员】中。也可以自定义输入【客户名称】和【手机号】,点击添加按钮手动添加到【课题组成员】中。" | ||
448 | + > | ||
449 | + <ProForm.Group> | ||
450 | + <ProFormSelect | ||
451 | + key="customerName" | ||
452 | + label="客户信息(选择)" | ||
453 | + width="lg" | ||
454 | + showSearch | ||
455 | + name="customerName" | ||
456 | + placeholder="请选择客户信息" | ||
457 | + onChange={(_, option) => { | ||
458 | + autoFillCustomerInfo(option); | ||
459 | + }} | ||
460 | + fieldProps={{ | ||
461 | + filterOption() { | ||
462 | + return true; | ||
463 | + }, | ||
464 | + optionItemRender(item: any) { | ||
465 | + if (item.type === 'add') { | ||
466 | + return ( | ||
467 | + <div title={item.name + '(新增客户)'}> | ||
468 | + <span style={{ color: '#333333' }}>{item.name}</span> | ||
469 | + {' | '} | ||
470 | + <span style={{ color: 'orange' }}>自定义</span> | ||
471 | + </div> | ||
472 | + ); | ||
473 | + } | ||
474 | + | ||
475 | + let title = ''; | ||
476 | + let spanText = ''; | ||
477 | + let realName = item.realName; | ||
478 | + let phone = item.phone; | ||
479 | + | ||
480 | + title = | ||
481 | + getDefaultString(realName) + | ||
482 | + '|' + | ||
483 | + getDefaultString(phone); | ||
484 | + | ||
485 | + spanText = | ||
486 | + getDefaultString(realName) + | ||
487 | + '|' + | ||
488 | + getDefaultString(phone); | ||
489 | + return ( | ||
490 | + <div title={title}> | ||
491 | + <span style={{ color: '#333333' }}>{spanText}</span> | ||
492 | + </div> | ||
493 | + ); | ||
494 | + }, | ||
495 | + }} | ||
496 | + debounceTime={1000} | ||
497 | + request={async (value, {}) => { | ||
498 | + const keywords = value.keyWords; | ||
499 | + if (keywords === '') { | ||
500 | + return []; | ||
501 | + } | ||
502 | + const res = await postCanrdApiUserAddressList({ | ||
503 | + data: { keywords: keywords }, | ||
504 | + }); | ||
505 | + let options = res?.data?.map((c: any) => { | ||
506 | + return { | ||
507 | + ...c, | ||
508 | + label: c.name, | ||
509 | + value: c.id, | ||
510 | + key: c.id, | ||
511 | + }; | ||
512 | + }); | ||
513 | + | ||
514 | + //对options去重,realName和phone唯一 | ||
515 | + options = deduplicateOptions(options); | ||
516 | + | ||
517 | + //第一个商品默认为要新增客户 | ||
518 | + if (keywords.trim() !== '') { | ||
519 | + options.unshift({ | ||
520 | + name: keywords, | ||
521 | + type: 'add', | ||
522 | + label: keywords, | ||
523 | + value: 3.1415926, | ||
524 | + key: keywords, | ||
525 | + }); | ||
526 | + } | ||
527 | + | ||
528 | + return options; | ||
529 | + }} | ||
530 | + /> | ||
531 | + </ProForm.Group> | ||
532 | + | ||
533 | + <ProForm.Group> | ||
534 | + <ProFormText | ||
535 | + name="realName" | ||
536 | + label="客户名称(自定义)" | ||
537 | + placeholder="请输入客户名称" | ||
538 | + rules={[{ required: false, message: '请输入客户名称' }]} | ||
539 | + /> | ||
540 | + <ProFormText | ||
541 | + name="phone" | ||
542 | + label="手机号(自定义)" | ||
543 | + width="md" | ||
544 | + placeholder="请输入手机号" | ||
545 | + rules={[{ required: false, message: '请输入手机号' }]} | ||
546 | + /> | ||
547 | + </ProForm.Group> | ||
548 | + <Button | ||
549 | + type="primary" | ||
550 | + onClick={() => { | ||
551 | + addCustomMember(); | ||
552 | + }} | ||
553 | + > | ||
554 | + 添加 | ||
555 | + </Button> | ||
556 | + </ProCard> | ||
557 | + </Spin> | ||
558 | + </ModalForm> | ||
559 | + </div> | ||
560 | + ); | ||
561 | +}; |
src/pages/ResearchGroup/components/ResearchGroupMemberRequestAddModal.tsx
0 → 100644
1 | +import { RESPONSE_CODE } from '@/constants/enum'; | ||
2 | +import { | ||
3 | + postCanrdApiUserAddressList, | ||
4 | + postResearchGroupMemberRequestsAdd, | ||
5 | + postResearchGroupMemberRequestsDetail, | ||
6 | + postResearchGroupMemberRequestsEdit, | ||
7 | + postResearchGroupsDetail, | ||
8 | + postResearchGroupsList, | ||
9 | +} from '@/services'; | ||
10 | +import { getDefaultString, isEmpty } from '@/utils/StringUtil'; | ||
11 | +import { getRandomNumber } from '@/utils/numberUtil'; | ||
12 | + | ||
13 | +import { validatePhoneNumberBool } from '@/utils/validators'; | ||
14 | +import { | ||
15 | + ModalForm, | ||
16 | + ProCard, | ||
17 | + ProForm, | ||
18 | + ProFormSelect, | ||
19 | + ProFormText, | ||
20 | + ProFormTextArea, | ||
21 | +} from '@ant-design/pro-components'; | ||
22 | +import { Button, Form, Spin, message } from 'antd'; | ||
23 | +import { cloneDeep } from 'lodash'; | ||
24 | +import { useEffect, useState } from 'react'; | ||
25 | +import '../index.less'; | ||
26 | + | ||
27 | +// import { cloneDeep } from 'lodash'; | ||
28 | +export default ({ setVisible, requestId, onClose }) => { | ||
29 | + const [form] = Form.useForm(); | ||
30 | + const [memberOptions, setMemberOptions] = useState<any[]>([]); | ||
31 | + const [requestInfo, setRequestInfo] = useState<any>(null); | ||
32 | + const [modalLoading, setModalLoading] = useState(false); | ||
33 | + const [groupOption, setGroupOption] = useState<any>(null); | ||
34 | + const copyRequestId = cloneDeep(requestId); | ||
35 | + | ||
36 | + /** | ||
37 | + * 获取课题组信息 | ||
38 | + * @returns | ||
39 | + */ | ||
40 | + const loadRequestInfo = async () => { | ||
41 | + if (copyRequestId === null) { | ||
42 | + return; | ||
43 | + } | ||
44 | + setModalLoading(true); | ||
45 | + let res = await postResearchGroupMemberRequestsDetail({ | ||
46 | + data: { id: copyRequestId }, | ||
47 | + }); | ||
48 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
49 | + setRequestInfo(res.data); | ||
50 | + } | ||
51 | + setModalLoading(false); | ||
52 | + }; | ||
53 | + | ||
54 | + /** | ||
55 | + * 对options去重 | ||
56 | + * @param options | ||
57 | + * @returns | ||
58 | + */ | ||
59 | + function deduplicateOptions(options: any) { | ||
60 | + const seen = new Set(); | ||
61 | + const result: any[] = []; | ||
62 | + options.forEach((option: any) => { | ||
63 | + const uniqueKey = `${option.realName}-${option.phone}`; | ||
64 | + if (!seen.has(uniqueKey)) { | ||
65 | + seen.add(uniqueKey); | ||
66 | + result.push(option); | ||
67 | + } | ||
68 | + }); | ||
69 | + return result; | ||
70 | + } | ||
71 | + | ||
72 | + /** | ||
73 | + * 自动填充客户信息 | ||
74 | + * @param option | ||
75 | + */ | ||
76 | + function autoFillCustomerInfo(option: any) { | ||
77 | + if (!option) { | ||
78 | + return; | ||
79 | + } | ||
80 | + let realName = option.realName; | ||
81 | + let id = option.value; | ||
82 | + if (id === 3.1415926) { | ||
83 | + message.warning( | ||
84 | + '请填写下方的【客户名称】和【手机号】,填写完成确保信息无误后点击添加按钮。', | ||
85 | + ); | ||
86 | + form.setFieldValue('realName', option.name); | ||
87 | + return; | ||
88 | + } | ||
89 | + //判断当前客户信息是否已添加过:id匹配或者option的phone匹配说明添加过了 | ||
90 | + let memberIds = form.getFieldValue('members'); | ||
91 | + if (!memberIds) { | ||
92 | + //表单项没值的时候默认是undefined。初始化为数组 | ||
93 | + memberIds = []; | ||
94 | + } | ||
95 | + if (memberIds.includes(id)) { | ||
96 | + message.info(`${realName} 重复添加`); | ||
97 | + return; | ||
98 | + } | ||
99 | + //表单项的value添加当前option的value | ||
100 | + memberIds.push(id); | ||
101 | + | ||
102 | + //如果是编辑,每次只保存一个 | ||
103 | + if (requestInfo !== null) { | ||
104 | + form.setFieldValue('members', [id]); | ||
105 | + } else { | ||
106 | + form.setFieldValue('members', memberIds); | ||
107 | + } | ||
108 | + | ||
109 | + message.success(`${realName} 添加成功`); | ||
110 | + //判断options中是否已经有这个option | ||
111 | + for (let memberOption of memberOptions) { | ||
112 | + if ( | ||
113 | + memberIds.includes(memberOption.value) && | ||
114 | + memberOption.phone === option.phone | ||
115 | + ) { | ||
116 | + return; | ||
117 | + } | ||
118 | + } | ||
119 | + //option添加到memberOptions中 | ||
120 | + let newMemberOptions = [...memberOptions]; | ||
121 | + newMemberOptions.push(option); | ||
122 | + setMemberOptions(newMemberOptions); | ||
123 | + | ||
124 | + //清空信息 | ||
125 | + form.setFieldValue('realName', undefined); | ||
126 | + form.setFieldValue('phone', undefined); | ||
127 | + form.setFieldValue('customerName', null); | ||
128 | + } | ||
129 | + | ||
130 | + /** | ||
131 | + * 添加自定义成员 | ||
132 | + */ | ||
133 | + function addCustomMember() { | ||
134 | + let realName = form.getFieldValue('realName'); | ||
135 | + let phone = form.getFieldValue('phone'); | ||
136 | + if (isEmpty(realName)) { | ||
137 | + message.error('请填写客户名称'); | ||
138 | + } | ||
139 | + if (isEmpty(phone)) { | ||
140 | + message.error('请填写手机号'); | ||
141 | + } | ||
142 | + if (!validatePhoneNumberBool(phone)) { | ||
143 | + message.error('请填写正确格式的手机号'); | ||
144 | + return; | ||
145 | + } | ||
146 | + let customOption = { | ||
147 | + value: getRandomNumber(10), | ||
148 | + realName: realName, | ||
149 | + phone: phone, | ||
150 | + }; | ||
151 | + autoFillCustomerInfo(customOption); | ||
152 | + } | ||
153 | + | ||
154 | + function parseFormValues(values: any) { | ||
155 | + if (!values) { | ||
156 | + return {}; | ||
157 | + } | ||
158 | + | ||
159 | + let memberIds = values.members; | ||
160 | + values.id = copyRequestId; | ||
161 | + | ||
162 | + //成员对象封装 | ||
163 | + if (memberIds) { | ||
164 | + let memberObjs: any[] = []; | ||
165 | + for (let memberOption of memberOptions) { | ||
166 | + if (memberIds.includes(memberOption.value)) { | ||
167 | + memberObjs.push({ | ||
168 | + memberName: memberOption.realName, | ||
169 | + memberPhone: memberOption.phone, | ||
170 | + id: memberOption.id, | ||
171 | + groupId: memberOption.groupId, | ||
172 | + }); | ||
173 | + | ||
174 | + values.memberName = memberOption.realName; | ||
175 | + values.memberPhone = memberOption.phone; | ||
176 | + } | ||
177 | + } | ||
178 | + values.members = memberObjs; | ||
179 | + } | ||
180 | + | ||
181 | + //课题组信息封装 | ||
182 | + if (groupOption) { | ||
183 | + values.groupName = groupOption.groupName; | ||
184 | + } | ||
185 | + | ||
186 | + return values; | ||
187 | + } | ||
188 | + | ||
189 | + /** | ||
190 | + * 设置表单默认信息 | ||
191 | + * @returns | ||
192 | + */ | ||
193 | + const loadFormDefaultValue = async () => { | ||
194 | + if (!requestInfo) { | ||
195 | + return; | ||
196 | + } | ||
197 | + | ||
198 | + let groupId = requestInfo.groupId; | ||
199 | + if (groupId !== null) { | ||
200 | + let res = await postResearchGroupsDetail({ data: { id: groupId } }); | ||
201 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
202 | + setGroupOption(res.data); | ||
203 | + } | ||
204 | + | ||
205 | + form.setFieldValue('groupId', groupId); | ||
206 | + } | ||
207 | + | ||
208 | + form.setFieldValue('requestNotes', requestInfo.requestNotes); | ||
209 | + | ||
210 | + let memberName = requestInfo.memberName; | ||
211 | + let memberPhone = requestInfo.memberPhone; | ||
212 | + | ||
213 | + let uid = getRandomNumber(10); | ||
214 | + let newMemberOption = [ | ||
215 | + { realName: memberName, phone: memberPhone, uid: uid, value: uid }, | ||
216 | + ]; | ||
217 | + setMemberOptions(newMemberOption); | ||
218 | + //编辑只能选一个member | ||
219 | + form.setFieldValue('members', [uid]); | ||
220 | + }; | ||
221 | + | ||
222 | + useEffect(() => { | ||
223 | + loadRequestInfo(); | ||
224 | + }, []); | ||
225 | + | ||
226 | + useEffect(() => { | ||
227 | + loadFormDefaultValue(); | ||
228 | + }, [requestInfo]); | ||
229 | + | ||
230 | + return ( | ||
231 | + <div className="research-group-index"> | ||
232 | + <ModalForm | ||
233 | + width={800} | ||
234 | + open | ||
235 | + title={requestInfo !== null ? '编辑申请信息' : '新增申请'} | ||
236 | + form={form} | ||
237 | + autoFocusFirstInput | ||
238 | + submitter={{}} | ||
239 | + modalProps={{ | ||
240 | + okText: '提交', | ||
241 | + cancelText: '关闭', | ||
242 | + destroyOnClose: true, | ||
243 | + onCancel: () => { | ||
244 | + setVisible(false); | ||
245 | + }, | ||
246 | + }} | ||
247 | + onFinish={async (values) => { | ||
248 | + let newValues = parseFormValues(values); | ||
249 | + let res; | ||
250 | + if (requestInfo === null) { | ||
251 | + res = await postResearchGroupMemberRequestsAdd({ | ||
252 | + data: newValues, | ||
253 | + }); | ||
254 | + } else { | ||
255 | + res = await postResearchGroupMemberRequestsEdit({ | ||
256 | + data: newValues, | ||
257 | + }); | ||
258 | + } | ||
259 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
260 | + message.success(res.message); | ||
261 | + onClose(); | ||
262 | + } | ||
263 | + }} | ||
264 | + onOpenChange={setVisible} | ||
265 | + > | ||
266 | + <Spin spinning={modalLoading} tip="加载中..."> | ||
267 | + <ProForm.Group> | ||
268 | + <ProFormSelect | ||
269 | + name="groupId" | ||
270 | + key="groupId" | ||
271 | + width="lg" | ||
272 | + showSearch | ||
273 | + label="课题组" | ||
274 | + placeholder="请选择课题组" | ||
275 | + rules={[{ required: true, message: '请选择课题组' }]} | ||
276 | + onChange={(_, option) => { | ||
277 | + setGroupOption(option); | ||
278 | + }} | ||
279 | + fieldProps={{ | ||
280 | + filterOption() { | ||
281 | + return true; | ||
282 | + }, | ||
283 | + optionItemRender(item: any) { | ||
284 | + let name = item.groupName + ' | ' + item.leaderName; | ||
285 | + return ( | ||
286 | + <div title={name}> | ||
287 | + <span style={{ color: '#333333' }}>{name}</span> | ||
288 | + </div> | ||
289 | + ); | ||
290 | + }, | ||
291 | + }} | ||
292 | + debounceTime={1000} | ||
293 | + request={async (value, {}) => { | ||
294 | + const groupName = value.keyWords; | ||
295 | + let body = { groupName: groupName, pageSize: 20 }; | ||
296 | + | ||
297 | + const res = await postResearchGroupsList({ | ||
298 | + data: body, | ||
299 | + }); | ||
300 | + let options = res?.data?.data?.map((c: any) => { | ||
301 | + return { | ||
302 | + ...c, | ||
303 | + label: c.groupName, | ||
304 | + value: c.id, | ||
305 | + key: c.id, | ||
306 | + }; | ||
307 | + }); | ||
308 | + return options; | ||
309 | + }} | ||
310 | + /> | ||
311 | + </ProForm.Group> | ||
312 | + | ||
313 | + <ProFormSelect | ||
314 | + name="members" | ||
315 | + key="members" | ||
316 | + width="lg" | ||
317 | + showSearch | ||
318 | + label="课题组成员" | ||
319 | + placeholder="请添加课题组成员" | ||
320 | + rules={[{ required: true, message: '请至少添加一个成员' }]} | ||
321 | + fieldProps={{ | ||
322 | + mode: 'multiple', | ||
323 | + filterOption() { | ||
324 | + return true; | ||
325 | + }, | ||
326 | + optionItemRender(item: any) { | ||
327 | + let name = item.realName + ' | ' + item.phone; | ||
328 | + return ( | ||
329 | + <div title={name}> | ||
330 | + <span style={{ color: '#333333' }}>{name}</span> | ||
331 | + </div> | ||
332 | + ); | ||
333 | + }, | ||
334 | + }} | ||
335 | + options={memberOptions} | ||
336 | + /> | ||
337 | + | ||
338 | + <ProCard | ||
339 | + title="选择或自定义课题组成员信息" | ||
340 | + bordered | ||
341 | + tooltip="从【客户信息】选择框中可以直接搜索客户,选中后自动添加到【课题组成员】中。也可以自定义输入【客户名称】和【手机号】,点击添加按钮手动添加到【课题组成员】中。" | ||
342 | + > | ||
343 | + <ProForm.Group> | ||
344 | + <ProFormSelect | ||
345 | + key="customerName" | ||
346 | + label="客户信息(选择)" | ||
347 | + width="lg" | ||
348 | + showSearch | ||
349 | + name="customerName" | ||
350 | + placeholder="请选择客户信息" | ||
351 | + onChange={(_, option) => { | ||
352 | + autoFillCustomerInfo(option); | ||
353 | + }} | ||
354 | + fieldProps={{ | ||
355 | + filterOption() { | ||
356 | + return true; | ||
357 | + }, | ||
358 | + optionItemRender(item: any) { | ||
359 | + if (item.type === 'add') { | ||
360 | + return ( | ||
361 | + <div title={item.name + '(新增客户)'}> | ||
362 | + <span style={{ color: '#333333' }}>{item.name}</span> | ||
363 | + {' | '} | ||
364 | + <span style={{ color: 'orange' }}>自定义</span> | ||
365 | + </div> | ||
366 | + ); | ||
367 | + } | ||
368 | + | ||
369 | + let title = ''; | ||
370 | + let spanText = ''; | ||
371 | + let realName = item.realName; | ||
372 | + let phone = item.phone; | ||
373 | + | ||
374 | + title = | ||
375 | + getDefaultString(realName) + | ||
376 | + '|' + | ||
377 | + getDefaultString(phone); | ||
378 | + | ||
379 | + spanText = | ||
380 | + getDefaultString(realName) + | ||
381 | + '|' + | ||
382 | + getDefaultString(phone); | ||
383 | + return ( | ||
384 | + <div title={title}> | ||
385 | + <span style={{ color: '#333333' }}>{spanText}</span> | ||
386 | + </div> | ||
387 | + ); | ||
388 | + }, | ||
389 | + }} | ||
390 | + debounceTime={1000} | ||
391 | + request={async (value, {}) => { | ||
392 | + const keywords = value.keyWords; | ||
393 | + if (keywords === '') { | ||
394 | + return []; | ||
395 | + } | ||
396 | + const res = await postCanrdApiUserAddressList({ | ||
397 | + data: { keywords: keywords }, | ||
398 | + }); | ||
399 | + let options = res?.data?.map((c: any) => { | ||
400 | + return { | ||
401 | + ...c, | ||
402 | + label: c.name, | ||
403 | + value: c.id, | ||
404 | + key: c.id, | ||
405 | + }; | ||
406 | + }); | ||
407 | + | ||
408 | + //对options去重,realName和phone唯一 | ||
409 | + options = deduplicateOptions(options); | ||
410 | + | ||
411 | + //第一个商品默认为要新增客户 | ||
412 | + if (keywords.trim() !== '') { | ||
413 | + options.unshift({ | ||
414 | + name: keywords, | ||
415 | + type: 'add', | ||
416 | + label: keywords, | ||
417 | + value: 3.1415926, | ||
418 | + key: keywords, | ||
419 | + }); | ||
420 | + } | ||
421 | + | ||
422 | + return options; | ||
423 | + }} | ||
424 | + /> | ||
425 | + </ProForm.Group> | ||
426 | + | ||
427 | + <ProForm.Group> | ||
428 | + <ProFormText | ||
429 | + name="realName" | ||
430 | + label="客户名称(自定义)" | ||
431 | + placeholder="请输入客户名称" | ||
432 | + rules={[{ required: false, message: '请输入客户名称' }]} | ||
433 | + /> | ||
434 | + <ProFormText | ||
435 | + name="phone" | ||
436 | + label="手机号(自定义)" | ||
437 | + width="md" | ||
438 | + placeholder="请输入手机号" | ||
439 | + rules={[{ required: false, message: '请输入手机号' }]} | ||
440 | + /> | ||
441 | + </ProForm.Group> | ||
442 | + <Button | ||
443 | + type="primary" | ||
444 | + onClick={() => { | ||
445 | + addCustomMember(); | ||
446 | + }} | ||
447 | + > | ||
448 | + 添加 | ||
449 | + </Button> | ||
450 | + </ProCard> | ||
451 | + | ||
452 | + <ProFormTextArea | ||
453 | + name="requestNotes" | ||
454 | + key="requestNotes" | ||
455 | + label="申请备注" | ||
456 | + /> | ||
457 | + </Spin> | ||
458 | + </ModalForm> | ||
459 | + </div> | ||
460 | + ); | ||
461 | +}; |
src/pages/ResearchGroup/constant.tsx
0 → 100644
1 | +import { enumToProTableEnumValue } from '@/utils'; | ||
2 | +export const AUDIT_STATUS_OPTIONS = { | ||
3 | + CREATED: '未审核', | ||
4 | + AUDIT_PASS: '审核通过', | ||
5 | + AUDIT_FAIL: '审核失败', | ||
6 | +}; | ||
7 | +export const RESEARCH_GROUP_COLUMNS = [ | ||
8 | + { | ||
9 | + title: '序号', | ||
10 | + dataIndex: 'index', | ||
11 | + valueType: 'index', | ||
12 | + width: 70, | ||
13 | + }, | ||
14 | + { | ||
15 | + title: 'ID', | ||
16 | + dataIndex: 'id', | ||
17 | + key: 'id', | ||
18 | + valueType: 'index', | ||
19 | + hideInSearch: true, | ||
20 | + hideInTable: true, | ||
21 | + }, | ||
22 | + { | ||
23 | + title: '课题组名称', | ||
24 | + dataIndex: 'groupName', | ||
25 | + key: 'groupName', | ||
26 | + fieldProps: { | ||
27 | + placeholder: '请输入课题组名称', | ||
28 | + }, | ||
29 | + }, | ||
30 | + { | ||
31 | + title: '预存账号', | ||
32 | + dataIndex: 'accounts', | ||
33 | + key: 'accounts', | ||
34 | + hideInSearch: true, | ||
35 | + }, | ||
36 | + { | ||
37 | + title: '预存手机号', | ||
38 | + dataIndex: 'accountPhone', | ||
39 | + key: 'accountPhone', | ||
40 | + hideInTable: true, | ||
41 | + }, | ||
42 | + { | ||
43 | + title: '成员名称', | ||
44 | + dataIndex: 'memberName', | ||
45 | + key: 'memberName', | ||
46 | + hideInTable: true, | ||
47 | + }, | ||
48 | + { | ||
49 | + title: '成员手机号', | ||
50 | + dataIndex: 'memberPhone', | ||
51 | + key: 'memberPhone', | ||
52 | + hideInTable: true, | ||
53 | + }, | ||
54 | + { | ||
55 | + title: '课题组成员', | ||
56 | + dataIndex: 'members', | ||
57 | + key: 'members', | ||
58 | + hideInSearch: true, | ||
59 | + }, | ||
60 | + { | ||
61 | + title: '负责人', | ||
62 | + dataIndex: 'leaderName', | ||
63 | + key: 'leaderName', | ||
64 | + fieldProps: { | ||
65 | + placeholder: '请输入负责人姓名', | ||
66 | + }, | ||
67 | + }, | ||
68 | + { | ||
69 | + title: '创建时间', | ||
70 | + dataIndex: 'createTime', | ||
71 | + key: 'createTime', | ||
72 | + valueType: 'dateTime', | ||
73 | + fieldProps: { | ||
74 | + placeholder: '请选择创建时间', | ||
75 | + }, | ||
76 | + hideInSearch: true, | ||
77 | + }, | ||
78 | + | ||
79 | + { | ||
80 | + title: '创建人', | ||
81 | + dataIndex: 'createByName', | ||
82 | + key: 'createByName', | ||
83 | + fieldProps: { | ||
84 | + placeholder: '请输入选择创建人', | ||
85 | + }, | ||
86 | + hideInSearch: true, | ||
87 | + }, | ||
88 | +]; | ||
89 | + | ||
90 | +export const RESEARCH_GROUP_MEMBER_REQUEST_COLUMNS = [ | ||
91 | + { | ||
92 | + title: '序号', | ||
93 | + dataIndex: 'index', | ||
94 | + valueType: 'index', | ||
95 | + width: 70, | ||
96 | + }, | ||
97 | + { | ||
98 | + title: '主键ID', | ||
99 | + dataIndex: 'id', | ||
100 | + key: 'id', | ||
101 | + valueType: 'index', | ||
102 | + hideInSearch: true, | ||
103 | + hideInTable: true, | ||
104 | + }, | ||
105 | + { | ||
106 | + title: '课题组名称', | ||
107 | + dataIndex: 'groupName', | ||
108 | + key: 'groupName', | ||
109 | + fieldProps: { | ||
110 | + placeholder: '请输入课题组名称', | ||
111 | + }, | ||
112 | + }, | ||
113 | + { | ||
114 | + title: '课题组ID', | ||
115 | + dataIndex: 'groupId', | ||
116 | + key: 'groupId', | ||
117 | + hideInSearch: true, | ||
118 | + }, | ||
119 | + { | ||
120 | + title: '成员名称', | ||
121 | + dataIndex: 'memberName', | ||
122 | + key: 'memberName', | ||
123 | + }, | ||
124 | + { | ||
125 | + title: '成员手机号', | ||
126 | + dataIndex: 'memberPhone', | ||
127 | + key: 'memberPhone', | ||
128 | + }, | ||
129 | + { | ||
130 | + title: '申请类型', | ||
131 | + dataIndex: 'requestType', | ||
132 | + key: 'requestType', | ||
133 | + fieldProps: { | ||
134 | + placeholder: '请输入申请类型:APPEND-新增 REMOVE-删除 MODIFY-修改', | ||
135 | + }, | ||
136 | + hideInTable: true, | ||
137 | + hideInSearch: true, | ||
138 | + }, | ||
139 | + { | ||
140 | + title: '审核状态', | ||
141 | + dataIndex: 'auditStatusText', | ||
142 | + key: 'auditStatusText', | ||
143 | + valueType: 'select', | ||
144 | + hideInSearch: true, | ||
145 | + }, | ||
146 | + { | ||
147 | + title: '审核状态', | ||
148 | + dataIndex: 'auditStatus', | ||
149 | + key: 'auditStatus', | ||
150 | + valueType: 'select', | ||
151 | + valueEnum: enumToProTableEnumValue(AUDIT_STATUS_OPTIONS), | ||
152 | + hideInTable: true, | ||
153 | + }, | ||
154 | + { | ||
155 | + title: '申请备注', | ||
156 | + dataIndex: 'requestNotes', | ||
157 | + key: 'requestNotes', | ||
158 | + }, | ||
159 | + { | ||
160 | + title: '审核备注', | ||
161 | + dataIndex: 'auditNotes', | ||
162 | + key: 'auditNotes', | ||
163 | + }, | ||
164 | + { | ||
165 | + title: '创建时间', | ||
166 | + dataIndex: 'createTime', | ||
167 | + key: 'createTime', | ||
168 | + valueType: 'dateTime', | ||
169 | + fieldProps: { | ||
170 | + placeholder: '请选择创建时间', | ||
171 | + }, | ||
172 | + hideInSearch: true, | ||
173 | + }, | ||
174 | + { | ||
175 | + title: '创建人', | ||
176 | + dataIndex: 'createByName', | ||
177 | + key: 'createByName', | ||
178 | + fieldProps: { | ||
179 | + placeholder: '请输入创建人', | ||
180 | + }, | ||
181 | + hideInSearch: true, | ||
182 | + }, | ||
183 | +]; |
src/pages/ResearchGroup/index.less
0 → 100644
src/pages/ResearchGroup/index.tsx
0 → 100644
1 | +import ButtonConfirm from '@/components/ButtomConfirm'; | ||
2 | +import EllipsisDiv from '@/components/Div/EllipsisDiv'; | ||
3 | +import { RESPONSE_CODE } from '@/constants/enum'; | ||
4 | +import {} from '@/pages/Invoice/constant'; | ||
5 | +import { | ||
6 | + postCanrdApiUserDetail, | ||
7 | + postResearchGroupMemberRequestsDelete, | ||
8 | + postResearchGroupMemberRequestsList, | ||
9 | + postResearchGroupsDelete, | ||
10 | + postResearchGroupsList, | ||
11 | +} from '@/services'; | ||
12 | +import { formatDateTime } from '@/utils'; | ||
13 | +import { PlusOutlined } from '@ant-design/icons'; | ||
14 | +import { ActionType, ProTable } from '@ant-design/pro-components'; | ||
15 | +import { | ||
16 | + Button, | ||
17 | + Col, | ||
18 | + Divider, | ||
19 | + Image, | ||
20 | + Popconfirm, | ||
21 | + Row, | ||
22 | + Space, | ||
23 | + Spin, | ||
24 | + Table, | ||
25 | + Tabs, | ||
26 | + Tag, | ||
27 | + message, | ||
28 | +} from 'antd'; | ||
29 | +import React, { useRef, useState } from 'react'; | ||
30 | +import AuditModal from './components/AuditModal'; | ||
31 | +import ImportModal from './components/ImportModal'; | ||
32 | +import ResearchGroupAddModal from './components/ResearchGroupAddModal'; | ||
33 | +import ResearchGroupMemberRequestAddModal from './components/ResearchGroupMemberRequestAddModal'; | ||
34 | +import { | ||
35 | + RESEARCH_GROUP_COLUMNS, | ||
36 | + RESEARCH_GROUP_MEMBER_REQUEST_COLUMNS, | ||
37 | +} from './constant'; | ||
38 | +import './index.less'; | ||
39 | +const PrepaidPage = () => { | ||
40 | + const researchGroupActionRef = useRef<ActionType>(); | ||
41 | + const memberApplyActionRef = useRef<ActionType>(); | ||
42 | + const [researchGroupAddModalVisible, setResearchGroupAddModalVisible] = | ||
43 | + useState(false); | ||
44 | + const [importModalVisible, setImportModalVisible] = useState(false); | ||
45 | + const [auditIds, setAuditIds] = useState<any[]>([]); | ||
46 | + const [auditModalVisible, setAuditModalVisible] = useState(false); | ||
47 | + const [ | ||
48 | + researchGroupMemberRequestAddModalVisible, | ||
49 | + setResearchGroupMemberRequestAddModalVisible, | ||
50 | + ] = useState(false); | ||
51 | + // const [checkVisible, setCheckVisible] = useState(false); | ||
52 | + const [accountInfo, setAccountInfo] = useState({ | ||
53 | + realName: '', | ||
54 | + phone: '', | ||
55 | + nowMoney: '', | ||
56 | + uid: '', | ||
57 | + }); | ||
58 | + const [accountInfoLoading, setAccountInfoLoading] = useState(false); | ||
59 | + const [perms, setPerms] = useState<string[]>([]); | ||
60 | + const [optRecordId, setOptRecordId] = useState<any>(null); | ||
61 | + | ||
62 | + const reloadResearchGroupTable = () => { | ||
63 | + researchGroupActionRef.current?.reload(); | ||
64 | + }; | ||
65 | + | ||
66 | + const reloadMemberApplyTable = () => { | ||
67 | + memberApplyActionRef.current?.reload(); | ||
68 | + }; | ||
69 | + | ||
70 | + // const getTableCellText = (target: any) => { | ||
71 | + // if (!target) { | ||
72 | + // return ''; | ||
73 | + // } | ||
74 | + | ||
75 | + // if (target.props) { | ||
76 | + // return target.props.text; | ||
77 | + // } | ||
78 | + | ||
79 | + // return target; | ||
80 | + // }; | ||
81 | + | ||
82 | + const renderMembersCell = (value: any) => { | ||
83 | + if (!value) { | ||
84 | + return <span></span>; | ||
85 | + } | ||
86 | + let tags = value.map((item: any) => { | ||
87 | + let memberName = item.memberName; | ||
88 | + let memberPhone = item.memberPhone; | ||
89 | + return ( | ||
90 | + <Tag | ||
91 | + className="mt-1 mb-0" | ||
92 | + key={item.id} | ||
93 | + color="cyan" | ||
94 | + title={memberName + ' | ' + memberPhone} | ||
95 | + > | ||
96 | + {memberName} | ||
97 | + </Tag> | ||
98 | + ); | ||
99 | + }); | ||
100 | + return <div className="whitespace-normal">{tags}</div>; | ||
101 | + }; | ||
102 | + | ||
103 | + /** | ||
104 | + * 获取预存账号信息 | ||
105 | + * @param accountId | ||
106 | + */ | ||
107 | + const loadAccountInfo = async (accountId: any, phone: any) => { | ||
108 | + setAccountInfoLoading(true); | ||
109 | + let res = await postCanrdApiUserDetail({ | ||
110 | + data: { uid: accountId, phone: phone }, | ||
111 | + }); | ||
112 | + if (res && res.result === RESPONSE_CODE.SUCCESS && res.data !== null) { | ||
113 | + setAccountInfo(res.data); | ||
114 | + } else { | ||
115 | + setAccountInfo({ | ||
116 | + realName: '加载失败', | ||
117 | + phone: '加载失败', | ||
118 | + nowMoney: '加载失败', | ||
119 | + uid: '加载失败', | ||
120 | + }); | ||
121 | + } | ||
122 | + setAccountInfoLoading(false); | ||
123 | + }; | ||
124 | + | ||
125 | + const renderAccountsCell = (value: any) => { | ||
126 | + if (!value) { | ||
127 | + return <span></span>; | ||
128 | + } | ||
129 | + | ||
130 | + return ( | ||
131 | + <div className="whitespace-normal"> | ||
132 | + {value.map((item: any) => { | ||
133 | + let accountPhone = item.accountPhone; | ||
134 | + let accountName = item.accountName; | ||
135 | + let accountId = item.accountId; | ||
136 | + return ( | ||
137 | + <Popconfirm | ||
138 | + key={item.id} | ||
139 | + title="账号详情" | ||
140 | + description={ | ||
141 | + <div className="w-[170px]"> | ||
142 | + {accountInfoLoading ? ( | ||
143 | + <div> | ||
144 | + <Spin /> | ||
145 | + </div> | ||
146 | + ) : ( | ||
147 | + <div> | ||
148 | + <Row gutter={4}> | ||
149 | + <Col span={10}> | ||
150 | + <div>编号:</div> | ||
151 | + </Col> | ||
152 | + <Col span={14}> | ||
153 | + <div>{accountInfo.uid}</div> | ||
154 | + </Col> | ||
155 | + </Row> | ||
156 | + <Row gutter={4}> | ||
157 | + <Col span={10}> | ||
158 | + <div>名称:</div> | ||
159 | + </Col> | ||
160 | + <Col span={14}> | ||
161 | + <div>{accountInfo.realName}</div> | ||
162 | + </Col> | ||
163 | + </Row> | ||
164 | + <Row gutter={4}> | ||
165 | + <Col span={10}> | ||
166 | + <div>手机号:</div> | ||
167 | + </Col> | ||
168 | + <Col span={14}> | ||
169 | + <EllipsisDiv text={accountInfo.phone} /> | ||
170 | + </Col> | ||
171 | + </Row> | ||
172 | + <Row gutter={4}> | ||
173 | + <Col span={10}> | ||
174 | + <div>余额:</div> | ||
175 | + </Col> | ||
176 | + <Col span={14}> | ||
177 | + <div>{accountInfo.nowMoney}</div> | ||
178 | + </Col> | ||
179 | + </Row> | ||
180 | + </div> | ||
181 | + )} | ||
182 | + </div> | ||
183 | + } | ||
184 | + cancelButtonProps={{ | ||
185 | + hidden: true, | ||
186 | + }} | ||
187 | + okButtonProps={{ | ||
188 | + hidden: true, | ||
189 | + }} | ||
190 | + > | ||
191 | + <Tag | ||
192 | + className="mt-1 mb-0 hover:cursor-pointer" | ||
193 | + color="geekblue" | ||
194 | + title={accountName + ' | ' + accountPhone} | ||
195 | + onClick={() => { | ||
196 | + loadAccountInfo(accountId, accountPhone); | ||
197 | + }} | ||
198 | + > | ||
199 | + {accountName} | ||
200 | + </Tag> | ||
201 | + </Popconfirm> | ||
202 | + ); | ||
203 | + })} | ||
204 | + </div> | ||
205 | + ); | ||
206 | + }; | ||
207 | + | ||
208 | + /** | ||
209 | + * 删除课题组信息 | ||
210 | + * @param ids | ||
211 | + */ | ||
212 | + const doDeleteResearchGroup = async (ids: any[]) => { | ||
213 | + let res = await postResearchGroupsDelete({ | ||
214 | + data: { ids: ids }, | ||
215 | + }); | ||
216 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
217 | + message.success(res.message); | ||
218 | + reloadResearchGroupTable(); | ||
219 | + } | ||
220 | + }; | ||
221 | + | ||
222 | + /** | ||
223 | + * 删除课题组信息 | ||
224 | + * @param ids | ||
225 | + */ | ||
226 | + const doDeleteRequest = async (ids: any[]) => { | ||
227 | + let res = await postResearchGroupMemberRequestsDelete({ | ||
228 | + data: { ids: ids }, | ||
229 | + }); | ||
230 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
231 | + message.success(res.message); | ||
232 | + reloadMemberApplyTable(); | ||
233 | + } | ||
234 | + }; | ||
235 | + | ||
236 | + /** | ||
237 | + * 加载课题组列表表格的各个列格式 | ||
238 | + */ | ||
239 | + const researchGroupColumnsInit = () => { | ||
240 | + let columns = RESEARCH_GROUP_COLUMNS.map((item) => { | ||
241 | + let newItem = { ...item }; | ||
242 | + let dataIndex = item.dataIndex; | ||
243 | + | ||
244 | + newItem.render = (text, record, index) => { | ||
245 | + let textValue = record[dataIndex]; | ||
246 | + | ||
247 | + if (dataIndex.endsWith('Time')) { | ||
248 | + textValue = formatDateTime(textValue); | ||
249 | + } | ||
250 | + | ||
251 | + if (dataIndex === 'members') { | ||
252 | + return renderMembersCell(textValue); | ||
253 | + } | ||
254 | + | ||
255 | + if (dataIndex === 'accounts') { | ||
256 | + return renderAccountsCell(textValue); | ||
257 | + } | ||
258 | + | ||
259 | + if (dataIndex === 'index') { | ||
260 | + textValue = index + 1; | ||
261 | + } | ||
262 | + | ||
263 | + if ( | ||
264 | + dataIndex === 'proofImages' && | ||
265 | + textValue !== null && | ||
266 | + textValue !== undefined | ||
267 | + ) { | ||
268 | + return ( | ||
269 | + <Image.PreviewGroup | ||
270 | + className="mr-10" | ||
271 | + preview={{ | ||
272 | + onChange: (current, prev) => | ||
273 | + console.log(`current index: ${current}, prev index: ${prev}`), | ||
274 | + }} | ||
275 | + > | ||
276 | + {textValue.map((item, index) => ( | ||
277 | + <React.Fragment key={index}> | ||
278 | + {index > 0 ? <Divider type="vertical" /> : ''} | ||
279 | + <Image | ||
280 | + className="max-h-[35px] max-w-[45px]" | ||
281 | + src={item} | ||
282 | + title={item} | ||
283 | + />{' '} | ||
284 | + </React.Fragment> | ||
285 | + ))} | ||
286 | + </Image.PreviewGroup> | ||
287 | + ); | ||
288 | + } | ||
289 | + | ||
290 | + return <EllipsisDiv text={textValue} />; | ||
291 | + }; | ||
292 | + | ||
293 | + return newItem; | ||
294 | + }); | ||
295 | + | ||
296 | + columns.push({ | ||
297 | + title: '操作', | ||
298 | + valueType: 'option', | ||
299 | + key: 'option', | ||
300 | + fixed: 'right', | ||
301 | + width: 120, | ||
302 | + render: (text, record) => { | ||
303 | + let btns = []; | ||
304 | + if (perms?.includes('modify')) { | ||
305 | + btns.push( | ||
306 | + <Button | ||
307 | + className="p-0" | ||
308 | + key="modify" | ||
309 | + type="link" | ||
310 | + onClick={() => { | ||
311 | + setResearchGroupAddModalVisible(true); | ||
312 | + setOptRecordId(record?.id); | ||
313 | + }} | ||
314 | + > | ||
315 | + 编辑 | ||
316 | + </Button>, | ||
317 | + ); | ||
318 | + } | ||
319 | + | ||
320 | + if (perms?.includes('delete')) { | ||
321 | + btns.push( | ||
322 | + <ButtonConfirm | ||
323 | + key="delete" | ||
324 | + className="p-0" | ||
325 | + title={'确认删除这个课题组吗?'} | ||
326 | + text="删除" | ||
327 | + onConfirm={async () => { | ||
328 | + doDeleteResearchGroup([record.id]); | ||
329 | + }} | ||
330 | + />, | ||
331 | + ); | ||
332 | + } | ||
333 | + return btns; | ||
334 | + }, | ||
335 | + }); | ||
336 | + | ||
337 | + return columns; | ||
338 | + }; | ||
339 | + | ||
340 | + /** | ||
341 | + * 加载申请列表表格的各个列格式 | ||
342 | + */ | ||
343 | + const memberApplyColumnsInit = () => { | ||
344 | + let columns = RESEARCH_GROUP_MEMBER_REQUEST_COLUMNS.map((item) => { | ||
345 | + let newItem = { ...item }; | ||
346 | + let dataIndex = item.dataIndex; | ||
347 | + | ||
348 | + newItem.render = (text, record, index) => { | ||
349 | + let textValue = record[dataIndex]; | ||
350 | + | ||
351 | + if (dataIndex.endsWith('Time')) { | ||
352 | + textValue = formatDateTime(textValue); | ||
353 | + } | ||
354 | + | ||
355 | + if (dataIndex === 'members') { | ||
356 | + return renderMembersCell(textValue); | ||
357 | + } | ||
358 | + | ||
359 | + if (dataIndex === 'accounts') { | ||
360 | + return renderAccountsCell(textValue); | ||
361 | + } | ||
362 | + | ||
363 | + if (dataIndex === 'index') { | ||
364 | + textValue = index + 1; | ||
365 | + } | ||
366 | + | ||
367 | + if ( | ||
368 | + dataIndex === 'proofImages' && | ||
369 | + textValue !== null && | ||
370 | + textValue !== undefined | ||
371 | + ) { | ||
372 | + return ( | ||
373 | + <Image.PreviewGroup | ||
374 | + className="mr-10" | ||
375 | + preview={{ | ||
376 | + onChange: (current, prev) => | ||
377 | + console.log(`current index: ${current}, prev index: ${prev}`), | ||
378 | + }} | ||
379 | + > | ||
380 | + {textValue.map((item, index) => ( | ||
381 | + <React.Fragment key={index}> | ||
382 | + {index > 0 ? <Divider type="vertical" /> : ''} | ||
383 | + <Image | ||
384 | + className="max-h-[35px] max-w-[45px]" | ||
385 | + src={item} | ||
386 | + title={item} | ||
387 | + />{' '} | ||
388 | + </React.Fragment> | ||
389 | + ))} | ||
390 | + </Image.PreviewGroup> | ||
391 | + ); | ||
392 | + } | ||
393 | + | ||
394 | + return <EllipsisDiv text={textValue} />; | ||
395 | + }; | ||
396 | + | ||
397 | + return newItem; | ||
398 | + }); | ||
399 | + | ||
400 | + columns.push({ | ||
401 | + title: '操作', | ||
402 | + valueType: 'option', | ||
403 | + key: 'option', | ||
404 | + fixed: 'right', | ||
405 | + width: 120, | ||
406 | + render: (text, record) => { | ||
407 | + let btns = []; | ||
408 | + if (record.permissions?.includes('modify')) { | ||
409 | + btns.push( | ||
410 | + <Button | ||
411 | + className="p-0" | ||
412 | + key="modify" | ||
413 | + type="link" | ||
414 | + onClick={() => { | ||
415 | + setResearchGroupMemberRequestAddModalVisible(true); | ||
416 | + setOptRecordId(record?.id); | ||
417 | + }} | ||
418 | + > | ||
419 | + 编辑 | ||
420 | + </Button>, | ||
421 | + ); | ||
422 | + } | ||
423 | + | ||
424 | + if (record.permissions?.includes('delete')) { | ||
425 | + btns.push( | ||
426 | + <ButtonConfirm | ||
427 | + key="delete" | ||
428 | + className="p-0" | ||
429 | + title={'确认删除这个申请吗?'} | ||
430 | + text="删除" | ||
431 | + onConfirm={async () => { | ||
432 | + doDeleteRequest([record.id]); | ||
433 | + }} | ||
434 | + />, | ||
435 | + ); | ||
436 | + } | ||
437 | + | ||
438 | + if (record.permissions?.includes('audit')) { | ||
439 | + btns.push( | ||
440 | + <Button | ||
441 | + key="delete" | ||
442 | + className="p-0" | ||
443 | + type="link" | ||
444 | + onClick={async () => { | ||
445 | + setAuditIds([record.id]); | ||
446 | + setAuditModalVisible(true); | ||
447 | + }} | ||
448 | + > | ||
449 | + 审核 | ||
450 | + </Button>, | ||
451 | + ); | ||
452 | + } | ||
453 | + return btns; | ||
454 | + }, | ||
455 | + }); | ||
456 | + | ||
457 | + return columns; | ||
458 | + }; | ||
459 | + | ||
460 | + const tabsItems = [ | ||
461 | + { | ||
462 | + key: 1, | ||
463 | + label: '课题组列表', | ||
464 | + children: ( | ||
465 | + <ProTable | ||
466 | + columns={researchGroupColumnsInit()} | ||
467 | + actionRef={researchGroupActionRef} | ||
468 | + cardBordered | ||
469 | + pagination={{ | ||
470 | + pageSize: 10, | ||
471 | + }} | ||
472 | + request={async (params) => { | ||
473 | + const res = await postResearchGroupsList({ | ||
474 | + data: { ...params }, | ||
475 | + }); | ||
476 | + setPerms(res.data.specialPath); | ||
477 | + return { | ||
478 | + data: res?.data?.data || [], | ||
479 | + total: res?.data?.total || 0, | ||
480 | + }; | ||
481 | + }} | ||
482 | + columnsState={{ | ||
483 | + persistenceKey: 'pro-table-singe-research-group', | ||
484 | + persistenceType: 'localStorage', | ||
485 | + defaultValue: { | ||
486 | + option: { fixed: 'right', disable: true }, | ||
487 | + }, | ||
488 | + onChange(value) { | ||
489 | + console.log('value: ', value); | ||
490 | + }, | ||
491 | + }} | ||
492 | + rowKey="id" | ||
493 | + search={{ | ||
494 | + labelWidth: 'auto', | ||
495 | + }} | ||
496 | + options={{ | ||
497 | + setting: { | ||
498 | + listsHeight: 400, | ||
499 | + }, | ||
500 | + }} | ||
501 | + form={{}} | ||
502 | + dateFormatter="string" | ||
503 | + headerTitle="课题组列表" | ||
504 | + scroll={{ x: 1400 }} | ||
505 | + toolBarRender={() => { | ||
506 | + let btns = []; | ||
507 | + if (perms?.includes('add')) { | ||
508 | + btns.push( | ||
509 | + <Button | ||
510 | + key="button" | ||
511 | + icon={<PlusOutlined />} | ||
512 | + onClick={() => { | ||
513 | + setResearchGroupAddModalVisible(true); | ||
514 | + }} | ||
515 | + type="primary" | ||
516 | + > | ||
517 | + 新建 | ||
518 | + </Button>, | ||
519 | + ); | ||
520 | + } | ||
521 | + | ||
522 | + if (perms?.includes('import')) { | ||
523 | + btns.push( | ||
524 | + <Button | ||
525 | + key="button" | ||
526 | + icon={<PlusOutlined />} | ||
527 | + onClick={() => { | ||
528 | + setImportModalVisible(true); | ||
529 | + }} | ||
530 | + type="primary" | ||
531 | + > | ||
532 | + 批量导入 | ||
533 | + </Button>, | ||
534 | + ); | ||
535 | + } | ||
536 | + | ||
537 | + return btns; | ||
538 | + }} | ||
539 | + rowSelection={{ | ||
540 | + // 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom | ||
541 | + // 注释该行则默认不显示下拉选项 | ||
542 | + selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT], | ||
543 | + defaultSelectedRowKeys: [], | ||
544 | + }} | ||
545 | + tableAlertOptionRender={({ selectedRows, onCleanSelected }) => { | ||
546 | + let ids = selectedRows.map((item: any) => { | ||
547 | + return item.id; | ||
548 | + }); | ||
549 | + return ( | ||
550 | + <Space size={16}> | ||
551 | + <ButtonConfirm | ||
552 | + title="确认删除所选中的课题组信息吗?" | ||
553 | + text="批量删除" | ||
554 | + onConfirm={() => { | ||
555 | + doDeleteResearchGroup(ids); | ||
556 | + onCleanSelected(); | ||
557 | + }} | ||
558 | + /> | ||
559 | + | ||
560 | + <Button type="link" onClick={onCleanSelected}> | ||
561 | + 取消选中 | ||
562 | + </Button> | ||
563 | + </Space> | ||
564 | + ); | ||
565 | + }} | ||
566 | + /> | ||
567 | + ), | ||
568 | + }, | ||
569 | + { | ||
570 | + key: 2, | ||
571 | + label: '申请列表', | ||
572 | + children: ( | ||
573 | + <ProTable | ||
574 | + columns={memberApplyColumnsInit()} | ||
575 | + actionRef={memberApplyActionRef} | ||
576 | + cardBordered | ||
577 | + pagination={{ | ||
578 | + pageSize: 10, | ||
579 | + }} | ||
580 | + request={async (params) => { | ||
581 | + const res = await postResearchGroupMemberRequestsList({ | ||
582 | + data: { ...params }, | ||
583 | + }); | ||
584 | + setPerms(res.data.specialPath); | ||
585 | + return { | ||
586 | + data: res?.data?.data || [], | ||
587 | + total: res?.data?.total || 0, | ||
588 | + }; | ||
589 | + }} | ||
590 | + columnsState={{ | ||
591 | + persistenceKey: 'pro-table-singe-research-group', | ||
592 | + persistenceType: 'localStorage', | ||
593 | + defaultValue: { | ||
594 | + option: { fixed: 'right', disable: true }, | ||
595 | + }, | ||
596 | + onChange(value) { | ||
597 | + console.log('value: ', value); | ||
598 | + }, | ||
599 | + }} | ||
600 | + rowKey="id" | ||
601 | + search={{ | ||
602 | + labelWidth: 'auto', | ||
603 | + }} | ||
604 | + options={{ | ||
605 | + setting: { | ||
606 | + listsHeight: 400, | ||
607 | + }, | ||
608 | + }} | ||
609 | + form={{}} | ||
610 | + dateFormatter="string" | ||
611 | + headerTitle="申请列表" | ||
612 | + scroll={{ x: 1400 }} | ||
613 | + toolBarRender={() => { | ||
614 | + let btns = []; | ||
615 | + btns.push( | ||
616 | + <Button | ||
617 | + key="button" | ||
618 | + icon={<PlusOutlined />} | ||
619 | + onClick={() => { | ||
620 | + setResearchGroupMemberRequestAddModalVisible(true); | ||
621 | + }} | ||
622 | + type="primary" | ||
623 | + > | ||
624 | + 新建 | ||
625 | + </Button>, | ||
626 | + ); | ||
627 | + return btns; | ||
628 | + }} | ||
629 | + rowSelection={{ | ||
630 | + // 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom | ||
631 | + // 注释该行则默认不显示下拉选项 | ||
632 | + selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT], | ||
633 | + defaultSelectedRowKeys: [], | ||
634 | + }} | ||
635 | + tableAlertOptionRender={({ selectedRows, onCleanSelected }) => { | ||
636 | + let ids = selectedRows.map((item: any) => { | ||
637 | + return item.id; | ||
638 | + }); | ||
639 | + return ( | ||
640 | + <Space size={16}> | ||
641 | + <ButtonConfirm | ||
642 | + title="确认删除所选中的课题组信息吗?" | ||
643 | + text="批量删除" | ||
644 | + onConfirm={() => { | ||
645 | + doDeleteRequest(ids); | ||
646 | + onCleanSelected(); | ||
647 | + }} | ||
648 | + /> | ||
649 | + <Button | ||
650 | + key="delete" | ||
651 | + className="p-0" | ||
652 | + type="link" | ||
653 | + onClick={async () => { | ||
654 | + setAuditIds(ids); | ||
655 | + setAuditModalVisible(true); | ||
656 | + }} | ||
657 | + > | ||
658 | + 批量审核 | ||
659 | + </Button> | ||
660 | + <Button type="link" onClick={onCleanSelected}> | ||
661 | + 取消选中 | ||
662 | + </Button> | ||
663 | + </Space> | ||
664 | + ); | ||
665 | + }} | ||
666 | + /> | ||
667 | + ), | ||
668 | + }, | ||
669 | + ]; | ||
670 | + return ( | ||
671 | + <div className="research-group-index"> | ||
672 | + <Tabs | ||
673 | + defaultActiveKey="1" | ||
674 | + items={tabsItems} | ||
675 | + onChange={(value) => { | ||
676 | + if (value === 1) { | ||
677 | + reloadResearchGroupTable(); | ||
678 | + } else { | ||
679 | + reloadMemberApplyTable(); | ||
680 | + } | ||
681 | + }} | ||
682 | + /> | ||
683 | + | ||
684 | + {researchGroupAddModalVisible && ( | ||
685 | + <ResearchGroupAddModal | ||
686 | + setVisible={(val: boolean) => { | ||
687 | + setResearchGroupAddModalVisible(val); | ||
688 | + if (!val) { | ||
689 | + setOptRecordId(null); | ||
690 | + } | ||
691 | + }} | ||
692 | + researchGroupId={optRecordId} | ||
693 | + onClose={() => { | ||
694 | + setResearchGroupAddModalVisible(false); | ||
695 | + setOptRecordId(null); | ||
696 | + reloadResearchGroupTable(); | ||
697 | + }} | ||
698 | + /> | ||
699 | + )} | ||
700 | + | ||
701 | + {researchGroupMemberRequestAddModalVisible && ( | ||
702 | + <ResearchGroupMemberRequestAddModal | ||
703 | + setVisible={(val: boolean) => { | ||
704 | + setResearchGroupMemberRequestAddModalVisible(val); | ||
705 | + if (!val) { | ||
706 | + setOptRecordId(null); | ||
707 | + } | ||
708 | + }} | ||
709 | + requestId={optRecordId} | ||
710 | + onClose={() => { | ||
711 | + setResearchGroupMemberRequestAddModalVisible(false); | ||
712 | + setOptRecordId(null); | ||
713 | + reloadMemberApplyTable(); | ||
714 | + }} | ||
715 | + /> | ||
716 | + )} | ||
717 | + | ||
718 | + {auditModalVisible && ( | ||
719 | + <AuditModal | ||
720 | + setVisible={(val: boolean) => { | ||
721 | + setAuditModalVisible(val); | ||
722 | + if (!val) { | ||
723 | + setOptRecordId(null); | ||
724 | + } | ||
725 | + }} | ||
726 | + ids={auditIds} | ||
727 | + onClose={() => { | ||
728 | + setAuditModalVisible(false); | ||
729 | + setAuditIds([]); | ||
730 | + reloadMemberApplyTable(); | ||
731 | + }} | ||
732 | + /> | ||
733 | + )} | ||
734 | + | ||
735 | + {importModalVisible && ( | ||
736 | + <ImportModal | ||
737 | + onClose={() => { | ||
738 | + setImportModalVisible(false); | ||
739 | + reloadMemberApplyTable(); | ||
740 | + }} | ||
741 | + /> | ||
742 | + )} | ||
743 | + </div> | ||
744 | + ); | ||
745 | +}; | ||
746 | + | ||
747 | +export default PrepaidPage; |
src/services/definition.ts
@@ -86,6 +86,8 @@ export interface AdminAuthUserVO { | @@ -86,6 +86,8 @@ export interface AdminAuthUserVO { | ||
86 | export interface AdminDeptQueryVO { | 86 | export interface AdminDeptQueryVO { |
87 | /** @format int32 */ | 87 | /** @format int32 */ |
88 | current?: number; | 88 | current?: number; |
89 | + /** @format int32 */ | ||
90 | + end?: number; | ||
89 | /** @format int64 */ | 91 | /** @format int64 */ |
90 | id?: number; | 92 | id?: number; |
91 | ids?: Array<number>; | 93 | ids?: Array<number>; |
@@ -95,6 +97,8 @@ export interface AdminDeptQueryVO { | @@ -95,6 +97,8 @@ export interface AdminDeptQueryVO { | ||
95 | /** @format int64 */ | 97 | /** @format int64 */ |
96 | pid?: number; | 98 | pid?: number; |
97 | /** @format int32 */ | 99 | /** @format int32 */ |
100 | + start?: number; | ||
101 | + /** @format int32 */ | ||
98 | total?: number; | 102 | total?: number; |
99 | } | 103 | } |
100 | 104 | ||
@@ -109,6 +113,8 @@ export interface AdminDeptVO { | @@ -109,6 +113,8 @@ export interface AdminDeptVO { | ||
109 | export interface AdminJobQueryVO { | 113 | export interface AdminJobQueryVO { |
110 | /** @format int32 */ | 114 | /** @format int32 */ |
111 | current?: number; | 115 | current?: number; |
116 | + /** @format int32 */ | ||
117 | + end?: number; | ||
112 | /** @format int64 */ | 118 | /** @format int64 */ |
113 | id?: number; | 119 | id?: number; |
114 | ids?: Array<number>; | 120 | ids?: Array<number>; |
@@ -118,6 +124,8 @@ export interface AdminJobQueryVO { | @@ -118,6 +124,8 @@ export interface AdminJobQueryVO { | ||
118 | /** @format int32 */ | 124 | /** @format int32 */ |
119 | sort?: number; | 125 | sort?: number; |
120 | /** @format int32 */ | 126 | /** @format int32 */ |
127 | + start?: number; | ||
128 | + /** @format int32 */ | ||
121 | total?: number; | 129 | total?: number; |
122 | } | 130 | } |
123 | 131 | ||
@@ -136,6 +144,8 @@ export interface AdminMenuQueryVO { | @@ -136,6 +144,8 @@ export interface AdminMenuQueryVO { | ||
136 | /** @format int32 */ | 144 | /** @format int32 */ |
137 | current?: number; | 145 | current?: number; |
138 | /** @format int32 */ | 146 | /** @format int32 */ |
147 | + end?: number; | ||
148 | + /** @format int32 */ | ||
139 | hidden?: number; | 149 | hidden?: number; |
140 | icon?: string; | 150 | icon?: string; |
141 | /** @format int64 */ | 151 | /** @format int64 */ |
@@ -151,6 +161,8 @@ export interface AdminMenuQueryVO { | @@ -151,6 +161,8 @@ export interface AdminMenuQueryVO { | ||
151 | /** @format int64 */ | 161 | /** @format int64 */ |
152 | pid?: number; | 162 | pid?: number; |
153 | /** @format int32 */ | 163 | /** @format int32 */ |
164 | + start?: number; | ||
165 | + /** @format int32 */ | ||
154 | total?: number; | 166 | total?: number; |
155 | /** @format int32 */ | 167 | /** @format int32 */ |
156 | type?: number; | 168 | type?: number; |
@@ -181,6 +193,8 @@ export interface AdminRoleQueryVO { | @@ -181,6 +193,8 @@ export interface AdminRoleQueryVO { | ||
181 | /** @format int32 */ | 193 | /** @format int32 */ |
182 | current?: number; | 194 | current?: number; |
183 | dataScope?: string; | 195 | dataScope?: string; |
196 | + /** @format int32 */ | ||
197 | + end?: number; | ||
184 | /** @format int64 */ | 198 | /** @format int64 */ |
185 | id?: number; | 199 | id?: number; |
186 | ids?: Array<number>; | 200 | ids?: Array<number>; |
@@ -192,6 +206,8 @@ export interface AdminRoleQueryVO { | @@ -192,6 +206,8 @@ export interface AdminRoleQueryVO { | ||
192 | permission?: string; | 206 | permission?: string; |
193 | remark?: string; | 207 | remark?: string; |
194 | /** @format int32 */ | 208 | /** @format int32 */ |
209 | + start?: number; | ||
210 | + /** @format int32 */ | ||
195 | total?: number; | 211 | total?: number; |
196 | } | 212 | } |
197 | 213 | ||
@@ -209,22 +225,30 @@ export interface AdminUserLoginByPhoneVO { | @@ -209,22 +225,30 @@ export interface AdminUserLoginByPhoneVO { | ||
209 | /** @format int32 */ | 225 | /** @format int32 */ |
210 | current?: number; | 226 | current?: number; |
211 | /** @format int32 */ | 227 | /** @format int32 */ |
228 | + end?: number; | ||
229 | + /** @format int32 */ | ||
212 | pageSize?: number; | 230 | pageSize?: number; |
213 | phone?: string; | 231 | phone?: string; |
214 | smsCaptchaCode?: string; | 232 | smsCaptchaCode?: string; |
215 | /** @format int32 */ | 233 | /** @format int32 */ |
234 | + start?: number; | ||
235 | + /** @format int32 */ | ||
216 | total?: number; | 236 | total?: number; |
217 | } | 237 | } |
218 | 238 | ||
219 | export interface AdminUserLoginByPwdVO { | 239 | export interface AdminUserLoginByPwdVO { |
220 | /** @format int32 */ | 240 | /** @format int32 */ |
221 | current?: number; | 241 | current?: number; |
242 | + /** @format int32 */ | ||
243 | + end?: number; | ||
222 | imgCaptchaCode?: string; | 244 | imgCaptchaCode?: string; |
223 | imgCaptchaUuid?: string; | 245 | imgCaptchaUuid?: string; |
224 | /** @format int32 */ | 246 | /** @format int32 */ |
225 | pageSize?: number; | 247 | pageSize?: number; |
226 | password?: string; | 248 | password?: string; |
227 | /** @format int32 */ | 249 | /** @format int32 */ |
250 | + start?: number; | ||
251 | + /** @format int32 */ | ||
228 | total?: number; | 252 | total?: number; |
229 | userName?: string; | 253 | userName?: string; |
230 | } | 254 | } |
@@ -234,11 +258,15 @@ export interface AdminUserModifyPwdVO { | @@ -234,11 +258,15 @@ export interface AdminUserModifyPwdVO { | ||
234 | /** @format int32 */ | 258 | /** @format int32 */ |
235 | current?: number; | 259 | current?: number; |
236 | /** @format int32 */ | 260 | /** @format int32 */ |
261 | + end?: number; | ||
262 | + /** @format int32 */ | ||
237 | pageSize?: number; | 263 | pageSize?: number; |
238 | password?: string; | 264 | password?: string; |
239 | phone?: string; | 265 | phone?: string; |
240 | smsCaptchaCode?: string; | 266 | smsCaptchaCode?: string; |
241 | /** @format int32 */ | 267 | /** @format int32 */ |
268 | + start?: number; | ||
269 | + /** @format int32 */ | ||
242 | total?: number; | 270 | total?: number; |
243 | } | 271 | } |
244 | 272 | ||
@@ -246,8 +274,12 @@ export interface AdminUserPasswordRecoverEmailVO { | @@ -246,8 +274,12 @@ export interface AdminUserPasswordRecoverEmailVO { | ||
246 | /** @format int32 */ | 274 | /** @format int32 */ |
247 | current?: number; | 275 | current?: number; |
248 | /** @format int32 */ | 276 | /** @format int32 */ |
277 | + end?: number; | ||
278 | + /** @format int32 */ | ||
249 | pageSize?: number; | 279 | pageSize?: number; |
250 | /** @format int32 */ | 280 | /** @format int32 */ |
281 | + start?: number; | ||
282 | + /** @format int32 */ | ||
251 | total?: number; | 283 | total?: number; |
252 | userName?: string; | 284 | userName?: string; |
253 | } | 285 | } |
@@ -256,6 +288,8 @@ export interface AdminUserQueryVO { | @@ -256,6 +288,8 @@ export interface AdminUserQueryVO { | ||
256 | /** @format int32 */ | 288 | /** @format int32 */ |
257 | current?: number; | 289 | current?: number; |
258 | email?: string; | 290 | email?: string; |
291 | + /** @format int32 */ | ||
292 | + end?: number; | ||
259 | /** @format int64 */ | 293 | /** @format int64 */ |
260 | id?: number; | 294 | id?: number; |
261 | ids?: Array<number>; | 295 | ids?: Array<number>; |
@@ -266,6 +300,8 @@ export interface AdminUserQueryVO { | @@ -266,6 +300,8 @@ export interface AdminUserQueryVO { | ||
266 | phone?: string; | 300 | phone?: string; |
267 | sex?: string; | 301 | sex?: string; |
268 | /** @format int32 */ | 302 | /** @format int32 */ |
303 | + start?: number; | ||
304 | + /** @format int32 */ | ||
269 | total?: number; | 305 | total?: number; |
270 | userName?: string; | 306 | userName?: string; |
271 | workerType?: string; | 307 | workerType?: string; |
@@ -276,6 +312,8 @@ export interface AdminUserRegisterVO { | @@ -276,6 +312,8 @@ export interface AdminUserRegisterVO { | ||
276 | /** @format int32 */ | 312 | /** @format int32 */ |
277 | current?: number; | 313 | current?: number; |
278 | email?: string; | 314 | email?: string; |
315 | + /** @format int32 */ | ||
316 | + end?: number; | ||
279 | isAgreeAgreement?: boolean; | 317 | isAgreeAgreement?: boolean; |
280 | /** @format int32 */ | 318 | /** @format int32 */ |
281 | pageSize?: number; | 319 | pageSize?: number; |
@@ -285,6 +323,8 @@ export interface AdminUserRegisterVO { | @@ -285,6 +323,8 @@ export interface AdminUserRegisterVO { | ||
285 | safeQuestion?: string; | 323 | safeQuestion?: string; |
286 | smsCaptchaCode?: string; | 324 | smsCaptchaCode?: string; |
287 | /** @format int32 */ | 325 | /** @format int32 */ |
326 | + start?: number; | ||
327 | + /** @format int32 */ | ||
288 | total?: number; | 328 | total?: number; |
289 | userName?: string; | 329 | userName?: string; |
290 | } | 330 | } |
@@ -480,8 +520,12 @@ export interface ApiOrderCustomersRequest { | @@ -480,8 +520,12 @@ export interface ApiOrderCustomersRequest { | ||
480 | /** @format int32 */ | 520 | /** @format int32 */ |
481 | current?: number; | 521 | current?: number; |
482 | /** @format int32 */ | 522 | /** @format int32 */ |
523 | + end?: number; | ||
524 | + /** @format int32 */ | ||
483 | pageSize?: number; | 525 | pageSize?: number; |
484 | /** @format int32 */ | 526 | /** @format int32 */ |
527 | + start?: number; | ||
528 | + /** @format int32 */ | ||
485 | total?: number; | 529 | total?: number; |
486 | } | 530 | } |
487 | 531 | ||
@@ -552,11 +596,15 @@ export interface AuditDto { | @@ -552,11 +596,15 @@ export interface AuditDto { | ||
552 | export interface AuditVO { | 596 | export interface AuditVO { |
553 | /** @format int32 */ | 597 | /** @format int32 */ |
554 | current?: number; | 598 | current?: number; |
599 | + /** @format int32 */ | ||
600 | + end?: number; | ||
555 | /** @format int64 */ | 601 | /** @format int64 */ |
556 | id?: number; | 602 | id?: number; |
557 | /** @format int32 */ | 603 | /** @format int32 */ |
558 | pageSize?: number; | 604 | pageSize?: number; |
559 | /** @format int32 */ | 605 | /** @format int32 */ |
606 | + start?: number; | ||
607 | + /** @format int32 */ | ||
560 | status?: number; | 608 | status?: number; |
561 | /** @format int32 */ | 609 | /** @format int32 */ |
562 | total?: number; | 610 | total?: number; |
@@ -626,16 +674,32 @@ export interface CancelSendOrderDto { | @@ -626,16 +674,32 @@ export interface CancelSendOrderDto { | ||
626 | export interface CaptchaMessageVO { | 674 | export interface CaptchaMessageVO { |
627 | /** @format int32 */ | 675 | /** @format int32 */ |
628 | current?: number; | 676 | current?: number; |
677 | + /** @format int32 */ | ||
678 | + end?: number; | ||
629 | imgCaptchaCode?: string; | 679 | imgCaptchaCode?: string; |
630 | imgCaptchaUuid?: string; | 680 | imgCaptchaUuid?: string; |
631 | /** @format int32 */ | 681 | /** @format int32 */ |
632 | pageSize?: number; | 682 | pageSize?: number; |
633 | phone?: string; | 683 | phone?: string; |
634 | /** @format int32 */ | 684 | /** @format int32 */ |
685 | + start?: number; | ||
686 | + /** @format int32 */ | ||
635 | total?: number; | 687 | total?: number; |
636 | type?: string; | 688 | type?: string; |
637 | } | 689 | } |
638 | 690 | ||
691 | +export interface CommonAuditRequest { | ||
692 | + extend?: any; | ||
693 | + /** | ||
694 | + * @description | ||
695 | + * id集合 | ||
696 | + */ | ||
697 | + ids?: Array<string>; | ||
698 | + notes?: string; | ||
699 | + pass?: boolean; | ||
700 | + type?: string; | ||
701 | +} | ||
702 | + | ||
639 | export interface Contactperson { | 703 | export interface Contactperson { |
640 | birthday?: string; | 704 | birthday?: string; |
641 | contactAddress?: string; | 705 | contactAddress?: string; |
@@ -823,6 +887,8 @@ export interface DictionaryQueryVO { | @@ -823,6 +887,8 @@ export interface DictionaryQueryVO { | ||
823 | dictCode?: string; | 887 | dictCode?: string; |
824 | dictName?: string; | 888 | dictName?: string; |
825 | dictValue?: string; | 889 | dictValue?: string; |
890 | + /** @format int32 */ | ||
891 | + end?: number; | ||
826 | /** @format int64 */ | 892 | /** @format int64 */ |
827 | id?: number; | 893 | id?: number; |
828 | ids?: Array<number>; | 894 | ids?: Array<number>; |
@@ -832,6 +898,8 @@ export interface DictionaryQueryVO { | @@ -832,6 +898,8 @@ export interface DictionaryQueryVO { | ||
832 | /** @format int32 */ | 898 | /** @format int32 */ |
833 | sort?: number; | 899 | sort?: number; |
834 | /** @format int32 */ | 900 | /** @format int32 */ |
901 | + start?: number; | ||
902 | + /** @format int32 */ | ||
835 | total?: number; | 903 | total?: number; |
836 | } | 904 | } |
837 | 905 | ||
@@ -882,6 +950,8 @@ export interface FilePathDto { | @@ -882,6 +950,8 @@ export interface FilePathDto { | ||
882 | url?: string; | 950 | url?: string; |
883 | } | 951 | } |
884 | 952 | ||
953 | +export type InputStream = any; | ||
954 | + | ||
885 | export interface InventoryMaterialStockReq { | 955 | export interface InventoryMaterialStockReq { |
886 | auxPropId?: string; | 956 | auxPropId?: string; |
887 | isShowStockPosition?: boolean; | 957 | isShowStockPosition?: boolean; |
@@ -1132,10 +1202,14 @@ export interface MeasureUnitListResRow { | @@ -1132,10 +1202,14 @@ export interface MeasureUnitListResRow { | ||
1132 | export interface MessageQueryDTO { | 1202 | export interface MessageQueryDTO { |
1133 | /** @format int32 */ | 1203 | /** @format int32 */ |
1134 | current?: number; | 1204 | current?: number; |
1205 | + /** @format int32 */ | ||
1206 | + end?: number; | ||
1135 | isReaded?: string; | 1207 | isReaded?: string; |
1136 | /** @format int32 */ | 1208 | /** @format int32 */ |
1137 | pageSize?: number; | 1209 | pageSize?: number; |
1138 | /** @format int32 */ | 1210 | /** @format int32 */ |
1211 | + start?: number; | ||
1212 | + /** @format int32 */ | ||
1139 | total?: number; | 1213 | total?: number; |
1140 | username?: string; | 1214 | username?: string; |
1141 | } | 1215 | } |
@@ -1171,6 +1245,8 @@ export interface OrderAuditLogQueryVO { | @@ -1171,6 +1245,8 @@ export interface OrderAuditLogQueryVO { | ||
1171 | applyId?: number; | 1245 | applyId?: number; |
1172 | /** @format int32 */ | 1246 | /** @format int32 */ |
1173 | current?: number; | 1247 | current?: number; |
1248 | + /** @format int32 */ | ||
1249 | + end?: number; | ||
1174 | /** @format int64 */ | 1250 | /** @format int64 */ |
1175 | id?: number; | 1251 | id?: number; |
1176 | ids?: Array<number>; | 1252 | ids?: Array<number>; |
@@ -1180,6 +1256,8 @@ export interface OrderAuditLogQueryVO { | @@ -1180,6 +1256,8 @@ export interface OrderAuditLogQueryVO { | ||
1180 | /** @format int32 */ | 1256 | /** @format int32 */ |
1181 | pageSize?: number; | 1257 | pageSize?: number; |
1182 | /** @format int32 */ | 1258 | /** @format int32 */ |
1259 | + start?: number; | ||
1260 | + /** @format int32 */ | ||
1183 | total?: number; | 1261 | total?: number; |
1184 | } | 1262 | } |
1185 | 1263 | ||
@@ -1214,6 +1292,8 @@ export interface OrderBaseInfoQueryVO { | @@ -1214,6 +1292,8 @@ export interface OrderBaseInfoQueryVO { | ||
1214 | customerCode?: string; | 1292 | customerCode?: string; |
1215 | customerPo?: string; | 1293 | customerPo?: string; |
1216 | customerStyle?: string; | 1294 | customerStyle?: string; |
1295 | + /** @format int32 */ | ||
1296 | + end?: number; | ||
1217 | /** @format int64 */ | 1297 | /** @format int64 */ |
1218 | id?: number; | 1298 | id?: number; |
1219 | ids?: Array<number>; | 1299 | ids?: Array<number>; |
@@ -1235,6 +1315,8 @@ export interface OrderBaseInfoQueryVO { | @@ -1235,6 +1315,8 @@ export interface OrderBaseInfoQueryVO { | ||
1235 | productionDepartmentConsignTime?: string; | 1315 | productionDepartmentConsignTime?: string; |
1236 | projectNo?: string; | 1316 | projectNo?: string; |
1237 | /** @format int32 */ | 1317 | /** @format int32 */ |
1318 | + start?: number; | ||
1319 | + /** @format int32 */ | ||
1238 | total?: number; | 1320 | total?: number; |
1239 | } | 1321 | } |
1240 | 1322 | ||
@@ -1295,6 +1377,8 @@ export interface OrderFieldLockApplyQueryVO { | @@ -1295,6 +1377,8 @@ export interface OrderFieldLockApplyQueryVO { | ||
1295 | auditUserId?: number; | 1377 | auditUserId?: number; |
1296 | /** @format int32 */ | 1378 | /** @format int32 */ |
1297 | current?: number; | 1379 | current?: number; |
1380 | + /** @format int32 */ | ||
1381 | + end?: number; | ||
1298 | fields?: string; | 1382 | fields?: string; |
1299 | /** @format int64 */ | 1383 | /** @format int64 */ |
1300 | id?: number; | 1384 | id?: number; |
@@ -1304,6 +1388,8 @@ export interface OrderFieldLockApplyQueryVO { | @@ -1304,6 +1388,8 @@ export interface OrderFieldLockApplyQueryVO { | ||
1304 | /** @format int32 */ | 1388 | /** @format int32 */ |
1305 | pageSize?: number; | 1389 | pageSize?: number; |
1306 | /** @format int32 */ | 1390 | /** @format int32 */ |
1391 | + start?: number; | ||
1392 | + /** @format int32 */ | ||
1307 | status?: number; | 1393 | status?: number; |
1308 | statusList?: Array<number>; | 1394 | statusList?: Array<number>; |
1309 | /** @format int32 */ | 1395 | /** @format int32 */ |
@@ -1352,6 +1438,8 @@ export interface OrderInspectionStageVO { | @@ -1352,6 +1438,8 @@ export interface OrderInspectionStageVO { | ||
1352 | export interface OrderOptLogQueryVO { | 1438 | export interface OrderOptLogQueryVO { |
1353 | /** @format int32 */ | 1439 | /** @format int32 */ |
1354 | current?: number; | 1440 | current?: number; |
1441 | + /** @format int32 */ | ||
1442 | + end?: number; | ||
1355 | /** @format int64 */ | 1443 | /** @format int64 */ |
1356 | id?: number; | 1444 | id?: number; |
1357 | ids?: Array<number>; | 1445 | ids?: Array<number>; |
@@ -1360,6 +1448,8 @@ export interface OrderOptLogQueryVO { | @@ -1360,6 +1448,8 @@ export interface OrderOptLogQueryVO { | ||
1360 | /** @format int32 */ | 1448 | /** @format int32 */ |
1361 | pageSize?: number; | 1449 | pageSize?: number; |
1362 | /** @format int32 */ | 1450 | /** @format int32 */ |
1451 | + start?: number; | ||
1452 | + /** @format int32 */ | ||
1363 | total?: number; | 1453 | total?: number; |
1364 | } | 1454 | } |
1365 | 1455 | ||
@@ -1409,6 +1499,93 @@ export interface OrderProfitAnalysisVo { | @@ -1409,6 +1499,93 @@ export interface OrderProfitAnalysisVo { | ||
1409 | orderIds?: Array<number>; | 1499 | orderIds?: Array<number>; |
1410 | } | 1500 | } |
1411 | 1501 | ||
1502 | +export interface OrderStageFileDo { | ||
1503 | + file?: File; | ||
1504 | +} | ||
1505 | + | ||
1506 | +export interface OrderStagesDelDo { | ||
1507 | + deviceIds?: Array<number>; | ||
1508 | + ids?: Array<number>; | ||
1509 | +} | ||
1510 | + | ||
1511 | +export interface OrderStagesDeviceDo { | ||
1512 | + /** @format int32 */ | ||
1513 | + count?: number; | ||
1514 | + createByName?: string; | ||
1515 | + /** @format date-time */ | ||
1516 | + createTime?: string; | ||
1517 | + deviceModel?: string; | ||
1518 | + deviceName?: string; | ||
1519 | + /** @format int32 */ | ||
1520 | + did?: number; | ||
1521 | + logicDelete?: boolean; | ||
1522 | + /** @format double */ | ||
1523 | + price?: number; | ||
1524 | + /** @format double */ | ||
1525 | + unitPrice?: number; | ||
1526 | + updateByName?: string; | ||
1527 | + /** @format date-time */ | ||
1528 | + updateTime?: string; | ||
1529 | +} | ||
1530 | + | ||
1531 | +export interface OrderStagesFromDo { | ||
1532 | + annex?: string; | ||
1533 | + contract?: string; | ||
1534 | + createByName?: string; | ||
1535 | + /** @format date-time */ | ||
1536 | + createTime?: string; | ||
1537 | + /** @format date-time */ | ||
1538 | + dateRange?: string; | ||
1539 | + /** @format int32 */ | ||
1540 | + id?: number; | ||
1541 | + logicDelete?: boolean; | ||
1542 | + orderStagesDeviceDoList?: Array<OrderStagesDeviceDo>; | ||
1543 | + payWay?: string; | ||
1544 | + remark?: string; | ||
1545 | + terminal?: string; | ||
1546 | + /** @format double */ | ||
1547 | + totalPrice?: number; | ||
1548 | + updateByName?: string; | ||
1549 | + /** @format date-time */ | ||
1550 | + updateTime?: string; | ||
1551 | + vendor?: string; | ||
1552 | + /** @format int32 */ | ||
1553 | + version?: number; | ||
1554 | +} | ||
1555 | + | ||
1556 | +export interface OrderStagesPayWay { | ||
1557 | + /** @format date-time */ | ||
1558 | + dateRange?: string; | ||
1559 | + fileName?: string; | ||
1560 | + fileUrl?: string; | ||
1561 | + /** @format int32 */ | ||
1562 | + id?: number; | ||
1563 | + /** @format int32 */ | ||
1564 | + number?: number; | ||
1565 | + /** @format int32 */ | ||
1566 | + ossId?: number; | ||
1567 | +} | ||
1568 | + | ||
1569 | +export interface OrderStagesPayWayDo { | ||
1570 | + /** @format int32 */ | ||
1571 | + ossId?: number; | ||
1572 | +} | ||
1573 | + | ||
1574 | +export interface OrderStagesPayWayFileDo { | ||
1575 | + fileList?: Array<OrderStageFileDo>; | ||
1576 | +} | ||
1577 | + | ||
1578 | +export interface OrderStagesSelDo { | ||
1579 | + contract?: string; | ||
1580 | + /** @format date-time */ | ||
1581 | + dateRange?: string; | ||
1582 | + deviceName?: string; | ||
1583 | + /** @format int64 */ | ||
1584 | + id?: number; | ||
1585 | + terminal?: string; | ||
1586 | + vendor?: string; | ||
1587 | +} | ||
1588 | + | ||
1412 | export interface OrderTrackStageFieldVO { | 1589 | export interface OrderTrackStageFieldVO { |
1413 | aitexTestFinishResult?: string; | 1590 | aitexTestFinishResult?: string; |
1414 | aitexTestSendTime?: string; | 1591 | aitexTestSendTime?: string; |
@@ -1558,6 +1735,8 @@ export interface QueryBankStatementDto { | @@ -1558,6 +1735,8 @@ export interface QueryBankStatementDto { | ||
1558 | collectionDatetimeEnd?: string; | 1735 | collectionDatetimeEnd?: string; |
1559 | /** @format int32 */ | 1736 | /** @format int32 */ |
1560 | current?: number; | 1737 | current?: number; |
1738 | + /** @format int32 */ | ||
1739 | + end?: number; | ||
1561 | /** @format int64 */ | 1740 | /** @format int64 */ |
1562 | id?: number; | 1741 | id?: number; |
1563 | /** @format int32 */ | 1742 | /** @format int32 */ |
@@ -1579,6 +1758,8 @@ export interface QueryBankStatementDto { | @@ -1579,6 +1758,8 @@ export interface QueryBankStatementDto { | ||
1579 | remark?: string; | 1758 | remark?: string; |
1580 | remarkNote?: string; | 1759 | remarkNote?: string; |
1581 | serialNumber?: string; | 1760 | serialNumber?: string; |
1761 | + /** @format int32 */ | ||
1762 | + start?: number; | ||
1582 | status?: string; | 1763 | status?: string; |
1583 | /** @format int32 */ | 1764 | /** @format int32 */ |
1584 | total?: number; | 1765 | total?: number; |
@@ -1668,11 +1849,341 @@ export interface ReissueInvoiceDto { | @@ -1668,11 +1849,341 @@ export interface ReissueInvoiceDto { | ||
1668 | notes?: string; | 1849 | notes?: string; |
1669 | } | 1850 | } |
1670 | 1851 | ||
1852 | +export interface ResearchGroupAccountAddRequest { | ||
1853 | + /** | ||
1854 | + * @description | ||
1855 | + * 关联的账号id | ||
1856 | + * @format int64 | ||
1857 | + */ | ||
1858 | + accountId?: number; | ||
1859 | + /** | ||
1860 | + * @description | ||
1861 | + * 关联的账号名称 | ||
1862 | + */ | ||
1863 | + accountName?: string; | ||
1864 | + /** | ||
1865 | + * @description | ||
1866 | + * 关联的账号手机号 | ||
1867 | + */ | ||
1868 | + accountPhone?: string; | ||
1869 | + /** | ||
1870 | + * @description | ||
1871 | + * 课题组id | ||
1872 | + * @format int64 | ||
1873 | + */ | ||
1874 | + groupId?: number; | ||
1875 | +} | ||
1876 | + | ||
1877 | +export interface ResearchGroupAccountEditRequest { | ||
1878 | + /** | ||
1879 | + * @description | ||
1880 | + * 关联的账号id | ||
1881 | + * @format int64 | ||
1882 | + */ | ||
1883 | + accountId?: number; | ||
1884 | + /** | ||
1885 | + * @description | ||
1886 | + * 关联的账号名称 | ||
1887 | + */ | ||
1888 | + accountName?: string; | ||
1889 | + /** | ||
1890 | + * @description | ||
1891 | + * 关联的账号手机号 | ||
1892 | + */ | ||
1893 | + accountPhone?: string; | ||
1894 | + /** | ||
1895 | + * @description | ||
1896 | + * 课题组id | ||
1897 | + * @format int64 | ||
1898 | + */ | ||
1899 | + groupId?: number; | ||
1900 | + /** | ||
1901 | + * @description | ||
1902 | + * 主键id | ||
1903 | + * @format int64 | ||
1904 | + */ | ||
1905 | + id?: number; | ||
1906 | +} | ||
1907 | + | ||
1908 | +export interface ResearchGroupAddRequest { | ||
1909 | + accounts?: Array<ResearchGroupAccountAddRequest>; | ||
1910 | + /** | ||
1911 | + * @description | ||
1912 | + * 课题组名称 | ||
1913 | + */ | ||
1914 | + group?: string; | ||
1915 | + /** | ||
1916 | + * @description | ||
1917 | + * 课题组负责人 | ||
1918 | + */ | ||
1919 | + leader?: string; | ||
1920 | + members?: Array<ResearchGroupMemberAddRequest>; | ||
1921 | +} | ||
1922 | + | ||
1923 | +export interface ResearchGroupDeleteRequest { | ||
1924 | + /** | ||
1925 | + * @description | ||
1926 | + * 主键id | ||
1927 | + */ | ||
1928 | + ids?: Array<number>; | ||
1929 | +} | ||
1930 | + | ||
1931 | +export interface ResearchGroupDetailRequest { | ||
1932 | + /** | ||
1933 | + * @description | ||
1934 | + * 主键id | ||
1935 | + * @format int64 | ||
1936 | + */ | ||
1937 | + id?: number; | ||
1938 | +} | ||
1939 | + | ||
1940 | +export interface ResearchGroupEditRequest { | ||
1941 | + /** | ||
1942 | + * @description | ||
1943 | + * 课题组预存账号 | ||
1944 | + */ | ||
1945 | + accounts?: Array<ResearchGroupAccountEditRequest>; | ||
1946 | + /** | ||
1947 | + * @description | ||
1948 | + * 课题组名称 | ||
1949 | + */ | ||
1950 | + group?: string; | ||
1951 | + /** | ||
1952 | + * @description | ||
1953 | + * 主键id | ||
1954 | + * @format int64 | ||
1955 | + */ | ||
1956 | + id?: number; | ||
1957 | + /** | ||
1958 | + * @description | ||
1959 | + * 课题组负责人 | ||
1960 | + */ | ||
1961 | + leader?: string; | ||
1962 | + /** | ||
1963 | + * @description | ||
1964 | + * 课题组成员集合 | ||
1965 | + */ | ||
1966 | + members?: Array<ResearchGroupMemberEditRequest>; | ||
1967 | +} | ||
1968 | + | ||
1969 | +export interface ResearchGroupListRequest { | ||
1970 | + /** | ||
1971 | + * @description | ||
1972 | + * 预存账号手机号 | ||
1973 | + */ | ||
1974 | + accountPhone?: string; | ||
1975 | + /** @format int32 */ | ||
1976 | + current?: number; | ||
1977 | + /** @format int32 */ | ||
1978 | + end?: number; | ||
1979 | + /** | ||
1980 | + * @description | ||
1981 | + * 课题组名称 | ||
1982 | + */ | ||
1983 | + groupName?: string; | ||
1984 | + /** | ||
1985 | + * @description | ||
1986 | + * 课题组负责人 | ||
1987 | + */ | ||
1988 | + leaderName?: string; | ||
1989 | + /** | ||
1990 | + * @description | ||
1991 | + * 课题组成员名称 | ||
1992 | + */ | ||
1993 | + memberName?: string; | ||
1994 | + /** | ||
1995 | + * @description | ||
1996 | + * 课题组成员手机号 | ||
1997 | + */ | ||
1998 | + memberPhone?: string; | ||
1999 | + /** @format int32 */ | ||
2000 | + pageSize?: number; | ||
2001 | + /** @format int32 */ | ||
2002 | + start?: number; | ||
2003 | + /** @format int32 */ | ||
2004 | + total?: number; | ||
2005 | +} | ||
2006 | + | ||
2007 | +export interface ResearchGroupMemberAddRequest { | ||
2008 | + /** | ||
2009 | + * @description | ||
2010 | + * 课题组ID | ||
2011 | + * @format int64 | ||
2012 | + */ | ||
2013 | + groupId?: number; | ||
2014 | + /** | ||
2015 | + * @description | ||
2016 | + * 成员名称 | ||
2017 | + */ | ||
2018 | + memberName?: string; | ||
2019 | + /** | ||
2020 | + * @description | ||
2021 | + * 成员手机号 | ||
2022 | + */ | ||
2023 | + memberPhone?: string; | ||
2024 | +} | ||
2025 | + | ||
2026 | +export interface ResearchGroupMemberEditRequest { | ||
2027 | + /** | ||
2028 | + * @description | ||
2029 | + * 课题组ID | ||
2030 | + * @format int64 | ||
2031 | + */ | ||
2032 | + groupId?: number; | ||
2033 | + /** | ||
2034 | + * @description | ||
2035 | + * 主键id | ||
2036 | + * @format int64 | ||
2037 | + */ | ||
2038 | + id?: number; | ||
2039 | + /** | ||
2040 | + * @description | ||
2041 | + * 成员名称 | ||
2042 | + */ | ||
2043 | + memberName?: string; | ||
2044 | + /** | ||
2045 | + * @description | ||
2046 | + * 成员手机号 | ||
2047 | + */ | ||
2048 | + memberPhone?: string; | ||
2049 | +} | ||
2050 | + | ||
2051 | +export interface ResearchGroupMemberRequestAddRequest { | ||
2052 | + /** | ||
2053 | + * @description | ||
2054 | + * 课题组ID | ||
2055 | + * @format int64 | ||
2056 | + */ | ||
2057 | + groupId?: number; | ||
2058 | + /** | ||
2059 | + * @description | ||
2060 | + * 课题组名称 | ||
2061 | + */ | ||
2062 | + groupName?: string; | ||
2063 | + members?: Array<ResearchGroupMemberAddRequest>; | ||
2064 | + /** | ||
2065 | + * @description | ||
2066 | + * 申请备注 | ||
2067 | + */ | ||
2068 | + requestNotes?: string; | ||
2069 | +} | ||
2070 | + | ||
2071 | +export interface ResearchGroupMemberRequestDeleteRequest { | ||
2072 | + /** | ||
2073 | + * @description | ||
2074 | + * 主键id | ||
2075 | + */ | ||
2076 | + ids?: Array<number>; | ||
2077 | +} | ||
2078 | + | ||
2079 | +export interface ResearchGroupMemberRequestDetailRequest { | ||
2080 | + /** | ||
2081 | + * @description | ||
2082 | + * 主键id | ||
2083 | + * @format int64 | ||
2084 | + */ | ||
2085 | + id?: number; | ||
2086 | +} | ||
2087 | + | ||
2088 | +export interface ResearchGroupMemberRequestEditRequest { | ||
2089 | + /** | ||
2090 | + * @description | ||
2091 | + * 课题组ID | ||
2092 | + * @format int64 | ||
2093 | + */ | ||
2094 | + groupId?: number; | ||
2095 | + /** | ||
2096 | + * @description | ||
2097 | + * 课题组名称 | ||
2098 | + */ | ||
2099 | + groupName?: string; | ||
2100 | + /** | ||
2101 | + * @description | ||
2102 | + * 主键id | ||
2103 | + * @format int64 | ||
2104 | + */ | ||
2105 | + id?: number; | ||
2106 | + /** | ||
2107 | + * @description | ||
2108 | + * 成员名称 | ||
2109 | + */ | ||
2110 | + memberName?: string; | ||
2111 | + /** | ||
2112 | + * @description | ||
2113 | + * 成员手机号 | ||
2114 | + */ | ||
2115 | + memberPhone?: string; | ||
2116 | + /** | ||
2117 | + * @description | ||
2118 | + * 申请备注 | ||
2119 | + */ | ||
2120 | + requestNotes?: string; | ||
2121 | +} | ||
2122 | + | ||
2123 | +export interface ResearchGroupMemberRequestsRequest { | ||
2124 | + /** | ||
2125 | + * @description | ||
2126 | + * 审核备注 | ||
2127 | + */ | ||
2128 | + auditNotes?: string; | ||
2129 | + /** | ||
2130 | + * @description | ||
2131 | + * 审核状态 | ||
2132 | + */ | ||
2133 | + auditStatus?: string; | ||
2134 | + /** | ||
2135 | + * @description | ||
2136 | + * 创建人 | ||
2137 | + */ | ||
2138 | + createByName?: string; | ||
2139 | + /** @format int32 */ | ||
2140 | + current?: number; | ||
2141 | + /** @format int32 */ | ||
2142 | + end?: number; | ||
2143 | + /** | ||
2144 | + * @description | ||
2145 | + * 课题组名称 | ||
2146 | + */ | ||
2147 | + groupName?: string; | ||
2148 | + /** | ||
2149 | + * @description | ||
2150 | + * 成员名称 | ||
2151 | + */ | ||
2152 | + memberName?: string; | ||
2153 | + /** | ||
2154 | + * @description | ||
2155 | + * 成员手机号 | ||
2156 | + */ | ||
2157 | + memberPhone?: string; | ||
2158 | + /** @format int32 */ | ||
2159 | + pageSize?: number; | ||
2160 | + /** | ||
2161 | + * @description | ||
2162 | + * 申请备注 | ||
2163 | + */ | ||
2164 | + requestNotes?: string; | ||
2165 | + /** @format int32 */ | ||
2166 | + start?: number; | ||
2167 | + /** @format int32 */ | ||
2168 | + total?: number; | ||
2169 | +} | ||
2170 | + | ||
1671 | export interface ResetPwdVO { | 2171 | export interface ResetPwdVO { |
1672 | /** @format int64 */ | 2172 | /** @format int64 */ |
1673 | userId?: number; | 2173 | userId?: number; |
1674 | } | 2174 | } |
1675 | 2175 | ||
2176 | +export interface Resource { | ||
2177 | + description?: string; | ||
2178 | + file?: TsgFile; | ||
2179 | + filename?: string; | ||
2180 | + inputStream?: InputStream; | ||
2181 | + open?: boolean; | ||
2182 | + readable?: boolean; | ||
2183 | + uri?: URI; | ||
2184 | + url?: TsgURL; | ||
2185 | +} | ||
2186 | + | ||
1676 | export interface SalOrderSaveDto { | 2187 | export interface SalOrderSaveDto { |
1677 | id?: string; | 2188 | id?: string; |
1678 | } | 2189 | } |
@@ -1702,6 +2213,8 @@ export interface SysLogQueryVO { | @@ -1702,6 +2213,8 @@ export interface SysLogQueryVO { | ||
1702 | /** @format int32 */ | 2213 | /** @format int32 */ |
1703 | current?: number; | 2214 | current?: number; |
1704 | description?: string; | 2215 | description?: string; |
2216 | + /** @format int32 */ | ||
2217 | + end?: number; | ||
1705 | exceptionDetail?: string; | 2218 | exceptionDetail?: string; |
1706 | /** @format int64 */ | 2219 | /** @format int64 */ |
1707 | id?: number; | 2220 | id?: number; |
@@ -1712,6 +2225,8 @@ export interface SysLogQueryVO { | @@ -1712,6 +2225,8 @@ export interface SysLogQueryVO { | ||
1712 | pageSize?: number; | 2225 | pageSize?: number; |
1713 | params?: string; | 2226 | params?: string; |
1714 | requestIp?: string; | 2227 | requestIp?: string; |
2228 | + /** @format int32 */ | ||
2229 | + start?: number; | ||
1715 | /** @format int64 */ | 2230 | /** @format int64 */ |
1716 | time?: number; | 2231 | time?: number; |
1717 | /** @format int32 */ | 2232 | /** @format int32 */ |
@@ -1734,6 +2249,29 @@ export interface TokenApiDto { | @@ -1734,6 +2249,29 @@ export interface TokenApiDto { | ||
1734 | username?: string; | 2249 | username?: string; |
1735 | } | 2250 | } |
1736 | 2251 | ||
2252 | +export interface URI { | ||
2253 | + absolute?: boolean; | ||
2254 | + authority?: string; | ||
2255 | + fragment?: string; | ||
2256 | + host?: string; | ||
2257 | + opaque?: boolean; | ||
2258 | + path?: string; | ||
2259 | + /** @format int32 */ | ||
2260 | + port?: number; | ||
2261 | + query?: string; | ||
2262 | + rawAuthority?: string; | ||
2263 | + rawFragment?: string; | ||
2264 | + rawPath?: string; | ||
2265 | + rawQuery?: string; | ||
2266 | + rawSchemeSpecificPart?: string; | ||
2267 | + rawUserInfo?: string; | ||
2268 | + scheme?: string; | ||
2269 | + schemeSpecificPart?: string; | ||
2270 | + userInfo?: string; | ||
2271 | +} | ||
2272 | + | ||
2273 | +export type URLStreamHandler = any; | ||
2274 | + | ||
1737 | export interface Unit { | 2275 | export interface Unit { |
1738 | /** @format float */ | 2276 | /** @format float */ |
1739 | coefficient?: number; | 2277 | coefficient?: number; |
@@ -1852,8 +2390,12 @@ export interface UserCenterInfoRequest { | @@ -1852,8 +2390,12 @@ export interface UserCenterInfoRequest { | ||
1852 | /** @format int32 */ | 2390 | /** @format int32 */ |
1853 | current?: number; | 2391 | current?: number; |
1854 | /** @format int32 */ | 2392 | /** @format int32 */ |
2393 | + end?: number; | ||
2394 | + /** @format int32 */ | ||
1855 | pageSize?: number; | 2395 | pageSize?: number; |
1856 | /** @format int32 */ | 2396 | /** @format int32 */ |
2397 | + start?: number; | ||
2398 | + /** @format int32 */ | ||
1857 | total?: number; | 2399 | total?: number; |
1858 | /** | 2400 | /** |
1859 | * @description | 2401 | * @description |
@@ -1873,6 +2415,8 @@ export interface UserDetailRequest { | @@ -1873,6 +2415,8 @@ export interface UserDetailRequest { | ||
1873 | /** @format int32 */ | 2415 | /** @format int32 */ |
1874 | current?: number; | 2416 | current?: number; |
1875 | /** @format int32 */ | 2417 | /** @format int32 */ |
2418 | + end?: number; | ||
2419 | + /** @format int32 */ | ||
1876 | pageSize?: number; | 2420 | pageSize?: number; |
1877 | /** | 2421 | /** |
1878 | * @description | 2422 | * @description |
@@ -1880,6 +2424,8 @@ export interface UserDetailRequest { | @@ -1880,6 +2424,8 @@ export interface UserDetailRequest { | ||
1880 | */ | 2424 | */ |
1881 | phone?: string; | 2425 | phone?: string; |
1882 | /** @format int32 */ | 2426 | /** @format int32 */ |
2427 | + start?: number; | ||
2428 | + /** @format int32 */ | ||
1883 | total?: number; | 2429 | total?: number; |
1884 | /** | 2430 | /** |
1885 | * @description | 2431 | * @description |
@@ -1896,6 +2442,8 @@ export interface UserListRequest { | @@ -1896,6 +2442,8 @@ export interface UserListRequest { | ||
1896 | * 创建日期开始时间 | 2442 | * 创建日期开始时间 |
1897 | */ | 2443 | */ |
1898 | dateLimit?: string; | 2444 | dateLimit?: string; |
2445 | + /** @format int32 */ | ||
2446 | + end?: number; | ||
1899 | /** | 2447 | /** |
1900 | * @description | 2448 | * @description |
1901 | * 单位 | 2449 | * 单位 |
@@ -1920,10 +2468,23 @@ export interface UserListRequest { | @@ -1920,10 +2468,23 @@ export interface UserListRequest { | ||
1920 | phone?: string; | 2468 | phone?: string; |
1921 | /** | 2469 | /** |
1922 | * @description | 2470 | * @description |
2471 | + * phones | ||
2472 | + */ | ||
2473 | + phones?: Array<string>; | ||
2474 | + /** | ||
2475 | + * @description | ||
2476 | + * 内部订单系统课题组id | ||
2477 | + * @format int64 | ||
2478 | + */ | ||
2479 | + researchGroupId?: number; | ||
2480 | + /** | ||
2481 | + * @description | ||
1923 | * salesCode | 2482 | * salesCode |
1924 | */ | 2483 | */ |
1925 | salesCode?: string; | 2484 | salesCode?: string; |
1926 | /** @format int32 */ | 2485 | /** @format int32 */ |
2486 | + start?: number; | ||
2487 | + /** @format int32 */ | ||
1927 | total?: number; | 2488 | total?: number; |
1928 | /** | 2489 | /** |
1929 | * @description | 2490 | * @description |
@@ -1933,11 +2494,23 @@ export interface UserListRequest { | @@ -1933,11 +2494,23 @@ export interface UserListRequest { | ||
1933 | uid?: number; | 2494 | uid?: number; |
1934 | /** | 2495 | /** |
1935 | * @description | 2496 | * @description |
2497 | + * ids | ||
2498 | + */ | ||
2499 | + uids?: Array<number>; | ||
2500 | + /** | ||
2501 | + * @description | ||
1936 | * 用户名 | 2502 | * 用户名 |
1937 | */ | 2503 | */ |
1938 | username?: string; | 2504 | username?: string; |
1939 | } | 2505 | } |
1940 | 2506 | ||
2507 | +export interface UserNowMoneyCheckRequest { | ||
2508 | + phone?: string; | ||
2509 | + subPrice?: number; | ||
2510 | + /** @format int64 */ | ||
2511 | + uid?: number; | ||
2512 | +} | ||
2513 | + | ||
1941 | export interface View { | 2514 | export interface View { |
1942 | contentType?: string; | 2515 | contentType?: string; |
1943 | } | 2516 | } |
@@ -1960,6 +2533,32 @@ export interface ApiOrderConfirmReceiveRequest { | @@ -1960,6 +2533,32 @@ export interface ApiOrderConfirmReceiveRequest { | ||
1960 | subOrderIds?: Array<number>; | 2533 | subOrderIds?: Array<number>; |
1961 | } | 2534 | } |
1962 | 2535 | ||
2536 | +export interface TsgFile { | ||
2537 | + absolute?: boolean; | ||
2538 | + absoluteFile?: TsgFile; | ||
2539 | + absolutePath?: string; | ||
2540 | + canonicalFile?: TsgFile; | ||
2541 | + canonicalPath?: string; | ||
2542 | + directory?: boolean; | ||
2543 | + executable?: boolean; | ||
2544 | + file?: boolean; | ||
2545 | + /** @format int64 */ | ||
2546 | + freeSpace?: number; | ||
2547 | + hidden?: boolean; | ||
2548 | + /** @format int64 */ | ||
2549 | + lastModified?: number; | ||
2550 | + name?: string; | ||
2551 | + parent?: string; | ||
2552 | + parentFile?: TsgFile; | ||
2553 | + path?: string; | ||
2554 | + readable?: boolean; | ||
2555 | + /** @format int64 */ | ||
2556 | + totalSpace?: number; | ||
2557 | + /** @format int64 */ | ||
2558 | + usableSpace?: number; | ||
2559 | + writable?: boolean; | ||
2560 | +} | ||
2561 | + | ||
1963 | export interface SalesRechargePrepaymentAuditRequest { | 2562 | export interface SalesRechargePrepaymentAuditRequest { |
1964 | /** | 2563 | /** |
1965 | * @description | 2564 | * @description |
@@ -1976,6 +2575,11 @@ export interface SalesRechargePrepaymentAuditRequest { | @@ -1976,6 +2575,11 @@ export interface SalesRechargePrepaymentAuditRequest { | ||
1976 | * 是否通过 | 2575 | * 是否通过 |
1977 | */ | 2576 | */ |
1978 | pass?: boolean; | 2577 | pass?: boolean; |
2578 | + /** | ||
2579 | + * @description | ||
2580 | + * 手机号 | ||
2581 | + */ | ||
2582 | + phone?: string; | ||
1979 | } | 2583 | } |
1980 | 2584 | ||
1981 | export interface SalesRechargePrepaymentCreateRequest { | 2585 | export interface SalesRechargePrepaymentCreateRequest { |
@@ -2081,6 +2685,8 @@ export interface SalesRechargePrepaymentRequest { | @@ -2081,6 +2685,8 @@ export interface SalesRechargePrepaymentRequest { | ||
2081 | * @format int32 | 2685 | * @format int32 |
2082 | */ | 2686 | */ |
2083 | enableFlag?: number; | 2687 | enableFlag?: number; |
2688 | + /** @format int32 */ | ||
2689 | + end?: number; | ||
2084 | /** | 2690 | /** |
2085 | * @description | 2691 | * @description |
2086 | * id | 2692 | * id |
@@ -2125,6 +2731,8 @@ export interface SalesRechargePrepaymentRequest { | @@ -2125,6 +2731,8 @@ export interface SalesRechargePrepaymentRequest { | ||
2125 | * 销售代表 | 2731 | * 销售代表 |
2126 | */ | 2732 | */ |
2127 | salesCode?: string; | 2733 | salesCode?: string; |
2734 | + /** @format int32 */ | ||
2735 | + start?: number; | ||
2128 | /** | 2736 | /** |
2129 | * @description | 2737 | * @description |
2130 | * 状态 | 2738 | * 状态 |
@@ -2284,6 +2892,57 @@ export interface StoreOrderInvoiceRequest { | @@ -2284,6 +2892,57 @@ export interface StoreOrderInvoiceRequest { | ||
2284 | updateTime?: string; | 2892 | updateTime?: string; |
2285 | } | 2893 | } |
2286 | 2894 | ||
2895 | +export interface TsgURL { | ||
2896 | + authority?: string; | ||
2897 | + content?: any; | ||
2898 | + /** @format int32 */ | ||
2899 | + defaultPort?: number; | ||
2900 | + deserializedFields?: URLStreamHandler; | ||
2901 | + file?: string; | ||
2902 | + host?: string; | ||
2903 | + path?: string; | ||
2904 | + /** @format int32 */ | ||
2905 | + port?: number; | ||
2906 | + protocol?: string; | ||
2907 | + query?: string; | ||
2908 | + ref?: string; | ||
2909 | + /** @format int32 */ | ||
2910 | + serializedHashCode?: number; | ||
2911 | + userInfo?: string; | ||
2912 | +} | ||
2913 | + | ||
2914 | +/** | ||
2915 | + * @description | ||
2916 | + * 保存用户地址请求对象 | ||
2917 | + */ | ||
2918 | +export interface UserAddressSaveRequest { | ||
2919 | + /** | ||
2920 | + * @description | ||
2921 | + * 联系电话 | ||
2922 | + */ | ||
2923 | + customerContactNumber: string; | ||
2924 | + /** | ||
2925 | + * @description | ||
2926 | + * 客户姓名 | ||
2927 | + */ | ||
2928 | + customerName: string; | ||
2929 | + /** | ||
2930 | + * @description | ||
2931 | + * 收货地址 | ||
2932 | + */ | ||
2933 | + customerShippingAddress?: string; | ||
2934 | + /** | ||
2935 | + * @description | ||
2936 | + * 客户单位 | ||
2937 | + */ | ||
2938 | + institution?: string; | ||
2939 | + /** | ||
2940 | + * @description | ||
2941 | + * 课题组老师 | ||
2942 | + */ | ||
2943 | + institutionContactName?: string; | ||
2944 | +} | ||
2945 | + | ||
2287 | export interface UploadPaymentReceiptDTO { | 2946 | export interface UploadPaymentReceiptDTO { |
2288 | /** | 2947 | /** |
2289 | * @description | 2948 | * @description |
src/services/order.ts
@@ -2,12 +2,14 @@ import axios from 'axios'; | @@ -2,12 +2,14 @@ import axios from 'axios'; | ||
2 | 2 | ||
3 | export const orderExport = async ( | 3 | export const orderExport = async ( |
4 | url: any = '', | 4 | url: any = '', |
5 | + fileName: any = '', | ||
6 | + method: any = '', | ||
5 | data: any = {}, | 7 | data: any = {}, |
6 | exportLoadingDestory: any, | 8 | exportLoadingDestory: any, |
7 | ) => { | 9 | ) => { |
8 | axios({ | 10 | axios({ |
9 | url: url, | 11 | url: url, |
10 | - method: 'post', | 12 | + method: method, |
11 | responseType: 'blob', | 13 | responseType: 'blob', |
12 | headers: { Authorization: localStorage.getItem('token') }, | 14 | headers: { Authorization: localStorage.getItem('token') }, |
13 | data, | 15 | data, |
@@ -18,7 +20,7 @@ export const orderExport = async ( | @@ -18,7 +20,7 @@ export const orderExport = async ( | ||
18 | const downloadUrl = window.URL.createObjectURL(blob); | 20 | const downloadUrl = window.URL.createObjectURL(blob); |
19 | const a = document.createElement('a'); | 21 | const a = document.createElement('a'); |
20 | a.href = downloadUrl; | 22 | a.href = downloadUrl; |
21 | - a.download = '订单.xlsx'; // 你可以为文件命名 | 23 | + a.download = fileName; // 你可以为文件命名 |
22 | document.body.appendChild(a); | 24 | document.body.appendChild(a); |
23 | a.click(); // 模拟点击操作来下载文件 | 25 | a.click(); // 模拟点击操作来下载文件 |
24 | URL.revokeObjectURL(downloadUrl); // 释放掉 blob 对象所占用的内存 | 26 | URL.revokeObjectURL(downloadUrl); // 释放掉 blob 对象所占用的内存 |
src/services/request.ts
@@ -34,6 +34,7 @@ import type { | @@ -34,6 +34,7 @@ import type { | ||
34 | CancelInvoiceAndBankStatementDto, | 34 | CancelInvoiceAndBankStatementDto, |
35 | CancelSendOrderDto, | 35 | CancelSendOrderDto, |
36 | CaptchaMessageVO, | 36 | CaptchaMessageVO, |
37 | + CommonAuditRequest, | ||
37 | CustomFieldRes, | 38 | CustomFieldRes, |
38 | CustomerCustomerListReq, | 39 | CustomerCustomerListReq, |
39 | CustomerDetailDto, | 40 | CustomerDetailDto, |
@@ -59,6 +60,12 @@ import type { | @@ -59,6 +60,12 @@ import type { | ||
59 | OrderFieldLockApplyQueryVO, | 60 | OrderFieldLockApplyQueryVO, |
60 | OrderOptLogQueryVO, | 61 | OrderOptLogQueryVO, |
61 | OrderProfitAnalysisVo, | 62 | OrderProfitAnalysisVo, |
63 | + OrderStagesDelDo, | ||
64 | + OrderStagesFromDo, | ||
65 | + OrderStagesPayWay, | ||
66 | + OrderStagesPayWayDo, | ||
67 | + OrderStagesPayWayFileDo, | ||
68 | + OrderStagesSelDo, | ||
62 | OrderUnlockFieldApplyVO, | 69 | OrderUnlockFieldApplyVO, |
63 | OrderUpdateVO, | 70 | OrderUpdateVO, |
64 | ProcureConvertProcureDto, | 71 | ProcureConvertProcureDto, |
@@ -74,6 +81,16 @@ import type { | @@ -74,6 +81,16 @@ import type { | ||
74 | QueryMainOrderDto, | 81 | QueryMainOrderDto, |
75 | QueryReportFormsDto, | 82 | QueryReportFormsDto, |
76 | ReissueInvoiceDto, | 83 | ReissueInvoiceDto, |
84 | + ResearchGroupAddRequest, | ||
85 | + ResearchGroupDeleteRequest, | ||
86 | + ResearchGroupDetailRequest, | ||
87 | + ResearchGroupEditRequest, | ||
88 | + ResearchGroupListRequest, | ||
89 | + ResearchGroupMemberRequestAddRequest, | ||
90 | + ResearchGroupMemberRequestDeleteRequest, | ||
91 | + ResearchGroupMemberRequestDetailRequest, | ||
92 | + ResearchGroupMemberRequestEditRequest, | ||
93 | + ResearchGroupMemberRequestsRequest, | ||
77 | ResetPwdVO, | 94 | ResetPwdVO, |
78 | SalOrderSaveDto, | 95 | SalOrderSaveDto, |
79 | SalesRechargePrepaymentAuditRequest, | 96 | SalesRechargePrepaymentAuditRequest, |
@@ -95,9 +112,11 @@ import type { | @@ -95,9 +112,11 @@ import type { | ||
95 | UpdatePwdVO, | 112 | UpdatePwdVO, |
96 | UploadPaymentReceiptDTO, | 113 | UploadPaymentReceiptDTO, |
97 | UserAddressListRequest, | 114 | UserAddressListRequest, |
115 | + UserAddressSaveRequest, | ||
98 | UserCenterInfoRequest, | 116 | UserCenterInfoRequest, |
99 | UserDetailRequest, | 117 | UserDetailRequest, |
100 | UserListRequest, | 118 | UserListRequest, |
119 | + UserNowMoneyCheckRequest, | ||
101 | } from './definition'; | 120 | } from './definition'; |
102 | 121 | ||
103 | /** @description request parameter type for postApiLocalStorageUpload */ | 122 | /** @description request parameter type for postApiLocalStorageUpload */ |
@@ -1460,6 +1479,78 @@ export const postCanrdApiUserDetail = /* #__PURE__ */ (() => { | @@ -1460,6 +1479,78 @@ export const postCanrdApiUserDetail = /* #__PURE__ */ (() => { | ||
1460 | return request; | 1479 | return request; |
1461 | })(); | 1480 | })(); |
1462 | 1481 | ||
1482 | +/** @description request parameter type for postCanrdApiUserInnerOrderSystemAddressSave */ | ||
1483 | +export interface PostCanrdApiUserInnerOrderSystemAddressSaveOption { | ||
1484 | + /** | ||
1485 | + * @description | ||
1486 | + * request | ||
1487 | + */ | ||
1488 | + body: { | ||
1489 | + /** | ||
1490 | + @description | ||
1491 | + request */ | ||
1492 | + request: UserAddressSaveRequest; | ||
1493 | + }; | ||
1494 | +} | ||
1495 | + | ||
1496 | +/** @description response type for postCanrdApiUserInnerOrderSystemAddressSave */ | ||
1497 | +export interface PostCanrdApiUserInnerOrderSystemAddressSaveResponse { | ||
1498 | + /** | ||
1499 | + * @description | ||
1500 | + * OK | ||
1501 | + */ | ||
1502 | + 200: ServerResult; | ||
1503 | + /** | ||
1504 | + * @description | ||
1505 | + * Created | ||
1506 | + */ | ||
1507 | + 201: any; | ||
1508 | + /** | ||
1509 | + * @description | ||
1510 | + * Unauthorized | ||
1511 | + */ | ||
1512 | + 401: any; | ||
1513 | + /** | ||
1514 | + * @description | ||
1515 | + * Forbidden | ||
1516 | + */ | ||
1517 | + 403: any; | ||
1518 | + /** | ||
1519 | + * @description | ||
1520 | + * Not Found | ||
1521 | + */ | ||
1522 | + 404: any; | ||
1523 | +} | ||
1524 | + | ||
1525 | +export type PostCanrdApiUserInnerOrderSystemAddressSaveResponseSuccess = | ||
1526 | + PostCanrdApiUserInnerOrderSystemAddressSaveResponse[200]; | ||
1527 | +/** | ||
1528 | + * @description | ||
1529 | + * 查询地址信息 | ||
1530 | + * @tags canrd-mobile-api-controller | ||
1531 | + * @produces * | ||
1532 | + * @consumes application/json | ||
1533 | + */ | ||
1534 | +export const postCanrdApiUserInnerOrderSystemAddressSave = | ||
1535 | + /* #__PURE__ */ (() => { | ||
1536 | + const method = 'post'; | ||
1537 | + const url = '/canrd/api/user/innerOrderSystem/address/save'; | ||
1538 | + function request( | ||
1539 | + option: PostCanrdApiUserInnerOrderSystemAddressSaveOption, | ||
1540 | + ): Promise<PostCanrdApiUserInnerOrderSystemAddressSaveResponseSuccess> { | ||
1541 | + return requester(request.url, { | ||
1542 | + method: request.method, | ||
1543 | + ...option, | ||
1544 | + }) as unknown as Promise<PostCanrdApiUserInnerOrderSystemAddressSaveResponseSuccess>; | ||
1545 | + } | ||
1546 | + | ||
1547 | + /** http method */ | ||
1548 | + request.method = method; | ||
1549 | + /** request url */ | ||
1550 | + request.url = url; | ||
1551 | + return request; | ||
1552 | + })(); | ||
1553 | + | ||
1463 | /** @description request parameter type for postCanrdApiUserList */ | 1554 | /** @description request parameter type for postCanrdApiUserList */ |
1464 | export interface PostCanrdApiUserListOption { | 1555 | export interface PostCanrdApiUserListOption { |
1465 | /** | 1556 | /** |
@@ -1531,6 +1622,147 @@ export const postCanrdApiUserList = /* #__PURE__ */ (() => { | @@ -1531,6 +1622,147 @@ export const postCanrdApiUserList = /* #__PURE__ */ (() => { | ||
1531 | return request; | 1622 | return request; |
1532 | })(); | 1623 | })(); |
1533 | 1624 | ||
1625 | +/** @description request parameter type for postCanrdApiUserNowMoneyCheck */ | ||
1626 | +export interface PostCanrdApiUserNowMoneyCheckOption { | ||
1627 | + /** | ||
1628 | + * @description | ||
1629 | + * request | ||
1630 | + */ | ||
1631 | + body: { | ||
1632 | + /** | ||
1633 | + @description | ||
1634 | + request */ | ||
1635 | + request: UserNowMoneyCheckRequest; | ||
1636 | + }; | ||
1637 | +} | ||
1638 | + | ||
1639 | +/** @description response type for postCanrdApiUserNowMoneyCheck */ | ||
1640 | +export interface PostCanrdApiUserNowMoneyCheckResponse { | ||
1641 | + /** | ||
1642 | + * @description | ||
1643 | + * OK | ||
1644 | + */ | ||
1645 | + 200: ServerResult; | ||
1646 | + /** | ||
1647 | + * @description | ||
1648 | + * Created | ||
1649 | + */ | ||
1650 | + 201: any; | ||
1651 | + /** | ||
1652 | + * @description | ||
1653 | + * Unauthorized | ||
1654 | + */ | ||
1655 | + 401: any; | ||
1656 | + /** | ||
1657 | + * @description | ||
1658 | + * Forbidden | ||
1659 | + */ | ||
1660 | + 403: any; | ||
1661 | + /** | ||
1662 | + * @description | ||
1663 | + * Not Found | ||
1664 | + */ | ||
1665 | + 404: any; | ||
1666 | +} | ||
1667 | + | ||
1668 | +export type PostCanrdApiUserNowMoneyCheckResponseSuccess = | ||
1669 | + PostCanrdApiUserNowMoneyCheckResponse[200]; | ||
1670 | +/** | ||
1671 | + * @description | ||
1672 | + * 检查用户额度 | ||
1673 | + * @tags canrd-mobile-api-controller | ||
1674 | + * @produces * | ||
1675 | + * @consumes application/json | ||
1676 | + */ | ||
1677 | +export const postCanrdApiUserNowMoneyCheck = /* #__PURE__ */ (() => { | ||
1678 | + const method = 'post'; | ||
1679 | + const url = '/canrd/api/user/nowMoney/check'; | ||
1680 | + function request( | ||
1681 | + option: PostCanrdApiUserNowMoneyCheckOption, | ||
1682 | + ): Promise<PostCanrdApiUserNowMoneyCheckResponseSuccess> { | ||
1683 | + return requester(request.url, { | ||
1684 | + method: request.method, | ||
1685 | + ...option, | ||
1686 | + }) as unknown as Promise<PostCanrdApiUserNowMoneyCheckResponseSuccess>; | ||
1687 | + } | ||
1688 | + | ||
1689 | + /** http method */ | ||
1690 | + request.method = method; | ||
1691 | + /** request url */ | ||
1692 | + request.url = url; | ||
1693 | + return request; | ||
1694 | +})(); | ||
1695 | + | ||
1696 | +/** @description request parameter type for postCommonAudit */ | ||
1697 | +export interface PostCommonAuditOption { | ||
1698 | + /** | ||
1699 | + * @description | ||
1700 | + * request | ||
1701 | + */ | ||
1702 | + body: { | ||
1703 | + /** | ||
1704 | + @description | ||
1705 | + request */ | ||
1706 | + request: CommonAuditRequest; | ||
1707 | + }; | ||
1708 | +} | ||
1709 | + | ||
1710 | +/** @description response type for postCommonAudit */ | ||
1711 | +export interface PostCommonAuditResponse { | ||
1712 | + /** | ||
1713 | + * @description | ||
1714 | + * OK | ||
1715 | + */ | ||
1716 | + 200: ServerResult; | ||
1717 | + /** | ||
1718 | + * @description | ||
1719 | + * Created | ||
1720 | + */ | ||
1721 | + 201: any; | ||
1722 | + /** | ||
1723 | + * @description | ||
1724 | + * Unauthorized | ||
1725 | + */ | ||
1726 | + 401: any; | ||
1727 | + /** | ||
1728 | + * @description | ||
1729 | + * Forbidden | ||
1730 | + */ | ||
1731 | + 403: any; | ||
1732 | + /** | ||
1733 | + * @description | ||
1734 | + * Not Found | ||
1735 | + */ | ||
1736 | + 404: any; | ||
1737 | +} | ||
1738 | + | ||
1739 | +export type PostCommonAuditResponseSuccess = PostCommonAuditResponse[200]; | ||
1740 | +/** | ||
1741 | + * @description | ||
1742 | + * audit | ||
1743 | + * @tags common-controller | ||
1744 | + * @produces * | ||
1745 | + * @consumes application/json | ||
1746 | + */ | ||
1747 | +export const postCommonAudit = /* #__PURE__ */ (() => { | ||
1748 | + const method = 'post'; | ||
1749 | + const url = '/common/audit'; | ||
1750 | + function request( | ||
1751 | + option: PostCommonAuditOption, | ||
1752 | + ): Promise<PostCommonAuditResponseSuccess> { | ||
1753 | + return requester(request.url, { | ||
1754 | + method: request.method, | ||
1755 | + ...option, | ||
1756 | + }) as unknown as Promise<PostCommonAuditResponseSuccess>; | ||
1757 | + } | ||
1758 | + | ||
1759 | + /** http method */ | ||
1760 | + request.method = method; | ||
1761 | + /** request url */ | ||
1762 | + request.url = url; | ||
1763 | + return request; | ||
1764 | +})(); | ||
1765 | + | ||
1534 | /** @description response type for getError */ | 1766 | /** @description response type for getError */ |
1535 | export interface GetErrorResponse { | 1767 | export interface GetErrorResponse { |
1536 | /** | 1768 | /** |
@@ -6065,22 +6297,22 @@ export const postOrderErpOrderQueryById = /* #__PURE__ */ (() => { | @@ -6065,22 +6297,22 @@ export const postOrderErpOrderQueryById = /* #__PURE__ */ (() => { | ||
6065 | return request; | 6297 | return request; |
6066 | })(); | 6298 | })(); |
6067 | 6299 | ||
6068 | -/** @description request parameter type for postOrderErpProfitAnalysis */ | ||
6069 | -export interface PostOrderErpProfitAnalysisOption { | 6300 | +/** @description request parameter type for postOrderErpOrderStagesAdd */ |
6301 | +export interface PostOrderErpOrderStagesAddOption { | ||
6070 | /** | 6302 | /** |
6071 | * @description | 6303 | * @description |
6072 | - * orderProfitAnalysisVo | 6304 | + * orderStagesFromDo |
6073 | */ | 6305 | */ |
6074 | body: { | 6306 | body: { |
6075 | /** | 6307 | /** |
6076 | @description | 6308 | @description |
6077 | - orderProfitAnalysisVo */ | ||
6078 | - orderProfitAnalysisVo: OrderProfitAnalysisVo; | 6309 | + orderStagesFromDo */ |
6310 | + orderStagesFromDo: OrderStagesFromDo; | ||
6079 | }; | 6311 | }; |
6080 | } | 6312 | } |
6081 | 6313 | ||
6082 | -/** @description response type for postOrderErpProfitAnalysis */ | ||
6083 | -export interface PostOrderErpProfitAnalysisResponse { | 6314 | +/** @description response type for postOrderErpOrderStagesAdd */ |
6315 | +export interface PostOrderErpOrderStagesAddResponse { | ||
6084 | /** | 6316 | /** |
6085 | * @description | 6317 | * @description |
6086 | * OK | 6318 | * OK |
@@ -6108,25 +6340,25 @@ export interface PostOrderErpProfitAnalysisResponse { | @@ -6108,25 +6340,25 @@ export interface PostOrderErpProfitAnalysisResponse { | ||
6108 | 404: any; | 6340 | 404: any; |
6109 | } | 6341 | } |
6110 | 6342 | ||
6111 | -export type PostOrderErpProfitAnalysisResponseSuccess = | ||
6112 | - PostOrderErpProfitAnalysisResponse[200]; | 6343 | +export type PostOrderErpOrderStagesAddResponseSuccess = |
6344 | + PostOrderErpOrderStagesAddResponse[200]; | ||
6113 | /** | 6345 | /** |
6114 | * @description | 6346 | * @description |
6115 | - * analysis | ||
6116 | - * @tags order-profit-controller | 6347 | + * 添加或者修改分期账单 |
6348 | + * @tags order-stages-controller | ||
6117 | * @produces * | 6349 | * @produces * |
6118 | * @consumes application/json | 6350 | * @consumes application/json |
6119 | */ | 6351 | */ |
6120 | -export const postOrderErpProfitAnalysis = /* #__PURE__ */ (() => { | 6352 | +export const postOrderErpOrderStagesAdd = /* #__PURE__ */ (() => { |
6121 | const method = 'post'; | 6353 | const method = 'post'; |
6122 | - const url = '/order/erp/profit/analysis'; | 6354 | + const url = '/order/erp/orderStages/add'; |
6123 | function request( | 6355 | function request( |
6124 | - option: PostOrderErpProfitAnalysisOption, | ||
6125 | - ): Promise<PostOrderErpProfitAnalysisResponseSuccess> { | 6356 | + option: PostOrderErpOrderStagesAddOption, |
6357 | + ): Promise<PostOrderErpOrderStagesAddResponseSuccess> { | ||
6126 | return requester(request.url, { | 6358 | return requester(request.url, { |
6127 | method: request.method, | 6359 | method: request.method, |
6128 | ...option, | 6360 | ...option, |
6129 | - }) as unknown as Promise<PostOrderErpProfitAnalysisResponseSuccess>; | 6361 | + }) as unknown as Promise<PostOrderErpOrderStagesAddResponseSuccess>; |
6130 | } | 6362 | } |
6131 | 6363 | ||
6132 | /** http method */ | 6364 | /** http method */ |
@@ -6136,22 +6368,22 @@ export const postOrderErpProfitAnalysis = /* #__PURE__ */ (() => { | @@ -6136,22 +6368,22 @@ export const postOrderErpProfitAnalysis = /* #__PURE__ */ (() => { | ||
6136 | return request; | 6368 | return request; |
6137 | })(); | 6369 | })(); |
6138 | 6370 | ||
6139 | -/** @description request parameter type for postOrderErpRolesAdd */ | ||
6140 | -export interface PostOrderErpRolesAddOption { | 6371 | +/** @description request parameter type for deleteOrderErpOrderStagesDelect */ |
6372 | +export interface DeleteOrderErpOrderStagesDelectOption { | ||
6141 | /** | 6373 | /** |
6142 | * @description | 6374 | * @description |
6143 | - * roleVO | 6375 | + * orderStagesDelDo |
6144 | */ | 6376 | */ |
6145 | body: { | 6377 | body: { |
6146 | /** | 6378 | /** |
6147 | @description | 6379 | @description |
6148 | - roleVO */ | ||
6149 | - roleVO: AdminRoleVO; | 6380 | + orderStagesDelDo */ |
6381 | + orderStagesDelDo: OrderStagesDelDo; | ||
6150 | }; | 6382 | }; |
6151 | } | 6383 | } |
6152 | 6384 | ||
6153 | -/** @description response type for postOrderErpRolesAdd */ | ||
6154 | -export interface PostOrderErpRolesAddResponse { | 6385 | +/** @description response type for deleteOrderErpOrderStagesDelect */ |
6386 | +export interface DeleteOrderErpOrderStagesDelectResponse { | ||
6155 | /** | 6387 | /** |
6156 | * @description | 6388 | * @description |
6157 | * OK | 6389 | * OK |
@@ -6159,9 +6391,9 @@ export interface PostOrderErpRolesAddResponse { | @@ -6159,9 +6391,9 @@ export interface PostOrderErpRolesAddResponse { | ||
6159 | 200: ServerResult; | 6391 | 200: ServerResult; |
6160 | /** | 6392 | /** |
6161 | * @description | 6393 | * @description |
6162 | - * Created | 6394 | + * No Content |
6163 | */ | 6395 | */ |
6164 | - 201: any; | 6396 | + 204: any; |
6165 | /** | 6397 | /** |
6166 | * @description | 6398 | * @description |
6167 | * Unauthorized | 6399 | * Unauthorized |
@@ -6172,32 +6404,26 @@ export interface PostOrderErpRolesAddResponse { | @@ -6172,32 +6404,26 @@ export interface PostOrderErpRolesAddResponse { | ||
6172 | * Forbidden | 6404 | * Forbidden |
6173 | */ | 6405 | */ |
6174 | 403: any; | 6406 | 403: any; |
6175 | - /** | ||
6176 | - * @description | ||
6177 | - * Not Found | ||
6178 | - */ | ||
6179 | - 404: any; | ||
6180 | } | 6407 | } |
6181 | 6408 | ||
6182 | -export type PostOrderErpRolesAddResponseSuccess = | ||
6183 | - PostOrderErpRolesAddResponse[200]; | 6409 | +export type DeleteOrderErpOrderStagesDelectResponseSuccess = |
6410 | + DeleteOrderErpOrderStagesDelectResponse[200]; | ||
6184 | /** | 6411 | /** |
6185 | * @description | 6412 | * @description |
6186 | - * 新增角色 | ||
6187 | - * @tags 系统:角色管理 | 6413 | + * 删除分期账单 |
6414 | + * @tags order-stages-controller | ||
6188 | * @produces * | 6415 | * @produces * |
6189 | - * @consumes application/json | ||
6190 | */ | 6416 | */ |
6191 | -export const postOrderErpRolesAdd = /* #__PURE__ */ (() => { | ||
6192 | - const method = 'post'; | ||
6193 | - const url = '/order/erp/roles/add'; | 6417 | +export const deleteOrderErpOrderStagesDelect = /* #__PURE__ */ (() => { |
6418 | + const method = 'delete'; | ||
6419 | + const url = '/order/erp/orderStages/delect'; | ||
6194 | function request( | 6420 | function request( |
6195 | - option: PostOrderErpRolesAddOption, | ||
6196 | - ): Promise<PostOrderErpRolesAddResponseSuccess> { | 6421 | + option: DeleteOrderErpOrderStagesDelectOption, |
6422 | + ): Promise<DeleteOrderErpOrderStagesDelectResponseSuccess> { | ||
6197 | return requester(request.url, { | 6423 | return requester(request.url, { |
6198 | method: request.method, | 6424 | method: request.method, |
6199 | ...option, | 6425 | ...option, |
6200 | - }) as unknown as Promise<PostOrderErpRolesAddResponseSuccess>; | 6426 | + }) as unknown as Promise<DeleteOrderErpOrderStagesDelectResponseSuccess>; |
6201 | } | 6427 | } |
6202 | 6428 | ||
6203 | /** http method */ | 6429 | /** http method */ |
@@ -6207,32 +6433,13 @@ export const postOrderErpRolesAdd = /* #__PURE__ */ (() => { | @@ -6207,32 +6433,13 @@ export const postOrderErpRolesAdd = /* #__PURE__ */ (() => { | ||
6207 | return request; | 6433 | return request; |
6208 | })(); | 6434 | })(); |
6209 | 6435 | ||
6210 | -/** @description request parameter type for postOrderErpRolesAll */ | ||
6211 | -export interface PostOrderErpRolesAllOption { | ||
6212 | - /** | ||
6213 | - * @description | ||
6214 | - * queryVO | ||
6215 | - */ | ||
6216 | - body: { | ||
6217 | - /** | ||
6218 | - @description | ||
6219 | - queryVO */ | ||
6220 | - queryVO: AdminRoleQueryVO; | ||
6221 | - }; | ||
6222 | -} | ||
6223 | - | ||
6224 | -/** @description response type for postOrderErpRolesAll */ | ||
6225 | -export interface PostOrderErpRolesAllResponse { | 6436 | +/** @description response type for getOrderErpOrderStagesExport */ |
6437 | +export interface GetOrderErpOrderStagesExportResponse { | ||
6226 | /** | 6438 | /** |
6227 | * @description | 6439 | * @description |
6228 | * OK | 6440 | * OK |
6229 | */ | 6441 | */ |
6230 | - 200: ServerResult; | ||
6231 | - /** | ||
6232 | - * @description | ||
6233 | - * Created | ||
6234 | - */ | ||
6235 | - 201: any; | 6442 | + 200: any; |
6236 | /** | 6443 | /** |
6237 | * @description | 6444 | * @description |
6238 | * Unauthorized | 6445 | * Unauthorized |
@@ -6250,25 +6457,781 @@ export interface PostOrderErpRolesAllResponse { | @@ -6250,25 +6457,781 @@ export interface PostOrderErpRolesAllResponse { | ||
6250 | 404: any; | 6457 | 404: any; |
6251 | } | 6458 | } |
6252 | 6459 | ||
6253 | -export type PostOrderErpRolesAllResponseSuccess = | ||
6254 | - PostOrderErpRolesAllResponse[200]; | 6460 | +export type GetOrderErpOrderStagesExportResponseSuccess = |
6461 | + GetOrderErpOrderStagesExportResponse[200]; | ||
6255 | /** | 6462 | /** |
6256 | * @description | 6463 | * @description |
6257 | - * 返回全部的角色 | ||
6258 | - * @tags 系统:角色管理 | 6464 | + * 导出分期账单 |
6465 | + * @tags order-stages-controller | ||
6259 | * @produces * | 6466 | * @produces * |
6260 | - * @consumes application/json | ||
6261 | */ | 6467 | */ |
6262 | -export const postOrderErpRolesAll = /* #__PURE__ */ (() => { | ||
6263 | - const method = 'post'; | ||
6264 | - const url = '/order/erp/roles/all'; | ||
6265 | - function request( | ||
6266 | - option: PostOrderErpRolesAllOption, | ||
6267 | - ): Promise<PostOrderErpRolesAllResponseSuccess> { | 6468 | +export const getOrderErpOrderStagesExport = /* #__PURE__ */ (() => { |
6469 | + const method = 'get'; | ||
6470 | + const url = '/order/erp/orderStages/export'; | ||
6471 | + function request(): Promise<GetOrderErpOrderStagesExportResponseSuccess> { | ||
6268 | return requester(request.url, { | 6472 | return requester(request.url, { |
6269 | method: request.method, | 6473 | method: request.method, |
6270 | - ...option, | ||
6271 | - }) as unknown as Promise<PostOrderErpRolesAllResponseSuccess>; | 6474 | + }) as unknown as Promise<GetOrderErpOrderStagesExportResponseSuccess>; |
6475 | + } | ||
6476 | + | ||
6477 | + /** http method */ | ||
6478 | + request.method = method; | ||
6479 | + /** request url */ | ||
6480 | + request.url = url; | ||
6481 | + return request; | ||
6482 | +})(); | ||
6483 | + | ||
6484 | +/** @description request parameter type for postOrderErpOrderStagesImport */ | ||
6485 | +export interface PostOrderErpOrderStagesImportOption { | ||
6486 | + /** | ||
6487 | + * @description | ||
6488 | + * file | ||
6489 | + */ | ||
6490 | + formData: { | ||
6491 | + /** | ||
6492 | + @description | ||
6493 | + file */ | ||
6494 | + file: File; | ||
6495 | + }; | ||
6496 | +} | ||
6497 | + | ||
6498 | +/** @description response type for postOrderErpOrderStagesImport */ | ||
6499 | +export interface PostOrderErpOrderStagesImportResponse { | ||
6500 | + /** | ||
6501 | + * @description | ||
6502 | + * OK | ||
6503 | + */ | ||
6504 | + 200: ServerResult; | ||
6505 | + /** | ||
6506 | + * @description | ||
6507 | + * Created | ||
6508 | + */ | ||
6509 | + 201: any; | ||
6510 | + /** | ||
6511 | + * @description | ||
6512 | + * Unauthorized | ||
6513 | + */ | ||
6514 | + 401: any; | ||
6515 | + /** | ||
6516 | + * @description | ||
6517 | + * Forbidden | ||
6518 | + */ | ||
6519 | + 403: any; | ||
6520 | + /** | ||
6521 | + * @description | ||
6522 | + * Not Found | ||
6523 | + */ | ||
6524 | + 404: any; | ||
6525 | +} | ||
6526 | + | ||
6527 | +export type PostOrderErpOrderStagesImportResponseSuccess = | ||
6528 | + PostOrderErpOrderStagesImportResponse[200]; | ||
6529 | +/** | ||
6530 | + * @description | ||
6531 | + * 导入分期账单 | ||
6532 | + * @tags order-stages-controller | ||
6533 | + * @produces * | ||
6534 | + * @consumes multipart/form-data | ||
6535 | + */ | ||
6536 | +export const postOrderErpOrderStagesImport = /* #__PURE__ */ (() => { | ||
6537 | + const method = 'post'; | ||
6538 | + const url = '/order/erp/orderStages/import'; | ||
6539 | + function request( | ||
6540 | + option: PostOrderErpOrderStagesImportOption, | ||
6541 | + ): Promise<PostOrderErpOrderStagesImportResponseSuccess> { | ||
6542 | + return requester(request.url, { | ||
6543 | + method: request.method, | ||
6544 | + ...option, | ||
6545 | + }) as unknown as Promise<PostOrderErpOrderStagesImportResponseSuccess>; | ||
6546 | + } | ||
6547 | + | ||
6548 | + /** http method */ | ||
6549 | + request.method = method; | ||
6550 | + /** request url */ | ||
6551 | + request.url = url; | ||
6552 | + return request; | ||
6553 | +})(); | ||
6554 | + | ||
6555 | +/** @description response type for getOrderErpOrderStagesListAll */ | ||
6556 | +export interface GetOrderErpOrderStagesListAllResponse { | ||
6557 | + /** | ||
6558 | + * @description | ||
6559 | + * OK | ||
6560 | + */ | ||
6561 | + 200: ServerResult; | ||
6562 | + /** | ||
6563 | + * @description | ||
6564 | + * Unauthorized | ||
6565 | + */ | ||
6566 | + 401: any; | ||
6567 | + /** | ||
6568 | + * @description | ||
6569 | + * Forbidden | ||
6570 | + */ | ||
6571 | + 403: any; | ||
6572 | + /** | ||
6573 | + * @description | ||
6574 | + * Not Found | ||
6575 | + */ | ||
6576 | + 404: any; | ||
6577 | +} | ||
6578 | + | ||
6579 | +export type GetOrderErpOrderStagesListAllResponseSuccess = | ||
6580 | + GetOrderErpOrderStagesListAllResponse[200]; | ||
6581 | +/** | ||
6582 | + * @description | ||
6583 | + * 查询所有分期账单 | ||
6584 | + * @tags order-stages-controller | ||
6585 | + * @produces * | ||
6586 | + */ | ||
6587 | +export const getOrderErpOrderStagesListAll = /* #__PURE__ */ (() => { | ||
6588 | + const method = 'get'; | ||
6589 | + const url = '/order/erp/orderStages/listAll'; | ||
6590 | + function request(): Promise<GetOrderErpOrderStagesListAllResponseSuccess> { | ||
6591 | + return requester(request.url, { | ||
6592 | + method: request.method, | ||
6593 | + }) as unknown as Promise<GetOrderErpOrderStagesListAllResponseSuccess>; | ||
6594 | + } | ||
6595 | + | ||
6596 | + /** http method */ | ||
6597 | + request.method = method; | ||
6598 | + /** request url */ | ||
6599 | + request.url = url; | ||
6600 | + return request; | ||
6601 | +})(); | ||
6602 | + | ||
6603 | +/** @description request parameter type for postOrderErpOrderStagesSaveOrUpdate */ | ||
6604 | +export interface PostOrderErpOrderStagesSaveOrUpdateOption { | ||
6605 | + /** | ||
6606 | + * @description | ||
6607 | + * orderStagesFromDo | ||
6608 | + */ | ||
6609 | + body: { | ||
6610 | + /** | ||
6611 | + @description | ||
6612 | + orderStagesFromDo */ | ||
6613 | + orderStagesFromDo: OrderStagesFromDo; | ||
6614 | + }; | ||
6615 | +} | ||
6616 | + | ||
6617 | +/** @description response type for postOrderErpOrderStagesSaveOrUpdate */ | ||
6618 | +export interface PostOrderErpOrderStagesSaveOrUpdateResponse { | ||
6619 | + /** | ||
6620 | + * @description | ||
6621 | + * OK | ||
6622 | + */ | ||
6623 | + 200: ServerResult; | ||
6624 | + /** | ||
6625 | + * @description | ||
6626 | + * Created | ||
6627 | + */ | ||
6628 | + 201: any; | ||
6629 | + /** | ||
6630 | + * @description | ||
6631 | + * Unauthorized | ||
6632 | + */ | ||
6633 | + 401: any; | ||
6634 | + /** | ||
6635 | + * @description | ||
6636 | + * Forbidden | ||
6637 | + */ | ||
6638 | + 403: any; | ||
6639 | + /** | ||
6640 | + * @description | ||
6641 | + * Not Found | ||
6642 | + */ | ||
6643 | + 404: any; | ||
6644 | +} | ||
6645 | + | ||
6646 | +export type PostOrderErpOrderStagesSaveOrUpdateResponseSuccess = | ||
6647 | + PostOrderErpOrderStagesSaveOrUpdateResponse[200]; | ||
6648 | +/** | ||
6649 | + * @description | ||
6650 | + * 添加或者修改分期账单 | ||
6651 | + * @tags order-stages-controller | ||
6652 | + * @produces * | ||
6653 | + * @consumes application/json | ||
6654 | + */ | ||
6655 | +export const postOrderErpOrderStagesSaveOrUpdate = /* #__PURE__ */ (() => { | ||
6656 | + const method = 'post'; | ||
6657 | + const url = '/order/erp/orderStages/saveOrUpdate'; | ||
6658 | + function request( | ||
6659 | + option: PostOrderErpOrderStagesSaveOrUpdateOption, | ||
6660 | + ): Promise<PostOrderErpOrderStagesSaveOrUpdateResponseSuccess> { | ||
6661 | + return requester(request.url, { | ||
6662 | + method: request.method, | ||
6663 | + ...option, | ||
6664 | + }) as unknown as Promise<PostOrderErpOrderStagesSaveOrUpdateResponseSuccess>; | ||
6665 | + } | ||
6666 | + | ||
6667 | + /** http method */ | ||
6668 | + request.method = method; | ||
6669 | + /** request url */ | ||
6670 | + request.url = url; | ||
6671 | + return request; | ||
6672 | +})(); | ||
6673 | + | ||
6674 | +/** @description request parameter type for postOrderErpOrderStagesSearch */ | ||
6675 | +export interface PostOrderErpOrderStagesSearchOption { | ||
6676 | + /** | ||
6677 | + * @description | ||
6678 | + * orderStagesSelDo | ||
6679 | + */ | ||
6680 | + body: { | ||
6681 | + /** | ||
6682 | + @description | ||
6683 | + orderStagesSelDo */ | ||
6684 | + orderStagesSelDo: OrderStagesSelDo; | ||
6685 | + }; | ||
6686 | +} | ||
6687 | + | ||
6688 | +/** @description response type for postOrderErpOrderStagesSearch */ | ||
6689 | +export interface PostOrderErpOrderStagesSearchResponse { | ||
6690 | + /** | ||
6691 | + * @description | ||
6692 | + * OK | ||
6693 | + */ | ||
6694 | + 200: ServerResult; | ||
6695 | + /** | ||
6696 | + * @description | ||
6697 | + * Created | ||
6698 | + */ | ||
6699 | + 201: any; | ||
6700 | + /** | ||
6701 | + * @description | ||
6702 | + * Unauthorized | ||
6703 | + */ | ||
6704 | + 401: any; | ||
6705 | + /** | ||
6706 | + * @description | ||
6707 | + * Forbidden | ||
6708 | + */ | ||
6709 | + 403: any; | ||
6710 | + /** | ||
6711 | + * @description | ||
6712 | + * Not Found | ||
6713 | + */ | ||
6714 | + 404: any; | ||
6715 | +} | ||
6716 | + | ||
6717 | +export type PostOrderErpOrderStagesSearchResponseSuccess = | ||
6718 | + PostOrderErpOrderStagesSearchResponse[200]; | ||
6719 | +/** | ||
6720 | + * @description | ||
6721 | + * 条件搜索分期账单 | ||
6722 | + * @tags order-stages-controller | ||
6723 | + * @produces * | ||
6724 | + * @consumes application/json | ||
6725 | + */ | ||
6726 | +export const postOrderErpOrderStagesSearch = /* #__PURE__ */ (() => { | ||
6727 | + const method = 'post'; | ||
6728 | + const url = '/order/erp/orderStages/search'; | ||
6729 | + function request( | ||
6730 | + option: PostOrderErpOrderStagesSearchOption, | ||
6731 | + ): Promise<PostOrderErpOrderStagesSearchResponseSuccess> { | ||
6732 | + return requester(request.url, { | ||
6733 | + method: request.method, | ||
6734 | + ...option, | ||
6735 | + }) as unknown as Promise<PostOrderErpOrderStagesSearchResponseSuccess>; | ||
6736 | + } | ||
6737 | + | ||
6738 | + /** http method */ | ||
6739 | + request.method = method; | ||
6740 | + /** request url */ | ||
6741 | + request.url = url; | ||
6742 | + return request; | ||
6743 | +})(); | ||
6744 | + | ||
6745 | +/** @description request parameter type for postOrderErpOrderStagesUpload */ | ||
6746 | +export interface PostOrderErpOrderStagesUploadOption { | ||
6747 | + /** | ||
6748 | + * @description | ||
6749 | + * file | ||
6750 | + */ | ||
6751 | + formData: { | ||
6752 | + /** | ||
6753 | + @description | ||
6754 | + file */ | ||
6755 | + file: File; | ||
6756 | + }; | ||
6757 | +} | ||
6758 | + | ||
6759 | +/** @description response type for postOrderErpOrderStagesUpload */ | ||
6760 | +export interface PostOrderErpOrderStagesUploadResponse { | ||
6761 | + /** | ||
6762 | + * @description | ||
6763 | + * OK | ||
6764 | + */ | ||
6765 | + 200: ServerResult; | ||
6766 | + /** | ||
6767 | + * @description | ||
6768 | + * Created | ||
6769 | + */ | ||
6770 | + 201: any; | ||
6771 | + /** | ||
6772 | + * @description | ||
6773 | + * Unauthorized | ||
6774 | + */ | ||
6775 | + 401: any; | ||
6776 | + /** | ||
6777 | + * @description | ||
6778 | + * Forbidden | ||
6779 | + */ | ||
6780 | + 403: any; | ||
6781 | + /** | ||
6782 | + * @description | ||
6783 | + * Not Found | ||
6784 | + */ | ||
6785 | + 404: any; | ||
6786 | +} | ||
6787 | + | ||
6788 | +export type PostOrderErpOrderStagesUploadResponseSuccess = | ||
6789 | + PostOrderErpOrderStagesUploadResponse[200]; | ||
6790 | +/** | ||
6791 | + * @description | ||
6792 | + * 合同文件上传 | ||
6793 | + * @tags order-stages-controller | ||
6794 | + * @produces * | ||
6795 | + * @consumes multipart/form-data | ||
6796 | + */ | ||
6797 | +export const postOrderErpOrderStagesUpload = /* #__PURE__ */ (() => { | ||
6798 | + const method = 'post'; | ||
6799 | + const url = '/order/erp/orderStages/upload'; | ||
6800 | + function request( | ||
6801 | + option: PostOrderErpOrderStagesUploadOption, | ||
6802 | + ): Promise<PostOrderErpOrderStagesUploadResponseSuccess> { | ||
6803 | + return requester(request.url, { | ||
6804 | + method: request.method, | ||
6805 | + ...option, | ||
6806 | + }) as unknown as Promise<PostOrderErpOrderStagesUploadResponseSuccess>; | ||
6807 | + } | ||
6808 | + | ||
6809 | + /** http method */ | ||
6810 | + request.method = method; | ||
6811 | + /** request url */ | ||
6812 | + request.url = url; | ||
6813 | + return request; | ||
6814 | +})(); | ||
6815 | + | ||
6816 | +/** @description request parameter type for postOrderErpOrderStagesPayWaySaveOrUpdate */ | ||
6817 | +export interface PostOrderErpOrderStagesPayWaySaveOrUpdateOption { | ||
6818 | + /** | ||
6819 | + * @description | ||
6820 | + * orderStagesPayWayList | ||
6821 | + */ | ||
6822 | + body: { | ||
6823 | + /** | ||
6824 | + @description | ||
6825 | + orderStagesPayWayList */ | ||
6826 | + orderStagesPayWayList: Array<OrderStagesPayWay>; | ||
6827 | + }; | ||
6828 | +} | ||
6829 | + | ||
6830 | +/** @description response type for postOrderErpOrderStagesPayWaySaveOrUpdate */ | ||
6831 | +export interface PostOrderErpOrderStagesPayWaySaveOrUpdateResponse { | ||
6832 | + /** | ||
6833 | + * @description | ||
6834 | + * OK | ||
6835 | + */ | ||
6836 | + 200: ServerResult; | ||
6837 | + /** | ||
6838 | + * @description | ||
6839 | + * Created | ||
6840 | + */ | ||
6841 | + 201: any; | ||
6842 | + /** | ||
6843 | + * @description | ||
6844 | + * Unauthorized | ||
6845 | + */ | ||
6846 | + 401: any; | ||
6847 | + /** | ||
6848 | + * @description | ||
6849 | + * Forbidden | ||
6850 | + */ | ||
6851 | + 403: any; | ||
6852 | + /** | ||
6853 | + * @description | ||
6854 | + * Not Found | ||
6855 | + */ | ||
6856 | + 404: any; | ||
6857 | +} | ||
6858 | + | ||
6859 | +export type PostOrderErpOrderStagesPayWaySaveOrUpdateResponseSuccess = | ||
6860 | + PostOrderErpOrderStagesPayWaySaveOrUpdateResponse[200]; | ||
6861 | +/** | ||
6862 | + * @description | ||
6863 | + * 修改或者保存 | ||
6864 | + * @tags order-stages-pay-way-controller | ||
6865 | + * @produces * | ||
6866 | + * @consumes application/json | ||
6867 | + */ | ||
6868 | +export const postOrderErpOrderStagesPayWaySaveOrUpdate = | ||
6869 | + /* #__PURE__ */ (() => { | ||
6870 | + const method = 'post'; | ||
6871 | + const url = '/order/erp/orderStagesPayWay/saveOrUpdate'; | ||
6872 | + function request( | ||
6873 | + option: PostOrderErpOrderStagesPayWaySaveOrUpdateOption, | ||
6874 | + ): Promise<PostOrderErpOrderStagesPayWaySaveOrUpdateResponseSuccess> { | ||
6875 | + return requester(request.url, { | ||
6876 | + method: request.method, | ||
6877 | + ...option, | ||
6878 | + }) as unknown as Promise<PostOrderErpOrderStagesPayWaySaveOrUpdateResponseSuccess>; | ||
6879 | + } | ||
6880 | + | ||
6881 | + /** http method */ | ||
6882 | + request.method = method; | ||
6883 | + /** request url */ | ||
6884 | + request.url = url; | ||
6885 | + return request; | ||
6886 | + })(); | ||
6887 | + | ||
6888 | +/** @description request parameter type for postOrderErpOrderStagesPayWaySelect */ | ||
6889 | +export interface PostOrderErpOrderStagesPayWaySelectOption { | ||
6890 | + /** | ||
6891 | + * @description | ||
6892 | + * orderStagesPayWayDo | ||
6893 | + */ | ||
6894 | + body: { | ||
6895 | + /** | ||
6896 | + @description | ||
6897 | + orderStagesPayWayDo */ | ||
6898 | + orderStagesPayWayDo: OrderStagesPayWayDo; | ||
6899 | + }; | ||
6900 | +} | ||
6901 | + | ||
6902 | +/** @description response type for postOrderErpOrderStagesPayWaySelect */ | ||
6903 | +export interface PostOrderErpOrderStagesPayWaySelectResponse { | ||
6904 | + /** | ||
6905 | + * @description | ||
6906 | + * OK | ||
6907 | + */ | ||
6908 | + 200: ServerResult; | ||
6909 | + /** | ||
6910 | + * @description | ||
6911 | + * Created | ||
6912 | + */ | ||
6913 | + 201: any; | ||
6914 | + /** | ||
6915 | + * @description | ||
6916 | + * Unauthorized | ||
6917 | + */ | ||
6918 | + 401: any; | ||
6919 | + /** | ||
6920 | + * @description | ||
6921 | + * Forbidden | ||
6922 | + */ | ||
6923 | + 403: any; | ||
6924 | + /** | ||
6925 | + * @description | ||
6926 | + * Not Found | ||
6927 | + */ | ||
6928 | + 404: any; | ||
6929 | +} | ||
6930 | + | ||
6931 | +export type PostOrderErpOrderStagesPayWaySelectResponseSuccess = | ||
6932 | + PostOrderErpOrderStagesPayWaySelectResponse[200]; | ||
6933 | +/** | ||
6934 | + * @description | ||
6935 | + * 查询该的分期比例 | ||
6936 | + * @tags order-stages-pay-way-controller | ||
6937 | + * @produces * | ||
6938 | + * @consumes application/json | ||
6939 | + */ | ||
6940 | +export const postOrderErpOrderStagesPayWaySelect = /* #__PURE__ */ (() => { | ||
6941 | + const method = 'post'; | ||
6942 | + const url = '/order/erp/orderStagesPayWay/select'; | ||
6943 | + function request( | ||
6944 | + option: PostOrderErpOrderStagesPayWaySelectOption, | ||
6945 | + ): Promise<PostOrderErpOrderStagesPayWaySelectResponseSuccess> { | ||
6946 | + return requester(request.url, { | ||
6947 | + method: request.method, | ||
6948 | + ...option, | ||
6949 | + }) as unknown as Promise<PostOrderErpOrderStagesPayWaySelectResponseSuccess>; | ||
6950 | + } | ||
6951 | + | ||
6952 | + /** http method */ | ||
6953 | + request.method = method; | ||
6954 | + /** request url */ | ||
6955 | + request.url = url; | ||
6956 | + return request; | ||
6957 | +})(); | ||
6958 | + | ||
6959 | +/** @description request parameter type for postOrderErpOrderStagesPayWayUploadForPayWay */ | ||
6960 | +export interface PostOrderErpOrderStagesPayWayUploadForPayWayOption { | ||
6961 | + /** | ||
6962 | + * @description | ||
6963 | + * orderStagesPayWayFileDo | ||
6964 | + */ | ||
6965 | + body: { | ||
6966 | + /** | ||
6967 | + @description | ||
6968 | + orderStagesPayWayFileDo */ | ||
6969 | + orderStagesPayWayFileDo: OrderStagesPayWayFileDo; | ||
6970 | + }; | ||
6971 | +} | ||
6972 | + | ||
6973 | +/** @description response type for postOrderErpOrderStagesPayWayUploadForPayWay */ | ||
6974 | +export interface PostOrderErpOrderStagesPayWayUploadForPayWayResponse { | ||
6975 | + /** | ||
6976 | + * @description | ||
6977 | + * OK | ||
6978 | + */ | ||
6979 | + 200: ServerResult; | ||
6980 | + /** | ||
6981 | + * @description | ||
6982 | + * Created | ||
6983 | + */ | ||
6984 | + 201: any; | ||
6985 | + /** | ||
6986 | + * @description | ||
6987 | + * Unauthorized | ||
6988 | + */ | ||
6989 | + 401: any; | ||
6990 | + /** | ||
6991 | + * @description | ||
6992 | + * Forbidden | ||
6993 | + */ | ||
6994 | + 403: any; | ||
6995 | + /** | ||
6996 | + * @description | ||
6997 | + * Not Found | ||
6998 | + */ | ||
6999 | + 404: any; | ||
7000 | +} | ||
7001 | + | ||
7002 | +export type PostOrderErpOrderStagesPayWayUploadForPayWayResponseSuccess = | ||
7003 | + PostOrderErpOrderStagesPayWayUploadForPayWayResponse[200]; | ||
7004 | +/** | ||
7005 | + * @description | ||
7006 | + * 付款合同文件上传 | ||
7007 | + * @tags order-stages-pay-way-controller | ||
7008 | + * @produces * | ||
7009 | + * @consumes application/json | ||
7010 | + */ | ||
7011 | +export const postOrderErpOrderStagesPayWayUploadForPayWay = | ||
7012 | + /* #__PURE__ */ (() => { | ||
7013 | + const method = 'post'; | ||
7014 | + const url = '/order/erp/orderStagesPayWay/uploadForPayWay'; | ||
7015 | + function request( | ||
7016 | + option: PostOrderErpOrderStagesPayWayUploadForPayWayOption, | ||
7017 | + ): Promise<PostOrderErpOrderStagesPayWayUploadForPayWayResponseSuccess> { | ||
7018 | + return requester(request.url, { | ||
7019 | + method: request.method, | ||
7020 | + ...option, | ||
7021 | + }) as unknown as Promise<PostOrderErpOrderStagesPayWayUploadForPayWayResponseSuccess>; | ||
7022 | + } | ||
7023 | + | ||
7024 | + /** http method */ | ||
7025 | + request.method = method; | ||
7026 | + /** request url */ | ||
7027 | + request.url = url; | ||
7028 | + return request; | ||
7029 | + })(); | ||
7030 | + | ||
7031 | +/** @description request parameter type for postOrderErpProfitAnalysis */ | ||
7032 | +export interface PostOrderErpProfitAnalysisOption { | ||
7033 | + /** | ||
7034 | + * @description | ||
7035 | + * orderProfitAnalysisVo | ||
7036 | + */ | ||
7037 | + body: { | ||
7038 | + /** | ||
7039 | + @description | ||
7040 | + orderProfitAnalysisVo */ | ||
7041 | + orderProfitAnalysisVo: OrderProfitAnalysisVo; | ||
7042 | + }; | ||
7043 | +} | ||
7044 | + | ||
7045 | +/** @description response type for postOrderErpProfitAnalysis */ | ||
7046 | +export interface PostOrderErpProfitAnalysisResponse { | ||
7047 | + /** | ||
7048 | + * @description | ||
7049 | + * OK | ||
7050 | + */ | ||
7051 | + 200: ServerResult; | ||
7052 | + /** | ||
7053 | + * @description | ||
7054 | + * Created | ||
7055 | + */ | ||
7056 | + 201: any; | ||
7057 | + /** | ||
7058 | + * @description | ||
7059 | + * Unauthorized | ||
7060 | + */ | ||
7061 | + 401: any; | ||
7062 | + /** | ||
7063 | + * @description | ||
7064 | + * Forbidden | ||
7065 | + */ | ||
7066 | + 403: any; | ||
7067 | + /** | ||
7068 | + * @description | ||
7069 | + * Not Found | ||
7070 | + */ | ||
7071 | + 404: any; | ||
7072 | +} | ||
7073 | + | ||
7074 | +export type PostOrderErpProfitAnalysisResponseSuccess = | ||
7075 | + PostOrderErpProfitAnalysisResponse[200]; | ||
7076 | +/** | ||
7077 | + * @description | ||
7078 | + * analysis | ||
7079 | + * @tags order-profit-controller | ||
7080 | + * @produces * | ||
7081 | + * @consumes application/json | ||
7082 | + */ | ||
7083 | +export const postOrderErpProfitAnalysis = /* #__PURE__ */ (() => { | ||
7084 | + const method = 'post'; | ||
7085 | + const url = '/order/erp/profit/analysis'; | ||
7086 | + function request( | ||
7087 | + option: PostOrderErpProfitAnalysisOption, | ||
7088 | + ): Promise<PostOrderErpProfitAnalysisResponseSuccess> { | ||
7089 | + return requester(request.url, { | ||
7090 | + method: request.method, | ||
7091 | + ...option, | ||
7092 | + }) as unknown as Promise<PostOrderErpProfitAnalysisResponseSuccess>; | ||
7093 | + } | ||
7094 | + | ||
7095 | + /** http method */ | ||
7096 | + request.method = method; | ||
7097 | + /** request url */ | ||
7098 | + request.url = url; | ||
7099 | + return request; | ||
7100 | +})(); | ||
7101 | + | ||
7102 | +/** @description request parameter type for postOrderErpRolesAdd */ | ||
7103 | +export interface PostOrderErpRolesAddOption { | ||
7104 | + /** | ||
7105 | + * @description | ||
7106 | + * roleVO | ||
7107 | + */ | ||
7108 | + body: { | ||
7109 | + /** | ||
7110 | + @description | ||
7111 | + roleVO */ | ||
7112 | + roleVO: AdminRoleVO; | ||
7113 | + }; | ||
7114 | +} | ||
7115 | + | ||
7116 | +/** @description response type for postOrderErpRolesAdd */ | ||
7117 | +export interface PostOrderErpRolesAddResponse { | ||
7118 | + /** | ||
7119 | + * @description | ||
7120 | + * OK | ||
7121 | + */ | ||
7122 | + 200: ServerResult; | ||
7123 | + /** | ||
7124 | + * @description | ||
7125 | + * Created | ||
7126 | + */ | ||
7127 | + 201: any; | ||
7128 | + /** | ||
7129 | + * @description | ||
7130 | + * Unauthorized | ||
7131 | + */ | ||
7132 | + 401: any; | ||
7133 | + /** | ||
7134 | + * @description | ||
7135 | + * Forbidden | ||
7136 | + */ | ||
7137 | + 403: any; | ||
7138 | + /** | ||
7139 | + * @description | ||
7140 | + * Not Found | ||
7141 | + */ | ||
7142 | + 404: any; | ||
7143 | +} | ||
7144 | + | ||
7145 | +export type PostOrderErpRolesAddResponseSuccess = | ||
7146 | + PostOrderErpRolesAddResponse[200]; | ||
7147 | +/** | ||
7148 | + * @description | ||
7149 | + * 新增角色 | ||
7150 | + * @tags 系统:角色管理 | ||
7151 | + * @produces * | ||
7152 | + * @consumes application/json | ||
7153 | + */ | ||
7154 | +export const postOrderErpRolesAdd = /* #__PURE__ */ (() => { | ||
7155 | + const method = 'post'; | ||
7156 | + const url = '/order/erp/roles/add'; | ||
7157 | + function request( | ||
7158 | + option: PostOrderErpRolesAddOption, | ||
7159 | + ): Promise<PostOrderErpRolesAddResponseSuccess> { | ||
7160 | + return requester(request.url, { | ||
7161 | + method: request.method, | ||
7162 | + ...option, | ||
7163 | + }) as unknown as Promise<PostOrderErpRolesAddResponseSuccess>; | ||
7164 | + } | ||
7165 | + | ||
7166 | + /** http method */ | ||
7167 | + request.method = method; | ||
7168 | + /** request url */ | ||
7169 | + request.url = url; | ||
7170 | + return request; | ||
7171 | +})(); | ||
7172 | + | ||
7173 | +/** @description request parameter type for postOrderErpRolesAll */ | ||
7174 | +export interface PostOrderErpRolesAllOption { | ||
7175 | + /** | ||
7176 | + * @description | ||
7177 | + * queryVO | ||
7178 | + */ | ||
7179 | + body: { | ||
7180 | + /** | ||
7181 | + @description | ||
7182 | + queryVO */ | ||
7183 | + queryVO: AdminRoleQueryVO; | ||
7184 | + }; | ||
7185 | +} | ||
7186 | + | ||
7187 | +/** @description response type for postOrderErpRolesAll */ | ||
7188 | +export interface PostOrderErpRolesAllResponse { | ||
7189 | + /** | ||
7190 | + * @description | ||
7191 | + * OK | ||
7192 | + */ | ||
7193 | + 200: ServerResult; | ||
7194 | + /** | ||
7195 | + * @description | ||
7196 | + * Created | ||
7197 | + */ | ||
7198 | + 201: any; | ||
7199 | + /** | ||
7200 | + * @description | ||
7201 | + * Unauthorized | ||
7202 | + */ | ||
7203 | + 401: any; | ||
7204 | + /** | ||
7205 | + * @description | ||
7206 | + * Forbidden | ||
7207 | + */ | ||
7208 | + 403: any; | ||
7209 | + /** | ||
7210 | + * @description | ||
7211 | + * Not Found | ||
7212 | + */ | ||
7213 | + 404: any; | ||
7214 | +} | ||
7215 | + | ||
7216 | +export type PostOrderErpRolesAllResponseSuccess = | ||
7217 | + PostOrderErpRolesAllResponse[200]; | ||
7218 | +/** | ||
7219 | + * @description | ||
7220 | + * 返回全部的角色 | ||
7221 | + * @tags 系统:角色管理 | ||
7222 | + * @produces * | ||
7223 | + * @consumes application/json | ||
7224 | + */ | ||
7225 | +export const postOrderErpRolesAll = /* #__PURE__ */ (() => { | ||
7226 | + const method = 'post'; | ||
7227 | + const url = '/order/erp/roles/all'; | ||
7228 | + function request( | ||
7229 | + option: PostOrderErpRolesAllOption, | ||
7230 | + ): Promise<PostOrderErpRolesAllResponseSuccess> { | ||
7231 | + return requester(request.url, { | ||
7232 | + method: request.method, | ||
7233 | + ...option, | ||
7234 | + }) as unknown as Promise<PostOrderErpRolesAllResponseSuccess>; | ||
6272 | } | 7235 | } |
6273 | 7236 | ||
6274 | /** http method */ | 7237 | /** http method */ |
@@ -6282,18 +7245,941 @@ export const postOrderErpRolesAll = /* #__PURE__ */ (() => { | @@ -6282,18 +7245,941 @@ export const postOrderErpRolesAll = /* #__PURE__ */ (() => { | ||
6282 | export interface PostOrderErpRolesAuthMenuOption { | 7245 | export interface PostOrderErpRolesAuthMenuOption { |
6283 | /** | 7246 | /** |
6284 | * @description | 7247 | * @description |
6285 | - * roleVO | 7248 | + * roleVO |
7249 | + */ | ||
7250 | + body: { | ||
7251 | + /** | ||
7252 | + @description | ||
7253 | + roleVO */ | ||
7254 | + roleVO: AdminAuthRoleVO; | ||
7255 | + }; | ||
7256 | +} | ||
7257 | + | ||
7258 | +/** @description response type for postOrderErpRolesAuthMenu */ | ||
7259 | +export interface PostOrderErpRolesAuthMenuResponse { | ||
7260 | + /** | ||
7261 | + * @description | ||
7262 | + * OK | ||
7263 | + */ | ||
7264 | + 200: ServerResult; | ||
7265 | + /** | ||
7266 | + * @description | ||
7267 | + * Created | ||
7268 | + */ | ||
7269 | + 201: any; | ||
7270 | + /** | ||
7271 | + * @description | ||
7272 | + * Unauthorized | ||
7273 | + */ | ||
7274 | + 401: any; | ||
7275 | + /** | ||
7276 | + * @description | ||
7277 | + * Forbidden | ||
7278 | + */ | ||
7279 | + 403: any; | ||
7280 | + /** | ||
7281 | + * @description | ||
7282 | + * Not Found | ||
7283 | + */ | ||
7284 | + 404: any; | ||
7285 | +} | ||
7286 | + | ||
7287 | +export type PostOrderErpRolesAuthMenuResponseSuccess = | ||
7288 | + PostOrderErpRolesAuthMenuResponse[200]; | ||
7289 | +/** | ||
7290 | + * @description | ||
7291 | + * 授权角色菜单 | ||
7292 | + * @tags 系统:角色管理 | ||
7293 | + * @produces * | ||
7294 | + * @consumes application/json | ||
7295 | + */ | ||
7296 | +export const postOrderErpRolesAuthMenu = /* #__PURE__ */ (() => { | ||
7297 | + const method = 'post'; | ||
7298 | + const url = '/order/erp/roles/auth_menu'; | ||
7299 | + function request( | ||
7300 | + option: PostOrderErpRolesAuthMenuOption, | ||
7301 | + ): Promise<PostOrderErpRolesAuthMenuResponseSuccess> { | ||
7302 | + return requester(request.url, { | ||
7303 | + method: request.method, | ||
7304 | + ...option, | ||
7305 | + }) as unknown as Promise<PostOrderErpRolesAuthMenuResponseSuccess>; | ||
7306 | + } | ||
7307 | + | ||
7308 | + /** http method */ | ||
7309 | + request.method = method; | ||
7310 | + /** request url */ | ||
7311 | + request.url = url; | ||
7312 | + return request; | ||
7313 | +})(); | ||
7314 | + | ||
7315 | +/** @description request parameter type for postOrderErpRolesDelete */ | ||
7316 | +export interface PostOrderErpRolesDeleteOption { | ||
7317 | + /** | ||
7318 | + * @description | ||
7319 | + * queryVO | ||
7320 | + */ | ||
7321 | + body: { | ||
7322 | + /** | ||
7323 | + @description | ||
7324 | + queryVO */ | ||
7325 | + queryVO: AdminRoleQueryVO; | ||
7326 | + }; | ||
7327 | +} | ||
7328 | + | ||
7329 | +/** @description response type for postOrderErpRolesDelete */ | ||
7330 | +export interface PostOrderErpRolesDeleteResponse { | ||
7331 | + /** | ||
7332 | + * @description | ||
7333 | + * OK | ||
7334 | + */ | ||
7335 | + 200: ServerResult; | ||
7336 | + /** | ||
7337 | + * @description | ||
7338 | + * Created | ||
7339 | + */ | ||
7340 | + 201: any; | ||
7341 | + /** | ||
7342 | + * @description | ||
7343 | + * Unauthorized | ||
7344 | + */ | ||
7345 | + 401: any; | ||
7346 | + /** | ||
7347 | + * @description | ||
7348 | + * Forbidden | ||
7349 | + */ | ||
7350 | + 403: any; | ||
7351 | + /** | ||
7352 | + * @description | ||
7353 | + * Not Found | ||
7354 | + */ | ||
7355 | + 404: any; | ||
7356 | +} | ||
7357 | + | ||
7358 | +export type PostOrderErpRolesDeleteResponseSuccess = | ||
7359 | + PostOrderErpRolesDeleteResponse[200]; | ||
7360 | +/** | ||
7361 | + * @description | ||
7362 | + * 删除角色 | ||
7363 | + * @tags 系统:角色管理 | ||
7364 | + * @produces * | ||
7365 | + * @consumes application/json | ||
7366 | + */ | ||
7367 | +export const postOrderErpRolesDelete = /* #__PURE__ */ (() => { | ||
7368 | + const method = 'post'; | ||
7369 | + const url = '/order/erp/roles/delete'; | ||
7370 | + function request( | ||
7371 | + option: PostOrderErpRolesDeleteOption, | ||
7372 | + ): Promise<PostOrderErpRolesDeleteResponseSuccess> { | ||
7373 | + return requester(request.url, { | ||
7374 | + method: request.method, | ||
7375 | + ...option, | ||
7376 | + }) as unknown as Promise<PostOrderErpRolesDeleteResponseSuccess>; | ||
7377 | + } | ||
7378 | + | ||
7379 | + /** http method */ | ||
7380 | + request.method = method; | ||
7381 | + /** request url */ | ||
7382 | + request.url = url; | ||
7383 | + return request; | ||
7384 | +})(); | ||
7385 | + | ||
7386 | +/** @description request parameter type for postOrderErpRolesDetail */ | ||
7387 | +export interface PostOrderErpRolesDetailOption { | ||
7388 | + /** | ||
7389 | + * @description | ||
7390 | + * queryVO | ||
7391 | + */ | ||
7392 | + body: { | ||
7393 | + /** | ||
7394 | + @description | ||
7395 | + queryVO */ | ||
7396 | + queryVO: AdminRoleQueryVO; | ||
7397 | + }; | ||
7398 | +} | ||
7399 | + | ||
7400 | +/** @description response type for postOrderErpRolesDetail */ | ||
7401 | +export interface PostOrderErpRolesDetailResponse { | ||
7402 | + /** | ||
7403 | + * @description | ||
7404 | + * OK | ||
7405 | + */ | ||
7406 | + 200: ServerResult; | ||
7407 | + /** | ||
7408 | + * @description | ||
7409 | + * Created | ||
7410 | + */ | ||
7411 | + 201: any; | ||
7412 | + /** | ||
7413 | + * @description | ||
7414 | + * Unauthorized | ||
7415 | + */ | ||
7416 | + 401: any; | ||
7417 | + /** | ||
7418 | + * @description | ||
7419 | + * Forbidden | ||
7420 | + */ | ||
7421 | + 403: any; | ||
7422 | + /** | ||
7423 | + * @description | ||
7424 | + * Not Found | ||
7425 | + */ | ||
7426 | + 404: any; | ||
7427 | +} | ||
7428 | + | ||
7429 | +export type PostOrderErpRolesDetailResponseSuccess = | ||
7430 | + PostOrderErpRolesDetailResponse[200]; | ||
7431 | +/** | ||
7432 | + * @description | ||
7433 | + * 获取单个role | ||
7434 | + * @tags 系统:角色管理 | ||
7435 | + * @produces * | ||
7436 | + * @consumes application/json | ||
7437 | + */ | ||
7438 | +export const postOrderErpRolesDetail = /* #__PURE__ */ (() => { | ||
7439 | + const method = 'post'; | ||
7440 | + const url = '/order/erp/roles/detail'; | ||
7441 | + function request( | ||
7442 | + option: PostOrderErpRolesDetailOption, | ||
7443 | + ): Promise<PostOrderErpRolesDetailResponseSuccess> { | ||
7444 | + return requester(request.url, { | ||
7445 | + method: request.method, | ||
7446 | + ...option, | ||
7447 | + }) as unknown as Promise<PostOrderErpRolesDetailResponseSuccess>; | ||
7448 | + } | ||
7449 | + | ||
7450 | + /** http method */ | ||
7451 | + request.method = method; | ||
7452 | + /** request url */ | ||
7453 | + request.url = url; | ||
7454 | + return request; | ||
7455 | +})(); | ||
7456 | + | ||
7457 | +/** @description request parameter type for postOrderErpRolesEdit */ | ||
7458 | +export interface PostOrderErpRolesEditOption { | ||
7459 | + /** | ||
7460 | + * @description | ||
7461 | + * roleVO | ||
7462 | + */ | ||
7463 | + body: { | ||
7464 | + /** | ||
7465 | + @description | ||
7466 | + roleVO */ | ||
7467 | + roleVO: AdminRoleVO; | ||
7468 | + }; | ||
7469 | +} | ||
7470 | + | ||
7471 | +/** @description response type for postOrderErpRolesEdit */ | ||
7472 | +export interface PostOrderErpRolesEditResponse { | ||
7473 | + /** | ||
7474 | + * @description | ||
7475 | + * OK | ||
7476 | + */ | ||
7477 | + 200: ServerResult; | ||
7478 | + /** | ||
7479 | + * @description | ||
7480 | + * Created | ||
7481 | + */ | ||
7482 | + 201: any; | ||
7483 | + /** | ||
7484 | + * @description | ||
7485 | + * Unauthorized | ||
7486 | + */ | ||
7487 | + 401: any; | ||
7488 | + /** | ||
7489 | + * @description | ||
7490 | + * Forbidden | ||
7491 | + */ | ||
7492 | + 403: any; | ||
7493 | + /** | ||
7494 | + * @description | ||
7495 | + * Not Found | ||
7496 | + */ | ||
7497 | + 404: any; | ||
7498 | +} | ||
7499 | + | ||
7500 | +export type PostOrderErpRolesEditResponseSuccess = | ||
7501 | + PostOrderErpRolesEditResponse[200]; | ||
7502 | +/** | ||
7503 | + * @description | ||
7504 | + * 修改角色 | ||
7505 | + * @tags 系统:角色管理 | ||
7506 | + * @produces * | ||
7507 | + * @consumes application/json | ||
7508 | + */ | ||
7509 | +export const postOrderErpRolesEdit = /* #__PURE__ */ (() => { | ||
7510 | + const method = 'post'; | ||
7511 | + const url = '/order/erp/roles/edit'; | ||
7512 | + function request( | ||
7513 | + option: PostOrderErpRolesEditOption, | ||
7514 | + ): Promise<PostOrderErpRolesEditResponseSuccess> { | ||
7515 | + return requester(request.url, { | ||
7516 | + method: request.method, | ||
7517 | + ...option, | ||
7518 | + }) as unknown as Promise<PostOrderErpRolesEditResponseSuccess>; | ||
7519 | + } | ||
7520 | + | ||
7521 | + /** http method */ | ||
7522 | + request.method = method; | ||
7523 | + /** request url */ | ||
7524 | + request.url = url; | ||
7525 | + return request; | ||
7526 | +})(); | ||
7527 | + | ||
7528 | +/** @description request parameter type for postOrderErpRolesListByPage */ | ||
7529 | +export interface PostOrderErpRolesListByPageOption { | ||
7530 | + /** | ||
7531 | + * @description | ||
7532 | + * queryVO | ||
7533 | + */ | ||
7534 | + body: { | ||
7535 | + /** | ||
7536 | + @description | ||
7537 | + queryVO */ | ||
7538 | + queryVO: AdminRoleQueryVO; | ||
7539 | + }; | ||
7540 | +} | ||
7541 | + | ||
7542 | +/** @description response type for postOrderErpRolesListByPage */ | ||
7543 | +export interface PostOrderErpRolesListByPageResponse { | ||
7544 | + /** | ||
7545 | + * @description | ||
7546 | + * OK | ||
7547 | + */ | ||
7548 | + 200: ServerResult; | ||
7549 | + /** | ||
7550 | + * @description | ||
7551 | + * Created | ||
7552 | + */ | ||
7553 | + 201: any; | ||
7554 | + /** | ||
7555 | + * @description | ||
7556 | + * Unauthorized | ||
7557 | + */ | ||
7558 | + 401: any; | ||
7559 | + /** | ||
7560 | + * @description | ||
7561 | + * Forbidden | ||
7562 | + */ | ||
7563 | + 403: any; | ||
7564 | + /** | ||
7565 | + * @description | ||
7566 | + * Not Found | ||
7567 | + */ | ||
7568 | + 404: any; | ||
7569 | +} | ||
7570 | + | ||
7571 | +export type PostOrderErpRolesListByPageResponseSuccess = | ||
7572 | + PostOrderErpRolesListByPageResponse[200]; | ||
7573 | +/** | ||
7574 | + * @description | ||
7575 | + * 查询角色 | ||
7576 | + * @tags 系统:角色管理 | ||
7577 | + * @produces * | ||
7578 | + * @consumes application/json | ||
7579 | + */ | ||
7580 | +export const postOrderErpRolesListByPage = /* #__PURE__ */ (() => { | ||
7581 | + const method = 'post'; | ||
7582 | + const url = '/order/erp/roles/list_by_page'; | ||
7583 | + function request( | ||
7584 | + option: PostOrderErpRolesListByPageOption, | ||
7585 | + ): Promise<PostOrderErpRolesListByPageResponseSuccess> { | ||
7586 | + return requester(request.url, { | ||
7587 | + method: request.method, | ||
7588 | + ...option, | ||
7589 | + }) as unknown as Promise<PostOrderErpRolesListByPageResponseSuccess>; | ||
7590 | + } | ||
7591 | + | ||
7592 | + /** http method */ | ||
7593 | + request.method = method; | ||
7594 | + /** request url */ | ||
7595 | + request.url = url; | ||
7596 | + return request; | ||
7597 | +})(); | ||
7598 | + | ||
7599 | +/** @description request parameter type for postOrderErpUsersAdd */ | ||
7600 | +export interface PostOrderErpUsersAddOption { | ||
7601 | + /** | ||
7602 | + * @description | ||
7603 | + * userVO | ||
7604 | + */ | ||
7605 | + body: { | ||
7606 | + /** | ||
7607 | + @description | ||
7608 | + userVO */ | ||
7609 | + userVO: AdminUserVO; | ||
7610 | + }; | ||
7611 | +} | ||
7612 | + | ||
7613 | +/** @description response type for postOrderErpUsersAdd */ | ||
7614 | +export interface PostOrderErpUsersAddResponse { | ||
7615 | + /** | ||
7616 | + * @description | ||
7617 | + * OK | ||
7618 | + */ | ||
7619 | + 200: ServerResult; | ||
7620 | + /** | ||
7621 | + * @description | ||
7622 | + * Created | ||
7623 | + */ | ||
7624 | + 201: any; | ||
7625 | + /** | ||
7626 | + * @description | ||
7627 | + * Unauthorized | ||
7628 | + */ | ||
7629 | + 401: any; | ||
7630 | + /** | ||
7631 | + * @description | ||
7632 | + * Forbidden | ||
7633 | + */ | ||
7634 | + 403: any; | ||
7635 | + /** | ||
7636 | + * @description | ||
7637 | + * Not Found | ||
7638 | + */ | ||
7639 | + 404: any; | ||
7640 | +} | ||
7641 | + | ||
7642 | +export type PostOrderErpUsersAddResponseSuccess = | ||
7643 | + PostOrderErpUsersAddResponse[200]; | ||
7644 | +/** | ||
7645 | + * @description | ||
7646 | + * 新增用户 | ||
7647 | + * @tags 系统:用户管理 | ||
7648 | + * @produces * | ||
7649 | + * @consumes application/json | ||
7650 | + */ | ||
7651 | +export const postOrderErpUsersAdd = /* #__PURE__ */ (() => { | ||
7652 | + const method = 'post'; | ||
7653 | + const url = '/order/erp/users/add'; | ||
7654 | + function request( | ||
7655 | + option: PostOrderErpUsersAddOption, | ||
7656 | + ): Promise<PostOrderErpUsersAddResponseSuccess> { | ||
7657 | + return requester(request.url, { | ||
7658 | + method: request.method, | ||
7659 | + ...option, | ||
7660 | + }) as unknown as Promise<PostOrderErpUsersAddResponseSuccess>; | ||
7661 | + } | ||
7662 | + | ||
7663 | + /** http method */ | ||
7664 | + request.method = method; | ||
7665 | + /** request url */ | ||
7666 | + request.url = url; | ||
7667 | + return request; | ||
7668 | +})(); | ||
7669 | + | ||
7670 | +/** @description request parameter type for postOrderErpUsersAuthRole */ | ||
7671 | +export interface PostOrderErpUsersAuthRoleOption { | ||
7672 | + /** | ||
7673 | + * @description | ||
7674 | + * userVO | ||
7675 | + */ | ||
7676 | + body: { | ||
7677 | + /** | ||
7678 | + @description | ||
7679 | + userVO */ | ||
7680 | + userVO: AdminAuthUserVO; | ||
7681 | + }; | ||
7682 | +} | ||
7683 | + | ||
7684 | +/** @description response type for postOrderErpUsersAuthRole */ | ||
7685 | +export interface PostOrderErpUsersAuthRoleResponse { | ||
7686 | + /** | ||
7687 | + * @description | ||
7688 | + * OK | ||
7689 | + */ | ||
7690 | + 200: ServerResult; | ||
7691 | + /** | ||
7692 | + * @description | ||
7693 | + * Created | ||
7694 | + */ | ||
7695 | + 201: any; | ||
7696 | + /** | ||
7697 | + * @description | ||
7698 | + * Unauthorized | ||
7699 | + */ | ||
7700 | + 401: any; | ||
7701 | + /** | ||
7702 | + * @description | ||
7703 | + * Forbidden | ||
7704 | + */ | ||
7705 | + 403: any; | ||
7706 | + /** | ||
7707 | + * @description | ||
7708 | + * Not Found | ||
7709 | + */ | ||
7710 | + 404: any; | ||
7711 | +} | ||
7712 | + | ||
7713 | +export type PostOrderErpUsersAuthRoleResponseSuccess = | ||
7714 | + PostOrderErpUsersAuthRoleResponse[200]; | ||
7715 | +/** | ||
7716 | + * @description | ||
7717 | + * 授权角色 | ||
7718 | + * @tags 系统:用户管理 | ||
7719 | + * @produces * | ||
7720 | + * @consumes application/json | ||
7721 | + */ | ||
7722 | +export const postOrderErpUsersAuthRole = /* #__PURE__ */ (() => { | ||
7723 | + const method = 'post'; | ||
7724 | + const url = '/order/erp/users/auth_role'; | ||
7725 | + function request( | ||
7726 | + option: PostOrderErpUsersAuthRoleOption, | ||
7727 | + ): Promise<PostOrderErpUsersAuthRoleResponseSuccess> { | ||
7728 | + return requester(request.url, { | ||
7729 | + method: request.method, | ||
7730 | + ...option, | ||
7731 | + }) as unknown as Promise<PostOrderErpUsersAuthRoleResponseSuccess>; | ||
7732 | + } | ||
7733 | + | ||
7734 | + /** http method */ | ||
7735 | + request.method = method; | ||
7736 | + /** request url */ | ||
7737 | + request.url = url; | ||
7738 | + return request; | ||
7739 | +})(); | ||
7740 | + | ||
7741 | +/** @description request parameter type for postOrderErpUsersDelete */ | ||
7742 | +export interface PostOrderErpUsersDeleteOption { | ||
7743 | + /** | ||
7744 | + * @description | ||
7745 | + * queryVO | ||
7746 | + */ | ||
7747 | + body: { | ||
7748 | + /** | ||
7749 | + @description | ||
7750 | + queryVO */ | ||
7751 | + queryVO: AdminUserQueryVO; | ||
7752 | + }; | ||
7753 | +} | ||
7754 | + | ||
7755 | +/** @description response type for postOrderErpUsersDelete */ | ||
7756 | +export interface PostOrderErpUsersDeleteResponse { | ||
7757 | + /** | ||
7758 | + * @description | ||
7759 | + * OK | ||
7760 | + */ | ||
7761 | + 200: ServerResult; | ||
7762 | + /** | ||
7763 | + * @description | ||
7764 | + * Created | ||
7765 | + */ | ||
7766 | + 201: any; | ||
7767 | + /** | ||
7768 | + * @description | ||
7769 | + * Unauthorized | ||
7770 | + */ | ||
7771 | + 401: any; | ||
7772 | + /** | ||
7773 | + * @description | ||
7774 | + * Forbidden | ||
7775 | + */ | ||
7776 | + 403: any; | ||
7777 | + /** | ||
7778 | + * @description | ||
7779 | + * Not Found | ||
7780 | + */ | ||
7781 | + 404: any; | ||
7782 | +} | ||
7783 | + | ||
7784 | +export type PostOrderErpUsersDeleteResponseSuccess = | ||
7785 | + PostOrderErpUsersDeleteResponse[200]; | ||
7786 | +/** | ||
7787 | + * @description | ||
7788 | + * 删除用户 | ||
7789 | + * @tags 系统:用户管理 | ||
7790 | + * @produces * | ||
7791 | + * @consumes application/json | ||
7792 | + */ | ||
7793 | +export const postOrderErpUsersDelete = /* #__PURE__ */ (() => { | ||
7794 | + const method = 'post'; | ||
7795 | + const url = '/order/erp/users/delete'; | ||
7796 | + function request( | ||
7797 | + option: PostOrderErpUsersDeleteOption, | ||
7798 | + ): Promise<PostOrderErpUsersDeleteResponseSuccess> { | ||
7799 | + return requester(request.url, { | ||
7800 | + method: request.method, | ||
7801 | + ...option, | ||
7802 | + }) as unknown as Promise<PostOrderErpUsersDeleteResponseSuccess>; | ||
7803 | + } | ||
7804 | + | ||
7805 | + /** http method */ | ||
7806 | + request.method = method; | ||
7807 | + /** request url */ | ||
7808 | + request.url = url; | ||
7809 | + return request; | ||
7810 | +})(); | ||
7811 | + | ||
7812 | +/** @description request parameter type for postOrderErpUsersEdit */ | ||
7813 | +export interface PostOrderErpUsersEditOption { | ||
7814 | + /** | ||
7815 | + * @description | ||
7816 | + * userVO | ||
7817 | + */ | ||
7818 | + body: { | ||
7819 | + /** | ||
7820 | + @description | ||
7821 | + userVO */ | ||
7822 | + userVO: AdminUserVO; | ||
7823 | + }; | ||
7824 | +} | ||
7825 | + | ||
7826 | +/** @description response type for postOrderErpUsersEdit */ | ||
7827 | +export interface PostOrderErpUsersEditResponse { | ||
7828 | + /** | ||
7829 | + * @description | ||
7830 | + * OK | ||
7831 | + */ | ||
7832 | + 200: ServerResult; | ||
7833 | + /** | ||
7834 | + * @description | ||
7835 | + * Created | ||
7836 | + */ | ||
7837 | + 201: any; | ||
7838 | + /** | ||
7839 | + * @description | ||
7840 | + * Unauthorized | ||
7841 | + */ | ||
7842 | + 401: any; | ||
7843 | + /** | ||
7844 | + * @description | ||
7845 | + * Forbidden | ||
7846 | + */ | ||
7847 | + 403: any; | ||
7848 | + /** | ||
7849 | + * @description | ||
7850 | + * Not Found | ||
7851 | + */ | ||
7852 | + 404: any; | ||
7853 | +} | ||
7854 | + | ||
7855 | +export type PostOrderErpUsersEditResponseSuccess = | ||
7856 | + PostOrderErpUsersEditResponse[200]; | ||
7857 | +/** | ||
7858 | + * @description | ||
7859 | + * 修改用户 | ||
7860 | + * @tags 系统:用户管理 | ||
7861 | + * @produces * | ||
7862 | + * @consumes application/json | ||
7863 | + */ | ||
7864 | +export const postOrderErpUsersEdit = /* #__PURE__ */ (() => { | ||
7865 | + const method = 'post'; | ||
7866 | + const url = '/order/erp/users/edit'; | ||
7867 | + function request( | ||
7868 | + option: PostOrderErpUsersEditOption, | ||
7869 | + ): Promise<PostOrderErpUsersEditResponseSuccess> { | ||
7870 | + return requester(request.url, { | ||
7871 | + method: request.method, | ||
7872 | + ...option, | ||
7873 | + }) as unknown as Promise<PostOrderErpUsersEditResponseSuccess>; | ||
7874 | + } | ||
7875 | + | ||
7876 | + /** http method */ | ||
7877 | + request.method = method; | ||
7878 | + /** request url */ | ||
7879 | + request.url = url; | ||
7880 | + return request; | ||
7881 | +})(); | ||
7882 | + | ||
7883 | +/** @description request parameter type for postOrderErpUsersListByPage */ | ||
7884 | +export interface PostOrderErpUsersListByPageOption { | ||
7885 | + /** | ||
7886 | + * @description | ||
7887 | + * queryVO | ||
7888 | + */ | ||
7889 | + body: { | ||
7890 | + /** | ||
7891 | + @description | ||
7892 | + queryVO */ | ||
7893 | + queryVO: AdminUserQueryVO; | ||
7894 | + }; | ||
7895 | +} | ||
7896 | + | ||
7897 | +/** @description response type for postOrderErpUsersListByPage */ | ||
7898 | +export interface PostOrderErpUsersListByPageResponse { | ||
7899 | + /** | ||
7900 | + * @description | ||
7901 | + * OK | ||
7902 | + */ | ||
7903 | + 200: ServerResult; | ||
7904 | + /** | ||
7905 | + * @description | ||
7906 | + * Created | ||
7907 | + */ | ||
7908 | + 201: any; | ||
7909 | + /** | ||
7910 | + * @description | ||
7911 | + * Unauthorized | ||
7912 | + */ | ||
7913 | + 401: any; | ||
7914 | + /** | ||
7915 | + * @description | ||
7916 | + * Forbidden | ||
7917 | + */ | ||
7918 | + 403: any; | ||
7919 | + /** | ||
7920 | + * @description | ||
7921 | + * Not Found | ||
7922 | + */ | ||
7923 | + 404: any; | ||
7924 | +} | ||
7925 | + | ||
7926 | +export type PostOrderErpUsersListByPageResponseSuccess = | ||
7927 | + PostOrderErpUsersListByPageResponse[200]; | ||
7928 | +/** | ||
7929 | + * @description | ||
7930 | + * 查询用户 | ||
7931 | + * @tags 系统:用户管理 | ||
7932 | + * @produces * | ||
7933 | + * @consumes application/json | ||
7934 | + */ | ||
7935 | +export const postOrderErpUsersListByPage = /* #__PURE__ */ (() => { | ||
7936 | + const method = 'post'; | ||
7937 | + const url = '/order/erp/users/list_by_page'; | ||
7938 | + function request( | ||
7939 | + option: PostOrderErpUsersListByPageOption, | ||
7940 | + ): Promise<PostOrderErpUsersListByPageResponseSuccess> { | ||
7941 | + return requester(request.url, { | ||
7942 | + method: request.method, | ||
7943 | + ...option, | ||
7944 | + }) as unknown as Promise<PostOrderErpUsersListByPageResponseSuccess>; | ||
7945 | + } | ||
7946 | + | ||
7947 | + /** http method */ | ||
7948 | + request.method = method; | ||
7949 | + /** request url */ | ||
7950 | + request.url = url; | ||
7951 | + return request; | ||
7952 | +})(); | ||
7953 | + | ||
7954 | +/** @description request parameter type for postOrderErpUsersReset */ | ||
7955 | +export interface PostOrderErpUsersResetOption { | ||
7956 | + /** | ||
7957 | + * @description | ||
7958 | + * resetPwdVO | ||
7959 | + */ | ||
7960 | + body: { | ||
7961 | + /** | ||
7962 | + @description | ||
7963 | + resetPwdVO */ | ||
7964 | + resetPwdVO: ResetPwdVO; | ||
7965 | + }; | ||
7966 | +} | ||
7967 | + | ||
7968 | +/** @description response type for postOrderErpUsersReset */ | ||
7969 | +export interface PostOrderErpUsersResetResponse { | ||
7970 | + /** | ||
7971 | + * @description | ||
7972 | + * OK | ||
7973 | + */ | ||
7974 | + 200: ServerResult; | ||
7975 | + /** | ||
7976 | + * @description | ||
7977 | + * Created | ||
7978 | + */ | ||
7979 | + 201: any; | ||
7980 | + /** | ||
7981 | + * @description | ||
7982 | + * Unauthorized | ||
7983 | + */ | ||
7984 | + 401: any; | ||
7985 | + /** | ||
7986 | + * @description | ||
7987 | + * Forbidden | ||
7988 | + */ | ||
7989 | + 403: any; | ||
7990 | + /** | ||
7991 | + * @description | ||
7992 | + * Not Found | ||
7993 | + */ | ||
7994 | + 404: any; | ||
7995 | +} | ||
7996 | + | ||
7997 | +export type PostOrderErpUsersResetResponseSuccess = | ||
7998 | + PostOrderErpUsersResetResponse[200]; | ||
7999 | +/** | ||
8000 | + * @description | ||
8001 | + * 重置密码 | ||
8002 | + * @tags 系统:用户管理 | ||
8003 | + * @produces * | ||
8004 | + * @consumes application/json | ||
8005 | + */ | ||
8006 | +export const postOrderErpUsersReset = /* #__PURE__ */ (() => { | ||
8007 | + const method = 'post'; | ||
8008 | + const url = '/order/erp/users/reset'; | ||
8009 | + function request( | ||
8010 | + option: PostOrderErpUsersResetOption, | ||
8011 | + ): Promise<PostOrderErpUsersResetResponseSuccess> { | ||
8012 | + return requester(request.url, { | ||
8013 | + method: request.method, | ||
8014 | + ...option, | ||
8015 | + }) as unknown as Promise<PostOrderErpUsersResetResponseSuccess>; | ||
8016 | + } | ||
8017 | + | ||
8018 | + /** http method */ | ||
8019 | + request.method = method; | ||
8020 | + /** request url */ | ||
8021 | + request.url = url; | ||
8022 | + return request; | ||
8023 | +})(); | ||
8024 | + | ||
8025 | +/** @description request parameter type for postOrderErpUsersUpdatePass */ | ||
8026 | +export interface PostOrderErpUsersUpdatePassOption { | ||
8027 | + /** | ||
8028 | + * @description | ||
8029 | + * pwdVO | ||
8030 | + */ | ||
8031 | + body: { | ||
8032 | + /** | ||
8033 | + @description | ||
8034 | + pwdVO */ | ||
8035 | + pwdVO: UpdatePwdVO; | ||
8036 | + }; | ||
8037 | +} | ||
8038 | + | ||
8039 | +/** @description response type for postOrderErpUsersUpdatePass */ | ||
8040 | +export interface PostOrderErpUsersUpdatePassResponse { | ||
8041 | + /** | ||
8042 | + * @description | ||
8043 | + * OK | ||
8044 | + */ | ||
8045 | + 200: ServerResult; | ||
8046 | + /** | ||
8047 | + * @description | ||
8048 | + * Created | ||
8049 | + */ | ||
8050 | + 201: any; | ||
8051 | + /** | ||
8052 | + * @description | ||
8053 | + * Unauthorized | ||
8054 | + */ | ||
8055 | + 401: any; | ||
8056 | + /** | ||
8057 | + * @description | ||
8058 | + * Forbidden | ||
8059 | + */ | ||
8060 | + 403: any; | ||
8061 | + /** | ||
8062 | + * @description | ||
8063 | + * Not Found | ||
8064 | + */ | ||
8065 | + 404: any; | ||
8066 | +} | ||
8067 | + | ||
8068 | +export type PostOrderErpUsersUpdatePassResponseSuccess = | ||
8069 | + PostOrderErpUsersUpdatePassResponse[200]; | ||
8070 | +/** | ||
8071 | + * @description | ||
8072 | + * 修改密码 | ||
8073 | + * @tags 系统:用户管理 | ||
8074 | + * @produces * | ||
8075 | + * @consumes application/json | ||
8076 | + */ | ||
8077 | +export const postOrderErpUsersUpdatePass = /* #__PURE__ */ (() => { | ||
8078 | + const method = 'post'; | ||
8079 | + const url = '/order/erp/users/update_pass'; | ||
8080 | + function request( | ||
8081 | + option: PostOrderErpUsersUpdatePassOption, | ||
8082 | + ): Promise<PostOrderErpUsersUpdatePassResponseSuccess> { | ||
8083 | + return requester(request.url, { | ||
8084 | + method: request.method, | ||
8085 | + ...option, | ||
8086 | + }) as unknown as Promise<PostOrderErpUsersUpdatePassResponseSuccess>; | ||
8087 | + } | ||
8088 | + | ||
8089 | + /** http method */ | ||
8090 | + request.method = method; | ||
8091 | + /** request url */ | ||
8092 | + request.url = url; | ||
8093 | + return request; | ||
8094 | +})(); | ||
8095 | + | ||
8096 | +/** @description request parameter type for postOrderImportImportWeightAndVolume */ | ||
8097 | +export interface PostOrderImportImportWeightAndVolumeOption { | ||
8098 | + /** | ||
8099 | + * @description | ||
8100 | + * file | ||
8101 | + */ | ||
8102 | + formData: { | ||
8103 | + /** | ||
8104 | + @description | ||
8105 | + file */ | ||
8106 | + file: File; | ||
8107 | + }; | ||
8108 | +} | ||
8109 | + | ||
8110 | +/** @description response type for postOrderImportImportWeightAndVolume */ | ||
8111 | +export interface PostOrderImportImportWeightAndVolumeResponse { | ||
8112 | + /** | ||
8113 | + * @description | ||
8114 | + * OK | ||
8115 | + */ | ||
8116 | + 200: ServerResult; | ||
8117 | + /** | ||
8118 | + * @description | ||
8119 | + * Created | ||
8120 | + */ | ||
8121 | + 201: any; | ||
8122 | + /** | ||
8123 | + * @description | ||
8124 | + * Unauthorized | ||
8125 | + */ | ||
8126 | + 401: any; | ||
8127 | + /** | ||
8128 | + * @description | ||
8129 | + * Forbidden | ||
8130 | + */ | ||
8131 | + 403: any; | ||
8132 | + /** | ||
8133 | + * @description | ||
8134 | + * Not Found | ||
8135 | + */ | ||
8136 | + 404: any; | ||
8137 | +} | ||
8138 | + | ||
8139 | +export type PostOrderImportImportWeightAndVolumeResponseSuccess = | ||
8140 | + PostOrderImportImportWeightAndVolumeResponse[200]; | ||
8141 | +/** | ||
8142 | + * @description | ||
8143 | + * 导入重量和体积 | ||
8144 | + * @tags 导入 | ||
8145 | + * @produces * | ||
8146 | + * @consumes multipart/form-data | ||
8147 | + */ | ||
8148 | +export const postOrderImportImportWeightAndVolume = /* #__PURE__ */ (() => { | ||
8149 | + const method = 'post'; | ||
8150 | + const url = '/order/import/importWeightAndVolume'; | ||
8151 | + function request( | ||
8152 | + option: PostOrderImportImportWeightAndVolumeOption, | ||
8153 | + ): Promise<PostOrderImportImportWeightAndVolumeResponseSuccess> { | ||
8154 | + return requester(request.url, { | ||
8155 | + method: request.method, | ||
8156 | + ...option, | ||
8157 | + }) as unknown as Promise<PostOrderImportImportWeightAndVolumeResponseSuccess>; | ||
8158 | + } | ||
8159 | + | ||
8160 | + /** http method */ | ||
8161 | + request.method = method; | ||
8162 | + /** request url */ | ||
8163 | + request.url = url; | ||
8164 | + return request; | ||
8165 | +})(); | ||
8166 | + | ||
8167 | +/** @description request parameter type for postPrepaidAudit */ | ||
8168 | +export interface PostPrepaidAuditOption { | ||
8169 | + /** | ||
8170 | + * @description | ||
8171 | + * request | ||
6286 | */ | 8172 | */ |
6287 | body: { | 8173 | body: { |
6288 | /** | 8174 | /** |
6289 | @description | 8175 | @description |
6290 | - roleVO */ | ||
6291 | - roleVO: AdminAuthRoleVO; | 8176 | + request */ |
8177 | + request: SalesRechargePrepaymentAuditRequest; | ||
6292 | }; | 8178 | }; |
6293 | } | 8179 | } |
6294 | 8180 | ||
6295 | -/** @description response type for postOrderErpRolesAuthMenu */ | ||
6296 | -export interface PostOrderErpRolesAuthMenuResponse { | 8181 | +/** @description response type for postPrepaidAudit */ |
8182 | +export interface PostPrepaidAuditResponse { | ||
6297 | /** | 8183 | /** |
6298 | * @description | 8184 | * @description |
6299 | * OK | 8185 | * OK |
@@ -6321,25 +8207,24 @@ export interface PostOrderErpRolesAuthMenuResponse { | @@ -6321,25 +8207,24 @@ export interface PostOrderErpRolesAuthMenuResponse { | ||
6321 | 404: any; | 8207 | 404: any; |
6322 | } | 8208 | } |
6323 | 8209 | ||
6324 | -export type PostOrderErpRolesAuthMenuResponseSuccess = | ||
6325 | - PostOrderErpRolesAuthMenuResponse[200]; | 8210 | +export type PostPrepaidAuditResponseSuccess = PostPrepaidAuditResponse[200]; |
6326 | /** | 8211 | /** |
6327 | * @description | 8212 | * @description |
6328 | - * 授权角色菜单 | ||
6329 | - * @tags 系统:角色管理 | 8213 | + * 财务审核 |
8214 | + * @tags prepaid-controller | ||
6330 | * @produces * | 8215 | * @produces * |
6331 | * @consumes application/json | 8216 | * @consumes application/json |
6332 | */ | 8217 | */ |
6333 | -export const postOrderErpRolesAuthMenu = /* #__PURE__ */ (() => { | 8218 | +export const postPrepaidAudit = /* #__PURE__ */ (() => { |
6334 | const method = 'post'; | 8219 | const method = 'post'; |
6335 | - const url = '/order/erp/roles/auth_menu'; | 8220 | + const url = '/prepaid/audit'; |
6336 | function request( | 8221 | function request( |
6337 | - option: PostOrderErpRolesAuthMenuOption, | ||
6338 | - ): Promise<PostOrderErpRolesAuthMenuResponseSuccess> { | 8222 | + option: PostPrepaidAuditOption, |
8223 | + ): Promise<PostPrepaidAuditResponseSuccess> { | ||
6339 | return requester(request.url, { | 8224 | return requester(request.url, { |
6340 | method: request.method, | 8225 | method: request.method, |
6341 | ...option, | 8226 | ...option, |
6342 | - }) as unknown as Promise<PostOrderErpRolesAuthMenuResponseSuccess>; | 8227 | + }) as unknown as Promise<PostPrepaidAuditResponseSuccess>; |
6343 | } | 8228 | } |
6344 | 8229 | ||
6345 | /** http method */ | 8230 | /** http method */ |
@@ -6349,22 +8234,22 @@ export const postOrderErpRolesAuthMenu = /* #__PURE__ */ (() => { | @@ -6349,22 +8234,22 @@ export const postOrderErpRolesAuthMenu = /* #__PURE__ */ (() => { | ||
6349 | return request; | 8234 | return request; |
6350 | })(); | 8235 | })(); |
6351 | 8236 | ||
6352 | -/** @description request parameter type for postOrderErpRolesDelete */ | ||
6353 | -export interface PostOrderErpRolesDeleteOption { | 8237 | +/** @description request parameter type for postPrepaidCreate */ |
8238 | +export interface PostPrepaidCreateOption { | ||
6354 | /** | 8239 | /** |
6355 | * @description | 8240 | * @description |
6356 | - * queryVO | 8241 | + * request |
6357 | */ | 8242 | */ |
6358 | body: { | 8243 | body: { |
6359 | /** | 8244 | /** |
6360 | @description | 8245 | @description |
6361 | - queryVO */ | ||
6362 | - queryVO: AdminRoleQueryVO; | 8246 | + request */ |
8247 | + request: SalesRechargePrepaymentCreateRequest; | ||
6363 | }; | 8248 | }; |
6364 | } | 8249 | } |
6365 | 8250 | ||
6366 | -/** @description response type for postOrderErpRolesDelete */ | ||
6367 | -export interface PostOrderErpRolesDeleteResponse { | 8251 | +/** @description response type for postPrepaidCreate */ |
8252 | +export interface PostPrepaidCreateResponse { | ||
6368 | /** | 8253 | /** |
6369 | * @description | 8254 | * @description |
6370 | * OK | 8255 | * OK |
@@ -6392,25 +8277,24 @@ export interface PostOrderErpRolesDeleteResponse { | @@ -6392,25 +8277,24 @@ export interface PostOrderErpRolesDeleteResponse { | ||
6392 | 404: any; | 8277 | 404: any; |
6393 | } | 8278 | } |
6394 | 8279 | ||
6395 | -export type PostOrderErpRolesDeleteResponseSuccess = | ||
6396 | - PostOrderErpRolesDeleteResponse[200]; | 8280 | +export type PostPrepaidCreateResponseSuccess = PostPrepaidCreateResponse[200]; |
6397 | /** | 8281 | /** |
6398 | * @description | 8282 | * @description |
6399 | - * 删除角色 | ||
6400 | - * @tags 系统:角色管理 | 8283 | + * 新增预存 |
8284 | + * @tags prepaid-controller | ||
6401 | * @produces * | 8285 | * @produces * |
6402 | * @consumes application/json | 8286 | * @consumes application/json |
6403 | */ | 8287 | */ |
6404 | -export const postOrderErpRolesDelete = /* #__PURE__ */ (() => { | 8288 | +export const postPrepaidCreate = /* #__PURE__ */ (() => { |
6405 | const method = 'post'; | 8289 | const method = 'post'; |
6406 | - const url = '/order/erp/roles/delete'; | 8290 | + const url = '/prepaid/create'; |
6407 | function request( | 8291 | function request( |
6408 | - option: PostOrderErpRolesDeleteOption, | ||
6409 | - ): Promise<PostOrderErpRolesDeleteResponseSuccess> { | 8292 | + option: PostPrepaidCreateOption, |
8293 | + ): Promise<PostPrepaidCreateResponseSuccess> { | ||
6410 | return requester(request.url, { | 8294 | return requester(request.url, { |
6411 | method: request.method, | 8295 | method: request.method, |
6412 | ...option, | 8296 | ...option, |
6413 | - }) as unknown as Promise<PostOrderErpRolesDeleteResponseSuccess>; | 8297 | + }) as unknown as Promise<PostPrepaidCreateResponseSuccess>; |
6414 | } | 8298 | } |
6415 | 8299 | ||
6416 | /** http method */ | 8300 | /** http method */ |
@@ -6420,22 +8304,22 @@ export const postOrderErpRolesDelete = /* #__PURE__ */ (() => { | @@ -6420,22 +8304,22 @@ export const postOrderErpRolesDelete = /* #__PURE__ */ (() => { | ||
6420 | return request; | 8304 | return request; |
6421 | })(); | 8305 | })(); |
6422 | 8306 | ||
6423 | -/** @description request parameter type for postOrderErpRolesDetail */ | ||
6424 | -export interface PostOrderErpRolesDetailOption { | 8307 | +/** @description request parameter type for postPrepaidDelete */ |
8308 | +export interface PostPrepaidDeleteOption { | ||
6425 | /** | 8309 | /** |
6426 | * @description | 8310 | * @description |
6427 | - * queryVO | 8311 | + * request |
6428 | */ | 8312 | */ |
6429 | body: { | 8313 | body: { |
6430 | /** | 8314 | /** |
6431 | @description | 8315 | @description |
6432 | - queryVO */ | ||
6433 | - queryVO: AdminRoleQueryVO; | 8316 | + request */ |
8317 | + request: SalesRechargePrepaymentDeleteRequest; | ||
6434 | }; | 8318 | }; |
6435 | } | 8319 | } |
6436 | 8320 | ||
6437 | -/** @description response type for postOrderErpRolesDetail */ | ||
6438 | -export interface PostOrderErpRolesDetailResponse { | 8321 | +/** @description response type for postPrepaidDelete */ |
8322 | +export interface PostPrepaidDeleteResponse { | ||
6439 | /** | 8323 | /** |
6440 | * @description | 8324 | * @description |
6441 | * OK | 8325 | * OK |
@@ -6463,25 +8347,24 @@ export interface PostOrderErpRolesDetailResponse { | @@ -6463,25 +8347,24 @@ export interface PostOrderErpRolesDetailResponse { | ||
6463 | 404: any; | 8347 | 404: any; |
6464 | } | 8348 | } |
6465 | 8349 | ||
6466 | -export type PostOrderErpRolesDetailResponseSuccess = | ||
6467 | - PostOrderErpRolesDetailResponse[200]; | 8350 | +export type PostPrepaidDeleteResponseSuccess = PostPrepaidDeleteResponse[200]; |
6468 | /** | 8351 | /** |
6469 | * @description | 8352 | * @description |
6470 | - * 获取单个role | ||
6471 | - * @tags 系统:角色管理 | 8353 | + * 删除预存 |
8354 | + * @tags prepaid-controller | ||
6472 | * @produces * | 8355 | * @produces * |
6473 | * @consumes application/json | 8356 | * @consumes application/json |
6474 | */ | 8357 | */ |
6475 | -export const postOrderErpRolesDetail = /* #__PURE__ */ (() => { | 8358 | +export const postPrepaidDelete = /* #__PURE__ */ (() => { |
6476 | const method = 'post'; | 8359 | const method = 'post'; |
6477 | - const url = '/order/erp/roles/detail'; | 8360 | + const url = '/prepaid/delete'; |
6478 | function request( | 8361 | function request( |
6479 | - option: PostOrderErpRolesDetailOption, | ||
6480 | - ): Promise<PostOrderErpRolesDetailResponseSuccess> { | 8362 | + option: PostPrepaidDeleteOption, |
8363 | + ): Promise<PostPrepaidDeleteResponseSuccess> { | ||
6481 | return requester(request.url, { | 8364 | return requester(request.url, { |
6482 | method: request.method, | 8365 | method: request.method, |
6483 | ...option, | 8366 | ...option, |
6484 | - }) as unknown as Promise<PostOrderErpRolesDetailResponseSuccess>; | 8367 | + }) as unknown as Promise<PostPrepaidDeleteResponseSuccess>; |
6485 | } | 8368 | } |
6486 | 8369 | ||
6487 | /** http method */ | 8370 | /** http method */ |
@@ -6491,22 +8374,22 @@ export const postOrderErpRolesDetail = /* #__PURE__ */ (() => { | @@ -6491,22 +8374,22 @@ export const postOrderErpRolesDetail = /* #__PURE__ */ (() => { | ||
6491 | return request; | 8374 | return request; |
6492 | })(); | 8375 | })(); |
6493 | 8376 | ||
6494 | -/** @description request parameter type for postOrderErpRolesEdit */ | ||
6495 | -export interface PostOrderErpRolesEditOption { | 8377 | +/** @description request parameter type for postPrepaidList */ |
8378 | +export interface PostPrepaidListOption { | ||
6496 | /** | 8379 | /** |
6497 | * @description | 8380 | * @description |
6498 | - * roleVO | 8381 | + * request |
6499 | */ | 8382 | */ |
6500 | body: { | 8383 | body: { |
6501 | /** | 8384 | /** |
6502 | @description | 8385 | @description |
6503 | - roleVO */ | ||
6504 | - roleVO: AdminRoleVO; | 8386 | + request */ |
8387 | + request: SalesRechargePrepaymentRequest; | ||
6505 | }; | 8388 | }; |
6506 | } | 8389 | } |
6507 | 8390 | ||
6508 | -/** @description response type for postOrderErpRolesEdit */ | ||
6509 | -export interface PostOrderErpRolesEditResponse { | 8391 | +/** @description response type for postPrepaidList */ |
8392 | +export interface PostPrepaidListResponse { | ||
6510 | /** | 8393 | /** |
6511 | * @description | 8394 | * @description |
6512 | * OK | 8395 | * OK |
@@ -6534,25 +8417,24 @@ export interface PostOrderErpRolesEditResponse { | @@ -6534,25 +8417,24 @@ export interface PostOrderErpRolesEditResponse { | ||
6534 | 404: any; | 8417 | 404: any; |
6535 | } | 8418 | } |
6536 | 8419 | ||
6537 | -export type PostOrderErpRolesEditResponseSuccess = | ||
6538 | - PostOrderErpRolesEditResponse[200]; | 8420 | +export type PostPrepaidListResponseSuccess = PostPrepaidListResponse[200]; |
6539 | /** | 8421 | /** |
6540 | * @description | 8422 | * @description |
6541 | - * 修改角色 | ||
6542 | - * @tags 系统:角色管理 | 8423 | + * 查询列表 |
8424 | + * @tags prepaid-controller | ||
6543 | * @produces * | 8425 | * @produces * |
6544 | * @consumes application/json | 8426 | * @consumes application/json |
6545 | */ | 8427 | */ |
6546 | -export const postOrderErpRolesEdit = /* #__PURE__ */ (() => { | 8428 | +export const postPrepaidList = /* #__PURE__ */ (() => { |
6547 | const method = 'post'; | 8429 | const method = 'post'; |
6548 | - const url = '/order/erp/roles/edit'; | 8430 | + const url = '/prepaid/list'; |
6549 | function request( | 8431 | function request( |
6550 | - option: PostOrderErpRolesEditOption, | ||
6551 | - ): Promise<PostOrderErpRolesEditResponseSuccess> { | 8432 | + option: PostPrepaidListOption, |
8433 | + ): Promise<PostPrepaidListResponseSuccess> { | ||
6552 | return requester(request.url, { | 8434 | return requester(request.url, { |
6553 | method: request.method, | 8435 | method: request.method, |
6554 | ...option, | 8436 | ...option, |
6555 | - }) as unknown as Promise<PostOrderErpRolesEditResponseSuccess>; | 8437 | + }) as unknown as Promise<PostPrepaidListResponseSuccess>; |
6556 | } | 8438 | } |
6557 | 8439 | ||
6558 | /** http method */ | 8440 | /** http method */ |
@@ -6562,22 +8444,22 @@ export const postOrderErpRolesEdit = /* #__PURE__ */ (() => { | @@ -6562,22 +8444,22 @@ export const postOrderErpRolesEdit = /* #__PURE__ */ (() => { | ||
6562 | return request; | 8444 | return request; |
6563 | })(); | 8445 | })(); |
6564 | 8446 | ||
6565 | -/** @description request parameter type for postOrderErpRolesListByPage */ | ||
6566 | -export interface PostOrderErpRolesListByPageOption { | 8447 | +/** @description request parameter type for postPrepaidPhoneAvailableList */ |
8448 | +export interface PostPrepaidPhoneAvailableListOption { | ||
6567 | /** | 8449 | /** |
6568 | * @description | 8450 | * @description |
6569 | - * queryVO | 8451 | + * request |
6570 | */ | 8452 | */ |
6571 | body: { | 8453 | body: { |
6572 | /** | 8454 | /** |
6573 | @description | 8455 | @description |
6574 | - queryVO */ | ||
6575 | - queryVO: AdminRoleQueryVO; | 8456 | + request */ |
8457 | + request: SalesRechargePrepaymentAuditRequest; | ||
6576 | }; | 8458 | }; |
6577 | } | 8459 | } |
6578 | 8460 | ||
6579 | -/** @description response type for postOrderErpRolesListByPage */ | ||
6580 | -export interface PostOrderErpRolesListByPageResponse { | 8461 | +/** @description response type for postPrepaidPhoneAvailableList */ |
8462 | +export interface PostPrepaidPhoneAvailableListResponse { | ||
6581 | /** | 8463 | /** |
6582 | * @description | 8464 | * @description |
6583 | * OK | 8465 | * OK |
@@ -6605,25 +8487,25 @@ export interface PostOrderErpRolesListByPageResponse { | @@ -6605,25 +8487,25 @@ export interface PostOrderErpRolesListByPageResponse { | ||
6605 | 404: any; | 8487 | 404: any; |
6606 | } | 8488 | } |
6607 | 8489 | ||
6608 | -export type PostOrderErpRolesListByPageResponseSuccess = | ||
6609 | - PostOrderErpRolesListByPageResponse[200]; | 8490 | +export type PostPrepaidPhoneAvailableListResponseSuccess = |
8491 | + PostPrepaidPhoneAvailableListResponse[200]; | ||
6610 | /** | 8492 | /** |
6611 | * @description | 8493 | * @description |
6612 | - * 查询角色 | ||
6613 | - * @tags 系统:角色管理 | 8494 | + * 财务审核 |
8495 | + * @tags prepaid-controller | ||
6614 | * @produces * | 8496 | * @produces * |
6615 | * @consumes application/json | 8497 | * @consumes application/json |
6616 | */ | 8498 | */ |
6617 | -export const postOrderErpRolesListByPage = /* #__PURE__ */ (() => { | 8499 | +export const postPrepaidPhoneAvailableList = /* #__PURE__ */ (() => { |
6618 | const method = 'post'; | 8500 | const method = 'post'; |
6619 | - const url = '/order/erp/roles/list_by_page'; | 8501 | + const url = '/prepaid/phone/available/list'; |
6620 | function request( | 8502 | function request( |
6621 | - option: PostOrderErpRolesListByPageOption, | ||
6622 | - ): Promise<PostOrderErpRolesListByPageResponseSuccess> { | 8503 | + option: PostPrepaidPhoneAvailableListOption, |
8504 | + ): Promise<PostPrepaidPhoneAvailableListResponseSuccess> { | ||
6623 | return requester(request.url, { | 8505 | return requester(request.url, { |
6624 | method: request.method, | 8506 | method: request.method, |
6625 | ...option, | 8507 | ...option, |
6626 | - }) as unknown as Promise<PostOrderErpRolesListByPageResponseSuccess>; | 8508 | + }) as unknown as Promise<PostPrepaidPhoneAvailableListResponseSuccess>; |
6627 | } | 8509 | } |
6628 | 8510 | ||
6629 | /** http method */ | 8511 | /** http method */ |
@@ -6633,22 +8515,22 @@ export const postOrderErpRolesListByPage = /* #__PURE__ */ (() => { | @@ -6633,22 +8515,22 @@ export const postOrderErpRolesListByPage = /* #__PURE__ */ (() => { | ||
6633 | return request; | 8515 | return request; |
6634 | })(); | 8516 | })(); |
6635 | 8517 | ||
6636 | -/** @description request parameter type for postOrderErpUsersAdd */ | ||
6637 | -export interface PostOrderErpUsersAddOption { | 8518 | +/** @description request parameter type for postPrepaidUpdate */ |
8519 | +export interface PostPrepaidUpdateOption { | ||
6638 | /** | 8520 | /** |
6639 | * @description | 8521 | * @description |
6640 | - * userVO | 8522 | + * request |
6641 | */ | 8523 | */ |
6642 | body: { | 8524 | body: { |
6643 | /** | 8525 | /** |
6644 | @description | 8526 | @description |
6645 | - userVO */ | ||
6646 | - userVO: AdminUserVO; | 8527 | + request */ |
8528 | + request: SalesRechargePrepaymentUpdateRequest; | ||
6647 | }; | 8529 | }; |
6648 | } | 8530 | } |
6649 | 8531 | ||
6650 | -/** @description response type for postOrderErpUsersAdd */ | ||
6651 | -export interface PostOrderErpUsersAddResponse { | 8532 | +/** @description response type for postPrepaidUpdate */ |
8533 | +export interface PostPrepaidUpdateResponse { | ||
6652 | /** | 8534 | /** |
6653 | * @description | 8535 | * @description |
6654 | * OK | 8536 | * OK |
@@ -6676,25 +8558,24 @@ export interface PostOrderErpUsersAddResponse { | @@ -6676,25 +8558,24 @@ export interface PostOrderErpUsersAddResponse { | ||
6676 | 404: any; | 8558 | 404: any; |
6677 | } | 8559 | } |
6678 | 8560 | ||
6679 | -export type PostOrderErpUsersAddResponseSuccess = | ||
6680 | - PostOrderErpUsersAddResponse[200]; | 8561 | +export type PostPrepaidUpdateResponseSuccess = PostPrepaidUpdateResponse[200]; |
6681 | /** | 8562 | /** |
6682 | * @description | 8563 | * @description |
6683 | - * 新增用户 | ||
6684 | - * @tags 系统:用户管理 | 8564 | + * 修改预存 |
8565 | + * @tags prepaid-controller | ||
6685 | * @produces * | 8566 | * @produces * |
6686 | * @consumes application/json | 8567 | * @consumes application/json |
6687 | */ | 8568 | */ |
6688 | -export const postOrderErpUsersAdd = /* #__PURE__ */ (() => { | 8569 | +export const postPrepaidUpdate = /* #__PURE__ */ (() => { |
6689 | const method = 'post'; | 8570 | const method = 'post'; |
6690 | - const url = '/order/erp/users/add'; | 8571 | + const url = '/prepaid/update'; |
6691 | function request( | 8572 | function request( |
6692 | - option: PostOrderErpUsersAddOption, | ||
6693 | - ): Promise<PostOrderErpUsersAddResponseSuccess> { | 8573 | + option: PostPrepaidUpdateOption, |
8574 | + ): Promise<PostPrepaidUpdateResponseSuccess> { | ||
6694 | return requester(request.url, { | 8575 | return requester(request.url, { |
6695 | method: request.method, | 8576 | method: request.method, |
6696 | ...option, | 8577 | ...option, |
6697 | - }) as unknown as Promise<PostOrderErpUsersAddResponseSuccess>; | 8578 | + }) as unknown as Promise<PostPrepaidUpdateResponseSuccess>; |
6698 | } | 8579 | } |
6699 | 8580 | ||
6700 | /** http method */ | 8581 | /** http method */ |
@@ -6704,22 +8585,22 @@ export const postOrderErpUsersAdd = /* #__PURE__ */ (() => { | @@ -6704,22 +8585,22 @@ export const postOrderErpUsersAdd = /* #__PURE__ */ (() => { | ||
6704 | return request; | 8585 | return request; |
6705 | })(); | 8586 | })(); |
6706 | 8587 | ||
6707 | -/** @description request parameter type for postOrderErpUsersAuthRole */ | ||
6708 | -export interface PostOrderErpUsersAuthRoleOption { | 8588 | +/** @description request parameter type for postResearchGroupMemberRequestsAdd */ |
8589 | +export interface PostResearchGroupMemberRequestsAddOption { | ||
6709 | /** | 8590 | /** |
6710 | * @description | 8591 | * @description |
6711 | - * userVO | 8592 | + * request |
6712 | */ | 8593 | */ |
6713 | body: { | 8594 | body: { |
6714 | /** | 8595 | /** |
6715 | @description | 8596 | @description |
6716 | - userVO */ | ||
6717 | - userVO: AdminAuthUserVO; | 8597 | + request */ |
8598 | + request: ResearchGroupMemberRequestAddRequest; | ||
6718 | }; | 8599 | }; |
6719 | } | 8600 | } |
6720 | 8601 | ||
6721 | -/** @description response type for postOrderErpUsersAuthRole */ | ||
6722 | -export interface PostOrderErpUsersAuthRoleResponse { | 8602 | +/** @description response type for postResearchGroupMemberRequestsAdd */ |
8603 | +export interface PostResearchGroupMemberRequestsAddResponse { | ||
6723 | /** | 8604 | /** |
6724 | * @description | 8605 | * @description |
6725 | * OK | 8606 | * OK |
@@ -6747,25 +8628,25 @@ export interface PostOrderErpUsersAuthRoleResponse { | @@ -6747,25 +8628,25 @@ export interface PostOrderErpUsersAuthRoleResponse { | ||
6747 | 404: any; | 8628 | 404: any; |
6748 | } | 8629 | } |
6749 | 8630 | ||
6750 | -export type PostOrderErpUsersAuthRoleResponseSuccess = | ||
6751 | - PostOrderErpUsersAuthRoleResponse[200]; | 8631 | +export type PostResearchGroupMemberRequestsAddResponseSuccess = |
8632 | + PostResearchGroupMemberRequestsAddResponse[200]; | ||
6752 | /** | 8633 | /** |
6753 | * @description | 8634 | * @description |
6754 | - * 授权角色 | ||
6755 | - * @tags 系统:用户管理 | 8635 | + * 新增申请信息 |
8636 | + * @tags research-group-member-requests-controller | ||
6756 | * @produces * | 8637 | * @produces * |
6757 | * @consumes application/json | 8638 | * @consumes application/json |
6758 | */ | 8639 | */ |
6759 | -export const postOrderErpUsersAuthRole = /* #__PURE__ */ (() => { | 8640 | +export const postResearchGroupMemberRequestsAdd = /* #__PURE__ */ (() => { |
6760 | const method = 'post'; | 8641 | const method = 'post'; |
6761 | - const url = '/order/erp/users/auth_role'; | 8642 | + const url = '/research/group/member/requests/add'; |
6762 | function request( | 8643 | function request( |
6763 | - option: PostOrderErpUsersAuthRoleOption, | ||
6764 | - ): Promise<PostOrderErpUsersAuthRoleResponseSuccess> { | 8644 | + option: PostResearchGroupMemberRequestsAddOption, |
8645 | + ): Promise<PostResearchGroupMemberRequestsAddResponseSuccess> { | ||
6765 | return requester(request.url, { | 8646 | return requester(request.url, { |
6766 | method: request.method, | 8647 | method: request.method, |
6767 | ...option, | 8648 | ...option, |
6768 | - }) as unknown as Promise<PostOrderErpUsersAuthRoleResponseSuccess>; | 8649 | + }) as unknown as Promise<PostResearchGroupMemberRequestsAddResponseSuccess>; |
6769 | } | 8650 | } |
6770 | 8651 | ||
6771 | /** http method */ | 8652 | /** http method */ |
@@ -6775,22 +8656,22 @@ export const postOrderErpUsersAuthRole = /* #__PURE__ */ (() => { | @@ -6775,22 +8656,22 @@ export const postOrderErpUsersAuthRole = /* #__PURE__ */ (() => { | ||
6775 | return request; | 8656 | return request; |
6776 | })(); | 8657 | })(); |
6777 | 8658 | ||
6778 | -/** @description request parameter type for postOrderErpUsersDelete */ | ||
6779 | -export interface PostOrderErpUsersDeleteOption { | 8659 | +/** @description request parameter type for postResearchGroupMemberRequestsDelete */ |
8660 | +export interface PostResearchGroupMemberRequestsDeleteOption { | ||
6780 | /** | 8661 | /** |
6781 | * @description | 8662 | * @description |
6782 | - * queryVO | 8663 | + * request |
6783 | */ | 8664 | */ |
6784 | body: { | 8665 | body: { |
6785 | /** | 8666 | /** |
6786 | @description | 8667 | @description |
6787 | - queryVO */ | ||
6788 | - queryVO: AdminUserQueryVO; | 8668 | + request */ |
8669 | + request: ResearchGroupMemberRequestDeleteRequest; | ||
6789 | }; | 8670 | }; |
6790 | } | 8671 | } |
6791 | 8672 | ||
6792 | -/** @description response type for postOrderErpUsersDelete */ | ||
6793 | -export interface PostOrderErpUsersDeleteResponse { | 8673 | +/** @description response type for postResearchGroupMemberRequestsDelete */ |
8674 | +export interface PostResearchGroupMemberRequestsDeleteResponse { | ||
6794 | /** | 8675 | /** |
6795 | * @description | 8676 | * @description |
6796 | * OK | 8677 | * OK |
@@ -6818,25 +8699,25 @@ export interface PostOrderErpUsersDeleteResponse { | @@ -6818,25 +8699,25 @@ export interface PostOrderErpUsersDeleteResponse { | ||
6818 | 404: any; | 8699 | 404: any; |
6819 | } | 8700 | } |
6820 | 8701 | ||
6821 | -export type PostOrderErpUsersDeleteResponseSuccess = | ||
6822 | - PostOrderErpUsersDeleteResponse[200]; | 8702 | +export type PostResearchGroupMemberRequestsDeleteResponseSuccess = |
8703 | + PostResearchGroupMemberRequestsDeleteResponse[200]; | ||
6823 | /** | 8704 | /** |
6824 | * @description | 8705 | * @description |
6825 | - * 删除用户 | ||
6826 | - * @tags 系统:用户管理 | 8706 | + * 删除申请信息 |
8707 | + * @tags research-group-member-requests-controller | ||
6827 | * @produces * | 8708 | * @produces * |
6828 | * @consumes application/json | 8709 | * @consumes application/json |
6829 | */ | 8710 | */ |
6830 | -export const postOrderErpUsersDelete = /* #__PURE__ */ (() => { | 8711 | +export const postResearchGroupMemberRequestsDelete = /* #__PURE__ */ (() => { |
6831 | const method = 'post'; | 8712 | const method = 'post'; |
6832 | - const url = '/order/erp/users/delete'; | 8713 | + const url = '/research/group/member/requests/delete'; |
6833 | function request( | 8714 | function request( |
6834 | - option: PostOrderErpUsersDeleteOption, | ||
6835 | - ): Promise<PostOrderErpUsersDeleteResponseSuccess> { | 8715 | + option: PostResearchGroupMemberRequestsDeleteOption, |
8716 | + ): Promise<PostResearchGroupMemberRequestsDeleteResponseSuccess> { | ||
6836 | return requester(request.url, { | 8717 | return requester(request.url, { |
6837 | method: request.method, | 8718 | method: request.method, |
6838 | ...option, | 8719 | ...option, |
6839 | - }) as unknown as Promise<PostOrderErpUsersDeleteResponseSuccess>; | 8720 | + }) as unknown as Promise<PostResearchGroupMemberRequestsDeleteResponseSuccess>; |
6840 | } | 8721 | } |
6841 | 8722 | ||
6842 | /** http method */ | 8723 | /** http method */ |
@@ -6846,22 +8727,22 @@ export const postOrderErpUsersDelete = /* #__PURE__ */ (() => { | @@ -6846,22 +8727,22 @@ export const postOrderErpUsersDelete = /* #__PURE__ */ (() => { | ||
6846 | return request; | 8727 | return request; |
6847 | })(); | 8728 | })(); |
6848 | 8729 | ||
6849 | -/** @description request parameter type for postOrderErpUsersEdit */ | ||
6850 | -export interface PostOrderErpUsersEditOption { | 8730 | +/** @description request parameter type for postResearchGroupMemberRequestsDetail */ |
8731 | +export interface PostResearchGroupMemberRequestsDetailOption { | ||
6851 | /** | 8732 | /** |
6852 | * @description | 8733 | * @description |
6853 | - * userVO | 8734 | + * request |
6854 | */ | 8735 | */ |
6855 | body: { | 8736 | body: { |
6856 | /** | 8737 | /** |
6857 | @description | 8738 | @description |
6858 | - userVO */ | ||
6859 | - userVO: AdminUserVO; | 8739 | + request */ |
8740 | + request: ResearchGroupMemberRequestDetailRequest; | ||
6860 | }; | 8741 | }; |
6861 | } | 8742 | } |
6862 | 8743 | ||
6863 | -/** @description response type for postOrderErpUsersEdit */ | ||
6864 | -export interface PostOrderErpUsersEditResponse { | 8744 | +/** @description response type for postResearchGroupMemberRequestsDetail */ |
8745 | +export interface PostResearchGroupMemberRequestsDetailResponse { | ||
6865 | /** | 8746 | /** |
6866 | * @description | 8747 | * @description |
6867 | * OK | 8748 | * OK |
@@ -6889,25 +8770,25 @@ export interface PostOrderErpUsersEditResponse { | @@ -6889,25 +8770,25 @@ export interface PostOrderErpUsersEditResponse { | ||
6889 | 404: any; | 8770 | 404: any; |
6890 | } | 8771 | } |
6891 | 8772 | ||
6892 | -export type PostOrderErpUsersEditResponseSuccess = | ||
6893 | - PostOrderErpUsersEditResponse[200]; | 8773 | +export type PostResearchGroupMemberRequestsDetailResponseSuccess = |
8774 | + PostResearchGroupMemberRequestsDetailResponse[200]; | ||
6894 | /** | 8775 | /** |
6895 | * @description | 8776 | * @description |
6896 | - * 修改用户 | ||
6897 | - * @tags 系统:用户管理 | 8777 | + * 查询申请信息 |
8778 | + * @tags research-group-member-requests-controller | ||
6898 | * @produces * | 8779 | * @produces * |
6899 | * @consumes application/json | 8780 | * @consumes application/json |
6900 | */ | 8781 | */ |
6901 | -export const postOrderErpUsersEdit = /* #__PURE__ */ (() => { | 8782 | +export const postResearchGroupMemberRequestsDetail = /* #__PURE__ */ (() => { |
6902 | const method = 'post'; | 8783 | const method = 'post'; |
6903 | - const url = '/order/erp/users/edit'; | 8784 | + const url = '/research/group/member/requests/detail'; |
6904 | function request( | 8785 | function request( |
6905 | - option: PostOrderErpUsersEditOption, | ||
6906 | - ): Promise<PostOrderErpUsersEditResponseSuccess> { | 8786 | + option: PostResearchGroupMemberRequestsDetailOption, |
8787 | + ): Promise<PostResearchGroupMemberRequestsDetailResponseSuccess> { | ||
6907 | return requester(request.url, { | 8788 | return requester(request.url, { |
6908 | method: request.method, | 8789 | method: request.method, |
6909 | ...option, | 8790 | ...option, |
6910 | - }) as unknown as Promise<PostOrderErpUsersEditResponseSuccess>; | 8791 | + }) as unknown as Promise<PostResearchGroupMemberRequestsDetailResponseSuccess>; |
6911 | } | 8792 | } |
6912 | 8793 | ||
6913 | /** http method */ | 8794 | /** http method */ |
@@ -6917,22 +8798,22 @@ export const postOrderErpUsersEdit = /* #__PURE__ */ (() => { | @@ -6917,22 +8798,22 @@ export const postOrderErpUsersEdit = /* #__PURE__ */ (() => { | ||
6917 | return request; | 8798 | return request; |
6918 | })(); | 8799 | })(); |
6919 | 8800 | ||
6920 | -/** @description request parameter type for postOrderErpUsersListByPage */ | ||
6921 | -export interface PostOrderErpUsersListByPageOption { | 8801 | +/** @description request parameter type for postResearchGroupMemberRequestsEdit */ |
8802 | +export interface PostResearchGroupMemberRequestsEditOption { | ||
6922 | /** | 8803 | /** |
6923 | * @description | 8804 | * @description |
6924 | - * queryVO | 8805 | + * request |
6925 | */ | 8806 | */ |
6926 | body: { | 8807 | body: { |
6927 | /** | 8808 | /** |
6928 | @description | 8809 | @description |
6929 | - queryVO */ | ||
6930 | - queryVO: AdminUserQueryVO; | 8810 | + request */ |
8811 | + request: ResearchGroupMemberRequestEditRequest; | ||
6931 | }; | 8812 | }; |
6932 | } | 8813 | } |
6933 | 8814 | ||
6934 | -/** @description response type for postOrderErpUsersListByPage */ | ||
6935 | -export interface PostOrderErpUsersListByPageResponse { | 8815 | +/** @description response type for postResearchGroupMemberRequestsEdit */ |
8816 | +export interface PostResearchGroupMemberRequestsEditResponse { | ||
6936 | /** | 8817 | /** |
6937 | * @description | 8818 | * @description |
6938 | * OK | 8819 | * OK |
@@ -6960,25 +8841,25 @@ export interface PostOrderErpUsersListByPageResponse { | @@ -6960,25 +8841,25 @@ export interface PostOrderErpUsersListByPageResponse { | ||
6960 | 404: any; | 8841 | 404: any; |
6961 | } | 8842 | } |
6962 | 8843 | ||
6963 | -export type PostOrderErpUsersListByPageResponseSuccess = | ||
6964 | - PostOrderErpUsersListByPageResponse[200]; | 8844 | +export type PostResearchGroupMemberRequestsEditResponseSuccess = |
8845 | + PostResearchGroupMemberRequestsEditResponse[200]; | ||
6965 | /** | 8846 | /** |
6966 | * @description | 8847 | * @description |
6967 | - * 查询用户 | ||
6968 | - * @tags 系统:用户管理 | 8848 | + * 编辑申请信息 |
8849 | + * @tags research-group-member-requests-controller | ||
6969 | * @produces * | 8850 | * @produces * |
6970 | * @consumes application/json | 8851 | * @consumes application/json |
6971 | */ | 8852 | */ |
6972 | -export const postOrderErpUsersListByPage = /* #__PURE__ */ (() => { | 8853 | +export const postResearchGroupMemberRequestsEdit = /* #__PURE__ */ (() => { |
6973 | const method = 'post'; | 8854 | const method = 'post'; |
6974 | - const url = '/order/erp/users/list_by_page'; | 8855 | + const url = '/research/group/member/requests/edit'; |
6975 | function request( | 8856 | function request( |
6976 | - option: PostOrderErpUsersListByPageOption, | ||
6977 | - ): Promise<PostOrderErpUsersListByPageResponseSuccess> { | 8857 | + option: PostResearchGroupMemberRequestsEditOption, |
8858 | + ): Promise<PostResearchGroupMemberRequestsEditResponseSuccess> { | ||
6978 | return requester(request.url, { | 8859 | return requester(request.url, { |
6979 | method: request.method, | 8860 | method: request.method, |
6980 | ...option, | 8861 | ...option, |
6981 | - }) as unknown as Promise<PostOrderErpUsersListByPageResponseSuccess>; | 8862 | + }) as unknown as Promise<PostResearchGroupMemberRequestsEditResponseSuccess>; |
6982 | } | 8863 | } |
6983 | 8864 | ||
6984 | /** http method */ | 8865 | /** http method */ |
@@ -6988,22 +8869,22 @@ export const postOrderErpUsersListByPage = /* #__PURE__ */ (() => { | @@ -6988,22 +8869,22 @@ export const postOrderErpUsersListByPage = /* #__PURE__ */ (() => { | ||
6988 | return request; | 8869 | return request; |
6989 | })(); | 8870 | })(); |
6990 | 8871 | ||
6991 | -/** @description request parameter type for postOrderErpUsersReset */ | ||
6992 | -export interface PostOrderErpUsersResetOption { | 8872 | +/** @description request parameter type for postResearchGroupMemberRequestsList */ |
8873 | +export interface PostResearchGroupMemberRequestsListOption { | ||
6993 | /** | 8874 | /** |
6994 | * @description | 8875 | * @description |
6995 | - * resetPwdVO | 8876 | + * request |
6996 | */ | 8877 | */ |
6997 | body: { | 8878 | body: { |
6998 | /** | 8879 | /** |
6999 | @description | 8880 | @description |
7000 | - resetPwdVO */ | ||
7001 | - resetPwdVO: ResetPwdVO; | 8881 | + request */ |
8882 | + request: ResearchGroupMemberRequestsRequest; | ||
7002 | }; | 8883 | }; |
7003 | } | 8884 | } |
7004 | 8885 | ||
7005 | -/** @description response type for postOrderErpUsersReset */ | ||
7006 | -export interface PostOrderErpUsersResetResponse { | 8886 | +/** @description response type for postResearchGroupMemberRequestsList */ |
8887 | +export interface PostResearchGroupMemberRequestsListResponse { | ||
7007 | /** | 8888 | /** |
7008 | * @description | 8889 | * @description |
7009 | * OK | 8890 | * OK |
@@ -7031,25 +8912,25 @@ export interface PostOrderErpUsersResetResponse { | @@ -7031,25 +8912,25 @@ export interface PostOrderErpUsersResetResponse { | ||
7031 | 404: any; | 8912 | 404: any; |
7032 | } | 8913 | } |
7033 | 8914 | ||
7034 | -export type PostOrderErpUsersResetResponseSuccess = | ||
7035 | - PostOrderErpUsersResetResponse[200]; | 8915 | +export type PostResearchGroupMemberRequestsListResponseSuccess = |
8916 | + PostResearchGroupMemberRequestsListResponse[200]; | ||
7036 | /** | 8917 | /** |
7037 | * @description | 8918 | * @description |
7038 | - * 重置密码 | ||
7039 | - * @tags 系统:用户管理 | 8919 | + * 申请列表 |
8920 | + * @tags research-group-member-requests-controller | ||
7040 | * @produces * | 8921 | * @produces * |
7041 | * @consumes application/json | 8922 | * @consumes application/json |
7042 | */ | 8923 | */ |
7043 | -export const postOrderErpUsersReset = /* #__PURE__ */ (() => { | 8924 | +export const postResearchGroupMemberRequestsList = /* #__PURE__ */ (() => { |
7044 | const method = 'post'; | 8925 | const method = 'post'; |
7045 | - const url = '/order/erp/users/reset'; | 8926 | + const url = '/research/group/member/requests/list'; |
7046 | function request( | 8927 | function request( |
7047 | - option: PostOrderErpUsersResetOption, | ||
7048 | - ): Promise<PostOrderErpUsersResetResponseSuccess> { | 8928 | + option: PostResearchGroupMemberRequestsListOption, |
8929 | + ): Promise<PostResearchGroupMemberRequestsListResponseSuccess> { | ||
7049 | return requester(request.url, { | 8930 | return requester(request.url, { |
7050 | method: request.method, | 8931 | method: request.method, |
7051 | ...option, | 8932 | ...option, |
7052 | - }) as unknown as Promise<PostOrderErpUsersResetResponseSuccess>; | 8933 | + }) as unknown as Promise<PostResearchGroupMemberRequestsListResponseSuccess>; |
7053 | } | 8934 | } |
7054 | 8935 | ||
7055 | /** http method */ | 8936 | /** http method */ |
@@ -7059,22 +8940,22 @@ export const postOrderErpUsersReset = /* #__PURE__ */ (() => { | @@ -7059,22 +8940,22 @@ export const postOrderErpUsersReset = /* #__PURE__ */ (() => { | ||
7059 | return request; | 8940 | return request; |
7060 | })(); | 8941 | })(); |
7061 | 8942 | ||
7062 | -/** @description request parameter type for postOrderErpUsersUpdatePass */ | ||
7063 | -export interface PostOrderErpUsersUpdatePassOption { | 8943 | +/** @description request parameter type for postResearchGroupsAdd */ |
8944 | +export interface PostResearchGroupsAddOption { | ||
7064 | /** | 8945 | /** |
7065 | * @description | 8946 | * @description |
7066 | - * pwdVO | 8947 | + * request |
7067 | */ | 8948 | */ |
7068 | body: { | 8949 | body: { |
7069 | /** | 8950 | /** |
7070 | @description | 8951 | @description |
7071 | - pwdVO */ | ||
7072 | - pwdVO: UpdatePwdVO; | 8952 | + request */ |
8953 | + request: ResearchGroupAddRequest; | ||
7073 | }; | 8954 | }; |
7074 | } | 8955 | } |
7075 | 8956 | ||
7076 | -/** @description response type for postOrderErpUsersUpdatePass */ | ||
7077 | -export interface PostOrderErpUsersUpdatePassResponse { | 8957 | +/** @description response type for postResearchGroupsAdd */ |
8958 | +export interface PostResearchGroupsAddResponse { | ||
7078 | /** | 8959 | /** |
7079 | * @description | 8960 | * @description |
7080 | * OK | 8961 | * OK |
@@ -7102,25 +8983,25 @@ export interface PostOrderErpUsersUpdatePassResponse { | @@ -7102,25 +8983,25 @@ export interface PostOrderErpUsersUpdatePassResponse { | ||
7102 | 404: any; | 8983 | 404: any; |
7103 | } | 8984 | } |
7104 | 8985 | ||
7105 | -export type PostOrderErpUsersUpdatePassResponseSuccess = | ||
7106 | - PostOrderErpUsersUpdatePassResponse[200]; | 8986 | +export type PostResearchGroupsAddResponseSuccess = |
8987 | + PostResearchGroupsAddResponse[200]; | ||
7107 | /** | 8988 | /** |
7108 | * @description | 8989 | * @description |
7109 | - * 修改密码 | ||
7110 | - * @tags 系统:用户管理 | 8990 | + * 新增课题组信息 |
8991 | + * @tags research-groups-controller | ||
7111 | * @produces * | 8992 | * @produces * |
7112 | * @consumes application/json | 8993 | * @consumes application/json |
7113 | */ | 8994 | */ |
7114 | -export const postOrderErpUsersUpdatePass = /* #__PURE__ */ (() => { | 8995 | +export const postResearchGroupsAdd = /* #__PURE__ */ (() => { |
7115 | const method = 'post'; | 8996 | const method = 'post'; |
7116 | - const url = '/order/erp/users/update_pass'; | 8997 | + const url = '/research/groups/add'; |
7117 | function request( | 8998 | function request( |
7118 | - option: PostOrderErpUsersUpdatePassOption, | ||
7119 | - ): Promise<PostOrderErpUsersUpdatePassResponseSuccess> { | 8999 | + option: PostResearchGroupsAddOption, |
9000 | + ): Promise<PostResearchGroupsAddResponseSuccess> { | ||
7120 | return requester(request.url, { | 9001 | return requester(request.url, { |
7121 | method: request.method, | 9002 | method: request.method, |
7122 | ...option, | 9003 | ...option, |
7123 | - }) as unknown as Promise<PostOrderErpUsersUpdatePassResponseSuccess>; | 9004 | + }) as unknown as Promise<PostResearchGroupsAddResponseSuccess>; |
7124 | } | 9005 | } |
7125 | 9006 | ||
7126 | /** http method */ | 9007 | /** http method */ |
@@ -7130,22 +9011,22 @@ export const postOrderErpUsersUpdatePass = /* #__PURE__ */ (() => { | @@ -7130,22 +9011,22 @@ export const postOrderErpUsersUpdatePass = /* #__PURE__ */ (() => { | ||
7130 | return request; | 9011 | return request; |
7131 | })(); | 9012 | })(); |
7132 | 9013 | ||
7133 | -/** @description request parameter type for postOrderImportImportWeightAndVolume */ | ||
7134 | -export interface PostOrderImportImportWeightAndVolumeOption { | 9014 | +/** @description request parameter type for postResearchGroupsDelete */ |
9015 | +export interface PostResearchGroupsDeleteOption { | ||
7135 | /** | 9016 | /** |
7136 | * @description | 9017 | * @description |
7137 | - * file | 9018 | + * request |
7138 | */ | 9019 | */ |
7139 | - formData: { | 9020 | + body: { |
7140 | /** | 9021 | /** |
7141 | @description | 9022 | @description |
7142 | - file */ | ||
7143 | - file: File; | 9023 | + request */ |
9024 | + request: ResearchGroupDeleteRequest; | ||
7144 | }; | 9025 | }; |
7145 | } | 9026 | } |
7146 | 9027 | ||
7147 | -/** @description response type for postOrderImportImportWeightAndVolume */ | ||
7148 | -export interface PostOrderImportImportWeightAndVolumeResponse { | 9028 | +/** @description response type for postResearchGroupsDelete */ |
9029 | +export interface PostResearchGroupsDeleteResponse { | ||
7149 | /** | 9030 | /** |
7150 | * @description | 9031 | * @description |
7151 | * OK | 9032 | * OK |
@@ -7173,25 +9054,25 @@ export interface PostOrderImportImportWeightAndVolumeResponse { | @@ -7173,25 +9054,25 @@ export interface PostOrderImportImportWeightAndVolumeResponse { | ||
7173 | 404: any; | 9054 | 404: any; |
7174 | } | 9055 | } |
7175 | 9056 | ||
7176 | -export type PostOrderImportImportWeightAndVolumeResponseSuccess = | ||
7177 | - PostOrderImportImportWeightAndVolumeResponse[200]; | 9057 | +export type PostResearchGroupsDeleteResponseSuccess = |
9058 | + PostResearchGroupsDeleteResponse[200]; | ||
7178 | /** | 9059 | /** |
7179 | * @description | 9060 | * @description |
7180 | - * 导入重量和体积 | ||
7181 | - * @tags 导入 | 9061 | + * 删除课题组信息 |
9062 | + * @tags research-groups-controller | ||
7182 | * @produces * | 9063 | * @produces * |
7183 | - * @consumes multipart/form-data | 9064 | + * @consumes application/json |
7184 | */ | 9065 | */ |
7185 | -export const postOrderImportImportWeightAndVolume = /* #__PURE__ */ (() => { | 9066 | +export const postResearchGroupsDelete = /* #__PURE__ */ (() => { |
7186 | const method = 'post'; | 9067 | const method = 'post'; |
7187 | - const url = '/order/import/importWeightAndVolume'; | 9068 | + const url = '/research/groups/delete'; |
7188 | function request( | 9069 | function request( |
7189 | - option: PostOrderImportImportWeightAndVolumeOption, | ||
7190 | - ): Promise<PostOrderImportImportWeightAndVolumeResponseSuccess> { | 9070 | + option: PostResearchGroupsDeleteOption, |
9071 | + ): Promise<PostResearchGroupsDeleteResponseSuccess> { | ||
7191 | return requester(request.url, { | 9072 | return requester(request.url, { |
7192 | method: request.method, | 9073 | method: request.method, |
7193 | ...option, | 9074 | ...option, |
7194 | - }) as unknown as Promise<PostOrderImportImportWeightAndVolumeResponseSuccess>; | 9075 | + }) as unknown as Promise<PostResearchGroupsDeleteResponseSuccess>; |
7195 | } | 9076 | } |
7196 | 9077 | ||
7197 | /** http method */ | 9078 | /** http method */ |
@@ -7201,8 +9082,8 @@ export const postOrderImportImportWeightAndVolume = /* #__PURE__ */ (() => { | @@ -7201,8 +9082,8 @@ export const postOrderImportImportWeightAndVolume = /* #__PURE__ */ (() => { | ||
7201 | return request; | 9082 | return request; |
7202 | })(); | 9083 | })(); |
7203 | 9084 | ||
7204 | -/** @description request parameter type for postPrepaidAudit */ | ||
7205 | -export interface PostPrepaidAuditOption { | 9085 | +/** @description request parameter type for postResearchGroupsDetail */ |
9086 | +export interface PostResearchGroupsDetailOption { | ||
7206 | /** | 9087 | /** |
7207 | * @description | 9088 | * @description |
7208 | * request | 9089 | * request |
@@ -7211,12 +9092,12 @@ export interface PostPrepaidAuditOption { | @@ -7211,12 +9092,12 @@ export interface PostPrepaidAuditOption { | ||
7211 | /** | 9092 | /** |
7212 | @description | 9093 | @description |
7213 | request */ | 9094 | request */ |
7214 | - request: SalesRechargePrepaymentAuditRequest; | 9095 | + request: ResearchGroupDetailRequest; |
7215 | }; | 9096 | }; |
7216 | } | 9097 | } |
7217 | 9098 | ||
7218 | -/** @description response type for postPrepaidAudit */ | ||
7219 | -export interface PostPrepaidAuditResponse { | 9099 | +/** @description response type for postResearchGroupsDetail */ |
9100 | +export interface PostResearchGroupsDetailResponse { | ||
7220 | /** | 9101 | /** |
7221 | * @description | 9102 | * @description |
7222 | * OK | 9103 | * OK |
@@ -7244,24 +9125,25 @@ export interface PostPrepaidAuditResponse { | @@ -7244,24 +9125,25 @@ export interface PostPrepaidAuditResponse { | ||
7244 | 404: any; | 9125 | 404: any; |
7245 | } | 9126 | } |
7246 | 9127 | ||
7247 | -export type PostPrepaidAuditResponseSuccess = PostPrepaidAuditResponse[200]; | 9128 | +export type PostResearchGroupsDetailResponseSuccess = |
9129 | + PostResearchGroupsDetailResponse[200]; | ||
7248 | /** | 9130 | /** |
7249 | * @description | 9131 | * @description |
7250 | - * 财务审核 | ||
7251 | - * @tags prepaid-controller | 9132 | + * 查询课题组信息 |
9133 | + * @tags research-groups-controller | ||
7252 | * @produces * | 9134 | * @produces * |
7253 | * @consumes application/json | 9135 | * @consumes application/json |
7254 | */ | 9136 | */ |
7255 | -export const postPrepaidAudit = /* #__PURE__ */ (() => { | 9137 | +export const postResearchGroupsDetail = /* #__PURE__ */ (() => { |
7256 | const method = 'post'; | 9138 | const method = 'post'; |
7257 | - const url = '/prepaid/audit'; | 9139 | + const url = '/research/groups/detail'; |
7258 | function request( | 9140 | function request( |
7259 | - option: PostPrepaidAuditOption, | ||
7260 | - ): Promise<PostPrepaidAuditResponseSuccess> { | 9141 | + option: PostResearchGroupsDetailOption, |
9142 | + ): Promise<PostResearchGroupsDetailResponseSuccess> { | ||
7261 | return requester(request.url, { | 9143 | return requester(request.url, { |
7262 | method: request.method, | 9144 | method: request.method, |
7263 | ...option, | 9145 | ...option, |
7264 | - }) as unknown as Promise<PostPrepaidAuditResponseSuccess>; | 9146 | + }) as unknown as Promise<PostResearchGroupsDetailResponseSuccess>; |
7265 | } | 9147 | } |
7266 | 9148 | ||
7267 | /** http method */ | 9149 | /** http method */ |
@@ -7271,27 +9153,13 @@ export const postPrepaidAudit = /* #__PURE__ */ (() => { | @@ -7271,27 +9153,13 @@ export const postPrepaidAudit = /* #__PURE__ */ (() => { | ||
7271 | return request; | 9153 | return request; |
7272 | })(); | 9154 | })(); |
7273 | 9155 | ||
7274 | -/** @description request parameter type for postPrepaidCreate */ | ||
7275 | -export interface PostPrepaidCreateOption { | ||
7276 | - /** | ||
7277 | - * @description | ||
7278 | - * request | ||
7279 | - */ | ||
7280 | - body: { | ||
7281 | - /** | ||
7282 | - @description | ||
7283 | - request */ | ||
7284 | - request: SalesRechargePrepaymentCreateRequest; | ||
7285 | - }; | ||
7286 | -} | ||
7287 | - | ||
7288 | -/** @description response type for postPrepaidCreate */ | ||
7289 | -export interface PostPrepaidCreateResponse { | 9156 | +/** @description response type for postResearchGroupsDownloadImportTemplate */ |
9157 | +export interface PostResearchGroupsDownloadImportTemplateResponse { | ||
7290 | /** | 9158 | /** |
7291 | * @description | 9159 | * @description |
7292 | * OK | 9160 | * OK |
7293 | */ | 9161 | */ |
7294 | - 200: ServerResult; | 9162 | + 200: any; |
7295 | /** | 9163 | /** |
7296 | * @description | 9164 | * @description |
7297 | * Created | 9165 | * Created |
@@ -7314,24 +9182,22 @@ export interface PostPrepaidCreateResponse { | @@ -7314,24 +9182,22 @@ export interface PostPrepaidCreateResponse { | ||
7314 | 404: any; | 9182 | 404: any; |
7315 | } | 9183 | } |
7316 | 9184 | ||
7317 | -export type PostPrepaidCreateResponseSuccess = PostPrepaidCreateResponse[200]; | 9185 | +export type PostResearchGroupsDownloadImportTemplateResponseSuccess = |
9186 | + PostResearchGroupsDownloadImportTemplateResponse[200]; | ||
7318 | /** | 9187 | /** |
7319 | * @description | 9188 | * @description |
7320 | - * 新增预存 | ||
7321 | - * @tags prepaid-controller | 9189 | + * 课题组导入模板下载 |
9190 | + * @tags research-groups-controller | ||
7322 | * @produces * | 9191 | * @produces * |
7323 | * @consumes application/json | 9192 | * @consumes application/json |
7324 | */ | 9193 | */ |
7325 | -export const postPrepaidCreate = /* #__PURE__ */ (() => { | 9194 | +export const postResearchGroupsDownloadImportTemplate = /* #__PURE__ */ (() => { |
7326 | const method = 'post'; | 9195 | const method = 'post'; |
7327 | - const url = '/prepaid/create'; | ||
7328 | - function request( | ||
7329 | - option: PostPrepaidCreateOption, | ||
7330 | - ): Promise<PostPrepaidCreateResponseSuccess> { | 9196 | + const url = '/research/groups/download/importTemplate'; |
9197 | + function request(): Promise<PostResearchGroupsDownloadImportTemplateResponseSuccess> { | ||
7331 | return requester(request.url, { | 9198 | return requester(request.url, { |
7332 | method: request.method, | 9199 | method: request.method, |
7333 | - ...option, | ||
7334 | - }) as unknown as Promise<PostPrepaidCreateResponseSuccess>; | 9200 | + }) as unknown as Promise<PostResearchGroupsDownloadImportTemplateResponseSuccess>; |
7335 | } | 9201 | } |
7336 | 9202 | ||
7337 | /** http method */ | 9203 | /** http method */ |
@@ -7341,8 +9207,8 @@ export const postPrepaidCreate = /* #__PURE__ */ (() => { | @@ -7341,8 +9207,8 @@ export const postPrepaidCreate = /* #__PURE__ */ (() => { | ||
7341 | return request; | 9207 | return request; |
7342 | })(); | 9208 | })(); |
7343 | 9209 | ||
7344 | -/** @description request parameter type for postPrepaidDelete */ | ||
7345 | -export interface PostPrepaidDeleteOption { | 9210 | +/** @description request parameter type for postResearchGroupsEdit */ |
9211 | +export interface PostResearchGroupsEditOption { | ||
7346 | /** | 9212 | /** |
7347 | * @description | 9213 | * @description |
7348 | * request | 9214 | * request |
@@ -7351,12 +9217,12 @@ export interface PostPrepaidDeleteOption { | @@ -7351,12 +9217,12 @@ export interface PostPrepaidDeleteOption { | ||
7351 | /** | 9217 | /** |
7352 | @description | 9218 | @description |
7353 | request */ | 9219 | request */ |
7354 | - request: SalesRechargePrepaymentDeleteRequest; | 9220 | + request: ResearchGroupEditRequest; |
7355 | }; | 9221 | }; |
7356 | } | 9222 | } |
7357 | 9223 | ||
7358 | -/** @description response type for postPrepaidDelete */ | ||
7359 | -export interface PostPrepaidDeleteResponse { | 9224 | +/** @description response type for postResearchGroupsEdit */ |
9225 | +export interface PostResearchGroupsEditResponse { | ||
7360 | /** | 9226 | /** |
7361 | * @description | 9227 | * @description |
7362 | * OK | 9228 | * OK |
@@ -7384,24 +9250,25 @@ export interface PostPrepaidDeleteResponse { | @@ -7384,24 +9250,25 @@ export interface PostPrepaidDeleteResponse { | ||
7384 | 404: any; | 9250 | 404: any; |
7385 | } | 9251 | } |
7386 | 9252 | ||
7387 | -export type PostPrepaidDeleteResponseSuccess = PostPrepaidDeleteResponse[200]; | 9253 | +export type PostResearchGroupsEditResponseSuccess = |
9254 | + PostResearchGroupsEditResponse[200]; | ||
7388 | /** | 9255 | /** |
7389 | * @description | 9256 | * @description |
7390 | - * 删除预存 | ||
7391 | - * @tags prepaid-controller | 9257 | + * 编辑课题组信息 |
9258 | + * @tags research-groups-controller | ||
7392 | * @produces * | 9259 | * @produces * |
7393 | * @consumes application/json | 9260 | * @consumes application/json |
7394 | */ | 9261 | */ |
7395 | -export const postPrepaidDelete = /* #__PURE__ */ (() => { | 9262 | +export const postResearchGroupsEdit = /* #__PURE__ */ (() => { |
7396 | const method = 'post'; | 9263 | const method = 'post'; |
7397 | - const url = '/prepaid/delete'; | 9264 | + const url = '/research/groups/edit'; |
7398 | function request( | 9265 | function request( |
7399 | - option: PostPrepaidDeleteOption, | ||
7400 | - ): Promise<PostPrepaidDeleteResponseSuccess> { | 9266 | + option: PostResearchGroupsEditOption, |
9267 | + ): Promise<PostResearchGroupsEditResponseSuccess> { | ||
7401 | return requester(request.url, { | 9268 | return requester(request.url, { |
7402 | method: request.method, | 9269 | method: request.method, |
7403 | ...option, | 9270 | ...option, |
7404 | - }) as unknown as Promise<PostPrepaidDeleteResponseSuccess>; | 9271 | + }) as unknown as Promise<PostResearchGroupsEditResponseSuccess>; |
7405 | } | 9272 | } |
7406 | 9273 | ||
7407 | /** http method */ | 9274 | /** http method */ |
@@ -7411,22 +9278,22 @@ export const postPrepaidDelete = /* #__PURE__ */ (() => { | @@ -7411,22 +9278,22 @@ export const postPrepaidDelete = /* #__PURE__ */ (() => { | ||
7411 | return request; | 9278 | return request; |
7412 | })(); | 9279 | })(); |
7413 | 9280 | ||
7414 | -/** @description request parameter type for postPrepaidList */ | ||
7415 | -export interface PostPrepaidListOption { | 9281 | +/** @description request parameter type for postResearchGroupsImport */ |
9282 | +export interface PostResearchGroupsImportOption { | ||
7416 | /** | 9283 | /** |
7417 | * @description | 9284 | * @description |
7418 | - * request | 9285 | + * file |
7419 | */ | 9286 | */ |
7420 | - body: { | 9287 | + formData: { |
7421 | /** | 9288 | /** |
7422 | @description | 9289 | @description |
7423 | - request */ | ||
7424 | - request: SalesRechargePrepaymentRequest; | 9290 | + file */ |
9291 | + file: File; | ||
7425 | }; | 9292 | }; |
7426 | } | 9293 | } |
7427 | 9294 | ||
7428 | -/** @description response type for postPrepaidList */ | ||
7429 | -export interface PostPrepaidListResponse { | 9295 | +/** @description response type for postResearchGroupsImport */ |
9296 | +export interface PostResearchGroupsImportResponse { | ||
7430 | /** | 9297 | /** |
7431 | * @description | 9298 | * @description |
7432 | * OK | 9299 | * OK |
@@ -7454,24 +9321,25 @@ export interface PostPrepaidListResponse { | @@ -7454,24 +9321,25 @@ export interface PostPrepaidListResponse { | ||
7454 | 404: any; | 9321 | 404: any; |
7455 | } | 9322 | } |
7456 | 9323 | ||
7457 | -export type PostPrepaidListResponseSuccess = PostPrepaidListResponse[200]; | 9324 | +export type PostResearchGroupsImportResponseSuccess = |
9325 | + PostResearchGroupsImportResponse[200]; | ||
7458 | /** | 9326 | /** |
7459 | * @description | 9327 | * @description |
7460 | - * 查询列表 | ||
7461 | - * @tags prepaid-controller | 9328 | + * 课题组信息导入 |
9329 | + * @tags research-groups-controller | ||
7462 | * @produces * | 9330 | * @produces * |
7463 | - * @consumes application/json | 9331 | + * @consumes multipart/form-data |
7464 | */ | 9332 | */ |
7465 | -export const postPrepaidList = /* #__PURE__ */ (() => { | 9333 | +export const postResearchGroupsImport = /* #__PURE__ */ (() => { |
7466 | const method = 'post'; | 9334 | const method = 'post'; |
7467 | - const url = '/prepaid/list'; | 9335 | + const url = '/research/groups/import'; |
7468 | function request( | 9336 | function request( |
7469 | - option: PostPrepaidListOption, | ||
7470 | - ): Promise<PostPrepaidListResponseSuccess> { | 9337 | + option: PostResearchGroupsImportOption, |
9338 | + ): Promise<PostResearchGroupsImportResponseSuccess> { | ||
7471 | return requester(request.url, { | 9339 | return requester(request.url, { |
7472 | method: request.method, | 9340 | method: request.method, |
7473 | ...option, | 9341 | ...option, |
7474 | - }) as unknown as Promise<PostPrepaidListResponseSuccess>; | 9342 | + }) as unknown as Promise<PostResearchGroupsImportResponseSuccess>; |
7475 | } | 9343 | } |
7476 | 9344 | ||
7477 | /** http method */ | 9345 | /** http method */ |
@@ -7481,8 +9349,8 @@ export const postPrepaidList = /* #__PURE__ */ (() => { | @@ -7481,8 +9349,8 @@ export const postPrepaidList = /* #__PURE__ */ (() => { | ||
7481 | return request; | 9349 | return request; |
7482 | })(); | 9350 | })(); |
7483 | 9351 | ||
7484 | -/** @description request parameter type for postPrepaidUpdate */ | ||
7485 | -export interface PostPrepaidUpdateOption { | 9352 | +/** @description request parameter type for postResearchGroupsList */ |
9353 | +export interface PostResearchGroupsListOption { | ||
7486 | /** | 9354 | /** |
7487 | * @description | 9355 | * @description |
7488 | * request | 9356 | * request |
@@ -7491,12 +9359,12 @@ export interface PostPrepaidUpdateOption { | @@ -7491,12 +9359,12 @@ export interface PostPrepaidUpdateOption { | ||
7491 | /** | 9359 | /** |
7492 | @description | 9360 | @description |
7493 | request */ | 9361 | request */ |
7494 | - request: SalesRechargePrepaymentUpdateRequest; | 9362 | + request: ResearchGroupListRequest; |
7495 | }; | 9363 | }; |
7496 | } | 9364 | } |
7497 | 9365 | ||
7498 | -/** @description response type for postPrepaidUpdate */ | ||
7499 | -export interface PostPrepaidUpdateResponse { | 9366 | +/** @description response type for postResearchGroupsList */ |
9367 | +export interface PostResearchGroupsListResponse { | ||
7500 | /** | 9368 | /** |
7501 | * @description | 9369 | * @description |
7502 | * OK | 9370 | * OK |
@@ -7524,24 +9392,25 @@ export interface PostPrepaidUpdateResponse { | @@ -7524,24 +9392,25 @@ export interface PostPrepaidUpdateResponse { | ||
7524 | 404: any; | 9392 | 404: any; |
7525 | } | 9393 | } |
7526 | 9394 | ||
7527 | -export type PostPrepaidUpdateResponseSuccess = PostPrepaidUpdateResponse[200]; | 9395 | +export type PostResearchGroupsListResponseSuccess = |
9396 | + PostResearchGroupsListResponse[200]; | ||
7528 | /** | 9397 | /** |
7529 | * @description | 9398 | * @description |
7530 | - * 修改预存 | ||
7531 | - * @tags prepaid-controller | 9399 | + * 课题组列表 |
9400 | + * @tags research-groups-controller | ||
7532 | * @produces * | 9401 | * @produces * |
7533 | * @consumes application/json | 9402 | * @consumes application/json |
7534 | */ | 9403 | */ |
7535 | -export const postPrepaidUpdate = /* #__PURE__ */ (() => { | 9404 | +export const postResearchGroupsList = /* #__PURE__ */ (() => { |
7536 | const method = 'post'; | 9405 | const method = 'post'; |
7537 | - const url = '/prepaid/update'; | 9406 | + const url = '/research/groups/list'; |
7538 | function request( | 9407 | function request( |
7539 | - option: PostPrepaidUpdateOption, | ||
7540 | - ): Promise<PostPrepaidUpdateResponseSuccess> { | 9408 | + option: PostResearchGroupsListOption, |
9409 | + ): Promise<PostResearchGroupsListResponseSuccess> { | ||
7541 | return requester(request.url, { | 9410 | return requester(request.url, { |
7542 | method: request.method, | 9411 | method: request.method, |
7543 | ...option, | 9412 | ...option, |
7544 | - }) as unknown as Promise<PostPrepaidUpdateResponseSuccess>; | 9413 | + }) as unknown as Promise<PostResearchGroupsListResponseSuccess>; |
7545 | } | 9414 | } |
7546 | 9415 | ||
7547 | /** http method */ | 9416 | /** http method */ |
src/utils/numberUtil.ts
0 → 100644
1 | +export function getRandomNumber(numDigits: number) { | ||
2 | + if (numDigits <= 0) { | ||
3 | + throw new Error('Number of digits must be greater than 0'); | ||
4 | + } | ||
5 | + | ||
6 | + const min = Math.pow(10, numDigits - 1); | ||
7 | + const max = Math.pow(10, numDigits) - 1; | ||
8 | + return Math.floor(Math.random() * (max - min + 1)) + min; | ||
9 | +} |
src/utils/order.ts
1 | +import { postServiceOrderQuerySalesCode } from '@/services'; | ||
1 | import { cloneDeep } from 'lodash'; | 2 | import { cloneDeep } from 'lodash'; |
2 | import { getUserInfo } from '.'; | 3 | import { getUserInfo } from '.'; |
3 | export function getReceivingCompanyOptions(PAYEE_OPTIONS: any) { | 4 | export function getReceivingCompanyOptions(PAYEE_OPTIONS: any) { |
@@ -63,3 +64,17 @@ export function isFinance() { | @@ -63,3 +64,17 @@ export function isFinance() { | ||
63 | } | 64 | } |
64 | return false; | 65 | return false; |
65 | } | 66 | } |
67 | +/** | ||
68 | + * 获取销售代码枚举,在复制和编辑的时候判断是否为旧的代码 | ||
69 | + */ | ||
70 | +export const getSalesCodeOptions = async () => { | ||
71 | + const res = await postServiceOrderQuerySalesCode(); | ||
72 | + let options = res.data?.map((item) => { | ||
73 | + return { | ||
74 | + label: item.userName, | ||
75 | + value: item.userName, | ||
76 | + number: item.number, | ||
77 | + }; | ||
78 | + }); | ||
79 | + return options; | ||
80 | +}; |
src/utils/validators.ts
@@ -5,3 +5,8 @@ export const validatePhoneNumber = (_: any, value: any) => { | @@ -5,3 +5,8 @@ export const validatePhoneNumber = (_: any, value: any) => { | ||
5 | } | 5 | } |
6 | return Promise.reject('请输入正确的电话号码格式(例如:13789758969)'); | 6 | return Promise.reject('请输入正确的电话号码格式(例如:13789758969)'); |
7 | }; | 7 | }; |
8 | + | ||
9 | +export const validatePhoneNumberBool = (phoneNumber: any) => { | ||
10 | + const regex = /^1[3456789]\d{9}$/; | ||
11 | + return regex.test(phoneNumber); | ||
12 | +}; |