index-fe26b38d.js 11 KB

1
  1. import{d as ke,u as ge,$ as be,r,x as Fe,a4 as we,o as _,C as d,aY as De,a as e,A as m,B as i,k as n,f as t,D as H,E as Ce,Q as Ie,a$ as Ue,a3 as y,a2 as K,v as F,c as S,P as xe,cT as Se,aB as v,aC as P,aG as Be,aa as Ve,ab as Te,a9 as Re,V as Ae,W as Me,J as ze,a_ as je,Z as Ee,L as Je,M as Le,_ as $e,__tla as Ge}from"./index-f6fb8e95.js";import{_ as Qe,__tla as We}from"./ContentWrap-96bb70ec.js";import{_ as Ye,__tla as Ze}from"./SPuUploadImg-95101882.js";import{u as qe,__tla as He}from"./tagsView-99b53ea3.js";import{g as Ke,a as N,__tla as Ne}from"./spu-a7f31871.js";import Oe,{__tla as Xe}from"./InfoForm-854f4ded.js";import ea,{__tla as aa}from"./DescriptionForm-53896f4d.js";import ta,{__tla as ra}from"./OtherForm-f2af2890.js";import la,{__tla as oa}from"./SkuForm-31cd50f4.js";import ia,{__tla as ca}from"./DeliveryForm-4a16b5fa.js";import sa,{__tla as _a}from"./Service-c3f4917f.js";import{A as ma,__tla as na}from"./AfterSale-bb603685.js";import ua,{__tla as pa}from"./Comment-89ff6a3c.js";import da,{__tla as fa}from"./Apply-db2834c8.js";import{c as ha,__tla as ya}from"./permission-f83c775b.js";import{u as va,__tla as Pa}from"./useMessage-3b767a67.js";import{__tla as ka}from"./el-card-8db16709.js";import{__tla as ga}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-8b438c45.js";import{__tla as ba}from"./index-b76b57e5.js";import{__tla as Fa}from"./el-image-viewer-cfdb08a7.js";import{__tla as wa}from"./UploadImgs-52ac4257.js";import{__tla as Da}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-1b59ad7e.js";import"./tree-0af4953a.js";import{__tla as Ca}from"./category-4baa8823.js";import{__tla as Ia}from"./brand-ad379847.js";import{__tla as Ua}from"./formRules-e7596da3.js";import{__tla as xa}from"./Editor-87b5f27a.js";import{__tla as Sa}from"./index-8bf65b8f.js";import{__tla as Ba}from"./SkuList-d402df2e.js";import{__tla as Va}from"./el-image-fefb4b54.js";import{__tla as Ta}from"./UploadImg-76a51b31.js";import{__tla as Ra}from"./UploadFile.vue_vue_type_style_index_0_scoped_436eca1b_lang-3d49d983.js";import{__tla as Aa}from"./ProductAttributes-56aad337.js";import{__tla as Ma}from"./el-text-0047659b.js";import{__tla as za}from"./property-40d7be25.js";import{__tla as ja}from"./ProductPropertyAddForm-b3029d18.js";import{__tla as Ea}from"./Dialog-ac2b0e4e.js";import{__tla as Ja}from"./index-aac71c4d.js";import{__tla as La}from"./dict-c9a7f6a4.js";import"./constants-c811e5ff.js";import{__tla as $a}from"./index-fb236505.js";import{__tla as Ga}from"./index-58a94653.js";import{__tla as Qa}from"./index-07a2f7ed.js";import{__tla as Wa}from"./index-74af911b.js";import{__tla as Ya}from"./formatTime-ddd96ac8.js";let O,Za=Promise.all([(()=>{try{return Ge}catch{}})(),(()=>{try{return We}catch{}})(),(()=>{try{return Ze}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return Ne}catch{}})(),(()=>{try{return Xe}catch{}})(),(()=>{try{return aa}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return ca}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return pa}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return Ya}catch{}})()]).then(async()=>{let B,V,T,R,A,M,z,j,E,J,L;B={class:"my-header"},V={class:"my-header-left"},T={class:"my-header-right"},R=["onClick"],A={class:"left"},M={class:"right"},z={key:0},j={key:1},E={key:2},J=(D=>(Je("data-v-473675a6"),D=D(),Le(),D))(()=>i("div",{style:{clear:"both"}},null,-1)),L={class:"dialog-footer"},O=$e(ke({name:"ProductSpuForm",__name:"index",emits:["success"],setup(D,{expose:X,emit:ee}){const{t:x}=xe(),C=va();ge(),be(),qe();const k=r(!1),c=r("info"),o=r(!1),ae=r(),te=r(),re=r(),le=r(),oe=r(),s=r({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}),ie=r({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=r(!1),I=r(""),ce=r(0),U=r(),se=r(""),$=r(),G=r(""),_e=r(0),w=r(!1),u=Fe({id:"",checkComment:"",checkStatus:0,applyMemberUserId:0});X({open:async(f,l,b,a)=>{ce.value=a,$.value=l,_e.value=b,g.value=!0,U.value=l.id,u.id=l.id,se.value=l.picUrl,w.value=!1,await ne(),u.applyMemberUserId=s.value.applyMemberUserId,c.value="info",G.value=f,I.value=x("action."+f),f=="view"?I.value="\u67E5\u770B":f=="create"&&(s.value=Se(ie.value)),G.value=="view"?o.value=!0:o.value=!1}});const me=()=>{w.value=!w.value},ne=async()=>{var l;const f=U.value;if(f){k.value=!0;try{const b=await Ke(f);(l=b.skus)==null||l.forEach(a=>{o.value?(a.price=v(a.price),a.highPrecisionPrice=a.highPrecisionPrice/100,a.settlementPrice=v(a.settlementPrice),a.highPrecisionSettlementPrice=a.highPrecisionSettlementPrice/100,a.marketPrice=v(a.marketPrice),a.costPrice=v(a.costPrice),a.promotionFee=v(a.promotionFee),a.firstBrokeragePrice=v(a.firstBrokeragePrice),a.secondBrokeragePrice=v(a.secondBrokeragePrice)):(a.price=P(a.price),a.highPrecisionPrice=a.highPrecisionPrice/100,a.settlementPrice=P(a.settlementPrice),a.highPrecisionSettlementPrice=a.highPrecisionSettlementPrice/100,a.marketPrice=P(a.marketPrice),a.costPrice=P(a.costPrice),a.promotionFee=P(a.promotionFee),a.firstBrokeragePrice=P(a.firstBrokeragePrice),a.secondBrokeragePrice=P(a.secondBrokeragePrice))}),s.value=b}finally{k.value=!1}}},Q=ee,ue=async()=>{u.checkStatus=2;try{await C.confirm("\u62D2\u7EDD\u7533\u8BF7?"),await N(u).then(()=>{C.success(x("common.success")),g.value=!1,Q("success")})}catch{}},pe=async()=>{u.checkStatus=1;try{await C.confirm("\u540C\u610F\u7533\u8BF7?"),await N(u).then(()=>{C.success(x("common.success")),g.value=!1,Q("success")})}catch{}};return(f,l)=>{var q;const b=Be,a=Ye,h=Ve,de=Te,fe=Qe,he=Re,ye=Ae,ve=Me,W=ze,Pe=je,Y=Ee,Z=we("hasPermi");return _(),d(Pe,{modelValue:e(g),"onUpdate:modelValue":l[3]||(l[3]=p=>K(g)?g.value=p:null),title:e(I),fullscreen:e(w),"show-close":!1,width:"70%",draggable:"",class:"dialog"},De({header:m(({close:p})=>[i("div",B,[i("div",V,Ce(e(I)),1),i("div",T,[i("span",{onClick:me},[t(e(Ie),{icon:e(w)?"zmdi:fullscreen-exit":"zmdi:fullscreen"},null,8,["icon"])]),i("span",{onClick:p},[t(b,null,{default:m(()=>[t(e(Ue))]),_:1})],8,R)])])]),default:m(()=>[n((_(),d(fe,{style:{"max-height":"560px","min-height":"560px","overflow-y":"auto","border-bottom":"none"}},{default:m(()=>[i("div",A,[t(a,{modelValue:e(s).picUrl,"onUpdate:modelValue":l[0]||(l[0]=p=>e(s).picUrl=p),disabled:e(o)},null,8,["modelValue","disabled"]),t(de,{modelValue:e(c),"onUpdate:modelValue":l[1]||(l[1]=p=>K(c)?c.value=p:null),"tab-position":"left",class:"child-tabs"},{default:m(()=>[t(h,{label:"\u57FA\u672C\u4FE1\u606F",name:"info"}),t(h,{label:"\u4EF7\u683C/\u89C4\u683C/\u578B\u53F7",name:"sku"}),t(h,{label:"\u8BE6\u60C5",name:"description"}),e(o)?(_(),d(h,{key:0,label:"\u8BC4\u4EF7",name:"comment"})):y("",!0),e(o)?(_(),d(h,{key:1,label:"\u5BA2\u670D",name:"service"})):y("",!0),e(o)?(_(),d(h,{key:2,label:"\u552E\u540E",name:"aftersale"})):y("",!0),t(h,{label:"\u7269\u6D41\u8BBE\u7F6E",name:"delivery"}),e(o)?(_(),d(h,{key:3,label:"\u7533\u8BF7\u8BB0\u5F55",name:"apply"})):y("",!0)]),_:1},8,["modelValue"])]),i("div",M,[n(i("div",null,[t(Oe,{ref_key:"infoRef",ref:ae,"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])],512),[[F,e(c)=="info"]]),n(i("div",null,[t(la,{ref_key:"skuRef",ref:te,"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])],512),[[F,e(c)=="sku"]]),n(i("div",null,[t(ia,{ref_key:"deliveryRef",ref:re,"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])],512),[[F,e(c)=="delivery"]]),n(i("div",null,[t(ea,{ref_key:"descriptionRef",ref:le,"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])],512),[[F,e(c)=="description"]]),n(i("div",null,[t(ta,{ref_key:"otherRef",ref:oe,"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])],512),[[F,e(c)=="other"]]),e(c)=="comment"?(_(),S("div",z,[t(ua,{"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])])):y("",!0),n(i("div",null,[t(sa,{"is-detail":e(o),propFormData:e(s)},null,8,["is-detail","propFormData"])],512),[[F,e(c)=="service"]]),e(c)=="aftersale"?(_(),S("div",j,[t(ma,{productId:e(U),openSource:"Spu"},null,8,["productId"])])):y("",!0),e(c)=="apply"?(_(),S("div",E,[t(da,{productId:e(U),propFormData:e(s)},null,8,["productId","propFormData"])])):y("",!0)]),J]),_:1})),[[Y,e(k)]])]),_:2},[!((q=e($))!=null&&q.checkStatus)&&e(ha)(["product:spu-apply:update"])?{name:"footer",fn:m(()=>[i("div",L,[n((_(),d(ve,{ref:"formRef","label-width":"80px",style:{display:"flex"},model:e(u)},{default:m(()=>[t(ye,{label:"\u5BA1\u6838\u610F\u89C1",prop:"checkComment"},{default:m(()=>[t(he,{modelValue:e(u).checkComment,"onUpdate:modelValue":l[2]||(l[2]=p=>e(u).checkComment=p),placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u610F\u89C1",style:{width:"300px"}},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[Y,e(k)]]),n((_(),d(W,{loading:e(k),type:"danger",onClick:ue},{default:m(()=>[H(" \u62D2\u7EDD ")]),_:1},8,["loading"])),[[Z,["product:spu-apply:update"]]]),n((_(),d(W,{loading:e(k),type:"primary",onClick:pe},{default:m(()=>[H(" \u540C\u610F ")]),_:1},8,["loading"])),[[Z,["product:spu-apply:update"]]])])]),key:"0"}:void 0]),1032,["modelValue","title","fullscreen"])}}}),[["__scopeId","data-v-473675a6"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/index.vue"]])});export{Za as __tla,O as default};