daShangDao_psiWebApp/dist/assets/purchaseOrder.34183846.js
凌尛 e3e3204354
Some checks failed
CI / build (18.x) (push) Failing after 16m52s
CI / build (20.x) (push) Failing after 13m36s
CI / deploy-preview (push) Has been skipped
CI / lint (push) Failing after 1m34s
CI / test (push) Failing after 34s
CI / security (push) Failing after 1m35s
提交代码
2026-06-22 10:25:21 +08:00

2 lines
778 B
JavaScript

import{r}from"./request.eff82867.js";const s="/purchase-order",l=e=>{const t=e==null?void 0:e.data;return t?Array.isArray(t)?{list:t,total:t.length}:{list:Array.isArray(t.list)?t.list:[],total:typeof t.total=="number"?t.total:Array.isArray(t.list)?t.list.length:0}:{list:[],total:0}},h=async e=>{const{keyword:t,status:a,page:n,pageSize:o,sort_by:c,sort_order:i}=e||{},u=await r.get(`${s}/list`,{params:{po_no:t||void 0,status:a||void 0,page:n,page_size:o,sort_by:c||"updated_at",sort_order:i||"desc"}});return l(u)},p=async e=>{const t=await r.get(`${s}/detail`,{params:{id:e}});return(t==null?void 0:t.data)||null},y=async e=>r.post(`${s}/delete`,e),f=async e=>r.post(`${s}/create-with-wave`,e),A=async e=>r.post("/wave/release",e);export{p as a,f as c,y as d,h as f,A as r};