1 |
- import{d as De,u as Ie,Z as Ue,r as o,x as Se,a3 as Be,o as c,C as u,aX as Ve,a as e,A as _,B as i,k as d,f as r,D as U,a2 as f,E as ee,_ as xe,a_ as Te,a1 as te,v as w,c as L,P as Re,cM as Ae,aA as b,aB as F,aF as Ee,a9 as Le,aa as Me,a8 as $e,U as Ye,V as je,J as ze,aZ as Ze,Y as Je,L as Xe,M as qe,__tla as Ge}from"./index-f65577b8.js";import{_ as He,__tla as Ke}from"./ContentWrap.vue_vue_type_script_setup_true_lang-9fbbd655.js";import{_ as Ne,__tla as Oe}from"./SPuUploadImg-bb83411e.js";import{u as Qe,__tla as We}from"./tagsView-207c45f9.js";import{g as et,a as ae,u as re,__tla as tt}from"./spu-f470600f.js";import at,{__tla as rt}from"./InfoForm-0293dfeb.js";import lt,{__tla as ot}from"./DescriptionForm-f0144a0d.js";import it,{__tla as ct}from"./OtherForm-a51f7be9.js";import st,{__tla as _t}from"./SkuForm-72508bea.js";import nt,{__tla as mt}from"./DeliveryForm-1297f293.js";import ut,{__tla as pt}from"./Service-8a837b8c.js";import{A as dt,__tla as yt}from"./AfterSale-52e4d3b6.js";import ft,{__tla as ht}from"./Comment-2812c23a.js";import vt,{__tla as kt}from"./Apply-5944ff88.js";import{P as M}from"./constants-c811e5ff.js";import{c as Pt,__tla as gt}from"./permission-2462c0e6.js";import{u as bt,__tla as Ft}from"./useMessage-4dbf0ae4.js";import{_ as Ct}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as wt}from"./el-card-ab53e6aa.js";import{__tla as Dt}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-cac578ef.js";import{__tla as It}from"./index-c1ff7b7a.js";import{__tla as Ut}from"./el-image-viewer-7e496319.js";import{__tla as St}from"./UploadImgs-3a300492.js";import{__tla as Bt}from"./UploadImgs.vue_vue_type_style_index_0_scoped_3d27d917_lang-84036457.js";import"./tree-0af4953a.js";import{__tla as Vt}from"./category-60c03943.js";import{__tla as xt}from"./brand-dc679419.js";import{__tla as Tt}from"./formRules-632015f2.js";import{__tla as Rt}from"./style.css_vue_type_style_index_0_src_true_lang-a4e14d4d.js";import{__tla as At}from"./index-60580920.js";import{__tla as Et}from"./SkuList.vue_vue_type_script_setup_true_lang-92252110.js";import{__tla as Lt}from"./el-image-6b44629c.js";import{__tla as Mt}from"./UploadImg-9468593a.js";import{__tla as $t}from"./UploadFile.vue_vue_type_style_index_0_scoped_2570c8e9_lang-88692ca3.js";import{__tla as Yt}from"./ProductAttributes.vue_vue_type_script_setup_true_lang-5f923fcf.js";import{__tla as jt}from"./el-text-b0c95094.js";import{__tla as zt}from"./property-8c9fcdf7.js";import{__tla as Zt}from"./ProductPropertyAddForm.vue_vue_type_script_setup_true_lang-ad3fd9d6.js";import{__tla as Jt}from"./Dialog-bd3317a7.js";import{__tla as Xt}from"./index-fe7f5c5f.js";import{__tla as qt}from"./dict-fa3ffbd2.js";import{__tla as Gt}from"./index-be51ff92.js";import{__tla as Ht}from"./index.vue_vue_type_script_setup_true_lang-53598c8e.js";import{__tla as Kt}from"./index-1896261a.js";import{__tla as Nt}from"./index-c8579bc8.js";import{__tla as Ot}from"./formatTime-411ed1a1.js";let le,Qt=Promise.all([(()=>{try{return Ge}catch{}})(),(()=>{try{return Ke}catch{}})(),(()=>{try{return Oe}catch{}})(),(()=>{try{return We}catch{}})(),(()=>{try{return tt}catch{}})(),(()=>{try{return rt}catch{}})(),(()=>{try{return ot}catch{}})(),(()=>{try{return ct}catch{}})(),(()=>{try{return _t}catch{}})(),(()=>{try{return mt}catch{}})(),(()=>{try{return pt}catch{}})(),(()=>{try{return yt}catch{}})(),(()=>{try{return ht}catch{}})(),(()=>{try{return kt}catch{}})(),(()=>{try{return gt}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return wt}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return It}catch{}})(),(()=>{try{return Ut}catch{}})(),(()=>{try{return St}catch{}})(),(()=>{try{return Bt}catch{}})(),(()=>{try{return Vt}catch{}})(),(()=>{try{return xt}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return Lt}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return Yt}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return Jt}catch{}})(),(()=>{try{return Xt}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return Ht}catch{}})(),(()=>{try{return Kt}catch{}})(),(()=>{try{return Nt}catch{}})(),(()=>{try{return Ot}catch{}})()]).then(async()=>{let $,Y,j,z,Z,J,X,q,G,H,K;$={class:"my-header"},Y={class:"my-header-left"},j={class:"my-header-right"},z=["onClick"],Z={class:"left"},J={class:"right"},X={key:0},q={key:1},G={key:2},H=(S=>(Xe("data-v-ff41158c"),S=S(),qe(),S))(()=>i("div",{style:{clear:"both"}},null,-1)),K={class:"dialog-footer"},le=Ct(De({name:"ProductSpuForm",__name:"index",emits:["success"],setup(S,{expose:oe,emit:ie}){const{t:A}=Re(),k=bt();Ie(),Ue(),Qe();const h=o(!1),n=o("info"),l=o(!1),ce=o(),se=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(""),V=o(0),x=o(),pe=o(""),y=o(),T=o(""),de=o(0),D=o(!1),v=Se({id:"",checkComment:"",checkStatus:0,applyMemberUserId:0});oe({open:async(s,a,C,t)=>{V.value=t,y.value=a,de.value=C,g.value=!0,x.value=a.id,v.id=a.id,pe.value=a.picUrl,D.value=!1,await fe(),v.applyMemberUserId=m.value.applyMemberUserId,n.value="info",T.value=s,B.value=A("action."+s),s=="view"?B.value="\u67E5\u770B":s=="create"&&(m.value=Ae(ue.value)),T.value=="view"?l.value=!0:l.value=!1}});const ye=()=>{D.value=!D.value},fe=async()=>{var a;const s=x.value;if(s){h.value=!0;try{const C=await et(s);(a=C.skus)==null||a.forEach(t=>{l.value?(t.price=b(t.price),t.highPrecisionPrice=t.highPrecisionPrice/100,t.settlementPrice=b(t.settlementPrice),t.highPrecisionSettlementPrice=t.highPrecisionSettlementPrice/100,t.marketPrice=b(t.marketPrice),t.costPrice=b(t.costPrice),t.promotionFee=b(t.promotionFee),t.firstBrokeragePrice=b(t.firstBrokeragePrice),t.secondBrokeragePrice=b(t.secondBrokeragePrice)):(t.price=F(t.price),t.highPrecisionPrice=t.highPrecisionPrice/100,t.settlementPrice=F(t.settlementPrice),t.highPrecisionSettlementPrice=t.highPrecisionSettlementPrice/100,t.marketPrice=F(t.marketPrice),t.costPrice=F(t.costPrice),t.promotionFee=F(t.promotionFee),t.firstBrokeragePrice=F(t.firstBrokeragePrice),t.secondBrokeragePrice=F(t.secondBrokeragePrice))}),m.value=C}finally{h.value=!1}}},R=ie,he=async()=>{v.checkStatus=2;try{await k.confirm("\u62D2\u7EDD\u7533\u8BF7?"),await ae(v).then(()=>{k.success(A("common.success")),g.value=!1,R("success")})}catch{}},ve=async()=>{v.checkStatus=1;try{await k.confirm("\u540C\u610F\u7533\u8BF7?"),await ae(v).then(()=>{k.success(A("common.success")),g.value=!1,R("success")})}catch{}},N=async s=>{try{const a=s===M.RECYCLE.status?"\u52A0\u5165\u5230\u56DE\u6536\u7AD9":"\u6062\u590D\u5230\u4ED3\u5E93";await k.confirm(`\u786E\u8BA4\u8981"${y.value.name}"${a}\u5417\uFF1F`),await re({id:y.value.id,status:s}),k.success(a+"\u6210\u529F"),O(),R("success")}catch{}},ke=async()=>{console.log(y.value.status);try{const s=y.value.status?"\u4E0B\u67B6":"\u4E0A\u67B6",a=y.value.status?0:1;await k.confirm(`\u786E\u8BA4\u8981${s}"${y.value.name}"\u5417\uFF1F`),await re({id:y.value.id,status:a}),k.success(s+"\u6210\u529F"),O(),R("success")}catch{}},O=()=>{g.value=!1};return(s,a)=>{var W;const C=Ee,t=Ne,P=Le,Pe=Me,ge=He,be=$e,Fe=Ye,Ce=je,I=ze,we=Ze,Q=Je,E=Be("hasPermi");return c(),u(we,{modelValue:e(g),"onUpdate:modelValue":a[5]||(a[5]=p=>te(g)?g.value=p:null),title:e(B),fullscreen:e(D),"show-close":!1,width:"70%",draggable:"",class:"dialog"},Ve({header:_(({close:p})=>[i("div",$,[i("div",Y,ee(e(B)),1),i("div",j,[i("span",{onClick:ye},[r(e(xe),{icon:e(D)?"zmdi:fullscreen-exit":"zmdi:fullscreen"},null,8,["icon"])]),i("span",{onClick:p},[r(C,null,{default:_(()=>[r(e(Te))]),_:1})],8,z)])])]),default:_(()=>[d((c(),u(ge,{style:{"max-height":"560px","min-height":"560px","overflow-y":"auto","border-bottom":"none"}},{default:_(()=>[i("div",Z,[r(t,{modelValue:e(m).picUrl,"onUpdate:modelValue":a[0]||(a[0]=p=>e(m).picUrl=p),disabled:e(l)},null,8,["modelValue","disabled"]),r(Pe,{modelValue:e(n),"onUpdate:modelValue":a[1]||(a[1]=p=>te(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)?(c(),u(P,{key:0,label:"\u8BC4\u4EF7",name:"comment"})):f("",!0),e(l)?(c(),u(P,{key:1,label:"\u5BA2\u670D",name:"service"})):f("",!0),e(l)?(c(),u(P,{key:2,label:"\u552E\u540E",name:"aftersale"})):f("",!0),r(P,{label:"\u7269\u6D41\u8BBE\u7F6E",name:"delivery"}),e(l)?(c(),u(P,{key:3,label:"\u7533\u8BF7\u8BB0\u5F55",name:"apply"})):f("",!0)]),_:1},8,["modelValue"])]),i("div",J,[d(i("div",null,[r(at,{ref_key:"infoRef",ref:ce,"is-detail":e(l),propFormData:e(m)},null,8,["is-detail","propFormData"])],512),[[w,e(n)=="info"]]),d(i("div",null,[r(st,{ref_key:"skuRef",ref:se,"is-detail":e(l),propFormData:e(m)},null,8,["is-detail","propFormData"])],512),[[w,e(n)=="sku"]]),d(i("div",null,[r(nt,{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(lt,{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(it,{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"?(c(),L("div",X,[r(ft,{"is-detail":e(l),propFormData:e(m)},null,8,["is-detail","propFormData"])])):f("",!0),d(i("div",null,[r(ut,{"is-detail":e(l),propFormData:e(m)},null,8,["is-detail","propFormData"])],512),[[w,e(n)=="service"]]),e(n)=="aftersale"?(c(),L("div",q,[r(dt,{productId:e(x),openSource:"Spu"},null,8,["productId"])])):f("",!0),e(n)=="apply"?(c(),L("div",G,[r(vt,{productId:e(x),propFormData:e(m)},null,8,["productId","propFormData"])])):f("",!0)]),H]),_:1})),[[Q,e(h)]])]),_:2},[!((W=e(y))!=null&&W.checkStatus)&&e(Pt)(["product:spu-apply:update"])?{name:"footer",fn:_(()=>[i("div",K,[d((c(),u(Ce,{ref:"formRef","label-width":"80px",style:{display:"flex"},model:e(v)},{default:_(()=>[r(Fe,{label:"\u5BA1\u6838\u610F\u89C1",prop:"checkComment"},{default:_(()=>[r(be,{modelValue:e(v).checkComment,"onUpdate:modelValue":a[2]||(a[2]=p=>e(v).checkComment=p),placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u610F\u89C1",style:{width:"300px"}},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])),[[Q,e(h)]]),d((c(),u(I,{loading:e(h),type:"danger",onClick:he},{default:_(()=>[U(" \u62D2\u7EDD ")]),_:1},8,["loading"])),[[E,["product:spu-apply:update"]]]),d((c(),u(I,{loading:e(h),type:"primary",onClick:ve},{default:_(()=>[U(" \u540C\u610F ")]),_:1},8,["loading"])),[[E,["product:spu-apply:update"]]])])]),key:"0"}:e(l)?void 0:{name:"footer",fn:_(()=>[i("div",{class:"dialog-footer"},[e(l)||e(V)==4||e(T)=="create"?f("",!0):(c(),u(I,{key:0,loading:e(h),type:"danger",plain:"",onClick:a[3]||(a[3]=p=>N(e(M).RECYCLE.status))},{default:_(()=>[U(" \u505C\u7528 ")]),_:1},8,["loading"])),e(l)||e(V)!=4?f("",!0):d((c(),u(I,{key:1,loading:e(h),type:"primary",onClick:a[4]||(a[4]=p=>N(e(M).DISABLE.status))},{default:_(()=>[U(" \u6062\u590D ")]),_:1},8,["loading"])),[[E,["product:spu:update"]]]),e(l)||e(T)=="create"||e(V)==4?f("",!0):(c(),u(I,{key:2,loading:e(h),type:"primary",onClick:ke},{default:_(()=>[U(ee(e(y).status==0?"\u4E0A\u67B6":"\u4E0B\u67B6"),1)]),_:1},8,["loading"]))])]),key:"1"}]),1032,["modelValue","title","fullscreen"])}}}),[["__scopeId","data-v-ff41158c"]])});export{Qt as __tla,le as default};
|