2026-07-01 16:11:39 +08:00
|
|
|
import{_ as W,V as X,o as p,c as b,a as m,e,f as t,k as g,j as n,i as P,h as i,t as r,m as _,L as Y,a1 as Z,Q as ee,g as h,aa as O,d as M,F as C,ab as te,ad as le,r as ie}from"./index-C1KISTGN.js";const ae={class:"order-management-purchaser"},oe={class:"page-header"},se={class:"header-actions"},re={class:"filter-bar"},ne={class:"total-price"},de={class:"detail-content"},ce={class:"total-price"},ue={class:"waybill-number"},me={class:"logistics-track-section"},pe={class:"section-title"},fe={class:"logistics-timeline"},_e={__name:"List",setup(ve){const q=[{id:1,orderNumber:"ORD-20240519001",supplierName:"济南德达电子科技有限公司",materialName:"办公电脑",specification:"i7-12700/16G/512G SSD",quantity:5,unitPrice:5800,totalPrice:29e3,orderTime:"2024-05-19 09:30:00",logisticsInfo:"",status:"pending_confirmation",deliveryMethod:"",deliveryPerson:"",deliveryContact:"",logisticsCompany:"",waybillNumber:"",deliveryTime:"",logisticsTrack:""},{id:2,orderNumber:"ORD-20240519002",supplierName:"山东办公用品有限公司",materialName:"A4打印纸",specification:"70g 500张/包",quantity:100,unitPrice:25,totalPrice:2500,orderTime:"2024-05-19 10:15:00",logisticsInfo:"",status:"pending_confirmation",deliveryMethod:"",deliveryPerson:"",deliveryContact:"",logisticsCompany:"",waybillNumber:"",deliveryTime:"",logisticsTrack:""},{id:3,orderNumber:"ORD-20240518001",supplierName:"青岛家具制造厂",materialName:"办公桌椅套装",specification:"1.6m人体工学",quantity:10,unitPrice:1200,totalPrice:12e3,orderTime:"2024-05-18 14:20:00",logisticsInfo:"",status:"confirmed",deliveryMethod:"",deliveryPerson:"",deliveryContact:"",logisticsCompany:"",waybillNumber:"",deliveryTime:"",logisticsTrack:""},{id:4,orderNumber:"ORD-20240517001",supplierName:"北京科技有限公司",materialName:"投影仪",specification:"1080P/3500流明",quantity:2,unitPrice:4500,totalPrice:9e3,orderTime:"2024-05-17 11:00:00",logisticsInfo:"顺丰速运 - SF1234567890",status:"filled",deliveryMethod:"logistics",deliveryPerson:"",deliveryContact:"",logisticsCompany:"顺丰速运",waybillNumber:"SF1234567890",deliveryTime:"2024-05-17 16:00:00",logisticsTrack:`2024-05-17 16:00 已发出
|
2026-07-01 16:11:39 +08:00
|
|
|
`).filter(c=>c.trim()).map(c=>{const f=c.match(/^(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2})\s+(.+)$/);return f?{time:f[1],content:f[2]}:{time:"",content:c}}):[]);X(()=>{z()});const z=()=>{v.value=q},x=o=>o||"-",B=o=>({pending_confirmation:"待确认",confirmed:"已确认",filled:"已发货"})[o]||"未知状态",G=o=>({pending_confirmation:"warning",confirmed:"success",filled:"info"})[o]||"info",U=o=>({logistics:"物流配送",self_delivery:"自行配送"})[o]||"-",$=o=>{a.value={...o},N.value=!0};return(o,l)=>{const c=n("el-tag"),f=n("el-option"),j=n("el-select"),y=n("el-icon"),A=n("el-input"),u=n("el-table-column"),V=n("el-button"),E=n("el-table"),D=n("el-divider"),d=n("el-descriptions-item"),L=n("el-descriptions"),K=n("el-timeline-item"),Q=n("el-timeline"),H=n("el-empty"),J=n("el-dialog");return p(),b("div",ae,[m("div",oe,[l[4]||(l[4]=m("h2",null,"订单管理",-1)),m("div",se,[e(c,{type:"info",size:"large"},{default:t(()=>[i("总订单: "+r(v.value.length),1)]),_:1}),e(c,{type:"success",size:"large"},{default:t(()=>[i("已确认: "+r(I.value),1)]),_:1}),e(c,{type:"primary",size:"large"},{default:t(()=>[i("已发货: "+r(S.value),1)]),_:1})])]),m("div",re,[e(j,{modelValue:w.value,"onUpdate:modelValue":l[0]||(l[0]=s=>w.value=s),placeholder:"筛选状态",clearable:"",style:{width:"150px"}},{default:t(()=>[e(f,{label:"待确认",value:"pending_confirmation"}),e(f,{label:"已确认",value:"confirmed"}),e(f,{label:"已发货",value:"filled"})]),_:1},8,["modelValue"]),e(A,{modelValue:T.value,"onUpdate:modelValue":l[1]||(l[1]=s=>T.value=s),placeholder:"搜索订单编号或供应商",clearable:"",style:{width:"250px"}},{prefix:t(()=>[e(y,null,{default:t(()=>[e(_(Y))]),_:1})]),_:1},8,["modelValue"])]),e(E,{data:F.value,border:"",stripe:"",style:{width:"100%"},class:"order-table"},{default:t(()=>[e(u,{type:"index",label:"序号",width:"70",align:"center"}),e(u,{prop:"orderNumber",label:"订单编号","min-width":"140","show-overflow-tooltip":""}),e(u,{prop:"supplierName",label:"供应商名单","min-width":"150","show-overflow-tooltip":""}),e(u,{prop:"specification",label:"规格型号","min-width":"120","show-overflow-tooltip":""}),e(u,{prop:"quantity",label:"数量",width:"90",align:"center"}),e(u,{prop:"unitPrice",label:"单价",width:"100",align:"right"},{default:t(({row:s})=>[i(" ¥"+r(s.unitPrice.toFixed(2)),1)]),_:1}),e(u,{prop:"totalPrice",label:"总价",width:"110",align:"right"},{default:t(({row:s})=>[m("span",ne,"¥"+r(s.totalPrice.toFixed(2)),1)]),_:1}),e(u,{prop:"orderTime",label:"下单时间",width:"170",align:"center"},{default:t(({row:s})=>[i(r(x(s.orderTime)),1)]),_:1}),e(u,{prop:"logisticsInfo",label:"物流信息","min-width":"140","show-overflow-tooltip":""}),e(u,{prop:"status",label:"状态",width:"100",align:"center"},{default:t(({row:s})=>[e(c,{type:G(s.status),effect:"dark"},{default:t(()=>[i(r(B(s.status)),1)]),_:2},1032,["type"])]),_:1}),e(u,{label:"操作",width:"100",align:"center",fixed:"right"},{default:t(({row:s})=>[e(V,{type:"primary",size:"small",onClick:k=>$(s),disabled:s.status!=="confirmed"&&s.status!=="filled",icon:_(Z)},{default:t(()=>[...l[5]||(l[5]=[i(" 详情 ",-1)])]),_:1},8,["onClick","disabled","icon"])]),_:1})]),_:1},8,["data"]),e(J,{modelValue:N.value,"onUpdate:modelValue":l[3]||(l[3]=s=>N.value=s),title:"订单详情",width:"700px","close-on-click-modal":!1},{footer:t(()=>[e(V,{type:"primary",onClick:l[2]||(l[2]=s=>N.value=!1),size:"large"},{default:t(()=>[...l[9]||(l[9]=[i("关闭",-1)])]),_:1})]),default:t(()=>[m("div",de,[e(D,{"content-position":"left"},{default:t(()=>[e(y,{class:"divider-icon"},{default:t(()=>[e(_(ee))]),_:1}),l[6]||(l[6]=i(" 订单信息 ",-1))]),_:1}),e(L,{column:2,border:""},{default:t(()=>[e(d,{label:"订单编号"},{default:t(()=>[i(r(a.value.orderNumber),1)]),_:1}),e(d,{label:"供应商"},{default:t(()=>[i(r(a.value.supplierName),1)]),_:1}),e(d,{label:"物资名称",span:2},{default:t(()=>[i(r(a.value.materialName),1)]),_:1}),e(d,{label:"规格型号"},{default:t(()=>[i(r(a.value.specification),1)]),_:1}),e(d,{label:"数量"},{default:t(()=>[i(r(a.value.quantit
|