import{d as lr,u as or,I as ir,r as t,o as u,q as k,w as P,g as o,t as _r,a as r,f as e,_ as cr,aJ as sr,v as p,O as g,N as q,a3 as f,c as z,h as mr,aK as nr,aq as y,ar as h,aL as ur,V as pr,W as dr,aM as fr,H as yr,p as hr,j as vr,__tla as kr}from"./index-73e02845.js";import{_ as Pr,__tla as gr}from"./ContentWrap.vue_vue_type_script_setup_true_lang-589371a6.js";import{_ as br,__tla as Fr}from"./SPuUploadImg-48e3f49f.js";import{u as Dr,__tla as Ur}from"./tagsView-ec31b381.js";import{g as wr,__tla as Br}from"./spu-a6b1f90b.js";import Ir,{__tla as Tr}from"./InfoForm-7372da12.js";import Vr,{__tla as Cr}from"./DescriptionForm-433288d4.js";import xr,{__tla as Rr}from"./OtherForm-d11aef3d.js";import Sr,{__tla as Ar}from"./SkuForm-842a3b76.js";import jr,{__tla as qr}from"./DeliveryForm-e8306404.js";import zr,{__tla as Or}from"./Service-ab175072.js";import{A as Er,__tla as Hr}from"./AfterSale-f843bc25.js";import Jr,{__tla as Kr}from"./Comment-a5a8532c.js";import{u as Lr,__tla as Mr}from"./useMessage-1490ad82.js";import{_ as Nr}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Wr}from"./el-card-ada74e7d.js";import{__tla as Zr}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-f7f68f03.js";import{__tla as Gr}from"./index-c6e30cdd.js";import{__tla as Qr}from"./el-image-viewer-a6b3dac3.js";import{__tla as Xr}from"./UploadImgs-9684a6c6.js";import{__tla as Yr}from"./UploadImgs.vue_vue_type_style_index_0_scoped_0ff04634_lang-12da345f.js";import"./tree-fd3a041e.js";import{__tla as $r}from"./category-ee994b51.js";import{__tla as ra}from"./brand-1eee4d67.js";import{__tla as aa}from"./formRules-839fbb1b.js";import{__tla as ta}from"./style.css_vue_type_style_index_0_src_true_lang-6489f3d1.js";import{__tla as ea}from"./index-555e7ca9.js";import{__tla as la}from"./SkuList.vue_vue_type_script_setup_true_lang-e0ed54c5.js";import{__tla as oa}from"./el-image-6a280602.js";import{__tla as ia}from"./UploadImg-0588e092.js";import{__tla as _a}from"./UploadFile.vue_vue_type_style_index_0_scoped_2570c8e9_lang-653bc615.js";import{__tla as ca}from"./ProductAttributes.vue_vue_type_script_setup_true_lang-ffc13cd9.js";import{__tla as sa}from"./el-text-42605a6c.js";import{__tla as ma}from"./property-2ef26372.js";import{__tla as na}from"./ProductPropertyAddForm.vue_vue_type_script_setup_true_lang-39455eb7.js";import{__tla as ua}from"./Dialog-1f04d1b7.js";import{__tla as pa}from"./index-4345eded.js";import{__tla as da}from"./dict-0fdd6c74.js";import"./constants-a3c69b57.js";import{__tla as fa}from"./index-cd8f4967.js";import{__tla as ya}from"./index.vue_vue_type_script_setup_true_lang-2534a34f.js";import{__tla as ha}from"./index-c1a24aa4.js";import{__tla as va}from"./index-3ebb11c3.js";let O,ka=Promise.all([(()=>{try{return kr}catch{}})(),(()=>{try{return gr}catch{}})(),(()=>{try{return Fr}catch{}})(),(()=>{try{return Ur}catch{}})(),(()=>{try{return Br}catch{}})(),(()=>{try{return Tr}catch{}})(),(()=>{try{return Cr}catch{}})(),(()=>{try{return Rr}catch{}})(),(()=>{try{return Ar}catch{}})(),(()=>{try{return qr}catch{}})(),(()=>{try{return Or}catch{}})(),(()=>{try{return Hr}catch{}})(),(()=>{try{return Kr}catch{}})(),(()=>{try{return Mr}catch{}})(),(()=>{try{return Wr}catch{}})(),(()=>{try{return Zr}catch{}})(),(()=>{try{return Gr}catch{}})(),(()=>{try{return Qr}catch{}})(),(()=>{try{return Xr}catch{}})(),(()=>{try{return Yr}catch{}})(),(()=>{try{return $r}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return va}catch{}})()]).then(async()=>{let B,I,T,V,C,x,R,S,A;B={class:"my-header"},I={class:"my-header-left"},T={class:"my-header-right"},V=["onClick"],C={class:"left"},x={class:"right"},R={key:0},S={key:1},A=(b=>(hr("data-v-9c5728ad"),b=b(),vr(),b))(()=>o("div",{style:{clear:"both"}},null,-1)),O=Nr(lr({name:"ProductSpuForm",__name:"index",emits:["success"],setup(b,{expose:E,emit:Pa}){const{t:H}=mr();Lr(),or(),ir(),Dr();const U=t(!1),_=t("info"),l=t(!1),J=t(),K=t(),L=t(),M=t(),N=t(),c=t({name:"",categoryId:void 0,keyword:"",picUrl:"",producerArea:"",spuType:void 0,sliderPicUrls:[],introduction:"",deliveryTypes:[],deliveryTemplateId:void 0,brandId:void 0,specType:!1,subCommissionType:!1,highPrecision:!1,skus:[{price:0,marketPrice:0,costPrice:0,barCode:"",picUrl:"",stock:0,weight:0,volume:0,promotionFee:0,mark:"",firstBrokeragePrice:0,secondBrokeragePrice:0}],description:"",sort:0,giveIntegral:0,virtualSalesCount:0}),W=t({name:"",categoryId:void 0,keyword:"",picUrl:"",producerArea:"",spuType:void 0,sliderPicUrls:[],introduction:"",deliveryTypes:[],deliveryTemplateId:void 0,brandId:void 0,specType:!1,subCommissionType:!1,skus:[{price:0,marketPrice:0,costPrice:0,barCode:"",picUrl:"",stock:0,weight:0,volume:0,promotionFee:0,mark:"",firstBrokeragePrice:0,secondBrokeragePrice:0}],description:"",sort:0,giveIntegral:0,virtualSalesCount:0}),F=t(!1),D=t(""),Z=t(0),w=t(),G=t(""),Q=t(),j=t(""),X=t(0),v=t(!1);E({open:async(s,i,d,a)=>{Z.value=a,Q.value=i,X.value=d,F.value=!0,w.value=i.id,G.value=i.picUrl,v.value=!1,await $(),_.value="info",j.value=s,D.value=H("action."+s),s=="view"?D.value="\u67E5\u770B":s=="create"&&(c.value=nr(W.value)),j.value=="view"?l.value=!0:l.value=!1}});const Y=()=>{v.value=!v.value},$=async()=>{var i;const s=w.value;if(s){U.value=!0;try{const d=await wr(s);(i=d.skus)==null||i.forEach(a=>{l.value?(a.price=y(a.price),a.highPrecisionPrice=a.highPrecisionPrice/100,a.marketPrice=y(a.marketPrice),a.costPrice=y(a.costPrice),a.promotionFee=y(a.promotionFee),a.firstBrokeragePrice=y(a.firstBrokeragePrice),a.secondBrokeragePrice=y(a.secondBrokeragePrice)):(a.price=h(a.price),a.highPrecisionPrice=a.highPrecisionPrice/100,a.marketPrice=h(a.marketPrice),a.costPrice=h(a.costPrice),a.promotionFee=h(a.promotionFee),a.firstBrokeragePrice=h(a.firstBrokeragePrice),a.secondBrokeragePrice=h(a.secondBrokeragePrice))}),c.value=d}finally{U.value=!1}}};return(s,i)=>{const d=ur,a=br,m=pr,rr=dr,ar=Pr,tr=fr,er=yr;return u(),k(tr,{modelValue:r(F),"onUpdate:modelValue":i[2]||(i[2]=n=>q(F)?F.value=n:null),title:r(D),fullscreen:r(v),"show-close":!1,width:"70%",draggable:"",class:"dialog"},{header:P(({close:n})=>[o("div",B,[o("div",I,_r(r(D)),1),o("div",T,[o("span",{onClick:Y},[e(r(cr),{icon:r(v)?"zmdi:fullscreen-exit":"zmdi:fullscreen"},null,8,["icon"])]),o("span",{onClick:n},[e(d,null,{default:P(()=>[e(r(sr))]),_:1})],8,V)])])]),default:P(()=>[p((u(),k(ar,{style:{"max-height":"560px","min-height":"560px","overflow-y":"auto","border-bottom":"none"}},{default:P(()=>[o("div",C,[e(a,{modelValue:r(c).picUrl,"onUpdate:modelValue":i[0]||(i[0]=n=>r(c).picUrl=n),disabled:r(l)},null,8,["modelValue","disabled"]),e(rr,{modelValue:r(_),"onUpdate:modelValue":i[1]||(i[1]=n=>q(_)?_.value=n:null),"tab-position":"left",class:"child-tabs"},{default:P(()=>[e(m,{label:"\u57FA\u672C\u4FE1\u606F",name:"info"}),e(m,{label:"\u4EF7\u683C/\u89C4\u683C/\u578B\u53F7",name:"sku"}),e(m,{label:"\u8BE6\u60C5",name:"description"}),r(l)?(u(),k(m,{key:0,label:"\u8BC4\u4EF7",name:"comment"})):g("",!0),r(l)?(u(),k(m,{key:1,label:"\u5BA2\u670D",name:"service"})):g("",!0),r(l)?(u(),k(m,{key:2,label:"\u552E\u540E",name:"aftersale"})):g("",!0),e(m,{label:"\u7269\u6D41\u8BBE\u7F6E",name:"delivery"})]),_:1},8,["modelValue"])]),o("div",x,[p(o("div",null,[e(Ir,{ref_key:"infoRef",ref:J,"is-detail":r(l),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[f,r(_)=="info"]]),p(o("div",null,[e(Sr,{ref_key:"skuRef",ref:K,"is-detail":r(l),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[f,r(_)=="sku"]]),p(o("div",null,[e(jr,{ref_key:"deliveryRef",ref:L,"is-detail":r(l),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[f,r(_)=="delivery"]]),p(o("div",null,[e(Vr,{ref_key:"descriptionRef",ref:M,"is-detail":r(l),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[f,r(_)=="description"]]),p(o("div",null,[e(xr,{ref_key:"otherRef",ref:N,"is-detail":r(l),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[f,r(_)=="other"]]),r(_)=="comment"?(u(),z("div",R,[e(Jr,{"is-detail":r(l),propFormData:r(c)},null,8,["is-detail","propFormData"])])):g("",!0),p(o("div",null,[e(zr,{"is-detail":r(l),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[f,r(_)=="service"]]),r(_)=="aftersale"?(u(),z("div",S,[e(Er,{productId:r(w),openSource:"Spu"},null,8,["productId"])])):g("",!0)]),A]),_:1})),[[er,r(U)]])]),_:1},8,["modelValue","title","fullscreen"])}}}),[["__scopeId","data-v-9c5728ad"]])});export{ka as __tla,O as default};