1 |
- import{aA as r,d as U,P as q,r as d,x as J,o as w,C as g,A as p,f as n,a as s,D as x,k as R,a2 as T,a9 as W,V as Z,W as B,J as E,Z as G,_ as H,__tla as I}from"./index-0b2503c4.js";import{_ as K,__tla as L}from"./Dialog-3207cd36.js";import{u as N,__tla as Q}from"./useMessage-d05433ee.js";let S,c,b,X=Promise.all([(()=>{try{return I}catch{}})(),(()=>{try{return L}catch{}})(),(()=>{try{return Q}catch{}})()]).then(async()=>{c={getShopStatusPage:async a=>await r.get({url:"/sale/shop-status/page",params:a}),getShopStatus:async a=>await r.get({url:"/sale/shop-status/get?id="+a}),createShopStatus:async a=>await r.post({url:"/sale/shop-status/create",data:a}),updateShopStatus:async a=>await r.put({url:"/sale/shop-status/update",data:a}),deleteShopStatus:async a=>await r.delete({url:"/sale/shop-status/delete?id="+a}),exportShopStatus:async a=>await r.download({url:"/sale/shop-status/export-excel",params:a})},S=H(U({name:"ShopStatusForm",__name:"ShopStatusForm",emits:["success"],setup(a,{expose:V,emit:k}){const{t:m}=q(),h=N(),l=d(!1),v=d(""),u=d(!1),f=d(""),o=d({id:void 0,name:void 0}),F=J({name:[{required:!0,message:"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),_=d();V({open:async(e,t)=>{if(l.value=!0,v.value=m("action."+e),f.value=e,C(),t){u.value=!0;try{o.value=await c.getShopStatus(t)}finally{u.value=!1}}}});const P=k,z=async()=>{await _.value.validate(),u.value=!0;try{const e=o.value;f.value==="create"?(await c.createShopStatus(e),h.success(m("common.createSuccess"))):(await c.updateShopStatus(e),h.success(m("common.updateSuccess"))),l.value=!1,P("success")}finally{u.value=!1}},C=()=>{var e;o.value={id:void 0,name:void 0},(e=_.value)==null||e.resetFields()};return(e,t)=>{const j=W,A=Z,D=B,y=E,M=K,O=G;return w(),g(M,{title:s(v),modelValue:s(l),"onUpdate:modelValue":t[2]||(t[2]=i=>T(l)?l.value=i:null)},{footer:p(()=>[n(y,{onClick:z,type:"primary",disabled:s(u)},{default:p(()=>[x("\u786E \u5B9A")]),_:1},8,["disabled"]),n(y,{onClick:t[1]||(t[1]=i=>l.value=!1)},{default:p(()=>[x("\u53D6 \u6D88")]),_:1})]),default:p(()=>[R((w(),g(D,{ref_key:"formRef",ref:_,model:s(o),rules:s(F),"label-width":"100px"},{default:p(()=>[n(A,{label:"\u540D\u79F0",prop:"name"},{default:p(()=>[n(j,{modelValue:s(o).name,"onUpdate:modelValue":t[0]||(t[0]=i=>s(o).name=i),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[O,s(u)]])]),_:1},8,["title","modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/sale/shopstatus/ShopStatusForm.vue"]]),b=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"}))});export{S,X as __tla,c as a,b};
|