daShangDao_psiWebApp/dist/assets/purchaseOrder.b88cf8f4.js
97694731 1fa4f33695
Some checks failed
CI / build (18.x) (push) Failing after 37m26s
CI / build (20.x) (push) Failing after 15s
CI / deploy-preview (push) Has been skipped
CI / lint (push) Failing after 16m50s
CI / test (push) Successful in 40m41s
CI / security (push) Successful in 29m36s
多拍
2026-06-25 14:37:30 +08:00

2 lines
866 B
JavaScript

import{r}from"./request.431ecd42.js";const s="/purchase-order",d=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}},p=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 d(u)},h=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),g=async e=>r.post("/wave/release",e),A=async e=>r.get("/purchase-order/export-to-wdt",{params:e,responseType:"blob"});export{h as a,f as c,y as d,A as e,p as f,g as r};