index-THhZsOp1.js 3.4 KB

1
  1. import{d as m,a2 as _,av as w,K as p,e as o,f as a,u as d,y as h,C as y,j as r,L as t,m as s}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-fbA1Yi6d.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"./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},$=m({name:"borrow/borrowRecord",__name:"index",setup(N){const{t:e}=_();q();const i=g(["delete"]),c=new k(new I("/admin/borrow.borrowRecord/"),{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.borrowrecord.username"),prop:"username",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowrecord.mobile"),prop:"mobile",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowrecord.expected end time"),prop:"expected_end_time",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowrecord.purpose"),prop:"purpose",align:"center",operatorPlaceholder:e("Fuzzy query"),render:"tag",operator:"eq",replaceValue:{0:e("borrow.borrowrecord.purpose 0"),1:e("borrow.borrowrecord.purpose 1")}},{label:e("borrow.borrowrecord.borrow reason"),prop:"borrow_reason",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowrecord.remarks"),prop:"remarks",align:"center",operator:"LIKE",operatorPlaceholder:e("Fuzzy query")},{label:e("borrow.borrowrecord.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:i,operator:!1}],dblClickNotEditColumn:[void 0,"status"]},{defaultItems:{status:"1"}});return w("baTable",c),c.mount(),c.getIndex(),(B,V)=>{const u=p("el-alert"),l=p("el-tag"),b=p("el-table-column");return o(),a("div",x,[d(c).table.remark?(o(),h(u,{key:0,class:"ba-table-alert",title:d(c).table.remark,type:"info","show-icon":""},null,8,["title"])):y("",!0),r(f,{buttons:["refresh","add","edit","delete","comSearch","quickSearch","columnDisplay"],"quick-search-placeholder":d(e)("Quick search placeholder",{fields:d(e)("borrow.borrowrecord.username")+"/"+d(e)("borrow.borrowrecord.mobile")})},null,8,["quick-search-placeholder"]),r(v,null,{status:t(()=>[r(b,{prop:"status",label:d(e)("borrow.borrowrecord.status"),render:"tag",width:"180"},{default:t(n=>[n.row.status==="0"?(o(),a("div",T,[r(l,{type:"danger"},{default:t(()=>[s("待审批")]),_:1})])):n.row.status==="1"?(o(),a("div",C,[r(l,{type:"info"},{default:t(()=>[s("已驳回")]),_:1})])):n.row.status==="2"?(o(),a("div",E,[r(l,{type:"warning"},{default:t(()=>[s("待使用")]),_:1})])):n.row.status==="3"?(o(),a("div",P,[r(l,{type:"success"},{default:t(()=>[s("使用中")]),_:1})])):n.row.status==="4"?(o(),a("div",F,[r(l,{type:"success"},{default:t(()=>[s("已归还")]),_:1})])):n.row.status==="5"?(o(),a("div",K,[r(l,{type:"danger"},{default:t(()=>[s("已逾期")]),_:1})])):(o(),a("div",L,[r(l,{type:"danger"},{default:t(()=>[s("未知状态")]),_:1})]))]),_:1},8,["label"])]),_:1}),r(z)])}}});export{$ as default};