2024-09-13 16:43:07 +08:00
|
|
|
import{a as B,b as L}from"./shop-56qEcTqU.js";import{r as f,b as s,h as v,c as i,k as b,f as e,w as a,j as N,g as r,d,p as y,E as A}from"./index-eNDFCmNV.js";import"./axiosAPI-fHo9bW-d.js";const D={class:"my-card put-storage"},I={class:"order-lists","infinite-scroll-distance":300,"infinite-scroll-delay":500,"infinite-scroll-immediate":!1,style:{overflow:"auto"}},U={__name:"index",setup(S){const u=f([]),t=f({page_no:1,page_size:20,loadend:!1,type:1}),_=f(!1),c=()=>{t.value.loadend||(_.value=!0,B({page_no:t.value.page_no,page_size:t.value.page_size,type:t.value.type}).then(n=>{u.value=[...u.value,...n.data.lists],n.data.lists.length<t.value.page_size&&(t.value.loadend=!0),t.value.page_no++,_.value=!1}))};c();const h=()=>{t.value.page_no=1,t.value.loadend=!1,u.value=[],c()},k=async n=>{L({id:n.id}).then(p=>{n.status=1,A.success("入库成功")})};return(n,p)=>{const g=s("el-radio-button"),x=s("el-radio-group"),o=s("el-table-column"),C=s("el-image"),m=s("el-tag"),V=s("el-button"),E=s("el-table"),w=v("loading"),z=v("infinite-scroll");return i(),b("div",D,[e(x,{style:{"margin-bottom":"20px"},modelValue:t.value.type,"onUpdate:modelValue":p[0]||(p[0]=l=>t.value.type=l),onChange:h},{default:a(()=>[e(g,{label:1,value:1},{default:a(()=>[r("售卖库存")]),_:1}),e(g,{label:2,value:2},{default:a(()=>[r("兑换库存")]),_:1})]),_:1},8,["modelValue"]),N((i(),b("div",I,[e(E,{data:u.value},{default:a(()=>[e(o,{label:"导入人员",prop:"admin_name"}),e(o,{label:"门店确认人员",prop:"staff_name"}),e(o,{label:"商品图",prop:"image"},{default:a(({row:l})=>[e(C,{class:"image",src:l.image},null,8,["src"])]),_:1}),e(o,{label:"商品",prop:"store_name"}),e(o,{label:"数量",prop:"nums"}),e(o,{label:"状态",prop:"status"},{default:a(({row:l})=>[l.status===1?(i(),d(m,{key:0,type:"success"},{default:a(()=>[r("已入库")]),_:1})):l.status===0?(i(),d(m,{key:1,type:"warning"},{default:a(()=>[r("待确认")]),_:1})):l.status===-1?(i(),d(m,{key:2,type:"danger"},{default:a(()=>[r("库存不足")]),_:1})):y("",!0)]),_:1}),e(o,{label:"备注",prop:"mark"}),e(o,{label:"操作",width:"120",fixed:"right"},{default:a(({row:l})=>[l.status==0?(i(),d(V,{key:0,type:"success",onClick:j=>k(l)},{default:a(()=>[r(" 确认入库 ")]),_:2},1032,["onClick"])):y("",!0)]),_:1})]),_:1},8,["data"])])),[[w,_.value],[z,c]])])}}};export{U as default};
|