|  |  |  | 
|---|
|  |  |  | import DictionarySelect from "../../components/DictionarySelect"; | 
|---|
|  |  |  | import ImportButton from "../../components/ImportButton"; | 
|---|
|  |  |  | import DetailsIcon from '@mui/icons-material/Details'; | 
|---|
|  |  |  | import CancelIcon from '@mui/icons-material/Cancel'; | 
|---|
|  |  |  | import CancelOutlinedIcon from '@mui/icons-material/CancelOutlined'; | 
|---|
|  |  |  | import OutOrderCreate from "./OutOrderCreate"; | 
|---|
|  |  |  | import AddIcon from '@mui/icons-material/Add'; | 
|---|
|  |  |  | import OutOrderModal from "./OutOrderModal"; | 
|---|
|  |  |  | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <Button onClick={createByOrder} label={'toolbar.asnCreate'}> <AddIcon /> </Button> | 
|---|
|  |  |  | ) | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const CancelButton = () => { | 
|---|
|  |  |  | const record = useRecordContext(); | 
|---|
|  |  |  | const notify = useNotify(); | 
|---|
|  |  |  | const refresh = useRefresh(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const cancelOrder = async () => { | 
|---|
|  |  |  | const { data: { code, data, msg } } = await request.get(`/outStock/cancel/${record?.id}`); | 
|---|
|  |  |  | if (code === 200) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return ( | 
|---|
|  |  |  | <ConfirmButton label={"toolbar.cancel"} startIcon={<CancelIcon />} onConfirm={cancelOrder} /> | 
|---|
|  |  |  | record?.exceStatus == 0 ? <ConfirmButton label={"toolbar.cancel"} startIcon={<CancelOutlinedIcon />  } onConfirm={cancelOrder} /> : <></> | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | } | 
|---|