1 |
- import{ar as n,d as O,i as B,r as c,f as G,o as b,x,w as d,g as u,a,n as Q,y as J,P as M,W as R,B as T,G as W,D as q,J as A,_ as E,__tla as H}from"./index-52b99925.js";import{_ as K,__tla as L}from"./Dialog-01a79427.js";import{u as N,__tla as X}from"./useMessage-c41e583e.js";let v,m,h,Y=Promise.all([(()=>{try{return H}catch{}})(),(()=>{try{return L}catch{}})(),(()=>{try{return X}catch{}})()]).then(async()=>{m={getIntegralPage:async l=>await n.get({url:"/distri/integral/page",params:l}),getIntegral:async l=>await n.get({url:"/distri/integral/get?id="+l}),createIntegral:async l=>await n.post({url:"/distri/integral/create",data:l}),updateIntegral:async l=>await n.put({url:"/distri/integral/update",data:l}),deleteIntegral:async l=>await n.delete({url:"/distri/integral/delete?id="+l}),exportIntegral:async l=>await n.download({url:"/distri/integral/export-excel",params:l})},v=E(O({name:"IntegralForm",__name:"IntegralForm",emits:["success"],setup(l,{expose:z,emit:U}){const{t:_}=B(),y=N(),s=c(!1),I=c(""),i=c(!1),w=c(""),t=c({id:void 0,userId:void 0,currentQuota:void 0,freezeQuota:void 0,categoryId:void 0}),D=G({}),f=c();z({open:async(o,e)=>{if(s.value=!0,I.value=_("action."+o),w.value=o,S(),e){i.value=!0;try{t.value=await m.getIntegral(e)}finally{i.value=!1}}}});const F=U,P=async()=>{await f.value.validate(),i.value=!0;try{const o=t.value;w.value==="create"?(await m.createIntegral(o),y.success(_("common.createSuccess"))):(await m.updateIntegral(o),y.success(_("common.updateSuccess"))),s.value=!1,F("success")}finally{i.value=!1}},S=()=>{var o;t.value={id:void 0,userId:void 0,currentQuota:void 0,freezeQuota:void 0,categoryId:void 0},(o=f.value)==null||o.resetFields()};return(o,e)=>{const p=R,g=T,k=W,V=q,j=K,C=A;return b(),x(j,{title:a(I),modelValue:a(s),"onUpdate:modelValue":e[5]||(e[5]=r=>M(s)?s.value=r:null)},{footer:d(()=>[u(V,{onClick:P,type:"primary",disabled:a(i)},{default:d(()=>[Q("\u786E \u5B9A")]),_:1},8,["disabled"]),u(V,{onClick:e[4]||(e[4]=r=>s.value=!1)},{default:d(()=>[Q("\u53D6 \u6D88")]),_:1})]),default:d(()=>[J((b(),x(k,{ref_key:"formRef",ref:f,model:a(t),rules:a(D),"label-width":"100px"},{default:d(()=>[u(g,{label:"\u7528\u6237ID",prop:"userId"},{default:d(()=>[u(p,{modelValue:a(t).userId,"onUpdate:modelValue":e[0]||(e[0]=r=>a(t).userId=r),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237ID"},null,8,["modelValue"])]),_:1}),u(g,{label:"\u5F53\u524D\u79EF\u5206",prop:"currentQuota"},{default:d(()=>[u(p,{modelValue:a(t).currentQuota,"onUpdate:modelValue":e[1]||(e[1]=r=>a(t).currentQuota=r),placeholder:"\u8BF7\u8F93\u5165\u5F53\u524D\u79EF\u5206"},null,8,["modelValue"])]),_:1}),u(g,{label:"\u51BB\u7ED3\u79EF\u5206",prop:"freezeQuota"},{default:d(()=>[u(p,{modelValue:a(t).freezeQuota,"onUpdate:modelValue":e[2]||(e[2]=r=>a(t).freezeQuota=r),placeholder:"\u8BF7\u8F93\u5165\u51BB\u7ED3\u79EF\u5206"},null,8,["modelValue"])]),_:1}),u(g,{label:"\u7528\u6237\u7C7B\u578B",prop:"categoryId"},{default:d(()=>[u(p,{modelValue:a(t).categoryId,"onUpdate:modelValue":e[3]||(e[3]=r=>a(t).categoryId=r),placeholder:"\u8BF7\u8F93\u5165\u7528\u6237\u7C7B\u578B"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[C,a(i)]])]),_:1},8,["title","modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/distri/integral/IntegralForm.vue"]]),h=Object.freeze(Object.defineProperty({__proto__:null,default:v},Symbol.toStringTag,{value:"Module"}))});export{v as I,Y as __tla,m as a,h as b};
|