niucloud-admin/niucloud/public/admin/assets/pay-offlinepay-087f2cd2.js
全栈小学生 4740f6bac9 up
2024-11-22 15:09:08 +08:00

2 lines
3.4 KiB
JavaScript

import{d as B,r as m,l as N,M as E,k as o,h as g,m as b,w as n,a as F,e as c,i as V,t as h,u as t,J as M,D as U,G as q,H as C,E as A,V as O,L as R}from"./index-6aea3257.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */const j={class:"dialog-footer"},K=B({__name:"pay-offlinepay",emits:["complete"],setup(I,{expose:v,emit:k}){const r=m(!1),s=m(!0),f={type:"offlinepay",config:{collection_name:"",collection_bank:"",collection_account:"",collection_desc:""},channel:"",status:0,is_default:0},l=N({...f}),p=m(),w=E(()=>({"config.collection_name":[{required:!0,message:o("collectionNamePlaceholder"),trigger:"blur"}],"config.collection_bank":[{required:!0,message:o("collectionBankPlaceholder"),trigger:"blur"}],"config.collection_account":[{required:!0,message:o("collectionAccountPlaceholder"),trigger:"blur"}],"config.collection_desc":[{required:!0,message:o("collectionDescPlaceholder"),trigger:"blur"}]})),y=async i=>{s.value||!i||await i.validate(async e=>{e&&(k("complete",l),r.value=!1)})};return v({showDialog:r,setFormData:async(i=null)=>{s.value=!0,Object.assign(l,f),i&&(Object.keys(l).forEach(e=>{i[e]!=null&&(l[e]=i[e])}),l.channel=i.redio_key.split("_")[0],l.status=Number(l.status)),s.value=!1}}),(i,e)=>{const u=U,d=q,D=C,_=A,P=O,x=R;return g(),b(P,{modelValue:r.value,"onUpdate:modelValue":e[6]||(e[6]=a=>r.value=a),title:t(o)("updateOfflinepay"),width:"550px","destroy-on-close":!0},{footer:n(()=>[F("span",j,[c(_,{onClick:e[4]||(e[4]=a=>r.value=!1)},{default:n(()=>[V(h(t(o)("cancel")),1)]),_:1}),c(_,{type:"primary",loading:s.value,onClick:e[5]||(e[5]=a=>y(p.value))},{default:n(()=>[V(h(t(o)("confirm")),1)]),_:1},8,["loading"])])]),default:n(()=>[M((g(),b(D,{model:l,"label-width":"110px",ref_key:"formRef",ref:p,rules:t(w),class:"page-form"},{default:n(()=>[c(d,{label:t(o)("collectionName"),prop:"config.collection_name"},{default:n(()=>[c(u,{modelValue:l.config.collection_name,"onUpdate:modelValue":e[0]||(e[0]=a=>l.config.collection_name=a),modelModifiers:{trim:!0},placeholder:t(o)("collectionNamePlaceholder"),class:"input-width","show-word-limit":"",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),c(d,{label:t(o)("collectionBank"),prop:"config.collection_bank"},{default:n(()=>[c(u,{modelValue:l.config.collection_bank,"onUpdate:modelValue":e[1]||(e[1]=a=>l.config.collection_bank=a),modelModifiers:{trim:!0},placeholder:t(o)("collectionBankPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),c(d,{label:t(o)("collectionAccount"),prop:"config.collection_account"},{default:n(()=>[c(u,{modelValue:l.config.collection_account,"onUpdate:modelValue":e[2]||(e[2]=a=>l.config.collection_account=a),modelModifiers:{trim:!0},placeholder:t(o)("collectionAccountPlaceholder"),class:"input-width",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),c(d,{label:t(o)("collectionDesc"),prop:"config.collection_desc"},{default:n(()=>[c(u,{modelValue:l.config.collection_desc,"onUpdate:modelValue":e[3]||(e[3]=a=>l.config.collection_desc=a),modelModifiers:{trim:!0},placeholder:t(o)("collectionDescPlaceholder"),class:"input-width",type:"textarea",rows:"4",clearable:""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])),[[x,s.value]])]),_:1},8,["modelValue","title"])}}});export{K as default};