Commit 87d1f9e92b7b4fc024e7031eb9134676bccfafd4
1 parent
be9630d3
feat: update 课题组模块更新
Showing
9 changed files
with
2168 additions
and
150 deletions
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 | postKingdeeRepCustomerDetail, | 5 | postKingdeeRepCustomerDetail, |
6 | postKingdeeRepMaterial, | 6 | postKingdeeRepMaterial, |
7 | postKingdeeRepMaterialUnit, | 7 | postKingdeeRepMaterialUnit, |
8 | postKingdeeRepMeasureUnit, | 8 | postKingdeeRepMeasureUnit, |
9 | + postPrepaidPhoneAvailableList, | ||
9 | postServiceOrderAddOrder, | 10 | postServiceOrderAddOrder, |
10 | postServiceOrderAfterSalesQuerySnapshotOrder, | 11 | postServiceOrderAfterSalesQuerySnapshotOrder, |
11 | postServiceOrderApplyAfterSales, | 12 | postServiceOrderApplyAfterSales, |
@@ -106,6 +107,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -106,6 +107,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
106 | }, | 107 | }, |
107 | ]; | 108 | ]; |
108 | }>(); | 109 | }>(); |
110 | + const [accountOptions, setAccountOptions] = useState<any>([]); | ||
109 | 111 | ||
110 | let copyData = cloneDeep(data); | 112 | let copyData = cloneDeep(data); |
111 | 113 | ||
@@ -229,6 +231,38 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -229,6 +231,38 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
229 | // } | 231 | // } |
230 | 232 | ||
231 | /** | 233 | /** |
234 | + * 加载预存账号的options | ||
235 | + */ | ||
236 | + async function loadAccountOptions(phone: any) { | ||
237 | + let newAccountOptions = []; | ||
238 | + //预存账号id | ||
239 | + let uid = copyData.prepaidUid; | ||
240 | + let res = await postCanrdApiUserDetail({ data: { uid: uid } }); | ||
241 | + if (res && res.result === RESPONSE_CODE.SUCCESS && res.data !== null) { | ||
242 | + let uidDetail = res.data; | ||
243 | + uidDetail.value = uid; | ||
244 | + uidDetail.label = uidDetail.realName; | ||
245 | + newAccountOptions.push(uidDetail); | ||
246 | + } | ||
247 | + | ||
248 | + //查询当前手机号允许使用的预存账号 | ||
249 | + if (phone) { | ||
250 | + let res = await postPrepaidPhoneAvailableList({ data: { phone: phone } }); | ||
251 | + if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
252 | + let uidDetails = res.data; | ||
253 | + for (let detail of uidDetails) { | ||
254 | + detail.value = detail.uid; | ||
255 | + detail.label = detail.realName; | ||
256 | + newAccountOptions.push(detail); | ||
257 | + } | ||
258 | + } | ||
259 | + } | ||
260 | + | ||
261 | + console.log(newAccountOptions); | ||
262 | + setAccountOptions(newAccountOptions); | ||
263 | + } | ||
264 | + | ||
265 | + /** | ||
232 | * 构建回显数据 | 266 | * 构建回显数据 |
233 | */ | 267 | */ |
234 | function buildOrderData() { | 268 | function buildOrderData() { |
@@ -296,6 +330,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -296,6 +330,8 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
296 | if (!optType('after-sales-check')) { | 330 | if (!optType('after-sales-check')) { |
297 | // showKindeeInfo(); | 331 | // showKindeeInfo(); |
298 | } | 332 | } |
333 | + | ||
334 | + loadAccountOptions(form.getFieldValue('customerContactNumber')); | ||
299 | } | 335 | } |
300 | } | 336 | } |
301 | 337 | ||
@@ -1040,6 +1076,11 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1040,6 +1076,11 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1040 | name="customerContactNumber" | 1076 | name="customerContactNumber" |
1041 | label="联系方式" | 1077 | label="联系方式" |
1042 | placeholder="请输入联系方式" | 1078 | placeholder="请输入联系方式" |
1079 | + fieldProps={{ | ||
1080 | + onBlur: (v) => { | ||
1081 | + loadAccountOptions(v.target.value); | ||
1082 | + }, | ||
1083 | + }} | ||
1043 | rules={[{ required: true, message: '联系方式必填' }]} | 1084 | rules={[{ required: true, message: '联系方式必填' }]} |
1044 | /> | 1085 | /> |
1045 | <ProFormText | 1086 | <ProFormText |
@@ -1135,7 +1176,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1135,7 +1176,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1135 | showSearch | 1176 | showSearch |
1136 | label="预存账号" | 1177 | label="预存账号" |
1137 | onChange={(option: any) => { | 1178 | onChange={(option: any) => { |
1138 | - form.setFieldValue('prepaidAmount', option.nowMoney); | 1179 | + form.setFieldValue('prepaidAmount', option?.nowMoney); |
1139 | }} | 1180 | }} |
1140 | placeholder="请选择预存账号" | 1181 | placeholder="请选择预存账号" |
1141 | rules={[ | 1182 | rules={[ |
@@ -1166,21 +1207,22 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1166,21 +1207,22 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1166 | }, | 1207 | }, |
1167 | }} | 1208 | }} |
1168 | debounceTime={1000} | 1209 | debounceTime={1000} |
1169 | - request={async (value, {}) => { | ||
1170 | - const keywords = value.keyWords; | ||
1171 | - const res = await postCanrdApiUserList({ | ||
1172 | - data: { keywords: keywords, pageSize: 1000000 }, | ||
1173 | - }); | ||
1174 | - let options = res?.data?.data?.map((c: any) => { | ||
1175 | - return { | ||
1176 | - ...c, | ||
1177 | - label: c.realName, | ||
1178 | - value: c.uid, | ||
1179 | - key: c.uid, | ||
1180 | - }; | ||
1181 | - }); | ||
1182 | - return options; | ||
1183 | - }} | 1210 | + // request={async (value, {}) => { |
1211 | + // const keywords = value.keyWords; | ||
1212 | + // const res = await postCanrdApiUserList({ | ||
1213 | + // data: { keywords: keywords, pageSize: 50 }, | ||
1214 | + // }); | ||
1215 | + // let options = res?.data?.data?.map((c: any) => { | ||
1216 | + // return { | ||
1217 | + // ...c, | ||
1218 | + // label: c.realName, | ||
1219 | + // value: c.uid, | ||
1220 | + // key: c.uid, | ||
1221 | + // }; | ||
1222 | + // }); | ||
1223 | + // return options; | ||
1224 | + // }} | ||
1225 | + options={accountOptions} | ||
1184 | /> | 1226 | /> |
1185 | <ProFormSelect | 1227 | <ProFormSelect |
1186 | placeholder="选择是否需要开票" | 1228 | placeholder="选择是否需要开票" |
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
@@ -4,6 +4,7 @@ import { | @@ -4,6 +4,7 @@ import { | ||
4 | postCanrdApiUserList, | 4 | postCanrdApiUserList, |
5 | postResearchGroupsAdd, | 5 | postResearchGroupsAdd, |
6 | postResearchGroupsDetail, | 6 | postResearchGroupsDetail, |
7 | + postResearchGroupsEdit, | ||
7 | } from '@/services'; | 8 | } from '@/services'; |
8 | import { getDefaultString, isEmpty } from '@/utils/StringUtil'; | 9 | import { getDefaultString, isEmpty } from '@/utils/StringUtil'; |
9 | import { getRandomNumber } from '@/utils/numberUtil'; | 10 | import { getRandomNumber } from '@/utils/numberUtil'; |
@@ -17,6 +18,7 @@ import { | @@ -17,6 +18,7 @@ import { | ||
17 | ProFormText, | 18 | ProFormText, |
18 | } from '@ant-design/pro-components'; | 19 | } from '@ant-design/pro-components'; |
19 | import { Button, Form, Spin, message } from 'antd'; | 20 | import { Button, Form, Spin, message } from 'antd'; |
21 | +import { cloneDeep } from 'lodash'; | ||
20 | import { useEffect, useState } from 'react'; | 22 | import { useEffect, useState } from 'react'; |
21 | import '../index.less'; | 23 | import '../index.less'; |
22 | 24 | ||
@@ -28,17 +30,19 @@ export default ({ setVisible, researchGroupId, onClose }) => { | @@ -28,17 +30,19 @@ export default ({ setVisible, researchGroupId, onClose }) => { | ||
28 | const [accountOptions, setAccountOptions] = useState<any[]>([]); | 30 | const [accountOptions, setAccountOptions] = useState<any[]>([]); |
29 | const [researchGroupInfo, setResearchGroupInfo] = useState<any>(null); | 31 | const [researchGroupInfo, setResearchGroupInfo] = useState<any>(null); |
30 | const [modalLoading, setModalLoading] = useState(false); | 32 | const [modalLoading, setModalLoading] = useState(false); |
33 | + const groupId = cloneDeep(researchGroupId); | ||
34 | + const [requestCount, setRequestCount] = useState(1); | ||
31 | 35 | ||
32 | /** | 36 | /** |
33 | * 获取课题组信息 | 37 | * 获取课题组信息 |
34 | * @returns | 38 | * @returns |
35 | */ | 39 | */ |
36 | const loadResearchGroupInfo = async () => { | 40 | const loadResearchGroupInfo = async () => { |
37 | - if (researchGroupId === null) { | 41 | + if (groupId === null) { |
38 | return; | 42 | return; |
39 | } | 43 | } |
40 | setModalLoading(true); | 44 | setModalLoading(true); |
41 | - let res = await postResearchGroupsDetail({ data: { id: researchGroupId } }); | 45 | + let res = await postResearchGroupsDetail({ data: { id: groupId } }); |
42 | if (res && res.result === RESPONSE_CODE.SUCCESS) { | 46 | if (res && res.result === RESPONSE_CODE.SUCCESS) { |
43 | setResearchGroupInfo(res.data); | 47 | setResearchGroupInfo(res.data); |
44 | } | 48 | } |
@@ -115,6 +119,11 @@ export default ({ setVisible, researchGroupId, onClose }) => { | @@ -115,6 +119,11 @@ export default ({ setVisible, researchGroupId, onClose }) => { | ||
115 | let newMemberOptions = [...memberOptions]; | 119 | let newMemberOptions = [...memberOptions]; |
116 | newMemberOptions.push(option); | 120 | newMemberOptions.push(option); |
117 | setMemberOptions(newMemberOptions); | 121 | setMemberOptions(newMemberOptions); |
122 | + | ||
123 | + //清空信息 | ||
124 | + form.setFieldValue('realName', undefined); | ||
125 | + form.setFieldValue('phone', undefined); | ||
126 | + form.setFieldValue('customerName', null); | ||
118 | } | 127 | } |
119 | 128 | ||
120 | /** | 129 | /** |
@@ -171,6 +180,7 @@ export default ({ setVisible, researchGroupId, onClose }) => { | @@ -171,6 +180,7 @@ export default ({ setVisible, researchGroupId, onClose }) => { | ||
171 | 180 | ||
172 | let memberIds = values.members; | 181 | let memberIds = values.members; |
173 | let accountIds = values.accounts; | 182 | let accountIds = values.accounts; |
183 | + values.id = groupId; | ||
174 | 184 | ||
175 | //成员对象封装 | 185 | //成员对象封装 |
176 | if (memberIds) { | 186 | if (memberIds) { |
@@ -180,6 +190,8 @@ export default ({ setVisible, researchGroupId, onClose }) => { | @@ -180,6 +190,8 @@ export default ({ setVisible, researchGroupId, onClose }) => { | ||
180 | memberObjs.push({ | 190 | memberObjs.push({ |
181 | memberName: memberOption.realName, | 191 | memberName: memberOption.realName, |
182 | memberPhone: memberOption.phone, | 192 | memberPhone: memberOption.phone, |
193 | + id: memberOption.id, | ||
194 | + groupId: memberOption.groupId, | ||
183 | }); | 195 | }); |
184 | } | 196 | } |
185 | } | 197 | } |
@@ -195,6 +207,8 @@ export default ({ setVisible, researchGroupId, onClose }) => { | @@ -195,6 +207,8 @@ export default ({ setVisible, researchGroupId, onClose }) => { | ||
195 | accountPhone: accountOption.phone, | 207 | accountPhone: accountOption.phone, |
196 | accountId: accountOption.uid, | 208 | accountId: accountOption.uid, |
197 | accountName: accountOption.realName, | 209 | accountName: accountOption.realName, |
210 | + id: accountOption.id, | ||
211 | + groupId: accountOption.groupId, | ||
198 | }); | 212 | }); |
199 | } | 213 | } |
200 | } | 214 | } |
@@ -220,7 +234,12 @@ export default ({ setVisible, researchGroupId, onClose }) => { | @@ -220,7 +234,12 @@ export default ({ setVisible, researchGroupId, onClose }) => { | ||
220 | let name = member.memberName; | 234 | let name = member.memberName; |
221 | let phone = member.memberPhone; | 235 | let phone = member.memberPhone; |
222 | let id = member.id; | 236 | let id = member.id; |
223 | - newMemberOptions.push({ realName: name, phone: phone, value: id }); | 237 | + newMemberOptions.push({ |
238 | + ...member, | ||
239 | + realName: name, | ||
240 | + phone: phone, | ||
241 | + value: id, | ||
242 | + }); | ||
224 | } | 243 | } |
225 | setMemberOptions(newMemberOptions); | 244 | setMemberOptions(newMemberOptions); |
226 | form.setFieldValue( | 245 | form.setFieldValue( |
@@ -233,18 +252,37 @@ export default ({ setVisible, researchGroupId, onClose }) => { | @@ -233,18 +252,37 @@ export default ({ setVisible, researchGroupId, onClose }) => { | ||
233 | 252 | ||
234 | let accounts = researchGroupInfo.accounts; | 253 | let accounts = researchGroupInfo.accounts; |
235 | if (accounts !== null) { | 254 | if (accounts !== null) { |
236 | - let accountIds = accounts.map((item: any) => { | ||
237 | - return item.id; | 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 }, | ||
238 | }); | 272 | }); |
239 | - let res = await postCanrdApiUserList({ data: { uids: accountIds } }); | ||
240 | - if (res && res.result === RESPONSE_CODE.SUCCESS && res.data) { | ||
241 | - let newAccountOptions = res?.data?.map((item) => { | ||
242 | - item.value = item.id; | 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); | ||
243 | return item; | 278 | return item; |
244 | }); | 279 | }); |
280 | + | ||
281 | + console.log(newAccountOptions); | ||
245 | setAccountOptions(newAccountOptions); | 282 | setAccountOptions(newAccountOptions); |
246 | - form.setFieldValue('accounts', accountIds); | ||
247 | } | 283 | } |
284 | + | ||
285 | + form.setFieldValue('accounts', accountIds); | ||
248 | } | 286 | } |
249 | 287 | ||
250 | form.setFieldValue('group', researchGroupInfo.groupName); | 288 | form.setFieldValue('group', researchGroupInfo.groupName); |
@@ -279,10 +317,16 @@ export default ({ setVisible, researchGroupId, onClose }) => { | @@ -279,10 +317,16 @@ export default ({ setVisible, researchGroupId, onClose }) => { | ||
279 | }} | 317 | }} |
280 | onFinish={async (values) => { | 318 | onFinish={async (values) => { |
281 | let newValues = parseFormValues(values); | 319 | let newValues = parseFormValues(values); |
282 | - let res = await postResearchGroupsAdd({ | ||
283 | - data: newValues, | ||
284 | - }); | ||
285 | - | 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 | + } | ||
286 | if (res && res.result === RESPONSE_CODE.SUCCESS) { | 330 | if (res && res.result === RESPONSE_CODE.SUCCESS) { |
287 | message.success(res.message); | 331 | message.success(res.message); |
288 | onClose(); | 332 | onClose(); |
@@ -346,8 +390,18 @@ export default ({ setVisible, researchGroupId, onClose }) => { | @@ -346,8 +390,18 @@ export default ({ setVisible, researchGroupId, onClose }) => { | ||
346 | debounceTime={1000} | 390 | debounceTime={1000} |
347 | request={async (value, {}) => { | 391 | request={async (value, {}) => { |
348 | const keywords = value.keyWords; | 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 | + | ||
349 | const res = await postCanrdApiUserList({ | 403 | const res = await postCanrdApiUserList({ |
350 | - data: { keywords: keywords, pageSize: 20 }, | 404 | + data: body, |
351 | }); | 405 | }); |
352 | let options = res?.data?.data?.map((c: any) => { | 406 | let options = res?.data?.data?.map((c: any) => { |
353 | return { | 407 | return { |
@@ -357,6 +411,8 @@ export default ({ setVisible, researchGroupId, onClose }) => { | @@ -357,6 +411,8 @@ export default ({ setVisible, researchGroupId, onClose }) => { | ||
357 | key: c.uid, | 411 | key: c.uid, |
358 | }; | 412 | }; |
359 | }); | 413 | }); |
414 | + | ||
415 | + setRequestCount(requestCount + 1); | ||
360 | return options; | 416 | return options; |
361 | }} | 417 | }} |
362 | /> | 418 | /> |
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 keywords = value.keyWords; | ||
295 | + let body = { keywords: keywords, 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
1 | +import { enumToProTableEnumValue } from '@/utils'; | ||
2 | +export const AUDIT_STATUS_OPTIONS = { | ||
3 | + CREATED: '未审核', | ||
4 | + AUDIT_PASS: '审核通过', | ||
5 | + AUDIT_FAIL: '审核失败', | ||
6 | +}; | ||
1 | export const RESEARCH_GROUP_COLUMNS = [ | 7 | export const RESEARCH_GROUP_COLUMNS = [ |
2 | { | 8 | { |
3 | title: '序号', | 9 | title: '序号', |
@@ -25,11 +31,31 @@ export const RESEARCH_GROUP_COLUMNS = [ | @@ -25,11 +31,31 @@ export const RESEARCH_GROUP_COLUMNS = [ | ||
25 | title: '预存账号', | 31 | title: '预存账号', |
26 | dataIndex: 'accounts', | 32 | dataIndex: 'accounts', |
27 | key: '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, | ||
28 | }, | 53 | }, |
29 | { | 54 | { |
30 | title: '课题组成员', | 55 | title: '课题组成员', |
31 | dataIndex: 'members', | 56 | dataIndex: 'members', |
32 | key: 'members', | 57 | key: 'members', |
58 | + hideInSearch: true, | ||
33 | }, | 59 | }, |
34 | { | 60 | { |
35 | title: '负责人', | 61 | title: '负责人', |
@@ -47,6 +73,7 @@ export const RESEARCH_GROUP_COLUMNS = [ | @@ -47,6 +73,7 @@ export const RESEARCH_GROUP_COLUMNS = [ | ||
47 | fieldProps: { | 73 | fieldProps: { |
48 | placeholder: '请选择创建时间', | 74 | placeholder: '请选择创建时间', |
49 | }, | 75 | }, |
76 | + hideInSearch: true, | ||
50 | }, | 77 | }, |
51 | 78 | ||
52 | { | 79 | { |
@@ -56,5 +83,101 @@ export const RESEARCH_GROUP_COLUMNS = [ | @@ -56,5 +83,101 @@ export const RESEARCH_GROUP_COLUMNS = [ | ||
56 | fieldProps: { | 83 | fieldProps: { |
57 | placeholder: '请输入选择创建人', | 84 | placeholder: '请输入选择创建人', |
58 | }, | 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, | ||
59 | }, | 182 | }, |
60 | ]; | 183 | ]; |
src/pages/ResearchGroup/index.tsx
@@ -4,6 +4,8 @@ import { RESPONSE_CODE } from '@/constants/enum'; | @@ -4,6 +4,8 @@ import { RESPONSE_CODE } from '@/constants/enum'; | ||
4 | import {} from '@/pages/Invoice/constant'; | 4 | import {} from '@/pages/Invoice/constant'; |
5 | import { | 5 | import { |
6 | postCanrdApiUserDetail, | 6 | postCanrdApiUserDetail, |
7 | + postResearchGroupMemberRequestsDelete, | ||
8 | + postResearchGroupMemberRequestsList, | ||
7 | postResearchGroupsDelete, | 9 | postResearchGroupsDelete, |
8 | postResearchGroupsList, | 10 | postResearchGroupsList, |
9 | } from '@/services'; | 11 | } from '@/services'; |
@@ -17,20 +19,35 @@ import { | @@ -17,20 +19,35 @@ import { | ||
17 | Image, | 19 | Image, |
18 | Popconfirm, | 20 | Popconfirm, |
19 | Row, | 21 | Row, |
22 | + Space, | ||
20 | Spin, | 23 | Spin, |
24 | + Table, | ||
21 | Tabs, | 25 | Tabs, |
22 | Tag, | 26 | Tag, |
23 | message, | 27 | message, |
24 | } from 'antd'; | 28 | } from 'antd'; |
25 | import React, { useRef, useState } from 'react'; | 29 | import React, { useRef, useState } from 'react'; |
30 | +import AuditModal from './components/AuditModal'; | ||
31 | +import ImportModal from './components/ImportModal'; | ||
26 | import ResearchGroupAddModal from './components/ResearchGroupAddModal'; | 32 | import ResearchGroupAddModal from './components/ResearchGroupAddModal'; |
27 | -import { RESEARCH_GROUP_COLUMNS } from './constant'; | 33 | +import ResearchGroupMemberRequestAddModal from './components/ResearchGroupMemberRequestAddModal'; |
34 | +import { | ||
35 | + RESEARCH_GROUP_COLUMNS, | ||
36 | + RESEARCH_GROUP_MEMBER_REQUEST_COLUMNS, | ||
37 | +} from './constant'; | ||
28 | import './index.less'; | 38 | import './index.less'; |
29 | const PrepaidPage = () => { | 39 | const PrepaidPage = () => { |
30 | const researchGroupActionRef = useRef<ActionType>(); | 40 | const researchGroupActionRef = useRef<ActionType>(); |
31 | - const accountActionRef = useRef<ActionType>(); | 41 | + const memberApplyActionRef = useRef<ActionType>(); |
32 | const [researchGroupAddModalVisible, setResearchGroupAddModalVisible] = | 42 | const [researchGroupAddModalVisible, setResearchGroupAddModalVisible] = |
33 | useState(false); | 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); | ||
34 | // const [checkVisible, setCheckVisible] = useState(false); | 51 | // const [checkVisible, setCheckVisible] = useState(false); |
35 | const [accountInfo, setAccountInfo] = useState({ | 52 | const [accountInfo, setAccountInfo] = useState({ |
36 | realName: '', | 53 | realName: '', |
@@ -46,8 +63,8 @@ const PrepaidPage = () => { | @@ -46,8 +63,8 @@ const PrepaidPage = () => { | ||
46 | researchGroupActionRef.current?.reload(); | 63 | researchGroupActionRef.current?.reload(); |
47 | }; | 64 | }; |
48 | 65 | ||
49 | - const reloadAccountTable = () => { | ||
50 | - accountActionRef.current?.reload(); | 66 | + const reloadMemberApplyTable = () => { |
67 | + memberApplyActionRef.current?.reload(); | ||
51 | }; | 68 | }; |
52 | 69 | ||
53 | // const getTableCellText = (target: any) => { | 70 | // const getTableCellText = (target: any) => { |
@@ -67,34 +84,32 @@ const PrepaidPage = () => { | @@ -67,34 +84,32 @@ const PrepaidPage = () => { | ||
67 | return <span></span>; | 84 | return <span></span>; |
68 | } | 85 | } |
69 | 86 | ||
70 | - return ( | ||
71 | - <div> | ||
72 | - {value.map((item: any) => { | ||
73 | - let memberName = item.memberName; | ||
74 | - let memberPhone = item.memberPhone; | ||
75 | - return ( | ||
76 | - <Tag | ||
77 | - className="mt-1 mb-0" | ||
78 | - key={item.id} | ||
79 | - color="cyan" | ||
80 | - title={memberName + ' | ' + memberPhone} | ||
81 | - > | ||
82 | - {memberName} | ||
83 | - </Tag> | ||
84 | - ); | ||
85 | - })} | ||
86 | - </div> | ||
87 | - ); | 87 | + return value.map((item: any) => { |
88 | + let memberName = item.memberName; | ||
89 | + let memberPhone = item.memberPhone; | ||
90 | + return ( | ||
91 | + <Tag | ||
92 | + className="mt-1 mb-0" | ||
93 | + key={item.id} | ||
94 | + color="cyan" | ||
95 | + title={memberName + ' | ' + memberPhone} | ||
96 | + > | ||
97 | + {memberName} | ||
98 | + </Tag> | ||
99 | + ); | ||
100 | + }); | ||
88 | }; | 101 | }; |
89 | 102 | ||
90 | /** | 103 | /** |
91 | * 获取预存账号信息 | 104 | * 获取预存账号信息 |
92 | * @param accountId | 105 | * @param accountId |
93 | */ | 106 | */ |
94 | - const loadAccountInfo = async (accountId: any) => { | 107 | + const loadAccountInfo = async (accountId: any, phone: any) => { |
95 | setAccountInfoLoading(true); | 108 | setAccountInfoLoading(true); |
96 | - let res = await postCanrdApiUserDetail({ data: { uid: accountId } }); | ||
97 | - if (res && res.result === RESPONSE_CODE.SUCCESS) { | 109 | + let res = await postCanrdApiUserDetail({ |
110 | + data: { uid: accountId, phone: phone }, | ||
111 | + }); | ||
112 | + if (res && res.result === RESPONSE_CODE.SUCCESS && res.data !== null) { | ||
98 | setAccountInfo(res.data); | 113 | setAccountInfo(res.data); |
99 | } else { | 114 | } else { |
100 | setAccountInfo({ | 115 | setAccountInfo({ |
@@ -178,7 +193,7 @@ const PrepaidPage = () => { | @@ -178,7 +193,7 @@ const PrepaidPage = () => { | ||
178 | color="geekblue" | 193 | color="geekblue" |
179 | title={accountName + ' | ' + accountPhone} | 194 | title={accountName + ' | ' + accountPhone} |
180 | onClick={() => { | 195 | onClick={() => { |
181 | - loadAccountInfo(accountId); | 196 | + loadAccountInfo(accountId, accountPhone); |
182 | }} | 197 | }} |
183 | > | 198 | > |
184 | {accountName} | 199 | {accountName} |
@@ -191,7 +206,35 @@ const PrepaidPage = () => { | @@ -191,7 +206,35 @@ const PrepaidPage = () => { | ||
191 | }; | 206 | }; |
192 | 207 | ||
193 | /** | 208 | /** |
194 | - * 加载发票列表表格的各个列格式 | 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 | + * 加载课题组列表表格的各个列格式 | ||
195 | */ | 238 | */ |
196 | const researchGroupColumnsInit = () => { | 239 | const researchGroupColumnsInit = () => { |
197 | let columns = RESEARCH_GROUP_COLUMNS.map((item) => { | 240 | let columns = RESEARCH_GROUP_COLUMNS.map((item) => { |
@@ -282,17 +325,131 @@ const PrepaidPage = () => { | @@ -282,17 +325,131 @@ const PrepaidPage = () => { | ||
282 | title={'确认删除这个课题组吗?'} | 325 | title={'确认删除这个课题组吗?'} |
283 | text="删除" | 326 | text="删除" |
284 | onConfirm={async () => { | 327 | onConfirm={async () => { |
285 | - let res = await postResearchGroupsDelete({ | ||
286 | - data: { ids: [record.id] }, | ||
287 | - }); | ||
288 | - if (res && res.result === RESPONSE_CODE.SUCCESS) { | ||
289 | - message.success(res.message); | ||
290 | - reloadResearchGroupTable(); | ||
291 | - } | 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]); | ||
292 | }} | 433 | }} |
293 | />, | 434 | />, |
294 | ); | 435 | ); |
295 | } | 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 | + } | ||
296 | return btns; | 453 | return btns; |
297 | }, | 454 | }, |
298 | }); | 455 | }); |
@@ -347,7 +504,7 @@ const PrepaidPage = () => { | @@ -347,7 +504,7 @@ const PrepaidPage = () => { | ||
347 | scroll={{ x: 1400 }} | 504 | scroll={{ x: 1400 }} |
348 | toolBarRender={() => { | 505 | toolBarRender={() => { |
349 | let btns = []; | 506 | let btns = []; |
350 | - if (perms.includes('add')) { | 507 | + if (perms?.includes('add')) { |
351 | btns.push( | 508 | btns.push( |
352 | <Button | 509 | <Button |
353 | key="button" | 510 | key="button" |
@@ -362,8 +519,150 @@ const PrepaidPage = () => { | @@ -362,8 +519,150 @@ const PrepaidPage = () => { | ||
362 | ); | 519 | ); |
363 | } | 520 | } |
364 | 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 | + ); | ||
365 | return btns; | 627 | return btns; |
366 | }} | 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 | + }} | ||
367 | /> | 666 | /> |
368 | ), | 667 | ), |
369 | }, | 668 | }, |
@@ -374,10 +673,10 @@ const PrepaidPage = () => { | @@ -374,10 +673,10 @@ const PrepaidPage = () => { | ||
374 | defaultActiveKey="1" | 673 | defaultActiveKey="1" |
375 | items={tabsItems} | 674 | items={tabsItems} |
376 | onChange={(value) => { | 675 | onChange={(value) => { |
377 | - if (value === '1') { | 676 | + if (value === 1) { |
378 | reloadResearchGroupTable(); | 677 | reloadResearchGroupTable(); |
379 | } else { | 678 | } else { |
380 | - reloadAccountTable(); | 679 | + reloadMemberApplyTable(); |
381 | } | 680 | } |
382 | }} | 681 | }} |
383 | /> | 682 | /> |
@@ -386,12 +685,58 @@ const PrepaidPage = () => { | @@ -386,12 +685,58 @@ const PrepaidPage = () => { | ||
386 | <ResearchGroupAddModal | 685 | <ResearchGroupAddModal |
387 | setVisible={(val: boolean) => { | 686 | setVisible={(val: boolean) => { |
388 | setResearchGroupAddModalVisible(val); | 687 | setResearchGroupAddModalVisible(val); |
389 | - setOptRecordId(null); | 688 | + if (!val) { |
689 | + setOptRecordId(null); | ||
690 | + } | ||
390 | }} | 691 | }} |
391 | researchGroupId={optRecordId} | 692 | researchGroupId={optRecordId} |
392 | onClose={() => { | 693 | onClose={() => { |
393 | setResearchGroupAddModalVisible(false); | 694 | setResearchGroupAddModalVisible(false); |
394 | setOptRecordId(null); | 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(); | ||
395 | }} | 740 | }} |
396 | /> | 741 | /> |
397 | )} | 742 | )} |
src/services/definition.ts
@@ -636,6 +636,18 @@ export interface CaptchaMessageVO { | @@ -636,6 +636,18 @@ export interface CaptchaMessageVO { | ||
636 | type?: string; | 636 | type?: string; |
637 | } | 637 | } |
638 | 638 | ||
639 | +export interface CommonAuditRequest { | ||
640 | + extend?: any; | ||
641 | + /** | ||
642 | + * @description | ||
643 | + * id集合 | ||
644 | + */ | ||
645 | + ids?: Array<string>; | ||
646 | + notes?: string; | ||
647 | + pass?: boolean; | ||
648 | + type?: string; | ||
649 | +} | ||
650 | + | ||
639 | export interface Contactperson { | 651 | export interface Contactperson { |
640 | birthday?: string; | 652 | birthday?: string; |
641 | contactAddress?: string; | 653 | contactAddress?: string; |
@@ -1797,12 +1809,12 @@ export interface ResearchGroupListRequest { | @@ -1797,12 +1809,12 @@ export interface ResearchGroupListRequest { | ||
1797 | * @description | 1809 | * @description |
1798 | * 课题组名称 | 1810 | * 课题组名称 |
1799 | */ | 1811 | */ |
1800 | - group?: string; | 1812 | + groupName?: string; |
1801 | /** | 1813 | /** |
1802 | * @description | 1814 | * @description |
1803 | * 课题组负责人 | 1815 | * 课题组负责人 |
1804 | */ | 1816 | */ |
1805 | - leader?: string; | 1817 | + leaderName?: string; |
1806 | /** | 1818 | /** |
1807 | * @description | 1819 | * @description |
1808 | * 课题组成员名称 | 1820 | * 课题组成员名称 |
@@ -1863,6 +1875,122 @@ export interface ResearchGroupMemberEditRequest { | @@ -1863,6 +1875,122 @@ export interface ResearchGroupMemberEditRequest { | ||
1863 | memberPhone?: string; | 1875 | memberPhone?: string; |
1864 | } | 1876 | } |
1865 | 1877 | ||
1878 | +export interface ResearchGroupMemberRequestAddRequest { | ||
1879 | + /** | ||
1880 | + * @description | ||
1881 | + * 课题组ID | ||
1882 | + * @format int64 | ||
1883 | + */ | ||
1884 | + groupId?: number; | ||
1885 | + /** | ||
1886 | + * @description | ||
1887 | + * 课题组名称 | ||
1888 | + */ | ||
1889 | + groupName?: string; | ||
1890 | + members?: Array<ResearchGroupMemberAddRequest>; | ||
1891 | + /** | ||
1892 | + * @description | ||
1893 | + * 申请备注 | ||
1894 | + */ | ||
1895 | + requestNotes?: string; | ||
1896 | +} | ||
1897 | + | ||
1898 | +export interface ResearchGroupMemberRequestDeleteRequest { | ||
1899 | + /** | ||
1900 | + * @description | ||
1901 | + * 主键id | ||
1902 | + */ | ||
1903 | + ids?: Array<number>; | ||
1904 | +} | ||
1905 | + | ||
1906 | +export interface ResearchGroupMemberRequestDetailRequest { | ||
1907 | + /** | ||
1908 | + * @description | ||
1909 | + * 主键id | ||
1910 | + * @format int64 | ||
1911 | + */ | ||
1912 | + id?: number; | ||
1913 | +} | ||
1914 | + | ||
1915 | +export interface ResearchGroupMemberRequestEditRequest { | ||
1916 | + /** | ||
1917 | + * @description | ||
1918 | + * 课题组ID | ||
1919 | + * @format int64 | ||
1920 | + */ | ||
1921 | + groupId?: number; | ||
1922 | + /** | ||
1923 | + * @description | ||
1924 | + * 课题组名称 | ||
1925 | + */ | ||
1926 | + groupName?: string; | ||
1927 | + /** | ||
1928 | + * @description | ||
1929 | + * 主键id | ||
1930 | + * @format int64 | ||
1931 | + */ | ||
1932 | + id?: number; | ||
1933 | + /** | ||
1934 | + * @description | ||
1935 | + * 成员名称 | ||
1936 | + */ | ||
1937 | + memberName?: string; | ||
1938 | + /** | ||
1939 | + * @description | ||
1940 | + * 成员手机号 | ||
1941 | + */ | ||
1942 | + memberPhone?: string; | ||
1943 | + /** | ||
1944 | + * @description | ||
1945 | + * 申请备注 | ||
1946 | + */ | ||
1947 | + requestNotes?: string; | ||
1948 | +} | ||
1949 | + | ||
1950 | +export interface ResearchGroupMemberRequestsRequest { | ||
1951 | + /** | ||
1952 | + * @description | ||
1953 | + * 审核备注 | ||
1954 | + */ | ||
1955 | + auditNotes?: string; | ||
1956 | + /** | ||
1957 | + * @description | ||
1958 | + * 审核状态 | ||
1959 | + */ | ||
1960 | + auditStatus?: string; | ||
1961 | + /** | ||
1962 | + * @description | ||
1963 | + * 创建人 | ||
1964 | + */ | ||
1965 | + createByName?: string; | ||
1966 | + /** @format int32 */ | ||
1967 | + current?: number; | ||
1968 | + /** | ||
1969 | + * @description | ||
1970 | + * 课题组名称 | ||
1971 | + */ | ||
1972 | + groupName?: string; | ||
1973 | + /** | ||
1974 | + * @description | ||
1975 | + * 成员名称 | ||
1976 | + */ | ||
1977 | + memberName?: string; | ||
1978 | + /** | ||
1979 | + * @description | ||
1980 | + * 成员手机号 | ||
1981 | + */ | ||
1982 | + memberPhone?: string; | ||
1983 | + /** @format int32 */ | ||
1984 | + pageSize?: number; | ||
1985 | + /** | ||
1986 | + * @description | ||
1987 | + * 申请备注 | ||
1988 | + */ | ||
1989 | + requestNotes?: string; | ||
1990 | + /** @format int32 */ | ||
1991 | + total?: number; | ||
1992 | +} | ||
1993 | + | ||
1866 | export interface ResetPwdVO { | 1994 | export interface ResetPwdVO { |
1867 | /** @format int64 */ | 1995 | /** @format int64 */ |
1868 | userId?: number; | 1996 | userId?: number; |
@@ -2115,6 +2243,11 @@ export interface UserListRequest { | @@ -2115,6 +2243,11 @@ export interface UserListRequest { | ||
2115 | phone?: string; | 2243 | phone?: string; |
2116 | /** | 2244 | /** |
2117 | * @description | 2245 | * @description |
2246 | + * phones | ||
2247 | + */ | ||
2248 | + phones?: Array<string>; | ||
2249 | + /** | ||
2250 | + * @description | ||
2118 | * salesCode | 2251 | * salesCode |
2119 | */ | 2252 | */ |
2120 | salesCode?: string; | 2253 | salesCode?: string; |
@@ -2128,6 +2261,11 @@ export interface UserListRequest { | @@ -2128,6 +2261,11 @@ export interface UserListRequest { | ||
2128 | uid?: number; | 2261 | uid?: number; |
2129 | /** | 2262 | /** |
2130 | * @description | 2263 | * @description |
2264 | + * ids | ||
2265 | + */ | ||
2266 | + uids?: Array<number>; | ||
2267 | + /** | ||
2268 | + * @description | ||
2131 | * 用户名 | 2269 | * 用户名 |
2132 | */ | 2270 | */ |
2133 | username?: string; | 2271 | username?: string; |
@@ -2171,6 +2309,11 @@ export interface SalesRechargePrepaymentAuditRequest { | @@ -2171,6 +2309,11 @@ export interface SalesRechargePrepaymentAuditRequest { | ||
2171 | * 是否通过 | 2309 | * 是否通过 |
2172 | */ | 2310 | */ |
2173 | pass?: boolean; | 2311 | pass?: boolean; |
2312 | + /** | ||
2313 | + * @description | ||
2314 | + * 手机号 | ||
2315 | + */ | ||
2316 | + phone?: string; | ||
2174 | } | 2317 | } |
2175 | 2318 | ||
2176 | export interface SalesRechargePrepaymentCreateRequest { | 2319 | export interface SalesRechargePrepaymentCreateRequest { |
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, |
@@ -53,7 +54,6 @@ import type { | @@ -53,7 +54,6 @@ import type { | ||
53 | MaterialUnitListRes, | 54 | MaterialUnitListRes, |
54 | MeasureUnitListRes, | 55 | MeasureUnitListRes, |
55 | MessageQueryDTO, | 56 | MessageQueryDTO, |
56 | - ModelAndView, | ||
57 | OrderAddVO, | 57 | OrderAddVO, |
58 | OrderAuditLogQueryVO, | 58 | OrderAuditLogQueryVO, |
59 | OrderBaseInfoQueryVO, | 59 | OrderBaseInfoQueryVO, |
@@ -80,6 +80,11 @@ import type { | @@ -80,6 +80,11 @@ import type { | ||
80 | ResearchGroupDetailRequest, | 80 | ResearchGroupDetailRequest, |
81 | ResearchGroupEditRequest, | 81 | ResearchGroupEditRequest, |
82 | ResearchGroupListRequest, | 82 | ResearchGroupListRequest, |
83 | + ResearchGroupMemberRequestAddRequest, | ||
84 | + ResearchGroupMemberRequestDeleteRequest, | ||
85 | + ResearchGroupMemberRequestDetailRequest, | ||
86 | + ResearchGroupMemberRequestEditRequest, | ||
87 | + ResearchGroupMemberRequestsRequest, | ||
83 | ResetPwdVO, | 88 | ResetPwdVO, |
84 | SalOrderSaveDto, | 89 | SalOrderSaveDto, |
85 | SalesRechargePrepaymentAuditRequest, | 90 | SalesRechargePrepaymentAuditRequest, |
@@ -1610,13 +1615,85 @@ export const postCanrdApiUserList = /* #__PURE__ */ (() => { | @@ -1610,13 +1615,85 @@ export const postCanrdApiUserList = /* #__PURE__ */ (() => { | ||
1610 | return request; | 1615 | return request; |
1611 | })(); | 1616 | })(); |
1612 | 1617 | ||
1618 | +/** @description request parameter type for postCommonAudit */ | ||
1619 | +export interface PostCommonAuditOption { | ||
1620 | + /** | ||
1621 | + * @description | ||
1622 | + * request | ||
1623 | + */ | ||
1624 | + body: { | ||
1625 | + /** | ||
1626 | + @description | ||
1627 | + request */ | ||
1628 | + request: CommonAuditRequest; | ||
1629 | + }; | ||
1630 | +} | ||
1631 | + | ||
1632 | +/** @description response type for postCommonAudit */ | ||
1633 | +export interface PostCommonAuditResponse { | ||
1634 | + /** | ||
1635 | + * @description | ||
1636 | + * OK | ||
1637 | + */ | ||
1638 | + 200: ServerResult; | ||
1639 | + /** | ||
1640 | + * @description | ||
1641 | + * Created | ||
1642 | + */ | ||
1643 | + 201: any; | ||
1644 | + /** | ||
1645 | + * @description | ||
1646 | + * Unauthorized | ||
1647 | + */ | ||
1648 | + 401: any; | ||
1649 | + /** | ||
1650 | + * @description | ||
1651 | + * Forbidden | ||
1652 | + */ | ||
1653 | + 403: any; | ||
1654 | + /** | ||
1655 | + * @description | ||
1656 | + * Not Found | ||
1657 | + */ | ||
1658 | + 404: any; | ||
1659 | +} | ||
1660 | + | ||
1661 | +export type PostCommonAuditResponseSuccess = PostCommonAuditResponse[200]; | ||
1662 | +/** | ||
1663 | + * @description | ||
1664 | + * audit | ||
1665 | + * @tags common-controller | ||
1666 | + * @produces * | ||
1667 | + * @consumes application/json | ||
1668 | + */ | ||
1669 | +export const postCommonAudit = /* #__PURE__ */ (() => { | ||
1670 | + const method = 'post'; | ||
1671 | + const url = '/common/audit'; | ||
1672 | + function request( | ||
1673 | + option: PostCommonAuditOption, | ||
1674 | + ): Promise<PostCommonAuditResponseSuccess> { | ||
1675 | + return requester(request.url, { | ||
1676 | + method: request.method, | ||
1677 | + ...option, | ||
1678 | + }) as unknown as Promise<PostCommonAuditResponseSuccess>; | ||
1679 | + } | ||
1680 | + | ||
1681 | + /** http method */ | ||
1682 | + request.method = method; | ||
1683 | + /** request url */ | ||
1684 | + request.url = url; | ||
1685 | + return request; | ||
1686 | +})(); | ||
1687 | + | ||
1613 | /** @description response type for getError */ | 1688 | /** @description response type for getError */ |
1614 | export interface GetErrorResponse { | 1689 | export interface GetErrorResponse { |
1615 | /** | 1690 | /** |
1616 | * @description | 1691 | * @description |
1617 | * OK | 1692 | * OK |
1618 | */ | 1693 | */ |
1619 | - 200: ModelAndView; | 1694 | + 200: { |
1695 | + [propertyName: string]: any; | ||
1696 | + }; | ||
1620 | /** | 1697 | /** |
1621 | * @description | 1698 | * @description |
1622 | * Unauthorized | 1699 | * Unauthorized |
@@ -1637,9 +1714,9 @@ export interface GetErrorResponse { | @@ -1637,9 +1714,9 @@ export interface GetErrorResponse { | ||
1637 | export type GetErrorResponseSuccess = GetErrorResponse[200]; | 1714 | export type GetErrorResponseSuccess = GetErrorResponse[200]; |
1638 | /** | 1715 | /** |
1639 | * @description | 1716 | * @description |
1640 | - * errorHtml | 1717 | + * error |
1641 | * @tags basic-error-controller | 1718 | * @tags basic-error-controller |
1642 | - * @produces text/html | 1719 | + * @produces * |
1643 | */ | 1720 | */ |
1644 | export const getError = /* #__PURE__ */ (() => { | 1721 | export const getError = /* #__PURE__ */ (() => { |
1645 | const method = 'get'; | 1722 | const method = 'get'; |
@@ -1663,7 +1740,9 @@ export interface PutErrorResponse { | @@ -1663,7 +1740,9 @@ export interface PutErrorResponse { | ||
1663 | * @description | 1740 | * @description |
1664 | * OK | 1741 | * OK |
1665 | */ | 1742 | */ |
1666 | - 200: ModelAndView; | 1743 | + 200: { |
1744 | + [propertyName: string]: any; | ||
1745 | + }; | ||
1667 | /** | 1746 | /** |
1668 | * @description | 1747 | * @description |
1669 | * Created | 1748 | * Created |
@@ -1689,9 +1768,9 @@ export interface PutErrorResponse { | @@ -1689,9 +1768,9 @@ export interface PutErrorResponse { | ||
1689 | export type PutErrorResponseSuccess = PutErrorResponse[200]; | 1768 | export type PutErrorResponseSuccess = PutErrorResponse[200]; |
1690 | /** | 1769 | /** |
1691 | * @description | 1770 | * @description |
1692 | - * errorHtml | 1771 | + * error |
1693 | * @tags basic-error-controller | 1772 | * @tags basic-error-controller |
1694 | - * @produces text/html | 1773 | + * @produces * |
1695 | * @consumes application/json | 1774 | * @consumes application/json |
1696 | */ | 1775 | */ |
1697 | export const putError = /* #__PURE__ */ (() => { | 1776 | export const putError = /* #__PURE__ */ (() => { |
@@ -1716,7 +1795,9 @@ export interface PostErrorResponse { | @@ -1716,7 +1795,9 @@ export interface PostErrorResponse { | ||
1716 | * @description | 1795 | * @description |
1717 | * OK | 1796 | * OK |
1718 | */ | 1797 | */ |
1719 | - 200: ModelAndView; | 1798 | + 200: { |
1799 | + [propertyName: string]: any; | ||
1800 | + }; | ||
1720 | /** | 1801 | /** |
1721 | * @description | 1802 | * @description |
1722 | * Created | 1803 | * Created |
@@ -1742,9 +1823,9 @@ export interface PostErrorResponse { | @@ -1742,9 +1823,9 @@ export interface PostErrorResponse { | ||
1742 | export type PostErrorResponseSuccess = PostErrorResponse[200]; | 1823 | export type PostErrorResponseSuccess = PostErrorResponse[200]; |
1743 | /** | 1824 | /** |
1744 | * @description | 1825 | * @description |
1745 | - * errorHtml | 1826 | + * error |
1746 | * @tags basic-error-controller | 1827 | * @tags basic-error-controller |
1747 | - * @produces text/html | 1828 | + * @produces * |
1748 | * @consumes application/json | 1829 | * @consumes application/json |
1749 | */ | 1830 | */ |
1750 | export const postError = /* #__PURE__ */ (() => { | 1831 | export const postError = /* #__PURE__ */ (() => { |
@@ -1769,7 +1850,9 @@ export interface DeleteErrorResponse { | @@ -1769,7 +1850,9 @@ export interface DeleteErrorResponse { | ||
1769 | * @description | 1850 | * @description |
1770 | * OK | 1851 | * OK |
1771 | */ | 1852 | */ |
1772 | - 200: ModelAndView; | 1853 | + 200: { |
1854 | + [propertyName: string]: any; | ||
1855 | + }; | ||
1773 | /** | 1856 | /** |
1774 | * @description | 1857 | * @description |
1775 | * No Content | 1858 | * No Content |
@@ -1790,9 +1873,9 @@ export interface DeleteErrorResponse { | @@ -1790,9 +1873,9 @@ export interface DeleteErrorResponse { | ||
1790 | export type DeleteErrorResponseSuccess = DeleteErrorResponse[200]; | 1873 | export type DeleteErrorResponseSuccess = DeleteErrorResponse[200]; |
1791 | /** | 1874 | /** |
1792 | * @description | 1875 | * @description |
1793 | - * errorHtml | 1876 | + * error |
1794 | * @tags basic-error-controller | 1877 | * @tags basic-error-controller |
1795 | - * @produces text/html | 1878 | + * @produces * |
1796 | */ | 1879 | */ |
1797 | export const deleteError = /* #__PURE__ */ (() => { | 1880 | export const deleteError = /* #__PURE__ */ (() => { |
1798 | const method = 'delete'; | 1881 | const method = 'delete'; |
@@ -1816,7 +1899,9 @@ export interface OptionsErrorResponse { | @@ -1816,7 +1899,9 @@ export interface OptionsErrorResponse { | ||
1816 | * @description | 1899 | * @description |
1817 | * OK | 1900 | * OK |
1818 | */ | 1901 | */ |
1819 | - 200: ModelAndView; | 1902 | + 200: { |
1903 | + [propertyName: string]: any; | ||
1904 | + }; | ||
1820 | /** | 1905 | /** |
1821 | * @description | 1906 | * @description |
1822 | * No Content | 1907 | * No Content |
@@ -1837,9 +1922,9 @@ export interface OptionsErrorResponse { | @@ -1837,9 +1922,9 @@ export interface OptionsErrorResponse { | ||
1837 | export type OptionsErrorResponseSuccess = OptionsErrorResponse[200]; | 1922 | export type OptionsErrorResponseSuccess = OptionsErrorResponse[200]; |
1838 | /** | 1923 | /** |
1839 | * @description | 1924 | * @description |
1840 | - * errorHtml | 1925 | + * error |
1841 | * @tags basic-error-controller | 1926 | * @tags basic-error-controller |
1842 | - * @produces text/html | 1927 | + * @produces * |
1843 | * @consumes application/json | 1928 | * @consumes application/json |
1844 | */ | 1929 | */ |
1845 | export const optionsError = /* #__PURE__ */ (() => { | 1930 | export const optionsError = /* #__PURE__ */ (() => { |
@@ -1864,7 +1949,9 @@ export interface HeadErrorResponse { | @@ -1864,7 +1949,9 @@ export interface HeadErrorResponse { | ||
1864 | * @description | 1949 | * @description |
1865 | * OK | 1950 | * OK |
1866 | */ | 1951 | */ |
1867 | - 200: ModelAndView; | 1952 | + 200: { |
1953 | + [propertyName: string]: any; | ||
1954 | + }; | ||
1868 | /** | 1955 | /** |
1869 | * @description | 1956 | * @description |
1870 | * No Content | 1957 | * No Content |
@@ -1885,9 +1972,9 @@ export interface HeadErrorResponse { | @@ -1885,9 +1972,9 @@ export interface HeadErrorResponse { | ||
1885 | export type HeadErrorResponseSuccess = HeadErrorResponse[200]; | 1972 | export type HeadErrorResponseSuccess = HeadErrorResponse[200]; |
1886 | /** | 1973 | /** |
1887 | * @description | 1974 | * @description |
1888 | - * errorHtml | 1975 | + * error |
1889 | * @tags basic-error-controller | 1976 | * @tags basic-error-controller |
1890 | - * @produces text/html | 1977 | + * @produces * |
1891 | * @consumes application/json | 1978 | * @consumes application/json |
1892 | */ | 1979 | */ |
1893 | export const headError = /* #__PURE__ */ (() => { | 1980 | export const headError = /* #__PURE__ */ (() => { |
@@ -1912,7 +1999,9 @@ export interface PatchErrorResponse { | @@ -1912,7 +1999,9 @@ export interface PatchErrorResponse { | ||
1912 | * @description | 1999 | * @description |
1913 | * OK | 2000 | * OK |
1914 | */ | 2001 | */ |
1915 | - 200: ModelAndView; | 2002 | + 200: { |
2003 | + [propertyName: string]: any; | ||
2004 | + }; | ||
1916 | /** | 2005 | /** |
1917 | * @description | 2006 | * @description |
1918 | * No Content | 2007 | * No Content |
@@ -1933,9 +2022,9 @@ export interface PatchErrorResponse { | @@ -1933,9 +2022,9 @@ export interface PatchErrorResponse { | ||
1933 | export type PatchErrorResponseSuccess = PatchErrorResponse[200]; | 2022 | export type PatchErrorResponseSuccess = PatchErrorResponse[200]; |
1934 | /** | 2023 | /** |
1935 | * @description | 2024 | * @description |
1936 | - * errorHtml | 2025 | + * error |
1937 | * @tags basic-error-controller | 2026 | * @tags basic-error-controller |
1938 | - * @produces text/html | 2027 | + * @produces * |
1939 | * @consumes application/json | 2028 | * @consumes application/json |
1940 | */ | 2029 | */ |
1941 | export const patchError = /* #__PURE__ */ (() => { | 2030 | export const patchError = /* #__PURE__ */ (() => { |
@@ -7546,6 +7635,77 @@ export const postPrepaidList = /* #__PURE__ */ (() => { | @@ -7546,6 +7635,77 @@ export const postPrepaidList = /* #__PURE__ */ (() => { | ||
7546 | return request; | 7635 | return request; |
7547 | })(); | 7636 | })(); |
7548 | 7637 | ||
7638 | +/** @description request parameter type for postPrepaidPhoneAvailableList */ | ||
7639 | +export interface PostPrepaidPhoneAvailableListOption { | ||
7640 | + /** | ||
7641 | + * @description | ||
7642 | + * request | ||
7643 | + */ | ||
7644 | + body: { | ||
7645 | + /** | ||
7646 | + @description | ||
7647 | + request */ | ||
7648 | + request: SalesRechargePrepaymentAuditRequest; | ||
7649 | + }; | ||
7650 | +} | ||
7651 | + | ||
7652 | +/** @description response type for postPrepaidPhoneAvailableList */ | ||
7653 | +export interface PostPrepaidPhoneAvailableListResponse { | ||
7654 | + /** | ||
7655 | + * @description | ||
7656 | + * OK | ||
7657 | + */ | ||
7658 | + 200: ServerResult; | ||
7659 | + /** | ||
7660 | + * @description | ||
7661 | + * Created | ||
7662 | + */ | ||
7663 | + 201: any; | ||
7664 | + /** | ||
7665 | + * @description | ||
7666 | + * Unauthorized | ||
7667 | + */ | ||
7668 | + 401: any; | ||
7669 | + /** | ||
7670 | + * @description | ||
7671 | + * Forbidden | ||
7672 | + */ | ||
7673 | + 403: any; | ||
7674 | + /** | ||
7675 | + * @description | ||
7676 | + * Not Found | ||
7677 | + */ | ||
7678 | + 404: any; | ||
7679 | +} | ||
7680 | + | ||
7681 | +export type PostPrepaidPhoneAvailableListResponseSuccess = | ||
7682 | + PostPrepaidPhoneAvailableListResponse[200]; | ||
7683 | +/** | ||
7684 | + * @description | ||
7685 | + * 财务审核 | ||
7686 | + * @tags prepaid-controller | ||
7687 | + * @produces * | ||
7688 | + * @consumes application/json | ||
7689 | + */ | ||
7690 | +export const postPrepaidPhoneAvailableList = /* #__PURE__ */ (() => { | ||
7691 | + const method = 'post'; | ||
7692 | + const url = '/prepaid/phone/available/list'; | ||
7693 | + function request( | ||
7694 | + option: PostPrepaidPhoneAvailableListOption, | ||
7695 | + ): Promise<PostPrepaidPhoneAvailableListResponseSuccess> { | ||
7696 | + return requester(request.url, { | ||
7697 | + method: request.method, | ||
7698 | + ...option, | ||
7699 | + }) as unknown as Promise<PostPrepaidPhoneAvailableListResponseSuccess>; | ||
7700 | + } | ||
7701 | + | ||
7702 | + /** http method */ | ||
7703 | + request.method = method; | ||
7704 | + /** request url */ | ||
7705 | + request.url = url; | ||
7706 | + return request; | ||
7707 | +})(); | ||
7708 | + | ||
7549 | /** @description request parameter type for postPrepaidUpdate */ | 7709 | /** @description request parameter type for postPrepaidUpdate */ |
7550 | export interface PostPrepaidUpdateOption { | 7710 | export interface PostPrepaidUpdateOption { |
7551 | /** | 7711 | /** |
@@ -7616,8 +7776,8 @@ export const postPrepaidUpdate = /* #__PURE__ */ (() => { | @@ -7616,8 +7776,8 @@ export const postPrepaidUpdate = /* #__PURE__ */ (() => { | ||
7616 | return request; | 7776 | return request; |
7617 | })(); | 7777 | })(); |
7618 | 7778 | ||
7619 | -/** @description request parameter type for postResearchGroupsAdd */ | ||
7620 | -export interface PostResearchGroupsAddOption { | 7779 | +/** @description request parameter type for postResearchGroupMemberRequestsAdd */ |
7780 | +export interface PostResearchGroupMemberRequestsAddOption { | ||
7621 | /** | 7781 | /** |
7622 | * @description | 7782 | * @description |
7623 | * request | 7783 | * request |
@@ -7626,12 +7786,12 @@ export interface PostResearchGroupsAddOption { | @@ -7626,12 +7786,12 @@ export interface PostResearchGroupsAddOption { | ||
7626 | /** | 7786 | /** |
7627 | @description | 7787 | @description |
7628 | request */ | 7788 | request */ |
7629 | - request: ResearchGroupAddRequest; | 7789 | + request: ResearchGroupMemberRequestAddRequest; |
7630 | }; | 7790 | }; |
7631 | } | 7791 | } |
7632 | 7792 | ||
7633 | -/** @description response type for postResearchGroupsAdd */ | ||
7634 | -export interface PostResearchGroupsAddResponse { | 7793 | +/** @description response type for postResearchGroupMemberRequestsAdd */ |
7794 | +export interface PostResearchGroupMemberRequestsAddResponse { | ||
7635 | /** | 7795 | /** |
7636 | * @description | 7796 | * @description |
7637 | * OK | 7797 | * OK |
@@ -7659,25 +7819,25 @@ export interface PostResearchGroupsAddResponse { | @@ -7659,25 +7819,25 @@ export interface PostResearchGroupsAddResponse { | ||
7659 | 404: any; | 7819 | 404: any; |
7660 | } | 7820 | } |
7661 | 7821 | ||
7662 | -export type PostResearchGroupsAddResponseSuccess = | ||
7663 | - PostResearchGroupsAddResponse[200]; | 7822 | +export type PostResearchGroupMemberRequestsAddResponseSuccess = |
7823 | + PostResearchGroupMemberRequestsAddResponse[200]; | ||
7664 | /** | 7824 | /** |
7665 | * @description | 7825 | * @description |
7666 | - * 新增课题组信息 | ||
7667 | - * @tags research-groups-controller | 7826 | + * 新增申请信息 |
7827 | + * @tags research-group-member-requests-controller | ||
7668 | * @produces * | 7828 | * @produces * |
7669 | * @consumes application/json | 7829 | * @consumes application/json |
7670 | */ | 7830 | */ |
7671 | -export const postResearchGroupsAdd = /* #__PURE__ */ (() => { | 7831 | +export const postResearchGroupMemberRequestsAdd = /* #__PURE__ */ (() => { |
7672 | const method = 'post'; | 7832 | const method = 'post'; |
7673 | - const url = '/research/groups/add'; | 7833 | + const url = '/research/group/member/requests/add'; |
7674 | function request( | 7834 | function request( |
7675 | - option: PostResearchGroupsAddOption, | ||
7676 | - ): Promise<PostResearchGroupsAddResponseSuccess> { | 7835 | + option: PostResearchGroupMemberRequestsAddOption, |
7836 | + ): Promise<PostResearchGroupMemberRequestsAddResponseSuccess> { | ||
7677 | return requester(request.url, { | 7837 | return requester(request.url, { |
7678 | method: request.method, | 7838 | method: request.method, |
7679 | ...option, | 7839 | ...option, |
7680 | - }) as unknown as Promise<PostResearchGroupsAddResponseSuccess>; | 7840 | + }) as unknown as Promise<PostResearchGroupMemberRequestsAddResponseSuccess>; |
7681 | } | 7841 | } |
7682 | 7842 | ||
7683 | /** http method */ | 7843 | /** http method */ |
@@ -7687,8 +7847,8 @@ export const postResearchGroupsAdd = /* #__PURE__ */ (() => { | @@ -7687,8 +7847,8 @@ export const postResearchGroupsAdd = /* #__PURE__ */ (() => { | ||
7687 | return request; | 7847 | return request; |
7688 | })(); | 7848 | })(); |
7689 | 7849 | ||
7690 | -/** @description request parameter type for postResearchGroupsDelete */ | ||
7691 | -export interface PostResearchGroupsDeleteOption { | 7850 | +/** @description request parameter type for postResearchGroupMemberRequestsDelete */ |
7851 | +export interface PostResearchGroupMemberRequestsDeleteOption { | ||
7692 | /** | 7852 | /** |
7693 | * @description | 7853 | * @description |
7694 | * request | 7854 | * request |
@@ -7697,12 +7857,12 @@ export interface PostResearchGroupsDeleteOption { | @@ -7697,12 +7857,12 @@ export interface PostResearchGroupsDeleteOption { | ||
7697 | /** | 7857 | /** |
7698 | @description | 7858 | @description |
7699 | request */ | 7859 | request */ |
7700 | - request: ResearchGroupDeleteRequest; | 7860 | + request: ResearchGroupMemberRequestDeleteRequest; |
7701 | }; | 7861 | }; |
7702 | } | 7862 | } |
7703 | 7863 | ||
7704 | -/** @description response type for postResearchGroupsDelete */ | ||
7705 | -export interface PostResearchGroupsDeleteResponse { | 7864 | +/** @description response type for postResearchGroupMemberRequestsDelete */ |
7865 | +export interface PostResearchGroupMemberRequestsDeleteResponse { | ||
7706 | /** | 7866 | /** |
7707 | * @description | 7867 | * @description |
7708 | * OK | 7868 | * OK |
@@ -7730,25 +7890,25 @@ export interface PostResearchGroupsDeleteResponse { | @@ -7730,25 +7890,25 @@ export interface PostResearchGroupsDeleteResponse { | ||
7730 | 404: any; | 7890 | 404: any; |
7731 | } | 7891 | } |
7732 | 7892 | ||
7733 | -export type PostResearchGroupsDeleteResponseSuccess = | ||
7734 | - PostResearchGroupsDeleteResponse[200]; | 7893 | +export type PostResearchGroupMemberRequestsDeleteResponseSuccess = |
7894 | + PostResearchGroupMemberRequestsDeleteResponse[200]; | ||
7735 | /** | 7895 | /** |
7736 | * @description | 7896 | * @description |
7737 | - * 删除课题组信息 | ||
7738 | - * @tags research-groups-controller | 7897 | + * 删除申请信息 |
7898 | + * @tags research-group-member-requests-controller | ||
7739 | * @produces * | 7899 | * @produces * |
7740 | * @consumes application/json | 7900 | * @consumes application/json |
7741 | */ | 7901 | */ |
7742 | -export const postResearchGroupsDelete = /* #__PURE__ */ (() => { | 7902 | +export const postResearchGroupMemberRequestsDelete = /* #__PURE__ */ (() => { |
7743 | const method = 'post'; | 7903 | const method = 'post'; |
7744 | - const url = '/research/groups/delete'; | 7904 | + const url = '/research/group/member/requests/delete'; |
7745 | function request( | 7905 | function request( |
7746 | - option: PostResearchGroupsDeleteOption, | ||
7747 | - ): Promise<PostResearchGroupsDeleteResponseSuccess> { | 7906 | + option: PostResearchGroupMemberRequestsDeleteOption, |
7907 | + ): Promise<PostResearchGroupMemberRequestsDeleteResponseSuccess> { | ||
7748 | return requester(request.url, { | 7908 | return requester(request.url, { |
7749 | method: request.method, | 7909 | method: request.method, |
7750 | ...option, | 7910 | ...option, |
7751 | - }) as unknown as Promise<PostResearchGroupsDeleteResponseSuccess>; | 7911 | + }) as unknown as Promise<PostResearchGroupMemberRequestsDeleteResponseSuccess>; |
7752 | } | 7912 | } |
7753 | 7913 | ||
7754 | /** http method */ | 7914 | /** http method */ |
@@ -7758,8 +7918,8 @@ export const postResearchGroupsDelete = /* #__PURE__ */ (() => { | @@ -7758,8 +7918,8 @@ export const postResearchGroupsDelete = /* #__PURE__ */ (() => { | ||
7758 | return request; | 7918 | return request; |
7759 | })(); | 7919 | })(); |
7760 | 7920 | ||
7761 | -/** @description request parameter type for postResearchGroupsDetail */ | ||
7762 | -export interface PostResearchGroupsDetailOption { | 7921 | +/** @description request parameter type for postResearchGroupMemberRequestsDetail */ |
7922 | +export interface PostResearchGroupMemberRequestsDetailOption { | ||
7763 | /** | 7923 | /** |
7764 | * @description | 7924 | * @description |
7765 | * request | 7925 | * request |
@@ -7768,12 +7928,12 @@ export interface PostResearchGroupsDetailOption { | @@ -7768,12 +7928,12 @@ export interface PostResearchGroupsDetailOption { | ||
7768 | /** | 7928 | /** |
7769 | @description | 7929 | @description |
7770 | request */ | 7930 | request */ |
7771 | - request: ResearchGroupDetailRequest; | 7931 | + request: ResearchGroupMemberRequestDetailRequest; |
7772 | }; | 7932 | }; |
7773 | } | 7933 | } |
7774 | 7934 | ||
7775 | -/** @description response type for postResearchGroupsDetail */ | ||
7776 | -export interface PostResearchGroupsDetailResponse { | 7935 | +/** @description response type for postResearchGroupMemberRequestsDetail */ |
7936 | +export interface PostResearchGroupMemberRequestsDetailResponse { | ||
7777 | /** | 7937 | /** |
7778 | * @description | 7938 | * @description |
7779 | * OK | 7939 | * OK |
@@ -7801,25 +7961,25 @@ export interface PostResearchGroupsDetailResponse { | @@ -7801,25 +7961,25 @@ export interface PostResearchGroupsDetailResponse { | ||
7801 | 404: any; | 7961 | 404: any; |
7802 | } | 7962 | } |
7803 | 7963 | ||
7804 | -export type PostResearchGroupsDetailResponseSuccess = | ||
7805 | - PostResearchGroupsDetailResponse[200]; | 7964 | +export type PostResearchGroupMemberRequestsDetailResponseSuccess = |
7965 | + PostResearchGroupMemberRequestsDetailResponse[200]; | ||
7806 | /** | 7966 | /** |
7807 | * @description | 7967 | * @description |
7808 | - * 查询课题组信息 | ||
7809 | - * @tags research-groups-controller | 7968 | + * 查询申请信息 |
7969 | + * @tags research-group-member-requests-controller | ||
7810 | * @produces * | 7970 | * @produces * |
7811 | * @consumes application/json | 7971 | * @consumes application/json |
7812 | */ | 7972 | */ |
7813 | -export const postResearchGroupsDetail = /* #__PURE__ */ (() => { | 7973 | +export const postResearchGroupMemberRequestsDetail = /* #__PURE__ */ (() => { |
7814 | const method = 'post'; | 7974 | const method = 'post'; |
7815 | - const url = '/research/groups/detail'; | 7975 | + const url = '/research/group/member/requests/detail'; |
7816 | function request( | 7976 | function request( |
7817 | - option: PostResearchGroupsDetailOption, | ||
7818 | - ): Promise<PostResearchGroupsDetailResponseSuccess> { | 7977 | + option: PostResearchGroupMemberRequestsDetailOption, |
7978 | + ): Promise<PostResearchGroupMemberRequestsDetailResponseSuccess> { | ||
7819 | return requester(request.url, { | 7979 | return requester(request.url, { |
7820 | method: request.method, | 7980 | method: request.method, |
7821 | ...option, | 7981 | ...option, |
7822 | - }) as unknown as Promise<PostResearchGroupsDetailResponseSuccess>; | 7982 | + }) as unknown as Promise<PostResearchGroupMemberRequestsDetailResponseSuccess>; |
7823 | } | 7983 | } |
7824 | 7984 | ||
7825 | /** http method */ | 7985 | /** http method */ |
@@ -7829,8 +7989,8 @@ export const postResearchGroupsDetail = /* #__PURE__ */ (() => { | @@ -7829,8 +7989,8 @@ export const postResearchGroupsDetail = /* #__PURE__ */ (() => { | ||
7829 | return request; | 7989 | return request; |
7830 | })(); | 7990 | })(); |
7831 | 7991 | ||
7832 | -/** @description request parameter type for postResearchGroupsEdit */ | ||
7833 | -export interface PostResearchGroupsEditOption { | 7992 | +/** @description request parameter type for postResearchGroupMemberRequestsEdit */ |
7993 | +export interface PostResearchGroupMemberRequestsEditOption { | ||
7834 | /** | 7994 | /** |
7835 | * @description | 7995 | * @description |
7836 | * request | 7996 | * request |
@@ -7839,12 +7999,12 @@ export interface PostResearchGroupsEditOption { | @@ -7839,12 +7999,12 @@ export interface PostResearchGroupsEditOption { | ||
7839 | /** | 7999 | /** |
7840 | @description | 8000 | @description |
7841 | request */ | 8001 | request */ |
7842 | - request: ResearchGroupEditRequest; | 8002 | + request: ResearchGroupMemberRequestEditRequest; |
7843 | }; | 8003 | }; |
7844 | } | 8004 | } |
7845 | 8005 | ||
7846 | -/** @description response type for postResearchGroupsEdit */ | ||
7847 | -export interface PostResearchGroupsEditResponse { | 8006 | +/** @description response type for postResearchGroupMemberRequestsEdit */ |
8007 | +export interface PostResearchGroupMemberRequestsEditResponse { | ||
7848 | /** | 8008 | /** |
7849 | * @description | 8009 | * @description |
7850 | * OK | 8010 | * OK |
@@ -7872,25 +8032,505 @@ export interface PostResearchGroupsEditResponse { | @@ -7872,25 +8032,505 @@ export interface PostResearchGroupsEditResponse { | ||
7872 | 404: any; | 8032 | 404: any; |
7873 | } | 8033 | } |
7874 | 8034 | ||
7875 | -export type PostResearchGroupsEditResponseSuccess = | ||
7876 | - PostResearchGroupsEditResponse[200]; | 8035 | +export type PostResearchGroupMemberRequestsEditResponseSuccess = |
8036 | + PostResearchGroupMemberRequestsEditResponse[200]; | ||
7877 | /** | 8037 | /** |
7878 | * @description | 8038 | * @description |
7879 | - * 编辑课题组信息 | ||
7880 | - * @tags research-groups-controller | 8039 | + * 编辑申请信息 |
8040 | + * @tags research-group-member-requests-controller | ||
7881 | * @produces * | 8041 | * @produces * |
7882 | * @consumes application/json | 8042 | * @consumes application/json |
7883 | */ | 8043 | */ |
7884 | -export const postResearchGroupsEdit = /* #__PURE__ */ (() => { | 8044 | +export const postResearchGroupMemberRequestsEdit = /* #__PURE__ */ (() => { |
7885 | const method = 'post'; | 8045 | const method = 'post'; |
7886 | - const url = '/research/groups/edit'; | 8046 | + const url = '/research/group/member/requests/edit'; |
7887 | function request( | 8047 | function request( |
7888 | - option: PostResearchGroupsEditOption, | ||
7889 | - ): Promise<PostResearchGroupsEditResponseSuccess> { | 8048 | + option: PostResearchGroupMemberRequestsEditOption, |
8049 | + ): Promise<PostResearchGroupMemberRequestsEditResponseSuccess> { | ||
7890 | return requester(request.url, { | 8050 | return requester(request.url, { |
7891 | method: request.method, | 8051 | method: request.method, |
7892 | ...option, | 8052 | ...option, |
7893 | - }) as unknown as Promise<PostResearchGroupsEditResponseSuccess>; | 8053 | + }) as unknown as Promise<PostResearchGroupMemberRequestsEditResponseSuccess>; |
8054 | + } | ||
8055 | + | ||
8056 | + /** http method */ | ||
8057 | + request.method = method; | ||
8058 | + /** request url */ | ||
8059 | + request.url = url; | ||
8060 | + return request; | ||
8061 | +})(); | ||
8062 | + | ||
8063 | +/** @description request parameter type for postResearchGroupMemberRequestsList */ | ||
8064 | +export interface PostResearchGroupMemberRequestsListOption { | ||
8065 | + /** | ||
8066 | + * @description | ||
8067 | + * request | ||
8068 | + */ | ||
8069 | + body: { | ||
8070 | + /** | ||
8071 | + @description | ||
8072 | + request */ | ||
8073 | + request: ResearchGroupMemberRequestsRequest; | ||
8074 | + }; | ||
8075 | +} | ||
8076 | + | ||
8077 | +/** @description response type for postResearchGroupMemberRequestsList */ | ||
8078 | +export interface PostResearchGroupMemberRequestsListResponse { | ||
8079 | + /** | ||
8080 | + * @description | ||
8081 | + * OK | ||
8082 | + */ | ||
8083 | + 200: ServerResult; | ||
8084 | + /** | ||
8085 | + * @description | ||
8086 | + * Created | ||
8087 | + */ | ||
8088 | + 201: any; | ||
8089 | + /** | ||
8090 | + * @description | ||
8091 | + * Unauthorized | ||
8092 | + */ | ||
8093 | + 401: any; | ||
8094 | + /** | ||
8095 | + * @description | ||
8096 | + * Forbidden | ||
8097 | + */ | ||
8098 | + 403: any; | ||
8099 | + /** | ||
8100 | + * @description | ||
8101 | + * Not Found | ||
8102 | + */ | ||
8103 | + 404: any; | ||
8104 | +} | ||
8105 | + | ||
8106 | +export type PostResearchGroupMemberRequestsListResponseSuccess = | ||
8107 | + PostResearchGroupMemberRequestsListResponse[200]; | ||
8108 | +/** | ||
8109 | + * @description | ||
8110 | + * 申请列表 | ||
8111 | + * @tags research-group-member-requests-controller | ||
8112 | + * @produces * | ||
8113 | + * @consumes application/json | ||
8114 | + */ | ||
8115 | +export const postResearchGroupMemberRequestsList = /* #__PURE__ */ (() => { | ||
8116 | + const method = 'post'; | ||
8117 | + const url = '/research/group/member/requests/list'; | ||
8118 | + function request( | ||
8119 | + option: PostResearchGroupMemberRequestsListOption, | ||
8120 | + ): Promise<PostResearchGroupMemberRequestsListResponseSuccess> { | ||
8121 | + return requester(request.url, { | ||
8122 | + method: request.method, | ||
8123 | + ...option, | ||
8124 | + }) as unknown as Promise<PostResearchGroupMemberRequestsListResponseSuccess>; | ||
8125 | + } | ||
8126 | + | ||
8127 | + /** http method */ | ||
8128 | + request.method = method; | ||
8129 | + /** request url */ | ||
8130 | + request.url = url; | ||
8131 | + return request; | ||
8132 | +})(); | ||
8133 | + | ||
8134 | +/** @description request parameter type for postResearchGroupsAdd */ | ||
8135 | +export interface PostResearchGroupsAddOption { | ||
8136 | + /** | ||
8137 | + * @description | ||
8138 | + * request | ||
8139 | + */ | ||
8140 | + body: { | ||
8141 | + /** | ||
8142 | + @description | ||
8143 | + request */ | ||
8144 | + request: ResearchGroupAddRequest; | ||
8145 | + }; | ||
8146 | +} | ||
8147 | + | ||
8148 | +/** @description response type for postResearchGroupsAdd */ | ||
8149 | +export interface PostResearchGroupsAddResponse { | ||
8150 | + /** | ||
8151 | + * @description | ||
8152 | + * OK | ||
8153 | + */ | ||
8154 | + 200: ServerResult; | ||
8155 | + /** | ||
8156 | + * @description | ||
8157 | + * Created | ||
8158 | + */ | ||
8159 | + 201: any; | ||
8160 | + /** | ||
8161 | + * @description | ||
8162 | + * Unauthorized | ||
8163 | + */ | ||
8164 | + 401: any; | ||
8165 | + /** | ||
8166 | + * @description | ||
8167 | + * Forbidden | ||
8168 | + */ | ||
8169 | + 403: any; | ||
8170 | + /** | ||
8171 | + * @description | ||
8172 | + * Not Found | ||
8173 | + */ | ||
8174 | + 404: any; | ||
8175 | +} | ||
8176 | + | ||
8177 | +export type PostResearchGroupsAddResponseSuccess = | ||
8178 | + PostResearchGroupsAddResponse[200]; | ||
8179 | +/** | ||
8180 | + * @description | ||
8181 | + * 新增课题组信息 | ||
8182 | + * @tags research-groups-controller | ||
8183 | + * @produces * | ||
8184 | + * @consumes application/json | ||
8185 | + */ | ||
8186 | +export const postResearchGroupsAdd = /* #__PURE__ */ (() => { | ||
8187 | + const method = 'post'; | ||
8188 | + const url = '/research/groups/add'; | ||
8189 | + function request( | ||
8190 | + option: PostResearchGroupsAddOption, | ||
8191 | + ): Promise<PostResearchGroupsAddResponseSuccess> { | ||
8192 | + return requester(request.url, { | ||
8193 | + method: request.method, | ||
8194 | + ...option, | ||
8195 | + }) as unknown as Promise<PostResearchGroupsAddResponseSuccess>; | ||
8196 | + } | ||
8197 | + | ||
8198 | + /** http method */ | ||
8199 | + request.method = method; | ||
8200 | + /** request url */ | ||
8201 | + request.url = url; | ||
8202 | + return request; | ||
8203 | +})(); | ||
8204 | + | ||
8205 | +/** @description request parameter type for postResearchGroupsDelete */ | ||
8206 | +export interface PostResearchGroupsDeleteOption { | ||
8207 | + /** | ||
8208 | + * @description | ||
8209 | + * request | ||
8210 | + */ | ||
8211 | + body: { | ||
8212 | + /** | ||
8213 | + @description | ||
8214 | + request */ | ||
8215 | + request: ResearchGroupDeleteRequest; | ||
8216 | + }; | ||
8217 | +} | ||
8218 | + | ||
8219 | +/** @description response type for postResearchGroupsDelete */ | ||
8220 | +export interface PostResearchGroupsDeleteResponse { | ||
8221 | + /** | ||
8222 | + * @description | ||
8223 | + * OK | ||
8224 | + */ | ||
8225 | + 200: ServerResult; | ||
8226 | + /** | ||
8227 | + * @description | ||
8228 | + * Created | ||
8229 | + */ | ||
8230 | + 201: any; | ||
8231 | + /** | ||
8232 | + * @description | ||
8233 | + * Unauthorized | ||
8234 | + */ | ||
8235 | + 401: any; | ||
8236 | + /** | ||
8237 | + * @description | ||
8238 | + * Forbidden | ||
8239 | + */ | ||
8240 | + 403: any; | ||
8241 | + /** | ||
8242 | + * @description | ||
8243 | + * Not Found | ||
8244 | + */ | ||
8245 | + 404: any; | ||
8246 | +} | ||
8247 | + | ||
8248 | +export type PostResearchGroupsDeleteResponseSuccess = | ||
8249 | + PostResearchGroupsDeleteResponse[200]; | ||
8250 | +/** | ||
8251 | + * @description | ||
8252 | + * 删除课题组信息 | ||
8253 | + * @tags research-groups-controller | ||
8254 | + * @produces * | ||
8255 | + * @consumes application/json | ||
8256 | + */ | ||
8257 | +export const postResearchGroupsDelete = /* #__PURE__ */ (() => { | ||
8258 | + const method = 'post'; | ||
8259 | + const url = '/research/groups/delete'; | ||
8260 | + function request( | ||
8261 | + option: PostResearchGroupsDeleteOption, | ||
8262 | + ): Promise<PostResearchGroupsDeleteResponseSuccess> { | ||
8263 | + return requester(request.url, { | ||
8264 | + method: request.method, | ||
8265 | + ...option, | ||
8266 | + }) as unknown as Promise<PostResearchGroupsDeleteResponseSuccess>; | ||
8267 | + } | ||
8268 | + | ||
8269 | + /** http method */ | ||
8270 | + request.method = method; | ||
8271 | + /** request url */ | ||
8272 | + request.url = url; | ||
8273 | + return request; | ||
8274 | +})(); | ||
8275 | + | ||
8276 | +/** @description request parameter type for postResearchGroupsDetail */ | ||
8277 | +export interface PostResearchGroupsDetailOption { | ||
8278 | + /** | ||
8279 | + * @description | ||
8280 | + * request | ||
8281 | + */ | ||
8282 | + body: { | ||
8283 | + /** | ||
8284 | + @description | ||
8285 | + request */ | ||
8286 | + request: ResearchGroupDetailRequest; | ||
8287 | + }; | ||
8288 | +} | ||
8289 | + | ||
8290 | +/** @description response type for postResearchGroupsDetail */ | ||
8291 | +export interface PostResearchGroupsDetailResponse { | ||
8292 | + /** | ||
8293 | + * @description | ||
8294 | + * OK | ||
8295 | + */ | ||
8296 | + 200: ServerResult; | ||
8297 | + /** | ||
8298 | + * @description | ||
8299 | + * Created | ||
8300 | + */ | ||
8301 | + 201: any; | ||
8302 | + /** | ||
8303 | + * @description | ||
8304 | + * Unauthorized | ||
8305 | + */ | ||
8306 | + 401: any; | ||
8307 | + /** | ||
8308 | + * @description | ||
8309 | + * Forbidden | ||
8310 | + */ | ||
8311 | + 403: any; | ||
8312 | + /** | ||
8313 | + * @description | ||
8314 | + * Not Found | ||
8315 | + */ | ||
8316 | + 404: any; | ||
8317 | +} | ||
8318 | + | ||
8319 | +export type PostResearchGroupsDetailResponseSuccess = | ||
8320 | + PostResearchGroupsDetailResponse[200]; | ||
8321 | +/** | ||
8322 | + * @description | ||
8323 | + * 查询课题组信息 | ||
8324 | + * @tags research-groups-controller | ||
8325 | + * @produces * | ||
8326 | + * @consumes application/json | ||
8327 | + */ | ||
8328 | +export const postResearchGroupsDetail = /* #__PURE__ */ (() => { | ||
8329 | + const method = 'post'; | ||
8330 | + const url = '/research/groups/detail'; | ||
8331 | + function request( | ||
8332 | + option: PostResearchGroupsDetailOption, | ||
8333 | + ): Promise<PostResearchGroupsDetailResponseSuccess> { | ||
8334 | + return requester(request.url, { | ||
8335 | + method: request.method, | ||
8336 | + ...option, | ||
8337 | + }) as unknown as Promise<PostResearchGroupsDetailResponseSuccess>; | ||
8338 | + } | ||
8339 | + | ||
8340 | + /** http method */ | ||
8341 | + request.method = method; | ||
8342 | + /** request url */ | ||
8343 | + request.url = url; | ||
8344 | + return request; | ||
8345 | +})(); | ||
8346 | + | ||
8347 | +/** @description response type for postResearchGroupsDownloadImportTemplate */ | ||
8348 | +export interface PostResearchGroupsDownloadImportTemplateResponse { | ||
8349 | + /** | ||
8350 | + * @description | ||
8351 | + * OK | ||
8352 | + */ | ||
8353 | + 200: any; | ||
8354 | + /** | ||
8355 | + * @description | ||
8356 | + * Created | ||
8357 | + */ | ||
8358 | + 201: any; | ||
8359 | + /** | ||
8360 | + * @description | ||
8361 | + * Unauthorized | ||
8362 | + */ | ||
8363 | + 401: any; | ||
8364 | + /** | ||
8365 | + * @description | ||
8366 | + * Forbidden | ||
8367 | + */ | ||
8368 | + 403: any; | ||
8369 | + /** | ||
8370 | + * @description | ||
8371 | + * Not Found | ||
8372 | + */ | ||
8373 | + 404: any; | ||
8374 | +} | ||
8375 | + | ||
8376 | +export type PostResearchGroupsDownloadImportTemplateResponseSuccess = | ||
8377 | + PostResearchGroupsDownloadImportTemplateResponse[200]; | ||
8378 | +/** | ||
8379 | + * @description | ||
8380 | + * 课题组导入模板下载 | ||
8381 | + * @tags research-groups-controller | ||
8382 | + * @produces * | ||
8383 | + * @consumes application/json | ||
8384 | + */ | ||
8385 | +export const postResearchGroupsDownloadImportTemplate = /* #__PURE__ */ (() => { | ||
8386 | + const method = 'post'; | ||
8387 | + const url = '/research/groups/download/importTemplate'; | ||
8388 | + function request(): Promise<PostResearchGroupsDownloadImportTemplateResponseSuccess> { | ||
8389 | + return requester(request.url, { | ||
8390 | + method: request.method, | ||
8391 | + }) as unknown as Promise<PostResearchGroupsDownloadImportTemplateResponseSuccess>; | ||
8392 | + } | ||
8393 | + | ||
8394 | + /** http method */ | ||
8395 | + request.method = method; | ||
8396 | + /** request url */ | ||
8397 | + request.url = url; | ||
8398 | + return request; | ||
8399 | +})(); | ||
8400 | + | ||
8401 | +/** @description request parameter type for postResearchGroupsEdit */ | ||
8402 | +export interface PostResearchGroupsEditOption { | ||
8403 | + /** | ||
8404 | + * @description | ||
8405 | + * request | ||
8406 | + */ | ||
8407 | + body: { | ||
8408 | + /** | ||
8409 | + @description | ||
8410 | + request */ | ||
8411 | + request: ResearchGroupEditRequest; | ||
8412 | + }; | ||
8413 | +} | ||
8414 | + | ||
8415 | +/** @description response type for postResearchGroupsEdit */ | ||
8416 | +export interface PostResearchGroupsEditResponse { | ||
8417 | + /** | ||
8418 | + * @description | ||
8419 | + * OK | ||
8420 | + */ | ||
8421 | + 200: ServerResult; | ||
8422 | + /** | ||
8423 | + * @description | ||
8424 | + * Created | ||
8425 | + */ | ||
8426 | + 201: any; | ||
8427 | + /** | ||
8428 | + * @description | ||
8429 | + * Unauthorized | ||
8430 | + */ | ||
8431 | + 401: any; | ||
8432 | + /** | ||
8433 | + * @description | ||
8434 | + * Forbidden | ||
8435 | + */ | ||
8436 | + 403: any; | ||
8437 | + /** | ||
8438 | + * @description | ||
8439 | + * Not Found | ||
8440 | + */ | ||
8441 | + 404: any; | ||
8442 | +} | ||
8443 | + | ||
8444 | +export type PostResearchGroupsEditResponseSuccess = | ||
8445 | + PostResearchGroupsEditResponse[200]; | ||
8446 | +/** | ||
8447 | + * @description | ||
8448 | + * 编辑课题组信息 | ||
8449 | + * @tags research-groups-controller | ||
8450 | + * @produces * | ||
8451 | + * @consumes application/json | ||
8452 | + */ | ||
8453 | +export const postResearchGroupsEdit = /* #__PURE__ */ (() => { | ||
8454 | + const method = 'post'; | ||
8455 | + const url = '/research/groups/edit'; | ||
8456 | + function request( | ||
8457 | + option: PostResearchGroupsEditOption, | ||
8458 | + ): Promise<PostResearchGroupsEditResponseSuccess> { | ||
8459 | + return requester(request.url, { | ||
8460 | + method: request.method, | ||
8461 | + ...option, | ||
8462 | + }) as unknown as Promise<PostResearchGroupsEditResponseSuccess>; | ||
8463 | + } | ||
8464 | + | ||
8465 | + /** http method */ | ||
8466 | + request.method = method; | ||
8467 | + /** request url */ | ||
8468 | + request.url = url; | ||
8469 | + return request; | ||
8470 | +})(); | ||
8471 | + | ||
8472 | +/** @description request parameter type for postResearchGroupsImport */ | ||
8473 | +export interface PostResearchGroupsImportOption { | ||
8474 | + /** | ||
8475 | + * @description | ||
8476 | + * file | ||
8477 | + */ | ||
8478 | + formData: { | ||
8479 | + /** | ||
8480 | + @description | ||
8481 | + file */ | ||
8482 | + file: File; | ||
8483 | + }; | ||
8484 | +} | ||
8485 | + | ||
8486 | +/** @description response type for postResearchGroupsImport */ | ||
8487 | +export interface PostResearchGroupsImportResponse { | ||
8488 | + /** | ||
8489 | + * @description | ||
8490 | + * OK | ||
8491 | + */ | ||
8492 | + 200: ServerResult; | ||
8493 | + /** | ||
8494 | + * @description | ||
8495 | + * Created | ||
8496 | + */ | ||
8497 | + 201: any; | ||
8498 | + /** | ||
8499 | + * @description | ||
8500 | + * Unauthorized | ||
8501 | + */ | ||
8502 | + 401: any; | ||
8503 | + /** | ||
8504 | + * @description | ||
8505 | + * Forbidden | ||
8506 | + */ | ||
8507 | + 403: any; | ||
8508 | + /** | ||
8509 | + * @description | ||
8510 | + * Not Found | ||
8511 | + */ | ||
8512 | + 404: any; | ||
8513 | +} | ||
8514 | + | ||
8515 | +export type PostResearchGroupsImportResponseSuccess = | ||
8516 | + PostResearchGroupsImportResponse[200]; | ||
8517 | +/** | ||
8518 | + * @description | ||
8519 | + * 课题组信息导入 | ||
8520 | + * @tags research-groups-controller | ||
8521 | + * @produces * | ||
8522 | + * @consumes multipart/form-data | ||
8523 | + */ | ||
8524 | +export const postResearchGroupsImport = /* #__PURE__ */ (() => { | ||
8525 | + const method = 'post'; | ||
8526 | + const url = '/research/groups/import'; | ||
8527 | + function request( | ||
8528 | + option: PostResearchGroupsImportOption, | ||
8529 | + ): Promise<PostResearchGroupsImportResponseSuccess> { | ||
8530 | + return requester(request.url, { | ||
8531 | + method: request.method, | ||
8532 | + ...option, | ||
8533 | + }) as unknown as Promise<PostResearchGroupsImportResponseSuccess>; | ||
7894 | } | 8534 | } |
7895 | 8535 | ||
7896 | /** http method */ | 8536 | /** http method */ |