MobileIndex-b4729fc3.js 8.9 KB

1
  1. import{d as V,f as C,as as U,r as i,K as W,m as X,n as G,N as R,y as l,a as r,o as H,x as L,w,h as s,g as a,Q as O,a6 as n,q as Y,i as Z,at as h,au as P,av as $,aw as d,D as tt,J as rt,p as et,l as at,_ as it,__tla as ot}from"./index-a3e63f8a.js";import{_ as ct,__tla as st}from"./ContentWrap-fa5b0c65.js";import{g as lt,c as _t,u as nt,__tla as mt}from"./spu-7893aee2.js";import ut,{__tla as pt}from"./InfoForm-5247c5bf.js";import dt,{__tla as ft}from"./DescriptionForm-ddc80ba8.js";import yt,{__tla as ht}from"./OtherForm-d810fc87.js";import Pt,{__tla as vt}from"./SkuForm-e1e7b78e.js";import gt,{__tla as kt}from"./DeliveryForm-03602b32.js";import Bt,{__tla as wt}from"./Service-7f04546c.js";import{A as Ft,__tla as bt}from"./AfterSale-8b0c6168.js";import Dt,{__tla as xt}from"./Comment-81ac9e3a.js";import{u as St,__tla as Tt}from"./useMessage-0b7e3bd2.js";import{__tla as Et}from"./el-card-421d2134.js";import{__tla as It}from"./UploadImgs-ed89ca8d.js";import{__tla as Nt}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-7e9136c8.js";import{__tla as Ct}from"./el-image-viewer-8e99ee5c.js";import"./tree-0af4953a.js";import{__tla as Ut}from"./category-cb5d2985.js";import{__tla as Rt}from"./brand-c63efc97.js";import{__tla as zt}from"./formRules-8f120b7f.js";import{__tla as qt}from"./Editor-1200c8d0.js";import{__tla as At}from"./index-3a417fd4.js";import{__tla as Mt}from"./SkuList-59715574.js";import{__tla as jt}from"./el-image-cb5a8eb6.js";import{__tla as Jt}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-cd15423c.js";import{__tla as Kt}from"./index-65842182.js";import{__tla as Qt}from"./UploadImg-0ec2f21c.js";import{__tla as Vt}from"./UploadFile.vue_vue_type_style_index_0_scoped_436eca1b_lang-2004b246.js";import{__tla as Wt}from"./PcComponents.css_vue_type_style_index_0_src_00d8480b_scoped_00d8480b_lang-ff2c3759.js";import{__tla as Xt}from"./ProductAttributes-6dcc2460.js";import{__tla as Gt}from"./el-text-21d8bfd7.js";import{__tla as Ht}from"./property-701e6e5b.js";import{__tla as Lt}from"./ProductPropertyAddForm-3a3b54b3.js";import{__tla as Ot}from"./Dialog-5c73632b.js";import{__tla as Yt}from"./MobileSkuList-cc6029f6.js";import{__tla as Zt}from"./index-cdfcfa28.js";import{__tla as $t}from"./dict-7fd465d6.js";import"./constants-d55a3460.js";import{__tla as tr}from"./index-d2be9703.js";import{__tla as rr}from"./index-118b42b9.js";import{__tla as er}from"./index-a0a55edd.js";import{__tla as ar}from"./index-3010a538.js";let z,ir=Promise.all([(()=>{try{return ot}catch{}})(),(()=>{try{return st}catch{}})(),(()=>{try{return mt}catch{}})(),(()=>{try{return pt}catch{}})(),(()=>{try{return ft}catch{}})(),(()=>{try{return ht}catch{}})(),(()=>{try{return vt}catch{}})(),(()=>{try{return kt}catch{}})(),(()=>{try{return wt}catch{}})(),(()=>{try{return bt}catch{}})(),(()=>{try{return xt}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Nt}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return Ut}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return Jt}catch{}})(),(()=>{try{return Kt}catch{}})(),(()=>{try{return Qt}catch{}})(),(()=>{try{return Vt}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 Yt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return tr}catch{}})(),(()=>{try{return rr}catch{}})(),(()=>{try{return er}catch{}})(),(()=>{try{return ar}catch{}})()]).then(async()=>{let F,b,D;F={class:"top",style:{position:"relative",overflow:"hidden"}},b={class:"bottom"},D=(g=>(et("data-v-d9db1195"),g=g(),at(),g))(()=>s("div",{style:{clear:"both"}},null,-1)),z=it(V({name:"ProductSpuForm",__name:"MobileIndex",emits:["success"],setup(g,{emit:q}){const x=St(),A=C({value:0}),M=C({value:!1});U("highPrecisionChange",M);const j=q;U("spuTypeChange",A);const{t:S}=Z(),f=i(!1),c=i("info"),u=i(!0),T=i(),E=i(),I=i(),N=i(),J=i(),_=i({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});i(0),i(""),i(),i(0);const K=W(),B=i(Number(K.params.id)),Q=async()=>{var y,m,o,t;f.value=!0;try{await((y=r(T))==null?void 0:y.validate()),await((m=r(E))==null?void 0:m.validate()),await((o=r(I))==null?void 0:o.validate()),await((t=r(N))==null?void 0:t.validate());const p=$(r(_.value));p.skus.forEach(e=>{e.name=p.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=[];p.sliderPicUrls.forEach(e=>{typeof e=="object"?v.push(e.url):v.push(e)}),p.sliderPicUrls=v;const k=p;B.value?(await nt(k),x.success(S("common.updateSuccess"))):(await _t(k),x.success(S("common.createSuccess"))),close(),j("success")}finally{f.value=!1}};return X(()=>{(async()=>{var m;const y=B.value;if(y){f.value=!0;try{const o=await lt(y);(m=o.skus)==null||m.forEach(t=>{u.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))}),_.value=o}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"}),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)"}),(y,m)=>{const o=R("van-tab"),t=R("van-tabs"),p=tt,v=ct,k=rt;return l((H(),L(v,{style:{"overflow-y":"auto"},class:"ContentWrap"},{default:w(()=>[s("div",F,[a(t,{active:r(c),"onUpdate:active":m[0]||(m[0]=e=>O(c)?c.value=e:null)},{default:w(()=>[a(o,{title:"\u57FA\u672C\u4FE1\u606F",name:"info"}),a(o,{title:"\u4EF7\u683C/\u89C4\u683C/\u578B\u53F7",name:"sku"}),a(o,{title:"\u8BE6\u60C5",name:"description"}),a(o,{title:"\u8BC4\u4EF7",name:"comment"}),a(o,{title:"\u5BA2\u670D",name:"service"}),a(o,{title:"\u552E\u540E",name:"aftersale"}),a(o,{title:"\u7269\u6D41\u8BBE\u7F6E",name:"delivery"})]),_:1},8,["active"])]),s("div",b,[l(s("div",null,[a(ut,{ref_key:"infoRef",ref:T,"is-detail":r(u),propFormData:r(_)},null,8,["is-detail","propFormData"])],512),[[n,r(c)=="info"]]),l(s("div",null,[a(Pt,{ref_key:"skuRef",ref:E,"is-detail":!1,propFormData:r(_)},null,8,["propFormData"])],512),[[n,r(c)=="sku"]]),l(s("div",null,[a(gt,{ref_key:"deliveryRef",ref:I,"is-detail":r(u),propFormData:r(_)},null,8,["is-detail","propFormData"])],512),[[n,r(c)=="delivery"]]),l(s("div",null,[a(dt,{ref_key:"descriptionRef",ref:N,"is-detail":r(u),propFormData:r(_)},null,8,["is-detail","propFormData"])],512),[[n,r(c)=="description"]]),l(s("div",null,[a(yt,{ref_key:"otherRef",ref:J,"is-detail":r(u),propFormData:r(_)},null,8,["is-detail","propFormData"])],512),[[n,r(c)=="other"]]),l(s("div",null,[a(Dt,{"is-detail":r(u),propFormData:r(_)},null,8,["is-detail","propFormData"])],512),[[n,r(c)=="comment"]]),l(s("div",null,[a(Bt,{"is-detail":r(u),propFormData:r(_)},null,8,["is-detail","propFormData"])],512),[[n,r(c)=="service"]]),l(s("div",null,[a(Ft,{productId:r(B),openSource:"Spu"},null,8,["productId"])],512),[[n,r(c)=="aftersale"]])]),D,l(a(p,{loading:r(f),type:"primary",onClick:Q,style:{position:"fixed",width:"90%",bottom:"0px",left:"50%",transform:"translateX(-50%)","z-index":"111111"}},{default:w(()=>[Y(" \u4FDD\u5B58 ")]),_:1},8,["loading"]),[[n,r(c)=="sku"]])]),_:1})),[[k,r(f)]])}}}),[["__scopeId","data-v-d9db1195"],["__file","D:/zx/mall-newfeifan-zx-business/src/views/mall/product/spu/form/MobileIndex.vue"]])});export{ir as __tla,z as default};