import{u as E}from"./hooks.9f8f44e2.js";import{G as v}from"./status.2b37e8be.js";import{a as C,b as n,c as w,j as y,h as t,f as e,x as p,p as d,u as s,m as c}from"./index.4d061c66.js";const B={class:"w-full flex justify-between"},F=c("p",null,"\u64CD\u4F5C",-1),z=C({__name:"ladder-table",props:{ladder:null,readonly:{type:Boolean}},emits:["choose","delete","update"],setup(m,{emit:u}){return(T,i)=>{const l=n("ElTableColumn"),_=n("ElTag"),f=n("ElImage"),x=n("el-input-number"),r=n("ElButton"),b=n("ElTooltip"),h=n("ElTable");return w(),y(h,{size:"small",border:"",data:m.ladder,"max-height":"500px"},{default:t(()=>[e(l,{prop:"name",label:"\u987A\u5E8F",width:"110px",fixed:"left"},{default:t(({$index:o})=>[p(d(o+1),1)]),_:1}),e(l,{prop:"type",label:"\u5546\u54C1\u7C7B\u578B",width:"110px"},{default:t(({row:o})=>[e(_,null,{default:t(()=>{var a;return[p(d(((a=s(v).find(({id:g})=>g===o.type+""))==null?void 0:a.label)||"--"),1)]}),_:2},1024)]),_:1}),e(l,{prop:"good_cover_img",width:"60",label:"\u56FE\u7247"},{default:t(({row:o})=>[e(f,{src:o.good_cover_img,fit:"cover",lazy:"","preview-src-list":o.good_cover_img!==""?[o.good_cover_img]:[],"z-index":99999,"preview-teleported":""},null,8,["src","preview-src-list"])]),_:1}),e(l,{prop:"good_name",label:"\u5546\u54C1\u540D\u79F0"}),e(l,{prop:"inventory",label:"\u6DFB\u52A0\u5E93\u5B58\u6570",width:"150px"},{default:t(({row:o})=>[e(x,{modelValue:o.inventory,"onUpdate:modelValue":a=>o.inventory=a,step:1,min:0,precision:0,size:"small",max:99999999,"value-on-clear":"min","controls-position":"right","step-strictly":""},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),e(l,{prop:"unit",label:"\u5355\u4F4D",width:"80px"}),e(l,{prop:"moq",label:"\u8D77\u8BA2\u91CF",width:"80px"}),e(l,{prop:"step",label:"\u6B65\u957F",width:"80px"}),e(l,{prop:"price",label:"\u552E\u4EF7",width:"110px"}),e(l,{width:"80px",fixed:"right"},{header:t(()=>[c("div",B,[F,e(b,{content:"\u6DFB\u52A0",placement:"top"},{default:t(()=>[e(r,{link:"",icon:s(E)("add"),onClick:i[0]||(i[0]=()=>u("choose"))},null,8,["icon"])]),_:1})])]),default:t(({$index:o,row:a})=>[e(r,{text:"",type:"primary",size:"small",onClick:()=>u("delete",o)},{default:t(()=>[p("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])}}});export{z as _};
