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