Commit 6a906c3b908b0f729fd24b7a055c2520b22bf902
1 parent
2a08cdcf
feat: 节点审核显示当前操作人
Showing
2 changed files
with
95 additions
and
4 deletions
src/pages/Order/index.tsx
... | ... | @@ -7,6 +7,7 @@ import { |
7 | 7 | postKingdeeRepSalBillOutbound, |
8 | 8 | postKingdeeRepSalOrderSave, |
9 | 9 | postServiceOrderCancelSend, |
10 | + postServiceOrderGetCurrentOptNode, | |
10 | 11 | postServiceOrderNoNeedSend, |
11 | 12 | postServiceOrderOrderCancel, |
12 | 13 | postServiceOrderProcureOrder, |
... | ... | @@ -66,6 +67,7 @@ import { |
66 | 67 | Popconfirm, |
67 | 68 | Radio, |
68 | 69 | Space, |
70 | + Spin, | |
69 | 71 | Tag, |
70 | 72 | Tooltip, |
71 | 73 | message, |
... | ... | @@ -196,8 +198,18 @@ const OrderPage = () => { |
196 | 198 | setShippingWarehouseChangeModalVisible, |
197 | 199 | ] = useState(false); |
198 | 200 | const [ids, setIds] = useState([]); |
201 | + const [recordOptNode, setRecordOptNode] = useState(null); | |
199 | 202 | const roleCode = userInfo?.roleSmallVO?.code; |
200 | 203 | |
204 | + const triggerRecordOptNode = async (id) => { | |
205 | + const res = await postServiceOrderGetCurrentOptNode({ | |
206 | + query: { | |
207 | + id, | |
208 | + }, | |
209 | + }); | |
210 | + setRecordOptNode(res.data); | |
211 | + }; | |
212 | + | |
201 | 213 | const exportLoading = () => { |
202 | 214 | messageApi.open({ |
203 | 215 | type: 'loading', |
... | ... | @@ -1190,10 +1202,16 @@ const OrderPage = () => { |
1190 | 1202 | optRecord.modifiedAuditStatus !== 'AUDIT_FAILURE' ? ( |
1191 | 1203 | <div className="overflow-hidden whitespace-no-wrap overflow-ellipsis"> |
1192 | 1204 | <Tooltip |
1193 | - title={enumValueToLabel( | |
1194 | - optRecord.modifiedAuditStatus, | |
1195 | - MODIFIED_AUDIT_STATUS_OPTIONS, | |
1196 | - )} | |
1205 | + title={recordOptNode ? recordOptNode : <Spin />} | |
1206 | + onOpenChange={(open) => { | |
1207 | + console.log('open:' + open); | |
1208 | + console.log('id:' + optRecord.id); | |
1209 | + if (open) { | |
1210 | + triggerRecordOptNode(optRecord.id); | |
1211 | + } else { | |
1212 | + setRecordOptNode(null); | |
1213 | + } | |
1214 | + }} | |
1197 | 1215 | > |
1198 | 1216 | <Tag color={TAGS_COLOR.get(optRecord.modifiedAuditStatus)}> |
1199 | 1217 | {enumValueToLabel( | ... | ... |
src/services/request.ts
... | ... | @@ -12280,6 +12280,79 @@ export const postServiceOrderFindServiceOrder = /* #__PURE__ */ (() => { |
12280 | 12280 | return request; |
12281 | 12281 | })(); |
12282 | 12282 | |
12283 | +/** @description request parameter type for postServiceOrderGetCurrentOptNode */ | |
12284 | +export interface PostServiceOrderGetCurrentOptNodeOption { | |
12285 | + /** | |
12286 | + * @description | |
12287 | + * id | |
12288 | + * @format int64 | |
12289 | + */ | |
12290 | + query?: { | |
12291 | + /** | |
12292 | + @description | |
12293 | + id | |
12294 | + @format int64 */ | |
12295 | + id?: number; | |
12296 | + }; | |
12297 | +} | |
12298 | + | |
12299 | +/** @description response type for postServiceOrderGetCurrentOptNode */ | |
12300 | +export interface PostServiceOrderGetCurrentOptNodeResponse { | |
12301 | + /** | |
12302 | + * @description | |
12303 | + * OK | |
12304 | + */ | |
12305 | + 200: ServerResult; | |
12306 | + /** | |
12307 | + * @description | |
12308 | + * Created | |
12309 | + */ | |
12310 | + 201: any; | |
12311 | + /** | |
12312 | + * @description | |
12313 | + * Unauthorized | |
12314 | + */ | |
12315 | + 401: any; | |
12316 | + /** | |
12317 | + * @description | |
12318 | + * Forbidden | |
12319 | + */ | |
12320 | + 403: any; | |
12321 | + /** | |
12322 | + * @description | |
12323 | + * Not Found | |
12324 | + */ | |
12325 | + 404: any; | |
12326 | +} | |
12327 | + | |
12328 | +export type PostServiceOrderGetCurrentOptNodeResponseSuccess = | |
12329 | + PostServiceOrderGetCurrentOptNodeResponse[200]; | |
12330 | +/** | |
12331 | + * @description | |
12332 | + * 获取当前节点的操作人 | |
12333 | + * @tags 内部订单 | |
12334 | + * @produces * | |
12335 | + * @consumes application/json | |
12336 | + */ | |
12337 | +export const postServiceOrderGetCurrentOptNode = /* #__PURE__ */ (() => { | |
12338 | + const method = 'post'; | |
12339 | + const url = '/service/order/getCurrentOptNode'; | |
12340 | + function request( | |
12341 | + option?: PostServiceOrderGetCurrentOptNodeOption, | |
12342 | + ): Promise<PostServiceOrderGetCurrentOptNodeResponseSuccess> { | |
12343 | + return requester(request.url, { | |
12344 | + method: request.method, | |
12345 | + ...option, | |
12346 | + }) as unknown as Promise<PostServiceOrderGetCurrentOptNodeResponseSuccess>; | |
12347 | + } | |
12348 | + | |
12349 | + /** http method */ | |
12350 | + request.method = method; | |
12351 | + /** request url */ | |
12352 | + request.url = url; | |
12353 | + return request; | |
12354 | +})(); | |
12355 | + | |
12283 | 12356 | /** @description request parameter type for postServiceOrderImportExcel */ |
12284 | 12357 | export interface PostServiceOrderImportExcelOption { |
12285 | 12358 | /** | ... | ... |