1 |
- import{d as j,i as B,r as c,f as G,o as y,x as I,w as u,g as o,a as l,n as _,y as J,P as R,W,B as A,ai as E,aj as H,G as K,D as L,J as M,_ as N,__tla as O}from"./index-3fb48822.js";import{_ as Q,__tla as T}from"./Dialog-7d4425a0.js";import{D as v,__tla as X}from"./index-90eb38e4.js";import{u as Y,__tla as Z}from"./useMessage-b6c78c26.js";let h,$=Promise.all([(()=>{try{return O}catch{}})(),(()=>{try{return T}catch{}})(),(()=>{try{return X}catch{}})(),(()=>{try{return Z}catch{}})()]).then(async()=>{h=N(j({name:"DuserForm",__name:"DuserForm",emits:["success"],setup(ee,{expose:D,emit:S}){const{t:n}=B(),f=Y(),i=c(!1),g=c(""),m=c(!1),V=c(""),a=c({id:void 0,userId:void 0,name:void 0,mobile:void 0,source:void 0,integralId:void 0,socialStatus:void 0,socialStatusPoint:void 0,categoryId:void 0}),U=G({userId:[{required:!0,message:"\u56E2\u961F\u4EBA\u5458ID\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],name:[{required:!0,message:"\u56E2\u961F\u4EBA\u5458\u59D3\u540D\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],mobile:[{required:!0,message:"\u56E2\u961F\u4EBA\u5458\u624B\u673A\u53F7\u7801\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],integralId:[{required:!0,message:"\u56E2\u961F\u7528\u6237\u5F53\u524D\u79EF\u5206\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],categoryId:[{required:!0,message:"\u7528\u6237\u7C7B\u578B\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),p=c();D({open:async(d,e)=>{if(i.value=!0,g.value=n("action."+d),V.value=d,P(),e){m.value=!0;try{a.value=await v.getDuser(e)}finally{m.value=!1}}}});const w=S,x=async()=>{await p.value.validate(),m.value=!0;try{const d=a.value;V.value==="create"?(await v.createDuser(d),f.success(n("common.createSuccess"))):(await v.updateDuser(d),f.success(n("common.updateSuccess"))),i.value=!1,w("success")}finally{m.value=!1}},P=()=>{var d;a.value={id:void 0,userId:void 0,name:void 0,mobile:void 0,source:void 0,integralId:void 0,socialStatus:void 0,socialStatusPoint:void 0,categoryId:void 0},(d=p.value)==null||d.resetFields()};return(d,e)=>{const s=W,r=A,q=E,F=H,k=K,b=L,z=Q,C=M;return y(),I(z,{title:l(g),modelValue:l(i),"onUpdate:modelValue":e[9]||(e[9]=t=>R(i)?i.value=t:null)},{footer:u(()=>[o(b,{onClick:x,type:"primary",disabled:l(m)},{default:u(()=>[_("\u786E \u5B9A")]),_:1},8,["disabled"]),o(b,{onClick:e[8]||(e[8]=t=>i.value=!1)},{default:u(()=>[_("\u53D6 \u6D88")]),_:1})]),default:u(()=>[J((y(),I(k,{ref_key:"formRef",ref:p,model:l(a),rules:l(U),"label-width":"100px"},{default:u(()=>[o(r,{label:"\u56E2\u961F\u4EBA\u5458ID",prop:"userId"},{default:u(()=>[o(s,{modelValue:l(a).userId,"onUpdate:modelValue":e[0]||(e[0]=t=>l(a).userId=t),placeholder:"\u8BF7\u8F93\u5165\u56E2\u961F\u4EBA\u5458ID"},null,8,["modelValue"])]),_:1}),o(r,{label:"\u56E2\u961F\u4EBA\u5458\u59D3\u540D",prop:"name"},{default:u(()=>[o(s,{modelValue:l(a).name,"onUpdate:modelValue":e[1]||(e[1]=t=>l(a).name=t),placeholder:"\u8BF7\u8F93\u5165\u56E2\u961F\u4EBA\u5458\u59D3\u540D"},null,8,["modelValue"])]),_:1}),o(r,{label:"\u56E2\u961F\u4EBA\u5458\u624B\u673A\u53F7\u7801",prop:"mobile"},{default:u(()=>[o(s,{modelValue:l(a).mobile,"onUpdate:modelValue":e[2]||(e[2]=t=>l(a).mobile=t),placeholder:"\u8BF7\u8F93\u5165\u56E2\u961F\u4EBA\u5458\u624B\u673A\u53F7\u7801"},null,8,["modelValue"])]),_:1}),o(r,{label:"\u56E2\u961F\u4EBA\u5458\u6765\u6E90",prop:"source"},{default:u(()=>[o(s,{modelValue:l(a).source,"onUpdate:modelValue":e[3]||(e[3]=t=>l(a).source=t),placeholder:"\u8BF7\u8F93\u5165\u56E2\u961F\u4EBA\u5458\u6765\u6E90"},null,8,["modelValue"])]),_:1}),o(r,{label:"\u56E2\u961F\u7528\u6237\u5F53\u524D\u79EF\u5206",prop:"integralId"},{default:u(()=>[o(s,{modelValue:l(a).integralId,"onUpdate:modelValue":e[4]||(e[4]=t=>l(a).integralId=t),placeholder:"\u8BF7\u8F93\u5165\u56E2\u961F\u7528\u6237\u5F53\u524D\u79EF\u5206"},null,8,["modelValue"])]),_:1}),o(r,{label:"\u56E2\u961F\u7528\u6237\u5F53\u524D\u8EAB\u4EF7(\u7B49\u7EA7)",prop:"socialStatus"},{default:u(()=>[o(F,{modelValue:l(a).socialStatus,"onUpdate:modelValue":e[5]||(e[5]=t=>l(a).socialStatus=t)},{default:u(()=>[o(q,{label:"1"},{default:u(()=>[_("\u8BF7\u9009\u62E9\u5B57\u5178\u751F\u6210")]),_:1})]),_:1},8,["modelValue"])]),_:1}),o(r,{label:"\u56E2\u961F\u7528\u6237\u5F53\u524D\u70B9\u6570",prop:"socialStatusPoint"},{default:u(()=>[o(s,{modelValue:l(a).socialStatusPoint,"onUpdate:modelValue":e[6]||(e[6]=t=>l(a).socialStatusPoint=t),placeholder:"\u8BF7\u8F93\u5165\u56E2\u961F\u7528\u6237\u5F53\u524D\u70B9\u6570"},null,8,["modelValue"])]),_:1}),o(r,{label:"\u7528\u6237\u7C7B\u578B",prop:"categoryId"},{default:u(()=>[o(s,{modelValue:l(a).categoryId,"onUpdate:modelValue":e[7]||(e[7]=t=>l(a).categoryId=t),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u7C7B\u578B"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[C,l(m)]])]),_:1},8,["title","modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/distri/duser/DuserForm.vue"]])});export{$ as __tla,h as default};
|