1 |
- import{_ as te,d as ne,w as le,x as d,Z as A,W as oe,y as se,ad as ue,r as p,o as _,c as $,H as T,K as U,h as ie,l as t,D as o,F as re,E as ce,m as c,by as me,G as y,J as h,M as V,a as C,bA as de,dW as pe,bx as H,dX as fe}from"./index.js";import{useColumns as ve}from"./columns.bcdd2e3.js";import _e from"./addEdit.8c5c7e.js";import ge from"./resetPassword.a1fff7.js";import"./company-modal.eb7926.js";import"./index.38d51ba4.js";const he={class:"main"},ye={name:"supplierAccountManage"},Ce=ne({...ye,setup(ke){const{logout:x}=le(),m=d([]),l=A({nickname:"",username:"",status:"",page:1,size:15}),w=d([]),k=d(!0),b=d(!1),B=d(""),M=d("add"),{columns:W}=ve();oe();const E=A({id:"",nickname:"",mobile:"",role:"",companyArr:[]}),I=d(""),S=d(!1),R=d(),F=A({total:0,pageSize:15,currentPage:1,background:!0}),j=async n=>{const{id:a}=n;I.value=a,S.value=!0},G=async n=>{const{id:a,status:v}=n,{code:u,message:i}=await pe({id:a,status:v+""=="1"?"0":"1"});H({code:u,message:i,logout:x,handler:()=>f()})};async function J(n){l.page=n,await f()}async function K(n){l.size=n,l.page=1,await f()}function O(n){}async function f(){k.value=!0;const{code:n,data:a,message:v}=await fe({...l,noRela:!0});H({code:n,message:v,logout:x,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 X(){l.page=1,await f()}function z(n,a,v){B.value=n,M.value=a;for(let u in v)E[u]=v[u];b.value=!0}const Z=()=>{b.value=!1,f()},q=()=>{b.value=!1},L=()=>{S.value=!1},Q=n=>{!n||(n.resetFields(),l.page=1,f())};return se(()=>{m.value=ue().getMenuActions("supplierAccoutManage"),f()}),(n,a)=>{const v=p("el-option"),u=p("el-select"),i=p("el-form-item"),N=p("el-input"),g=p("el-button"),Y=p("el-form"),P=p("el-popconfirm"),ee=p("PureTable"),ae=p("NoAuth");return _(),$("div",he,[T(ie("div",null,[t(Y,{ref_key:"formRef",ref:R,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),$(re,null,ce(c(me),(e,D)=>(_(),y(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(N,{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(N,{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(g,{type:"primary",icon:c(h)("search"),loading:k.value,onClick:X},{default:o(()=>[V(" \u641C\u7D22 ")]),_:1},8,["icon","loading"]),t(g,{icon:c(h)("refresh"),onClick:a[3]||(a[3]=e=>Q(R.value))},{default:o(()=>[V(" \u91CD\u7F6E ")]),_:1},8,["icon"])]),_:1})]),_:1},8,["model"]),t(c(de),{title:"\u516C\u53F8\u8D26\u53F7\u7BA1\u7406",loading:k.value,dataList:w.value,size:"small",onRefresh:f},{buttons:o(()=>[m.value.some(e=>e=="002")?(_(),y(g,{key:0,type:"primary",size:"small",icon:c(h)("add"),onClick:a[4]||(a[4]=e=>z("","add",{}))},{default:o(()=>[V(" \u65B0\u589E\u8D26\u53F7 ")]),_:1},8,["icon"])):C("v-if",!0)]),default:o(({size:e,checkList:D})=>[t(ee,{border:"",align:"left",showOverflowTooltip:"","table-layout":"auto",size:"small",data:w.value,columns:c(W),checkList:D,pagination:F,paginationSmall:e==="small","header-cell-style":{background:"#fafafa",color:"#606266"},onSelectionChange:O,onSizeChange:K,onCurrentChange:J},{operation:o(({row:r})=>[t(P,{title:"\u786E\u8BA4\u91CD\u7F6E\u5BC6\u7801\uFF1F",onConfirm:s=>j(r)},{reference:o(()=>[m.value.some(s=>s=="012")?(_(),y(g,{key:0,class:"reset-margin",link:"",type:"primary",size:"small",icon:c(h)("refresh-right")},null,8,["icon"])):C("v-if",!0)]),_:2},1032,["onConfirm"]),m.value.some(s=>s=="007")?(_(),y(g,{key:0,class:"reset-margin",link:"",type:"primary",size:"small",onClick:s=>z(r.id,"view",r),icon:c(h)("eye-view")},null,8,["onClick","icon"])):C("v-if",!0),m.value.some(s=>s=="005")?(_(),y(g,{key:1,class:"reset-margin",link:"",type:"primary",size:"small",onClick:s=>z(r.id,"edit",r),icon:c(h)("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"?(_(),y(P,{key:2,title:String(r.status)==="1"?"\u6539\u4E3A\u7981\u7528\uFF1F":"\u6539\u4E3A\u542F\u7528\uFF1F",onConfirm:s=>G(r)},{reference:o(()=>[t(g,{class:"reset-margin",link:"",type:"primary",size:"small",icon:c(h)(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(_e,{itemId:B.value,isDetails:M.value,"show-model":b.value,onRefresh:Z,onCancel:q,sitem:E},null,8,["itemId","isDetails","show-model","sitem"]),t(ge,{itemId:I.value,"show-model":S.value,onRefresh:L,onCancel:L},null,8,["itemId","show-model"])],512),[[U,m.value.some(e=>e=="001")]]),T(t(ae,null,null,512),[[U,!m.value.some(e=>e=="001")]])])}}});var Ae=te(Ce,[["__scopeId","data-v-b9c3be96"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/supplierManage/supplierAccoutManage/index.vue"]]);export{Ae as default};
|