1 |
- import{_ as U,d as j,E as c,aZ as O,a5 as h,af as z,x as s,aA as G,o as p,N as b,K as a,O as K,u as i,aK as W,y as t,a as P,c as Q,M as Z,L as q,b as H,W as B,T as J}from"./index.743f0c80.js";import{h as M}from"./index.e3a0e172.js";var v=(n=>(n[n.update=0]="update",n[n.preview=1]="preview",n[n.create=2]="create",n))(v||{});const X={class:"flex w-full justify-end"},Y=B("\u53D6\u6D88"),$=B("\u4FDD\u5B58"),T=j({__name:"role-modal",emits:["finance-save"],setup(n,{expose:C,emit:g}){const d=c(!1),f=c(v.create),V=c(null);let E="";const{run:N,data:w,loading:R}=O({initalData:[],isList:!0}),k={nickname:"",mobile:"",roleid:""},o=c({...k}),D=c({}),{currentCompany:A}=h(),x=z(()=>{const u="\u516C\u53F8\u8D26\u53F7\u89D2\u8272\u8BBE\u7F6E";switch(f.value){case v.create:return"\u521B\u5EFA"+u;case v.preview:return"\u67E5\u770B"+u;default:return"\u4FEE\u6539"+u}});function S(){V.value.validate(u=>{!u||(g("finance-save",{companyNo:E,relaComNo:A.value.companyNo,...i(o)},i(f)),d.value=!1)})}return C({onDisplay:(u,e)=>{if(o.value={...k},d.value=!0,f.value=e,E=u.companyCode,N(M({companyNo:E,size:"1000"})),u){const{mobile:m,nickname:r,roleid:F,id:y,companyName:_}=u;D.value=_,o.value={mobile:m,nickname:r,roleid:F,id:y}}}}),(u,e)=>{const m=s("ElInput"),r=s("ElFormItem"),F=s("ElRadio"),y=s("ElRadioGroup"),_=s("ElButton"),I=s("ElDialog"),L=G("loading");return p(),b(I,{center:"",modelValue:d.value,"onUpdate:modelValue":e[5]||(e[5]=l=>d.value=l),title:i(x)},{default:a(()=>[K((p(),b(i(W),{ref_key:"formRef",ref:V,labelWidth:"100px","label-position":"left",model:o.value,rules:{},disabled:f.value===i(v).preview},{default:a(()=>[t(r,{label:"\u771F\u5B9E\u59D3\u540D",prop:"nickname"},{default:a(()=>[t(m,{placeholder:"\u8BF7\u8F93\u5165\u771F\u5B9E\u59D3\u540D",modelValue:o.value.nickname,"onUpdate:modelValue":e[0]||(e[0]=l=>o.value.nickname=l),disabled:""},null,8,["modelValue"])]),_:1}),t(r,{label:"\u624B\u673A\u53F7",prop:"mobile"},{default:a(()=>[t(m,{placeholder:"\u8BF7\u8F93\u5165\u624B\u673A\u53F7",modelValue:o.value.mobile,"onUpdate:modelValue":e[1]||(e[1]=l=>o.value.mobile=l),disabled:""},null,8,["modelValue"])]),_:1}),D.value?(p(),b(r,{key:0,label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName"},{default:a(()=>[t(m,{placeholder:"\u8BF7\u8F93\u5165\u4E1A\u52A1\u516C\u53F8",value:D.value,disabled:""},null,8,["value"])]),_:1})):P("v-if",!0),t(r,{label:"\u89D2\u8272",prop:"roleid"},{default:a(()=>[t(y,{modelValue:o.value.roleid,"onUpdate:modelValue":e[2]||(e[2]=l=>o.value.roleid=l)},{default:a(()=>[(p(!0),Q(q,null,Z(i(w),l=>(p(),b(F,{disabled:String(l.status)==="0",key:l.id,label:l.id},{default:a(()=>[B(J(l.role_name),1)]),_:2},1032,["disabled","label"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(r,null,{default:a(()=>[H("div",X,[t(_,{type:"\u53D6\u6D88",onClick:e[3]||(e[3]=()=>d.value=!1)},{default:a(()=>[Y]),_:1}),t(_,{type:"primary",onClick:e[4]||(e[4]=()=>S())},{default:a(()=>[$]),_:1})])]),_:1})]),_:1},8,["model","disabled"])),[[L,i(R)]])]),_:1},8,["modelValue","title"])}}});var ee=U(T,[["__file","D:/work/accout-vue3-ui/src/views/interest/accountQuery/components/role-modal.vue"]]),oe=Object.freeze(Object.defineProperty({__proto__:null,default:ee},Symbol.toStringTag,{value:"Module"}));export{v as M,ee as R,oe as r};
|