daShangDao_psiWebApp/dist/assets/location.5e20e62a.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
1.5 KiB
JavaScript

import{r as n}from"./request.92d2eb68.js";const r="/location",c=t=>{const e=t==null?void 0:t.data;return e?Array.isArray(e)?{list:e,total:e.length}:{list:Array.isArray(e.list)?e.list:[],total:typeof e.total=="number"?e.total:Array.isArray(e.list)?e.list.length:0}:{list:[],total:0}},f=async({keyword:t,warehouseId:e,type:a,status:s,page:i,pageSize:o})=>{const d={code:t||void 0,warehouse_id:e||void 0,type:a,status:s,page:i,page_size:o},u=await n.get(`${r}/list`,{params:d});return c(u)},l=async t=>{const e=await n.get(`${r}/detail/${t}`);return(e==null?void 0:e.data)||null},m=async t=>n.post(`${r}/create`,t),y=async t=>n.put(`${r}/update`,t),A=async t=>{const e=new FormData;return Array.isArray(t.ids)&&t.ids.forEach((a,s)=>{e.append(`ids[${s}]`,a)}),n.post(`${r}/delete`,e)},h=async t=>{const e=new FormData;return Array.isArray(t.ids)&&t.ids.forEach((a,s)=>{e.append(`ids[${s}]`,a)}),t.code!==void 0&&e.append("code",t.code),t.type!==void 0&&e.append("type",t.type),t.capacity!==void 0&&e.append("capacity",t.capacity),t.status!==void 0&&e.append("status",t.status),n.put(`${r}/update`,e)},$=async t=>n.post(`${r}/batch-generate`,t),L=async({user_id:t,warehouse_id:e,file:a})=>{const s=new FormData;return s.append("user_id",t),s.append("warehouse_id",e),s.append("file",a),n.post(`${r}/import-from-excel`,s)},g=async({page:t,pageSize:e,keyword:a}={})=>{const s={page:t,page_size:e,code:a||void 0},i=await n.get(`${r}/all-list`,{params:s});return c(i)};export{$ as a,h as b,m as c,A as d,f as e,l as f,g,L as i,y as u};