MobileIndex-f6bf938c.js 8.3 KB

1
  1. import{d as j,f as J,as as K,r as o,K as W,m as X,n as G,N as C,y as _,a as t,o as H,x as L,w,h as s,g as e,Q as O,a6 as m,q as V,i as Y,at as v,au as g,av as Z,aw as y,D as $,J as tt,p as at,l as rt,_ as et,__tla as ot}from"./index-0e5354ef.js";import{_ as lt,__tla as it}from"./ContentWrap-7a001911.js";import{g as st,c as _t,u as ct,__tla as mt}from"./spu-a9baa14d.js";import nt,{__tla as ut}from"./InfoForm-d939e63c.js";import pt,{__tla as dt}from"./DescriptionForm-c29b692f.js";import ft,{__tla as yt}from"./OtherForm-0eb5b3e5.js";import ht,{__tla as vt}from"./SkuForm-0924af69.js";import gt,{__tla as kt}from"./DeliveryForm-afc2499f.js";import Pt,{__tla as Bt}from"./Service-783fe7e6.js";import{A as wt,__tla as bt}from"./AfterSale-28ecafc9.js";import Ft,{__tla as Dt}from"./Comment-3f040cf1.js";import{u as Tt,__tla as xt}from"./useMessage-a8a21011.js";import{__tla as Et}from"./ContentWrap.vue_vue_type_script_setup_true_lang-d3a04f57.js";import{__tla as It}from"./el-card-276e7da1.js";import{__tla as Nt}from"./UploadImgs-9a3530d1.js";import{__tla as St}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-1473b94a.js";import{__tla as Ct}from"./el-image-viewer-6afc7563.js";import"./tree-0af4953a.js";import{__tla as Ut}from"./category-a6e14d93.js";import{__tla as Rt}from"./brand-1d8bc19c.js";import{__tla as qt}from"./formRules-8e560e86.js";import{__tla as zt}from"./Editor-5d82d217.js";import{__tla as At}from"./index-5109b39c.js";import{__tla as Mt}from"./SkuList-a646d3af.js";import{__tla as Qt}from"./el-image-eaccad14.js";import{__tla as jt}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-5f3d1505.js";import{__tla as Jt}from"./index-bb5a418c.js";import{__tla as Kt}from"./UploadImg-aad8f331.js";import{__tla as Wt}from"./UploadFile.vue_vue_type_style_index_0_scoped_436eca1b_lang-da588529.js";import{__tla as Xt}from"./ProductAttributes-9433015e.js";import{__tla as Gt}from"./el-text-a66fd71b.js";import{__tla as Ht}from"./property-d46cd1be.js";import{__tla as Lt}from"./ProductPropertyAddForm-84d1ebfe.js";import{__tla as Ot}from"./Dialog-88268667.js";import{__tla as Vt}from"./index-7d4bd714.js";import{__tla as Yt}from"./dict-7eb51c33.js";import"./constants-d55a3460.js";import{__tla as Zt}from"./index-c0eeeb38.js";import{__tla as $t}from"./index-52c03da0.js";import{__tla as ta}from"./index-a3b00597.js";import{__tla as aa}from"./index-b401be93.js";let U,ra=Promise.all([(()=>{try{return ot}catch{}})(),(()=>{try{return it}catch{}})(),(()=>{try{return mt}catch{}})(),(()=>{try{return ut}catch{}})(),(()=>{try{return dt}catch{}})(),(()=>{try{return yt}catch{}})(),(()=>{try{return vt}catch{}})(),(()=>{try{return kt}catch{}})(),(()=>{try{return Bt}catch{}})(),(()=>{try{return bt}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return xt}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Nt}catch{}})(),(()=>{try{return St}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return Ut}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return Qt}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return Jt}catch{}})(),(()=>{try{return Kt}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return Xt}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return Ht}catch{}})(),(()=>{try{return Lt}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return Vt}catch{}})(),(()=>{try{return Yt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return aa}catch{}})()]).then(async()=>{let b,F,D;b={class:"top",style:{position:"relative",overflow:"hidden"}},F={class:"bottom"},D=(k=>(at("data-v-d9db1195"),k=k(),rt(),k))(()=>s("div",{style:{clear:"both"}},null,-1)),U=et(j({name:"ProductSpuForm",__name:"MobileIndex",emits:["success"],setup(k,{emit:R}){const T=Tt(),q=J({value:0}),z=R;K("spuTypeChange",q);const{t:x}=Y(),d=o(!1),i=o("info"),u=o(!0),E=o(),I=o(),N=o(),S=o(),A=o(),c=o({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});o(0),o(""),o(),o(0);const M=W(),B=o(Number(M.params.id)),Q=async()=>{var f,n,l,a;d.value=!0;try{await((f=t(E))==null?void 0:f.validate()),await((n=t(I))==null?void 0:n.validate()),await((l=t(N))==null?void 0:l.validate()),await((a=t(S))==null?void 0:a.validate());const p=Z(t(c.value));p.skus.forEach(r=>{r.name=p.name,r.price=y(r.price),r.marketPrice=y(r.marketPrice),r.promotionFee=y(r.promotionFee),r.costPrice=y(r.costPrice),r.firstBrokeragePrice=y(r.firstBrokeragePrice),r.secondBrokeragePrice=y(r.secondBrokeragePrice)});const h=[];p.sliderPicUrls.forEach(r=>{typeof r=="object"?h.push(r.url):h.push(r)}),p.sliderPicUrls=h;const P=p;B.value?(await ct(P),T.success(x("common.updateSuccess"))):(await _t(P),T.success(x("common.createSuccess"))),close(),z("success")}finally{d.value=!1}};return X(()=>{(async()=>{var n;const f=B.value;if(f){d.value=!0;try{const l=await st(f);(n=l.skus)==null||n.forEach(a=>{u.value?(a.price=v(a.price),a.marketPrice=v(a.marketPrice),a.costPrice=v(a.costPrice),a.firstBrokeragePrice=v(a.firstBrokeragePrice),a.secondBrokeragePrice=v(a.secondBrokeragePrice)):(a.price=g(a.price),a.marketPrice=g(a.marketPrice),a.costPrice=g(a.costPrice),a.firstBrokeragePrice=g(a.firstBrokeragePrice),a.secondBrokeragePrice=g(a.secondBrokeragePrice))}),c.value=l}finally{d.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"}),G(()=>{document.getElementsByTagName("section")[1].style.width="auto",document.getElementsByTagName("section")[1].style.padding="20px",document.getElementsByTagName("section")[1].style.background="var(--el-color-white)"}),(f,n)=>{const l=C("van-tab"),a=C("van-tabs"),p=$,h=lt,P=tt;return _((H(),L(h,{style:{"overflow-y":"auto"},class:"ContentWrap"},{default:w(()=>[s("div",b,[e(a,{active:t(i),"onUpdate:active":n[0]||(n[0]=r=>O(i)?i.value=r:null)},{default:w(()=>[e(l,{title:"\u57FA\u672C\u4FE1\u606F",name:"info"}),e(l,{title:"\u4EF7\u683C/\u89C4\u683C/\u578B\u53F7",name:"sku"}),e(l,{title:"\u8BE6\u60C5",name:"description"}),e(l,{title:"\u8BC4\u4EF7",name:"comment"}),e(l,{title:"\u5BA2\u670D",name:"service"}),e(l,{title:"\u552E\u540E",name:"aftersale"}),e(l,{title:"\u7269\u6D41\u8BBE\u7F6E",name:"delivery"})]),_:1},8,["active"])]),s("div",F,[_(s("div",null,[e(nt,{ref_key:"infoRef",ref:E,"is-detail":t(u),propFormData:t(c)},null,8,["is-detail","propFormData"])],512),[[m,t(i)=="info"]]),_(s("div",null,[e(ht,{ref_key:"skuRef",ref:I,"is-detail":!1,propFormData:t(c)},null,8,["propFormData"])],512),[[m,t(i)=="sku"]]),_(s("div",null,[e(gt,{ref_key:"deliveryRef",ref:N,"is-detail":t(u),propFormData:t(c)},null,8,["is-detail","propFormData"])],512),[[m,t(i)=="delivery"]]),_(s("div",null,[e(pt,{ref_key:"descriptionRef",ref:S,"is-detail":t(u),propFormData:t(c)},null,8,["is-detail","propFormData"])],512),[[m,t(i)=="description"]]),_(s("div",null,[e(ft,{ref_key:"otherRef",ref:A,"is-detail":t(u),propFormData:t(c)},null,8,["is-detail","propFormData"])],512),[[m,t(i)=="other"]]),_(s("div",null,[e(Ft,{"is-detail":t(u),propFormData:t(c)},null,8,["is-detail","propFormData"])],512),[[m,t(i)=="comment"]]),_(s("div",null,[e(Pt,{"is-detail":t(u),propFormData:t(c)},null,8,["is-detail","propFormData"])],512),[[m,t(i)=="service"]]),_(s("div",null,[e(wt,{productId:t(B),openSource:"Spu"},null,8,["productId"])],512),[[m,t(i)=="aftersale"]])]),D,_(e(p,{loading:t(d),type:"primary",onClick:Q,style:{position:"fixed",width:"90%",bottom:"0px",left:"50%",transform:"translateX(-50%)"}},{default:w(()=>[V(" \u4FDD\u5B58 ")]),_:1},8,["loading"]),[[m,t(i)=="sku"]])]),_:1})),[[P,t(d)]])}}}),[["__scopeId","data-v-d9db1195"],["__file","D:/zhongxing/mall-newfeifan-zx-business/src/views/mall/product/spu/form/MobileIndex.vue"]])});export{ra as __tla,U as default};