import{m as f,r as T}from"./index.aa5e2480.js";import{d as _,b as e,a3 as O,a4 as A,M as j,a5 as P,Z as D,p as l,m as R,B as N,j as B,F,T as W}from"./vendor.27e15f5e.js";/* empty css                *//* empty css               *//* empty css              */import{f as q}from"./cart.9f734fbb.js";/* empty css               *//* empty css               *//* empty css                */import{o as z}from"./shop-mall.d106c61f.js";const E="_item_2zuar_4";var I={item:E},L=_({name:"shop-item",props:{item:{type:Object,default:{productPic:"",productName:"",productAttr:"",productPrice:0,productQuantity:0}}},setup({item:d}){return()=>e(O,{class:I.item,thumb:d.productPic,title:d.productName,desc:q(d.productAttr),price:f(d.productPrice),num:d.productQuantity},null)}});const M="_shopOrderDetail_ahtdt_1",Q="_box_ahtdt_15",V="_addressDetail_ahtdt_31",$="_copyWrap_ahtdt_34";var s={shopOrderDetail:M,box:Q,addressDetail:V,copyWrap:$},te=_({name:"shop-order-detail",setup(){const d=A();let p=j([]),a=j({});const C=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(()=>{C()});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"),W("\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(F,null,[p.value.length?e("div",{class:s.shopOrderDetail},[e("div",{class:s.box},[p.value.map((r,v)=>e("div",null,[e(L,{item:r},null),v===p.value.length-1?null:e(D,null,null)]))]),e("div",{class:s.box,style:{padding:0}},[e(l,{border:!1,title:"\u5546\u54C1\u4EF7\u683C\uFF1A",value:"\xA5 "+f((i=a.value)==null?void 0:i.totalAmount)},null),e(l,{border:!1,title:"\u4F18\u60E0\u4EF7\u683C\uFF1A",value:"-\xA5 "+f((o=a.value)==null?void 0:o.couponAmount)},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(D,{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,y,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:(y=a.value)==null?void 0:y.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:k=>{var x;S((x=a.value)==null?void 0:x.deliverySn)}},{default:()=>[B("\u70B9\u51FB\u590D\u5236")]})])}})]}})])]):null])}}});export{te as default};
