| | |
| | | <WrapperField cellClassName="opt" label="common.field.opt" onClick={(e) => e.stopPropagation()} > |
| | | <EditButton label="toolbar.detail" /> |
| | | <DoneButton sx={{ padding: '1px', fontSize: '.75rem' }} ></DoneButton> |
| | | <FullOutStockCompleteButton /> |
| | | <CancelButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} /> |
| | | <CheckButton /> |
| | | <PickButton /> |
| | |
| | | } |
| | | |
| | | /** |
| | | * 全版出库完结按钮(199状态) |
| | | * @returns |
| | | */ |
| | | const FullOutStockCompleteButton = () => { |
| | | const record = useRecordContext(); |
| | | const notify = useNotify(); |
| | | const refresh = useRefresh(); |
| | | |
| | | const clickComplete = () => { |
| | | completeFullOutStock(record) |
| | | }; |
| | | |
| | | //全版出库完结 |
| | | const completeFullOutStock = async (row) => { |
| | | const { data: { code, data, msg } } = await request.post(`/task/complete/fullOutStock/` + row.id); |
| | | if (code === 200) { |
| | | notify(msg); |
| | | refresh(); |
| | | } else { |
| | | notify(msg); |
| | | } |
| | | } |
| | | |
| | | return ( |
| | | record?.taskStatus == 199 && record?.taskType == 101 ? |
| | | <ConfirmButton |
| | | label={"toolbar.complete"} |
| | | color="primary" |
| | | startIcon={<TaskAltIcon />} |
| | | onConfirm={clickComplete} |
| | | /> |
| | | : <></> |
| | | ) |
| | | } |
| | | |
| | | /** |
| | | * 取消按钮 |
| | | * @returns |
| | | */ |