1 |
- import{d as H,g as C,at as R,r as i,N as J,z as K,A as L,h as U,D as l,a as r,o as O,k as Q,w,j as s,i as a,R as V,a7 as n,l as Y,B as Z,au as h,av as P,aw as $,ax as d,s as tt,M as rt,v as et,x as at,_ as it,__tla as ot}from"./index-e8ea4cae.js";import{_ as ct,__tla as st}from"./ContentWrap-0d9d7511.js";import{g as lt,c as _t,u as nt,__tla as mt}from"./spu-56b7ae22.js";import ut,{__tla as pt}from"./InfoForm-e85be5e5.js";import dt,{__tla as ft}from"./DescriptionForm-f571c5f0.js";import yt,{__tla as ht}from"./OtherForm-0073d214.js";import Pt,{__tla as vt}from"./SkuForm-83b0b814.js";import gt,{__tla as kt}from"./DeliveryForm-b0d60b9c.js";import Bt,{__tla as wt}from"./Service-0d3978be.js";import{A as Ft,__tla as bt}from"./AfterSale-32b89dbf.js";import Dt,{__tla as xt}from"./Comment-fc069182.js";import{u as St,__tla as Tt}from"./useMessage-143d3b02.js";import{__tla as Et}from"./el-card-83e21124.js";import{__tla as It}from"./UploadImgs-3ec26fd2.js";import{__tla as Nt}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-18636e29.js";import{__tla as Ct}from"./el-image-viewer-6c841f69.js";import"./tree-0af4953a.js";import{__tla as Rt}from"./category-05c56f39.js";import{__tla as Ut}from"./brand-b38c600b.js";import{__tla as zt}from"./formRules-b97ac4dc.js";import{__tla as At}from"./Editor-020f16c3.js";import{__tla as Mt}from"./index-80abba23.js";import{__tla as jt}from"./SkuList-319b90de.js";import{__tla as qt}from"./el-image-8bb2a593.js";import{__tla as Wt}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-2f8cb05d.js";import{__tla as Xt}from"./index-d6db4cdd.js";import{__tla as Gt}from"./UploadImg-14413218.js";import{__tla as Ht}from"./UploadFile.vue_vue_type_style_index_0_scoped_436eca1b_lang-0ed86ae3.js";import{__tla as Jt}from"./PcComponents.css_vue_type_style_index_0_src_00d8480b_scoped_00d8480b_lang-4bcf1476.js";import{__tla as Kt}from"./ProductAttributes-8466a0cc.js";import{__tla as Lt}from"./el-text-262100c4.js";import{__tla as Ot}from"./property-9709b06e.js";import{__tla as Qt}from"./ProductPropertyAddForm-3491dc38.js";import{__tla as Vt}from"./Dialog-15b172e9.js";import{__tla as Yt}from"./MobileSkuList-aba5ada0.js";import{__tla as Zt}from"./index-c19c5c51.js";import{__tla as $t}from"./dict-0479e5a1.js";import"./constants-d55a3460.js";import{__tla as tr}from"./index-fa178a1a.js";import{__tla as rr}from"./index-c5742b71.js";import{__tla as er}from"./index-a3a42fcc.js";import{__tla as ar}from"./index-6ef22144.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 Rt}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 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 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(H({name:"ProductSpuForm",__name:"MobileIndex",emits:["success"],setup(g,{emit:A}){const x=St(),M=C({value:0}),j=C({value:!1});R("highPrecisionChange",j);const q=A;R("spuTypeChange",M);const{t:S}=Z(),f=i(!1),c=i("info"),u=i(!0),T=i(),E=i(),I=i(),N=i(),W=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 X=J(),B=i(Number(X.params.id)),G=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(),q("success")}finally{f.value=!1}};return K(()=>{(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"}),L(()=>{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=U("van-tab"),t=U("van-tabs"),p=tt,v=ct,k=rt;return l((O(),Q(v,{style:{"overflow-y":"auto"},class:"ContentWrap"},{default:w(()=>[s("div",F,[a(t,{active:r(c),"onUpdate:active":m[0]||(m[0]=e=>V(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:W,"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:G,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};
|