import{aU as r,ac as S,al as R,aS as P,ae as k,_ as x,d as B,w as c,b3 as M,r as f,o as V,G as Y,C as h,l as d,u as g}from"./index.1d1a5ecb.js";import{R as I,M as s}from"./role-modal.4f617af4.js";import{r as L}from"./columnRenderHelper.0fb69d06.js";import{u as U}from"./use-page-search.f4c305e2.js";import{S as q}from"./super.c57a7ebc.js";import"./index.8301d9e2.js";const{VITE_PROXY_DOMAIN_REAL:te,VITE_PROXY_USER_REAL:T}=S(),l=T+"/admin/",W=e=>r.request("post",`${l}userlist`,{data:{level:"3",...e}}),$=e=>r.request("post",`${l}usersave`,{data:e}),H=e=>r.request("post",`${l}menustatus`,{data:e}),O=e=>r.request("post",`${l}setrole`,{data:e}),j=[{type:"selection",width:40,align:"center",hide:({checkList:e})=>!e.includes("\u52FE\u9009\u5217")},{label:"\u5E8F\u53F7",type:"index",minWidth:60,align:"left",hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"\u624B\u673A\u53F7",prop:"mobile",width:120,align:"left"},{label:"\u771F\u5B9E\u59D3\u540D",prop:"nickname",minWidth:150},{label:"\u72B6\u6001",prop:"status",width:120,cellRenderer:({row:e})=>R(P,{type:String(e.status)==="1"?"success":"danger"},{default:()=>String(e.status)==="1"?"\u542F\u7528":"\u7981\u7528"})},{label:"\u89D2\u8272",prop:"role_name",minWidth:150,align:"left"},{label:"\u516C\u53F8\u540D\u79F0",prop:"companyName",minWidth:180,align:"left",...L("companyCode","companyName","\u516C\u53F8\u7F16\u7801:")},{label:"\u521B\u5EFA\u65F6\u95F4",width:140,prop:"addtime",formatter:({addtime:e})=>k(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],Q={title:"\u516C\u53F8\u8D26\u53F7\u89D2\u8272\u67E5\u8BE2",columns:j,deleteProp:"payNo",notNeedCompanyFilter:!0,statusRowProp:({companyCode:e})=>({companyNo:e}),apis:{httpAdd:!0,httpDelete:H,httpUpdate:$,httpList:W}},y={formItems:[{field:"nickname",type:"input",placeholder:"\u771F\u5B9E\u59D3\u540D"},{field:"username",type:"input",placeholder:"\u624B\u673A\u53F7"}]},X=B({__name:"index",setup(e){const F="supplierAccoutQuery",o=c(null),m=c(null),n=c(""),_=()=>({result:{companyNo:n.value},deleteProps:[]}),v={pageSearchHook:()=>U(_,()=>n.value="",y,!0)},{run:C}=M({success:()=>m.value.onSearch()}),D={content:{create:()=>o.value.onDisplay(void 0,s.create),preview:t=>o.value.onDisplay(t,s.preview),update:t=>o.value.onDisplay(t,s.update)}};function E(t,u){const{roleid:p,nickname:i,relaComNo:a,id:N,companyNo:b,mobile:w}=t,A={id:N,mobile:w,roleid:p,nickname:i,relaComNo:a,companyNo:b};switch(u){case s.update:C(O(A));break}}return(t,u)=>{const p=f("PageContainer"),i=f("PageAuth");return V(),Y(i,{pageName:F},{default:h(()=>[d(p,{hooks:v,events:D,contentConfig:g(Q),"search-config":g(y),"get-content-ref":a=>m.value=a},{search_field:h(()=>[d(q,{style:{"margin-right":"20px",width:"100%"},modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=a=>n.value=a),placeholder:"\u4F9B\u5E94\u5546\u516C\u53F8","no-all":"","no-set":"","is-supplier":""},null,8,["modelValue"])]),_:1},8,["contentConfig","search-config","get-content-ref"]),d(I,{ref_key:"roleModalRef",ref:o,onFinanceSave:E},null,512)]),_:1})}}});var ae=x(X,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/supplierManage/supplierAccoutQuery/index.vue"]]);export{ae as default};
