| | |
| | | <StyledDatagrid |
| | | preferenceKey='taskItem' |
| | | bulkActionButtons={false} |
| | | rowClick={(id, resource, record) => false} |
| | | rowClick={false} |
| | | // expand={() => <TaskItemPanel />} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'taskId', 'orderId', 'orderItemId', 'matnrId']} |
| | |
| | | <BulkDeleteButton mutationMode={OPERATE_MODE} /> |
| | | </> |
| | | } |
| | | rowClick={'edit'} |
| | | rowClick={false} |
| | | expand={false} |
| | | expandSingle={true} |
| | | omit={['id', 'createTime', 'createBy', 'memo', 'robotCode', 'exceStatus', 'expDesc', 'expCode', 'status', 'sort']} |
| | |
| | | */ |
| | | const DoneButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | const clickComplete = () => { |
| | | console.log('------->'); |
| | | completeTask([record]) |
| | | }; |
| | | //完成任务 |
| | | const completeTask = async (row) => { } |
| | | const completeTask = async (row) => { |
| | | const { data: { code, data, msg } } = await request.post(`task/complete/` + row.id); |
| | | if (code === 200) { |
| | | notify(msg); |
| | | refresh(); |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | return ( |
| | | <Button |
| | | onClick={clickComplete} |
| | |
| | | } |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:update')") |
| | | @ApiOperation("取消任务") |
| | | @PostMapping("/task/cancel/{id}") |
| | | public R cancelTask(@PathVariable String id) { |
| | | if (Objects.isNull(id)) { |
| | | throw new CoolException("参数不能为空!!"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @PreAuthorize("hasAuthority('manager:task:update')") |
| | | @ApiOperation("任务出库置顶") |
| | | @PostMapping("/task/top/{id}") |
| | | public R setTop(@PathVariable String id) { |