import{_ as d}from"./index-C-XHZLOy.js";import{d as p,r as s,c,o as u,aq as _,Z as t,O as g,eB as v,eC as l,ae as h}from"./index-9PRMimni.js";const f=p({__name:"NewOrder",setup(k){function r(a){return parseFloat(a).toFixed(2)}const i={success:"已付款",error:"已取消",warning:"未付款",info:"已付款"},n=s([{title:"序号",key:"serial",render:(a,e)=>`${e+1}`},{title:"下单用户",key:"userHead",render(a){return t(g,{round:!0,src:a.userHead,size:48})}},{title:"商品名称",key:"product_name"},{title:"商品库存",key:"stock",render(a){return t(v,{status:a.status,percentage:a.stock})}},{title:"订单金额",key:"order_price",render(a){return t("span",{class:"font-bold"},{default:()=>a.order_price!=null?`￥${r(a.order_price)}`:""})}},{title:"商品图片",key:"order_images",render(a){return t(d,{imgList:a.order_images,imageProps:{width:48}})}},{title:"付款状态",key:"status",render(a){return t(l,{dot:!0,type:a.status},{default:()=>i[a.status]})}},{title:"客户标签",key:"tags",render(a){return a.tags.map(e=>t(h,{type:a.status,class:"mr-1"},{default:()=>e}))}},{title:"购买日期",key:"buy_date"}]),m=s([{id:1,userHead:"https://img.naiveadmin.com/assets/avatar/avatar-6.jpg",product_name:"Naive Admin",stock:58,order_price:298,order_images:["https://img.naiveadmin.com/assets/avatar/avatar-1.jpg","https://img.naiveadmin.com/assets/avatar/avatar-2.jpg"],status:"info",tags:["老客户","新客户"],buy_date:"2022-09-19"},{id:2,userHead:"https://img.naiveadmin.com/assets/avatar/avatar-4.jpg",product_name:"Naive Admin",stock:75,order_price:298,order_images:["https://img.naiveadmin.com/assets/avatar/avatar-3.jpg","https://img.naiveadmin.com/assets/avatar/avatar-4.jpg"],status:"success",tags:["老客户","新客户"],buy_date:"2022-09-19"},{id:3,userHead:"https://img.naiveadmin.com/assets/avatar/avatar-1.jpg",product_name:"Naive Admin",stock:25,order_price:298,order_images:["https://img.naiveadmin.com/assets/avatar/avatar-5.jpg","https://img.naiveadmin.com/assets/avatar/avatar-6.jpg"],status:"warning",tags:["老客户","新客户"],buy_date:"2022-09-19"},{id:4,userHead:"https://img.naiveadmin.com/assets/avatar/avatar-2.jpg",product_name:"Naive Admin",stock:30,order_price:298,order_images:["https://img.naiveadmin.com/assets/avatar/avatar-4.jpg","https://img.naiveadmin.com/assets/avatar/avatar-3.jpg"],status:"error",tags:["老客户","新客户"],buy_date:"2022-09-19"},{id:5,userHead:"https://img.naiveadmin.com/assets/avatar/avatar-3.jpg",product_name:"Naive Admin",stock:38,order_price:298,order_images:["https://img.naiveadmin.com/assets/avatar/avatar-2.jpg","https://img.naiveadmin.com/assets/avatar/avatar-1.jpg"],status:"error",tags:["老客户","新客户"],buy_date:"2022-09-19"}]);return(a,e)=>{const o=_;return u(),c(o,{columns:n.value,data:m.value,pagination:!1,bordered:!1,class:"mt-4 mb-1 pb-1.5"},null,8,["columns","data"])}}});export{f as _};
