import{d as ke,u as ge,Z as be,r,x as Fe,a3 as we,o as _,C as d,aX as De,a as e,A as m,B as i,k as n,f as t,D as K,E as Ue,_ as Ce,a_ as Ie,a2 as y,a1 as N,v as F,c as B,P as Se,cM as Be,aA as v,aB as P,aF as Ve,a9 as xe,aa as Te,a8 as Re,U as Ae,V as Me,J as ze,aZ as je,Y as Ee,L as Le,M as Ye,__tla as Ze}from"./index-92ee0c67.js";import{_ as Je,__tla as Qe}from"./ContentWrap.vue_vue_type_script_setup_true_lang-8883b5ea.js";import{_ as Xe,__tla as qe}from"./SPuUploadImg-e3c061ff.js";import{u as Ge,__tla as He}from"./tagsView-6825fe59.js";import{g as Ke,a as O,__tla as Ne}from"./spu-b4c28a80.js";import Oe,{__tla as We}from"./InfoForm-7b7412cd.js";import $e,{__tla as ea}from"./DescriptionForm-361830ed.js";import aa,{__tla as ta}from"./OtherForm-9c0fe3e4.js";import ra,{__tla as la}from"./SkuForm-aff4cbaf.js";import oa,{__tla as ia}from"./DeliveryForm-3c4fc1c2.js";import ca,{__tla as sa}from"./Service-62638e7b.js";import{A as _a,__tla as ma}from"./AfterSale-02effed3.js";import na,{__tla as pa}from"./Comment-1ae39421.js";import ua,{__tla as da}from"./Apply-ce1b28ba.js";import{c as ha,__tla as fa}from"./permission-530afd98.js";import{u as ya,__tla as va}from"./useMessage-f82a8260.js";import{_ as Pa}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ka}from"./el-card-82c8630d.js";import{__tla as ga}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-cac58d91.js";import{__tla as ba}from"./index-00287237.js";import{__tla as Fa}from"./el-image-viewer-a14f333a.js";import{__tla as wa}from"./UploadImgs-7fbd21d3.js";import{__tla as Da}from"./UploadImgs.vue_vue_type_style_index_0_scoped_3d27d917_lang-28dd6ae5.js";import"./tree-0af4953a.js";import{__tla as Ua}from"./category-7da3a1d4.js";import{__tla as Ca}from"./brand-b511bdba.js";import{__tla as Ia}from"./formRules-95d6547a.js";import{__tla as Sa}from"./style.css_vue_type_style_index_0_src_true_lang-56f60035.js";import{__tla as Ba}from"./index-47ead28f.js";import{__tla as Va}from"./SkuList.vue_vue_type_script_setup_true_lang-e3146523.js";import{__tla as xa}from"./el-image-c580c30c.js";import{__tla as Ta}from"./UploadImg-9d38bba5.js";import{__tla as Ra}from"./UploadFile.vue_vue_type_style_index_0_scoped_2570c8e9_lang-f458093f.js";import{__tla as Aa}from"./ProductAttributes.vue_vue_type_script_setup_true_lang-88026f8d.js";import{__tla as Ma}from"./el-text-490a5a20.js";import{__tla as za}from"./property-29e27b95.js";import{__tla as ja}from"./ProductPropertyAddForm.vue_vue_type_script_setup_true_lang-a3906edc.js";import{__tla as Ea}from"./Dialog-81b4474b.js";import{__tla as La}from"./index-6bb8fd38.js";import{__tla as Ya}from"./dict-84c3ed73.js";import"./constants-c811e5ff.js";import{__tla as Za}from"./index-e0ae1d8d.js";import{__tla as Ja}from"./index.vue_vue_type_script_setup_true_lang-c008592f.js";import{__tla as Qa}from"./index-85b58c6a.js";import{__tla as Xa}from"./index-987c121f.js";import{__tla as qa}from"./formatTime-a873e830.js";let W,Ga=Promise.all([(()=>{try{return Ze}catch{}})(),(()=>{try{return Qe}catch{}})(),(()=>{try{return qe}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return We}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return qa}catch{}})()]).then(async()=>{let V,x,T,R,A,M,z,j,E,L,Y;V={class:"my-header"},x={class:"my-header-left"},T={class:"my-header-right"},R=["onClick"],A={class:"left"},M={class:"right"},z={key:0},j={key:1},E={key:2},L=(D=>(Le("data-v-501ef3ae"),D=D(),Ye(),D))(()=>i("div",{style:{clear:"both"}},null,-1)),Y={class:"dialog-footer"},W=Pa(ke({name:"ProductSpuForm",__name:"index",emits:["success"],setup(D,{expose:$,emit:ee}){const{t:S}=Se(),U=ya();ge(),be(),Ge();const k=r(!1),c=r("info"),o=r(!1),ae=r(),te=r(),re=r(),le=r(),oe=r(),s=r({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:"",highPrecisionPrice:0,highPrecisionSettlementPrice:0,firstBrokeragePrice:0,secondBrokeragePrice:0}],description:"",sort:0,giveIntegral:0,virtualSalesCount:0}),ie=r({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:"",highPrecisionPrice:0,highPrecisionSettlementPrice:0,firstBrokeragePrice:0,secondBrokeragePrice:0}],description:"",sort:0,giveIntegral:0,virtualSalesCount:0}),g=r(!1),C=r(""),ce=r(0),I=r(),se=r(""),Z=r(),J=r(""),_e=r(0),w=r(!1),p=Fe({id:"",checkComment:"",checkStatus:0,applyMemberUserId:0});$({open:async(h,l,b,a)=>{ce.value=a,Z.value=l,_e.value=b,g.value=!0,I.value=l.id,p.id=l.id,se.value=l.picUrl,w.value=!1,await ne(),p.applyMemberUserId=s.value.applyMemberUserId,c.value="info",J.value=h,C.value=S("action."+h),h=="view"?C.value="\u67E5\u770B":h=="create"&&(s.value=Be(ie.value)),J.value=="view"?o.value=!0:o.value=!1}});const me=()=>{w.value=!w.value},ne=async()=>{var l;const h=I.value;if(h){k.value=!0;try{const b=await Ke(h);(l=b.skus)==null||l.forEach(a=>{o.value?(a.price=v(a.price),a.highPrecisionPrice=a.highPrecisionPrice/100,a.settlementPrice=v(a.settlementPrice),a.highPrecisionSettlementPrice=a.highPrecisionSettlementPrice/100,a.marketPrice=v(a.marketPrice),a.costPrice=v(a.costPrice),a.promotionFee=v(a.promotionFee),a.firstBrokeragePrice=v(a.firstBrokeragePrice),a.secondBrokeragePrice=v(a.secondBrokeragePrice)):(a.price=P(a.price),a.highPrecisionPrice=a.highPrecisionPrice/100,a.settlementPrice=P(a.settlementPrice),a.highPrecisionSettlementPrice=a.highPrecisionSettlementPrice/100,a.marketPrice=P(a.marketPrice),a.costPrice=P(a.costPrice),a.promotionFee=P(a.promotionFee),a.firstBrokeragePrice=P(a.firstBrokeragePrice),a.secondBrokeragePrice=P(a.secondBrokeragePrice))}),s.value=b}finally{k.value=!1}}},Q=ee,pe=async()=>{p.checkStatus=2;try{await U.confirm("\u62D2\u7EDD\u7533\u8BF7?"),await O(p).then(()=>{U.success(S("common.success")),g.value=!1,Q("success")})}catch{}},ue=async()=>{p.checkStatus=1;try{await U.confirm("\u540C\u610F\u7533\u8BF7?"),await O(p).then(()=>{U.success(S("common.success")),g.value=!1,Q("success")})}catch{}};return(h,l)=>{var H;const b=Ve,a=Xe,f=xe,de=Te,he=Je,fe=Re,ye=Ae,ve=Me,X=ze,Pe=je,q=Ee,G=we("hasPermi");return _(),d(Pe,{modelValue:e(g),"onUpdate:modelValue":l[3]||(l[3]=u=>N(g)?g.value=u:null),title:e(C),fullscreen:e(w),"show-close":!1,width:"70%",draggable:"",class:"dialog"},De({header:m(({close:u})=>[i("div",V,[i("div",x,Ue(e(C)),1),i("div",T,[i("span",{onClick:me},[t(e(Ce),{icon:e(w)?"zmdi:fullscreen-exit":"zmdi:fullscreen"},null,8,["icon"])]),i("span",{onClick:u},[t(b,null,{default:m(()=>[t(e(Ie))]),_:1})],8,R)])])]),default:m(()=>[n((_(),d(he,{style:{"max-height":"560px","min-height":"560px","overflow-y":"auto","border-bottom":"none"}},{default:m(()=>[i("div",A,[t(a,{modelValue:e(s).picUrl,"onUpdate:modelValue":l[0]||(l[0]=u=>e(s).picUrl=u),disabled:e(o)},null,8,["modelValue","disabled"]),t(de,{modelValue:e(c),"onUpdate:modelValue":l[1]||(l[1]=u=>N(c)?c.value=u:null),"tab-position":"left",class:"child-tabs"},{default:m(()=>[t(f,{label:"\u57FA\u672C\u4FE1\u606F",name:"info"}),t(f,{label:"\u4EF7\u683C/\u89C4\u683C/\u578B\u53F7",name:"sku"}),t(f,{label:"\u8BE6\u60C5",name:"description"}),e(o)?(_(),d(f,{key:0,label:"\u8BC4\u4EF7",name:"comment"})):y("",!0),e(o)?(_(),d(f,{key:1,label:"\u5BA2\u670D",name:"service"})):y("",!0),e(o)?(_(),d(f,{key:2,label:"\u552E\u540E",name:"aftersale"})):y("",!0),t(f,{label:"\u7269\u6D41\u8BBE\u7F6E",name:"delivery"}),e(o)?(_(),d(f,{key:3,label:"\u7533\u8BF7\u8BB0\u5F55",name:"apply"})):y("",!0)]),_:1},8,["modelValue"])]),i("div",M,[n(i("div",null,[t(Oe,{ref_key:"infoRef",ref:ae,"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])],512),[[F,e(c)=="info"]]),n(i("div",null,[t(ra,{ref_key:"skuRef",ref:te,"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])],512),[[F,e(c)=="sku"]]),n(i("div",null,[t(oa,{ref_key:"deliveryRef",ref:re,"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])],512),[[F,e(c)=="delivery"]]),n(i("div",null,[t($e,{ref_key:"descriptionRef",ref:le,"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])],512),[[F,e(c)=="description"]]),n(i("div",null,[t(aa,{ref_key:"otherRef",ref:oe,"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])],512),[[F,e(c)=="other"]]),e(c)=="comment"?(_(),B("div",z,[t(na,{"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])])):y("",!0),n(i("div",null,[t(ca,{"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])],512),[[F,e(c)=="service"]]),e(c)=="aftersale"?(_(),B("div",j,[t(_a,{productId:e(I),openSource:"Spu"},null,8,["productId"])])):y("",!0),e(c)=="apply"?(_(),B("div",E,[t(ua,{productId:e(I),propFormData:e(s)},null,8,["productId","propFormData"])])):y("",!0)]),L]),_:1})),[[q,e(k)]])]),_:2},[!((H=e(Z))!=null&&H.checkStatus)&&e(ha)(["product:spu-apply:update"])?{name:"footer",fn:m(()=>[i("div",Y,[n((_(),d(ve,{ref:"formRef","label-width":"80px",style:{display:"flex"},model:e(p)},{default:m(()=>[t(ye,{label:"\u5BA1\u6838\u610F\u89C1",prop:"checkComment"},{default:m(()=>[t(fe,{modelValue:e(p).checkComment,"onUpdate:modelValue":l[2]||(l[2]=u=>e(p).checkComment=u),placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u610F\u89C1",style:{width:"300px"}},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[q,e(k)]]),n((_(),d(X,{loading:e(k),type:"danger",onClick:pe},{default:m(()=>[K(" \u62D2\u7EDD ")]),_:1},8,["loading"])),[[G,["product:spu-apply:update"]]]),n((_(),d(X,{loading:e(k),type:"primary",onClick:ue},{default:m(()=>[K(" \u540C\u610F ")]),_:1},8,["loading"])),[[G,["product:spu-apply:update"]]])])]),key:"0"}:void 0]),1032,["modelValue","title","fullscreen"])}}}),[["__scopeId","data-v-501ef3ae"]])});export{Ga as __tla,W as default};