var J=Object.defineProperty;var B=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;var F=(r,n,e)=>n in r?J(r,n,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[n]=e,R=(r,n)=>{for(var e in n||(n={}))K.call(n,e)&&F(r,e,n[e]);if(B)for(var e of B(n))M.call(n,e)&&F(r,e,n[e]);return r};var V=(r,n,e)=>new Promise((w,b)=>{var v=o=>{try{f(e.next(o))}catch(c){b(c)}},i=o=>{try{f(e.throw(o))}catch(c){b(c)}},f=o=>o.done?w(o.value):Promise.resolve(o.value).then(v,i);f((e=e.apply(r,n)).next())});import{u as Q,f as Y,g as Z}from"./index-2a45336b.js";import{a as tt,b as s,o as m,k as I,e as a,w as t,u as l,aW as j,aX as O,E as p,F as L,D as et,c as y,G as D,R as at,i as x}from"./ant-design-vue-710243d9.js";import{u as ot}from"./usePagination-7442a465.js";import{r as nt}from"./useEnum-4e87ed86.js";import"./tinymce-3184e0f1.js";import"./echarts-ca5d9323.js";import"./cropper-47c8e461.js";import"./lodash-es-7cb071db.js";import"./qrcode-bec2257a.js";import"./jschardet-bd496279.js";const gt=Object.assign({name:"order"},{__name:"index",setup(r){Q();const n=[{title:"客户姓名",dataIndex:"customerName",align:"center"},{title:"权益",dataIndex:"productName",align:"center"},{title:"状态",dataIndex:"status",key:"introduce",width:120,align:"center"}],{listData:e,loading:w,showLoading:b,hideLoading:v,paginationState:i,resetPagination:f,searchFormData:o}=ot();tt(),c();function c(){return V(this,null,function*(){try{b();const{pageSize:_,current:u}=i,{success:C,data:k,total:g}=yield Y.productOrders.getProjectList(R({pageSize:_,current:u},o.value)).catch(()=>{throw new Error});v(),Z("http.code.success")===C&&(e.value=k,i.total=g)}catch(_){v()}})}function T({current:_,pageSize:u}){i.current=_,i.pageSize=u,c()}function U(){f(),c()}function $(){o.value={},f(),c()}return(_,u)=>{const C=s("a-input"),k=s("a-form-item"),g=s("a-col"),E=s("a-select-option"),A=s("a-select"),S=s("a-button"),G=s("a-space"),z=s("a-row"),W=s("a-form"),X=s("x-search-bar"),N=s("a-tag"),q=s("a-table"),H=s("a-card");return m(),I(L,null,[a(X,{class:"mb-8-2"},{default:t(({gutter:P,colSpan:d})=>[a(W,{model:l(o),layout:"inline"},{default:t(()=>[a(z,{gutter:P},{default:t(()=>[a(g,j(O(d)),{default:t(()=>[a(k,{label:"客户姓名",name:"customerName"},{default:t(()=>[a(C,{placeholder:"请输入姓名",value:l(o).customerName,"onUpdate:value":u[0]||(u[0]=h=>l(o).customerName=h)},null,8,["value"])]),_:1})]),_:2},1040),a(g,j(O(d)),{default:t(()=>[a(k,{label:"状态",name:"status"},{default:t(()=>[a(A,{value:l(o).status,"onUpdate:value":u[1]||(u[1]=h=>l(o).status=h),allowClear:""},{default:t(()=>[a(E,{value:""},{default:t(()=>[p("全部")]),_:1}),(m(!0),I(L,null,et(l(nt).getAll(),h=>(m(),y(E,{value:h.value},{default:t(()=>[p(D(h.name),1)]),_:2},1032,["value"]))),256))]),_:1},8,["value"])]),_:1})]),_:2},1040),a(g,at({class:"align-right"},d),{default:t(()=>[a(G,null,{default:t(()=>[a(S,{onClick:$},{default:t(()=>[p(D(_.$t("button.reset")),1)]),_:1}),a(S,{ghost:"",type:"primary",onClick:U},{default:t(()=>[p(D(_.$t("button.search")),1)]),_:1})]),_:1})]),_:2},1040)]),_:2},1032,["gutter"])]),_:2},1032,["model"])]),_:1}),a(z,{gutter:8,wrap:!1},{default:t(()=>[a(g,{flex:"auto"},{default:t(()=>[a(H,{type:"flex"},{default:t(()=>[a(q,{columns:n,"data-source":l(e),bordered:"true",loading:l(w),pagination:l(i),scroll:{x:800},onChange:T},{bodyCell:t(({column:P,record:d})=>[P.dataIndex==="status"?(m(),I(L,{key:0},[d.status==="success"?(m(),y(N,{key:0,color:"#87d068"},{default:t(()=>[p("已使用")]),_:1})):x("",!0),d.status==="checking"?(m(),y(N,{key:1,color:"#2db7f5"},{default:t(()=>[p("确认中")]),_:1})):x("",!0),d.status==="checked"?(m(),y(N,{key:2,color:"#108ee9"},{default:t(()=>[p("待使用")]),_:1})):x("",!0)],64)):x("",!0)]),_:1},8,["data-source","loading","pagination"])]),_:1})]),_:1})]),_:1})],64)}}});export{gt as default};
