1 |
- import{d as K,f as R,as as U,r as s,N as L,z as O,A as Q,h as A,D as _,a as r,o as j,j as Y,w as F,k as l,i as e,R as Z,a6 as n,c as $,l as tt,m as rt,B as at,at as h,au as P,av as et,aw as d,q as it,M as ot,v as ct,x as lt,__tla as st}from"./index-1e808f2e.js";import{_ as _t,__tla as nt}from"./ContentWrap.vue_vue_type_script_setup_true_lang-cc335a20.js";import{g as mt,c as pt,u as ut,__tla as dt}from"./spu-d8bf9472.js";import yt,{__tla as ft}from"./InfoForm-4ce6fd21.js";import ht,{__tla as Pt}from"./DescriptionForm-d37cca4e.js";import vt,{__tla as gt}from"./OtherForm-2c13f480.js";import kt,{__tla as Bt}from"./SkuForm-a3b8855a.js";import Ft,{__tla as Dt}from"./DeliveryForm-bc19a93e.js";import wt,{__tla as St}from"./Service-7cbd04db.js";import{A as bt,__tla as Tt}from"./AfterSale-023b5def.js";import xt,{__tla as Et}from"./Apply-58b27b67.js";import It,{__tla as Nt}from"./Comment-e702aea4.js";import{u as Ct,__tla as Rt}from"./useMessage-5f9e8917.js";import{_ as Ut}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as At}from"./el-card-03b3588b.js";import{__tla as jt}from"./UploadImgs-d9af51cb.js";import{__tla as qt}from"./UploadImgs.vue_vue_type_style_index_0_scoped_3d27d917_lang-531188a2.js";import{__tla as zt}from"./el-image-viewer-dddb6285.js";import"./tree-fd3a041e.js";import{__tla as Mt}from"./category-9d0fc28e.js";import{__tla as Gt}from"./brand-b7ab0146.js";import{__tla as Vt}from"./formRules-83fad61e.js";import{__tla as Wt}from"./style.css_vue_type_style_index_0_src_true_lang-507ff6a6.js";import{__tla as Xt}from"./index-89aca07e.js";import{__tla as Ht}from"./SkuList.vue_vue_type_script_setup_true_lang-7b9b16cc.js";import{__tla as Jt}from"./el-image-263fb014.js";import{__tla as Kt}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-b3df4382.js";import{__tla as Lt}from"./index-b59955b6.js";import{__tla as Ot}from"./UploadImg-3538b5a5.js";import{__tla as Qt}from"./UploadFile.vue_vue_type_style_index_0_scoped_2570c8e9_lang-d79157f5.js";import{__tla as Yt}from"./PcComponents.css_vue_type_style_index_0_src_bf8feb19_scoped_bf8feb19_lang-e58f9938.js";import{__tla as Zt}from"./ProductAttributes.vue_vue_type_script_setup_true_lang-ecf39234.js";import{__tla as $t}from"./el-text-3aab5b45.js";import{__tla as tr}from"./property-35f111c0.js";import{__tla as rr}from"./ProductPropertyAddForm.vue_vue_type_script_setup_true_lang-f25e6775.js";import{__tla as ar}from"./Dialog-f44f9d78.js";import{__tla as er}from"./MobileSkuList-eb90d753.js";import{__tla as ir}from"./index-ac5bda51.js";import{__tla as or}from"./dict-a31cb4ba.js";import"./constants-e43f22dd.js";import{__tla as cr}from"./index-b776b94b.js";import{__tla as lr}from"./index.vue_vue_type_script_setup_true_lang-571824c6.js";import{__tla as sr}from"./index-73afebcf.js";import{__tla as _r}from"./index-732888d2.js";import{__tla as nr}from"./formatTime-a348c3be.js";let q,mr=Promise.all([(()=>{try{return st}catch{}})(),(()=>{try{return nt}catch{}})(),(()=>{try{return dt}catch{}})(),(()=>{try{return ft}catch{}})(),(()=>{try{return Pt}catch{}})(),(()=>{try{return gt}catch{}})(),(()=>{try{return Bt}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return St}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return Nt}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return Vt}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return Xt}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 Yt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return tr}catch{}})(),(()=>{try{return rr}catch{}})(),(()=>{try{return ar}catch{}})(),(()=>{try{return er}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 D,w,S,b;D={class:"top",style:{position:"relative",overflow:"hidden"}},w={class:"bottom"},S={key:0},b=(g=>(ct("data-v-0a3a51d4"),g=g(),lt(),g))(()=>l("div",{style:{clear:"both"}},null,-1)),q=Ut(K({name:"ProductSpuForm",__name:"MobileIndex",emits:["success"],setup(g,{emit:z}){const T=Ct(),M=R({value:0}),G=R({value:!1});U("highPrecisionChange",G);const V=z;U("spuTypeChange",M);const{t:x}=at(),y=s(!1),o=s("info"),p=s(!0),E=s(),I=s(),N=s(),C=s(),W=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}),X=L(),k=s(Number(X.params.id)),H=async()=>{var f,m,i,t;y.value=!0;try{await((f=r(E))==null?void 0:f.validate()),await((m=r(I))==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=et(r(c.value));u.skus.forEach(a=>{a.name=u.name,a.price=d(a.price),a.highPrecisionPrice=(100*a.highPrecisionPrice).toFixed(6),a.marketPrice=d(a.marketPrice),a.promotionFee=d(a.promotionFee),a.costPrice=d(a.costPrice),a.settlementPrice=d(a.settlementPrice),a.highPrecisionSettlementPrice=(100*a.highPrecisionSettlementPrice).toFixed(6),a.firstBrokeragePrice=d(a.firstBrokeragePrice),a.secondBrokeragePrice=d(a.secondBrokeragePrice)});const v=[];u.sliderPicUrls.forEach(a=>{typeof a=="object"?v.push(a.url):v.push(a)}),u.sliderPicUrls=v;const B=u;k.value?(await ut(B),T.success(x("common.updateSuccess"))):(await pt(B),T.success(x("common.createSuccess"))),close(),V("success")}finally{y.value=!1}};return O(()=>{(async()=>{var m;const f=k.value;if(f){y.value=!0;try{const i=await mt(f);(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{y.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)"}),(f,m)=>{const i=A("van-tab"),t=A("van-tabs"),u=it,v=_t,B=ot;return _((j(),Y(v,{style:{"overflow-y":"auto"},class:"ContentWrap"},{default:F(()=>{var a;return[l("div",D,[e(t,{active:r(o),"onUpdate:active":m[0]||(m[0]=J=>Z(o)?o.value=J:null)},{default:F(()=>[e(i,{title:"\u57FA\u672C\u4FE1\u606F",name:"info"}),e(i,{title:"\u4EF7\u683C/\u89C4\u683C/\u578B\u53F7",name:"sku"}),e(i,{title:"\u8BE6\u60C5",name:"description"}),e(i,{title:"\u8BC4\u4EF7",name:"comment"}),e(i,{title:"\u5BA2\u670D",name:"service"}),e(i,{title:"\u552E\u540E",name:"aftersale"}),e(i,{title:"\u7269\u6D41\u8BBE\u7F6E",name:"delivery"}),e(i,{title:"\u7533\u8BF7\u8BB0\u5F55",name:"apply"})]),_:1},8,["active"])]),l("div",w,[_(l("div",null,[e(yt,{ref_key:"infoRef",ref:E,"is-detail":r(p),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[n,r(o)=="info"]]),_(l("div",null,[e(kt,{ref_key:"skuRef",ref:I,isDetail:!1,propFormData:r(c)},null,8,["propFormData"])],512),[[n,r(o)=="sku"]]),_(l("div",null,[e(Ft,{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,[e(ht,{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,[e(vt,{ref_key:"otherRef",ref:W,"is-detail":r(p),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[n,r(o)=="other"]]),_(l("div",null,[e(It,{"is-detail":r(p),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[n,r(o)=="comment"]]),_(l("div",null,[e(wt,{"is-detail":r(p),propFormData:r(c)},null,8,["is-detail","propFormData"])],512),[[n,r(o)=="service"]]),_(l("div",null,[e(bt,{productId:r(k),openSource:"Spu"},null,8,["productId"])],512),[[n,r(o)=="aftersale"]]),r(o)=="apply"?(j(),$("div",S,[e(xt,{productId:r(k),propFormData:r(c)},null,8,["productId","propFormData"])])):tt("",!0)]),b,_(e(u,{loading:r(y),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"&&((a=r(c))==null?void 0:a.checkStatus)]])]}),_:1})),[[B,r(y)]])}}}),[["__scopeId","data-v-0a3a51d4"]])});export{mr as __tla,q as default};
|