import{E as pl,__tla as cl}from"./el-image.bbfa5f50.js";import{E as oe,__tla as xl}from"./el-input.26169bdd.js";import{E as B,__tla as ul}from"./el-button.b9902edf.js";import{f as J,j as V,a7 as vl,J as Q,o as i,c as X,w as f,m as e,x as v,aa as I,q,u as a,l as n,X as m,a8 as ie,a9 as ml,v as s,t as K,F as S,cu as _l,a6 as y,ag as re,A as W,B as Y,h as fl,s as se,C as ne,al as yl,y as bl,__tla as hl}from"./entry.7ac74952.js";import{__tla as kl}from"./el-image-viewer.6b094d65.js";import{v as gl,__tla as wl}from"./el-loading.db0fa82e.js";import{_ as Vl,__tla as Cl}from"./goods_default.3cf67055.js";import{g as jl,A as Fl,__tla as zl}from"./edit-address.42aec0b6.js";import{o as Ll,a as El,b as Ml,c as Ul,__tla as Dl}from"./order.477d6934.js";import{E as Il,a as Ol,__tla as Al}from"./el-form.401432c4.js";import{E as $,__tla as Rl}from"./el-dialog.8638bbbd.js";import{__tla as ql}from"./el-overlay.6c5efcf9.js";import{_ as ee}from"./_plugin-vue_export-helper.c27b6911.js";import{u as Kl,__tla as Sl}from"./cart.7b345076.js";import{__tla as Pl}from"./index.4e8000c9.js";import{__tla as Zl}from"./scroll.6ddd597d.js";import"./event.9519ab40.js";import{__tla as Nl}from"./use-form-item.d93b2d81.js";import{__tla as Bl}from"./index.06247adb.js";import"./error.78e43d3e.js";import"./isNil.c75b1b34.js";import{__tla as Jl}from"./index.623d89cd.js";import{__tla as Xl}from"./throttle.87b285fc.js";import{__tla as Tl}from"./el-select.5c8e172e.js";import{__tla as Gl}from"./focus-trap.fbc9f3cd.js";import{__tla as Hl}from"./strings.dc56295c.js";import{__tla as Ql}from"./isEqual.44405615.js";import{__tla as Wl}from"./validator.cb3da7a3.js";import{__tla as Yl}from"./castArray.c7b38e0a.js";import{__tla as $l}from"./vnode.47700175.js";let de,eo=Promise.all([(()=>{try{return cl}catch{}})(),(()=>{try{return xl}catch{}})(),(()=>{try{return ul}catch{}})(),(()=>{try{return hl}catch{}})(),(()=>{try{return kl}catch{}})(),(()=>{try{return wl}catch{}})(),(()=>{try{return Cl}catch{}})(),(()=>{try{return zl}catch{}})(),(()=>{try{return Dl}catch{}})(),(()=>{try{return Al}catch{}})(),(()=>{try{return Rl}catch{}})(),(()=>{try{return ql}catch{}})(),(()=>{try{return Sl}catch{}})(),(()=>{try{return Pl}catch{}})(),(()=>{try{return Zl}catch{}})(),(()=>{try{return Nl}catch{}})(),(()=>{try{return Bl}catch{}})(),(()=>{try{return Jl}catch{}})(),(()=>{try{return Xl}catch{}})(),(()=>{try{return Tl}catch{}})(),(()=>{try{return Gl}catch{}})(),(()=>{try{return Hl}catch{}})(),(()=>{try{return Ql}catch{}})(),(()=>{try{return Wl}catch{}})(),(()=>{try{return Yl}catch{}})(),(()=>{try{return $l}catch{}})()]).then(async()=>{const pe={class:"flex items-center"},ce=e("div",null,"\u589E\u503C\u7A0E\u7535\u5B50\u666E\u901A\u53D1\u7968",-1),xe={key:0,class:"iconfont icon-xuanzhong4 !text-[22px] text-primary absolute bottom-[-3px] right-[-1px]"},ue=e("div",null,"\u589E\u503C\u7A0E\u4E13\u7528\u53D1\u7968",-1),ve={key:0,class:"iconfont icon-xuanzhong4 !text-[22px] text-primary absolute bottom-[-3px] right-[-1px]"},me={class:"text-[#999] text-[12px] mt-[10px] leading-[20px]"},_e={class:"flex items-center"},fe=e("div",null,"\u4E2A\u4EBA",-1),ye={key:0,class:"iconfont icon-xuanzhong4 !text-[22px] text-primary absolute bottom-[-3px] right-[-1px]"},be=e("div",null,"\u4F01\u4E1A",-1),he={key:0,class:"iconfont icon-xuanzhong4 !text-[22px] text-primary absolute bottom-[-3px] right-[-1px]"},ke={class:"flex items-center flex-wrap"},ge=["onClick"],we={key:0,class:"iconfont icon-xuanzhong4 !text-[22px] text-primary absolute bottom-[-3px] right-[-1px]"},Ve={key:0},Ce={class:"dialog-footer"},je=J({__name:"invoice",emits:["confirm","cancel"],setup(C,{expose:O,emit:d}){const k=V(!1),x=V({}),o=vl({header_type:1,email:"",header_name:"",type:1,name:"",tax_number:"",telephone:"",address:"",bank_name:"",bank_card_number:""}),l=p=>{p&&Object.assign(x.value,p)};l();const j=p=>{p&&(console.log(p),Object.keys(o).forEach(r=>{p[r]!=null&&(o[r]=p[r])}))};j();const U=V(null),A=Q(()=>({header_name:[{required:!0,message:"\u8BF7\u8F93\u5165\u53D1\u7968\u62AC\u5934",trigger:"blur"}],email:[{required:!0,message:"\u8BF7\u8F93\u5165\u6536\u7968\u90AE\u7BB1",trigger:"blur"},{required:!0,validator:g,trigger:"blur"}],tax_number:[{required:!0,validator:c,trigger:"blur"}]})),g=(p,r,b)=>/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(r)?b():b(new Error(y("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u6536\u7968\u90AE\u7BB1"))),c=(p,r,b)=>{!/^[0-9a-zA-Z]+$/.test(r)&&o.header_type==2?b(new Error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7")):b()},_=async p=>{p&&await p.validate(async r=>{if(r){const b={site_id:x.value.site_id,invoice:o};d("confirm",b),k.value=!1}})},D=()=>{d("cancel",x.value.site_id),k.value=!1};return O({dialogInvoiceVisible:k,setFormData:l,open:j}),(p,r)=>{const b=Il,L=oe,T=Ol,R=B,G=$;return i(),X(G,{modelValue:k.value,"onUpdate:modelValue":r[14]||(r[14]=u=>k.value=u),title:"\u53D1\u7968\u4FE1\u606F",width:"600"},{footer:f(()=>[e("div",Ce,[v(R,{onClick:D,dark:""},{default:f(()=>[I("\u53D6\u6D88")]),_:1}),v(R,{type:"primary",class:"!bg-[var(--el-color-primary)] !border-[var(--el-color-primary)]",onClick:r[13]||(r[13]=u=>_(U.value)),dark:""},{default:f(()=>[I("\u786E\u5B9A")]),_:1})])]),default:f(()=>[v(T,{model:a(o),"label-width":"120px",ref_key:"formRef",ref:U,rules:a(A),class:"page-form"},{default:f(()=>[v(b,{label:"\u53D1\u7968\u7C7B\u578B",prop:"type"},{default:f(()=>[e("div",null,[e("div",pe,[e("div",{class:q(["mr-[15px] cursor-pointer relative border-[1px] border-solid border-[#d3d3d3] flex box-border px-[40px] leading-[32px] text-[14px]",{"!border-primary text-primary":a(o).type==1}]),onClick:r[0]||(r[0]=u=>a(o).type=1)},[ce,a(o).type==1?(i(),n("div",xe)):m("",!0)],2),ie(e("div",{class:q(["mr-[15px] cursor-pointer relative border-[1px] border-solid border-[#d3d3d3] flex box-border px-[40px] leading-[32px] text-[14px]",{"!border-primary text-primary":a(o).type==2}]),onClick:r[1]||(r[1]=u=>(a(o).type=2,a(o).header_type=2))},[ue,a(o).type==2?(i(),n("div",ve)):m("",!0)],2),[[ml,a(o).header_type==2]])]),e("div",me,s(a(o).type==1?"\u9ED8\u8BA4\u53D1\u9001\u81F3\u6240\u63D0\u4F9B\u7684\u7535\u5B50\u90AE\u4EF6":"\u7EB8\u8D28\u53D1\u7968\u5F00\u51FA\u540E\u5C06\u4EE5\u90AE\u5BC4\u5F62\u5F0F\u4EA4\u4ED8"),1)])]),_:1}),v(b,{label:"\u62AC\u5934\u7C7B\u578B",prop:"header_type"},{default:f(()=>[e("div",_e,[e("div",{class:q(["mr-[15px] cursor-pointer relative border-[1px] border-solid border-[#d3d3d3] flex box-border px-[40px] leading-[32px] text-[14px]",{"!border-primary text-primary":a(o).header_type==1}]),onClick:r[2]||(r[2]=u=>(a(o).header_type=1,a(o).type=1))},[fe,a(o).header_type==1?(i(),n("div",ye)):m("",!0)],2),e("div",{class:q(["mr-[15px] cursor-pointer relative border-[1px] border-solid border-[#d3d3d3] flex box-border px-[40px] leading-[32px] text-[14px]",{"!border-primary text-primary":a(o).header_type==2}]),onClick:r[3]||(r[3]=u=>a(o).header_type=2)},[be,a(o).header_type==2?(i(),n("div",he)):m("",!0)],2)])]),_:1}),v(b,{label:"\u53D1\u7968\u5185\u5BB9",prop:"name"},{default:f(()=>[e("div",ke,[(i(!0),n(S,null,K(x.value.config.invoice.invoice_content,(u,H)=>(i(),n("div",{key:H,class:q(["mr-[15px] cursor-pointer relative border-[1px] border-solid border-[#d3d3d3] flex box-border px-[40px] leading-[32px] text-[14px] mb-[5px]",{"!border-primary text-primary":a(o).name==u}]),onClick:ae=>a(o).name=u},[e("div",null,s(u),1),a(o).name==u?(i(),n("div",we)):m("",!0)],10,ge))),128))])]),_:1}),v(b,{label:"\u53D1\u7968\u62AC\u5934",prop:"header_name"},{default:f(()=>[v(L,{modelValue:a(o).header_name,"onUpdate:modelValue":r[4]||(r[4]=u=>a(o).header_name=u),modelModifiers:{trim:!0},clearable:"",placeholder:"\u8BF7\u8F93\u5165\u53D1\u7968\u62AC\u5934",class:"input-width",maxlength:"30",onKeyup:r[5]||(r[5]=u=>a(_l)(u)),onBlur:r[6]||(r[6]=u=>a(o).header_name=u.target.value)},null,8,["modelValue"])]),_:1}),v(b,{label:"\u6536\u7968\u90AE\u7BB1",prop:"email"},{default:f(()=>[v(L,{modelValue:a(o).email,"onUpdate:modelValue":r[7]||(r[7]=u=>a(o).email=u),modelModifiers:{trim:!0},clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6536\u7968\u90AE\u7BB1",class:"input-width"},null,8,["modelValue"])]),_:1}),a(o).header_type==2?(i(),n("div",Ve,[v(b,{label:"\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",prop:"tax_number"},{default:f(()=>[v(L,{modelValue:a(o).tax_number,"onUpdate:modelValue":r[8]||(r[8]=u=>a(o).tax_number=u),modelModifiers:{trim:!0},clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7EB3\u7A0E\u4EBA\u8BC6\u522B\u53F7",class:"input-width"},null,8,["modelValue"])]),_:1}),v(b,{label:"\u6CE8\u518C\u5730\u5740",prop:"address"},{default:f(()=>[v(L,{modelValue:a(o).address,"onUpdate:modelValue":r[9]||(r[9]=u=>a(o).address=u),modelModifiers:{trim:!0},clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6CE8\u518C\u5730\u5740",class:"input-width"},null,8,["modelValue"])]),_:1}),v(b,{label:"\u6CE8\u518C\u7535\u8BDD",prop:"telephone"},{default:f(()=>[v(L,{modelValue:a(o).telephone,"onUpdate:modelValue":r[10]||(r[10]=u=>a(o).telephone=u),modelModifiers:{trim:!0},clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6CE8\u518C\u7535\u8BDD",class:"input-width"},null,8,["modelValue"])]),_:1}),v(b,{label:"\u5F00\u6237\u94F6\u884C",prop:"bank_name"},{default:f(()=>[v(L,{modelValue:a(o).bank_name,"onUpdate:modelValue":r[11]||(r[11]=u=>a(o).bank_name=u),modelModifiers:{trim:!0},clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5F00\u6237\u94F6\u884C",class:"input-width"},null,8,["modelValue"])]),_:1}),v(b,{label:"\u94F6\u884C\u8D26\u53F7",prop:"bank_card_number"},{default:f(()=>[v(L,{modelValue:a(o).bank_card_number,"onUpdate:modelValue":r[12]||(r[12]=u=>a(o).bank_card_number=u),modelModifiers:{trim:!0},clearable:"",placeholder:"\u8BF7\u8F93\u5165\u94F6\u884C\u8D26\u53F7",class:"input-width"},null,8,["modelValue"])]),_:1})])):m("",!0)]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])}}}),te=C=>(W("data-v-1ff03bc9"),C=C(),Y(),C),Fe={key:0},ze={class:"flex flex-wrap justify-between"},Le=["onClick"],Ee={class:"w-[100px] h-[110px] bg-primary flex flex-col justify-center items-center relative border-box rounded-[8px] coupon-item"},Me={class:"text-[#fff]"},Ue=te(()=>e("span",{class:"text-[14px] price-font"},"\xA5",-1)),De={class:"text-[26px] price-font"},Ie={key:0,class:"text-[12px] text-[#fff] mt-[4px]"},Oe={key:1,class:"text-[12px] text-[#fff] mt-[4px]"},Ae={class:"w-[250px] h-[110px] bg-[#fff] pl-[15px] relative flex flex-col justify-center rounded-[8px]"},Re={class:"text-[18px] text-[#333] mb-[20px] truncate leading-[24px] w-[196px]"},qe={class:"text-[14px] text-[#999] leading-[18px]"},Ke={class:"absolute top-[10px] right-[10px]"},Se={key:0,class:"iconfont icon-xuanze1 !text-primary"},Pe={key:1,class:"iconfont icon-checkbox_nol"},Ze={class:"w-[350px] h-[110px] flex items-center mb-[20px]"},Ne={class:"w-[100px] h-[110px] bg-[#EEA1A1] flex flex-col justify-center items-center relative border-box rounded-[8px] coupon-item"},Be={class:"text-[#fff]"},Je=te(()=>e("span",{class:"text-[14px] price-font"},"\xA5",-1)),Xe={class:"text-[26px] font-bold price-font"},Te={key:0,class:"text-[12px] text-[#fff] mt-[4px]"},Ge={key:1,class:"text-[12px] text-[#fff] mt-[4px]"},He={class:"w-[250px] h-[110px] bg-[#fff] pl-[15px] relative flex flex-col justify-center rounded-[8px]"},Qe={class:"text-[18px] text-[#666] mb-[20px] truncate leading-[24px] w-[196px]"},We={class:"text-[14px] text-[#999] leading-[18px]"},Ye={class:"dialog-footer"},$e=J({__name:"select-coupon",props:{orderKey:{type:Object,default:()=>{}}},emits:["confirm"],setup(C,{expose:O,emit:d}){const k=C,x=V(0);let o=V(!1),l=V({});k.orderKey&&!Object.keys(l.value).length&&Ll({body:k.orderKey}).then(({data:g})=>{for(let c in g)l.value[c]={},l.value[c].couponList=[],l.value[c].disabledCouponList=[],g[c].length&&(g[c].forEach(_=>{_.is_normal?l.value[c].couponList.push(_):l.value[c].disabledCouponList.push(_)}),l.value[c].couponList.length&&(l.value[c].coupon=l.value[c].couponList[0]));d("confirm",l.value)}).catch();const j=g=>{let c=g.discount.coupon_id;if(x.value=g.site_id,c){for(let _=0;_{l.value[x.value].coupon?l.value[x.value].coupon=l.value[x.value].coupon.id!=g.id?g:null:l.value[x.value].coupon=g},A=()=>{d("confirm",l.value),o.value=!1};return O({open:j,couponData:l.value}),(g,c)=>{const _=B,D=$;return i(),X(D,{modelValue:a(o),"onUpdate:modelValue":c[1]||(c[1]=p=>re(o)?o.value=p:o=p),title:"\u9009\u62E9\u4F18\u60E0\u52B5",width:"780px",center:"","show-close":!1,"custom-class":"coupon"},{footer:f(()=>[e("div",Ye,[v(_,{onClick:c[0]||(c[0]=p=>re(o)?o.value=!1:o=!1)},{default:f(()=>[I("\u53D6\u6D88")]),_:1}),v(_,{type:"primary",class:"ml-[12px]",onClick:A},{default:f(()=>[I("\u786E\u8BA4")]),_:1})])]),default:f(()=>[a(l)[x.value]?(i(),n("div",Fe,[e("div",ze,[a(l)[x.value].couponList?(i(!0),n(S,{key:0},K(a(l)[x.value].couponList,(p,r)=>(i(),n("div",{class:"w-[350px] h-[110px] flex items-center mb-[20px] cursor-pointer",onClick:b=>U(p)},[e("div",Ee,[e("div",Me,[Ue,e("span",De,s(p.price),1)]),p.min_condition_money>0?(i(),n("div",Ie,"\u6EE1"+s(p.min_condition_money)+"\u53EF\u7528",1)):(i(),n("div",Oe,"\u65E0\u95E8\u69DB\u5238"))]),e("div",Ae,[e("div",Re,s(p.title),1),e("div",qe,"\u6709\u6548\u671F\u81F3"+s(p.expire_time?p.expire_time.slice(0,10):""),1),e("div",Ke,[a(l)[x.value].coupon&&a(l)[x.value].coupon.id==p.id?(i(),n("div",Se)):(i(),n("div",Pe))])])],8,Le))),256)):m("",!0),a(l)[x.value].disabledCouponList?(i(!0),n(S,{key:1},K(a(l)[x.value].disabledCouponList,(p,r)=>(i(),n("div",Ze,[e("div",Ne,[e("div",Be,[Je,e("span",Xe,s(parseInt(p.price)),1)]),p.min_condition_money>0?(i(),n("div",Te,"\u6EE1"+s(p.min_condition_money)+"\u53EF\u7528",1)):(i(),n("div",Ge,"\u65E0\u95E8\u69DB\u5238"))]),e("div",He,[e("div",Qe,s(p.title),1),e("div",We,"\u6709\u6548\u671F\u81F3"+s(p.expire_time?p.expire_time.slice(0,10):""),1)])]))),256)):m("",!0)])])):m("",!0)]),_:1},8,["modelValue"])}}}),et=ee($e,[["__scopeId","data-v-1ff03bc9"]]),tt=C=>(W("data-v-f1c6dbb0"),C=C(),Y(),C),at={class:"flex flex-wrap justify-between"},lt=["onClick"],ot={class:"w-[100px] h-[110px] bg-primary flex flex-col justify-center items-center relative border-box rounded-[8px] coupon-item"},it={class:"text-[#fff]"},rt=tt(()=>e("span",{class:"text-[14px] price-font"},"\xA5",-1)),st={class:"text-[26px] price-font"},nt={key:0,class:"text-[12px] text-[#fff] mt-[4px]"},dt={key:1,class:"text-[12px] text-[#fff] mt-[4px]"},pt={class:"w-[250px] h-[110px] bg-[#fff] pl-[15px] relative flex flex-col justify-center rounded-[8px]"},ct={class:"text-[18px] text-[#333] font-500 mb-[20px] truncate leading-[24px] w-[196px]"},xt={class:"text-[14px] text-[#999] leading-[18px]"},ut={class:"absolute top-[10px] right-[10px]"},vt={key:0,class:"iconfont icon-xuanze1 !text-primary"},mt={key:1,class:"iconfont icon-checkbox_nol"},_t={class:"dialog-footer"},ft=J({__name:"platform-coupon",props:{orderKey:{type:Object,default:()=>{}}},emits:["confirm"],setup(C,{expose:O,emit:d}){const k=C,x=V(!1);let o=V([]);const l=V(null),j=()=>{k.orderKey&&El({body:k.orderKey}).then(({data:c})=>{o.value=c}).catch()},U=c=>{if(x.value=!0,c){for(let _=0;_{l.value?l.value=l.value.id!=c.id?c:null:l.value=c},g=()=>{d("confirm",l.value),x.value=!1};return O({open:U,ordePlatformCouponFn:j,couponList:o}),(c,_)=>{const D=B,p=$;return i(),X(p,{modelValue:x.value,"onUpdate:modelValue":_[1]||(_[1]=r=>x.value=r),title:"\u9009\u62E9\u4F18\u60E0\u52B5",width:"780px",center:"","show-close":!1,"custom-class":"coupon"},{footer:f(()=>[e("div",_t,[v(D,{onClick:_[0]||(_[0]=r=>x.value=!1)},{default:f(()=>[I("\u53D6\u6D88")]),_:1}),v(D,{type:"primary",class:"ml-[12px]",onClick:g},{default:f(()=>[I("\u786E\u8BA4")]),_:1})])]),default:f(()=>[e("div",null,[e("div",at,[a(o)?(i(!0),n(S,{key:0},K(a(o),(r,b)=>(i(),n("div",{class:"w-[350px] h-[110px] flex items-center mb-[20px] cursor-pointer",onClick:L=>A(r)},[e("div",ot,[e("div",it,[rt,e("span",st,s(r.price),1)]),r.min_condition_money>0?(i(),n("div",nt,"\u6EE1"+s(r.min_condition_money)+"\u53EF\u7528",1)):(i(),n("div",dt,"\u65E0\u95E8\u69DB\u5238"))]),e("div",pt,[e("div",ct,s(r.title),1),e("div",xt,"\u6709\u6548\u671F\u81F3"+s(r.expire_time?r.expire_time.slice(0,10):""),1),e("div",ut,[l.value&&l.value.id==r.id?(i(),n("div",vt)):(i(),n("div",mt))])])],8,lt))),256)):m("",!0)])])]),_:1},8,["modelValue"])}}}),yt=ee(ft,[["__scopeId","data-v-f1c6dbb0"]]),z=C=>(W("data-v-f488d739"),C=C(),Y(),C),bt={class:"min-h-[500px]"},ht={key:0,class:"main-container pt-[30px]"},kt={key:0},gt={class:"bg-[#fff] mb-[20px] px-[30px] pt-[30px] pb-[20px]"},wt={class:"text-[16px] text-[#333] mb-[20px]"},Vt={class:"flex flex-wrap h-[106px] justify-between overflow-hidden",id:"address-list"},Ct=z(()=>e("span",{class:"text-[#666]"},"+",-1)),jt=["onClick"],Ft={class:"flex items-center font-500 mb-[10px] text-[14px] text-[#333]"},zt={class:"truncate max-w-[200px]"},Lt={key:0,class:"text-[12px] text-[#fff] bg-[var(--el-color-primary)] text-center px-[4px] py-[2px] rounded-[2px] ml-[6px]"},Et={class:"text-[14px] text-[#666] font-400 truncate leading-[18px] oppoSans-R"},Mt={key:0,class:"iconfont icon-xuanzhong4 !text-[27px] text-[var(--el-color-primary)] absolute bottom-[-2px] right-[-2px]"},Ut={key:0},Dt=z(()=>e("span",{class:"iconfont icon-xiajiantou !text-[12px] ml-[4px]"},null,-1)),It=z(()=>e("span",{class:"iconfont icon-xiangshangjiantou !text-[12px] ml-[4px]"},null,-1)),Ot={class:""},At={class:"bg-[#fff] px-[30px] pt-[30px] pb-[20px] mb-[20px]"},Rt={class:"flex items-center mb-[30px]"},qt=z(()=>e("span",{class:"iconfont icon-Vector-25 text-[#999] mr-[6px]"},null,-1)),Kt={class:"text-[14px] text-[#333]"},St={class:"flex"},Pt={class:"w-[100px] h-[100px]"},Zt=z(()=>e("img",{src:Vl,class:"w-[100px] h-[100px]"},null,-1)),Nt={class:"ml-[20px] flex flex-col justify-center text-[14px]"},Bt={class:"text-[#333] font-500 w-[580px] truncate mb-[14px]"},Jt={key:0,class:"text-[#919191] oppoSans-R"},Xt={class:"flex justify-center items-center"},Tt={class:"w-[160px] text-[14px] text-[#333] oppoSans-R"},Gt={class:"w-[100px] text-[14px] text-[#333] text-right oppoSans-R"},Ht={class:"w-[160px] text-[var(--el-price)] text-right"},Qt=z(()=>e("span",{class:"text-[12px] price-font"},"\xA5",-1)),Wt={class:"font-600 text-[18px] price-font"},Yt=z(()=>e("div",{class:"h-[1px] border-t-[1px] border-dashed border-[#dcdfe6] my-[24px]"},null,-1)),$t={key:0,class:"mb-[30px] flex justify-between items-center"},ea={class:"text-[16px] text-[#666]"},ta={class:"text-[16px] text-[#333] price-font"},aa={class:"mb-[30px] flex justify-between items-center"},la=z(()=>e("div",{class:"text-[16px] text-[#666]"},"\u5E97\u94FA\u4F18\u60E0",-1)),oa=["onClick"],ia={class:"price-font"},ra=z(()=>e("span",{class:"iconfont icon-xiaV6xx !text-[20px]"},null,-1)),sa={key:1,class:"text-[#666]"},na={key:1,class:"mb-[30px] flex items-center"},da={class:"text-[16px] text-[#666]"},pa={class:"ml-[30px] flex-1 flex items-center justify-between"},ca={class:"flex items-center"},xa=["onClick"],ua={key:0,class:"iconfont icon-xuanzhong4 !text-[22px] text-primary absolute bottom-[-3px] right-[-1px]"},va=["onClick"],ma={key:0,class:"iconfont icon-xuanzhong4 !text-[22px] text-primary absolute bottom-[-3px] right-[-1px]"},_a={key:0,class:"ml-auto flex items-center text-primary"},fa={class:"ml-[20px]"},ya={class:"ml-[20px]"},ba=["onClick"],ha={class:"mb-[30px] flex"},ka={class:"text-[16px] text-[#666]"},ga={class:"ml-[30px] flex items-center"},wa={class:"flex items-center justify-end text-[14px]"},Va={class:"ml-[10px]"},Ca={class:"price-font"},ja={key:1,class:"bg-[#fff] px-[30px] py-[30px] mb-[20px]"},Fa={class:"flex items-center justify-between"},za={class:"text-[16px] text-[#666] w-[64px] flex-shrink-0"},La={key:0},Ea={class:"price-font"},Ma=z(()=>e("span",{class:"iconfont icon-xiaV6xx !text-[20px]"},null,-1)),Ua={key:1,class:"text-[26rpx] text-gray-subtitle"},Da=z(()=>e("span",null,"\u8BF7\u9009\u62E9\u5E73\u53F0\u4F18\u60E0\u5238",-1)),Ia=z(()=>e("span",{class:"iconfont icon-xiaV6xx !text-[20px]"},null,-1)),Oa=[Da,Ia],Aa={class:"bg-[#fff] px-[30px] pt-[30px] pb-[20px]"},Ra={class:"bg-[#f7f7f7] p-[20px]"},qa={class:"flex justify-between items-center mb-[15px] text-[14px]"},Ka={class:"text-[#666]"},Sa={class:"text-[#333] price-font"},Pa={key:0,class:"flex justify-between items-center mb-[15px] text-[14px]"},Za={class:"text-[#666]"},Na={class:"text-[#333] price-font"},Ba={key:1,class:"flex justify-between items-center mb-[15px] text-[14px]"},Ja={class:"text-[#666]"},Xa={class:"text-[#333] price-font"},Ta={key:2,class:"flex justify-between items-center mb-[15px] text-[14px]"},Ga={class:"text-[#666]"},Ha={class:"text-[#333] price-font"},Qa={class:"flex justify-between items-center"},Wa={class:"text-[14px] text-[#666]"},Ya={class:"text-[var(--el-price)]"},$a=z(()=>e("span",{class:"text-[14px] price-font"},"\xA5",-1)),el={class:"font-600 text-[22px] price-font"},tl={class:"mt-[30px] flex justify-end items-center"},al=J({__name:"payment",setup(C){const O=fl(),d=V({body:{},order_key:"",delivery:{take_address_id:""},mall_discount:{platform_coupon_id:""}}),k=V(!1),x=V(),o=V(),l=V({});se.get("orderCreateData")&&Object.assign(d.value,se.get("orderCreateData"));const j=V([]),U=async()=>{j.value=await(await jl({})).data};U();let A=V(!1);const g=(t=null)=>{k.value=!0,Ml(d.value).then(E=>{if(l.value=E.data,d.value.order_key=E.data.order_key,Object.values(l.value.order_list).forEach(M=>{d.value.body[M.site_id]!=null&&(d.value.body[M.site_id].order_key=M.order_key,d.value.body[M.site_id].member_remark="",d.value.body[M.site_id].site_id=M.site_id)}),A.value=!0,j.value.length){const M=j.value.filter(Z=>Z.id==l.value.delivery.take_address.id),N=j.value.findIndex(Z=>Z.id==l.value.delivery.take_address.id);M.length&&N!=-1&&(j.value.splice(N,1),j.value.unshift(M[0]))}t&&t(),k.value=!1}).catch(()=>{k.value=!1})};g();const c=Q(()=>{var t;return((t=x.value)==null?void 0:t.couponData)||{}}),_=async()=>{for(let t in c.value)c.value[t].coupon?(d.value.body[t].discount={},d.value.body[t].discount.coupon_id=c.value[t].coupon.id):(d.value.body[t].discount={},d.value.body[t].discount.coupon_id="");d.value.mall_discount.platform_coupon_id=0,await g(t=>{var E;(E=o.value)==null||E.ordePlatformCouponFn()})},D=Q(()=>{var t;return((t=o.value)==null?void 0:t.couponList)||[]}),p=t=>{d.value.mall_discount.platform_coupon_id=t?t.id:0,g()},r=t=>{b(t)},b=t=>{d.value.delivery.take_address_id=t.id,d.value.order_key="";for(let E in d.value.body)d.value.body[E].order_key="";g()},L=V(null),T=()=>{L.value.setFormData(),L.value.dialogAddressVisible=!0},R=V(!0),G=()=>{ne(()=>{R.value=!R.value;const t=document.querySelector("#address-list");t.style.height="auto"})},u=()=>{ne(()=>{R.value=!R.value;const t=document.querySelector("#address-list");t.style.height="106px"})},H=()=>!Object.values(l.value.delivery.take_address).length&&l.value.basic.has_goods_types[0]!="virtual"?(yl.error("\u8BF7\u9009\u62E9\u6536\u8D27\u5730\u5740"),!1):!0,ae=()=>{!H()||k.value||(k.value=!0,Ul(d.value).then(({data:t})=>{l.value.basic.order_money==0?O.push({path:"/order/list"}):(Kl().getList(),O.replace({path:"/pay/pay",query:{trade_type:t.trade_type,trade_id:t.trade_id}}))}).catch(()=>{k.value=!1}))},P=V(null),ll=t=>{P.value.setFormData(t),P.value.dialogInvoiceVisible=!0},ol=(t,E)=>{delete d.value.body[E].invoice},il=t=>{P.value.open(t),P.value.dialogInvoiceVisible=!0},rl=t=>{d.value.body[t.site_id].invoice={},Object.assign(d.value.body[t.site_id].invoice,t.invoice)},sl=t=>{d.value.body[t].invoice||delete d.value.body[t].invoice};return(t,E)=>{const M=pl,N=oe,Z=B,nl=gl;return ie((i(),n("div",bt,[Object.keys(l.value).length?(i(),n("div",ht,[l.value.basic.has_goods_types.includes("real")?(i(),n("div",kt,[e("div",gt,[e("div",wt,s(("t"in t?t.t:a(y))("deliveryAddress")),1),e("div",Vt,[e("div",{class:"w-[560px] h-[90px] leading-[90px] text-[#333] text-[14px] border-[1px] border-solid border-[#ccc] text-center cursor-pointer",onClick:T},[Ct,e("span",null,s(("t"in t?t.t:a(y))("addDeliveryAddress")),1)]),(i(!0),n(S,null,K(j.value,(h,w)=>(i(),n("div",{class:q(["w-[560px] h-[90px] border-[1px] border-solid border-[#ccc] p-[20px] mb-[20px] overflow-hidden relative cursor-pointer",{"!border-[var(--el-color-primary)]":l.value.delivery.take_address.id==h.id}]),onClick:le=>b(h)},[e("div",Ft,[e("span",zt,s(h.name),1),e("span",null,s(h.mobile),1),h.is_default==1?(i(),n("span",Lt,s(("t"in t?t.t:a(y))("default")),1)):m("",!0)]),e("div",Et,s(h.full_address),1),l.value.delivery.take_address.id==h.id?(i(),n("div",Mt)):m("",!0)],10,jt))),256))]),j.value.length?(i(),n("div",Ut,[R.value?(i(),n("div",{key:0,class:"pt-[14px] text-center text-[#666] cursor-pointer text-[14px]",onClick:G},[I(s(("t"in t?t.t:a(y))("allAddress"))+" ",1),Dt])):(i(),n("div",{key:1,class:"pt-[14px] text-center text-[#666] cursor-pointer text-[14px]",onClick:u},[I(s(("t"in t?t.t:a(y))("packUp"))+" ",1),It]))])):m("",!0)])])):m("",!0),e("div",Ot,[(i(!0),n(S,null,K(l.value.order_list,(h,w,le)=>(i(),n("div",{key:le},[e("div",At,[e("div",Rt,[qt,e("span",Kt,s(h.site_info.site_name),1)]),e("div",null,[(i(!0),n(S,null,K(h.goods_data,(F,to,dl)=>(i(),n("div",{key:dl,class:"mb-[30px] flex items-center justify-between"},[e("div",St,[e("div",Pt,[v(M,{class:"w-[100px] h-[100px]",src:("img"in t?t.img:a(bl))(F.sku_image),fit:"cover"},{error:f(()=>[Zt]),_:2},1032,["src"])]),e("div",Nt,[e("div",Bt,s(F.goods.goods_name),1),F.sku_name?(i(),n("div",Jt,"\u89C4\u683C\uFF1A"+s(F.sku_name),1)):m("",!0)])]),e("div",Xt,[e("div",Tt,"\xA5"+s(F.price),1),e("div",Gt,"x"+s(F.num),1),e("div",Ht,[Qt,e("span",Wt,s(parseFloat(Number(F.price)*Number(F.num)).toFixed(2)),1)])])]))),128)),Yt]),l.value.basic.has_goods_types[0]!="virtual"?(i(),n("div",$t,[e("div",ea,s(("t"in t?t.t:a(y))("deliveryMoney")),1),e("div",ta,"\uFFE5"+s(parseFloat(h.basic.delivery_money).toFixed(2)),1)])):m("",!0),e("div",aa,[la,e("div",null,[a(c)[w]&&a(c)[w].couponList.length?(i(),n("div",{key:0,class:"text-[16px] text-[333] cursor-pointer",onClick:F=>x.value.open(d.value.body[w])},[e("span",ia,"-\uFFE5"+s(parseFloat(h.basic.discount_money).toFixed(2)),1),ra],8,oa)):(i(),n("div",sa,"\u6682\u65E0\u53EF\u4F7F\u7528\u4F18\u60E0"))])]),h.config&&h.config.invoice&&h.config.invoice.is_invoice==1?(i(),n("div",na,[e("div",da,s(("t"in t?t.t:a(y))("invoiceInfo")),1),e("div",pa,[e("div",ca,[e("div",{class:q(["mr-[15px] cursor-pointer relative border-[1px] border-solid border-[#d3d3d3] flex box-border px-[50px] leading-[32px] text-[14px]",{"!border-primary text-primary":!d.value.body[w].invoice}]),onClick:F=>ol(h,w)},[e("div",null,s(("t"in t?t.t:a(y))("noInvoice")),1),d.value.body[w].invoice?m("",!0):(i(),n("div",ua))],10,xa),e("div",{class:q(["mr-[15px] cursor-pointer relative border-[1px] border-solid border-[#d3d3d3] flex box-border px-[50px] leading-[32px] text-[14px]",{"!border-primary text-primary":d.value.body[w].invoice&&d.value.body[w].invoice.header_name}]),onClick:F=>ll(h)},[e("div",null,s(("t"in t?t.t:a(y))("electronicInvoice")),1),d.value.body[w].invoice&&d.value.body[w].invoice.header_name?(i(),n("div",ma)):m("",!0)],10,va)]),d.value.body[w].invoice?(i(),n("div",_a,[e("div",fa,s(d.value.body[w].invoice?d.value.body[w].invoice.header_name:""),1),e("div",ya,s(d.value.body[w].invoice&&d.value.body[w].invoice.header_type==1?("t"in t?t.t:a(y))("person"):("t"in t?t.t:a(y))("company")),1),e("div",{class:"ml-[20px] cursor-pointer",onClick:F=>il(d.value.body[w].invoice)},s(("t"in t?t.t:a(y))("update")),9,ba)])):m("",!0)])])):m("",!0),e("div",ha,[e("div",ka,s(("t"in t?t.t:a(y))("remark")),1),e("div",ga,[v(N,{modelValue:d.value.body[w].member_remark,"onUpdate:modelValue":F=>d.value.body[w].member_remark=F,style:{width:"1040px",height:"120px"},type:"textarea",placeholder:("t"in t?t.t:a(y))("remarkPlaceholder"),"input-style":{height:"120px"},resize:"none",maxlength:"50"},null,8,["modelValue","onUpdate:modelValue","placeholder"])])]),e("div",wa,[e("span",null,"\u5171"+s(h.basic.total_num)+s(("t"in t?t.t:a(y))("unit")),1),e("div",Va,[e("span",null,s(("t"in t?t.t:a(y))("subTotal")),1),e("span",Ca,"\uFFE5"+s(parseFloat(h.basic.order_money+h.basic.mall_discount_money).toFixed(2)),1)])])])]))),128))]),a(D)&&a(D).length?(i(),n("div",ja,[e("div",Fa,[e("div",za,s(("t"in t?t.t:a(y))("platformCoupon")),1),e("div",{class:"text-[16px] text-[333] cursor-pointer",onClick:E[0]||(E[0]=h=>o.value.open(d.value.mall_discount.platform_coupon_id))},[l.value.discount&&l.value.discount.platform_coupon?(i(),n("div",La,[e("span",Ea," -\uFFE5"+s(l.value.discount.platform_coupon.money),1),Ma])):(i(),n("div",Ua,Oa))])])])):m("",!0),e("div",Aa,[e("div",Ra,[e("div",qa,[e("div",Ka,s(("t"in t?t.t:a(y))("goodsMoney")),1),e("div",Sa,"\xA5"+s(parseFloat(l.value.basic.goods_money).toFixed(2)),1)]),l.value.basic.shop_discount_money?(i(),n("div",Pa,[e("div",Za,s(("t"in t?t.t:a(y))("discountMoney")),1),e("div",Na,"-\xA5"+s(parseFloat(l.value.basic.shop_discount_money).toFixed(2)),1)])):m("",!0),l.value.basic.mall_discount_money?(i(),n("div",Ba,[e("div",Ja,s(("t"in t?t.t:a(y))("mallDiscountMoney")),1),e("div",Xa,"-\xA5"+s(parseFloat(l.value.basic.mall_discount_money).toFixed(2)),1)])):m("",!0),l.value.basic.delivery_money?(i(),n("div",Ta,[e("div",Ga,s(("t"in t?t.t:a(y))("deliveryMoney")),1),e("div",Ha,"+\xA5"+s(parseFloat(l.value.basic.delivery_money).toFixed(2)),1)])):m("",!0),e("div",Qa,[e("div",Wa,s(("t"in t?t.t:a(y))("orderMoney")),1),e("div",Ya,[$a,e("span",el,s(parseFloat(l.value.basic.order_money).toFixed(2)),1)])])]),e("div",tl,[v(Z,{class:"!w-[120px] !h-[44px] !text-[16px] !bg-primary rounded-[4px] !text-white text-center leading-[44px] !border-none",loading:k.value,onClick:ae},{default:f(()=>[I(s(("t"in t?t.t:a(y))("submitOrder")),1)]),_:1},8,["loading"])])])])):m("",!0),v(Fl,{ref_key:"addAddressRef",ref:L,onComplete:U,onSelect:r},null,512),v(je,{ref_key:"invoiceRef",ref:P,onConfirm:rl,onCancel:sl},null,512),a(A)?(i(),X(et,{key:1,"order-key":d.value.body,ref_key:"couponRef",ref:x,onConfirm:_},null,8,["order-key"])):m("",!0),v(yt,{"order-key":d.value.body,ref_key:"platformCouponRef",ref:o,onConfirm:p},null,8,["order-key"])])),[[nl,k.value]])}}});de=ee(al,[["__scopeId","data-v-f488d739"]])});export{eo as __tla,de as default};