import{M as k,b as x,N as D,g as P}from"./element-plus.4a7d92a3.js";import{_ as N}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{u as T}from"./usePaging.6a6670f9.js";import{h as L}from"./workbench.654435c2.js";import{d as E,r as w,Z as U,o as u,c as p,U as e,L as m,a as f,u as t,T as h,Q as c,j as v}from"./@vue.18505fe0.js";const j={class:"edit-popup"},I={key:0,class:"flex mt-4 justify-end"},q=E({name:"storeProductDETAILS"}),G=E({...q,emits:["success","close"],setup(z,{expose:b,emit:A}){const r=w(!1),n=w(1),i=U({product_id:"",type:1}),g=async(d,l)=>{i.product_id=d.id,i.type=l,n.value=l,_()},C=()=>{r.value=!0},{pager:s,getLists:_,resetParams:M,resetPage:O}=T({fetchFun:L,params:i});return b({open:C,getDetail:g}),(d,l)=>{const o=k,F=x,y=D,B=N,V=P;return u(),p("div",j,[e(V,{title:"\u5E93\u5B58\u8BE6\u60C5",size:1e3,modelValue:t(r),"onUpdate:modelValue":l[1]||(l[1]=a=>v(r)?r.value=a:null)},{default:m(()=>[f("div",null,[f("div",null,[e(y,{data:t(s).lists},{default:m(()=>[e(o,{label:"id",prop:"id","show-overflow-tooltip":""}),e(o,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:m(({row:a})=>[e(F,{style:{width:"50px",height:"50px"},src:a.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(o,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","show-overflow-tooltip":""}),t(n)==1?(u(),p(h,{key:0},[e(o,{label:"\u95E8\u5E97",prop:"system_store","show-overflow-tooltip":""}),e(o,{label:"\u9500\u91CF",prop:"sales","show-overflow-tooltip":""}),e(o,{label:"\u5E93\u5B58",prop:"stock","show-overflow-tooltip":""}),e(o,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","show-overflow-tooltip":""}),e(o,{label:"\u5546\u6237",prop:"cost","show-overflow-tooltip":""}),e(o,{label:"\u96F6\u552E",prop:"price","show-overflow-tooltip":""})],64)):c("",!0),t(n)==0?(u(),p(h,{key:1},[e(o,{label:"\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),e(o,{label:"\u5E93\u5B58",prop:"nums","show-overflow-tooltip":""}),e(o,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","show-overflow-tooltip":""})],64)):c("",!0),e(o,{label:"\u4EF7\u503C",prop:"total_price","show-overflow-tooltip":""})]),_:1},8,["data"])]),t(s).lists.length<t(s).count?(u(),p("div",I,[e(B,{modelValue:t(s),"onUpdate:modelValue":l[0]||(l[0]=a=>v(s)?s.value=a:null),onChange:t(_)},null,8,["modelValue","onChange"])])):c("",!0)])]),_:1},8,["modelValue"])])}}});export{G as _};
