1 |
- import{_ as ne,d as le,w as oe,x as p,Z as V,W as se,A as ue,y as ie,ad as re,r as f,o as _,c as T,H as U,K as H,h as ce,l as t,D as o,F as me,E as de,m as c,by as pe,G as h,J as g,M as x,a as C,bA as fe,bx as j}from"./index.js";import{useColumns as ve}from"./columns.bcdd2e.js";import{c as _e,d as ye}from"./index.95768c8f.js";import ge from"./addEdit.009311.js";import he from"./resetPassword.1aafba.js";import"./company-modal.41ba95.js";const Ce={class:"main"},ke={name:"companyAccount"},be=le({...ke,setup(Fe){const{logout:B}=oe(),m=p([]),l=V({nickname:"",username:"",status:"",page:1,size:15}),w=p([]),k=p(!0),b=p(!1),N=p(""),E=p("add"),{columns:G}=ve(),{currentCompany:S}=se(),I=V({id:"",nickname:"",mobile:"",role:"",companyArr:[]}),R=p(""),z=p(!1),L=p(),F=V({total:0,pageSize:15,currentPage:1,background:!0}),J=async n=>{const{id:a}=n;R.value=a,z.value=!0},K=async n=>{const{id:a,status:v}=n,{code:u,message:i}=await _e({id:a,status:v+""=="1"?"0":"1"});j({code:u,logout:B,message:i,handler:()=>d()})};async function O(n){l.page=n,await d()}async function W(n){l.size=n,l.page=1,await d()}function Z(n){}async function d(){k.value=!0;const{code:n,data:a,message:v}=await ye({...l,companyNo:S.value.companyNo,noRela:S.value.companyNo===""});j({code:n,message:v,logout:B,handler:()=>{const{list:u,count:i}=a;w.value=u!=null?u:[],F.total=i!=null?i:0,F.pageSize=l.size,F.currentPage=l.page}}),k.value=!1}async function q(){l.page=1,await d()}function A(n,a,v){N.value=n,E.value=a;for(let u in v)I[u]=v[u];b.value=!0}const Q=()=>{b.value=!1,d()},X=()=>{b.value=!1},M=()=>{z.value=!1},Y=n=>{!n||(n.resetFields(),l.page=1,d())};return ue(()=>S.value,()=>d()),ie(()=>{m.value=re().getMenuActions("companyAccount"),d()}),(n,a)=>{const v=f("el-option"),u=f("el-select"),i=f("el-form-item"),P=f("el-input"),y=f("el-button"),ee=f("el-form"),$=f("el-popconfirm"),ae=f("PureTable"),te=f("NoAuth");return _(),T("div",Ce,[U(ce("div",null,[t(ee,{ref_key:"formRef",ref:L,inline:!0,model:l,size:"small","label-width":0,class:"bg-white w-99/100 pl-8 pt-4"},{default:o(()=>[t(i,{prop:"status"},{default:o(()=>[t(u,{modelValue:l.status,"onUpdate:modelValue":a[0]||(a[0]=e=>l.status=e),style:{width:"100%"},placeholder:"\u8D26\u53F7\u72B6\u6001",clearable:""},{default:o(()=>[(_(!0),T(me,null,de(c(pe),(e,D)=>(_(),h(v,{key:"status"+e.value+D,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(i,{prop:"nickname"},{default:o(()=>[t(P,{modelValue:l.nickname,"onUpdate:modelValue":a[1]||(a[1]=e=>l.nickname=e),placeholder:"\u771F\u5B9E\u59D3\u540D",clearable:""},null,8,["modelValue"])]),_:1}),t(i,{prop:"username"},{default:o(()=>[t(P,{modelValue:l.username,"onUpdate:modelValue":a[2]||(a[2]=e=>l.username=e),placeholder:"\u624B\u673A\u53F7",clearable:""},null,8,["modelValue"])]),_:1}),t(i,null,{default:o(()=>[t(y,{type:"primary",icon:c(g)("search"),loading:k.value,onClick:q},{default:o(()=>[x(" \u641C\u7D22 ")]),_:1},8,["icon","loading"]),t(y,{icon:c(g)("refresh"),onClick:a[3]||(a[3]=e=>Y(L.value))},{default:o(()=>[x(" \u91CD\u7F6E ")]),_:1},8,["icon"])]),_:1})]),_:1},8,["model"]),t(c(fe),{title:"\u516C\u53F8\u8D26\u53F7\u7BA1\u7406",loading:k.value,dataList:w.value,size:"small",onRefresh:d},{buttons:o(()=>[m.value.some(e=>e=="002")?(_(),h(y,{key:0,type:"primary",size:"small",icon:c(g)("add"),onClick:a[4]||(a[4]=e=>A("","add",{}))},{default:o(()=>[x(" \u65B0\u589E\u8D26\u53F7 ")]),_:1},8,["icon"])):C("v-if",!0)]),default:o(({size:e,checkList:D})=>[t(ae,{border:"",align:"left",showOverflowTooltip:"","table-layout":"auto",size:"small",data:w.value,columns:c(G),checkList:D,pagination:F,paginationSmall:e==="small","header-cell-style":{background:"#fafafa",color:"#606266"},onSelectionChange:Z,onSizeChange:W,onCurrentChange:O},{operation:o(({row:r})=>[t($,{title:"\u786E\u8BA4\u91CD\u7F6E\u5BC6\u7801\uFF1F",onConfirm:s=>J(r)},{reference:o(()=>[m.value.some(s=>s=="012")?(_(),h(y,{key:0,class:"reset-margin",link:"",type:"primary",size:"small",icon:c(g)("refresh-right")},null,8,["icon"])):C("v-if",!0)]),_:2},1032,["onConfirm"]),m.value.some(s=>s=="007")?(_(),h(y,{key:0,class:"reset-margin",link:"",type:"primary",size:"small",onClick:s=>A(r.id,"view",r),icon:c(g)("eye-view")},null,8,["onClick","icon"])):C("v-if",!0),m.value.some(s=>s=="005")?(_(),h(y,{key:1,class:"reset-margin",link:"",type:"primary",size:"small",onClick:s=>A(r.id,"edit",r),icon:c(g)("edits")},null,8,["onClick","icon"])):C("v-if",!0),m.value.some(s=>s=="004")&&r.status+""=="1"||m.value.some(s=>s=="003")&&r.status+""=="0"?(_(),h($,{key:2,title:String(r.status)==="1"?"\u6539\u4E3A\u7981\u7528\uFF1F":"\u6539\u4E3A\u542F\u7528\uFF1F",onConfirm:s=>K(r)},{reference:o(()=>[t(y,{class:"reset-margin",link:"",type:"primary",size:"small",icon:c(g)(String(r.status)==="1"?"close-circle-line":"checkbox-circle-line")},null,8,["icon"])]),_:2},1032,["title","onConfirm"])):C("v-if",!0)]),_:2},1032,["data","columns","checkList","pagination","paginationSmall"])]),_:1},8,["loading","dataList"]),t(ge,{itemId:N.value,isDetails:E.value,"show-model":b.value,onRefresh:Q,onCancel:X,sitem:I},null,8,["itemId","isDetails","show-model","sitem"]),t(he,{itemId:R.value,"show-model":z.value,onRefresh:M,onCancel:M},null,8,["itemId","show-model"])],512),[[H,m.value.some(e=>e=="001")]]),U(t(te,null,null,512),[[H,!m.value.some(e=>e=="001")]])])}}});var xe=ne(be,[["__scopeId","data-v-44c8630e"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/interest/companyAccount/index.vue"]]);export{xe as default};
|