| | |
| | | const handleSubmit = async () => { |
| | | setFinally() |
| | | setDisabled(true) |
| | | setOpen(false) |
| | | const parmas = { |
| | | "purchaseId": record, |
| | | "items": tabelData, |
| | | } |
| | | console.log('--------->'); |
| | | console.log(parmas); |
| | | // const res = await request.post(`/asnOrder/purchases/save`, parmas); |
| | | // if (res?.data?.code === 200) { |
| | | // setOpen(false); |
| | | // refresh(); |
| | | // resetData() |
| | | // } else { |
| | | // notify(res.data.msg); |
| | | // } |
| | | const res = await request.post(`/asnOrder/purchases/save`, parmas); |
| | | if (res?.data?.code === 200) { |
| | | notify(res.data.msg); |
| | | } else { |
| | | notify(res.data.msg); |
| | | } |
| | | setOpen(false); |
| | | refresh(); |
| | | resetData() |
| | | setDisabled(false) |
| | | }; |
| | | |