import"./base-c0bfa578.js";import{E as q}from"./el-card-ac2c4335.js";import{a as D,E as M,b as R}from"./el-select-e3039813.js";import{E as H}from"./el-input-a36ad0fc.js";import{E as O,a as P}from"./el-table-column-b02baf7e.js";import{E as j}from"./el-button-d7631293.js";import{E as A,a as F}from"./el-breadcrumb-item-da94d782.js";import{g as v}from"./order-75f40cb9.js";import{u as J,b as K}from"./vue-router-0f39ec71.js";import{_ as Q}from"./_plugin-vue_export-helper-c27b6911.js";import{m as i,a7 as G,Q as w,v as E,x as r,y as t,w as s,o as f,z as p,J as W,K as X,a as Y,I as Z,B as ee,C as ae}from"./normalize-3ee1393a.js";import"./config-provider-fcaf9ca1.js";import"./aria-e9762921.js";import"./strings-c7635a11.js";import"./validator-d447ed53.js";import"./request-95a85134.js";import"./axios-4a70c6fc.js";const x=m=>(ee("data-v-ab49f46b"),m=m(),ae(),m),te={class:"main"},le={class:"breadcrumb-section"},oe=x(()=>r("a",{href:"/"},"訂單列表",-1)),se=x(()=>r("hr",null,null,-1)),ne={class:"search-section"},re=["innerHTML"],ue={class:"pagination-block"},de={__name:"index",setup(m){const z=J(),g=K(),V=[{label:"全部",value:""},{label:"未確認",value:"0"},{label:"已確認",value:"1"},{label:"已取消",value:"2"},{label:"無效",value:"3"},{value:"4",label:"退貨"},{value:"7",label:"完成"}],c=i([]),_=i(0),u=i(1),d=i(10),o=i({user_id:"",order_sn:"",consignee:"",status:"1"});g.query.user_id&&(o.value.user_id=g.query.user_id),G(()=>{k()});const k=async()=>{let l=await v({page:u.value,size:d.value,search:o.value});l.code===200&&(c.value=l.data.data,_.value=l.data.total)};w(()=>u.value,async l=>{let a=await v({page:l,size:d.value,search:o.value});a.code===200&&(c.value=a.data.data,_.value=a.data.total)}),w(()=>d.value,async l=>{let a=await v({page:u.value,size:l,search:o.value});a.code===200&&(c.value=a.data.data,_.value=a.data.total)}),i("");const C=(l,a)=>{z.push({path:"/info",query:{order_id:a.order_id}})},B=async()=>{let l=await v({page:u.value,size:d.value,search:o.value});l.code===200&&(c.value=l.data.data,_.value=l.data.total)};return(l,a)=>{const h=F,I=A,y=H,S=R,L=D,b=j,n=O,T=P,U=M,N=q;return f(),E("div",te,[r("div",le,[t(I,{separator:"/"},{default:s(()=>[t(h,{to:{path:"/"}},{default:s(()=>[p("CRM系統")]),_:1}),t(h,null,{default:s(()=>[oe]),_:1})]),_:1})]),se,t(N,null,{default:s(()=>[r("div",ne,[p(" 訂單號："),t(y,{modelValue:o.value.order_sn,"onUpdate:modelValue":a[0]||(a[0]=e=>o.value.order_sn=e),placeholder:"",style:{width:"200px"}},null,8,["modelValue"]),p(" 收貨人："),t(y,{modelValue:o.value.consignee,"onUpdate:modelValue":a[1]||(a[1]=e=>o.value.consignee=e),placeholder:"",style:{width:"200px"}},null,8,["modelValue"]),t(L,{modelValue:o.value.status,"onUpdate:modelValue":a[2]||(a[2]=e=>o.value.status=e),class:"m-2",placeholder:"選擇狀態"},{default:s(()=>[(f(),E(W,null,X(V,e=>t(S,{label:e.label,key:e.value,value:e.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"]),t(b,{type:"primary",onClick:B},{default:s(()=>[p("查詢")]),_:1})]),r("div",null,[t(T,{data:c.value,style:{width:"100%"},border:"",stripe:""},{default:s(()=>[t(n,{type:"index"}),t(n,{prop:"order_sn",label:"訂單號"}),t(n,{prop:"add_time",label:"下單時間"}),t(n,{prop:"consignee",label:"收貨人"}),t(n,{prop:"order_amount",label:"訂單金額",width:"100"}),t(n,{prop:"pay_name",label:"金流方式"}),t(n,{label:"訂單狀態",width:"200"},{default:s(e=>[r("div",{innerHTML:e.row.status},null,8,re)]),_:1}),t(n,{fixed:"right",label:"操作",width:"150"},{default:s(e=>[t(b,{size:"small",onClick:$=>C(e.$index,e.row)},{default:s(()=>[p("查看")]),_:2},1032,["onClick"]),e.row.order_status===3?(f(),Y(b,{key:0,size:"small",type:"danger",onClick:$=>l.handleDelete(e.$index,e.row)},{default:s(()=>[p("刪除")]),_:2},1032,["onClick"])):Z("",!0)]),_:1})]),_:1},8,["data"]),r("div",ue,[t(U,{"current-page":u.value,"onUpdate:currentPage":a[3]||(a[3]=e=>u.value=e),"page-size":d.value,"onUpdate:pageSize":a[4]||(a[4]=e=>d.value=e),"page-sizes":[10,20,50,100],layout:"->,total, sizes, prev, pager, next, jumper",total:_.value},null,8,["current-page","page-size","total"])])])]),_:1})])}}},Ce=Q(de,[["__scopeId","data-v-ab49f46b"]]);export{Ce as default};
