ImportPayMent-603cc564.js 3.1 KB

1
  1. import{_ as H,__tla as L}from"./Dialog-cd42c639.js";import{d as U,bP as W,h as $,r as t,e as w,b9 as j,ba as q,o as _,v as b,w as d,f as s,a as l,ee as C,c as F,P as g,m as J,t as K,O as Q,g as S,ax as T,bb as X,ef as Y,G as Z,H as aa,_ as ea,__tla as ta}from"./index-430b3151.js";import{u as sa,__tla as la}from"./useMessage-d226ba89.js";let v,oa=Promise.all([(()=>{try{return L}catch{}})(),(()=>{try{return ta}catch{}})(),(()=>{try{return la}catch{}})()]).then(async()=>{let f,h;f=S("div",{class:"el-upload__text"}," \u62D6\u62FD\u6587\u4EF6\u81F3\u6B64\u6216\u8005\u70B9\u51FB\u4E0A\u4F20 ",-1),h={key:0,class:"error-list"},v=ea(U({name:"ImportPayMent",__name:"ImportPayMent",emits:["success"],setup(na,{expose:P,emit:z}){const O=W("getPtdailyWithdrawalList");$();const p=sa(),k=t();t([]);const y=t([]);t(0);const D=t("https://zxpt.newfeifan.cn/admin-api/distri/application-for-withdrawal-channel/import"),i=w({list:[]}),x=w({id:void 0}),I=t({Authorization:"Bearer "+j(),"tenant-id":q()});function M(e,a){}function V(e){const a=/\.(xls|xlsx)$/.test(e.name);return a||p.error("\u53EA\u80FD\u4E0A\u4F20 Excel \u6587\u4EF6!"),a}function N(e,a,o){if(console.log(e),e.code===0&&e.data.length===0)p.success("\u4E0A\u4F20\u6210\u529F"),u("success"),c.value=!1;else if(e.code===0&&e.data.length!==0){p.error("\u90E8\u5206\u8F6C\u8D26\u5931\u8D25\uFF0C\u8BE6\u60C5\u770B\u5217\u8868"),u("success");const n=o.indexOf(a);n!==-1&&o.splice(n,1),i.list=e.data}else{p.error(e.msg),u("success");const n=o.indexOf(a);n!==-1&&o.splice(n,1),i.list=[]}O()}const R=e=>{const a=y.value.map(o=>o.name).indexOf(e.name);a>-1&&y.value.splice(a,1)},c=t(!1),A=t("\u5BFC\u5165\u51ED\u8BC1");t(),t(0),P({open:(e,a)=>{console.log(a),c.value=!0,x.id=a.id,i.list=[]}});const u=z;return(e,a)=>{const o=T,n=X,B=Y,r=Z,E=aa,G=H;return _(),b(G,{title:l(A),modelValue:l(c),"onUpdate:modelValue":a[0]||(a[0]=m=>Q(c)?c.value=m:null),width:"80%",class:"ptdailywithdrawal-dialog"},{default:d(()=>[s(n,{ref_key:"uploadRef",ref:k,class:"upload-demo",drag:"",action:l(D),multiple:"",headers:l(I),data:l(x),"on-change":M,"before-upload":V,accept:".xls, .xlsx, ","on-success":N,"on-remove":R,limit:1},{default:d(()=>[s(o,{class:"el-icon--upload"},{default:d(()=>[s(l(C))]),_:1}),f]),_:1},8,["action","headers","data"]),l(i).list.length?(_(),F("div",h,[s(B,{title:"\u5BFC\u5165\u5931\u8D25",type:"error",description:"\u4EE5\u4E0B\u6570\u636E\u5BFC\u5165\u5931\u8D25","show-icon":""})])):g("",!0),l(i).list.length?(_(),b(E,{key:1,data:l(i).list,style:{width:"100%"}},{default:d(()=>[s(r,{prop:"accountName",label:"\u8D26\u6237\u540D\u79F0"}),s(r,{prop:"accountNumber",label:"\u94F6\u884C\u8D26\u53F7"}),s(r,{prop:"money",label:"\u91D1\u989D"},{default:d(m=>[J(" \uFFE5"+K(m.row.money),1)]),_:1}),s(r,{prop:"postscript",label:"\u9644\u8A00/\u7528\u9014"}),s(r,{prop:"payResult",label:"\u4EA4\u6613\u7ED3\u679C"}),s(r,{prop:"payDescription",label:"\u4EA4\u6613\u63CF\u8FF0"})]),_:1},8,["data"])):g("",!0)]),_:1},8,["title","modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/system/distri/withdrawalchannel/ImportPayMent.vue"]])});export{oa as __tla,v as default};