1 |
- import{d as K,g as R,at as U,r as s,N as L,z as O,A as Q,h as z,D as _,a as r,o as A,k as V,w as F,j as l,i as a,R as Y,a7 as n,c as $,S as tt,l as rt,B as et,au as h,av as P,aw as at,ax as d,s as it,M as ot,v as ct,x as lt,_ as st,__tla as _t}from"./index-2f799233.js";import{_ as nt,__tla as mt}from"./ContentWrap-9da801df.js";import{g as pt,c as ut,u as dt,__tla as ft}from"./spu-980b34a1.js";import yt,{__tla as ht}from"./InfoForm-2a08666c.js";import Pt,{__tla as vt}from"./DescriptionForm-aa3c5dea.js";import gt,{__tla as kt}from"./OtherForm-7be1840a.js";import Bt,{__tla as Ft}from"./SkuForm-5e8f39e5.js";import wt,{__tla as Dt}from"./DeliveryForm-068fb530.js";import bt,{__tla as St}from"./Service-c0bda3f4.js";import{A as xt,__tla as Tt}from"./AfterSale-babc95d3.js";import It,{__tla as Et}from"./Apply-0bed427f.js";import Nt,{__tla as Ct}from"./Comment-dabeb569.js";import{u as Rt,__tla as Ut}from"./useMessage-e567ad40.js";import{__tla as zt}from"./el-card-c64c83d1.js";import{__tla as At}from"./UploadImgs-0a2b8085.js";import{__tla as Mt}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-872107b3.js";import{__tla as jt}from"./el-image-viewer-8e9e3571.js";import"./tree-0af4953a.js";import{__tla as qt}from"./category-6df467a3.js";import{__tla as Wt}from"./brand-51caed7c.js";import{__tla as Xt}from"./formRules-8aa12f76.js";import{__tla as Zt}from"./Editor-3a97a075.js";import{__tla as Gt}from"./index-7549c07e.js";import{__tla as Ht}from"./SkuList-c1eb35ef.js";import{__tla as Jt}from"./el-image-4d26fa76.js";import{__tla as Kt}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-ac19fa49.js";import{__tla as Lt}from"./index-5f6db4a5.js";import{__tla as Ot}from"./UploadImg-d46c0539.js";import{__tla as Qt}from"./UploadFile.vue_vue_type_style_index_0_scoped_436eca1b_lang-bc6f7cfd.js";import{__tla as Vt}from"./PcComponents.css_vue_type_style_index_0_src_00d8480b_scoped_00d8480b_lang-80062d91.js";import{__tla as Yt}from"./ProductAttributes-a03a7812.js";import{__tla as $t}from"./el-text-58158748.js";import{__tla as tr}from"./property-9f44e48e.js";import{__tla as rr}from"./ProductPropertyAddForm-ac5c62a7.js";import{__tla as er}from"./Dialog-6fd39e06.js";import{__tla as ar}from"./MobileSkuList-c5d6aa78.js";import{__tla as ir}from"./index-6810ba49.js";import{__tla as or}from"./dict-20c916e2.js";import"./constants-d55a3460.js";import{__tla as cr}from"./index-36dfbc52.js";import{__tla as lr}from"./index-e6cd813f.js";import{__tla as sr}from"./index-1c180a16.js";import{__tla as _r}from"./index-8cb2149a.js";import{__tla as nr}from"./formatTime-2157894c.js";let M,mr=Promise.all([(()=>{try{return _t}catch{}})(),(()=>{try{return mt}catch{}})(),(()=>{try{return ft}catch{}})(),(()=>{try{return ht}catch{}})(),(()=>{try{return vt}catch{}})(),(()=>{try{return kt}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return St}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return Ut}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return Xt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return Ht}catch{}})(),(()=>{try{return Jt}catch{}})(),(()=>{try{return Kt}catch{}})(),(()=>{try{return Lt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return Qt}catch{}})(),(()=>{try{return Vt}catch{}})(),(()=>{try{return Yt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return tr}catch{}})(),(()=>{try{return rr}catch{}})(),(()=>{try{return er}catch{}})(),(()=>{try{return ar}catch{}})(),(()=>{try{return ir}catch{}})(),(()=>{try{return or}catch{}})(),(()=>{try{return cr}catch{}})(),(()=>{try{return lr}catch{}})(),(()=>{try{return sr}catch{}})(),(()=>{try{return _r}catch{}})(),(()=>{try{return nr}catch{}})()]).then(async()=>{let w,D,b,S;w={class:"top",style:{position:"relative",overflow:"hidden"}},D={class:"bottom"},b={key:0},S=(g=>(ct("data-v-d9db1195"),g=g(),lt(),g))(()=>l("div",{style:{clear:"both"}},null,-1)),M=st(K({name:"ProductSpuForm",__name:"MobileIndex",emits:["success"],setup(g,{emit:j}){const x=Rt(),q=R({value:0}),W=R({value:!1});U("highPrecisionChange",W);const X=j;U("spuTypeChange",q);const{t:T}=et(),f=s(!1),o=s("info"),p=s(!0),I=s(),E=s(),N=s(),C=s(),Z=s(),c=s({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,firstBrokeragePrice:0,secondBrokeragePrice:0}],description:"",sort:0,giveIntegral:0,virtualSalesCount:0}),G=L(),k=s(Number(G.params.id)),H=async()=>{var y,m,i,t;f.value=!0;try{await((y=r(I))==null?void 0:y.validate()),await((m=r(E))==null?void 0:m.validate()),await((i=r(N))==null?void 0:i.validate()),await((t=r(C))==null?void 0:t.validate());const u=at(r(c.value));u.skus.forEach(e=>{e.name=u.name,e.price=d(e.price),e.highPrecisionPrice=(100*e.highPrecisionPrice).toFixed(6),e.marketPrice=d(e.marketPrice),e.promotionFee=d(e.promotionFee),e.costPrice=d(e.costPrice),e.settlementPrice=d(e.settlementPrice),e.highPrecisionSettlementPrice=(100*e.highPrecisionSettlementPrice).toFixed(6),e.firstBrokeragePrice=d(e.firstBrokeragePrice),e.secondBrokeragePrice=d(e.secondBrokeragePrice)});const v=[];u.sliderPicUrls.forEach(e=>{typeof e=="object"?v.push(e.url):v.push(e)}),u.sliderPicUrls=v;const B=u;k.value?(await dt(B),x.success(T("common.updateSuccess"))):(await ut(B),x.success(T("common.createSuccess"))),close(),X("success")}finally{f.value=!1}};return O(()=>{(async()=>{var m;const y=k.value;if(y){f.value=!0;try{const i=await pt(y);(m=i.skus)==null||m.forEach(t=>{p.value?(t.price=h(t.price),t.marketPrice=h(t.marketPrice),t.highPrecisionPrice=t.highPrecisionPrice/100,t.settlementPrice=h(t.settlementPrice),t.highPrecisionSettlementPrice=t.highPrecisionSettlementPrice/100,t.costPrice=h(t.costPrice),t.firstBrokeragePrice=h(t.firstBrokeragePrice),t.secondBrokeragePrice=h(t.secondBrokeragePrice)):(t.price=P(t.price),t.marketPrice=P(t.marketPrice),t.settlementPrice=P(t.settlementPrice),t.highPrecisionSettlementPrice=t.highPrecisionSettlementPrice/100,t.highPrecisionPrice=t.highPrecisionPrice/100,t.costPrice=P(t.costPrice),t.firstBrokeragePrice=P(t.firstBrokeragePrice),t.secondBrokeragePrice=P(t.secondBrokeragePrice))}),c.value=i}finally{f.value=!1}}})(),document.getElementsByTagName("section")[1].style.padding="0px",document.getElementsByTagName("section")[1].style.width="100%",document.getElementsByTagName("section")[1].querySelector("div").style.border="none",document.getElementsByTagName("section")[1].style.background="#f5f7f9"}),Q(()=>{document.getElementsByTagName("section")[1].style.width="auto",document.getElementsByTagName("section")[1].style.padding="20px",document.getElementsByTagName("section")[1].style.background="var(--el-color-white)"}),(y,m)=>{const i=z("van-tab"),t=z("van-tabs"),u=it,v=nt,B=ot;return _((A(),V(v,{style:{"overflow-y":"auto"},class:"ContentWrap"},{default:F(()=>{var e;return[l("div",w,[a(t,{active:r(o),"onUpdate:active":m[0]||(m[0]=J=>Y(o)?o.value=J:null)},{default:F(()=>[a(i,{title:"\u57FA\u672C\u4FE1\u606F",name:"info"}),a(i,{title:"\u4EF7\u683C/\u89C4\u683C/\u578B\u53F7",name:"sku"}),a(i,{title:"\u8BE6\u60C5",name:"description"}),a(i,{title:"\u8BC4\u4EF7",name:"comment"}),a(i,{title:"\u5BA2\u670D",name:"service"}),a(i,{title:"\u552E\u540E",name:"aftersale"}),a(i,{title:"\u7269\u6D41\u8BBE\u7F6E",name:"delivery"}),a(i,{title:"\u7533\u8BF7\u8BB0\u5F55",name:"apply"})]),_:1},8,["active"])]),l("div",D,[_(l("div",null,[a(yt,{ref_key:"infoRef",ref:I,"is-detail":r(p),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[n,r(o)=="info"]]),_(l("div",null,[a(Bt,{ref_key:"skuRef",ref:E,isDetail:!1,propFormData:r(c)},null,8,["propFormData"])],512),[[n,r(o)=="sku"]]),_(l("div",null,[a(wt,{ref_key:"deliveryRef",ref:N,"is-detail":r(p),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[n,r(o)=="delivery"]]),_(l("div",null,[a(Pt,{ref_key:"descriptionRef",ref:C,"is-detail":r(p),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[n,r(o)=="description"]]),_(l("div",null,[a(gt,{ref_key:"otherRef",ref:Z,"is-detail":r(p),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[n,r(o)=="other"]]),_(l("div",null,[a(Nt,{"is-detail":r(p),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[n,r(o)=="comment"]]),_(l("div",null,[a(bt,{"is-detail":r(p),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[n,r(o)=="service"]]),_(l("div",null,[a(xt,{productId:r(k),openSource:"Spu"},null,8,["productId"])],512),[[n,r(o)=="aftersale"]]),r(o)=="apply"?(A(),$("div",b,[a(It,{productId:r(k),propFormData:r(c)},null,8,["productId","propFormData"])])):tt("",!0)]),S,_(a(u,{loading:r(f),type:"primary",onClick:H,style:{position:"fixed",width:"90%",bottom:"0px",left:"50%",transform:"translateX(-50%)","z-index":"111111"}},{default:F(()=>[rt(" \u4FDD\u5B58 ")]),_:1},8,["loading"]),[[n,r(o)=="sku"&&((e=r(c))==null?void 0:e.checkStatus)]])]}),_:1})),[[B,r(f)]])}}}),[["__scopeId","data-v-d9db1195"],["__file","D:/zx/mall-newfeifan-zx-business/src/views/mall/product/spu/form/MobileIndex.vue"]])});export{mr as __tla,M as default};
|