Commit 3fa117553e9a6db352becd627fe423a46cec81bb
1 parent
7d171173
feat(Order): 课题组新需求
● 去掉审核按钮,新增课题组无需审核 ● 列表中去掉审核状态 ● 查询条件中去掉审核状态 ● 新增课题组页面,课题组名称输入框提示语修改为:请按规范输入,如:张三老师 ● 数据判重,当添加数据的课题组名称和单位名称同时存在时,提交时提示:该课题组已存在! ● 课题组名称和单位名称不允许输入除了汉字、字母和数字之外的特殊字符;须支持空格的输入,部分海外客户课题组为英文,单词之间会存在空格 ● 新增后的课题组仅管理员可修改、删除
Showing
6 changed files
with
109 additions
and
75 deletions
src/pages/Order/OrderList/OrderDrawer.tsx
@@ -598,6 +598,21 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -598,6 +598,21 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
598 | form.setFieldValue('totalPayment', totalPayment); | 598 | form.setFieldValue('totalPayment', totalPayment); |
599 | } | 599 | } |
600 | 600 | ||
601 | + /*function computeTotalPayment() { | ||
602 | + let list = form.getFieldValue('list'); | ||
603 | + let totalPaymentInMicro = 0; // 以"1 万分"为单位计算 | ||
604 | + | ||
605 | + list?.forEach((subOrder: any) => { | ||
606 | + let subOrderPayment = subOrder?.subOrderPayment; | ||
607 | + if (subOrderPayment !== '' && subOrderPayment !== undefined) { | ||
608 | + totalPaymentInMicro += Math.round(subOrderPayment * 10000); // 转换成整数(1 万分) | ||
609 | + } | ||
610 | + }); | ||
611 | + | ||
612 | + let totalPayment = totalPaymentInMicro / 10000; // 计算完后转换回元 | ||
613 | + form.setFieldValue('totalPayment', totalPayment.toFixed(2)); // 保留 4 位小数 | ||
614 | + }*/ | ||
615 | + | ||
601 | /** | 616 | /** |
602 | * 检查用户额度 | 617 | * 检查用户额度 |
603 | * @param option | 618 | * @param option |
@@ -726,18 +741,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -726,18 +741,6 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
726 | } | 741 | } |
727 | } | 742 | } |
728 | 743 | ||
729 | - const validateContactNumber = (_: any, value: any) => { | ||
730 | - const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; | ||
731 | - const phoneRegex = /^\d{1,11}(-\d{1,11})?$/; | ||
732 | - | ||
733 | - if (emailRegex.test(value) || phoneRegex.test(value)) { | ||
734 | - return Promise.resolve(); | ||
735 | - } | ||
736 | - return Promise.reject( | ||
737 | - new Error('联系方式必须是邮箱或手机号格式(不能包含空格等特殊符号)'), | ||
738 | - ); | ||
739 | - }; | ||
740 | - | ||
741 | /** | 744 | /** |
742 | * 刪除草稿数据 | 745 | * 刪除草稿数据 |
743 | */ | 746 | */ |
@@ -1205,10 +1208,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1205,10 +1208,7 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1205 | loadAccountOptions(v.target.value); | 1208 | loadAccountOptions(v.target.value); |
1206 | }, | 1209 | }, |
1207 | }} | 1210 | }} |
1208 | - rules={[ | ||
1209 | - { required: true, message: '联系方式必填' }, | ||
1210 | - { validator: validateContactNumber }, | ||
1211 | - ]} | 1211 | + rules={[{ required: true, message: '联系方式必填' }]} |
1212 | /> | 1212 | /> |
1213 | <ProFormText | 1213 | <ProFormText |
1214 | width="lg" | 1214 | width="lg" |
@@ -1712,6 +1712,18 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | @@ -1712,6 +1712,18 @@ export default ({ onClose, data, subOrders, orderOptType }) => { | ||
1712 | return Promise.resolve(); | 1712 | return Promise.resolve(); |
1713 | }, | 1713 | }, |
1714 | }, | 1714 | }, |
1715 | + { | ||
1716 | + validator: (_, value) => { | ||
1717 | + // 自定义校验逻辑 | ||
1718 | + if ( | ||
1719 | + form.getFieldValue('totalPayment') === 0 && | ||
1720 | + value !== 'UN_INVOICE' | ||
1721 | + ) { | ||
1722 | + return Promise.reject('金额为0订单不能开票'); | ||
1723 | + } | ||
1724 | + return Promise.resolve(); | ||
1725 | + }, | ||
1726 | + }, | ||
1715 | ]} | 1727 | ]} |
1716 | /> | 1728 | /> |
1717 | <ProFormSelect | 1729 | <ProFormSelect |
src/pages/ResearchGroup/components/ResearchGroupAddModal.tsx
@@ -347,7 +347,7 @@ export default ({ setVisible, researchGroupId, onClose }) => { | @@ -347,7 +347,7 @@ export default ({ setVisible, researchGroupId, onClose }) => { | ||
347 | name="groupName" | 347 | name="groupName" |
348 | label="课题组名称" | 348 | label="课题组名称" |
349 | placeholder="请输入课题组名称" | 349 | placeholder="请输入课题组名称" |
350 | - rules={[{ required: true, message: '请输入课题组名称' }]} | 350 | + rules={[{ required: true, message: '请按规范输入,如:张三老师' }]} |
351 | /> | 351 | /> |
352 | <ProFormText | 352 | <ProFormText |
353 | name="companyName" | 353 | name="companyName" |
src/pages/ResearchGroup/constant.tsx
1 | -import { postServiceConstListResearchGroupsStatus } from '@/services'; | ||
2 | -import { enumToProTableEnumValue, enumToSelect } from '@/utils'; | ||
3 | -import { MessageTwoTone } from '@ant-design/icons'; | ||
4 | -import { Space, Tooltip } from 'antd'; | 1 | +import { enumToProTableEnumValue } from '@/utils'; |
2 | + | ||
5 | export const AUDIT_STATUS_OPTIONS = { | 3 | export const AUDIT_STATUS_OPTIONS = { |
6 | CREATED: '未审核', | 4 | CREATED: '未审核', |
7 | AUDIT_PASS: '审核通过', | 5 | AUDIT_PASS: '审核通过', |
@@ -55,38 +53,6 @@ export const RESEARCH_GROUP_COLUMNS = [ | @@ -55,38 +53,6 @@ export const RESEARCH_GROUP_COLUMNS = [ | ||
55 | hideInSearch: true, | 53 | hideInSearch: true, |
56 | }, | 54 | }, |
57 | { | 55 | { |
58 | - title: '状态', | ||
59 | - dataIndex: 'statusText', | ||
60 | - key: 'statusText', | ||
61 | - hideInSearch: true, | ||
62 | - render: (_, record) => { | ||
63 | - console.log('1111' + JSON.stringify(record)); | ||
64 | - return ( | ||
65 | - <> | ||
66 | - <Space> | ||
67 | - {record.statusText} | ||
68 | - {record.statusNotes && ( | ||
69 | - <Tooltip title={record.statusNotes}> | ||
70 | - <MessageTwoTone /> | ||
71 | - </Tooltip> | ||
72 | - )} | ||
73 | - </Space> | ||
74 | - </> | ||
75 | - ); | ||
76 | - }, | ||
77 | - }, | ||
78 | - { | ||
79 | - title: '状态', | ||
80 | - dataIndex: 'status', | ||
81 | - key: 'status', | ||
82 | - valueType: 'select', | ||
83 | - request: async () => { | ||
84 | - const groupStatus = await postServiceConstListResearchGroupsStatus(); | ||
85 | - return enumToSelect(groupStatus.data); | ||
86 | - }, | ||
87 | - hideInTable: true, | ||
88 | - }, | ||
89 | - { | ||
90 | title: '预存手机号', | 56 | title: '预存手机号', |
91 | dataIndex: 'accountPhone', | 57 | dataIndex: 'accountPhone', |
92 | key: 'accountPhone', | 58 | key: 'accountPhone', |
@@ -224,11 +190,11 @@ export const RESEARCH_GROUP_MEMBER_REQUEST_COLUMNS = [ | @@ -224,11 +190,11 @@ export const RESEARCH_GROUP_MEMBER_REQUEST_COLUMNS = [ | ||
224 | valueEnum: { | 190 | valueEnum: { |
225 | ADD_MEMBER: { | 191 | ADD_MEMBER: { |
226 | text: '新增成员', | 192 | text: '新增成员', |
227 | - status: 'ADD_MEMBER' | 193 | + status: 'ADD_MEMBER', |
228 | }, | 194 | }, |
229 | ADD_ACCOUNT: { | 195 | ADD_ACCOUNT: { |
230 | text: '新增课题组', | 196 | text: '新增课题组', |
231 | - status: 'ADD_ACCOUNT' | 197 | + status: 'ADD_ACCOUNT', |
232 | }, | 198 | }, |
233 | }, | 199 | }, |
234 | hideInTable: true, | 200 | hideInTable: true, |
src/pages/ResearchGroup/index.tsx
@@ -573,11 +573,6 @@ const PrepaidPage = () => { | @@ -573,11 +573,6 @@ const PrepaidPage = () => { | ||
573 | let ids = selectedRows.map((item: any) => { | 573 | let ids = selectedRows.map((item: any) => { |
574 | return item.id; | 574 | return item.id; |
575 | }); | 575 | }); |
576 | - let canAudit = | ||
577 | - selectedRows.length > 0 && | ||
578 | - selectedRows.every((item) => { | ||
579 | - return item.paths?.includes('ADD_AUDIT'); | ||
580 | - }); | ||
581 | return ( | 576 | return ( |
582 | <Space size={16}> | 577 | <Space size={16}> |
583 | <ButtonConfirm | 578 | <ButtonConfirm |
@@ -592,21 +587,6 @@ const PrepaidPage = () => { | @@ -592,21 +587,6 @@ const PrepaidPage = () => { | ||
592 | <Button type="link" onClick={onCleanSelected}> | 587 | <Button type="link" onClick={onCleanSelected}> |
593 | 取消选中 | 588 | 取消选中 |
594 | </Button> | 589 | </Button> |
595 | - | ||
596 | - { | ||
597 | - <Button | ||
598 | - key="audit" | ||
599 | - type="link" | ||
600 | - disabled={!canAudit} | ||
601 | - onClick={async () => { | ||
602 | - setAuditIds(ids); | ||
603 | - setAuditModalVisible(true); | ||
604 | - setAuditType('research_groups_add_audit'); | ||
605 | - }} | ||
606 | - > | ||
607 | - 审核 | ||
608 | - </Button> | ||
609 | - } | ||
610 | </Space> | 590 | </Space> |
611 | ); | 591 | ); |
612 | }} | 592 | }} |
src/services/definition.ts
@@ -1687,6 +1687,11 @@ export interface InvoiceDto { | @@ -1687,6 +1687,11 @@ export interface InvoiceDto { | ||
1687 | orderTypeText?: string; | 1687 | orderTypeText?: string; |
1688 | /** | 1688 | /** |
1689 | * @description | 1689 | * @description |
1690 | + * 买方税号 | ||
1691 | + */ | ||
1692 | + partyATaxid?: string; | ||
1693 | + /** | ||
1694 | + * @description | ||
1690 | * 权限路径 | 1695 | * 权限路径 |
1691 | */ | 1696 | */ |
1692 | path?: Array<string>; | 1697 | path?: Array<string>; |
src/services/request.ts
@@ -21212,6 +21212,77 @@ export const postServiceOrderExport = /* #__PURE__ */ (() => { | @@ -21212,6 +21212,77 @@ export const postServiceOrderExport = /* #__PURE__ */ (() => { | ||
21212 | return request; | 21212 | return request; |
21213 | })(); | 21213 | })(); |
21214 | 21214 | ||
21215 | +/** @description request parameter type for postServiceOrderExportLockOrders */ | ||
21216 | +export interface PostServiceOrderExportLockOrdersOption { | ||
21217 | + /** | ||
21218 | + * @description | ||
21219 | + * dto | ||
21220 | + */ | ||
21221 | + body: { | ||
21222 | + /** | ||
21223 | + @description | ||
21224 | + dto */ | ||
21225 | + dto: QueryWarningOrderStatistics; | ||
21226 | + }; | ||
21227 | +} | ||
21228 | + | ||
21229 | +/** @description response type for postServiceOrderExportLockOrders */ | ||
21230 | +export interface PostServiceOrderExportLockOrdersResponse { | ||
21231 | + /** | ||
21232 | + * @description | ||
21233 | + * OK | ||
21234 | + */ | ||
21235 | + 200: any; | ||
21236 | + /** | ||
21237 | + * @description | ||
21238 | + * Created | ||
21239 | + */ | ||
21240 | + 201: any; | ||
21241 | + /** | ||
21242 | + * @description | ||
21243 | + * Unauthorized | ||
21244 | + */ | ||
21245 | + 401: any; | ||
21246 | + /** | ||
21247 | + * @description | ||
21248 | + * Forbidden | ||
21249 | + */ | ||
21250 | + 403: any; | ||
21251 | + /** | ||
21252 | + * @description | ||
21253 | + * Not Found | ||
21254 | + */ | ||
21255 | + 404: any; | ||
21256 | +} | ||
21257 | + | ||
21258 | +export type PostServiceOrderExportLockOrdersResponseSuccess = | ||
21259 | + PostServiceOrderExportLockOrdersResponse[200]; | ||
21260 | +/** | ||
21261 | + * @description | ||
21262 | + * exportLockOrders | ||
21263 | + * @tags 内部订单 | ||
21264 | + * @produces * | ||
21265 | + * @consumes application/json | ||
21266 | + */ | ||
21267 | +export const postServiceOrderExportLockOrders = /* #__PURE__ */ (() => { | ||
21268 | + const method = 'post'; | ||
21269 | + const url = '/service/order/exportLockOrders'; | ||
21270 | + function request( | ||
21271 | + option: PostServiceOrderExportLockOrdersOption, | ||
21272 | + ): Promise<PostServiceOrderExportLockOrdersResponseSuccess> { | ||
21273 | + return requester(request.url, { | ||
21274 | + method: request.method, | ||
21275 | + ...option, | ||
21276 | + }) as unknown as Promise<PostServiceOrderExportLockOrdersResponseSuccess>; | ||
21277 | + } | ||
21278 | + | ||
21279 | + /** http method */ | ||
21280 | + request.method = method; | ||
21281 | + /** request url */ | ||
21282 | + request.url = url; | ||
21283 | + return request; | ||
21284 | +})(); | ||
21285 | + | ||
21215 | /** @description response type for postServiceOrderExportTemplate */ | 21286 | /** @description response type for postServiceOrderExportTemplate */ |
21216 | export interface PostServiceOrderExportTemplateResponse { | 21287 | export interface PostServiceOrderExportTemplateResponse { |
21217 | /** | 21288 | /** |