import{d as m,a2 as _,av as w,K as c,e as r,f as a,u as p,y as h,C as y,j as o,L as t,m as n}from"./vue-A59npLRR.js";import{T as f}from"./index-K8IR974I.js";import{d as g,b as k,T as v}from"./baTable-MdxYOkAk.js";import z from"./popupForm-fcqiKR2k.js";import{a as q,a1 as I}from"./index-EwE51S_X.js";import"./index-XALue448.js";import"./validate-_EUdkMt3.js";import"./index-r6iTpmP6.js";import"./borrowApplication-AaWED6kW.js";import"./echarts-cxb9vJr1.js";const x={class:"default-main ba-table-box"},T={key:0},C={key:1},E={key:2},P={key:3},F={key:4},K={key:5},L={key:6},J=m({name:"borrow/borrowApplication",__name:"index",setup(N){const{t:e}=_();q();const d=g(["edit","delete"]),i=new k(new I("/admin/borrow.borrowApplication/"),{filter:{limit:20,order:"id,asc"},column:[{type:"selection",align:"center",operator:!1},{label:e("Id"),prop:"id",align:"center",operator:"=",operatorPlaceholder:e("Id"),width:70},{label:e("borrow.borrowapplication.username"),prop:"username",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowapplication.mobile"),prop:"mobile",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowapplication.expected end time"),prop:"expected_end_time",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowapplication.purpose"),prop:"purpose",align:"center",operatorPlaceholder:e("Fuzzy query"),render:"tag",operator:"eq",replaceValue:{0:e("borrow.borrowapplication.purpose 0"),1:e("borrow.borrowapplication.purpose 1")}},{label:e("borrow.borrowapplication.borrow reason"),prop:"borrow_reason",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowapplication.remarks"),prop:"remarks",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowapplication.status"),prop:"status",align:"center",render:"slot",slotName:"status",operator:"eq"},{label:e("Create time"),prop:"create_time",align:"center",render:"datetime",sortable:"custom",operator:"RANGE",width:160},{label:e("Operate"),align:"center",width:"100",render:"buttons",buttons:d,operator:!1}],dblClickNotEditColumn:[void 0,"status"]},{defaultItems:{status:"1"}});return w("baTable",i),i.mount(),i.getIndex(),(A,B)=>{const u=c("el-alert"),l=c("el-tag"),b=c("el-table-column");return r(),a("div",x,[p(i).table.remark?(r(),h(u,{key:0,class:"ba-table-alert",title:p(i).table.remark,type:"info","show-icon":""},null,8,["title"])):y("",!0),o(f,{buttons:["refresh","add","edit","delete","comSearch","quickSearch","columnDisplay"],"quick-search-placeholder":p(e)("Quick search placeholder",{fields:p(e)("borrow.borrowapplication.username")+"/"+p(e)("borrow.borrowapplication.mobile")})},null,8,["quick-search-placeholder"]),o(v,null,{status:t(()=>[o(b,{prop:"status",label:p(e)("borrow.borrowapplication.status"),render:"tag",width:"180"},{default:t(s=>[s.row.status==="0"?(r(),a("div",T,[o(l,{type:"danger"},{default:t(()=>[n("待审批")]),_:1})])):s.row.status==="1"?(r(),a("div",C,[o(l,{type:"info"},{default:t(()=>[n("已驳回")]),_:1})])):s.row.status==="2"?(r(),a("div",E,[o(l,{type:"warning"},{default:t(()=>[n("待使用")]),_:1})])):s.row.status==="3"?(r(),a("div",P,[o(l,{type:"success"},{default:t(()=>[n("使用中")]),_:1})])):s.row.status==="4"?(r(),a("div",F,[o(l,{type:"success"},{default:t(()=>[n("已归还")]),_:1})])):s.row.status==="5"?(r(),a("div",K,[o(l,{type:"danger"},{default:t(()=>[n("已逾期")]),_:1})])):(r(),a("div",L,[o(l,{type:"danger"},{default:t(()=>[n("未知状态")]),_:1})]))]),_:1},8,["label"])]),_:1}),o(z)])}}});export{J as default};