import{m as c,r as R}from"./index.f45ba589.js";import{d as S,b as e,a3 as N,a4 as B,M as A,a5 as F,Z as T,p as a,m as W,B as q,j as z,F as E,T as I}from"./vendor.2bcdc9cf.js";/* empty css *//* empty css *//* empty css */import{f as L}from"./cart.2a3b730f.js";/* empty css *//* empty css *//* empty css */import{o as M}from"./shop-mall.789d0e66.js";const Q="_item_2zuar_4";var V={item:Q},$=S({name:"shop-item",props:{item:{type:Object,default:{productPic:"",productName:"",productAttr:"",productPrice:0,productQuantity:0}}},setup({item:s}){return()=>e(N,{class:V.item,thumb:s.productPic,title:s.productName,desc:L(s.productAttr),price:c(s.productPrice),num:s.productQuantity},null)}});const k="_shopOrderDetail_ahtdt_1",w="_box_ahtdt_15",G="_addressDetail_ahtdt_31",Z="_copyWrap_ahtdt_34";var o={shopOrderDetail:k,box:w,addressDetail:G,copyWrap:Z},oe=S({name:"shop-order-detail",setup(){const s=B();let m=A([]),l=A({});const O=async()=>{const u=s.query.id;if(!!u)try{let{code:r,data:t}=await R.get(`/api-mall-portal/order/detail/${u}`);r===200&&(m.value=t.orderItemList,delete t.orderItemList,l.value=t,l.value.address_data=[t.receiverProvince,t.receiverCity,t.receiverRegion,t.receiverDetailAddress].join(""))}catch{}};F(()=>{O()});const P=u=>{const r=u.toString();let t=document.querySelector("#copy-input");t||(t=document.createElement("input"),t.id="copy-input",t.readOnly=!0,t.style.position="absolute",t.style.left="-1000px",t.style.zIndex="-1000",document.body.appendChild(t)),t.value=r,v(t,0,r.length),console.log(document.execCommand("copy"),"execCommand"),document.execCommand("copy")&&(document.execCommand("copy"),I("\u590D\u5236\u6210\u529F")),t.blur();function v(i,n,p){if(i.createTextRange){const d=i.createTextRange();d.collapse(!0),d.moveStart("character",n),d.moveEnd("character",p-n),d.select()}else i.setSelectionRange(n,p),i.focus()}};return()=>{var u,r,t,v,i,n,p,d,b,h,g;return e(E,null,[m.value.length?e("div",{class:o.shopOrderDetail},[e("div",{class:o.box},[m.value.map((f,y)=>e("div",null,[e($,{item:f},null),y===m.value.length-1?null:e(T,null,null)]))]),e("div",{class:o.box,style:{padding:0}},[e(a,{border:!1,title:"\u5546\u54C1\u4EF7\u683C\uFF1A",value:"\xA5 "+c((u=l.value)==null?void 0:u.totalAmount)},null),e(a,{border:!1,title:"\u8BA2\u5355\u91D1\u989D\uFF1A",value:"\xA5 "+c(((r=l.value)==null?void 0:r.payAmount)+((t=l.value)==null?void 0:t.integrationAmount))},null),e(a,{border:!1,title:"\u4F18\u60E0\u4EF7\u683C\uFF1A",value:"-\xA5 "+c((v=l.value)==null?void 0:v.couponAmount)},null),e(a,{border:!1,title:"\u4F59\u989D\u652F\u4ED8\uFF1A",value:c((i=l.value)==null?void 0:i.integrationAmount)},null),e(a,{border:!1,title:"\u73B0\u91D1\u652F\u4ED8\uFF1A",value:c((n=l.value)==null?void 0:n.payAmount)},null),e(a,{border:!1,title:"\u8BA2\u5355\u72B6\u6001\uFF1A",value:M[(p=l.value)==null?void 0:p.status]},null),e(a,{border:!1,title:"\u6536\u8D27\u72B6\u6001\uFF1A",value:((d=l.value)==null?void 0:d.confirmStatus)?"\u5DF2\u786E\u8BA4\u6536\u8D27":"\u672A\u786E\u8BA4\u6536\u8D27"},null),e(T,{style:{margin:0}},null),e(a,{border:!1,title:"\u8BA2\u5355\u53F7\uFF1A",value:(b=l.value)==null?void 0:b.orderSn},null),e(a,{border:!1,title:"\u521B\u5EFA\u65F6\u95F4\uFF1A",value:(h=l.value)==null?void 0:h.createTime},null),e(a,{border:!1,title:"\u4ED8\u6B3E\u65F6\u95F4\uFF1A",value:(g=l.value)==null?void 0:g.paymentTime},null)]),e("div",{class:o.box,style:{padding:0}},[e(W,{title:"\u6536\u8D27\u4FE1\u606F",border:!1},{default:()=>{var f,y,x,_;return[e(a,{border:!1,title:"\u59D3\u540D\uFF1A",value:(f=l.value)==null?void 0:f.receiverName},null),e(a,{border:!1,title:"\u624B\u673A\u53F7\uFF1A",value:(y=l.value)==null?void 0:y.receiverPhone},null),e(a,{class:o.addressDetail,border:!1,title:"\u5730\u5740\uFF1A",value:(x=l.value)==null?void 0:x.address_data},null),e(a,{class:o.addressDetail,border:!1,title:"\u7269\u6D41\u516C\u53F8(\u914D\u9001\u65B9\u5F0F):",value:(_=l.value)==null?void 0:_.deliveryCompany},null),e(a,{class:o.addressDetail,border:!1,title:"\u8FD0\u5355\u7F16\u53F7\uFF1A"},{value:()=>{var j,D;return e("div",{class:o.copyWrap},[e("span",{style:{marginRight:"8px"}},[(j=l.value)==null?void 0:j.deliverySn]),((D=l.value)==null?void 0:D.deliverySn)&&e(q,{size:"mini",onClick:H=>{var C;P((C=l.value)==null?void 0:C.deliverySn)}},{default:()=>[z("\u70B9\u51FB\u590D\u5236")]})])}})]}})])]):null])}}});export{oe as default};