import{a0 as j,a1 as I,x as R,y as A,b as O,M as W,N as q,g as z}from"./element-plus.4a7d92a3.js";import{_ as M}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{u as Q}from"./usePaging.6a6670f9.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.1bc00f65.js";import{d as V,s as Z,r as i,Z as v,o as g,c as F,U as e,L as t,u as a,j as h,R as D,S as E,a as $,Q as G}from"./@vue.18505fe0.js";import"./lodash.9dc701ad.js";import{d as H}from"./system_store.cf259033.js";import{a as J}from"./warehouse_product_storege.983abbf7.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const K={class:"edit-popup"},X={style:{"white-space":"pre"}},Y={key:0,class:"flex mt-4 justify-end"},ee=V({name:"storeProductDETAILS"}),We=V({...ee,props:{dictData:{type:Object,default:()=>({})}},emits:["success","close"],setup(oe,{expose:k,emit:te}){Z(),i("add");const x=i([]),n=i(!1),m=i("first"),B=s=>{s.paneName=="second"&&_(),s.paneName=="warehouse"&&N()},r=v({id:"",image:"",store_name:"",bar_code:"",cate_id:"",cate_name:"",price:"",unit:"",unit_name:"",stock:"",cost:"",purchase:"",rose:"0",manufacturer_information:""}),y=async s=>{d.product_id=s.id,m.value=="second"&&_();for(const l in r)s[l]!=null&&s[l]!=null&&(r[l]=s[l])},P=()=>{n.value=!0},d=v({product_id:""}),{pager:p,getLists:_,resetParams:ae,resetPage:le}=Q({fetchFun:H,params:d}),C=i([]),N=()=>{J(d).then(s=>{C.value=s.lists})};return k({open:P,setFormData:y}),(s,l)=>{const c=j,f=O,L=I,o=W,w=q,b=R,T=M,S=A,U=z;return g(),F("div",K,[e(U,{title:"\u5546\u54C1\u8BE6\u60C5",size:1200,modelValue:a(n),"onUpdate:modelValue":l[2]||(l[2]=u=>h(n)?n.value=u:null)},{default:t(()=>[e(S,{modelValue:a(m),"onUpdate:modelValue":l[1]||(l[1]=u=>h(m)?m.value=u:null),class:"demo-tabs",onTabClick:B},{default:t(()=>[e(b,{label:"\u57FA\u7840\u4FE1\u606F",name:"first"},{default:t(()=>[e(L,{class:"margin-top",column:2,border:""},{default:t(()=>[e(c,{label:"\u5546\u54C1\u540D\u79F0"},{default:t(()=>[D(E(a(r).store_name),1)]),_:1}),e(c,{label:"\u5546\u54C1\u5206\u7C7B"},{default:t(()=>[D(E(a(r).cate_name),1)]),_:1}),e(c,{label:"\u5546\u54C1\u56FE\u7247",span:2},{default:t(()=>[e(f,{src:a(r).image,class:"w-20 h-20","preview-teleported":!0},null,8,["src"])]),_:1}),e(c,{label:"\u5382\u5BB6\u5907\u6CE8",span:2},{default:t(()=>[$("div",X,E(a(r).manufacturer_information),1)]),_:1})]),_:1}),e(w,{data:a(x),border:"",class:"mt-4"},{default:t(()=>[e(o,{label:"\u89C4\u683C\u540D\u79F0",prop:"sku_name","min-width":"150"}),e(o,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","show-overflow-tooltip":""}),e(o,{label:"\u5546\u6237\u4EF7",prop:"cost","show-overflow-tooltip":""}),e(o,{label:"\u96F6\u552E\u4EF7",prop:"price","show-overflow-tooltip":""}),e(o,{label:"\u5546\u54C1\u9500\u91CF",prop:"sales","show-overflow-tooltip":""}),e(o,{label:"\u5546\u54C1\u5E93\u5B58",prop:"stock","show-overflow-tooltip":""}),e(o,{label:"\u6761\u7801",prop:"bar_code","show-overflow-tooltip":""})]),_:1},8,["data"])]),_:1}),e(b,{label:"\u9002\u7528\u95E8\u5E97",name:"second"},{default:t(()=>[e(w,{data:a(p).lists,border:""},{default:t(()=>[e(o,{label:"\u95E8\u5E97\u540D\u79F0",prop:"system_store_name","min-width":"200"}),e(o,{label:"\u5546\u54C1\u56FE",prop:"image",width:"80","show-overflow-tooltip":""},{default:t(({row:u})=>[e(f,{src:u.image,class:"w-[50px] h-[50px]","preview-teleported":!0},null,8,["src"])]),_:1}),e(o,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"150"}),e(o,{label:"\u5546\u54C1\u5E93\u5B58",prop:"stock","show-overflow-tooltip":""}),e(o,{label:"\u5546\u54C1\u4EF7\u683C",prop:"price","show-overflow-tooltip":""}),e(o,{label:"\u5546\u54C1\u9500\u91CF",prop:"sales","show-overflow-tooltip":""})]),_:1},8,["data"]),a(p).count>a(p).lists.length?(g(),F("div",Y,[e(T,{modelValue:a(p),"onUpdate:modelValue":l[0]||(l[0]=u=>h(p)?p.value=u:null),onChange:a(_)},null,8,["modelValue","onChange"])])):G("",!0)]),_:1}),e(b,{label:"\u4ED3\u5E93",name:"warehouse"},{default:t(()=>[e(w,{data:a(C)},{default:t(()=>[e(o,{label:"\u4ED3\u5E93",prop:"warehouse_name","min-width":"150"}),e(o,{label:"\u5546\u54C1\u56FE",prop:"image",width:"80","show-overflow-tooltip":""},{default:t(({row:u})=>[e(f,{src:u.image,class:"w-[50px] h-[50px]","preview-teleported":!0},null,8,["src"])]),_:1}),e(o,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"150"}),e(o,{label:"\u5546\u54C1\u5E93\u5B58",prop:"nums","show-overflow-tooltip":""})]),_:1},8,["data"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])])}}});export{We as default};