daShangDao_psiWebApp/dist/assets/warehouse.41a1bb2f.js
97694731 44ba8a631c
Some checks failed
CI / build (20.x) (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
CI / deploy-preview (push) Blocked by required conditions
CI / security (push) Waiting to run
CI / build (18.x) (push) Has been cancelled
1
2026-06-15 18:09:39 +08:00

2 lines
888 B
JavaScript

import{r as s}from"./request.92d2eb68.js";const r="/warehouse",u=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({keyword:e,type:t,status:n,page:a,pageSize:o})=>{const c={keyword:e||void 0,type:t,status:n,page:a,page_size:o},i=await s.get(`${r}/list`,{params:c});return u(i)},y=async({ids:e,page:t,pageSize:n})=>{const a={page:t,page_size:n};Array.isArray(e)&&e.length>0&&e.forEach((c,i)=>{a[`id[${i}]`]=c});const o=await s.get(`${r}/list`,{params:a});return u(o)},p=async e=>{const t=await s.get(`${r}/detail/${e}`);return(t==null?void 0:t.data)||null},f=async e=>s.post(`${r}/create`,e),g=async e=>s.put(`${r}/update`,e),A=async e=>s.post(`${r}/delete`,e);export{h as a,p as b,f as c,A as d,y as f,g as u};