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