index-d98f03a9.js 12 KB

1
  1. import{d as De,u as Ie,$ as Se,r as o,x as Ue,a4 as Be,o as s,C as u,a_ as xe,a as e,A as _,B as i,k as d,f as r,D as S,a3 as f,E as ee,Q as Ve,b1 as Te,a2 as ae,v as w,c as $,P as Ee,cT as Re,aB as b,aC as C,aG as Ae,aa as $e,ab as ze,a9 as Le,V as Me,W as je,J as Ye,b0 as Ge,Z as Je,L as Qe,M as We,_ as Ze,__tla as qe}from"./index-54aa57d8.js";import{_ as He,__tla as Ke}from"./ContentWrap-260746ab.js";import{_ as Ne,__tla as Oe}from"./SPuUploadImg-d377301f.js";import{u as Xe,__tla as ea}from"./tagsView-de336f1c.js";import{g as aa,a as te,u as re,__tla as ta}from"./spu-b4744276.js";import ra,{__tla as la}from"./InfoForm-8a1156fa.js";import oa,{__tla as ia}from"./DescriptionForm-9b580d1b.js";import sa,{__tla as ca}from"./OtherForm-7d2e07e5.js";import _a,{__tla as na}from"./SkuForm-cc53e4f6.js";import ma,{__tla as ua}from"./DeliveryForm-6c649f33.js";import pa,{__tla as da}from"./Service-3d4da465.js";import{A as ya,__tla as fa}from"./AfterSale-255a48ee.js";import ha,{__tla as va}from"./Comment-ceea28c0.js";import ka,{__tla as Pa}from"./Apply-6360d92c.js";import{P as z}from"./constants-c811e5ff.js";import{c as ga,__tla as ba}from"./permission-1c0fa4cd.js";import{u as Ca,__tla as Fa}from"./useMessage-f56cafbb.js";import{__tla as wa}from"./el-card-e7d6628c.js";import{__tla as Da}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-03e554d4.js";import{__tla as Ia}from"./index-1a846221.js";import{__tla as Sa}from"./el-image-viewer-ec0edec4.js";import{__tla as Ua}from"./UploadImgs-1c3a9b0d.js";import{__tla as Ba}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-6e3f8f3f.js";import"./tree-0af4953a.js";import{__tla as xa}from"./category-25a5e37a.js";import{__tla as Va}from"./brand-e7a4cd3c.js";import{__tla as Ta}from"./formRules-de58d92d.js";import{__tla as Ea}from"./Editor-2839cd89.js";import{__tla as Ra}from"./index-e0572f5f.js";import{__tla as Aa}from"./SkuList-6694cde5.js";import{__tla as $a}from"./el-image-94dad5a7.js";import{__tla as za}from"./UploadImg-46306ddf.js";import{__tla as La}from"./UploadFile.vue_vue_type_style_index_0_scoped_436eca1b_lang-ebe3d168.js";import{__tla as Ma}from"./ProductAttributes-406417eb.js";import{__tla as ja}from"./el-text-5b70ca38.js";import{__tla as Ya}from"./property-e665e647.js";import{__tla as Ga}from"./ProductPropertyAddForm-3cfd6c3c.js";import{__tla as Ja}from"./Dialog-7bb778a5.js";import{__tla as Qa}from"./index-fc0842b4.js";import{__tla as Wa}from"./dict-573b3b04.js";import{__tla as Za}from"./index-e7a32376.js";import{__tla as qa}from"./index-e6a7fd1e.js";import{__tla as Ha}from"./index-254a9b5e.js";import{__tla as Ka}from"./index-692b7677.js";import{__tla as Na}from"./formatTime-e6197688.js";let le,Oa=Promise.all([(()=>{try{return qe}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return Oe}catch{}})(),(()=>{try{return ea}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return la}catch{}})(),(()=>{try{return ia}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ua}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Na}catch{}})()]).then(async()=>{let L,M,j,Y,G,J,Q,W,Z,q,H;L={class:"my-header"},M={class:"my-header-left"},j={class:"my-header-right"},Y=["onClick"],G={class:"left"},J={class:"right"},Q={key:0},W={key:1},Z={key:2},q=(U=>(Qe("data-v-473675a6"),U=U(),We(),U))(()=>i("div",{style:{clear:"both"}},null,-1)),H={class:"dialog-footer"},le=Ze(De({name:"ProductSpuForm",__name:"index",emits:["success"],setup(U,{expose:oe,emit:ie}){const{t:R}=Ee(),k=Ca();Ie(),Se(),Xe();const h=o(!1),n=o("info"),l=o(!1),se=o(),ce=o(),_e=o(),ne=o(),me=o(),m=o({name:"",categoryId:void 0,keyword:"",picUrl:"",producerArea:"",spuType:void 0,sliderPicUrls:[],introduction:"",deliveryTypes:[],deliveryTemplateId:void 0,brandId:void 0,specType:!1,subCommissionType:!1,highPrecision:!1,skus:[{price:0,marketPrice:0,costPrice:0,barCode:"",picUrl:"",stock:0,weight:0,volume:0,promotionFee:0,mark:"",highPrecisionPrice:0,highPrecisionSettlementPrice:0,firstBrokeragePrice:0,secondBrokeragePrice:0}],description:"",sort:0,giveIntegral:0,virtualSalesCount:0}),ue=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:"",highPrecisionPrice:0,highPrecisionSettlementPrice:0,firstBrokeragePrice:0,secondBrokeragePrice:0}],description:"",sort:0,giveIntegral:0,virtualSalesCount:0}),g=o(!1),B=o(""),x=o(0),V=o(),pe=o(""),y=o(),T=o(""),de=o(0),D=o(!1),v=Ue({id:"",checkComment:"",checkStatus:0,applyMemberUserId:0});oe({open:async(c,t,F,a)=>{x.value=a,y.value=t,de.value=F,g.value=!0,V.value=t.id,v.id=t.id,pe.value=t.picUrl,D.value=!1,await fe(),v.applyMemberUserId=m.value.applyMemberUserId,n.value="info",T.value=c,B.value=R("action."+c),c=="view"?B.value="\u67E5\u770B":c=="create"&&(m.value=Re(ue.value)),T.value=="view"?l.value=!0:l.value=!1}});const ye=()=>{D.value=!D.value},fe=async()=>{var t;const c=V.value;if(c){h.value=!0;try{const F=await aa(c);(t=F.skus)==null||t.forEach(a=>{l.value?(a.price=b(a.price),a.highPrecisionPrice=a.highPrecisionPrice/100,a.settlementPrice=b(a.settlementPrice),a.highPrecisionSettlementPrice=a.highPrecisionSettlementPrice/100,a.marketPrice=b(a.marketPrice),a.costPrice=b(a.costPrice),a.promotionFee=b(a.promotionFee),a.firstBrokeragePrice=b(a.firstBrokeragePrice),a.secondBrokeragePrice=b(a.secondBrokeragePrice)):(a.price=C(a.price),a.highPrecisionPrice=a.highPrecisionPrice/100,a.settlementPrice=C(a.settlementPrice),a.highPrecisionSettlementPrice=a.highPrecisionSettlementPrice/100,a.marketPrice=C(a.marketPrice),a.costPrice=C(a.costPrice),a.promotionFee=C(a.promotionFee),a.firstBrokeragePrice=C(a.firstBrokeragePrice),a.secondBrokeragePrice=C(a.secondBrokeragePrice))}),m.value=F}finally{h.value=!1}}},E=ie,he=async()=>{v.checkStatus=2;try{await k.confirm("\u62D2\u7EDD\u7533\u8BF7?"),await te(v).then(()=>{k.success(R("common.success")),g.value=!1,E("success")})}catch{}},ve=async()=>{v.checkStatus=1;try{await k.confirm("\u540C\u610F\u7533\u8BF7?"),await te(v).then(()=>{k.success(R("common.success")),g.value=!1,E("success")})}catch{}},K=async c=>{try{const t=c===z.RECYCLE.status?"\u52A0\u5165\u5230\u56DE\u6536\u7AD9":"\u6062\u590D\u5230\u4ED3\u5E93";await k.confirm(`\u786E\u8BA4\u8981"${y.value.name}"${t}\u5417\uFF1F`),await re({id:y.value.id,status:c}),k.success(t+"\u6210\u529F"),N(),E("success")}catch{}},ke=async()=>{console.log(y.value.status);try{const c=y.value.status?"\u4E0B\u67B6":"\u4E0A\u67B6",t=y.value.status?0:1;await k.confirm(`\u786E\u8BA4\u8981${c}"${y.value.name}"\u5417\uFF1F`),await re({id:y.value.id,status:t}),k.success(c+"\u6210\u529F"),N(),E("success")}catch{}},N=()=>{g.value=!1};return(c,t)=>{var X;const F=Ae,a=Ne,P=$e,Pe=ze,ge=He,be=Le,Ce=Me,Fe=je,I=Ye,we=Ge,O=Je,A=Be("hasPermi");return s(),u(we,{modelValue:e(g),"onUpdate:modelValue":t[5]||(t[5]=p=>ae(g)?g.value=p:null),title:e(B),fullscreen:e(D),"show-close":!1,width:"70%",draggable:"",class:"dialog"},xe({header:_(({close:p})=>[i("div",L,[i("div",M,ee(e(B)),1),i("div",j,[i("span",{onClick:ye},[r(e(Ve),{icon:e(D)?"zmdi:fullscreen-exit":"zmdi:fullscreen"},null,8,["icon"])]),i("span",{onClick:p},[r(F,null,{default:_(()=>[r(e(Te))]),_:1})],8,Y)])])]),default:_(()=>[d((s(),u(ge,{style:{"max-height":"560px","min-height":"560px","overflow-y":"auto","border-bottom":"none"}},{default:_(()=>[i("div",G,[r(a,{modelValue:e(m).picUrl,"onUpdate:modelValue":t[0]||(t[0]=p=>e(m).picUrl=p),disabled:e(l)},null,8,["modelValue","disabled"]),r(Pe,{modelValue:e(n),"onUpdate:modelValue":t[1]||(t[1]=p=>ae(n)?n.value=p:null),"tab-position":"left",class:"child-tabs"},{default:_(()=>[r(P,{label:"\u57FA\u672C\u4FE1\u606F",name:"info"}),r(P,{label:"\u4EF7\u683C/\u89C4\u683C/\u578B\u53F7",name:"sku"}),r(P,{label:"\u8BE6\u60C5",name:"description"}),e(l)?(s(),u(P,{key:0,label:"\u8BC4\u4EF7",name:"comment"})):f("",!0),e(l)?(s(),u(P,{key:1,label:"\u5BA2\u670D",name:"service"})):f("",!0),e(l)?(s(),u(P,{key:2,label:"\u552E\u540E",name:"aftersale"})):f("",!0),r(P,{label:"\u7269\u6D41\u8BBE\u7F6E",name:"delivery"}),e(l)?(s(),u(P,{key:3,label:"\u7533\u8BF7\u8BB0\u5F55",name:"apply"})):f("",!0)]),_:1},8,["modelValue"])]),i("div",J,[d(i("div",null,[r(ra,{ref_key:"infoRef",ref:se,"is-detail":e(l),propFormData:e(m)},null,8,["is-detail","propFormData"])],512),[[w,e(n)=="info"]]),d(i("div",null,[r(_a,{ref_key:"skuRef",ref:ce,"is-detail":e(l),propFormData:e(m)},null,8,["is-detail","propFormData"])],512),[[w,e(n)=="sku"]]),d(i("div",null,[r(ma,{ref_key:"deliveryRef",ref:_e,"is-detail":e(l),propFormData:e(m)},null,8,["is-detail","propFormData"])],512),[[w,e(n)=="delivery"]]),d(i("div",null,[r(oa,{ref_key:"descriptionRef",ref:ne,"is-detail":e(l),propFormData:e(m)},null,8,["is-detail","propFormData"])],512),[[w,e(n)=="description"]]),d(i("div",null,[r(sa,{ref_key:"otherRef",ref:me,"is-detail":e(l),propFormData:e(m)},null,8,["is-detail","propFormData"])],512),[[w,e(n)=="other"]]),e(n)=="comment"?(s(),$("div",Q,[r(ha,{"is-detail":e(l),propFormData:e(m)},null,8,["is-detail","propFormData"])])):f("",!0),d(i("div",null,[r(pa,{"is-detail":e(l),propFormData:e(m)},null,8,["is-detail","propFormData"])],512),[[w,e(n)=="service"]]),e(n)=="aftersale"?(s(),$("div",W,[r(ya,{productId:e(V),openSource:"Spu"},null,8,["productId"])])):f("",!0),e(n)=="apply"?(s(),$("div",Z,[r(ka,{productId:e(V),propFormData:e(m)},null,8,["productId","propFormData"])])):f("",!0)]),q]),_:1})),[[O,e(h)]])]),_:2},[!((X=e(y))!=null&&X.checkStatus)&&e(ga)(["product:spu-apply:update"])?{name:"footer",fn:_(()=>[i("div",H,[d((s(),u(Fe,{ref:"formRef","label-width":"80px",style:{display:"flex"},model:e(v)},{default:_(()=>[r(Ce,{label:"\u5BA1\u6838\u610F\u89C1",prop:"checkComment"},{default:_(()=>[r(be,{modelValue:e(v).checkComment,"onUpdate:modelValue":t[2]||(t[2]=p=>e(v).checkComment=p),placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u610F\u89C1",style:{width:"300px"}},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[O,e(h)]]),d((s(),u(I,{loading:e(h),type:"danger",onClick:he},{default:_(()=>[S(" \u62D2\u7EDD ")]),_:1},8,["loading"])),[[A,["product:spu-apply:update"]]]),d((s(),u(I,{loading:e(h),type:"primary",onClick:ve},{default:_(()=>[S(" \u540C\u610F ")]),_:1},8,["loading"])),[[A,["product:spu-apply:update"]]])])]),key:"0"}:e(l)?void 0:{name:"footer",fn:_(()=>[i("div",{class:"dialog-footer"},[e(l)||e(x)==4||e(T)=="create"?f("",!0):(s(),u(I,{key:0,loading:e(h),type:"danger",plain:"",onClick:t[3]||(t[3]=p=>K(e(z).RECYCLE.status))},{default:_(()=>[S(" \u505C\u7528 ")]),_:1},8,["loading"])),e(l)||e(x)!=4?f("",!0):d((s(),u(I,{key:1,loading:e(h),type:"primary",onClick:t[4]||(t[4]=p=>K(e(z).DISABLE.status))},{default:_(()=>[S(" \u6062\u590D ")]),_:1},8,["loading"])),[[A,["product:spu:update"]]]),e(l)||e(T)=="create"||e(x)==4?f("",!0):(s(),u(I,{key:2,loading:e(h),type:"primary",onClick:ke},{default:_(()=>[S(ee(e(y).status==0?"\u4E0A\u67B6":"\u4E0B\u67B6"),1)]),_:1},8,["loading"]))])]),key:"1"}]),1032,["modelValue","title","fullscreen"])}}}),[["__scopeId","data-v-473675a6"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/index.vue"]])});export{Oa as __tla,le as default};