import{aQ as r,ac as R,al as S,aO as P,ae as k,_ as x,d as B,w as c,b2 as M,r as f,o as V,G as Y,C as h,l as d,u as g}from"./index.3f1ca816.js";import{R as I,M as s}from"./role-modal.6418bd81.js";import{r as L}from"./columnRenderHelper.c7097252.js";import{u as q}from"./use-page-search.fa6a742a.js";import{S as O}from"./super.6312f721.js";import"./index.c950bae2.js";const{VITE_PROXY_DOMAIN_REAL:te,VITE_PROXY_USER_REAL:T}=R(),l=T+"/admin/",U=e=>r.request("post",`${l}userlist`,{data:{level:"3",...e}}),W=e=>r.request("post",`${l}usersave`,{data:e}),$=e=>r.request("post",`${l}menustatus`,{data:e}),H=e=>r.request("post",`${l}setrole`,{data:e}),Q=[{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})=>S(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"}],j={title:"\u516C\u53F8\u8D26\u53F7\u89D2\u8272\u67E5\u8BE2",columns:Q,deleteProp:"payNo",notNeedCompanyFilter:!0,statusRowProp:({companyCode:e})=>({companyNo:e}),apis:{httpAdd:!0,httpDelete:$,httpUpdate:W,httpList:U}},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:()=>q(_,()=>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(H(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(j),"search-config":g(y),"get-content-ref":a=>m.value=a},{search_field:h(()=>[d(O,{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};