1 |
- import{d as B,B as D,r as i,g as T,o as f,k as _,w as r,i as o,a as e,l as v,D as z,c as I,F as L,C as O,t as P,R,Y as j,I as J,aj as Y,ak as G,J as H,s as K,M as Q,_ as W,__tla as X}from"./index-66208f93.js";import{_ as Z,__tla as $}from"./Dialog-948825d3.js";import{a as ee,D as ae,__tla as le}from"./dict-6d253095.js";import{g as te,c as re,u as oe,__tla as se}from"./index-0be8f4e6.js";import{C as g}from"./constants-d55a3460.js";import{u as ue,__tla as de}from"./useMessage-798a77de.js";let N,ie=Promise.all([(()=>{try{return X}catch{}})(),(()=>{try{return $}catch{}})(),(()=>{try{return le}catch{}})(),(()=>{try{return se}catch{}})(),(()=>{try{return de}catch{}})()]).then(async()=>{N=W(B({name:"PayAppForm",__name:"AppForm",emits:["success"],setup(me,{expose:h,emit:k}){const{t:p}=D(),y=ue(),u=i(!1),V=i(""),d=i(!1),b=i(""),t=i({id:void 0,name:void 0,packageId:void 0,contactName:void 0,contactMobile:void 0,accountCount:void 0,expireTime:void 0,domain:void 0,status:g.ENABLE}),w=T({name:[{required:!0,message:"\u5E94\u7528\u540D\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],status:[{required:!0,message:"\u5F00\u542F\u72B6\u6001\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],orderNotifyUrl:[{required:!0,message:"\u652F\u4ED8\u7ED3\u679C\u7684\u56DE\u8C03\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],refundNotifyUrl:[{required:!0,message:"\u9000\u6B3E\u7ED3\u679C\u7684\u56DE\u8C03\u5730\u5740\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),n=i();h({open:async(s,a)=>{if(u.value=!0,V.value=p("action."+s),b.value=s,x(),a){d.value=!0;try{t.value=await te(a)}finally{d.value=!1}}}});const A=k,C=async()=>{if(n&&await n.value.validate()){d.value=!0;try{const s=t.value;b.value==="create"?(await re(s),y.success(p("common.createSuccess"))):(await oe(s),y.success(p("common.updateSuccess"))),u.value=!1,A("success")}finally{d.value=!1}}},x=()=>{var s;t.value={id:void 0,name:void 0,status:g.ENABLE,remark:void 0,orderNotifyUrl:void 0,refundNotifyUrl:void 0},(s=n.value)==null||s.resetFields()};return(s,a)=>{const c=j,m=J,F=Y,M=G,q=H,U=K,E=Z,S=Q;return f(),_(E,{modelValue:e(u),"onUpdate:modelValue":a[6]||(a[6]=l=>R(u)?u.value=l:null),title:e(V)},{footer:r(()=>[o(U,{disabled:e(d),type:"primary",onClick:C},{default:r(()=>[v("\u786E \u5B9A")]),_:1},8,["disabled"]),o(U,{onClick:a[5]||(a[5]=l=>u.value=!1)},{default:r(()=>[v("\u53D6 \u6D88")]),_:1})]),default:r(()=>[z((f(),_(q,{ref_key:"formRef",ref:n,model:e(t),rules:e(w),"label-width":"160px"},{default:r(()=>[o(m,{label:"\u5E94\u7528\u540D",prop:"name"},{default:r(()=>[o(c,{modelValue:e(t).name,"onUpdate:modelValue":a[0]||(a[0]=l=>e(t).name=l),placeholder:"\u8BF7\u8F93\u5165\u5E94\u7528\u540D"},null,8,["modelValue"])]),_:1}),o(m,{label:"\u5F00\u542F\u72B6\u6001",prop:"status"},{default:r(()=>[o(M,{modelValue:e(t).status,"onUpdate:modelValue":a[1]||(a[1]=l=>e(t).status=l)},{default:r(()=>[(f(!0),I(L,null,O(e(ee)(e(ae).COMMON_STATUS),l=>(f(),_(F,{key:l.value,label:l.value},{default:r(()=>[v(P(l.label),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(m,{label:"\u652F\u4ED8\u7ED3\u679C\u7684\u56DE\u8C03\u5730\u5740",prop:"orderNotifyUrl"},{default:r(()=>[o(c,{modelValue:e(t).orderNotifyUrl,"onUpdate:modelValue":a[2]||(a[2]=l=>e(t).orderNotifyUrl=l),placeholder:"\u8BF7\u8F93\u5165\u652F\u4ED8\u7ED3\u679C\u7684\u56DE\u8C03\u5730\u5740"},null,8,["modelValue"])]),_:1}),o(m,{label:"\u9000\u6B3E\u7ED3\u679C\u7684\u56DE\u8C03\u5730\u5740",prop:"refundNotifyUrl"},{default:r(()=>[o(c,{modelValue:e(t).refundNotifyUrl,"onUpdate:modelValue":a[3]||(a[3]=l=>e(t).refundNotifyUrl=l),placeholder:"\u8BF7\u8F93\u5165\u9000\u6B3E\u7ED3\u679C\u7684\u56DE\u8C03\u5730\u5740"},null,8,["modelValue"])]),_:1}),o(m,{label:"\u5907\u6CE8",prop:"remark"},{default:r(()=>[o(c,{modelValue:e(t).remark,"onUpdate:modelValue":a[4]||(a[4]=l=>e(t).remark=l),placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])),[[S,e(d)]])]),_:1},8,["modelValue","title"])}}}),[["__file","D:/zx/mall-newfeifan-zx-business/src/views/pay/app/components/AppForm.vue"]])});export{ie as __tla,N as default};
|